ez portal
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.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
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.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
ach ja, ich poste einfach mal alles:
<?php
/***************************************************************************
* portal.php
* -------------------
* begin : Tuesday, August 13, 2002
* copyright : (C) 2002 Smartor
* email : smartor_xp@hotmail.com
*
* $Id: portal.php,v 1.0.3 2002/9/06, 11:57:49 hnt Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
/***************************************************************************
*
* Some code in this file I borrowed from the original index.php, Welcome
* Avatar MOD and others...
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'fetchposts.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
//
// Board Statistics
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];
if( $total_posts == 0 )
{
$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
$l_total_post_s = $lang['Posted_article_total'];
}
else
{
$l_total_post_s = $lang['Posted_articles_total'];
}
if( $total_users == 0 )
{
$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
$l_total_user_s = $lang['Registered_user_total'];
}
else
{
$l_total_user_s = $lang['Registered_users_total'];
}
//
// Start output of page
//
$page_title = 'Portal';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'portal_body.tpl')
);
//
// Avatar On Index MOD
//
$avatar_img = '';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
switch( $userdata['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
// Check For Anonymous User
if ($userdata['user_id'] != '-1')
{
$name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile&" . $userdata['user_id']) . '">' . $userdata['username'] . '</a>';
}
else
{
$name_link = $lang['Guest'];
}
//
// END: Avatar On Index MOD
//
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
'TOTAL_TOPICS' => sprintf($lang['total_topics'], $total_topics),
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
// Additional
'L_HOME' => $lang['Home'],
'L_FORUM' => $lang['Forum'],
'L_BOARD_NAVIGATION' => $lang['Board_navigation'],
'L_STATISTICS' => $lang['Statistics'],
'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
'L_POSTED' => $lang['Posted'],
'L_COMMENTS' => $lang['Comments'],
'L_VIEW_COMMENTS' => $lang['View_comments'],
'L_REMEMBER_ME' => $lang['Remember_me'],
'L_VIEW_COMPLETED_LIST' => $lang['View_completed_list'],
'L_POLL' => $lang['Poll'],
'L_VOTE_BUTTON' => $lang['Vote'],
// Welcome Avatar
'L_NAME_WELCOME' => $lang['Welcome'],
'U_NAME_LINK' => $name_link,
'AVATAR_IMG' => $avatar_img)
);
//
// Fetch Posts from Announcements Forum
//
$announcements_forum_id = 1; // Change this with yours
$fetchposts = phpbb_fetch_posts($announcements_forum_id);
for ($i = 0; $i < count($fetchposts); $i++)
{
$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'],
'LINK' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id'])
)
);
}
//
// END: Fetch Announcements
//
//
// Fetch Poll
//
$poll_forum_id = 1;
$fetchpoll = phpbb_fetch_poll($poll_forum_id);
if (!empty($fetchpoll))
{
$template->assign_vars(array(
'S_POLL_QUESTION' => $fetchpoll['vote_text'],
'S_POLL_ACTION' => append_sid('posting.'.$phpEx.'?'.POST_TOPIC_URL.'='.$fetchpoll['topic_id']),
'S_TOPIC_ID' => $fetchpoll['topic_id'],
'L_SUBMIT_VOTE' => $lang['Submit_vote'],
'L_LOGIN_TO_VOTE' => $lang['Login_to_vote']
)
);
for ($i = 0; $i < count($fetchpoll['options']); $i++)
{
$template->assign_block_vars('poll_option_row', array(
'OPTION_ID' => $fetchpoll['options'][$i]['vote_option_id'],
'OPTION_TEXT' => $fetchpoll['options'][$i]['vote_option_text'],
'VOTE_RESULT' => $fetchpoll['options'][$i]['vote_result']
)
);
}
}
else
{
$template->assign_vars(array(
'S_POLL_QUESTION' => $lang['No_poll'],
'DISABLED' => 'disabled="disabled"'
)
);
}
//
// Generate the page
//
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Du brauchst folgende Version um mehrere Foren auszuwählen:
bzw. die neuste für phpbb 2.04 heisst:$Id: portal.php,v 2.1.0 2002/9/27, 23:07:35 Smartor Exp $
Bekommst Du hier..Klick$Id: portal.php,v 2.1.7 2003/01/30, 17:05:58 Smartor Exp $