ich hab mir ganz normal eine neue portalbox erstellt und die calender dateien bearbeitet ..
die zu suchenden stellen in der portal.php wären:
#
# ----- FIND ------------------------------------------------------
#
include($phpbb_root_path . 'fetchposts.'.$phpEx);
#
# ----- AFTER ADD ------------------------------------------------------
#
$cal_config = array();
$sql = "SELECT * FROM ".$table_prefix."cal_config";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't query calendar config table", "", __LINE__, __FILE__, $sql);
}
else
{
while( $row = $db->sql_fetchrow($result) )
{
$cal_config[$row['config_name']] = $row['config_value'];
}
}
#
# ----- FIND ------------------------------------------------------
#
//
// Recent Topics
//
#
# ----- BEFOR ADD ------------------------------------------------------
#
//
// Events
//
if ($userdata['session_logged_in'])
{
if ($cal_config['number_events'] <> 0)
{
$day = create_date("j", time(), $userdata['user_timezone']);
$month = create_date("m", time(), $userdata['user_timezone']);
$year = create_date("Y", time(), $userdata['user_timezone']);
$sql = "SELECT * FROM ".$table_prefix."calendar WHERE valid = 'yes'
AND eventspan >= '$year-$month-$day 00:00:00'
ORDER BY stamp
LIMIT 0, " . $cal_config['number_events'];
$check = 0;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select Event data', '', __LINE__, __FILE__, $sql);
}
else
{
while ($row = $db->sql_fetchrow($result))
{
$check++;
$subject = stripslashes($row['subject']);
if ( strlen($subject) > $cal_config['subject_length']) {
if ((substr($subject,-3,1) == '(') && (substr($subject,-1,1) == ')')) {
// store the number of permits and tack them on the end of the shortened subject
$subjectnum = substr($subject,-2,1);
$subject = substr($subject, 0, -3);
}
$subject = substr($subject, 0, $cal_config['subject_length']);
$subject .= '..';
}
$start_date = substr($row['stamp'],8,2).".".substr($row['stamp'],5,2).".".substr($row['stamp'],0,4);
$end_date = substr($row['eventspan'],8,2).".".substr($row['eventspan'],5,2).".".substr($row['eventspan'],0,4);
$month =
$template->assign_block_vars('event', array(
'SUBJECT' => '<a href="'. $phpbb_root_path .'calendar.'.$phpEx.'?id='. $row['id'] .'&mode=display&day='. substr($row['stamp'],8,2). '&month='.substr($row['stamp'],5,2).'&year='.substr($row['stamp'],0,4).'">'. $subject .'</a>',
'SPAN' => $start_date . " - " . $end_date,
'AUTHOR' => '<a href="'. $phpbb_root_path .'profile.'.$phpEx.'?mode=viewprofile&'. POST_USERS_URL .'='. $row['user_id'] .'">('. stripslashes($row['username']) .')</a>'));
}
if ( $check == 0 )
{
$template->assign_block_vars('event', array(
'SUBJECT' => $lang["No_events"]));
}
}
}
# ------------------
# If you have not installed the eventlists add now:
if ($cal_config['number_events'] <> 0)
{
$template->assign_block_vars('event_list', array(
'EVENTS' => $lang["Events"]));
}
}
# ------------------
# If you have installed the eventlists you may add now:
if ($cal_config['number_events'] <> 0 && $cal_config['view_new_events'] == 1)
{
$template->assign_block_vars('event_list', array(
'EVENTS' => '<a href="'. $phpbb_root_path .'calendar.'.$phpEx.'?mode=View_New">'. $lang["Events"] .'</a>'));
}
else
{
$template->assign_block_vars('event_list', array(
'EVENTS' => $lang['Events']));
}
}
den ersten teil hab ich nach in der portal.php gleich am anfang bei zeile 34 reinkopiert ..
den zweiten teil dort wo in der anleitung der addonbox //PHP CODE steht ..
