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)

Mark.B 01-21-2008 08:39 PM

Quote:

Originally Posted by smooth-c (Post 1426154)
Anyone got this working with 3.7?

It works for me on 3.7, all I had to do when I upgraded was to redo the template edits, apart from that it carried on working with no changes.

smooth-c 01-21-2008 11:39 PM

Template edits? elaborate dood!

Cobro 01-25-2008 10:33 PM

works on vbulletin 3.6.8 thx

odln018 02-26-2008 08:04 PM

There's a rather large border around my avatars, is there a way to lessen it?

DrKNickel 02-28-2008 09:02 AM

Me too!

How can i change the border around my avatar?

Greets :)

ME STUPID!

Just change the cellpadding in the table :)

Greets

odln018 02-28-2008 08:40 PM

Here's mine, what should I change?

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\" height=\"50\" 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\" height=\"50\" border=\"0\" />";
        }
        else
        {
                // no avatar specified
                $nouseavatarchecked = HTML_CHECKED;
                $avatarchecked[0] = '';
                $navbaravatar = "<img src=\"" . $vbulletin->options[bburl] . "/$stylevar[imgdir_misc]/noavatar.gif\" alt=\"Your Avatar\" height=\"50\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>";
        }
}
// Avatar In NavBar


Mark.B 03-15-2008 03:41 PM

I can't honestly remember exactly what edits I made...and my navbar is a bit customised anyway....but the important things are that the functionality of this hack works fine in 3.7, all that needs to be done is to reapply the template edits after the upgrade and after reverting the templates.

The important thing to remember is that there are changes to the navbar template in 3.7 close to where this hack operates. Namely, the "your notifications" functionality. But the basics and the layout is still pretty much the same.

I don't have access to a 3.6 navbar template any more so I can't elaborate much more. But it relatively easy...I'm no coder and I did it quite easily.

StarShaper 03-16-2008 02:37 AM

Tested with vB 3.7 Beta 6.

It Works! However the code has some silly parts, which should be corrected into this.

PHP Code:

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=\"\" height=\"\" border=\"0\" />"
} else { 
    
// not using a predefined avatar, check for custom 
    
if ($avatar $db->query_first("SELECT dateline, width_thumb, height_thumb 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=\"" $avatar['width_thumb'] . "\" height=\"" $avatar['height_thumb'] . "\" border=\"0\" />";
    } else { 
        
// no avatar specified 
        
$navbaravatar "<img src=\"" $vbulletin->options['bburl'] . "/$stylevar[imgdir_misc]/emptyavatar.gif\" alt=\"No Avatar\" width=\"\" height=\"\" border=\"0\" />";
    } 



Feckie (Roger) 03-16-2008 07:56 AM

If you want this to show in ibproarcade, do the following.

1: In /arcade/functions/functions.php file..

find online 1241 approx ...
PHP Code:

global $header

Add after it
PHP Code:

 $navbaravatar

Save upload and enjoy....;)

Boofo 03-16-2008 08:49 AM

Quote:

Originally Posted by Feckie (Roger) (Post 1465933)
If you want this to show in ibproarcade, do the following.

1: In /arcade/functions/functions.php file..

find online 1241 approx ...
PHP Code:

global $header

Add after it
PHP Code:

 $navbaravatar

Save upload and enjoy....;)


Or you can do as i do am do a $vbphrase[whatever] = $navbaravatar;

and use the phrase.


All times are GMT. The time now is 11:50 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.01278 seconds
  • Memory Usage 1,768KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (2)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