News:

Wondering if this will always be free?  See why free is better.

Main Menu

cbi v0.5 (Custom Board Icons)

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

Previous topic - Next topic

Arantor


Bruce the Shark

I never once had i thought that browsing the mod sites for packages would mean that most are incomparable for my theme.
It is disappointing as I really liked the theme that i purchased for what i got and paid for, but never did i think this would be the outcome.

Arantor

Sad reality, I'm afraid... most themes that diverge from the default theme to any significant degree will also break mod compatibility :(

Bruce the Shark

Unfortunately being new here you learn the hard way.
I wonder if SimplePortal is able to do this feature?
I might have to ask in that forum :-\

margarett

Search the modsite for "board icon", there is at leasta nother one from DreamPortal.
And there was another one from ADK but for that you need to check their site (which, on my computer, is not working ATM)

Dunno, maybe one of those is more "friendly" to your theme. Yet, if it's *that* different from default, they'll all probably fail :(
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Bigguy

Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.

luuuciano

Quote from: Kindred on October 25, 2013, 08:19:16 PM
Actually, it's not much of a change.   4 little changes in 4 lines of code.   I actually installed this mod and then made that change because I didn't want separate directories.
Quote from: Bigguy on October 26, 2013, 12:19:52 AM
Well, if it's workin out ok...cool. I'll PM you later about it. Just got done diggin a basement and am a bit tired right now, lol. :)

Hey Kindred, if you find some time do not forget to share those changes
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Kindred

#1527
Code (replace) Select

// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}



This will let you place all of your icons into the icons folder, with the filenames on###.png, on2_###.png, off_###.png, redirect_###.png -- and will fall back on the original theme's files if the custom ones are not present
Code (with) Select

// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'on_' . $board['id'] . '.png'))
$board_new_img = '/icons';
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '_' : '2_', ', $board['id'] , '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'redirect_' . $board['id'] . '.png'))
$board_redirect_img = '/icons';
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect_', $board['id'], '.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'off_' . $board['id'] . '.png'))
$board_nonew_img = '/icons';
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off_', $board['id'], '.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}


or this version...   which requires you to put your custom files AND the fallback files into the icons direcory
Code (with) Select

// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'on_' . $board['id'] . '.png'))
$board_new_img = 'on_' . $board['id'] . '.png';
$board_new_img2 = 'on2_' . $board['id'] . '.png';

else
$board_new_img = 'on.png';
$board_new_img2 = 'on2.png';
echo '
<img src="', $settings['images_url'], '/icons/', $context['theme_variant_url'], $board['new'] ? $board_new_img : $board_new_img2, '" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'redirect_' . $board['id'] . '.png'))
$board_redirect_img = 'redirect_' . $board['id'] . '.png';
else
$board_redirect_img = 'redirect.png';
echo '
<img src="', $settings['images_url'], '/icons/', $context['theme_variant_url'], $board_redirect_img, '" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'off_' . $board['id'] . '.png'))
$board_nonew_img = 'off_' . $board['id'] . '.png';
else
$board_nonew_img = 'off.png';
echo '
<img src="', $settings['images_url'], '/icons/', $context['theme_variant_url'], $board_nonew_img, '" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}



You then need to do a similar change to the MessageIndex.template.php updates
Слaва
Украинi

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

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

Bruce the Shark

Quote from: Bigguy on December 19, 2014, 06:10:42 AM
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.

I found it!

but it doesn't work
sorry Bigguy
wrong mod for this topic

Kindred

yeah... that is not this mod....   this mod has no interface needed.
Слaва
Украинi

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

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

Burke ♞ Knight

Quote from: Bruce the Shark on December 20, 2014, 02:49:43 AM
Quote from: Bigguy on December 19, 2014, 06:10:42 AM
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.

I found it!

but it doesn't work
sorry Bigguy
wrong mod for this topic

This is the support topic you need:

http://www.simplemachines.org/community/index.php?topic=496396.0

Bruce the Shark

#1531
Quote from: ♞ Burke Knight ♞ on December 20, 2014, 07:51:18 AM
Quote from: Bruce the Shark on December 20, 2014, 02:49:43 AM
Quote from: Bigguy on December 19, 2014, 06:10:42 AM
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.

I found it!

but it doesn't work
sorry Bigguy
wrong mod for this topic

This is the support topic you need:

http://www.simplemachines.org/community/index.php?topic=496396.0

Thanks for that. I had started to search for this mod in Modification and Packages...This Topic "Board Icons" but i was only getting Custom Board Icons showing up.
Strange still so difficult to find.
I am reading this board right now. So interesting as it appears other are having similar issues as me with not showing the icons. The Author says regardless of the theme it will work.
So there is hope :laugh:

Bruce the Shark

Quote from: Bigguy on December 19, 2014, 06:10:42 AM
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.

Still your mod looks good.
I would like to give it a go and see how far i get.

Bruce the Shark

Just a quick question here as this is good practice for me, i have edited the boardindex.template and the MessageIndex.template for my site.
This might sound like a silly question to ask but why are there two fiIe with almost the very same name within my theme.
I have only edited one.
eg
messageindex.template.php
messageindex.template.php~

boardindex.template.php
boardindex.template.php~

note fyi: i have edited the files without the end extension ( ~ )

margarett

The tilde files are backups created by PackMan when it edits a file ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Bruce the Shark

#1535
ok thanks i just read up on this tilde files.
Still i don't think there has been any significant change, unless i am not seeing it in my admin panel.

Kindred

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

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

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

Bigguy

Read the readme for the mod. It should explain everything you need to know.  In short though if you make an icons folder under the theme directory that you are using, then in there one folder for each board you have, and then put the icons in there. SO say you are using the default theme and you have a board with the id of 1 This is what it would look like:

/Themes/default/images/icons/1/on.png
/Themes/default/images/icons/1/off.png
/Themes/default/images/icons/1/on2.png

Hope that helps.

Burke ♞ Knight

That can be an issue, if have a lot of boards.
Having settings in the modify boards would be a lot easier. ;)

Kindred

not really...   putting a file in the icons directory seems simple enough to me...
(see my edits above)

also much simple to create a full set and upload them than to have to modify each and every board --- ESPECIALLY if you have a ton of boards...
Слaва
Украинi

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

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

Advertisement: