I would like to get this effect...

AndreaMarucci

Well-known member
If you go here

http://www.yourinspirationweb.com/

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...

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

Code:
$(function()
    {   
        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:

Code:
<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.
 
Top Bottom