View Full Version : Profile Field for postbit_legacy
utw-Mephisto
12-17-2005, 05:36 PM
I show in the postbit_legacy certain information (Arcade Highscore etc.) ..
I would like to give people the option in their usercp to switch that off ..
Meaning : When member is disabling an option in their cp, that particiluar code wont be displayed in their postbit_legacy, all the information other member will be displayed though ..
Reeve of shinra
12-17-2005, 05:53 PM
Off the top of my head:
Create a new drop down type profile field with display or hide or whatever you want to call them as options. (each choice will be represented by a # ... I forget if the first choice is 0 or 1 though)
In your postbit template, you will need to add IF tags around the html for the arcade scores. So it will be something like this:
<if condition="$post[field5] == 1">
$arcadehighscores
<else />
</if>
utw-Mephisto
12-17-2005, 05:55 PM
Off the top of my head:
Create a new drop down type profile field with display or hide or whatever you want to call them as options. (each choice will be represented by a # ... I forget if the first choice is 0 or 1 though)
In your postbit template, you will need to add IF tags around the html for the arcade scores. So it will be something like this:
<if condition="$post[field5] == 1">
$arcadehighscores
<else />
</if>
I was just thinking the same thing .. I gonna try it ...
TyleR
12-17-2005, 05:59 PM
AdminCP -> User Profile Fields -> Add New Profile Field -> Select: Single-Selection Radio Buttons
Input these options:
Title: Display Arcade Info?
Description: Would you like your arcade info displayed in post's?
Options: Yes
No
*NOTE: Make Sure Yes & Now Are Seperated By A Line Break (by hitting the enter button)!
Set Default: Yes
Leave the rest, and hit Save.
Now, when you go back to profile fields manager page, take note of the field number!
Now, go to: AdminCP -> Styles & Templates -> Edit Templates -> postbit_legacy
Find:
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a><!-- v3 Arcade --> <if condition="$post['arcadeawards']"><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]"><img src="$vboptions[arcadeimages]/trophy.gif" align="absmiddle" alt="$vbphrase[arcade_champion]" border="0" /></a></if>
<!-- /v3 Arcade -->
replace with: Note: remember I said remember the field number from the profile fields page? well, here you replace X with the number.
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a><if condition="$post[fieldX] == 'Yes'"><!-- v3 Arcade --> <if condition="$post['arcadeawards']"><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]"><img src="$vboptions[arcadeimages]/trophy.gif" align="absmiddle" alt="$vbphrase[arcade_champion]" border="0" /></a></if>
<!-- /v3 Arcade --></if>
still in postbit legacy, find:
<!-- v3 Arcade -->
<if condition="$post['arcadeawards']">
<tr><td class="thead"><phrase 1="$post[username]">$vbphrase[xs_arcade_awards]</phrase></a></td></tr>
$post[arcadeawards]
</if>
<if condition="($post['arcadeoptions'] & 1) AND $post['userid']!=$bbuserinfo['userid']">
<tr><td class="thead">$vbphrase[arcade]</a></td></tr>
<tr><td class="vbmenu_option"><a href="arcade.php?do=newchallenge&userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[challenge_x_in_the_arcade]</phrase></td></tr></if>
<!-- /v3 Arcade -->
Replace with:
<if condition="$post[fieldX] == 'Yes'"><!-- v3 Arcade -->
<if condition="$post['arcadeawards']">
<tr><td class="thead"><phrase 1="$post[username]">$vbphrase[xs_arcade_awards]</phrase></a></td></tr>
$post[arcadeawards]
</if>
<if condition="($post['arcadeoptions'] & 1) AND $post['userid']!=$bbuserinfo['userid']">
<tr><td class="thead">$vbphrase[arcade]</a></td></tr>
<tr><td class="vbmenu_option"><a href="arcade.php?do=newchallenge&userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[challenge_x_in_the_arcade]</phrase></td></tr></if>
<!-- /v3 Arcade --></if>
this is assuming your using v3 Arcade, by the way :)
- Tyler
Reeve of shinra
12-17-2005, 06:04 PM
Looks like Tyler has you covered :)
utw-Mephisto
12-17-2005, 06:07 PM
Does not work ;( (both options)
this is my code :
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="58%" align="left">
<thead>
<tr>
<td class="alt1">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('my_table_$post[postid]')"><img id="collapseimg_my_table_$post[postid]" src="images/misc/test_open.gif" alt="" border="0" /></a>
Arcade
</td>
</tr>
</thead>
<tbody id="collapseobj_my_table_$post[postid]" style="display: none;">
<tr>
<td class="alt1" valign="top">
$post[crowns]$post[champtext]
</td>
</tr>
</tbody>
</table>
Any idea ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.