Hide certain forums from "View new topics"

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Get Involved
Locked
PhillM
Registered User
Posts: 4
Joined: Fri Nov 11, 2011 7:53 am

Hide certain forums from "View new topics"

Post by PhillM » Fri Nov 11, 2011 3:42 pm

Would it be possible to make a Mod which allowed the admin to hide certain forums from showing up in the "view new topics" list? Anyone know how to do this?

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Hide certain forums from "View new topics"

Post by 4_seven » Fri Nov 11, 2011 6:13 pm

You mean
View unanswered posts • View unread posts • View new posts • View active topics
?
Current Mods | Mod Base | php(BB) programming | No help via PM

PhillM
Registered User
Posts: 4
Joined: Fri Nov 11, 2011 7:53 am

Re: Hide certain forums from "View new topics"

Post by PhillM » Fri Nov 11, 2011 6:25 pm

Yea that one. Sorry.

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Hide certain forums from "View new topics"

Post by 4_seven » Fri Nov 11, 2011 6:54 pm

open

search.php

find

Code: Select all

            case 'newposts':
                $l_search_title = $user->lang['SEARCH_NEW'];
                // force sorting
                $show_results = (request_var('sr', 'topics') == 'posts') ? 'posts' : 'topics';
                $sort_key = 't';
                $sort_dir = 'd';
                $sort_by_sql['t'] = ($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time';
                $sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');

                gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
                $s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = ''; 
after add

Code: Select all

$ex_fid_ary = array_merge($ex_fid_ary, array(11,12,13)); 
replace the 11,12,13 with all forum-id's, where the View new posts search should take no effect
Current Mods | Mod Base | php(BB) programming | No help via PM

PhillM
Registered User
Posts: 4
Joined: Fri Nov 11, 2011 7:53 am

Re: Hide certain forums from "View new topics"

Post by PhillM » Sat Nov 12, 2011 4:09 pm

Ah! Thank you so much!

Locked

Return to “[3.0.x] MOD Requests”