Support Forums

Confirmation of Age for 'Adult' category?

This is a discussion on Confirmation of Age for 'Adult' category? within the Technical Support forums, part of the Technical Support Forums category; I have one adult category and I'd like users to simply click a confirmation that they are 18 years of ...


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

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 06-03-2009, 11:24 AM   #1
Just get on with it!
 
michael's Avatar
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 463
Rep Power: 29
michael is just really nice michael is just really nice
Default Confirmation of Age for 'Adult' category?

I have one adult category and I'd like users to simply click a confirmation that they are 18 years of age or over. Creating that page is easy enough as is having the user subsequently forwarded to the adult category, what I'm unclear about is how to have users directed to the new confirmation page on clicking 'Adult'.

Hope that lot makes sense.
__________________
M Michael
V4.1.9 Developer - Modified 3 Column Default Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline  
Old 06-03-2009, 11:43 AM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,473
Rep Power: 131
Eric Barnes is just really nice Eric Barnes is just really nice
Default

I would probably edit the category.php file and just under the slug if statement add something like:
PHP Code:
if($slug=='adult') { // category uri
    
if(!isset($_COOKIE['valid']) {
        
//no cookie so put redirect here.
    
}

Then set a cookie when they approve it.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 06-03-2009, 11:45 AM   #3
curmudgeon
 
Join Date: Mar 2006
Posts: 5,275
Rep Power: 130
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

I would start by looking at a place where the system already forwards you and duplicate it.

For example look at login.php you can see the following....

$class_tpl->assign('title',LANG_LOGIN_SUCCESS);
$class_tpl->assign('forward',TRUE);
$class_tpl->assign('location',$location);
$class_tpl->assign('body','forward.tpl');

You can see a location is specified and the template forward.tpl is displayed so open and take a peek in there. You should be able to easily create your adult check page to assign template variables and call up forward.tpl and it should handle the rest.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 06-03-2009, 05:47 PM   #4
Just get on with it!
 
michael's Avatar
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 463
Rep Power: 29
michael is just really nice michael is just really nice
Default

Thank you both. I know nothing about writing cookies but will do some research. Larry's approach makes sense but seems to involve a bit more work . . .

Hmmmm
__________________
M Michael
V4.1.9 Developer - Modified 3 Column Default Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline  
Old 07-03-2009, 09:28 AM   #5
Customer
 
Join Date: Sep 2008
Posts: 51
Rep Power: 9
ronin is on a distinguished road
Default

Any news about that?

I need that features me too!

Any help?
ronin is offline  
Old 07-06-2009, 06:14 AM   #6
Customer
 
Join Date: Sep 2008
Posts: 51
Rep Power: 9
ronin is on a distinguished road
Default Solved!

Solved !

Try to enter on this category:

MegaVoce.it - Annunci Gratuiti Incontri e relazioni Incontri per adulti -

The same, if you enter DIRECTLY on a "adult" listing..
Try that:
MegaVoce.it - Annunci Gratuiti DESIRE' - Trieste

If anyone need it, I'll give the code I use.

Just write me.
ronin is offline  
Old 07-06-2009, 06:47 AM   #7
Just get on with it!
 
michael's Avatar
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 463
Rep Power: 29
michael is just really nice michael is just really nice
Default

Well done ronin! That's exactly what I need - and it was a pleasure to check out your site .

Any chance you could post the code here?

Michael
__________________
M Michael
V4.1.9 Developer - Modified 3 Column Default Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline  
Old 07-06-2009, 08:58 AM   #8
Customer
 
Join Date: Sep 2008
Posts: 51
Rep Power: 9
ronin is on a distinguished road
Default

Well, basically I used the code you can find here:
Dynamic Drive DHTML Scripts- Interstitial Content Box

(you have to modify the js and css file to give them abolute path to your web site..)

The I place in the HEAD section of layout template this code:
Code:
<!-- start disclaimer -->
{if $categoryname == "category name where you need disclaimer"}
<link rel="stylesheet" type="text/css" href="http://www.YOUR-WEB-SITE-ADDRESS.com/disclaimer/interstitial.css" />
{literal}<script type="text/javascript" src="http://www.YOUR-WEB-SITE-ADDRESS.COM/disclaimer/interstitial.js"></script>{/literal}
{elseif $categoryname == "another category name where you need disclaimer - 02"}
<link rel="stylesheet" type="text/css" href="http://www.YOUR-WEB-SITE-ADDRESS.COM/disclaimer/interstitial.css" />
{literal}<script type="text/javascript" src="http://www.YOUR-WEB-SITE-ADDRESS.COM/disclaimer/interstitial.js"></script>{/literal}
{elseif $categoryname == "another category name where you need disclaimer - 03"}
<link rel="stylesheet" type="text/css" href="http://www.YOUR-WEB-SITE-ADDRESS.COM/disclaimer/interstitial.css" />
{literal}<script type="text/javascript" src="http://www.YOUR-WEB-SITE-ADDRESS.COM/disclaimer/interstitial.js"></script>{/literal}
{else}
{/if}
<!-- end disclaimer -->
Basically, it check IF the user in IN a category where you need a disclaimer.
IF the category name is in the list, then disclaimer is showed.

There is one BIG problem with that.
Cookies is set as soon you are showed the disclaimer, even if you choose to "return" to home page (that is: example, you click: NO, I DON'T WANT TO ENTER).
So, if you later return to an adult category disclaimer IS NOT showed again.

Anyway, with this script, you can choose the frequency, so you can set to: every page is loaded, every browser session (the ones I choose), or every X days.

Write again if you need other help!
ronin is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adult Payment Processor Needed CHRD Modules / Plugins / Modifications 1 12-10-2008 04:18 PM
Re-send Email Confirmation teg Technical Support 9 08-23-2008 07:01 PM


All times are GMT -4. The time now is 06:08 AM.


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