Last visit Mod mit Color Group Mod verbinden! Dringend!
Verfasst: 09.05.2006 23:56
Hallo nochmal,
ich habe den Group Color Mod und habe auch allen eine andere Farbe zugewiesen. Doch im Last visit Mod ist die alte Farbe da leider. Wir haben jemanden als Therapeut und der sollte Pink sein, ist aber grün, weil er ja Moderator ist. Das ist nervig.
Ich habe den Code aus der Index Datei mal rauskopiert und unten füge ich den Mode Code ein.
und noch einen in der Index.php
So und hier nun der Hack:
Bitte helft mir, ich werde noch irre dabei
Danke
ich habe den Group Color Mod und habe auch allen eine andere Farbe zugewiesen. Doch im Last visit Mod ist die alte Farbe da leider. Wir haben jemanden als Therapeut und der sollte Pink sein, ist aber grün, weil er ja Moderator ist. Das ist nervig.
Ich habe den Code aus der Index Datei mal rauskopiert und unten füge ich den Mode Code ein.
Code: Alles auswählen
// Start add - Last visit MOD
$time_now=time();
$time1Hour=$time_now-3600;
$minutes = date('is', $time_now);
$hour_now = $time_now - (60*($minutes[0].$minutes[1])) - ($minutes[2].$minutes[3]);
$dato=create_date('H', $time_now,$board_config['board_timezone']);
$timetoday = $hour_now - (3600*$dato);
$sql = 'SELECT session_ip, MAX(session_time) as session_time FROM '.SESSIONS_TABLE.' WHERE session_user_id="'.ANONYMOUS.'" AND session_time >= '.$timetoday.' AND session_time< '.($timetoday+86399).' GROUP BY session_ip';
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve guest user today data", "", __LINE__, __FILE__, $sql);
while( $guest_list = $db->sql_fetchrow($result))
{
if ($guest_list['session_time'] >$time1Hour) $users_lasthour++;
}
$guests_today = $db->sql_numrows($result);
$sql = 'SELECT user_id,username,user_allow_viewonline,user_level,user_lastlogon FROM ' . USERS_TABLE . ' WHERE user_id!="'.ANONYMOUS.'" AND user_session_time >= '.$timetoday.' AND user_session_time< '.($timetoday+86399).' ORDER BY username';
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve user today data", "", __LINE__, __FILE__, $sql);
while( $todayrow = $db->sql_fetchrow($result))
{
$style_color = "";
if ($todayrow['user_lastlogon']>=$time1Hour)
{
$users_lasthour++;
}
switch ($todayrow['user_level'])
{
case ADMIN :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
}
$users_today_list.=( $todayrow['user_allow_viewonline'])?' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $todayrow['user_id']) . '"' . $style_color .'>' . $todayrow['username'] . '</a>,' : (($userdata[user_level]==ADMIN) ? ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $todayrow['user_id']) . '"' . $style_color .'><i>' . $todayrow['username'] . '</i></a>,' : '');
if (!$todayrow['user_allow_viewonline']) $logged_hidden_today++;
else $logged_visible_today++;
}
if ($users_today_list)
{
$users_today_list[ strlen( $users_today_list)-1] = ' ';
} else
{
$users_today_list = $lang['None'];
}
$total_users_today = $db->sql_numrows($result)+$guests_today;
$users_today_list = $lang['Registered_users'].' ' . $users_today_list;
$l_today_user_s = ($total_users_today) ? ( ( $total_users_today == 1 )? $lang['User_today_total'] : $lang['Users_today_total'] ) : $lang['Users_today_zero_total'];
$l_today_r_user_s = ($logged_visible_today) ? ( ( $logged_visible_today == 1 ) ? $lang['Reg_user_total'] : $lang['Reg_users_total'] ) : $lang['Reg_users_zero_total'];
$l_today_h_user_s = ($logged_hidden_today) ? (($logged_hidden_today == 1) ? $lang['Hidden_user_total'] : $lang['Hidden_users_total'] ) : $lang['Hidden_users_zero_total'];
$l_today_g_user_s = ($guests_today) ? (($guests_today == 1) ? $lang['Guest_user_total'] : $lang['Guest_users_total']) : $lang['Guest_users_zero_total'];
$l_today_users = sprintf($l_today_user_s, $total_users_today);
$l_today_users .= sprintf($l_today_r_user_s, $logged_visible_today);
$l_today_users .= sprintf($l_today_h_user_s, $logged_hidden_today);
$l_today_users .= sprintf($l_today_g_user_s, $guests_today);
// End add - Last visit MOD
Code: Alles auswählen
// Start add - Last visit MOD
'USERS_TODAY_LIST' => $users_today_list,
'L_USERS_LASTHOUR' =>($users_lasthour)?sprintf($lang['Users_lasthour_explain'],$users_lasthour):$lang['Users_lasthour_none_explain'],
'L_USERS_TODAY' =>$l_today_users,
// End add - Last visit MOD
Code: Alles auswählen
################################################################
## COLOR GROUPS ##
## 1.2.0 ##
################################################################
##
## Description: This mod will replace the current
## name colorization with a group
## system. You may define your group
## name, group color, and group members.
##
## Compatibility: phpBB - 2.0.4 - 2.0.6
## php - 4.0.1 or above
################################################################
## This hack brought to you by donation support from Kozy. ##
## Visit him at Kozy Net (http://www.kozysplace.net) to ##
## offer your thanks. ##
################################################################
****************************************************************
** Author: Nivisec (support@nivisec.com) **
** http://www.nivisec.com **
** **
** Language **
** Files At: http://www.nivisec.com/phpbb.php?l=la **
****************************************************************
################################################################
## Installation Level: Fairly Easy
## Installation Time: 10-15 minutes
##
## Author Notes:
## Once installed, you will have a new admin panel
## option called "Color Groups" under the "Group Admin"
## area.
##
## Support: http://www.phpbbhacks.com/forums
## Copyright: ©2002-2003 Nivisec.com
##
################################################################
## ********* UPDATING *********
## Please see the goodies/updating/ directory
## for information on upgrading from a previous
## version.
################################################################
#
#-----[ UPLOAD ]------------------------------------------
# If you are having trouble understanding this section, read
# the goodies/understanding_upload.txt file.
#
nivisec_install.php to /
nivisec_schema/*.* to nivisec_schema/
admin/admin_color_groups.php to admin/
language/lang_english/lang_color_groups.php to language/lang_english/
includes/functions_color_groups.php to includes/
templates/subSilver/admin/*.* to templates/subSilver/admin/
#
#-----[ RUN ]------------------------------------------
#
nivisec_install.php
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('CATEGORIES_TABLE', $table_prefix.'categories');
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('COLOR_GROUPS_TABLE', $table_prefix.'color_groups');
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
color_groups_setup_list();
#
#-----[ FIND ]------------------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
#
#-----[REPLACE WITH ]------------------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : color_group_colorize_name($forum_data[$j]['user_id']);
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
[ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]
#
#-----[ REPLACE WITH ]------------------------------------------
#
{COLOR_GROUPS_LIST}
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
if (defined('SHOW_ONLINE'))
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
$logged_visible_online++;
}
else
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
$user_online_link = color_group_colorize_name($row['user_id']);
if ( $row['user_allow_viewonline'] )
{
$logged_visible_online++;
}
else
{
$logged_hidden_online++;
}
#
#-----[ OPEN ]------------------------------------------
#
viewonline.php
#
#-----[ FIND ]------------------------------------------
#
$username = $row['username'];
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$username = '<b style="color:#' . $theme['fontcolor3'] . '">' . $username . '</b>';
}
else if ( $row['user_level'] == MOD )
{
$username = '<b style="color:#' . $theme['fontcolor2'] . '">' . $username . '</b>';
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
$username = color_group_colorize_name($user_id, true);
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
'POSTER_NAME' => $poster,
#
#-----[ REPLACE WITH ]------------------------------------------
#
'POSTER_NAME' => ($poster_name = color_group_colorize_name($poster_id, true)) ? $poster_name : $poster,
#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
'USERNAME' => $username,
#
#-----[ REPLACE WITH ]------------------------------------------
#
'USERNAME' => color_group_colorize_name($user_id, true),
#
#-----[ OPEN ]------------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
$username_from = $privmsg['username_1'];
#
#-----[ REPLACE WITH ]------------------------------------------
#
$username_from = color_group_colorize_name($privmsg['user_id_1'], true);
#
#-----[ FIND ]------------------------------------------
#
$username_to = $privmsg['username_2'];
#
#-----[ REPLACE WITH ]------------------------------------------
#
$username_to = color_group_colorize_name($privmsg['user_id_2'], true);
#
#-----[ FIND ]------------------------------------------
#
'FROM' => $msg_username,
#
#-----[ REPLACE WITH ]------------------------------------------
#
'FROM' => color_group_colorize_name($msg_userid, true),
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
$moderators[] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$moderators[] = color_group_colorize_name($row['user_id']);
#
#-----[ FIND ]------------------------------------------
#
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';
#
#-----[ REPLACE WITH ]------------------------------------------
#
$topic_author = ($topic_rowset[$i]['user_id'] == ANONYMOUS ) ? (($topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] ) : color_group_colorize_name($topic_rowset[$i]['user_id']);
#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#End

Danke