Changeset 1732
- Timestamp:
- 06/09/07 23:29:34 (16 months ago)
- Files:
-
- 1 modified
-
trunk/gregarius/plugins/rssview.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/plugins/rssview.php
r1443 r1732 30 30 /// Author: Marco Bonetti 31 31 /// Description: Adds a RSS link to the header and the footer of each page 32 /// Version: 0. 632 /// Version: 0.7 33 33 34 34 /** … … 37 37 * 0.5 - Adapted to the new theme model 38 38 * 0.6 - Don't put a link in admin and other locations 39 * 0.7 - Show ATOM link as well. 39 40 */ 40 41 41 function __rss_view_url( ) {42 function __rss_view_url($type = "rss") { 42 43 $url = guessTransportProto() . $_SERVER['HTTP_HOST']; 43 44 $url .= $_SERVER["REQUEST_URI"]; 44 45 45 46 if (strstr($_SERVER['REQUEST_URI'],"?") !== FALSE) { 46 $url .= "&media= rss";47 $url .= "&media=$type"; 47 48 } else { 48 $url .= "?media= rss";49 $url .= "?media=$type"; 49 50 } 50 51 $url .= __rss_view_post2get(); … … 69 70 if (!defined('RSS_FILE_LOCATION')) { 70 71 echo "<span><a href=\"".__rss_view_url()."\">RSS</a></span>\n"; 72 echo "<span><a href=\"".__rss_view_url("atom")."\">Atom</a></span>\n"; 71 73 } 72 74 return $dummy; … … 76 78 if (!defined('RSS_FILE_LOCATION')) { 77 79 echo "\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".__rss_view_url()."\" />\n"; 80 echo "\t<link rel=\"alternate\" type=\"application/atom+xml\" title=\"Atom\" href=\"".__rss_view_url("atom")."\" />\n"; 78 81 } 79 82 return $dummy;
