miniBB ®

miniBB

®
Support Forums
  
 · Start · Sign in · Register · Search · Statistics · File Bank · Manual ·
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Latest Discussions List without closed Topics ?

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

Author Team
8-)
#2 · Posted: 3 Aug 2005 10:13Reply Quote
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
Partaker
#3 · Posted: 3 Aug 2005 14:01Reply Quote
Thank you very much....

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

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

Author tom322
Active Member
#5 · Posted: 20 Nov 2009 13:57Reply Quote
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 Lead Developer
#6 · Posted: 23 Nov 2009 10:18Reply Quote
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
Active Member
#7 · Posted: 23 Nov 2009 10:26Reply Quote
Works well, thanks Paul!

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Latest Discussions List without closed Topics ?
 Share Topic's Link

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

BB code for the Bold StyleBB code for the Italic StyleBB Code for the PictureBB code for the URLUpload a File

  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the File and Picture Attachments add-on: extend your miniBB-forums, attaching images and files.