Posted by mattbarton.exe on June 11, 2006 at 9:14pm
Jump to:
| Project: | Image Assist |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I'm having a problem with my XML/RSS feeds using img_assist. Here's the feed:
http://armchairarcade.com/neo/node/feed
You'll notice that the images and captions are smushed together at the beginning of each post and disrupt the entry. I can't figure out how to insert a line break between the caption and the beginning of the blog. I've tried posting about this on the forums but got no response...Can anyone here help?
Comments
#1
I think this is a problem with how img_assist positions images. Currently the module use css to align images, so when your img_assist inserted image shows up in a rss reader the css isn't loaded and the image has no position.
I'm not sure what a good solution to this problem would be, but it does effect every img that is inserted into a post using img_assist when viewed in a rss reader.
#2
I'm getting an error "Unable to connect to database server" when I click on your URL. In any case, do you have any suggestions? I haven't worked with images in an RSS feed before.
#3
A quick fix here works by changing in the theme_img_assist_inline function
$output = "";
to
$output = "
";
This works because before the "inline" class had the CSS information in an image assist stylesheet, while here the style attributes are written out directly in the html. If the style attributes are in a stylesheet, and the content is sent off in an RSS feed, and picked up in someone's browser, their browser will not have access to the CSS information, because it would be in a separate file in the first case.
Thanks to Marton for help with this fix.
#4
Sorry, the code did not print -
switch this:
$output = "<span class=\"inline {$attributes['align']}\">";with this:
$output = "<p style=\"padding: 5px; float: {$attributes['align']};\">";#5
*subscribing*
This needs some attention.
#6
Still an issue in current versions?
#7
@kkaefer You have changed the issue to a different problem. If you want images to work in RSS feeds, they need to have absolute URLs.
#8
This is already fixed in 5.x and 6.x. Image Assist uses absolute URLs there, exactly for this reason.