Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: jeroenenagnes on November 24, 2008, 05:03:08 AM

Title: [SOLVED] Childboard counting
Post by: jeroenenagnes on November 24, 2008, 05:03:08 AM
Hi,

I've got a mainboard with a couple of chilboards.
On the index site i would like that you see after each chilboard the number of posts inside. Should look like (1), (19), etc.
Now it only shows the name and post are added to the total count of the mainboard.


Jeroen.
Title: Re: Childboard counting
Post by: Marcus Forsberg on November 24, 2008, 05:13:48 AM
If you hover the childboards name you see topics and posts.
Title: Re: Childboard counting
Post by: jeroenenagnes on November 24, 2008, 05:21:38 AM
Yes i know that thank you.
But i wan't that it is visible when you see the index.
Users won't go hovering over all childboards.


Jeroen.
Title: Re: Childboard counting
Post by: Marcus Forsberg on November 24, 2008, 05:27:24 AM
./Themes/default/BoardIndex.tempalte.php

Find:

Code: [Select]
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
Replace whit:
Code: [Select]
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a> (' . $child['posts'] . ')';
Title: Re: Childboard counting
Post by: jeroenenagnes on November 24, 2008, 05:45:17 AM
Wow, that works great.
Thank you for your quick response!


Jeroen.
Title: Re: [SOLVED] Childboard counting
Post by: Marcus Forsberg on November 24, 2008, 05:46:15 AM
No problem :)