MyBB Community Forums
Disable forum section in daily post [?] - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Disable forum section in daily post [?] (/thread-223157.html)



Disable forum section in daily post [?] - bananoke - 2019-05-25

Hello guys,

how i can disable the forum section in daily posts? 
I have categories in the forum where i hide all the archive and I would like his posts not to appear in the "daily posts" tab at 

/search.php?action=getnew and /search.php?action=getdaily 


can someone help me ignore certain forum sections in this function?


RE: Disable forum section in daily post [?] - .m. - 2019-05-25

custom permissions can be set for the required user groups for each forum.

forum admin panel >> Forums & Posts >> Forum Management --> edit forum --> permissions (tab)

right side of the group contains edit permissions link.
it pops up custom permissions of that user group for the specific forum

miscellaneous tab consists of search forum option ; un-select & save

[Image: iXXQ0mb.gif]

note: also un-select that option for the guests group & other required groups


RE: Disable forum section in daily post [?] - bananoke - 2019-05-25

thank you for nice solution,
but i wonder if there is possibility to disable it only at functions /search.php?action=getnew and /search.php?action=getdaily

i dont want totaly disable searching topics at forum for this section.


RE: Disable forum section in daily post [?] - .m. - 2019-05-25

^ basically that requires modifying search.php file
[can't check the code right now ..]


RE: Disable forum section in daily post [?] - bananoke - 2019-05-25

probably this is what i looking for, if anyone will have a second to help me modifie it i will be really grateful


RE: Disable forum section in daily post [?] - .m. - 2019-05-26

though I do not recommend modifying the core files, here is a method for your requirement

search.php#L1401 and search.php#L1487

find below code at above two lines
$unsearchforums = get_unsearchable_forums();

after that code line
in a new line , add below code segment
if($unsearchforums) $unsearchforums .= ","; 
$unsearchforums .= "'fid'";  // fid  is forum number of required forum eg. 15 


Note: php files should be saved with utf-8 encoding without Byte Order Mark.
in general, we use editor like Notepad++ or file editor at web host panel to edit the files.