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
  #222  
Old 03-16-2008, 09:13 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by StarShaper View Post
Tested with vB 3.7 Beta 6.

It Works! However a small change would be fine, since a fixed avatar size is not always the best.

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="$vbulletin->options['avwidth']" height="$vbulletin->options['avheight']" 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="$vbulletin->options['avwidth']" height="$vbulletin->options['avheight']" border="0" />";
    } 
    else
    { 
        
// no avatar specified 
        
$nouseavatarchecked HTML_CHECKED
        
$avatarchecked[0] = ''
        
$navbaravatar "<img src="" $vbulletin->options['homeurl'] . "/$stylevar[imgdir_misc]/emptyavatar.gif" alt="Avatar" width="$vbulletin->options['avwidth']" height="$vbulletin->options['avheight']" border="0" />"// "<span class="smallfont">No Avatar<br/ >specified</span>";
    


// Avatar In NavBar 
Doesn't work with customavatars.
Reply With Quote
  #223  
Old 03-16-2008, 03:10 PM
StarShaper StarShaper is offline
 
Join Date: Sep 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
Doesn't work with customavatars.
What do you mean with "customavatars"?
Reply With Quote
  #224  
Old 03-16-2008, 03:31 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uploaded Avatars. But I found a better way to do it with the fetch_avatar_url and 2 lines of code.
Reply With Quote
  #225  
Old 03-16-2008, 05:03 PM
StarShaper StarShaper is offline
 
Join Date: Sep 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
Uploaded Avatars.
I don't get it. This plugin works with uploaded Avatars.
Reply With Quote
  #226  
Old 03-16-2008, 05:48 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not for me it didn't.
Reply With Quote
  #227  
Old 03-17-2008, 03:45 AM
HP10T HP10T is offline
 
Join Date: Jan 2007
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hrmm can't seem to get it to work with 3.5. Added with plugin system and added code like instructions said but nothing even shows an error :/
Reply With Quote
  #228  
Old 03-17-2008, 04:11 PM
StarShaper StarShaper is offline
 
Join Date: Sep 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
Not for me it didn't.
Where did you store your custom avatars? Filesystem or database?

Quote:
Originally Posted by HP10T View Post
Hrmm can't seem to get it to work with 3.5. Added with plugin system and added code like instructions said but nothing even shows an error
I only tested it with vbulletin 3.7 Beta 6.

However it should work with 3.5 too. What is displayed in the html source? Please post the complete URL.

For example:

Code:
<a href="http://www.domain.com/forum/profile.php?do=editavatar"><img title="Avatar" src="http://www.domain.com/forum/image.php?u=1&amp;dateline=1205271990" alt="Avatar" border="0" height="80" width="80"></a>
Reply With Quote
  #229  
Old 03-17-2008, 09:24 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by StarShaper View Post
Where did you store your custom avatars? Filesystem or database?
Filesystem.
Reply With Quote
  #230  
Old 03-17-2008, 09:49 PM
StarShaper StarShaper is offline
 
Join Date: Sep 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
Filesystem.
Ok, I already thought that it might has something to do with the storage. I'm using the database for avatars.

It's been a while since I looked through the vB Codebase. However, this line is not correct:

Code:
"" . $vbulletin->options['bburl'] . "/" . $vbulletin->options['avatarurl'] . "/avatar$avatar[userid]_" . $vbulletin->userinfo['avatarrevision'] . ".gif"
I will check this in the next days and post a correct solution.
Reply With Quote
  #231  
Old 03-29-2008, 03:22 AM
HP10T HP10T is offline
 
Join Date: Jan 2007
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by StarShaper View Post
Where did you store your custom avatars? Filesystem or database?



I only tested it with vbulletin 3.7 Beta 6.

However it should work with 3.5 too. What is displayed in the html source? Please post the complete URL.

For example:

Code:
<a href="http://www.domain.com/forum/profile.php?do=editavatar"><img title="Avatar" src="http://www.domain.com/forum/image.php?u=1&amp;dateline=1205271990" alt="Avatar" border="0" height="80" width="80"></a>
What html source arey ou talking about? I am not sure where you got the above
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 12:54 PM.


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.12428 seconds
  • Memory Usage 2,332KB
  • 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
  • (3)bbcode_code
  • (1)bbcode_php
  • (8)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