Support Forums

Custom Reg Field Dropdown / Hide Listings From Unregistered Users

This is a discussion on Custom Reg Field Dropdown / Hide Listings From Unregistered Users within the Technical Support forums, part of the Technical Support Forums category; What version of 68 Classifieds are you running? v4.1.9 Designer What template are you using? deepsea (slightly customised) Please describe ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

Reply
 
Thread Tools Display Modes
Old 04-22-2010, 07:18 AM   #1
Customer
 
Join Date: Mar 2010
Posts: 6
Rep Power: 0
chris.iveson is on a distinguished road
Default Custom Reg Field Dropdown / Hide Listings From Unregistered Users

What version of 68 Classifieds are you running?
v4.1.9 Designer

What template are you using?
deepsea (slightly customised)

Please describe in detail the issue you are having:

Hi,

Just a few queries:

1. We understand you can't add a dropdown field for a custom user registration field, but is it possible to do this manually by modifying one of the template files? Appreciate it's a bit of a hack, but it's unlikely the values will change once set.

2. We'd like to hide all listings from unregistered users (if users wish to view ads they need to register/log in). Is it also possible to do this modifying the template files?

3. We'd like it so that a user can only modify the "description" field when modifying the ad leaving all values the same (price, description, custom fields etc). Problem is when we hide the <INPUT> element for each field, after the user posts the modified description all other fields are blanked - presumably because their contents were not posted. A workaround has been to use the "readonly" attribute of the input elements, but this is hackable by somebody determined enough. What approach do you suggest we use?

Big thanks in advance,
Chris
chris.iveson is offline   Reply With Quote
Old 04-22-2010, 09:25 AM   #2
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,342
Rep Power: 71
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by chris.iveson
1. We understand you can't add a dropdown field for a custom user registration field, but is it possible to do this manually by modifying one of the template files? Appreciate it's a bit of a hack, but it's unlikely the values will change once set.
Modify this file: yourtemplatefolder/user/userjoin.tpl
Then just use standard HTML <select><option>...</option></select> in the appropriate place within the existing form field for the extra field that you are using.

Quote:
Originally Posted by chris.iveson
2. We'd like to hide all listings from unregistered users (if users wish to view ads they need to register/log in). Is it also possible to do this modifying the template files?
Smarty is your friend.

I would do something like:
Code:
{if $smarty.session.userlevel=6} //userlevel 6 = usergroup Guest
<p>It appears that you are not <a href="userjoin.php"> registered </a>or not <a href="login.php"></a>logged in.</p><p>Only logged in registered users may view our listings.</p>
{else}
..... standard whatever your displaying
{/if}
Quote:
Originally Posted by chris.iveson
3. We'd like it so that a user can only modify the "description" field when modifying the ad leaving all values the same (price, description, custom fields etc). Problem is when we hide the <INPUT> element for each field, after the user posts the modified description all other fields are blanked - presumably because their contents were not posted. A workaround has been to use the "readonly" attribute of the input elements, but this is hackable by somebody determined enough. What approach do you suggest we use?
That would most likely require a module to achieve and redirect them to a modified copy of the checkout template files with each of the form elements as hidden input except what your allowing to be changed.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 04-23-2010, 06:15 AM   #3
Customer
 
Join Date: Mar 2010
Posts: 6
Rep Power: 0
chris.iveson is on a distinguished road
Default

Big thanks Mike, will put into action this weekend!
chris.iveson is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Contact owner mail is not sent from unregistered users vertyal Technical Support 5 07-16-2009 02:20 PM
Can Unregistered Users Post an Ad?? naidu01 Technical Support 2 06-02-2009 03:58 PM
How 2 hide the Coupon or Discount Number field? Isje Technical Support 3 04-15-2009 10:01 AM
Contact form. Unregistered users. fusionx Technical Support 13 10-16-2008 11:29 AM
How to hide a field! bowers01 Technical Support 1 08-06-2008 04:27 AM


All times are GMT -4. The time now is 03:13 PM.


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