Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Avatar On Navbar Details »»
Avatar On Navbar
Version: 1.00, by sabret00the sabret00the is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 10-27-2005 Last Update: 10-28-2005 Installs: 349
Uses Plugins Template Edits
 
No support by the author.

Erm, this add's a cool Avatar to your navbar but only for logged in users

something like that, i really need to think of ways to make this stuff more exciting.

fixed bug where pre-defined avatars wouldn't show.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #202  
Old 08-27-2007, 07:35 PM
Daky Daky is offline
 
Join Date: Aug 2006
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a small problem.

Can somebody help me with this?

Firefox is ok, but not IE.

My code:
[PHP]// 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=\"Avatar\" width=\"45\" height=\"45\" 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=\"Avatar\" width=\ 45\" height=\"45\" border=\"0\" />";
}
else
{
// no avatar specified
$nouseavatarchecked = HTML_CHECKED;
$avatarchecked[0] = '';
$navbaravatar = "<img src=\"" . $vbulletin->options['homeurl'] . "/$stylevar

IE7 Not ok:
Reply With Quote
  #203  
Old 08-28-2007, 09:01 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Daky View Post
I have a small problem.

Can somebody help me with this?

Firefox is ok, but not IE.

My code:
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="Avatar" width="45" height="45" 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="Avatar" width=\ 45" height="45" border="0" />";
    } 
    else
    { 
        
// no avatar specified 
        
$nouseavatarchecked HTML_CHECKED
        
$avatarchecked[0] = ''
        
$navbaravatar "<img src="" $vbulletin->options['homeurl'] . "/$stylevar[imgdir_misc]/noavatar.gif" alt="Avatar" width="45" height="45" border="0" />"// "<span class="smallfont">Ne postoji Avatar<br/ >Specified</span>";
    


// Avatar In NavBar 

Firefox OK:


IE7 Not ok:
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="Avatar" width="45" height="45" 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="Avatar" width="45" height="45" border="0" />";
    } 
    else
    { 
        
// no avatar specified 
        
$nouseavatarchecked HTML_CHECKED
        
$avatarchecked[0] = ''
        
$navbaravatar "<img src="" $vbulletin->options['homeurl'] . "/$stylevar[imgdir_misc]/noavatar.gif" alt="Avatar" width="45" height="45" border="0" />"// "<span class="smallfont">Ne postoji Avatar<br/ >Specified</span>";
    


// Avatar In NavBar 
Reply With Quote
  #204  
Old 08-28-2007, 09:04 PM
Daky Daky is offline
 
Join Date: Aug 2006
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you!
Works
Reply With Quote
  #205  
Old 08-29-2007, 02:08 PM
Alibi Alibi is offline
 
Join Date: Jul 2007
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can i make it so the <--PM LOGIN INFO--> breadcrumb and avatar all are displayed to the left side of the navabar instead of the right?
Reply With Quote
  #206  
Old 10-13-2007, 01:20 PM
Daky Daky is offline
 
Join Date: Aug 2006
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

What should i do to make this working in vBadvanced?

vBadvanced CMPS v3.0 RC2 is what i am using.

Thank you!
Reply With Quote
  #207  
Old 10-15-2007, 10:20 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Daky View Post
Hi,

What should i do to make this working in vBadvanced?

vBadvanced CMPS v3.0 RC2 is what i am using.

Thank you!
vBadvanced 3 RC2 came out after this. so you'll have to ask them.
Reply With Quote
  #208  
Old 10-19-2007, 07:30 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whats the condition if someone is logged out to not show it cause if i log out i get 2 white squares and it pushes the login box off the screen.

So if i had a conditional to add to say if logged in then show it would be fine

<td class="alt1"><a href="$vboptions[bburl]/profile.php?do=editavatar">$navbaravatar</a></td>

Ive fixed it - needed to add the code inbetween logged in statement
Reply With Quote
  #209  
Old 11-19-2007, 03:16 PM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone figured out the problem with the Avatar not displaying in the Header within the "No Search Result" page? BTW, working perfectly with vB 3.6.8 Patch 2
Reply With Quote
  #210  
Old 01-20-2008, 09:53 PM
yeku yeku is offline
 
Join Date: May 2005
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed with 3.6.7 and working perfectly

FF and IE 6, work well

thanks
Reply With Quote
  #211  
Old 01-21-2008, 08:38 PM
smooth-c smooth-c is offline
 
Join Date: Jan 2008
Posts: 226
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone got this working with 3.7?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14776 seconds
  • Memory Usage 2,350KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete