1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I would like to get this effect...

Discussion in 'Styling and Customization Questions' started by AndreaMarucci, Dec 8, 2011.

  1. AndreaMarucci

    AndreaMarucci Well-Known Member

    If you go here


    you'll see a modal window popup as soon as the page load. i would like to achieve the same effect as soon as someone get into my forum but i would like to show the windows just one time to avoid annoying the users.

    Anyone can suggest ho to obtain this? Please consider that I'm not a programmer and I don't know CSS too much so I would need a script or something ready to be incorporated in Xenforo.

    I think this should be interesting to get the users attention on something important...

  2. Fuhrmann

    Fuhrmann Well-Known Member

    You can create a new file called popup.js or something and inside of put this:

            var cookiePopUp = $.getCookie('popup');
            if (!cookiePopUp)
                XenForo.createOverlay(null,    'HTML TO SHOW', {onClose: function() { $.setCookie('popup', 'true'); }}).load();
    Then, open the template page_container_js_head and put this:

    <xen:require js="PATH _TO_YOUR_JS_FILE" />
    The overlay will only show if the cookie 'popup' is false. Means, this only will show one time when the user load your forum. If he cleans the cookies, he will receive this popup again.

    Note: change the HTML TO SHOW to what you want to show.
    Andrej likes this.
  3. AndreaMarucci

    AndreaMarucci Well-Known Member

    Thanks Fuhrmann. I'll try this. More specifically I'm searching probably for something with jquery to have an elegant window like the one in the example...

Share This Page