MyBB Community Forums

Full Version: Register Pop-up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I would like a plugin that shows a pop-up to a person viewing my site for 5 mins that asks them to register.

Is this possible or does it already exist?

Thanks,
John
It would be hard to do, the only way i can think of it working would be with Javascript cookies, and i have no idea how to do track all your forum. You can do it by number of posts viewed, which may work better. Or a 30 second one on one each page might work.
you could do this in php with sessions and/or cookies

at the top of each page, put something like


<?
//Start Session
session_start(); 

//Define how many views to limit to
$_SESSION[counterlimit] = 5; 

//If the counter hasnt been set, set it
if(!isset($_SESSION[counter])){$_SESSION[counter] = 0;}

//Each time the page loads, increase counter by 1
$_SESSION[counter]++; 

//If the counter equals the limit, redirect to signup page
if($_SESSION[counter] == $_SESSION[counterlimit]){header("Location register.php");}

?>

you could easily set the counter to a minutes value with the date function. So after 5 minutes the user will be prompted on next page load