dans ce sujet seront listés les différentes mises à jours des MODs de la base de données de phpBB-fr.
@+
- Genders 1.0.0 -> 1.0.1
Modérateur: Equipe


//-- mod : Genders ------------------------------------------------------------
//-- add
'user_gender' => $data['gender'],
//-- fin mod : Genders -------------------------------------------------------- 'user_birthday' => $data['user_birthday'], //-- mod : Genders ------------------------------------------------------------
//-- add
'user_gender' => $data['gender'],
//-- fin mod : Genders --------------------------------------------------------

#
#-----[ OUVRIR ]----------------------------------------------
#
includes/acp/acp_board.php
#
#-----[ TROUVER ]---------------------------------------------
#
//-- mod : purge cache from any page --------------------------------------------------------
//-- add
'purge_cache' => array('lang' => 'ALLOW_PURGE_CACHE', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_user_authorized', 'explain' => true),
//-- end : purge cache from any page --------------------------------------------------------
#
#-----[ REMPLACER PAR ] ------------------------------------
# Supprimer
#
#-----[ TROUVER ]---------------------------------------------
#
break;
case 'avatar':
#
#-----[ AVANT, AJOUTER ]---------------------------------------------
#
//-- mod : purge cache from any page --------------------------------------------------------
//-- add
if ($user->data['user_type'] == USER_FOUNDER)
{
$display_vars['vars']['purge_cache'] = array('lang' => 'ALLOW_PURGE_CACHE', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_user_authorized', 'explain' => true);
}
//-- end : purge cache from any page --------------------------------------------------------
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


#
#-----[ OUVRIR ]----------------------------------------------
#
includes/functions.php
#
#-----[ TROUVER ]---------------------------------------------
#
if ( $config['purge_cache'] == PURGE_BY_FOUNDER && $user->data['user_type'] == USER_FOUNDER)
{
$s_authorized = true;
}
elseif ( $config['purge_cache'] == PURGE_BY_ADMIN && $auth->acl_get('a_'))
{
$s_authorized = true;
}
else
{
$s_authorized = false;
}
#
#-----[ REMPLACER PAR ] ------------------------------------
#
$s_authorized = ( ($config['purge_cache'] == PURGE_BY_FOUNDER && $user->data['user_type'] == USER_FOUNDER) || ($config['purge_cache'] == PURGE_BY_ADMIN && $auth->acl_get('a_')) ) ? true : false;
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM



//*****************************
// Begin : Anti Double Posts
//*****************************
$adp_time = $config['adp_days']*86400+$config['adp_hours']*3600+$config['adp_mins']*60+$config['adp_secs'];
//Check if last poster is the current poster
$sql = 'SELECT t.topic_last_post_id,t.topic_last_poster_id, t.topic_last_post_time, p.post_text
FROM ' . TOPICS_TABLE . ' AS t, ' . POSTS_TABLE . ' AS p
WHERE t.topic_id = ' . $topic_id . '
AND p.post_id = t.topic_last_post_id';
$result = $db->sql_query_limit($sql, 1);
if ($row = $db->sql_fetchrow($result))
{
$topic_last_post_id = $row['topic_last_post_id'];
$topic_last_poster_id = $row['topic_last_poster_id'];
$topic_last_post_time = $row['topic_last_post_time'];
$post_text = $row['post_text'];
}
$db->sql_freeresult($result);
if ($mode == 'reply' && $config['adp_enable'] && $user->data['user_id']==$topic_last_poster_id && ($topic_last_post_time + $adp_time) > $current_time)
{
if(!$config['adp_auto_edit'] && !(($config['adp_admins'] && $auth->acl_get('a_')) || ($config['adp_modos'] && $auth->acl_get('m_'))))
{
trigger_error('ADP_DOUBLE_POST');
}
}
//*****************************
// End : Anti Double Posts
//***************************** // Begin : Anti Double Posts
$mod_adp = false;
if ($config['adp_enable'])
{
if ($mode == 'quote')
{
// Get topic id for this post
$sql_topic = 'SELECT topic_id
FROM ' . POSTS_TABLE . '
WHERE post_id = ' . $post_id;
$result_topic = $db->sql_query_limit($sql_topic, 1);
if ($row_topic = $db->sql_fetchrow($result_topic))
{
$topic_id = $row_topic['topic_id'];
}
$db->sql_freeresult($result_topic);
}
$adp_time = $config['adp_days'] * 86400 + $config['adp_hours'] * 3600 + $config['adp_mins'] * 60 + $config['adp_secs'];
if ($mode == 'reply' || $mode == 'quote')
{
// Check if last poster is the current poster
$sql = 'SELECT t.topic_last_post_id,t.topic_last_poster_id, t.topic_last_post_time, p.post_subject, p.post_text, p.post_checksum, p.bbcode_uid, p.bbcode_bitfield
FROM ' . TOPICS_TABLE . ' AS t, ' . POSTS_TABLE . ' AS p
WHERE t.topic_id = ' . $topic_id . '
AND p.post_id = t.topic_last_post_id';
$result = $db->sql_query_limit($sql, 1);
if ($row = $db->sql_fetchrow($result))
{
$post_subject = $row['post_subject'];
$topic_last_post_id = $row['topic_last_post_id'];
$topic_last_poster_id = $row['topic_last_poster_id'];
$topic_last_post_time = $row['topic_last_post_time'];
$post_text = $row['post_text'];
$post_checksum = $row['post_checksum'];
$post_bbcode_uid = $row['bbcode_uid'];
$post_bbcode_bitfield = $row['bbcode_bitfield'];
}
$db->sql_freeresult($result);
// Conditions
if ($submit && $user->data['user_id'] == $topic_last_poster_id && ($topic_last_post_time + $adp_time) > $current_time && !(($config['adp_admins'] && $auth->acl_get('a_')) || ($config['adp_modos'] && $auth->acl_get('m_'))))
{
$mod_adp = true;
}
}
if ($mod_adp && !$config['adp_auto_edit'])
{
trigger_error('ADP_DOUBLE_POST');
}
}
// End : Anti Double Posts //*****************************
// Begin : Anti Double Posts
//*****************************
if ($mode == 'reply' && $config['adp_enable'] && $user->data['user_id']==$topic_last_poster_id && ($topic_last_post_time + $adp_time) > $current_time)
{
if($config['adp_auto_edit'] && !(($config['adp_admins'] && $auth->acl_get('a_')) || ($config['adp_modos'] && $auth->acl_get('m_'))))
{
$mode = 'edit';
$post_id = $topic_last_post_id;
$message_parser->message = $post_text . '<br /><br />' . $config['adp_text_edit'] . '<br /><br />' . $message_parser->message;
}
}
//*****************************
// End : Anti Double Posts
//*****************************
// Validate username // Validate username $post_data['enable_sig'] = (!$config['allow_sig'] || !$auth->acl_get('f_sigs', $forum_id) || !$auth->acl_get('u_sig')) ? false : ((isset($_POST['attach_sig']) && $user->data['is_registered']) ? true : false); // Begin : Anti Double Posts
if ($mod_adp && $config['adp_auto_edit'])
{
$mode = 'edit';
$post_id = $topic_last_post_id;
$post_data['poster_id'] = $topic_last_poster_id;
$post_data['post_subject'] = $post_subject;
$post_data['post_checksum'] = $post_checksum;
$post_data['username'] = $user->data['username'];
$message_parser->bbcode_uid = $post_bbcode_uid;
$message_parser->bbcode_bitfield = $post_bbcode_bitfield;
decode_message($post_text,$post_bbcode_uid);
// Petit traitement des URL, encodées dans la BDD, ce qui empêche la détection des url dans les bbcodes img et url
$post_text = str_replace(array(':', '.'), array(':', '.'), $post_text);
$message_parser->message = $post_text . '<br /><br />' . $config['adp_text_edit'] . '<br /><br />' . $message_parser->message;
}
// End : Anti Double Posts 
//-- mod : Display IP address of private message ------------------------------------------
//-- add
if ($user->data['user_type'] == USER_FOUNDER)
{
$display_vars['vars']['display_pm_ip'] = array('lang' => 'DISPLAY_IP_PM', 'validate' => 'int', 'type' => 'select', 'method' => 'display_pm_ip_select', 'explain' => true); }
//-- end : Display IP address of private message ------------------------------------------ //-- mod : Display IP address of private message ------------------------------------------
//-- add
/**
* Select user autorized to view IP of private message
*/
function display_pm_ip_select($value, $key = '')
{
global $user;
$user->add_lang('acp/users');
return '<option value="'. VIEW_PM_IP_FOUNDER .'"' . (($value == VIEW_PM_IP_FOUNDER ) ? ' selected="selected"' : '') . '>' . $user->lang['FOUNDER'] . '</option><option value="'. VIEW_PM_IP_ADMIN . '"' . (($value == VIEW_PM_IP_ADMIN) ? ' selected="selected"' : '') . '>' . $user->lang['G_ADMINISTRATORS'] . '</option><option value="'. VIEW_PM_IP_MOD . '"' . (($value == VIEW_PM_IP_MOD) ? ' selected="selected"' : '') . '>' . $user->lang['G_GLOBAL_MODERATORS'] . '</option>';
}
//-- end : Display IP address of private message ------------------------------------------ //-- mod : Display IP address of private message ------------------------------------------
//-- add
define('VIEW_PM_IP_FOUNDER', 0);
define('VIEW_PM_IP_ADMIN', 1);
define('VIEW_PM_IP_MOD', 2);
//-- end : Display IP address of private message ------------------------------------------ if ( ($config['display_pm_ip'] == VIEW_PM_IP_FOUNDER && $user->data['user_type'] == USER_FOUNDER) || ($config['display_pm_ip'] == VIEW_PM_IP_ADMIN && $auth->acl_get('a_')) || ($config['display_pm_ip'] == VIEW_PM_IP_MOD && $auth->acl_get('m_')) ) if ( $user->data['user_type'] == USER_FOUNDER) || $auth->acl_get('m_display_pm_ip') ) //-- mod : Display IP address of private message ------------------------------------------
//-- add
'DISPLAY_IP_PM' => 'Display IP adress in private messages',
'DISPLAY_IP_PM_EXPLAIN' => 'You have to specify the minimum permission’s level to view this information.',
//-- end : Display IP address of private message ------------------------------------------ 'acl_m_ban' => array('lang' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local) //-- mod : Display IP address of private message ------------------------------------------
//-- add
'acl_m_display_pm_ip' => array('lang' => 'Can display Ip adress of private message', 'cat' => 'pm'),
//-- end : Display IP address of private message ------------------------------------------ //-- mod : Display IP address of private message ------------------------------------------
//-- add
'DISPLAY_IP_PM' => 'Afficher l’adresse IP des messages privés',
'DISPLAY_IP_PM_EXPLAIN' => 'Vous devez indiquer quel niveau de permission est requis pour visualiser cette information.',
//-- end : Display IP address of private message ------------------------------------------ 'acl_m_ban' => array('lang' => 'Peut gérer les bannissements<br /><em>Notez que ce réglage est assigné globalement. Il n’est pas basé sur le forum.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local) //-- mod : Display IP address of private message ------------------------------------------
//-- add
'acl_m_display_pm_ip' => array('lang' => 'Peut afficher l’adresse IP d’un message privé', 'cat' => 'pm'),
//-- end : Display IP address of private message ------------------------------------------ 
if ($user->data['user_id'] == $topic_last_poster_id && ($topic_last_post_time + $adp_time) > $current_time && !(($config['adp_admins'] && $auth->acl_get('a_')) || ($config['adp_modos'] && $auth->acl_get('m_')))) if ($submit && $user->data['user_id'] == $topic_last_poster_id && ($topic_last_post_time + $adp_time) > $current_time && !(($config['adp_admins'] && $auth->acl_get('a_')) || ($config['adp_modos'] && $auth->acl_get('m_')))) $post_data['username'] = $user->data['username']; // Attachments
// Do not change to SELECT *
$sql = 'SELECT attach_id, is_orphan, attach_comment, real_filename
FROM ' . ATTACHMENTS_TABLE . "
WHERE post_msg_id = $post_id
AND in_message = 0
AND is_orphan = 0
ORDER BY filetime DESC";
$result = $db->sql_query($sql);
$message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result));
$db->sql_freeresult($result);
// End Attachments 

#
#-----[ OUVRIR ]----------------------------------------------
#
memberlist.php
#
#-----[ TROUVER ]---------------------------------------------
#
if(($username_filter = request_var('username_filter', '')) !== '')
#
#-----[ REMPLACER PAR ] ------------------------------------
#
if(($username_filter = request_var('username_filter', '', true)) !== '')
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

