Pagina 1 van 1

online / offline / hidden mod

Geplaatst: 15 aug 2004, 14:06
door Ricar87do
## MOD Title: Online/Offline/Hidden Mod
## MOD Author: Kooky < kooky@altern.org > (n/a) http://perso.edeign.com/kooky/
## MOD Description: This mod will show the Online status of a user, stating if
## he is "Online", "Offline" or "Hidden" (with images) within
## viewtopic.php before to his profile, in memberlist.php, groupcp.php, ...
## Only Admin (Mod & Group Mod) and the user himself can view hidden status
## MOD Version: 2.2.2
## Compatibility: 2.0.3 - 2.0.8
deze mod het ik nu geinstaleerd

ik heb alleen een fout, ik weet niet goed hoe ik deze fout kan verwoorden dus kijk zelf maar even
http://members.lycos.nl/ricar87do/phpBB ... ic.php?t=4 ( onderaan elk bericht ) dit zal wel ergens een klein foutje zijn maar waar?

Geplaatst: 15 aug 2004, 14:17
door cartoontje
Post het stukje hack uit viewtopic_body.tpl eens.

Geplaatst: 15 aug 2004, 14:22
door Ricar87do
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG}
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.PROFILE_IMG}
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
{postrow.POSTER_ONLINE_STATUS_IMG}

Geplaatst: 15 aug 2004, 14:23
door cartoontje
Hmmz, post dan maar even het stukje uit viewtopic.php (en post ook viewtopic.php zélf, maar dan alleen het gebied waarin je dingen voor de hack moest plaatsen).

Geplaatst: 15 aug 2004, 14:27
door Ricar87do
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>&nbsp;';
}
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>&nbsp;';
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" />&nbsp;';
}
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" />&nbsp;';
}
}
// 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>&nbsp;';
}
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>&nbsp;';
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" />&nbsp;';
}
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" />&nbsp;';
}
}
// 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

Geplaatst: 15 aug 2004, 14:44
door Ricar87do
vogens mij heeft het hiermij te maken:
// 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>&nbsp;';
}
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>&nbsp;';
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" />&nbsp;';
}
}
else
{
$online_status_img = '<img src="' . $images['icon_offline'] . '" alt="' . sprintf($lang['is_offline'], $poster) . '" title="' . sprintf($lang['is_offline'], $poster) . '" border="0" />&nbsp;';
}
}
// End add - Online/Offline/Hidden Mod
Als ik nauw de stukjes

Code: Selecteer alles

'" alt="' . sprintf($lang['is_online'], $poster) . '" title="' . sprintf($lang['is_online'], $poster) . '" border="0" /></a>&nbsp;'; 
weghaal zie je dan alleen het plaatje?

Geplaatst: 25 aug 2004, 11:27
door Relax
Was deze week met eenzelfde mod bezig en ik kreeg ook niet de juiste weergave.

De aanpassingen zijn niet erg moeilijk. Mocht ik een wel werkende mod vinden, dan laat ik het wel horen. Ik ga deze ook bij mij even proberen.


Groetjes Veronique

dode linkl

Geplaatst: 25 aug 2004, 12:28
door svenn
dode link :(