PDA

View Full Version : VB4 Links


Turtile
December 15th, 2009, 04:00 PM
I'm having trouble making my links work correctly for the Classifieds and Photopost. I've seen that you've done it on your sample sites. I know this isn't the best place to ask but I haven't got it to work with help from a vbulletin forum.

When I click on the link, it selects the forums instead of the new link I created.

I used the plugin method - here is my code:

$tabselected = '';
$tablinks = '';
if (classifiedsbutton == '/classifieds')
{
$vbulletin->options['selectedcb']='/classifieds';
$tabselected = ' class="selected"';
}
$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="/classifieds">Classifieds</a>'.$tablinks.'</li>' ;

Thanks

Chuck S
December 15th, 2009, 04:56 PM
maybe a global_state_check hook with this code


global $template_hook;

$tabselected = '';
$tablinks = '';

if (PP_SCRIPT == 'PP_Classifieds')
{
$vbulletin->options['selectednavtab']='cp_pro';
$tabselected = ' class="selected"';
$tablinks = ' <ul class="floatcontainer">
<li><a href="http://www.yoursite.com/classifieds/index.php">Classifieds Home</a></li>
<li><a href="http://www.yoursite.com/classifieds/uploadproduct.php">Upload Ads</a></li>
<li><a href="http://www.yoursite.com/classifieds/search.php">Search</a></li>
</ul> ';


}

$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="http://www.yoursite.com/classifieds/">Classifieds</a>'.$tablinks.'</li>';

Turtile
December 17th, 2009, 01:53 PM
The classifieds code worked but I can't get it to work with the Gallery link. (I'm not sure if PP_Gallery and pp_pro are correct)

global $template_hook;

$tabselected = '';
$tablinks = '';

if (PP_SCRIPT == 'PP_Gallery')
{
$vbulletin->options['selectednavtabpp']='pp_pro';
$tabselected = ' class="selected"';
$tablinks = ' <ul class="floatcontainer">
<li><a href="http://www.unusualplants.net/gallery/index.php">Photo Gallery Home</a></li>
<li><a href="http://www.unusualplants.net/gallery/uploadphoto.php">Upload Photos</a></li>
<li><a href="http://www.unusualplants.net/gallery/search.php">Search</a></li>
</ul> ';


}

$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="http://www.unusualplants.net/gallery/">Gallery</a>'.$tablinks.'</li>';

Also, the integration seems to be having problems. When I click on the Classifieds Link, it completely logs me out. On the Gallery (PP7) page, I'm logged out on the index page, but get logged in when I click on an image.

Thanks

Chuck S
December 17th, 2009, 07:51 PM
I would suggest you visit our faq forum and read up on cookies if your having logout issues as there is no problems with the actual integration. That sounds like your cookies are not set correct.

Your gallery tab does not work because your PP_SCRIPT define is wrong. It should be PP_Pro