Members | Sign In
All Forums > News
avatar

WP Exit Plugin

posted Sep 03, 2010 17:58:47 by Benson
Does anyone know how Bill made the exit plugin to go directly to a ClickBank offer?

I do not see the way to make the changes in the WP exit plugin.
<?
/*
Plugin Name: exit window redirect
Plugin URI: http://hirewordpressexperts.com/
Description: for exit window
Author: Saurabh Nagar
Author URI: http://hirewordpressexperts.com/
*/
add_action('init','initalize_options1');
function initalize_options1()
{

}

add_action('admin_menu','newmenus1');
function newmenus1()
{
add_menu_page('','Exit window',8,__FILE__,'createexit');
}
function createexit()
{
include('exit_window_form.php');
}
if(!is_admin())
{
add_action('wp_footer', 'add_js1');

}


function add_js1()
{

$success=0;
do
{
$r=rand(1,5);
$ex="exitwindow"."$r";
$site=get_option($ex);
if(strlen($site)>0)
{
echo '<script language="javascript">';
echo 'function fixExitLinks(){ ';
echo 'var myLinks = document.links; ';
echo 'for(var i=0;i < myLinks.length;i++) { ';
echo 'myLinks.setAttribute("onclick","did_confirm=0;");';
echo '}';
echo '}fixExitLinks();';
echo 'did_confirm = 1;';
echo 'window.onbeforeunload = function () {';
echo 'location.replace("'.$site.'");';
echo 'if(did_confirm) {return ""; } ';
echo '} </script>';
$success=1;
}

}while($success==0);
}
?>

Thanks.
page   1
3 replies
avatar
Chris-Jarvis said Sep 03, 2010 18:14:42
Scroll down on the left hand side of wordpress admin to "Exit Window". You can change the URL there.
Visit the offsite user created non official support forum for NFLB at
http://affiliatesupportforum.com
avatar
Benson said Sep 03, 2010 18:31:54
It took me a while to actually see the exit window on the left hand side of WP.

Thanks.

Where are you up to in your project?
avatar
bensonmui said Sep 04, 2010 22:50:02
Am I missing something?

My exit window has a pop up, but is not directed to any affiliate page like Bills. How do I correct this?

Thanks.
Login below to reply: