MyBB Community Forums
Register Pop-up - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Requests (https://community.mybb.com/forum-65.html)
+---- Thread: Register Pop-up (/thread-63689.html)



Register Pop-up - TheSeriesBoard.com - 2010-01-23

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


RE: Register Pop-up - Lo. - 2010-01-24

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.


RE: Register Pop-up - mrpatrickg - 2010-01-24

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