2

我有以下格式的提要链接

<item>
<title>Lorum ipsum</title>
<teaser>Lorum ipsum</teaser>
<description>Lorum ipsum</description>
<link>http://www.example.com/article/?ad=1</link>
<image>http://www.example.com/image/123456/248x500?.cached</image>
<author>noreply@example.com</author>
<pubDate>Wed, 2 May 2012 14:22:24 +0200</pubDate>
<guid isPermaLink="false">http://www.example.comARTICLE12345678</guid>
</item>

我试图将标签内的图像抓取到 Drupal 中的一个单独字段,但到目前为止没有任何效果。尝试了许多教程,但除了图像,一切都被保存了。

有什么解决办法?非常感谢

萨蒂什

4

1 回答 1

0

如果您使用自定义 PHP 代码生成此提要,则可以将图像嵌入description标签内。

$description = "Lorum ipsum" . "<br />";
$description .= check_plain("<img alt='' src='PATH_TO_IMAGE' />");

希望这会有所帮助……穆罕默德。

于 2012-06-12T09:06:13.307 回答