Joomla 3.4.3 文章介绍图片不显示
Joomla 3.4.3 article intro images not showing
我正在使用 Joomla 3.4.3,我有一篇文章包含以下代码..
<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>
我已将文章选项设置为显示前端图像,但我只看到了文本。
这是我在文章编辑器中看到的...
这是我在网站上看到的...
如您所见,只显示了文本
我找到了解决此问题的方法。看来 Joomla 正在剥离文章介绍文本中的 img 标签。
我在帮助文件中找到了这个函数...
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;
}
通过注释掉 strip_tags 函数,我可以将 img 标签重新添加到我的文章中。对我来说这似乎是一种 hack 方法,但它确实有效。
我正在使用 Joomla 3.4.3,我有一篇文章包含以下代码..
<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>
我已将文章选项设置为显示前端图像,但我只看到了文本。
这是我在文章编辑器中看到的...
这是我在网站上看到的...
如您所见,只显示了文本
我找到了解决此问题的方法。看来 Joomla 正在剥离文章介绍文本中的 img 标签。
我在帮助文件中找到了这个函数...
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;
}
通过注释掉 strip_tags 函数,我可以将 img 标签重新添加到我的文章中。对我来说这似乎是一种 hack 方法,但它确实有效。