Author Topic: Remove Date of Birth Requirement on Signup Form  (Read 1334 times)

0 Members and 1 Guest are viewing this topic.

Offline Zug

  • Newbie
  • *
  • Posts: 35
  • Karma: +12/-0
    • View Profile
    • http://www.teensinporn.biz
Remove Date of Birth Requirement on Signup Form
« on: January 15, 2014, 06:24:56 AM »
Hello.

I am wondering how I might go about removing the D.O.B. requirement on the signup form on the user-register.tpl .. I have tried a couple things to by-pass it but it still requires the info to be filled in. I do not even want to show it on the form or in the profile.

Thank for any help.

Offline addcoolman

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Remove Date of Birth Requirement on Signup Form
« Reply #1 on: February 24, 2014, 11:21:16 PM »
I have not tried this and am in no way php savy but my guess is you need to remove anything birth related in user-register.tpl and pray it doesn't break :) Also remember to restart Apache to see if it broke or not. Currently the registration is broken in my php version and I want to charge a subscription to my site so I will probably use WHMCS for user mamagnet and use a 3rd party forced login to the directories where videos are stored.

Offline Zug

  • Newbie
  • *
  • Posts: 35
  • Karma: +12/-0
    • View Profile
    • http://www.teensinporn.biz
Re: Remove Date of Birth Requirement on Signup Form
« Reply #2 on: February 25, 2014, 10:28:43 AM »
Thanks for the reply. Unfortunately, I've already tried that and a few other things and nothing I've tried works. It still directs to the error/warning the required field needing to be filled in even if it is not on the page. My registration page is not broken tho. Except for the captcha graphic. It will only work sometimes correctly and most of the time it wont load. I've always had that problem with it.

For a subscription page like that I would think you would have to tie-in together the users database from tubex and let it work with the third-party paid subscription username / info db service. It would have to write the info into tubex user database. I do believe. Also, you may need some custom php scripting to make that happen.

Things like this could be called TubeX Plugins. And if some smart coding person out there made such a thing it could be sold for their profit. Just like making an upgrade to a mobile version. People would buy it. If it were stable and solid of course.

If your registration page is broken. I would try to use the default tpl file and just replace the code with the default. And hopefully that would fix your register page issue for now.


 
« Last Edit: February 25, 2014, 10:43:01 AM by Zug, Reason: more info »

Offline longsack

  • New Users
  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Remove Date of Birth Requirement on Signup Form
« Reply #3 on: March 14, 2016, 07:52:59 PM »
Open user.php
Do the following:
Code: [Select]
//    $v->Register(empty($_REQUEST['birth_month']) || empty($_REQUEST['birth_day']) || empty($_REQUEST['birth_year']), Validator_Type::IS_FALSE, _T('Validation:Birthday Required'));
Code: [Select]
//    $_REQUEST['date_birth'] = $_REQUEST['birth_year'] . '-' . $_REQUEST['birth_month'] . '-' . $_REQUEST['birth_day'];


Open includes/global.php
Code: [Select]
//function GetAgeInYears($birthday)
//{
//    list($b_year, $b_month, $b_day) = explode('-', $birthday);
//    list($n_year, $n_month, $n_day) = explode('-', date('Y-m-d'));

//    $age = $n_year - $b_year;
//    $diff_month = $n_month - $b_month;
//    $diff_day = $n_day - $b_day;

    // If birthday has not happen yet for this year, subtract 1.
//    if ($diff_month < 0 || ($diff_month == 0 && $diff_day < 0))
//    {
//        $age--;
//    }

//    return $age;
//}

Now just remove the HTML from user-register.tpl.... Done with that part.

This is going to give you an ajax error in the admin section so you will need to make the following changes also:

admin/ajax.php
Code: [Select]
//            $_REQUEST['date_birth'] = String::Nullify(Request::Get('date_birth'));

Code: [Select]
//            $_REQUEST['date_birth'] = String::Nullify(Request::Get('date_birth'));

in admin/includes/cp-user-search-item.php
Code: [Select]
//    $item['date_birth'] = !empty($item['date_birth']) ? date(DATE_FRIENDLY, strtotime($item['date_birth'])) . ' (' . GetAgeInYears($item['date_birth']) . ')' : '';

Code: [Select]
<!--         <?php echo ResizeableColumn('Birthday', $item['date_birth']); ?>   -->

in admin/includes/cp-user-add-edit.php
Code: [Select]
 <!--           <div class="field">
              <label>Birthday:</label>
              <span class="field-container"><input type="text" size="22" name="date_birth" class="datepicker" value="<?php echo Request::Get('date_birth'); ?>" />
              </span>
            </div> -->


Upload and done!
Jeremy
« Last Edit: March 15, 2016, 05:19:54 PM by longsack »

Unofficial JMB Support Forums

Re: Remove Date of Birth Requirement on Signup Form
« Reply #3 on: March 14, 2016, 07:52:59 PM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
6 Replies
1091 Views
Last post May 06, 2013, 04:29:48 AM
by bbhrucy79
6 Replies
2084 Views
Last post April 08, 2015, 05:43:00 PM
by hunkyluke
7 Replies
1087 Views
Last post November 13, 2013, 03:16:06 PM
by mountequinox
0 Replies
667 Views
Last post July 24, 2015, 11:29:51 AM
by The Dawg

anything