• 0
  • 3 RepliesReplies
  • 2872 ReadTimes Read
  • 0 PointsPoints

Topic: Problema con hide tag special

Usuario: pablo24
Rango: Recién Llegado
Mensajes: 65
Points: 0
Perfil: View Profile
Problema con hide tag special
November 03, 2010 - 01:37 13:37
Hola, nuevamente necesito que me ayuden,
Lo que sucede es que intento de instalar el hide tag special, pero me tira un error en el subs.php (sources/subs.php). El problema es que en mi subs.php no aparece el:    static $disabled;

que debo modificar por

 
Code: [Select]
static $disabled;

   // On the first Parsing i will gernerate all things i need after that it's not needable
   if (!isset($modSettings['hide_preparedOption']))
   {
      // First there is nothing in it
      $modSettings['hide_preparedOption']['hiddentext'] = ' ';
      $modSettings['hide_preparedOption']['unhiddentext'] = ' ';

      if (empty($modSettings['hide_noinfoforguests']) || !$user_info['is_guest'])
      {
         // Prepare the hidden information
         $modSettings['hide_preparedOption']['hiddentext'] = isset($modSettings['hide_hiddentext']) ? $modSettings['hide_hiddentext'] : '';
         $modSettings['hide_preparedOption']['hiddentext'] = str_replace('$language', $user_info['language'], $modSettings['hide_preparedOption']['hiddentext']);
         if (!empty($modSettings['hide_MUIswitch']) && isset($txt['hide_hiddentext']))
            $modSettings['hide_preparedOption']['hiddentext'] = str_replace('$txtvariable', $txt['hide_hiddentext'], $modSettings['hide_preparedOption']['hiddentext']);
         if (!empty($modSettings['hide_enableHTML']))
            $modSettings['hide_preparedOption']['hiddentext'] = un_htmlspecialchars($modSettings['hide_preparedOption']['hiddentext']);

         // Prepare the unhidden infomation?
         if (!empty($modSettings['hide_enableUnhiddenText']))
         {
            $modSettings['hide_preparedOption']['unhiddentext'] = isset($modSettings['hide_unhiddentext']) ? $modSettings['hide_unhiddentext'] : '';
            $modSettings['hide_preparedOption']['unhiddentext'] = str_replace('$language', $user_info['language'], $modSettings['hide_preparedOption']['unhiddentext']);
            if (!empty($modSettings['hide_MUIswitch']) && isset($txt['hide_unhiddentext']))
               $modSettings['hide_preparedOption']['unhiddentext'] = str_replace('$txtvariable', $txt['hide_unhiddentext'], $modSettings['hide_preparedOption']['unhiddentext']);
            if (!empty($modSettings['hide_enableHTML']))
               $modSettings['hide_preparedOption']['unhiddentext'] = un_htmlspecialchars($modSettings['hide_preparedOption']['unhiddentext']);
         }
      }

      // So prepare the unhidden Option for the Parser
      if (!empty($modSettings['hide_useSpanTag']))
      {
         $modSettings['hide_preparedOption']['before_info'] = '<span class="hiddencontent">';
         $modSettings['hide_preparedOption']['after_info'] = '</span>';
      }
      else
      {
         $modSettings['hide_preparedOption']['before_info'] = '<div class="hiddencontent">';
         $modSettings['hide_preparedOption']['after_info'] = '<>';
      }

      // Okay Let's see where i must put the unhidden Informations
      if (!empty($modSettings['hide_enableUnhiddenText']) && empty($modSettings['hide_onlyonetimeinfo']))
      {
         if (empty($modSettings['hide_posUnhiddenText']) || $modSettings['hide_posUnhiddenText'] == 4)
            $modSettings['hide_preparedOption']['after_info'] .= $modSettings['hide_preparedOption']['unhiddentext'];
         elseif ($modSettings['hide_posUnhiddenText'] == 3)
            $modSettings['hide_preparedOption']['after_info'] = $modSettings['hide_preparedOption']['unhiddentext'].$modSettings['hide_preparedOption']['after_info'];
         elseif ($modSettings['hide_posUnhiddenText'] == 2)
            $modSettings['hide_preparedOption']['before_info'] .= $modSettings['hide_preparedOption']['unhiddentext'];
         elseif ($modSettings['hide_posUnhiddenText'] == 1)
            $modSettings['hide_preparedOption']['before_info'] = $modSettings['hide_preparedOption']['unhiddentext'].$modSettings['hide_preparedOption']['before_info'];
         else
            $modSettings['hide_preparedOption']['after_info'] .= $modSettings['hide_preparedOption']['unhiddentext'];
      }

      $modSettings['hide_preparedOption']['parse_content'] = !empty($modSettings['hide_enableUnhiddenText']) && empty($modSettings['hide_onlyonetimeinfo']);

      // Okay this is the check up if he is allowed to unhide it everytime! (Risky if wrong setup or diffrent mods can handle hide tag)
      $modSettings['hide_preparedOption']['auto_unhide_parser'] = false;
      if (!empty($modSettings['hide_unhideparser']) && !empty($modSettings['hide_autounhidegroups']))
      {
         $modSettings['hide_autounhidegroups'] = !is_array($modSettings['hide_autounhidegroups']) ? explode(',', $modSettings['hide_autounhidegroups']) : $modSettings['hide_autounhidegroups'];
         foreach ($user_info['groups'] as $group_id)
            if (in_array($group_id, $modSettings['hide_autounhidegroups']))
            {
               $modSettings['hide_preparedOption']['auto_unhide_parser'] = true;
               break; //One is enouph
            }
      }
   }

   // Hide Mod.. i remove the code before i do anything...
   if ($message !== false && !empty($message))
   {
      if ($modSettings['hide_preparedOption']['auto_unhide_parser'])
         $context['user_post_avaible'] = 1;
      // Add the Hidden Text at the end of the post
      if ((empty($context['user_post_avaible']) || !isset($context['user_post_avaible'])) && !empty($modSettings['hide_onlyonetimeinfo']) && hideTagExists($message, $cache_id))
         $message .= '[br]'.$modSettings['hide_preparedOption']['hiddentext'];
      // Here i remove this content or show onetime unhide info
      if (!isset($context['user_post_avaible']) || empty($context['user_post_avaible']))
      {
         // Remove it
         $message = preg_replace("/\[hide\](.+?)\[\/hide\]/i", (empty($modSettings['hide_onlyonetimeinfo']) ? $modSettings['hide_preparedOption']['hiddentext'] : "&nbsp"), $message);
         $message = preg_replace(array('~\n?\[hide.*?\].+?\[/hide\]\n?~is', '~^\n~', '~\[/hide\]~'), (empty($modSettings['hide_onlyonetimeinfo']) ? $modSettings['hide_preparedOption']['hiddentext'] : "&nbsp"), $message);
      }
      // Okay i need to add the unhidden information at the end of the post
      elseif (!empty($context['user_post_avaible']) && !empty($modSettings['hide_onlyonetimeinfo']) && !empty($modSettings['hide_enableUnhiddenText']) && hideTagExists($message, $cache_id))
         $message .= '[br]'.$modSettings['hide_preparedOption']['unhiddentext'];
   }



