• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 How I can delete [IMG] tag from short description?

Chris D

XenForo developer
Staff member
#2
You can't.

It's a deliberate placeholder to provide context as to the content that can't be rendered in the preview.
 

cclaerhout

Well-known member
#5
But when I use "Hide tags in thread fast preview", in fast preview are huge links, how to hide tags with content?
I don't recommend this. Now if you want to do it, upgrade this file (I've just added some functions), then edit this other file:
Search:
PHP:
    /*Extra function to hide tags in Thread fast preview*/
     if(self::$_isJson == true && self::$_viewName == 'XenForo_ViewPublic_Thread_Preview' && XenForo_Application::get('options')->get('Bbm_HideTagsInFastPreview'))
     {
         if(isset($controllerResponse->params['post']['message']))
         {
         $formatter = XenForo_BbCode_Formatter_Base::create('BBM_Protection_BbCode_Formatter_BbCode_Lupin', false);
         $parser = new XenForo_BbCode_Parser($formatter);

         $extraStates = array(
           'bbmContentProtection' => true
         );         
         
         $controllerResponse->params['post']['message'] = $parser->render($controllerResponse->params['post']['message'], $extraStates);
         }     
     }
Replace with
PHP:
    /*Extra function to hide tags in Thread fast preview*/
     if(self::$_isJson == true && self::$_viewName == 'XenForo_ViewPublic_Thread_Preview' && XenForo_Application::get('options')->get('Bbm_HideTagsInFastPreview'))
     {
         if(isset($controllerResponse->params['post']['message']))
         {
         $formatter = XenForo_BbCode_Formatter_Base::create('BBM_Protection_BbCode_Formatter_BbCode_Eradicator', false);
         $formatter->setAllTagsAsProtected();
         $formatter->invisibleMode();
         
         $parser = new XenForo_BbCode_Parser($formatter);

         $extraStates = array(
           'bbmContentProtection' => true
         );         
         
         $controllerResponse->params['post']['message'] = $parser->render($controllerResponse->params['post']['message'], $extraStates);
         }     
     }