News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Showing number of posts/topics next to child boards in 1.0.x

Started by Ivan Minic, February 12, 2006, 09:49:25 PM

Previous topic - Next topic

Ivan Minic

Open: BoardIndex.template.php

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

Klozi



Klozi

Hi.

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


Cheers

Harvester

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.

DJINN

What I need to do to put image instead "No new posts"?

DJINN

I find what was the problem, I didn't have images uploaded.

TechnoDragon

Don't tell me to get into shape...I have a shape...It is round!


DJINN


L.G.S

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


TechnoDragon

Don't tell me to get into shape...I have a shape...It is round!


Michael D. Garcia

I've applied this mod to 1.1.2 and it works fine.

MDg

Advertisement: