Advertisement:

Author Topic: How to remove the words "posts" and "topics" from child board indexes  (Read 1788 times)

Offline Groovystar

  • SMF Hero
  • ******
  • Posts: 2,225
    • Warrior Cats RPG Forum
This is what I want to remove:

http://i251.photobucket.com/albums/gg308/wynnyelle/lose-these-words.jpg

It's already up top that they are the numbers of posts and threads, the words down there with the numbers on every single one are redundant, so I want to take those out. Would anyone know how?

Thank you!

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 2,700
  • It's not a feature, it's a bug.
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #1 on: April 06, 2012, 10:20:00 PM »

That looks like a custom theme, so don't know if this will help, but in Curve the child board post/topic info is in MessageIndex.template.php, here -

Code: [Select]

// 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>


"In the land of the blind, the one-eyed man is king."

Offline Groovystar

  • SMF Hero
  • ******
  • Posts: 2,225
    • Warrior Cats RPG Forum
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #2 on: April 08, 2012, 05:55:05 AM »
Thanks; would removing any of that cause errors, though? I went through major errors when trying to do similar cosmetic cleanup work on threads and posts last year.

Offline Marcus Forsberg

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,608
  • Gender: Male
    • marcus.t.forsberg on Facebook
    • @marcusforsberg on Twitter
    • marcusforsberg.net
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #3 on: April 08, 2012, 12:58:32 PM »
As long as you remove them correctly without messing up the PHP syntax, you won't run in to any errors at all. It's just a simple edit.
Also known as the dreaded cσσкιє мσηѕтєя. Yes, 'twas I who stole your cookies. No, you can't have 'em back.

Twitter | Forrst | Dribbble | Website | Hire me for custom work (mods, themes, installs, upgrades, you name it!)

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 2,700
  • It's not a feature, it's a bug.
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #4 on: April 08, 2012, 02:27:58 PM »

If you just remove the $txt variables, it shouldn't affect anything else.  You can even change a letter - $txt['board_topicx'] - and the text will disappear without changing the formatting.

"In the land of the blind, the one-eyed man is king."

Offline Marcus Forsberg

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,608
  • Gender: Male
    • marcus.t.forsberg on Facebook
    • @marcusforsberg on Twitter
    • marcusforsberg.net
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #5 on: April 08, 2012, 02:33:46 PM »
If you just remove the $txt variables, it shouldn't affect anything else.  You can even change a letter - $txt['board_topicx'] - and the text will disappear without changing the formatting.

That wouldn't be a very good idea, though, calling for an undefined index. Better to remove it entirely. ;)
Also known as the dreaded cσσкιє мσηѕтєя. Yes, 'twas I who stole your cookies. No, you can't have 'em back.

Twitter | Forrst | Dribbble | Website | Hire me for custom work (mods, themes, installs, upgrades, you name it!)

Offline ChalkCat

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,411
  • Gender: Female
  • Forum Tea Maker - go on have a cuppa!
    • ChalkCat
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #6 on: April 08, 2012, 02:36:02 PM »
Or just comment it out with // first to be on the safe side?

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 2,700
  • It's not a feature, it's a bug.
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #7 on: April 08, 2012, 03:22:53 PM »
If you just remove the $txt variables, it shouldn't affect anything else.  You can even change a letter - $txt['board_topicx'] - and the text will disappear without changing the formatting.

That wouldn't be a very good idea, though, calling for an undefined index. Better to remove it entirely. ;)

It werks gud!   You can also find the variables in the language file and make them blank.  But it's best to edit out the variables.

Commenting out the line removes all the post/topic info, including the numbers, not just the text labels.

"In the land of the blind, the one-eyed man is king."

Offline Marcus Forsberg

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,608
  • Gender: Male
    • marcus.t.forsberg on Facebook
    • @marcusforsberg on Twitter
    • marcusforsberg.net
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #8 on: April 08, 2012, 03:27:19 PM »
It werks gud!

Um, no. It causes an undefined index in the error log. ;) You don't want that. Just remove the variables, there is no reason not to.
Also known as the dreaded cσσкιє мσηѕтєя. Yes, 'twas I who stole your cookies. No, you can't have 'em back.

Twitter | Forrst | Dribbble | Website | Hire me for custom work (mods, themes, installs, upgrades, you name it!)

Offline Groovystar

  • SMF Hero
  • ******
  • Posts: 2,225
    • Warrior Cats RPG Forum
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #9 on: April 15, 2012, 01:52:39 AM »
Yeah--I know about undefined indexes. We have a whole slew of those already.

I'm so sorry to those of you who have given me directions here, but I just don't understand how to remove these commands to make those words not show up. :(

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 2,700
  • It's not a feature, it's a bug.
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #10 on: April 15, 2012, 02:57:58 PM »

Attach your MessageIndex.template.php.

"In the land of the blind, the one-eyed man is king."

Offline Groovystar

  • SMF Hero
  • ******
  • Posts: 2,225
    • Warrior Cats RPG Forum
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #11 on: April 16, 2012, 05:37:27 PM »
Thanks so much. Here it is:

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 2,700
  • It's not a feature, it's a bug.
Re: How to remove the words "posts" and "topics" from child board indexes
« Reply #12 on: April 16, 2012, 10:39:03 PM »

Ok, no way to test this but .....

Find this:

Code: [Select]

<td class="windowbg2b" valign="middle" align="center" style="width: 8ex;">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />

</p>
</td>
<td class="windowbg2b" valign="middle" align="center" style="width: 8ex;">
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>


Change to this:

Code: [Select]

<td class="windowbg2b" valign="middle" align="center" style="width: 8ex;">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : ' ' , ' <br />

</p>
</td>
<td class="windowbg2b" valign="middle" align="center" style="width: 8ex;">
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . ' ' , '
</p>
</td>


"In the land of the blind, the one-eyed man is king."

Offline Groovystar

  • SMF Hero
  • ******
  • Posts: 2,225
    • Warrior Cats RPG Forum
I now have a test site environment. I tried this and it worked ! Thank you!