Announcement

Collapse
No announcement yet.

Usergroup Conditional Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Usergroup Conditional Help

    Hi all,

    I'm modifying a template to only allow avatar uploads for the admin group, while all other group can only enter url's to images.

    How can I make this part of the code execute only for admins:
    Code:
    <if condition="$show['customavatar_url']">$vbphrase[option_2_upload_image_from_computer]<else />$vbphrase[upload_image_from_computer]</if>
    <div style="padding:$stylevar[formspacer]px">
        <input type="file" class="bginput" name="upload" onchange="check_yes('avatar_yes')" size="45" />
    </div>

  • #2
    Usergroup Conditionals 'Upload From Computer'
    # find in template: modifyavatar
    [strike_temp]# delete all shown[/strike_temp]
    Code:
    <if condition="is_member_of($vbulletin->userinfo, 5, 6, 7)">
    				<if condition="$show['customavatar_url']">$vbphrase[option_2_upload_image_from_computer]<else />$vbphrase[upload_image_from_computer]</if>
    				<div style="padding:$stylevar[formspacer]px">
    					<input type="file" class="bginput" name="upload" onchange="check_yes('avatar_yes')" size="50" />
    </if>
    you caould of ask this from your other thread you created, but it is asking conditionals.
    Last edited by Jose Amaral Rego; Sun 1 Jul '07, 2:35pm. Reason: Had copy & paste with removing one part of instructions

    Comment


    • #3
      Thanks a lot for your help.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X