Support Forums

User Type

This is a discussion on User Type within the Modules / Plugins / Modifications forums, part of the Developer Forums category; This is a Module produced by John (juven14) for my site. No support will be give for this module from ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 11-01-2008, 11:51 PM   #1
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,086
Rep Power: 34
bowers01 is on a distinguished road
Thumbs up User Type

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
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updated Meta Content-Type Jon Modules / Plugins / Modifications 2 06-01-2008 12:41 PM
Can't add listings: my text gets deleted as I type dojo Technical Support 2 04-01-2008 05:05 PM
Payment type Unregistered Pre Sales Questions 12 12-12-2006 01:11 PM


All times are GMT -4. The time now is 02:39 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0