PDA

View Full Version : Splash Page Script, Sessions & Cookies Help?



RandTech
09-29-2007, 01:46 PM
Splash Page script
http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm

I have the script installed and working. The problem is everytime I go back to the main page the script loads the splash page. I'd like to have it load once per 24 hour period so I don't annoy my visitors. How can I do this? I appreciate your help.

TimFA
09-29-2007, 01:53 PM
In the directions it says:



// Splash Page Script Activation (1=enabled, 0=completely disabled!)
splashenabled: 1,

//1) URL to file on your server to display as the splashpage
splashpageurl: "http://images.google.com/",

//2) Enable frequency control? (1=yes, 0=no)
enablefrequency: 0,

//3) display freqency: "sessiononly" or "x days" (string value). Only applicable if 3) above is enabled
displayfrequency: "2 days",

//4) HTML for the header bar portion of the Splash Page
// Make sure to create a link that calls "javascript:splashpage.closeit()")
// An IE bug means you should not right align any image within the bar, but instead use "position:absolute" and the "right" attribute

defineheader: '<div style="padding: 5px; color: white; font: bold 16px Verdana; background: black url(blockdefault.gif) center center repeat-x;"><a style="position:absolute; top: 2px; right: 5px" href="javascript:splashpage.closeit()" title="Skip to Content"><img src="skip.gif" border="0" width="114px" height="23px" /></a>Bought to you by Google Images...</div>',

//5) cookie setting: ["cookie_name", "cookie_path"]
cookiename: ["splashpagecookie", "path=/"],

//6) Auto hide Splash Page after x seconds (Integer value, 0=no)?
autohidetimer: 15,


If you mean how to edit it, right click on the .js file and click Open With >> Notepad. Then change the variables.

You would edit it to:


//2) Enable frequency control? (1=yes, 0=no)
enablefrequency: 1,

//3) display freqency: "sessiononly" or "x days" (string value). Only applicable if 3) above is enabled
displayfrequency: "1 days",


That would be once every 24 hours for each visitor unless they clear their cookies.

RandTech
09-29-2007, 02:05 PM
Thanks a lot TimFA! I was confusing it with sessions.

TimFA
09-29-2007, 02:39 PM
Your welcome.