The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
![]()
This is what I came up with to add an option to the UserCP to allow users to select if they want to show age or not in the calendar.
******** add global phrase Product: vBulletin VarName: display_dob_only Text: Display Date of Birth Only ******** ******** template:modifyprofile_birthday added option in two places Find (in two places) Code:
<option value="2" $sbselected[2]>$vbphrase[display_age_and_dob]</option> [code<option value="3" $sbselected[3]>$vbphrase[display_dob_only]</option>[/code] end template:modifyprofile_birthday ******** ******** this fixes the problem where Display Age same as 1 is displaying the birth date on the Members List file edit memberlist.php line 631 change from Code:
if ($userinfo['showbirthday']) Code:
if ($userinfo['showbirthday'] > 1 ******** ******** edit PHP file class_dm_user.php line 59 change from Code:
'showbirthday' => array(TYPE_INT, REQ_NO, 'if (!in_array($data, array(0, 1, 2))) { $data = 2; } return true;'), Code:
'showbirthday' => array(TYPE_INT, REQ_NO, 'if (!in_array($data, array(0, 1, 2, 3))) { $data = 2; } return true;'), ******** ******** edit PHP file: functions_databuild.php change line 1462 from Code:
SELECT username, userid, birthday Code:
SELECT username, userid, birthday, showbirthday Code:
AND showbirthday = 2 Code:
AND showbirthday > 1 after line 1476 add Code:
$usershowdb = $birthday['showbirthday']; Code:
if ($year > $day[2] AND $day[2] != '0000') Code:
if ($year > $day[2] AND $day[2] != '0000' AND $usershowdb != '3') ******** ******** File functions_calendar.php after line 431 add Code:
$usershowbd = $value['showbirthday']; Code:
if ($year > $userday[2] AND $userday[2] != '0000') Code:
if ($year > $userday[2] AND $userday[2] != '0000' AND $usershowbd != '3') change line 768 from Code:
SELECT birthday,username,userid Code:
SELECT birthday,username,userid,showbirthday Code:
showbirthday = 2 Code:
showbirthday > 1 Code:
$showbd = $bday['showbirthday']; ******** ******** edit file calendar.php add after line 638 Code:
$usershowbd = $value['showbirthday']; change line 640 from Code:
if ($weekyear > $userday[2] AND $userday[2] != '0000') Code:
if ($weekyear > $userday[2] AND $userday[2] != '0000' AND $usershowbd != '3') Code:
SELECT birthday, username, userid Code:
to SELECT birthday, username, userid, showbirthday Code:
showbirthday = 2 Code:
showbirthday > 1 Code:
$usershowbd = $birthdays['showbirthday']; Code:
if ($year > $userday[2] AND $userday[2] != '0000') Code:
if ($year > $userday[2] AND $userday[2] != '0000' AND $usershowbd != '3') ******** ******** edit file member.php change line 476 from Code:
if ($year > $bday[2] AND $bday[2] != '0000') Code:
if ($year > $bday[2] AND $bday[2] != '0000' AND $userinfo['showbirthday'] !='3') Code:
if ($userinfo['showbirthday'] = 2) Code:
if ($userinfo['showbirthday'] > 1 Code:
if ($userinfo['showbirthday'] = 2) change line 497 from Code:
if ($year > $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000') Code:
if ($year > $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000' AND $userinfo['showbirthday'] != '3' Code:
if ($bday[2] == '0000') Code:
if ($bday[2] == '0000' OR $userinfo['showbirthday'] == '3') ******** ******** edit file memberlist.php change line 617 from Code:
if (date('Y') > $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000' AND $userinfo['showbirthday'] > 0) Code:
if (date('Y') > $bday[2] AND $bday[2] > 1901 AND $bday[2] != '0000' AND $userinfo['showbirthday'] > 0 AND $userinfo['showbirthday'] != '3') Code:
if ($today_year > $bday[2] AND $bday[2] != '0000') change line 657 from Code:
else if ($userinfo['showbirthday'] == 2) Code:
else if ($userinfo['showbirthday'] > 1) Code:
if ($userinfo['birthday'] == '' AND $userinfo['showbirthday'] == 2) add after line 673 Code:
else if ($userinfo['showbirthday'] == 3) {$userinfo['birthday'] = "$bday[0]-$bday[1]";} I'd like to know how'd I'd go about improving the process for installing it for others to use. |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|