phpBB-premod.com Index du Forum
Portail  •  Forum  •  Profil  •  Rechercher   •  S'enregistrer  •  Se connecter pour vérifier ses messages privés  •  Connexion   

 addon hide pour orion

Poster un nouveau sujetRépondre au sujet
Auteur Message
sob




Civilité:
Age: 43
Inscrit le: 16 Juil 2007
Messages: 12


france.gif

MessagePosté le: 01.11.2007, 23:54    addon hide pour orion Répondre en citantRevenir en haut de page

le bouton est deja dans la premod mais le mod ny est pas donc je vous met le mod en dessous,il fonctionne nickel sauf une chose quil ne faut pas mettre cette parti la

Citation:
language/lang_english/lang_bbc_box.php
#
#-----[ FIND ]------------------------------------------------
#
// addons
// add keys $lang[] from addons below this line
#
#-----[ AFTER, ADD ]------------------------------------------
#


cela bug au moment dediter ne pas le mettre sa marche impec.

la suite du mod en dessous

##############################################################
## MOD Title:      Addon BBcode Hide for BBcode Box Reloaded
## MOD Author: reddog < N/A > (N/A) http://www.reddevboard.com
## MOD Author: Philiweb < N/A > (N/A) http://www.philiweb.com/
## MOD Description:   this MOD add the BBcode Hide in your forum,
##         required BBcode Box Reloaded MOD by reddog
## MOD Version:      1.1.0a
##
## Installation Level:   Easy
## Installation Time:   5 Minutes
## Files To Edit:   9
##   posting.php
##   search.php
##   viewtopic.php
##   includes/bbcode.php
##   includes/topic_review.php
##   language/lang_english/lang_bbc_box.php
##   language/lang_english/lang_main.php
##   templates/subSilver/bbc_box.css
##   templates/subSilver/bbcode.tpl
## Included Files:   3
##   root/templates/bbc_box/styles/bbclite/hide.gif
##   root/templates/bbc_box/styles/default/hide.gif
##   root/templates/subSilver/images/bbcode_hide.gif
##############################################################
## 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:
##
## This addon requires BBcode Box Reloaded 1.2.2a by reddog
##
##############################################################
## MOD History:
##
## 2006-02-11 - Version 1.1.0a
##   - minor bug in topic review (blank message)
## 2006-01-13 - Version 1.1.0
##   - modified hide block appearance
## 2006-01-08 - Version 1.0.9
##   - code revision with phpBB 2.0.19
## 2005-10-06 - Version 1.0.8
##   - ensure BBcBxR 1.2.2 compliancy
## 2005-08-13 - Version 1.0.7
##   - compatibility with BBcBxR 1.2.1
## 2005-06-20 - Version 1.0.6
##   - compatibility with BBcBxR 1.2.0
## 2005-06-04 - Version 1.0.5
##   - compatibility with BBcBxR 1.1.0
## 2005-04-20 - Version 1.0.4
##   - now modifications for add_bbcode.js are in the install file
## 2005-03-02 - Version 1.0.3
##   - corrected $lang english (capital first letter)
##   - added $lang for Hide_in_quote function (bbcode.php)
## 2005-02-07 - Version 1.0.2
##   - maj add_bbcode.js to insert tag anywhere in message (Mozilla)
## 2005-01-16 - Version 1.0.1
##   - modified hide var (error in firefox)
## 2005-01-14 - Version 1.0.0
##      - first release
##   - Original BBcode Hide by Philiweb
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]-------------------------------------------------
#

INSERT INTO orion_bbc_box (bbc_name, bbc_value, bbc_auth, bbc_before, bbc_after, bbc_helpline, bbc_img, bbc_divider) VALUES ('hide', '1', '0', 'hide', 'hide', 'hide', 'hide', '0');

#
#-----[ DIY INSTRUCTIONS ]------------------------------------
#

after to have execute this SQL query, go to ACP --> BBcode Box --> Configuration
and renew the cache file

(après avoir exécuté cette requête SQL, allez dans l'Administration --> BBcode Box --> Configuration
et régénérez le fichier cache)

