BIRTHDAY SELECT PULLDOWN MENUS+

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   BIRTHDAY SELECT PULLDOWN MENUS+
ledzeppelin
CZ Newbie
ledzeppelin has been a member for over 19 year's 19 Year Member
usa.gif indiana.gif
Age: 42
Gender: Male
Fav. Sports Team: UMMMMMMMM
Status: Offline
Joined: Sep 16, 2004
0.00 posts per day
Posts: 23
Points: 3,373
   
I believe this is the code I have to adjust so it collects day month and year from select pulldown menus. I believe you guys already have this installed in your site. How much would you charge me to get a copy of brown earth code as I don't know how to do it.

// find the birthday values, reflected by the $lang['Submit_date_format']
if ($birthday || !$board_config['min_user_age']) //if a birthday is submited, then validate it
{
   for ($i=0;$i<=strlen($lang['Submit_date_format']);$i++)
   {
      switch ($lang['Submit_date_format'][$i])
      {
        case d:   $day=$birthday_lengt;$date_count++;
         $birthday_lengt++;break;
        case m:   $md=$birthday_lengt;$date_count++;
         $birthday_lengt++;break;
       case Y:   $year=$birthday_lengt;$date_count++;
         $birthday_lengt=$birthday_lengt+3;break;
      }
      $birthday_lengt++;
   }
   // did we find both day,month and year
   if ($date_count<3)
   {
      $error = TRUE;
      if( isset($error_msg) )$error_msg .= "<br />";
      $error_msg .= $lang['Wrong_birthday_format'];
   } else
   {
      $day=$birthday[$day].$birthday[$day+1];
      $md=$birthday[$md].$birthday[$md+1];
      $year=$birthday[$year].$birthday[$year+1].$birthday[$year+2].$birthday[$year+3];
      $user_age=(date('md')>=$md.$day) ? date('Y') - $year : date('Y') - $year - 1 ;
      // Check maximum user age
      if ($user_age>$board_config['max_user_age']) $md=13  ;
      // Check minimum user age
      if ($user_age<$board_config['min_user_age']) $md=13  ;
      if (!checkdate($md,$day,$year))
      {
         $error = TRUE;
         if( isset($error_msg) )$error_msg .= "<br />";
         $error_msg .= $lang['Not_old_enough'];
      } else
      {
         $birthday = ($error) ? $birthday : mkrealdate($day,$md,$year);
         $next_birthday_greeting = (date('md')<$md.$day) ? date('Y'):date('Y')+1 ;
      }
   }   
} else $birthday = ($error) ? '' : 999999;



Back to top Reply with quote
#2   re: BIRTHDAY SELECT PULLDOWN MENUS+
ledzeppelin
CZ Newbie
ledzeppelin has been a member for over 19 year's 19 Year Member
usa.gif indiana.gif
Age: 42
Gender: Male
Fav. Sports Team: UMMMMMMMM
Status: Offline
Joined: Sep 16, 2004
0.00 posts per day
Posts: 23
Points: 3,373
   
I already know how to do the html. It should look something like this. It would then go into the profile_add_body.tpl file located in the templates folder or else your theme's forum folder. I'm halfway there I just need to know the php. Its already written on this site I'm sure it would be an easy copy and paste to go into the includes/usercp_registration.php file.
<!-- Start add - Birthday MOD -->
   <tr>
     <td class="row1"><span class="explaintitle">Birthday:</span></td>
     <td class="row2"><span class="genmed">Day ;;</span><select name="b_day" size="1" class="gensmall">
      <option value="0"> ;;- ;;</option>
      <option value="1"> ;;1 ;;</option>
      <option value="2"> ;;2 ;;</option>
      <option value="3"> ;;3 ;;</option>
      <option value="4"> ;;4 ;;</option>
      <option value="5"> ;;5 ;;</option>
      <option value="6"> ;;6 ;;</option>
      <option value="7"> ;;7 ;;</option>
      <option value="8"> ;;8 ;;</option>
      <option value="9"> ;;9 ;;</option>
      <option value="10"> ;;10 ;;</option>
      <option value="11"> ;;11 ;;</option>
      <option value="12"> ;;12 ;;</option>
      <option value="13"> ;;13 ;;</option>
      <option value="14"> ;;14 ;;</option>
      <option value="15"> ;;15 ;;</option>
      <option value="16"> ;;16 ;;</option>
      <option value="17"> ;;17 ;;</option>
      <option value="18"> ;;18 ;;</option>
      <option value="19"> ;;19 ;;</option>
      <option value="20"> ;;20 ;;</option>
      <option value="21"> ;;21 ;;</option>
      <option value="22"> ;;22 ;;</option>
      <option value="23"> ;;23 ;;</option>
      <option value="24"> ;;24 ;;</option>
      <option value="25"> ;;25 ;;</option>
      <option value="26"> ;;26 ;;</option>
      <option value="27"> ;;27 ;;</option>
      <option value="28"> ;;28 ;;</option>
      <option value="29"> ;;29 ;;</option>
      <option value="30"> ;;30 ;;</option>
      <option value="31"> ;;31 ;;</option>
        </select> ;; ;;<span class="genmed">Month ;;</span><select name="b_md" size="1" class="gensmall">
           <option value="0"> ;;- ;;</option>
      <option value="1"> ;;January ;;</option>
      <option value="2"> ;;February ;;</option>
      <option value="3"> ;;March ;;</option>
      <option value="4"> ;;April ;;</option>
      <option value="5"> ;;May ;;</option>
      <option value="6"> ;;June ;;</option>
      <option value="7"> ;;July ;;</option>
      <option value="8"> ;;August ;;</option>
      <option value="9"> ;;September ;;</option>
      <option value="10"> ;;October ;;</option>
      <option value="11"> ;;November ;;</option>
      <option value="12"> ;;December ;;</option>
      </select> ;; ;;<span class="genmed">Year ;;</span><input type="text" class="post" style="width: 50px" name="b_year" size="4" maxlength="4" value="" /> ;; ;;</td>
   </tr>
