The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I make it so that...
so that users who dont have an avatar get the "no avatar selected" avatar put into their user CP and then it shows up in postbit? Or if that isnt possible.... then just put the avatar into the postbit part?
|
#2
|
|||
|
|||
Ug. How did I do this.
Well, what I did for my forum was break it down on the number of posts required to receive an avatar. This crossed the entire forum and I kept it simple and did not have different avatars available based on different post count totals. Anyone on my forum can receive an avatar once they've reached 201 posts. With that said, I simply force it in functions.php to display the guestavatar.gif image (or you can call it whatever you want if you use a different filename). The code below does the following. If a poster has less than 200 posts, default to the guestavatar.gif image. If a poster has no avatar selected, even if they have over 200+ posts, default to the guestavatar.gif image. This modification is based on VB v2.3.0. Open up functions.php ### FIND: Code:
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]); Code:
if($post[posts] <= 200) { $post[avatar] = "<img src={imagesfolder}/guestavatar.gif"; } if($post[avatar] == "") { $post[avatar] = "<img src={imagesfolder}/guestavatar.gif"; } guestavatar.gif is the filename of the avatar you want to display if someone has less than 200 posts OR has not selected an avatar. If your own forum allows avatars at 50 posts or 100 posts, simply change the <=200 to the number of required posts needed on your own forum. Rename guestavatar.gif to your own image.gif file if you are using a different filename. This modification will only change the Postbit and not the Control Panel. When a member is able to choose their own avatar, the above code will not stop it from being displayed. Hope that's what you're looking for. Syl... |
#3
|
|||
|
|||
Yes I think that will do nicley. Thank you!
|
#4
|
|||
|
|||
erm actually something weird is going on here:
the avatar is showing up as a red X because the URL to the avatar is: http://www.sims2forums.com/images/Si...X/noavatar.gif<BR WTF? How did a <BR get in there? I didnt put a <BR into the functions.php! |
#5
|
||||
|
||||
Try checking in the avatars in the admincp. Where it has default avatar or atleast I thought I seen that some time put it to that.
|
#6
|
|||
|
|||
I did.... this makes no sense!
|
#7
|
||||
|
||||
if($post['avatar'] == "") { $post['avatar'] = "<img src=http://yourdomin.com/forum/inages/guestavatar.gif"; }
Plop that some where in a file where it calls the avatars. Showthread would be one area and the user cp another. |
#8
|
||||
|
||||
You can check my Avatar in UserCP and then finish the if statement with the code SmEdD posted
(Also, you can use {imagesfolder} ) |
#9
|
|||
|
|||
Thanks guys
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|