How does s9y supply the full path to an image in an rss feed when the image is inserted into the entry as only a relative path?
For example, I have an image that is inserted via the media manager into the entry as "/uploads/myimage1.png". I have done this on both a live site, as well as a test site.
On the test site, the rss2 feed includes the full path to the image, ie "http://mydomain.com/uploads/myimage1.png". However, the exact same entry on a live site only includes the relative path in the rss2 feed, ie "/uploads/myimage1.png". Both are running s9y 1.7.2 and PHP 5.2.17.
Full path to images in rss feed?
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Full path to images in rss feed?
In include/functions_rss.inc.php is the print_entries_rss function that holds this line of code:Don Chambers wrote:How does s9y supply the full path to an image in an rss feed when the image is inserted into the entry as only a relative path?
Code: Select all
$entry['body'] = preg_replace('@(href|src)=("|\')(' . preg_quote($serendipity['serendipityHTTPPath']) . ')(.*)("|\')(.*)>@imsU', '\1=\2' . $serendipity['baseURL'] . '\4\2\6>', $entry['body']);
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/