News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Multiple No New Posts/New Posts indicators.

Started by Gary, September 08, 2004, 02:23:45 PM

Previous topic - Next topic

Gary

Is there a way for me to be able so that my forum (http://tcb.alltoons.co.uk/forum) will be able to use different No New Posts/New Post inditators.

So for the Simpsons it has a simpsons related one
For Futurama it has Futurama ones
and so on.

- Gazmanafc
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

CoolMan


CoolMan

Ok, im not sure if its the best way but it works just fine:


-------------------------------------------------
[open: boardindex.template.php]
-------------------------------------------------
[find]
-------------------------------------------------
<td class="windowbg" width="6%" align="center" valign="top">';

// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all!  The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';

echo '</td>
-------------------------------------------------
[replace with]
-------------------------------------------------
<td class="windowbg" width="6%" align="center" valign="top">';

// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/special/on', $board['id'], '.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/special/con', $board['id'], '.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all!  The agony!!
else
echo '<img src="', $settings['images_url'], '/special/off', $board['id'], '.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';

echo '</td>
-------------------------------------------------
[close and save]

CoolMan

#3
so what you need to do after changing the code is to make a folder called: /special/ inside the images folder of that template.. there for each forum youll need:

on.gif
con.gif
off.gif

but after that name you'll need to put the id of the forum.. so lets say for forum with the ID of 10 youll have:
on10.gif
con10.gif
off.gif

and thats how you can have different status pics for each forum..
to find the id, just look at the forum number at the bottom when u put ur mouse on its link.

---------
edit
---------
you'll have to change the posting template too if you want to make different pics for each child board as well cause it will use the default on/off/on2 gifs for child boards

Owen

Just implimented this on Gazmanafc's forum, just a quick word to all people on RC1 that the code to search for is:
<img src="', $settings['images_url'], $board['new'] ? '/on.gif" alt="' . $txt[333] . '" title="' . $txt[333] : '/off.gif" alt="' . $txt[334] . '" title="' . $txt[334], '" border="0" />

Advertisement: