This is a Module produced by John (juven14) for my site.
No support will be give for this module from John or myself, please dont email us, if you have a question please post on this thread.
User Type Module
With this module installed you can use {if $extra3 == "D"} Do something for dealer {else} Do something for private seller {/if}
or {if $extra3 == "P"} Do something for private seller {else} Do something for dealer {/if}
I use this for the Seller store mod in userindex. So only users that are dealers can access the seller store. Then in view listing i have {if $extra3 == "D"}{$storeTitle}{else}Private Seller{/if}
To install:
1. Download
http://www.truckandmachinery.com.au/user_type.zip then extract and upload it to the modules directory on your server
2. Open templates/default/user/userjoin.tpl
3. Find
Code:
{if $dis_extra3=="Y"}
<tr>
<td class="formleft">{if $req_extra3=="Y"}<span class='required'>{$smarty.const.LANG_STAR}</span>{/if}{$extra3_text}{$smarty.const.LANG_COLON}</td>
<td class="formright"><input name="extra3" type="text" id="extra3" value="{$extra3}" size="{$smarty.const.FIELD_SIZE}" /></td>
</tr>
{/if}
Replace it with
Code:
{if $dis_extra3=="Y"}
<tr>
<td class="formleft">{if $req_extra3=="Y"}<span class='required'>{$smarty.const.LANG_STAR}</span>{/if}{$extra3_text}{$smarty.const.LANG_COLON}</td>
<td class="formright">
<input name="extra3" type="radio" id="extra3_" value="P" size="{$smarty.const.FIELD_SIZE}" checked="checked"/> Private Advertiser
<input name="extra3" type="radio" id="extra3" value="D" size="{$smarty.const.FIELD_SIZE}" /> Dealer
</td>
</tr>
{/if}
4. Log in to your site administration, goto settings - User Registration Fields. find extra field 3, enter "User Type" without quotes, click the display check box and then submit.
5. Now goto Settings - Modules then click regenerate. Click Initialize for the module called User Type, then click activate.
6. You can now use {if $extra3 == "D"} in userindex, userjoin, index and possibly more.
I have tested this on 3 different hosts, but I can not guarantee it will work on your host.
Good luck
Nick