Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

How do you add age to sign up process / post information ?

edited October 2011 in Vanilla 2.0 - 2.8
Our forum requires that the users age and gender appear on the discussion/comment.

When doing a google search, I noticed that age was a field available (previous version?) on vanilla forum, but can not see it on the current version of vanilla.

How do I add this back on vanilla so:

1) A user has to enter it at signup
2) It is displayed on the discussion/comment information next to the author name

Comments

  • ToddTodd Chief Product Officer Vanilla Staff
    To do this you are going to have to create a theme and possibly a plugin.

    1. Copy /applications/dashboard/views/entry/registercaptcha.php into your theme's /views/entry/registercaptcha.php folder. If you aren't using recaptcha registration then copy the appropriate view.

    2. Add the input for the DateOfBirth field that is already in the user table. If you want to add age instead then you'll need to add the age field to the database.

    3. The field should automatically save to the database when the user registers.

    To display the data you want you are going to need to attach to some events. You can do this in a plugin or the theme hooks file.

    I'd recommend attaching to say:
    public function DiscussionController_CommentInfo_Handler($Sender, $Args) {
    ...
    To find out which events you can tie into on the display you can grab the Eventi plugin.
Sign In or Register to comment.