FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » 2.6.x Recent posts list with date and time
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
2.6.x Recent posts list with date and time [message #20639] Fri, 22 October 2004 14:51 Go to previous message
Wild_Cat is currently offline  Wild_Cat   Ukraine
Messages: 144
Registered: November 2002
Location: Odessa, Ukraine
Karma:
Senior Member
I make a topic apart since it was buried into a large theme
There was a code to pull a desired number of posts onto any page written for version 2.5.x
The code is here: http://fudforum.org/forum/index.php?t=tree&th=591&mid=12061&&am p;rev=&reveal=

But due to the changes in DB structure in 2.6.x versions it doesn't work any more. I made a quick modification so that it does works, but I have certain questions for the developers of FUD to make sure the posts list is pulled right taking into consideration all restictions, please:

1)
Old query:
SELECT resource_id FROM ".$tbl."group_cache 
                         WHERE user_id=0 AND p_READ='Y'

New query:
SELECT resource_id FROM ".$tbl."group_cache 
                         WHERE group_id=0

Question:
Where the check for read permission did go so that it could be considered in the query?

2)
Old query segment causing troubles:
WHERE
".$tbl."thread.forum_id IN (".$lm.") AND                                        
".$tbl."msg.approved='Y'

New Query:
WHERE
".$tbl."thread.forum_id IN (".$lm.") AND 
".$tbl."msg.apr=1

Question:
I am not sure that apr field takes track if the message was approved... What does?

If those questions answered, I will post the new code working for 2.6.x database structure. For now this quick hack is working here: http://avalon.net.ua/forum.php (russian language) with FUDforum 2.6.7

Another helpful improvement would be to know how the links to the thread or message are generated, so that the hardcoded link would change e.g. for path_info style template automatically depending on forum preferences (if possible at all? or easier to change the url bu hand when the change is made? not too often anyway). OR is it better I remember for security reasons to give link just to rview and is uid=0 needed for security set as 0 in this link?


Lady of Avalon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon4.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Extra User Info
Next Topic: Email Participation patch
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 05:13:18 GMT 2024

Total time taken to generate the page: 0.04372 seconds