News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Child Remover

Started by vbgamer45, March 26, 2009, 02:44:30 AM

Previous topic - Next topic

vbgamer45

Link to Mod

This Mod simply removes the Child Boards from being displayed on main page.

At this time only supports for 1.1.8 but a smf 2 version will come shortly.

Thanks to Karl for pointing out an error.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Antechinus

I'm disappointed. I was hoping it would remove annoying brats. ;)

JBlaze

Honestly, I think the only way to prevent little tykes from registering is to have them answer a Trig problem or something complicated like that :P

Here's to wishful thinking >:(
Jason Clemons
Former Team Member 2009 - 2012

TheDisturbedOne

Great MOD, just a couple questions.
I have not installed this, but looking at the template edits, how do we see the child boards if they are deleted from MessageIndex and BoardIndex?
Possibility in the future to pick which boards to show on the BoardIndex?

Can you make a MOD that deletes pesky children? (jk ;) )

kingkingston

Went to install it got these problems
1.     Execute Modification     ./Themes/default/BoardIndex.template.php     Test failed
2.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test failed

how do i fix it

JBlaze

Quote from: kingkingston on March 26, 2009, 08:25:32 PM
Went to install it got these problems
1.     Execute Modification     ./Themes/default/BoardIndex.template.php     Test failed
2.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test failed

how do i fix it

Go the the MODs page
Child Remover

Then, under manual install, denote your SMF version and edit the files that are coming up with errors manually.
Jason Clemons
Former Team Member 2009 - 2012

Joe N

Could I have a screenshot?
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


alexandervba

I have  a question/bug error. Installed it on my theme (not the default one). And it was messed up. Here is a Jpeg picture of it:

The first one is how it looked like before (for 1 forum). And the second one (under the black line) is how it looked after. It looks like it added another column? And it looked bad... How to fix this?


Deaks

this would be because the BoardIndex.template.php is different in this theme to the default, you could try removing the boardindex.template.php from that themes folder
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

alexandervba

removing it didnt work... Cuz then it was entirely ******ed up :s.

Deaks

hmm ill take a look at the themes boardindex and I will see if i can get it working for you, can I ask what theme it is please.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

alexandervba

#11
Hello, thx for ur reply.

We are using a skin called reference. But we have been customizing it a little bit. So here is our current version of the skin.

<link removed by moderator>

thx again for looking into this.

Deaks

thanks I will take a look shortly, I also removed your link  from your post, after I downloaded the file.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Deaks

sorry but the theme Reference by crip doesnt include the files needed to change for this mod to work, please can you attach your boardindex.template.php from your default theme.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

alexandervba

This is how it looks now (The mod is not installed in this case)

http://88.198.48.13/foe/BoardIndex.template.txt

This is how it looks like when I install the mod: (meaning when it looks like I posted in the first post I made)

http://88.198.48.13/foe/BoardIndex.template-with-installed-mod.txt

I changed it to a .txt file so u can read it.

Once again, thx for helping me!

Deaks

can you attach your boardindex.template.php file as an attachment please
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

alexandervba

Attached 2 files:

One without the mod being installed, and the second one is WITH the mod being installed.

thx.

alexandervba

Ive found out that. (also in the default skin).

I can add a board, and then add childboards, and it will remove the child boards links. Working fine. If I then add a board BEFORE this board, it will still look fine. But if I add a board AFTER this board it will fail. and the forums look bad. It will keep on failing until a the category ends, and if I add a new category below it, that one works fine again and no errors, unless I do the same in this category.

alexandervba

#18
Wow, Ive just kinda amazed myself =p Since this is all really new to me. But I think ive fixed the error thx to some googling lol. Ur coding just seems incorrect, you remove to much I believe. Now, im not the expert, so pls correct me if im wrong. But this is what I did:

Instead of Removing This entirely:

// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}

echo '
<tr>
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
<span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</span>
</td>
</tr>';
}


I didnt remove all of it now, Ive removed some parts of it and the end result is what I have left:

// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{

echo '
<tr>

</tr>';
}


Now, as u can see, I left an empty <tr></tr> in there, but you have to keep it there, else the table is incorrect and the next boards after wont show up correctly. However now there was a tiny line between this board (with a child board) and the next one.

Ive fixed this by changing this line: (this line can be found a little above)

<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">';

Into this:

<table border="0" width="100%" cellspacing="0" cellpadding="5" class="bordercolor" style="margin-top: 1px;">';

Ive changed the cellspacing to 0, so the empty <tr></tr> wont have any effect at all in here. Maybe you should change ur mod and fix this problem? However, thx for all the help about telling me where to edit this!

Greetings,
~Alex

Deaks

interesting thanks for this I will look into it better tonight when ive woken up :)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Advertisement: