Support Forums

redirect guest when trying to contact owner

This is a discussion on redirect guest when trying to contact owner within the Technical Support forums, part of the Technical Support Forums category; Hello evrybody, When a guest is trying to see a full ad (viewlisting2.tpl) clicking on the correspondant ad in the ...


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

Reply
 
Thread Tools Display Modes
Old 08-27-2010, 09:47 PM   #1
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 205
Rep Power: 16
magicosta is on a distinguished road
Default redirect guest when trying to contact owner

Hello evrybody,

When a guest is trying to see a full ad (viewlisting2.tpl) clicking on the correspondant ad in the list of showlisting2, it displays a custom page telling that he has to register to access the full details etc... more a specific message about the benefits etc...etc...

After testing around with friends, they are telling me that it is too frustrating to not get access to the full details of the ads even when you are not registered.

So, in order to do that, I have modify the code and now, guests are allowed to see full details (viewlisting2.tpl).
But at the time they want to contact the owner (contact the owner link) of the corresponding ad they are redirected to the login page.

What I would like to do is, instead to redirect them to that login page, redirect them to my custom page I talked about above.


Any idea how I can do that?

Thank you for your help
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Old 08-28-2010, 11:43 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,416
Rep Power: 139
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Why would you alter the code to allow unregistered users to see ad details? What users see and are allowed to do is all controlled via 68C in admin via user groups.

Do you have your site set to use PM's? Do you have the unregistered user group set to allow contact of owner?
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 08-30-2010, 02:58 PM   #3
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 205
Rep Power: 16
magicosta is on a distinguished road
Default

Thank you Larry for your reply,


Yes, I understand that what users see and are allowed to do is all controlled via 68C in admin via user groups.

The site is set up in a way that in the viewlisting page, the contact the owner link redirects to the login page when you are not logged in or Guest. If you are registered, it redirects you to the contact the owner form (pm_send.tpl).

So, what I wanted to do is instead to redirect the guest directly to the login page, redirect the guest to my custom page where I display a text whith a link to the register page (userloin.tpl) and login page. This page is specially writen for people who are not still registered.

So, now it is as I wanted. I followed your advice and put {debug} at the top of userlogin.tpl and find out the variable I had to use: $pmon=="Y"}

So, I put a logic condition in my userlogin.tpl as follow:
{if $pmon=="Y"}
code to display the login page
{else}
code to display my custom page
{/if}

Now, it is ok.
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Old 08-30-2010, 05:16 PM   #4
All Hands On Deck
 
seymourjames's Avatar
 
Join Date: Mar 2008
Posts: 3,527
Rep Power: 89
seymourjames is a jewel in the rough
Default

why are you not simply editing contact.tpl in your template to go to any page you specify. lines 73-74 . Edit this

<a href="userlogin.php">{$smarty.const.LANG_USER_LOGI N}</a> or <a href="userjoin.php">{$smarty.const.LANG_USER_REGIS TER}</a>.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C
seymourjames is offline   Reply With Quote
Old 08-31-2010, 05:59 AM   #5
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 205
Rep Power: 16
magicosta is on a distinguished road
Default

Thank you for that advice, David.
__________________
Default Template - V 4.1.10 - Developper
magicosta is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
BCC on Contact the Owner HorseOptions Technical Support 21 03-27-2009 12:37 PM
redirect after successful contact.php frommarcq Modules / Plugins / Modifications 8 12-10-2008 03:09 PM
Contact Owner/Seller if Guest a68designer Technical Support 1 07-31-2008 06:46 PM


All times are GMT -4. The time now is 03:51 AM.


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