The following code would fix it, I would make a patch but no time.The following code would fix it, I would make a patch but no time.

The documentation for the l function (not word) can be found at the following url:

http://drupaldocs.org/api/4.6/function/l


l("<img src=\"misc/xml.png\" alt=\"XML Feed\"\>",'article/feed',array(),NULL,NULL,FALSE,TRUE)

Comments

druvision’s picture

I've made a temporary fix by removing the "l" arround the PNG.
This causes www.example.com/article to get displayed correctly.

/*        $body = theme('box', variable_get('article_recent_box_title', t('Latest Articles')), module_invoke('node', 'title_list', article_get_latest(variable_get('article_recent_display', '5')), '') . theme('more_info', l("<img src=\"misc/xml.png\" alt=\"XML Feed\" \>", 'article/feed'))); */

        $body = theme('box', variable_get('article_recent_box_title', t('Latest Articles')), module_invoke('node', 'title_list', article_get_latest(variable_get('article_recent_display', '5')), '') . theme('more_info', "<img src=\"misc/xml.png\" alt=\"XML Feed\" \>"));

Can somebody review the correction and enter it into the CVS?

Thanks

Amnon

sami_k’s picture

This is the proper fix, replace line 162 with this:

$body = theme('box', variable_get('article_recent_box_title', t('Latest Articles')), module_invoke('node', 'title_list', article_get_latest(variable_get('article_recent_display', '5')), '') . theme('more_info', l("Only local images are allowed. ng\" alt=\"XML Feed\"\>",'article/feed',array(),NULL,NULL,FALSE,TRUE)));

mhutch’s picture

Even better, use the proper theming functions. Replace line 162 with

body = theme('box', variable_get('article_recent_box_title', t('Latest Articles')), module_invoke('node', 'title_list', article_get_latest(variable_get('article_recent_display', '5')), '') . theme_xml_icon('article/feed'));

jose reyero’s picture

StatusFileSize
new941 bytes
mhutch’s picture

StatusFileSize
new868 bytes

Here's a better patch using the theme_xml_icon function instead.

jose reyero’s picture

Agreed, it is a better patch

JuniorZ’s picture

Using the Drupal API

        $body = theme('box', variable_get('article_recent_box_title', t('Latest Articles')), module_invoke('node', 'title_list', article_get_latest(variable_get('article_recent_display', '5')), '') . theme('xml_icon', url('article/feed')));

This is my one.

smartango’s picture

.. and this is my one,
$body = theme('box', variable_get('article_recent_box_title', t('Latest Articles')), module_invoke('node', 'title_list', article_get_latest(variable_get('article_recent_display', '5')), '') . theme('more_info', l(theme_image("misc/xml.png", $alt = 'XML Feed',
'Articles Feed', NULL, TRUE), 'article/feed',NULL,NULL,NULL,FALSE,TRUE)));

I think using theme_image is better, though using configuration var is good too

sami_k’s picture

Status: Needs review » Closed (fixed)

i am going to close this as we're moving to 4.7... reduce the cruft, i think the people who needed it fixed got their versions fixed.