Advertisement:

Author Topic: Showing number of posts/topics next to child boards in 1.0.x  (Read 22577 times)

Offline Ivan Minic

  • Full Member
  • ***
  • Posts: 513
  • Gender: Male
  • Owner: www.Burek.com
    • Burek Forum
Showing number of posts/topics next to child boards in 1.0.x
« on: February 12, 2006, 09:49:25 PM »
Open: BoardIndex.template.php

Find:
Code: [Select]
// 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'];
}


Replace with:
Code: [Select]
// 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['name'] = $child['new'] ? '<font color="#800000">' . $child['name'] . '</font>' : $child['name'];
$child['link'] = $child['new'] ? '<a href="' . $child['href'] . '" title="' . ($txt[333]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')"><img src="' .  $settings['images_url'] . '/subfo-on.gif" alt="' . $txt[333] . '" title="' . $txt[333] . '" border="0" /></a> <a href="' . $child['href'] . '" title="' . ($txt[333]) . ' (' . $txt[330] . ': ' .  $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')"><b>' . $child['name'] . '</b></a> [' . $txt['21'] . ' ' . $child['posts'] . ' ' . $txt['smf88'] . ' ' . $child['topics'] . ' ' . $txt[330]  .']' : '<a href="' . $child['href'] . '" title="' . ($txt[334]) . ' (' . $txt[330] . ' : ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')"><img src="' . $settings['images_url'] .  '/subfo-off.gif" alt="' . $txt[334] . '" title="' . $txt[334] . '" border="0" /></a> <a href="' . $child['href'] . '" title="' . ($txt[334]) . ' (' . $txt[330] . ' : ' . $child['topics'] . ', ' .  $txt[21] . ': ' . $child['posts'] . ')"><b>' . $child['name'] . '</b></a> [' . $txt['21'] . ' ' . $child['posts'] . ' ' . $txt['smf88'] . ' ' . $child['topics'] . ' ' . $txt[330] .']';
$children[] = $child['link'];
}

And that will result in:

Translation is serbian and screenshot is from Burek Forum, it will be shown correct on your board with language you use
« Last Edit: February 13, 2006, 10:50:55 PM by .diplomat »

Offline Klozi

  • Full Member
  • ***
  • Posts: 478
  • Gender: Male
  • 1st Multinational Music
    • youpromi on Facebook
    • @youpromi_com on Twitter
    • YouPromi Entertainment
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #1 on: March 19, 2006, 01:47:08 PM »
Hi.

Very well, I gonna need it next time.


Cheers
YouPromi Entertainment

Offline ArkServer

  • SMF Hero
  • ******
  • Posts: 1,831
  • My posts are my own
    • BlushyFace | A spoopy and creppy site
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #2 on: March 20, 2006, 02:16:26 PM »
How come it says:
Child Boards: No New Posts  tho its working.
http://arkserver.servehttp.com/index.php

Offline Klozi

  • Full Member
  • ***
  • Posts: 478
  • Gender: Male
  • 1st Multinational Music
    • youpromi on Facebook
    • @youpromi_com on Twitter
    • YouPromi Entertainment
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #3 on: March 20, 2006, 02:48:21 PM »
Hi.

search for the <img> tag. You can take changes what ever you want to do.


Cheers
YouPromi Entertainment

Offline Harvester

  • Charter Member
  • Full Member
  • *
  • Posts: 690
  • Gender: Male
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #4 on: March 24, 2006, 06:11:25 AM »
I think it works for me but I dont have the images it needs... subfo-on.gif and subfo-off.gif
I could make them myself I am pretty sure BUT I have no idea what they should look like.

Offline DJINN

  • Semi-Newbie
  • *
  • Posts: 27
  • Gender: Male
  • ZEKS
    • Zeks-Online
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #5 on: July 21, 2006, 06:47:39 PM »
What I need to do to put image instead "No new posts"?
« Last Edit: July 21, 2006, 08:49:08 PM by DJINN »

Offline DJINN

  • Semi-Newbie
  • *
  • Posts: 27
  • Gender: Male
  • ZEKS
    • Zeks-Online
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #6 on: July 24, 2006, 11:58:05 AM »
I find what was the problem, I didn't have images uploaded.

Offline TechnoDragon

  • Jr. Member
  • **
  • Posts: 374
  • Gender: Male
  • With great power comes great resposibility...
    • Dragon Talk Forum
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #7 on: July 25, 2006, 06:24:32 PM »
Here are two images i made...very simple ones.... &
Don't tell me to get into shape...I have a shape...It is round!


Offline DJINN

  • Semi-Newbie
  • *
  • Posts: 27
  • Gender: Male
  • ZEKS
    • Zeks-Online
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #8 on: July 26, 2006, 02:44:50 PM »
very nice

Offline L.G.S

  • SMF Hero
  • ******
  • Posts: 2,658
  • Gender: Male
  • RuthlessIntent.com !
    • GamesandGoals.com
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #9 on: August 18, 2006, 04:53:09 PM »
Any chance of having this cool tip for 1.1RC2 please?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Offline TechnoDragon

  • Jr. Member
  • **
  • Posts: 374
  • Gender: Male
  • With great power comes great resposibility...
    • Dragon Talk Forum
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #10 on: August 19, 2006, 01:09:27 AM »
That is what I have this installed on...RC2
Don't tell me to get into shape...I have a shape...It is round!


Offline Michael D. Garcia

  • Semi-Newbie
  • *
  • Posts: 42
  • Gender: Male
    • jetblack's place
Re: Showing number of posts/topics next to child boards in 1.0.x
« Reply #11 on: May 02, 2007, 10:41:42 PM »
I've applied this mod to 1.1.2 and it works fine.

MDg