Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Bigguy on November 11, 2006, 11:59:46 AM

Title: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 11, 2006, 11:59:46 AM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=511)

CBI Modification
This modification gives you the ability to change the default board icons to ones you choose. All that must be done is; install this package through the package manager, make an icons folder in the theme directory that you are using. One more folder inside that for each board and place your icons there. Keep in mind that this modification only installs to the default theme, if you are using a custom theme with "BoardIndex.template.php" and "MessageIndex.template.php" files, they will have to be modified manually. Those are the only two files this package modifies. Follow the file structure listed below.

New Changes:
-Updated for latest SMF ver.
-License change
-Updated for 2.0.6 - 9
-Updated for 2.0.5
-Readme Updated
-license added

UP AND COMING:
- License change complete

UP-TO-DATE VERSIONS:
cbi 195 - version update - Installs with 2.0.15
cbi 181 - version update
cbi 180 - License change
cbi 179 - Installs with the latest version
cbi 178 - Installs with 2.0.5
cbi 176 - Installs with 2.0.3
cbi 175 - Installs with SMF 2.0.2
cbi 173 - Installs with SMF 2.0.1
cbi 172 - Installs with SMF 2.0 Gold PLEASE READ THE README
cbi 11- installs with SMF 1.1.12, .13

NOTE:
There are instructions in the readme attached with this mod. If the icons fail for some reason or you uninstall this mod, the board icons will default back to the original icons.

For quick reference:

1.7.3-1.8.1 README INSTRUCTIONS
Quote
In the icons folder in to your /Themes/default/images/icons/.
 create folder which name is the boards id,(meaning only the
 number of the board) where you want custom board icon.
 Then put on.png, on2.png and off.png in that folder.
 
 Structure:
 
 forum/Themes/default/images/icons
 forum/Themes/default/images/icons/board_id/on.png
 forum/Themes/default/images/icons/board_id/on2.png
 forum/Themes/default/images/icons/board_id/off.png
 
 For redirect boards use this:
 
 forum/Themes/default/images/icons/board_id/redirect.png
 
 (Where "board_id" is the id number of the board you want the icon to show up for. So for example for your first board on your forum it would look like this:
 forum/Themes/default/images/icons/1/on.png)

1.6.3 README INSTRUCTIONS: (These vary slightly per mod but nothing major)
Quote
Create icons folder in to your /Themes/default/.
In the icons folder create folder which name is the boards id,(meaning only the
number of the board) where you want custom board icon.
Then put on.png, on2.png and off.png in that folder.

Structure:
forum/Themes/default/icons
forum/Themes/default/icons/board_id/on.png
forum/Themes/default/icons/board_id/on2.png
forum/Themes/default/icons/board_id/off.gif

(Where "board_id" is the id number of the board you want the icon to show up for. So for example for your first board on your forum it would look like this:

forum/Themes/default/icons/1/on.png)

License:
Feel free to distribute and or modify this package. The "Thanks go to" section of this readme must not be changed (only added to) and must stay with the package. This license only applies to the latest release cbi 1.8.0 and above.

This mod is licensed under: https://www.mozilla.org/en-US/MPL/1.1/ (https://www.mozilla.org/en-US/MPL/1.1/)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: littleone on November 11, 2006, 04:05:13 PM
I am finding that this doesnt work on boards on "Child Boards".  When I click on the Parent board and get the listing of Child boards, their icons are the default ones.

Any suggestions?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 11, 2006, 06:58:08 PM
In the next version of cbi there will be support for child boards. I was going to put it in this one but I did not get it ready in time. For now though here is a small solution to the problem. It's almost like this mod but a bit different:
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Xarcell on November 11, 2006, 07:45:02 PM
wow, I can't wait for the updated one with the childboards icon. Very nice mod...
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 11, 2006, 07:58:58 PM
Thank you. I'm not sure when it will be out but keep an eye out for it.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: denislici on November 12, 2006, 05:22:41 AM

it would be better if we set the icon in the admin panel, while adding or editing a board...
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 07, 2006, 12:51:15 PM
Now available on the mod site.

Well for some reason I cannot upload to the mods section of simplemachines.org so I will upload it here. We have released a new version of cbi. (Custom Board Icons) This version supports child boards and is compatible with SMF 1.1 Final. Please read the readme.txt upon install for instructions and credits, thanks and I hope you all like it.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 07, 2006, 08:55:14 PM
I have found problems with this mod and have removed it from download. It will be back. Sorry for any inconvenience. Please re-install the previous mod which is also SMF 1.1 Final compliant.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 08, 2006, 08:43:09 AM
The new version of this mod is back up for download.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: miguel on December 17, 2006, 02:36:49 PM
My web is http://www.acuariofiliacanaria.com/foro/index.php
For example por board 11
The Structure is:

http://www.acuariofiliacanaria.com/foro/Themes/default/icons/board_11/on.gif
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/board_11/on2.gif
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/board_11/off.gif

or

http://www.acuariofiliacanaria.com/foro/Themes/default/icons/11/on.gif
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/11/on2.gif
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/11/off.gif

Because dont run
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 17, 2006, 05:00:11 PM
Were it says "board_11" only put the number (id) of the board so it would be:

http://www.acuariofiliacanaria.com/foro/Themes/default/icons/11/on.gif
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Greek on December 18, 2006, 05:41:09 AM
Perhaps I do something wrong because I don't see any change. I have installed the cbi 1.0

For example if the first board is this:
h*tp://www.justatestforum.net/test/index.php?board=1.0

what is the right path and file names of icons?
I don't know if it's important, but my icons have size about 50x50 and gif format.

Thanks in andvance for any help  :)


Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 18, 2006, 05:44:37 AM
If this is your forum:

h*tp://www.justatestforum.net/test/index.php?board=1.0

then your image must go here:

h*tp://www.justatestforum.net/test/Themes/default/icons/1/on.gif

This mod only installs on the default theme so if you are using a custom theme you will have te manual edit.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Greek on December 18, 2006, 06:14:42 AM
Thanks for help. It worked  :)

I have just noticed this:

The default small icons below the board (I mean "New messages" and "No new message") are remaining and I think is not good looking if you have changed the default big icons.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: nitins60 on December 18, 2006, 06:44:28 AM
Can you tell me code for custom theme? I will be thankful, if you provide some cool icons of mobiles/music! :P
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: miguel on December 18, 2006, 06:58:16 AM
Thank you :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RvG on December 30, 2006, 07:29:44 AM
will this work on themes other than default?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 30, 2006, 02:25:51 PM
Yes but you will have to manual add the edits
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: K_4_kelly on December 30, 2006, 07:48:44 PM
thanks, i think this is a nice one
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 30, 2006, 08:10:09 PM
Depending on what version of SMF you have there is a newer version than 0.5 But they both work real good. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RvG on December 31, 2006, 12:00:51 AM
have you tried doin this dilbermc?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 31, 2006, 12:16:25 AM
Personally no I haven't but there should be no problem with it working in that theme.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RvG on December 31, 2006, 01:27:04 AM
sorry to bother you . . . but icons i have do not have the on2 and off.

do you have some places or sites to get some? :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: khoking on January 03, 2007, 11:53:56 AM
If this is your forum:

h*tp://www.justatestforum.net/test/index.php?board=1.0

then your image must go here:

h*tp://www.justatestforum.net/test/Themes/default/icons/1/on.gif

This mod only installs on the default theme so if you are using a custom theme you will have te manual edit.

I am using SlickPro_Graphite theme, installed your mod and it doesnt change anything on my site. May I know what file should I manually mod in the SlickPro_Graphite theme folder? I have already added the icons/1/on.gif into the SlickPro_Graphite theme folder.

Thanks for this great mod!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 03, 2007, 02:16:10 PM
@ RvG: I use google image to find mine

@ khoking: This should work for you


For cbi v1, in your BoardIndex.template.php find:

Code: [Select]
// 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], '" />';

And replace with:


Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}

In MessageIndex.template.php find:

Code: [Select]
// 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], '" />';

And replace with:

Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: khoking on January 03, 2007, 11:28:52 PM
Dear Bigguy,

I couldn't find the codes in my template files. Can you check for me? Sorry...I dont know much about php...  :(

edited: cleared up codes to make the thread looks cleaner to browse.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 04, 2007, 12:16:33 AM
From the MessageIndex.template.php file that you posted, this is the code you want:

Code: [Select]
// 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], '" />';

The other file you posted is the wrong one. You want to edit the BoardIndex.template.php file.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: khoking on January 04, 2007, 12:45:37 AM
Many thanks Bigguy! It works perfectly now in my forum. Thank you very much! :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 04, 2007, 12:53:56 AM
You are very welcome. I am glad you got it working. ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: InnerFlash on January 21, 2007, 05:48:57 PM
Hey Bigguy,

Sent you the url of my demo site for you to have a look. Installed the cb 1.0 several times on my fresh installed 1.1.1 forum. I just won't work on my theme or on the default either...

Ideas?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 21, 2007, 06:04:17 PM
Did you read the instructions carefully.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 21, 2007, 06:11:37 PM
Try putting the "images" folder in the "Theme" directory instead of in the theme folder that you are using.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: InnerFlash on January 21, 2007, 07:09:38 PM
Installed the cb 1.0 several times

Sorry, it's one o'clock and my brain is melting... Man, I really tried everything possible here... I'll get into the coding later tomorrow (today :P). I just got so frustrated that I spent the whole day preparing icons for 77 different boards and didn't get it to work.

Cheers and thanks for the feedback, will come back soon..
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Neol on February 05, 2007, 06:49:23 PM
I can't get this thing to work.

The url of the current icons is this: http://www.zeriyt.com/forumi/Themes/rt_smf_versatility2_sienna/images/off.gif

If I put a icon with a name like off_372 in /images/ (I tried with /icons/ too) and nothing happens.

Here is the code of the board index template:

Code: [Select]
<?php
// Version: 1.1 RC2; BoardIndex

function template_main()
{
global $context$settings$options$txt$scripturl$modSettings;

//Display ads on the board index
$ads show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

// Show some statistics next to the link tree if SP1 info is off.
echo '
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom">'
theme_linktree(), '</td>
<td align="right">'
;
if (!$settings['show_sp1_info'])
echo '
'
$txt[19], ': '$context['common_stats']['total_members'], ' &nbsp;&#8226;&nbsp; '$txt[95], ': '$context['common_stats']['total_posts'], 

&nbsp;&#8226;&nbsp; '
$txt[64], ': '$context['common_stats']['total_topics'], '
'
, ($settings['show_latest_member'] ? '<br />' $txt[201] . ' <b>' $context['common_stats']['latest_member']['link'] . '</b>' $txt[581] : '');
echo '
</td>
</tr>
</table>'
;

// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<table border="0" width="100%" class="tborder" cellspacing="' 
, ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' '0' '" cellpadding="4" style="margin-bottom: 

2ex;">
<tr>
<td class="catbg"> &nbsp;'
$txt[102], '</td>
</tr>
<tr>
<td valign="middle" align="center" height="60">'
;

// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>'
$context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript">
// The fading delay (in ms.)
var smfFadeDelay = '
, empty($settings['newsfader_time']) ? 5000 $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

var foreColor, backEl, backColor;

if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = 

document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;

backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), 

null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && 

typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;

backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}

// List all the lines of the news for display.
var smfFadeContent = new Array(
"'
implode('",
"'
$context['fader_news_lines']), '"
);
</script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>'
;
}

/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge),
and boards. (see below.) */
$first true;
foreach ($context['categories'] as $category)
{
echo '
<div class="tborder" style="margin-top: ' 
$first '0;' '1ex;' '' $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' '''">
<div class="catbg'
$category['new'] ? '2' '''" style="padding: 5px 5px 5px 10px;">';
$first false;

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="'
$category['collapse_href'], '" class="collapse_expand">'$category['collapse_image'], '</a>';

echo '
'
$category['link'], '
</div>'
;

// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">'
;

/* 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.
// Modified by cbi (Custom Board Icons) v1 mod.
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="'$board_new_img,'" alt="'$txt[333], '" title="'$txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="'$childboard_new_img,'" alt="'$txt[333], '" title="'$txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="'$board_nonew_img,'" alt="'$txt[334], '" title="'$txt[334], '" border="0" />';
}

echo '</a>
</td>
<td class="windowbg2">
<b><a href="'
$board['href'], '" name="b'$board['id'], '">'$board['name'], '</a></b><br />
'
$board['description'];

// Show some basic information about the number of posts, etc.
echo '
</td>
</td>
<td class="windowbg2" valign="middle" width="35%">
<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.) */
if (!empty($board['last_post']['id']))
echo '
<b>'
$txt['smf88'], ' '$board['last_post']['link'], '<br />
'
$txt[22], '</b>  '$txt[525], ' '$board['last_post']['member']['link'] , '<br />
'
$txt[30], ' '$board['last_post']['time'];
echo '
</span>
</td>
</tr>'
;
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' $txt[330] . ': ' $child['topics'

', ' $txt[21] . ': ' $child['posts'] . ')">' $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' $child['link'] . '</b>' $child['link'];
}

echo '
<tr>
<td colspan="3" class="windowbg'
, !empty($settings['seperate_sticky_lock']) ? '3' '''">
<span class="smalltext"><b>'
$txt['parent_boards'], '</b>: 'implode(' | '$children), '</span>
</td>
</tr>'
;
}
}
echo '
</table>'
;
}
echo '
</div>'
;
}

if ($context['user']['is_logged'])
{
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td align="'
, !$context['right_to_left'] ? 'left' 'right''" class="smalltext">
<img src="' 
$settings['images_url'] . '/new_some.gif" alt="" align="absmiddle" /> '$txt[333], '
<img src="' 
$settings['images_url'] . '/new_none.gif" alt="" align="absmiddle" style="margin-left: 4ex;" /> '$txt[334], '
</td>
<td align="'
, !$context['right_to_left'] ? 'right' 'left''">';

// Mark read button.
if ($settings['show_mark_read'])
echo '
<a href="'
$scripturl'?action=markasread;sa=all;sesc=' $context['session_id'] . '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' 

$context['user']['language'] . '/markread.gif" alt="' $txt[452] . '" border="0" />' $txt[452]), '</a>';
echo '
</td>
</tr>
</table>'
;
}

// Here's where the "Info Center" starts...
echo '<br />
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' '''>
<div class="catbg" style="padding: 6px; vertical-align: middle; ">
<a href="#" onclick="shrinkHeaderIC(!current_header_ic); return false;"><img id="upshrink_ic" src="'
$settings['images_url'], '/'

empty(
$options['collapse_header_ic']) ? 'collapse.gif' 'expand.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin-right: 2ex;" align="left" valign="middle" /></a>
'
$txt[685], '
</div>
<div id="upshrinkHeaderIC"'
, empty($options['collapse_header_ic']) ? '' ' style="display: none;"''>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">'
;

// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[214], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="'
$scripturl'?action=recent"><img src="'$settings['images_url'], '/post/xx.gif" alt="'$txt[214], '" /></a>
</td>
<td class="windowbg2">'
;

// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="'
$scripturl'?action=recent">'$txt[214], '</a></b>
<div class="smalltext">
'
$txt[234], ' &quot;'$context['latest_post']['link'], '&quot; '$txt[235], ' ('$context['latest_post']['time'], ')<br 

/>
</div>'
;
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="100%" border="0">'
;

/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="middletext" valign="top" nowrap="nowrap"><b>'
$post['link'], '</b> '$txt[525], ' '

$post['poster']['link'], ' ('$post['board']['link'], ')</td>
<td class="middletext" align="right" valign="top" nowrap="nowrap">'
$post['time'], '</td>
</tr>'
;
echo '
</table>'
;
}
echo '
</td>
</tr>'
;
}

// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">'
$context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="'
$scripturl'?action=calendar"><img src="'$settings['images_url'], '/icons/calendar.gif" alt="'$txt['calendar24'], '" 

/></a>
</td>
<td class="windowbg2" width="100%">
<span class="smalltext">'
;

// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span style="color: #'
$modSettings['cal_holidaycolor'], ';">'$txt['calendar5'], ' 'implode(', '

$context['calendar_holidays']), '</span><br />';

// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span style="color: #'
$modSettings['cal_bdaycolor'], ';">'$context['calendar_only_today'] ? $txt['calendar3'] : 

$txt['calendar3b'], '</span> ';
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="'
$scripturl'?action=profile;u='$member['id'], '">'$member['is_today'] ? '<b>' ''$member['name'], 

$member['is_today'] ? '</b>' '', isset($member['age']) ? ' (' $member['age'] . ')' '''</a>'$member['is_last'] ? '<br />' ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span style="color: #'
$modSettings['cal_eventcolor'], ';">'$context['calendar_only_today'] ? $txt['calendar4'] : 

$txt['calendar4b'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
'
$event['can_edit'] ? '<a href="' $event['modify_href'] . '" style="color: #FF0000;">*</a> ' ''$event['href'] == '' '' 

'<a href="' $event['href'] . '">'$event['is_today'] ? '<b>' $event['title'] . '</b>' $event['title'], $event['href'] == '' '' '</a>'$event['is_last'] ? '<br />' ', ';

// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '
(<a href="'
$scripturl'?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">'

$txt['calendar_how_edit'], '</a>)';
}
echo '
</span>
</td>
</tr>'
;
}


// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{
echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[645], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="'
$scripturl'?action=stats"><img src="'$settings['images_url'], '/icons/info.gif" alt="'$txt[645], '" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="middletext">
'
$context['common_stats']['total_posts'], ' '$txt[95], ' '$txt['smf88'], ' '$context['common_stats']['total_topics'], ' '

$txt[64], ' '$txt[525], ' '$context['common_stats']['total_members'], ' '$txt[19], '. '$txt[656], ': <b> '$context['common_stats']['latest_member']['link'], '</b>
<br /> ' 
$txt[659] . ': <b>&quot;' $context['latest_post']['link'] . '&quot;</b>  ( ' $context['latest_post']['time'] . ' )<br />
<a href="'
$scripturl'?action=recent">'$txt[234], '</a>'$context['show_stats'] ? '<br />
<a href="' 
$scripturl '?action=stats">' $txt['smf223'] . '</a>' '''
</span>
</td>
</tr>'
;
}

// "Users online" - in order of activity.
echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[158], '</td>
</tr><tr>
<td rowspan="2" class="windowbg" width="20" valign="middle" align="center">
'
$context['show_who'] ? '<a href="' $scripturl '?action=who">' '''<img src="'$settings['images_url'], '/icons/online.gif" alt="'

$txt[158], '" />'$context['show_who'] ? '</a>' '''
</td>
<td class="windowbg2" width="100%">'
;

echo '
'
$context['show_who'] ? '<a href="' $scripturl '?action=who">' ''$context['num_guests'], ' '$context['num_guests'] == 

$txt['guest'] : $txt['guests'], ', ' $context['num_users_online'], ' '$context['num_users_online'] == $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';

// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' '$context['num_buddies'] == $txt['buddy'] : $txt['buddies'];

// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' ''$context['num_users_hidden'] . ' ' $txt['hidden'];

echo ')';
}

echo $context['show_who'] ? '</a>' '''
<div class="smalltext">'
;

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
'
$txt[140], ':<br />'implode(', '$context['list_users_online']);

echo '
<br />
'
$context['show_stats'] && !$settings['show_sp1_info'] ? '<a href="' $scripturl '?action=stats">' $txt['smf223'] . 

'</a>' '''
</div>
</td>
</tr>
<tr>
<td class="windowbg2" width="100%">
<span class="middletext">
'
$txt['most_online_today'], ': <b>'$modSettings['mostOnlineToday'], '</b>.
'
$txt['most_online_ever'], ': '$modSettings['mostOnline'], ' (' timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>'
;

// If they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
 echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
'
$context['allow_pm'] ? '<a href="' $scripturl '?action=pm">' '''<img src="'$settings['images_url'], '/message_sm.gif" alt="'

$txt[159], '" />'$context['allow_pm'] ? '</a>' '''
</td>
<td class="windowbg2" valign="top">
<b><a href="'
$scripturl'?action=pm">'$txt[159], '</a></b>
<div class="smalltext">
'
$txt[660], ' '$context['user']['messages'], ' '$context['user']['messages'] == $txt[471] : $txt[153], '.... '$txt[661], 

<a href="'
$scripturl'?action=pm">'$txt[662], '</a> '$txt[663], '
</div>
</td>
</tr>'
;
}

// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">'
$txt[34], ' <a href="'$scripturl'?action=reminder" class="smalltext">(' $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="'
$scripturl'?action=login"><img src="'$settings['images_url'], '/icons/login.gif" alt="'$txt[34], '" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="'
$scripturl'?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>'
$txt[35], ':</b><br />
<input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>'
$txt[36], ':</b><br />
<input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>'
$txt[497], ':</b><br />
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="'


$modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>'
$txt[508], ':</b><br />
<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" 

class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="'
$txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>'
;
}

echo '
</table>
</div>
</div>'
;
}

?>
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 05, 2007, 06:54:43 PM
Are you using version 0.5 or 1.0 With 1.0 you would have to make a folder like this:

http://www.zeriyt.com/forumi/Themes/rt_smf_versatility2_sienna/icons/board id/off.gif

Board id just being the number of the board you want the icon or gif image to show for. So it would be like this:


http://www.zeriyt.com/forumi/Themes/rt_smf_versatility2_sienna/icons/1/off.gif
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Neol on February 05, 2007, 07:15:25 PM
This /1/ means folder! Do I have to create a new folder for each board that I want to add a custom icon?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 05, 2007, 07:18:29 PM
Yes you do. that 1 would be your first board.  
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Neol on February 05, 2007, 07:23:18 PM
Ok I get it now. Thank you!

 
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 05, 2007, 07:23:48 PM
Your welcome. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: chep on February 13, 2007, 02:07:39 AM
When does on2.gif get used?

I think it would be a better mod to leave the original icons for displaying the new posts in place and have another table cell which displayed beside this with the board icon. Also as previously mentioned the "No new Posts" and "New Posts" displayed below the board become irrelevent after applying this mod.  .02 nothing more
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 13, 2007, 11:57:59 AM
in cbi-1 the child boards get there own icons. You can change the gif images that come with SMF for the no new posts and New posts. Open up the images folder of the theme you use and search for new_none and new_some.gif change those two to what you want.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: chep on February 13, 2007, 07:42:17 PM
Yes I understood I can swap in my own images. That's not what I was talking about.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 13, 2007, 07:58:15 PM
Can you explain a bit better so I can understand. (I'm a little slow tonight, lol)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: chep on February 13, 2007, 08:12:34 PM
I thought it would be better to add a table cell in between the on off gifs and the board description.

In my attached image where the red dots are. I like the on off gif files like they are. Forgive me if you can do this. I did actually install the mod and play around with it but didn't seem to find this functionality.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 13, 2007, 08:21:44 PM
Well I can come close to that. If you want an image right next to the board description then upload an image to your root of smf and put this in the board description while making or modifying a board. Just make sure the link points to your image:

Code: [Select]
<img src="http://www.yoursite.com/forum/yourgif.gif">
This will put an image to the right of your red circles.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: symon on February 16, 2007, 06:32:54 PM
I installed manually and it was really easy. Just to replaces in two files and this works like a charm

Now to spend the next week making some subtle graphics :D

Brilliant work fella :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 17, 2007, 01:53:01 AM
I am glad you like it. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Natz on February 22, 2007, 09:06:29 PM
Is there any chance of being able to put icons/images beside the subject headings?? ie. Instead of having the images for the board is there a way of having beside the topic heading.  Hope that makes sense!!

Thanks for this great mod btw :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: symon on February 23, 2007, 03:15:35 AM
I believe...and I could be wrong...you put html linking to the image you want into the title when you create it. ie...<img src etc etc
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: symon on February 24, 2007, 08:54:07 AM
Is there a mod like this but you can choose a different catbg.jpg (which is obviously pre made and styled) for each different category by selecting it as a choice in each category part of admin?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 24, 2007, 01:48:49 PM
No there is not. You can change those manually though, hte catbg images I mean.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: symon on February 24, 2007, 02:37:36 PM
You can change those manually though, the catbg images I mean.

Yeh I've already done that but it's one for everything. It would be nice to have different ones for every category I needed to change. But I'm not sure if that's even possible :) I'd do it manually if it was.

It would be a good compliment mod for this one ;)  This icon mod rocks :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 24, 2007, 09:35:20 PM
It is possible but might take a bit of work. As for adding it to this mod....well, I have plans for the next upgrade already so maybe in a release after that. :) Nice idea though.  
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Leonta on March 08, 2007, 04:05:59 AM
Does this work on 1.1.2 ?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: symon on March 08, 2007, 06:02:02 AM
Yup :D

And it's very easy to manually install.

It something that sound be in the original SMF IMHO :D

Love it.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: aglioeolio on April 04, 2007, 05:23:15 PM
Bigguy is it possible to make this Mod using CSS?

