News:

Wondering if this will always be free?  See why free is better.

Main Menu

Remove The Childboards

Started by Spacecadet, October 20, 2010, 11:42:23 AM

Previous topic - Next topic

Spacecadet

I know this is in the wrong area but please help me as I have posted in the mod area and by the looks of it the thread has been dead for ages.

I have a slight problem, I tried to uninstall the MOD Alias, the one that produces the child boards underneath the directory. I belive it is the same mod installed on the SMF site. It sais uninstalled however all my directories still show all the Child Boards. I'm using RC3, how do i get rid of this?

http://www.medicinehatchat.ca/forum/

Matthew K.

Try manually uninstalling the mod. Take a peak at Manual Installation of Mods and do reverse.

Spacecadet

Hey long time no speak oh glorious PHP wizzard. Will give that a try thanks, didn't even occur to me lol.

Alex' Manson

uninstalling the mod manually will 100% solve your issue.

Spacecadet

Hey there isn't a simple free classified program for SMF RC3 anywhere is there? I found one on here that was $79.00 but i was looking for something a bit cheaper.

Thanks

Matthew K.

Not that I know of.

If this issue is resolved, please mark topic as resolved.

Spacecadet

Sorry to unmark this topic as solved but the uninstall did not work. I removed all traces of the mod and still the child boards remain. I noticed this comment on the instruction screen for the mod

"If you are uninstalling please note that it will not remove the database additions, you will have to run database_remove.php manually to remove the fields this mod adds."

where is the "database_remove.php" file, what does it do, and what do I do to it?

I figured since simplemachines.org was running the same mod someone must know.

Matthew K.

I would assume the database_remove.php file should be in the mods package. Try unzipping it, and if the file "database_remove.php" is in the folder, upload it and visit the file.

Spacecadet

It didn't work! :( :( I ran "database_remove.php" in the index.php directory and it didn't do anything.

Matthew K.

I would suggest posting on the mods dedicated support thread

Spacecadet

I did, he thread has gone unaswered. This is a nighmare someone must know what to do?

Spacecadet

Is it possibly in here anywhere?


// 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)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
}
echo '

xenovanis

Spacecadet, do you still need help with this? I checked the link from your first post, but I can't really see if the problem is still there?
"Insanity: doing the same thing over and over again and expecting different results."

Spacecadet

Well yes and no hehehe. I figured out that it is not a problem with the mod just that i was running an old version of SMF, installed the new one and couldent get rid of the child boards. I thought it was a mod but i know now its part of the new SMF. I managed to get rid of them on the index page but do you happen to know where the edit would be to make it disapear globaly? once i get passed the index page the child board link comes back.

xenovanis

So, do you want to delete those boards? Of make them regular boards?

You can set that in Admin -> Forum -> Boards
"Insanity: doing the same thing over and over again and expecting different results."

Spacecadet

Neither, I just don't want them displayed on the page. I don't want anyone to see a child board untill they click on the parent board.

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

Spacecadet

Thanks but I actually did this already. It worked for the index page or the main page but I want to get ride of the child board links globally. Is the edit the same for ever file? And which files do I edit?

xenovanis

/Themes/default/MessageIndex.template.php, find and remove:

if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder" id="childboards">
<div class="cat_bar">
<h3 class="catbg">', $txt['parent_boards'], '</h3>
</div>
<div class="table_frame">
<table class="table_list">
<tbody class="content">';

foreach ($context['boards'] as $board)
{
echo '
<tr class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';

// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';

// Has it outstanding posts for approval?
if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
echo '
<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';

echo '

<p>', $board['description'] , '</p>';

// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';

// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats windowbg">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'], '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
echo '
</td>
</tr>';

// 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)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
}
echo '
<tr><td colspan="3" class="children windowbg"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td></tr>';
}
}
echo '
</tbody>
</table>
</div>
</div>';
}
"Insanity: doing the same thing over and over again and expecting different results."

Spacecadet

This is what I got.

Template Parse Error! There was a problem loading the /Themes/default/MessageIndex.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
--------------------------------------------------------------------------------

Parse error: syntax error, unexpected '}' in .../Themes/default/MessageIndex.template.php on line 372
363:
364:    // And the reverse for hiding it.
365:    function modify_topic_hide_edit(subject)
366:    {
367:       // Re-template the subject!
368:       setInnerHTML(cur_subject_div, \'<a href="', $scripturl, '?topic=\' + cur_topic_id + \'.0">\' + subject + \'<\' +\'/a>\');
369:    }
370:
371: // ]]></script>';
372: }373:
374: ?>
375:
376:

Advertisement: