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?