News:

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

Main Menu

cbi v0.5 (Custom Board Icons)

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

Previous topic - Next topic

Bigguy

If you want when I get home I will PM you and take a look at it myself to help you out. :)

ASF

cheers man, i've Pm ya with my details already.

8) 8) 8) 8)

tambay_lang

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.

Bigguy

The only boards that will have custom icons is the ones you create folders for; all others will default to the original icons.

tambay_lang

thanks .

So you mean even if I change

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

// 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:


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:

// 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:

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?





Bigguy


tambay_lang


Mohamed GadAllah

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

Bigguy

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

franklinrony

#129
i found more png format how allow png and gif format?
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

Bigguy

Convert the .png to .gif with your favorite editor and that would solve your problem.

Tysmyster

#131
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.

Bigguy

Board ids will show if you hover your mouse over it and look to the bottom left corner of your browser.

ShawnX

#133
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.....  ???

Bigguy


ShawnX

Quote from: Bigguy on October 14, 2007, 03:21:01 PM
Try this:

theme\icons\13\on.gif

Ahhh...that was the problem.  Thanks! 8)

Bigguy


asdas2

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 ....
www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

TrueSatan

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://www.simplemachines.org/community/index.php?topic=34526.0

The following may also prove helpful:

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

Mirror of the last link:

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.

OZSlayer

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

Advertisement: