I've been struggling with image handling in RSS Feeder, but some amended code handed through a support ticket seems to have fixed it. I've no idea
how it fixed it, but it has.
Anyway, I use the awesome Multithumb mambot (
http://tinyurl.com/3dbza3) for image handling on my site - I post 800 x 600 images by default, and this mambot turns them into a thumbnail for the article and links to the hi-res original.
There are two problems:
1. RSS Feeder is obviously ignorant of Multithumb and so just displays the full-size image in the feed.
2. Additional Multithumb modifiers (different size images, etc) require the use of the {multithumb} tag before the {mosimage} it applies to and RSS Feeder was displaying this redundant (for the RSS feed, anyway) information in the feed.
So, I've modified ijoomla_rss.php to fix this, and also to apply some basic wraparound text formatting to the image. The image resizing is a quick kludge, but short of getting RSS Feeder to talk to Multithumb, it's the best I can manage.
So, in ijoomla_rss.php at lines 650, 969 & 1295, replace the code:
for($i=0; $i<$introCount && isset($vect[$i]); $i++){
$pic=substr($vect[$i],0,strpos($vect[$i],".")+4);
$path=$mosConfig_live_site."/images/stories/".$pic;
$img='<img src="'.$path.'" alt="" border="0" />';
/// replace the first occurrence of string {mosimage} with $pic string
$introt=preg_replace('/{mosimage}/', $img , $introt, 1);
}
//// the images from fulltext ###
for($i=$introCount; $i<$len && isset($vect[$i]); $i++){
$pic=substr($vect[$i],0,strpos($vect[$i],".")+4);
$path=$mosConfig_live_site."/images/stories/".$pic;
$img='<img src="'.$path.'" alt="" border="0" />';
$fullt=preg_replace('/{mosimage}/', $img , $fullt, 1);
}
with:
for($i=0; $i<$introCount && isset($vect[$i]); $i++){
$pic=substr($vect[$i],0,strpos($vect[$i],".")+4);
$path=$mosConfig_live_site."/images/stories/".$pic;
$img='<img src="'.$path.'" width="140" align="left" alt="" border="0" />';
/// replace the first occurrence of string {mosimage} with $pic string
$introt=preg_replace('/{mosimage}/', $img , $introt, 1);
/// strip the first occurrence of string {multithumb}
$introt=preg_replace('/{multithumb.*}/', "" , $introt, 1);
}
//// the images from fulltext ###
for($i=$introCount; $i<$len && isset($vect[$i]); $i++){
$pic=substr($vect[$i],0,strpos($vect[$i],".")+4);
$path=$mosConfig_live_site."/images/stories/".$pic;
$img='<img src="'.$path.'" width="140" align="left" alt="" border="0" />';
$fullt=preg_replace('/{mosimage}/', $img , $fullt, 1);
}
I've added a width="140" and align="left" to the image attributes -- these values can obviously be anything you like.
I then look for the first occurrence of the {multithumb} tag and replace it with an empty string. It's pretty simple to amend the code to strip out all {multithumb} tags, too -- I only tend to use it once in the introtext.
All this suggests that it'd be trivial to improve RSS Feeder to include a predefined image size as a variable created in the back-end, so it'd be great to see this in a revision.
It'd also be great if the code could automatically strip out *all* mambot tags by default, leaving just the images.
Anyway, hope this is helpful to someone.