The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Don't show this again

View previous topic View next topic Go down

Solved Don't show this again

Post by Niko on April 27th 2012, 6:40 pm

Hello,

I made a search on Google
Spoiler:
and I haven't found anything...

Well, I want to create a pop-up message that when you click on it it will close and it won't appear again (for the same member)... I have this "table" for now...

Code:
<div id="popup1" onclick="$('#popup').toggle('fast');">Message</div>
What Can I do? Thanks for your help Mr. Green

Notes: I use PunBB and Google Chrome; I will put the code in templates (Forum link in the profile)

Friendly,


Last edited by Niko! on April 29th 2012, 2:39 pm; edited 1 time in total

Niko
Hyperactive

Male Posts : 2298
Reputation : 97
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: Don't show this again

Post by LGforum on April 27th 2012, 11:46 pm

You must save a cookie in order to know whether or not the user has experienced the pop up.

You can save cookie's using the functions already in forumotions system scripts. my_getcookie() and my_setcookie();

Code:

if(!my_getcookie('popup')) {
  // Java script to pop up your box...

  my_setcookie('popup',1,true);
}

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Don't show this again

Post by Niko on April 28th 2012, 1:42 pm

Well, I didn't understand...
Can you make it easier for me? Smile

Niko
Hyperactive

Male Posts : 2298
Reputation : 97
Language : English, French, Italian, Spanish, Latin

Back to top Go down

Solved Re: Don't show this again

Post by LGforum on April 29th 2012, 12:02 am

Not really lol its as easy as it gets Razz

I suppose this might be easier...
Code:

<div id="popupbox" style="display:none">
STYLE THIS BOX AND PUT YOUR MESSAGE AND STUFF HERE.
</div>
<script>
if(!my_getcookie('popup')) {
  document.getElementById('popupbox').style.display = '';
  my_setcookie('popup',1,true);
}
</script>

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Don't show this again

Post by Niko on April 29th 2012, 2:36 pm

Solved!! Mr. Green

Niko
Hyperactive

Male Posts : 2298
Reputation : 97
Language : English, French, Italian, Spanish, Latin

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum