Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

WP Splash Page plugin modification (UPDATE) WordPress

****UPDATE: Anyone willing to looking into this via FTP/WP for me please let me know. I am willing to up the Reward to get this sorted!****


Hi There we have set up WP Splash Page working fine however we want it to always show to each viewer everytime the root url is visited until the "Continue to old site" is clicked.

Then reset after 1 day.

I had a thought about looking at how the plugin preview functions by always showing the Splash Page with every refresh.

Url to the testing site can be found in the image attachment.

Many Thanks

Answers (3)

2013-10-15

Balanean Corneliu answers:

Are you blocking cookies in your browser?
It seems to work properly. But the plugin is only active in your homepage. You should enable "Show on all page and posts" option.


Balanean Corneliu comments:

To make this i think you need to clear the cookies every time when the page is loaded.


Balanean Corneliu comments:

To have this think without a code modification you can use Splash image
with : Display time : 0 and Idle time : 0

I have tested on my page and the popup image is coming everytime when i refresh the page.


Balanean Corneliu comments:

Test this in your code: in file WsiCommons.class.php

On line - 58 change the code with this one :
// Sinon (front office)
} else {
if ($siBean->getDatepicker_start()!='') {
$dpStart = strtotime($siBean->getDatepicker_start());
if ($today < $dpStart) {
return "true";
}
}
if ($siBean->getDatepicker_end()!='') {
$dpEnd = strtotime($siBean->getDatepicker_end());
if ($today > $dpEnd) {
return "true";
}
}
}
return "true";
}



Balanean Corneliu comments:

You have tested the code above?


jimspankling comments:

No because I don not know where the WsiCommons.class.php is.

Sorry


Balanean Corneliu comments:

At me is here /public_html/wp-content/plugins/wsi/wsi/


Balanean Corneliu comments:

Add me on skype: id balanean.corneliu and i will be able to take a look.


Balanean Corneliu comments:

Or you can send me the ftp on email: [email protected]


Balanean Corneliu comments:

You're right Eric is a modified version of the plugin. I managed to solve the problem using only the templates folder + small changes in code and in functions.php file.

2013-10-15

eric abao answers:

That plugin record your browser cookies and if your testing the splash page twice or more already the splash page link will no longer work. Try cleaning your browser cookies and your splash page will work again. That plugin will only display the splash once per visitor.


jimspankling comments:

I want it to display every visit until link to old site is clicked.

Does that make sense?

Thanks

2013-10-15

Eric P. answers:

re: I want it to display every visit until link to old site is clicked.

That makes perfect sense.

In that case, give the cookie that disables the splash page out only on _all_ the pages of the "old site", but not for the "splash page."

If the splash page doesn't give the cookie, then if they go away and come back to any other page link, they get the splash page again until they click through.

UPDATE and clarification.

The splash page should not set the cookie.

The other pages should look for the cookie, if there is no cookie, check the "HTTP_REFERER" variable and see if the user came from the page URL. Only if the "HTTP_REFERER" matches the current page, then set the cookie.

So if I type "http://www.popcornlondon.co.uk/sites/nfg/illustration" in my browser (no HTTP_REFERER), or I click a link somewhere else and land on "http://www.popcornlondon.co.uk/sites/nfg/illustration" (HTTP_REFERER is from another site), <strong>and</strong> I have no cookie, I get the splash page text with a link to the old site, <strong>but I don't get a cookie yet</strong>.

When I click the "You can view our old site here" link, I go to "http://www.popcornlondon.co.uk/sites/nfg/illustration" with the HTTP_REFERER set to "http://www.popcornlondon.co.uk/sites/nfg/illustration", and only then should I get the cookie and the old site.

Does that make sense?


jimspankling comments:

I'm afraid I don't have very good knowledge with Cookies.

:(


Eric P. comments:

<strong>@Balanean Corneliu</strong>, I'm pretty sure <strong>@jimspankling</strong> is not using the wsi plugin.

<strong>@jimspankling</strong> which plugin are you using? Did you get my message here?