An einer 7 Tages-Vorschau hätte ich auch grosses Interesse, wie es früher in PHPBB2 gewesen war... Danke wenn sich da wer daransetzt.
Grüsse
EDIT:
Dass Stand früher mal in der portal.php (PHPBB2) ich weiss nicht ob dies jetzt Inkompatibilitäten zeigt. BB-BF-BM könterst du das Eventuell mal durch gehen? Dankeschöön
Oder falls du keine Zeit hast,hillft es vieleicht jemandem das Addon zu entwickeln (Sorry kenne mich zu wenig aus)
Hier die Codes (wurden auch mal von BB-BF-BM entwickelt)
Code: Alles auswählen
// SIMPLE CALENDAR BEGIN
require($phpbb_root_path.'calendar/functions.'.$phpEx);
$sql = 'SELECT name, value FROM '.CALENDAR_CONFIG_TABLE;
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain calendar config data', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow() )
{
define('CAL_'.strtoupper($row['name']), $row['value']);
}
$sql = 'SELECT action, user_level, user_ids, group_ids, black_uids FROM '.CALENDAR_AUTH_TABLE.' ORDER BY action ASC';
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain auth data');
}
while( $row = $db->sql_fetchrow() )
{
define('CAL_AUTH_'.strtoupper($row['action']), get_auth($row['user_level'], $row['user_ids'], $row['group_ids'], $row['black_uids']));
}
$sql = 'SELECT cat_id, cat_name, read_user_level, read_user_ids, read_group_ids, read_black_uids, edit_user_level, edit_user_ids, edit_group_ids, edit_black_uids FROM '.CALENDAR_CAT_TABLE;
$CATS = array();
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain auth data');
}
while( $row = $db->sql_fetchrow() )
{
$CATS[$row['cat_id']] = array(
'id' => $row['cat_id'],
'name' => $row['cat_name'],
'read' => get_auth($row['read_user_level'], $row['read_user_ids'], $row['read_group_ids'], $row['read_black_uids']),
'edit' => get_auth($row['edit_user_level'], $row['edit_user_ids'], $row['edit_group_ids'], $row['edit_black_uids'])
);
}
$now = mktime(0, 0, 0, date('n'), date('j'), date('Y'));
$end = mktime(0, 0, 0, date('n'), date('j') + CAL_NEXT_DAYS, date('Y'));
$days = get_days($now, $end);
$events = get_events($days);
$no_events = 1;
while( list($date, $event) = each($events) )
{
while( list($id, $data) = each($event) )
{
$template->assign_block_vars('cal_next_events', array(
'date' => $date,
'name' => htmlspecialchars($data['name']),
'url' => append_sid('calendar.'.$phpEx.'?event='.$data['id'].params('&', 'm', 'y', 'show_events')),
'desc' => nl2br(htmlspecialchars($data['desc']))
));
$no_events = 0;
}
}
if( $no_events )
{
if( CAL_NEXT_DAYS > 1 )
{
$template->assign_block_vars('cal_switch_no_next_events', array(
'msg' => sprintf($lang['CAL_No_Next_Events'], CAL_NEXT_DAYS)
));
}
elseif( CAL_NEXT_DAYS == 1 )
{
$template->assign_block_vars('cal_switch_no_next_events', array(
'msg' => $lang['CAL_No_Next_Event']
));
}
else
{
$template->assign_block_vars('cal_switch_no_next_events', array(
'msg' => $lang['CAL_Today_No_Events']
));
}
}
// SIMPLE CALENDAR END
Und das in der poral_body.tpl
Code: Alles auswählen
<!-- ##### SIMPLE CALENDAR START ##### -->
<table width="100%" border="0" cellpadding="1" cellspacing="1" style="border-collapse: collapse" class="forumline">
<tr>
<td class="catHead" colspan="2" height="25"><span class="cattitle"><center><b>{NEXT_EVENTS}:</b></center></span></td>
</tr>
<!-- BEGIN cal_next_events -->
<tr>
<td class="row1 gen" style="padding: 0.7em;"><a href="{cal_next_events.url}"><strong>{cal_next_events.name}</strong></a></td>
</tr>
<tr>
<td class="row1 gen" style="padding: 0.7em;"><em>{cal_next_events.date}</em></td>
</tr>
<tr>
<td class="row1 gensmall" style="padding: 1.5em;">{cal_next_events.desc}</td>
</tr>
<!-- END cal_next_events -->
<!-- BEGIN cal_switch_no_next_events -->
<tr>
<td class="row1 gen">{cal_switch_no_next_events.msg}</td>
</tr>
<!-- END cal_switch_no_next_events -->
</table>
<br>
<!-- ##### SMIPLE CALENDAR ENDE ##### -->