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

Kindred

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..)
Сл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."

58tbird

Great mod!

Where can I get some icons to use in place of the SMF icons to go with this mod?

rayosx

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">

Kindred

></h4>';      else174
you are missing a carriage return after the ; (before the else)
Сл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."

guardog

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!

apTyaH

Quote from: 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?
maybe try to convert in png, when i put gif images it not worked too.

guardog

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

Bigguy

The latest version of this mod ONLY supports .png I'm sure it says so on the downloads page. :)

kingkingston

This mod does not seem to work on certain themes like Extreme6

Kindred

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
Сл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."

Newsted

Quote from: 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?

Same here, any help?

Bigguy

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

Yahmez

#532
Quote from: 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.

The issue can be solved with these edits:

BoardIndex.template.php
Find:
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:

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:

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:

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>';




Blah blah

I need help adding this to my custom theme..cant get it to work

Bigguy

@ Guardog: Did you try clearing your cache and pressing ctrl + f5 ???

glennk

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

Kindred

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.
Сл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."

Blah blah

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

Yahmez

Quote from: 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

Quote from: 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

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

Yahmez

Quote from: Bigguy on September 22, 2009, 08:18:24 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

Advertisement: