71
shivaji
Re: Apache mod_rewrite RewriteRule Success
  • 2003/12/30 15:23

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Anyone with friedly URLs conversion experince ready to help this puzzle I posted in my previous thread?

We are using Windows 2000 Server prof Edition though I hosted my site on Linux Server..I also like to know how to create and edit .htaccess file in my Windows machine ?

Thanks,



72
shivaji
Re: META Tag hacks for Xoops 2.5.1
  • 2003/12/30 7:42

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Hi Draven

You have done a nice job but I am not agreeing with your logic. I am working with XOOPS 2.0.5.1. First of all I put your code

<{php}>
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', $dirname );
<{/php}>
<{include file="/themes/phpkaox/<{$xoops_cmod}>_meta.html"}>

in “theme.html” at meta tags section and my theme file is located at “themes\phpkaox\” folder.

Now I create some html files against each module like news_meta.html, wfsection_meta.html, contactus_meta.html, system_meta.html etc and put all those files in “themes\phpkaox\” folder. I think my procedure is correct. Isn’t?

But I am sorry to say it does not working properly. It showing some errors like

Warning: filemtime(): Stat failed for /themes/phpkaox/news.html (errno=2 - No such file or directory) in c:\inetpub\wwwroot\class\smarty\Smarty.class.php on line 1650

Can you tell me why it’s showing error?


2. “$xoops_cmod” variable fetching each module name and you append “_meta.html” for each module with that variable. Now you create html pages for each module, which contain meta tags and title etc. Let say I have installed 15 modules in my XOOPS and as per your logic I have to create 15 [module name]_meta.html pages and put all these pages in my selected themes directory. It is so ridiculous. Isn’t it?

3. Now I uninstall two modules out of 15 from my application and delete all these 2 module folders from server. If you notice carefully then you will see that those two [module name]_meta.html files are still stored in my selected themes directory. As a XOOPS module developer you know that, whenever you delete any modules from application then related files and evens tables are deleted automatically from xoops. But in this case those html files I have to remove manually from server and it does not support xoops’s basic feature.


4. From admin section admin can set Meta tags (keywords, description) and title. Let say
I overwrite those Meta (keyword, description) tags with your code in my theme.html. Now in my news module I want to use the default keywords and description (selected by admin). Then what I do? I already overwrite the code in theme.html. Who are familiar with XOOPS code to them it’s not a big problem but who are unaware about XOOPS code it’s a problem to them.

If you go through my code, may be my code is big but you have to only copy and paste.

Thanks



73
shivaji
META Tag hacks for Xoops 2.0.5.1
  • 2003/12/29 14:06

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Some users will not find this META tags hacks very useful on a temporary basis, but commercial site would sure to get a huse benefit with this hacks. A module like e-xoops Meta Tags is not impossible but I am requesting XOOPS core team to add this features in their next XOOPS release.

Anyway I have successfully added META tags for all of my majore Modules like Forum, MyLinks, MyDownload, Shop etc. in my XOOPS 2.5.1 site www.123ecominfo.com using this hacks.

I am not suggesting anyone to use this hacks, but someone with little PHP knowledge ( but good knowledge of english )can esily add this to their existing pages on their own risk.

Quote:

// META TAGS FOR INDIVIDUAL MODULES //

If I want to set individual keywords, description (as meta tags for searching) and page title for each module then what I have to do?


If you notice carefully then you will find that each module contain one file called "xoops_version.php", which contain some important information regarding that module.

Let say, you want to set some keywords, description (as meta tags) and page title for module "contact us". Don't worry, you have to do only two things.

Step: 1. Open the "xoops_version.php" file located in "\modules\contact" and write
three lines :-

// if you want to set "keywords" for "contact us" module, it's not mandatory

a:) $modversion['keywords']="contact us, admin@coswap.com, contact us form";


// if you want to set "description" for "contact us" module, it's not mandatory

b:) $modversion['desc']="contact us, admin@coswap.com, contact us form";


// if you want to set "page title" for "contact us" module, it's not mandatory
c:) $modversion['slogan']="We are waiting for your query";



now save "xoops_version.php" and close it.


step: 2. Now open "header.php" file located in "" and paste the following lines before code for showing 'banners' ( // show banner? Line no. 79 approx.).


// META TAGS FOR INDIVIDUAL MODULES //


if (!empty($xoopsModule))
{
$mid=$xoopsModule->mid();

if (is_numeric($mid))
{
$module_handler =& xoops_gethandler('module');
$versioninfo =& $module_handler->get($mid);
}
elseif (file_exists(XOOPS_ROOT_PATH.'/modules/'.$mid.'/xoops_version.php'))
{
$module_handler =& xoops_gethandler('module');
$versioninfo =& $module_handler->create();
$versioninfo->loadInfo(trim($mid));
}

$module_keywords =$versioninfo->getInfo('keywords');
$module_desc =$versioninfo->getInfo('desc');
$slogan=$versioninfo->getinfo('slogan');
}


if ($module_keywords)
{ $xoopsTpl->assign('xoops_meta_keywords', $module_keywords); }

if ($module_desc)
{ $xoopsTpl->assign('xoops_meta_description', $module_desc); }


//---------------------------------
and overwrite the following code

-------------------------------------

if (!empty($xoopsModule))
{
// set page title

$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name'));

if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname'))
{
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), $xoopsModule->getVar('mid'), true, XOOPS_BLOCK_VISIBLE);
}
else
{
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), $xoopsModule->getVar('mid'), false, XOOPS_BLOCK_VISIBLE);
}

}


