[2.0.1] Couleurs de fond pour les groupes

Présentation des mods pour la branche Olympus de phpBB

[2.0.1] Couleurs de fond pour les groupes

Messagede Webmaster » Ven 22 Aoû 2008 01:24

  • Titre:Couleurs de fond pour les groupes (Anciennement : Coloriser le fond des messages pour les admins et modos)
  • Auteur: Romain Kowalski
  • Description: Ce MOD permet aux membres de groupes de changer la couleur de fond des messages.
  • Version: 2.0.1
  • Niveau d'installation: Facile
  • Temps d'installation: 10 minutes
  • Téléchargement: Ici
  • Captures d'écran:
    • Image
    • Image
    • Image
  • Notes:
    • la notice d'installation de ce mod se trouve dans Background_colors_for_groups_v2.0.1/install.xml
    • la notice d'installation de la langue française se trouve dans Background_colors_for_groups_v2.0.1/fr.xml
    • la notice d'installation pour subsilver2 se trouve dans Background_colors_for_groups_v2.0.1/subsilver2.xml
Webmaster
Administrateur du site
 
Messages: 40
Inscription: Dim 25 Nov 2007 21:33

Re: [1.0.1] Coloriser le fond des messages des admins et modos

Messagede Webmaster » Ven 19 Sep 2008 18:12

Mise à jour 1.0.0 vers 1.0.1
Motif :
  • Possibilité d'activer ce MOD par message.
  • Les couleurs sont paramétrables dans l'ACP.

SQL :
Code: Tout sélectionner
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('load_cbgm_default', '1', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cbgm_admin_color', 'F6DEE1', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('cbgm_mod_color', 'DEF6E4', 1);
ALTER TABLE phpbb_posts ADD enable_cbgm TINYINT(1) DEFAULT 0;  


Ouvrir posting.php
Trouver
Code: Tout sélectionner
$bbcode_status    = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id)) ? true : false;  

Ajouter avant :
Code: Tout sélectionner
// Begin : Colored background messages for admin and moderators
$cbgm_status    = (($config['load_cbgm_admin'] && $auth->acl_get('a_')) || ($config['load_cbgm_modo'] && $auth->acl_get('m_', $forum_id))) ? true : false;
// End : Colored background messages for admin and moderators     


Trouver
Code: Tout sélectionner
    $post_data['enable_bbcode']        = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;  

Ajouter avant :
Code: Tout sélectionner
// Begin : Colored background messages for admin and moderators
    $post_data['enable_cbgm']        = (isset($_POST['enable_cbgm'])) ? true : false;
// End : Colored background messages for admin and moderators     


Trouver
Code: Tout sélectionner
                'post_approved'            => (isset($post_data['post_approved'])) ? $post_data['post_approved'] : false,  

Ajouter après :
Code: Tout sélectionner
// Begin : Colored background messages for admin and moderators
                'enable_cbgm'            => (bool) $post_data['enable_cbgm'],
// End : Colored background messages for admin and moderators     


Trouver
Code: Tout sélectionner
$bbcode_checked        = (isset($post_data['enable_bbcode'])) ? !$post_data['enable_bbcode'] : (($config['allow_bbcode']) ? !$user->optionget('bbcode') : 1);  

Ajouter avant :
Code: Tout sélectionner
// Begin : Colored background messages for admin and moderators
$cbgm_checked        = (isset($post_data['enable_cbgm'])) ? $post_data['enable_cbgm'] : (($config['load_cbgm_default']) ? $config['load_cbgm_default'] : 0);
// End : Colored background messages for admin and moderators     


Trouver
Code: Tout sélectionner
    'S_BBCODE_ALLOWED'            => $bbcode_status,  

Ajouter avant :
Code: Tout sélectionner
// Begin : Colored background messages for admin and moderators
    'S_CBGM_ALLOWED'            => $cbgm_status,
    'S_CBGM_CHECKED'            => ($cbgm_checked) ? ' checked="checked"' : '',    
// End : Colored background messages for admin and moderators     



Ouvrir viewtopic.php
Trouver
Code: Tout sélectionner
        'foe'                => $row['foe'],  

Ajouter après :
Code: Tout sélectionner
// Begin : Colored background messages for admin and moderators
        'enable_cbgm'        => $row['enable_cbgm'],
// End : Colored background messages for admin and moderators     


Trouver
Code: Tout sélectionner
        'S_POSTER_IS_ADMIN'    => ($config['load_cbgm_admin']) ? $poster_is_admin : false,
        'S_POSTER_IS_MOD'    => ($config['load_cbgm_mod']) ? $poster_is_mod : false

Remplacer par :
Code: Tout sélectionner
        'S_POSTER_IS_ADMIN'    => ($config['load_cbgm_admin'] && $row['enable_cbgm']) ? $poster_is_admin : false,
        'S_POSTER_IS_MOD'    => ($config['load_cbgm_mod'] && $row['enable_cbgm']) ? $poster_is_mod : false


Ouvrir includes/functions.php
Trouver
Code: Tout sélectionner
        'T_THEME_PATH'            => "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme',  

Ajouter avant :
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
        'CBGM_ADMIN_COLOR'        => $config['cbgm_admin_color'],
        'CBGM_MOD_COLOR'        => $config['cbgm_mod_color'],
//End : Colored background messages for admin and moderators     



Ouvrir includes/functions_posting.php
Trouver
Code: Tout sélectionner
                'enable_bbcode'        => $data['enable_bbcode'],  

Ajouter avant :
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
                'enable_cbgm'        => $data['enable_cbgm'],
//End : Colored background messages for admin and moderators     


Trouver
Code: Tout sélectionner
                'enable_bbcode'        => $data['enable_bbcode'],  

Ajouter avant :
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
                'enable_cbgm'        => $data['enable_cbgm'],
//End : Colored background messages for admin and moderators     



Ouvrir includes/acp/acp_board.php
Trouver
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
                        'load_cbgm_admin'    => array('lang' => 'LOAD_CBGM_ADMINS',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
                        'load_cbgm_mod'    => array('lang' => 'LOAD_CBGM_MODOS',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
//End : Colored background messages for admin and moderators             

Remplacer par :
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
                        'legend3'                => 'ACP_LOAD_CBGM',                        
                        
'load_cbgm_default'        => array('lang' => 'LOAD_CBGM_DEFAULT',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
                        'load_cbgm_admin'        => array('lang' => 'LOAD_CBGM_ADMINS',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
                        'cbgm_admin_color'        => array('lang' => 'CBGM_ADMINS_COLOR',    'validate' => 'string',    'type' => 'text:6:6', 'explain' => false),
                        'load_cbgm_mod'            => array('lang' => 'LOAD_CBGM_MODS',    'validate' => 'bool',    'type' => 'radio:yes_no', 'explain' => true),
                        'cbgm_mod_color'        => array('lang' => 'CBGM_MODS_COLOR',    'validate' => 'string',    'type' => 'text:6:6', 'explain' => false),
//End : Colored background messages for admin and moderators     



Ouvrir language/en/posting.php
Trouver
Code: Tout sélectionner

Ajouter avant :
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
$lang = array_merge($lang, array(
    'ENABLE_CBGM'            => 'Change background color for this post',    
));
//End : Colored background messages for admin and moderators     



Ouvrir language/en/acp/board.php
Trouver
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
$lang = array_merge($lang, array(
    'LOAD_CBGM_ADMINS'            => 'Change background color for administrators\' posts.',
    'LOAD_CBGM_ADMINS_EXPLAIN'        => 'When reading a topic, administrators\' background color posts is change.',
    'LOAD_CBGM_MODOS'            => 'Change background color for moderators\' posts.',
    'LOAD_CBGM_MODOS_EXPLAIN'        => 'When reading a topic, moderator\' background color posts is change, if moderators have moderators\' permissions in the current forum.',
));
//End : Colored background messages for admin and moderators     

Remplacer par :
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
$lang = array_merge($lang, array(
    'ACP_LOAD_CBGM'                => 'Colored background for admins and modos MOD settings',    
    
'LOAD_CBGM_DEFAULT'            => 'Enable colored background by default',
    'LOAD_CBGM_DEFAULT_EXPLAIN'    => 'If you enable this option, the MOD will be enabled by defaut : the checkbox in posting.php will be checked by default.',
    'LOAD_CBGM_ADMINS'            => 'Change background color for administrators\' posts',
    'CBGM_ADMINS_COLOR'            => 'Administrators\' messages color',
    'LOAD_CBGM_ADMINS_EXPLAIN'    => 'When reading a topic, administrators\' background color posts is change.',
    'LOAD_CBGM_MODS'            => 'Change background color for moderators\' posts',
    'CBGM_MODS_COLOR'            => 'Moderators\' messages color',
    'LOAD_CBGM_MODS_EXPLAIN'    => 'When reading a topic, moderators\' background color posts is change, if moderators have moderators\' permissions in the current forum.',
));
//End : Colored background messages for admin and moderators     



Ouvrir language/fr/posting.php
Trouver
Code: Tout sélectionner

Ajouter avant :
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
$lang = array_merge($lang, array(
    'ENABLE_CBGM'            => 'Changer la couleur du fond du message',    
));
//End : Colored background messages for admin and moderators     



Ouvrir language/fr/acp/board.php
Trouver
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
$lang = array_merge($lang, array(
    'LOAD_CBGM_ADMINS'            => 'Modifier la couleur de fond des messages des administrateurs.',
    'LOAD_CBGM_ADMINS_EXPLAIN'        => 'Lors de la lecture d\'un sujet, la couleur de fond des messages des administrateurs est modifiée.',
    'LOAD_CBGM_MODOS'            => 'Modifier la couleur de fond des messages des modérateurs.',
    'LOAD_CBGM_MODOS_EXPLAIN'        => 'Lors de la lecture d\'un sujet, la couleur de fond des messages des modérateurs ayant des pouvoirs dans le forum en cours de lecture, est modifiée.',
));
//End : Colored background messages for admin and moderators     

Remplacer par :
Code: Tout sélectionner
//Begin : Colored background messages for admin and moderators
$lang = array_merge($lang, array(
    'ACP_LOAD_CBGM'                => 'Paramètres du MOD de colorisation des messages pour admins et modos',    
    
'LOAD_CBGM_DEFAULT'            => 'Activer la colorisation des messages par défaut',
    'LOAD_CBGM_DEFAULT_EXPLAIN'    => 'Si vous activez cette option, les messages des administrateurs et des modérateurs seront colorés par défaut : la case à cocher sera cochée par défaut dans posting.php',
    'LOAD_CBGM_ADMINS'            => 'Modifier la couleur de fond des messages des administrateurs',
    'CBGM_ADMINS_COLOR'            => 'Couleur des messages des administrateurs',
    'LOAD_CBGM_ADMINS_EXPLAIN'    => 'Lors de la lecture d\'un sujet, la couleur de fond des messages des administrateurs est modifiée.',
    'LOAD_CBGM_MODS'            => 'Modifier la couleur de fond des messages des modérateurs',
    'CBGM_MODS_COLOR'            => 'Couleur des messages des modérateurs',
    'LOAD_CBGM_MODS_EXPLAIN'    => 'Lors de la lecture d\'un sujet, la couleur de fond des messages des modérateurs ayant des pouvoirs dans le forum en cours de lecture, est modifiée.',
));
//End : Colored background messages for admin and moderators     



Ouvrir styles/prosilver/template/overall_header.html
Trouver
Code: Tout sélectionner
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>  

Ajouter avant :
Code: Tout sélectionner
<style type="text/css">
/* Begin : Colored background messages for admin and moderators */
.cbgm_admin    { background-color: #{CBGM_ADMIN_COLOR};}
.cbgm_mod    { background-color: #{CBGM_MOD_COLOR};}
/* End : Colored background messages for admin and moderators */
</style>  



Ouvrir styles/prosilver/template/posting_editor.html
Trouver
Code: Tout sélectionner
            <!-- IF S_BBCODE_ALLOWED -->
                <div><label for="disable_bbcode"><input type="checkbox" name="disable_bbcode" id="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label></div>
            <!-- ENDIF -->  

Ajouter avant :
Code: Tout sélectionner
            <!-- IF S_CBGM_ALLOWED -->            
                
<div><label for="enable_cbgm"><input type="checkbox" name="enable_cbgm" id="enable_cbgm"{S_CBGM_CHECKED} /> {L_ENABLE_CBGM}</label></div>
            <!-- ENDIF -->  



Ouvrir styles/prosilver/template/viewtopic_body.html
Trouver
Code: Tout sélectionner
    <div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_POSTER_IS_ADMIN -->cbgm_admin<!-- ELSEIF postrow.S_POSTER_IS_MOD -->cbgm_modo<!-- ELSE --><!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE --> online<!-- ENDIF -->">  

Remplacer par :
Code: Tout sélectionner
    <div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_POSTER_IS_ADMIN -->cbgm_admin<!-- ELSEIF postrow.S_POSTER_IS_MOD -->cbgm_mod<!-- ELSE --><!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE --> online<!-- ENDIF -->">  



Ouvrir styles/prosilver/theme/colours.css
Trouver
Code: Tout sélectionner
.bg3    { background-color: #cadceb; }
/* Begin : Colored background messages for admin and moderators */
.cbgm_admin    { background-color: #F6DEE1; }
.cbgm_modo    { background-color: #DEF6E4;  }
/* End : Colored background messages for admin and moderators */
  

Remplacer par :
Code: Tout sélectionner
.bg3    { background-color: #cadceb; }     



Ouvrir styles/subsilver2/template/overall_header.html
Trouver
Code: Tout sélectionner
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />  

Ajouter après :
Code: Tout sélectionner
<style type="text/css">
/* Begin : Colored background messages for admin and moderators */
.cbgm_admin    { background-color: #{CBGM_ADMIN_COLOR};}
.cbgm_mod    { background-color: #{CBGM_MOD_COLOR};}
/* End : Colored background messages for admin and moderators */
</style>  



Ouvrir styles/subsilver2/template/posting_body.html
Trouver
Code: Tout sélectionner
        <!-- IF S_BBCODE_ALLOWED -->
            <tr>
                <td><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
                <td class="gen">{L_DISABLE_BBCODE}</td>
            </tr>
        <!-- ENDIF -->  

Ajouter avant :
Code: Tout sélectionner
        <!-- IF S_CBGM_ALLOWED -->            
            
<tr>
                <td><input type="checkbox" class="radio" name="enable_cbgm"{S_CBGM_CHECKED} /></td>
                <td class="gen">{L_ENABLE_CBGM}</td>
            </tr>
        <!-- ENDIF -->  



Ouvrir styles/subsilver2/template/viewtopic_body.html
Trouver
Code: Tout sélectionner
    <!-- IF postrow.S_POSTER_IS_ADMIN --><tr class="cbgm_admin"><!-- ELSEIF postrow.S_POSTER_IS_MOD --><tr class="cbgm_modo"><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --><!-- ENDIF -->  

Remplacer par :
Code: Tout sélectionner
        <!-- IF postrow.S_POSTER_IS_ADMIN --><tr class="cbgm_admin"><!-- ELSEIF postrow.S_POSTER_IS_MOD --><tr class="cbgm_mod"><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --><!-- ENDIF -->  


Trouver
Code: Tout sélectionner
    <!-- IF postrow.S_POSTER_IS_ADMIN --><tr class="cbgm_admin"><!-- ELSEIF postrow.S_POSTER_IS_MOD --><tr class="cbgm_modo"><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --><!-- ENDIF -->  

Remplacer par :
Code: Tout sélectionner
        <!-- IF postrow.S_POSTER_IS_ADMIN --><tr class="cbgm_admin"><!-- ELSEIF postrow.S_POSTER_IS_MOD --><tr class="cbgm_mod"><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --><!-- ENDIF -->  


Trouver
Code: Tout sélectionner
    <!-- IF postrow.S_POSTER_IS_ADMIN --><tr class="cbgm_admin"><!-- ELSEIF postrow.S_POSTER_IS_MOD --><tr class="cbgm_modo"><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --><!-- ENDIF -->  

Remplacer par :
Code: Tout sélectionner
        <!-- IF postrow.S_POSTER_IS_ADMIN --><tr class="cbgm_admin"><!-- ELSEIF postrow.S_POSTER_IS_MOD --><tr class="cbgm_mod"><!-- ELSE --><!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --><!-- ENDIF -->  



Ouvrir styles/prosilver/theme/stylesheet.css
Trouver
Code: Tout sélectionner
.row2 {
    background-color: #DCE1E5;
    padding: 4px;
}
/* Begin : Colored background messages for admin and moderators */
.cbgm_admin {
    background-color: #F6DEE1;
    padding: 4px;
}

.
cbgm_modo {
    background-color: #DEF6E4;
    padding: 4px;
}
/* End : Colored background messages for admin and moderators */  

Remplacer par :
Code: Tout sélectionner
.row2 {
    background-color: #DCE1E5;
    padding: 4px;
}
  
Webmaster
Administrateur du site
 
Messages: 40
Inscription: Dim 25 Nov 2007 21:33

Re: [2.0.0] Couleurs de fond pour les groupes

Messagede Webmaster » Sam 5 Déc 2009 21:43

Mise à jour 1.0.1 vers 2.0.0
Motif :
  • Recodage complet et renommage du MOD.

Supprimer l'ancienne version et installer celle-ci.
Webmaster
Administrateur du site
 
Messages: 40
Inscription: Dim 25 Nov 2007 21:33

Re: [2.0.0] Couleurs de fond pour les groupes

Messagede Webmaster » Dim 31 Jan 2010 15:51

Mise à jour 2.0.0 vers 2.0.1
Motif :
  • Correction de bugs.

Voir la procédure correspondante dans le dossier contrib/ de l'archive du MOD
Webmaster
Administrateur du site
 
Messages: 40
Inscription: Dim 25 Nov 2007 21:33


Retourner vers Mods pour phpBB3.0.x

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité