1
rsalomone
XBS_Tags / Metatags Hack
  • 2007/7/4 11:52

  • rsalomone

  • Just popping in

  • Posts: 21

  • Since: 2005/6/21


Hello,

I have been struggling with XBS_Tags on XOOPS 2.0.16 hosted by GoDaddy. The module is a brilliant idea but unfortunately the developer tried to determine the problem but could not. Here is something I came up with that gave me a partial solution to my problem. I have found a hack that will give me dynamic titles, metatags and descriptions by inserting the following in the footer.php. I use wiwimod extensively. Each page is driven by the wiwimod\index.php page with a parameter. I did the following right before the line:

$xoTheme->render();


My code:


$page = $_GET['page'];
$myts =& MyTextSanitizer::getInstance();
$page = $myts->undoHtmlSpecialChars($page);

switch ($page) {
case 'parameter1':
$page = "Page Title For Parameter 1 Goes Here";
$pagekey = "Keyword1, Keyword2, Keyword 3";
$pagedesc = "This is unique description of Parameter1 page";
break;

case 'About':
$page = "About Page of My Company";
$pagekey = "About XYZ Company, Name, XYZ";
$pagedesc = "My company specializes in billing software";
break;

default:
$page = "Title for all other pages";
$pagekey = "Keyword1, Keyword2, Keyword3";
$pagedesc = "General Description";
break;
}

$xoopsTpl->assign('xoops_pagetitle', strip_tags($page));

$xoopsTpl->_tpl_vars['xoTheme']->metas['meta']['description'] = strip_tags($pagedesc);
$xoopsTpl->assign('xoops_meta_description', strip_tags($pagedesc));

$xoopsTpl->_tpl_vars['xoTheme']->metas['meta']['keywords'] = $pagekey;
$xoopsTpl->assign('xoops_meta_keywords', $pagekey);


MY PROBLEM:

I cannot seem to get my title to work properly. It gets duplicated with a "-" dash. That is, "Title of all other pages - Title of all other pages". If I remove the title in the General Meta Tags & Footer settings, I get a "-" leading my title. This is ok but not great.

Is there a way to eliminate the existing title entirely without concatenating my hack title?

Regards,
rsalomone

www.callaccountingsoftware.com

2
BlueStocking
Re: XBS_Tags / Metatags Hack

I just went in and turned on the debug for the smarty debug console (my site) and from the output produced by debug it looks like you may be able to determine where the dash is being inserted by looking at that code.

Good Luck
https://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

3
rsalomone
Re: XBS_Tags / Metatags Hack
  • 2007/7/19 16:39

  • rsalomone

  • Just popping in

  • Posts: 21

  • Since: 2005/6/21


Unfortunately, when I turn on Smarty Debug, it does not show the dash (-) in the page title. I assume it is being inserted by Xoops. It is a concatenation since if I don't blank out the title in the Preferences section, the dash serves as a separator.

Does anyone have another idea or better still...an idea of how to fix XBS_TAGS to work with 2.0.16

4
rsalomone
XBS_Tags Help
  • 2007/7/23 13:01

  • rsalomone

  • Just popping in

  • Posts: 21

  • Since: 2005/6/21


I wonder if anyone has any idea of how to remove the "-" from the front of the "TITLE".

I get the above hack to work but it puts a "-" in front of the title (but not in description or keyword).

The title looks something like this?

- Default Title for other pages

If I add a title in the Preferences section of XOOPS, I then get something preceeding the dash.

AAA - Default Title for other pages.


This would lead me to believe that XOOPS is adding the dash somewhere (in order to concatenate the 2 titles). But if the XOOPS title is blank, it does so anyway.

Can anyone tell me how to fix this. I have tried using Debug with no luck.

Spotless

Login

Who's Online

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


Members: 0


Guests: 165


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