Article Addon - Why Lost Formating In Introtext? - Question | JoomShaper

Article Addon - Why Lost Formating In Introtext?

TomaszGrzechnik

TomaszGrzechnik

SP Page Builder 1 year ago

Hi, Why html tags are removed in Introtext in Article addon? All is visible, but I want to leave formating like <b>, </br> and others in introtext. I have for example: <h5>TEXT1</h5> <h5>TEXT2<br /><strong><span style="color: #008000;">TEXT3</span></strong></h5> <h5>TEXT4<br /><br />

on site have: TEXT1 TEXT2 TEXT3 TEXT4

<div class="sppb-article-introtext">TEXT1 TEXT2 TEXT3 TEXT4 </div>

0
10 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #161519

You are welcome 😊

It is not a problem. It is developed this way. Yes, the change will stay since I have taken a new overridden file.

Please accept the answer that helped you. It will be then easier to find the solution for the other users with the same issue. There is a button to accept answer after each comment.

I have a humble request too. It would be very kind of you if you can manage some moment to give us feedback on 

  1. Joomla Extension Directory
  2. TrustPilot

This will inspire us to improve.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #161137

Hello TomaszGrzechnik

Please go to this location:

templates/your_template_name/sppagebuilder/addons/articles

and create site.php file with the attached file. You need to unzip the file and then replace.

site.php.zip

This will allow you to keep the formatting of introtext.

Best regards

0
AK
Alexander Krasovskiy
Accepted Answer
1 year ago #169132

Is this functionality - preserving the formatting of introtext - something that will be in next update? Or we will have to patch site.php every time? Thanks, Alexander

0
TomaszGrzechnik
TomaszGrzechnik
Accepted Answer
1 year ago #161152

Thanks for quick reply, But.. After upload site.php to template folder (I have HelixUltimate) Introtext have html tags, but I have layout with 4 articles horizontal and I see only one which is very long (more than 5000px), and other articles gone...

I see there is only one change in site.php to oryginal in line 405:

$output .= '<div class="sppb-article-introtext">' . mb_substr(strip_tags($item->introtext), 0, $intro_limit, 'UTF-8') . '...</div>';

new: $output .= '<div class="sppb-article-introtext">' . mb_substr($item->introtext, 0, $intro_limit, 'UTF-8') . '...</div>'

Can you check in your enviroment why this not works?

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #161227

It works fine. Please share me the URL where it does not work. I will have to check.

0
TomaszGrzechnik
TomaszGrzechnik
Accepted Answer
1 year ago #161345

Hi Ofi, On one site centrum-hit.pl there is a problem, but I check on other and you right - all is OK :) Can you help me to check what is wrong? Maybe when you see at page code you find something?

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #161346

Please share your administrator access here to check the issue. Use the Hidden Content box to share the credentials. Make sure that you have a full site backup with you before sharing.

0
TomaszGrzechnik
TomaszGrzechnik
Accepted Answer
1 year ago #161349

Hi, In hidden content you have credentials. Keep in mind that silte is live :)

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #161501

I have fixed your issue. Please check your site.

0
TomaszGrzechnik
TomaszGrzechnik
Accepted Answer
1 year ago #161511

Thanks a lot Ofi :)

I see you made changes in line 405 site.php to: $output .= '<div class="sppb-article-introtext">' . $item->introtext . '...</div>'; from: $output .= '<div class="sppb-article-introtext">' . mb_substr($item->introtext, 0, $intro_limit, 'UTF-8') . '...</div>';

Is this was a problem?

And what if will be new template update? Did changes will stay?

0