Y eso provoca que no puedo instalar ni automaticamente ni manualmente ese mod (almenos que yo sepa, por eso vengo aquí a ustedes para pedirles ayuda)



Mi página es: www.alonestanders.tk



Por si es necesario adjunte el subs.php
Usuario: Neekiinh0
Rango: Recién Llegado
Mensajes: 93
Points: 0
Perfil: View Profile
Re:Problema con hide tag special
Reply #1 November 04, 2010 - 12:30 12:30
Yo te modifique eso que no podias, pero el sub lleva muchas modificaciones, segui con las demas, yo solo hice la 1era.
Saludos.


PD: Usa el "Insertar codigo" la proxima vez  :P
Usuario: pablo24
Rango: Recién Llegado
Mensajes: 65
Points: 0
Perfil: View Profile
Re:Problema con hide tag special
Reply #2 November 04, 2010 - 03:19 15:19
Gracias!!! ahora si me funciona Neekiinh0
Usuario: Neekiinh0
Rango: Recién Llegado
Mensajes: 93
Points: 0
Perfil: View Profile
Re:Problema con hide tag special
Reply #3 November 04, 2010 - 04:23 16:23
Ok, me alegro pablo, pone el tema como solucionado por favor!
 

TAGS



top

Smfsimple.com es un sitio destinado a brindar un servicio de soporte y herramientas para foros realizados con el sistema de foros gratuito simplemachines.org. Contamos con un selecto equipo de desarrolladores y conocedores del sistema, sus foros estaran en buenas manos.
This site is not affiliated with or endorsed by Simple Machines