
Hoe los ik dit dan op?
Code: Selecteer alles
redirect(append_sid("index.$phpEx", true));
Wie helpt?

Code: Selecteer alles
redirect(append_sid("index.$phpEx", true));
Code: Selecteer alles
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
Code: Selecteer alles
<?php
/***************************************************************************
* portal.php
* -------------------
* begin : Dinsdag, 13 Augustus, 2002
* copyright : (C) 2003 Smartor
* email : smartor_xp@hotmail.com
* vertaling : Admiral Rob
* e-mail : admiralrob@phpbb-nl.com
*
* $Id: portal.php,v 2.1.0 2002/9/27, 23:07:35 Smartor Exp $
*
***************************************************************************/
/***************************************************************************
*
* Dit programma is gratis software; je kunt het verdelenen/of aanpassen
* onder de regels van de GNU General Public License zoals gemaakt door
* de Free Software Foundation; of versie 2 van de lecentie of
* (bij uw optie) elke latere versie.
*
***************************************************************************/
/***************************************************************************
*
* Dezelfde code die ik geleend had van de originele index.phpindex.php, Welkom
* Avatar mod en andere...
*
***************************************************************************/
//
// Stel configuratie voor ezPortal in
//
// Welkom tekst: pas op dat we in een .php bestand zijn, dus gebruik \' in plaats van ' en gebruik \\ in plaats van \ (HTML aan)
$CFG['welcome_text'] = 'Welkom op <b>Spam World</b><br /><br />Bedankt voor het gebruik van Spam World,<br /><br />Veel plezier! ^_^';
// Hoeveelheid nieuws op portal
$CFG['number_of_news'] = '5';
// Lengte van nieuws
$CFG['news_length'] = '200';
// Nieuws bron forum ID: scheid met comma voor meerdere forums, bijv. '1,2,5'
$CFG['news_forum'] = '1';
// Poll bron forum ID: scheid met comma voor meerdere forums, bijv. '3,8,14'
$CFG['poll_forum'] = '1';
//
// BEEINDIG configuratie
// --------------------------------------------------------
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);
include($phpbb_root_path . 'chatbox_front.php');
// Verander stijl
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// Beeindig session management
//
//
// Als je deze statistieken niet op index.php gebruikt, kun je overwegen ze te verwijderen
//
$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'];
}
if( $userdata['session_logged_in'] )
{
$sql = "SELECT COUNT(post_id) as total
FROM " . POSTS_TABLE . "
WHERE post_time >= " . $userdata['user_lastvisit'];
$result = $db->sql_query($sql);
if( $result )
{
$row = $db->sql_fetchrow($result);
$lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")";
}
}
//
// Start pagina output
//
define('SHOW_ONLINE', true);
$page_title = $lang['Home'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'portal_body.tpl')
);
//
// Avatar op 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;
}
}
// Zoek naar anonieme gebruikers
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'];
}
//
// BEEINDIG: Avatar op index mod
//
$template->assign_vars(array(
'WELCOME_TEXT' => $CFG['welcome_text'],
'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>'),
'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_POST_COMMENT' => $lang['Post_your_comment'],
'L_SEND_PASSWORD' => $lang['Forgotten_password'],
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid("profile.$phpEx?mode=register") . '">', '</a>'),
'L_REMEMBER_ME' => $lang['Remember_me'],
'L_VIEW_COMPLETE_LIST' => $lang['View_complete_list'],
'L_POLL' => $lang['Poll'],
'L_VOTE_BUTTON' => $lang['Vote'],
// ChatBox
'L_WHO_IS_CHATTING' => $lang['Who_is_Chatting'],
'TOTAL_CHATTERS_ONLINE' => sprintf($lang['How_Many_Chatters'], $howmanychat),
'CHATTERS_LIST' => sprintf($lang['Who_Are_Chatting' ],$chatters),
'L_LOGIN_TO_JOIN_CHAT' => $lang['Login_to_join_chat'],
'L_CLICK_TO_JOIN_CHAT' => $lang['Click_to_join_chat'],
'S_JOIN_CHAT' => append_sid("chatbox_mod/chatbox.$phpEx"),
'CHATBOX_NAME' => $userdata['user_id'] . '_ChatBox',
// Welkom avatar
'L_NAME_WELCOME' => $lang['Welcome'],
'U_NAME_LINK' => $name_link,
'AVATAR_IMG' => $avatar_img)
);
//
// Haal berichten van mededeling forum op
//
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('portal.' . $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']);
$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'])
)
);
}
//
// BEEINDIG: Haal mededelingen op
//
//
// Haal poll op
//
$fetchpoll = phpbb_fetch_poll($CFG['poll_forum']);
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"'
)
);
}
//
// Maak de pagina
//
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Code: Selecteer alles
#################################################################
## Titel: Verander stijl voor Smartor's ezPortal
## Auteur: Tom Cioffe Jr < gwyd@cioffe.com >
## Integreerd door:: Smartor <smartor_xp@hotmail.com> - http://smartor.is-root.com
## Vertaling: Admiral Rob <robvanderburgt@home.nl>
## Description: Dit bestand legt uit hoe je de stijl van ezPortal veranderd
## Vereist "Change style on Index" mod van Tom Cioffe Jr < gwyd@cioffe.com >
##
## Aan te passen bestanden: 2
## portal.php
## templates/subSilver/portal_body.tpl
##
## Bijgevoegde bestanden: geen
##
#################################################################
#
#-----[ OPEN ]---------------------------------------------
#
portal.php
#
#-----[ VIND ]----------------------------------------
#
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);
#
#-----[ VOEG DAARNA TOE ]-----------------------------------
#
// Verander stijl
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
#
#-----[ VIND ]----------------------------------------
#
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
#
#-----[ VOEG DAARVOOR TOE ]-----------------------------------
#
// Change Style
$fpage_style = $userdata['user_style'];
if(isset($HTTP_POST_VARS['fpage_theme']))
{
$fpage_theme = intval($HTTP_POST_VARS['fpage_theme']);
$fpuser_id = $userdata['user_id'];
$fp_sql = "UPDATE " . USERS_TABLE . " SET user_style = '$fpage_theme' WHERE user_id = $fpuser_id";
if ( !($fp_result = $db->sql_query($fp_sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table ' . "$user_id $fpage_theme", '', __LINE__, __FILE__, $sql);
}
else
{
$fp_message = $lang['Profile_updated'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $fp_message);
}
}
#
#-----[ VIND ]----------------------------------------
#
'L_VOTE_BUTTON' => $lang['Vote'],
#
#-----[ VOEG DAARNA TOE ]-----------------------------------
#
// Verander stijl
'TEMPLATE_SELECT' => style_select($board_config['default_style'], 'template'),
'L_SELECT_STYLE' => $lang['Change_style'],
'L_CHANGE_NOW' => $lang['Go'],
'FPAGE_STYLE' => style_select($fpage_style, 'fpage_theme'),
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/portal_body.tpl
#
#-----[ VIND ]----------------------------------------
#
<!-- BEGIN switch_user_logged_in -->
<center><br />{AVATAR_IMG}</center>
<br />{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
<br />{CURRENT_TIME}<br /><br />{S_TIMEZONE}
#
#-----[ VOEG DAARNA TOE ]-----------------------------------
#
<form method="post" action="{U_PORTAL}">{L_SELECT_STYLE}:<br /><br />
<!-- BEGIN switch_user_logged_out -->
{TEMPLATE_SELECT} <input type="submit" class="mainoption" name="cangenow" value="{L_CHANGE_NOW}" />
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
{FPAGE_STYLE} <input type="submit" class="mainoption" name="fpcangenow" value="{L_CHANGE_NOW}" />
<!-- END switch_user_logged_in -->
</form>
#
#-----[ SLA OP/SLUIT AF ALLE BESTANDEN ]------------------------------------------
#
# EoF
Ik heb hemP.T. schreef:zoek en gij zult vinden! (http://www.phpbbhacks.com ?)