The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
How To Add Custom Profile Field Information To The Postbit
So you've added some custom profile fields and would like the information to display in the postbit, but how do you go about it? This guide will help you to do this. Throughout this guide the x in fieldx is to be replaced with the field number as shown in the profile field manager in the name column. Single Line Text Boxes To add the contents of a single line text box to the postbit, use one of the following formats: To use a title for the displayed text (eg Real name: Kerry-Anne) Code:
<if condition="$post[fieldx]"><div class="smallfont">Label for text: $post[fieldx]</div></if> Code:
$post[fieldx] While I don't recommend displaying these in the postbit as they can contain a large amount of information, they are done in the exact same way as the single line text box. Note: The text entered will display all on one line, not in multiple lines as added to the text box and displayed in the profile page. Single Selection Radio Buttons & Single Selection Menus These both display text in the same way as the Single Line Text Box so the same format can be applied to these. However, as these are mainly used for fixed options (eg Date of Birth, or Homepage contains adult content here at vB.org) they can also be used to display images (eg the gender in postbit modification). These examples, using images, assume that you have uploaded the images to your misc image directory for the style that you are using. You can replace Code:
$stylevar[imgdir_misc] Code:
.gif To use the contents to display an image, with no label, use the following format: Code:
<if condition="$post[fieldx]"><div><img src="$stylevar[imgdir_misc]/$post[fieldx].gif" border="0" alt="$post[fieldx]" /></div></if> Code:
<if condition="$post[fieldx]"><div class="smallfont">Label for image: <img src="$stylevar[imgdir_misc]/$post[fieldx].gif" border="0" alt="$post[fieldx]" /></div></if> I wouldn't recommend using these to display information in the postbit, as to enable them requires long usage of conditionals to translate the code saved in the database into displayable text. I hope you find this useful. Feel free to ask any questions related to this. |
#22
|
|||
|
|||
anyone want to do this on my site for me???... this is way over my head... PM me
I'll Pay you via PayPal --------------- Added [DATE]1223485311[/DATE] at [TIME]1223485311[/TIME] --------------- I got someone thank you! |
#23
|
|||
|
|||
does anyone know how to make this show up on thread ....under there name and show a picture ? i added the custom user group but cant find where to modify it ..i looked up nder post legacy
msn - mmoore@smoothstone. com --------------- Added [DATE]1228324154[/DATE] at [TIME]1228324154[/TIME] --------------- oh here is my example ..i have choices ... 1 2 3 if they pick1 they get this gif by there name or under it or beside dont matter to me if they pick 2 they get this other picture or gif if they pick 3 they get this other pic or gif ... i know what needs to be done but cant figure it out for love of me ...i have paypal |
#24
|
||||
|
||||
FYI, there's nowhere specified where to add this in the template, and adding it under existing fields called for causes an error of "The conditional on line 62 appears to be missing its beginning tag (<if>). This may cause unexpected behavior."
|
#25
|
|||
|
|||
i actually figured out how to add special modifications on my site ..
www.cg-hq.com i have them pick what 3d software they use adn then it adds a picture under there avatar ...just to let you know this guide plus another helped me |
#26
|
||||
|
||||
They can't tell you exactly where to add it in the template because everyone wants to add their stuff in a different place. It is assumed you will make sure you are not replacing an <if> tag, or doing something else to 'break' the html in the template.
|
#27
|
||||
|
||||
Where would be the best place to add it, then? I've tried several places and the error always appears, just with a different line reference.
|
#28
|
||||
|
||||
Why don't you post the line you are adding and the code a few lines above and below that part in your template and see can see what is wrong.
|
#29
|
|||
|
|||
I got the same thing initially...realized I forgot to add a quote in my <if ....> statement. Make sure you have all of your quotes in place.
|
#30
|
||||
|
||||
Great tutorial! Is there any way to only show the profile field once per page? For example, I run a motoring forum and I show the user's "garage" beneath their signature* but I'd like to only show it on the first post per page for that user
Thanks in advance! * Not within so that it always shows the garage regardless of whether they have a signature or not |
#31
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|