Teil aus dem Portal.php in eine neue Seite einbinden

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
markusfrank
Mitglied
Beiträge: 26
Registriert: 25.02.2007 18:36

Teil aus dem Portal.php in eine neue Seite einbinden

Beitrag von markusfrank »

Ist es möglich, folgenden Code der portal.php datei in eine neue Seite zu integrieren.
Dort möchte ich aber bestimmte Sachen: manuell eintragen.
  • number_of_news
    news-length
    news-forum
// FETCH POSTS START
$CFG['number_of_news'] = $introportalmod_config['fpost_numofnews'];
$CFG['news_length'] = $introportalmod_config['fpost_newslength'];
$CFG['news_forum'] = $introportalmod_config['fpost_forums'];
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 = '';
}
if( $introportalmod_config['fpost_active'] == "1" )
{
$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('portal.' . $phpEx . '?article=' . $i),
'L_READ_FULL' => $read_full,
'OPEN' => $open_bracket,
'CLOSE' => $close_bracket)
);
}
}
}
else
{
if( $introportalmod_config['fpost_active'] == "1" )
{
$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('portal.' . $phpEx),
'L_READ_FULL' => $read_full,
'OPEN' => $open_bracket,
'CLOSE' => $close_bracket
)
);
}
}
// FETCH POSTS END
Wie kann ich dies machen?

Ich hoffe es hat jemand eine Lösung für mich.

lg
Antworten

Zurück zu „phpBB 2.0: Mod Support“