News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Remove Child Boards

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

Previous topic - Next topic

savy118

Quote from: savy118 on July 02, 2011, 06:55:41 PM
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.
so really use all mods that are compatible, but any older mods make sure theme is updated in all themes unles i choose people to stick to one.
"please tel me ive got it" LOL..

thanks for your suppport


regards


savy..

The Wizard

How can I get the package manager to accept this mod on smf 1.1.15?

thanks

S3NTYN3L

Updated package for SMF 1.1.15, SMF 2.0.1 compatibility

The Wizard

This mod only affects the index/ main page.

What if I wanted to make child board disappear inside a child board? Any idea what code I would need to add and where? I'm using version 1.1.15.

Thanks

The Wizard

S3NTYN3L

Quote from: The Wizard on November 04, 2011, 02:49:21 PM
This mod only affects the index/ main page.

What if I wanted to make child board disappear inside a child board? Any idea what code I would need to add and where?


As it should.

I've not bothered to test it, but have you tried inserting the ID of the parent, (in your case, that parent would be the first level child), in my mod?
What happens?

I'll have to look into this feature as time permits (and it really doesn't lately).
I didn't bother thinking about this feature because, in v2, an admin can nest MANY children.
I forget if in v1 there was a limit to this. :-\

hcfwesker

I just tried it to test it myself, and it didn't work.  Probably just have to make changes to the sub-boards portion of the code.

S3NTYN3L

Thanks.
I'll look into adding this functionality soon.
I've a lot on my plate right now, so...

S3NTYN3L

Updated package for SMF 1.1.16 & SMF 2.0.2 compatibility.

hcfwesker

#28
Thanx for the update.  Updated without a hitch.

Quote from: S3NTYN3L on November 18, 2011, 11:38:25 AM
Thanks.
I'll look into adding this functionality soon.
I've a lot on my plate right now, so...

Just going to add, the same code for BoardIndex.template.php can be added to MessageIndex.template.php and it will work.  just tested.

Find
foreach ($context['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();


Just add this to the install.xml

<file name="$themedir/MessageIndex.template.php">
<operation>
<search position="before"><![CDATA[ foreach ($context['boards'] as $board)
{]]></search>
<add><![CDATA[
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();]]></add>
</operation>


</file>

S3NTYN3L

Thanks hcfwesker, I completely forgot about looking into that.

I've updated the mod to reflect your changes...

studiowi33

Hi all-

Running 2.0.2 and using a Curve variant theme (Prince of Darkness) and I get this when I try to install. Normally, I'd just manually install, but this might be the first time I've ever seen a error message quite like this.
Any ideas?

-s.w
SMF 2.0.2

hcfwesker

Yeah, I can see something went wrong with how the files are spelled out incorrectly.  English, should be english , and Template should be template in both cases.


S3NTYN3L


studiowi33

SMF 2.0.2

Srinib

This should be a rather very simple question. But i am very new to these MODs.

I was trying to download this package by Admin » Package Manager » Download Packages.
When i Browse the Package servers section, i am not able to find this package with the name Remove Child Boards.

What went wrong?
Am i following the correct procedure?Or am i looking for the wrong Mod Name?

I want this MOD for 2.0.2.

TheListener

Quote from: Srinib on April 28, 2012, 04:40:18 PM
This should be a rather very simple question. But i am very new to these MODs.

I was trying to download this package by Admin » Package Manager » Download Packages.
When i Browse the Package servers section, i am not able to find this package with the name Remove Child Boards.

What went wrong?
Am i following the correct procedure?Or am i looking for the wrong Mod Name?

I want this MOD for 2.0.2.

Are you saying you have downloaded the mod or don't know how to?

Srinib

Quote from: Old Fossil on April 28, 2012, 04:47:39 PM
Quote from: Srinib on April 28, 2012, 04:40:18 PM
This should be a rather very simple question. But i am very new to these MODs.

I was trying to download this package by Admin » Package Manager » Download Packages.
When i Browse the Package servers section, i am not able to find this package with the name Remove Child Boards.

What went wrong?
Am i following the correct procedure?Or am i looking for the wrong Mod Name?

I want this MOD for 2.0.2.

Are you saying you have downloaded the mod or don't know how to?

I havenot downloaded the mod. I want to download.
But when i follow the above procedure, I am unable to search this MOD with the file name Remove Child Boards.

TheListener

The section you want is Package to Upload:

The mod has to be downloaded to your desktop first.

Srinib

It was so funny i never thought of that. I kept browsing the download packages.
Thanks a lot.

YourFanfiction

Hi,

I've just tried to install this mod and got this error message come up:

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

and then these messages with the files:

1.   Execute Modification   ./Themes/default/languages/Modifications.English.php   File not found
2.   Execute Modification   ./Sources/ModSettings.php   Test successful
3.   Execute Modification   ./Themes/default/BoardIndex.Template.php   File not found
4.   Execute Modification   ./Themes/default/MessageIndex.Template.php   File not found

I've got SMF version 1.1.16 - any idea what I'm doing wrong?

Advertisement: