Please upgrade here. These earlier versions are no longer being updated and have security issues.

Removing "I agree to the terms of service" and "Remember me on this computer" on registration page.

ProsperProsper ✭✭
edited November 2015 in Vanilla 2.0 - 2.8

I understand you have to use CSS to remove - "I agree to the terms of service" and "Remember me on this computer" fields on registration page.
.CheckBoxLabel{ display:none !important; }
Unfortunately, the read error prompt still says - You must agree to the terms of service. How can I remove the error prompt too and allow registration to go through.

Comments

  • peregrineperegrine MVP
    edited November 2015

    you have a few choices I believe. fill in the field behind the scenes or remove the rule.

    you could try this, see if it helps you.

    public function EntryController_RegisterValidation_Handler($Sender) {
    Gdn::UserModel()->Validation->UnapplyRule('TermsOfService');
    }
    

    there may be other ways to solve issue as well.

    that said: It may not be a good idea for you to remove terms of service for a few reasons, it requires a checkbox to be checked which may aid ibn spam registrant prevention and it also makes sure users who register have agreed to your terms of service (not sure what the legal ramifications are).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    Prosperjackmaessenhgtonightvrijvlinder
  • ProsperProsper ✭✭
    edited November 2015

    @peregrine
    Thanks for your reply. It worked. I don't necessarily require to show audience the terms of service since usage policies has been added on various parts of the forum. The faster I get people to register the better the forum.

    peregrineR_Jjackmaessenhgtonight
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @Prosper said:
    The faster I get people to register the better the forum.

    This is a very wise sentence. Rethink your idea to force people copy & paste their mail address.


    peregrine
  • peregrineperegrine MVP
    edited November 2015

    @R_J said:

    @Prosper said:
    The faster I get people to register the better the forum.

    This is a very wise sentence. Rethink your idea to force people copy & paste their mail address.

    Speaking of getting people to register faster.

    In Vanilla 2.2 there does not seem to be an easy way (without modifying core) to skip the captcha in approval registration. Bonus points for anyone who can figure that one out. :)

    I tagged this on because R_J loves a challenge :)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    hgtonightvrijvlinder
  • @peregrine - please can you paste a link of a forum running version 2.2 probably on default theme if possible? I want to check it out.

  • peregrineperegrine MVP
    edited November 2015

    @Prosper said:
    @peregrine - please can you paste a link of a forum running version 2.2 probably on default theme if possible? I want to check it out.

    I don't know anyone running a public forum using vanilla 2.2 (the imminent one) vs. 2.2.101+ (the master branch as on this site).

    Personally, I just recently loaded 2.2 (the nearly stable release) on a clunky old computer on a localhost at home. (Easier to learn and test on your own home local computer).

    the only cosmetic differences I noticed between 2.1 and 2.2 are a few more things to do with moderation, the editor plugin (like one on this forum) a replacement for buttonbar plugin, and the forcing of using captcha on approval registration. As far as the code itself you can see differences on github. I haven't experimented much so I'm no expert on feature differences other than the approval registration (requiring captcha), even if you don't want it :)

    IIRC, A few people mentioned they had new plugins that would be available when 2.2 is officially released, although 2.2 is unofficially released on github. Some of the new plugins may be exciting. I seem to recall someone mentioning a new gallery plugin, and a few others.

    @Prosper , if your host allows you to have multiple dbs, I would install a duplicate yourself and test it out as a duplicate non-live forum. or load it on a home computer. You can learn alot if you like that sort of stuff.

    Far safer than upgrading the live one right away, because once you upgrade the user passwords are different and you can't go back to previous version without reloading old database. Making a duplicate version allows you to test and install plugins and experiment at your leisure. Then you can delete your test and start anew if you want without having extra columns and tables cluttering up your live database from plugins (the ones that modify database) that you might want to test but decide not to use.

    the one link to a live 2.2rc1 forum I've noticed recently is here:

    http://vanillaforums.org/discussion/31099/cant-sign-in-or-out-after-new-install

    I haven't tested these instructions with 2.2 (the instructions say 2.2.3 but that was a different 2.2 from 2013 :) then the current 2.2

    it may still work fine if you are interested...

    http://vanillaforums.org/discussion/24793/yet-another-vanilla-upgrade-and-duplication-tutorial

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Hmpf - not that I have the time to look at it, but you know me quite well...

    I'd say there is no way to do so.
    a) In entryController->registerApproval there is no event fired before the view is rendered, so you cannot override the view
    b) The captcha is inserted by by the view directly and views do not fire any events (helper_functions are functions and not views, although they are stored in the views folder)
    c) The captcha is inserted by using class form->captcha() which does not offer any events. It includes the recaptcha library which by itself uses non overrideable functions.

    So no extra points for me :(

    But I think there are some solutions to this "problem".
    The first one bases on the assumption that this is no problem at all.
    1. Using no captcha is a new registration method, so you have to create a plugin for that. It's easy like that.

    The second and third one is a more long term way of "solving" this.
    You (this means someone convinced this is a good idea, maybe it will be atually me) can create an issue at GitHub (or a PR if you have some good code solution at hand) to propose
    2. that recaptcha is not rendered/used as long as the API key is not set
    3. that the form->captcha should be rewritten so that it could be used more generally

    I like especially the third one. It's already called "captcha" and not "recaptcha", so it would only be logical if it could be used generally for all kind of captchas! Oh yes, I will definitely create an issue or a PR for that!


    peregrine
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Oops, maybe I haven't seen all of it. I haven't checked it, but perhaps adding

    function validateCaptcha() {
        return true;
    }
    

    together with some css could do the trick...


    peregrine
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
    edited November 2015

    HA! THOSE EXTRAPOINTS ARE MINE!

    Add the following lines to /conf/bootstrap.before.php

    if (!function_exists('validateCaptcha')) {
        function validateCaptcha() {
            return true;
        }
    }
    

    But this will bypass every captcha used in Vanilla - although by default, this is only the register screen.

    You certainly should add the following to your css (or use the CSSEdit plugin to add it):

    .CaptchaInput {
      display: none;
    }
    


    hgtonightperegrinenervoustwit
  • hgtonighthgtonight ∞ · New Moderator
    edited November 2015

    @R_J said:

    HA! THOSE EXTRAPOINTS ARE MINE!

    I also want to give you a lol for that.

    As long as you are up for challenges, I need to refactor the addon page for the community repository.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    If it could be done be reading code and writing a handful of lines I could be useful, otherwise I do not see a fair chance before... hm... Eastern? :(


    peregrine
  • hgtonighthgtonight ∞ · New Moderator

    @R_J said:
    If it could be done be reading code and writing a handful of lines I could be useful, otherwise I do not see a fair chance before... hm... Eastern? :(

    Do you mean Easter?

    Not sure if this is a German idiom.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
    edited November 2015

    Pfff... yeah Easter is Ostern in German - I mixed it up :mrgreen:


    peregrinehgtonight
  • peregrineperegrine MVP
    edited November 2015

    @R_J said:HA! THOSE EXTRAPOINTS ARE MINE!

    here are your 5 Bonus EXTRAPOINTS as promised since you provided a solution.

    Ultimately, the cleanest solution, would be a config statement or the ability to enable via a plugin, that didn't require a bootstrap change to override function or require a css change.

    garden.captcha = true or false //changes the inclusion of form input field and label in registration forms, and toggles array('CheckCaptcha' => false.

    in that way captcha registration form could be flung to oblivion.

    leaving basic (with or without captcha)
    approval (with or without captcha)
    invitation (either left alone or with or without capture).


    Remember the User Stories

    http://vanillaforums.org/discussion/comment/216294#Comment_216294

    My user story. Due to strictures in development in my environment, I do things that require minimal internet usage and more intranet or local host usage.

    As an occasional localhost offline forum administrator, I need a way of turning captcha on and off easily. I can easily fake a mailserver offline if I want to test approval registration and create test users. However faking a captcha or retrieving captcha output offline is not possible. I prefer not to modify bootstrap files or the core and would prefer an easy config option that either uses an event to hook on to to remove captcha or for it automatically to be turned off if API key is not set, thereby increasing my traffic and speeding up my ability to manually test or using unit testing.

    perhaps a dashboard like this with a checkbox option for captcha.

    • easy to turn on or off.
    • jettison captcha registration form and fold into basic, and also giving all other forms option to add captcha.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • peregrineperegrine MVP
    edited November 2015

    followup in the same manner that profile extender plugin use hooks in forms to add form input.

    the "captcha plugin" could be used in a similar way with a hook in reg form, inclusion governed via dashboard in registration

    BTW - @r_j thanks for the pull requests. (("Danke schon. Danke schon." ) https://github.com/vanilla/vanilla/pull/3268

    you are absolutely right when you said:

    Looking at the risks of both possible ways, I'd say that losing potential users because they are not able to register is more "severe" than having to clean spammers.
    But adding a hint to the dashboard that is displayed as long as captcha is needed but not configured could be a way to handle that.

    https://github.com/vanilla/vanilla/pull/3270

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    What must be changed to my opinion is that someone who likes to register sees the "Please get an API key" message. But I'm not sure if my PR is the best way to do so. It felt clumsy when I wrote it.

    Maybe adding a column "CAPTCHA required" with checkboxes to the table in your screenshot would be best (it wouldn't make sense for Connect and Invitation)

    Generally I think it is handy if even a complete noob could achieve something just by configuration, but adding function validateCaptcha() { return true; } to conf/bootstrap.before.php is also ridiculously easy.


  • peregrineperegrine MVP
    edited November 2015

    @R_J said:
    What must be changed to my opinion is that someone who likes to register sees the "Please get an API key" message. But I'm not sure if my PR is the best way to do so. It felt clumsy when I wrote it.

    Maybe adding a column "CAPTCHA required" with checkboxes to the table in your screenshot would be best (it wouldn't make sense for Connect and Invitation)

    sounds good with checkboxes

    Generally I think it is handy if even a complete noob could achieve something just by configuration, but adding function validateCaptcha() { return true; } to conf/bootstrap.before.php is also ridiculously easy.

    yes that is a great solution, if your pull requests are not added in a timely fashion to 2.2

    valid points. however....

    My thoughts re: conf/bootstrap.before.php

    despite the fact conf/bootstrap.before.php is also ridiculously easy.
    this is what I don't like about using conf/bootstrap.before.php. It is another layer of obfuscation in debugging. when a clean friendly flexible dashboard with hints and tips would provide the forum admin with what they need.

    Scenario:

    • new forum admin "Hi, I've just inherited a forum and taken over as a new administrator and want to add captcha"

    • volunteer: just choose captcha, it should be captcha by default if you set up API key and choose approval registration or captcha registration in vanilla 2.2.

    • new forum admin: "I tried, does not work".

    • volunteer: it should work. post your config.php and your config.

    • new forum admin: ok here it is.

    • volunteer: hmpfffff. I don't know why you have the issue.

    two years later problem still unsolved, after upgrade, restore, etc

    • another volunteer: oh yeah, did the previous admin override any functions in your bootstrap.before.php, bootstrap.after.php, bootstrap.early.php , or bootstrap.late.php.

    point being simple but obscure in the point that it is not a common thing to look for when debugging.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Valid point. I would never ever think of asking about bootstrap.before...

    Making things configurable makes it also slower but in this case it doesn't matter since it would only influence the register methods of the entrycontroller. So yes, adding checkboxes might be the best solution. If only someone would write the code for that... ;)


    peregrine
  • peregrineperegrine MVP
    edited November 2015

    r_j said: If only someone would write the code for that... ;)

    (internal muttering to oneself)

    yes that would be step one, ;)

    step two is somewhat unpredictable even if the pull request code was perfect it might go into limbo, if there was no desire to commit it to the version and it might never be implemented. ;)

    -I guess the adage:

    • nothing ventured, nothing gained.

    with its possible corollaries

    • disappointing out come:

      • something ventured, nothing gained.
    • or optimistic outcome

      • something ventured, something gained.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
Sign In or Register to comment.