Verfasst: 13.06.2004 23:38
@ mObbY
DANKE !!!
DANKE !!!
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
<?php
//Benötigte Dateien und Variablen von phpBB
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'portal_poll.'.$phpEx);
// ************************************************************************************
// Dies hier bitte an die eigenen Erfordernisse anpassen:
//
// $CFG['number_of_news'] -> Anzahl der anzuzeigenden Buchtipps
// $CFG['news_length'] -> 0 = der ganze Artikel, andere Zahl = Anzahl der anzuzeigenden Zeichen
// $CFG['news_forum'] -> Kommagetrennte Liste der anzuzeigenden Foren
$CFG['number_of_news'] = 100;
$CFG['news_length'] = 0;
$CFG['news_forum'] = "4,5";
// Ab hier sind keine Änderungen mehr erforderlich!
// ************************************************************************************
$lang_file = 'lang_introportal';
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
//Session auslesen und Benutzer-Informationen laden
$userdata = session_pagestart($user_ip, PAGE_BOOKTIPS);
init_userprefs($userdata);
$template->assign_vars(array(
'L_POSTED' => $lang['Posted'],
'L_COMMENTS' => $lang['Comments'],
'L_VIEW_COMMENTS' => $lang['View_comments'],
'L_POST_COMMENT' => $lang['Post_your_comment'])
);
// FETCH POSTS START
// CODE TAKEN FROM "AWSW Intro & Portal MOD"
if(!isset($HTTP_GET_VARS['article']))
{
$template->assign_block_vars('welcome_text', array());
$fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], $CFG['news_length']);
for ($i = 0; $i < count($fetchposts); $i++)
{
if( $fetchposts[$i]['striped'] == 1 )
{
$open_bracket = '[ ';
$close_bracket = ' ]';
$read_full = $lang['Read_Full'];
}
else
{
$open_bracket = '';
$close_bracket = '';
$read_full = '';
}
$template->assign_block_vars('fetchpost_row', array(
'TITLE' => $fetchposts[$i]['topic_title'],
'POSTER' => $fetchposts[$i]['username'],
'TIME' => $fetchposts[$i]['topic_time'],
'TEXT' => $fetchposts[$i]['post_text'],
'REPLIES' => $fetchposts[$i]['topic_replies'],
'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id']),
'U_READ_FULL' => append_sid('buchtipps.' . $phpEx . '?article=' . $i),
'L_READ_FULL' => $read_full,
'OPEN' => $open_bracket,
'CLOSE' => $close_bracket)
);
}
}
else
{
$fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], 0);
$i = intval($HTTP_GET_VARS['article']);
if( $fetchposts[$i]['striped'] == 0)
{
$open_bracket = '[ ';
$close_bracket = ' ]';
$read_full = $lang['Read_Full_Back'];
}
else
{
$open_bracket = '';
$close_bracket = '';
$read_full = '';
}
$template->assign_block_vars('fetchpost_row', array(
'TITLE' => $fetchposts[$i]['topic_title'],
'POSTER' => $fetchposts[$i]['username'],
'TIME' => $fetchposts[$i]['topic_time'],
'TEXT' => $fetchposts[$i]['post_text'],
'REPLIES' => $fetchposts[$i]['topic_replies'],
'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id']),
'U_READ_FULL' => append_sid('buchtipps.' . $phpEx),
'L_READ_FULL' => $read_full,
'OPEN' => $open_bracket,
'CLOSE' => $close_bracket)
);
}
// FETCH POSTS END
$page_title = 'Buchtipps';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'buchtipps_body.tpl')
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>