PDA

View Full Version : IF Conditions


paulyy
07-17-2004, 07:38 PM
<if condition="$post[posts] > 550">
<if condition="$show['customtitleoption']">
<fieldset class="fieldset">
<legend><label for="tb_customtext">$vbphrase[custom_user_title]</label></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td colspan="2">$vbphrase[title_appears_beneath_your_name]</td>
</tr>
<tr>
<td>$vbphrase[your_current_user_title_is]:<br /><strong>$bbuserinfo[usertitle]</strong></td>
<td align="$stylevar[right]"><label for="cb_resettitle"><input type="checkbox" name="resettitle" value="yes" id="cb_resettitle" />$vbphrase[reset]</label></td>
</tr>
<tr>
<td>$vbphrase[custom_user_title]:<br /><input type="text" class="bginput" name="customtext" id="tb_customtext" value="" size="50" maxlength="$vboptions[ctMaxChars]" /></td>
</tr>
</table>
</fieldset>
</if>
</if>



I have that code, but it doesn't work. I added the <if condition="$post[posts] > 550"> myself, assuming it would work. Can anyone tell me the real if condition or how I would go about displaying this?

It's in the Profile settings for the custom user title.

paulyy
07-17-2004, 07:54 PM
found this; <if condition="$bbuserinfo['posts']>550"> without the space it works :D

Andreas
07-17-2004, 08:06 PM
Just to let you know:

This will NOT stop your members with less then 550 posts to have custom titles, it will just hide the input control.

If you want to prevent users with less then 550 posts to not have a custom title you should use usergroup permissions and promitions, eg. create an additional usergroup which gives the right to have a custom title and create a promition so users with > 500 posts will be promoted to this usergroup.

paulyy
07-17-2004, 09:26 PM
Hey, thanks :)

But, if they can't see it, how will they input a custom title?

Andreas
07-17-2004, 09:31 PM
Easy:

Save the HTML, add the missing fields to the form, fill it out and submit it :)

paulyy
07-17-2004, 09:39 PM
But how would they do that with no access to the server?

Andreas
07-17-2004, 09:45 PM
Well ...


Go to User CP / Profile
Click File/Save as ...
Open that file with notpad or any other editor
Add the the field customtext to the form
Adjust the action URL to point to your site
Save the HTML
Click File/Open to load it
Fill out the form
Submit it

paulyy
07-17-2004, 09:54 PM
Ok .... thanks I made promotions :)