[SOLUTION] Birthyear not mandatory anymore

Mod that adds a birthday field to the users profile, theire age are displayed beside the posts, and on there birthday they will have a greeting popup
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Postby Beeveer on Wed 31. Aug, 2005 18:08

Code: Select all
ALTER TABLE phpbb_users ADD 'user_age_flag' INT DEFAULT "0" NOT NULL;
becomes
Code: Select all
ALTER TABLE phpbb_users ADD 'user_age_flag' INT DEFAULT "1" NOT NULL;
then.

Try this code, I'm not sure about the working:

Code: Select all
ALTER TABLE phpbb_users ALTER user_age_flag INT DEFAULT "1" NOT NULL;


*Crosses Fingers*
Nee, ik geef geen antwoorden in het Nederlands, die horen thuis op www.phpbb.nl ;)
User avatar
Beeveer
brilliant supporter
 
Posts: 264
Joined: Tue 30. Nov, 2004 19:13
Location: Boskoop, South-Holland, the Netherlands

Postby cbl22 on Wed 31. Aug, 2005 18:13

This requires editing mysql doesn't it? I have no idea how to do that...
cbl22
Poster
Poster
 
Posts: 5
Joined: Sun 07. Aug, 2005 15:51

Postby midkiff on Wed 31. Aug, 2005 20:54

Ok, I just added the hide age mod and in the profile where I am assuming that 'Hide your age' goes it is only showing a :
The yes and no choices show up.

Can someone please tell me how I can fix this?
midkiff
Poster
Poster
 
Posts: 22
Joined: Fri 09. Jul, 2004 15:59

Postby Beeveer on Wed 31. Aug, 2005 22:36

Language files not editted correctly.
Nee, ik geef geen antwoorden in het Nederlands, die horen thuis op www.phpbb.nl ;)
User avatar
Beeveer
brilliant supporter
 
Posts: 264
Joined: Tue 30. Nov, 2004 19:13
Location: Boskoop, South-Holland, the Netherlands

Postby midkiff on Wed 31. Aug, 2005 22:56

This is exactly what's in my lang_main.php, it shows up correctly in user management in the admin panel, but doesn't show up when users try to edit their profile or when someone is trying to register

Code: Select all
// Start add - Birthday MOD
$lang['age_flag'] = 'Hide Your Age';
$lang['Birthday'] = 'Birthday';
midkiff
Poster
Poster
 
Posts: 22
Joined: Fri 09. Jul, 2004 15:59

Postby cbl22 on Thu 01. Sep, 2005 03:29

I had the same problem when I installed this mod, my fix probably isn't correct, but it works.

Code: Select all
templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]------------------------------------------
#

     <td class="row2"><span class="gen">{S_BIRTHDAY}</span></td>
   </tr>
   
#
#-----[ AFTER, ADD ]------------------------------------------
#

   <tr>
     <td class="row1"><span class="gen">{L_AGE_FLAG}:</span></td>
       <td class="row2">
      <input type="radio" name="age_flag" value="1" {INFO_YES} />
      <span class="gen">{L_YES}</span>&nbsp;&nbsp;
      <input type="radio" name="age_flag" value="0" {INFO_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>


In the above, where you see {L_AGE_FLAG}:

replace that with "Hide Your Age" or whatever else you want, and it will show up in the profile.

Note, you also need to do this in templates/subSilver/admin/user_edit_body.tpl.

Again, it isn't pretty, but it works.
cbl22
Poster
Poster
 
Posts: 5
Joined: Sun 07. Aug, 2005 15:51

Postby midkiff on Thu 01. Sep, 2005 15:52

That worked great, thanks! I don't care what the code looks like, as long as it works!



Ok, I am having another problem now, the hide your age option isn't saving the choices. If you answer 'yes' or 'no' in your profile it doesn't make a difference, the age is showing up in the b-day notification on the index page. It also doesn't save the info if I edit it from the admin panel. Anyone have any ideas how to fix this problem?
midkiff
Poster
Poster
 
Posts: 22
Joined: Fri 09. Jul, 2004 15:59

Postby cbl22 on Thu 01. Sep, 2005 18:57

That was my problem as well. The code that Beeveer placed above is supposed to correct that, but I can't use phpmyadmin, so I have no idea if it works or not.

I was hoping someone would be able to make a fix through the code itself, and not the tables, but so far no go.
cbl22
Poster
Poster
 
Posts: 5
Joined: Sun 07. Aug, 2005 15:51

PreviousNext

Return to Birthday [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron