Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=511)
CBI ModificationThis modification gives you the ability to change the default board icons to ones you choose. All that must be done is; install this package through the package manager, make an icons folder in the theme directory that you are using. One more folder inside that for each board and place your icons there. Keep in mind that this modification only installs to the default theme, if you are using a custom theme with "BoardIndex.template.php" and "MessageIndex.template.php" files, they will have to be modified manually. Those are the only two files this package modifies. Follow the file structure listed below.
New Changes:
-Updated for latest SMF ver.
-License change
-Updated for 2.0.6 - 9
-Updated for 2.0.5
-Readme Updated
-license added
UP AND COMING:- License change complete
UP-TO-DATE VERSIONS:cbi 195 - version update - Installs with 2.0.15
cbi 181 - version update
cbi 180 - License change
cbi 179 - Installs with the latest version
cbi 178 - Installs with 2.0.5
cbi 176 - Installs with 2.0.3
cbi 175 - Installs with SMF 2.0.2
cbi 173 - Installs with SMF 2.0.1
cbi 172 - Installs with SMF 2.0 Gold
PLEASE READ THE READMEcbi 11- installs with SMF 1.1.12, .13
NOTE:There are instructions in the readme attached with this mod. If the icons fail for some reason or you uninstall this mod, the board icons will default back to the original icons.
For quick reference:
1.7.3-1.8.1 README INSTRUCTIONSQuoteIn 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.
Structure:
forum/Themes/default/images/icons
forum/Themes/default/images/icons/board_id/on.png
forum/Themes/default/images/icons/board_id/on2.png
forum/Themes/default/images/icons/board_id/off.png
For redirect boards use this:
forum/Themes/default/images/icons/board_id/redirect.png
(Where "board_id" is the id number of the board you want the icon to show up for. So for example for your first board on your forum it would look like this:
forum/Themes/default/images/icons/1/on.png)
1.6.3 README INSTRUCTIONS: (These vary slightly per mod but nothing major)
QuoteCreate icons folder in to your /Themes/default/.
In the icons folder 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.
Structure:
forum/Themes/default/icons
forum/Themes/default/icons/board_id/on.png
forum/Themes/default/icons/board_id/on2.png
forum/Themes/default/icons/board_id/off.gif
(Where "board_id" is the id number of the board you want the icon to show up for. So for example for your first board on your forum it would look like this:
forum/Themes/default/icons/1/on.png)
License:Feel free to distribute and or modify this package. The "Thanks go to" section of this readme must not be changed (only added to) and must stay with the package. This license only applies to the latest release cbi 1.8.0 and above.
This mod is licensed under: https://www.mozilla.org/en-US/MPL/1.1/ (https://www.mozilla.org/en-US/MPL/1.1/)
I am finding that this doesnt work on boards on "Child Boards". When I click on the Parent board and get the listing of Child boards, their icons are the default ones.
Any suggestions?
In the next version of cbi there will be support for child boards. I was going to put it in this one but I did not get it ready in time. For now though here is a small solution to the problem. It's almost like this mod but a bit different:
wow, I can't wait for the updated one with the childboards icon. Very nice mod...
Thank you. I'm not sure when it will be out but keep an eye out for it.
it would be better if we set the icon in the admin panel, while adding or editing a board...
Now available on the mod site.
Well for some reason I cannot upload to the mods section of simplemachines.org so I will upload it here. We have released a new version of cbi. (Custom Board Icons) This version supports child boards and is compatible with SMF 1.1 Final. Please read the readme.txt upon install for instructions and credits, thanks and I hope you all like it.
I have found problems with this mod and have removed it from download. It will be back. Sorry for any inconvenience. Please re-install the previous mod which is also SMF 1.1 Final compliant.
The new version of this mod is back up for download.
My web is http://www.acuariofiliacanaria.com/foro/index.php
For example por board 11
The Structure is:
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/board_11/on.gif
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/board_11/on2.gif
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/board_11/off.gif
or
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/11/on.gif
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/11/on2.gif
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/11/off.gif
Because dont run
Were it says "board_11" only put the number (id) of the board so it would be:
http://www.acuariofiliacanaria.com/foro/Themes/default/icons/11/on.gif
Perhaps I do something wrong because I don't see any change. I have installed the cbi 1.0
For example if the first board is this:
h*tp://www.justatestforum.net/test/index.php?board=1.0
what is the right path and file names of icons?
I don't know if it's important, but my icons have size about 50x50 and gif format.
Thanks in andvance for any help :)
If this is your forum:
h*tp://www.justatestforum.net/test/index.php?board=1.0
then your image must go here:
h*tp://www.justatestforum.net/test/Themes/default/icons/1/on.gif
This mod only installs on the default theme so if you are using a custom theme you will have te manual edit.
Thanks for help. It worked :)
I have just noticed this:
The default small icons below the board (I mean "New messages" and "No new message") are remaining and I think is not good looking if you have changed the default big icons.
Can you tell me code for custom theme? I will be thankful, if you provide some cool icons of mobiles/music! :P
Thank you :D
will this work on themes other than default?
Yes but you will have to manual add the edits
thanks, i think this is a nice one
Depending on what version of SMF you have there is a newer version than 0.5 But they both work real good. :)
have you tried doin this dilbermc?
Personally no I haven't but there should be no problem with it working in that theme.
sorry to bother you . . . but icons i have do not have the on2 and off.
do you have some places or sites to get some? :)
Quote from: Bigguy on December 18, 2006, 05:44:37 AM
If this is your forum:
h*tp://www.justatestforum.net/test/index.php?board=1.0
then your image must go here:
h*tp://www.justatestforum.net/test/Themes/default/icons/1/on.gif
This mod only installs on the default theme so if you are using a custom theme you will have te manual edit.
I am using SlickPro_Graphite theme, installed your mod and it doesnt change anything on my site. May I know what file should I manually mod in the SlickPro_Graphite theme folder? I have already added the icons/1/on.gif into the SlickPro_Graphite theme folder.
Thanks for this great mod!
@ RvG: I use google image to find mine
@ khoking: This should work for you
For cbi v1, in your BoardIndex.template.php find:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And replace with:
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" />';
}
In MessageIndex.template.php find:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And replace with:
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" />';
}
Dear Bigguy,
I couldn't find the codes in my template files. Can you check for me? Sorry...I dont know much about php... :(
edited: cleared up codes to make the thread looks cleaner to browse.
From the MessageIndex.template.php file that you posted, this is the code you want:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
The other file you posted is the wrong one. You want to edit the BoardIndex.template.php file.
Many thanks Bigguy! It works perfectly now in my forum. Thank you very much! :D
You are very welcome. I am glad you got it working. ;)
Hey Bigguy,
Sent you the url of my demo site for you to have a look. Installed the cb 1.0 several times on my fresh installed 1.1.1 forum. I just won't work on my theme or on the default either...
Ideas?
Did you read the instructions carefully.
Try putting the "images" folder in the "Theme" directory instead of in the theme folder that you are using.
Quote from: InnerFlash on January 21, 2007, 05:48:57 PM
Installed the cb 1.0 several times
Sorry, it's one o'clock and my brain is melting... Man, I really tried everything possible here... I'll get into the coding later tomorrow (today :P). I just got so frustrated that I spent the whole day preparing icons for 77 different boards and didn't get it to work.
Cheers and thanks for the feedback, will come back soon..
I can't get this thing to work.
The url of the current icons is this: http://www.zeriyt.com/forumi/Themes/rt_smf_versatility2_sienna/images/off.gif
If I put a icon with a name like off_372 in /images/ (I tried with /icons/ too) and nothing happens.
Here is the code of the board index template:
<?php
// Version: 1.1 RC2; BoardIndex
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
//Display ads on the board index
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
// Show some statistics next to the link tree if SP1 info is off.
echo '
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom">', theme_linktree(), '</td>
<td align="right">';
if (!$settings['show_sp1_info'])
echo '
', $txt[19], ': ', $context['common_stats']['total_members'], ' • ', $txt[95], ': ', $context['common_stats']['total_posts'], '
• ', $txt[64], ': ', $context['common_stats']['total_topics'], '
', ($settings['show_latest_member'] ? '<br />' . $txt[201] . ' <b>' . $context['common_stats']['latest_member']['link'] . '</b>' . $txt[581] : '');
echo '
</td>
</tr>
</table>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="4" style="margin-bottom:
2ex;">
<tr>
<td class="catbg"> ', $txt[102], '</td>
</tr>
<tr>
<td valign="middle" align="center" height="60">';
// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>', $context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript">
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";
var foreColor, backEl, backColor;
if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor =
document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;
backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'),
null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" &&
typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;
backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}
// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
</script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>';
}
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge),
and boards. (see below.) */
$first = true;
foreach ($context['categories'] as $category)
{
echo '
<div class="tborder" style="margin-top: ' , $first ? '0;' : '1ex;' , '' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg', $category['new'] ? '2' : '', '" style="padding: 5px 5px 5px 10px;">';
$first = false;
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="', $category['collapse_href'], '" class="collapse_expand">', $category['collapse_image'], '</a>';
echo '
', $category['link'], '
</div>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">';
/* 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>
<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl,
'?action=unread;board=', $board['id'], '.0">';
// If the board is new, show a strong indicator.
// Modified by cbi (Custom Board Icons) v1 mod.
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" />';
}
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
// Show some basic information about the number of posts, etc.
echo '
</td>
</td>
<td class="windowbg2" valign="middle" width="35%">
<span class="smalltext">';
/* 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 '
<b>', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[22], '</b> ', $txt[525], ' ', $board['last_post']['member']['link'] , '<br />
', $txt[30], ' ', $board['last_post']['time'];
echo '
</span>
</td>
</tr>';
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics']
. ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}
echo '
<tr>
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
<span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(' | ', $children), '</span>
</td>
</tr>';
}
}
echo '
</table>';
}
echo '
</div>';
}
if ($context['user']['is_logged'])
{
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td align="', !$context['right_to_left'] ? 'left' : 'right', '" class="smalltext">
<img src="' . $settings['images_url'] . '/new_some.gif" alt="" align="absmiddle" /> ', $txt[333], '
<img src="' . $settings['images_url'] . '/new_none.gif" alt="" align="absmiddle" style="margin-left: 4ex;" /> ', $txt[334], '
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '">';
// Mark read button.
if ($settings['show_mark_read'])
echo '
<a href="', $scripturl, '?action=markasread;sa=all;sesc=' . $context['session_id'] . '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/markread.gif" alt="' . $txt[452] . '" border="0" />' : $txt[452]), '</a>';
echo '
</td>
</tr>
</table>';
}
// Here's where the "Info Center" starts...
echo '<br />
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<div class="catbg" style="padding: 6px; vertical-align: middle; ">
<a href="#" onclick="shrinkHeaderIC(!current_header_ic); return false;"><img id="upshrink_ic" src="', $settings['images_url'], '/',
empty($options['collapse_header_ic']) ? 'collapse.gif' : 'expand.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin-right: 2ex;" align="left" valign="middle" /></a>
', $txt[685], '
</div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[214], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" /></a>
</td>
<td class="windowbg2">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')<br
/>
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="100%" border="0">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="middletext" valign="top" nowrap="nowrap"><b>', $post['link'], '</b> ', $txt[525], ' ',
$post['poster']['link'], ' (', $post['board']['link'], ')</td>
<td class="middletext" align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=calendar"><img src="', $settings['images_url'], '/icons/calendar.gif" alt="', $txt['calendar24'], '"
/></a>
</td>
<td class="windowbg2" width="100%">
<span class="smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span style="color: #', $modSettings['cal_holidaycolor'], ';">', $txt['calendar5'], ' ', implode(', ',
$context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span style="color: #', $modSettings['cal_bdaycolor'], ';">', $context['calendar_only_today'] ? $txt['calendar3'] :
$txt['calendar3b'], '</span> ';
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<b>' : '', $member['name'],
$member['is_today'] ? '</b>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span style="color: #', $modSettings['cal_eventcolor'], ';">', $context['calendar_only_today'] ? $txt['calendar4'] :
$txt['calendar4b'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> ' : '', $event['href'] == '' ? '' :
'<a href="' . $event['href'] . '">', $event['is_today'] ? '<b>' . $event['title'] . '</b>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '
(<a href="', $scripturl, '?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">',
$txt['calendar_how_edit'], '</a>)';
}
echo '
</span>
</td>
</tr>';
}
// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[645], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=stats"><img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt[645], '" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ',
$txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
<br /> ' . $txt[659] . ': <b>"' . $context['latest_post']['link'] . '"</b> ( ' . $context['latest_post']['time'] . ' )<br />
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>
</td>
</tr>';
}
// "Users online" - in order of activity.
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td rowspan="2" class="windowbg" width="20" valign="middle" align="center">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="', $settings['images_url'], '/icons/online.gif" alt="',
$txt[158], '" />', $context['show_who'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">';
echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ?
$txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';
// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];
// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden'];
echo ')';
}
echo $context['show_who'] ? '</a>' : '', '
<div class="smalltext">';
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);
echo '
<br />
', $context['show_stats'] && !$settings['show_sp1_info'] ? '<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] .
'</a>' : '', '
</div>
</td>
</tr>
<tr>
<td class="windowbg2" width="100%">
<span class="middletext">
', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
// If they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="',
$txt[159], '" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], '
<a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login"><img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br />
<input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br />
<input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br />
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="',
$modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br />
<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked"
class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}
echo '
</table>
</div>
</div>';
}
?>
Are you using version 0.5 or 1.0 With 1.0 you would have to make a folder like this:
http://www.zeriyt.com/forumi/Themes/rt_smf_versatility2_sienna/icons/board id/off.gif
Board id just being the number of the board you want the icon or gif image to show for. So it would be like this:
http://www.zeriyt.com/forumi/Themes/rt_smf_versatility2_sienna/icons/1/off.gif
This /1/ means folder! Do I have to create a new folder for each board that I want to add a custom icon?
Yes you do. that 1 would be your first board.
Ok I get it now. Thank you!
Your welcome. :)
When does on2.gif get used?
I think it would be a better mod to leave the original icons for displaying the new posts in place and have another table cell which displayed beside this with the board icon. Also as previously mentioned the "No new Posts" and "New Posts" displayed below the board become irrelevent after applying this mod. .02 nothing more
in cbi-1 the child boards get there own icons. You can change the gif images that come with SMF for the no new posts and New posts. Open up the images folder of the theme you use and search for new_none and new_some.gif change those two to what you want.
Yes I understood I can swap in my own images. That's not what I was talking about.
Can you explain a bit better so I can understand. (I'm a little slow tonight, lol)
I thought it would be better to add a table cell in between the on off gifs and the board description.
In my attached image where the red dots are. I like the on off gif files like they are. Forgive me if you can do this. I did actually install the mod and play around with it but didn't seem to find this functionality.
Well I can come close to that. If you want an image right next to the board description then upload an image to your root of smf and put this in the board description while making or modifying a board. Just make sure the link points to your image:
<img src="http://www.yoursite.com/forum/yourgif.gif">
This will put an image to the right of your red circles.
I installed manually and it was really easy. Just to replaces in two files and this works like a charm
Now to spend the next week making some subtle graphics :D
Brilliant work fella :)
I am glad you like it. :)
Is there any chance of being able to put icons/images beside the subject headings?? ie. Instead of having the images for the board is there a way of having beside the topic heading. Hope that makes sense!!
Thanks for this great mod btw :D
I believe...and I could be wrong...you put html linking to the image you want into the title when you create it. ie...<img src etc etc
Is there a mod like this but you can choose a different catbg.jpg (which is obviously pre made and styled) for each different category by selecting it as a choice in each category part of admin?
No there is not. You can change those manually though, hte catbg images I mean.
Quote from: Bigguy on February 24, 2007, 01:48:49 PM
You can change those manually though, the catbg images I mean.
Yeh I've already done that but it's one for everything. It would be nice to have different ones for every category I needed to change. But I'm not sure if that's even possible :) I'd do it manually if it was.
It would be a good compliment mod for this one ;) This icon mod rocks :)
It is possible but might take a bit of work. As for adding it to this mod....well, I have plans for the next upgrade already so maybe in a release after that. :) Nice idea though.
Does this work on 1.1.2 ?
Yup :D
And it's very easy to manually install.
It something that sound be in the original SMF IMHO :D
Love it.
Bigguy is it possible to make this Mod using CSS?
It´s a great Mod, but my server is very busy lately by a great ammount of users and I cant get too much Mods enabled with php functions, in TPortal or templates (Board.Index, Message.Index, Display.template, etc)
No I don't think it is. It's not hard to install through the package manager or manually for that matter.
My problem isn´t installing it, the version I´ve got it´s the older version from 'Tips and tricks' board yet (they both do the same things)... the "file existence checking" itself for icon to each board it loads my server a lot.
Sorry for my bad english, and thanks
Claudio
Hmm, I haven't noiced any server load on my site at all. Try using this beside the board name, it does work:
<img src="http://www.yoursite.com/forum/yourgif.gif">
Hello, does this work with 1.1.2 yet? Installed, but is not showing up. Thank you.
It works perfectly on 1.1.2 :D
Which version are you using? the older or the newer one?
I tried installing it, everything went without a hitch, but the pictures didn't show.
So my files look like..
forum/Themes/mytheme/icons/5/on.gif
forum/Themes/mytheme/icons/5/on2.gif
forum/Themes/mytheme/icons/5/off.gif
Yet, it didn't show up.
Did you replace the code in your theme files?
I did them manually (very easy) in Babylon as well as the default:
BoardIndex.template.php
MessageIndex.template.php
Two simple chunks of replacement code :)
Quote from: symon on April 17, 2007, 06:59:35 AM
Did you replace the code in your theme files?
I did them manually (very easy) in Babylon as well as the default:
BoardIndex.template.php
MessageIndex.template.php
Two simple chunks of replacement code :)
Which code do I replace in there?
In cbi 1 in your BoardIndex.template.php file You would find this:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And replace it with this:
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" />';
}
Then in the MessageIndex.template.php file you would find this:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And replace it with this:
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" />';
}
Save both files and upload them to your themes folder and you should be good to go.
Quote from: Bigguy on April 18, 2007, 12:01:42 AM
In cbi 1 in your BoardIndex.template.php file You would find this:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And replace it with this:
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" />';
}
Then in the MessageIndex.template.php file you would find this:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And replace it with this:
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" />';
}
Save both files and upload them to your themes folder and you should be good to go.
Thankyou. I finally got it working.
Glad to hear that. :)
I can't get this to work on SMF 1.1.2/TP v0.9.8 using the Dilber Multicolor theme.
Can you help? I've got the icon folders already done (it worked fine on Default theme).
Have you done all the necessary edits to the BoardIndex.template.php and the MessageIndex.template.php of that theme. ???
The edits for these two files are just above you:
http://www.simplemachines.org/community/index.php?topic=126263.msg1058102#msg1058102
Quote from: Bigguy on April 20, 2007, 12:45:32 AM
Have you done all the necessary edits to the BoardIndex.template.php and the MessageIndex.template.php of that theme. ???
The edits for these two files are just above you:
http://www.simplemachines.org/community/index.php?topic=126263.msg1058102#msg1058102
Dude! I have no clue how I missed that, but you kick ass! :D
Thank very much...Bigguy for cool mod.
What is wrong in this error, please help me. thx
Parse error: syntax error, unexpected T_ELSEIF in .../Themes/dilbermc/MessageIndex.template.php on line 49
40: <td class="windowbg" width="51" align="center" valign="middle"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
41:
42: // if ($board['new']) {
43: if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.gif'))
44: $board_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.gif';
45: else
46: $board_new_img=$settings['images_url']. '/on.gif';
47: 48: echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
49: } elseif ($board['children_new']) {
50: if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.gif'))
51: $childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.gif';
52: else
53: $childboard_new_img=$settings['images_url']. '/on2.gif';
does this only work with the default theme... if so can someone help me figure out what I got to do to get it working with my site
love the mod... don't see why one would use it on the main forum (guess you could use similar size icons). I use bigger images on my child boards, to differentiate the sections from the site... makes it look less forumy =P
Would anyone be interested in setting this up for me on my boards?
What theme are you using and what version of the mod are you trying to install.
Cool, I will try to install these Custom Board Icons in my forum as well
I have this cool mod on my forum at:
http://pentaxworld.com/forum/index.php?action=forum
Thanks BigGuy! O0
No problem, we aim to please. ;)
Its not working on my "child doards" :)
its suppose to be on2.gif, off2.gif, on3.gif, off3.gif, and so on right?
No. You leave the images the original names and make folders for each board and put the images in there:
Themes/default/images/icons/1/on.gif etc
1 is the board id of the board you want the image to show for then you create or get your images you want to use and name them on.gif....off.gif.....on2.gif and put them in that folder "1" and they should appear for that board. I guess before I wrote all that out I should ask what version you are using, lol. :)
could you help me please? it won't show the additional BI's.
i've got smf version 1.1.2 and theme Bleen, althoug i placed it in the the theme directory default.
i've already tried to replace the code manualy like said before.
I've added the 2 files.
hope you can help me
thanx in advance
Which version of cbi are you using. ???
i used CBI 1
Bigguy;
Would it be possible to adapt it so it keeps the post icons and has images at the side. I have a similar mod for a ipb powered community. www.poetryartonline.com/forum/index.php
Awesome idea!
~Kerrang!
thx and sorry for the trouble Bigguy.
tried CBI V0.5 and that did work so its solved for me ;)
thx for the mod :D
You could use this in the board name of the forum:
<img src="http://www.yoursite.com/forum/yourgif.gif">
Change it to link to an image you have and you will have put an image next to the board name
Quote from: Bigguy on June 04, 2007, 12:35:29 PM
You could use this in the board name of the forum:
<img src="http://www.yoursite.com/forum/yourgif.gif">
Change it to link to an image you have and you will have put an image next to the board name
Thanks buddy..
I wasn't aware this was possible so cheers!
~Kerrang!
I tried doing over 10 but then it stopped at 11 how come?
I am not sure I know what you mean, can you explain more please.
Quote from: Dud on June 11, 2007, 11:46:03 PM
I tried doing over 10 but then it stopped at 11 how come?
Well I made 15 plus boards....The First 10 boards worked with the CBI but I tried on the 11th and it didnt work...
There is no reason if it worked on the other 10 that it won't work on the 11th or higher. Are you sure you are doing it all the way you did the other boards.
Yes.
What version of cbi are you using. ???
hi Bigguy,
I've just installed cbi1 on my smf-1.1.2 . Applied mod, and created the folder (~/themes_dir/images/icons/1/on.gif etc). But I still can't get the images displayed. I've attached the files which I editted manually. I think I did it correctly, but just in case.
Try putting them here:
/Themes/mytheme/icons/5/on.gif
Quote from: Bigguy on June 16, 2007, 03:59:22 PM
Try putting them here:
/Themes/mytheme/icons/5/on.gif
Yeah, it worked. So do I need to remove the folders created as instructed in the 'Read Me' document?
lmao, I can't even remember what my own readme says, lol. What folders do you mean.
Quote from: Bigguy on June 17, 2007, 11:21:32 AM
lmao, I can't even remember what my own readme says, lol. What folders do you mean.
The readme says, created themes/mytheme/images/icons/board_id/picture.gif
Ok, I will change that as soon as I can, thank you. :)
No worries. Indeed, thanks for this nice mod and helping me to solve my problem.
hey great mod, any idea where i can get good images for my boards?
Lots of free images on the net mate. Just check out google. download them and shrink them to size using image enhancement software.
Easy as ABC
Yep they are all over the place. Here is one search. I use google image to search for icons:
http://images.google.ca/images?svnum=10&um=1&hl=en&q=free+icons+.png&btnG=Search+Images
Quote from: glennk on June 20, 2007, 11:27:48 AM
Lots of free images on the net mate. Just check out google. download them and shrink them to size using image enhancement software.
Easy as ABC
Quote from: glennk on June 20, 2007, 11:27:48 AM
Lots of free images on the net mate. Just check out google. download them and shrink them to size using image enhancement software.
Easy as ABC
Yeah I know, but I've never found any professional looking ones just from Google.
I had some that were free and then I crashed my hard drive and lost them. Now I can't find them again, lol. They are out there, somewhere.
Hello
great mod Bigguy. Im manually editing Board.Template.php but when i reload the page i see that:
Parse error: syntax error, unexpected $end in
.../Themes/Forosdeportivos/BoardIndex.template.php on line 483
What im doing wrong? Or perhaps is that my icons structure in theme are wrong?
Best regards
SMF: 1.1.3
Theme: Editing my own theme - Based on Default Theme
EDIT:
and another question. I have a forum with a large number of boards. 30 or 40 so its impossible to me make an image of each board. What happens if i want some board doesn't have a new image? Its neccessary make a folder to each board like /theme/icons/1,/theme/icons/2,/theme/icons/3,/theme/icons/4, and etc ?
Thanks :)
Ups, ok. The problem was a '{' in a middle of code. Im going to make images to test the mod :)
EDIT:
Well,definitively don't work. I believe that i followed all steps correctly but now im not sure.
Any help will be appreciated.
EDIT2:
After of reading all thread i read the solution. The images are finally show ;)
Does this have support for "New Posts", "No New Posts", and "New Posts(Sub-Forum)"?
When you make the images on.gif, off.gif and on2.gif these will be the New posts and no new posts images.
@ ortiz: glad you got it. ;)
I got a problem with this, I was going to try to apply a different theme than default one. But i don't even have those files in my theme (BoardIndex.template.php, MessageIndex.template.php).
Can someone tell me what i can to do get this mod work?
I'm using 1.1.2, camo theme.
If those files are not in your custom theme folder than that theme will use the default template files, so if you have it installed now then you should be good to go. Just move your images to your custom theme folder.
I am using the defualt theme and the cbi 1
I have uploaded the on.gif and etc images at
theme/default/images/icons/5/
Nothing shows up???
the old Default icons are not there anymore plus i can't get the new ones to work. gosh??
Nothing is done to the default icons. If the new custom ones aren't there then the default are supposed to show. Can you uninstall the mod and see what happens.
How about a CHMOD check over of the directories and files? Go to:
ACP>Packages>Options>
Set the "Installation Options" according to your hosting then set "Cleanup Permissions" for "All files are writeable" then "Change Permissions" check via ftp to see that it has worked and that all the files and directories of your forum are CHMOD 775 or 777.
You should make all files writeable by this method before installing or uninstalling any mod or theme though you can make the permissions "tighter" using the same method after these mod/theme changes.
thanks for the update!
Quote from: Bigguy on July 18, 2007, 11:53:44 AM
Nothing is done to the default icons. If the new custom ones aren't there then the default are supposed to show. Can you uninstall the mod and see what happens.
Yes i have unstalled the MOD, now the default icons are there.
but still it will not show up at all and i have followed all steps.
What version did you use. ???
i am using cbi-1 and after hours of trying i still can't get it right.
If you want when I get home I will PM you and take a look at it myself to help you out. :)
cheers man, i've Pm ya with my details already.
8) 8) 8) 8)
We have around 40-50 boards. We're using SoftDark Theme
Questions:
If I create only 20 folders. /1/../2/..../20/ And I modify my board index and message index. Will the remaining boards 21-40 still work on the default icon? Or will this set up messed up my forum and receive error message?
To simplify, Can I modify my board and message index after I created /1/ and then later on create the /2/ to /40/ or should I wait 'till I finish all forty folders for each board before I edit my board and index.php?
Thanks a lot.. Looking forward to using this mod.
The only boards that will have custom icons is the ones you create folders for; all others will default to the original icons.
thanks .
So you mean even if I change
For cbi v1, in your BoardIndex.template.php find:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And replace with:
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" />';
}
In MessageIndex.template.php find:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And replace with:
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 create only 20 folders out of the supposed 40 folders for 40 boards. It will still work just fine?
Yes it will. :)
thanks bro.
Hi
I've really read the thread twice
and did followed instruction
but really still confused
may you please tell me which file i should download to 1.1.3
i do not have any thing installed before
just a new clean installed forum
so shall i get the 0.5 or 1.0?
and really i did followed the folders layout but really can not make it out
please help me
I am using SMF 1.1.3
and my website is like this:
http://pro-designations.info/index.php?action=forum
and for the first forum i have its url is like this:
http://pro-designations.info/index.php/board,1.0.html
i did not found this url format in the thread so i am really got lost
i crealted the folders like this:
/public_html/Themes/default/icons/1/
so what is missing?
I included a on_1.gif image
but nothing changed
Please advise
THanks
name them on.gif and off.gif and on2.gif. These go into the folder of the board you want them to show on. So for example:
/public_html/Themes/default/icons/1/on.gif
i found more png format how allow png and gif format?
Convert the .png to .gif with your favorite editor and that would solve your problem.
Hi,
Installed this mod, working fine, great work! Just one thing, I can't get it to work for my child boards. Do they have ID numbers same as main boards? Do their folders go in the same folder as the 1,2,3... folders of the mainboards? I figured out what the ID of each board was by experimentation. Is there a way to just see the board's ID?
Thanks!
EDIT: Never mind, I figured it out. To answer my own questions: Yes, they have ID numbers same as main boards and they go in same folder. Still don't know how to see board's ID number but it's easily figured out through experiment.
Board ids will show if you hover your mouse over it and look to the bottom left corner of your browser.
Ok..
SMF 1.1.4
TP 0.9.8
Installed this mod with no errors.
Created folder: theme\images\icons\13
Created icons: on.gif, on2.gif, off.gif
Uploaded icons to created directory: theme\images\icons\13\on.gif, theme\images\icons\13\on2.gif, theme\images\icons\13\off.gif
Refresh my board index.... Board is still using the default icons..... ???
Try this:
theme\icons\13\on.gif
Quote from: Bigguy on October 14, 2007, 03:21:01 PM
Try this:
theme\icons\13\on.gif
Ahhh...that was the problem. Thanks! 8)
Not a problem. ;)
hey bro .... thanks for the mod ... this is wat is wanted .
but
when i was trying to install that mod via package manager i got this error :(
Install Actions
Installations actions for "cbi, 1.0":
Installing this package will perform the following actions: Type Action Description
1. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
2. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
i dun kno wat to do wid this ..... can u plzzzz tell me whats wrong with my board.index file .....
EDIT: I uploded my Board.Index file, if u wanna take a look at it ....
and Thankz for ur help ....
Your error is a variant on the most common error of all those reported on these pages...it tells you that another mod you have installed has already edited the file in question and that you thus need to do a manual installation of this mod. Please read:
http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)
http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)
The following may also prove helpful:
http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)
Mirror of the last link:
http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)
I know I've given you this advice on other mods and had you done a search you would have found it on many postings.
I have tried many time now to get this working with no luck, if there is some who can help me out please do.
Thanks
Try this version and see if it works better; if not tell me what exactly it fails on.
Install Actions
Installations actions for "cbi, 1.0":
Installing this package will perform the following actions: Type Action Description
1. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
2. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
Can someone explain me difference between on.gif and on2.gif ??
Thank you.
@ asdas2
Constantly posting the same query, as you have tried on me before, won't get you a different answer. As you know perfectly well having had it explained to you repeatedly you need to manually edit to install this mod...the details including links have also been given to you repeatedly.
Quote from: TrueSatan on November 09, 2007, 05:37:17 AM
@ asdas2
Constantly posting the same query, as you have tried on me before, won't get you a different answer. As you know perfectly well having had it explained to you repeatedly you need to manually edit to install this mod...the details including links have also been given to you repeatedly.
heyyyy chill bro :)
i was just telling biguy whats the wrong wid this new version.
i'll do the manuall editing 2night
THankzzzz for the help
It should not have failed on that. What version of SMF are you using. ??? Do you have other mods installed. ???
i m using 1.1.4
and i have 42 mod installed
.......
i manually installed the mod ....
but i cant understand how to set new board image ... its so confusing ... it saying make a fodler then upload image
on off .......
soo hard to figure it out:(
:(
Go back through this thread; all the answers are here. :)
Hello, this mod should give nice graphical effect to any forum. Thanks to the modder.
Before I go and try it, I'd like to ask couple questions regarding this mod.
If I understand correctly this mod will remove current on/off.gif I have. Is it possible to keep that one and add another column that will show the unique icon for the board?
Thanks again, I will wait a little bit and if no reply I'll try to figure it out for myself. :P :)
No it does not remove anything. If you have cbi installed; the only way it works is if you upload new images to a seperate folder, keeping the original on/off .gif for backup in case the custom .gifs you upload don't work. There is no need to add another column. With a bit of code on the board name you can have an image right beside the description of the board. I have to find that code now...hold on.
Ok, try this. When creating a board; in the boardname field; put this before or after the board name:
<img src="http://www.yoursite.com/forum/yourgif.gif">
i have 1.1.4 and board icons 1.0
Sorry for my english
I have one problem
If i have one forum for example called "Sport" without child forum, the mod work fine.
But if the forum "Sport" have a child forum for example called "basket", the mod not work fine because if de child forum called basket have a post unread, the imagen "off" (the new "off" imagen not the default "off" image) not work :-[
Have you setup all the folders right. ??? You have to set up the folders for the child boards as well.
hello!!
I have SMF 1.1.4 and the default theme.
I would like to change the icons of all the boards....But i would like to have all the boards using the same icons(on.gif,on2.gif,off.gif).
I mean i would like to upload the on.gif,on2.gif,off.gif i made and have those for all the boards.How i can do that?
You don't need a mod to do that. Right click on the on.gif or off.gif that is on the board now and go to properties to find out where the on, on2 and off.gif are. I think they are in the image directory of your theme. Then just upload your gifs and overwrite the originals.
Hi,
I got Test failed in ./Sources/ModSettings.php using SMF 1.1.4 with following mods installed
Mod Name Version
1. Colorize Boards 1.0
2. Add Domaintools to TrackIP 1.0
3. Googlebot & Spiders Mod 2.0.3
4. Ad Managment 2.3
5. Advanced Visual Verification 1.2
6. Avatar on Member List 1.0
7. blinkbbc 1.0
8. Downloads System 1.0.3
9. Enhanced Quick Reply Box 2.0.2 2.0.2
10. FavIcon 1.1
11. Global Headers Footers 1.3
12. Hide Tag 1.7.0
13. Language Drop 1.3
14. Membergroup Color Legend 1.1
15. Most Popular Topic Today 2.0
16. Topic Ratings 1.03
17. Users Online Today Mod 1.4.0
18. SMF Trader System 1.1
19. Thank You Mod 1.2.0
20. Streaming 3 4.2.2b
21. SMF Archive 1.1
22. SMF Sitemap 1.2.1
Any idea to fix this?
P.S. I know that manually modding is possible, but I just wanna know if I could install this mod without modding it manually.
The cbi mod does not touch ModSettings.php at all.
Quote from: Black Dragon on December 22, 2007, 11:25:37 AM
hello!!
I have SMF 1.1.4 and the default theme.
I would like to change the icons of all the boards....But i would like to have all the boards using the same icons(on.gif,on2.gif,off.gif).
I mean i would like to upload the on.gif,on2.gif,off.gif i made and have those for all the boards.How i can do that?
I tried that but i couldn't see any icons at all...:(
Did you do a hard refresh. ??? ctrl + f5
OK!!!It worked!!!
I didn't know that there was a hard refresh...:P
Glad you got it. :) The hard refresh bypasses the browsers cache and gets all info right from the server.
Quote from: Bigguy on December 22, 2007, 03:54:50 PM
Glad you got it. :) The hard refresh bypasses the browsers cache and gets all info right from the server.
Nice!!!thanks for the info!!
Quote from: Bigguy on December 22, 2007, 11:42:54 AM
The cbi mod does not touch ModSettings.php at all.
Okay, then I'll try to install again.
Thanks :D
Quote from: Bigguy on December 21, 2007, 09:07:20 PM
Have you setup all the folders right. ??? You have to set up the folders for the child boards as well.
I do not understand you
What version are you using. ???
Quote from: allumius on December 23, 2007, 04:18:48 PM
Quote from: Bigguy on December 21, 2007, 09:07:20 PM
Have you setup all the folders right. ??? You have to set up the folders for the child boards as well.
I do not understand you
This one cbi-1.zip in SMF 1.1.4
How to change child boards icon?I was trying with subfo-on.gif and subfo-off.gif but nothing :/ Help?
You have to make a folder with the id # of the child board and put your icons in there. cbi 1 is the only version that supports child boards.
Yup,i was trying that too,but nothing..
is the folder in the right spot. Did you read the readme. Back a page or two there is instructions on where the folders should go.
hi pls. guide me I am using
SMF 1.1.4
TinyPortal v0.9.8
Theme: XD-Obstuse
Mod ver: cbi-1
I did the manual edits on the BoardIndex.template and on the MessageIndex.template
I created a folder named icons and the path is
Themes/TP_XD-Obstuse/icons/1/on.gif
but no luck
so i thought since
there is an icons folder already on the TP_XD-Obstuse folder so what i did is just created a folder named 1 inside the icons folder
Themes/TP_XD-Obstuse/images/icons/1/on.gif <<(my own gif just named on.gif)
but still no luck making this mod work
Have you tried ctrl + f5 ???
yes i did tried ctrl + F5 but still no luck
i even tried this path
Themes/TP_XD-Obstuse/images/1/on.gif
still no luck sir
i attached my BoardIndex.template and MessageIndex.template
Please help thanks
This is were mine are:
/Themes/MY_theme/icons/1/off.gif
check permissions on your folders (icons and board_id folders)
i set all permissions to 777 pressed ctrl + f5
I copied your path
but still no luck
here is a screenshot
(http://i18.tinypic.com/8gf3dvm.jpg)
I have checked your files and all the code seems to be in there the right way. You say the images are in the right place and the permissions are set right also. ??? You might have to PM me your admin login details to the forum and maybe ftp info so I can see what is going on.
Update:
for some reason some of the icons are showing up but they are not in the right orders
Then you have the board id's wrong. If you hover your mouse over one of the board icons....down in the bottom left of the browser it will tell you the url to that board and the id is on the end of it
See the 96 at the end of this url.....That is the board id:
woohoo thank you!! finally got it working
more power to you bigguy and have a happy new year
hey this looks great, but the link for the mod is not working ? does anyone have a link ?
EDIT - google is your friend...
the link is
http://custom.simplemachines.org/mods/index.php?mod=511
you may want to update the first page ?
EDIT 2 I have another question...
what do I change to use .png images ? I need the images to be transparent, so what code do I need to change for the mod to accept .png instead of.gif
also, I have a theme, what do I have to change to make it work with the theme ?
EDIT 3 - I have installed it correctly to the theme, but I still would like to know how to configure it to .png :D
I think you would have to change the code in SMF in order for .png's to be used and then change it in the mod.
I have this problem
If a boards have not childboards inside, the icon work fine but if the boards have some childboards inside, the icon of board not work
Look this images please
In the first image you can see the board "cafeteria" and "Prensa" no problem And "deportes" icon not work
(http://img509.imageshack.us/img509/3166/boardsxp7.th.jpg) (http://img509.imageshack.us/my.php?image=boardsxp7.jpg)
This second image is the child board of "Deportes" board
(http://img404.imageshack.us/img404/408/childboardsku1.th.jpg) (http://img404.imageshack.us/my.php?image=childboardsku1.jpg)
Did you press ctrl +f5 after you installed the mod. Try that and see what happens.
Bigguy, thanks for this great mod. I have already installed it, although I haven't done the modifications. Just couple of questions please:
1-I will have to upload the new board-specific icons to Themes/default/icons/ right?
2-Once I have done the above, where do I go to configure each board to take on the new icon?
3-Don't we have two have two image states? one for On and one for OFF? how do we set that?
Thanks a lot,
Once you have it installed all that is needed (if you are using the default theme) is to create a different folder for each board; within that folder you would put your on.gif; off.gif.So your path would look like this:
/Themes/default/icons/1/off.gif
1 being the board id for the board you want to show those particular images for. In order to find the board id you can hover your mouse over the on.gif and down in the bottom left corner of the browser it will show a path:
action=unread;board=1.0
1.0 would be the board id. Hope that clears it up :)
WOW that is pretty easy, thanks a lot man.
Can't wait to go home and apply it.
One little tip....If the icons don't seem to be showing after you do this...use ctrl + f5 and refresh the page right from the server. They should show then. ;) Have fun. :)
It is working great BigGuy, thank you very much.
The onyl problem I am having, is with the graphics itself. I need to make sure the icons don't have a white background. Not sure how to do this.... Should I make the icon's background transparent?
Thanks a lot
and where can we find free icons to use for our website?
I search google for "free .png icons"
http://www.google.ca/search?hl=en&q=free+.png+icons&btnG=Google+Search&meta=
and then change them to fit my needs and turn them to .gifs and use them. That's what I do anyway.
I like this mod, and will be using it on my forum.
Bigguy
Thanks for sharing it.
Your more than welcome. :)
Quote from: Bigguy on January 23, 2008, 12:16:25 PM
Did you press ctrl +f5 after you installed the mod. Try that and see what happens.
Nothing :'(
Do you have all the folders made and in the right places. ???
Quote from: Bigguy on January 24, 2008, 10:29:10 AM
Do you have all the folders made and in the right places. ???
Yes
The problem is if ALL post of "Deportes"'childboards are read, The icon called off.gif work fine in "Deportes" board, but if there are some post non read in childboards, the icon on.gof of "deportes" board not work
this mode is not working on my board .. even on default skin .. I am using default modern .. is there some modification in admin panel after instalation or ?? What I do wrong ..
Hi, I've installed the mod successfully and created the correct folders across the 5 different themes I'm using. The custom icons are showing correctly in default, girlyman, but not in babylon, Ig-Oh, or classic yabb. I've tried in the themes that can't display the icons properly to change the paths. For example:
Themes/igoh114/images/icons/8
Themes/igoh114/images/icons/icons/8
Themes/igoh114/icons/8
But none of these configurations seem to be working. I'm wondering if there is something going on that is theme specific that allows the custom board icons to work on some custom themes and not on others?
If you have manually added the code to the required template files in each theme then there is no reason why it shouldn't work.
What changes are needed for running this mod v1.0 on smf 1.1.4 with dilbermc theme?
All the edits for the mod and where to put them should be in this thread somewhere. There are only 2 to do.
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?
Once you change the code if there are no new icons then this will revert back to using the original SMF icons.
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:
(http://img504.imageshack.us/img504/1485/erroryk1.jpg)
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?
This has been installed on dilber before with no problems. Are you sure you made the edits right.
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
Your code looks fine and there are no errors in it. Did you press ctrl + f5 after you put the icons up.
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.
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. :)
here is a copy from the server, as you can see I have tried to put icons in themes and default, just in case
What are the permissions set at for those folders. ??? That shouldn't make a difference really but figured I would ask.
Themes is 775 and icons is 777
When I go here it tells me it doesn't exist. Are the files owned by you:
http://capetownfishing.co.za/Themes/default/icons
these are the files in the icon dir:
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.
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
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?
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.
my theme on my site only has an index.template what do i do to make it work in that one
This mod only touches the Boardindex and the messageindex.template.php
so i cant have it?? i heard that my default theme can implement it to work is that true
If you have the mod installed and the two files I mentioned are NOT in your custom theme then you don't have to do anything to get it to work; it should already work. If however you have one or both of the files mentioned above in your custom theme folder than you will have to manually edit those two theme files in order to get it to work on your theme.
Great mod! I read through this thread and installed the mod manually last night (as I'm using a custom theme), and it works a treat! Many thanks for creating and sharing.
I'm very glad you like it. :)
Is there a simple way to get this mod to work on all boards without having to create a folder for each and every board?
Also, is there a 'perfect' size for the icons that I should use?
I just had another thought, in my deafult theme images folder there are already icons/buttons with the names on on2 and off, couldn't i just overwrite those with my own images? Would that work?
Thanks
Anna
No a folder must be created. I use 48x48 for my icons. No don't overwrite them because when you uninstall the mod you need those images to show up to take the place of the custom board icons.
Ok, thanks, was just playing around with it on my test forum that I upgraded to the new beta thing. Have to say, although making new folders and uploading the images to each can be a lot of work (especially if someone has a large forum) the mod worked absolutely 100% perfectly :D
Well done!
Anna
Thank you. I'm glad you like it. :)
Quote from: allumius on January 25, 2008, 02:29:13 AM
Quote from: Bigguy on January 24, 2008, 10:29:10 AM
Do you have all the folders made and in the right places. ???
Yes
The problem is if ALL post of "Deportes"'childboards are read, The icon called off.gif work fine in "Deportes" board, but if there are some post non read in childboards, the icon on.gof of "deportes" board not work
Can you help me please?
Is it possible to use .png files instead of .gif's? ???
Yes it is. I made a mod to go along with cbi 1.5 that will turn all the gifs to png's. You can also do it your self by editing the code that the cbi mod puts into the template file.
EDIT: It should be remembered though that IE 6 does NOT support the use of png icons. So with out a fix for that people who use IE 6 will see the icon but it will have a box around it. You can try this for a fix if you like and see if it works:
http://www.twinhelix.com/css/iepngfix/
or here:
http://bjorkoy.com/past/2007/4/8/the_easiest_way_to_png/
There are other fixes that are not related to css but I can't find the link right now.
I need help. I'm looking at my /Themes/Musiconica/ dir. My BoardIndex.template.php & MessageIndex.template.php look like this:
BoardIndex.template.php
/* 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>
<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="middle" width="22%">
<span class="smalltext">';
/* 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.) */
MessageIndex.template.php
<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
Am I looking in the correct place? I don't see "// If the board or children is new, show an indicator." Where am I suppose to add the code?
Thanks
CFF Forum
http://www.CentralFloridaFieros.net/forum/index.php
Search for this:
// If the board is new, show a strong indicator.
Can I use this with 1.1.5?
You should be able to try it and if not I will update it soon.
Your a good man bigguy :D :D I am getting errors.....I am really looking forward to using this...
I got this error after replacing this manually.
(http://img301.imageshack.us/img301/6226/clipboard1hx6.jpg) (http://img301.imageshack.us/img301/6226/clipboard1hx6.jpg)
please paste that actual line of code... it looks like you're missing a closing bracket or quote... but we can't see it in the image
Hi
Running 1.1.5 Looking very much forward to installing this on my default theme...Any idea or time frame when you can make it available ?
I have been waiting a long time for such a mod.......I am almost tempted to go backwards to 1.1.4 or forward to 2.0.....No !!! Cannot do 2.0, tried that and was not successful.
It should run with 1.1.5 does it not. ???
Please look at my message four messages up... I have attached my errors to the message...
Please advise
Ok, slipped my mind. I will update soon. :)
Quote from: Bigguy on May 12, 2008, 08:27:35 PM
Ok, slipped my mind. I will update soon. :)
I will name my next child after you !!! ;) ;) ;)
lmao; well don't go that far, lol but thanks. :)
Hello. I am trying to use cbi15.zip with smf 115 and a custom theme Wow-DK. i downloaded everything from this web page.
Anyhow, I was wondering if you could help me. I would like to add the custom icons to the forums, but the find and replace of code doesn't match exactly, and whenever i try to do it, it really messes up the forums.
This is what i see, and am replaceing
// Is this board itself new?
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// Is one of this board's children new, then?
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// I guess it's not new at all.
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
echo '</a></td>
<td rowspan="2" align="left">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
Is there anything else i can post to show you so that maybe you can help me?
thanks
Try replacing just this:
// Is this board itself new?
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// Is one of this board's children new, then?
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
I just cant seem to make it work. below are links to the files. If you have time maybe you could please look at them? maybe its the theme? I would be very appreciative of any help.
BoardIndex.template.php (http://www.buffaloruninn.com/smf/BoardIndex.template.php)
MessageIndex.template.php (http://www.buffaloruninn.com/smf/MessageIndex.template.php)
???
That's not going to work.
linking to a php file on a server means that the server is going to try to run/parse the php.
its just a file server. its not where the forums are at. you can shift-right click, and save file as. then it will d/l it.
nope... sorry, those links try to parse... remember, there is html mixed up with the php.
If you want help, then you need to either attach the files, or give someone access to your system.
But that should not be needed. This mod change all of 10 lines....
Quote from: Bigguy on May 12, 2008, 08:27:35 PM
Ok, slipped my mind. I will update soon. :)
Just a friendly reminder to see if you still have the time to use this with 1.1.5.....
okay sorry about the mix up.
I know its just 10 lines, but for some reason, it doesn't seem to work for Wow-DK mod. I am also using smf115
attached are my files. I appreciate any help. thank you.
Hi
Just a friendly nudge to remind you.......Hopefully you will find some time to make your awesome mod compatible with 1.1.5
Ron
I'm installing this mod manually on the default 1.1.5 theme, and I noticed the code I must replace should contain this variable: $board['is_redirect']. But it's not there, so I guess it was removed or renamed for SMF 1.1.5? Anyway, the mod works regardless, but it generates this error in the log:
8: Undefined index: is_redirect
The error is gone after you remove this part of your MOD code:
// Is it a redirection board?
if ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';
Hi Vandaahl
I am waiting for the Author to prepare this mod for 1.1.5. I have noticed your last message. Can you tell me if I install it manually and remove the code you had mentioned, will I have any problems?
I run the default template with very little mods..
Thanks
Ron
Quote from: keyboard on May 31, 2008, 09:31:00 PM
Hi Vandaahl
I am waiting for the Author to prepare this mod for 1.1.5. I have noticed your last message. Can you tell me if I install it manually and remove the code you had mentioned, will I have any problems?
I run the default template with very little mods..
Thanks
Ron
Hi Ron, It worked for me, so I don't see why it won't work for you :) As long as you don't use "redirection boards", whatever those are. Never even heard of them.
Quote from: keyboard on May 19, 2008, 10:18:44 AM
Quote from: Bigguy on May 12, 2008, 08:27:35 PM
Ok, slipped my mind. I will update soon. :)
Just a friendly reminder to see if you still have the time to use this with 1.1.5.....
When ever you find some time, can you code this for 1.1.5 ?
Where do I find that addon for png files?
I have been a bit busy lately but I will get this coded for 1.1.5 The addon might be in the charter members board. There should also be a copy of it on my site.
Yes I know that it's in your site, but I wondered where in your site?
Does not look like that topic has been updated recently, but here is the URL:
http://www.smfhelper.info/forum/index.php/topic,27.0.html
Here it is. cbi has to be installed to use this but all it does is change the .gif extension to .png so you can use .png icons instead.
For the redirect boards if you have any this will add an image above the one already there. I will incorporate these two mods and clean up the code when SMF 2.0 gets a little further down the road.
To uninstall...make sure the add-on is uninstalled first then you may uninstall the cbi mod.
Hi,
I have a question about the "Custom Board Icons" mod. I am using it for my 1.1.5 forum. Everything is working great, but I notice that the New Posts/No New Posts icon and text are still at the bottom before the Info Center. Is there a way to remove them?
Thanks in advance.
Can you show a screenshot.
Hi Bigguy,
Thanks for your quick response. I have attached a screenshot for you.
You could just change the icons on them to reflect your new icons. I used to have icons for there that I custom made. Each one was a collage of two or three icons for the new post /no new post icons you are referring to. I grey scaled one and viola...I had new icons. (Hope that made sense.)
Bigguy, is there a way to remove the New Posts/No New Posts icon and text in the coding? Since each board has a different icon with this mod, it is kind of confusing to have those two New Posts/No New Posts icons at the bottom.
Thanks.
Quote from: HappyChinchilla on June 13, 2008, 12:28:15 AM
I am using it for my 1.1.5 forum. Everything is working great, but I notice that the New Posts/No New Posts icon and text are still at the bottom before the Info Center. Is there a way to remove them?
Hi, did you do a manual installation?
Hi kai920,
I did not install it manually. Are the icons going to disappear if I install the mod manually?
Thanks.
Well, I'm only asking because I got an error when trying to install thru package manager. I see a few other people using 1.1.5 have the same small issues with searching for code that does not match exactly the xml...
Hopefully I can get around to updating this later tonight. If not it will have to wait til Tuesday. Sorry for the delay folks. :)
Thanks bugguy, it'd be very much appreciated :)
Hello there,
I have manually installed this mod in my dilber mc theme and it really display just fine.
However, when I visit my error log, there are lots of errors on it
Here is the error:
Quote8: Undefined index: is_redirect
File: /home/vol2/4sql.net/sq_697468/allkoreans.net/htdocs/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 145
Should i delete the is_redirect line code in my boardindextemplate. ??? ???
Thank in advance
Thanks in advance, Bigguy.
I have packaged a new version of cbi. This version is for 1.1.5 and will probably work on earlier versions as well. It replaces the .gif extensions with .png automatically so you don't have to do it.
cbi-1.0a (http://custom.simplemachines.org/mods/index.php?mod=511)
This version will not work on SMF 2.0
cbi version 1.5 for SMF 2.0 has now been updated to work with 2.0 Beta 3.1 Public and no addon is needed now. it will automatically change the .gif extensions to .png.
bigguy !!!!
Many,many, many thanks for the upgrade to 1.1.5..... I will name my next child after you.......Works like charm...what a great mod :D :D :D
thanks man!
Glad you guys are happy and like it. :) A baby named bigguy might not be the best idea though keyboard; lmao. ;)
Some help please. I am using the legacy Rocketheme SMFversatility2 theme and I tried several times replacing code without success (obviously).
This is my BoardIndex.template.php right around where I believe the code should go:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
Here is my MessageIndex.template.php right around where I think the code should go:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
I created this folder structure (testing on a local server):
c:\xampp\htdocs\smf\Themes\SMFversatility2\icons\1\
Inside I have 3 icons, "off.png" "on.png" and "on2.png"
I am assuming the 'board number' is the actual placement number, or order, the boards are in and not some code like Joomla uses for content ID. If so I could not find what each board's content ID is so I hope I was correct.
Forgot to indicate using SMF v1.1.5.
Sorry just a quick question, what is on2 for?
Nevermind, found out from here (http://www.simplemachines.org/community/index.php?topic=237856.msg1533669#msg1533669):
on.gif = new posts in parent board
on2.gif = new posts only in child board
off.gif = no new posts
@ Davey D.: Thos look like the right areas for the code and the right way to have the icon folders as well. In order to find the board id's hover your mouse over the board name and look to the bottom left corner of your browser. You will see a url there with a number in it. That number is the board id. :)
2 screenshots below - looks like the individual forum links go away.
Thanks for the 'board number' tip - the red icon (off.png) indicates I got that part right.
Than either you are taking to much of the original code away or not enought of it. In the boardindex.template.php make sure all of this gets removed:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
And in the messageindex.template.php make sure allof this gets removed:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
Hy all i have a little problem
i get this error :8: Undefined index: no_icon
: /var/www/virtual/dyrome.nl/htdocs/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 176
this is the line in boardindex.template line 176
echo '<img src="', $board_nonew_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
Thanks in advanced
You shouldn't get that. Maybe the mod did not install all the way. Check your modifications.english.php and make sure the text string has been put in.
It finally works perfectly in my dilbermc theme without any forum error logs. THanks a lot for this great mod. ^_^
Your very welcome and I'm glad you like it. :)
Hi Bigguy,
Thanks for this great mod. :)
Could you tell me how to manually edit classic theme?
The only relevant code I can find in BoardIndex.template.php is
<td class="windowbg" width="6%" align="center" valign="top"><img src="', $settings['images_url'], $board['new'] ? '/on.gif" alt="' . $txt[333] . '" title="' . $txt[333] : '/off.gif" alt="' . $txt[334] . '" title="' . $txt[334], '" border="0" /></td>
Thanks in advance!
Have you tried replacing that with what I give you in the mod. ???
Yes I tried but it gives me script error.
Sorry I have absolutely no idea about php.
Probably I've inserted the code wrongly.
It will really help if someone can show me how to insert the code like the mod site.
Which code to be add before or after which code. Or what code should be replaced by what... stuff like that..
Thanks!!
If you post the file you are having trouble with I will see what I can do later tonight when I get back on.
Awesome!!
Here are the files.
Big thanks to you!
Hi Bigguy,
Were you able to remove the New Posts/No New Posts icons and text in cbi-1a? I installed it to my 1.1.5 forum, but the icons and text are still there. Would you please help me?
Thanks.
I am getting confused with the folders for this mod.
I have 1.1.5 and am using the default theme. I uploaded the mod but have not applied it because of my confusion after reading the notes first.
When I look in forum/themes/default/ , am I to make a new folder icon folder here?
When I look one step further n images , there is an icon folder already existing. Do I ignore that one?
I am really lost at the put on.gif, on2.gif, and off .gif in that folder part. ::)
I'd appreciate it if you'd straighten mr out a bit.
I tried uploading the icons to the default theme images folder/post folder anf the icon showed in Edit Icons and on the post bt not on the index board.
www.Mom-Me-dearest.com
Yes you must create a directory "icons" in your /themes/default/
and your icons must be in this url /themes/default/icons/boardid/on.gif
Quote from: fangweile on June 30, 2008, 07:27:46 AM
Yes you must create a directory "icons" in your /themes/default/
and your icons must be in this url /themes/default/icons/boardid/on.gif
[/color][/b]
I will do that. I'd really like to use this mod. But what do mean by the icons must be this url?
I apologize for my need for further direction but the good book says, "ye have not because ye ask not"
??? he was pretty clear.
You must add your board images into the (new) icons directory directly under your theme directory. (not the existing images/icons directory)
so, you will create themes/default/icons
you will create theme/default/icons/BOARDID for each board that you want a custom icon.
and you will put on.gif, on2.gif and off.gif into each of the BOARDID directories
and if'n you're referring to the xtian book... "he helps those who help themselves..." :)
Quote from: Kindred on July 01, 2008, 07:32:00 AM
??? he was pretty clear.
You must add your board images into the (new) icons directory directly under your theme directory. (not the existing images/icons directory)
so, you will create themes/default/icons
you will create theme/default/icons/BOARDID for each board that you want a custom icon.
and you will put on.gif, on2.gif and off.gif into each of the BOARDID directories
and if'n you're referring to the xtian book... "he helps those who help themselves..." :)
Thank you for the clarification.
I have received lots of help since joining and making use of the community. By reading the threads I often have not even needed to post a question. It's been very beneficial to getting my site running well.
But one not so beneficial thing I find is that occasionally, responders make you feel
stupid.
I always read and search before posting a query here. (helping myself) O:)
I am sure the"
What part don't you get?" flavor, steers away many an easily intimidated Newbie.
But I will continue to ask when something is not so clear to
Me. I have learned a lot and hope to continue to do so and even help someone else down the line. ("Each one...Teach one")
I was clear on the creating a new icon folder. But at the risk of sounding even
stupidier...I still do not understand what is meant by:
put on.gif, on2.gif and off.gif into each of the BOARDID directoriesI would really appreciate clarification on that from anyone who may be able to do so for a struggling Newbie like myself. :-\
Thanks.
mom-me-dearest.com
When you 'mouse-over' a board's name, the http link should appear in the status bar of your Web browser. Within that http link you should see the board ID (ie., http://www.mycoolforum.com/index.php?board=29.0). Write that number down, or save a tree and paste to Notepad.
Fire up Gimp, Fireworks, Photoshop, or whatever and create icons with the names, "on.gif" and "off.gif" and "on2.gif." Within the folder of the theme you are using you need to create one folder, "icons." Within that folder you need to create a folder for each board, using the example above you would have folders like this: /whateverThemeDirectory/icons/29/ and put the icons you created within each board folder. So each folder should have 3 icons, most likely different icons for each board.
Get it, Got it, Good! :)
BOARDID is, as Davey indicates, the ID# of the board... (just the number, not the decimal)
(for example, modifications and packages board on SMF here is board 59
So, you need a different directory for eac board that you want a custom icon for.
each directory should include on.gif (new posts in that board) on2.gif (new posts in a child board of that board) and off.gif (no new posts)
Quote from: Davey D. on July 01, 2008, 12:41:23 PM
When you 'mouse-over' a board's name, the http link should appear in the status bar of your Web browser. Within that http link you should see the board ID (ie., http://www.mycoolforum.com/index.php?board=29.0). Write that number down, or save a tree and paste to Notepad.
Fire up Gimp, Fireworks, Photoshop, or whatever and create icons with the names, "on.gif" and "off.gif" and "on2.gif." Within the folder of the theme you are using you need to create one folder, "icons." Within that folder you need to create a folder for each board, using the example above you would have folders like this: /whateverThemeDirectory/icons/29/ and put the icons you created within each board folder. So each folder should have 3 icons, most likely different icons for each board.
Get it, Got it, Good! :)
Thanks a lot. Very discript. Think I got it now. :)
Maybe you should rename folder "icons" to "board_icons".
And add that "redirect.png" for 1.1.5 ?
I have no idea what im doing wrong here.
1ST I read the read me file. this is it.
CBI 1.0 {Custom Board Icons v1.0}
Thanks go to:
Kindred and all who participated in the threads at:
www.simplemachines.org and www.smfhelper.info
and to RebelRose for testing and to Marko "Mazeman" Kaartinen for his work in
coding. Thanks to all of you for making this mod possible.
Create icons folder in to your /Themes/default/.
In the icons folder create folder which name is the boards id,(meaning only the
number of the board) where you want custom board icon.
Then put on.gif, on2.gif and off.gif in that folder.
Structure:
forum/Themes/default/icons
forum/Themes/default/icons/board_id/on.gif
forum/Themes/default/icons/board_id/on2.gif
forum/Themes/default/icons/board_id/off.gif
Then i read this that was in the install on my forum.
CBI 1.0 {Custom Board Icons v1.0a}
Thanks go to:
Kindred and all who participated in the threads at:
www.simplemachines.org and www.smfhelper.com
and to RebelRose for testing and to Marko "Mazeman" Kaartinen for his work in
coding. Thanks to all of you for making this mod possible.
Create icons folder in to your themedirs root.
In the icons folder create folder which name is the boards id,(meaning only the
number of the board) where you want custom board icon.
Then put on.gif, on2.gif and off.gif in that folder.
Structure:
forum/Themes/default/icons
forum/Themes/default/icons/board_id/on.png
forum/Themes/default/icons/board_id/on2.png
forum/Themes/default/icons/board_id/off.png
NOTE: "board_id" = the id number of your board so the structure would look like
this for board 1:
forum/Themes/default/icons/1/on.png
This version is for SMF 1.1.5 and replaces the .gif extension with .png so you
can use nicer looking icons.
Ive read and reread this thread on what path to place the icons in. After making 15 0r so folders with all the combanations form this thread i still do not have it working. ive set the cmod every which way. im only working with the default theme 1.1.5 and this version of CBI, CBI 1.0 {Custom Board Icons v1.0a} I have uninstalled and installed the earlier version and that didnt help. Any ideas would help me out alot.
Thank you for your time.
Have you made this folder yet.
Themes/default/icons
yes i have
the site www.nflfannation.com
No you did not make the icons folder. You have the off.png in the images folder.
heres the screen shot of my ftp and where i put them i adde 2 icons folders
I can barely make out what you have in that screenshot. Do you have an off.png in the images folder. ???
yes i do. i added that just to make sure the path was okay
Can you PM me ftp login details and I will take a look for you.
Pm sent. if you could i use the Nemesis theme as the default
As you can see now on the first board there is a .png icon showing. You did not have an off.png file in the 1 folder in the icons directory.
/www/nflfannation.com/Themes/default/icons/1
Thank you. I didnt relize you needed both to make it work thank you very much
No problem at all. :) I hope you like the mod.
im sure i will now i know what to do
What edits are needed for other theme,s useing png
Thank you
I think i got it thank you
Thank you for all your help Bigguy. The mod works great and i think makes the forum look alot better. have look www.nflfannation.com
Hello.
As I change the mod so that instead of working with images in gif, I work in PNG format.
Excuse the English, because this translated by Google.
scorpion, I think you had better try re-phrasing that, because your google translation made no sense at all..
The newest version of the mod works with PNG.
After a couple of false starts (okay, five of them), I have this mod up and running and I like it. I just have one small problem.
At the bottom of the board, just above the info center, is a sort of legend, with tiny little pictures of the icons representing New Posts and No New Posts. These, unfortunately, have not changed. They still look like the old icons (only verrrrry small). Is there any way to fix this?
I'm using 1.1.5 with the Movies theme. I had to put the icons/# folders in the theme/movies folder, because the mod couldn't seem to find them in the theme/default folder.
Hi,
Achillea, those images can be changed by uploading your preferred image with the same name.
In my case those images are located as follows (default theme)
/Themes/default/images/new_some.gif
/Themes/default/images/new_none.gif
Simply prepare an image you would prefer, naming one as new_some.gif, the other as new_none.gif and upload, overwriting the originals.
Once done, check your site - if nothing has changed, press ctrl+f5 to clear your cache, and it should show your modification.
Regards
IACS_CM
Hooray! It worked! Teeny-weeny images now match big ones.
Thanks! :)
I have a problem with this mod.
I've manually installed and opened folders in forum/Themes/default/icons/16/on.png (16 board ID, also opened and other board folders and putted on.png, on2.png and off.png but still nothing ) and there's still no picture set text.
www.baklja.com/forum
I've putted some picture for now, but if you see that picture is called from forum/Themes/babylon/images/off.png
I don't understand where's mistake?
I have succeed installing this mod.
you have to install the icons/## directories in whatever theme you are running.
I assume that you are using the babylon theme... so move your icon directories into that theme's folder.
to implement the mod cbi1.5 theme in the CS-DK, as I do, because the lines BoardIndex.template and MessageIndex.template are different
@ IACS_CM
Those directions were awesome and I was able to change my icons....
One little issue though - There doesn't seem to be a change in color in the icons when there are new posts - do I need to modify something to get this to happen?
Thanks so much for all you've already done! :)
Did you upload the SAME icon as on.gif and off.gif?
You need to upload different coloured icons...
oh ok I didn't realize that - so if i can't find the same icon in a lighter color - can I then use a different one for on and on2 and a different one for off?
Nevermind - figured it out. Thanks for the input. Things are working great now. :)
Where i can edit the board icons?
I don't find the mod in Admin panel .. :-[
You don't need to.
You just have to put icons in folders of your default theme and theme your using ( if you're using some other then default ).
Hello,
I think that i do all things without any mistake, but the icons doesn't work for me :S
(http://www.hdd.pt//thumbs//1074686248.jpg) (http://www.hdd.pt/imagens/1074686248.jpg)
My board name is correct, but the icons simple doesn't appear :S
edit: In default theme, when i "pass" the mouse over the icons on the forum, i can see in status bar of my browser my "folder id", but this doesn't append in my Apollo BB theme.
thnk's
this won't work on other themes, unless you put the icons directories and images, etc in the other theme directories as well.
Hi, I have some problem with this mod.
I use hayatv2 theme. I already applied this mod and modified BoardIndex.template file in hayatv2.
And my forum has these error (in log):
8: Undefined index: is_redirect
File: /home/nova2k/public_html/forum/Themes/hayatv2/BoardIndex.template.php (main sub template - eval?)
Line: 487
8: Undefined index: no_icon
File: /home/nova2k/public_html/forum/Themes/hayatv2/BoardIndex.template.php (main sub template - eval?)
Line: 485
8: Undefined index: no_icon
File: /home/nova2k/public_html/forum/Themes/hayatv2/BoardIndex.template.php (main sub template - eval?)
Line: 480
How can I fix it? Thank you!
Did you do the edits to the language file. ??? They have to go in as well.
Quote from: Bigguy on August 11, 2008, 01:46:27 AM
Did you do the edits to the language file. ??? They have to go in as well.
I know but hayatv2 theme does not contain language folder :(
It has only BoardIndex.template file.
PS: the forum error log increases very quickly. After I just removed all log, I logout and login again. There are 20 new pages of these error :'(
Check the language file in the default theme folder then and see if it contains the edits.
UPDATED: NVM, had someone else help me fix it. thanks anyhow.
Hello
using smf 1.1.5, theme "AA New Damage v2" downloaded from simplemachines.org
when manually installing, custom icons appear, but board descriptions disappear. Is there something i can add to the code to bring those back?
any help is greatly appreciated.
I would say that when you manually installed you removed some of the code for the board description. I would go back over the manual edits you did. For the icon problem; is the grey border not part of the icon itself. ??? If you wanted that you would have to add it to the custom image you have.
Now I'm using Bethesna Theme . Can i use "Custom Board Icons" on Bethesna Theme . How to use it
As with nearly all mods, you will have to manually install portions of this mod to make them work with anything other than the default theme
what I am running:
smf/tp 1.1.5/0.9.8.3 respectively
Theme BlackRain v2
Ok, I made the icons folder in my template root, inside that I made several folders, corresponding to each board number ....from here I get a little lost, do i need to create all 3 files inside each folder (on.png, on2.png, off.png) or do I just use one.... also do I make the file the actual picture I want to use just renamed to on.png...or does it go someplace else all together....or did I miss something.
Also I did the 2 edits to the files messageindex.template.php and boardindex.templates.php and still nothing .... any help would be great .... Thanks
if you want to use a custom icon for on (new posts), on2 (new posts in child board), or off (no new posts), then you have to have the custom image that you want used in EACH directory.
is the code for the diffrent themes the same in all the themes..... or do i need to change something in the theme i am using ..... i used the code a few posts back ....
i guess i need to see the file structure for this ... it's killing me here... lol
my_theme(folder)-->icons(folder)-->board#(folder)--> on.png(.png file)...???
or...is it....
my_theme(folder)-->icons(folder)-->board#(folder)-->on.png(folder)-->*.png(*.png file)
Quote from: Smythe on September 06, 2008, 07:48:07 AM
my_theme(folder)-->icons(folder)-->board#(folder)--> on.png(.png file)...???
thats the file i want it to be, just renamed correct, if so, is there a size restriction....64x64...50x50 ...??
Hello there,
I have manually installed this mod in my Outline theme and it really display just fine.
However, when I visit my error log, there are lots of errors on it
Here is the error:
Quotehttp://www.puchamare.com/foro/index.php (http://www.puchamare.com/foro/index.php)
8: Undefined index: is_redirect
Archivo: /home/puchamar/public_html/foro/Themes/default/languages/Post.spanish_es.php (main sub template - eval?)
Línea: 266
Quotehttp://www.puchamare.com/foro/index.php
8: Undefined index: is_redirect
Archivo: /home/puchamar/public_html/foro/Themes/default/sbox.template.php (main sub template - eval?)
Línea: 266
Should i delete the is_redirect line code in the mod ??? ???
Thank in advance
Did you do the edits to your language file. ???
hi Bigguy,
i have all manually installed step by step, can you please tell me where to edit?
Thank in advance
Did you add edites to the modifications.english.php file. ???
hi Bigguy ,
yes, i'm edit the modifications.english.php and modifications.spanish_es.php files with $txt['no_icon'] = 'No icon set'; before ?>
but redirect.png image not exist, is normal??
thanks
What version of cbi are you trying to install and to what version of SMF.
my SMF version is 1.1.6 and the version CBI is cbi15 manually installed (all 3 files edit)
error is..
Quotehttp://www.puchamare.com/foro/index.php (http://www.puchamare.com/foro/index.php)
8: Undefined index: is_redirect
Archivo: /home/puchamar/public_html/foro/Themes/default/languages/Post.spanish_es.php (main sub template - eval?)
Línea: 266
Quotehttp://www.puchamare.com/foro/index.php
8: Undefined index: is_redirect
Archivo: /home/puchamar/public_html/foro/Themes/default/sbox.template.php (main sub template - eval?)
Línea: 266
Thank in advance
ummm.... 1.1.6 doesn't have redirect boards as part of it's code (does it?)
I think you installed the 2.0 version of the mod.
Kindred is right, please try the proper version for 1.1.6. It might be marked 1.1.4 but should still work. If it doesn't it needs to be updated. I am trying to get to updating these mods but I have a lot on my plate right now.
i'm install cbi cbi-1a ... it's ok
Thank you.
Not work for me in SMF 2.0 Beta 4 some solution ? i see only NO ICON SET
look screenshot
ps. in older version worked always like a charm now not :(
If you see that then it should be working. Thats part of the mod. All you need to do now is upload the icons. The next version of this is being worked on but I am not sure when it will be out.
Quote from: Bigguy on October 12, 2008, 10:38:59 AM
If you see that then it should be working. Thats part of the mod. All you need to do now is upload the icons. The next version of this is being worked on but I am not sure when it will be out.
i have already the icons uploaded by older versions
Have you emptied your cache on the forum and tried using ctrl + f5 on your keyboard to bypass your browser cache.
Quote from: Bigguy on October 12, 2008, 10:49:53 AM
Have you emptied your cache on the forum and tried using ctrl + f5 on your keyboard to bypass your browser cache.
sorry for disturb i solved everything making new package working for smf 2.0 beta 4 if you need to attach it i attach in post
thx for reply
Thanks for that but the one that works with 2.0 beta 3 uses .png instead of .gif. You might be trying to install the wrong one on your version of SMF.
Quote from: Bigguy on October 12, 2008, 11:25:45 AM
Thanks for that but the one that works with 2.0 beta 3 uses .png instead of .gif. You might be trying to install the wrong one on your version of SMF.
oh you are right sorry :) i using GIF image so i let so thx for reply
I have removed your attachment from your post but I still have a copy of it and will go over it. :)
Help, I am having a problem with this modification. After installation all icons are in:
Themes/default/images/off.png :(
You have tu make same folders in your default and your custom theme to make this mod work.
Can you explain?
Yes, I can.
Quote from: AlenNS on October 19, 2008, 08:00:41 AM
You have tu make same folders in your default and your custom theme to make this mod work.
Alen, That was less than helpful
David,
As with all mods, this mod only automatically installs into the default theme. You will have to make manual edits to your custom themes and manually create the icons directories in your custom theme directory.
Also, this mod does not create the custom icons... it merely creates the method to USE custom icons. It's up to you to create and upload the custom icons to the correct location in your theme directory structure.
I installed the CBI 1.0be can not put GIF, how do I put GIF
I'm from Brazil and the translation is at Goole
Try using .png instead of .gif
Yes in PNG works, but there I have to use only PNG
For the version of cbi you installed yes only .png works. You could go through the code that the mod put in your file if you like and find all the .png extensions and change them to .gif if you like or re-install an earlier version of cbi.
I use the Outline theme, so after istall cbi, i just need to create this folders:
forum/Themes/default/icons
forum/Themes/default/icons/board_id/on.gif
forum/Themes/default/icons/board_id/on2.gif
forum/Themes/default/icons/board_id/off.gif
then:
forum/Themes/Outline/icons
forum/Themes/Outline/icons/board_id/on.gif
forum/Themes/Outline/icons/board_id/on2.gif
forum/Themes/Outline/icons/board_id/off.gif
And it should work right? Or i need to edit the index.php?
Run the package through a parser and see what edits it makes then go into your custom theme folder and see if any of those files are in there. If they are they will have to be modified, if not then when the mod installed it made the edits to the default theme.
Quote from: Bigguy on November 02, 2008, 11:09:46 AM
Run the package through a parser and see what edits it makes then go into your custom theme folder and see if any of those files are in there. If they are they will have to be modified, if not then when the mod installed it made the edits to the default theme.
I run P.Parser, but:
ERROR: The package-info.xml file is invalid!
Debugging Information
Error message: String could not be parsed as XML
Source: /home/dragonfl/public_html/resourcez/PackageParser/index.php:133
Errors encountered while parsing XML file:
1. Entity: line 1: parser error : XML declaration allowed only at the start of the document
2. <?xml version="1.0"?>
3. ^
Stack Trace:
#0 /home/dragonfl/public_html/resourcez/PackageParser/index.php(133): SimpleXMLElement->__construct(' <?xml versi...')
#1 /home/dragonfl/public_html/resourcez/PackageParser/index.php(94): parsePackageInfoXML('/tmp/package-in...', 'install', 'theme')
#2 /home/dragonfl/public_html/resourcez/PackageParser/index.php(773): parseArchive('/tmp/phpRiDidF', 'install', 'theme')
#3 {main}
XML File:
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>bigguy:cbi05</id>
<name>cbi, 1.0</name>
<version>1.5</version>
<type>modification</type>
<install>
<readme>readme.txt</readme>
<modification>modification.xml</modification>
</install>
<uninstall>
<modification reverse="true">modification.xml</modification>
</uninstall>
</package-info>
What is this?
I will have to look at the package and do some changes. Open up the modifications.xml file and the edits are in there. It's pretty simple to follow.
Modification.xml:
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>bigguy:cbi05</id>
<version>1.5</version>
<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="replace"><![CDATA[ // If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '<img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';]]></search>
<add><![CDATA[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>';]]></add>
</operation>
</file>
<file name="$themedir/MessageIndex.template.php">
<operation>
<search position="replace"><![CDATA[ // If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '<img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';]]></search>
<add><![CDATA[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>';]]>
</add>
</operation>
</file>
<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end" />
<add><![CDATA[$txt['no_icon'] = 'No icon set';]]>
</add>
</operation>
</file>
</modification>
So BoardIndex.template and Messageindex.template.php are the files that get edited. Do you have either of these in your custom theme folder. ???
Quote from: Bigguy on November 02, 2008, 11:34:23 AM
So BoardIndex.template and Messageindex.template.php are the files that get edited. Do you have either of these in your custom theme folder. ???
In my custom theme folder i only have BoardIndex.template file :S
Ok then, if the mod is installed then the messageindex.template.php has already been modified. So all you have to do is modify the Boardindex.template.php file.
Quote from: Bigguy on November 02, 2008, 11:45:58 AM
Ok then, if the mod is installed then the messageindex.template.php has already been modified. So all you have to do is modify the Boardindex.template.php file.
Yes !!
Now appears "No icon set" in turn of the icon theme.
I will creat some folders with icons
If that appears then it is installed right. Now all you have to do is get a folder made for each board and put the on.png and off.png in there....along with the on2.png
Quote from: Bigguy on November 02, 2008, 11:58:59 AM
If that appears then it is installed right. Now all you have to do is get a folder made for each board and put the on.png and off.png in there....along with the on2.png
It doesn't work :S
I have the icons here:
public_html/Themes/outline115/icons/75
And I dont know what it is :-[
clear your browser cache and see. (ctrl + f5)
Quote from: Bigguy on November 02, 2008, 12:05:20 PM
clear your browser cache and see. (ctrl + f5)
It works now xD
It was because my image icons are gif, so i upload one png file and it works ;)
Thank you very much for the support ;)
Not a problem. Glad you like it. :)
HI Big Guy. Will there be a version compatible for the latest SMF beta ?? I have used this mod for a long time on smf 1 and think its great. I would really like to continue using it but am now running the beta forum.
There should be a version that runs with SMF 2.0 beta 3. However I will be upgrading this mod real soon. I just have to get a few errors solved on my site first. :)
I want to use CBI but without having to replace On & Off.Just place any picture I want on the board In front of the category.How can I do that?If it's not possible is there any other mod I can use to achieve it?
Thanks in advance
Hi Big guy Im on 2 beta 4 and I get this from version 1.5 of cbi :
Installations actions for "cbi, 1.0":
Installing this package will perform the following actions:
Type Action Description
* 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
2.0 Beta 4
is there anything coming up for this Forum yet soon ???
@ zes: Not sure I understand you. Can you explain a bit more.
@ glennk: Do you have many mods installed. ???
@ Technoman: What do you mean, another version. ???
Hi Big guy I have
Tags Mod
Pretty urls
Ad Management
Auto embed video
Howevere IN 1.16 prior to upgrade I had these and many more mods but was still able to use your mod. I would dearly like to continue with this mod as my forum users have become use to it, many of the pictures used were taken by or include my board members so its a way of involving them in the forum.
Thanks for your help with this.
Try checking your permissions and ownership of the files then through ftp and see if that makes a difference when installing.
Hi Big Guy,
Both board and message index are set to 777. Is this what you mean ??
I also uninstalled all my mods and tried again, but still get the same problem. Is this mod compatable with 2 beta 4 ??
Thanks - Glenn
Use the parser on this page to get the manual edits for the mod and do it that way for now. The mod has not been updated for beta 4 yet but it will work with it.
http://custom.simplemachines.org/mods/index.php?mod=511
Hi Big Guy,
Im doing as you suggested. Howevere the code from the parser does not match the code in the file ???? The bit in red shows the difference in code.
Parser says this should be the code
Quote// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '<img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';
However this is the code as it appears in my version
Quote// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="windowbg2 info">
<h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
What version of the mod are you using. ???
Hi big guy
I arent using any version of the mod. Just the manual install instructions as found here :
http://custom.simplemachines.org/mods/index.php?action=parse
The code in my /Themes/default/BoardIndex.template.php
seems to differ from what the manual install parser says it should be ?
As I havent installed the mod in 2 beta 4 (due to the errors highlighted earlier) then the code shouldnt have been effected in any way by the mod ?
I'll post the code here when I get back for you. :)
Quote from: Bigguy on November 06, 2008, 07:41:54 AM
@ Technoman: What do you mean, another version. ???
yes for this version, 2 beta 4 (default template)
Ok, please understand that this was quick so it may not work. You can call this a beta version I guess for SMF 2.0 beta 4.
TRY THIS ON A TEST FORUM FIRST
I have tested it but like I said it was quick. If it works I will upload it to the mod site. This also ONLY uses .png for icons NOT .gif (Also works with RC1)
Thanks for taking the time to do this. Ill add a new forum on my hosting and plug in the mod. Ill let you know how it goes but it may be after the weekend before I get it sorted.
I have all my old files and icons saved from 1.1.6. The images are all .gif. Is it just a matter of renameing the files .png ??
No I think you can't do that but try it anyway, ya never know.
seems to work big guy. No errors in log.
Also you can just rename your .gif files to .png via ftp and they will work.
Great mod and glad to have it functioning again.
Thats great to hear Glenn. Glad you like it. ;)
thanks big guy. Maybe 1 issue
When I dont have a folder uploaded for a particular board it does not revert back to standard. Instead it says :
no icon set
I'll take a look at the code later and see what I can do maybe.
Hi to All.
I have a problem with this mod.
I use CBi the last version, and the SMF 1.1.7.
I installed the mods and it run perfectly when I create the incon like on_XX.gif of off_xx.gif all in the same folder
here: www.rogerk.net/forum/Themes/default/images/
BUT............
If I try to create the folders for each different board....like
www.rogerk.net/forum/Themes/default/images/icons/NuomberBOard/on.gif
The image not display.
I need to use this, becouse I Have about child board and the classical on_XX.gif off_XX.gif not work with child board.
Please Help me!
And tnx for the great Mod!
Marcello
Check permissions on the icons and board id folders and check to see if there are any errors in the logs. What version of the mod are you using. ???
HI!!!
I'm trying to install cbi on dilbermc, but i can't make it works! :-[ .But i know there is something i must be doing wrong, becouse it looks that it works for some other dilbermc users :(
Files attached, if someone can help me with this.
Thanks in advance.
PD: For dilber mc, images should be in default folder too?
tks.
I dont kno is it posted somewhare in this HUGE thread this question (but i cant now sit and search for all 21 pages to find it so..) My question is..whare form teh admin panel is the editing of the custom icons?
Quote from: d0brin on November 17, 2008, 12:01:09 PM
I dont kno is it posted somewhare in this HUGE thread this question (but i cant now sit and search for all 21 pages to find it so..) My question is..whare form teh admin panel is the editing of the custom icons?
1- laziness is no excuse. If we all acted that way, then nothing would get done.
2- none. this mod allows you to add icons directly to your server using a defined naming scheme. As long as you use tghe correct name, there is no need for any admin insterface.
so with one word said...How to add Custom Icons?....
Try this version:
http://www.simplemachines.org/community/index.php?topic=126263.msg1787411#msg1787411
hello i am stuck..
the code to be replaced... looks like this in boardindex.template.php
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/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'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
how do i make a change..
default theme on 1.1.7 and latest MOD version..
plz help
Bigguy, can you plz help me fix that code..
What code do you need help with. ??? The post you made before this one. ???
yes plz.. its the last post of page 21
What version of SMF do you have and what version of the mod are you trying to install. ???
default theme on 1.1.7 and latest MOD version.. cbi-15
Sorry for not getting back to you earlier. Can you upload the BoardIndex.template.php file and I'll see what I can do.
-Heloo! I have a problem with Custom Board Icon and do not know how to solwe this problem...
-I have SMF 1.1.7, and it work great with cbi (aprox 4 months) until now. I am open a 2 new forums and put the icons at :
MyDomain/overview_tp10/icons/45/on.png
MyDomain/overview_tp10/icons/45/on2.png
MyDomain/overview_tp10/icons/45/off.png
I tried to replace .png with gif and the icons do not show at forum.
What is the problem with thease,please help!?
PS: all others icons work well ,but when i open new forum (whatever in what board it is) and put the icons at Themes folder, the icons do not show...
(http://ultraphoto.org/images/a45rgie7vm9nxeggw3he_thumb.png) (http://ultraphoto.org/viewer.php?file=a45rgie7vm9nxeggw3he.png)
Sorry for my poor English!
Best regards EmiX11
they should be placed at:
MyDomain/Themes/themename/icons/45/on.png
Yes but that my problem is,the icons are in the right spot to bee, but do not work...
Like as it have some limit in number of allowed icons.
Is there some way to ,modify to show all icons?
there is no limit to the number... I have boards numbering 128 with custom icons.
I am last night menaged to solve the problem...Problem was caused by error in code (coused probably by my mistake O:) )
Anyway bro tnx for your help!
BigGuy,
Everyone really does like your code and so do I.
Maybe make a final release of this code to work on latest version 1.1.7. It would solve everyones problem. I understand your busy, but it would help alot.
Thank you Mate. Martin
I will update it for 1.1.7 very soon. I wanted to make sure the new version for 2.0 was working and I guess it is as I have not heard any bad reports from it so far. :)
Quote from: Bigguy on November 26, 2008, 01:57:27 PM
Sorry for not getting back to you earlier. Can you upload the BoardIndex.template.php file and I'll see what I can do.
hey Bigguy, thanks for replying.. file attached
Try this.
Hey got a question for you o Enormous One. :D
Do you have any problem with people using the code from this mod to apply customised images to other parts of their forums? I'm thinking of consecutive background images in windowbg2 and stuff like that.
I have no idea if people do that. If they do ...I guess thats fine. I don't really have a problem with it. :)
Cool. Just thought I'd ask since you were here anyway. I'll let you see the results and give you some credit if I go ahead with it. Cheers.
That sounds good. :)
Quote from: Bigguy on November 02, 2008, 11:58:59 AM
If that appears then it is installed right. Now all you have to do is get a folder made for each board and put the on.png and off.png in there....along with the on2.png
no icon set appears..
same thing happens with me.. and my question is how to find the board id ?
and do we need to give specific names to the gif files like on.gif, on2.gif & off.gif ???
Lay your mouse over the board name and then look in the bottom left corner of your browser. You will see the board url. It has a number on the end of it...that is the board id. Once you have the board id then you now know the name of one of the folders you have to put the on and off .png files. The rest is in the readme of the mod. :)
Will there be a version for 2.0b4, or will you be waiting for 2.0RC1?
It shouldn't be that hard to adapt the code for 2. As for upgrading the mod, considering how close RC1 is there would be little point playing with a 2b4 version.
Quote from: antechinus on January 08, 2009, 10:09:40 PM
...considering how close RC1 is...
[all together now] HOW - CLOSE - IS - IT?[/all together now] :D
(note: I know there's no answer to that question)
There is only an internal target. If I told you I'd have to kill you. :)
Quote from: antechinus on January 08, 2009, 10:51:35 PM
...If I told you I'd have to kill you. :)
Then I'd never get a chance to use RC1... nah, don't tell me :p
I have a working copy for 2b4 but it does something freaky to the text on the forum for some reason so I did not release it. I am still playing and after I get that fixed I will release something for SMF 2.0 rc1 after it comes out.
Can someone help me with the edits for my theme?
This is my theme - its built with pure CSS and not tables :(
http://custom.simplemachines.org/themes/index.php?lemma=382
Really appreciate the help on this - great looking mod and would love to have it for my site :)
I'm really not sure how this mod would work with only css.
Quote from: Bigguy on January 13, 2009, 01:51:15 PM
I'm really not sure how this mod would work with only css.
Well I looked at it and thought instead of the Table code you could change those to list code - if you take a look at the Theme files and comepare with the edits of this mod - I don't see how it would need to change alot but then i don't want to mess with code and mess up my site.
Any ideas?
Not really right now, but I will take a quick look into it when I get back to this mod. It won't be real soon though as I have another project in the works.
Does this work with SMF 2.0 Beta 4 yet?
Quote from: antechinus on January 08, 2009, 10:09:40 PM
It shouldn't be that hard to adapt the code for 2. As for upgrading the mod, considering how close RC1 is there would be little point playing with a 2b4 version.
See answer from above
ok i left for awile .... im back now :P
just installed smf 1.1.7
would love to have ficons or icons for different forum cateogories
so if possiable can there be a update on this mod BIG GUY
Well, for the record I did read all 23 pages of this thread. ;)
Anyhow... I still have some questions:
1) I'm on SMF 1.1.7 and am unclear on which version of CBI I should be installing. I've seen some people on 1.1.x state that they installed CBI15 and no one saying anything wrong about that, yet the main page for this mod states "cbi 1.5 is ONLY for SMF 2.0" and if I try to install 1.5 it fails on 2 files, while 1.0a installs without error.
2) When I install 1.0a (again, on SMF 1.1.7) the default icons vanish and I see the text "New posts" or "No new posts" in their place. From what I read in this thread, that should not happen... according to the info in this thread, the mod should revert to the default icons automatically if no per-forum icon set is present. I don't want to be forced to have to recreate all my icon sets up-front, or before I create a new board. The stated behavior would be ideal, but the actual behavior is problematic.
1.0a is the version you want. check all the edits to make sure they were all added right. :)
Quote from: Bigguy on January 29, 2009, 04:56:09 AM
1.0a is the version you want. check all the edits to make sure they were all added right. :)
Well they seem to be added right, apply with "test successful" on both files, no errors, but it's still not working. I've tried applying them several times now.
Here are the files (after applying CBI10a)
Have you put the icons in the right spot, cleared your cache and are you using .png images. ???
Quote from: Bigguy on January 29, 2009, 05:28:54 PM
Have you put the icons in the right spot, cleared your cache and are you using .png images. ???
Not yet but read my question #2. The original icons should show until I make the replacement ones. The problem is, after installing the mod the originals disappear.
This runs contrary to the appropriate behavior as stated several times in this thread. For example, on page 6 you clearly state yourself:
QuoteNothing is done to the default icons. If the new custom ones aren't there then the default are supposed to show.
That's not what's happening.
Post your url or PM it to me and I will see whats up when I get home from work.
Hi Bigguy! I made a brand new SMF 1.1.7 forum last week. I'd love to use your mod and wasn't sure which package to use, so since "cbi 1.5" is closest to what I have, I tried to install that but got this error below. Please let me know if I should try to install the cbi 1.1 or 1.1a, or just wait for an upgrade.
Also, I can see you've worked on this a lot and been very helpful to others. It must be tiring at times. Thank you for your time and effort on this even it if doesn't work out for my version.
QuoteError in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Try cbi 1a it should work for you. I have to do some serious updates on this mod and that will be coming soon. :)
2.0 updates? :)
Quote from: Bigguy on February 04, 2009, 12:25:38 PM
I have to do some serious updates on this mod and that will be coming soon. :)
Just an fyi, First thanks the mod works great as best I can tell so for. I am using 1.1.8 and the manual install instructions state "forum/Themes/default/icons/board_id/on.gif" however the mod code as written is calling for .png files. I did not catch this as I read the instructions..go figure huh?... anyway that made for a bit more work converting files to .png after having spent several hours making icons that were gif's. Just thought that you should know and perhaps update the instructions before someone else runs into the same issue, or perhaps have the mod work with png/gif/jpg etc etc
Thanks
Hi, this mod works on 2.0 RC1?
Quote from: Bigguy on February 05, 2009, 07:25:33 AM
Quote from: Bigguy on February 04, 2009, 12:25:38 PM
I have to do some serious updates on this mod and that will be coming soon. :)
why doesn't anyone read 3-4 posts back?
Hello
I have this theme in my forum http://www.simplemachines.org/community/index.php?topic=266912.0 what Mod do I have to use?I tried everything but I do not see how to make it work....Can you help me please
Thanks
what version of SMF are you running? If you are using 1.1.x, you will have to manually apply mods into any custom themes.
Quote from: Bigguy on February 05, 2009, 07:25:33 AM
Quote from: Bigguy on February 04, 2009, 12:25:38 PM
I have to do some serious updates on this mod and that will be coming soon. :)
lol BigGuy, have a cold drink ;)
i know how busy you have been..
I have installed the cbi 1.0 on SMF 1.15 automatically on default, also have copied the modified board.index and message.index from default to my theme folder, and have certified that the code is there. Also, I have upload the .gif images to theme/icons/board_id/ folder and it doesn't work. Tried different ids (1, 2, 3, etc...) and it only outputs the default .gif.
I'm a bit frustrated because everything seems to be alright.
Figured it out:
I was putting the .gifs on theme/images/icons/board_id...
good deal flickernever ;)
The mod downloaded great now all I require help with is the rest of it.
What do we do now? Is it possible for a step by step instruction please.
Upload to the package manager and install. Then follow the directions in the readme. In the instructions where it says "board_icon" That means the number of the board you want to image to show for.
Brilliant mod i think i have worked it out,now just need to get the pics :)
We are currently testing a new bug free version of cbi that works with SMF 2.0 RC1-1. It should be ready shortly. ;)
This is ready for download. For now it will just be at my site but we will soon get it up to the downloads area here.
Ok here is the next version. Bugs have been fixed and it is compatible with SMF 2.0 There is alot more to come for this mod. :-X If there are no problems I will upload to the mod site later.
Quote from: Bigguy on June 05, 2009, 08:41:14 PM
Ok here is the next version. Bugs have been fixed and it is compatible with SMF 2.0 There is alot more to come for this mod. :-X If there are no problems I will upload to the mod site later.
this for 1.1.9 ?
SMF 2.0 Sorry I should have stated that. Earlier versions of the mod should still work with 1.1.9. However they will not be updated.
Mod site updated.
Hello Bigguy. Great mod. Installed on a friends test forum - SMF 2.0RC1-1
Installed cbi-155
Im seeing an issue:
1. Spacing for the Board Names: Board names are now pushed up against the left side of the block on all themes
If you need her test forums url I'll need to send it to you via PM
Due to a couple edits I missed that were pointed out to me just now I have updated the cbi mod once again. It should now work properly. I'm very sorry to everyone that downloaded the last one. Please, uninstall that, re-download the package (cbi155) and install it. Again I am sorry for any troubles this may have caused.
Quote from: Bigguy on June 09, 2009, 09:17:06 PM
Due to a couple edits I missed that were pointed out to me just now I have updated the cbi mod once again. It should now work properly. I'm very sorry to everyone that downloaded the last one. Please, uninstall that, re-download the package (cbi155) and install it. Again I am sorry for any troubles this may have caused.
woot thanks! Worked like a charm.
ha.. I had just finished putting before each of her board names until this was fixed LOL
Glad it worked for you. :)
Edit: Ok got it to install, however, how do I use it?
Read the readme that comes with it. It should all be explained there.
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?
Quote from: Bigguy on June 05, 2009, 09:19:57 PM
SMF 2.0 Sorry I should have stated that. Earlier versions of the mod should still work with 1.1.9. However they will not be updated.
What about the problems with the version for 1.x? Will those bugs be fixed?
I had to give up on this mod since the problems I had (see page 23) didn't get resolved. I'm on SMF 1.1.9 because I am not comfortable running pre-release code on a production site. SMF 2 could still be many months away... it's been 4 months since RC1 was released and there's talk of maybe 2 more RCs before release. I'd
really like to get this working, though. The default theme board icons make my forum look bad.
Try an early version of the mod, before 1.5.4 and see if it works. It should not have any bugs in it.
Quote from: Bigguy on June 23, 2009, 03:45:04 PM
Try an early version of the mod, before 1.5.4 and see if it works. It should not have any bugs in it.
I was using 1.0a when I tried it.
What bug did you find. I know of none that were in that version. ???
Quote from: Bigguy on June 23, 2009, 05:13:26 PM
What bug did you find. I know of none that were in that version. ???
Go back to page 23. ;)
http://www.simplemachines.org/community/index.php?topic=126263.msg1901528#msg1901528
You should really update to the latest version of SMF to keep you and your members safe. I take it you have tried the latest version as well. ??? What theme are you using. Did you install any code manually. ???
Quote from: Bigguy on June 23, 2009, 05:24:18 PM
You should really update to the latest version of SMF to keep you and your members safe.
Well, back when I wrote that post, 1.1.7
was the latest version. ;) I'm currently on 1.1.9.
QuoteI take it you have tried the latest version as well. ???
Latest (stable) version of SMF? Yes. Latest version of CBI? You told me to use 1.0a on SMF 1.1.x.
QuoteWhat theme are you using.
Default
QuoteDid you install any code manually. ???
Only those mods that required manual installation. I didn't do any custom by-hand code, no.
Try the latest version and see what happens. I would think it would give some errors but try it anyway.
Quote from: Bigguy on June 23, 2009, 06:32:30 PM
Try the latest version and see what happens. I would think it would give some errors but try it anyway.
Heh, you make me nervous now. :)
It indeed does fail on the following files:
./Themes/default/MessageIndex.template.php
./Themes/default/BoardIndex.template.php
I manually made the changes to the best of my abilities (after making backup copies, of course), then forced the install and copied over my changed files. Same problem as before: all the boards/topics show "No icon set" instead of the default icon. According to your posts, even with this mod the default icon should be shown unless one has been set up properly.
I've uninstalled and copied the original files back pending your next suggestion.
The new version will say "No icon set" instead of showing the default icons. If you do get that message then it should have installed fine. I will have to fix that. Sorry for any inconvenience.
Quote from: Bigguy on June 23, 2009, 08:28:40 PM
The new version will say "No icon set" instead of showing the default icons. If you do get that message then it should have installed fine. I will have to fix that. Sorry for any inconvenience.
Ok good to know, at least you understand what's going on now. Unfortunately I don't want to have to be forced to make icons for all boards... I want it to just show the custom icons if they exist on a per-board basis, otherwise the default icons. This matches up with how you said the mod works earlier in this thread. ;)
Let me know once you've fixed this and I'll give it another shot. Thanks!
Yes I guess I should change the thread a little and do a bit more work on the mod. I have time now so we'll see what happens in the next little while.
Did child board support get broken in the newest release? I upgraded to the newest version from 2 beta and reinstalled the cbi and now my child boards don't work. Did I mess something up?
Did you have to install manually. Are you using a custom theme. ???
No I am using the default theme. INstalled it with the package manager...
http://www.crossroadsparanormal.com/forum/ (http://www.crossroadsparanormal.com/forum/)
Did you make a folder named 12 and put it in the icons folder and add your on off images to that.
Yes sir I have 1 thru 65 there.
Funny thing is if I right click one of the child boards that says No Icon Set I get this path which should not be the case: http://crossroadsparanormal.com/forum/Themes/default/images/off.png
Hmm, I'll try to get the time to test this tonight on a new install to see what happens.
Hi Big Guy.
I think I mentioned this before but on my forum. If the images arent set, rather than getting the original smf images for on and off I get the message no icon set
http://www.whitbyseaanglers.co.uk/forum/index.php?board=40.0
Yes I have heard this a couple times now. I am going to have to look at the code and release another update soon. Not sure why at the present moment it isn't working. I will get this worked out though. :)
Your the man.
Many thanks big guy
Quote from: Bigguy on July 04, 2009, 04:52:28 PM
Yes I have heard this a couple times now. I am going to have to look at the code and release another update soon. Not sure why at the present moment it isn't working. I will get this worked out though. :)
Hey man, any luck? Not trying to be a pest... just that my forum's activity and membership has started to grow really rapidly and I'm getting lots of comments about the lame default SMF board icons. :)
Look forward to the fix... thanks!
Any luck with the child boards not working?
Haven't had time to look things over. R/L keeps showing it's ugly head, lol. I will get to this soon. I have my wedding coming up in a week so right now I am a little busy. ;)
Hello
Last night changed the forum to 1.1.10 and I can not add the module, as would the support for the new vercion SMF look forward. thanks!
A wedding is more important then the update dude, have fun and good luck
Quote from: sremick on July 14, 2009, 11:02:32 AM
Quote from: Bigguy on July 04, 2009, 04:52:28 PM
Yes I have heard this a couple times now. I am going to have to look at the code and release another update soon. Not sure why at the present moment it isn't working. I will get this worked out though. :)
Hey man, any luck? Not trying to be a pest... just that my forum's activity and membership has started to grow really rapidly and I'm getting lots of comments about the lame default SMF board icons. :)
Look forward to the fix... thanks!
If you need help,give me a message if your having trouble with making the folder location for the icon i might be able to help,im no star but i can try to help,as you can see here i have worked out where the icons go http://wewantsport.com/index.php?board=2.0
Nice mod, thx.
Hello Guys,
I am running smf 2.0 rc1.2
I uploaded and tried to install it and this is what it says, I uploaded the 1.5.5 the lastet version of cbi.
Install Actions
Installations actions for "cbi, 1.0":
Installing this package will perform the following actions: Type Action Description
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
What should I do ? Any hints?
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..)
Great mod!
Where can I get some icons to use in place of the SMF icons to go with this mod?
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">
></h4>'; else174
you are missing a carriage return after the ; (before the else)
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!
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.
^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 latest version of this mod ONLY supports .png I'm sure it says so on the downloads page. :)
This mod does not seem to work on certain themes like Extreme6
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
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?
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. :)
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.phpFind:
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>';
I need help adding this to my custom theme..cant get it to work
@ Guardog: Did you try clearing your cache and pressing ctrl + f5 ???
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
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.
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
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 ;)
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
Ah, so sorry I misunderstood that. thanks for posting that code. When I get a minute I will look it over and update the mod. I will also see what can be done about the other problem. Thanks for clearing that up. :)
No thank you! :)
Quote from: Yahmez on September 24, 2009, 11:16:56 PM
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 ;)
Ok here is...if someone could add the code in for me to enable this I would be in debt forever :)
Board index template
<?php
// Version: 2.0 Beta 4; BoardIndex
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show some statistics if stat info is off.
if (!$settings['show_stats_index'])
echo '
<p id="stats">
', $txt['members'], ': ', $context['common_stats']['total_members'], ' &#8226; ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' &#8226; ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
', ($settings['show_latest_member'] ? '<br />' . $txt['welcome_member'] . ' <b>' . $context['common_stats']['latest_member']['link'] . '</b>' . $txt['newest_member'] : '') , '
</p>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var smfNewsFadeToggle = new smfToggle("smfNewsFadeScroller", ', empty($options['collapse_news_fader']) ? 'false' : 'true', ');
smfNewsFadeToggle.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
smfNewsFadeToggle.setOptions("collapse_news_fader", "', $context['session_id'], '");
smfNewsFadeToggle.addToggleImage("newsupshrink", "/collapse.gif", "/expand.gif");
smfNewsFadeToggle.addTogglePanel("smfNewsFader");
// ]]></script>
<div class="tborder marginbottom">
<h4 id="newsfader" class="catbg headerpadding">
<a href="#" onclick="smfNewsFadeToggle.toggle(); return false;">', $txt['news'], '</a>
</h4>
<div id="smfNewsFader"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>
<div id="smfFadeScroller"><span>', $context['news_lines'][0], '</span></div>
</div>
</div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";
var foreColor, foreEl, backEl, backColor;
if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;
backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(foreEl, null).getPropertyCSSValue("color") == null && typeof(foreEl.parentNode) != "undefined" && typeof(foreEl.parentNode.tagName) != "undefined")
foreEl = foreEl.parentNode;
foreColor = document.defaultView.getComputedStyle(foreEl, null).getPropertyValue("color").match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).getPropertyCSSValue("background-color") == null && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;
backColor = document.defaultView.getComputedStyle(backEl, null).getPropertyValue("background-color");//.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}
// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>';
}
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
foreach ($context['categories'] as $category)
{
echo '
<div class="categoryframe tborder">
<h4 class="catbg headerpadding">';
// If this category even can collapse, show a link to collapse it.
echo $category['link'];
echo '
</h4>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<table cellspacing="0" class="bordercolor boardsframe">';
/* 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="windowbg4">
<td class="icon">
<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'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<h3><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
// 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'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';sesc=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
<br/><span class="listings">', $board['description'] , '';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<br/>', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']),'';
echo '
</span>
</h3>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="smalltext 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 '
', $board['posts'], ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' ',$txt['in'],' ', $board['is_redirect'] ? '' : $board['topics'] . ' ' . $txt['board_topics'];
if (!$context['user']['is_guest'] && !empty($board['last_post']['id']))
echo '
<a class="smalltext up1" href="', $scripturl, '?action=unread;board=', $board['id'], '"> (', $txt['view_unread_category'], ')</a>';
if (!empty($board['last_post']['id']))
echo '
<br /><strong>', $txt['latest'],':</strong> ',$board['last_post']['time'], ' <br />
', $board['last_post']['link'], ' ', $txt['by'], ' ', $board['last_post']['member']['link'];
echo '
</td>
</tr>';
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . $child['topics'] . ', ' . $txt['posts'] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . $child['posts'] . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';sesc=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : '' .$child['link'] ;
}
echo '
<tr>
<td colspan="3" class="windowbg4 smalltext childlist"><strong>', $txt['subforums'], ': </strong> ', implode(', ', $children), ' </td>
</tr>';
}
}
echo '
</table>';
}
echo '
</div>';
}
if ($context['user']['is_logged'])
{
echo '
<div id="posticons" class="clearfix marginbottom">
<div class="smalltext floatleft headerpadding">
<img src="' . $settings['images_url'] . '/new_some.png" alt="" align="middle" style="margin-left: 1ex;" /> ', $txt['new_posts'], '
<img src="' . $settings['images_url'] . '/new_none.png" alt="" align="middle" style="margin-left: 3ex;" /> ', $txt['old_posts'], '
</div>';
// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;sesc=' . $context['session_id']),
);
// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
template_button_strip($mark_read_button, 'top');
echo '
</div>';
}
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Info center collapse object.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// And create the info center object.
var infoHeader = new smfToggle("upshrinkIC", ', empty($options['collapse_header_ic']) ? 'false' : 'true', ');
infoHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
infoHeader.setOptions("collapse_header_ic", "', $context['session_id'], '");
infoHeader.addToggleImage("upshrink_ic", "/collapse.gif", "/expand.gif");
infoHeader.addTogglePanel("upshrinkHeaderIC");
// ]]></script>';
// Here's where the "Info Center" starts...
echo '
<div class="tborder clearfix" id="infocenterframe">
<h4 class="catbg headerpadding">
<a href="#" onclick="infoHeader.toggle(); return false;">', $txt['information'], '</a>
</h4>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
// If they are logged in show a personal message bar.
if ($context['user']['is_logged'])
{
echo '
<div class="infocenter_section">
<div class="windowbg5">
<p class="section">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.png" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
</p>
<div class="sectionbody"><table width="100%"><tr><td class="smalltext">
<strong>', $txt['hello_member_ndt'], ' ', $context['user']['name'], ', </strong>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt['msg_alert_you_have'], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since'], '</a> <a href="', $scripturl, '?action=unreadreplies">', $txt['new_since'], '</a>';
echo '
</td><td class="smalltext" width="244">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" id="infosearch" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" />
</form> <a href="', $scripturl, '?action=search">',$txt['search_advanced_op'],'</a> <img src="', $settings['images_url'], '/buttons/search.gif" alt="" />
</td></tr></table>
</div>
</div>
</div>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="infocenter_section">
<div class="windowbg5">
<p class="section">
<a href="', $scripturl, '?action=stats"><img src="', $settings['images_url'], '/info.png" alt="', $txt['forum_stats'], '" /></a>
</p>
<div class="sectionbody"><table width="100%"><tr><td class="smalltext">
', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <b> ' . $context['common_stats']['latest_member']['link'] . '</b>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <b>"' . $context['latest_post']['link'] . '"</b><br />' : ''), '';
echo '
', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '
</td><td class="smalltext" width="242">
<a href="', $scripturl, '?action=mlist">', $txt['view_mlist'], '</a><br />
<a href="', $scripturl, '?action=recent">', $txt['view_posts'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['view_stats'] . '</a>' : '', '
</td></tr></table>
</div>
</div>
</div>';
}
// "Users online" - in order of activity.
echo '
<div class="infocenter_section">
<div class="windowbg5">
<p class="section">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img src="', $settings['images_url'], '/online.png', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
</p>';
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
echo '
<div id="onlineIC">
<span class="smalltext"> ', sprintf($txt['active_15'], $modSettings['lastActive']), ' ';
if (!empty($context['users_online']))
{
echo '
',implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</span></div>';
echo '
<span class="smalltext">
',$txt['on_now'],'', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = $context['num_buddies'] . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = $context['num_users_hidden'] . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
echo $context['show_who'] ? '</a>' : '', '
', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</div>
</div>';
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="infocenter_section">
<h4 class="headerpadding catbg">',$txt['calendar_upcoming'],'</h4>
<div class="windowbg2 smalltext">
<p class="section">
<a href="', $scripturl, '?action=calendar' . '"><img src="', $settings['images_url'], '/icons/calendar.png', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
</p>
<div class="sectionbody">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
echo'
<span class="holiday"><strong> ',$txt['holidays'],' </strong>';
if (!empty($context['calendar_holidays']))
echo '
', implode(', ', $context['calendar_holidays']);
echo'
</span>';
// People's birthdays. Like mine. And yours, I guess. Kidding.
echo '
<br /><span class="birthday"><strong> ', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</strong></span> ';
if (!empty($context['calendar_birthdays']))
{
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<b>' : '', $member['name'], $member['is_today'] ? '</b>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
echo '
<br /><span class="event"><strong> ', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</strong></span> ';
if (!empty($context['calendar_events']))
{
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<b>' . $event['title'] . '</b>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '
(<a href="', $scripturl, '?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">', $txt['calendar_how_edit'], '</a>)';
}
echo '
</div>
</div>
</div>';
}
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<div class="infocenter_section">
<h4 class="headerpadding catbg">', $txt['recent_posts'], '</h4>
<div class="windowbg2">
<p class="section">
<a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/recent.png" alt="', $txt['recent_posts'], '" /></a>
</p>
<div class="sectionbody hslice" id="recent_posts_content"><div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div><div class="entry-content" style="display: none;"><a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a></div>';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<br />
<p id="infocenter_onepost" class="smalltext" align="center">
<strong>"', $context['latest_post']['link'], '"</strong> ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="infocenter_recentposts" class="middletext">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ') </dt>
<dd>', $post['time'], '</dd>';
echo '
</dl>';
}
echo '
</div>
</div>
</div>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<div class="infocenter_section">
<h4 class="headerpadding catbg">', $txt['login'], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(', $txt['forgot_your_password'], ')</a></h4>
<div class="windowbg4 sectionbody2">
<form id="infocenter_login" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
<ul class="horizlist clearfix">
<li>
<label for="user"> ', $txt['username'], ':
<input type="text" name="user" id="user" size="14" /></label>
</li>
<li>
<label for="passwrd">', $txt['password'], ':
<input type="password" name="passwrd" id="passwrd" size="14" /></label>
</li>
<li>
<label for="cookielength">', $txt['mins_logged_in'] , ':
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</li>
<li>
<input type="submit" class="smalltext" id="botlog" value="', $txt['login'], '" />
</li>
</ul>
</form>
</div>
</div>';
}
echo '
</div>
</div>';
}
?>
Message index template
<?php
// Version: 2.0 Beta 4; MessageIndex
function template_main()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder marginbottom" id="childboards">
<h4 class="headerpadding catbg">', $txt['subforums'], '';
echo '
</h4>';
echo'
<table cellspacing="0" class="bordercolor boardsframe">';
foreach ($context['boards'] as $board)
{
echo '
<tr class="windowbg4">
<td class="icon">
<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'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/redirect.png" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<h3><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
// 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'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';sesc=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
<br/><span class="listings">', $board['description'] , '';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<br/>', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']),'';
echo '
</span>
</h3>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="smalltext 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 '
', $board['posts'], ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' ',$txt['in'],' ', $board['is_redirect'] ? '' : $board['topics'] . ' ' . $txt['board_topics'];
if (!$context['user']['is_guest'] && !empty($board['last_post']['id']))
echo '
<a class="smalltext up1" href="', $scripturl, '?action=unread;board=', $board['id'], '"> (', $txt['view_unread_category'], ')</a>';
if (!empty($board['last_post']['id']))
echo '
<br /><strong>', $txt['latest'],':</strong> ',$board['last_post']['time'], ' <br />
', $board['last_post']['link'], ' ', $txt['by'], ' ', $board['last_post']['member']['link'];
echo '
</td>
</tr>';
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . $child['topics'] . ', ' . $txt['posts'] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . $child['posts'] . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';sesc=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
}
echo '
<tr>
<td colspan="3" class="windowbg4 smalltext childlist"><strong>', $txt['subforums'], ': </strong> ', implode(', ', $children), '</td>
</tr>';
}
}
echo '
</table>
</div>';
}
if (!empty($options['show_board_desc']) && $context['description'] != '')
{
echo '
<div id="description" class="tborder">
<div class="titlebg2 largepadding smalltext">', $context['description'], '</div>
</div>';
}
// Create the button set...
$normal_buttons = array(
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id']),
'notify' => array('test' => 'can_mark_notify', 'text' => 'notify', 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');"', 'url' => $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'new_topic' => array('test' => 'can_post_new', 'text' => 'new_topic', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'),
'post_poll' => array('test' => 'can_post_poll', 'text' => 'new_poll', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),
);
// They can only mark read if they are logged in and it's enabled!
if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
unset($normal_buttons['markread']);
if (!$context['no_topic_listing'])
{
echo '
<div id="modbuttons_top" class="modbuttons clearfix margintop">
<div class="floatleft middletext">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#bot"><b>' . $txt['go_down'] . '</b></a>' : '', '</div>
', template_button_strip($normal_buttons, 'bottom'), '
</div>';
// If Quick Moderation is enabled start the form.
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
echo '
<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm">';
echo '
<div class="tborder" id="messageindex">
<table cellspacing="0" class="bordercolor boardsframe">
<thead>
<tr>';
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th width="6%" colspan="1" class="windowbgS2 headerpadding"> </th>
<th class="windowbgS3 headerpadding" align="left"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">' ,$txt['sort_topic_starter'],' </a></th>
<th class="windowbgS4 headerpadding" width="230" align="left"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">',$txt['sort_last_poster'],'</a></th>
';
// Show a "select all" box for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<th class="catbg3 headerpadding" width="24">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="check" />
</th>';
// If it's on in "image" mode, don't show anything but the column.
elseif (!empty($options['display_quick_mod']))
echo '
<th class="catbg3 headerpadding" width="4%"></th>';
}
// No topics.... just say, "sorry bub".
else
echo '
<th class="catbg3" colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th>';
echo '
</tr>
</thead>
<tbody>';
if (!empty($settings['display_who_viewing']))
{
echo '
<tr>
<td colspan="' , !empty($options['display_quick_mod']) ? '8' : '7' , '" class="windowbg5 headerpadding smalltext">';
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
else
echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
</td>
</tr>';
}
// If this person can approve items and we have some awaiting approval tell them.
//NOTE: TEST THE COLSPAN HERE. New SMF 2 feature that needs to be checked.
if (!empty($context['unapproved_posts_message']))
{
echo '
<tr class="windowbg">
<td colspan="' , !empty($options['display_quick_mod']) ? '8' : '7' , '" class="smalltext headerpadding">
<span style="color: red;">!</span> ', $context['unapproved_posts_message'], '
</td>
</tr>';
}
foreach ($context['topics'] as $topic)
{
// Do we want to seperate the sticky and lock status out?
if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'sticky') !== false)
$topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_sticky'));
if (!empty($settings['separate_sticky_lock']) && strpos($topic['class'], 'locked') !== false)
$topic['class'] = substr($topic['class'], 0, strrpos($topic['class'], '_locked'));
// Calculate the colour class of the topic.
if ($context['can_approve_posts'] && $topic['unapproved_posts'])
$color_class = $topic['approved'] ? 'approvebg' : 'approvetbg';
else
$color_class = !empty($settings['separate_sticky_lock']) && $topic['is_sticky'] ? 'windowbgS' : 'windowbg4';
echo '
<tr>
<td class="windowbg4 icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="subject ', $color_class, '" ', (!empty($topic['quick_mod']['remove']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : ''), '>';
echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? ' <em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</b>' : '
' , $topic['is_sticky'] ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" id="stickyicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '';
// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
echo '
<span id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</span><br />
<span class="smalltext">', $txt['started_by'],'<strong> ', $topic['first_post']['member']['link'], '</strong>
<strong>', $topic['replies'], '</strong> ', $txt['replies'],' <strong>', $topic['views'], '</strong> ', $txt['views'],'</span>
</td>
<td class="windowbg4 replies">';
if (!empty($settings['separate_sticky_lock']))
echo '
' , $topic['is_locked'] ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" id="lockicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '' , '';
echo'
<span class="smalltext">
<a href="', $topic['last_post']['href'], '"><strong>', $txt['latest'],'</strong> </a>',$txt['by'],' ', $topic['last_post']['member']['link'], '<br />
', $topic['last_post']['time'], '
</span>
</td>';
// Show the quick moderation options?
if (!empty($options['display_quick_mod']))
{
echo '
<td class="windowbg' , $topic['is_sticky'] ? '3' : '' , ' moderation">';
if ($options['display_quick_mod'] == 1)
echo '
<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="check" />';
else
{
// Check permissions on each and show only the ones they are allowed to use.
if ($topic['quick_mod']['remove'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=remove;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.gif" width="16" alt="', $txt['remove_topic'], '" title="', $txt['remove_topic'], '" /></a>';
if ($topic['quick_mod']['lock'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=lock;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.gif" width="16" alt="', $txt['set_lock'], '" title="', $txt['set_lock'], '" /></a>';
if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
echo '<br />';
if ($topic['quick_mod']['sticky'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=sticky;sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.gif" width="16" alt="', $txt['set_sticky'], '" title="', $txt['set_sticky'], '" /></a>';
if ($topic['quick_mod']['move'])
echo '<a href="', $scripturl, '?action=movetopic;board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.gif" width="16" alt="', $txt['move_topic'], '" title="', $txt['move_topic'], '" /></a>';
}
echo '
</td>';
}
echo '
</tr>';
}
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
{
echo '
<tr class="catbg headerpadding">
<td colspan="8" align="right">
<select name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
<option value="">--------</option>
', $context['can_approve'] ? '<option value="approve">' . $txt['quick_mod_approve'] . '</option>' : '', '
', $context['can_remove'] ? '<option value="remove">' . $txt['quick_mod_remove'] . '</option>' : '', '
', $context['can_lock'] ? '<option value="lock">' . $txt['quick_mod_lock'] . '</option>' : '', '
', $context['can_sticky'] ? '<option value="sticky">' . $txt['quick_mod_sticky'] . '</option>' : '', '
', $context['can_move'] ? '<option value="move">' . $txt['quick_mod_move'] . ': </option>' : '', '
', $context['can_merge'] ? '<option value="merge">' . $txt['quick_mod_merge'] . '</option>' : '', '
', $context['can_restore'] ? '<option value="restore">' . $txt['quick_mod_restore'] . '</option>' : '', '
<option value="markread">', $txt['quick_mod_markread'], '</option>
</select>';
// Show a list of boards they can move the topic to.
if ($context['can_move'])
{
echo '
<select id="moveItTo" name="move_to" disabled="disabled">';
foreach ($context['move_to_boards'] as $category)
{
echo '
<optgroup label="', $category['name'], '">';
foreach ($category['boards'] as $board)
echo '
<option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>';
echo '
</optgroup>';
}
echo '
</select>';
}
echo '
<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' && confirm(\'', $txt['quickmod_confirm'], '\');" />
</td>
</tr>';
}
echo '
</tbody>
</table>
</div>
<a name="bot"></a>';
// Finish off the form - again.
if (!empty($options['display_quick_mod']) && !empty($context['topics']))
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
</form>';
echo '
<div id="modbuttons_bottom" class="modbuttons clearfix marginbottom">
<div class="floatleft middletext">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
', template_button_strip($normal_buttons, 'top'), '
</div>';
}
// Show breadcrumbs at the bottom too?
echo '
<div class="marginbottom">', theme_linktree(), '</div>';
echo '
<div class="tborder clearfix" id="topic_icons">
<div class="catbg clearfix">
<p class="floatright" id="message_index_jump_to"> </p>';
if (!$context['no_topic_listing'])
echo '
<span class="smalltext" >
<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt['locked_topic'] . ' ' . ($modSettings['enableStickyTopics'] == '1' ? '
<img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['sticky_topic'] . ' ' : '') . ($modSettings['pollMode'] == '1' ? '
<img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['poll'] : '') . '
</span>';
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
if (typeof(window.XMLHttpRequest) != "undefined")
aJumpTo[aJumpTo.length] = new JumpTo({
sContainerId: "message_index_jump_to",
sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
iCurBoardId: ', $context['current_board'], ',
iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
sCurBoardName: "', $context['jump_to']['board_name'], '",
sBoardChildLevelIndicator: "==",
sBoardPrefix: "=> ",
sCatSeparator: "-----------------------------",
sCatPrefix: "",
sGoButtonLabel: "', $txt['go'], '"
});
// ]]></script>
</div>
</div>';
// Javascript for inline editing.
echo '
<script language="JavaScript" type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/xml_board.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Hide certain bits during topic edit.
hide_prefixes.push("lockicon", "stickyicon", "pages", "newicon");
// Use it to detect when we\'ve stopped editing.
document.onclick = modify_topic_click;
var mouse_on_div;
function modify_topic_click()
{
if (in_edit_mode == 1 && mouse_on_div == 0)
modify_topic_save("', $context['session_id'], '");
}
function modify_topic_keypress(oEvent)
{
if (typeof(oEvent.keyCode) != "undefined" && oEvent.keyCode == 13)
{
modify_topic_save("', $context['session_id'], '");
if (typeof(oEvent.preventDefault) == "undefined")
oEvent.returnValue = false;
else
oEvent.preventDefault();
}
}
// For templating, shown when an inline edit is made.
function modify_topic_show_edit(subject)
{
// Just template the subject.
setInnerHTML(cur_subject_div, \'<input type="text" name="subject" value="\' + subject + \'" size="60" style="width: 95%;" maxlength="80" onkeypress="modify_topic_keypress(event)" /><input type="hidden" name="topic" value="\' + cur_topic_id + \'" /><input type="hidden" name="msg" value="\' + cur_msg_id.substr(4) + \'" />\');
}
// And the reverse for hiding it.
function modify_topic_hide_edit(subject)
{
// Re-template the subject!
setInnerHTML(cur_subject_div, \'<a href="', $scripturl, '?topic=\' + cur_topic_id + \'.0">\' + subject + \'<\' +\'/a>\');
}
// ]]></script>';
}
function theme_show_buttons()
{
global $context, $settings, $options, $txt, $scripturl;
$buttonArray = array();
// If they are logged in, and the mark read buttons are enabled..
if ($context['user']['is_logged'] && $settings['show_mark_read'])
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id'] . '">' . $txt['mark_read_short'] . '</a>';
// If the user has permission to show the notification button... ask them if they're sure, though.
if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' . $scripturl . '?action=notifyboard;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';board=' . $context['current_board'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']) . '\');">' . $txt['notify'] . '</a>';
// Are they allowed to post new topics?
if ($context['can_post_new'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0">' . $txt['new_topic'] . '</a>';
// How about new polls, can the user post those?
if ($context['can_post_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll">' . $txt['new_poll'] . '</a>';
return implode(' | ', $buttonArray);
}
?>
Quote from: Blah blah on September 25, 2009, 02:43:55 AM
Ok here is...if someone could add the code in for me to enable this I would be in debt forever :)
Here try these:
K thanks I'll add these soon :) ....where do I need to put the icons though (folder) ?
/Themes/default/icons/BOARD ID/off.png
board id should be a number... like 1
Ok thx but dont I need to add it to my custom theme folder instead of the default folder?
Quote from: Blah blah on September 25, 2009, 04:01:58 PM
Ok thx but dont I need to add it to my custom theme folder instead of the default folder?
Not too sure on that... I use it on the default theme.
Quote from: Yahmez on September 25, 2009, 06:11:52 PM
Quote from: Blah blah on September 25, 2009, 04:01:58 PM
Ok thx but dont I need to add it to my custom theme folder instead of the default folder?
Not too sure on that... I use it on the default theme.
Well I figured it out thanks for all your help :D
My theme got a tad bit messed up in the process lol but Ill figure out how to fix it :)
Ok I added the same board icons for the child boards as the parent boards have but if there is unread topics in the child and not the parent boards the default icon shows? Any fix for that?
its a good mod but can some one make it possible that if you make a new board you can choose directly a image as board icon or upload it when you create a board.
this is beter than creating for every board a map with off,on and on2.png image.
i will like this very much to be possible
sorry for my bad english i am dutch.
i have version SMF 2.0 RC1.2
greetings,
Dyrome
dyrome,
almost anything is POSSIBLE. However, this is actually a very simple mod.... and what you are asking for is MUCH more involved.
Quote from: Blah blah on September 28, 2009, 12:54:52 PM
Ok I added the same board icons for the child boards as the parent boards have but if there is unread topics in the child and not the parent boards the default icon shows? Any fix for that?
Quote from: Blah blah on September 28, 2009, 12:54:52 PM
Ok I added the same board icons for the child boards as the parent boards have but if there is unread topics in the child and not the parent boards the default icon shows? Any fix for that?
Are you saying that in board 3 for instance you have a
.../icons/3/on.png
.../icons/3/on2.png
where your on.png is the parent board, on2.png is the child and a duplicate of on.png? If you have it set up like that it should work.
If not you could always change this part of the code:
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['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
}
to this
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on.png'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on.png';
else
$childboard_new_img=$settings['images_url']. '/on2.png';
echo '<img src="', $childboard_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
}
Oh no I didn't have it set up like that lol
I had it like...say the parent is board 3 and the child 4 I had 2 different folders with the same on/off png's
Didn't know they needed to be in the parents folder :) thanks
Quote from: Blah blah on September 30, 2009, 02:23:31 AM
Oh no I didn't have it set up like that lol
I had it like...say the parent is board 3 and the child 4 I had 2 different folders with the same on/off png's
Didn't know they needed to be in the parents folder :) thanks
After getting some sleep... I think I told you wrong.
Let's assume board 3 is the parent and 4 is the child.
.../icons/
3/on.png is the new posts icon for the parent board
.../icons/
3/on2.png is the new posts icon for the child board (on the board index)
.../icons/
4/on.png is the new posts icon for the child board (in the message index)
Ah I got you :) thanks for the fix
Hello,
AFAIK, same mod will work on RC1.1 and RC 2.2. So please, can you update this mode to be able to install on RC 1.2 too.
I have it installed on 2.0 RC 1.2
It installed without errors and afterward I edited the mod to my liking... anyways it should work for you.
I got this working on 2.0 RC2 Sort of....
It is a stripped down version that does not default back to the standard board icons if new ones are not present. But if you have all your board icons set up they should work.
This should get us by until Bigguy gets the chance to update for 2.0 RC2
BoardIndex.template.php
Find:
// 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'], '/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'], '/redirect.png" alt="*" title="*"/>';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'],'/', $context['theme_variant'], '/off.png" alt="', $txt['old_posts'],'" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'],'" name="b', $board['id'], '">', $board['name'], '</a>';
Replace With:
// 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'], '/icons/', $board['id'], '/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'], '/redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant'], '/icons/', $board['id'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
MessageIndex.template.php
Find:
// 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'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant'], '/redirect.png" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
Replace With:
// 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'], '/icons/', $board['id'], '/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'], '/redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant'], '/icons/', $board['id'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
I just came back to SMF after a couple months on a sub par forum. It feels great to be back.
This mod was one of my favorite. Is there any word on a version for RC2?
Thanks for posting that Yahmez. I have not had a chance to do much with this mod recently. I will see what I can come up with in the next little while. (week or so.) That is all I can promise right now.
Quote from: Bigguy on November 12, 2009, 08:07:26 PM
Thanks for posting that Yahmez. I have not had a chance to do much with this mod recently. I will see what I can come up with in the next little while. (week or so.) That is all I can promise right now.
No problem Bigguy! I ♥ CBI!
And I want to upgrade soon, with so many mods installed I have to start on my own. Thank you for the great mods and support!
Oh, i need this mod RC2 version! thanks!
This mod is just what I'm looking for but can I use it as a Site Admin ie. with no access to cpanel?
Now it's using the .png extension I'm wondering if I can host the image as for any other photo then insert the code with the img tags.
What I'm planning to do is use the same image in all boards.
Yogi,
In order to use this, you would need to have either cpanel or ftp access to the site.
There is no admin interface... Since there is no admin interface, there is nowhere for you to add the filename.... the filenames and locations are hardcoded to be the THEME/Images/boardID/on.png, off.png and on2.png
If you want to use the same image for all boards, then there i no need for this mod... just replace the theme's default copies of on.gif, on2.gif and off.gif.
Thanks, Kindred.
Quote from: ҰΛĥmΞڃ on November 09, 2009, 06:52:10 PM
I got this working on 2.0 RC2 Sort of....
It is a stripped down version that does not default back to the standard board icons if new ones are not present. But if you have all your board icons set up they should work.
This should get us by until Bigguy gets the chance to update for 2.0 RC2
BoardIndex.template.php
Find:
// 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'], '/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'], '/redirect.png" alt="*" title="*"/>';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'],'/', $context['theme_variant'], '/off.png" alt="', $txt['old_posts'],'" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'],'" name="b', $board['id'], '">', $board['name'], '</a>';
Replace With:
// 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'], '/icons/', $board['id'], '/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'], '/redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant'], '/icons/', $board['id'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
MessageIndex.template.php
Find:
// 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'], '/on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant'], '/redirect.png" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
Replace With:
// 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'], '/icons/', $board['id'], '/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'], '/redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant'], '/icons/', $board['id'], '/off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
Thx for the code, but when I insert the code, I have to move the icons to /Themes/default/images/icons
or the icons aren't to see. :-[
Quote from: Manu0372 on November 22, 2009, 11:57:14 AM
Thx for the code, but when I insert the code, I have to move the icons to /Themes/default/images/icons
or the icons aren't to see. :-[
That should be the correct location. The version I provided does not default back to the original icons if no new ones are found. So after installing, if you do not have the icons in place you will see the 'alternate text' instead of an ico