The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Quick Question
I have a Pokemon forum and I want to put a dropdown list in "Edit Profile" listing 386 names, when a user chooses a name, the sprite of that chosen name appears in their postbit, representing what their favorite pokemon is.
can this be done? |
#2
|
|||
|
|||
Yes it can.
|
#3
|
|||
|
|||
thats great, at least i know it can be done, thank you
|
#4
|
|||
|
|||
Atleast he didn't lie that it was quick
|
#5
|
||||
|
||||
Yes, it can be done. (Admittedly, I highly don't recommend putting the sprite in the postbit - too many images in the postbit can be distracting and annoying. But each to his own.)
First, if you really want to go through with the sprites thing, you'll have to get all the Pok?mon sprites with their names as their filenames somehow. You can look around yourself (or, better yet, you may have them already or know a place where you can get them), but if you don't have them and can't find any, you can just ask me to zip them for you. Just upload them in a special folder called sprites or something under images at the forums. Now go to Admin CP -> User Profile Fields -> Add New User Profile Field As Profile Field Type, choose "Single-selection Menu" Apply these settings (modify at will, of course): Title: Favorite Pok?mon Description: Pick your favorite Pok?mon. Set Default: None Display Order: (leave it as it is) Field Required: (whichever you want) Field Editable by User: Yes Private Field: No (unless you don't want it shown in people's profile) Field Searchable on Members List: (whichever you want) Show on Members List: (whichever you want) (leave all the "Optional Input" stuff like it is) Display Page: Edit Profile Now, for the options, you would normally have to type out the names of all 386, but as it happens that I'm also a Pok?mon fan and have too much time on my hands, I have a Pok?mon list generator on my website. Just enter %[name]% into the field, press the Submit button, copy everything in the textarea, and paste it into the options field. Now press Save at the bottom of the user profile field manager. It should bring you back to the list of user profile fields. Find the field you just added, remember the "name" (which will be something in the direction of field123), and go to the Style Manager under Styles and Templates on your Admin CP menu. From there, select each of your styles in order, go to Edit Templates, and edit either postbit or postbit_legacy (located under "Postbit templates"), depending on which you are using. Now, just find the appropriate place in the code, and add this: Code:
<if condition="$post['field123']"><img src="images/sprites/$post[field123].gif" alt="$post[field123]" /></if> And if you did all this correctly, it should show up for all users who have specified a favorite Pok?mon. |
#6
|
|||
|
|||
He can disable avatars and put that image instead. So he wont have many images.
In fact I think it's a great idea for a pokemon forum. Quote:
Code:
<if condition="$post['field123']"><img src="images/sprites/$post[field123].gif" alt="$post[field123]" /></if> |
#7
|
||||
|
||||
Yeah, slip-up. Sorry. Should be what Michelle said.
Shows me not to attempt to write tutorials at five in the morning... |
#8
|
|||
|
|||
wow thanks, thats perfect, and btw, I had all the sprites uploaded anyway, but thanks so much, and I'm glad I found a pokefan
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|