Author Topic: Custom board icons problem...  (Read 1230 times)

0 Members and 1 Guest are viewing this topic.

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Custom board icons problem...
« on: January 23, 2010, 03:17:19 PM »
2.0 RC2: http://custom.simplemachines.org/mods/index.php?action=parse


I've followed the instructions but the mod does not seem to be having the desired effect.


I've named my folder to 1, 1.0 and b1 but it's a no go either way.


Here's the rendered code:


:
<b><a href="http://somesite.com/forum/index.php?board=1.0" name="b1">Some board</a></b>
« Last Edit: January 24, 2010, 06:30:02 PM by bigguy »

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13217
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Custom board icons problem...
« Reply #1 on: January 23, 2010, 03:22:12 PM »
Everything should be in a folder named icons then you put the folders in it with the board id's SO it's like this:

/icons/1/on.png

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Re: Custom board icons problem...
« Reply #2 on: January 23, 2010, 04:04:35 PM »
Thanks for the response, bigguy (and the mod of course).


I've already created a folder in forum/Themes/default named 'icons'. I then created a folder named 1 and uploaded on.png, on2.png and off.png into it.


I've tried renaming the folder to 2, 3, 4 etc. but no luck. I've tested it on other browsers and my theme is a copy of Curve.


My forum/Themes/default/languages/Modifications.english.php is as follows:


:
<?php  // Version: 2.0 RC2; Modifications    // Important! Before editing these language files please read the text at the top of index.english.php.    <?php  // Version: 2.0 RC2; Modifications    // Important! Before editing these language files please read the text at the top of index.english.php.    $txt['noisen_footnote'] = 'Footnote';  $txt['no_icon'] = 'No icon set';  ?>
Here's an excerpt from my forum/Themes/default/MessageIndex.template.php:


:
<?php  // Version: 2.0 RC2; MessageIndex    function template_main()  {   global $context, $settings, $options, $scripturl, $modSettings, $txt;     echo '   <a id="top"></a>';     if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))   {   echo '  <div class="tborder" id="childboards">   <h3 class="catbg"><span class="left"></span>', $txt['parent_boards'], '</h3>   <div class="table_frame">   <table class="table_list">   <tbody class="content"> ';     foreach ($context['boards'] as $board)   {   echo '   <tr 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'), '">';    // Customizer Comment: Custom board icons mod.     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">   <b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';     // Customizer Comment: End custom board icons mod.     // Has it outstanding posts for approval?   if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))   echo '   <a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > $board['unapproved_posts'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';     echo '     <p>', $board['description'] , '</p>';     // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)   if (!empty($board['moderators']))   echo '   <p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';     // Show some basic information about the number of posts, etc.   echo '   </td>   <td class="stats windowbg">   <p>', $board['posts'], ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />   ', $board['is_redirect'] ? '' : $board['topics'] . ' ' . $txt['board_topics'], '   </p>   </td>   <td class="lastpost">';     /* The board's and children's 'last_post's have:   time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),   link, href, subject, start (where they should go for the first unread post.),   and member. (which has id, name, link, href, username in it.) */   if (!empty($board['last_post']['id']))   echo '   <p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />   ', $txt['in'], ' ', $board['last_post']['link'], '<br />   ', $txt['on'], ' ', $board['last_post']['time'],'   </p>';

Here's an excerpt from my forum/Themes/default/BoardIndex.template.php:


[/size]
:
if (!$context['user']['is_guest'] && !empty($category['show_unread']))  echo '  <a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';    echo '  ', $category['link'], '  </td>  </tr>  </tbody>  <tbody class="content"> ';    // Assuming the category hasn't been collapsed...  if (!$category['is_collapsed'])  /* Each board in each category's boards has:  new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),  children (see below.), link_children (easier to use.), children_new (are they new?),  topics (# of), posts (# of), link, href, and last_post. (see below.) */  foreach ($category['boards'] as $board)  echo '  <tr 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'), '">';    // Customizer Comment: Custom board icons mod: http://custom.simplemachines.org/mods/index.php?action=parse    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" />';








Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13217
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Custom board icons problem...
« Reply #3 on: January 23, 2010, 04:24:24 PM »
The first two lines look like they are commented out (//) remove those from in front of the lines and see what happens.

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Re: Custom board icons problem...
« Reply #4 on: January 23, 2010, 04:43:27 PM »
I've deleted this from Messageindex: // If the board or children is new, show an indicator.

I've deleted this from Messageindex and Boardindex:// Customizer Comment: Custom board icons mod.



There are not any // preceding the mod code. Despite this I don't notice any change. 









« Last Edit: January 23, 2010, 04:46:06 PM by rexusdiablos »

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Re: Custom board icons problem...
« Reply #5 on: January 23, 2010, 05:00:17 PM »
I've recopied and repasted the code from the mod instructions.


I don't know if this is significant but I've noticed a side effect where the board titles are no longer orange. They are now smaller in size and navy.

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13217
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Custom board icons problem...
« Reply #6 on: January 23, 2010, 05:30:38 PM »
What version of the mod are you using and are you using a custom theme. ???

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Re: Custom board icons problem...
« Reply #7 on: January 23, 2010, 05:42:09 PM »
Yes, I'm using a customized theme. It's a copy of curve that I'm customizing myself. I only have one other mode on it. It's the footnote mod.

This is the title:

cbi v0.5 (Custom Board Icons) - Installation Instructions for 2.0 RC2


This is what's stated in the readme file:

CBI 1.0 {Custom Board Icons v1.0}


I parsed the instructions for 2.0 RC2.

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Re: Custom board icons problem...
« Reply #8 on: January 23, 2010, 05:45:57 PM »

FYI, I used the manual install. I didn't spot the zips.

Now, I'm confused. In the download mod list here is the top or bottom of the list the most recent?


I went with cbi157 because version numbers always increment.

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Re: Custom board icons problem...
« Reply #9 on: January 23, 2010, 06:06:48 PM »
I'm going to reset the files what they were originally prior to modding and instead use the automatic install. I didn't realize that another means of installation existed other than manual install.  :ntme


I'll get back to you in an hour or so and let you know how it goes.

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Re: Custom board icons problem...
« Reply #10 on: January 24, 2010, 09:50:30 AM »
Howdy,


I've now installed the mod through the package manager.


When I mouseover the board icons a tooltip saying 'no icon set' appears.  ???


I have an 'icons' folder in forum/Themes/default with the three images as instructed.


Is caching or the png type (8) causing an issue?


Are you certain that the folder name should be '1'?


Any help would be greatly appreciated.

Offline rexusdiablos

  • New Member
  • *
  • Posts: 9
  • Karma: 0
  • Gender: Male
  • SMF Version: 2.0 RC2
Re: Custom board icons problem...
« Reply #11 on: January 24, 2010, 09:56:36 AM »
Never mind. I just copied the 'icons' folder into my custom theme folder and it now works.


I made the mistake of following the instructions to the letter rather than thinking outside the box.


Thanks for the great mod!