MyBB Community Forums

Full Version: show message every 24 using mybb cookie
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello
how can i show a message for each IP once in 48 hours using mybb cookie ?

i found this :
http://community.mybb.com/thread-150668-...pid1060286
but didn't work !
its cause it's has been used by 1.6 so it's an old code Wink we have 1.8 not 1.6 anymore!
You can change the plugin compatibility from 1.6 to 1.8

See more here -> http://community.mybb.com/thread-75646.html
it's not a plugin !
I need a new code
(2016-03-14, 03:35 PM)MybbCo Wrote: [ -> ]it's not a plugin !
I need a new code

Im going to guess you are attempting to comply with the "new" EU cookie policy. See if this link helps:
https://silktide.com/tools/cookie-consent/download/
I need a code like this :
http://community.mybb.com/thread-150668-...pid1060286

I test this the code above, but it doesn't work
I need a code to show a message that user can click and hide it , then display the message again after 24 or 48 hours using MyBB Cookie.set

???????????
any answer ????
Not sure if you still need this, but translated to jQuery it would be:
<script type="text/javascript">
$(document).ready(function() {

   var notebox = $('.notebox');
   if($.cookie('sitenote') != 'X')
   {
       notebox.show();
   }

   $('.dismissnote').on('click', function() {
       $.cookie('sitenote', 'X', { expires: 1 })
       notebox.hide();
   });

});
</script>