vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Avatar on left side navbar? (https://vborg.vbsupport.ru/showthread.php?t=155072)

raiderlax 08-13-2007 02:20 AM

Avatar on left side navbar?
 
1 Attachment(s)
Hello I have asked this before and have not still not found the way to get the avatar to be put in the navbar, beside the welcome info, please see the attached pic.

I really need to do this and I know you guys know how, please some help :)

Dismounted 08-13-2007 05:08 AM

Did you use my avatar code I posted on the forums once? I would find it for you, but I'm a bit short of time.

raiderlax 08-14-2007 02:23 AM

Quote:

Originally Posted by Dismounted (Post 1316354)
Did you use my avatar code I posted on the forums once? I would find it for you, but I'm a bit short of time.

Sorry dismounted I have been looking through your posts and cannot find the avatar code that you have posted.

When you have time it would be very appreciated if you could help me with this.

Thank you.

Dismounted 08-14-2007 09:51 AM

PHP Code:

// include backend
require_once('./global.php');
require_once(
DIR '/includes/functions_user.php');

// setup avatar if exists
$avatar fetch_avatar_url($vbulletin->userinfo['userid']);
if (
$avatar != '' AND $vbulletin->options['avatarenabled'])
{
    
$avatarurl $avatar[0];



raiderlax 08-14-2007 01:44 PM

Thank you so much Dismounted, now I'm sorry to ask this, but where do that code go?

raiderlax 08-16-2007 05:07 AM

Quote:

Originally Posted by raiderlax (Post 1317391)
Thank you so much Dismounted, now I'm sorry to ask this, but where do that code go?

bump, sorry i need to know where to put this :)

Dismounted 08-16-2007 06:04 AM

In a plugin. $avataurl will contain the URL, so just use a normal image tag.

raiderlax 08-16-2007 03:56 PM

Thanks Dismounted, so I put that code in as a plugin, than I put $avataurl in the navbar where I want to display the avatar???

Also with the plugin, what hook location do I put it?

Thanks so much?

Also how would I have like a default avatar their, just an image like I in vBadvanced, that says "No avatar" and when they click it it brings them to the avatar options?

Dismounted 08-17-2007 10:06 AM

Hook Location: global_start

As I said before, $avatarurl only contains the URL (as per the variable name). You will have to code the image tag.

Analogpoint 08-18-2007 03:36 AM

As dismounted says, put <a href="$avatarurl" alt="" /> in the navbar template.


All times are GMT. The time now is 02:29 PM.

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.02479 seconds
  • Memory Usage 1,735KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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