#
#-----[ COPY ]------------------------------------------------
#
copy root/templates/bbc_box/styles/bbclite/hide.gif to templates/bbc_box/styles/bbclite/hide.gif
copy root/templates/bbc_box/styles/default/hide.gif to templates/bbc_box/styles/default/hide.gif
copy root/templates/subSilver/images/bbcode_hide.gif to templates/subSilver/images/bbcode_hide.gif
#
#-----[ OPEN ]------------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
      if( $attach_sig
      {
         $user_sig = bbencode_second_pass(
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
      $valid = false;
      if( $userdata['session_logged_in'] )
      {
         $sql = 'SELECT p.poster_id, p.topic_id
            FROM ' . POSTS_TABLE . ' p
               WHERE p.topic_id = ' . $topic_id . '
               AND p.poster_id = ' . $userdata['user_id'];
         $hideresult = $db->sql_query($sql);
         $valid = $db->sql_numrows($hideresult) ? true : false;
      }
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
         $user_sig = bbencode_third_pass($user_sig, $userdata['user_sig_bbcode_uid'], $valid);
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$preview_message = bbencode_second_pass(
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
         $preview_message = bbencode_third_pass($preview_message, $bbcode_uid, $valid);
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$subject = 'Re: ' . $subject;
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
         if( !$userdata['session_logged_in'] )
         {
            $message = hide_in_quote($message);
         }
         else
         {
            $sql = 'SELECT p.poster_id, p.topic_id
               FROM ' . POSTS_TABLE . ' p
                  WHERE p.topic_id = ' . $topic_id . '
                  AND p.poster_id = ' . $userdata['user_id'];
            $hideresult = $db->sql_query($sql);
            if(!$db->sql_numrows($hideresult))
            {
               $message = hide_in_quote($message);
            }
         }
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------------
#
if ( $return_chars != -1 )
#
#-----[ REPLACE WITH ]----------------------------------------
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- delete
/*-MOD
               if ( $return_chars != -1 )
MOD-*/
//-- add
               if ( $return_chars == -1 )
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass(
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
                     $message = bbencode_third_pass($message, $bbcode_uid, false);
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$previous_days = array(
$previous_days_text = array(
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
$valid = false;
if( $userdata['session_logged_in'] )
{
   $sql = 'SELECT p.poster_id, p.topic_id
      FROM ' . POSTS_TABLE . ' p
         WHERE p.topic_id = ' . $topic_id . '
         AND p.poster_id = ' . $userdata['user_id'];
   $hideresult = $db->sql_query($sql);
   $valid = $db->sql_numrows($hideresult) ? true : false;
}
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$user_sig = ($board_config['allow_bbcode']) ? bbencode_second_pass(
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
      $user_sig = bbencode_third_pass($user_sig, $user_sig_bbcode_uid, $valid);
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$message = ($board_config['allow_bbcode']) ? bbencode_second_pass(
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
      $message = bbencode_third_pass($message, $bbcode_uid, $valid);
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$bbcode_tpl['email'] = str_replace(
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
   $bbcode_tpl['show'] = str_replace('{L_HIDE}', $lang['Hide'], $bbcode_tpl['show']);
   $bbcode_tpl['show'] = str_replace('{HTEXTE}', '\\1', $bbcode_tpl['show']);
   $bbcode_tpl['hide'] = str_replace('{L_HIDE}', $lang['Hide'], $bbcode_tpl['hide']);
   $bbcode_tpl['hide'] = str_replace('{L_HIDE_TEXT}', $lang['Hide_text'], $bbcode_tpl['hide']);
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
function bbencode_second_pass(
{
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
function hide_in_quote($text)
{
   global $lang, $bbc_tag;

   $hide = $bbc_tag['hide'];
   $text = preg_replace("#\[$hide\](.*?)\[\/$hide\]#si", $lang['Hide_in_quote'], $text);
   return $text;
}

function bbencode_third_pass($text, $uid, $deprotect)
{
   global $bbcode_tpl, $bbc_tag;

   // pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
   // This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
   $text = " " . $text;

   // First: If there isn't a "[" and a "]" in the message, don't bother.
   if (! (strpos($text, "[") && strpos($text, "]")) )
   {
      // Remove padding, return.
      $text = substr($text, 1);
      return $text;
   }
   // Patterns and replacements for URL and email tags..
   $patterns = array();
   $replacements = array();
   $hide = $bbc_tag['hide'];

   if ( $deprotect )
   {
      $patterns[0] = "#\[$hide:$uid\](.*?)\[/$hide:$uid\]#si";
      $replacements[0] = $bbcode_tpl['show'];
   }
   else
   {
      $patterns[0] = "#\[$hide:$uid\](.*?)\[/$hide:$uid\]#si";
      $replacements[0] = $bbcode_tpl['hide'];
        }

   $text = preg_replace($patterns, $replacements, $text);

   // Remove our padding from the string..
   $text = substr($text, 1);

   return $text;
}
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
// [img]image_url_here[/img] code..
$text = preg_replace(
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
   // [hide]message[/hide]
   $hide = $bbc_tag['hide'];
   $bbc_sort = bbc_auth($bbc_auth['hide']);
   $text = ($bbc_value['hide'] && $bbc_sort) ? preg_replace("#\[$hide\](.*?)\[\/$hide\]#si","[$hide:$uid]\\1[/$hide:$uid]", $text) : $text;
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/topic_review.php
#
#-----[ FIND ]------------------------------------------------
#
   // Okay, let's do the loop, yeah come on baby let's do the loop
   // and it goes like this ...
   //
   if ( $row = $db->sql_fetchrow($result) )
   {
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
      $valid = false;
      if( $userdata['session_logged_in'] )
      {
         $sql = 'SELECT p.poster_id, p.topic_id
            FROM ' . POSTS_TABLE . ' p
               WHERE p.topic_id = ' . $topic_id . '
               AND p.poster_id = ' . $userdata['user_id'];
         $hideresult = $db->sql_query($sql);
         $valid = $db->sql_numrows($hideresult) ? true : false;
      }
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
# This may be a partial find and not the whole line(s)
#
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass(
#
#-----[ AFTER, ADD ]------------------------------------------
#
# Add these lines on a new blank line after the preceding line(s) to find
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
            $message = bbencode_third_pass($message, $bbcode_uid, $valid);
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
# to add french version of this MOD, follows the instructions
# in translations/french/lang_french.txt
#
# pour ajouter la version française de ce MOD, suivez les instructions
# dans le fichier translations/french/lang_french.txt
#
language/lang_english/lang_bbc_box.php
#
#-----[ FIND ]------------------------------------------------
#
// addons
// add keys $lang[] from addons below this line
#
#-----[ AFTER, ADD ]------------------------------------------
#

// hide
$lang['bbcbxr_help']['hide'] = "Protected Message: [hide]hidden text[/hide]";
$lang['bbcbxr_desc']['hide'] = 'Hidden text';
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : addon hide for bbcbxr -----------------------------------------------
//-- add
$lang['Hide'] = 'Protected Message';
$lang['Hide_text'] = '--- If you are a *registered user* : you need to post in this topic to see the message ---';
$lang['Hide_in_quote'] = '--- phpBB : The Protected Message is not copied in this quote ---';
//-- fin mod : addon hide for bbcbxr -------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------------
#
<!-- BEGIN font_close --></span><!-- END font_close -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN show --></span>
<div align="center">
   <div class="hidetitle">{L_HIDE}:</div>
   <div class="hidediv">{HTEXTE}</div>
</div>
<span class="postbody"><!-- END show -->

<!-- BEGIN hide --></span>
<div align="center">
   <div class="hidetitle">{L_HIDE}:</div>
   <div class="hidediv" style="text-align: center;">{L_HIDE_TEXT}</div>
</div>
<span class="postbody"><!-- END hide -->
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/bbc_box.css
#
#-----[ FIND ]------------------------------------------------
#
.spoiltitle {
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
.hidetitle {
   background : #D4D0C8;
   border : 1px solid #c0c0c0;
   font-size : 10px;
   color : #808080;
   padding : 5px;
   width : 90%;
   font-weight : bold;
   text-align : left;
   margin-top : 10px;
   background : #D4D0C8 url(images/bbcode_hide.gif) no-repeat 100% 50%;
}
.hidediv {
   background : #fafafa;
   border : 1px solid #c0c0c0;
   font-family : Verdana, Arial, Helvetica, sans-serif;
   font-size : 11px;
   color : #444444;
   border-top : 0;
   padding : 5px;
   width : 90%;
   text-align : left;
}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
stick





Age: 28
Inscrit le: 15 Fév 2008
Messages: 8


blank.gif

MessagePosté le: 15.02.2008, 14:38    (Aucun sujet) Répondre en citantRevenir en haut de page

Bonjour,

j'ai essayé d'installe de mod, mais j'ai quelques soucis !

Donc j'aurais voulu savoir si, lorsqu'il donne des exemples comme

Citation:
# This may be a partial find and not the whole line(s)
#
if( $attach_sig
{
$user_sig = bbencode_second_pass(


S'il faut inserer le code juste apres la parenthese, ou s'il faut le faire APRES la ligne entiere...

Merci d'avance wink

Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
freled
Modérateur



Civilité:
Age: 38
Inscrit le: 03 Avr 2007
Messages: 247


france.gif

MessagePosté le: 16.02.2008, 04:07    (Aucun sujet) Répondre en citantRevenir en haut de page

Trois choix :

Add before = ajouter avant , donc avant la ligne que tu as cherché
Add After = ajouter après, ......

Le troisième est un peu plus délicat car parfois on te demande d'ajouter un morceau de code au sein d'une ligne.

En cas de doute post le morceau du fichier mod qui te pose problème.

@++

Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
stick





Age: 28
Inscrit le: 15 Fév 2008
Messages: 8


blank.gif

MessagePosté le: 18.02.2008, 13:48    (Aucun sujet) Répondre en citantRevenir en haut de page

Le probleme c que ce mod regorge de morceaux de codes a integrer dans une ligne.

Etant totalement noob, je dois t'avouer que chacunes d'elles me pose probleme.

Je reessaierais dans la semaine d'integrer ce mod, et je te dirais les erreurs qui resortent, ca te parlera peut etre.

Merci

Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
stick





Age: 28
Inscrit le: 15 Fév 2008
Messages: 8


blank.gif

MessagePosté le: 21.02.2008, 17:09    (Aucun sujet) Répondre en citantRevenir en haut de page

Bon alors la c'est un truc limite comique. J'ai donc essayé de reintegrer le mod, sans succes. Cela ne marche pas, et j'ai une erreur sur le portail et en haut de chaque viewtopic.

Erreur :
Parse error: syntax error, unexpected T_VAR in /home/sondughe/public_html/boitedemacs/includes/bbcode.php(134) : eval()'d code on line 182


Le hic c'est que je n'ai absolument pas touché cette partie de ce fichier, et que j'en ai pour preuve que en remettant le fichier d'origine, l'erreur est toujours la...

La j'ai du mal a comprendre...

Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
freled
Modérateur



Civilité:
Age: 38
Inscrit le: 03 Avr 2007
Messages: 247


france.gif

MessagePosté le: 22.02.2008, 00:12    (Aucun sujet) Répondre en citantRevenir en haut de page

Oui mais il touche bbcode.tpl il me semble qui lui est evalue par cette ligne de commande..... cherche par la dans les modifs effectuées

@++

Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
Tiqua




Civilité:
Age: 30
Inscrit le: 10 Avr 2008
Messages: 61


blank.gif

MessagePosté le: 10.04.2008, 13:55    (Aucun sujet) Répondre en citantRevenir en haut de page

Peut on savoir si ce mod fonctionne reelement svp wink
Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
freled
Modérateur



Civilité:
Age: 38
Inscrit le: 03 Avr 2007
Messages: 247


france.gif

MessagePosté le: 11.04.2008, 15:08    (Aucun sujet) Répondre en citantRevenir en haut de page

Bien installé Wink le mod hide fonctionne parfaitement.....
Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
T-Maxx





Age: 36
Inscrit le: 01 Déc 2008
Messages: 3


france.gif

MessagePosté le: 02.12.2008, 00:06    (Aucun sujet) Répondre en citantRevenir en haut de page

Bonsoir,
pour mon premier post je voudrai deja un support de votre part.


J'ai installé ce mod

le seul probleme que je rencontre et lorsque l'on fait une previsualisation du message.

au lieu d'afficher [hide], il affiche [hide:0897989]
en fait le hide avec l'uid

j'ai bien mis dans bbcode.php les lignes avec [/$hide:$uid]",


si vous avez une idée ou le memepetit probleme ?

merci de m'apporter vos lumieres
@+

Hors ligneVoir le profil de l'utilisateurEnvoyer un message privé    
Montrer les messages depuis:      
Poster un nouveau sujetRépondre au sujet


 Sauter vers:   



Consulter les permissions


Panneau de Sécurité

10355 Attaques bloquées

Hebeh.com, l hébergeur des connaisseurs
Powered by Orion based on phpBB © 2001, 2007 phpBB Group
CBACK Orion Style based on FI Theme
Retrouvez les infos sur Google Groups phpBB Premod
Projet Open Source hébergé par www.hebeh.com
Toutes les heures sont au format GMT + 1 Heure


[ Page generation time: 0.0763s (PHP: 51% - SQL: 49%) | SQL queries: 18 | GZIP disabled | Debug on ]