[BETA] Admin color mod
Geplaatst: 05 jan 2007, 16:46
het is mijn eerste, Hij is nog niet helemaal klaar.
Mischien kunnen jullie er al over oordelen over de code:
voorbeeld: klik hier
mod wordt nu ook gevalideerd door phpbb.com en daari n de mods database gestopt
Mischien kunnen jullie er al over oordelen over de code:
voorbeeld: klik hier
Code: Selecteer alles
##############################################################
## MOD Title: [BETA]Admin color mod
## MOD Author: Mattle < mattle@live.nl > (Mattias te Wierik) -
## MOD Description: this mod make the background of admin or mod message in a topic the same colour as those from the viewonlinebox.
## MOD Version: 0.0.1
##
## Installation Level: Easy
## Installation Time: 8 minutes
## Files To Edit: viewtopic.php
## templates/subSilver/viewtopic_body.tpl
## templates/subSilver/subSilver.css
## Included Files:
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
## Generator: Phpbb.ModTeam.Tools
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes: [BETA]
## First release
##############################################################
## MOD History:
##
## 2007-01-05 - Version 0.0.1
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
SELECT u.username, u.user_id,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
u.user_level,
#
#-----[ FIND ]------------------------------------------
#
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// BEGIN Admin color message
// We go check is the user that post the message is a admin or a MODERATOR
if( $postrow[$i]['user_level'] == ADMIN )
{
$messagecolor = "messagecoloradmin";
}
elseif ( $postrow[$i]['user_level'] == MOD )
{
$messagecolor = "messagecolormod";
}
else
{
$messagecolor = "message_color_normal";
}
// END Admin color message
#
#-----[ FIND ]------------------------------------------
#
'MESSAGE' => $message,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'MESSAGE_COLOR' => $message_color,
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name">
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.ROW_CLASS}
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
{postrow.MESSAGE_COLOR}
#
#-----[ FIND ]------------------------------------------
#
<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="top">
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.ROW_CLASS}
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
#
#-----[ FIND ]------------------------------------------
#
<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle">
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.ROW_CLASS}
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
#
#-----[ FIND ]------------------------------------------
#
<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap">
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.ROW_CLASS}
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.css
#
#-----[ FIND ]------------------------------------------
#
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("formIE.css");
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// BEGIN Admin color mod
.message_color_admin {
background-color: #FFA34F;
}
.message_color_mod {
background-color: #006600;
}
// END Admin color mod
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM