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
http://www.callaccountingsoftware.com