Seite 1 von 1

events im awsw portal

Verfasst: 03.10.2003 23:35
von .tribal
hi,
ich hab da was gefunden um events aus dem kalender in das ez portal zu bauen, nun versuch ich das auch am awsw portal anzuwenden . .

bisher ohne erfolg .. . kennt jemand vielleicht schon eine lösung fürs awsw portal ??

grus

Verfasst: 04.10.2003 01:34
von AWSW
Hallo,
nicht genau, aber es sollte ähnlich einzubauen sein. Höchstens die zu suchenden Stellen dürften anders aussehen...

Im Downloadlink der Intro+Portal MODs findest Du dann noch eine Anleitung, wie man das Ganze dann abschaltbar gestallten kann über das ACP... :roll:

Verfasst: 04.10.2003 01:48
von .tribal
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 ..

:oops:

Verfasst: 23.09.2007 00:39
von Player-GTI
Hallo zusammen, und zwar würd ich gern meine Eventlist in mein Portal einbinden wie mach ich das am besten ???

Hab den Intro Portal Mod von AWSW und die Eventslist

Link zum Forum:

www.car-society-bayern.de/Forum