hide amount of messages, number of topics, childforums and last post

Started by Boloh!, October 04, 2018, 09:23:47 PM

Previous topic - Next topic

Boloh!

Hello everyone! again, I do not want to lose the habit of bothering you  :P

I was studying and learning (just a little). I managed to leave my forum with two columns, as seen in the photo.


Now what I want is to remove the information that shows each section (number of messages, number of topics, childforums and the last post) I tried to find the code in the index.css to edit it but there is no way, is playing hide and seek   ::)

Deaks

Reason why you didn't find it is because it's in boardindex.template.php (remember make backup)
~~~~
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."

Boloh!

Yep! I forgot to write that in the post; I've tried in boardindex too.
whats the line exactly?  O:)

Deaks

Tbh it's a few places, my internet is down atm so using my phone if no-one gets back to you by time I wake up I'll point you in better direction
~~~~
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."

Boloh!

My Spanglish is not quite good, I could not understand almost anything you told me. In all the ways I already managed to find and edit almost everything, I would only like to hide the childforums. Thank you!  :P

Antechinus

QuoteHello everyone! again, I do not want to lose the habit of bothering you  :P

Lol. :D See this code?

// 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'] . '" class="' . ($child['new'] ? 'new_posts ' : '') . 'tooltip buttonLike realTiny" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" class="tooltip buttonLike realTiny" 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="tooltip moderation_link newNumber">!</a>';

$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
}
echo '
<div class="child_boards">
<i class="fas fa-angle-double-right"></i>    ', implode(' ', $children), '
</div>';
}


You can delete that from the template, or comment it out.
The other way of doing it is to not worry about the template, and just hit it with CSS:

.child_boards {display: none;}

Either way should work. :)

Boloh!

Thank you!  ;D. Anyway, I've already solved it a moment ago.
I was looking for that code for 1 hour and I had it under my nose!  :-X
The only thing left for me to correct are those symbols that appear below the sections that had subforums

">>"

SychO

Quote from: Antechinus on October 04, 2018, 10:47:16 PM
The other way of doing it is to not worry about the template, and just hit it with CSS:

.child_boards {display: none;}

^^
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze


Antechinus

Depends how you define "best". If you remove the code you have less HTML, PHP and CSS to process so it will be better for performance. The template will also be easier to maintain if you wish to make further changes, because there will be less crud to worry about.

Using CSS is only "better" if a/ you aren't capable of editing the template successfully or b/ you may want to reverse the decision later. The first is not relevant in this case, since the template has already been successfully edited for other things. The second is not really an issue either, since if you can successfully remove the code you can easily add it back in, and presumably you will have a copy of the original anyway.

I will do things with CSS when I think use of CSS makes the most sense, but I'll also happily rewrite entire templates when I think that makes more sense.

Advertisement: