Users of the day and color groups Posted:
Wed Mar 19, 2008 10:48 am |
|
|
|
|
|
I use both of them, but here is the problem, in the users of the day list
it doesn't show the color I singed for the member.
I got a screen shot so you can see it, and here is the modifications I made,,,
Color Group
| Code:
|
################################################################
## 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.
################################################################
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ UPLOAD ]------------------------------------------
# If you are having trouble understanding this section, read
# the goodies/understanding_upload.txt file.
#
nivisec_install.php to modules/Forums
admin/admin_color_groups.php to modules/Forums/admin/
language/lang_english/lang_color_groups.php to modules/Forums/language/lang_english/
includes/functions_color_groups.php to includes/
templates/subSilver/admin/*.* to modules/Forums/templates/subSilver/admin/
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ RUN ]------------------------------------------
#
http://www.yourdomain.com/modules.php?name=Forums&file=nivisec_install
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
includes/constants.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
define('CATEGORIES_TABLE', $prefix.'_bbcategories');
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ AFTER, ADD ]------------------------------------------
#
define('COLOR_GROUPS_TABLE', $prefix.'_bbcolor_groups');
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
modules/Forums/index.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
//
// End session management
//
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ AFTER, ADD ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);
color_groups_setup_list();
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a>' . $forum_data[$j]['username'] . '</a> ';
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</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']);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
modules/Forums/templates/subSilver/index_body.tpl or if you use a combined theme use themes/YOUR_THEME/forums/index_body.tpl
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
[ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
{COLOR_GROUPS_LIST}
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
includes/page_header.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
if (defined('SHOW_ONLINE'))
{
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ AFTER, ADD ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ 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>' . $row['username'] . '</a>';
$logged_visible_online++;
}
else
{
$user_online_link = '<a><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
}
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
$user_online_link = color_group_colorize_name($row['user_id']);
if ( $row['user_allow_viewonline'] )
{
$logged_visible_online++;
}
else
{
$logged_hidden_online++;
}
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
modules/Forums/viewonline.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
$username = $row['username'];
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$username = '<b>' . $username . '</b>';
}
else if ( $row['user_level'] == MOD )
{
$username = '<b>' . $username . '</b>';
}
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);
$username = color_group_colorize_name($user_id, true);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
modules/Forums/viewtopic.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
include('includes/bbcode.php');
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ AFTER, ADD ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
'POSTER_NAME' => $poster,
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
'POSTER_NAME' => ($poster_name = color_group_colorize_name($poster_id, true)) ? $poster_name : $poster,
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
modules/Members_List/index.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ AFTER, ADD ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
'USERNAME' => $username,
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
'USERNAME' => color_group_colorize_name($user_id, true),
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
modules/Private_Messages/index.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
include('includes/functions_post.php');
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ AFTER, ADD ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
$username_from = $privmsg['username_1'];
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
$username_from = color_group_colorize_name($privmsg['user_id_1'], true);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
$username_to = $privmsg['username_2'];
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
$username_to = color_group_colorize_name($privmsg['user_id_2'], true);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
'FROM' => $msg_username,
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
'FROM' => color_group_colorize_name($msg_userid, true),
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ OPEN ]------------------------------------------
#
modules/Forums/viewforum.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ AFTER, ADD ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
$moderators[] = '<a>' . $row['username'] . '</a>';
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ REPLACE WITH ]------------------------------------------
#
$moderators[] = color_group_colorize_name($row['user_id']);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ FIND ]------------------------------------------
#
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a>' : '';
$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>' : '';
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</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']);
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ SAVE & CLOSE ALL FILES ]--------------------------
#
<a href="modules.php?name=Forums&file=search&search_keywords=End&mode=results">#End</a>
|
and Users of the day
| Code:
|
########################################################
##
## MOD Title: Users of the day
## MOD Version: 2.1
## Author: ZoZo <zozo>
##
## Description:
## Displays, under the online users list, a list of the registered users
## who have visited during the last XX hours. Can also display the list
## of the users who didn't come. (see "Edit below")
##
## Installation Level: easy
## Installation Time: 2-3 minutes
##
## Files To Edit: 3
## - /templates/subSilver/index_body.tpl
## - /language/lang_english/lang_main.php
## - /includes/page_header.php
##
## Included Files: None
##
########################################################
## VERSION HISTORY:
##
## October 22th 2004: v2.1
## 1. Now admins are displayed first, then mods then users.
## 2. Corrected a problem in the text file with Easy Mod Installer.
##
## June 20th 2003: v2.0
## 1. The list's delay is customizable, but you must give a number in hours, 24 by default.
## 2. There's now a counter for each list.
## 3. The MOD doesn't display the list of the users who didn't visit by default.
##
## October 28th 2002: v1.1
## 1. The MOD uses the database variable "user_session_time" instead of "user_lastvisit", which is updated only when the user logs out.
##
## October 15th 2002: v1.0
## 1. Created main features.
##
########################################################
## TODO LIST:
##
## 1. Don't restrict the time unit to hours.
##
########################################################
## PLEASE REPORT ANY BUGS OR SUGGESTIONS ##
########################################################
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: open ]---------------------------------
#
/templates/subSilver/index_body.tpl
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: find ]---------------------------------
#
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}"></td>
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: replace by ]---------------------------
#
<td class="row1" align="center" valign="middle" rowspan="3"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}"></td>
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: find ]---------------------------------
#
<td class="row1" align="left"><span>{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br>{RECORD_USERS}<br>{LOGGED_IN_USER_LIST}</span></td>
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: add after ]----------------------------
#
</tr>
<tr>
<td class="row1" align="left"><span>{USERS_OF_THE_DAY_LIST}</span></td>
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: repeat for all templates ]-------------
#
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: open ]--------------------------------
#
/language/lang_english/lang_main.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: find ]--------------------------------
#
$lang['Registered_users'] = 'Registered Users:';
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: add before ]--------------------------
#
$lang['Day_users'] = '%d registered users visit during the last %d hours:';
$lang['Not_day_users'] = '%d registered users <span>DIDN\'T</span> visit during the last %d hours:';
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: repeat for all languages ]------------
#
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: open ]--------------------------------
#
/includes/page_header.php
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: find ]--------------------------------
#
'LOGGED_IN_USER_LIST' => $online_userlist,
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: add after ]---------------------------
#
'USERS_OF_THE_DAY_LIST' => $day_userlist,
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: find ]--------------------------------
#
//
// Obtain number of new private messages
// if user is logged in
//
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: add before ]--------------------------
#
//
// Users of the day MOD
//
// ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY IF(user_level=1,3,user_level) DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;
while( $row = $db->sql_fetchrow($result) )
{
$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_day_link = '<a>' . $row['username'] . '</a>';
}
else
{
$user_day_link = '<a><i>' . $row['username'] . '</i></a>';
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
{
$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$day_users++;
}
else
{
$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
$not_day_users++;
}
}
}
$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;
$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;
if ( $display_not_day_userlist )
{
$day_userlist .= '<br>' . $not_day_userlist;
}
//
// End of MOD
//
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: save/close all ]----------------------
#
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: upload the modified files ]-----------
#
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ ACTION: enjoy ]-------------------------------
#
#
<a href="modules.php?name=Forums&file=search&search_keywords=-----&mode=results">#-----</a>[ PLEASE REPORT ANY BUGS OR SUGGESTIONS]--------
#
|
I really Hope you guys can help me on this one, I don't like my forums to look weird
Thank you all in advance
| Description: |
|
| Filesize: |
87.81 KB |
| Viewed: |
38 Time(s) |

|
|
|
|
|