[2.0.17] Admins/mods color management

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply

Rating:

Excellent!
29
54%
Very Good
10
19%
Good
4
7%
Fair
6
11%
Poor
5
9%
 
Total votes: 54

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28009
Joined: Sat Aug 16, 2003 7:36 am

[2.0.17] Admins/mods color management

Post by Extensions Robot » Fri Nov 07, 2003 3:50 pm

MOD Name: Admins/mods color management
Author: -=ET=-
MOD Description: This MOD allows to customizing the color of admins' and mods' names displayed in the Who is Online list on the index page, and to apply these new colors to the other places where these names are displayed.


MOD Version: 2.2.0 (Updated 08/04/05)

Download File: a-m_color_management_2.2.0em.zip
mods overview page: View
File Size: 27883 Bytes

Security Score: 0
Last edited by Extensions Robot on Mon Apr 30, 2007 12:31 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric » Wed Nov 12, 2003 10:44 pm

MOD Validated/Released
Eric

quentin
Registered User
Posts: 197
Joined: Tue May 20, 2003 7:30 am
Location: Geneva, Switzerland
Contact:

Post by quentin » Thu Nov 13, 2003 10:05 pm

seems easy seeing what it does, but considering the number of requests for this, it has to be considered useful.

Quentin
The largest message boards on the web !
Web Design Library (coming soon)
Friends sites: Heroes of might and magic - Biometric security

User avatar
-=ET=-
Registered User
Posts: 745
Joined: Sun May 25, 2003 5:32 pm

Re: [2.0.6] Admins/mods color management

Post by -=ET=- » Thu Nov 13, 2003 11:38 pm

MOD Database Manager wrote: ...and to apply this new colors to the other places where this names are displayed.

...and the other places are the: :wink:
  • Forums moderators on the index page
    Image
  • Last Post column on the index page
    Image
  • Newest registered user on the index page
    Image
  • Forums moderators & users browsing this forum on the viewforum page
    Image
  • Author & Last Post column on the viewforum page
    Image
  • Username on the viewtopic page
    Image
  • Username column on the memberlist page
    Image
  • Author & Last Post column on the search by topic page
    Image
  • Author on the search by post page
    Image
  • Users who have visited this site today list of the Last visit >=1.2.5 MOD
  • Username column on the topic_view_users page of the Who viewed a topic >= 1.0.0 MOD
  • Author & Last Post column on the viewforum page of the Global announcement >= 1.2.8 MOD
  • Top Posting Members list on the index page of the Top X posters >=1.0.1 MOD
To change the colors, go to the Administration Panel > Styles Admin > Management > Edit > Font colour 5 (for admins) & Font colour 6 (for mods)...
Image
Last edited by -=ET=- on Sat Sep 17, 2005 10:54 am, edited 3 times in total.
Eternal newbie

gfmorris
Registered User
Posts: 67
Joined: Wed Jan 22, 2003 10:15 pm

Post by gfmorris » Tue Nov 18, 2003 11:46 pm

I'm having issues with the following:

Code: Select all


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

#
#-----[ FIND ]------------------------------------------------
#
$theme['fontcolor3'] .

#
#-----[ IN-LINE FIND ]----------------------------------------
#
'fontcolor3'

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
'fontcolor5'

#
#-----[ FIND ]------------------------------------------------
#
$theme['fontcolor2'] .

#
#-----[ IN-LINE FIND ]----------------------------------------
#
'fontcolor2'

#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
'fontcolor6'

#
#-----[ FIND ]------------------------------------------------
#
$theme['fontcolor3'] .

#
#-----[ IN-LINE FIND ]----------------------------------------
#
'fontcolor3'

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
'fontcolor5'

#
#-----[ FIND ]------------------------------------------------
#
$theme['fontcolor2'] .

#
#-----[ IN-LINE FIND ]----------------------------------------
#
'fontcolor2'

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
'fontcolor6'

#
#-----[ FIND ]------------------------------------------------
#
'T_FONTCOLOR3'

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Admins/mods color management MOD
'T_FONTCOLOR5' => '#'.$theme['fontcolor5'],
'T_FONTCOLOR6' => '#'.$theme['fontcolor6'],
// End add - Admins/mods color management MOD

EasyMOD crunches when it gets to this point.

includes/page_header.php only has the following that look like the FIND:


Code: Select all

        'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
        'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
        'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
        'T_SPAN_CLASS1' => $theme['span_class1'],
        'T_SPAN_CLASS2' => $theme['span_class2'],
        'T_SPAN_CLASS3' => $theme['span_class3'],
