Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 193 Vote(s) - 3.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Joomla 3.4.3 article intro images not showing

#1
I am using Joomla 3.4.3 and I have an article with the following code..

<p>kj<img src="images/demo_preview/about/about1.png" alt="image" width="150" height="150" /></p>
<hr id="system-readmore" />
<p> This is a sample blog posting.</p>

I have set article options to show Frontend images but I am only being shown the text.

Here is what i see in the article editor...

[![Joomla Article Editor View][1]][1]

and this is what I see on the site...

[![enter image description here][2]][2]

as you can see the text only is displayed


[1]:

[2]:
Reply

#2
I have found a workaround for this problem. It appears that Joomla was stripping out img tags in the article intro text.

I found this function in the helper file...

public static function _cleanIntrotext($introtext)
{
$introtext = str_replace('<p>', ' ', $introtext);
$introtext = str_replace('</p>', ' ', $introtext);
$introtext = strip_tags($introtext, '<a><em><strong>');
$introtext = trim($introtext);

return $introtext;
}

By commenting out the strip_tags function I am able to get img tags back into my articles. It seems like a bit of a hack method to me but it works.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through