• Resolved rudym

    (@rudym)


    Hi all,

    I forked a repo for a plugin, available here: https://github.com/ram302/recaptcha-protected-downloads

    I need for the plugin to do the following, in addition to what it already does:

    • Apply reCAPTCHA to custom links without need for shortcodes.
    • reCAPTCHA response should only prompt once, and release the remaining links. I did this through some session implementation.

    As the code is now, when the session is expired, I notify the end-user that the session is expired and would need to solve a new reCAPTCHA, and then I reload the page to start fresh.

    The following files are the ones I’m focused on while debugging:

    /recaptcha-protected-downloads.phpmodify SESSION_TIME_LIMIT for shorter session.
    /assets/js/rcpdl.jsline 113 is where I do the reload. This block is where we’d end up when the session expires.

    This last step, the reload, is what I’d like to avoid, but I’m not sure how to go about this. Any ideas? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    What is it that a reload does that you need to do? The generic answer is do this through jQuery instead of reloading.

    Thread Starter rudym

    (@rudym)

    Hi bcworkz,

    Thanks for your response. I was just finishing up the updates, but I was able to resolve this. I’ll close this now. Thanks again.

    -Rudy.

    • This reply was modified 8 years ago by rudym.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Avoiding a page reload’ is closed to new replies.