The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Personal User Badges Details »» | |||||||||||||||||||||||||||
This is something I came up with for a site I help manage. It gives users the option to set a custom badge that is displayed in the postbit_legacy. Sorry if I got the prefix wrong, I couldn't think which one this best belonged in.
Anyway, this is going to take advantage of template modification and profile field creation. So, for starters, we're going to make the profile field that will be used for the badges. Open up your ACP and click on 'Add New User Profile Field'. Select 'Single-Line Text Box'. Title 'Personal User Badge'. Description can be whatever. Put it in the appropriate Profile Field Category. Leave the default value blank. Make sure the field length is high, I use 100. That's for long image links. Set field length to 50. Don't mess with display order. Make sure field required is set to no. Field editable by user should be set to yes. Private field should be set to yes. This makes it so users can't see each others links. It makes the profile page look bad. Staff will still be able to see the links. Field searchable on members list and show on members list should both be set to no. That's it, now click save. You should be redirected to the profile field manager. When finished, it should look something like this when you click on edit: Take note in the field manager of the 'name' column. This is important and will be needed later on. Find the 'name' for the newly created profile field. Next your going to want to open your master style so this template edit will inherit. If it will not inherit you will have to add this manually to each individual style. Find and open the template: postbit_legacy Find this code: Code:
<dl class="userinfo_extra"> Code:
<vb:if condition="$post['fieldxx']"><p style="text-align:center; margin-top:3px;"><img src="{vb:raw post.fieldxx}" alt="Badge" width="180" height="26"></p></vb:if> Code:
<dl class="userinfo_extra"> *stuff that's already here* <vb:if condition="$post['fieldxx']"><p style="text-align:center; margin-top:3px;"><img src="{vb:raw post.fieldxx}" alt="Badge" width="180" height="26"></p></vb:if> </dl> If this receives enough attention I'll update with the personal links option. This allows users to set a link for their badges so that when users click on the image they'll be redirected. EDIT: Here's a demo site. I've directed you to a post by me. As you can see there are two badges. I used this feature to make one for staff only. That's how it will appear though. EDIT2: Here's a screen capture of what it would look like for those of you who don't or can't view the demo site. Screenshots
Show Your Support
|
Comments |
#12
|
|||
|
|||
Quote:
|
#13
|
|||
|
|||
Quote:
And Amaury was right on all accounts. The avatar was 200x200 in size. Simple template edits for the Online status. We use YAAS for our awards. |
Благодарность от: | ||
Amaury |
#14
|
|||
|
|||
Ok I must be a little thick :
Quote:
I can't see a "name" column ? The other thing I can't understand is why you would want to duplicate a "badge" that is already there, I noticed in the thread I landed on in your forum that hardly any of your members are actually using this feature. Surely if someone wants a "custom badge" they can use their avatar to display it, isn't that what it is ? |
#15
|
||||
|
||||
The name column is in the User Profile Field Manager, third one from the left
|
#16
|
|||
|
|||
Quote:
As for your second one, avatars are used to display most commonly images that are perfectly square or sometimes rectangular. The point of this modification is for users to be able to add a custom badge, which is smaller than an avatar by far, and even a custom link. Could you make a profile field to just display a link, yes, but it's not as fun. Hardly any of the users use it because they aren't as active as I'd like. Most just pop in for sip of tea and then leave. And I'd also like to say that, no an avatar is not a badge. An avatar is an avatar. A badge is a badge. This is simply a fun modification for whomever would like to use it. If you think it's pointless or redundant then simply don't use it. I'm not forcing anyone's hand here. I discovered a neat little feature and decided to share it out of the kindness of my heart. |
Благодарность от: | ||
tbworld |
#17
|
|||
|
|||
My daughter might have fun with this. Thanks for sharing.
|
#18
|
|||
|
|||
This looks awesome! Thank you for sharing. I'm not quite ready for my forum to have a full blown achievements system yet, so this sounds like it will work. I'll install and let you know how it works out.
|
#19
|
|||
|
|||
Can you tell me if and how to add an option where I can set it so only certain usergroups can use this?
|
#20
|
|||
|
|||
I to would like to know....but in the field marked "field editable by user" that currently has the options "yes, no, at registration" then add the option "by Admin/Mod" would be great. Perhaps the all powerful OZZ....can do it.
|
#21
|
||||
|
||||
Your not in Kansas anymore.......
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|