miniBB ®

miniBB

®
Support Forums
  
 · Start · Sign in · Register · Search · Statistics · File Bank · Manual ·
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /  
 

First Page News

 
 
Page  Page 9 of 9 :  « Previous  1  2  3  4  5  6  7  8  9

Author marsbar
Associated Member
#121 · Posted: 24 Sep 2026 16:20
Hi, Paul.

Is there a way to configure addon_1stpagenews.php so that locked topics are excluded from the topics displayed by the add-on?

With thanks,
marsbar

Author Paul
Lead Lead Developer
#122 · Posted: 24 Sep 2026 16:23
Yes, there is such a way — modify addon_1stpagenews.php and locate the following line of code (it's approx. line #75):

if($res=db_simpleSelect(0, $Tt, 'topic_id, topic_title, topic_poster_name, topic_time, topic_last_post_id, forum_id, posts_count, topic_time, topic_last_poster', $tw, $te, $tv, $sort, $limit)){
Extend it with the following code:

if($res=db_simpleSelect(0, $Tt, 'topic_id, topic_title, topic_poster_name, topic_time, topic_last_post_id, forum_id, posts_count, topic_time, topic_last_poster', $tw, $te, $tv, $sort, $limit, 'topic_status', '!=', 1)){

Author marsbar
Associated Member
#123 · Posted: 24 Sep 2026 17:01
Hi, Paul.

Thanks for the code. I have tried the change; but unfortunately, the entire forum feed disappears from the homepage!

Any idea why this might be happening?

Thanks again!
marsbar

Author Paul
Lead Lead Developer
#124 · Posted: Yesterday 14:13
marsbar:
I have tried the change; but unfortunately, the entire forum feed disappears from the homepage!
This could only mean you've made some mistake.
Make sure you exactly follow the provided code, there should be a comma after $limit.

I'm pretty sure the code works, tested it on my local host a few times.

Author marsbar
Associated Member
#125 · Posted: Yesterday 17:45
I am sure you are right, Paul! However, I have copied exactly as provided, including the comma after $limit. I have just checked the line in my file again:
if($res=db_simpleSelect(0, $Tt, 'topic_id, topic_title, topic_poster_name, topic_time, topic_last_post_id, forum_id, posts_count, topic_time, topic_last_poster', $tw, $te, $tv, $sort, $limit, 'topic_status', '!=', 1)){
The curious thing is that when I restore the original code, the topics appear on the homepage again--including the locked topics. So the news feed itself is working; it is only the modified code that stops any topic from appearing!

I have two separate First Page News add-on PHP files on the homepage: addon_1stpagenews.php and addon_1stpagenews-x.php. The first pulls topics from Forum X and is working normally. The second pulls topics from Forum Y, and that is the one I am trying to modify to exclude locked topics.

When I restore the original code in addon_1stpagenews-x.php, the Forum Y topics appear again, including the locked topics. With the modified code, none of the Forum Y topics appear. The Forum X file continues to work normally.

I am not sure what I am missing. :(

— marsbar

Page  Page 9 of 9 :  « Previous  1  2  3  4  5  6  7  8  9 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /
 First Page News
Share Link 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
Get the File and Picture Attachments add-on: extend your miniBB-forums, attaching images and files.


⇑