【问题标题】:Joomla 3.4.3 article intro images not showingJoomla 3.4.3 文章介绍图片未显示
【发布时间】:2015-09-12 22:59:50
【问题描述】:

我使用的是 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>

我已设置文章选项以显示前端图像,但我只显示文本。

这是我在文章编辑器中看到的...

这就是我在网站上看到的...

如您所见,仅显示文本

【问题讨论】:

  • ../images/demo_preview/about/about1.png`?
  • 这对前端没有影响。在后端,我得到了找不到图像的图标。图片网址似乎很好。这只是 img 标签甚至没有通过,只是 P 标签。
  • 你能把你的观点打印出来吗?
  • 这是所见即所得的编辑器吗?
  • 是的,我正在使用 Tiny MCE

标签: php image joomla content-management-system


【解决方案1】:

我找到了解决此问题的方法。看来 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 方法,但它确实有效。

【讨论】:

  • @jamperz77 这个帮助文件的位置是什么?我面临同样的问题?可以告诉我位置吗?
猜你喜欢
  • 2014-09-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-08-23
  • 1970-01-01
  • 2020-03-25
  • 2015-12-17
  • 2017-11-17
相关资源
最近更新 更多