Is that what is to be changed?

GFM
--
Geof F. Morris

User avatar
-=ET=-
Registered User
Posts: 745
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- » Wed Nov 19, 2003 12:32 am

gfmorris wrote: EasyMOD crunches when it gets to this point.

What is exactly your EM error message because in what you said there is no issue.

If you have that...

Code: Select all

        'T_FONTCOLOR1' => '#'.$theme['fontcolor1'], 
        'T_FONTCOLOR2' => '#'.$theme['fontcolor2'], 
        'T_FONTCOLOR3' => '#'.$theme['fontcolor3'], 
        'T_SPAN_CLASS1' => $theme['span_class1'], 
        'T_SPAN_CLASS2' => $theme['span_class2'], 
        'T_SPAN_CLASS3' => $theme['span_class3'], 
EM will find 'T_FONTCOLOR3' in the 3rd line, and add these lines after this 3rd line:

Code: Select all

// Start add - Admins/mods color management MOD 
'T_FONTCOLOR5' => '#'.$theme['fontcolor5'], 
'T_FONTCOLOR6' => '#'.$theme['fontcolor6'], 
// End add - Admins/mods color management MOD 
FYI, EM is not only able to proceed FINDs on parts of code lines, but it's also one of the request of the future EMC MOD rules to respect...
http://area51.phpbb.com/phpBB22/viewtop ... 25&t=12339
http://area51.phpbb.com/phpBB22/viewtop ... 8964#78964
Eternal newbie

gfmorris
Registered User
Posts: 67
Joined: Wed Jan 22, 2003 10:15 pm

Post by gfmorris » Wed Nov 19, 2003 2:30 pm

The exact error is:
Critical Error

FIND FAILED: In file [includes/page_header.php] could not find:

$theme['fontcolor3'] .

MOD script line #263


The trailing period seems to be causing an issue, as it is not in the file.

GFM
--
Geof F. Morris

netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic » Wed Nov 19, 2003 2:35 pm

gfmorris wrote: The trailing period seems to be causing an issue, as it is not in the file.

Just remove it from the instructions, it should work after that.
Defend the game:
Image

User avatar
-=ET=-
Registered User
Posts: 745
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- » Wed Nov 19, 2003 2:48 pm

gfmorris wrote: The trailing period...

I'm sorry, what is the "trailing period"? :oops:

Anyway, these instructions are correct for a vanilla 2.0.4->2.0.6 phpBB, so are you sure no MOD have already replaced "$theme['fontcolor3'] ." in these lines of includes/page_header.php?

Code: Select all

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'] . '"';
}
What is your phpBB version?

P.S.: The second group of lines for the second replacement is this one (but your error is on the lines above, not on these ones)...

Code: Select all

'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span style="color:#' . $theme['fontcolor3'] . '">', '</span>'),
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'),
Eternal newbie

gfmorris
Registered User
Posts: 67
Joined: Wed Jan 22, 2003 10:15 pm

Post by gfmorris » Wed Nov 19, 2003 5:12 pm

I see what happened ... one of the other admins had hacked in colors, probably based on something he's seen here on how you make the change on index.php but not site-wide.

I'll go fix the code and then apply the MOD.

GFM
--
Geof F. Morris

gfmorris
Registered User
Posts: 67
Joined: Wed Jan 22, 2003 10:15 pm

Post by gfmorris » Wed Nov 19, 2003 5:25 pm

... and it worked.

/me goes to whack a fellow admin ;)
--
Geof F. Morris

User avatar
-=ET=-
Registered User
Posts: 745
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- » Wed Nov 19, 2003 5:29 pm

gfmorris wrote: ... and it worked.

Cool! Image
Eternal newbie

nitropowered
Registered User
Posts: 3
Joined: Thu Nov 27, 2003 5:05 am

Post by nitropowered » Thu Nov 27, 2003 5:08 am

Does this mod only work of Admins or Mod's or can they work for a group, for example, paid members or special users?

User avatar
-=ET=-
Registered User
Posts: 745
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- » Thu Nov 27, 2003 11:55 am

I'm sorry, it works only for admins and mods.
Eternal newbie

nitropowered
Registered User
Posts: 3
Joined: Thu Nov 27, 2003 5:05 am

Post by nitropowered » Thu Nov 27, 2003 5:09 pm

would it be possible in a future or seperate release? I really don't know how hard it is to implement but i understand if its not possible. I really like to give props to people that donate money to run my site.

Post Reply

Return to “[2.0.x] MOD Database Releases”