It´s a great Mod, but my server is very busy lately by a great ammount of users and I cant get too much Mods enabled with php functions, in TPortal or templates (Board.Index, Message.Index, Display.template, etc)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on April 05, 2007, 08:25:43 AM
No I don't think it is. It's not hard to install through the package manager or manually for that matter.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: aglioeolio on April 05, 2007, 06:18:24 PM
My problem isn´t installing it, the version I´ve got it´s the older version from 'Tips and tricks' board yet (they both do the same things)... the "file existence checking" itself for icon to each board it loads my server a lot.

Sorry for my bad english, and thanks

Claudio
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on April 06, 2007, 11:07:53 AM
Hmm, I haven't noiced any server load on my site at all. Try using this beside the board name, it does work:

Code: [Select]
<img src="http://www.yoursite.com/forum/yourgif.gif">
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: taejien on April 17, 2007, 05:52:53 AM
Hello, does this work with 1.1.2 yet? Installed, but is not showing up. Thank you.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: symon on April 17, 2007, 05:56:00 AM
It works perfectly on 1.1.2 :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: taejien on April 17, 2007, 06:11:07 AM
Which version are you using? the older or the newer one?

I tried installing it, everything went without a hitch, but the pictures didn't show.

So my files look like..

forum/Themes/mytheme/icons/5/on.gif
forum/Themes/mytheme/icons/5/on2.gif
forum/Themes/mytheme/icons/5/off.gif

Yet, it didn't show up.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: symon on April 17, 2007, 06:59:35 AM
Did you replace the code in your theme files?

I did them manually (very easy) in Babylon as well as the default:

BoardIndex.template.php
MessageIndex.template.php

Two simple chunks of replacement code :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: taejien on April 17, 2007, 10:11:06 PM
Did you replace the code in your theme files?

I did them manually (very easy) in Babylon as well as the default:

BoardIndex.template.php
MessageIndex.template.php

Two simple chunks of replacement code :)

Which code do I replace in there?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on April 18, 2007, 12:01:42 AM
In cbi 1 in your BoardIndex.template.php file You would find this:

Code: [Select]
// 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], '" />';

And replace it with this:

Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}

Then in the MessageIndex.template.php file you would find this:

Code: [Select]
// 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], '" />';

And replace it with this:

Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}

Save both files and upload them to your themes folder and you should be good to go.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: taejien on April 18, 2007, 02:25:28 AM
In cbi 1 in your BoardIndex.template.php file You would find this:

Code: [Select]
// 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], '" />';

And replace it with this:

Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}

Then in the MessageIndex.template.php file you would find this:

Code: [Select]
// 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], '" />';

And replace it with this:

Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}

Save both files and upload them to your themes folder and you should be good to go.

Thankyou. I finally got it working.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on April 18, 2007, 02:29:44 AM
Glad to hear that. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: - danny on April 19, 2007, 09:44:44 PM
I can't get this to work on SMF 1.1.2/TP v0.9.8 using the Dilber Multicolor theme.

Can you help? I've got the icon folders already done (it worked fine on Default theme).
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on April 20, 2007, 12:45:32 AM
Have you done all the necessary edits to the BoardIndex.template.php and the MessageIndex.template.php of that theme. ???

The edits for these two files are just above you:

http://www.simplemachines.org/community/index.php?topic=126263.msg1058102#msg1058102
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: - danny on April 20, 2007, 01:52:01 AM
Have you done all the necessary edits to the BoardIndex.template.php and the MessageIndex.template.php of that theme. ???

The edits for these two files are just above you:

http://www.simplemachines.org/community/index.php?topic=126263.msg1058102#msg1058102

Dude! I have no clue how I missed that, but you kick ass!  :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: watt on April 28, 2007, 02:32:15 PM
Thank very much...Bigguy  for cool mod.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: masesto on April 30, 2007, 07:48:44 AM
What is wrong in this error, please help me. thx


Parse error: syntax error, unexpected T_ELSEIF in .../Themes/dilbermc/MessageIndex.template.php on line 49
40:             <td class="windowbg" width="51" align="center" valign="middle"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
41:
42:          // if ($board['new']) {
43:                if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
44:                   $board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
45:                else
46:                   $board_new_img=$settings['images_url']. '/on.gif';
47:    48:                   echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
49:             } elseif ($board['children_new']) {
50:                if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
51:                   $childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
52:                else
53:                   $childboard_new_img=$settings['images_url']. '/on2.gif';
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: SMdot™ on May 02, 2007, 09:49:53 PM
does this only work with the default theme... if so can someone help me figure out what I got to do to get it working with my site
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: SMdot™ on May 02, 2007, 10:05:10 PM
love the mod... don't see why one would use it on the main forum (guess you could use similar size icons). I use bigger images on my child boards, to differentiate the sections from the site... makes it look less forumy =P
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: peta-sucks.com on May 02, 2007, 11:52:03 PM
Would anyone be interested in setting this up for me on my boards?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 03, 2007, 12:01:10 AM
What theme are you using and what version of the mod are you trying to install.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: babjusi on May 19, 2007, 11:08:57 PM
Cool, I will try to install these Custom Board Icons in my forum as well
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: khoking on May 20, 2007, 08:05:23 AM
I have this cool mod on my forum at:

http://pentaxworld.com/forum/index.php?action=forum

Thanks BigGuy! O0
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 21, 2007, 11:17:41 PM
No problem, we aim to please. ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Apostaganha on May 25, 2007, 10:45:23 AM
Its not working on my "child doards"  :)

its suppose to be on2.gif, off2.gif, on3.gif, off3.gif, and so on right?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 25, 2007, 02:55:06 PM
No. You leave the images the original names and make folders for each board and put the images in there:

Themes/default/images/icons/1/on.gif etc

1 is the board id of the board you want the image to show for then you create or get your images you want to use and name them on.gif....off.gif.....on2.gif   and put them in that folder "1" and they should appear for that board. I guess before I wrote all that out I should ask what version you are using, lol. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: vosje505 on June 03, 2007, 07:30:35 AM
could you help me please? it won't show the additional BI's.

i've got smf version 1.1.2 and theme Bleen, althoug i placed it in the the theme directory default.

i've already tried to replace the code manualy like said before.

I've added the 2 files.

hope you can help me

thanx in advance
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 03, 2007, 02:41:08 PM
Which version of cbi are you using. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: vosje505 on June 03, 2007, 04:02:57 PM
i used CBI 1
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kerrang! on June 03, 2007, 04:10:27 PM
Bigguy;

Would it be possible to adapt it so it keeps the post icons and has images at the side. I have a similar mod for a ipb powered community. www.poetryartonline.com/forum/index.php

Awesome idea!
~Kerrang!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: vosje505 on June 03, 2007, 04:50:39 PM
thx and sorry for the trouble Bigguy.

tried CBI V0.5 and that did work so its solved for me ;)

thx for the mod :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 04, 2007, 12:35:29 PM
You could use this in the board name of the forum:

<img src="http://www.yoursite.com/forum/yourgif.gif">


Change it to link to an image you have and you will have put an image next to the board name
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kerrang! on June 04, 2007, 12:50:26 PM
You could use this in the board name of the forum:

<img src="http://www.yoursite.com/forum/yourgif.gif">


Change it to link to an image you have and you will have put an image next to the board name
Thanks buddy..

I wasn't aware this was possible so cheers!
~Kerrang!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yigal on June 11, 2007, 11:46:03 PM
I tried doing over 10 but then it stopped at 11 how come?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 12, 2007, 07:25:00 AM
I am not sure I know what you mean, can you explain more please.

I tried doing over 10 but then it stopped at 11 how come?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yigal on June 12, 2007, 05:53:41 PM
Well I made 15 plus boards....The First 10 boards worked with the CBI but I tried on the 11th and it didnt work...
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 12, 2007, 06:03:29 PM
There is no reason if it worked on the other 10 that it won't work on the 11th or higher. Are you sure you are doing it all the way you did the other boards.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yigal on June 12, 2007, 06:15:29 PM
Yes.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 12, 2007, 09:22:44 PM
What version of cbi are you using. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cubchai on June 16, 2007, 03:40:42 PM
hi Bigguy,

I've just installed cbi1 on my smf-1.1.2 . Applied mod, and created the folder (~/themes_dir/images/icons/1/on.gif etc). But I still can't get the images displayed. I've attached the files which I editted manually. I think I did it correctly, but just in case.

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 16, 2007, 03:59:22 PM
Try putting them here:

/Themes/mytheme/icons/5/on.gif
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cubchai on June 16, 2007, 04:09:58 PM
Try putting them here:

/Themes/mytheme/icons/5/on.gif
Yeah, it worked. So do I need to remove the folders created as instructed in the 'Read Me' document?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 17, 2007, 11:21:32 AM
lmao, I can't even remember what my own readme says, lol. What folders do you mean.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cubchai on June 17, 2007, 05:24:37 PM
lmao, I can't even remember what my own readme says, lol. What folders do you mean.
The readme says, created themes/mytheme/images/icons/board_id/picture.gif
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 17, 2007, 05:30:09 PM
Ok, I will change that as soon as I can, thank you. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cubchai on June 17, 2007, 07:12:53 PM
No worries. Indeed, thanks for this nice mod and helping me to solve my problem.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: L.G.S on June 20, 2007, 09:59:33 AM
hey great mod, any idea where i can get good images for my boards?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on June 20, 2007, 11:27:48 AM
Lots of free images on the net mate. Just check out google. download them and shrink them to size using image enhancement software.

Easy as ABC
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 20, 2007, 11:57:08 AM
Yep they are all over the place. Here is one search. I use google image to search for icons:

http://images.google.ca/images?svnum=10&um=1&hl=en&q=free+icons+.png&btnG=Search+Images

Lots of free images on the net mate. Just check out google. download them and shrink them to size using image enhancement software.

Easy as ABC
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: L.G.S on June 20, 2007, 01:27:13 PM
Lots of free images on the net mate. Just check out google. download them and shrink them to size using image enhancement software.

Easy as ABC

Yeah I know, but I've never found any professional looking ones just from Google.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 20, 2007, 04:35:55 PM
I had some that were free and then I crashed my hard drive and lost them. Now I can't find them again, lol. They are out there, somewhere.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ortiz on July 04, 2007, 11:14:19 AM
Hello

great mod Bigguy. Im manually editing Board.Template.php but when i reload the page i see that:

Parse error: syntax error, unexpected $end in
 .../Themes/Forosdeportivos/BoardIndex.template.php on line 483

What im doing wrong? Or perhaps is that my icons structure in theme are wrong?

Best regards

SMF: 1.1.3
Theme: Editing my own theme - Based on Default Theme

EDIT:

and another question. I have a forum with a large number of boards. 30 or 40 so its impossible to me make an image of each board. What happens if i want some board doesn't have a new image? Its neccessary make a folder to each board like /theme/icons/1,/theme/icons/2,/theme/icons/3,/theme/icons/4, and etc ?

Thanks :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ortiz on July 04, 2007, 11:56:06 AM
Ups, ok.  The problem was a '{' in a middle of code. Im going to make images  to test the mod :)

EDIT:

Well,definitively don't work. I believe that i followed all steps correctly but now im not sure.

Any help will be appreciated.

EDIT2:

After of reading all thread i read the solution. The images are finally show  ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: PoLlama on July 04, 2007, 02:05:41 PM
Does this have support for "New Posts", "No New Posts", and "New Posts(Sub-Forum)"?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 04, 2007, 11:40:51 PM
When you make the images on.gif, off.gif and on2.gif these will be the New posts and no new posts images.

@ ortiz: glad you got it. ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: eleven0 on July 08, 2007, 02:08:20 PM
I got a problem with this, I was going to try to apply a different theme than default one. But i don't even have those files in my theme (BoardIndex.template.php, MessageIndex.template.php).

Can someone tell me what i can to do get this mod work?

I'm using 1.1.2, camo theme.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 08, 2007, 07:48:58 PM
If those files are not in your custom theme folder than that theme will use the default template files, so if you have it installed now then you should be good to go. Just move your images to your custom theme folder.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ASF on July 17, 2007, 10:24:25 PM
I am using the defualt theme and the cbi 1

I have uploaded the on.gif and etc images at

theme/default/images/icons/5/

Nothing shows up???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ASF on July 18, 2007, 10:01:16 AM
the old Default icons are not there anymore plus i can't get the new ones to work. gosh??

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 18, 2007, 11:53:44 AM
Nothing is done to the default icons. If the new custom ones aren't there then the default are supposed to show. Can you uninstall the mod and see what happens.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TrueSatan on July 18, 2007, 01:07:19 PM
How about a CHMOD check over of the directories and files? Go to:

ACP>Packages>Options>

Set the "Installation Options" according to your hosting then set "Cleanup Permissions" for "All files are writeable" then "Change Permissions" check via ftp to see that it has worked and that all the files and directories of your forum are CHMOD 775 or 777.

 You should make all files writeable by this method before installing or uninstalling any mod or theme though you can make the permissions "tighter" using the same method after these mod/theme changes.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: aglioeolio on July 19, 2007, 04:28:47 PM
thanks for the update!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ASF on July 20, 2007, 12:35:15 AM
Nothing is done to the default icons. If the new custom ones aren't there then the default are supposed to show. Can you uninstall the mod and see what happens.

Yes i have unstalled the MOD, now the default icons are there.

but still it will not show up at all and i have followed all steps.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 20, 2007, 01:19:02 AM
What version did you use. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ASF on July 20, 2007, 04:09:46 PM
i am using cbi-1 and after hours of trying i still can't get it right.


Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 20, 2007, 04:41:49 PM
If you want when I get home I will PM you and take a look at it myself to help you out. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ASF on July 20, 2007, 04:49:07 PM
cheers man, i've Pm ya with my details already.

 8) 8) 8) 8)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tambay_lang on August 16, 2007, 03:20:18 AM
We have around 40-50 boards. We're using SoftDark Theme

Questions:
 If I create only 20 folders. /1/../2/..../20/ And I modify my board index and message index. Will the remaining boards 21-40 still work on the default icon? Or will this set up messed up my forum and receive error message?

To simplify, Can I modify my board and message index after I created /1/ and then later on create the /2/ to /40/ or should I wait 'till I finish all forty folders for each board before I edit my board and index.php?

Thanks a lot.. Looking forward to using this mod.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on August 16, 2007, 11:07:19 AM
The only boards that will have custom icons is the ones you create folders for; all others will default to the original icons.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tambay_lang on August 17, 2007, 01:15:05 AM
thanks .

So you mean even if I change

For cbi v1, in your BoardIndex.template.php find:

Code: [Select]
// 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], '" />';

And replace with:


Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}

In MessageIndex.template.php find:

Code: [Select]
// 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], '" />';

And replace with:

Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}


And create only 20 folders out of the supposed 40 folders for 40 boards. It will still work just fine?




Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on August 17, 2007, 10:58:00 AM
Yes it will. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tambay_lang on August 21, 2007, 03:23:31 AM
thanks bro.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Mohamed GadAllah on September 04, 2007, 04:03:48 PM
Hi
I've really read the thread twice
and did followed instruction
but really still confused
may you please tell me which file i should download to 1.1.3
i do not have any thing installed before
just a new clean installed forum
so shall i get the 0.5 or 1.0?
and really i did followed the folders layout but really can not make it out
please help me
I am using SMF 1.1.3
and my website is like this:
http://pro-designations.info/index.php?action=forum
and for the first forum i have its url is like this:
http://pro-designations.info/index.php/board,1.0.html
i did not found this url format in the thread so i am really got lost
i crealted the folders like this:
/public_html/Themes/default/icons/1/
so what is missing?
I included a on_1.gif image
but nothing changed
Please advise
THanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 04, 2007, 05:10:44 PM
name them on.gif and off.gif and on2.gif. These go into the folder of the board you want them to show on. So for example:

/public_html/Themes/default/icons/1/on.gif
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: franklinrony on September 08, 2007, 07:50:58 PM
i found more png format how allow png and gif format?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 08, 2007, 08:57:26 PM
Convert the .png to .gif with your favorite editor and that would solve your problem.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Tysmyster on September 18, 2007, 08:30:38 PM
Hi,

Installed this mod, working fine, great work! Just one thing, I can't get it to work for my child boards. Do they have ID numbers same as main boards? Do their folders go in the same folder as the 1,2,3... folders of the mainboards? I figured out what the ID of each board was by experimentation. Is there a way to just see the board's ID?

Thanks!

EDIT: Never mind, I figured it out. To answer my own questions: Yes, they have ID numbers same as main boards and they go in same folder. Still don't know how to see board's ID number but it's easily figured out through experiment.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 18, 2007, 08:50:45 PM
Board ids will show if you hover your mouse over it and look to the bottom left corner of your browser.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ShawnX on October 12, 2007, 10:22:23 AM
Ok..

SMF 1.1.4
TP 0.9.8

Installed this mod with no errors.

Created folder: theme\images\icons\13

Created icons: on.gif, on2.gif, off.gif

Uploaded icons to created directory: theme\images\icons\13\on.gif, theme\images\icons\13\on2.gif, theme\images\icons\13\off.gif

Refresh my board index.... Board is still using the default icons.....  ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on October 14, 2007, 03:21:01 PM
Try this:

theme\icons\13\on.gif
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ShawnX on October 14, 2007, 04:16:57 PM
Try this:

theme\icons\13\on.gif

Ahhh...that was the problem.  Thanks! 8)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on October 14, 2007, 04:47:23 PM
Not a problem. ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: asdas2 on November 02, 2007, 01:09:15 PM
hey bro .... thanks for the mod ... this is wat is wanted .

but


when i was trying to install that mod via package manager i got this error :(



Install Actions
Installations actions for "cbi, 1.0":
Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Themes/default/BoardIndex.template.php Test failed  
2. Execute Modification ./Themes/default/MessageIndex.template.php Test successful


i dun kno wat to do wid this ..... can u plzzzz tell me whats wrong with my board.index file .....



EDIT:  I uploded my Board.Index file, if u wanna take a look at it ....

and Thankz for ur help ....
 
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TrueSatan on November 02, 2007, 01:49:51 PM
Your error is a variant on the most common error of all those reported on these pages...it tells you that another mod you have installed has already edited the file in question and that you thus need to do a manual installation of this mod. Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)

 I know I've given you this advice on other mods and had you done a search you would have found it on many postings.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: OZSlayer on November 07, 2007, 09:09:35 PM
I have tried many time now to get this working with no luck, if there is some who can help me out please do.

Thanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 08, 2007, 12:26:17 PM
Try this version and see if it works better; if not tell me what exactly it fails on.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: asdas2 on November 09, 2007, 01:13:17 AM
Install Actions
Installations actions for "cbi, 1.0":
Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
2. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
 
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: shumar on November 09, 2007, 05:31:57 AM
Can someone explain me difference between on.gif and on2.gif ??

Thank you.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TrueSatan on November 09, 2007, 05:37:17 AM
@ asdas2

 Constantly posting the same query, as you have tried on me before, won't get you a different answer. As you know perfectly well having had it explained to you repeatedly you need to manually edit to install this mod...the details including links have also been given to you repeatedly.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: asdas2 on November 09, 2007, 08:53:02 PM
@ asdas2

 Constantly posting the same query, as you have tried on me before, won't get you a different answer. As you know perfectly well having had it explained to you repeatedly you need to manually edit to install this mod...the details including links have also been given to you repeatedly.


heyyyy chill bro :)

i was just telling biguy whats the wrong wid this new version.

i'll do the manuall editing 2night

THankzzzz for the help
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 12, 2007, 12:12:07 PM
It should not have failed on that. What version of SMF are you using. ??? Do you have other mods installed. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: asdas2 on November 13, 2007, 01:16:06 AM
i m using 1.1.4

and i have 42 mod installed

.......

i manually installed the mod ....


but i cant understand how to set new board image ... its so confusing ... it saying make a fodler then upload image

on off .......

soo hard to figure it out:(
:(
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 13, 2007, 01:31:37 AM
Go back through this thread; all the answers are here. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Dzuma on December 18, 2007, 06:47:06 AM
Hello, this mod should give nice graphical effect to any forum. Thanks to the modder.
Before I go and try it, I'd like to ask couple questions regarding this mod.

If I understand correctly this mod will remove current on/off.gif I have. Is it possible to keep that one and add another column that will show the unique icon for the board?

Thanks again, I will wait a little bit and if no reply I'll try to figure it out for myself. :P :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 18, 2007, 11:53:54 AM
No it does not remove anything. If you have cbi installed; the only way it works is if you upload new images to a seperate folder, keeping the original on/off .gif for backup in case the custom .gifs you upload don't work. There is no need to add another column. With a bit of code on the board name you can have an image right beside the description of the board. I have to find that code now...hold on.

Ok, try this. When creating a board; in the boardname field; put this before or after the board name:

Code: [Select]
<img src="http://www.yoursite.com/forum/yourgif.gif">
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: allumius on December 21, 2007, 04:27:53 AM
i have 1.1.4 and board icons 1.0

Sorry for my english
I have one problem

If i have one forum for example called "Sport" without  child forum, the mod work fine.
But if the forum "Sport" have a child forum for example called "basket", the mod not work fine because if de child forum called basket have a post unread, the imagen "off" (the new "off" imagen not the default "off" image) not work  :-[
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 21, 2007, 09:07:20 PM
 Have you setup all the folders right. ??? You have to set up the folders for the child boards as well.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Black Dragon on December 22, 2007, 11:25:37 AM
hello!!
I have SMF 1.1.4 and the default theme.
I would like to change the icons of all the boards....But i would like to have all the boards using the same icons(on.gif,on2.gif,off.gif).
I mean i would like to upload the on.gif,on2.gif,off.gif i made and have those for all the boards.How i can do that?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 22, 2007, 11:32:57 AM
You don't need a mod to do that. Right click on the on.gif or off.gif that is on the board now and go to properties to find out where the on, on2 and off.gif are. I think they are in the image directory of your theme. Then just upload your gifs and overwrite the originals.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: au8ust on December 22, 2007, 11:39:06 AM
Hi,

I got Test failed in ./Sources/ModSettings.php using SMF 1.1.4 with following mods installed
Code: [Select]
Mod Name  Version 
1. Colorize Boards 1.0
2. Add Domaintools to TrackIP 1.0
3. Googlebot & Spiders Mod 2.0.3
4. Ad Managment 2.3
5. Advanced Visual Verification 1.2
6. Avatar on Member List 1.0
7. blinkbbc 1.0
8. Downloads System 1.0.3
9. Enhanced Quick Reply Box 2.0.2 2.0.2
10. FavIcon 1.1
11. Global Headers Footers 1.3
12. Hide Tag 1.7.0
13. Language Drop 1.3
14. Membergroup Color Legend 1.1
15. Most Popular Topic Today 2.0
16. Topic Ratings 1.03
17. Users Online Today Mod 1.4.0
18. SMF Trader System 1.1
19. Thank You Mod 1.2.0
20. Streaming 3 4.2.2b
21. SMF Archive 1.1
22. SMF Sitemap 1.2.1

Any idea to fix this?

P.S. I know that manually modding is possible, but I just wanna know if I could install this mod without modding it manually.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 22, 2007, 11:42:54 AM
The cbi mod does not touch ModSettings.php at all.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Black Dragon on December 22, 2007, 03:33:14 PM
hello!!
I have SMF 1.1.4 and the default theme.
I would like to change the icons of all the boards....But i would like to have all the boards using the same icons(on.gif,on2.gif,off.gif).
I mean i would like to upload the on.gif,on2.gif,off.gif i made and have those for all the boards.How i can do that?

I tried that but i couldn't see any icons at all...:(
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 22, 2007, 03:40:29 PM
Did you do a hard refresh. ??? ctrl + f5
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Black Dragon on December 22, 2007, 03:46:36 PM
OK!!!It worked!!!
I didn't know that there was a hard refresh...:P
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 22, 2007, 03:54:50 PM
Glad you got it. :) The hard refresh bypasses the browsers cache and gets all info right from the server.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Black Dragon on December 22, 2007, 07:27:26 PM
Glad you got it. :) The hard refresh bypasses the browsers cache and gets all info right from the server.
Nice!!!thanks for the info!!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: au8ust on December 22, 2007, 10:16:15 PM
The cbi mod does not touch ModSettings.php at all.

Okay, then I'll try to install again.

Thanks :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: allumius on December 23, 2007, 04:18:48 PM
Have you setup all the folders right. ??? You have to set up the folders for the child boards as well.

I do not understand you
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 23, 2007, 05:08:07 PM
What version are you using. ???

Have you setup all the folders right. ??? You have to set up the folders for the child boards as well.

I do not understand you
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: allumius on December 23, 2007, 05:29:10 PM
This one cbi-1.zip in SMF 1.1.4
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Munze on December 25, 2007, 02:13:03 AM
How to change child boards icon?I was trying with subfo-on.gif and subfo-off.gif but nothing :/ Help?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 25, 2007, 10:57:18 AM
You have to make a folder with the id # of the child board and put your icons in there. cbi 1 is the only version that supports child boards.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Munze on December 25, 2007, 11:31:33 AM
Yup,i was trying that too,but nothing..
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 25, 2007, 04:51:07 PM
is the folder in the right spot. Did you read the readme. Back a page or two there is instructions on where the folders should go.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Sheree on January 01, 2008, 06:35:54 PM
hi pls. guide me I am using
SMF 1.1.4
TinyPortal v0.9.8
Theme: XD-Obstuse
Mod ver: cbi-1

I did the manual edits on the BoardIndex.template and on the MessageIndex.template

I created a folder named icons and the path is
Themes/TP_XD-Obstuse/icons/1/on.gif
 
but no luck 

so i thought since
there is an icons folder already on the TP_XD-Obstuse folder so what i did is just created a folder named 1 inside the icons folder

Themes/TP_XD-Obstuse/images/icons/1/on.gif <<(my own gif just named on.gif)

 but still no luck making this mod work



Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 01, 2008, 07:07:14 PM
Have you tried ctrl + f5 ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Sheree on January 01, 2008, 09:16:45 PM
yes  i did tried ctrl + F5 but still  no luck
 i even tried this path

Themes/TP_XD-Obstuse/images/1/on.gif

still no luck sir

 i attached my BoardIndex.template and  MessageIndex.template
 Please help thanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 01, 2008, 09:19:11 PM
This is were mine are:

/Themes/MY_theme/icons/1/off.gif

check permissions on your folders  (icons and board_id folders)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Sheree on January 02, 2008, 03:15:12 PM
i set all permissions to 777  pressed ctrl + f5

I copied your path

but still no luck

here is a screenshot

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi18.tinypic.com%2F8gf3dvm.jpg&hash=9ee9bf8551fe54a572faacc0e371f6cb)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 02, 2008, 04:59:31 PM
I have checked your files and all the code seems to be in there the right way. You say the images are in the right place and the permissions are set right also. ??? You might have to PM me your admin login details to the forum and maybe ftp info so I can see what is going on.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Sheree on January 02, 2008, 07:41:53 PM
Update:
for some reason some of the icons are showing up but they are not in the right orders
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 02, 2008, 08:07:19 PM
Then you have the board id's wrong. If you hover your mouse over one of the board icons....down in the bottom left of the browser it will tell you the url to that board and the id is on the end of it
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 02, 2008, 08:09:34 PM
See the 96 at the end of this url.....That is the board id:

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Sheree on January 03, 2008, 06:15:08 AM
woohoo thank you!!  finally got it working

more power to you bigguy and have a happy new year
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: dhoodle on January 10, 2008, 06:22:30 AM
hey this looks great, but the link for the mod is not working ? does anyone have a link ?


EDIT - google is your friend...

the link is
http://custom.simplemachines.org/mods/index.php?mod=511

you may want to update the first page ?

EDIT 2 I have another question...

what do I change to use .png images ? I need the images to be transparent, so what code do I need to change for the mod to accept .png instead of.gif

also, I have a theme, what do I have to change to make it work with the theme ?

EDIT 3 - I have installed it correctly to the theme, but I still would like to know how to configure it to .png :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 10, 2008, 04:01:10 PM
I think you would have to change the code in SMF in order for .png's to be used and then change it in the mod.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: allumius on January 23, 2008, 05:33:36 AM
I have this problem
If a boards have not childboards inside, the icon work fine but if the boards have some childboards inside, the icon of board not work
Look this images please

In the first image you can see the board "cafeteria" and "Prensa" no problem And "deportes" icon not work

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg509.imageshack.us%2Fimg509%2F3166%2Fboardsxp7.th.jpg&hash=23d5219a91ab16b337e033604d6e78ed) (http://img509.imageshack.us/my.php?image=boardsxp7.jpg)

This second image is the child board of "Deportes" board

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg404.imageshack.us%2Fimg404%2F408%2Fchildboardsku1.th.jpg&hash=34def7960f1c61b12bcea5291fad7ada) (http://img404.imageshack.us/my.php?image=childboardsku1.jpg)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 23, 2008, 12:16:25 PM
Did you press ctrl +f5 after you installed the mod. Try that and see what happens.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: backend on January 23, 2008, 02:48:33 PM
Bigguy, thanks for this great mod. I have already installed it, although I haven't done the modifications. Just couple of questions please:

1-I will have to upload the new board-specific icons to Themes/default/icons/ right?
2-Once I have done the above, where do I go to configure each board to take on the new icon?
3-Don't we have two have two image states? one for On and one for OFF? how do we set that?

Thanks a lot,
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 23, 2008, 04:42:58 PM
Once you have it installed all that is needed (if you are using the default theme) is to create a different folder for each board; within that folder you would put your on.gif; off.gif.So your path would look like this:

/Themes/default/icons/1/off.gif

1 being the board id for the board you want to show those particular images for. In order to find the board id you can hover your mouse over the on.gif and down in the bottom left corner of the browser it will show a path:

action=unread;board=1.0

1.0 would be the board id. Hope that clears it up :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: backend on January 23, 2008, 04:57:43 PM
WOW that is pretty easy, thanks a lot man.

Can't wait to go home and apply it.

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 23, 2008, 05:23:50 PM
One little tip....If the icons don't seem to be showing after you do this...use ctrl + f5 and refresh the page right from the server. They should show then. ;) Have fun. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: backend on January 23, 2008, 07:52:16 PM
It is working great BigGuy, thank you very much.

The onyl problem I am having, is with the graphics itself. I need to make sure the icons don't have a white background. Not sure how to do this.... Should I make the icon's background transparent?

Thanks a lot
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: backend on January 23, 2008, 08:06:48 PM
and where can we find free icons to use for our website?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 23, 2008, 10:22:50 PM
I search google for "free .png icons"

http://www.google.ca/search?hl=en&q=free+.png+icons&btnG=Google+Search&meta=

and then change them to fit my needs and turn them to .gifs and use them. That's what I do anyway.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Garry1953 on January 23, 2008, 11:23:04 PM
I like this mod, and will be using it on my forum.

Bigguy
Thanks for sharing it.

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 24, 2008, 02:20:33 AM
Your more than welcome. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: allumius on January 24, 2008, 07:13:26 AM
Did you press ctrl +f5 after you installed the mod. Try that and see what happens.
Nothing  :'(
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 24, 2008, 10:29:10 AM
Do you have all the folders made and in the right places. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: allumius on January 25, 2008, 02:29:13 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
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: lvzifer on January 25, 2008, 01:03:36 PM
this mode is not working on my board .. even on default skin .. I am using default modern .. is there some modification in admin panel after instalation or ?? What I do wrong ..
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: et10yl on February 02, 2008, 01:58:44 PM
Hi, I've installed the mod successfully and created the correct folders across the 5 different themes I'm using. The custom icons are showing correctly in default, girlyman, but not in babylon, Ig-Oh, or classic yabb. I've tried in the themes that can't display the icons properly to change the paths. For example:

Themes/igoh114/images/icons/8
Themes/igoh114/images/icons/icons/8
Themes/igoh114/icons/8

But none of these configurations seem to be working. I'm wondering if there is something going on that is theme specific that allows the custom board icons to work on some custom themes and not on others?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 02, 2008, 03:34:55 PM
If you have manually added the code to the required template files in each theme then there is no reason why it shouldn't work.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ValeriusCdlP on February 03, 2008, 12:34:47 PM
What changes are needed for running this mod v1.0 on smf 1.1.4 with dilbermc theme?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 03, 2008, 12:52:59 PM
All the edits for the mod and where to put them should be in this thread somewhere. There are only 2 to do.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ValeriusCdlP on February 04, 2008, 08:38:41 AM
sorry for my english.


If I use your modifications on dilbermc's BoardIndex.template.php and MessageIndex.template.php



Dilbermc Original BoardIndex.template.php
Code: [Select]
// If the board is new, show a strong indicator.

if ($board['new'])

echo '<img src="', $settings['images_url'] . '/'. $settings['theme_main_color'], '/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'] . '/'. $settings['theme_main_color'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';

// No new posts at all! The agony!!

else

echo '<img src="', $settings['images_url'] . '/'. $settings['theme_main_color'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';



Your mod BoardIndex.emplate.php
Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}









Dilbermc Original MessageIndex.template.php
Code: [Select]
// If the board is new, show a strong indicator.

if ($board['new'])

echo '<img src="', $settings['images_url'], '/', $settings['theme_main_color'], '/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'], '/', $settings['theme_main_color'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';

// No new posts at all! The agony!!

else

echo '<img src="', $settings['images_url'], '/', $settings['theme_main_color'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';




Your mod MessageIndex.template.php
Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}




I see the new board icons but not the original board icons on those boards that have not new icons.


What code I need on ***************:



Your mod BoardIndex.emplate.php
Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=********************

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=******************

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=*******************

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}




Your mod MessageIndex.template.php
Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=***************

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=***************

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=***************

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}



to see all new and old board icons on those boards that have not new icons?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 04, 2008, 11:25:58 AM
Once you change the code if there are no new icons then this will revert back to using the original SMF icons.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ValeriusCdlP on February 04, 2008, 01:56:09 PM
Sorry but that's not work, i repeat:


If I change this on dilbermc theme

Dilbermc Original BoardIndex.template.php
Code: [Select]
// If the board is new, show a strong indicator.

if ($board['new'])

echo '<img src="', $settings['images_url'] . '/'. $settings['theme_main_color'], '/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'] . '/'. $settings['theme_main_color'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';

// No new posts at all! The agony!!

else

echo '<img src="', $settings['images_url'] . '/'. $settings['theme_main_color'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';


For this

Your mod BoardIndex.emplate.php
Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}







And this


Dilbermc Original MessageIndex.template.php
Code: [Select]
// If the board is new, show a strong indicator.

if ($board['new'])

echo '<img src="', $settings['images_url'], '/', $settings['theme_main_color'], '/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'], '/', $settings['theme_main_color'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';

// No new posts at all! The agony!!

else

echo '<img src="', $settings['images_url'], '/', $settings['theme_main_color'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';



For this

Your mod MessageIndex.template.php
Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}




I see the new board icons but not the original board icons on those boards that have not new icons.

I obtain that:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg504.imageshack.us%2Fimg504%2F1485%2Ferroryk1.jpg&hash=7877c7766646dff65a9a0ad86ffac94e)


So, I suspect that the code on **************** is different


What code I need on ***************:



Your mod BoardIndex.emplate.php
Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=********************

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=******************

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=*******************

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}




Your mod MessageIndex.template.php
Code: [Select]
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
else
$board_new_img=***************

echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
else
$childboard_new_img=***************

echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.gif'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.gif';
else
$board_nonew_img=***************

echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}



to see all new and old board icons?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 04, 2008, 02:18:56 PM
This has been installed on dilber before with no problems. Are you sure you made the edits right.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Galjoen on February 23, 2008, 08:29:13 AM
Hi Biggguy,
Need somehelp please.
Installed mod via package manager and manually, still cannot get to work, Am useing smf 1.14
Have made directory themes\icons\1\on, off  and on2 gif's

Also tried themes\default\icons\1\on, off  and on2 gif's

the gif is the same one, just renamed to on, off and on2
have attached 2 files after mod, could you please tell me where I have gone wrong
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 23, 2008, 11:24:38 AM
Your code looks fine and there are no errors in it. Did you press ctrl + f5 after you put the icons up.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Galjoen on February 23, 2008, 12:17:01 PM
yes, did ctrl + f5 ....from what I can see it looks fine, but will not show, tested icons that I want to use by installing to themes/default/images. The icons work fine if I change them to default.  I have checked the board # by holding mouse over it and have created same directory in icons dir.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 23, 2008, 01:28:33 PM
I have company right now but if you want to PM me your forum url I will take a look in a bit for you. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Galjoen on February 23, 2008, 03:32:15 PM
here is a copy from the server, as you can see I have tried to put icons in themes and default, just in case
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 23, 2008, 03:41:28 PM
What are the permissions set at for those folders. ??? That shouldn't make a difference really but figured I would ask.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Galjoen on February 23, 2008, 03:57:09 PM
Themes is 775 and icons is 777
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 23, 2008, 04:04:27 PM
When I go here it tells me it doesn't exist. Are the files owned by you:

http://capetownfishing.co.za/Themes/default/icons
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Galjoen on February 23, 2008, 04:15:11 PM
these are the files in the icon dir:
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 23, 2008, 04:20:53 PM
Can you ftp in and see if your ownership on the files and folders is NOT set to 99 You should be able to tell the ownership of the files in the ftp screen to your left. If it says 99 for any of them then that means the files or folders are ownded by apache and you can't or won't be able to do anything with them.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Galjoen on February 23, 2008, 04:27:21 PM
Nothing is set to 99, checked all dir/files etc. going to log of on this pc, will reconnect on other pc in about 5 min
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: hitman94 on February 29, 2008, 06:05:58 AM
Hi Bigguy, i'am using xbox 360 theme elite and i don't have the file BoardIndex.template.php, so how to apply your mod?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on March 01, 2008, 03:27:07 PM
If you don't have that file then you don't need to worry about applying the edits to it because they are done to that file when you install the mod.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: devinrajaram1993 on March 01, 2008, 04:42:59 PM
my theme on my site only has an index.template what do i do to make it work in that one
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on March 01, 2008, 05:32:12 PM
This mod only touches the Boardindex and the messageindex.template.php
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: devinrajaram1993 on March 01, 2008, 06:59:39 PM
so i cant have it?? i heard that my default theme can implement it to work is that true
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on March 02, 2008, 03:57:53 PM
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.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Paranoimia on March 06, 2008, 05:32:53 AM
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.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on March 06, 2008, 08:43:31 AM
I'm very glad you like it. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: goaskanna on March 19, 2008, 08:26:07 AM
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
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on March 19, 2008, 12:26:44 PM
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.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: goaskanna on March 19, 2008, 12:54:42 PM
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
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on March 19, 2008, 12:57:24 PM
Thank you. I'm glad you like it. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: allumius on April 09, 2008, 05:04:38 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?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Marcus Forsberg on April 13, 2008, 07:33:55 AM
Is it possible to use .png files instead of .gif's? ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on April 14, 2008, 12:29:28 PM
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.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: FerociousSM on May 07, 2008, 04:48:36 PM
I need help. I'm looking at my /Themes/Musiconica/ dir. My BoardIndex.template.php & MessageIndex.template.php look like this:

BoardIndex.template.php
Code: [Select]
/* 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
Code: [Select]
<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
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 08, 2008, 07:33:59 PM
Search for this:

Code: [Select]
// If the board is new, show a strong indicator.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on May 08, 2008, 07:55:40 PM
Can I use this with 1.1.5?

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 08, 2008, 08:20:47 PM
You should be able to try it and if not I will update it soon.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on May 08, 2008, 08:50:05 PM
Your a good man bigguy  :D :D  I am getting errors.....I am really looking forward to using this...
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: FerociousSM on May 09, 2008, 12:48:07 PM
I got this error after replacing this manually.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg301.imageshack.us%2Fimg301%2F6226%2Fclipboard1hx6.jpg&hash=70e429cdffecf1ba7f74f0fcb31fde2c) (http://img301.imageshack.us/img301/6226/clipboard1hx6.jpg)

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on May 09, 2008, 03:21:08 PM
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
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on May 12, 2008, 07:31:55 PM
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.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 12, 2008, 08:09:55 PM
It should run with 1.1.5 does it not. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on May 12, 2008, 08:14:04 PM
Please look at my message four messages up... I have attached my errors to the message...

Please advise

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 12, 2008, 08:27:35 PM
Ok, slipped my mind. I will update soon. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on May 12, 2008, 08:32:45 PM
Ok, slipped my mind. I will update soon. :)

I will name my next child after you !!!   ;) ;) ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 12, 2008, 08:35:58 PM
lmao; well don't go that far, lol but thanks. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cytoplasm on May 14, 2008, 04:43:20 PM
Hello.  I am trying to use cbi15.zip with smf 115 and a custom theme Wow-DK.  i downloaded everything from this web page.

Anyhow, I was wondering if you could help me.  I would like to add the custom icons to the forums, but the find and replace of code doesn't match exactly, and whenever i try to do it, it really messes up the forums.

This is what i see, and am replaceing


         // Is this board itself new?
         if ($board['new'])
            echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
         // Is one of this board's children new, then?
         elseif ($board['children_new'])
            echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
         // I guess it's not new at all.
         else
            echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';

         echo '</a></td>
            <td rowspan="2" align="left">
               <b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
         ', $board['description'];


Is there anything else i can post to show you so that maybe you can help me?

thanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on May 14, 2008, 08:24:01 PM
Try replacing just this:

Code: [Select]
// Is this board itself new?
         if ($board['new'])
            echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
         // Is one of this board's children new, then?
         elseif ($board['children_new'])
            echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cytoplasm on May 15, 2008, 04:05:59 PM
I just cant seem to make it work.  below are links to the files.  If you have time maybe you could please look at them?  maybe its the theme?  I would be very appreciative of any help.

BoardIndex.template.php (http://www.buffaloruninn.com/smf/BoardIndex.template.php)

MessageIndex.template.php (http://www.buffaloruninn.com/smf/MessageIndex.template.php)

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on May 15, 2008, 04:17:32 PM
???

That's not going to work.
linking to a php file on a server means that the server is going to try to run/parse the php.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cytoplasm on May 15, 2008, 07:10:39 PM
its just a file server.  its not where the forums are at.  you can shift-right click, and save file as.  then it will d/l it.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on May 15, 2008, 08:18:58 PM
nope... sorry, those links try to parse...  remember, there is html mixed up with the php.

If you want help, then you need to either attach the files, or give someone access to your system.

But that should not be needed.  This mod change all of 10 lines....
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on May 19, 2008, 10:18:44 AM
Ok, slipped my mind. I will update soon. :)

Just a friendly reminder to see if you still have the time to use this with 1.1.5.....
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cytoplasm on May 20, 2008, 02:40:29 PM
okay sorry about the mix up.

I know its just 10 lines, but for some reason, it doesn't seem to work for Wow-DK mod.  I am also using smf115

attached are my files.  I appreciate any help.  thank you.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on May 30, 2008, 09:30:37 PM
Hi

Just a friendly nudge to remind you.......Hopefully you will find some time to make your awesome mod compatible with 1.1.5


Ron
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Vandaahl on May 31, 2008, 04:25:47 PM
I'm installing this mod manually on the default 1.1.5 theme, and I noticed the code I must replace should contain this variable: $board['is_redirect']. But it's not there, so I guess it was removed or renamed for SMF 1.1.5? Anyway, the mod works regardless, but it generates this error in the log:

8: Undefined index: is_redirect

The error is gone after you remove this part of your MOD code:


// Is it a redirection board?
if ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on May 31, 2008, 09:31:00 PM
Hi Vandaahl

I am waiting for the Author to prepare this mod for 1.1.5.    I have noticed your last message. Can you tell me if I install it manually and remove the code you had mentioned, will I have any problems?

I run the default template with very little mods..

Thanks
Ron
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Vandaahl on June 01, 2008, 08:41:16 AM
Hi Vandaahl

I am waiting for the Author to prepare this mod for 1.1.5.    I have noticed your last message. Can you tell me if I install it manually and remove the code you had mentioned, will I have any problems?

I run the default template with very little mods..

Thanks
Ron

Hi Ron, It worked for me, so I don't see why it won't work for you :) As long as you don't use "redirection boards", whatever those are. Never even heard of them.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on June 06, 2008, 10:07:02 PM
Ok, slipped my mind. I will update soon. :)

Just a friendly reminder to see if you still have the time to use this with 1.1.5.....

When ever you find some time, can you code this for 1.1.5 ?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Marcus Forsberg on June 11, 2008, 05:47:16 AM
Where do I find that addon for png files?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 11, 2008, 11:45:14 AM
I have been a bit busy lately but I will get this coded for 1.1.5 The addon might be in the charter members board. There should also be a copy of it on my site.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Marcus Forsberg on June 11, 2008, 01:12:18 PM
Yes I know that it's in your site, but I wondered where in your site?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Davey D. on June 11, 2008, 02:31:09 PM
Does not look like that topic has been updated recently, but here is the URL:

Code: [Select]
http://www.smfhelper.info/forum/index.php/topic,27.0.html
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 12, 2008, 03:26:13 PM
Here it is. cbi has to be installed to use this but all it does is change the .gif extension to .png so you can use .png icons instead.

For the redirect boards if you have any this will add an image above the  one already there. I will incorporate these two mods and clean up the code when SMF 2.0 gets a little further down the road.

To uninstall...make sure the add-on is uninstalled first then you may uninstall the cbi mod.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: HappyChinchilla on June 13, 2008, 12:28:15 AM
Hi,

I have a question about the "Custom Board Icons" mod. I am using it for my 1.1.5 forum.  Everything is working great, but I notice that the New Posts/No New Posts icon and text are still at the bottom before the Info Center. Is there a way to remove them?

Thanks in advance.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 13, 2008, 08:19:04 AM
Can you show a screenshot.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: HappyChinchilla on June 13, 2008, 12:03:36 PM
Hi Bigguy,

Thanks for your quick response. I have attached a screenshot for you.

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 13, 2008, 04:00:29 PM
You could just change the icons on them to reflect your new icons. I used to have icons for there that I custom made. Each one was a collage of two or three icons for the new post /no new post icons you are referring to. I grey scaled one and viola...I had new icons. (Hope that made sense.)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: HappyChinchilla on June 13, 2008, 05:31:39 PM
Bigguy, is there a way to remove the New Posts/No New Posts icon and text in the coding? Since each board has a different icon with this mod, it is kind of confusing to have those two New Posts/No New Posts icons at the bottom.

Thanks.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kai920 on June 14, 2008, 09:18:12 AM
I am using it for my 1.1.5 forum.  Everything is working great, but I notice that the New Posts/No New Posts icon and text are still at the bottom before the Info Center. Is there a way to remove them?

Hi, did you do a manual installation?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: HappyChinchilla on June 14, 2008, 01:41:50 PM
Hi kai920,

I did not install it manually. Are the icons going to disappear if I install the mod manually?

Thanks.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kai920 on June 14, 2008, 01:48:50 PM
Well, I'm only asking because I got an error when trying to install thru package manager. I see a few other people using 1.1.5 have the same small issues with searching for code that does not match exactly the xml...
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 15, 2008, 03:10:23 PM
Hopefully I can get around to updating this later tonight. If not it will have to wait til Tuesday. Sorry for the delay folks. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kai920 on June 15, 2008, 11:26:56 PM
Thanks bugguy, it'd be very much appreciated :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: fangweile on June 16, 2008, 05:14:15 AM
Hello there,

I have manually installed this mod in my dilber mc theme and it really display just fine.

However, when I visit my error log, there are lots of errors on it

Here is the error:

Quote
8: Undefined index: is_redirect
File: /home/vol2/4sql.net/sq_697468/allkoreans.net/htdocs/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 145

Should i delete the is_redirect line code in my boardindextemplate.  ??? ???

Thank in advance
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: HappyChinchilla on June 16, 2008, 02:56:27 PM
Thanks in advance, Bigguy.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 16, 2008, 07:59:45 PM
I have packaged a new version of cbi. This version is for 1.1.5 and will probably work on earlier versions as well. It replaces the .gif extensions with .png automatically so you don't have to do it.

cbi-1.0a (http://custom.simplemachines.org/mods/index.php?mod=511)

This version will not work on SMF 2.0
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 16, 2008, 08:13:08 PM
cbi version 1.5 for SMF 2.0 has now been updated to work with 2.0 Beta 3.1 Public and no addon is needed now. it will automatically change the .gif extensions to .png.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: keyboard on June 16, 2008, 10:59:36 PM
bigguy !!!!

Many,many, many thanks for the upgrade to 1.1.5..... I will name my next child after you.......Works like charm...what a great mod  :D :D :D
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kai920 on June 16, 2008, 11:28:35 PM
thanks man!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 17, 2008, 12:03:06 AM
Glad you guys are happy and like it. :)   A baby named bigguy might not be the best idea though keyboard; lmao. ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Davey D. on June 17, 2008, 12:42:32 AM
Some help please. I am using the legacy Rocketheme SMFversatility2 theme and I tried several times replacing code without success (obviously).

This is my BoardIndex.template.php right around where I believe the code should go:

Code: [Select]
// 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'];

Here is my MessageIndex.template.php right around where I think the code should go:

Code: [Select]
// 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'];

I created this folder structure (testing on a local server):

c:\xampp\htdocs\smf\Themes\SMFversatility2\icons\1\

Inside I have 3 icons, "off.png" "on.png" and "on2.png"

I am assuming the 'board number' is the actual placement number, or order, the boards are in and not some code like Joomla uses for content ID. If so I could not find what each board's content ID is so I hope I was correct.

Forgot to indicate using SMF v1.1.5.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kai920 on June 17, 2008, 01:28:56 AM
Sorry just a quick question, what is on2 for? 

Nevermind, found out from here (http://www.simplemachines.org/community/index.php?topic=237856.msg1533669#msg1533669):

on.gif = new posts in parent board
on2.gif = new posts only in child board
off.gif = no new posts
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 17, 2008, 12:18:52 PM
@ Davey D.: Thos look like the right areas for the code and the right way to have the icon folders as well. In order to find the board id's hover your mouse over the board name and look to the bottom left corner of your browser. You will see a url there with a number in it. That number is the board id. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Davey D. on June 17, 2008, 01:59:07 PM
2 screenshots below - looks like the individual forum links go away.

Thanks for the 'board number' tip - the red icon (off.png) indicates I got that part right.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 17, 2008, 03:37:02 PM
Than either you are taking to much of the original code away or not enought of it. In the boardindex.template.php make sure all of this gets removed:

Code: [Select]
// 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], '" />';

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 17, 2008, 03:38:12 PM
And in the messageindex.template.php make sure allof this gets removed:

Code: [Select]
// 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], '" />';
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: dyrome on June 19, 2008, 07:09:46 AM
Hy all i have a little problem

i get this error :8: Undefined index: no_icon

: /var/www/virtual/dyrome.nl/htdocs/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 176

this is the line in boardindex.template line 176
                  echo '<img src="', $board_nonew_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';

Thanks in advanced
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 19, 2008, 08:41:43 AM
You shouldn't get that. Maybe the mod did not install all the way. Check your modifications.english.php and make sure the text string has been put in.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: fangweile on June 19, 2008, 11:40:11 PM
It finally works perfectly in my dilbermc theme without any forum error logs. THanks a lot for this great mod. ^_^
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 20, 2008, 06:54:32 PM
Your very welcome and I'm glad you like it. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: forepro on June 24, 2008, 03:09:29 PM
Hi Bigguy,

Thanks for this great mod.  :)

Could you tell me how to manually edit classic theme?
The only relevant code I can find in BoardIndex.template.php is

Code: [Select]
<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>
Thanks in advance!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 24, 2008, 06:11:51 PM
Have you tried replacing that with what I give you in the mod. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: forepro on June 25, 2008, 12:04:58 PM
Yes I tried but it gives me script error.
Sorry I have absolutely no idea about php.
Probably I've inserted the code wrongly.
It will really help if someone can show me how to insert the code like the mod site.
Which code to be add before or after which code.  Or what code should be replaced by what... stuff like that..

Thanks!!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 25, 2008, 02:20:50 PM
If you post the file you are having trouble with I will see what I can do later tonight when I get back on.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: forepro on June 25, 2008, 03:19:42 PM
Awesome!!

Here are the files.

Big thanks to you!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: HappyChinchilla on June 26, 2008, 02:06:11 AM
Hi Bigguy,

Were you able to remove the New Posts/No New Posts icons and text in cbi-1a? I installed it to my 1.1.5 forum, but the icons and text are still there. Would you please help me?

Thanks.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Nica on June 30, 2008, 03:47:40 AM
I am getting confused with the folders for this mod.
I have 1.1.5 and am using the default theme. I uploaded the mod but have not applied it because of my confusion after reading the notes first.

When I look in forum/themes/default/ , am I to make a new folder icon folder here?
When I look one step further n images , there is an icon folder already existing. Do I ignore that one?

I am really lost at the put  on.gif, on2.gif,  and off .gif in that folder part. ::)

I'd appreciate it if you'd straighten mr out a bit.
I tried uploading the icons to the default theme images folder/post folder anf the icon showed in Edit Icons and on the post bt not on the index board.

www.Mom-Me-dearest.com
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: fangweile on June 30, 2008, 07:27:46 AM
Yes you must create a directory  "icons" in your /themes/default/
and your icons must be in this url  /themes/default/icons/boardid/on.gif
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Nica on June 30, 2008, 01:27:49 PM
Yes you must create a directory  "icons" in your /themes/default/
and your icons must be in this url  /themes/default/icons/boardid/on.gif

[/color][/b]
I will do that. I'd really like to use this mod. But what do mean by the icons must be this url?

I apologize for my need for further direction but the good book says, "ye have not because ye ask not"
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on July 01, 2008, 07:32:00 AM
???   he was pretty clear.

You must add your board images into the (new) icons directory directly under your theme directory. (not the existing images/icons directory)

so, you will create themes/default/icons
you will create theme/default/icons/BOARDID for each board that you want a custom icon.
and you will put on.gif, on2.gif and off.gif into each of the BOARDID directories

and if'n you're referring to the xtian book...   "he helps those who help themselves..."   :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Nica on July 01, 2008, 12:21:26 PM
???   he was pretty clear.

You must add your board images into the (new) icons directory directly under your theme directory. (not the existing images/icons directory)

so, you will create themes/default/icons
you will create theme/default/icons/BOARDID for each board that you want a custom icon.
and you will put on.gif, on2.gif and off.gif into each of the BOARDID directories

and if'n you're referring to the xtian book...   "he helps those who help themselves..."   :)

Thank you for the clarification.
I have received lots of help since joining and making use of the community. By reading the threads I often have not even needed to post a question. It's been very beneficial to getting my site running well.

But one not so beneficial thing I find is that occasionally, responders make you feel stupid.
I always read and search before posting a query here. (helping myself) O:)
I am sure the" What part don't you get?" flavor, steers away many an easily intimidated Newbie.

But I will continue to ask when something is not so clear to Me. I have learned a lot and hope to continue to do so and even help someone else down the line. ("Each one...Teach one")

I was clear on the creating a new icon folder. But at the risk of sounding even stupidier...I still do not understand what is meant by:
put on.gif, on2.gif and off.gif into each of the BOARDID directories

I would really appreciate clarification on that from anyone who may be able to do so for a struggling Newbie like myself. :-\
Thanks.

mom-me-dearest.com
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Davey D. on July 01, 2008, 12:41:23 PM
When you 'mouse-over' a board's name, the http link should appear in the status bar of your Web browser. Within that http link you should see the board ID (ie., http://www.mycoolforum.com/index.php?board=29.0). Write that number down, or save a tree and paste to Notepad.

Fire up Gimp, Fireworks, Photoshop, or whatever and create icons with the names, "on.gif" and "off.gif" and "on2.gif." Within the folder of the theme you are using you need to create one folder, "icons."  Within that folder you need to create a folder for each board, using the example above you would have folders like this: /whateverThemeDirectory/icons/29/ and put the icons you created within each board folder. So each folder should have 3 icons, most likely different icons for each board.

Get it, Got it, Good! :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on July 01, 2008, 02:04:07 PM
BOARDID is, as Davey indicates, the ID# of the board... (just the number, not the decimal)

(for example, modifications and packages board on SMF here is board 59

So, you need a different directory for eac board that you want a custom icon for.

each directory should include on.gif (new posts in that board) on2.gif (new posts in a  child board of that board) and off.gif (no new posts)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Nica on July 01, 2008, 04:12:13 PM
When you 'mouse-over' a board's name, the http link should appear in the status bar of your Web browser. Within that http link you should see the board ID (ie., http://www.mycoolforum.com/index.php?board=29.0). Write that number down, or save a tree and paste to Notepad.

Fire up Gimp, Fireworks, Photoshop, or whatever and create icons with the names, "on.gif" and "off.gif" and "on2.gif." Within the folder of the theme you are using you need to create one folder, "icons."  Within that folder you need to create a folder for each board, using the example above you would have folders like this: /whateverThemeDirectory/icons/29/ and put the icons you created within each board folder. So each folder should have 3 icons, most likely different icons for each board.

Get it, Got it, Good! :)


Thanks a lot. Very discript.  Think I got it now.  :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Rosenstein on July 06, 2008, 02:23:46 PM
Maybe you should rename folder "icons" to "board_icons".
And add that "redirect.png" for 1.1.5 ?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 07:14:22 PM
I have no idea what im doing wrong here.
1ST I read the read me file. this is it.


CBI 1.0 {Custom Board Icons v1.0}

Thanks go to:

Kindred and all who participated in the threads at:
www.simplemachines.org and www.smfhelper.info
and to RebelRose for testing and to Marko "Mazeman" Kaartinen for his work in
coding. Thanks to all of you for making this mod possible.

Create icons folder in to your /Themes/default/.
In the icons folder create folder which name is the boards id,(meaning only the
number of the board) where you want custom board icon.
Then put on.gif, on2.gif and off.gif in that folder.

Structure:
forum/Themes/default/icons
forum/Themes/default/icons/board_id/on.gif
forum/Themes/default/icons/board_id/on2.gif
forum/Themes/default/icons/board_id/off.gif


Then i read this that was in the install on my forum.



CBI 1.0 {Custom Board Icons v1.0a}

Thanks go to:

Kindred and all who participated in the threads at:
www.simplemachines.org and www.smfhelper.com
and to RebelRose for testing and to Marko "Mazeman" Kaartinen for his work in
coding. Thanks to all of you for making this mod possible.

Create icons folder in to your themedirs root.
In the icons folder create folder which name is the boards id,(meaning only the
number of the board) where you want custom board icon.
Then put on.gif, on2.gif and off.gif in that folder.

Structure:
forum/Themes/default/icons
forum/Themes/default/icons/board_id/on.png
forum/Themes/default/icons/board_id/on2.png
forum/Themes/default/icons/board_id/off.png

NOTE: "board_id" = the id number of your board so the structure would look like
this for board 1:

forum/Themes/default/icons/1/on.png

This version is for SMF 1.1.5 and replaces the .gif extension with .png so you
can use nicer looking icons.


Ive read and reread this thread on what path to place the icons in. After making 15 0r so folders with all the combanations form this thread i still do not have it working.  ive set the cmod every which way. im only working with the default theme 1.1.5 and this version of CBI, CBI 1.0 {Custom Board Icons v1.0a} I have uninstalled and installed the earlier version and that didnt help. Any ideas would help me out alot.
Thank you for your time.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 10, 2008, 07:35:21 PM
Have you made this folder yet.

Themes/default/icons
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 07:38:40 PM
yes i have
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 07:39:58 PM
the site www.nflfannation.com
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 10, 2008, 07:42:40 PM
No you did not make the icons folder. You have the off.png in the images folder.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 07:46:54 PM
heres the screen shot of my ftp and where i put them i adde 2 icons folders

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 10, 2008, 07:51:00 PM
I can barely make out what you have in that screenshot. Do you have an off.png in the images folder. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 07:52:38 PM
yes i do. i added that just to make sure the path was okay
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 10, 2008, 07:55:26 PM
Can you PM me ftp login details and I will take a look for you.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 07:58:12 PM
Pm sent. if you could i use the Nemesis theme as the default
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 10, 2008, 08:01:33 PM
As you can see now on the first board there is a .png icon showing. You did not have an off.png file in the 1 folder in the icons directory.

/www/nflfannation.com/Themes/default/icons/1
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 08:03:09 PM
Thank you. I didnt relize you needed both to make it work thank you very much
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 10, 2008, 08:03:44 PM
No problem at all. :) I hope you like the mod.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 08:04:44 PM
im sure i will now i know what to do
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 08:32:15 PM
What edits are needed for other theme,s useing png
Thank you
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 10, 2008, 09:04:31 PM
I think i got it thank you
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Digitalhawk on July 11, 2008, 06:43:23 PM
Thank you for all your help Bigguy. The mod works great and i think makes the forum look alot better. have look www.nflfannation.com
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: scorpion92 on July 12, 2008, 06:07:21 PM
Hello.

As I change the mod so that instead of working with images in gif, I work in PNG format.

Excuse the English, because this translated by Google.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on July 12, 2008, 06:19:02 PM
scorpion, I think you had better try re-phrasing that, because your google translation made no sense at all..
The newest version of the mod works with PNG.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Achillea on July 18, 2008, 04:39:58 AM
After a couple of false starts (okay, five of them), I have this mod up and running and I like it.  I just have one small problem.

At the bottom of the board, just above the info center, is a sort of legend, with tiny little pictures of the icons representing New Posts and No New Posts.  These, unfortunately, have not changed.  They still look like the old icons (only verrrrry small).  Is there any way to fix this?

I'm using 1.1.5 with the Movies theme.  I had to put the icons/# folders in the theme/movies folder, because the mod couldn't seem to find them in the theme/default folder. 
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: IACS_CM on July 18, 2008, 04:50:03 AM
Hi,

Achillea, those images can be changed by uploading your preferred image with the same name.

In my case those images are located as follows (default theme)

/Themes/default/images/new_some.gif
/Themes/default/images/new_none.gif

Simply prepare an image you would prefer, naming one as new_some.gif, the other as new_none.gif and upload, overwriting the originals.

Once done, check your site - if nothing has changed, press ctrl+f5 to clear your cache, and it should show your modification.

Regards

IACS_CM
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Achillea on July 18, 2008, 01:29:32 PM
Hooray!  It worked!  Teeny-weeny images now match big ones.

Thanks! :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: AlenNS on July 19, 2008, 11:06:16 AM
I have a problem with this mod.

I've manually installed and opened folders in forum/Themes/default/icons/16/on.png (16 board ID, also opened and other board folders and putted on.png, on2.png and off.png but still nothing ) and there's still no picture set text.

www.baklja.com/forum

I've putted some picture for now, but if you see that picture is called from forum/Themes/babylon/images/off.png

I don't understand where's mistake?


I have succeed installing this mod.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on July 19, 2008, 11:51:14 PM
you have to install the icons/## directories in whatever theme you are running.


I assume that you are using the babylon theme...  so move your icon directories into that theme's folder.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: al-trance on July 23, 2008, 07:14:03 PM
   
to implement the mod cbi1.5 theme in the CS-DK, as I do, because the lines BoardIndex.template and MessageIndex.template are different
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: NYChamps on July 31, 2008, 05:16:22 PM
@ IACS_CM

Those directions were awesome and I was able to change my icons....

One little issue though - There doesn't seem to be a change in color in the icons when there are new posts - do I need to modify something to get this to happen?

Thanks so much for all you've already done!  :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on July 31, 2008, 06:25:19 PM
Did you upload the SAME icon as on.gif and off.gif?

You need to upload different coloured icons...
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: NYChamps on July 31, 2008, 06:51:18 PM
oh ok   I didn't realize that - so if i can't find the same icon in a lighter color - can I then use a different one for on and on2 and a different one for off?

Nevermind - figured it out.  Thanks for the input.  Things are working great now.   :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on August 07, 2008, 07:08:41 PM
Where i can edit the board icons?
I don't find the mod in Admin panel  ..  :-[
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: AlenNS on August 07, 2008, 07:21:29 PM
You don't need to.

You just have to put icons in folders of your default theme and theme your using ( if you're using some other then default ).
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on August 08, 2008, 09:56:06 AM
Hello,

I think that i do all things without any mistake, but the icons doesn't work for me :S

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.hdd.pt%2F%2Fthumbs%2F%2F1074686248.jpg&hash=fc552111ec05385213801c035488920d) (http://www.hdd.pt/imagens/1074686248.jpg)

My board name is correct, but the icons simple doesn't appear :S


edit: In default theme, when i "pass" the mouse over the icons on the forum, i can see in status bar of my browser my "folder id", but this doesn't append in my Apollo BB theme.

thnk's
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on August 08, 2008, 05:17:31 PM
this won't work on other themes, unless you put the icons directories and images, etc in the other theme directories as well.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: nova2k on August 11, 2008, 01:31:36 AM
Hi, I have some problem with this mod.
I use hayatv2 theme. I already applied this mod and modified BoardIndex.template file in hayatv2.
And my forum has these error (in log):

8: Undefined index: is_redirect
File: /home/nova2k/public_html/forum/Themes/hayatv2/BoardIndex.template.php (main sub template - eval?)
Line: 487

8: Undefined index: no_icon
File: /home/nova2k/public_html/forum/Themes/hayatv2/BoardIndex.template.php (main sub template - eval?)
Line: 485

8: Undefined index: no_icon
File: /home/nova2k/public_html/forum/Themes/hayatv2/BoardIndex.template.php (main sub template - eval?)
Line: 480

How can I fix it? Thank you!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on August 11, 2008, 01:46:27 AM
Did you do the edits to the language file. ??? They have to go in as well.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: nova2k on August 11, 2008, 01:54:11 AM
Did you do the edits to the language file. ??? They have to go in as well.

I know but hayatv2 theme does not contain language folder  :(
It has only BoardIndex.template file.

PS: the forum error log increases very quickly. After I just removed all log, I logout and login again. There are 20 new pages of these error  :'(
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on August 12, 2008, 10:18:22 PM
Check the language file in the default theme folder then and see if it contains the edits.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: cytoplasm on August 26, 2008, 02:45:43 PM
UPDATED:  NVM, had someone else help me fix it.  thanks anyhow.


Hello

using smf 1.1.5, theme "AA New Damage v2" downloaded from simplemachines.org

when manually installing, custom icons appear, but board descriptions disappear.  Is there something i can add to the code to bring those back?

any help is greatly appreciated.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on August 29, 2008, 12:37:30 PM
I would say that when you manually installed you removed some of the code for the board description. I would go back over the manual edits you did. For the icon problem; is the grey border not part of the icon itself. ??? If you wanted that you would have to add it to the custom image you have.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Mr.IT on August 31, 2008, 07:06:26 PM
Now I'm using Bethesna Theme . Can i use "Custom Board Icons" on Bethesna Theme . How to use it
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on August 31, 2008, 08:48:46 PM
As with nearly all mods, you will have to manually install portions of this mod to make them work with anything other than the default theme
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Smythe on September 05, 2008, 09:09:36 AM
what I am running:

smf/tp 1.1.5/0.9.8.3 respectively

Theme BlackRain v2

Ok, I made the icons folder in my template root, inside that I made several folders, corresponding to each board number ....from here I get a little lost, do i need to create all 3 files inside each folder (on.png, on2.png, off.png) or do I just use one.... also do I make the file the actual picture I want to use just renamed to on.png...or does it go someplace else all together....or did I miss something.

Also I did the 2 edits to the files messageindex.template.php and boardindex.templates.php and still nothing .... any help would be great .... Thanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on September 05, 2008, 01:49:20 PM
if you want to use a custom icon for on (new posts), on2 (new posts in child board), or off (no new posts), then you have to have the custom image that you want used in EACH directory.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Smythe on September 06, 2008, 12:38:49 AM
is the code for the diffrent themes the same in all the themes..... or do i need to change something in the theme i am using ..... i used the code a few posts back ....
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Smythe on September 06, 2008, 07:48:07 AM
i guess i need to see the file structure for this ... it's killing me here... lol


my_theme(folder)-->icons(folder)-->board#(folder)--> on.png(.png file)...???

                                                   or...is it....

my_theme(folder)-->icons(folder)-->board#(folder)-->on.png(folder)-->*.png(*.png file)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on September 06, 2008, 07:56:28 AM
my_theme(folder)-->icons(folder)-->board#(folder)--> on.png(.png file)...???

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Smythe on September 06, 2008, 08:13:48 AM
thats the file i want it to be, just renamed correct, if so, is there a size restriction....64x64...50x50 ...??
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: italo_anonimo on September 25, 2008, 11:50:58 AM

Hello there,

I have manually installed this mod in my  Outline theme and it really display just fine.

However, when I visit my error log, there are lots of errors on it

Here is the error:

Quote
http://www.puchamare.com/foro/index.php (http://www.puchamare.com/foro/index.php)

8: Undefined index: is_redirect
Archivo: /home/puchamar/public_html/foro/Themes/default/languages/Post.spanish_es.php (main sub template - eval?)
Línea: 266
Quote
http://www.puchamare.com/foro/index.php
8: Undefined index: is_redirect
Archivo: /home/puchamar/public_html/foro/Themes/default/sbox.template.php (main sub template - eval?)
Línea: 266

Should i delete the is_redirect line code in the mod ??? ???


Thank in advance
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 27, 2008, 05:41:59 PM
Did you do the edits to your language file. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: italo_anonimo on September 29, 2008, 09:47:38 AM
hi Bigguy,

i have all manually installed step by step,  can you please tell me where to edit?

Thank in advance
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 29, 2008, 07:51:11 PM
Did you add edites to the modifications.english.php file. ???

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: italo_anonimo on September 30, 2008, 07:45:58 AM
hi Bigguy ,

yes, i'm edit the modifications.english.php and modifications.spanish_es.php files with $txt['no_icon'] = 'No icon set'; before ?>

but redirect.png image not  exist, is normal??

thanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 30, 2008, 09:38:33 AM
What version of cbi are you trying to install and to what version of SMF.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: italo_anonimo on September 30, 2008, 04:20:20 PM
my SMF version is 1.1.6 and the version CBI is cbi15  manually installed  (all 3 files edit)

error is..

Quote
http://www.puchamare.com/foro/index.php (http://www.puchamare.com/foro/index.php)

8: Undefined index: is_redirect
Archivo: /home/puchamar/public_html/foro/Themes/default/languages/Post.spanish_es.php (main sub template - eval?)
Línea: 266
Quote
http://www.puchamare.com/foro/index.php
8: Undefined index: is_redirect
Archivo: /home/puchamar/public_html/foro/Themes/default/sbox.template.php (main sub template - eval?)
Línea: 266

Thank in advance
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on September 30, 2008, 05:40:32 PM
ummm.... 1.1.6 doesn't have redirect boards as part of it's code (does it?)

I think you installed the 2.0 version of the mod.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 30, 2008, 10:37:47 PM
Kindred is right, please try the proper version for 1.1.6. It might be marked 1.1.4 but should still work. If it doesn't it needs to be updated. I am trying to get to updating these mods but I have a lot on my plate right now.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: italo_anonimo on October 01, 2008, 03:57:38 PM
 i'm install cbi cbi-1a ... it's ok

Thank you.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: edi67 on October 12, 2008, 10:27:33 AM
Not work for me in SMF 2.0 Beta 4 some solution ? i see only NO ICON SET

look screenshot

ps. in older version worked always like a charm now not :(
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on October 12, 2008, 10:38:59 AM
If you see that then it should be working. Thats part of the mod. All you need to do now is upload the icons. The next version of this is being worked on but I am not sure when it will be out.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: edi67 on October 12, 2008, 10:48:20 AM
If you see that then it should be working. Thats part of the mod. All you need to do now is upload the icons. The next version of this is being worked on but I am not sure when it will be out.

i have already the icons uploaded by older versions
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on October 12, 2008, 10:49:53 AM
Have you emptied your cache on the forum and tried using ctrl + f5 on your keyboard to bypass your browser cache.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: edi67 on October 12, 2008, 11:13:28 AM
Have you emptied your cache on the forum and tried using ctrl + f5 on your keyboard to bypass your browser cache.

sorry for disturb i solved everything making new package working for smf 2.0 beta 4 if you need to attach it i attach in post
thx for reply
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on October 12, 2008, 11:25:45 AM
Thanks for that but the one that works with 2.0 beta 3 uses .png instead of .gif. You might be trying to install the wrong one on your version of SMF.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: edi67 on October 12, 2008, 11:37:44 AM
Thanks for that but the one that works with 2.0 beta 3 uses .png instead of .gif. You might be trying to install the wrong one on your version of SMF.

oh you are right sorry :) i using GIF image so i let so thx for reply
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on October 12, 2008, 12:59:43 PM
I have removed your attachment from your post but I still have a copy of it and will go over it. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: David Benjamin on October 19, 2008, 05:34:40 AM
Help, I am having a problem with this modification. After installation all icons are in:
Themes/default/images/off.png  :(
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: AlenNS on October 19, 2008, 08:00:41 AM
You have tu make same folders in your default and your custom theme to make this mod work.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: David Benjamin on October 19, 2008, 10:43:51 AM
Can you explain?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: AlenNS on October 20, 2008, 03:25:47 AM
Yes, I can.

You have tu make same folders in your default and your custom theme to make this mod work.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on October 20, 2008, 08:14:12 AM
Alen,  That was less than helpful

David,

As with all mods, this mod only automatically  installs into the default theme. You will have to make manual edits to your custom themes and manually create the icons directories in your custom theme directory.

Also, this mod does not create the custom icons...  it merely creates the method to USE custom icons. It's up to you to create and upload the custom icons to the correct location in your theme directory structure.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tonnybarros on October 28, 2008, 08:09:17 AM
I installed the CBI 1.0be can not put GIF, how do I put GIF

I'm from Brazil and the translation is at Goole
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on October 28, 2008, 11:00:34 AM
Try using .png instead of .gif
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tonnybarros on October 28, 2008, 11:22:12 AM
Yes in PNG works, but there I have to use only PNG
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on October 28, 2008, 11:57:17 AM
For the version of cbi you installed yes only .png works. You could go through the code that the mod put in your file if you like and find all the .png extensions and change them to .gif if you like or re-install an earlier version of cbi.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on November 02, 2008, 11:05:19 AM
I use the Outline theme, so after istall cbi, i just need to create this folders:

forum/Themes/default/icons
forum/Themes/default/icons/board_id/on.gif
forum/Themes/default/icons/board_id/on2.gif
forum/Themes/default/icons/board_id/off.gif

then:

forum/Themes/Outline/icons
forum/Themes/Outline/icons/board_id/on.gif
forum/Themes/Outline/icons/board_id/on2.gif
forum/Themes/Outline/icons/board_id/off.gif

And it should work right? Or i need to edit the index.php?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 02, 2008, 11:09:46 AM
Run the package through a parser and see what edits it makes then go into your custom theme folder and see if any of those files are in there. If they are they will have to be modified, if not then when the mod installed it made the edits to the default theme.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on November 02, 2008, 11:18:07 AM
Run the package through a parser and see what edits it makes then go into your custom theme folder and see if any of those files are in there. If they are they will have to be modified, if not then when the mod installed it made the edits to the default theme.

I run P.Parser, but:


ERROR: The package-info.xml file is invalid!

Debugging Information
Error message: String could not be parsed as XML
Source: /home/dragonfl/public_html/resourcez/PackageParser/index.php:133
Errors encountered while parsing XML file:

   1. Entity: line 1: parser error : XML declaration allowed only at the start of the document
   2. <?xml version="1.0"?>
   3. ^

Stack Trace:
#0 /home/dragonfl/public_html/resourcez/PackageParser/index.php(133): SimpleXMLElement->__construct(' <?xml versi...')
#1 /home/dragonfl/public_html/resourcez/PackageParser/index.php(94): parsePackageInfoXML('/tmp/package-in...', 'install', 'theme')
#2 /home/dragonfl/public_html/resourcez/PackageParser/index.php(773): parseArchive('/tmp/phpRiDidF', 'install', 'theme')
#3 {main}

XML File:

    <?xml version="1.0"?>
    <!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
    <package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
   
   <id>bigguy:cbi05</id>
   
   <name>cbi, 1.0</name>   
   
   <version>1.5</version>
   
   <type>modification</type>
   
   <install>
      <readme>readme.txt</readme>
      <modification>modification.xml</modification>
   </install>
   
   <uninstall>
      <modification reverse="true">modification.xml</modification>
   </uninstall>
</package-info>


What is this?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 02, 2008, 11:22:13 AM
I will have to look at the package and do some changes. Open up the modifications.xml file and the edits are in there. It's pretty simple to follow.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on November 02, 2008, 11:30:44 AM
Modification.xml:

Code: [Select]
<?xml version="1.0"?>
      <!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">

     <modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">

<id>bigguy:cbi05</id>

<version>1.5</version>



<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="replace"><![CDATA[ // If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '<img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';]]></search>


<add><![CDATA[if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.png'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.png';
else
$board_new_img=$settings['images_url']. '/on.png';

echo '<img src="', $board_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.png'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.png';
else
$childboard_new_img=$settings['images_url']. '/on2.png';

echo '<img src="', $childboard_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.png'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.png';
else
$board_nonew_img=$settings['images_url']. '/off.png';

echo '<img src="', $board_nonew_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
}
// Is it a redirection board?
if ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';


echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';]]></add>


</operation>
</file>


<file name="$themedir/MessageIndex.template.php">
<operation>
<search position="replace"><![CDATA[ // If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '<img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';]]></search>


<add><![CDATA[if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.png'))
$board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.png';
else
$board_new_img=$settings['images_url']. '/on.png';

echo '<img src="', $board_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.png'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.png';
else
$childboard_new_img=$settings['images_url']. '/on2.png';

echo '<img src="', $childboard_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
} else {
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.png'))
$board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.png';
else
$board_nonew_img=$settings['images_url']. '/off.png';

echo '<img src="', $board_nonew_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
}
// Is it a redirection board?
if ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';


echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';]]>
</add>
</operation>
</file>
                        <file name="$languagedir/Modifications.english.php">
        <operation>
            <search position="end" />
            <add><![CDATA[$txt['no_icon'] = 'No icon set';]]>
        </add>
</operation>
</file>
</modification>
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 02, 2008, 11:34:23 AM
So BoardIndex.template and Messageindex.template.php are the files that get edited. Do you have either of these in your custom theme folder. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on November 02, 2008, 11:36:04 AM
So BoardIndex.template and Messageindex.template.php are the files that get edited. Do you have either of these in your custom theme folder. ???

In my custom theme folder i only have BoardIndex.template file :S
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 02, 2008, 11:45:58 AM
Ok then, if the mod is installed then the messageindex.template.php has already been modified. So all you have to do is modify the Boardindex.template.php file.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on November 02, 2008, 11:54:43 AM
Ok then, if the mod is installed then the messageindex.template.php has already been modified. So all you have to do is modify the Boardindex.template.php file.

Yes !!
Now appears "No icon set" in turn of the icon theme.

I will creat some folders with icons
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 02, 2008, 11:58:59 AM
If that appears then it is installed right. Now all you have to do is get a folder made for each board and put the on.png and off.png in there....along with the on2.png
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on November 02, 2008, 12:04:05 PM
If that appears then it is installed right. Now all you have to do is get a folder made for each board and put the on.png and off.png in there....along with the on2.png

It doesn't work :S
I have the icons here:

public_html/Themes/outline115/icons/75

And I dont know what it is  :-[
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 02, 2008, 12:05:20 PM
clear your browser cache and see. (ctrl + f5)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: tuguex on November 02, 2008, 12:17:48 PM
clear your browser cache and see. (ctrl + f5)


It works now xD
It was because my image icons are gif, so i upload one png file and it works ;)

Thank you very much for the support  ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 02, 2008, 12:30:47 PM
Not a problem. Glad you like it. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 05, 2008, 02:06:53 AM
HI Big Guy. Will there be a version compatible for the latest SMF beta ?? I have used this mod for a long time on smf 1 and think its great. I would really like to continue using it but am now running the beta forum.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 05, 2008, 09:37:57 AM
There should be a version that runs with SMF 2.0 beta 3. However I will be upgrading this mod real soon. I just have to get a few errors solved on my site first. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: zes on November 05, 2008, 10:38:25 AM
I want to use CBI but without having to replace On & Off.Just place any picture I want on the board In front of the category.How can I do that?If it's not possible is there any other mod I can use to achieve it?
Thanks in advance
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 05, 2008, 10:50:32 AM
Hi Big guy Im on 2 beta 4 and I get this from version 1.5 of cbi :

Installations actions for "cbi, 1.0":
Installing this package will perform the following actions:
      Type    Action    Description
*    1.    Execute Modification    ./Themes/default/BoardIndex.template.php    Test failed
      1.    Replace    ./Themes/default/BoardIndex.template.php    Test failed
*    2.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test failed
      1.    Replace    ./Themes/default/MessageIndex.template.php    Test failed
*    3.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Technoman on November 05, 2008, 02:31:40 PM
2.0 Beta 4

is there anything coming up for this Forum yet soon ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 06, 2008, 07:41:54 AM
@ zes: Not sure I understand you. Can you explain a bit more.

@ glennk: Do you have many mods installed. ???

@ Technoman: What do you mean, another version. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 06, 2008, 07:53:12 AM
Hi Big guy I have

Tags Mod
Pretty urls
Ad Management
Auto embed video

Howevere IN 1.16 prior to upgrade I had these and many more mods but was still able to use your mod. I would dearly like to continue with this mod as my forum users have become use to it, many of the pictures used were taken by or include my board members so its a way of involving them in the forum.

Thanks for your help with this.

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 06, 2008, 07:21:26 PM
Try checking your permissions and ownership of the files then through ftp and see if that makes a difference when installing.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 07, 2008, 03:24:09 AM
Hi Big Guy,

Both board and message index are set to 777. Is this what you mean ??

I also uninstalled all my mods and tried again, but still get the same problem. Is this mod compatable with 2 beta 4 ??

Thanks - Glenn
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 07, 2008, 07:31:06 AM
Use the parser on this page to get the manual edits for the mod and do it that way for now. The mod has not been updated for beta 4 yet but it will work with it.

http://custom.simplemachines.org/mods/index.php?mod=511
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 07, 2008, 12:15:38 PM
Hi Big Guy,

Im doing as you suggested. Howevere the code from the parser does not match the code in the file ???? The bit in red shows the difference in code.


Parser says this should be the code

Quote
            // If the board or children is new, show an indicator.
            if ($board['new'] || $board['children_new'])
               echo '<img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
            // Is it a redirection board?
            elseif ($board['is_redirect'])
               echo '<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
            // No new posts at all! The agony!!
            else
               echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

            echo '</a>
            </td>
            <td class="windowbg2">
               <b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';


However this is the code as it appears in my version

Quote
// If the board or children is new, show an indicator.
            if ($board['new'] || $board['children_new'])
               echo '
                  <img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
            // Is it a redirection board?
            elseif ($board['is_redirect'])
               echo '
                  <img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
            // No new posts at all! The agony!!
            else
               echo '
                  <img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

            echo '
               </a>
            </td>
            <td class="windowbg2 info">
               <h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 07, 2008, 12:39:10 PM
What version of the mod are you using. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 07, 2008, 12:47:34 PM
Hi big guy

I arent using any version of the mod. Just the manual install instructions as found here :

http://custom.simplemachines.org/mods/index.php?action=parse

The code in my /Themes/default/BoardIndex.template.php

seems to differ from what the manual install parser says it should be ?

As I havent installed the mod in 2 beta 4 (due to the errors highlighted earlier) then the code shouldnt have been effected in any way by the mod ?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 07, 2008, 01:27:04 PM
I'll post the code here when I get back for you. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Technoman on November 07, 2008, 02:43:56 PM


@ Technoman: What do you mean, another version. ???

yes for this version, 2 beta 4 (default template)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 07, 2008, 07:40:37 PM
Ok, please understand that this was quick so it may not work. You can call this a beta version I guess for SMF 2.0 beta 4.
TRY THIS ON A TEST FORUM FIRST
I have tested it but like I said it was quick. If it works I will upload it to the mod site. This also ONLY uses .png for icons NOT .gif (Also works with RC1)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 08, 2008, 06:10:26 AM
Thanks for taking the time to do this. Ill add a new forum on my hosting and plug in the mod. Ill let you know how it goes but it may be after the weekend before I get it sorted.

I have all my old files and icons saved from 1.1.6. The images are all .gif. Is it just a matter of renameing the files .png ??
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 08, 2008, 02:13:11 PM
No I think you can't do that but try it anyway, ya never know.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 11, 2008, 08:59:18 AM
seems to work big guy. No errors in log.

Also you can just rename your .gif files to .png via ftp and they will work.

Great mod and glad to have it functioning again.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 11, 2008, 03:59:46 PM
Thats great to hear Glenn. Glad you like it. ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on November 11, 2008, 04:33:15 PM
thanks big guy. Maybe 1 issue

When I dont have a folder uploaded for a particular board it does not revert back to standard. Instead it says :

no icon set
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 11, 2008, 05:30:08 PM
I'll take a look at the code later and see what I can do maybe.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: marcimila on November 12, 2008, 10:33:29 AM
Hi to All.
I have a problem with this mod.
I use CBi the last version, and the SMF 1.1.7.

I installed the mods and it run perfectly when I create the incon like on_XX.gif of off_xx.gif all in the same folder
here: www.rogerk.net/forum/Themes/default/images/

BUT............

If I try to create the folders for each different board....like

www.rogerk.net/forum/Themes/default/images/icons/NuomberBOard/on.gif
The image not display.


I need to use this,  becouse I Have about child board and the classical on_XX.gif off_XX.gif not work with child board.


Please Help me!
And tnx for the great Mod!

Marcello
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 12, 2008, 08:04:08 PM
Check permissions on the icons and board id folders and check to see if there are any errors in the logs. What version of the mod are you using. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: MSLOGOS on November 12, 2008, 09:30:50 PM
HI!!!

I'm trying to install cbi on dilbermc, but i can't make it works! :-[ .But i know there is something i must be doing wrong, becouse it looks that it works for some other dilbermc users :(


Files attached, if  someone can help me with this.

Thanks in advance.


PD: For dilber mc, images should be in default folder too?

tks.



Title: Re: cbi v0.5 (Custom Board Icons)
Post by: d0brin on November 17, 2008, 12:01:09 PM
I dont kno is it posted somewhare in this HUGE thread this question (but i cant now sit and search for all 21 pages to find it so..) My question is..whare form teh admin panel is the editing of the custom icons?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on November 17, 2008, 04:11:06 PM
I dont kno is it posted somewhare in this HUGE thread this question (but i cant now sit and search for all 21 pages to find it so..) My question is..whare form teh admin panel is the editing of the custom icons?

1- laziness is no excuse. If we all acted that way, then nothing would get done.

2- none. this mod allows you to add icons directly to your server using a defined naming scheme. As long as you use tghe correct name, there is no need for any admin insterface.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: d0brin on November 18, 2008, 08:39:06 AM
so with one word said...How to add Custom Icons?....
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 18, 2008, 10:26:43 AM
Try this version:

http://www.simplemachines.org/community/index.php?topic=126263.msg1787411#msg1787411
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RoH on November 23, 2008, 04:43:01 PM
hello i am stuck..

the code to be replaced... looks like this in boardindex.template.php
Code: [Select]
// 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'];

how do i make a change..

default theme on 1.1.7 and latest MOD version..

plz help
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RoH on November 24, 2008, 03:49:01 AM
Bigguy, can you plz help me fix that code..
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 24, 2008, 09:39:22 AM
What code do you need help with. ??? The post you made before this one. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RoH on November 24, 2008, 04:15:11 PM
yes plz.. its the last post of page 21
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 24, 2008, 04:17:08 PM
What version of SMF do you have and what version of the mod are you trying to install. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RoH on November 24, 2008, 04:19:20 PM
default theme on 1.1.7 and latest MOD version.. cbi-15
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 26, 2008, 01:57:27 PM
Sorry for not getting back to you earlier. Can you upload the BoardIndex.template.php file and I'll see what I can do.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: EmiX11 on November 26, 2008, 06:27:22 PM
-Heloo! I have a problem with Custom Board Icon and do not know how to solwe this problem...
-I have SMF 1.1.7, and it work great with cbi (aprox 4 months) until now. I am open a 2 new forums and put the icons at :

MyDomain/overview_tp10/icons/45/on.png
MyDomain/overview_tp10/icons/45/on2.png
MyDomain/overview_tp10/icons/45/off.png

I tried to replace .png with gif and the icons do not show at forum.
What is the problem with thease,please help!?

PS: all others icons work well ,but when i open new forum (whatever in what board it is) and put the icons at Themes folder, the icons do not show...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fultraphoto.org%2Fimages%2Fa45rgie7vm9nxeggw3he_thumb.png&hash=9fe8dec975ae182dd2395b2fe6e9154d) (http://ultraphoto.org/viewer.php?file=a45rgie7vm9nxeggw3he.png)


Sorry for my poor English!

Best regards EmiX11
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on November 26, 2008, 06:44:14 PM
they should be placed at:

MyDomain/Themes/themename/icons/45/on.png
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: EmiX11 on November 26, 2008, 06:53:35 PM
Yes but that my problem is,the icons are in the right spot to bee, but do not work...
Like as it have some limit in number of allowed icons.

Is there some way to ,modify to show all icons?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on November 27, 2008, 05:50:18 PM
there is no limit to the number...   I have boards numbering 128 with custom icons.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: EmiX11 on November 27, 2008, 06:03:18 PM
I am last night menaged to solve the problem...Problem was caused by error in code (coused probably by my mistake  O:) )

Anyway bro tnx for your help!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Martingonnella on November 28, 2008, 05:14:50 AM
BigGuy,

Everyone really does like your code and so do I.

Maybe make a final release of this code to work on latest version 1.1.7. It would solve everyones problem. I understand your busy, but it would help alot.

Thank you Mate. Martin
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 28, 2008, 12:37:44 PM
I will update it for 1.1.7 very soon. I wanted to make sure the new version for 2.0 was working and I guess it is as I have not heard any bad reports from it so far. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RoH on November 29, 2008, 05:54:08 PM
Sorry for not getting back to you earlier. Can you upload the BoardIndex.template.php file and I'll see what I can do.

hey Bigguy, thanks for replying.. file attached
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 29, 2008, 07:32:33 PM
Try this.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Antechinus on November 29, 2008, 07:37:02 PM
Hey got a question for you o Enormous One. :D

Do you have any problem with people using the code from this mod to apply customised images to other parts of their forums? I'm thinking of consecutive background images in windowbg2 and stuff like that.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 29, 2008, 07:44:58 PM
I have no idea if people do that. If they do ...I guess thats fine. I don't really have a problem with it. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Antechinus on November 29, 2008, 07:46:43 PM
Cool. Just thought I'd ask since you were here anyway. I'll let you see the results and give you some credit if I go ahead with it. Cheers.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 29, 2008, 08:28:14 PM
That sounds good. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: RoH on December 01, 2008, 05:12:59 AM
If that appears then it is installed right. Now all you have to do is get a folder made for each board and put the on.png and off.png in there....along with the on2.png

no icon set appears..

same thing happens with me.. and my question is how to find the board id ?
and do we need to give specific names to the gif files like on.gif, on2.gif & off.gif ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 01, 2008, 07:48:20 AM
Lay your mouse over the board name and then look in the bottom left corner of your browser. You will see the board url. It has a number on the end of it...that is the board id. Once you have the board id then you now know the name of one of the folders you have to put the on and off .png files. The rest is in the readme of the mod. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: KahneFan on January 08, 2009, 09:16:39 PM
Will there be a version for 2.0b4, or will you be waiting for 2.0RC1?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Antechinus on January 08, 2009, 10:09:40 PM
It shouldn't be that hard to adapt the code for 2. As for upgrading the mod, considering how close RC1 is there would be little point playing with a 2b4 version.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: KahneFan on January 08, 2009, 10:40:05 PM
...considering how close RC1 is...

[all together now] HOW - CLOSE - IS - IT?[/all together now] :D

(note:  I know there's no answer to that question)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Antechinus on January 08, 2009, 10:51:35 PM
There is only an internal target. If I told you I'd have to kill you. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: KahneFan on January 08, 2009, 11:06:26 PM
...If I told you I'd have to kill you. :)

Then I'd never get a chance to use RC1... nah, don't tell me :p
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 08, 2009, 11:08:03 PM
I have a working copy for 2b4 but it does something freaky to the text on the forum for some reason so I did not release it. I am still playing and after I get that fixed I will release something for SMF 2.0 rc1 after it comes out.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: fext on January 13, 2009, 01:23:30 PM
Can someone help me with the edits for my theme?

This is my theme - its built with pure CSS and not tables :(

http://custom.simplemachines.org/themes/index.php?lemma=382

Really appreciate the help on this - great looking mod and would love to have it for my site :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 13, 2009, 01:51:15 PM
I'm really not sure how this mod would work with only css.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: fext on January 14, 2009, 10:24:26 AM
I'm really not sure how this mod would work with only css.

Well I looked at it and thought instead of the Table code you could change those to list code - if you take a look at the Theme files and comepare with the edits of this mod - I don't see how it would need to change alot but then i don't want to mess with code and mess up my site.

Any ideas?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 14, 2009, 11:19:17 AM
Not really right now, but I will take a quick look into it when I get back to this mod. It won't be real soon though as I have another project in the works.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Forgotten_1 on January 15, 2009, 04:45:39 PM
Does this work with SMF 2.0 Beta 4 yet?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: KahneFan on January 15, 2009, 04:46:47 PM
It shouldn't be that hard to adapt the code for 2. As for upgrading the mod, considering how close RC1 is there would be little point playing with a 2b4 version.

See answer from above
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Technoman on January 15, 2009, 08:35:20 PM
ok i left for awile .... im back now  :P

just installed smf 1.1.7

would love to have ficons or icons for different forum cateogories

so if possiable can there be a update on this mod BIG GUY
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on January 29, 2009, 03:06:47 AM
Well, for the record I did read all 23 pages of this thread. ;)

Anyhow... I still have some questions:

1) I'm on SMF 1.1.7 and am unclear on which version of CBI I should be installing. I've seen some people on 1.1.x state that they installed CBI15 and no one saying anything wrong about that, yet the main page for this mod states "cbi 1.5 is ONLY for SMF 2.0" and if I try to install 1.5 it fails on 2 files, while 1.0a installs without error.

2) When I install 1.0a (again, on SMF 1.1.7) the default icons vanish and I see the text "New posts" or "No new posts" in their place. From what I read in this thread, that should not happen... according to the info in this thread, the mod should revert to the default icons automatically if no per-forum icon set is present. I don't want to be forced to have to recreate all my icon sets up-front, or before I create a new board. The stated behavior would be ideal, but the actual behavior is problematic.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 29, 2009, 04:56:09 AM
1.0a is the version you want. check all the edits to make sure they were all added right. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on January 29, 2009, 09:46:01 AM
1.0a is the version you want. check all the edits to make sure they were all added right. :)
Well they seem to be added right, apply with "test successful" on both files, no errors, but it's still not working. I've tried applying them several times now.

Here are the files (after applying CBI10a)

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 29, 2009, 05:28:54 PM
Have you put the icons in the right spot, cleared your cache and are you using .png images. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on January 29, 2009, 05:42:21 PM
Have you put the icons in the right spot, cleared your cache and are you using .png images. ???

Not yet but read my question #2. The original icons should show until I make the replacement ones. The problem is, after installing the mod the originals disappear.

This runs contrary to the appropriate behavior as stated several times in this thread. For example, on page 6 you clearly state yourself:

Quote
Nothing is done to the default icons. If the new custom ones aren't there then the default are supposed to show.

That's not what's happening.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on January 30, 2009, 06:01:20 AM
Post your url or PM it to me and I will see whats up when I get home from work.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: VLN on February 03, 2009, 04:18:18 PM
Hi Bigguy! I made a brand new SMF 1.1.7 forum last week. I'd love to use your mod and wasn't sure which package to use, so since "cbi 1.5" is closest to what I have, I tried to install that but got this error below. Please let me know if I should try to install the cbi 1.1 or 1.1a, or just wait for an upgrade.

Also, I can see you've worked on this a lot and been very helpful to others. It must be tiring at times. Thank you for your time and effort on this even it if doesn't work out for my version.


Quote
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 04, 2009, 12:25:38 PM
Try cbi 1a it should work for you. I have to do some serious updates on this mod and that will be coming soon. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: KahneFan on February 04, 2009, 12:51:47 PM
2.0 updates? :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on February 05, 2009, 07:25:33 AM
I have to do some serious updates on this mod and that will be coming soon. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: akguide on February 09, 2009, 02:51:54 AM
Just an fyi,  First thanks the mod works great as best I can tell so for.  I am using 1.1.8 and the manual install instructions state "forum/Themes/default/icons/board_id/on.gif"   however the mod code as written is calling for .png files.  I did not catch this as I read the instructions..go figure huh?... anyway that made for a bit more work converting files to .png after having spent several hours making icons that were gif's.  Just thought that you should know and perhaps update the instructions before someone else runs into the same issue, or perhaps have the mod work with png/gif/jpg  etc etc

Thanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: VeNoMZiTo on February 10, 2009, 06:06:09 AM
Hi, this mod works on 2.0 RC1?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on February 10, 2009, 07:39:19 AM
I have to do some serious updates on this mod and that will be coming soon. :)

why doesn't anyone read 3-4 posts back?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ZUNZARA on February 24, 2009, 04:05:51 AM
Hi, this mod works on 2.0 RC1?

??????
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on February 24, 2009, 07:38:35 AM
I have to do some serious updates on this mod and that will be coming soon. :)

why doesn't anyone read 3-4 posts back?

 ??? ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: filipes on February 24, 2009, 10:04:37 AM
Hello
I have this theme in my forum http://www.simplemachines.org/community/index.php?topic=266912.0 what Mod do I have to use?I tried everything but I do not see how to make it work....Can you help me please
Thanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on February 25, 2009, 06:47:26 AM
what version of SMF are you running?   If you are using 1.1.x, you will have to manually apply mods into any custom themes.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Smoky "Rider" Blue on March 08, 2009, 10:48:02 PM
I have to do some serious updates on this mod and that will be coming soon. :)


lol BigGuy, have a cold drink  ;)

i know how busy you have been..
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: flickernever on April 06, 2009, 12:14:08 AM
I have installed the cbi 1.0 on SMF 1.15 automatically on default, also have copied the modified board.index and message.index from default to my theme folder, and have certified that the code is there. Also, I have upload the .gif images to theme/icons/board_id/ folder and it doesn't work. Tried different ids (1, 2, 3, etc...) and it only outputs the default .gif.

I'm a bit frustrated because everything seems to be alright.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: flickernever on April 06, 2009, 12:45:59 AM
Figured it out:

I was putting the .gifs on theme/images/icons/board_id...
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Smoky "Rider" Blue on April 06, 2009, 11:38:11 AM
good deal flickernever ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TheListener on April 17, 2009, 09:05:39 AM
The mod downloaded great now all I require help with is the rest of it.

What do we do now? Is it possible for a step by step instruction please.

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on April 17, 2009, 06:58:18 PM
Upload to the package manager and install. Then follow the directions in the readme. In the instructions where it says "board_icon" That means the number of the board you want to image to show for.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kingkingston on June 03, 2009, 03:29:09 PM
Brilliant mod i think i have worked it out,now just need to get the pics :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 03, 2009, 11:52:46 PM
We are currently testing a new bug free version of cbi that works with SMF 2.0 RC1-1. It should be ready shortly. ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 04, 2009, 08:23:33 AM
This is ready for download. For now it will just be at my site but we will soon get it up to the downloads area here.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 05, 2009, 08:41:14 PM
Ok here is the next version. Bugs have been fixed and it is compatible with SMF 2.0 There is alot more to come for this mod.  :-X If there are no problems I will upload to the mod site later.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kingkingston on June 05, 2009, 09:17:03 PM
Ok here is the next version. Bugs have been fixed and it is compatible with SMF 2.0 There is alot more to come for this mod.  :-X If there are no problems I will upload to the mod site later.
this for 1.1.9 ?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 05, 2009, 09:19:57 PM
SMF 2.0 Sorry I should have stated that. Earlier versions of the mod should still work with 1.1.9. However they will not be updated.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 06, 2009, 06:24:57 PM
Mod site updated.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: simply sibyl on June 09, 2009, 06:31:20 PM
Hello Bigguy.   Great mod.     Installed on a friends test forum - SMF 2.0RC1-1 
Installed cbi-155

Im seeing an issue:

1.   Spacing for the Board Names:   Board names are now pushed up against the left side of the block on all themes

If you need her test forums url I'll need to send it to you via PM
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 09, 2009, 09:17:06 PM
Due to a couple edits I missed that were pointed out to me just now I have updated the cbi mod once again. It should now work properly. I'm very sorry to everyone that downloaded the last one. Please, uninstall that, re-download the package (cbi155) and install it. Again I am sorry for any troubles this may have caused.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: simply sibyl on June 09, 2009, 09:27:57 PM
Due to a couple edits I missed that were pointed out to me just now I have updated the cbi mod once again. It should now work properly. I'm very sorry to everyone that downloaded the last one. Please, uninstall that, re-download the package (cbi155) and install it. Again I am sorry for any troubles this may have caused.

woot thanks!   Worked like a charm.

ha..   I had just finished putting &nbsp;&nbsp; before each of her board names until this was fixed LOL
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 09, 2009, 09:58:27 PM
Glad it worked for you. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Hyoga on June 18, 2009, 04:47:11 PM
Edit: Ok got it to install, however, how do I use it?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 18, 2009, 05:09:48 PM
Read the readme that comes with it. It should all be explained there.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Hyoga on June 18, 2009, 07:14:22 PM
I created all the icons and put them in the specified folders, however It is not working, what else am I missing, I can't really figure anything out by the readme file, can you pls give me a step by step walktrough?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on June 23, 2009, 12:51:17 PM
SMF 2.0 Sorry I should have stated that. Earlier versions of the mod should still work with 1.1.9. However they will not be updated.

What about the problems with the version for 1.x? Will those bugs be fixed?

I had to give up on this mod since the problems I had (see page 23) didn't get resolved. I'm on SMF 1.1.9 because I am not comfortable running pre-release code on a production site. SMF 2 could still be many months away... it's been 4 months since RC1 was released and there's talk of maybe 2 more RCs before release. I'd really like to get this working, though. The default theme board icons make my forum look bad.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 23, 2009, 03:45:04 PM
Try an early version of the mod, before 1.5.4 and see if it works. It should not have any bugs in it.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on June 23, 2009, 04:31:52 PM
Try an early version of the mod, before 1.5.4 and see if it works. It should not have any bugs in it.

I was using 1.0a when I tried it.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 23, 2009, 05:13:26 PM
What bug did you find. I know of none that were in that version. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on June 23, 2009, 05:15:31 PM
What bug did you find. I know of none that were in that version. ???

Go back to page 23. ;)

http://www.simplemachines.org/community/index.php?topic=126263.msg1901528#msg1901528
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 23, 2009, 05:24:18 PM
You should really update to the latest version of SMF to keep you and your members safe. I take it you have tried the latest version as well. ??? What theme are you using. Did you install any code manually. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on June 23, 2009, 05:35:16 PM
You should really update to the latest version of SMF to keep you and your members safe.
Well, back when I wrote that post, 1.1.7 was the latest version. ;) I'm currently on 1.1.9.

Quote
I take it you have tried the latest version as well. ???
Latest (stable) version of SMF? Yes. Latest version of CBI? You told me to use 1.0a on SMF 1.1.x.

Quote
What theme are you using.
Default

Quote
Did you install any code manually. ???
Only those mods that required manual installation. I didn't do any custom by-hand code, no.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 23, 2009, 06:32:30 PM
Try the latest version and see what happens. I would think it would give some errors but try it anyway.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on June 23, 2009, 07:12:11 PM
Try the latest version and see what happens. I would think it would give some errors but try it anyway.
Heh, you make me nervous now. :)

It indeed does fail on the following files:
./Themes/default/MessageIndex.template.php
./Themes/default/BoardIndex.template.php

I manually made the changes to the best of my abilities (after making backup copies, of course), then forced the install and copied over my changed files. Same problem as before: all the boards/topics show "No icon set" instead of the default icon. According to your posts, even with this mod the default icon should be shown unless one has been set up properly.

I've uninstalled and copied the original files back pending your next suggestion.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 23, 2009, 08:28:40 PM
The new version will say "No icon set" instead of showing the default icons. If you do get that message then it should have installed fine. I will have to fix that. Sorry for any inconvenience.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on June 23, 2009, 08:33:50 PM
The new version will say "No icon set" instead of showing the default icons. If you do get that message then it should have installed fine. I will have to fix that. Sorry for any inconvenience.
Ok good to know, at least you understand what's going on now. Unfortunately I don't want to have to be forced to make icons for all boards... I want it to just show the custom icons if they exist on a per-board basis, otherwise the default icons. This matches up with how you said the mod works earlier in this thread. ;)

Let me know once you've fixed this and I'll give it another shot. Thanks!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 23, 2009, 08:46:51 PM
Yes I guess I should change the thread a little and do a bit more work on the mod. I have time now so we'll see what happens in the next little while.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: rgarrison on June 29, 2009, 09:53:19 PM
Did child board support get broken in the newest release?  I upgraded to the newest version from 2 beta and reinstalled the cbi and now my child boards don't work.  Did I mess something up?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on June 30, 2009, 11:27:34 AM
Did you have to install manually. Are you using a custom theme. ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: rgarrison on July 01, 2009, 07:07:32 AM
No I am using the default theme.  INstalled it with the package manager...

http://www.crossroadsparanormal.com/forum/ (http://www.crossroadsparanormal.com/forum/)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 02, 2009, 07:32:57 AM
Did you make a folder named 12 and put it in the icons folder and add your on off images to that.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: rgarrison on July 02, 2009, 06:07:40 PM
Yes sir I have 1 thru 65 there.

Funny thing is if I right click one of the child boards that says No Icon Set I get this path which should not be the case:  http://crossroadsparanormal.com/forum/Themes/default/images/off.png
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 02, 2009, 07:06:21 PM
Hmm, I'll try to get the time to test this tonight on a new install to see what happens.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on July 04, 2009, 01:51:48 PM
Hi Big Guy.

I think I mentioned this before but on my forum. If the images arent set, rather than getting the original smf images for on and off I get the message no icon set

http://www.whitbyseaanglers.co.uk/forum/index.php?board=40.0
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 04, 2009, 04:52:28 PM
Yes I have heard this a couple times now. I am going to have to look at the code and release another update soon. Not sure why at the present moment it isn't working. I will get this worked out though. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on July 07, 2009, 11:33:35 AM
Your the man.

Many thanks big guy
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: TurtleKicker on July 14, 2009, 11:02:32 AM
Yes I have heard this a couple times now. I am going to have to look at the code and release another update soon. Not sure why at the present moment it isn't working. I will get this worked out though. :)
Hey man, any luck? Not trying to be a pest... just that my forum's activity and membership has started to grow really rapidly and I'm getting lots of comments about the lame default SMF board icons. :)

Look forward to the fix... thanks!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: rgarrison on July 15, 2009, 09:25:10 AM
Any luck with the child boards not working?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on July 18, 2009, 06:21:02 PM
Haven't had time to look things over. R/L keeps showing it's ugly head, lol. I will get to this soon. I have my wedding coming up in a week so right now I am a little busy. ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Mverte on July 19, 2009, 02:39:19 PM
Hello

Last night changed the forum to 1.1.10 and I can not add the module, as would the support for the new vercion SMF look forward. thanks!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: rgarrison on July 19, 2009, 06:35:46 PM
A wedding is more important then the update dude, have fun and good luck
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kingkingston on July 20, 2009, 03:00:02 AM
Yes I have heard this a couple times now. I am going to have to look at the code and release another update soon. Not sure why at the present moment it isn't working. I will get this worked out though. :)
Hey man, any luck? Not trying to be a pest... just that my forum's activity and membership has started to grow really rapidly and I'm getting lots of comments about the lame default SMF board icons. :)

Look forward to the fix... thanks!

If you need help,give me a message if your having trouble with making the folder location for the icon i might be able to help,im no star but i can try to help,as you can see here i have worked out where the icons go http://wewantsport.com/index.php?board=2.0
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: ExSpirit on July 28, 2009, 06:29:25 PM
Nice mod, thx.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: rayosx on July 29, 2009, 05:30:58 AM
Hello Guys,

I am running  smf 2.0 rc1.2 

I uploaded and tried to install it and this is what it says, I uploaded the 1.5.5 the lastet version of cbi.

Install Actions
Installations actions for "cbi, 1.0":
Installing this package will perform the following actions:   Type Action Description
 1. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
  1. Replace ./Themes/default/BoardIndex.template.php Test failed
 
 2. Execute Modification ./Themes/default/MessageIndex.template.php Test failed
  1. Replace ./Themes/default/MessageIndex.template.php Test failed
 
 3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
 


What should I do ? Any hints? 
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on July 29, 2009, 07:44:34 AM
you will have to manually apply the mod changes to those files..


(side note, please try reading or using search? this same question has been asked in nearly EVERY mod thread on the board and the answer is always the same..)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: 58tbird on July 30, 2009, 08:42:53 PM
Great mod!

Where can I get some icons to use in place of the SMF icons to go with this mod?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: rayosx on August 03, 2009, 02:27:23 AM
I manually modified the two files and I got this error, can you please tell me what do I need to change here ?

Template Parse Error!
There was a problem loading the /Themes/default/BoardIndex.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
--------------------------------------------------------------------------------


Parse error: syntax error, unexpected T_ELSE in .../Themes/default/BoardIndex.template.php on line 173

164:             }
165:             // Is it a redirection board?
166:             if ($board['is_redirect'])
167:                echo '<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';
168:
169:
170:             echo '</a>
171:             </td>
172:             <td class="windowbg2 info">
173:                <h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></h4>';      else174:             echo '
175:                </a>
176:             </td>
177:             <td class="windowbg2 info">
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on August 03, 2009, 07:30:43 AM
></h4>';      else174
you are missing a carriage return after the ; (before the else)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: guardog on August 14, 2009, 08:12:22 PM
Have been reading through the last few pages, seems like this mod is still not working on RC1.2, or did I miss any posts saying that it should work?

My icons are already in Themes/default/icons/# directory "on.gif, on2.gif, off.gif"

Nice mod anyway!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: apTyaH on August 14, 2009, 10:23:51 PM
Have been reading through the last few pages, seems like this mod is still not working on RC1.2, or did I miss any posts saying that it should work?
maybe try to convert in png, when i put gif images it not worked too.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: guardog on August 15, 2009, 02:04:02 AM
^Yes, it works with png. Sorry for not trying that.

But when I point the icon the alt text shows "No icon set", guess this is the issue people has been talking about.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on August 18, 2009, 06:59:28 AM
The latest version of this mod ONLY supports .png I'm sure it says so on the downloads page. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: kingkingston on September 03, 2009, 11:31:34 AM
This mod does not seem to work on certain themes like Extreme6
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on September 03, 2009, 04:45:18 PM
Like any other mod....  you would have to manually apply any changes to the custom theme's file(s).   In this case, messageindex.template.php
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Newsted on September 11, 2009, 01:52:56 PM
I created all the icons and put them in the specified folders, however It is not working, what else am I missing, I can't really figure anything out by the readme file, can you pls give me a step by step walktrough?

Same here, any help?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 11, 2009, 10:06:05 PM
There is no real step by step. If you are using a custom theme then manual edits are required and the incons folder should then shift to the /Themes/custom_theme/icons/board_id/on.gif Where board id is the NUMBER of the board. So it would be:

/Themes/custom_theme/icons/1/on.png


that should get it to work. Clear your browser cache and use ctrl + f5 to refresh.

I must apologize to all for my absence, I have been real busy lately with r/l and am trying to get back into things slowly. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 21, 2009, 06:02:39 PM
^Yes, it works with png. Sorry for not trying that.

But when I point the icon the alt text shows "No icon set", guess this is the issue people has been talking about.

The issue can be solved with these edits:

BoardIndex.template.php
Find:
Code: [Select]
if ($board['new']) {
               if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.png'))
                  $board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.png';
               else
                  $board_new_img=$settings['images_url']. '/on.png';
   
                  echo '<img src="', $board_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
            } elseif ($board['children_new']) {
               if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.png'))
                  $childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.png';
               else
                  $childboard_new_img=$settings['images_url']. '/on2.png';
     
                  echo '<img src="', $childboard_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';   
            } else {
               if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.png'))
                  $board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.png';
               else
                  $board_nonew_img=$settings['images_url']. '/off.png';

                  echo '<img src="', $board_nonew_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
            }
            // Is it a redirection board?
            if ($board['is_redirect'])
               echo '<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';


            echo '</a>
            </td>
            <td class="windowbg2 info">
               <h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></h4>';
Replace with:
Code: [Select]
if ($board['new']) {
                    if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.png'))
                        $board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.png';
                    else
                        $board_new_img=$settings['images_url']. '/on.gif';
   
                        echo '<img src="', $board_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
                } elseif ($board['children_new']) {
                    if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.png'))
                        $childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.png';
                    else
                        $childboard_new_img=$settings['images_url']. '/on2.gif';
       
                        echo '<img src="', $childboard_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';   
                } else {
                    if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.png'))
                        $board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.png';
                    else
                        $board_nonew_img=$settings['images_url']. '/off.gif';

                        echo '<img src="', $board_nonew_img,'" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" border="0" />';
                }
                // Is it a redirection board?
                if ($board['is_redirect'])
                    echo '<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';


                echo '</a>
                </td>
                <td class="windowbg2 info">
               <h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></h4>';


MessageIndex.template.php
Find:
Code: [Select]
if ($board['new']) {
               if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.png'))
                  $board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.png';
               else
                  $board_new_img=$settings['images_url']. '/on.png';
   
                  echo '<img src="', $board_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
            } elseif ($board['children_new']) {
               if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.png'))
                  $childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.png';
               else
                  $childboard_new_img=$settings['images_url']. '/on2.png';
     
                  echo '<img src="', $childboard_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';   
            } else {
               if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.png'))
                  $board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.png';
               else
                  $board_nonew_img=$settings['images_url']. '/off.png';

                  echo '<img src="', $board_nonew_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
            }
            // Is it a redirection board?
            if ($board['is_redirect'])
               echo '<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';


            echo '</a>
            </td>
            <td class="windowbg2 info">
               <h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></h4>';
           

Replace with:
Code: [Select]
if ($board['new']) {
                    if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.png'))
                        $board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.png';
                    else
                        $board_new_img=$settings['images_url']. '/on.gif';
   
                        echo '<img src="', $board_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
                } elseif ($board['children_new']) {
                    if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.png'))
                        $childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.png';
                    else
                        $childboard_new_img=$settings['images_url']. '/on2.gif';
       
                        echo '<img src="', $childboard_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';   
                } else {
                    if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/off.png'))
                        $board_nonew_img=$settings['theme_url']. '/icons/' . $board['id'] . '/off.png';
                    else
                        $board_nonew_img=$settings['images_url']. '/off.gif';

                        echo '<img src="', $board_nonew_img,'" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" border="0" />';
                }
                // Is it a redirection board?
                if ($board['is_redirect'])
                    echo '<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';


                echo '</a>
                </td>
                <td class="windowbg2 info">
                    <h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></h4>';
 


Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 22, 2009, 01:47:01 PM
I need help adding this to my custom theme..cant get it to work
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 22, 2009, 08:18:24 PM
@ Guardog: Did you try clearing your cache and pressing ctrl + f5 ???
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: glennk on September 23, 2009, 05:09:56 PM
Im having problems on the default theme. Getting this message :

*     1.     Execute Modification     ./Themes/default/BoardIndex.template.php     Test failed
      1.    Replace    ./Themes/default/BoardIndex.template.php    Test failed
*    2.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test failed
      1.    Replace    ./Themes/default/MessageIndex.template.php    Test failed
*    3.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on September 23, 2009, 09:18:11 PM
as with any other mod...   this means that the mod code is looking for something which has already been changed by another mod. You will have to manually install the mod into those files which are marked as failed.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 24, 2009, 01:46:31 AM
That's the problem I've been having too...could I post/send my templates to someone to point out what needs to be done so this can be added with my other mods? I'm lost
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 24, 2009, 11:16:56 PM
Im having problems on the default theme. Getting this message :

*     1.     Execute Modification     ./Themes/default/BoardIndex.template.php     Test failed
      1.    Replace    ./Themes/default/BoardIndex.template.php    Test failed
*    2.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test failed
      1.    Replace    ./Themes/default/MessageIndex.template.php    Test failed
*    3.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful

That's the problem I've been having too...could I post/send my templates to someone to point out what needs to be done so this can be added with my other mods? I'm lost

Post up your BoardIndex.template.php & MessageIndex.template.php files and you will have a better chance of someone looking at them ;)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 24, 2009, 11:25:16 PM
@ Guardog: Did you try clearing your cache and pressing ctrl + f5 ???
Bigguy, Very useful mod. Thank you.
I think that what Guardog was refering to, was when you get all your icons set up and working correctly, if you hover your mouse over the icon, the text pops up and reads "no icon set" even though it should read "No new posts" or "New Posts". The code I posted above fixes that. Also, the mod is set up to default back to the standard board icons until new ones are placed into the correct folders. But since it is defaulting back to a .png file type, and the default smf filetype for a board icon is .gif, it does not work unless you convert your old icons to .png
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on September 24, 2009, 11:27:55 PM
Ah, so sorry I misunderstood that. thanks for posting that code. When I get a minute I will look it over and update the mod. I will also see what can be done about the other problem. Thanks for clearing that up. :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 24, 2009, 11:30:36 PM
No thank you!  :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 25, 2009, 02:43:55 AM
Im having problems on the default theme. Getting this message :

*     1.     Execute Modification     ./Themes/default/BoardIndex.template.php     Test failed
      1.    Replace    ./Themes/default/BoardIndex.template.php    Test failed
*    2.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test failed
      1.    Replace    ./Themes/default/MessageIndex.template.php    Test failed
*    3.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful

That's the problem I've been having too...could I post/send my templates to someone to point out what needs to be done so this can be added with my other mods? I'm lost

Post up your BoardIndex.template.php & MessageIndex.template.php files and you will have a better chance of someone looking at them ;)

Ok here is...if someone could add the code in for me to enable this I would be in debt forever :)

Board index template

Code: [Select]
<?php
// Version: 2.0 Beta 4; BoardIndex
function template_main()
{
   global 
$context$settings$options$txt$scripturl$modSettings;

   
// Show some statistics if stat info is off.
   
if (!$settings['show_stats_index'])
      echo 
'
   <p id="stats">
      '
$txt['members'], ': '$context['common_stats']['total_members'], ' &nbsp;&#38;#8226;&nbsp; '$txt['posts_made'], ': '$context['common_stats']['total_posts'], ' &nbsp;&#38;#8226;&nbsp; '$txt['topics'], ': '$context['common_stats']['total_topics'], '
      '
, ($settings['show_latest_member'] ? '<br />' $txt['welcome_member'] . ' <b>' $context['common_stats']['latest_member']['link'] . '</b>' $txt['newest_member'] : '') , '
   </p>'
;

   
// Show the news fader?  (assuming there are things to show...)
   
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
   {
   echo 
'
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      // Create the main header object.
      var smfNewsFadeToggle = new smfToggle("smfNewsFadeScroller", '
, empty($options['collapse_news_fader']) ? 'false' 'true'');
      smfNewsFadeToggle.useCookie('
$context['user']['is_guest'] ? 0');
      smfNewsFadeToggle.setOptions("collapse_news_fader", "'
$context['session_id'], '");
      smfNewsFadeToggle.addToggleImage("newsupshrink", "/collapse.gif", "/expand.gif");
      smfNewsFadeToggle.addTogglePanel("smfNewsFader");
   // ]]></script>
   <div class="tborder marginbottom">
      <h4 id="newsfader" class="catbg headerpadding">
         <a href="#" onclick="smfNewsFadeToggle.toggle(); return false;">'
$txt['news'], '</a>
      </h4>
      <div id="smfNewsFader"'
, empty($options['collapse_news_fader']) ? '' ' style="display: none;"''>
         <div id="smfFadeScroller"><span>'
$context['news_lines'][0], '</span></div>
      </div>
   </div>
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      // The fading delay (in ms.)
      var smfFadeDelay = '
, empty($settings['newsfader_time']) ? 5000 $settings['newsfader_time'], ';
      // Fade from... what text color? To which background color?
      var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
      // Surround each item with... anything special?
      var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

      var foreColor, foreEl, backEl, backColor;

      if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
      {
         foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
         smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

         backEl = document.getElementById(\'smfFadeScroller\');
         while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
            backEl = backEl.parentNode;

         backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
         smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
      }
      else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
      {

         foreEl = document.getElementById(\'smfFadeScroller\');

         while (document.defaultView.getComputedStyle(foreEl, null).getPropertyCSSValue("color") == null && typeof(foreEl.parentNode) != "undefined" && typeof(foreEl.parentNode.tagName) != "undefined")
            foreEl = foreEl.parentNode;

         foreColor = document.defaultView.getComputedStyle(foreEl, null).getPropertyValue("color").match(/rgb\((\d+), (\d+), (\d+)\)/);
         smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

         backEl = document.getElementById(\'smfFadeScroller\');

         while (document.defaultView.getComputedStyle(backEl, null).getPropertyCSSValue("background-color") == null && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
            backEl = backEl.parentNode;

         backColor = document.defaultView.getComputedStyle(backEl, null).getPropertyValue("background-color");//.match(/rgb\((\d+), (\d+), (\d+)\)/);
         smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
      }

      // List all the lines of the news for display.
      var smfFadeContent = new Array(
         "'
implode('",
         "'
$context['fader_news_lines']), '"
      );
   // ]]></script>
   <script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/fader.js"></script>';
   }

   
/* Each category in categories is made up of:
   id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
   new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
   and boards. (see below.) */
   
foreach ($context['categories'] as $category)
   {
      echo 
'
   <div class="categoryframe tborder">
      <h4 class="catbg headerpadding">'
;

      
// If this category even can collapse, show a link to collapse it.      

      
echo $category['link'];

      echo 
'
      </h4>'
;

      
// Assuming the category hasn't been collapsed...
      
if (!$category['is_collapsed'])
      {
         echo 
'
      <table cellspacing="0" class="bordercolor boardsframe">'
;

         
/* 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 class="windowbg4">
            <td class="icon">
               <a href="'
, ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl '?action=unread;board=' $board['id'] . '.0;children'), '">';

            
// If the board or children is new, show an indicator.
            
if ($board['new'] || $board['children_new'])
               echo 
'
                  <img src="'
$settings['images_url'], '/on'$board['new'] ? '' '2''.png" alt="'$txt['new_posts'], '" title="'$txt['new_posts'], '" border="0" />';
            
// Is it a redirection board?
            
elseif ($board['is_redirect'])
               echo 
'
                  <img src="'
$settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';
            
// No new posts at all! The agony!!
            
else
               echo 
'
                  <img src="'
$settings['images_url'], '/off.png" alt="'$txt['old_posts'], '" title="'$txt['old_posts'], '" />';

            echo 
'
               </a>
            </td>
            <td class="info">
               <h3><a href="'
$board['href'], '" name="b'$board['id'], '">'$board['name'], '</a>';

            
// Has it outstanding posts for approval?
            
if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
               echo 
'
                  <a href="'
$scripturl'?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] ? 'topics' 'posts'), ';brd='$board['id'], ';sesc='$context['session_id'], '" title="'sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';

            echo 
'
               
               <br/><span class="listings">'
$board['description'] , '';

            
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
            
if (!empty($board['moderators']))
               echo 
'
               <br/>'
count($board['moderators']) == $txt['moderator'] : $txt['moderators'], ': 'implode(', '$board['link_moderators']),'';
            echo 
'   
               </span>
                    </h3>'

            
// Show some basic information about the number of posts, etc.
               
echo '
            </td>
            <td class="smalltext lastpost">'
;

            
/* 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.) */
            
if (!empty($board['last_post']['id']))
               echo 
'
               '
$board['posts'], ' '$board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' ',$txt['in'],' &nbsp;'$board['is_redirect'] ? '' $board['topics'] . ' ' $txt['board_topics'];               
               if (!
$context['user']['is_guest'] && !empty($board['last_post']['id']))
         echo 
'
         <a class="smalltext up1" href="'
$scripturl'?action=unread;board='$board['id'], '">&nbsp;('$txt['view_unread_category'], ')</a>';
         if (!empty(
$board['last_post']['id']))
               echo 
'
               <br /><strong>'
$txt['latest'],':</strong>&nbsp;',$board['last_post']['time'], ' <br />
               '
$board['last_post']['link'], ' '$txt['by'], ' '$board['last_post']['member']['link'];            
            echo 
'
            
            </td>
         </tr>'
;
         
         
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
            
if (!empty($board['children']))
            {
               
// Sort the links into an array with new boards bold so it can be imploded.
               
$children = array();
               
/* Each child in each board's children has:
                     id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
               
foreach ($board['children'] as $child)
               {
                  if (!
$child['is_redirect'])
                     
$child['link'] = '<a href="' $child['href'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' $txt['board_topics'] . ': ' $child['topics'] . ', ' $txt['posts'] . ': ' $child['posts'] . ')">' $child['name'] . '</a>';
                  else
                     
$child['link'] = '<a href="' $child['href'] . '" title="' $child['posts'] . ' ' $txt['redirects'] . '">' $child['name'] . '</a>';

                  
// Has it posts awaiting approval?
                  
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
                     
$child['link'] .= ' <a href="' $scripturl '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] ? 'topics' 'posts') . ';brd=' $child['id'] . ';sesc=' $context['session_id'] . '" title="' sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

                  
$children[] = $child['new'] ? '<strong>' $child['link'] . '</strong>' '' .$child['link'] ;
               }
               echo 
'
         <tr>
            <td colspan="3" class="windowbg4 smalltext childlist"><strong>'
$txt['subforums'], ':&nbsp;</strong> 'implode(', '$children), ' </td>
         </tr>'
;
            }
            
         }
         echo 
'
      </table>'
;
      }
      echo 
'
   </div>'
;
   }

   if (
$context['user']['is_logged'])
   {
      echo 
'
   <div id="posticons" class="clearfix marginbottom">
      <div class="smalltext floatleft headerpadding">
         <img src="' 
$settings['images_url'] . '/new_some.png" alt="" align="middle" style="margin-left: 1ex;" /> '$txt['new_posts'], '
         <img src="' 
$settings['images_url'] . '/new_none.png" alt="" align="middle" style="margin-left: 3ex;" /> '$txt['old_posts'], '
      </div>'
;

      
// Mark read button.
      
$mark_read_button = array(
         
'markread' => array('text' => 'mark_as_read''image' => 'markread.gif''lang' => true'url' => $scripturl '?action=markasread;sa=all;sesc=' $context['session_id']),
      );


      
// Show the mark all as read button?
      
if ($settings['show_mark_read'] && !empty($context['categories']))
         
template_button_strip($mark_read_button'top');

      echo 
'
   </div>'
;
   }

   
template_info_center();
}
function 
template_info_center()
{
   global 
$context$settings$options$txt$scripturl$modSettings;

   
// Info center collapse object.
   
echo '
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      // And create the info center object.
      var infoHeader = new smfToggle("upshrinkIC", '
, empty($options['collapse_header_ic']) ? 'false' 'true'');
      infoHeader.useCookie('
$context['user']['is_guest'] ? 0');
      infoHeader.setOptions("collapse_header_ic", "'
$context['session_id'], '");
      infoHeader.addToggleImage("upshrink_ic", "/collapse.gif", "/expand.gif");
      infoHeader.addTogglePanel("upshrinkHeaderIC");
   // ]]></script>'
;

   
// Here's where the "Info Center" starts...
   
echo '
   <div class="tborder clearfix" id="infocenterframe">
      <h4 class="catbg headerpadding">
         <a href="#" onclick="infoHeader.toggle(); return false;">'
$txt['information'], '</a>
         </h4>
      <div id="upshrinkHeaderIC"'
, empty($options['collapse_header_ic']) ? '' ' style="display: none;"''>';

    
// If they are logged in show a personal message bar.
   
if ($context['user']['is_logged'])
   {
      echo 
'
         <div class="infocenter_section">
            <div class="windowbg5">
               <p class="section">
                  '
$context['allow_pm'] ? '<a href="' $scripturl '?action=pm">' '''<img src="'$settings['images_url'], '/message_sm.png" alt="'$txt['personal_message'], '" />'$context['allow_pm'] ? '</a>' '''
               </p>
               <div class="sectionbody"><table width="100%"><tr><td class="smalltext">
                  <strong>'
$txt['hello_member_ndt'], ' '$context['user']['name'], ',&nbsp;</strong>';
                  
// Only tell them about their messages if they can read their messages!
            
if ($context['allow_pm'])
               echo 
$txt['msg_alert_you_have'], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'] , '.<br />
               <a href="'
$scripturl'?action=unread">'$txt['unread_since'], '</a>&nbsp;<a href="'$scripturl'?action=unreadreplies">'$txt['new_since'], '</a>';
            echo 
'   
                </td><td class="smalltext" width="244">
            <form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '">
               <input type="text" id="infosearch" name="search" value="'
$txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\''$txt['search'], '...\';" />
            </form>&nbsp;<a href="'
$scripturl'?action=search">',$txt['search_advanced_op'],'</a>&nbsp;&nbsp;<img src="'$settings['images_url'], '/buttons/search.gif" alt="" />
            </td></tr></table>               
               
               </div>
            </div>
         </div>'
;
   }      
   
   
// Show statistical style information...
   
if ($settings['show_stats_index'])
   {
      echo 
'
         <div class="infocenter_section">
            
            <div class="windowbg5">
               <p class="section">
                  <a href="'
$scripturl'?action=stats"><img src="'$settings['images_url'], '/info.png" alt="'$txt['forum_stats'], '" /></a>
               </p>
               <div class="sectionbody"><table width="100%"><tr><td class="smalltext">
                  '
, !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <b> ' $context['common_stats']['latest_member']['link'] . '</b>' '''<br />
                  '
, (!empty($context['latest_post']) ? $txt['latest_post'] . ': <b>&quot;' $context['latest_post']['link'] . '&quot;</b><br />' ''), '';
            echo 
'      
                  '
$context['common_stats']['total_posts'], ' '$txt['posts_made'], ' '$txt['in'], ' '$context['common_stats']['total_topics'], ' '$txt['topics'], ' '$txt['by'], ' '$context['common_stats']['total_members'], ' '$txt['members'], '
               </td><td class="smalltext" width="242">
                        <a href="'
$scripturl'?action=mlist">'$txt['view_mlist'], '</a><br />                
                  <a href="'
$scripturl'?action=recent">'$txt['view_posts'], '</a>'$context['show_stats'] ? '<br />
                  <a href="' 
$scripturl '?action=stats">' $txt['view_stats']  . '</a>' '''
               </td></tr></table>   
               </div>
            </div>
         </div>'
;
   }
   
   
// "Users online" - in order of activity.
   
echo '
         <div class="infocenter_section">
            <div class="windowbg5">
               <p class="section">
                  '
$context['show_who'] ? '<a href="' $scripturl '?action=who' '">' '''<img src="'$settings['images_url'], '/online.png''" alt="'$txt['online_users'], '" />'$context['show_who'] ? '</a>' '''
               </p>'
;

   
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
       
echo '
                  <div  id="onlineIC">   
                     <span class="smalltext">&nbsp;'
sprintf($txt['active_15'], $modSettings['lastActive']), '&nbsp;';
   
   if (!empty(
$context['users_online']))
   {
      echo 
'
                  '
,implode(', '$context['list_users_online']);

      
// Showing membergroups?
      
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
         echo 
'
                     <br />[' 
implode(']&nbsp;&nbsp;['$context['membergroups']) . ']';
   }
   
   echo 
'         
                     </span></div>'
;

   echo 
'
               <span class="smalltext">   
                  &nbsp;'
,$txt['on_now'],''$context['show_who'] ? '<a href="' $scripturl '?action=who">' ''$context['num_guests'], ' '$context['num_guests'] == $txt['guest'] : $txt['guests'], ', ' $context['num_users_online'], ' '$context['num_users_online'] == $txt['user'] : $txt['users'];
                   
   
// Handle hidden users and buddies.
   
$bracketList = array();
   if (
$context['show_buddies'])
      
$bracketList[] = $context['num_buddies'] . ' ' . ($context['num_buddies'] == $txt['buddy'] : $txt['buddies']);
   if (!empty(
$context['num_spiders']))
      
$bracketList[] = $context['num_spiders'] . ' ' . ($context['num_spiders'] == $txt['spider'] : $txt['spiders']);
   if (!empty(
$context['num_users_hidden']))
      
$bracketList[] = $context['num_users_hidden'] . ' ' $txt['hidden'];

   if (!empty(
$bracketList))
      echo 
' (' implode(', '$bracketList) . ')';

   echo 
$context['show_who'] ? '</a>' '''
   
                     &nbsp;&nbsp;&nbsp;'
$txt['most_online_today'], ': <b>'$modSettings['mostOnlineToday'], '</b>.
                     &nbsp;&nbsp;'
$txt['most_online_ever'], ': '$modSettings['mostOnline'], ' (' timeformat($modSettings['mostDate']), ')
               </span>   
            </div>
         </div>'
;   
         
   
// Show information about events, birthdays, and holidays on the calendar.
   
if ($context['show_calendar'])
   {
      echo 
'
         <div class="infocenter_section">
         <h4 class="headerpadding catbg">'
,$txt['calendar_upcoming'],'</h4>
            <div class="windowbg2 smalltext">   

            <p class="section">
                  <a href="'
$scripturl'?action=calendar' '"><img src="'$settings['images_url'], '/icons/calendar.png''" alt="'$context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
               </p> 
            
               <div class="sectionbody">'
;
               
         
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
      
echo'   
                 <span class="holiday"><strong> '
,$txt['holidays'],' </strong>';
            
      if (!empty(
$context['calendar_holidays']))
            echo 
'
                     '
implode(', '$context['calendar_holidays']);
            echo
'         
                  </span>'
;            
               
      
// People's birthdays. Like mine. And yours, I guess. Kidding.
      
echo '
               <br /><span class="birthday"><strong>&nbsp;'
$context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</strong></span> ';
      
      if (!empty(
$context['calendar_birthdays']))
      {
            
/* Each member in calendar_birthdays has:
            id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
      
foreach ($context['calendar_birthdays'] as $member)
            echo 
'
                     <a href="'
$scripturl'?action=profile;u='$member['id'], '">'$member['is_today'] ? '<b>' ''$member['name'], $member['is_today'] ? '</b>' '', isset($member['age']) ? ' (' $member['age'] . ')' '''</a>'$member['is_last'] ? '<br />' ', ';
      }
      
// Events like community get-togethers.
      
echo '
               <br /><span class="event"><strong>&nbsp;'
$context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</strong></span> ';
      
      if (!empty(
$context['calendar_events']))
      {
         
/* Each event in calendar_events should have:
               title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
         
foreach ($context['calendar_events'] as $event)
            echo 
'
                     '
$event['can_edit'] ? '<a href="' $event['modify_href'] . '" style="color: #FF0000;">*</a> ' ''$event['href'] == '' '' '<a href="' $event['href'] . '">'$event['is_today'] ? '<b>' $event['title'] . '</b>' $event['title'], $event['href'] == '' '' '</a>'$event['is_last'] ? '<br />' ', ';

         
// Show a little help text to help them along ;).
         
if ($context['calendar_can_edit'])
            echo 
'
                     (<a href="'
$scripturl'?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">'$txt['calendar_how_edit'], '</a>)';
                     
      }                  
      
      echo 
'
               </div>
            </div>
         </div>'
;
   }      
         
   
// This is the "Recent Posts" bar.
   
if (!empty($settings['number_recent_posts']))
   {
      echo 
'
         <div class="infocenter_section">
            <h4 class="headerpadding catbg">'
$txt['recent_posts'], '</h4>
            <div class="windowbg2">
               <p class="section">
                  <a href="'
$scripturl'?action=recent"><img src="'$settings['images_url'], '/recent.png" alt="'$txt['recent_posts'], '" /></a>
               </p>
               <div class="sectionbody hslice" id="recent_posts_content"><div class="entry-title" style="display: none;">'
$context['forum_name_html_safe'], ' - '$txt['recent_posts'], '</div><div class="entry-content" style="display: none;"><a rel="feedurl" href="'$scripturl'?action=.xml;type=webslice">'$txt['subscribe_webslice'], '</a></div>';

      
// Only show one post.
      
if ($settings['number_recent_posts'] == 1)
      {
         
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
         
echo '                  
               <br />   
                  <p id="infocenter_onepost" class="smalltext" align="center">
                        <strong>&quot;'
$context['latest_post']['link'], '&quot;</strong> '$txt['recent_updated'], ' ('$context['latest_post']['time'], ')<br />
                  </p>'
;
      }
      
// Show lots of posts.
      
elseif (!empty($context['latest_posts']))
      {
         echo 
'
                  <dl id="infocenter_recentposts" class="middletext">'
;

         
/* Each post in latest_posts has:
               board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
               subject, short_subject (shortened with...), time, link, and href. */
         
foreach ($context['latest_posts'] as $post)
            echo 
'
                     <dt><strong>'
$post['link'], '</strong> '$txt['by'], ' '$post['poster']['link'], ' &nbsp;&nbsp;&nbsp;('$post['board']['link'], ')&nbsp;&nbsp;&nbsp;&nbsp;</dt>
                     <dd>'
$post['time'], '</dd>';
         echo 
'
                  </dl>'
;
      }
      echo 
'
               </div>
            </div>
         </div>'
;
   }      
   
   
// Show the login bar. (it's only true if they are logged out anyway.)
   
if ($context['show_login_bar'])
   {
      echo 
'
         <div class="infocenter_section">
            <h4 class="headerpadding catbg">'
$txt['login'], ' <a href="'$scripturl'?action=reminder" class="smalltext">('$txt['forgot_your_password'], ')</a></h4>
               <div class="windowbg4 sectionbody2">
                  <form id="infocenter_login" action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '">
                     <ul class="horizlist clearfix">
                        <li>                            
                           <label for="user">&nbsp;&nbsp;&nbsp;&nbsp;'
$txt['username'], ':&nbsp;
                           <input type="text" name="user" id="user" size="14" /></label>
                        </li>
                        <li>
                           <label for="passwrd">'
$txt['password'], ':&nbsp;
                           <input type="password" name="passwrd" id="passwrd" size="14" /></label>
                        </li>
                        <li>
                           <label for="cookielength">'
$txt['mins_logged_in'] , ':&nbsp;
                           <input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="'
$modSettings['cookieTime'], '" /></label>
                        </li>
                        <li>
                           &nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" class="smalltext" id="botlog" value="'
$txt['login'], '" />
                        </li>
                     </ul>
                  </form>
               </div>
            </div>'
;
   }
   echo 

      </div>
   </div>'
;
}
?>


Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 25, 2009, 02:50:53 AM
Message index template

Code: [Select]
<?php
// Version: 2.0 Beta 4; MessageIndex
function template_main()
{
   global 
$context$settings$options$scripturl$modSettings$txt;

   if (!empty(
$context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
   {
      echo 
'
   <div class="tborder marginbottom" id="childboards">            
         <h4 class="headerpadding catbg">'
$txt['subforums'], '';
         echo 
'
      </h4>'
;
   echo
'   
     <table cellspacing="0" class="bordercolor boardsframe">'
;
      foreach (
$context['boards'] as $board)
      {
         echo 
'
         
         <tr class="windowbg4">
            <td class="icon">
               <a href="'
, ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl '?action=unread;board=' $board['id'] . '.0;children'), '">';

         
// If the board or children is new, show an indicator.
            
if ($board['new'] || $board['children_new'])
               echo 
'
                  <img src="'
$settings['images_url'], '/on'$board['new'] ? '' '2''.png" alt="'$txt['new_posts'], '" title="'$txt['new_posts'], '" border="0" />';
            
// Is it a redirection board?
            
elseif ($board['is_redirect'])
               echo 
'
                  <img src="'
$settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';
            
// No new posts at all! The agony!!
            
else
               echo 
'
                  <img src="'
$settings['images_url'], '/off.png" alt="'$txt['old_posts'], '" title="'$txt['old_posts'], '" />';

            echo 
'
               </a>
            </td>
            <td class="info">
               <h3><a href="'
$board['href'], '" name="b'$board['id'], '">'$board['name'], '</a>';

            
// Has it outstanding posts for approval?
            
if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
               echo 
'
                  <a href="'
$scripturl'?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] ? 'topics' 'posts'), ';brd='$board['id'], ';sesc='$context['session_id'], '" title="'sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';

            echo 
'
               
               <br/><span class="listings">'
$board['description'] , '';

            
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
            
if (!empty($board['moderators']))
               echo 
'
               <br/>'
count($board['moderators']) == $txt['moderator'] : $txt['moderators'], ': 'implode(', '$board['link_moderators']),'';
            echo 
'   
               </span>
                    </h3>'

            
// Show some basic information about the number of posts, etc.
               
echo '
            </td>
            <td class="smalltext  lastpost">'
;

            
/* 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.) */
            
if (!empty($board['last_post']['id']))
               echo 
'
               '
$board['posts'], ' '$board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' ',$txt['in'],' &nbsp;'$board['is_redirect'] ? '' $board['topics'] . ' ' $txt['board_topics'];               
               if (!
$context['user']['is_guest'] && !empty($board['last_post']['id']))
         echo 
'
         <a class="smalltext up1" href="'
$scripturl'?action=unread;board='$board['id'], '">&nbsp;('$txt['view_unread_category'], ')</a>';
         if (!empty(
$board['last_post']['id']))
               echo 
'
               <br /><strong>'
$txt['latest'],':</strong>&nbsp;',$board['last_post']['time'], ' <br />
               '
$board['last_post']['link'], ' '$txt['by'], ' '$board['last_post']['member']['link'];            
            echo 
'
            
            </td>
         </tr>'
;
         
         
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
            
if (!empty($board['children']))
            {
               
// Sort the links into an array with new boards bold so it can be imploded.
               
$children = array();
               
/* Each child in each board's children has:
                     id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
               
foreach ($board['children'] as $child)
               {
                  if (!
$child['is_redirect'])
                     
$child['link'] = '<a href="' $child['href'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' $txt['board_topics'] . ': ' $child['topics'] . ', ' $txt['posts'] . ': ' $child['posts'] . ')">' $child['name'] . '</a>';
                  else
                     
$child['link'] = '<a href="' $child['href'] . '" title="' $child['posts'] . ' ' $txt['redirects'] . '">' $child['name'] . '</a>';

                  
// Has it posts awaiting approval?
                  
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
                     
$child['link'] .= ' <a href="' $scripturl '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] ? 'topics' 'posts') . ';brd=' $child['id'] . ';sesc=' $context['session_id'] . '" title="' sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

                  
$children[] = $child['new'] ? '<strong>' $child['link'] . '</strong>' $child['link'];
               }
               echo 
'
         <tr>
            <td colspan="3" class="windowbg4 smalltext childlist"><strong>'
$txt['subforums'], ':&nbsp;</strong> 'implode(', '$children), '</td>
         </tr>'
;
            }            
      }
      echo 
'
      </table>
   </div>'
;
   }


   if (!empty(
$options['show_board_desc']) && $context['description'] != '')
   {
      echo 
'
   <div id="description" class="tborder">
      <div class="titlebg2 largepadding smalltext">'
$context['description'], '</div>
   </div>'
;
   }

   
// Create the button set...
   
$normal_buttons = array(
      
'markread' => array('text' => 'mark_read_short''image' => 'markread.gif''lang' => true'url' => $scripturl '?action=markasread;sa=board;board=' $context['current_board'] . '.0;sesc=' $context['session_id']),
      
'notify' => array('test' => 'can_mark_notify''text' => 'notify''image' => 'notify.gif''lang' => true'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"''url' => $scripturl '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' 'on') . ';board=' $context['current_board'] . '.' $context['start'] . ';sesc=' $context['session_id']),
      
'new_topic' => array('test' => 'can_post_new''text' => 'new_topic''image' => 'new_topic.gif''lang' => true'url' => $scripturl '?action=post;board=' $context['current_board'] . '.0'),
      
'post_poll' => array('test' => 'can_post_poll''text' => 'new_poll''image' => 'new_poll.gif''lang' => true'url' => $scripturl '?action=post;board=' $context['current_board'] . '.0;poll'),
   );

   
// They can only mark read if they are logged in and it's enabled!
   
if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
      unset(
$normal_buttons['markread']);

   if (!
$context['no_topic_listing'])
   {
      echo 
'
      <div id="modbuttons_top" class="modbuttons clearfix margintop">
         <div class="floatleft middletext">'
$txt['pages'], ': '$context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#bot"><b>' $txt['go_down'] . '</b></a>' '''</div>
         '
template_button_strip($normal_buttons'bottom'), '
      </div>'
;

      
// If Quick Moderation is enabled start the form.
      
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
         echo 
'
   <form action="'
$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], '" method="post" accept-charset="'$context['character_set'], '" name="quickModForm" id="quickModForm">';

      echo 
'
         <div class="tborder" id="messageindex">
            <table cellspacing="0" class="bordercolor boardsframe">
               <thead>
                  <tr>'
;

      
// Are there actually any topics to show?
      
if (!empty($context['topics']))
      {
         echo 
'
                     <th width="6%" colspan="1" class="windowbgS2 headerpadding">&nbsp;</th>
                     <th class="windowbgS3 headerpadding" align="left"><a href="'
$scripturl'?board='$context['current_board'], '.'$context['start'], ';sort=starter'$context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ';desc' '''">' ,$txt['sort_topic_starter'],' </a></th>                     
                     <th class="windowbgS4 headerpadding" width="230" align="left"><a href="'
$scripturl'?board='$context['current_board'], '.'$context['start'], ';sort=last_post'$context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ';desc' '''">',$txt['sort_last_poster'],'</a></th>
                     '
;

         
// Show a "select all" box for quick moderation?
         
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
            echo 
'
                     <th class="catbg3 headerpadding" width="24">
                        <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="check" />
                     </th>'
;
         
// If it's on in "image" mode, don't show anything but the column.
         
elseif (!empty($options['display_quick_mod']))
            echo 
'
                     <th class="catbg3 headerpadding" width="4%"></th>'
;
      }
      
// No topics.... just say, "sorry bub".
      
else
         echo 
'
                     <th class="catbg3" colspan="3"><strong>'
$txt['msg_alert_none'], '</strong></th>';

      echo 
'
                  </tr>
               </thead>
               <tbody>'
;

      if (!empty(
$settings['display_who_viewing']))
      {
         echo 
'
                  <tr>
                     <td colspan="' 
, !empty($options['display_quick_mod']) ? '8' '7' '" class="windowbg5 headerpadding smalltext">';
         if (
$settings['display_who_viewing'] == 1)
            echo 
count($context['view_members']), ' 'count($context['view_members']) == $txt['who_member'] : $txt['members'];
         else
            echo empty(
$context['view_members_list']) ? '0 ' $txt['members'] : implode(', '$context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' ' (+ ' $context['view_num_hidden'] . ' ' $txt['hidden'] . ')');
         echo 
$txt['who_and'], $context['view_num_guests'], ' '$context['view_num_guests'] == $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
                     </td>
                  </tr>'
;
      }

      
// If this person can approve items and we have some awaiting approval tell them.
      //NOTE: TEST THE COLSPAN HERE. New SMF 2 feature that needs to be checked.
      
if (!empty($context['unapproved_posts_message']))
      {
         echo 
'
                  <tr class="windowbg">
                     <td colspan="' 
, !empty($options['display_quick_mod']) ? '8' '7' '" class="smalltext headerpadding">
                           <span style="color: red;">!</span> '
$context['unapproved_posts_message'], '
                     </td>
                  </tr>'
;
      }

      foreach (
$context['topics'] as $topic)
      {
         
// Do we want to seperate the sticky and lock status out?
         
if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false)
            
$topic['class'] = substr($topic['class'], 0strrpos($topic['class'], '_sticky'));
         if (!empty(
$settings['separate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
            
$topic['class'] = substr($topic['class'], 0strrpos($topic['class'], '_locked'));

         
// Calculate the colour class of the topic.
         
if ($context['can_approve_posts'] && $topic['unapproved_posts'])
            
$color_class $topic['approved'] ? 'approvebg' 'approvetbg';
         else
            
$color_class = !empty($settings['separate_sticky_lock']) && $topic['is_sticky'] ? 'windowbgS' 'windowbg4';

         echo 
'
                  <tr>
                                           
                     <td class="windowbg4 icon2">
                        <img src="'
$topic['first_post']['icon_url'], '" alt="" />
                     </td>
                     <td class="subject '
$color_class'" ', (!empty($topic['quick_mod']['remove']) ? 'id="topic_' $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' $topic['id'] . '\', \'' $topic['first_post']['id'] . '\', \'' $context['session_id'] . '\');"' ''), '>';

         echo 
'
                        '
$topic['is_sticky'] ? '<b>' '' '<span id="msg_' $topic['first_post']['id'] . '">'$topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' $txt['awaiting_approval'] . ')</em>' ''), '</span>'$topic['is_sticky'] ? '</b>' '
                        ' 
$topic['is_sticky'] ? '<img src="' $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" id="stickyicon' $topic['first_post']['id'] . '" style="margin: 0;" />' '';

         
// Is this topic new? (assuming they are logged in!)
         
if ($topic['new'] && $context['user']['is_logged'])
               echo 
'
                        <a href="'
$topic['new_href'], '" id="newicon' $topic['first_post']['id'] . '"><img src="'$settings['lang_images_url'], '/new.gif" alt="'$txt['new'], '" /></a>';

         echo 
'
                        <span id="pages' 
$topic['first_post']['id'] . '">'$topic['pages'], '</span><br />
                        <span class="smalltext">'
$txt['started_by'],'<strong>&nbsp;'$topic['first_post']['member']['link'], '</strong>
                        &nbsp;&nbsp;&nbsp;<strong>'
$topic['replies'], '</strong>&nbsp;'$txt['replies'],'&nbsp;&nbsp;&nbsp;<strong>'$topic['views'], '</strong>&nbsp;'$txt['views'],'</span>
                     </td>
                     
                     
                     
                     <td class="windowbg4 replies">'
;
                     if (!empty(
$settings['separate_sticky_lock']))
            echo 
'
                        ' 
$topic['is_locked'] ? '<img src="' $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" id="lockicon' $topic['first_post']['id'] . '" style="margin: 0;" />' '' '';

            echo
'         
                         <span class="smalltext">
                        <a href="'
$topic['last_post']['href'], '"><strong>'$txt['latest'],'</strong>&nbsp;</a>',$txt['by'],'&nbsp;'$topic['last_post']['member']['link'], '<br />
                           '
$topic['last_post']['time'], '
                        </span>
                     </td>'
;

         
// Show the quick moderation options?
         
if (!empty($options['display_quick_mod']))
         {
            echo 
'
                     <td class="windowbg' 
$topic['is_sticky'] ? '3' '' ' moderation">';
            if (
$options['display_quick_mod'] == 1)
               echo 
'
                        <input type="checkbox" name="topics[]" value="'
$topic['id'], '" class="check" />';
            else
            {
               
// Check permissions on each and show only the ones they are allowed to use.
               
if ($topic['quick_mod']['remove'])
                  echo 
'<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=remove;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_remove.gif" width="16" alt="'$txt['remove_topic'], '" title="'$txt['remove_topic'], '" /></a>';

               if (
$topic['quick_mod']['lock'])
                  echo 
'<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=lock;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_lock.gif" width="16" alt="'$txt['set_lock'], '" title="'$txt['set_lock'], '" /></a>';

               if (
$topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
                  echo 
'<br />';

               if (
$topic['quick_mod']['sticky'])
                  echo 
'<a href="'$scripturl'?action=quickmod;board='$context['current_board'], '.'$context['start'], ';actions['$topic['id'], ']=sticky;sesc='$context['session_id'], '" onclick="return confirm(\''$txt['quickmod_confirm'], '\');"><img src="'$settings['images_url'], '/icons/quick_sticky.gif" width="16" alt="'$txt['set_sticky'], '" title="'$txt['set_sticky'], '" /></a>';

               if (
$topic['quick_mod']['move'])
                  echo 
'<a href="'$scripturl'?action=movetopic;board='$context['current_board'], '.'$context['start'], ';topic='$topic['id'], '.0"><img src="'$settings['images_url'], '/icons/quick_move.gif" width="16" alt="'$txt['move_topic'], '" title="'$txt['move_topic'], '" /></a>';
            }
            echo 
'
                     </td>'
;
         }
         echo 
'
                  </tr>'
;
      }

      if (!empty(
$options['display_quick_mod']) && $options['display_quick_mod'] == && !empty($context['topics']))
      {
         echo 
'
                  <tr class="catbg headerpadding">
                     <td colspan="8" align="right">
                        <select name="qaction"'
$context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' '''>
                           <option value="">--------</option>
                           '
$context['can_approve'] ? '<option value="approve">' $txt['quick_mod_approve'] . '</option>' '''
                           '
$context['can_remove'] ? '<option value="remove">' $txt['quick_mod_remove'] . '</option>' '''
                           '
$context['can_lock'] ? '<option value="lock">' $txt['quick_mod_lock'] . '</option>' '''
                           '
$context['can_sticky'] ? '<option value="sticky">' $txt['quick_mod_sticky'] . '</option>' '''
                           '
$context['can_move'] ? '<option value="move">' $txt['quick_mod_move'] . ': </option>' '''
                           '
$context['can_merge'] ? '<option value="merge">' $txt['quick_mod_merge'] . '</option>' '''
                           '
$context['can_restore'] ? '<option value="restore">' $txt['quick_mod_restore'] . '</option>' '''
                           <option value="markread">'
$txt['quick_mod_markread'], '</option>
                        </select>'
;

         
// Show a list of boards they can move the topic to.
         
if ($context['can_move'])
         {
               echo 
'
                        <select id="moveItTo" name="move_to" disabled="disabled">'
;

               foreach (
$context['move_to_boards'] as $category)
               {
                  echo 
'
                           <optgroup label="'
$category['name'], '">';
                  foreach (
$category['boards'] as $board)
                        echo 
'
                              <option value="'
$board['id'], '"'$board['selected'] ? ' selected="selected"' '''>'$board['child_level'] > str_repeat('=='$board['child_level'] - 1) . '=&gt;' ''' '$board['name'], '</option>';
                  echo 
'
                           </optgroup>'
;
               }
               echo 
'
                        </select>'
;
         }

         echo 
'
                        <input type="submit" value="'
$txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' &amp;&amp; confirm(\''$txt['quickmod_confirm'], '\');" />
                     </td>
                  </tr>'
;
      }

      echo 
'
               </tbody>
            </table>
         </div>
         <a name="bot"></a>'
;

      
// Finish off the form - again.
      
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
         echo 
'
         <input type="hidden" name="sc" value="' 
$context['session_id'] . '" />
   </form>'
;

      echo 
'
   <div id="modbuttons_bottom" class="modbuttons clearfix marginbottom">
      <div class="floatleft middletext">'
$txt['pages'], ': '$context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '&nbsp;&nbsp;<a href="#top"><strong>' $txt['go_up'] . '</strong></a>' '''</div>
      '
template_button_strip($normal_buttons'top'), '
   </div>'
;
   }


   
// Show breadcrumbs at the bottom too?
   
echo '
   <div class="marginbottom">'
theme_linktree(), '</div>';

   echo 
'
   <div class="tborder clearfix" id="topic_icons">
      <div class="catbg clearfix">
         <p class="floatright" id="message_index_jump_to">&nbsp;</p>'
;

   if (!
$context['no_topic_listing'])
         echo 
'
         
         <span class="smalltext" >&nbsp;&nbsp;&nbsp;&nbsp;
            <img src="' 
$settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' $txt['locked_topic'] . ' &nbsp;&nbsp;&nbsp;&nbsp;' . ($modSettings['enableStickyTopics'] == '1' '
            <img src="' 
$settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' $txt['sticky_topic'] . '&nbsp;&nbsp;&nbsp;&nbsp;' '') . ($modSettings['pollMode'] == '1' '
            <img src="' 
$settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' $txt['poll'] : '') . '
         </span>'
;

   echo 
'
         <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
            if (typeof(window.XMLHttpRequest) != "undefined")
               aJumpTo[aJumpTo.length] = new JumpTo({
                  sContainerId: "message_index_jump_to",
                  sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">'
$context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
                  iCurBoardId: '
$context['current_board'], ',
                  iCurBoardChildLevel: '
$context['jump_to']['child_level'], ',
                  sCurBoardName: "'
$context['jump_to']['board_name'], '",
                  sBoardChildLevelIndicator: "==",
                  sBoardPrefix: "=> ",
                  sCatSeparator: "-----------------------------",
                  sCatPrefix: "",
                  sGoButtonLabel: "'
$txt['go'], '"
               });
         // ]]></script>
      </div>
   </div>'
;

   
// Javascript for inline editing.
   
echo '
<script language="JavaScript" type="text/javascript" src="' 
$settings['default_theme_url'] . '/scripts/xml_board.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

   // Hide certain bits during topic edit.
   hide_prefixes.push("lockicon", "stickyicon", "pages", "newicon");

   // Use it to detect when we\'ve stopped editing.
   document.onclick = modify_topic_click;

   var mouse_on_div;
   function modify_topic_click()
   {
      if (in_edit_mode == 1 && mouse_on_div == 0)
         modify_topic_save("'
$context['session_id'], '");
   }

   function modify_topic_keypress(oEvent)
   {
      if (typeof(oEvent.keyCode) != "undefined" && oEvent.keyCode == 13)
      {
         modify_topic_save("'
$context['session_id'], '");
         if (typeof(oEvent.preventDefault) == "undefined")
            oEvent.returnValue = false;
         else
            oEvent.preventDefault();
      }
   }

   // For templating, shown when an inline edit is made.
   function modify_topic_show_edit(subject)
   {
      // Just template the subject.
      setInnerHTML(cur_subject_div, \'<input type="text" name="subject" value="\' + subject + \'" size="60" style="width: 95%;"  maxlength="80" onkeypress="modify_topic_keypress(event)" /><input type="hidden" name="topic" value="\' + cur_topic_id + \'" /><input type="hidden" name="msg" value="\' + cur_msg_id.substr(4) + \'" />\');
   }

   // And the reverse for hiding it.
   function modify_topic_hide_edit(subject)
   {
      // Re-template the subject!
      setInnerHTML(cur_subject_div, \'<a href="'
$scripturl'?topic=\' + cur_topic_id + \'.0">\' + subject + \'<\' +\'/a>\');
   }

// ]]></script>'
;
}
function 
theme_show_buttons()
{
   global 
$context$settings$options$txt$scripturl;

   
$buttonArray = array();

   
// If they are logged in, and the mark read buttons are enabled..
   
if ($context['user']['is_logged'] && $settings['show_mark_read'])
      
$buttonArray[] = '<a href="' $scripturl '?action=markasread;sa=board;board=' $context['current_board'] . '.0;sesc=' $context['session_id'] . '">' $txt['mark_read_short'] . '</a>';

   
// If the user has permission to show the notification button... ask them if they're sure, though.
   
if ($context['can_mark_notify'])
      
$buttonArray[] = '<a href="' $scripturl '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' 'on') . ';board=' $context['current_board'] . '.' $context['start'] . ';sesc=' $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');">' $txt['notify'] . '</a>';

   
// Are they allowed to post new topics?
   
if ($context['can_post_new'])
      
$buttonArray[] = '<a href="' $scripturl '?action=post;board=' $context['current_board'] . '.0">' $txt['new_topic'] . '</a>';

   
// How about new polls, can the user post those?
   
if ($context['can_post_poll'])
      
$buttonArray[] = '<a href="' $scripturl '?action=post;board=' $context['current_board'] . '.0;poll">' $txt['new_poll'] . '</a>';

   return 
implode(' &nbsp;|&nbsp; '$buttonArray);
}

?>


Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 25, 2009, 11:40:42 AM
Ok here is...if someone could add the code in for me to enable this I would be in debt forever :)

Here try these:
 
 
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 25, 2009, 11:53:56 AM
K thanks I'll add these soon :) ....where do I need to put the icons though (folder) ?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 25, 2009, 03:44:58 PM
/Themes/default/icons/BOARD ID/off.png
board id should be a number... like 1
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 25, 2009, 04:01:58 PM
Ok thx but dont I need to add it to my custom theme folder instead of the default folder?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 25, 2009, 06:11:52 PM
Ok thx but dont I need to add it to my custom theme folder instead of the default folder?

Not too sure on that... I use it on the default theme.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 27, 2009, 06:48:40 PM
Ok thx but dont I need to add it to my custom theme folder instead of the default folder?

Not too sure on that... I use it on the default theme.

Well I figured it out thanks for all your help  :D

My theme got a tad bit messed up in the process lol but Ill figure out how to fix it :)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 28, 2009, 12:54:52 PM
Ok I added the same board icons for the child boards as the parent boards have but if there is unread topics in the child and not the parent boards the default icon shows? Any fix for that?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: dyrome on September 28, 2009, 07:49:40 PM
its a good mod but can some one make it possible that if you make a new board you can choose directly a image as board icon or upload it when you create a board.

this is beter than creating for every board a map with off,on and on2.png image.

i will like this very much to be possible

sorry for my bad english i am dutch.

i have version SMF 2.0 RC1.2
greetings,

Dyrome
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on September 28, 2009, 08:24:37 PM
dyrome,

almost anything is POSSIBLE. However, this is actually a very simple mod.... and what you are asking for is MUCH more involved.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 29, 2009, 05:48:07 PM
Ok I added the same board icons for the child boards as the parent boards have but if there is unread topics in the child and not the parent boards the default icon shows? Any fix for that?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 29, 2009, 08:43:11 PM
Ok I added the same board icons for the child boards as the parent boards have but if there is unread topics in the child and not the parent boards the default icon shows? Any fix for that?
Are you saying that in board 3 for instance you have a

.../icons/3/on.png
.../icons/3/on2.png

where your on.png is the parent board, on2.png is the child and a duplicate of on.png? If you have it set up like that it should work.

If not you could always change this part of the code:
Code: [Select]
                    if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.png'))
                        $childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.png';
                    else
                        $childboard_new_img=$settings['images_url']. '/on2.png';
       
                        echo '<img src="', $childboard_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';   
                }
to this
Code: [Select]
                    if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.png'))
                        $childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.png';
                    else
                        $childboard_new_img=$settings['images_url']. '/on2.png';
       
                        echo '<img src="', $childboard_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';   
                }
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 30, 2009, 02:23:31 AM
Oh no I didn't have it set up like that lol

I had it like...say the parent is board 3 and the child 4 I had 2 different folders with the same on/off png's

Didn't know they needed to be in the parents folder :) thanks
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on September 30, 2009, 06:00:35 AM
Oh no I didn't have it set up like that lol

I had it like...say the parent is board 3 and the child 4 I had 2 different folders with the same on/off png's

Didn't know they needed to be in the parents folder :) thanks

After getting some sleep... I think I told you wrong.
Let's assume board 3 is the parent and 4 is the child.

.../icons/3/on.png    is the new posts icon for the parent board
.../icons/3/on2.png   is the new posts icon for the child board (on the board index)

.../icons/4/on.png    is the new posts icon for the child board (in the message index)
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Blah blah on September 30, 2009, 10:21:22 AM
Ah I got you :) thanks for the fix
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Milossh on October 31, 2009, 04:28:37 AM
Hello,

AFAIK, same mod will work on RC1.1 and RC 2.2. So please, can you update this mode to be able to install on RC 1.2 too.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on October 31, 2009, 10:52:21 AM
I have it installed on 2.0 RC 1.2
It installed without errors and afterward I edited the mod to my liking... anyways it should work for you.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on November 09, 2009, 06:52:10 PM
I got this working on 2.0 RC2     Sort of....

It is a stripped down version that does not default back to the standard board icons if new ones are not present. But if you have all your board icons set up they should work.

This should get us by until Bigguy gets the chance to update for 2.0 RC2

BoardIndex.template.php
Find:

Code: [Select]
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'])
                    echo '
                            <img src="', $settings['images_url'],'/', $context['theme_variant'], '/on', $board['new'] ? '' : '2', '.png"alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
                // Is it a redirection board?
                elseif ($board['is_redirect'])
                    echo '
                            <img src="', $settings['images_url'],'/', $context['theme_variant'], '/redirect.png" alt="*" title="*"/>';
                // No new posts at all! The agony!!
                else
                    echo '
                            <img src="', $settings['images_url'],'/', $context['theme_variant'], '/off.png" alt="', $txt['old_posts'],'" title="', $txt['old_posts'], '" />';

                echo '
                        </a>
                    </td>
                    <td class="info">
                        <a class="subject" href="', $board['href'],'" name="b', $board['id'], '">', $board['name'], '</a>';

Replace With:
Code: [Select]
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'], '/icons/', $board['id'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
                // Is it a redirection board?
                elseif ($board['is_redirect'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'], '/redirect.png" alt="*" title="*" />';
                // No new posts at all! The agony!!
                else
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'],  '/icons/', $board['id'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

                echo '
                        </a>
                    </td>
                    <td class="info">
                        <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';


MessageIndex.template.php
Find:

Code: [Select]
            // If the board or children is new, show an indicator.
            if ($board['new'] || $board['children_new'])
                echo '
                        <img src="', $settings['images_url'], '/' .$context['theme_variant'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
            // Is it a redirection board?
            elseif ($board['is_redirect'])
                echo '
                        <img src="', $settings['images_url'], '/' .$context['theme_variant'], '/redirect.png" alt="*" title="*" border="0" />';
            // No new posts at all! The agony!!
            else
                echo '
                        <img src="', $settings['images_url'], '/' .$context['theme_variant'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

            echo '
                    </a>
                </td>
                <td class="info">
                    <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';

Replace With:
Code: [Select]
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'], '/icons/', $board['id'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
                // Is it a redirection board?
                elseif ($board['is_redirect'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'], '/redirect.png" alt="*" title="*" />';
                // No new posts at all! The agony!!
                else
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'],  '/icons/', $board['id'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

                echo '
                        </a>
                    </td>
                    <td class="info">
                        <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: MarcusJ on November 12, 2009, 06:40:48 PM
I just came back to SMF after a couple months on a sub par forum.  It feels great to be back.

This mod was one of my favorite.  Is there any word on a version for RC2?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on November 12, 2009, 08:07:26 PM
Thanks for posting that Yahmez. I have not had a chance to do much with this mod recently. I will see what I can come up with in the next little while. (week or so.) That is all I can promise right now.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on November 14, 2009, 12:07:27 AM
Thanks for posting that Yahmez. I have not had a chance to do much with this mod recently. I will see what I can come up with in the next little while. (week or so.) That is all I can promise right now.
No problem Bigguy! I ♥ CBI!
And I want to upgrade soon, with so many mods installed I have to start on my own. Thank you for the great mods and support!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Neverhurry on November 15, 2009, 03:14:57 PM
Oh, i need this mod RC2 version! thanks!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: YogiBear on November 16, 2009, 12:01:19 PM
This mod is just what I'm looking for but can I use it as a Site Admin ie. with no access to cpanel?

Now it's using the .png extension I'm wondering if I can host the image as for any other photo then insert the code with the img tags.

What I'm planning to do is use the same image in all boards.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Kindred on November 16, 2009, 01:30:24 PM
Yogi,

In order to use this, you would need to have either cpanel or ftp access to the site.
There is no admin interface...     Since there is no admin interface, there is nowhere for you to add the filename....    the filenames and locations are hardcoded to be the THEME/Images/boardID/on.png, off.png and on2.png

If you want to use the same image for all boards, then there i no need for this mod... just replace the theme's default copies of on.gif, on2.gif and off.gif.

Title: Re: cbi v0.5 (Custom Board Icons)
Post by: YogiBear on November 16, 2009, 01:39:23 PM
Thanks, Kindred.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Manu.G on November 22, 2009, 11:57:14 AM
I got this working on 2.0 RC2     Sort of....

It is a stripped down version that does not default back to the standard board icons if new ones are not present. But if you have all your board icons set up they should work.

This should get us by until Bigguy gets the chance to update for 2.0 RC2

BoardIndex.template.php
Find:

Code: [Select]
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'])
                    echo '
                            <img src="', $settings['images_url'],'/', $context['theme_variant'], '/on', $board['new'] ? '' : '2', '.png"alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
                // Is it a redirection board?
                elseif ($board['is_redirect'])
                    echo '
                            <img src="', $settings['images_url'],'/', $context['theme_variant'], '/redirect.png" alt="*" title="*"/>';
                // No new posts at all! The agony!!
                else
                    echo '
                            <img src="', $settings['images_url'],'/', $context['theme_variant'], '/off.png" alt="', $txt['old_posts'],'" title="', $txt['old_posts'], '" />';

                echo '
                        </a>
                    </td>
                    <td class="info">
                        <a class="subject" href="', $board['href'],'" name="b', $board['id'], '">', $board['name'], '</a>';

Replace With:
Code: [Select]
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'], '/icons/', $board['id'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
                // Is it a redirection board?
                elseif ($board['is_redirect'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'], '/redirect.png" alt="*" title="*" />';
                // No new posts at all! The agony!!
                else
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'],  '/icons/', $board['id'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

                echo '
                        </a>
                    </td>
                    <td class="info">
                        <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';


MessageIndex.template.php
Find:

Code: [Select]
            // If the board or children is new, show an indicator.
            if ($board['new'] || $board['children_new'])
                echo '
                        <img src="', $settings['images_url'], '/' .$context['theme_variant'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
            // Is it a redirection board?
            elseif ($board['is_redirect'])
                echo '
                        <img src="', $settings['images_url'], '/' .$context['theme_variant'], '/redirect.png" alt="*" title="*" border="0" />';
            // No new posts at all! The agony!!
            else
                echo '
                        <img src="', $settings['images_url'], '/' .$context['theme_variant'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

            echo '
                    </a>
                </td>
                <td class="info">
                    <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';

Replace With:
Code: [Select]
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'], '/icons/', $board['id'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
                // Is it a redirection board?
                elseif ($board['is_redirect'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'], '/redirect.png" alt="*" title="*" />';
                // No new posts at all! The agony!!
                else
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant'],  '/icons/', $board['id'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

                echo '
                        </a>
                    </td>
                    <td class="info">
                        <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';

Thx for the code, but when I insert the code, I have to move the icons to /Themes/default/images/icons
or the icons aren't to see.  :-[
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Yahmez on November 22, 2009, 04:00:30 PM
Thx for the code, but when I insert the code, I have to move the icons to /Themes/default/images/icons
or the icons aren't to see.  :-[

That should be the correct location. The version I provided does not default back to the original icons if no new ones are found. So after installing, if you do not have the icons in place you will see the 'alternate text' instead of an icon.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: MarcusJ on November 29, 2009, 07:26:55 PM
This is one of my favorite modifications for SMF.  Is there any word on a version for the latest release of SMF 2?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: MATTEK on November 29, 2009, 11:09:18 PM
This would definitely be something my members would like to see.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 01, 2009, 04:17:38 PM
I found a version on my site that was made for SMF 2.0 but it might need some updates.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: nassatellite on December 04, 2009, 02:08:28 PM
Do these modifications warn curve (new default) theme?
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 04, 2009, 08:10:58 PM
I have tested it once on curve and will have to do a bit of updating.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Xarcell on December 04, 2009, 10:38:51 PM
can't wait for the update on 2.0 rc2! Sweet mod...
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: MarcusJ on December 10, 2009, 04:50:28 AM
can't wait for the update on 2.0 rc2! Sweet mod...

Agreed!
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 13, 2009, 12:15:57 PM
Sorry all been working on getting a new site up and running. I will be looking at this mod later today and/or tonight if I have the time to and update it then if I can. I will test it on a live site first I guess before anything happens.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: Bigguy on December 13, 2009, 03:01:40 PM
Ok, a new version has been uploaded to the mod site. it has been updated to work with SMF 2.0 RC2. I tested it and all should work fine. READ THE README FOR INSTRUCTIONS ON WHERE TO PUT THE ICONS FOLDER.
Title: Re: cbi v0.5 (Custom Board Icons)
Post by: MarcusJ on December 13, 2009, 04:42:05 PM
Thanks Bigguy,

I have a question.  I've tried to install the mod and I get an error on the modifications to BoardIndex.template.php.  As far as I can tell I haven't used any mods which effect this. 

SMF 2.0 RC2

1.     Custom Form Mod      1.6
2.    Pretty URLs    1.0RC
3.    SimplePortal    2.3.1
4.    Downloads System Pro    1.0.10
5.    Aeva ~ Auto-Embed Video & Audio    7.0
6.    SMF Media Gallery    2.0.5

I know how to install a mod manually, but I'