2005-01-09, 09:15 PM
I would like to request a change in the RSS.PHP
RSS-feed that would show the top x amount of threads in a given forum together with some 100 chars from the beginning followed by something like "... READ MORE" with the read more being obviously a link to the thread in the forums... If you can make the 100chars flexible so it works something like "Find first " " in 'message' starting from char 100...and make the post-preview to cut there instead of a middle of a word...I already did myself something 'like' that at www.uwpiaa.org/kimmosql.php with query:
SELECT tid, pid, mid( message, 1, 200)
FROM posts
WHERE fid = '37'
GROUP BY tid
ORDER BY tid DESC, pid DESC
LIMIT 0,1
actually I wanted to put min(pid) there as well to only bring the first post of the thread since that usually has the 'beef' of the thread and therefore is the most important...but I couldn't get it working properly...so I went around it with the ORDER BY and LIMIT -thingies...however this seems to be as a very inefficient query as it's pulling every row and then just throwing away all but one row...
So if you could hack me a new rss.php, I would be very grateful! If I had this, I could give other webmasters in our association the link to the RSS-feed and they could incorporate it on their site very easily without having to rely on my design that I set on my kimmosql.php -page.
Cheers,
Kimmo
RSS-feed that would show the top x amount of threads in a given forum together with some 100 chars from the beginning followed by something like "... READ MORE" with the read more being obviously a link to the thread in the forums... If you can make the 100chars flexible so it works something like "Find first " " in 'message' starting from char 100...and make the post-preview to cut there instead of a middle of a word...I already did myself something 'like' that at www.uwpiaa.org/kimmosql.php with query:
SELECT tid, pid, mid( message, 1, 200)
FROM posts
WHERE fid = '37'
GROUP BY tid
ORDER BY tid DESC, pid DESC
LIMIT 0,1
actually I wanted to put min(pid) there as well to only bring the first post of the thread since that usually has the 'beef' of the thread and therefore is the most important...but I couldn't get it working properly...so I went around it with the ORDER BY and LIMIT -thingies...however this seems to be as a very inefficient query as it's pulling every row and then just throwing away all but one row...
So if you could hack me a new rss.php, I would be very grateful! If I had this, I could give other webmasters in our association the link to the RSS-feed and they could incorporate it on their site very easily without having to rely on my design that I set on my kimmosql.php -page.
Cheers,
Kimmo