Quote:
Originally Posted by Altari
Hello,
Thank you for your help.
You code works, but only for one link. When i want to add more than 1 link, only the last is displayed.
|
Try this code
PHP Code:
if (vB::$vbulletin->userinfo['userid'])
{
$userid = vB::$vbulletin->userinfo['userid'];
$lien_messujets = array(
'name' => 'rescue_messujets',
'navtype' => 'link',
'url' => '{options.toppath}search.php?do=finduser&userid='.$userid.'&starteronly=1&contenttype=vBForum_Thread',
'active' => 1,
'text' => 'Mes sujets',
'productid' => 'vbulletin',
'navid' => 1
);
$lien_mesmessages = array(
'name' => 'rescue_mesmessages',
'navtype' => 'link',
'url' => '{options.toppath}search.php?do=finduser&userid='.$userid.'&starteronly=1&contenttype=vBForum_Post&showposts=1',
'active' => 1,
'productid' => 'vbulletin',
'text' => 'Mes messages',
'navid' => 2
);
$lien_mesannonces = array(
'name' => 'rescue_commu_annonces',
'navtype' => 'link',
'url' => '{options.toppath}member.php?u='.$userid.'&tab=afficher_annonces',
'active' => 1,
'productid' => 'vbulletin',
'text' => 'Mes annonces',
'navid' => 3
);
$result['vbtab_forum']['links']['vbmenu_qlinks']['links']['rescue_messujets'] = $lien_messujets;
$result['vbtab_forum']['links']['vbmenu_qlinks']['links']['rescue_commu_annonces'] = $lien_mesannonces;
$result['vbtab_forum']['links']['vbmenu_qlinks']['links']['rescue_mesmessages'] = $lien_mesmessages;
unset($userid);
}
compare it with your code, you will know why it was not working earlier.