Support » Plugin: Simple Adblock Notice » Good, but needs work!

  • john smith

    (@nanquan491)


    I tested this plugin and basically it works! Very nice implementation of the ‘Sweet Alert’ popup dialogue.

    However, it is not without problems:
    – Cookies are set via PHP and as such do not work with Cached pages. And let’s face it, who doesn’t use caching nowadays? Needs to be reworked. Until then controlling the interval of the notification is just non functional (as it uses cookies).
    – ‘Sweet Alert’ has its positioning issues on Mobile devices where the popup will have a negative top margin which will basically move part of if off screen if you have somewhat of a lengthier message. Not really the author’s fault as ‘Sweet Alert’ is a separate project and was implemented here. Requires a manual fix to the Top Margin calculating Javascript function to prevent the popup from going off screen on mobile!

    Great little plugin, does the job it’s supposed to with style! Just needs some work on the above points (mainly the cookies).

    • This topic was modified 1 year ago by  john smith.
    • This topic was modified 1 year ago by  john smith.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shrinivas

    (@shrinitech)

    Hi John,

    Thank you for your feedback, Ya, as you said cookies doesn’t work with cached pages, we are looking for alternative ways for cookies, please do suggest if you know any.

    Thank you

    john smith

    (@nanquan491)

    Well, you just need to implement cookies via Javascript/jQuery on the client side rather than via php. Not really that hard to do. Just save the expiration time set by the Admin into the client side javascript from php, even if it’s cached, if saved once then the value will be in the cache from there on for all visitors.

    Example:

    
    <?php
    $cookie_expiration = 30; // days
    ?>
    <script type="text/javascript">
    var cookieExpires = <?php echo $cookie_expiration; ?>;
    </script>
    
    • This reply was modified 1 year ago by  john smith.
    • This reply was modified 1 year ago by  john smith.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Good, but needs work!’ is closed to new replies.