PDA

View Full Version : about RSS Feed


io
02-21-2005, 03:10 PM
hi, there.

now i succeeded in feeding RSS on my private site, and checked it by sage with Firefox. it looks fine.

here is my question;

how can i limit the number of the posts shown on the RSS Reader?

now i can see all the posts on the sage. i want to limit the number (more or less 10 posts).

does anyone know about it?

blinking8s
02-21-2005, 03:17 PM
I believe you replace (could be wrong)


$query = mysql_query("select id,datetime,headline,body,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') order by datetime desc");


with


$query = mysql_query("select id,datetime,headline,body,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') order by LIMIT 0,10 datetime desc");


on index.php line....errr...near 400 i think

well, that would limit it to 10 (if it works)

io
02-21-2005, 04:29 PM
hi, blinking8s! Thank you for your reply.

yes, i've tired what you taught me.

this is the result;

<rss version="2.0">
<channel>
<title>fotoecco</title>
<link>http://ecco.mond.jp/fotoblog/</link>
<description>fotoecco photoblog</description>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>

<generator>pixelpost</generator>

</channel>
</rss>

it doesn't seem to work correctly. i checked my sage on Firefox and found that there's no entry shown.

steff
02-22-2005, 12:10 PM
damn... it's true, the RSS feed returns all posts!
I checked your nice 88:88 blog, the feed shows 84 photos...
can anyone fix it? I think 10 posts, or a selectable value, will match the needs of feed-reader users :)

blinking8s
02-23-2005, 11:09 AM
whoops...here you go

$query = mysql_query("select id,datetime,headline,body,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') order by datetime desc limit 10");

works fine now

http://blog.blinking8s.com/?x=rss

io
02-24-2005, 02:26 AM
whoops...here you go

$query = mysql_query("select id,datetime,headline,body,image from ".$pixelpost_db_prefix."pixelpost where (datetime<='$cdate') order by datetime desc limit 10");

works fine now

http://blog.blinking8s.com/?x=rss

Beauuuutiful! Thank you, blinking8s!

io