miniBB ® 

miniBB

®
Support Forums
  
 | Start | 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: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
Partaker
#3 | Posted: 3 Aug 2005 14:01 
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
Active Member
#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
Active Member
#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 ?
 Share Topic's Link

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


  ?
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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