Support Forums

registered users only can view site?

This is a discussion on registered users only can view site? within the Pre Sales Questions forums, part of the Pre-Sales & Testimonials category; Is there any setting that I can adjust to make the classifieds only viewable to registered approved members? I want ...


Go Back   68 Classifieds Forums > Pre-Sales & Testimonials > Pre Sales Questions

Reply
 
Thread Tools Display Modes
Old 01-30-2009, 10:08 AM   #1
Junior Member
 
Join Date: Jan 2009
Posts: 1
Rep Power: 0
kjavitz is on a distinguished road
Default registered users only can view site?

Is there any setting that I can adjust to make the classifieds only viewable to registered approved members? I want a b2b site that the public can't see.
kjavitz is offline   Reply With Quote
Old 01-30-2009, 10:19 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,355
Rep Power: 134
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

There isnt any switch to change in admin but what you want to do can be done.

I would probably create a new user group for approved registered members then you can use smarty logic to selectivly display/hide content based oin the usergroup of the viewer.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 02-02-2009, 09:37 PM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,006
Rep Power: 74
seymourjames is a jewel in the rough
Default

There is a quick way to do this and it would be easier to understand if you had 68C already but I put it here for completeness as others with the software may want something similar. It works simply on the basis of whether someone has logged into your site. Lets suppose you only want to display the adverts in a search results or category listing page to members who are logged in:

You can place a simple test around the code in your showlistings.tpl file (part of the template) so that only members will see the contents.

{if $smarty.session.username<>"" || $smarty.cookies.username<>""}
all the code that is currently in your showlisting.tpl file
{else}
message: you can only see the listings if you are a member. click this link to register
{/if}

Likewise you can do the same thing with another file called viewlisting.tpl file preventing people from seeing the actual details of a listing.

So with a little work you can turn on and off any part of your site to those which have not logged in.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds Version 5 Themes and Version 4 Templates
seymourjames is offline   Reply With Quote
Old 02-02-2009, 11:10 PM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,497
Rep Power: 132
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Actually guys it has a way to do this. Just edit the Guest usergroup:
"This Usergroup can view your site" - No
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 02-03-2009, 05:54 AM   #5
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,006
Rep Power: 74
seymourjames is a jewel in the rough
Default

Silly us - it is obvious when you go to user groups - big embarrassment.

I actually use the above to change the main menu navigation items in the layout.tpl t and to stop certain extra pages (I have created) being viewed depending upon whether someone is logged in or not.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds Version 5 Themes and Version 4 Templates
seymourjames is offline   Reply With Quote
Reply

Tags
None

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Members View All Registered Members dexignz Technical Support 2 09-17-2008 05:18 PM
How can registered users change category of posted ads?? ksuralta Technical Support 4 07-03-2008 11:29 AM
Registered Globals Success Technical Support 5 04-07-2008 09:32 AM


All times are GMT -4. The time now is 11:37 PM.


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