Remove Child Boards

Started by S3NTYN3L, January 15, 2011, 12:25:04 PM

Previous topic - Next topic

S3NTYN3L

Link to Mod


Remove Child Boards

Latest Version: 2.3.4
Compatible With SMF: 1.1.X, 2.X


Summary


This mod prevents child boards from appearing in their parent's index.
Children still show as normal inside their parent boards.

If you want to selectively remove child boards:
You simply provide the ID number of the parent whose children you want removed.

In SMF 1.1.X, the option can be found at: Admin > Features and Options > Remove Child Boards
In SMF 2.X, the option can be found at: Admin > Configuration > Modification Settings > Remove Child Boards



Changelog

+06/11/2013 - Updated package for SMF 1.1.18 & SMF 2.0.4 compatibility
+01/29/2012 - Extended functionality to include sub-boards and updated package for SMF 1.1.16 & SMF 2.0.2 compatibility
+10/08/2011 - Updated package for SMF 1.1.15 & SMF 2.0.1 compatibility
+06/12/2011 - Updated package for SMF 1.1.14 & SMF 2.0 compatibility
+02/21/2011 - Updated package for SMF 1.1.13, SMF 2.0 RC4 Security Patch & SMF 2.0 RC5 compatibility
+01/01/2011 - Corrected code in attempt to keep errors from occurring
+12/31/2010 - Added option to selectively Remove Child Boards
+12/18/2010 - Added option to enable/disable Remove Child Boards
+12/14/2010 - Created mod for SMF



Files effected by this mod

SMF 1.1.X
./$languagedir/Modifications.English.php
./$sourcedir/ModSettings.php
./$themedir/BoardIndex.Template.php
./$themedir/MessageIndex.Template.php

SMF 2.X
./$languagedir/Modifications.English.php
./$sourcedir/Admin.php
./$sourcedir/ManageSettings.php
./$themedir/BoardIndex.Template.php
./$themedir/MessageIndex.Template.php



S3NTYN3L

No idea...
Why would it?

This mod only prevents the child boards from displaying on the forum index, nothing else (ie; site map, etc) gets touched.

Blade_Runner

Quote from: S3NTYN3L on January 20, 2011, 10:53:35 AM
No idea...
Why would it?

This mod only prevents the child boards from displaying on the forum index, nothing else (ie; site map, etc) gets touched.

I have read somewhere that the more links for the forum, the better it is for SEO. Not sure if it is true. That is why I asked.

Bigguy

The more links you have pointing to your site from other sites is better for you but this mod has nothing to do with that. :)

S3NTYN3L

Thanks for the assist on the SEO question, Bigguy. ;)

Bigguy


hcfwesker

Thank You Thank you Thank You!!!!!

I've been asking for THIS exact feature since back in July, wish I would have found this the minute it was released. :)

http://www.simplemachines.org/community/index.php?topic=392416.msg2716219#msg2716219

Works like a charm :)  you have a new fan, S3NTYN3L!!!


S3NTYN3L


S3NTYN3L

Updated package for SMF 1.1.13, SMF 2.0 RC4 Security Patch & SMF 2.0 RC5 compatibility

mrkid

Great mod. I've been looking for this for a while! Loaded automatically with no issues on all my themes for RC5. That doesn't happen often ;D

Joker™

Nice mod specially for forums having too many child boards. Great work S3NTYN3L.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

S3NTYN3L

Thanks for the flowers guys. ;) :-*



Updated package for SMF 1.1.14, SMF 2.0 compatibility

savy118

Nice little mod, im just wondering tho as im thinking of installing a new theme and that is how to edit a mod to work with a theme, do i edit remove child boards mod or the actual smf forum mod, and if i have another mod installed to edit can i only make the one mod compatible or both.

thanks for your time

savy  :D

hcfwesker

#14
Quote from: savy118 on June 30, 2011, 05:19:37 PM
Nice little mod, im just wondering tho as im thinking of installing a new theme and that is how to edit a mod to work with a theme, do i edit remove child boards mod or the actual smf forum mod, and if i have another mod installed to edit can i only make the one mod compatible or both.

thanks for your time

savy  :D

To make the edits to another theme, just Parse the package on the MOD page, and follow the instructions on your custom/added themes for

Themes/theme name/BoardIndex.template.php

Which would be this one and only, simple edit ;)

Find
foreach ($category['boards'] as $board)
{


Add AFTER

global $modSettings, $context;

if (!isset($context['kill']))
$context['kill'] = empty($modSettings['kill_some_children']) ? array() : explode(",", $modSettings['kill_some_children']);

if (!empty($modSettings['kill_all_children']) || in_array($board['id'], $context['kill']))
$board['children'] = array();


I hope that's what you were asking.

and, to add, installed perfectly on SMF 2.0.  Still one of the most necessary MOds on my site, thenk you again, S3NTYN3L

Also, you need a link to the MOD in the first post ;)



S3NTYN3L

Quote from: hcfwesker on June 30, 2011, 06:19:50 PM
To make the edits to another theme, just Parse the package on the MOD page, and follow the instructions on your custom/added themes for

<snip>

v2 allows for install to different themes via a checkbox, no? :-\


Quote from: hcfwesker on June 30, 2011, 06:19:50 PM
Also, you need a link to the MOD in the first post ;)

Yeah, I just noticed that.
It's fixed now.

hcfwesker

Quote from: S3NTYN3L on July 01, 2011, 11:04:56 AM
v2 allows for install to different themes via a checkbox, no? :-\

Yes.  But the way I read his question, it was if he ADDED a new theme after he installed this MOD.

savy118

hi guys i think i understand now, or correct me if im wrong , so no mater what mod we have rc5 or 2.0 gold we should have the theme for those versions but if theme doesnt support them we parse the mod first and see what it says to edit.

thanks savy

hcfwesker

Quote from: savy118 on July 02, 2011, 05:50:30 PM
hi guys i think i understand now, or correct me if im wrong , so no mater what mod we have rc5 or 2.0 gold we should have the theme for those versions but if theme doesnt support them we parse the mod first and see what it says to edit.

thanks savy

Exactly.  One KEY thing to look out for, is any edits that are made to Themes/default/XXXXX files   will also need to be made in your custom theme.  Usually most edits are done in index.template.php or BoardIndex.template.php of your custom/added themes.

savy118

ok thanks a lot i feel more comfortable understanding, i think i will try and make my self run into this problem an give it a try before i go online.

thanks for your suppport

regards


savy..

Advertisement: