Child board has new posts....show ON icon on index board?

Started by MJA, March 02, 2007, 02:27:14 PM

Previous topic - Next topic

MJA

How do I make it so that if someone posts in a child board, the ON icon shows up on the index board? This is for an online RPG and it would be nice to see at a glance which Kingdoms have new posts from the index page. You see, there are Kingdoms (parent boards) and Cities within them (child boards). I'm using a variation of the Classic theme, 1.1.2. Thanks!

Peter Duggan

Have you noticed that themes of more recent origin (like Babylon and the current default) have *two* 'on' icons (a full on.gif for new posts to the parent board and a kind of half on2.gif for new posts to child boards only)? Dunno if this helps, but you could always modify yours to do the same if it does.

MJA

Yes, I see that they have those. I don't know enough about coding to make it work on my board though. I was hoping for a solution that's not too difficult for my skill level. I don't want to mess everything up. hehe

MJA

No magic wand for me? Is there a part of the code in the Babylon or default which I could copy/paste into classic somewhere? I'm not sure what I'd need to alter.

bloc

There is..but first: is the classic theme unaltered? Is the html code unchanged for the BoardIndex.template.php inside classic theme folder?

MJA

I've added an additional menu button, added additional post icons, that kind of thing. I have the following mods installed:
Spam Me Not Mod
Award Mod
Custom Profile Field Mod

I haven't changed anything in BoardIndex.template.php :)

MJA

So what's the verdict? Is there a way to make it work with what I have setup? :)  

MJA

Sorry to be a pest. I'm still trying to find a solution. Anybody?

青山 素子

You will need to make a new image called "on2.gif" for this. It should go in the images folder for your theme. This image will indicate new posts in child boards.

WARNING: I haven't tested this, so make a backup copy of BoardIndex.template.php in case this doesn't work.

Find:

<td class="windowbg" width="6%" align="center" valign="top"><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" /></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'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// 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], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';

echo '
</td>

Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


MJA


Advertisement: