I am using the code posted in
THIS THREAD
And have also installed the
Avatar on Navbar hack by sabret00the.
I would like to use the usergroup avatar in the navar like the code from
THIS THREAD does in the navbar.
Looking at the xml file for the plugin I tried a couple different variations of code but alas i have failed to figure it out.
This is the original code coming from the xml file:
PHP Code:
// no avatar specified
$nouseavatarchecked = HTML_CHECKED;
$avatarchecked[0] = '';
$navbaravatar = "<img src=\"" . $vbulletin->options[bburl] . "/$stylevar[imgdir_misc]/noavatar.gif\" alt=\"Your Avatar\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
This is what I tried to do:
PHP Code:
// no avatar specified
$noavatar = $db->query_first("SELECT usergroupid FROM " . TABLE_PREFIX . "user WHERE userid = " . $vbulletin->userinfo[userid] . "");
$nouseavatarchecked = HTML_CHECKED;
$avatarchecked[0] = '';
$navbaravatar = "<img src=\"" . $vbulletin->options[bburl] . "/$stylevar[imgdir_misc]/$userinfo[usergroupid].gif\" alt=\"Your Avatar\" height=\"65\" width=\"65\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
what I get back is this (using general values)I get a 404 image block with the following path:
Code:
http://www.sitename.com/images/skin/misc/.gif
It just returns as "noname".gif
Any help would be appreciated.:tired: