Nom: Activer-Désactiver son profil-public
Description: Ce mod permet, depuis son profil de rendre ou non accessible son profil-public. Si on le désactive cela affiche un message pour celui qui essaie d'y accéder.
Durée d'install: 10 mins
Niveau d'install: Facile/Moyen
Mod:
Description: Ce mod permet, depuis son profil de rendre ou non accessible son profil-public. Si on le désactive cela affiche un message pour celui qui essaie d'y accéder.
Durée d'install: 10 mins
Niveau d'install: Facile/Moyen
Mod:
Code (Sélectionner le code)
#
# [1] ---------- SQL --------------------------------------------------------
ALTER TABLE fsb_membres ADD membre_view_profile tinyint( 4 ) NOT NULL default '1';
#
# [2] ---------- ouvrir --------------------------------------------------------
profil.php
#
# [3] ---------- chercher ------------------------------------------------------
#
$parametre = array('login', 'mdp', 'mdp_confirm', 'mdp_nouveau', 'email', 'signature', 'langue_forum', 'theme_forum', 'lier_avatar', 'vision_mail'
#
# [4] ---------- remplacer par ------------------------------------------------
#
$parametre = array('login', 'mdp', 'mdp_confirm', 'mdp_nouveau', 'email', 'signature', 'langue_forum', 'theme_forum', 'lier_avatar', 'vision_mail', 'vision_profile'
#
# [5] ---------- chercher ------------------------------------------------------
#
SET membre_login = '$login_tmp', membre_mdp = '$mdp_tmp', membre_email = '$email', membre_signature = '$signature', " . ( ! $config['annuler_langue'] ? "membre_langue = '$langue_forum', " : "" ) . ( ! $config['annuler_theme'] ? "membre_langue = '$theme_forum', " : "" ) . "membre_avatar = '$lier_avatar', membre_voir_mail = '$vision_mail'
#
# [6] ---------- remplacer par ------------------------------------------------
#
SET membre_login = '$login_tmp', membre_mdp = '$mdp_tmp', membre_email = '$email', membre_signature = '$signature', " . ( ! $config['annuler_langue'] ? "membre_langue = '$langue_forum', " : "" ) . ( ! $config['annuler_theme'] ? "membre_langue = '$theme_forum', " : "" ) . "membre_avatar = '$lier_avatar', membre_voir_mail = '$vision_mail', membre_voir_profile = '$vision_profile'
#
# [7] ---------- chercher ------------------------------------------------------
#
$v_mail_oui = ( $membre['membre_voir_mail'] ) ? 'checked="checked"' : '';
$v_mail_non = ( ! $membre['membre_voir_mail'] ) ? 'checked="checked"' : '';
#
# [8] ---------- remplacer par ------------------------------------------------
#
$v_mail_oui = ( $membre['membre_voir_mail'] ) ? 'checked="checked"' : '';
$v_mail_non = ( ! $membre['membre_voir_mail'] ) ? 'checked="checked"' : '';
$v_profile_oui = ( $membre['membre_voir_profile'] ) ? 'checked="checked"' : '';
$v_profile_non = ( ! $membre['membre_voir_profile'] ) ? 'checked="checked"' : '';
#
# [9] ---------- chercher ------------------------------------------------------
#
$v_mail_oui = ( $vision_mail ) ? 'checked="checked"' : '';
$v_mail_non = ( ! $vision_mail ) ? 'checked="checked"' : '';
#
# [10] ---------- remplacer par ------------------------------------------------
#
$v_mail_oui = ( $vision_mail ) ? 'checked="checked"' : '';
$v_mail_non = ( ! $vision_mail ) ? 'checked="checked"' : '';
$v_profile_oui = ( $vision_profile ) ? 'checked="checked"' : '';
$v_profile_non = ( ! $vision_profile ) ? 'checked="checked"' : '';
#
# [11] ---------- chercher -----------------------------------------------------
#
$v_mail_oui = '';
$v_mail_non = 'checked="checked"';
#
# [12] ---------- remplacer par ------------------------------------------------
#
$v_mail_oui = '';
$v_mail_non = 'checked="checked"';
$v_profile_oui = '';
$v_profile_non = 'checked="checked"';
#
# [13] ---------- chercher -----------------------------------------------------
#
'L_VISION_MAIL' => $langue['profil_vision_mail'],
#
# [14] ---------- après, ajouter -----------------------------------------------
#
'L_VISION_PROFILE' => $langue['profil_vision_profile'],
#
# [15] ---------- chercher -----------------------------------------------------
#
'V_MAIL_OUI' => $v_mail_oui,
'V_MAIL_NON' => $v_mail_non,
#
# [16] ---------- après, ajouter -----------------------------------------------
#
'V_PROFILE_OUI' => $v_profile_oui,
'V_PROFILE_NON' => $v_profile_non,
#
# [17] ---------- ouvrir --------------------------------------------------------
#
themes/IceCold/profil_corps.tpl
#
# [18] ---------- chercher -----------------------------------------------------
#
<tr>
<td class="td_profil">{L_VISION_MAIL}:</td>
<td class="td_profil2">
<input type="radio" name="vision_mail" value="1" {V_MAIL_OUI} /> {L_OUI}
<input type="radio" name="vision_mail" value="0" {V_MAIL_NON} /> {L_NON}
</td>
</tr>
#
# [19] ---------- après, ajouter -----------------------------------------------
#
<tr>
<td class="td_profil_bas">{L_VISION_PROFILE}:</td>
<td class="td_profil2_bas">
<input type="radio" name="vision_profile" value="1" {V_PROFILE_OUI} /> {L_OUI}
<input type="radio" name="vision_profile" value="0" {V_PROFILE_NON} /> {L_NON}
</td>
</tr>
#
# [20] ---------- ouvrir -------------------------------------------------------
#
profil_public.php
#
# [21] ---------- chercher -----------------------------------------------------
#
$tpl->pparse('corps');
#
# [22] ---------- remplacer par ------------------------------------------------
#
if ( $donnees['membre_voir_profile'] )
{
$tpl->pparse('corps');
}
else
{
info($langue['info_titre'], $langue['not_view_profile']);
}
#
# [23] ---------- ouvrir -------------------------------------------------------
#
langues/fr/langue_forum.php
#
# [24] ---------- chercher -----------------------------------------------------
#
$langue['profil_vision_mail'] = 'Montrer son adresse email';
#
# [25] ---------- après, ajouter -----------------------------------------------
#
$langue['profil_vision_profile'] = 'Montrer mon profil aux autres membres';
#
# [26] ---------- ouvrir -------------------------------------------------------
#
langues/fr/langue_erreur.php
#
# [27] ---------- chercher -----------------------------------------------------
#
$langue['membre_non_existant'] = 'Le membre recherché n\'existe pas';
#
# [28] ---------- remplacer par ------------------------------------------------
#
$langue['not_view_profile'] = 'Ce membre a désactivé son profil public';
// ----------- fin - mini-mod ------------------------BaB'












