News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Different board Icons

Started by memo, March 15, 2004, 08:29:55 AM

Previous topic - Next topic

Vinspire


Vinspire

Whats the right codes to get this tricks work on SMF 1.1 RC 2 ?

JayBachatero

It should be the same.  Maybe just a slightly different.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Vinspire

Quote from: JayBachatero on May 15, 2006, 03:14:20 PM
It should be the same.  Maybe just a slightly different.

Manage to get it working perfectly but i've got a problems wif the icons now :P

Can't find a nice icons to put in my site :P

JayBachatero

Look in the Graphics board.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Vinspire


karimali831

Ok can some one please send me there boardinsex.template.php with all the different icons per board please?

RebelRose

Quote from: karimali831 on August 05, 2006, 05:38:40 PM
Ok can some one please send me there boardinsex.template.php with all the different icons per board please?

What exactly are you talking about?

you can change your icons within your forum easily if that is what you are wanting to do

Kindred

no rose...   what karimali wants is differnet icons for each section...

And the best way, vinspire, is to make your own, of course...

Karimali...   did you even try to apply the code hacks yourself?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

karimali831

I tried but it just doesn't work guys i have poor knowledge of coding please someone send me there boardindex.template.php with all the different icons per board ill greatly appreciate it :D



Vinspire

Quote from: karimali831 on August 06, 2006, 10:26:50 AM
I tried but it just doesn't work guys i have poor knowledge of coding please someone send me there boardindex.template.php with all the different icons per board ill greatly appreciate it :D

do u have the icons yet or not in the 1st place ?

RebelRose

Quote from: Kindred on August 06, 2006, 12:32:58 AM
no rose...   what karimali wants is differnet icons for each section...

And the best way, vinspire, is to make your own, of course...

Karimali...   did you even try to apply the code hacks yourself?

Ok sorry, maybe I am not sure what she was asking, I have different icons on each section on my board, I thought that is what was being asked.

karimali831

RebelRose yes can you please send me you boardindex.template.php in your FTP server /SMF/DEFAULT

Please? so I can look, thats what I want.

RebelRose

Quote from: karimali831 on August 07, 2006, 06:58:22 PM
RebelRose yes can you please send me you boardindex.template.php in your FTP server /SMF/DEFAULT

Please? so I can look, thats what I want.

you can view my board by going to the MY Site I do not use the default theme but if you see my board and that is what you are looking for I can help you with that.

karimali831

No I do not see the different icons per board :(

Can some one send me there boardindex.template.php so I can see all the different icons per board please?

RebelRose

#96
Icons are something that you can put on your board it is not something that comes on the boardindex.php, it is something that is added to a theme.

Add whatever pictures you are going to use to your site, I just added a folder with them in it, when you create a board in the admin panel, instead of just putting the board name, insert the following code:

<img src="http://yourdomain/forum/iconlocation/nameoficon"> name of board</img>


and it was that simple, check to make sure that the link information is correct according to your own domain setup.

Kindred

#97
RebelRose...    I don't think that is a standard part of SMF...
What happens when you have an extra long baord naem with special characters or spaces.

The modification listed here uses the boardID and a change to the code in boardindex.template.php (which IS a theme file) to check for the existance of on_##.GIF, on2_##.gif and off_##.gif in which case it shows that icon for the board that matches the board ID, esle it shows the generic on, on2 and off icons.

karimali...   I have made significant other modifications to boardindex.template.php, so I can't just give you mine.


find this in your boardindex.template.php

// 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" />';


completely replace that code with the following:

// Individual board icons. If a custom image exists, use it. Otherwise use the default image.
if (file_exists($settings['theme_dir'] . '/images/on_' . $board['id'] . '.gif'))
$board_new_img=$settings['images_url']. '/on_' . $board['id'] . '.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

if (file_exists($settings['theme_dir'] . '/images/on2_' . $board['id'] . '.gif'))
$childboard_new_img=$settings['images_url']. '/on2_' . $board['id'] . '.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

if (file_exists($settings['theme_dir'] . '/images/off_' . $board['id'] . '.gif'))
$board_nonew_img=$settings['images_url']. '/off_' . $board['id'] . '.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';


               // If the board is new, show a strong indicator.
                if ($board['new'])
echo '<img src="', $board_new_img,'" 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="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
                    // No new posts at all!  The agony!!
                    else
echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Assistance

Quote from: RebelRose on August 10, 2006, 10:54:38 AM
<img src="http://yourdomain/forum/iconlocation/nameoficon"> name of board</img>
you own
that was so much easier then the other way there explaining
~playing poker~

RebelRose

#99
Quote from: Assistance on August 10, 2006, 02:51:06 PM
Quote from: RebelRose on August 10, 2006, 10:54:38 AM
<img src="http://yourdomain/forum/iconlocation/nameoficon"> name of board</img>
you own
that was so much easier then the other way there explaining

Great I hope it helped.

The largest image I have on my board is 64x32, and the longest board names are;

Board News and Announcements
Complaints or Service Problems

However there is still room for longer names.

Should you want to change the icons for New Messages or No New Messages to where they are not the same on every board then I would use the method that Kindred posted.

Advertisement: