Clan Adverts

www.idevaffiliate.com/31216/idevaffiliate.php?id=203_0_1_3

 

www.clan-themes.co.uk :: View topic - Users of the day and color groups

 Welcome To Clan Themes 

As the board grows please remember the Search Option and we hope you find our community useful.

We also monitor Private Messages to stop members from abusing our sites system.
If you are asking for assistance please provide your site link and nuke version, Thanks.

Users of the day and color groups
Goto page 1, 2  Next

19 Replies / 1572 Views


Post new topic   Reply to topic  

   www.clan-themes.co.uk Forum Index » Bugs/Issues

View previous topic :: View next topic


blackfox_us
Reputation: 277.7
votes: 1
Local time: 7:49 AM

blank.gif

Status: Offline
0.52 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Oct 04, 2007
Last Visit: 30 Jun 2008
Posts: 143
Points: 3848 

Post 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.
################################################################
#
#-----[ 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/

#
#-----[ RUN ]------------------------------------------
#
http://www.yourdomain.com/modules.php?name=Forums&file=nivisec_install

#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#
define('CATEGORIES_TABLE', $prefix.'_bbcategories');

#
#-----[ AFTER, ADD ]------------------------------------------
#
define('COLOR_GROUPS_TABLE', $prefix.'_bbcolor_groups');

#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/index.php

#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//

#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once('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>' . $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 ]------------------------------------------
#
modules/Forums/templates/subSilver/index_body.tpl or if you use a combined theme use themes/YOUR_THEME/forums/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('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>' . $row['username'] . '</a>';
               $logged_visible_online++;
            }
            else
            {
               $user_online_link = '<a><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 ]------------------------------------------
#
modules/Forums/viewonline.php

#
#-----[ 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>';
         }

#
#-----[ REPLACE WITH ]------------------------------------------
#
         include_once('includes/functions_color_groups.'.$phpEx);
         $username = color_group_colorize_name($user_id, true);

#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
include('includes/bbcode.php');

#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once('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 ]------------------------------------------
#
modules/Members_List/index.php

#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);

#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);

#
#-----[ FIND ]------------------------------------------
#
         'USERNAME' => $username,

#
#-----[ REPLACE WITH ]------------------------------------------
#
         'USERNAME' => color_group_colorize_name($user_id, true),
         
#
#-----[ OPEN ]------------------------------------------
#
modules/Private_Messages/index.php

#
#-----[ FIND ]------------------------------------------
#
include('includes/functions_post.php');

#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once('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 ]------------------------------------------
#
modules/Forums/viewforum.php

#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);

#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once('includes/functions_color_groups.'.$phpEx);

#
#-----[ FIND ]------------------------------------------
#
   $moderators[] = '<a>' . $row['username'] . '</a>';

#
#-----[ REPLACE WITH ]------------------------------------------
#
   $moderators[] = color_group_colorize_name($row['user_id']);
   
#
#-----[ 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>' : '';

#
#-----[ 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


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       ##
########################################################

#
#-----[ ACTION: open ]---------------------------------
#
/templates/subSilver/index_body.tpl
#
#-----[ ACTION: find ]---------------------------------
#
   <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}"></td>
#
#-----[ 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>
#
#-----[ 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>
#
#-----[ ACTION: add after ]----------------------------
#
  </tr>
  <tr>
   <td class="row1" align="left"><span>{USERS_OF_THE_DAY_LIST}</span></td>
#
#-----[ ACTION: repeat for all templates ]-------------
#



#
#-----[ ACTION: open ]--------------------------------
#
/language/lang_english/lang_main.php
#
#-----[ ACTION: find ]--------------------------------
#
$lang['Registered_users'] = 'Registered Users:';
#
#-----[ 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:';
#
#-----[ ACTION: repeat for all languages ]------------
#



#
#-----[ ACTION: open ]--------------------------------
#
/includes/page_header.php
#
#-----[ ACTION: find ]--------------------------------
#
   'LOGGED_IN_USER_LIST' => $online_userlist,
#
#-----[ ACTION: add after ]---------------------------
#
   'USERS_OF_THE_DAY_LIST' => $day_userlist,
#
#-----[ ACTION: find ]--------------------------------
#
//
// Obtain number of new private messages
// if user is logged in
//
#
#-----[ 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
//



#
#-----[ ACTION: save/close all ]----------------------
#

#
#-----[ ACTION: upload the modified files ]-----------
#

#
#-----[ ACTION: enjoy ]-------------------------------
#

#
#-----[ 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

color problem.JPG
 Description:
 Filesize:  87.81 KB
 Viewed:  18 Time(s)

color problem.JPG


 

 
View user's profileSend private messageSend e-mail Reply with quote

Aerox
Reputation: 466.1
Local time: 8:49 AM


Status: Offline
0.03 posts per day
Medals: 0
Site Helper
Site Helper
Joined: Dec 19, 2006
Last Visit: 28 Apr 2008
Posts: 18
Points: 971 

Post Users of the day and color groups Posted: Wed Mar 19, 2008 1:49 pm   

If you have assigned a color for just a regular member with no title etc. you must assign them the color just like you would for any other color group via your fcp. Once you have done that it will show your color that you have created in the Auc for each default member instead of the default color.
 

 
View user's profileSend private message Reply with quote

blackfox_us
Reputation: 277.7
votes: 1
Local time: 7:49 AM

blank.gif

Status: Offline
0.52 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Oct 04, 2007
Last Visit: 30 Jun 2008
Posts: 143
Points: 3848 

Post Re: Users of the day and color groups Posted: Wed Mar 19, 2008 1:58 pm   

I honestly didn't understand everything you said, but I remade the groups and still no change.
 

 
View user's profileSend private messageSend e-mail Reply with quote

Aerox
Reputation: 466.1
Local time: 8:49 AM


Status: Offline
0.03 posts per day
Medals: 0
Site Helper
Site Helper
Joined: Dec 19, 2006
Last Visit: 28 Apr 2008
Posts: 18
Points: 971 

Post Users of the day and color groups Posted: Wed Mar 19, 2008 2:02 pm   

Ok what color group is not showing from the screen shot you supplied it seems to be working just fine except for default members
 

 
View user's profileSend private message Reply with quote




blackfox_us
Reputation: 277.7
votes: 1
Local time: 7:49 AM

blank.gif

Status: Offline
0.52 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Oct 04, 2007
Last Visit: 30 Jun 2008
Posts: 143
Points: 3848 

Post Re: Users of the day and color groups Posted: Wed Mar 19, 2008 2:07 pm   

I might not explained it right,,, I always do though.

Ok lets see if I can do it better
On the screen shot it shows me logged in, as Handsome_Devil with the dark red Color, but if you look at at the Users of the day it shows me - Handsome_Devil - with a different color, the default color of phpbb
 

 
View user's profileSend private messageSend e-mail Reply with quote

Aerox
Reputation: 466.1
Local time: 8:49 AM


Status: Offline
0.03 posts per day
Medals: 0
Site Helper
Site Helper
Joined: Dec 19, 2006
Last Visit: 28 Apr 2008
Posts: 18
Points: 971 

Post Users of the day and color groups Posted: Wed Mar 19, 2008 2:36 pm   

you need to change the admin/moderator phpbb colors to reflect the Auc Color you assigned. Use this Readme file included

phpbbcolors.zip
 Description:

Download
 Filename:  phpbbcolors.zip
 Filesize:  1.86 KB
 Downloaded:  14 Time(s)

 

 
View user's profileSend private message Reply with quote

Ped
Reputation: 450.3
votes: 17
Local time: 1:49 PM
Location: Great British Empire
uk.gif

Status: Offline
2.93 posts per day
Medals: 2 (View more...)
Forums MoD (Amount: 1)
Clan Themes Theme Guru
Clan Themes Theme Guru
Joined: Nov 13, 2006
Last Visit: 04 Jul 2008
Posts: 1759
Points: 8422 

Post Re: Users of the day and color groups Posted: Wed Mar 19, 2008 5:00 pm   

Cheers for helpin Aerox

I keep meaning to catch up with you Dont Know
 

 
View user's profileSend private messageSend e-mail Reply with quote

blackfox_us
Reputation: 277.7
votes: 1
Local time: 7:49 AM

blank.gif

Status: Offline
0.52 posts per day
Medals: 1 (View more...)
Site Supporter (Amount: 1)

Joined: Oct 04, 2007
Last Visit: 30 Jun 2008
Posts: 143
Points: 3848 

Post Users of the day and color groups Posted: Wed Mar 19, 2008 7:51 pm   

Really thank for trying to help me, but thats not my problem
I could use what you gave me and change the colors, but I made like 6 color groups in my forums, and using your way going to fix only one,
 

 
View user's profileSend private messageSend e-mail Reply with quote




Aerox
Reputation: 466.1
Local time: 8:49 AM


Status: Offline
0.03 posts per day
Medals: 0
Site Helper
Site Helper
Joined: Dec 19, 2006
Last Visit: 28 Apr 2008
Posts: 18
Points: 971