vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   IF Conditions (https://vborg.vbsupport.ru/showthread.php?t=67288)

paulyy 07-17-2004 07:38 PM

IF Conditions
 
HTML Code:


<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 ...
  1. Go to User CP / Profile
  2. Click File/Save as ...
  3. Open that file with notpad or any other editor
  4. Add the the field customtext to the form
  5. Adjust the action URL to point to your site
  6. Save the HTML
  7. Click File/Open to load it
  8. Fill out the form
  9. Submit it

paulyy 07-17-2004 09:54 PM

Ok .... thanks I made promotions :)


All times are GMT. The time now is 03:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00980 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete