Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2591
    Mark van Dam
    Participant

    Hi there,

    I’ve purchased the pro version of sign-up sheets just now. We are working with volunteers for an (art) exhibition center. The volunteers are registered in advanced (as they need some basic training before being scheduled) and have their own username and password for the website. The sign-up sheets however are placed on a public area of the website (to invite more visitors to become volunteer), so we would like to restrict access to the sign-up sheets only. Any suggestion on how to approach this? So basically everything on the page needs to be visible to visitors and only the sign-up sheets need to be visible for logged in users (volunteers) only. I’ve already created a separate user role for them.

    And we would like to translate the plugin (strings, titles and form fields) to Dutch. Is this possible using WPML? Or do you have .po and .mo files for the plugin?

    Thanks in advance and kind regards,
    Mark

    #2595
    Mark van Dam
    Participant

    Hi,

    Just wanted to let you know I’ve been trying to find a solution for my first question. I’ve added the following code (https://jpst.it/2LU5L) as a snippet to hide the sign-up sheets overview from the public. Unfortunately it does not hide the single sign-up sheets when clicked in the overview. Any suggestion how to hide the complete content, including the sign-up form, from public view?

    Regarding translation of the plugin I came across “Text Overrides” under settings, but this only shows one field marked with: “WHAT”.

    Kind regards,
    Mark

    #2601
    Fetch Designs
    Keymaster

    Hi Mark,

    Sign-up Sheets has a POT file to support translations which is found in the plugin under languages/sign-up-sheets.pot. You can learn more about how to use it in the Translations documentation.

    For your other question, the ability to restrict sign-ups to logged in users only is not currently a built-in feature of the plugin. However, there may be a few ways you can customize it and it sounds like you got part of it in place. To lock down the individual sheet pages, you can probably do something along the lines of the code below to check if we are on a sheet page and if so throw an error to prevent access…

    function my_sheet_login_required()
    {
        if (get_post_type() === 'dlssus_sheet' && !is_user_logged_in()) {
            wp_die('You must be logged in to access this content');
        }
    }
    add_action('wp', 'my_sheet_login_required');
    #2604
    Fetch Designs
    Keymaster

    One other thought I had is you could add the capability “read_private_dlssus_sheet” to role that you want to grant access using WP_Role::add_cap. Then set all your sheets to be published “privately”. This should also allow just those users with that access to see the sheets. Then you can check by using…

    if (current_user_can('read_private_dlssus_sheet')) {...}
    #2605
    Mark van Dam
    Participant

    Hi,

    Thanks for the quick reply. I must have missed the documentation on the language but I found it and it works like a charm! Great work.

    The suggestions for the restriction of content are actually quite useful. I’m using AAM (advanced access manager) plugin so I can probably set the user role to allow access to private sheets and set the sheets to private in stead of public.

    Thanks for now and I’ll get back to you with the results.

    Kind regards,
    Mark

    p.s. how do you include code with these posts? I tried it yesterday but my posts were rejected. That’s why I used an external link to show you the code I came up with.

    #2609
    Mark van Dam
    Participant
    This reply has been marked as private.
    #2610
    Mark van Dam
    Participant

    Hi,

    I just found that using reCAPTCHA is the cause behind the error. I was using reCAPTCHA v2 Checkbox and that caused the 500 critical error. When I disabled reCAPTCHA and use the normal anti-spam math question 7+1 it works fine. I would prefer to use reCAPTCHA though.. any suggestions on how to fix this? I’ve double checked the reCAPTCHA keys and also the registered domain with reCAPTCHA console; they are correct.

    Kind regards,
    Mark

    #2612
    Fetch Designs
    Keymaster

    First, don’t worry you didn’t miss the documentation, I just posted it. I am working on improving the documentation little by little so if you run into any other questions, please let me know.

    As for posting code snippets on this forum, it is something on my to do list to update, but right now only admins have the ability to do so.

    Regarding your reCAPTCHA issue you reported, I have just published a new version of the plugin (version 2.2.1) which includes a fix for reCAPTCHA that some users reported which only occurred in certain hosting environments. I just updated your site to use this latest version, enabled reCAPTCHA and ran a test and it appears to be working correctly now, but please confirm on your end.

    Lastly, I did notice you were using LiteSpeed cache. I expect to add support for LiteSpeed Caching in the near future, but currently you will probably want to set LiteSpeed to not cache your Sign-up Sheet pages to prevent sheets showing old data (such as opens spots that are available that have recently been filled) since it won’t update in real time until the cache is refreshed.

    If you notice any other issues, just let me know.

    #2618
    Mark van Dam
    Participant

    Hi,

    Thanks for your quick reply, again! And great job on the documentation and updates on the plugin, love it!
    The ReCAPTCHA is working indeed which is awesome and will probably save us from a lot of spam 🙂
    Good call on the LiteSpeed caching. I’ve disabled caching on the main overview page as well as the single sheet page(s):

    /programmas/kamerbewaarders/
    /sheet/

    And I’ve also disabled caching of the following query strings:

    task_id
    action
    _susnonce
    status
    tasks
    signups

    Any other strings I should add to this list?

    Translations are working like a charm and everything on the front-end has been translated, except for two strings. Maybe you can point me in the right direction.

    1. When you click the “removal_link” in the confirmation e-mail; you get to a page where the first string is translated (Are you sure you want to remove your sign-up?), but I can’t translate the button which says “Yes, Remove Me”. This string does not seems to be in the .pot file.

    2. The months used in the sheets date are in English (February, March etc). Any chance I can translate those as well? Site language is set to Dutch.

    Thanks again and keep up the good work!

    Kind regards,
    Mark

    #2737
    Mark van Dam
    Participant

    Hi,

    Any thoughts on my above request for translation of the strings. I’ve been diving into the code but I’ve come up empty to change the language on the months (Jan / Feb / March etc..). Also the “yes, remove me” string is not up for translation in the .po / .mo files.

    Hope you have a suggestion. Thanks in advance!

    Kind regards,
    Mark

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.