News:

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

Main Menu

cbi v0.5 (Custom Board Icons)

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

Previous topic - Next topic

ValeriusCdlP

sorry for my english.


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



Dilbermc Original BoardIndex.template.php
// 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
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
// 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
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
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
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?

Bigguy

Once you change the code if there are no new icons then this will revert back to using the original SMF icons.

ValeriusCdlP

Sorry but that's not work, i repeat:


If I change this on dilbermc theme

Dilbermc Original BoardIndex.template.php
// 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
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
// 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
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:




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


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



Your mod BoardIndex.emplate.php
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
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?

Bigguy

This has been installed on dilber before with no problems. Are you sure you made the edits right.

Galjoen

#204
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

Bigguy

Your code looks fine and there are no errors in it. Did you press ctrl + f5 after you put the icons up.

Galjoen

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.

Bigguy

#207
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. :)

Galjoen

here is a copy from the server, as you can see I have tried to put icons in themes and default, just in case

Bigguy

What are the permissions set at for those folders. ??? That shouldn't make a difference really but figured I would ask.

Galjoen


Bigguy

When I go here it tells me it doesn't exist. Are the files owned by you:

http://capetownfishing.co.za/Themes/default/icons

Galjoen

these are the files in the icon dir:

Bigguy

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.

Galjoen

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

hitman94

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?

Bigguy

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.

devinrajaram1993

my theme on my site only has an index.template what do i do to make it work in that one

Bigguy

This mod only touches the Boardindex and the messageindex.template.php

devinrajaram1993

so i cant have it?? i heard that my default theme can implement it to work is that true

Advertisement: