Since the Content Islands feature in 6.5.x is worthless, I decided to write my own RSS generator that rips post info out of the Threads database. It works pretty well, but I've run into some inconsistencies decoding HTML entities with html_entity_decode().
Does Threads use its own encode/decode functions that I could incorporate into my script, or do I just have to live with the discrepancies? I've looked through ubbt.inc.php and showthreaded.php and haven't found anything definitive.
Also, I'd like the RSS feed to bump posts that have been edited to the top of the feed. However, I can't account only for edits, since not all new posts are edited. Is there a way to account for both in one SQL query? Or do I have to do two queries (edits and non-edits) and merge-sort them into an array while throwing out any duplicates?
Here is my SQL query:
SELECT U_Username,U_Number,Bo_Keyword,Bo_Title,B_Board,B_Main,B_Posted,B_LastEdit,B_Subject,B_Body,B_PosterId
FROM w3t_Posts,w3t_Boards,w3t_Users
WHERE w3t_Posts.B_Board NOT IN (--list of forums for the RSS to ignore--)
AND w3t_Posts.B_Board LIKE w3t_Boards.Bo_Keyword
AND w3t_Posts.B_PosterId LIKE w3t_Users.U_Number
ORDER BY -B_Posted LIMIT 20
I'd really like to keep it to one query if at all possible, since this one takes over three seconds and is run 48 times/day.
Thanks!
Last edited by paradox183; 04/04/2006 1:02 PM.