html tags

How to allow HTML taps in mfp_introtext in the default theme to show links?
11 responses Add Yours
       
  • Replied by admin on Sunday, August 07 2022, 07:01 AM · Hide· #1
    You're very welcome jtusa;)
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by jtausa on Sunday, August 07 2022, 04:30 AM · Hide· #2
    This solution works fine allowing the links taps.
    Thank you very much for your technical support.
  •  
  • Replied by admin on Sunday, August 07 2022, 02:10 AM · Hide· #3
    Err sorry, please replace this :
    echo JHtmlString::truncate($item->introtext, $introtext_truncate, true, false);  ?>

    with this
    echo strip_tags($item->introtext,'<a>,<h2>,<h3><p>'); ?>
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by jtausa on Saturday, August 06 2022, 03:52 PM · Hide· #4
    This replacement continues removing the html tags
  •  
  • Replied by admin on Saturday, August 06 2022, 11:35 AM · Hide· #5
    Replace
    echo JHtmlString::truncate($item->introtext, $introtext_truncate, true, false);  ?>


    with
    echo strip_tags($item->introtext,'<img />'); ?>
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by jtausa on Friday, August 05 2022, 10:51 PM · Hide· #6
    Where do I add the code?
    Before and after what code?
    Or replace <?php echo strip_tags($item->introtext,'<img />'); ?>
  •  
  • Replied by admin on Friday, August 05 2022, 10:27 PM · Hide· #7
    Sorry for delay, I missed your reply:(. It's because you post the image inside the body. Try to change previous part into this code :
    <?php echo strip_tags($item->introtext,'<img />'); ?>
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by jtausa on Friday, August 05 2022, 12:06 AM · Hide· #8
    Now the default card appears as duplicates one line without introtext and other with the correct introtext showing the link tags, see attached screenshot or view https://datepalmsnursery.com/shop
  •  
  • Replied by jtausa on Thursday, August 04 2022, 11:52 PM · Hide· #9
    Thank you very much, I found this on line 202, now is showing the link tags
  •  
  • Replied by jtausa on Thursday, August 04 2022, 11:26 PM · Hide· #10
    In what file i can find the line ?
    echo JHtmlString::truncate($item->introtext, $introtext_truncate, true, false); ?>
  •  
  •  
    Replied by admin on Thursday, August 04 2022, 10:55 PM · Hide· #11
    Hi, you can do that by creating a template override (if you don't know how to create it you can follow this video https://www.youtube.com/watch?v=tMB97xfYQfY) then change then change this part :
    echo JHtmlString::truncate($item->introtext, $introtext_truncate, true, false);  ?>

    into
    echo $item->introtext;
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
Your Response
Please login first in order for you to submit comments