33 posts
  • Has referred 1+ members
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Located in Netherlands
ruschgaming says

ok i am looking for a plugin for my website …

i am using a intro as flash… but its gets annoying when people want to go to the site the need to go first to the intro..

is there a script that checks the ip or whatever …. that if they script sees that you already visited it once that it wil skip it and bring that person to the main page ?

kind regards Cookie

5409 posts The Dude Abides
  • Located in United States
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
+9 more
CodingJack says

Ironically, you can use a cookie for this :D. There are a few jQuery plugins that make setting and retrieving a cookie easy. It’s a simple task so I don’t think you’ll find it for sale here, but search Google for “jQuery cookie” for some examples.

294 posts
  • Had an item featured on Envato Market
  • Contributed a free file of the month
  • Has referred 200+ members
  • Has sold $10,000+ on Envato Market
+4 more
amatyr4n says

... is there a script that checks the ip or whatever …. that if they script sees that you already visited it once that it wil skip it and bring that person to the main page ?

kind regards Cookie

Seems you’ve already know the answer :D

33 posts
  • Has referred 1+ members
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Located in Netherlands
ruschgaming says

woah lol but still confused what do i need to look for never did it before :S

107 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $250,000+ on Envato Market
  • Won a competition
  • Made it to the Authors' Hall of Fame
+7 more
DOTonPAPER says
You can add try code (add it in <head>):
<script type="text/JavaScript">

if (readCookie("website_visited") == "yes"){
   window.location = "after intro page URL";
}
else{
    setCookie("website_visited", "yes", 7); 
}

function setCookie(c_name, value, expiredays){
    var exdate = new Date();

    exdate.setDate(exdate.getDate()+expiredays);
    document.cookie = c_name+"="+escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}

function readCookie(name){
    var nameEQ = name + "=",
    ca = document.cookie.split(";");

    for(var i=0;i < ca.length;i++){
        var c = ca[i];
        while (c.charAt(0)==" ") c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
</script>

I haven’t tested the code but you shouldn’t have any problems.

33 posts
  • Has referred 1+ members
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Located in Netherlands
ruschgaming says

You can add try code (add it in <head>):
<script type="text/JavaScript">

if (readCookie("website_visited") == "yes"){
   window.location = "after intro page URL";
}
else{
    setCookie("website_visited", "yes", 7); 
}

function setCookie(c_name, value, expiredays){
    var exdate = new Date();

    exdate.setDate(exdate.getDate()+expiredays);
    document.cookie = c_name+"="+escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}

function readCookie(name){
    var nameEQ = name + "=",
    ca = document.cookie.split(";");

    for(var i=0;i < ca.length;i++){
        var c = ca[i];
        while (c.charAt(0)==" ") c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
</script>
I haven’t tested the code but you shouldn’t have any problems.

Thank you so much… it works fine.. i even implemented the mobile detect script too ^^ small question i noticed it only last or a day how do i edit this?

5492 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1,000+ on Envato Market
+4 more
Australia says

Set cookie.

http://php.about.com/od/phpfunctions/g/cookie_params.htm

The snippet above is set to 7 days , we use microtime

107 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $250,000+ on Envato Market
  • Won a competition
  • Made it to the Authors' Hall of Fame
+7 more
DOTonPAPER says

Thank you so much… it works fine.. i even implemented the mobile detect script too ^^ small question i noticed it only last or a day how do i edit this?

I don’t understand your question.

107 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $250,000+ on Envato Market
  • Won a competition
  • Made it to the Authors' Hall of Fame
+7 more
DOTonPAPER says

Set cookie. http://php.about.com/od/phpfunctions/g/cookie_params.htm The snippet above is set to 7 days , we use microtime

My code is for JavaScript.

5492 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1,000+ on Envato Market
+4 more
Australia says

No shit sherlock

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by