![]() |
|
|||||||
| 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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
||||
|
||||
|
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:
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:
-Mike
__________________
Mike-N-Tosh v3.1.7 Developer IndianaPC.org I can what I can and I can't what I can't. |
|
#4
|
|||
|
|||
|
Thank you both, this works nicely and is exactly what I was looking for.
Cheers
__________________
Greg Version 3.1.9 Developer |
| Thread Tools | |
| Display Modes | |
|
|