• Resolved nisandeh

    (@nisandeh)


    Hi Chris…

    Love your Redirect URL to Post plugin…
    Thank you for making it available.

    I’d like to ask for a tiny but very important feature…

    Could you add a parameter that tells the plugin how long to wait (either in hours or preferably until a certain time tomorrow – in local time of the user) – before he shows a different random post when the user refreshes…?

    I’m using the plugin to generate “tip of the day” and I don’t want the user to be able to keep refreshing or clicking the link to the random post and get a new tip until the next morning (local time).

    Since the plugin already stores a cookie on the user’s computer, I guess it’s an easy addition – that would be much appreciated.

    Thanks a million…

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Christoph

    (@camthor)

    Thank you for the great idea! I agree that it should be possible to “lock” the user on one target for a given time, using browser cookies. I will look into it as soon as I find more time.

    Thread Starter nisandeh

    (@nisandeh)

    Thank you so much… Can’t wait for this option to be included.

    Plugin Author Christoph

    (@camthor)

    It should now be possible with the parameter lock=123. The number is the time in seconds. ??

    Thread Starter nisandeh

    (@nisandeh)

    Thank you so much, Chris…
    What a fantastic service…

    Any chance you could add a parameter tomorrow_at=6.
    Where the number is the LOCAL time they can refresh again the next day?

    Plugin Author Christoph

    (@camthor)

    I would then prefer something more universal. Otherwise we need a parameter for every possible time frame. Maybe like using “lock” with a time format. lock=next%20midnight.

    Anyway, it will be very difficult to know the local time. The server does not know the time zone of the visitors. Not really sure, if that can be done …

    Thread Starter nisandeh

    (@nisandeh)

    Next midnight sounds perfect…

    This plugin does the opposite… it counts the time backwards, but maybe it can help… https://timeago.yarp.com/

    Thread Starter nisandeh

    (@nisandeh)

    You probably need javascript’s help. I googled the following JS snippet which returns the visitor’s timezone offset:

    var tzo=(new Date().gettimezoneoffset()/60)*(-1);

    From here, you can set a cookie with javascript which is accessible with PHP.

    But if it’s too complicated… that’s fine…

    I’m already a fan of your plugin

    Plugin Author Christoph

    (@camthor)

    Thanks!

    Yes, I also found mostly solutions with JS (apart from IP lookups). But this would mean that we have to load a snippet on the pages and send the time back to the server (via cookie, ajax etc.). It would really need many changes – only for a part of one feature, and that brings new issues with browsers, incompatibilities with other plugins, JS blockers and so on. I think it would be more a customization than a standard feature. But I’ll keep it in my mind.

    Maybe your visitors don’t even notice if you give them a 12 or 24 hour timeout.

    Thread Starter nisandeh

    (@nisandeh)

    You’re probably right, Chris…
    I set it up now for 12 hours, and I expect it to work in 95% of the time.
    Good enough for me…
    (Just thought it would be neat to have this option, but probably not worth the hassle)

    Thanks a million for everything.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘New Feature Request’ is closed to new replies.