<!-- End add - Birthday MOD -->



Back to top Reply with quote
#3   re: BIRTHDAY SELECT PULLDOWN MENUS+
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Kelly_Hero has been a member for over 20 year's 20 Year Member
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.50 posts per day
Posts: 3765
Points: 351,412
   
I know you're really needing this information, but please try to be patient. The code you're looking for can only come from Telli and he is a very busy guy. I'm sure he will post the info you need as soon as he can get to it.



Back to top Reply with quote
#4   re: BIRTHDAY SELECT PULLDOWN MENUS+
ledzeppelin
CZ Newbie
ledzeppelin has been a member for over 19 year's 19 Year Member
usa.gif indiana.gif
Age: 42
Gender: Male
Fav. Sports Team: UMMMMMMMM
Status: Offline
Joined: Sep 16, 2004
0.00 posts per day
Posts: 23
Points: 3,373
   
I wasn't trying to be impatient at all. I was just trying to help out by posting the html. If telli does pass me the code I'm positive I can send him a small donation for helping me out. He bailed me out before in the user info block before also. I have faith in him. ;-) I just searched all over yahoo and everywhere then I saw telli had already done this for his site and thought it might be a great addition to the birthday hack.



Back to top Reply with quote
#5   re: BIRTHDAY SELECT PULLDOWN MENUS+
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Kelly_Hero has been a member for over 20 year's 20 Year Member
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.50 posts per day
Posts: 3765
Points: 351,412
   
I know. I just wanted to let you know your posts weren't being ignored. icon_razz.gif



Back to top Reply with quote
#6   re: BIRTHDAY SELECT PULLDOWN MENUS+
ledzeppelin
CZ Newbie
ledzeppelin has been a member for over 19 year's 19 Year Member
usa.gif indiana.gif
Age: 42
Gender: Male
Fav. Sports Team: UMMMMMMMM
Status: Offline
Joined: Sep 16, 2004
0.00 posts per day
Posts: 23
Points: 3,373
   
If he does this I will modify it in the birthday mod and maybe we can distribute it as an update.



Back to top Reply with quote
#7   re: BIRTHDAY SELECT PULLDOWN MENUS+
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Taut has been a member for over 20 year's 20 Year Member
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.72 posts per day
Posts: 5530
Points: 481,695
   
did you try and install the Birthday hack from PortedMods. It's the exact same thing that is here on this site.



Back to top Reply with quote
#8   re: BIRTHDAY SELECT PULLDOWN MENUS+
ledzeppelin
CZ Newbie
ledzeppelin has been a member for over 19 year's 19 Year Member
usa.gif indiana.gif
Age: 42
Gender: Male
Fav. Sports Team: UMMMMMMMM
Status: Offline
Joined: Sep 16, 2004
0.00 posts per day
Posts: 23
Points: 3,373
   
No its not exactly the same....

<tr>
<td class="row1"><span class="gen">{L_BIRTHDAY}:</span><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}<br /></span></td>
<td class="row2"><input type="text" class="post"style="width: 80px" name="birthday" size="10" maxlength="10" value="{BIRTHDAY}" /></td>
</tr>


is what they have for the profile_add_body.tpl from the ported mods birthday hack....

Telli has something very similar to what I posted earlier.



Back to top Reply with quote
#9   re: BIRTHDAY SELECT PULLDOWN MENUS+
ledzeppelin
CZ Newbie
ledzeppelin has been a member for over 19 year's 19 Year Member
usa.gif indiana.gif
Age: 42
Gender: Male
Fav. Sports Team: UMMMMMMMM
Status: Offline
Joined: Sep 16, 2004
0.00 posts per day
Posts: 23
Points: 3,373
   
I found this mod it was at phpbbhacks.com under birthday in the download section. The file was 185.zip. It was a basic install. You'll either have to figure out the database update or else just use the ported version of the sql from portedmods.com

Just thought I'd let some people know.



Back to top Reply with quote
#10   re: BIRTHDAY SELECT PULLDOWN MENUS+
ledzeppelin
CZ Newbie
ledzeppelin has been a member for over 19 year's 19 Year Member
usa.gif indiana.gif
Age: 42
Gender: Male
Fav. Sports Team: UMMMMMMMM
Status: Offline
Joined: Sep 16, 2004
0.00 posts per day
Posts: 23
Points: 3,373
   
I'm getting a problem with this new mod. It seems to only register people's birthdays at 1970.
I am using phpnuke 7.0 and the birthday hack from phpbbhack

attached is the mod and my usercp_register.php any help would be greatufully appreciated. Because I can't figure this out at all..



Attached Files
birthday_1.5.6em.txt (54.12 KB, Downloaded: 5239 Time(s))
Attached Files
usercp_register.txt (62.59 KB, Downloaded: 5237 Time(s))


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum