Birthdays on Calendar van phpbbhack

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Gebruikersavatar
Diablo Gamer
Berichten: 1394
Lid geworden op: 02 jan 2004, 20:33
Locatie: Dalen/Drenthe/Holland
Contacteer:

Birthdays on Calendar van phpbbhack

Bericht door Diablo Gamer » 01 aug 2005, 00:22

ik heb de Kalender hack van phpbbhack gehaalt nu wil ik deze hack gaan instaleren maar ik stuit op een probleem in de install staat

Code: Selecteer alles

#
#-----[ OPEN ]--------------------------------------------HIER
#

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&" . 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') 
      ); 


maar ik ik heb aleen in mijn calendar.php dit staan

Code: Selecteer alles

<?php
/*********************************************
*	Calendar Lite
*
*	$Author: martin $
*	$Date: 2004/08/13 02:24:41 $
*	$Revision: 1.1 $
*
*********************************************/

include_once('cal_lite.php');
?>
dus mijn vraag luid hoe moet ik nu deze hack instaleren ?

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 01 aug 2005, 09:17

in cal_lite.php dan. Kijk nog eens goed na of hij voor jou kalender is, want er zijn twee kalenders in de omloop. Cal lite/Cal Pro en Topic Calendar
... Maar ik modereer (nog) niet.

Gesloten