Changeset 1426
- Timestamp:
- 03/23/07 12:50:40 (2 years ago)
- Files:
-
- feedmelinks/folder-as-rss.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/folder-as-rss.php
r1334 r1426 1 < %2 Header( "Content-type: text/ plain");1 <?php 2 Header( "Content-type: text/xml"); 3 3 # $Id$ 4 4 … … 61 61 if( ! $isPrivate ) { 62 62 $pubFolder = true; 63 $singleGroupName = substr( $singleGroupName, 2, strlen( $singleGroupName ) );64 63 } 65 64 $whereClause = " WHERE … … 100 99 } 101 100 102 $title = $owner . "'s " . $singleGroupName . " - a FeedMeLinks public " . getCatName() . "";103 %>104 < !-- <%= "?" %>xml version="1.0"?>101 $title = $owner . "'s " . $singleGroupName . " tag - FeedMeLinks"; 102 ?> 103 <<?= "?" ?>xml version="1.0"?> 105 104 <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd"> 106 <rss version="0.91" -->105 <rss version="0.91"> 107 106 <channel> 108 <title>< %= $errors ? "private " . getCatName() : $title %></title>109 <description>< %= $errors ? "this " . getCatName() . " is not available as RSS" : $title %></description>110 <managingEditor>< %= getEmailAddressForUser( $owner ) %></managingEditor>111 <webMaster>< %= get_spamsafe_email() %></webMaster>112 <link>< %= $site %></link>107 <title><?= $errors ? "private " . getCatName() : $title ?></title> 108 <description><?= $errors ? "this " . getCatName() . " is not available as RSS" : $title ?></description> 109 <managingEditor><?= getEmailAddressForUser( $owner ) ?></managingEditor> 110 <webMaster><?= get_spamsafe_email() ?></webMaster> 111 <link><?= $site ?></link> 113 112 <language>en-us</language> 114 < %113 <?php 115 114 if( ! $errors ) { 116 115 … … 148 147 $lastMod = formatTS( mysql_result($q,$i,"lastMod")); 149 148 $isPrivate = mysql_result($q,$i,"isPrivate"); 149 150 150 151 151 if( $id == $hotRow ) { $bg = "bgcolor='red'"; } else { … … 155 155 $bg = "bgcolor='#ffffff'"; 156 156 } 157 %>158 < %157 ?> 158 <?php 159 159 if( strlen( $name ) > $MAX_NAME_LENGTH ) 160 160 $displayName = substr( $name, 0, $MAX_NAME_LENGTH ) . "..."; … … 168 168 $name = htmlentities( $name ); 169 169 $url = preg_replace( "/&/", "&", $url ); 170 %> 170 171 if( $isPrivate && $u != $owner ) { 172 $i++; 173 continue; 174 } 175 176 ?> 171 177 <item> 172 <title>< %= $displayName %></title>173 <link>< %= $url %></link>174 <description>< %= $name %></description>175 < %if( $showURLs ) {178 <title><?= $displayName ?></title> 179 <link><?= $url ?></link> 180 <description><?= $name ?></description> 181 <?php if( $showURLs ) { 176 182 $tmpurl = $url; 177 183 $tmpurl = str_replace ( "http://", "", $tmpurl); … … 181 187 if( strlen( $tmpurl ) > $MAX_URL_LENGTH ) 182 188 $tmpurl = substr( $tmpurl, 0, $MAX_URL_LENGTH ) . "..."; 183 %>184 <a href="/t/< %= $id %>"><%= $tmpurl %></a>185 < % } %>186 < % // <pubDate>%= $createDate %</pubDate> %>189 ?> 190 <a href="/t/<?= $id ?>"><?= $tmpurl ?></a> 191 <?php } ?> 192 <?php // <pubDate>%= $createDate %</pubDate> ?> 187 193 </item> 188 < %194 <?php 189 195 $i++; 190 196 } 191 197 conClose( $con_folderAsRss ); 192 198 } // echo "that group's empty, bucko.<br>"; 193 %>194 195 < %199 ?> 200 201 <?php 196 202 } else { 197 %>203 ?> 198 204 199 205 <item> 200 206 <title>PRIVATE FOLDER</title> 201 <link>< %= $site %>/list-public</link>202 <description> < %= $errorMesg %> </description>207 <link><?= $site ?>/list-public</link> 208 <description> <?= $errorMesg ?> </description> 203 209 </item> 204 210 205 < % } %>211 <?php } ?> 206 212 207 213 </channel> 208 214 </rss> 209 < %215 <?php 210 216 } 211 %>212 213 < % if( !$errors && !$i ) { %>214 this < %= getCatName() %>'s empty.215 216 view <a href="/list-public">other < %= getCatsName() %></a>.217 < % } %>218 219 220 217 ?> 218 219 <?php if( !$errors && !$i ) { ?> 220 this <?= getCatName() ?>'s empty. 221 222 view <a href="/list-public">other <?= getCatsName() ?></a>. 223 <?php } ?> 224 225 226