![]() |
[RC2] Hackless avatar on homepage
This is a update of my template modification for vB 2, with this modification installed your avatar will be displayed on index.php. This can be useful for welcome panels and other similar template modifications.
Yes im aware Tungsten as done for for vBulletin 3 beta, and this is no reflection on him but his code dose alot of database work to pull the avatar, mine will only run one query. Credits: Chen - vB 2 hack author and idea Tungsten - updated this modification to vB 3 beta O and me ;) |
I've installed it, and it works, good :)
|
Any chance of a screenie in vb3
|
might also want to make that
if (THIS_SCRIPT == 'index' AND $bbuserinfo[userid] != 0) that way unregisted users wont run into it :) |
If you put this in config.php, you can do this with no added queries:
define('AVATAR_ON_NAVBAR', 1); |
Quote:
Hmm, how would you get the avatar to show up? I've tried $userinfo[avatarurl] and $bbuserinfo[avatarurl], non seem to work for me. :/ |
Actually, nevermind.. figured it out (thanks to Kura):
Code:
<img src="image.php?$session[sessionurl]u=$bbuserinfo[userid]&dateline=$bbuserinfo[avatardateline]" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" /> |
good simple things
|
Quote:
PHP Code:
|
Interesting mod I'm probably going to use this when I make a new welcome panel for my sites
|
installed ;)
|
Quote:
width="64" height="64" Code:
<img src="image.php?$session[sessionurl]u=$bbuserinfo[userid]&dateline=$bbuserinfo[avatardateline]" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" width="64" height="64" /> 64 x 64 |
Hmmm...
I put it in the navbar template, but now it only shows up on forumhome. It's missing from deeper pages. Could someone suggest a way to fix this? I added freddie's config.php suggestion, too. EDIT - fixed Great thanks to Vb-Hispano -- His replacement string solved the problem. |
Quote:
I'm trying to reduce the number of queries being run for Forum Home. So I need to figure this one out. Thx |
Quote:
|
Quote:
Also, there is no code in that file that seems similar to the code he suggested adding. It only contains the basic variables for connecting to the mysql database. I see Define() statements in index.php and global.php but not in config.php... |
Quote:
|
Quote:
Fixed? How? I've been trying to figure this out for a good day.. but I can't figure out how to get the avatar displayed on the deeper pages. Just like it doesn't call the function. I put the code in the phpinclude_start template and the html in the header template... Can anyone help me out? |
Quote:
|
Good point - if you have avatars as files, what is the variable to use for the avatar to show up?
|
Quote:
Here's what I use on my site and it works. :) HTML Code:
<if condition="$bbuserinfo['hascustomavatar']"> |
I knew about that. :) What about if the person does not have a custom avatar though. Freddie's suggestion intrigued me...
|
Post removed.
|
I installed this, put it in the Right Sided Collum mod, working on a lil User Stats section, long way to go though, thanks for the mod. Clicks insatll
|
Quote:
|
Thats in the NAVBAR template within the 'welcome panel'
|
got it to work but only on the home page is there any way to make it work on all?
|
Quote:
|
Change the code you added to phpinclude_start to this:
PHP Code:
|
Quote:
|
All times are GMT. The time now is 08:24 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|