View Full Version : [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 ;)
albibak
09 Jan 2004, 12:08
I've installed it, and it works, good :)
imported_Blackbeard
09 Jan 2004, 19:16
Any chance of a screenie in vb3
Zachery
12 Jan 2004, 10:26
might also want to make that
if (THIS_SCRIPT == 'index' AND $bbuserinfo[userid] != 0)
that way unregisted users wont run into it :)
Freddie Bingham
12 Jan 2004, 15:43
If you put this in config.php, you can do this with no added queries:
define('AVATAR_ON_NAVBAR', 1);
If you put this in config.php, you can do this with no added queries:
define('AVATAR_ON_NAVBAR', 1);
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
might also want to make that
if (THIS_SCRIPT == 'index' AND $bbuserinfo[userid] != 0)
that way unregisted users wont run into it :)
This takes care of that:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Interesting mod I'm probably going to use this when I make a new welcome panel for my sites
Vb-Hispano
28 Feb 2004, 20:41
installed ;)
Vb-Hispano
29 Feb 2004, 13:59
Actually, nevermind.. figured it out (thanks to Kura):
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
ADD
width="64" height="64"
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and with thist it will be better
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 (http://www.vbulletintemplates.com/mods/member.php?u=7168) -- His replacement string solved the problem.
imported_kyrnel
22 Mar 2004, 20:03
If you put this in config.php, you can do this with no added queries:
define('AVATAR_ON_NAVBAR', 1);How do you put htis code in config.php? Are you sure you didnt mean a different file?
I'm trying to reduce the number of queries being run for Forum Home. So I need to figure this one out. Thx
How do you put htis code in config.php? Are you sure you didnt mean a different file?
I'm trying to reduce the number of queries being run for Forum Home. So I need to figure this one out. Thx
You have to (download then) edit config.php with a text editor and then re-upload the file to your server.
imported_kyrnel
22 Mar 2004, 20:50
You have to (download then) edit config.php with a text editor and then re-upload the file to your server.I'm sorry, what I meant was that I have never seen a hack that required you to edit that specific file (config.php). I was under the impression that you should never edit it.
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...
I'm sorry, what I meant was that I have never seen a hack that required you to edit that specific file (config.php). I was under the impression that you should never edit it.
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...
I know what you mean. I had no idea, so I just added add Freddie's suggestion to the bottom of config.php.
LImburg
01 Sep 2004, 21:41
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
[/color][/size]
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?
If you put this in config.php, you can do this with no added queries:
define('AVATAR_ON_NAVBAR', 1);
That's too cool.
Good point - if you have avatars as files, what is the variable to use for the avatar to show up?
Good point - if you have avatars as files, what is the variable to use for the avatar to show up?
Here's what I use on my site and it works. :)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I knew about that. :) What about if the person does not have a custom avatar though. Freddie's suggestion intrigued me...
AngelGrove
04 Oct 2004, 19:58
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
djjeffa
07 Oct 2004, 04:11
ADD
width="64" height="64"
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and with thist it will be better
64 x 64
I am tring to put this where he did but im totaly clueless
peterska2
07 Oct 2004, 09:30
Thats in the NAVBAR template within the 'welcome panel'
djjeffa
08 Oct 2004, 01:50
got it to work but only on the home page is there any way to make it work on all?
djjeffa
01 Nov 2004, 12:43
got it to work but only on the home page is there any way to make it work on all?
bump!!!!
Change the code you added to phpinclude_start to this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Note this will run a query EVERY pageload.
ADD
width="64" height="64"
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and with thist it will be better
64 x 64
What template did you edit to place that avatar where it is?
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.