vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Avatar On Navbar (https://vborg.vbsupport.ru/showthread.php?t=99498)

FleaBag 10-19-2006 02:00 PM

Quote:

Originally Posted by sabret00the
give me a couple hours and i'll upload a fixed version.

Hi sabre; it's a year later... Was wondering if you knew how to fix this? Causing me a real pain in the kneck.

sabret00the 10-19-2006 02:04 PM

Quote:

Originally Posted by FleaBag
Hi sabre; it's a year later... Was wondering if you knew how to fix this? Causing me a real pain in the kneck.

got a bit more info, i have no idea to what i'm referring to in that post or even where the post is.

FleaBag 10-19-2006 02:43 PM

Sorry! And I wasn't trying to be sarcy saying it was a year ago lol. Just so you know. ;)

Basically it works great on all the pages in my forum folder. I have vBa Links & Gallery which are in /links and /gallery folders.

On these pages, the URL to the avatar's image is...

http://www.site.com/gallery/customavatars/avatarx.gif

or

http://www.site.com/links/customavatars/avatarx.gif

HTH's. Thanks Sabe. :)

sabret00the 10-19-2006 02:56 PM

Quote:

Originally Posted by FleaBag
Sorry! And I wasn't trying to be sarcy saying it was a year ago lol. Just so you know. ;)

Basically it works great on all the pages in my forum folder. I have vBa Links & Gallery which are in /links and /gallery folders.

On these pages, the URL to the avatar's image is...

http://www.site.com/gallery/customavatars/avatarx.gif

or

http://www.site.com/links/customavatars/avatarx.gif

HTH's. Thanks Sabe. :)

you have your bburl set right?

can you paste the content plugin "Avatar On Navbar Back-End" for me please.

FleaBag 10-19-2006 05:12 PM

My BB URL is set to www.dragonninja.co.uk - my forums are in the root. Do you mean the plugin?

Code:

// Avatar In NavBar
if ($vbulletin->userinfo['avatarid'])
{
    // using a predefined avatar
    $avatar = $db->query_first("SELECT avatarpath FROM " . TABLE_PREFIX . "avatar WHERE avatarid = " . $vbulletin->userinfo[avatarid] . "");
    $avatarid = $avatar['avatarid'];
    $navbaravatar = "<img src=\"" . $vbulletin->options[bburl] . "/$avatar[avatarpath]\" alt=\"Your Avatar\" border=\"0\" />";
}
else
{
    // not using a predefined avatar, check for custom
    if ($avatar = $db->query_first("SELECT dateline, userid FROM " . TABLE_PREFIX . "customavatar WHERE userid = " . $vbulletin->userinfo[userid] . ""))
    {
        // using a custom avatar
        $navbaravatarurl = ($vbulletin->options['usefileavatar']) ? "" . $vbulletin->options[avatarurl] . "/avatar$avatar[userid]_" . $vbulletin->userinfo[avatarrevision] . ".gif" : "" . $vbulletin->options[bburl] . "/image.php?u=" . $vbulletin->userinfo['userid'] . "&amp;dateline=" . $avatar['dateline'] . "";
        $navbaravatar = "<img src=\"$navbaravatarurl\" alt=\"Your Avatar\" border=\"0\" />";
    }
    else
    {
        // no avatar specified
        $nouseavatarchecked = HTML_CHECKED;
        $avatarchecked[0] = '';
        $navbaravatar = "<img src=\"" . $vbulletin->options[homeurl] . "/$stylevar[imgdir_misc]/noavatar.gif\" alt=\"Your Avatar\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
    }
}
// Avatar In NavBar


sabret00the 10-19-2006 05:35 PM

Quote:

Originally Posted by FleaBag
My BB URL is set to www.dragonninja.co.uk - my forums are in the root. Do you mean the plugin?

Code:

// Avatar In NavBar
if ($vbulletin->userinfo['avatarid'])
{
    // using a predefined avatar
    $avatar = $db->query_first("SELECT avatarpath FROM " . TABLE_PREFIX . "avatar WHERE avatarid = " . $vbulletin->userinfo[avatarid] . "");
    $avatarid = $avatar['avatarid'];
    $navbaravatar = "<img src=\"" . $vbulletin->options[bburl] . "/$avatar[avatarpath]\" alt=\"Your Avatar\" border=\"0\" />";
}
else
{
    // not using a predefined avatar, check for custom
    if ($avatar = $db->query_first("SELECT dateline, userid FROM " . TABLE_PREFIX . "customavatar WHERE userid = " . $vbulletin->userinfo[userid] . ""))
    {
        // using a custom avatar
        $navbaravatarurl = ($vbulletin->options['usefileavatar']) ? "" . $vbulletin->options[avatarurl] . "/avatar$avatar[userid]_" . $vbulletin->userinfo[avatarrevision] . ".gif" : "" . $vbulletin->options[bburl] . "/image.php?u=" . $vbulletin->userinfo['userid'] . "&amp;dateline=" . $avatar['dateline'] . "";
        $navbaravatar = "<img src=\"$navbaravatarurl\" alt=\"Your Avatar\" border=\"0\" />";
    }
    else
    {
        // no avatar specified
        $nouseavatarchecked = HTML_CHECKED;
        $avatarchecked[0] = '';
        $navbaravatar = "<img src=\"" . $vbulletin->options[homeurl] . "/$stylevar[imgdir_misc]/noavatar.gif\" alt=\"Your Avatar\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
    }
}
// Avatar In NavBar


replace that with
PHP Code:

// Avatar In NavBar
if ($vbulletin->userinfo['avatarid']) 

    
// using a predefined avatar 
    
$avatar $db->query_first("SELECT avatarpath FROM " TABLE_PREFIX "avatar WHERE avatarid = " $vbulletin->userinfo[avatarid] . ""); 
    
$avatarid $avatar['avatarid']; 
    
$navbaravatar "<img src=\"" $vbulletin->options['bburl'] . "/$avatar[avatarpath]\" alt=\"Your Avatar\" border=\"0\" />"

else 

    
// not using a predefined avatar, check for custom 
    
if ($avatar $db->query_first("SELECT dateline, userid FROM " TABLE_PREFIX "customavatar WHERE userid = " $vbulletin->userinfo[userid] . "")) 
    { 
        
// using a custom avatar 
        
$navbaravatarurl = ($vbulletin->options['usefileavatar']) ? "" $vbulletin->options['bburl'] . $vbulletin->options['avatarurl'] . "/avatar$avatar[userid]_" $vbulletin->userinfo['avatarrevision'] . ".gif" "" $vbulletin->options['bburl'] . "/image.php?u=" $vbulletin->userinfo['userid'] . "&dateline=" $avatar['dateline'] . "";
        
$navbaravatar "<img src=\"$navbaravatarurl\" alt=\"Your Avatar\" border=\"0\" />";
    } 
    else
    { 
        
// no avatar specified 
        
$nouseavatarchecked HTML_CHECKED
        
$avatarchecked[0] = ''
        
$navbaravatar "<img src=\"" $vbulletin->options['homeurl'] . "/$stylevar[imgdir_misc]/noavatar.gif\" alt=\"Your Avatar\" border=\"0\" />"// "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
    


// Avatar In NavBar 

and you're sorted.

FleaBag 10-19-2006 06:00 PM

I seem to be missing a / in the URL between the avatar filename and it's folder! Almost there... Thanks! :D

sabret00the 10-19-2006 06:07 PM

Quote:

Originally Posted by FleaBag
I seem to be missing a / in the URL between the avatar filename and it's folder! Almost there... Thanks! :D

can you give me and example?

FleaBag 10-19-2006 06:10 PM

Avatar URL on each page:

http://www.dragonninja.co.ukcustomavatars/avatar1_4.gif

Just realised I mis-described the problem! Sorry... I meant missing slash between domain and avatar folder.

FleaBag 10-20-2006 03:31 PM

Any ideas Sabe?


All times are GMT. The time now is 11:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01315 seconds
  • Memory Usage 1,773KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete