News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

cbi v0.5 (Custom Board Icons)

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

Previous topic - Next topic

rokket

I'm an idiot talking nonsense, but it seems to me that the problem is pointing to the child boards with the new folder structure. The "as is" install says off/on are in "images", but the mod requires them to be in "images/icons/[boards by ID number]", and I don't know enough to tell the boardindex file to look there. ???

hcfwesker

Quote from: rokket on January 01, 2012, 07:37:42 PMthe mod requires them to be in "images/icons/[boards by ID number]"

actually, the icons folder isn't suppose to be in your images folder.  Icons folder needs to be in the root folder of each theme, where index.template.php and boardindex.template.php are located.

Draffi

Have somebody a solution for make this mod work with "tidy child board"-mod?

Radgack

Quote from: Bigguy on December 23, 2011, 08:42:33 PM
Use the advanced option in the package manager to revert back to 2.0 and it will work. I will update the mod soon. :)

Sorry, im very new to the SMF so i cant find the advanced option in the package manager, where i can find it?

thanks!

Draffi

@bigguy:

If you update this mod, do you integrate support for the tidy-child-board-mod?

hcfwesker

Quote from: Radgack on January 12, 2012, 05:04:45 PMSorry, im very new to the SMF so i cant find the advanced option in the package manager, where i can find it?

On the Packages page look at the bottom right hand side , under the package listing, you'll see a link text 'Advanced'

hcfwesker

Quote from: Draffi on January 07, 2012, 01:32:37 PM
Have somebody a solution for make this mod work with "tidy child board"-mod?


What seems to be the problem, error on installation, or did you make the manual edits and they didn't work?

Seems like this would work ( these edits take place directly below the tidy child board edit in the file.

Themes/default/BoardIndex.template.php  ( and custom themes)

Find
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<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'], '/', $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'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

echo '
</a>
</td>



Replace with
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<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'])
{
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'], '" />';
}
echo '
</a>
</td>

Draffi

Ohhh...thank you so much that you would help me!

looks like that i forgot to mention that i use SMF2 RC5.

Anyway: I installed booth mod's with the package-manager without errors.

i attach my boardindex.template.php

please tell me what i need to change in this case.

thank you so much, Sir!

hcfwesker

Everything looks like it should be, actually.  My guess is you installed cbi before tidy childs MOD, which would explain how they installed with one another.

Here's the MOST important question ...

Did you follow these instructions on the MOD page.

QuoteIn 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.

Did you create an icons folder in the root of each Themes folder?




Draffi

well, i was doing in the default theme, not in each folder (the other one is "core" in my case. i have no more themes), directly in the root-directory, where you can find the boardindex.template.php.

And i was installing booth mods in different order in my xampp-area, because i was thinking the order must be important, too...


hcfwesker

Have you tried removing the line

if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.png" width="12" height="12" alt=""> ';


If that doesn'r work, try removing all of this

if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.png" width="12" height="12" alt=""> ';

if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';

if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) .

Draffi

sure, i was doing. With booth methods, at the end i have no icons...

(in the child-boards)

hcfwesker

can you register me a test account, and PM me log in info and link to your site.  Unless guests can access the forum, then log in wont be necessary, just the link

Draffi

i will do, tomorrow, if this is ok for you. like i was telling you, i installed this mods in my xampp-test-area...

for the moment, i need to sleep a bit.

i contact you with PM, okay?

(and i give you FTP-access, too)...

hcfwesker



alpha25

helpme please, smf 2.0.2

my bordeaarindex.template.php of Fundamentalsmf20 theme

echo '
<tr id="board_', $board['id'], '" class="'.$win.'">
<td class="icon '.$win.'"', !empty($board['children']) ? ' rowspan="2"' : '', '>

<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'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.gif" 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_url'], 'redirect.gif" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

echo '
</a>
</td>



thanks

hcfwesker


rootuid

Anyone got this working on 2.0.2 ?

Installations actions for "cbi 1.0"
The package you are trying to download or install is either corrupt or not compatible with this version of

Advertisement: