I have vBulletin integrated with vbPortal, ppClassifieds and Photopost.
I have succeeded in getting all four sections of the site to switch languages and themes together and have modified the navbar to include minibanners, links to main sections, language and theme drop downs.
This is all working fine but I want the navbar to change banners and navbar items depending on which section and which language it is currently in.
I tried putting variations of the navbar template code in the language folders then replacing the navbar code with the following:
Code:
$section = "forums"; //default section
$path = ($_SERVER["SCRIPT_NAME"]);
$path2 = strtr($path, "/", " ");
if(stristr($path2, 'forums')) {
$section = "forums";
}
if(stristr($path2, 'classifieds')) {
$section = "classifieds";
}
if(stristr($path2, 'photopost')) {
$section = "photopost";
}
include (HOMEPATH . '/language/' . VBPLANG . '/navbar-'.$section.'.php');
// should load banner bars with filenames like navbar-forums.php navbar-classifieds.php navbar-photopost.php from language folders
It doesn't work and as far as I can see any PHP code in the navbar template does not work.
Does anyone have any suggestions?
P.S. I am a beginner with PHP