The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Lets say I have 3 Custom Fields. Game1, Game 2, Game 3
And I want my members to enter codes for each of the 3 games. Anyone know how to accomplish this? |
#2
|
||||
|
||||
![]()
I think there is an article in the articles forums on how to add a block to the profile/member.php page. Have you looked there?
|
#3
|
|||
|
|||
![]()
THanks Lynne. I did find this https://vborg.vbsupport.ru/showthread.php?t=203775
I am able to create the fields, and the block, but I don't know the code on how to display images based on a field. So lets say I have field 1: text (to be used as the alt text of graphic) Then in profile Block I would like to display a graphic that represents Field 1. Does this make sense to anyone? Thanks for your time |
#4
|
||||
|
||||
![]()
You can do it how I did mine and create an if conditional for each one by using a code like this...
HTML Code:
<if condition="$post[fieldxx]"> <img src="$stylevar[imgdir_misc]/$post[fieldxx].gif" alt="" /> </if> Hope that helps you out ![]() |
#5
|
||||
|
||||
![]()
See if what Brooks posted is what you wanted. You may want to add something in where it says alt="". Like alt="$post[fieldxx]" ? It's hard to tell without actual examples of what you will have in the fields.
|
#6
|
|||
|
|||
![]()
Thank you guys for helping me out. Here is my code in the Memberinfo Template at the bottom: I am also on Vbulletin 3.8.3
<div id="sidebar_container"> <!-- sidebar --> $template_hook[profile_right_first] $blocks[stats_mini] <!--new block--> <!-- $id --> <div id="$id" class="tborder content_block"> <h4 class="thead block_title"> <a href="#top" class="collapse_gadget" onclick="return toggle_collapse('$id')"><img id="collapseimg_$id" src="$stylevar[imgdir_button]/collapse_generic{$vbcollapse['collapseimg_'.$id]}.gif" alt="" border="0" /></a> <a name="$id"></a> <span class="block_name">Codes</span> </h4> <div class="block_content" id="collapseobj_$id" style="{$vbcollapse['collapseobj_'.$id]}"><div class="alt1 smallfont block_row block_footer"> <if condition="$post[field15]"> <img src="$stylevar[imgdir_misc]/$post[field15].png" alt="$post[field15]" /> </if> </div></div> </div> <!-- / $id --> <!--new block--> $template_hook[profile_right_mini] $blocks[friends_mini] $blocks[youtube] $blocks[albums] $template_hook[profile_right_album] $blocks[groups] $blocks[visitors] $template_hook[profile_right_last] <!-- / sidebar --> </div> <!-- end usercss --> </div> $footer </body> </html> Ok I can see the Codes Block, but nothing shows. I have a Field called mk and its field15. What is entered in that field is just numbers. Is my code wrong? thanks for any assistance. |
#7
|
||||
|
||||
![]()
The code you wrote is looking for image files named 2322.png or 222.png or whatever-the-number-is.png. If you always want it to show mk.png, then you need to change $post[field15].png to mk.png
|
#8
|
|||
|
|||
![]()
Ok I changed the code. No matter what I have in Field15 the graphic never shows up in my codes block. Is there something wrong with my block code? The field is just a single text field. Logically it looks like it should display the image. I am at a loss as to why nothing displays.
|
#9
|
||||
|
||||
![]() Quote:
|
#10
|
||||
|
||||
![]()
I should have noticed... you can't use $post right there, it's should be $userinfo.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|