68 Classifieds Forums  

Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Questions & Support
Register Projects FAQ Members List Calendar Search Today's Posts Mark Forums Read

v3.1 Questions & Support Help and support for 68 Classifieds v3.1.x

 
Thread Tools Display Modes
  #1  
Old 10-09-2007, 02:05 AM
Greg H Greg H is offline
Junior Member
 
Join Date: Jul 2007
Posts: 17
Default Best way to advise "Guests" they need to login to veiw sellers details - SOLVED

I have set my site so that guests can see all ads but cannot see sellers details.

I am looking for the best way to advise these users that they need to login to view sellers details.

Ideally I would like to have it so when a Guest is veiwing an ad, where the sellers details usually are a link shows advising them to register/login to veiw sellers details.

Any doing something like this ?

Thanks
__________________
Greg

Version 3.1.9 Developer

Last edited by Greg H : 10-09-2007 at 06:05 PM. Reason: Solved
Reply With Quote
  #2  
Old 10-09-2007, 08:18 AM
Lhotch's Avatar
Lhotch Lhotch is offline
Moderator
 
Join Date: Mar 2006
Posts: 1,725
Default

In the viewlisting.tpl.php template at the top above where the fields are populated I would simply do a check to see if the user is logged and if they are not logged in display text telling them if they register/log in they can see users details so they can contact them.

Code:
{if $smarty.session.username=='' || $smarty.cookies.username==""}
display your message here
{/if}
__________________
Larry.
Reply With Quote
  #3  
Old 10-09-2007, 09:20 AM
Mike-N-Tosh's Avatar
Mike-N-Tosh Mike-N-Tosh is offline
Senior Member
 
Join Date: Jan 2007
Posts: 189
Default

What I do is place a message in two places.

In the showlistings(2).tpl.php I have the following code at the top of the page:
PHP Code:
{if $smarty.session.userlevel==5}
    <
table width="80%" align="center">
        <
tr>
            <
td>Welcome Guest! Although you can browse all of our listings,<br>
            
You must be registered and <strong>logged in</strong> to<br>
            
see the seller information or contact the seller.</td>
        </
tr>
    </
table>
{/if}
This way, the message will show at the top of any page that shows listings.

In addition, in the viewlisting(2).tpl.php file(s) I have the following code similar to what lhotch has shown in his example:
PHP Code:
{if $smarty.session.userlevel==5}
    <
tr>
        <
td>You must be logged in to see the seller or contact the seller</td>
    </
tr>
{/if}
userlevel=5 limits this being viewed by a guest otherwise it is not shown.

-Mike
__________________
Mike-N-Tosh
v3.1.7 Developer

IndianaPC.org

I can what I can and I can't what I can't.
Reply With Quote
  #4  
Old 10-09-2007, 06:03 PM
Greg H Greg H is offline
Junior Member
 
Join Date: Jul 2007
Posts: 17
Default

Thank you both, this works nicely and is exactly what I was looking for.

Cheers
__________________
Greg

Version 3.1.9 Developer
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 07:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.