jarnuts
12-14-2006, 05:03 PM
I am using the code posted in THIS THREAD (https://vborg.vbsupport.ru/showthread.php?t=116508&highlight=default+avatar+usergroups)
And have also installed the Avatar on Navbar hack by sabret00the (https://vborg.vbsupport.ru/showthread.php?t=99498).
I would like to use the usergroup avatar in the navar like the code from THIS THREAD (https://vborg.vbsupport.ru/showthread.php?t=116508&highlight=default+avatar+usergroups) 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:
// 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:
// 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:http://www.sitename.com/images/skin/misc/.gif
It just returns as "noname".gif
Any help would be appreciated.:tired:
And have also installed the Avatar on Navbar hack by sabret00the (https://vborg.vbsupport.ru/showthread.php?t=99498).
I would like to use the usergroup avatar in the navar like the code from THIS THREAD (https://vborg.vbsupport.ru/showthread.php?t=116508&highlight=default+avatar+usergroups) 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:
// 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:
// 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:http://www.sitename.com/images/skin/misc/.gif
It just returns as "noname".gif
Any help would be appreciated.:tired: