View Full Version : Guest avatar?
dirgotronix
05 Nov 2001, 18:31
How did you do that? I'm tossing ideas about with my forumhome template that uses the avatar, but people with no avatar and guests just see something crappy. I was thinking of adding a row into the customavatars table with userid 0 but I'm afraid that would break something. How did you get the default avatar and avatar for guests?
I put this on index.php:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Now you use noavatar.gif for users with no avatars, guestavatar.gif for guests (that obviously don't have avatars), and add this to your forumhome template:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
That's it. :)
Aracnakat
19 Nov 2001, 07:28
Okie .. first off, thanks for posting this!! Great stuff!
But I do have a question ... I've installed it but I allow folks to either a) Select an Avatar from those present -OR- b) Upload their own.
Currently the hack is only showing up for those who uploaded their own avatar images. Anyone who selected one of our avatars gets the "noavatar.gif" instead of their selected avatar. (Is there a work around for this?)
Also, I thought for guests I would make the "guestavatar.gif" say just "Please Register" ..
In the code below .. is there a way to link that particular image to the registration page? (I tried, but it didn't work).
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
You can check out what I've done at my site: Charr The Grimm Fate Forums (http://forums.charrgrimmfate.com/index.php?referrerid=4).
Thanks in advance for any help, I realize that folks have been buggin' the bejesus out of you and wish that I didn't have to.
~Kat :)
Ok, after you installed the above hack, do this.
Instead of this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
use ONLY this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Next post will have the link you wanted.
To make the link you wanted, after you installed the above hack, do this.
Instead of this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
use this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
AND instead of this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
use this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Now in the template, use this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and NOT this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Aracnakat
19 Nov 2001, 08:16
Wow .. fast and speedy and good stuff! Thank you very very much.
One problem though ... I know this is going to sound totally stupid, but I couldn't figure out how to properly integrate the three templates: forumhome, forumhome_unregmessage & forumhome_welcometext
So I had to do the following .. which I know isn't what you are supposed to do .. but is how I did it to get it to work ;x (FYI: I tried placing the "avatarurl" image code in both the uregmessage & welcometext but they wouldn't show up .. I would get the broken link box for some reason)
forumhome:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
forumhome_unregmessage:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
forumhome_welcometext:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
With your instructions for the "registration link" I think I'd need to put the images under forumhome_unregmessage & forumhome_welcometext -- but don't know why my images won't show up.
(NOTE: It's only the images from avatars which were uploaded which don't show up .. the noavatar.gif and guestavatar.gif seemed to work fine).
Any ideas?
Thanks again for your quick and great work .. if there's no work around for the above problem at least I got the selected avatars to work and that's the most important issue of all!
~Kat :)
Help me help you.
In index.php, where did you place the code for the avatar and everything?
Aracnakat
19 Nov 2001, 17:56
Doh! I should have thought to list that last night .. okie I put your code and the code for the # of posts here:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
right above
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I wasn't sure where it went, so that's probably the problem! :)
Thanks again.
Donna
Ok, let me show you something.
This is what you posted:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
You see that the forumhome_welcometext template is being eval() BEFORE the code for the avatar?
That's why it won't show up in that template, because that template is being "called" before you do the avatar thing.
Anyway, I combined some stuff for you. Use this, instead of that block you posted:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Aracnakat
19 Nov 2001, 22:19
FireFly,
Thank you ever so much for your time! This ended up working out perfectly for me! AND .. I appreciate the little PhP lesson as well since I didn't even realize that it was calling one thing before the other (this will come in handy in the future as I learn PhP).
Thanks again .. it looks awesome and everyone seems to like it very much!
You are wonderful!
Donna :)
Mike Gaidin
21 Nov 2001, 02:06
FireFly, can you release this in the hacks forum. I can't follow your instructions here.
Looks like I'm gonna have to. :)
I will later, it's very simple really, so it shouldn't take me much time.
Thanks Aracnakat! :)
http://www.vbulletin.org/forum/showthread.php?s=&threadid=32560
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.