Changeset 17800

Show
Ignore:
Timestamp:
09/03/07 17:15:55 (10 months ago)
Author:
robertaccettura
Message:

For 1.1
- Correctly use home, rather than the site URL.
- Fix minor spacing problem.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • absoluterss/trunk/absoluteRSS.php

    r17798 r17800  
    55Description: Adjusts your links in RSS to use absolute links so that they work correctly in all feed readers (and validate).  GPL Licensed. 
    66Author: Robert Accettura 
    7 Version: 1.0 
     7Version: 1.1 
    88Author URI: http://robert.accettura.com 
    99License: GPL (http://www.gnu.org/licenses/gpl.txt) 
    10 Copyright (C) 2005 Robert Accettura 
     10Copyright (C) 2005-2007 Robert Accettura 
    1111 
    1212This program is free software; you can redistribute it and/or 
     
    2828 
    2929function absoluteRSS($content){ 
    30 global $doing_rss; 
     30    global $doing_rss; 
    3131    if (is_feed() || $doing_rss) { 
    3232        // replace <img src=""/> and <a href=""/> with absolute links 
    33         return preg_replace( "/<(a|img)(.*?)(href|src)=('|\")\/(.*?)('|\")/is", "<\\1\\2\\3=\"".get_settings('siteurl')."/\\5\"", $content); 
     33        return preg_replace( "/<(a|img)(.*?)(href|src)=('|\")\/(.*?)('|\")/is", "<\\1\\2\\3=\"".get_settings('home')."/\\5\"", $content); 
    3434    } 
    3535    // just return content untouched if it's not a feed