I want ..

Started by dave007, November 23, 2007, 07:29:06 AM

Previous topic - Next topic

dave007

SMF Version: SMF 1.1.4
That people only can confirm their birth on registration and not on their profile ..
That they only can put their birth date in it once !

Rumbaar

Search function is your friend:
Age on registration

Now for the removal of the option in their profile try:

Find the following code in Profile.template.php
// Gender, birthdate and location.
echo '
<tr>
<td width="40%">
<b>', $txt[563], ':</b>
<div class="smalltext">', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '</div>
</td>
<td class="smalltext">
<input type="text" name="bday3" size="4" maxlength="4" value="', $context['member']['birth_date']['year'], '" /> -
<input type="text" name="bday1" size="2" maxlength="2" value="', $context['member']['birth_date']['month'], '" /> -
<input type="text" name="bday2" size="2" maxlength="2" value="', $context['member']['birth_date']['day'], '" />
</td>
</tr><tr>

and replace with:
// Gender, birthdate and location.
if ($context['user']['is_admin'])
echo '
<tr>
<td width="40%">
<b>', $txt[563], ':</b>
<div class="smalltext">', $txt[566], ' - ', $txt[564], ' - ', $txt[565], '</div>
</td>
<td class="smalltext">
<input type="text" name="bday3" size="4" maxlength="4" value="', $context['member']['birth_date']['year'], '" /> -
<input type="text" name="bday1" size="2" maxlength="2" value="', $context['member']['birth_date']['month'], '" /> -
<input type="text" name="bday2" size="2" maxlength="2" value="', $context['member']['birth_date']['day'], '" />
</td>
</tr>';
echo '
<tr>

This will remove the ability for anyone, other than the admin to see and edit the birthdate, because I figure as admin you'd still want to be able to easily access and edit that field if need be.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Advertisement: