PDA

View Full Version : Limit threads to one per forum in forum thread sideblock


jimsflies
05-03-2013, 02:20 PM
I would like to only allow one thread to display per forum in the forums selected to display in the recent "forum thread sideblock".

Any assistance would be appreciated.

kh99
05-03-2013, 05:26 PM
I believe the code for that is in includes/block/thread.php, function getData(). I don't know how to do what you describe in SQL (but I'm not an expert so maybe there is a way). But I think what you could do is remove the LIMIT from the query, then change the while loop to save an array of forum ids for which you have already found a thread and skip records when needed, and keep a counter of threads found so you can stop when you get to intval($this->config['threads_limit']).