Weird thing I discovered...

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 !

Weird thing I discovered...

Postby Swanee on Tue 08. Nov, 2005 12:06

Hi there...

I used the Birthday hack and after some slight problems it's working properly. Thanks for those MODS, peeps! Love it!

Now I wanted to use try the birthday_calendar_pcp to add users birthdays to the calendar automatically. It's only a textfile telling you what MODS to do to other files. I started to do all the MODS. Then I had to open the calendar.php and do the following:
Code: Select all
#
#-----[ FIND ]--------------------------------------------
#

   {
      $currentday = create_date("j", time(), $board_config['board_timezone']);
      $currentmonth = create_date("m", time(), $board_config['board_timezone']);
      $currentyear = create_date("Y", time(), $board_config['board_timezone']);
   }

But the thing is that that code isn't in the calendar.php??????? And I looked at the birthday hack MODS again, but nowhere it mention that MOD.

What did I do wrong?

Come to think of it... if I open our calendar in the forum I get a couple of pulldown menus that are empty. Does that have something to do with this code?

Thanks in advance!
Swanee
Poster
Poster
 
Posts: 10
Joined: Sun 06. Nov, 2005 19:14

Postby Swanee on Tue 08. Nov, 2005 12:55

Some additional information...

Here is what my calendar.php looks like:
Code: Select all
<?php
/*********************************************
*   Calendar Lite
*
*   $Author: martin $
*   $Date: 2004/08/13 02:24:41 $
*   $Revision: 1.1 $
*
*********************************************/

include_once('cal_lite.php');
?>

That is after I already did the MODS for the birthday calendar. And the weird thing is, the birthdays are displayed below the users names and all.
Now I want it to be automatically added to the calendar.

Again, what did I do wrong or didn't do at all? :)

Help me out, please!!!
Swanee
Poster
Poster
 
Posts: 10
Joined: Sun 06. Nov, 2005 19:14

Postby Swanee on Tue 08. Nov, 2005 13:09

This getting weird...

I mean, in the MODS for birthday_calendar_pcp.txt there are a lot of coding that really can't be found in the calendar.php:
Code: Select all
#
#-----[ OPEN ]--------------------------------------------
#

calendar.php

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

   {
      $currentday = create_date("j", time(), $board_config['board_timezone']);
      $currentmonth = create_date("m", time(), $board_config['board_timezone']);
      $currentyear = create_date("Y", time(), $board_config['board_timezone']);
   }


#
#-----[ AFTER, ADD ]--------------------------------------
#

   if ($cal_config['show_birthdays'] == 1)
   {
      $username = array();
      $user_id = array();
      $birthday = array();
      $birthmonth = array();
      $useryear = array();
      $ii = 0;

      $sql = "SELECT username, user_id, user_birthday
         FROM " . USERS_TABLE . "
         WHERE user_birthday < '999999'
         ORDER BY username";
      if( ($result = $db->sql_query($sql)) )
      {
         while( $row = $db->sql_fetchrow($result))
         {
            $ii++;
            $username[$ii] = $row['username'];
            $user_id[$ii] = $row['user_id'];
            $birthday[$ii] = intval(substr($row['user_birthday'], 6, 2));
            $birthmonth[$ii] = intval(substr($row['user_birthday'], 4, 2));
            $useryear[$ii] = intval(substr($row['user_birthday'], 0, 4));
         }
      }
   }

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

   // Changed the range to do ALL the days not require duplicate code later.

#
#-----[ AFTER, ADD ]--------------------------------------
#

   $max_query = 0;

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

   $event_list = '';
   $correction = 0;


#
#-----[ AFTER, ADD ]--------------------------------------
#

   if ($cal_config['show_birthdays'] == 1)
   {
      $ii = 0;

      for ($ii; $ii<=count($useryear); $ii++)
      {
         if ( $birthday[$ii] == $thisday AND $birthmonth[$ii] == $month)
         {
            $userage = $year - $useryear[$ii];
            $correction++;
            $event_list .= '<span class="gensmall">-> <a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id[$ii]") . '">' . $username[$ii] . ' (' . $userage .')</a></span><br />';
         }
      }
   }

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

      $query_num = count($this_date);

#
#-----[ AFTER, ADD ]--------------------------------------
#

      if (($query_num + $correction) > $max_query)
      {
         $max_query = $query_num + $correction;
      }

#
#-----[ FIND AND DELETE]----------------------------------
#

      if (($query_num - $correction) < 4) {
         for ($j=0; $j<(4 - ($query_num-$correction)); $j++) {
            $event_list .= '<span class=gensmall>&<br></span>';
         }
      }

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

   $template->assign_vars(array(
      'CAL_VERSION' => 'Ver: '.$cal_version,
      'CALENDAR' => $lang['Calendar'],
      'L_CAL_NEW' => $lang['Cal_add_event'],
      'U_INDEX' => append_sid("index.$phpEx"),
      'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
      'U_CAL_HOME' => $homeurl)
      );

#
#-----[ REPLACE WITH ]------------------------------------
#

   if ($max_query < 5) $max_query = 5;

   $max_height = $max_query * 12;

   $template->assign_vars(array(
      'CAL_VERSION' => 'Ver: '.$cal_version,
      'CALENDAR' => $lang['Calendar'],
      'L_CAL_NEW' => $lang['Cal_add_event'],
      'U_INDEX' => append_sid("index.$phpEx"),
      'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
      'U_CAL_HOME' => $homeurl,
      'MAX_HEIGHT' => 'height=' . $max_height . 'px')
      );

But all of the FIND coding aren't in the calendar.php????
I think I didn't see one MOD that needed to be done or something???

I really only have this in my calendar.php:
Code: Select all
<?php
/*********************************************
*   Calendar Lite
*
*   $Author: martin $
*   $Date: 2004/08/13 02:24:41 $
*   $Revision: 1.1 $
*
*********************************************/

include_once('cal_lite.php');
?>


Let me explain what I have done so far:

I installed the calendar 1.4.4 >> Works perfectly! Or is it? I have empty pulldown menus in the calendar page???

Then I did the MODS for the Birthday hack birthday_1.5.7em >> Works upto a certain extend. No pop-ups though!

Now I'm trying to do the birthday_calendar_pcp.txt >> Still trying to get it to work

Help is much appreciated!
Swanee
Poster
Poster
 
Posts: 10
Joined: Sun 06. Nov, 2005 19:14

Postby Beeveer on Tue 08. Nov, 2005 16:51

PCP means Profile Control Panel. I don't think you use that, so you can't use that mod.
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 Swanee on Tue 08. Nov, 2005 16:54

Hi Beeveer,

So what MODS do I need to automatically add the members birthday to the calendar then?

Thanks in advance!
Swanee
Poster
Poster
 
Posts: 10
Joined: Sun 06. Nov, 2005 19:14

Postby Beeveer on Tue 08. Nov, 2005 16:56

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 Swanee on Tue 08. Nov, 2005 17:08

Bedankt, gozer! :wink:

But do you know the answer to my other question?

Like, why are the dropdown menus empty on the calendar page of our forum?
I'm am very precise in adding code and doing these MODS. Don't want to screw up, because right away I receive mail for members: Why isn't it working? Why is that? Why is this? :lol:

Help me out here!!!
Swanee
Poster
Poster
 
Posts: 10
Joined: Sun 06. Nov, 2005 19:14

Postby Beeveer on Tue 08. Nov, 2005 17:17

For support of other mods can you go to the forums of the original author. I don't know this mod exept his name, and is one of the very uncommon mods I don't have tested :oops:
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

Next

Return to Birthday [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron