1
bjbtexas
Title Tag Hack
  • 2004/12/8 0:53

  • bjbtexas

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/3 2


Is there a title tage hack that is universal to all modules?

Is there a title tag hack for News and xDirectory?

2
script_fu
Re: Title Tag Hack

The (Theme Changer) module would be the best for this...
Look in the module repository.

3
bjbtexas
Re: Title Tag Hack
  • 2004/12/19 23:43

  • bjbtexas

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/3 2


Thanks, but I am looking for something like what is in AMS module to put in the xDirectory.

$xoopsTpl->assign('xoops_pagetitle'$myts->makeTboxData4Show($xoopsModule->name()) . ' - ' $myts->makeTboxData4Show($article->title()));


I want to append the title tag with an individual page name.

4
bjbtexas
Re: Title Tag Hack
  • 2005/1/26 0:18

  • bjbtexas

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/3 2


I finally found it!

I read about it on a Chinese site (using Google translations) It referred me to the French XOOPS site, but I couldn’t find it there, but I did find it here:

http://www.herve-thouzard.com/modules/mydownloads/singlefile.php?cid=7&lid=66&sel_lang=english


It adds the page title to every page in these directories:

Mydownloads
Mylinks
Newbb
News
Sections
Soapbox
Xoopsfaq
Xoopsheadline
Xoopspartners
Xoopspoll

I’ve made it work for xDirectory if anyone wants it let me know and I’ll put it on my site. The title gets a little long, so I cut it down to the site name and the singlelink.php page title. If any one knows how I could make it just the singlelink.php page title removing the site name I’d appreciate the help.

Thanks,

5
jayjay
Re: Title Tag Hack
  • 2005/1/26 10:11

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi bjbtexas!

Great work!

I'm interested in your title hack for xdirectory. Can you post it on xoops.org so that everyone can benefit from it?

I just posted a title tag hack for wfdownloads myself, but I feel lazy today so if you have a solution for xdirectory...

6
rudycash
Re: Title Tag Hack
  • 2005/1/26 10:29

  • rudycash

  • Just popping in

  • Posts: 70

  • Since: 2004/2/12


I need the Hack for Xdirectory aswell.

Isn't it about time we had SEF URL's for XOOPS like mambo?

7
bjbtexas
Re: Title Tag Hack
  • 2005/1/26 15:42

  • bjbtexas

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/3 2


Here is the code changes for the singlelink.php added at line 88 in xDirectory:
// // Page Title Hack by Xoops-France copied from mylinks by bjb@advenquest.com 1/25/05
$title="";
if(
$cid>0)
{
    
$sql "SELECT title FROM ".$xoopsDB->prefix("xdir_cat")." t where cid=$cid";
    
$result=$xoopsDB->query($sql,$show,$min);
    
$myrow $xoopsDB->fetchArray($result);
    
$title=' - '  $myts->makeTboxData4Show($myrow['title']);
}
$xoopsTpl->assign('xoops_pagetitle'$myts->makeTboxData4Show($ltitle)); // Shortened by bjb@advenquest.com 1/25/05 from  $xoopsTpl->assign('xoops_pagetitle', $myts->makeTboxData4Show($xoopsModule->getVar('name')). $myts->makeTboxData4Show($title).' - '.$myts->makeTboxData4Show($ltitle));
// Page Title Hack by Xoops-France copied from mylinks by bjb@advenquest.com 1/25/05


The rest are availiable
here see it working in Adventure Directory

8
jayjay
Re: Title Tag Hack
  • 2005/1/27 9:09

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


You can put almost the exact same code in viewcat.php to show category titles in xdirectory:

$title="";
if(
$cid>0)
{
$sql "SELECT title FROM ".$xoopsDB->prefix("xdir_cat")." t where cid=$cid";
$result=$xoopsDB->query($sql,$show,$min);
$myrow $xoopsDB->fetchArray($result);
$title=$myts->makeTboxData4Show($myrow['title']);
}

$xoopsTpl->assign('xoops_pagetitle'$title.' | '.$myts->makeTboxData4Show($xoopsModule->getVar('name')));


I added this around line 90 just above this line:

if ($xoopsModuleConfig['useshots'] == 1) {


Have fun!

9
bjbtexas
Re: Title Tag Hack
  • 2005/1/27 19:37

  • bjbtexas

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/3 2


How did you change the order, so the page title is before the site title?

10
bjbtexas
Re: Title Tag Hack
  • 2005/1/27 23:11

  • bjbtexas

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/3 2


Never mind I figured it out,

<title> <{$xoops_pagetitle}> | <{$xoops_sitename}></title>


I changed the title tag order in my theme.

This should vault me to the top of Google any minute now!

Thank you for the insipration JayJay. You have very nice site!

Login

Who's Online

197 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 197


more...

Donat-O-Meter

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

Latest GitHub Commits