Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
Automatic Pop-Up Message
Topic Started: May 11 2010, 06:43 PM (1,543 Views)
toyyy
Member
[ * ]
I was wondering how every time a visitor comes onto the site, and automatic message comes on top of everything. So basically they have to read it. (Of course until they x it out)

Any Feedback is helpful!
^_^
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
[ *  *  *  *  *  * ]
Code:
 
<script type='text/javascript' src='http://z3.ifrm.com/313/104/0/p312803/zeta_cookie.js'></script>
<script type="text/javascript">
//<![CDATA[
if(zeta_cookie.get("visited") == "") {
zeta_cookie.set("visited",true,365);
alert("message here");
}
//]]>
</script>


Put that into the Javascripts section. Change message here to whatever the message should be.
Offline Profile Quote Post Goto Top
 
toyyy
Member
[ * ]
It's not working :/ Just stays the same it's always been.
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
[ *  *  *  *  *  * ]
Post your code?
Offline Profile Quote Post Goto Top
 
toyyy
Member
[ * ]
<script type='text/javascript' src='http://z3.ifrm.com/313/104/0/p312803/zeta_cookie.js'></script>
<script type="text/javascript">
//<![CDATA[
if(zeta_cookie.get("visited") == "") {
zeta_cookie.set("visited",true,365);
alert("Recent Updates! : Now Recruiting a Photoshop Savvy Member");
}
//]]>
</script>
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
[ *  *  *  *  *  * ]
That works for me. Are you sure you're putting it in the JavaScripts box in the boad templates?
Offline Profile Quote Post Goto Top
 
toyyy
Member
[ * ]
yessir :/
Offline Profile Quote Post Goto Top
 
Viral.
Member Avatar
Member
[ *  *  *  *  *  * ]
Link to board?
Offline Profile Quote Post Goto Top
 
Reid-ZNS
Member Avatar
C'est un piège!
[ *  *  *  *  *  * ]
Viral: one problem with your code is that it will only alert 1 recent update and then nothing else.

Here is a version that may work better:
Code:
 
<script type='text/javascript' src='http://z3.ifrm.com/313/104/0/p312803/zeta_cookie.js'></script>
<script type="text/javascript">
//<![CDATA[
(function () {

var update = "Recent Updates! : Now Recruiting a Photoshop Savvy Member";

// End of Options
if (zeta_cookie.get("rupdate") !== update) {
zeta_cookie.set("rupdate", update, 365);
alert(update);
}
})();
//]]>
</script>
Simply edit your old message (it's in the code there) with a new one, and it should automatically alert it. :)
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Support · Next Topic »
Add Reply