miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Latest Discussions List without closed Topics ?

Author LuZiFeR
Registered
#1 | Posted: 3 Aug 2005 00:02 
Is there a solution, to show only OPEN Threads in the 'Last-Reply-List' ? :)

Author Team
8-)
#2 | Posted: 3 Aug 2005 10:13 
Open bb_func_ldisc.php for editing and find this line:

if($cols=db_simpleSelect(0, $Tt, 'topic_id, topic_title, topic_poster, topic_poster_name, topic_time, forum_id, posts_count, topic_last_post_id','','','',$orderBy,$viewlastdiscussions)){

change it to this:

if($cols=db_simpleSelect(0, $Tt, 'topic_id, topic_title, topic_poster, topic_poster_name, topic_time, forum_id, posts_count, topic_last_post_id','topic_status','=','0', $orderBy, $viewlastdiscussions)){

Author LuZiFeR
Registered
#3 | Posted: 3 Aug 2005 14:01 | Edited by: LuZiFeR 
Thank you very much....

Now it is easier to find urgent Threads.... :)

Author Team
8-)
#4 | Posted: 3 Aug 2005 14:24 
So, are you having so much closed threads? :-)

Author tom322
Registered
#5 | Posted: 20 Nov 2009 13:57 
OK, a few years later I tried this solution, but it didn't work correctly. It's most likely because of a change in this request; currently the request in bb_func_ldisc.php is:

if($cols=db_simpleSelect(0, $Tt, 'topic_id, topic_title, topic_poster, topic_poster_name, topic_time, forum_id, posts_count, topic_last_post_id, topic_views, topic_last_post_time, topic_last_poster','','','',$orderBy,$viewlastdiscussions)){

----

When I changed it to:

if($cols=db_simpleSelect(0, $Tt, 'topic_id, topic_title, topic_poster, topic_poster_name, topic_time, forum_id, posts_count, topic_last_post_id, topic_views, topic_last_post_time, topic_last_poster','topic_status','=','0',$orderBy,$viewlastdiscussions)){

then only admin/mod could see the latest discussions and other users (both guests and logged-in) couldn't see the latest discussions list at all.

What is the correct way of doing this change? :) Thank you.

Author Paul
Lead Developer
#6 | Posted: 23 Nov 2009 10:18 
I'm not sure how admin or moderators could be involved here, because definitely this request works for everybody?

Anyway, for this condition working correctly, you also must change this code:

if ($closedForums!='n') $xtr=getClForums($closedForums,'where','','forum_id','and','!='); else $xtr='';

to this:

if ($closedForums!='n') $xtr=getClForums($closedForums,'and','','forum_id','and','!='); else $xtr='';


Author tom322
Registered
#7 | Posted: 23 Nov 2009 10:26 
Works well, thanks Paul!

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Latest Discussions List without closed Topics ? Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB