1. 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?

Discussion in 'Styling and Customization Questions' started by CNK, Aug 15, 2014.

  1. CNK

    CNK Active Member

    Hello, how I can delete IMG tag from here:
    img-tag-in-short-description.jpg
    ?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    You can't.

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

    cclaerhout Well-Known Member

    CNK likes this.
  4. CNK

    CNK Active Member

    But when I use "Hide tags in thread fast preview", in fast preview are huge links, how to hide tags with content?
     
  5. cclaerhout

    cclaerhout Well-Known Member

    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);
             }     
         }
     
    CNK likes this.
  6. cclaerhout

    cclaerhout Well-Known Member

    @CNK I've added a direct option to perform this in the next version (available now on github and soon here).
     
    CNK likes this.
  7. CNK

    CNK Active Member

Share This Page