fully integred shoutbox ft Extend_rank_color
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

fully integred shoutbox ft Extend_rank_color
ik wil dat de kleuren van Extend_rank_color in me shoutbox zichtbaar zijn weet iemand daar een code voor...:$
Ja, deze code kun je gebruiken:
Code: Selecteer alles
#-----[ OPEN ]------------------------------------------------
#
shoutbox_max.php
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$sql = "SELECT
FROM " . USERS_TABLE ." u
WHERE p.poster_id
AND p.poster_ip
GROUP BY
ORDER BY
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : totally erc ---------------------------------------------------------
//-- add
$sql = str_replace('SELECT ', 'SELECT u.user_level, u.user_whosonline_color, ', $sql);
//-- fin mod : totally erc -----------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
'SHOUT_USERNAME' =>
#
#-----[ REPLACE WITH ]----------------------------------------
#
//-- mod : totally erc ---------------------------------------------------------
//-- delete
/*-MOD
'SHOUT_USERNAME' => $shout_username,
MOD-*/
//-- add
'SHOUT_USERNAME' => ( $id == ANONYMOUS ) ? $lang['Guest'] : $erc->get_colors($row, $row['username']),
//-- fin mod : totally erc -----------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$shout_username = ( $user_id == ANONYMOUS ) ?
#
#-----[ REPLACE WITH ]----------------------------------------
#
//-- mod : totally erc ---------------------------------------------------------
//-- delete
/*-MOD
$shout_username = ( $user_id == ANONYMOUS ) ? (( $shout_row['shout_username'] == '' ) ? $lang['Guest'] : $shout_row['shout_username'] ) : "<a href='".append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=".$shout_row['shout_user_id'])."' target='_top'>".$shout_row['username']."</a>" ;
MOD-*/
//-- add
$style_color = $erc->get_colors($shout_row);
$shout_username = ($user_id != ANONYMOUS) ? '<a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $shout_row['shout_user_id']) . '" target="_top"' . $style_color . '>' : '';
$shout_username .= ($user_id != ANONYMOUS) ? $shout_row['username'] : (($shout_row['shout_username'] != '') ? $shout_row['shout_username'] : $lang['Guest'] );
$shout_username .= ($user_id != ANONYMOUS) ? '</a>' : '';
//-- fin mod : totally erc -----------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
shoutbox_view.php
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$sql = "SELECT s.*
WHERE s.shout_user_id
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : totally erc ---------------------------------------------------------
//-- add
$sql = str_replace(', u.username', ', u.username, u.user_level, u.user_whosonline_color', $sql);
//-- fin mod : totally erc -----------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$username = ( $user_id == ANONYMOUS ) ?
#
#-----[ REPLACE WITH ]----------------------------------------
#
//-- mod : totally erc ---------------------------------------------------------
//-- delete
/*-MOD
$username = ( $user_id == ANONYMOUS ) ? (( $shout_row['shout_username'] == '' ) ? $lang['Guest'] : $shout_row['shout_username'] ) : "<a href='".append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=".$shout_row['shout_user_id'])."' target='_top'>".$shout_row['username']."</a>" ;
MOD-*/
//-- add
$style_color = $erc->get_colors($shout_row);
$username = ($user_id != ANONYMOUS) ? '<a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $shout_row['shout_user_id']) . '" target="_top"' . $style_color . '>' : '';
$username .= ($user_id != ANONYMOUS) ? $shout_row['username'] : (($shout_row['shout_username'] != '') ? $shout_row['shout_username'] : $lang['Guest'] );
$username .= ($user_id != ANONYMOUS) ? '</a>' : '';
//-- fin mod : totally erc -----------------------------------------------------
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
dan krijg ik een error
Dit is de regel 121 t/m 123
Code: Selecteer alles
Fatal error: Call to a member function on a non-object in /public_html/forum/shoutbox_view.php on line 121
Code: Selecteer alles
$username = '<a href="' . $config->url('profile', array('mode' => 'viewprofile', POST_USERS_URL => $userdata['user_id']), true) . '" title="' . $user->lang('Read_profile') . '" class="gensmall"' . $shout_color . '">' . $shout_row['username'] . '</a>';
$shout = (! $shout_row['shout_active']) ? $shout_row['shout_text'] : $lang['Shout_censor'];
if ( $board_config['allow_smilies'] && $shout_row['user_allowsmile'] && $shout != '' & $shout_row['enable_smilies'])[/code
Die code werkt alleen als de laatste versie van Totally ERC is geinstalleerd, die te downloaden is op http://www.reddevboard.com in de Antieke mod sectie.
... Maar ik modereer (nog) niet.