TruncateHtml Not Working For Articles Scroller - Question | JoomShaper

TruncateHtml Not Working For Articles Scroller

PD

Peter Dowse

SP Page Builder 10 months ago

Hi Guys,

I've tried adding truncateHtml to the article scroller addon, in particular doing a HTML override and editing line 214

from

            if ($show_intro) {
$output .= '<div class="sppb-articles-carousel-introtext">' . $intro_text . '...</div>';}

to

                if ($show_intro) {
                    $output .= '<div class="sppb-article-introtext">' . $this->truncateHtml($item->introtext, $intro_limit) . '</div>';
                }

But it's throwing a 500 error when I do this.

I've done this multiple times without issue on other addons.

Basically I just want the articles scroller to stop stripping out the HTML tags (Bold, H2 etc) - how do I go about doing this if I can't truncate the introtext?

0
3 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 10 months ago #178285

I am not component developer to help more, and ....

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 10 months ago #178281

Hi Peter,

Sorry, but all php changes (customizations) are in your hands only. Please contact with the local PHP developer for tip/solution.

Support Policy 8.2. and 8.11.

0
PD
Peter Dowse
Accepted Answer
10 months ago #178283

Ok - let me rephrase the question then.

How do I stop the Joomshaper article scroller addon from stripping out any HTML tags that are in an article?

0