----------------------
with
----------------------


if (!empty($xoopsModule))
{
// set page title

if($slogan)
{
$xoopsTpl->assign('xoops_pagetitle', $slogan);
}

else
{
$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name'));
}


if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname'))
{
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), $xoopsModule->getVar('mid'), true, XOOPS_BLOCK_VISIBLE);
}
else
{
$block_arr =& $xoopsblock->getAllByGroupModule($xoopsUser->getGroups(), $xoopsModule->getVar('mid'), false, XOOPS_BLOCK_VISIBLE);
}

}

-------------------
and
-------------------

if (isset($xoopsModule))
{
// set page title
$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name'));

if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname'))
{
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, $xoopsModule->getVar('mid'), true, XOOPS_BLOCK_VISIBLE);
}
else
{
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, $xoopsModule->getVar('mid'), false, XOOPS_BLOCK_VISIBLE);
}
}

-----------------------
with
-----------------------


if (isset($xoopsModule))
{
// set page title
if($slogan)
{
$xoopsTpl->assign('xoops_pagetitle', $slogan);
}
else
{
$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name'));
}

if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname'))
{
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, $xoopsModule->getVar('mid'), true, XOOPS_BLOCK_VISIBLE);
}
else
{
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, $xoopsModule->getVar('mid'), false, XOOPS_BLOCK_VISIBLE);
}
}


------------------------


and save "header.php".

Now open your site in your browser and go to the "contact us" module. Click on view->source link in your browser and you will see that this page contains those meta tags (keywords, description) which you have define in "xoops_version.php".Page title of your "contact us" module has been changed to "We are waiting for your query".

** If you haven't set any keywords or description or page title in "xoops_version.php" then default keywords,description and page title selected by admin from admin section will be set by default.




Thanks,



74
shivaji
Re: Apache mod_rewrite RewriteRule Success
  • 2003/12/29 1:32

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Dear sunsnapper,

I read your post many times and try to put my own .htaccesss rule for my website www.123ecominfo.com without success.

I asked my hosting providers to give me details about my server configuration. Basically I want to convert all of the links under below given Modules to friendly URLs:

1. Forum (/modules/newbb)
2. News (/modules/news/)
3. MyLinks (/modules/mylinks/)
4. Shop (/modules/shop/)
5. Contact Us (/modules/contact/)
6. Registration
7. My Downloads (/modules/mydownloads)

Is it possible for you to explain me how to define a rule for all this 7 points give above.

Thanks,




75
shivaji
Re: Search engine optimisation problems and solutions
  • 2003/12/28 9:58

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Quote:

But then again, you know what the meta generator of e-xoops was also a core hack + module until they put it into the core... Sorry just thinking out loud here.


yeah, I have that e-xoops hack. They did a good work on it.



76
shivaji
Re: Search engine optimisation problems and solutions
  • 2003/12/28 9:01

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


I think this is the time I have to work on the XOOPS core code to make the module compatible to accept META tags, you know the biggest problem doing any changes on core structure of XOOPS is that whenever XOOPS release new version, I have to again re-modify the changes I did in the older version... I will release this Hack here within next two days.




77
shivaji
Re: Search engine optimisation problems and solutions
  • 2003/12/28 8:56

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Please go through this topic:

https://xoops.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=11892&forum=10

French version of META module is simply useless (its a META TAG Generator for web sites and not specific for XOOPS). We will get many generator like this and people simply dont use this type of generator to get a poor ranking.



78
shivaji
Re: Amazon, Hot or Not, phpNuke and Xoops
  • 2003/12/26 19:36

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Hi:

Look at what Saul Albert is doing:

http://www.communitybooks.org

wiki Page:http://dlpdev.theps.net/ (Open source)





79
shivaji
Re: Amazon, Hot or Not, phpNuke and Xoops
  • 2003/12/26 19:17

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Hi:

I am not sure but I thought amazon use both ISBN/ASIN for books. anyway, i will install this module and will let you know. Thanks !






80
shivaji
Re: My Site
  • 2003/12/26 19:00

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Good work, I would suggest you to install "nautix" theme, replacing this one. Thats all, you dont have to do anything apart from that. oh yes, Just change the logo with yours.







TopTop
« 1 ... 5 6 7 (8) 9 10 11 ... 13 »



Login

Who's Online

229 user(s) are online (154 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits