News:

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

Main Menu

cbi v0.5 (Custom Board Icons)

Started by Bigguy, November 11, 2006, 11:59:46 AM

Previous topic - Next topic

Bigguy

If you have the mod installed and the two files I mentioned are NOT in your custom theme then you don't have to do anything to get it to work; it should already work. If however you have one or both of the files mentioned above in your custom theme folder than you will have to manually edit those two theme files in order to get it to work on your theme.

Paranoimia

Great mod! I read through this thread and installed the mod manually last night (as I'm using a custom theme), and it works a treat! Many thanks for creating and sharing.

Bigguy


goaskanna

#223
Is there a simple way to get this mod to work on all boards without having to create a folder for each and every board?

Also, is there a 'perfect' size for the icons that I should use?

I just had another thought, in my deafult theme images folder there are already icons/buttons with the names on on2 and off, couldn't i just overwrite those with my own images? Would that work?

Thanks

Anna

Bigguy

No a folder must be created. I use 48x48 for my icons. No don't overwrite them because when you uninstall the mod you need those images to show up to take the place of the custom board icons.

goaskanna

Ok, thanks, was just playing around with it on my test forum that I upgraded to the new beta thing. Have to say, although making new folders and uploading the images to each can be a lot of work (especially if someone has a large forum) the mod worked absolutely 100% perfectly :D

Well done!

Anna

Bigguy

Thank you. I'm glad you like it. :)

allumius

Quote from: allumius on January 25, 2008, 02:29:13 AM
Quote from: Bigguy on January 24, 2008, 10:29:10 AM
Do you have all the folders made and in the right places. ???
Yes
The problem is if ALL post of "Deportes"'childboards are read, The icon called off.gif work fine in "Deportes" board, but if there are some post non read in childboards, the icon on.gof of "deportes" board not work

Can you help me please?

Marcus Forsberg

Is it possible to use .png files instead of .gif's? ???

Bigguy

#229
Yes it is. I made a mod to go along with cbi 1.5 that will turn all the gifs to png's. You can also do it your self by editing the code that the cbi mod puts into the template file.

EDIT: It should be remembered though that IE 6 does NOT support the use of png icons. So with out a fix for that people who use IE 6 will see the icon but it will have a box around it. You can try this for a fix if you like and see if it works:

http://www.twinhelix.com/css/iepngfix/

or here:

http://bjorkoy.com/past/2007/4/8/the_easiest_way_to_png/

There are other fixes that are not related to css but I can't find the link right now.

FerociousSM

I need help. I'm looking at my /Themes/Musiconica/ dir. My BoardIndex.template.php & MessageIndex.template.php look like this:

BoardIndex.template.php

/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr>
<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';

// 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 '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="middle" width="22%">
<span class="smalltext">';

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */


MessageIndex.template.php

<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';



// 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 '</a>

</td>

<td class="windowbg2">

<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />

', $board['description'];



// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)


Am I looking in the correct place? I don't see "// If the board or children is new, show an indicator." Where am I suppose to add the code?

Thanks

CFF Forum
http://www.centralfloridafieros.net/forum/index.php

Bigguy

Search for this:

// If the board is new, show a strong indicator.

keyboard

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

Bigguy

You should be able to try it and if not I will update it soon.

keyboard

#234
Your a good man bigguy  :D :D  I am getting errors.....I am really looking forward to using this...
Слaва
Украинi

FerociousSM

#235
I got this error after replacing this manually.




Kindred

please paste that actual line of code...   it looks like you're missing a closing bracket or quote... but we can't see it in the image
Сл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."

keyboard

Hi

Running 1.1.5     Looking very much forward to installing this on my default theme...Any idea or time frame when you can make it available ?

I have been waiting a long time for such a mod.......I am almost tempted to go backwards to 1.1.4 or forward to 2.0.....No !!! Cannot do 2.0, tried that and was not successful.
Слaва
Украинi

Bigguy

It should run with 1.1.5 does it not. ???

keyboard

Please look at my message four messages up... I have attached my errors to the message...

Please advise

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

Advertisement: