Bericht
door Ricar87do » 15 aug 2004, 14:27
alvast het stukje uit de hack:
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username
#
#-----[ IN-LINE FIND ]------------------------------------------
#
u.user_allowavatar, u.user_allowsmile
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
, u.user_allow_viewonline, u.user_session_time
VOOR DIT DEEL ZIE EDIT1
#
#-----[ FIND ]------------------------------------------
#
//
// Again this will be handled by the templating
#
#-----[ BEFORE, ADD ]------------------------------------
#
// Start add - Online/Offline/Hidden Mod
$online_status_img = '';
if ( $poster_id != ANONYMOUS )
{
if ( $postrow[$i]['user_session_time'] >= (time()-60) )
{
if ( $postrow[$i]['user_allow_viewonline'] )
{
$online_status_img = '<a href="' . append_sid("viewonline.$phpEx") . '"><img src="' . $images['icon_online'] . '" alt="' . sprintf($lang['is_online'], $poster) . '" title="' . sprintf($lang['is_online'], $poster) . '" border="0" /></a> ';
}
else if ( $is_auth['auth_mod'] || ( $userdata['user_id'] == $poster_id ) )
{
$online_status_img = '<a href="' . append_sid("viewonline.$phpEx") . '"><img src="' . $images['icon_hidden'] . '" alt="' . sprintf($lang['is_hidden'], $poster) . '" title="' . sprintf($lang['is_hidden'], $poster) . '" border="0" /></a> ';
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" /> ';
}
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" /> ';
}
}
// End add - Online/Offline/Hidden Mod
DIT STUK ZIT IN EDIT 2
#
#-----[ FIND ]------------------------------------------
#
'POSTER_AVATAR' => $poster_avatar,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Online/Offline/Hidden Mod
'POSTER_ONLINE_STATUS_IMG' => $online_status_img,
// End add - Online/Offline/Hidden Mod
dit stuk is in EDIT3
// EDIT1
u.user_allowsmile,u.user_allow_viewonline, u.user_session_time, u.user_gender, p.*,
// EDIT2
$user_sig = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
}
$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
}
//
// Replace newlines (we use this rather than nl2br because
// till recently it wasn't XHTML compliant)
//
if ( $user_sig != '' )
{
$user_sig = '<br />_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig);
}
$message = str_replace("\n", "\n<br />\n", $message);
//
// Editing information
//
if ( $postrow[$i]['post_edit_count'] )
{
$l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];
$l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, $poster, create_date($board_config['default_dateformat'], $postrow[$i]['post_edit_time'], $board_config['board_timezone']), $postrow[$i]['post_edit_count']);
}
else
{
$l_edited_by = '';
}
//
// Start add - Online/Offline/Hidden Mod
$online_status_img = '';
if ( $poster_id != ANONYMOUS )
{
if ( $postrow[$i]['user_session_time'] >= (time()-60) )
{
if ( $postrow[$i]['user_allow_viewonline'] )
{
$online_status_img = '<a href="' . append_sid("viewonline.$phpEx") . '"><img src="' . $images['icon_online'] . '" alt="' . sprintf($lang['is_online'], $poster) . '" title="' . sprintf($lang['is_online'], $poster) . '" border="0" /></a> ';
}
else if ( $is_auth['auth_mod'] || ( $userdata['user_id'] == $poster_id ) )
{
$online_status_img = '<a href="' . append_sid("viewonline.$phpEx") . '"><img src="' . $images['icon_hidden'] . '" alt="' . sprintf($lang['is_hidden'], $poster) . '" title="' . sprintf($lang['is_hidden'], $poster) . '" border="0" /></a> ';
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" /> ';
}
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" /> ';
}
}
// End add - Online/Offline/Hidden Mod
// Again this will be handled by the templating
// EDIT3
'POSTER_AVATAR' => $poster_avatar,
// Start add - Online/Offline/Hidden Mod
'POSTER_ONLINE_STATUS_IMG' => $online_status_img,
// End add - Online/Offline/Hidden Mod
'POST_DATE' => $post_date,
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
'SIGNATURE' => $user_sig,
'EDITED_MESSAGE' => $l_edited_by,
'MINI_POST_IMG' => $mini_post_img,
'PROFILE_IMG' => $profile_img,
'PROFILE' => $profile,
'SEARCH_IMG' => $search_img,
'SEARCH' => $search,
'PM_IMG' => $pm_img,
'PM' => $pm,
'EMAIL_IMG' => $email_img,
'EMAIL' => $email,
'WWW_IMG' => $www_img,
'WWW' => $www,
'ICQ_STATUS_IMG' => $icq_status_img,
'ICQ_IMG' => $icq_img,
'ICQ' => $icq,
'AIM_IMG' => $aim_img,
'AIM' => $aim,
'MSN_IMG' => $msn_img,
'MSN' => $msn,
'YIM_IMG' => $yim_img,
'YIM' => $yim,
'BUDDY_IMG' => $buddy_img,
'BUDDY' => $buddy,
'EDIT_IMG' => $edit_img,
'EDIT' => $edit,
'QUOTE_IMG' => $quote_img,
'QUOTE' => $quote,
'IP_IMG' => $ip_img,
'IP' => $ip,
'DELETE_IMG' => $delpost_img,
'DELETE' => $delpost,'L_GENDER' => $lang['Gender'],
'L_MINI_POST_ALT' => $mini_post_alt,
'U_MINI_POST' => $mini_post_url,
'U_POST_ID' => $postrow[$i]['post_id'])
);
$cm_viewtopic->post_vars($postrow[$i],$userdata,$forum_id