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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi18.tinypic.com%2F8gf3dvm.jpg&hash=86dca0987410183da3fdede98eb6a8e24a115e34)
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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg509.imageshack.us%2Fimg509%2F3166%2Fboardsxp7.th.jpg&hash=76a411cf67fcf3dccfad47f5ca3295e6d34e4f75) (http://img509.imageshack.us/my.php?image=boardsxp7.jpg)
This second image is the child board of "Deportes" board
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg404.imageshack.us%2Fimg404%2F408%2Fchildboardsku1.th.jpg&hash=b9d4877e863174e519a72a03e676d556bc04ddf2) (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:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg504.imageshack.us%2Fimg504%2F1485%2Ferroryk1.jpg&hash=40b3e06980c75aff2d9117ea0b672a7ba51e815a)
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.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg301.imageshack.us%2Fimg301%2F6226%2Fclipboard1hx6.jpg&hash=1e852d5bd0238c767b2b182a8696e73920a9ce86) (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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.hdd.pt%2F%2Fthumbs%2F%2F1074686248.jpg&hash=da421826985ef1581af939e172bc18b18ebed01d) (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...
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fultraphoto.org%2Fimages%2Fa45rgie7vm9nxeggw3he_thumb.png&hash=d46d47d9aa2aa5bcb77cab39e46b616dd2a92fbc) (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 icon.
This is one of my favorite modifications for SMF. Is there any word on a version for the latest release of SMF 2?
This would definitely be something my members would like to see.
I found a version on my site that was made for SMF 2.0 but it might need some updates.
Do these modifications warn curve (new default) theme?
I have tested it once on curve and will have to do a bit of updating.
can't wait for the update on 2.0 rc2! Sweet mod...
Quote from: Xarcell on December 04, 2009, 10:38:51 PM
can't wait for the update on 2.0 rc2! Sweet mod...
Agreed!
Sorry all been working on getting a new site up and running. I will be looking at this mod later today and/or tonight if I have the time to and update it then if I can. I will test it on a live site first I guess before anything happens.
Ok, a new version has been uploaded to the mod site. it has been updated to work with SMF 2.0 RC2. I tested it and all should work fine. READ THE README FOR INSTRUCTIONS ON WHERE TO PUT THE ICONS FOLDER.
Thanks Bigguy,
I have a question. I've tried to install the mod and I get an error on the modifications to BoardIndex.template.php. As far as I can tell I haven't used any mods which effect this.
SMF 2.0 RC2
1. Custom Form Mod 1.6
2. Pretty URLs 1.0RC
3. SimplePortal 2.3.1
4. Downloads System Pro 1.0.10
5. Aeva ~ Auto-Embed Video & Audio 7.0
6. SMF Media Gallery 2.0.5
I know how to install a mod manually, but I'm curious if something is wrong with the package or with my install of SMF. It's a relatively new install, just a few weeks old. I've attached my BoardIndex.template.php so you can see it.
Thanks for any feedback you can provide.
At a quick glance it all looks fine to me and should install. Not to sure why it's not. I have installed it on two different forums now and it works fine, even on modified sites.
Alright I'll take another look. I'm not sure why it's not working either.
Edit: I just tried it on another forum I have running 2.0RC2 with no mods. It kicks back the same error. ???
I'll keep looking
It is giving me the same error.
A few things I spotted...
In the code being searched for in the boardindex:
1) There is a period before $context['theme_variant'] that is not in a non-modded boardindex.
2) There is a border="0" in there a couple times that also does not exist in a vanilla SMF2 install.
Ok, I will check it out when I get home then.
Ok version 1.5.7 has been uploaded. Although I did not find any errors with 1.5.6 I decided to check it again and upload a new copy with a different version number. If version 1.5.6 is working for the people that have it then there is no need to upgrade to version 1.5.7 (cbi 1.5.6 has been removed from the mods page)
Thanks for the update Bigguy! I got it working now.
A couple of things though. In the packages page, 1.5.7 is still listed as 1.5.6. It installed perfectly now however. In the readme it states to create files in .gif format. In SMF 2 RC2 the curve theme uses .png files.
It's working now. Thank you so much! This is one of our favorite SMF mods.
I updated the mod page and will update the readme as well, thank you for your help. :)
Ok, this is what just happened:
Updated:
mod page with correct version
readme file
version number in package-info and modifications.xml file
This should do it for updating this version....unless I have missed something else, lol. :)
I'm really grateful to you for updating it. I don't have the knowledge to do such things.
I'm just happy to have the mod on RC2. Thank you!
Your very welcome. :)
I have another question. I have the mod working (http://forum.simjunkies.org). The icons are displaying, but when you mouse over any of the board icons it says 'no icon set'. It's been a while since I used this mod. I can't remember, is this normal behavior?
No it's not, lol. I will fix that in the next version.....which at this rate should be out sometime tomorrow, lmao. :)
Quote from: Bigguy on December 13, 2009, 09:35:39 PM
No it's not, lol. I will fix that in the next version.....which at this rate should be out sometime tomorrow, lmao. :)
Cheers man. I hope you know I appreciate what you are doing. Really.
Looking forward to the next release.
i got this mod on my smf 2.0rc2 and still showme the old icons :S some of help please?
Try refreshing your browser by using ctrl +f5 See if that helps at all. If you use SMF 2.0 go into the admin panel and clear your cache as well.
sorry, my problem, i think if the mod read different img styles, .gif .jpg and etc, and just use .png, is great :)
congratulations for this mod :D
will this mod work with custom template. i dont use the default core template. can i still use this mod?
and if i am using custom template, do i structure the icons folder on my custom template directory or default core directory?
Yes, this will work in custom themes.... if your custom theme has its own copy of boardindex.template.php, you will have to manually apply the changes.
you will need a copy of the icons in each and every theme folder that you want to support.
This does, however, also give you the ability to use different icons for the different themes
Works on 1.1.11?
I doubt the current version does but one of the older ones might.
Very nice mod.
1) I have few question. On mousehover over icons I get >info<: "No icon set". Icons works fine, i only see that message on mousehover. Just wonder is that normal or not?
2) What is difference between on.png and on2.png?
I got an error when trying to install in 1.1.11, please update for this ver.
on2.png is used when there are new messages in a child board of the displayed board.
Quote from: Neubivljiv on January 03, 2010, 07:08:17 PM
1) I have few question. On mousehover over icons I get >info<: "No icon set". Icons works fine, i only see that message on mousehover. Just wonder is that normal or not?
See this post (http://www.simplemachines.org/community/index.php?topic=126263.msg2270254#msg2270254) to fix that.
Can this mod be used with Default Theme - Core 1.1.11 and in Themes\Core 2.0 RC2? Thanks
this mod can be used with any theme.... but it may require you to manually code it into boardindex.template.php in your theme
Thanks Kindred, can you give me a link as to where to learn how to do that, specially with v. 2.0 RC 2 please?
look at the manual installation instructions for the mod (link is on the mod download page)
You mean the part with the instructions as to what part to look up and then replace/add it by some other code?
yup
Thanks, I will give it a try.
Hello, I tried to manually install the codes into my Index Template file, but when I replaced what i was told to replace, my board turned into looking like this: http://www.blizzcraft.net/index.php
the icons appear, but the board is wack.
this is my code:
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'], ' • ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' • ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
', ($settings['show_latest_member'] ? '<br />' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</p>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div class="tborder marginbottom">
<h3 id="newsfader" class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
<div class="windowbg2" id="smfNewsFader">
<div id="smfFadeScroller"><span>', $context['news_lines'][0], '</span></div>
</div>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
aFaderItems: [
"',
implode('",
"', $context['fader_news_lines']), '"],
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfNewsFader\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></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)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<div class="categoryframe tborder clearfix">
<h3 class="catbg', $category['new'] ? '2' : '', '">';
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="floatright" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="', $category['collapse_href'], '">', $category['collapse_image'], '</a> ';
echo $category['link'];
echo '
</h3>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<table cellspacing="1" 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>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg icon">
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
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"> <b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';
// Has it outstanding posts for approval?
if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
echo '
<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > $board['unapproved_posts'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
</h4>
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg2 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 '
<strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'];
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'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
// 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'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $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 class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td>
</tr>';
}
}
echo '
</table>';
}
echo '
</div>';
}
if ($context['user']['is_logged'])
{
echo '
<div id="modbuttons_bottom" class="modbuttons clearfix">
<div id="posticons" class="clearfix marginbottom">
<div class="smalltext floatleft">
<img src="', $settings['images_url'], '/new_some.gif" alt="" align="middle" /> ', $txt['new_posts'], '
<img src="', $settings['images_url'], '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" /> ', $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;' . $context['session_var'] . '=' . $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>
</div>';
}
template_info_center();
}
edit - please use CODE tags instead of quote tags
We can only see a login screen. What version are you using and why are you modifying the index.template. ???
Hey, Bigguy! this mod is working very good with my smf version (1.1.11) Thanks for sharing this. :)
when I installed it, it wouldn't install onto my BlackRain theme - I'm using 2.0RC2 - so I try to add it to my template manually.
Parse the code on the mod download page and add the code where it says to. Not in the index.template.
Hello there.
I need some help.
I have a new Forum. It does not have any mod installed.
When I tried to install I had 2 errors.
1. Executar Modificación ./Themes/default/BoardIndex.template.php Prueba fallida
2. Executar Modificación ./Themes/default/MessageIndex.template.php Prueba fallida
3. Executar Modificación ./Themes/default/languages/Modifications.english.php Éxito
what place I have to edit for it work on 1.1.11?
./Themes/default/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], '" />';
echo '</a>
</td>
<td class="windowbg2"', $board['is_redirect'] && $modSettings['redirect_hide_columns'] ? ' colspan="2"' : '' , '>
<b><a href="', $board['href'], '" name="b', $board['id'], '"', ($board['is_redirect'] && $board['redirect_target'] != '') ? ' target="' . $board['redirect_target'] . '"' : '' , '>', $board['name'], '</a></b><br />
', $board['description'];
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.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">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';
and
./Themes/default/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], '" />';
echo '</a>
</td>
<td class="windowbg2"', $board['is_redirect'] && $modSettings['redirect_hide_columns'] ? ' colspan="2"' : '', '>
<b><a href="', $board['href'], '" name="b', $board['id'], '"', ($board['is_redirect'] && $board['redirect_target'] != '') ? ' target="' . $board['redirect_target'] . '"' : '' , '>', $board['name'], '</a></b><br />
', $board['description'];
Remplace 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.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>';
is it correct?
Yes those look like the edits for the most recent version of the mod.
I did it but I have an error. Forums does not display description at boards :S
thanks in advance
some help for install it at 1.1.11? :(
You should be able to run it through the parser and manually install it that way.
Quote from: Bigguy on January 21, 2010, 09:44:01 PM
You should be able to run it through the parser and manually install it that way.
I am sorry, I was using cbi157.zip for my SMF 1.1.11 :-*
Now, I have installed cbi-1a.zip manually and it works! ^^
thank you
Support for this mod can be gotten from my site. www.pctweakr.com
In the mod description you mention on, on2 and off. What are these for?
Do the icons interchange to depict new posts, no new posts and redirect board or are they static?
yes but on2.gif is for showing new posts in any child boards
Very nice. Thanks.
I've followed the mod instructions but there's no effect.
I noticed my board id is as follows:
<b><a href="http://somesite.com/forum/index.php?board=1.0" name="b1">Some board</a></b>
I've tried naming my folder 1 as instructed but no go. I've also tried naming it 1.0 and b1 but this approach does not work either.
Furthermore, I've noticed a side effect. The styling of my board titles has changed. They are now smaller and blue rather than orange.
Any ideas on where I've gone wrong?
I'm customizing a copy of curve.
Should I be editing the documents of Themes/curve Themes/core and not Themes/default?
Scratch that, default is Curve unless I'm mistaken. I've tried changing the folder name to 2, 3, 4 etc. I've checked my code and it's placement too.
Quote from: Bigguy on January 22, 2010, 06:34:11 PM
Support for this mod can be gotten from my site. www.smfhelper.info (http://www.smfhelper.info)
Cheers. Currently being supported by mod author. ;)
Installed through packages. I must have erred during the manual install. :-[
Great mod
EDIT: I had to place the 'icons' folder in the my theme folder and not default.
May I ask a quick question
My boards use off and on png
I would like to use gif
So I should change in boardindex
variant'], '/off.png" alt
to gif
Is this correct
The answer to your question should be here:
http://www.simplemachines.org/community/index.php?topic=360958.0
thanks I have sorted it............
@ xnathansxdadx: Yes
well I have tried everything, I must be missing something,,,,,,,, In my child boards which I believe are ON2 and OFF2 gifs, just will not come up in my child boards,,,,
I have a board 12 and the child is 13
I have put on on 2 etc in both these boards to try
I have made a folder 12 and 13 and changed my directories.
But can I heck get the sub,,,,,,,,,child boards to show gifs......
Akhhh sussed it
Board 12 master needs board 13 its sub,, child to be a directory in the master
so it is not board12/gifs,,,,,,,,,,,,,, board 13 gifs
its board/12/13 ..........gifs.
Sorted it now thanks.
hi
i installed it and created an icon folder in /theme/default/
and i created a folder called 1 for the board_id, and put on.png on2.png off.png into it
so the path is like myforum/theme/default/icons/1/on.png
but it doesn't show the icon
and are you using the default theme?
Quote from: Eudemon369 on February 10, 2010, 07:36:25 PM
hi
i installed it and created an icon folder in /theme/default/
and i created a folder called 1 for the board_id, and put on.png on2.png off.png into it
so the path is like myforum/theme/default/icons/1/on.png
but it doesn't show the icon
Try adding your icon folder to the folder of the theme you want the icons to work on. That's the problem/fix I had.
Let me know if it works.
Quote from: Kindred on February 10, 2010, 08:30:15 PM
and are you using the default theme?
Kindred's question is on the mark.
i've tried both custom and default theme, they both don't work
Quote from: rexusdiablos on February 11, 2010, 10:03:06 AM
Quote from: Eudemon369 on February 10, 2010, 07:36:25 PM
hi
i installed it and created an icon folder in /theme/default/
and i created a folder called 1 for the board_id, and put on.png on2.png off.png into it
so the path is like myforum/theme/default/icons/1/on.png
but it doesn't show the icon
Try adding your icon folder to the folder of the theme you want the icons to work on. That's the problem/fix I had.
Let me know if it works.
yea that works, thx a lot
hi thx for ur help last time
i just changed my forum's theme to default theme, and the custom icon doesn't work again
the path is /public_html/forum/Themes/default/icons/2/on.png
and does that file actually exist?
yes it does exist
im just giving an example how the path looks like
Are folder permissions right for the server you are on. ???
the permission is same as for the custom theme
it works on the custom theme but not the default :-\
-------------
oh never mind, my problem is solved
cuz when i uploaded again to the default theme, i forgot to change the format, the img were in jpg, after i changed it to png it works fine now
Hmm, that is weird. have you checked all the edits for the default theme and are they all there. ???
Very nice. :)
I have installed it, do i have to install it manually in my custom theme?
and what is on, on2 and off?
Yes manual install to any custom theme. on, on2 and off are the icons you can customize.
I mean, what do on, on2 and off represent?
try reading the posts in this topic? It's only been discussed about 20 times.
hey guys. trying to figure this one out. i've got the icons installed in both default and custom theme, but doesn't seem to work.
any suggestions?
have you refreshed the page, are there any errors in the error log. ???
Quote from: ~aLEX on March 04, 2010, 10:09:50 PM
hey guys. trying to figure this one out. i've got the icons installed in both default and custom theme, but doesn't seem to work.
any suggestions?
Did you follow the instructions and create new folders with custom icons? What version of SMF are you using? Can you provide a link to your site?
Quote from: Bigguy on March 04, 2010, 11:14:36 PM
have you refreshed the page, are there any errors in the error log. ???
Have you created the icons folder or have u uploaded the pics in the themes icons folder? the 2nd option will not work :-/
yeah. nothing in the error log about it; i'm currently rebuilding from a crippling hack.
the file edits were done on both the default and custom theme, and the folders are created as well. the images were also uploaded. i'm on smf 1.1.11 and i've tried version cbi v1 & 1a, but still nothing.
i know i'm missing something somewhere, i just don't know where that is.
p.s.
link to the site is over there <----
Hi aLEX. Unrelated to your issue, I just wanted to say that I went to your site. I think there are some fascinating discussions going on there. I imagine I'll be hanging around a bit.
Just to be clear. Did you create new directories for each board by number as detailed in the instructions? Did you then place new icons in each individual directory?
hey, thanks marcus. :D
yes and yes. directories were created as such:
public_html/Themes/themename/icons/1/off.gif
public_html/Themes/themename/icons/1/on.gif
public_html/Themes/themename/icons/3/off.gif
public_html/Themes/themename/icons/3/on.gif
etc...
any and all help is much appreciated.
p.s. those links you pointed out on the forum are fixed. :)
Have you tried using .png to see if that shows instead of .gifs ???
Quote from: Bigguy on March 07, 2010, 11:00:09 AM
Have you tried using .png to see if that shows instead of .gifs ???
His forum is running 1.1.
aLEX have you tried using the default them to see if the mod works then? Perhaps you need to manually install the mod onto your custom theme? (Just guessing here)
hm. not sure what to say about the default theme. i just checked the BoardIndex.template.php file and can't find the code to edit. see attached. :o
Quote from: Bigguy on March 07, 2010, 11:00:09 AM
Have you tried using .png to see if that shows instead of .gifs ???
This is a good suggestion. I didn't notice before but it appears that the mod is now set to replace .gif files with .png files even in SMF 1. Judging by the template you posted, the mod is not installed on that theme. Is that template from the SMF default theme or the theme you are currently using?
Note: I am by no means an expert at this stuff. I'm just trying to help. You are free to ignore me. :)
yeah, i know. i've tried both .gif & .png though...
and the attached for the default theme. :-\
Quote from: ~aLEX on March 07, 2010, 08:18:29 PM
yeah, i know. i've tried both .gif & .png though...
and the attached for the default theme. :-\
Does the mod show as installed in your package manager?
yes.
Try to install another mod and see if it shows up as installed in the packages list and works. If it does not work after it is installed then file ownership could be a problem.
WHOOPS
me got a problem on my other board and i can't fix it
Erm
HELP?
Pic attached
Quote from: Bigguy on March 08, 2010, 08:18:22 PM
Try to install another mod and see if it shows up as installed in the packages list and works. If it does not work after it is installed then file ownership could be a problem.
File ownership?
Sometimes Apache can steal your files and folders. When this happens they are all un-editable. This is why mods don't change files when they are installed. You will have to get a server admin to re-own them if this is the case.
Bigguy,
Is there word on this mod working for RC3?
Quote from: ~aLEX on March 08, 2010, 09:32:16 PM
Quote from: Bigguy on March 08, 2010, 08:18:22 PM
Try to install another mod and see if it shows up as installed in the packages list and works. If it does not work after it is installed then file ownership could be a problem.
File ownership?
File Permissions. If the mod shows installed, but the files weren't changed then it's likely your file permissions aren't set properly.
Not yet no there's not but should be soon. Check both permissions and ownership but it sounds like the later to me.
Update to RC3?
1week or later?
I need this mod!!! :D
Nice Mod
Please update it for SMF 2.0RC3 ;)
Thanks
I will be updating this soon. Right now I have work to do on some of my sites but then it will be updated. :)
I have installed and applied this mod. LOVE IT.
but, What does on, on2 and off stand for? which file do i change to modify boards with new posts?
try using search? That question has been answered at least 4 times already in this thread.
I can't find it using search and i dont want to read all 34 pages... can you please answer my question?
so, because you're feeling lazy? sheesh...
on is for the board
off is for the board
on2 is for childboards
Well its been three weeks and no update on the update....
Is this another person who has gone and left SMF I ask?
xnathansxdadx,
you posted a picture without actually describing your problem. We're not mind readers. What, specifically is the problem?
No I have not left SMF. As I stated before, I have some projects of my own to attend to. I do believe the code should work with RC3 so if you really need it you can always manually add it for now until the mod is updated.
hi bigguy, just a quick fyi.
i did manage to fix the issue i was having just a few moments ago. i think i'd somehow missed some of the code on the custom theme i'm using. sorry for the headache, but thank you for the support...
i love this mod! :D
Glad you got it fixed. :)
GENERAL UPDATE:
I will be upgrading this mod for RC3. No new changes in it should be expected until SMF 2.0 goes gold. When the new version is done it will be available first at www.pctweakr.com for testing and then here. After 2.0 is out I will hopefully be adding a bit more functionality to it. This is just a general update so people do not think the mod is dead. ;)
Any ETA on RC3? Looking forward to it :D
maybe if you joined his site you would know more?
I manually installed it on RC3 and it worked fine :):) thanks for great mod
I knew it would install manually. Looks like the only error is with the package itself really. so it should not take to much to update. It's just that between work and trying to get a new site up and running I find I have a bit less time right now then usual. I will get an official update out though very soon.
will it work on SMF 2.0 RC3 ?
Quote from: josipo on April 14, 2010, 08:57:26 PM
I manually installed it on RC3 and it worked fine :):) thanks for great mod
Quote from: Bigguy on April 17, 2010, 08:31:52 AM
Quote from: josipo on April 14, 2010, 08:57:26 PM
I manually installed it on RC3 and it worked fine :):) thanks for great mod
but in automatic, it says
it may be corrupted or older version, We recommend not to continue, etc..
So, I am worried that it will give problems if installed manually?
Quote from: ukhalik2 on April 17, 2010, 08:46:27 AM
Quote from: Bigguy on April 17, 2010, 08:31:52 AM
Quote from: josipo on April 14, 2010, 08:57:26 PM
I manually installed it on RC3 and it worked fine :):) thanks for great mod
but in automatic, it says it may be corrupted or older version, We recommend not to continue, etc..
So, I am worried that it will give problems if installed manually?
It is really easy to manaully do it just follow the parse instructions and it works :)
Quote from: josipo on April 18, 2010, 06:36:48 PM
Quote from: ukhalik2 on April 17, 2010, 08:46:27 AM
Quote from: Bigguy on April 17, 2010, 08:31:52 AM
Quote from: josipo on April 14, 2010, 08:57:26 PM
I manually installed it on RC3 and it worked fine :):) thanks for great mod
but in automatic, it says it may be corrupted or older version, We recommend not to continue, etc..
So, I am worried that it will give problems if installed manually?
It is really easy to manaully do it just follow the parse instructions and it works :)
Just installed it from parse info and works great!
Quote from: Bigguy on April 13, 2010, 10:28:44 PM
GENERAL UPDATE:
I will be upgrading this mod for RC3. No new changes in it should be expected until SMF 2.0 goes gold. When the new version is done it will be available first at www.pctweakr.com for testing and then here. After 2.0 is out I will hopefully be adding a bit more functionality to it. This is just a general update so people do not think the mod is dead. ;)
Word. Keep us updated!
hello.
cbi157 is not fully compatible with SMF 2.0 RC3. The icons are displayed correctly but there is a problem: the tooltip of the icon. (See picture)
Any solution?
Thank you.
With your permission BigGuy. I have adapted cbi157 my forum SMF 2.0 RC3 so you can see the tooltip correctly.
The changes they made are:
First echo (before):
echo '<img src="', $board_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
First echo (after)
echo '<img src="', $board_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
Second echo (before):
echo '<img src="', $childboard_new_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
Second echo (after):
echo '<img src="', $childboard_new_img,'" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
Third echo (before):
echo '<img src="', $board_nonew_img,'" alt="', $txt['no_icon'], '" title="', $txt['no_icon'], '" border="0" />';
Third echo (after):
echo '<img src="', $board_nonew_img,'" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" border="0" />';
This must be done in the two modified files: BoardIndex.templatel.php and MessageIndex.template.php
I hope you agree. Greetings.
No problems here. :)
hay i ahve one problem i can not install this mod see here:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg685.imageshack.us%2Fimg685%2F1012%2Fneradi.png&hash=bffb504fe5b24ca91ec62c8f2da1f8362cf88f62)
Can somebary help my FAST and THNX!
Eazy-E.
I am now try manual install but NOT WORK!
(I USE SMF 2.0 RC3)
Probably because the mod hasn't been updated for the new code in 2.0 RC3... as the mod's page shows clearly it doesn't have 2.0 RC3 listed...
Work on RC3 but on my RC3 Not WORK,WHAYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
So there's something it's conflicting with.
What other mods do you have?
same problem as Eazy-E
i installed manually but no effect :s
did you a) install it manually into each and every custom theme? 2) create and upload the images for the icons into the correct locations?
i tried to install it through mod installer.. it showed error in 2 files...i did manual work on those two files for the theme i am using... an then installed the mod...
you should also modify the default theme files... AND you did not mention if you did b)
okay now i did modify default files.. but no change?
can you tell me how can i know id of board... i applied it to 3rd board on my forum...and gave it ID = 3
saved this directory: forum/Themes/default/icons/3/off.png
both in default theme and custom theme... there is no change at all
ps. i deleted many boards and created many... can this affect id of boards??
yes. the ID of the boards is not related to their actual order... but rather the order of creation. Look at the URL when you go to view the board itself.
Also, off.png will only show if there are no new messages
http://www.amigozone.tk/index.php?board=32.0
it is the url of board..what is id?? "32" or "32.0" ??
32
okay i have the directory forum/Themes/default/icons/32/off.png
and there is no new post in this board... but still the default icon is shown... :s
whats wrong ?? :(
and thanks for help :)
are you using the default theme? If not, you will ALSO have to create forum/Themes/YOURCUSOMTHEME/icons/32/off.png
I installed it in my SMF 1.1.11 by manual but the descriptions of forums doesn't show... any help?
i have tried both on default and custom theme and created that directory in both default and custom theme..
now whats wrong?? :(
any help?? :(
I don't know amigo... without actually seeing your forum php files and the actual directory set up, I can't debug any further.
so what u do want?? any file??
check http://www.amigozone.tk
btw m using pretty urls...
please do not make releases of another author's mod...
I'm stuck getting this mod to work with the "BoardHover" one. Any help? 2.0 RC3...
I have a new version almost done that installs with RC3. I'm just trying to figure out a small glitch.
@ Liam: it does work with that mod. It might have to be manually installed though.
Bigguy, I will try to take a look at the RC3 bug this weekend...
Does it really install with it? The code for the two in BoardIndex.template.php are totally different, and I can't figure out how to merge them :/
@ Kindred: That would be great. If you need this new version of cbi to look at just let me know.
@ Liam: Yes it does. I have had it installed. There is a thread on SMFH with discussion about it. Not sure if install instructions are there though.
Well something's screwed up with my installation somewhere along the line :/ I'll have to look harder into it... Thanks anyways,
What is the actual problem. ???
Is there a cbi version compatible with SMF 1.1.11?
The version listed on the mod page should work on 1.1.11 since the code shouldn't have changed between SMF 1.1.x versions.
Quote from: Arantor on May 20, 2010, 05:17:21 AM
The version listed on the mod page
Which version? There are several versions listed there.
cbi-157 looks like it should work on 1.1.11.
Quote from: Arantor on May 20, 2010, 06:03:45 AM
cbi-157 looks like it should work on 1.1.11.
cbi 1.57 tested on a fresh 1.1.11 install:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimgur.com%2Fl6eB4.png&hash=50c8071240d45a2a2882ad8e28d472e9d6688f1c)
There is not one compatible with 1.1.x I do have one for 2.0 RC3 but it has a bug that needs to be squashed first.
Quote from: Bigguy on May 20, 2010, 07:23:28 AM
There is not one compatible with 1.1.x I do have one for 2.0 RC3 but it has a bug that needs to be squashed first.
According to the changelog, 1.0a works on 1.1.5 (and installs fine on 1.1.11). Does it work with 1.1.11?
package-info.xml for version 1.57 is missing SMF version information, so the SMF 1.1.x Package Manager attempts to install it, even though the package is only for SMF 2.0.
Does it install fine. ???
Quote from: Bigguy on May 20, 2010, 07:52:49 AM
Does it install fine. ???
I haven't used any version, I only did an install test (you know, the Apply Mod test) of 1.0a and 1.57 on a fresh SMF 1.1.11 install.
The 1.0a install test is fine. The 1.57 install test shows errors, see the screenshot in reply #733.
If I remember correctly anything above 1.5 I do believe is for 2.0. I haven't updated the mod for 1.1.x series at all.
Quote from: Bigguy on May 20, 2010, 08:41:36 AM
If I remember correctly anything above 1.5 I do believe is for 2.0. I haven't updated the mod for 1.1.x series at all.
The problem is that you haven't specified in package-info.xml that 1.5.x is for SMF 2.0 only, so the SMF 1.1.x Package Manager doesn't know that the mod is not compatible with 1.1.x. This will confuse users that download the latest version and try it on SMF 1.1.x.
Here's a post in this topic: http://www.simplemachines.org/community/index.php?topic=126263.msg2458476#msg2458476
Compare it with my screenshot. See what I mean? The same poster confirmed later (http://www.simplemachines.org/community/index.php?topic=126263.msg2468710#msg2468710) that he was trying to install cbi 1.5.7 on SMF 1.1.11.
If a mod is not for the same SMF branch, Package Manager should refuse it. But to do that, it has to have information, which should be in package-info.xml. This information is missing in the cbi 1.5.7 package.
In fact, the SMF version info is also missing in cbi 1.0a... I just tried to install this on SMF 2.0 RC3 and Package Manager showed "Test failed" errors, instead of refusing the mod in the first place.
I hope I made the point clear.
And last but not least, if a particular version of your mod doesn't work on recent SMF versions anymore, you should remove that version from the mod page. But that's just my opinion. :)
Yes I know what the problem is. The package-info.xml has been updated for the 2.0 series but not for the 1.1.x series. See the way it was or is is that the package for 1.1.x uses .gif and the package for 2.0 uses .png. (Unless I changed it can't remember, but that is how it is supposed to be.) Thank you for pointing all that out. I did already and have known this for awhile now.
Bigguy
thanks for you mod, I am waiting for your new release for RC3 ^^
thanks again
I have a working mod that will install....one bug is being looked into. Should be solved soon. ;)
please how do i know my board id
Look in your address bar of your browser when browsing the board.
Like this board for instance
http://www.simplemachines.org/community/index.php?board=59.0
Greetings Bigguy,
I am using SMF ver 2.0 RC3
With these Themes:
A1 Rainbow
Bright Forest
Core Theme
SMF Default Theme - Curve
Curve Solution
Green Style V2
MysticJade
OmegaGreen
Stealth
Swordy 2.0 Rc3
unusual
Yem Yeþil
My question is I want to make the boards of each category have a different off.png, on.png, and on2.png
This is because our Categories are set up like a house, like this
PUBLIC CAN SEE
Front Yard
Front Porch
Gift Shop
ALL MEMBERS CAN SEE
Entryway
Information Desk
Parlor
Game Room
ONLY SURVIVORS CAN SEE
Green Room
Blue Room
Orange Room
Red Room
Dark Room
Thanks in advance,
Cloud 8)
Cloud Walker, you could easily do that, but you'd have to have those (three?) sets of icons and have multiples of them, with different names so that they corespond to the board's that are there.
Quote from: Liam. on June 05, 2010, 06:29:40 AM
Cloud Walker, you could easily do that, but you'd have to have those (three?) sets of icons and have multiples of them, with different names so that they corespond to the board's that are there.
Liam,
Thank you so much for your reply. :)
When I mentioned this possibility to some of the members, they were very excited. I am glad that it is possible to follow through. :D
I have researched the icons in the different themes we have and typically there is no difference between "on.png" and "on2.png". Some are completely different! There must be reason for this and my first guess is that one of them indicates the Topic on the Board that YOU posted on has a new reply. This is only a guess at this point.
Have a fantastic weekend!! :D
I will be busy, ;)
Cloud 8)PS - I decided to provide a some screen shots.
All are "off.png" - > "on.png" - > "on2.png"
PSS - I did NOT use CORE because it does NOT have a "on2.png" :o
on indicates a new post in the board... on2 indicates a new post in a child board of the board you are viewing.
Quote from: Kindred on June 05, 2010, 09:54:57 AM
on indicates a new post in the board... on2 indicates a new post in a child board of the board you are viewing.
Thank you Kindred.
EDIT
*joked about more info available. Deleted that.*
hmmmmm... joking or not, I am not sure I understand. The on, on2 and off icon usage is explained several times in this very thread. :P
Created icons 40x40 and saved as off.png on.png and on2.png
Created folders
Uploaded icons
Parsed and manually installed mod
Maintenance -> Forum Maintenance -> Routine -> Empty the file cache
Browser -> Tools -> Clear Cache
Doesn't function
(see attachments)
Thanks in advance
EDIT
I changed the files from Boardindex.template.php to Boardindex.template4CBI.php
and from Messageindex.template.php to Messageindex.template4CBI.php
so that the forum didn't have "No Icon" on every board.
I've read a fair few pages in here and I'm still not totally clear on whether or not this works for my 1.1.11. Can I get a definitive answer on this so I can either a) Continue trying to make it work or b) Stop tyring because it's going to be pointless and try to find another solution.
Does it work on 1.1.11 or not?
Also, if not, is there any other solution that will achieve the same end? I was under the impression this would work so I have custom icons for each forum ready to go. Any other solutions available?
Other info: Using the default theme on a fresh install while I reskin everything myself. Folders have been created to the correct specification and I've tried it with both .gif and .png formats. Have cleared cache from browser and still the defaults appear. Everything appears to be good with the relevant php files as well.
Try one of the earlier version of the mod for 1.1.11 and see if it works. I have not done work on the mod to get it to work at all with that version of SMF.
Alright, I'll try that and report back.
Nudge
I am using pretty urls. Now, do I need to use ID or name of the board?
Quote from: Masterd on June 12, 2010, 06:15:54 AM
I am using pretty urls. Now, do I need to use ID or name of the board?
Masterd,
As it is designed to use the number of the board, I think that you should try that first.
Of course, ALWAYS back-up before changing any files.
If I am about to modify a file, I save it with the date and time that I made the change.
For example
index
.template06-12--2010-7am
.php
By doing this, if I change the file more than once in a day, I will know because of the time (-7am).
Good luck,
Cloud
Thanks for that great mod, but there is a kind of problem considering the look of the site
Now I can see, NEW POSTS ICON, NO NEW POSTS ICON and REDIRECT BOARD ICON in the bottom of my site. it looks very unprofessional
here is a screen shot:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg691.imageshack.us%2Fimg691%2F576%2Fhowto8.png&hash=8bd2dabfe486b812880d55edfbf128be91c8e6e2)
How can I remove them?
Thank you in advance!
No need to remove them...follow the url of the image to it's location and change it.
UPDATE.
I do have a working version of this for SMF 2.0 RC3. It can be used by anyone right now.I have heard of a problem with double icons for redirect boards.(depends on how you look at it) I am looking into this and a couple other ideas for the next version.
*waits patiently*
*waits patiently*
UPDATE
Installs with RC3
"No icon set" error has been dealt with
No errors in error log
What's left to do
Double Icons for redirect boards
Working on this now but having a problem figuring it out. I have it up for download now as it is on my site.
RC3 Update?
I have one bug left and I can't figure it out yet. Trying to get rid of the double icons for redirect boards. I hope the update will be soon.
RC3 Update? plzzzz
Read above your post.
If anyone can help solve this last bug, PM me. I am willing to put your name in the credits of the mod.
Quote from: Bigguy on June 25, 2010, 09:12:23 AM
Read above your post.
If anyone can help solve this last bug, PM me. I am willing to put your name in the credits of the mod.
Release it as a beta :o. Someone might be able to magically fix the problem :P
I will have to pack up what I have then and attach it to my next post. I'll do that this afternoon if I get time then.
Quote from: Bigguy on June 26, 2010, 11:25:09 AM
I will have to pack up what I have then and attach it to my next post. I'll do that this afternoon if I get time then.
Sounds all good. The mod actually works on my RC3 forum perfectly. I just needed it for one forum anyways, but i love the mod :D
The redirect boards will not work right as they show two images instead of just one.
I have released a beta version of my mod as requested. It can be found here:
http://forum.pctweakr.com/index.php/topic,383.0.html
When the error is solved I will upload it here.
Bigguy,
Thank you for making this available for those of us that want to install it on RC3 and do NOT have redirects.
Be Well,
Cloud 8)
Hi Bigguy,
I am trying to make custom boards but I can't succeed. If someone can help I will be very very grateful. My version of the forum is SMF 1.0.18 / 1.1.10 / 2.0 RC1-2
...
After installing cbi-157 with the Package Manager I have got this this massage:
1. Execute Modification ./Themes/default/BoardIndex.template.php Failure
2. Execute Modification ./Themes/default/MessageIndex.template.php Failure
3. Execute Modification ./Themes/default/languages/Modifications.english.php Success
Probably there is some problem. I don't know.
...
I am using as a theme babylon and I have created:
/www/Themes/babylon/icons/5
But nothing hapens. I have no idea what to do anymore :(
Thanks,
Dimitar
Try using a parser and adding the code manually to those two files.
Hi Bigguy,
Sorry to bother you. Where should I add the code?
Thanks,
@ D.Dimov: Did you get this solved yet. ???
Just to let everyone know once again there is a beta release on my site available for now until we get the last bug worked out.
http://forum.pctweakr.com/index.php/topic,383.0.html
Hi,
No, sorry. I couldn't. I don't know how to use parser. I don't know even how to install it. :-\ I tried to install 158beta through Package Manager but without success. Probably it is not compatible with the version of the forum I have. If you have a more simple solution a will be grateful.
Go to the page you downloaded it from and you will find a Parse button below the downloads. Switch to your version of SMF in the drop down menu and press parse. It will then show instructions on how to manually install the code.
Hi Bigguy,
Sorry for my elementary questions. Ok, I get the logic! But I can't find such strings in my BoardIndex.template.php and MessageIndex.template.php :-\ I will attach them in my post. Here is information about my forum:
SMF File Your Version Current Version
SMF Package SMF 1.1.11 SMF 1.1.11
Sources 1.1.9 1.1.9
Default Templates 1.1.9 1.1.9
Language Files 1.1.9 1.1.9
Current Templates 1.1.9 1.1.9
Thanks for your help,
Are you using the right version of the mod.
Yes, I was using a wrong version of the mod. Everything is ok. Sorry for wasting your time. Very nice mod! Thank you.
It's never a waste of time helping someone out. Glad you got it though. ;)
waiting for the fix for "double icons" on redirect boards thanks Bigguy
Home from a weekend of camping. I'll try to look at the mod later today or tomorrow.
Bigguy, :)
Thanks for this mod and clear instructions!!
For everyone's Info:
Manually (not with package installer) installed this mod (after putting all the board icons in place according to Bigguy's instructions) except for re-direct board.
Completely operational = Your Sanctuary (which has a lot of public boards). If you want to see this mod in action just select Your Sanctuary in my signature.
Thanks for clear instrutions.
This is an AWESOME (TOTALLY COOL) MOD!!!
Be Well,
Cloud
Glad you like it. :)
When I would like to add a redirect board icon, it puts the icon I choose + the redirect default icon and looks so ugly. How can I avoid that, please.
by reading this thread you will see it is a bug I am working on removing. ;)
Ok, Thanks mate :)
I still waiting for it! ^^
Quote from: Kurakama on July 08, 2010, 01:33:09 PM
I still waiting for it! ^^
Yup...I'm still trying, lol. The idea of the beta was so anyone who wanted to help find the error could help. I have ripped this mod apart and I cannot figure it. There was not a whole lot of ripping as it is a small mod but I have been trying, lol. :)
OMG! BigGuy is in trouble :o
xDDD
lol, well there's not many lines of code to play with so I know it has to be something small but I can't find it.....so; yes I am in a bit of trouble. :(
modification.xml for install on SMF 2.0 RC3:
<?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.7 SE</version>
<file name="$themedir/BoardIndex.template.php">
<!-- SMF 2.0 RC3 -->
<operation error="ignore">
<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'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';]]></search>
<add><![CDATA[
// CBI for SMF 2.0 RC3
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['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.png';
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.png';
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.png" alt="*" title="*" border="0" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';]]></add>
</operation>
</file>
<file name="$themedir/MessageIndex.template.php">
<!-- SMF 2.0 RC3 -->
<operation error="ignore">
<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'], '/' .$context['theme_variant_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'], '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';]]></search>
<add><![CDATA[
// CBI for SMF 2.0 RC3
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['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.png';
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.png';
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.png" alt="*" title="*" border="0" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';]]>
</add>
</operation>
</file>
</modification>
What is that bugo ??? Does it take care of the bug for redirects. ???
Bugo, you would try to help to bigguy for fix redirects o.o
I'll take a look at it her soon and see what is going on. :)
I have included your code and from what I can see Bugo, it does not take care of redirects on my test site. Do you have any other ideas. ???
Quote from: Bigguy on November 11, 2006, 11:59:46 AM
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
Hye, good day. Sorry, may I asking, what's the use of on2.png?
One more thing, Child board doesn't work.
when exist any post new in children board.... it use this
is there available this MOD for SMF 2.0 RC3
There is a beta mod attached to this post at my site:
http://forum.pctweakr.com/index.php/topic,383.0.html
Quote from: Bigguy on July 11, 2010, 10:14:06 AM
There is a beta mod attached to this post at my site:
http://forum.pctweakr.com/index.php/topic,383.0.html
So can i install it or can u release any new?
You can install it. The mod is fine. It just produces double icons for redirect boards.
Bigguy, you for me, you are like superman :D
I know that you will fix it the double icons :D
Hi Bigguy, :)
I am using SMF ver2.0 RC3, with SMF Default Theme - Curve.
I was wondering if in your free time if you could swing by my forum and take a look at the icons (http://www.asanctuary.net/yoursanctuary/index.php). O:)
Icon size is set to 40px X 40px, but some of them aren't clear, like the Front Porch ->
Off = (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.asanctuary.net%2Fyoursanctuary%2FThemes%2Fdefault%2Ficons%2F129%2Foff.png&hash=e153cb60ccabb3226293fe300a289dda0b1d5c91)
On = (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.asanctuary.net%2Fyoursanctuary%2FThemes%2Fdefault%2Ficons%2F129%2Fon.png&hash=b985ebc0a3641d5743894982cbf949332cba28ed)
Is the icon size is limited to 40px X 40px? ???
Thank you for taking the time to do this. :D
Take Care and Be Well, ;)
Cloud 8)
I don't limit the size of the icon at all. I would think it would be limited in the .css of SMF somewhere. Maybe in the index.css.
BTW for everyone else, I am working on the cbi mod still but there might be a surprise coming soon so stay tuned. ;)
Bigguy, :)
Okay, thanks for letting me know and also for giving me some ideas. :D
Be Well,
Cloud 8)
Not a problem, anything I can do to help. :)
I have been enlightened as to why the cbi mod was giving double icons for redirects and I will be trying to solve the problem in the next couple days. There may be another surprise coming as well but that is all I will say on that until I know further information. Just wanted to keep everyone up to date. :)
FYI - It doesn't double up on Your Sanctuary (follow this link to see) (http://www.asanctuary.net/yoursanctuary/index.php) where we have a re-direct to the gift shop. :D
Just thought you might want to know. ;)
Take Care,
Cloud 8)
This is what I see...is that not a double icon on that redirect board ???
Ya I guess you have a point. :-\
But in case anyone wants to know, your CBI functions with a Custom Theme called Sweet Dream. I attached a SS. ;)
Take Care,
Cloud 8)
PS I really don't worry about the "double" icon. :)
Some people don't worry about it and I never thought it was a big deal but the people have spoken and they only want one icon there. :) As for the screenshot. The cbi mod does not work on that theme either. If you look below the redirect icon you will see an Astrix. That is there I suspect because someone has taken the redirect icon out of the images folder.
Quote from: Bigguy on August 16, 2010, 06:46:02 PM
Some people don't worry about it and I never thought it was a big deal but the people have spoken and they only want one icon there. :) As for the screenshot. The cbi mod does not work on that theme either. If you look below the redirect icon you will see an Astrix. That is there I suspect because someone has taken the redirect icon out of the images folder.
*nods and then smiles*
T'was a feeble attempt to hide, but the custom images are there and that is what is not functioning with any other custom themes.
you will have to manually modify any (non-default) themes that include boardindex.template.php
Quote from: Kindred on August 16, 2010, 08:45:57 PM
you will have to manually modify any (non-default) themes that include boardindex.template.php
So if a custom theme doesn't have a boardindex.template.php then don't even try eh? ???
Cloud 8)
Any custom theme that is missing ***.template.php files uses the ones it is missing from the default templates. So if those are already edited by installing the mod then there is no need to worry. The mod should work in a custom theme. In SMF 2.0 you have the option to install mods into custom themes.
Sorry for any delays. I am still waiting for an answer from the team about my request.
what request was that BG?
I had asked SD if I could merge my mod with another as per your request for me to ask him I do believe. He said it had to go in front of the BoD and I have heard nothing since.
hmmm.... I don't know wy that would be a BoD thing,,, but I'll check on it. :)
Thank you sir. :)
I have gotten the go ahead and will be starting work on this on the weekend. I can not give a time of completion but I hope it's not to long.
Is this MOD compatible with SMF 2 RC3?
did you read any of the thread?
yes.
I read after I posted this question here :P As I was in hurry so could not edit it,
Hello there.
Anyone can help with adding this mod to my custom theme extreme 10.
This file i need to be edited, ive tried, but with no success...
http://custom.simplemachines.org/mods/index.php?action=parse;mod=511;attach=127516;smf_version=1.1.11
As it is late here I will look at this tomorrow and see if I can edit it for you.
Nevermind, ive sorted that out.
Well we have had about a 2-3 year hiatus from even having a forum. All of a sudden we got the urge! :) I had your mod installed along time ago and always thought it was great. Today, after a fresh install of latest smf the first thing I looked for was your custom board icons! Cause it's the shiz!
http://signforum.nicecarvings.com/
:laugh:
Oh I almost forgot to say that I struggled for awhile trying to install the older packages and got errors. Just installed your beta and all is well. Thank you for doing this, it's pretty sweet!
Glad you like it. There is a new version on my website that is still in Beta. If the version you are using works for you then I suggest staying with it until the bugs are out of the one I am working on.
Ok for anyone wanting a version of cbi that only has one redirect icon instead of two you can read this post at my forum for details. It will be uploaded here to the mod site once I get a bit more feedback on anymore issues and some bugs fixed:
Or Here:
-Readme Updated
-Slight code changes. (two lines are still commented out)
-Another Version Change
-Language (No Icon Set)error has been fixed.
-Installs with SMF 2.0 RC4
I found a error in MessageIndex.template.php and have fixed it. This is the new version found here:
CLICK (http://forum.pctweakr.com/index.php/topic,383.msg2794.html#msg2794)
Or Here
CLICK (http://forum.pctweakr.com/index.php?action=downloads;sa=view;down=13)
Version for 1.1.12 (http://forum.pctweakr.com/index.php?action=downloads;sa=view;down=14)
Changes:
-Readme Updated
-Slight code changes. (two lines are still commented out)
-Another Version Change
-Language (No Icon Set)error has been fixed.
-Error in MessageIndex.template.php fixed
-Installs with SMF 2.0 RC4
I have installed this mod on my forum (SMF v1.1.12) but it doesn't work if using a non default theme.
Anyone knows how to fix it?
Does your custom theme have its own "BoardIndex.template.php" if it does you need to make the edits to that file manually.
Just copy and paste the same edit that was made in the default themes "BoardIndex.template.php"
You are right! The theme i'm using has its own BoardIndex.template. php file. Referring to this page (http://custom.simplemachines.org/mods/index.php?mod=511) i see parse for manual install instructions for SMF v1.1.12 and i can't edit the code in my BoardIndex.template.php file because is different almost at all!
Here is the code:
// 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 to edit to suit it to CBI modifications?
Hi, I Downloaded CBI but it fails to install on SMF 1.1.12, what version is the one compatible?
Tried to install manually, but it seems many of the files changed, so I can't find where the changes go.
cbi 1.6.2 is for SMF 2.0 only. Try using one of the earlier versions from the mod page.
hi, I've tried with 1.5.5 & 1.5.7.
This is what I get:
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 failed
3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
Parsed the package, but I can't find where must made the changes on these files
Your looking for a version for the 1.1.x line of SMF ?
Hello Bigguy, can you help me?
What do you need help with. ???
Quote from: Bigguy on November 07, 2010, 09:51:29 AM
What do you need help with. ???
Hi Bigguy
I am looking for a fully compatible and functional version of this great modification for SMF 1.1.11 (or SMF 1.1.12). Could you please update this page with an updated version of your mod? Your last update dates from almost a year back. Thank you. :)
http://mods.simplemachines.org/index.php?mod=511
Also, would it be possible for you to include some templates icons with your package?
I wasn't going to update the mod for the 1.1.x series of SMF any more but maybe I can do it once more, I'll see. It shouldn't be that hard really. What do you mean by "template icons" ???
Quote from: Bigguy on November 07, 2010, 08:28:06 AM
Your looking for a version for the 1.1.x line of SMF ?
Yep, for 1.1.12. Days ago I have it working for 1.1.11, but another admin updated to 1.1.12 and now we can't install it.
Working on something a bit later today.
This post has been updated to add a link for a download of the cbi mod that works with SMF 1.1.12. It has not been tested anywhere but on my test forum.
CLICK (http://www.simplemachines.org/community/index.php?topic=126263.msg2838914#msg2838914)
Quote from: Bigguy on November 07, 2010, 09:51:29 AM
What do you need help with. ???
With my previous post that you have ignored :'(:
Quote from: smartmouse on November 06, 2010, 10:29:30 PM
You are right! The theme i'm using has its own BoardIndex.template. php file. Referring to this page (http://custom.simplemachines.org/mods/index.php?mod=511) i see parse for manual install instructions for SMF v1.1.12 and i can't edit the code in my BoardIndex.template.php file because is different almost at all!
Here is the code:
// 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 to edit to suit it to CBI modifications?
well, installed it, now it works!!!! Thank you!
Quote from: smartmouse on November 07, 2010, 08:05:12 PM
Quote from: Bigguy on November 07, 2010, 09:51:29 AM
What do you need help with. ???
With my previous post that you have ignored :'(:
Quote from: smartmouse on November 06, 2010, 10:29:30 PM
You are right! The theme i'm using has its own BoardIndex.template. php file. Referring to this page (http://custom.simplemachines.org/mods/index.php?mod=511) i see parse for manual install instructions for SMF v1.1.12 and i can't edit the code in my BoardIndex.template.php file because is different almost at all!
Here is the code:
// 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 to edit to suit it to CBI modifications?
have you tried the new mod. ???
Quote from: Bigguy on November 07, 2010, 01:01:43 PM
I wasn't going to update the mod for the 1.1.x series of SMF any more but maybe I can do it once more, I'll see. It shouldn't be that hard really. What do you mean by "template icons" ???
Thanks Bigguy. I appreciate you taking the time and effort to update your mod for SMF 1.1.x.
By template icons, i meant the custom board icons and if it would be possible to have some of them pre-packaged into the mod? It's no biggie, but just a suggestion.
However, the most important update that i believe should be made for this mod:
Instead of:
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.
I believe that you should create a simpler and more efficient way of changing/adding custom board icons from within a custom menu from the admin panel. It's much more intuitive and easier to work with, than having to do it all through FTP the old fashioned way. No offence, since it's a rather old mod, but since you're updating it one more time, i figure it should be worthwhile. :)
I would suggest adding an option in the admin panel >> boards >> modify (relative to each board) and then at the bottom, you could create this new option: "Custom board icon (leave blank to reset to default)": {blank space here to enter image URL}
This is the best way to implement it, as it would be easy and intuitive to configure every custom board icon from the individual board modification page.
The mod has now been updated. Look above for a link to my other post which has links on it for downloads. There is more to come for this mod. Like you suggested, there will be options in the admin panel. It's already in the works but might be a bit to come. As for the icons...there pretty easy to find through google to be honest. :)
Quote from: Bigguy on November 07, 2010, 09:34:17 PM
have you tried the new mod. ???
No! I didn't tried it!
Today i installed it on my SMF forum v1.1.12 and it has worked!
Thank you very much!
Quote from: Bigguy on November 08, 2010, 12:42:26 AM
The mod has now been updated. Look above for a link to my other post which has links on it for downloads. There is more to come for this mod. Like you suggested, there will be options in the admin panel. It's already in the works but might be a bit to come. As for the icons...there pretty easy to find through google to be honest. :)
Now, i'm getting excited. :D I can't wait to use the final release of this mod.
Yeah, you are right about the icons. I'll try to find the best ones via Google and maybe post a few links here for others to use after installing this mod.
Cheers!
please be aware of copyrighted images
(in other words, if the image is from another site, it may be copyrighted by the original creator, so, make sure to only share images which are Creative Commons or otherwise free for use and distribution.)
Doing a search for creative commons free icon sets brings this site up...as well as 1000's more.
http://commons.wikimedia.org/wiki/Crystal_Clear
personally, I just opened a competition on the site for the users to design some specific and appropriate icons for use. :)
That's cool. :) on this site. ???
no... on 40konline.com
http://www.40konline.com/community/index.php?action=media;sa=album;in=37;nw;start=20
That's right on. I'll have to peruse some of those pages and see whats up. :)
Mod site has now been updated, seeing as no errors were found with the 15 to 20 downloads that have happened off my site. You can still get the packages from the links in my sig. Any new beta versions will be posted there first, not here on the mod site.
Quote from: Bigguy on November 08, 2010, 06:37:59 PM
Mod site has now been updated, seeing as no errors were found with the 15 to 20 downloads that have happened off my site. You can still get the packages from the links in my sig. Any new beta versions will be posted there first, not here on the mod site.
Thanks for the update, Bigguy. But i noticed that it's just a minor update. My suggestions from my earlier replies have not been implemented yet?
What suggestion is that. ???
Quote from: Bigguy on November 09, 2010, 07:34:35 AM
What suggestion is that. ???
This one:
Quote from: sharks on November 08, 2010, 12:07:32 AM
However, the most important update that i believe should be made for this mod:
Instead of:
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.
I believe that you should create a simpler and more efficient way of changing/adding custom board icons from within a custom menu from the admin panel. It's much more intuitive and easier to work with, than having to do it all through FTP the old fashioned way. No offence, since it's a rather old mod, but since you're updating it one more time, i figure it should be worthwhile. :)
I would suggest adding an option in the admin panel >> boards >> modify (relative to each board) and then at the bottom, you could create this new option: "Custom board icon (leave blank to reset to default)": {blank space here to enter image URL}
This is the best way to implement it, as it would be easy and intuitive to configure every custom board icon from the individual board modification page.
Quote from: Bigguy on November 08, 2010, 12:42:26 AM
The mod has now been updated. Look above for a link to my other post which has links on it for downloads. There is more to come for this mod. Like you suggested, there will be options in the admin panel. It's already in the works but might be a bit to come. As for the icons...there pretty easy to find through google to be honest. :)
I beleive I answered that here.
There has been a version change. This is just because some mistakes were found in the readmes for each mod so that was updated. No code change was done. ver 1.6.2 and 1.0b are still good. They have now become 1.6.3 and 1.1
MOD PAGE UPDATED
FIRST POST UPDATED
Finally an update! :D
actually i cant make it work... dont know whats going on... :S
i am doing everything that it is said in the readme file but nothing happens
Are you using a custom theme. ???
actually i do, and during the instalation it says test fail for most of my custom themes, although even at my default theme i added the folders with the icons still doesnt seem like anything happens
(i have many boards, to find the id board i am just counting them from the begining right?)
to get the board id, you should enter the board and check your url for the board id, they are not always/ever in number order.
If test failed on install then did you add the code manually.???
illori you were right!!! that was my problem!
i added 1,2,3 folders for my boards but (i dont know how or why) all my board ids are over 13 just renaming the folders made everything work (for the default theme) :D :D
Thank you veery much!!!
now on my custom theme, that my forum is going to use, i just have to insert manually the code to the specified files right? it wont need any tweaking
Insert the code. Move the icons folder to the custom theme folder. Copying it would be better then it will work in both themes.
Hi,
i try to install the fantastic mod but not working.
I used CB ver 1.1 with smf 1.1.11.
Modify the code in custom themes, create a folder with the images, but nothig appear.
If you help me?
Thx.
Your images folder might not have been in the right place. If the code was placed right and the icons folder was where it is supposed to be then it all should work. Did it work on the default theme. ???
Woohoo! Finally got time to finish my board icons. Good enough for now anyway.
I don't have an on off or on 2 function, I just want different board icons.
http://signforum.nicecarvings.com/index.php
Thanks, love this mod, da best!
I am very glad you like it. :) Nice lookin site.
Hi Bigguy
Any ETA on the new release with the admin panel? :)
No, not right now. I have been working on it though and making some progress.
very nice mod.
I have something to suggest to make it maybe a little bit faster. In my forum i use the same icons for boards inside the same tables. It would be nice to have an option to reuse some icons.
I dont know how the admin panel will be made but it would be nice to have an option to select the same icon as in another board. Maybe some input where the admin selects a subdirectory under directory /icons/ and a second text input with the boards numbers (to use those icons) separated with comas or something.
Thank you for your idea and I will take it into consideration. I'm glad you like the mod. :)
its getting conflict with this >>> http://custom.simplemachines.org/mods/index.php?mod=1065
...and?
Yes, some mods which edit the same sections of code may conflict with each other... in which case you either pick which one you must have and drop the other... or you figure out how to edit the mods into and around each other.
Hey Bigguy,
love the mod would not use a forum with out it!
but i have a question is there any way to show sub board custom board icons on the index?
i understand this might not be something needed in the mod but i was hoping you might know how to do that and could help or provide code for that.
thanks :)
not sure what but i tried the package installer and that didn't work so i went to do the manual one and for some reason this is not found anywhere.
// If the board is new, show a strong indicator
Are you sure you have the right version?
Quote from: Bigguy on November 11, 2006, 11:59:46 AM
UP-TO-DATE VERSIONS:
cbi 163 - Installs with SMF 2.0 RC4
cbi 11- installs with SMF 1.1.12
@ sodmanccc: on2.png does that does it not. ???
@ SISPro: abraamz question is valid, are you using the wrong version. Also that line is found in both versions of SMF
yes
no help on this yet
You answered yes to my question...does that mean you are using the wrong version or yes those lines are in the files. ???
no i am using the right version my Forum version: SMF 2.0 RC4 and the mod is cbi 163 - Installs with SMF 2.0 RC4
Installed the Custom Board Icons cbi163 mod on RC4 Curve.
No fails and seemed to install ok but it messed up all the board title colours and the member name colours.
I am using the member color link 308 mod that makes every member name the same color as their group in their posts and elewhere around the forum and all the colours have changed and reset to their orange default. Also every single board has lost the default orange colour and changed to a blue colour.
Did a manual install instead with exactly the same result.
Besides this, 10 stars, it works brilliantly. I appreciate there are compatiability issues with other mods but does anyone have any suggestions how I can have both mods working correctly? I need to have the member colour link mod as no other similar mod seems to work correctly and its going to be a real shame if I cant somehow use the custom board mod as well.
Others have said similar things. I have never noticed a change at all anytime I use it. I will take another look at it though when I get a free minute and see if I notice anything out of the ordinary.
Well after installing it on my new SMF 1.1.12 forum i am having a little bug while viewing the child board section inside parent board, the child board appears little buggy i have attached a screenshot plz look into it
What other mods do you have installed. ??? Did you manually install this onto that theme. ??? Are you sure if you did install manually that you copied all the code correctly. ???
Well i am just using : Recaptcha, Global Headers and Footers and CBI. Also i didn't installed it manually just auto install, i am using Orange Vista theme by fussilet
It's possible the edits did not get done right to the custom theme. That is all I can think of at the moment. Does it do the same in the default theme. ???
Yep same for default theme :'( Well i am attaching my BoardIndex.template.php file and MessageIndex.template.php file have a look at it
In MessageIndex.template.php you had double code. This was in twice:
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
I removed it from the file and have attached it.
Thanks and fixed. Thank you very much again :-*
Awesome. I've been looking for something like this for years! ;D Thanks for this mod. Hope to see the Admin panel at some point though!
One suggestion, though I've worked around it:
I only want one icon regardless of new posts etc in the forum. In this case I've just uploaded the same image thrice and named it differently.
Anyway, thanks again!
@ james_0_0_7: Glad it's fixed for you. :)
@ chinaren: If that works for ya then great. Glad you like it. :)
for some reason i don't think my board index template is compatible with this..
can you check it for me?
Yup, it's fine and the code is in there with no errors.
really? the images don't show up i just get the default ones
Can I have a url to your site. ???
I don't have one.. it's hosted on my computer with xampp
Oh...Is the icons folder placed in the right place...are you using a custom theme. ???
hmmm... I'm thinking there is a misunderstanding to what this mod does
go to Admin>>Forum>>Boards>>Modify Boards... click modify on any one of your boards
You should see "Name of image for this board:" with a little icon next to it (below description)
Click on that, upload your image..... make note of the name of your image or just copy the name after uploading it... Put that name in the empty field.
Now your icon should show up
If you want that Icon to link somewhere like an external url then use the field below that. "Link for the above image:"
(i'm get the feeling you put an image url in the second field)
Umm, no you are misunderstood, this mod does not have any settings. Icons must be uploaded manually
oh crap... wrong mod entirely (facepalm)
Images on board was on my mind
*spoogs runs off :P
yeah i have the images in child folder of icons as their ids and yes i am using a custom theme but i copied hte board index template form the default theme after i installed it
Move the icons folder over to the custom theme folder.
@ Spoogs: That's ok, we all make hasty mistakes. ;)
just had a good giggle at myself with that well thought out post ;D
lol, it's happened to me before, lol. :)
they are in the custom theme's folder
So your url to the icon is:
/forum/Themes/custom_theme/icons/1/off.png
There should be 3 files in each folder:
on
on2
off
All .png
yup everything is correct
This is on your own server right....check permissions on the folders. Not sure what else to say...The code is there and if all your paths are right then I'm not to sure right now. Is the code in the other file as well. Search it for on.png
There has to be a way to link multiple boards to a single image set... When you have 120+ boards you have to cache all 3 images PER board.. even if multiple boards share the same image... this can cause a massive bandwidth issue.
Well since there is :
SUB-NOTE:
Modification must NOT be changed without permission.
It should be as simple as adding another column to the DB under boards and attribute it to a group code.
Then you just assign each board a group code (can do numeric to make it easy) and then change the codes like
if (file_exists($settings['theme_dir'] . '/icons/' . $board['id'] . '/on2.png'))
$childboard_new_img=$settings['theme_url']. '/icons/' . $board['id'] . '/on2.png';
from $board['id'] to a group code...
PM me and we will talk. Tonight is not good though.
Hi, I'm trying to use this mod and I don't have the necessary files in my theme I only have
index.template.php
and
Settings.template.php
Does that mean I can't use the mod with this theme?
It's the theme Blu-Tech.
Thanks!
If you install the mod and it installed fine then you have no worries. What ever file is not there SMF will use the files in the default theme.
It won't install so I was trying to install in manually and I can't find the files in the theme. It only lists the core theme and that one fails the install test.
If the two files are not in the custom theme you want to use then modify the files in the default theme, manually if need be. Make sure to place the icons folder under the theme folder you are wanting to use.
Ok SWEET it works! Thanks a lot! I'm fairly new to this forum stuff but great mod! Thanks for the help!
Not a problem at all. Glad it's working for you.
I have a strange problem. Mod installed fine, i uploaded board icons and it still shows the old ones.
They are either uploaded to the wrong place or you have misnamed the icons folder. :) Please check again. Refer to the readme or the first post in this thread.
this is how i have it /Themes/default/icons/11/on.png
Do you have an off.png in there as well. ??? Also if your using a custom theme then move the icons folder under it.
Hello, first post haha. I don't have a clue what I'm doing wrong here. I keep getting language error or something after I manually edit the files.
BoardIndex >>>
<?php
// Version: 2.0 RC2; 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'], ' &#38;#8226; ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' &#38;#8226; ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
', ($settings['show_latest_member'] ? '<br />' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</p>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div class="tborder marginbottom">
<h3 id="newsfader" class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
<div class="windowbg2" id="smfNewsFader">
<div id="smfFadeScroller"><span>', $context['news_lines'][0], '</span></div>
</div>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
aFaderItems: [
"',
implode('",
"', $context['fader_news_lines']), '"],
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfNewsFader\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></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)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<div class="categoryframe tborder clearfix">
<div class="catbgf-l">
<div class="catbgf-r">
<div class="catbgf" style="padding-top: 5px; text-align: center; ">';
$first = false;
if (!$context['user']['is_guest'])
echo '
<div style="float: ', $context['right_to_left'] ? 'left' : 'right', ';">
<a href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>
</div>';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="', $category['collapse_href'], '" rel="nofollow">', $category['collapse_image'], '</a>';
echo '
', $category['link'];
echo '
</div></div></div>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<table cellspacing="1" 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>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg 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.gif" 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="windowbg2 info">
<h4><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'] > $board['unapproved_posts'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
</h4>
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
<span class="largetext">', $board['posts'], '</span><br /> ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
<span class="largetext">', $board['is_redirect'] ? '' : $board['topics'] . '</span><br />' . $txt['board_topics'], '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg2 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 '
<strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'];
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'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
// 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'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $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 class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td>
</tr>';
}
}
echo '
</table>';
}
echo '
</div>';
}
if ($context['user']['is_logged'])
{
echo '
<div id="modbuttons_bottom" class="modbuttons clearfix">
<div id="posticons" class="clearfix marginbottom">
<div class="smalltext floatleft">
<img src="', $settings['images_url'], '/new_some.gif" alt="" align="middle" /> ', $txt['new_posts'], '
<img src="', $settings['images_url'], '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" /> ', $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;' . $context['session_var'] . '=' . $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>
</div>';
}
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo '
<div class="tborder clearfix" id="infocenterframe">
<div class="catbgf-l">
<div class="catbgf-r">
<div class="catbgf" style="padding-top: 5px; text-align: center; ">
<a href="#" onclick="infoHeader.toggle(); 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="right" /></a>
', sprintf($txt['info_center_title'], $context['forum_name']), '
</div></div></div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['recent_posts'], '</h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
</p>
<div class="windowbg2 sectionbody hslice clearfix" 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 '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="smalltext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $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 information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '</h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=calendar' . '"><img src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
</p>
<div class="sectionbody windowbg2 smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</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'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</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'] ? '<strong>' . $event['title'] . '</strong>' : $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>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['forum_stats'], '</h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=stats"><img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
</p>
<div class="windowbg2 sectionbody middletext">
', $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'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</div>
</div>
</div>';
}
// "Users online" - in order of activity.
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['online_users'], '</h4>
<div class="windowbg">
<p class="section">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
</p>
<div class="windowbg2 sectionbody">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($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[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</div>
<hr class="hrcolor" />
<div class="smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</div>
</div>
</div>
</div>';
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['personal_message'], '</h4>
<div class="windowbg">
<p class="section">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
</p>
<div class="windowbg2 sectionbody">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<div class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</div>
</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="titlebg">', $txt['login'], ' <a href="', $scripturl, '?action=reminder" class="smalltext">', $txt['forgot_your_password'], '</a></h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=login"><img src="', $settings['images_url'], '/icons/login.gif', '" alt="', $txt['login'], '" /></a>
</p>
<div class="windowbg2 sectionbody">
<form id="infocenter_login" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
<ul class="reset horizlist clearfix">
<li>
<label for="user">', $txt['username'], ':<br />
<input type="text" name="user" id="user" size="15" class="input_text" /></label>
</li>
<li>
<label for="passwrd">', $txt['password'], ':<br />
<input type="password" name="passwrd" id="passwrd" size="15" class="input_password" /></label>
</li>
<li>
<label for="cookielength">', $txt['mins_logged_in'], ':<br />
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" class="input_text" /></label>
</li>
<li>
<label for="cookieneverexp">', $txt['always_logged_in'], ':<br />
<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="input_check" /></label>
</li>
<li>
<input type="submit" value="', $txt['login'], '" class="button_submit" />
</li>
</ul>
</form>
</div>
</div>
</div>';
}
// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
echo '
</div>
</div>';
}
?>
MessageIndex>>>
[code]<?php
// Version: 2.0 RC2; MessageIndex
function template_main()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
echo '
<a id="top"></a>';
if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder marginbottom" id="childboards">
<table cellspacing="1" class="bordercolor boardsframe">
<tr>
<td colspan="4" class="catbg headerpadding">', $txt['parent_boards'], '</td>
</tr>';
foreach ($context['boards'] as $board)
{
echo '
<tr>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg 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', '.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>';
// Has it outstanding posts for approval?
if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
echo '
<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > $board['unapproved_posts'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
</h4>
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
', $board['posts'], ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : $board['topics'] . ' ' . $txt['board_topics'], '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg2 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 '
<strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'];
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'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $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 class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</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(
'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'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . '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'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
// 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"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
', template_button_strip($normal_buttons, 'bottom'), '
</div>';
// If Quick Moderation is enabled start the form.
if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !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="1" class="bordercolor boardsframe">';
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<thead>
<tr>
<th width="9%" colspan="2" class="catbg3 headerpadding"> </th>
<th class="catbg3 headerpadding"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th class="catbg3 headerpadding" width="11%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th class="catbg3 headerpadding" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th class="catbg3 headerpadding" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th class="catbg3 headerpadding" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
// Show a "select all" box for quick moderation?
if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<th class="catbg3 headerpadding" width="24">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
</th>';
// If it's on in "image" mode, don't show anything but the column.
elseif (!empty($context['can_quick_mod']))
echo '
<th class="catbg3 headerpadding" width="4%"> </th>';
echo '
</tr>
</thead>';
}
echo '
<tbody>';
if (!empty($settings['display_who_viewing']))
{
echo '
<tr class="windowbg2">
<td colspan="', !empty($context['can_quick_mod']) ? '8' : '7', '" class="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.
if (!empty($context['unapproved_posts_message']))
{
echo '
<tr class="windowbg2">
<td colspan="', !empty($context['can_quick_mod']) ? '8' : '7', '" class="smalltext headerpadding">
<span class="alert">!</span> ', $context['unapproved_posts_message'], '
</td>
</tr>';
}
// No topics.... just say, "sorry bub".
if (empty($context['topics']))
echo '
<tr class="windowbg2">
<td class="catbg3" colspan="', !empty($context['can_quick_mod']) ? '8' : '7', '"><strong>', $txt['msg_alert_none'], '</strong></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'));
// Is this topic pending approval, or does it have any posts pending approval?
if ($context['can_approve_posts'] && $topic['unapproved_posts'])
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
// Sticky topics should get a different color, too.
elseif ($topic['is_sticky'] && !empty($settings['separate_sticky_lock']))
$color_class = 'windowbg3';
// Last, but not least: regular topics.
else
$color_class = 'windowbg';
// Some columns require a different shade of the color class.
$alternate_class = 'windowbg2';
echo '
<tr>
<td class="', $alternate_class, ' icon1">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="subject ', $color_class, '" ', (!empty($topic['quick_mod']['modify']) ? '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'] . '\');"' : ''), '>';
if (!empty($settings['separate_sticky_lock']))
echo '
', $topic['is_locked'] ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" class="align_right" alt="" id="lockicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '', '
', $topic['is_sticky'] ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" class="align_right" alt="" id="stickyicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '';
echo '
', $topic['is_sticky'] ? '<strong>' : '', '<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'] ? '</strong>' : '';
// 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 '
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
</td>
<td class="', $alternate_class, ' starter">
', $topic['first_post']['member']['link'], '
</td>
<td class="', $color_class, ' replies">
', $topic['replies'], '
</td>
<td class="', $color_class, ' views">
', $topic['views'], '
</td>
<td class="', $alternate_class, ' lastpost"
Are you editing the BoardIndex.template.php or the BoardIndex.php. ???
Im editing the >BoardIndex.template.php,
I have the template. Called Extreme6
BoardIndex.template.php
<?php
// Version: 2.0 RC2; 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'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</p>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div class="tborder marginbottom">
<h3 id="newsfader" class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
<div class="windowbg2" id="smfNewsFader">
<div id="smfFadeScroller"><span>', $context['news_lines'][0], '</span></div>
</div>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
aFaderItems: [
"',
implode('",
"', $context['fader_news_lines']), '"],
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfNewsFader\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></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)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<div class="categoryframe tborder clearfix">
<div class="catbgf-l">
<div class="catbgf-r">
<div class="catbgf" style="padding-top: 5px; text-align: center; ">';
$first = false;
if (!$context['user']['is_guest'])
echo '
<div style="float: ', $context['right_to_left'] ? 'left' : 'right', ';">
<a href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>
</div>';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="', $category['collapse_href'], '" rel="nofollow">', $category['collapse_image'], '</a>';
echo '
', $category['link'];
echo '
</div></div></div>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<table cellspacing="1" 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>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg 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.gif" 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="windowbg2 info">
<h4><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'] > $board['unapproved_posts'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
</h4>
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
<span class="largetext">', $board['posts'], '</span><br /> ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
<span class="largetext">', $board['is_redirect'] ? '' : $board['topics'] . '</span><br />' . $txt['board_topics'], '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg2 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 '
<strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'];
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'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
// 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'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $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 class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td>
</tr>';
}
}
echo '
</table>';
}
echo '
</div>';
}
if ($context['user']['is_logged'])
{
echo '
<div id="modbuttons_bottom" class="modbuttons clearfix">
<div id="posticons" class="clearfix marginbottom">
<div class="smalltext floatleft">
<img src="', $settings['images_url'], '/new_some.gif" alt="" align="middle" /> ', $txt['new_posts'], '
<img src="', $settings['images_url'], '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" /> ', $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;' . $context['session_var'] . '=' . $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>
</div>';
}
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo '
<div class="tborder clearfix" id="infocenterframe">
<div class="catbgf-l">
<div class="catbgf-r">
<div class="catbgf" style="padding-top: 5px; text-align: center; ">
<a href="#" onclick="infoHeader.toggle(); 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="right" /></a>
', sprintf($txt['info_center_title'], $context['forum_name']), '
</div></div></div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['recent_posts'], '</h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
</p>
<div class="windowbg2 sectionbody hslice clearfix" 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 '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="smalltext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $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 information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '</h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=calendar' . '"><img src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
</p>
<div class="sectionbody windowbg2 smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</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'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</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'] ? '<strong>' . $event['title'] . '</strong>' : $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>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['forum_stats'], '</h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=stats"><img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
</p>
<div class="windowbg2 sectionbody middletext">
', $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'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</div>
</div>
</div>';
}
// "Users online" - in order of activity.
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['online_users'], '</h4>
<div class="windowbg">
<p class="section">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
</p>
<div class="windowbg2 sectionbody">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($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[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</div>
<hr class="hrcolor" />
<div class="smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</div>
</div>
</div>
</div>';
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['personal_message'], '</h4>
<div class="windowbg">
<p class="section">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
</p>
<div class="windowbg2 sectionbody">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<div class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</div>
</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="titlebg">', $txt['login'], ' <a href="', $scripturl, '?action=reminder" class="smalltext">', $txt['forgot_your_password'], '</a></h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=login"><img src="', $settings['images_url'], '/icons/login.gif', '" alt="', $txt['login'], '" /></a>
</p>
<div class="windowbg2 sectionbody">
<form id="infocenter_login" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
<ul class="reset horizlist clearfix">
<li>
<label for="user">', $txt['username'], ':<br />
<input type="text" name="user" id="user" size="15" class="input_text" /></label>
</li>
<li>
<label for="passwrd">', $txt['password'], ':<br />
<input type="password" name="passwrd" id="passwrd" size="15" class="input_password" /></label>
</li>
<li>
<label for="cookielength">', $txt['mins_logged_in'], ':<br />
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" class="input_text" /></label>
</li>
<li>
<label for="cookieneverexp">', $txt['always_logged_in'], ':<br />
<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="input_check" /></label>
</li>
<li>
<input type="submit" value="', $txt['login'], '" class="button_submit" />
</li>
</ul>
</form>
</div>
</div>
</div>';
}
// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
echo '
</div>
</div>';
}
?>
MessageIndex.template.php
[code]<?php
// Version: 2.0 RC2; MessageIndex
function template_main()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
echo '
<a id="top"></a>';
if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder marginbottom" id="childboards">
<table cellspacing="1" class="bordercolor boardsframe">
<tr>
<td colspan="4" class="catbg headerpadding">', $txt['parent_boards'], '</td>
</tr>';
foreach ($context['boards'] as $board)
{
echo '
<tr>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg 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', '.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>';
// Has it outstanding posts for approval?
if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
echo '
<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > $board['unapproved_posts'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
</h4>
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
', $board['posts'], ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : $board['topics'] . ' ' . $txt['board_topics'], '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg2 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 '
<strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'];
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'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $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 class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</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(
'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'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . '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'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
// 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"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
', template_button_strip($normal_buttons, 'bottom'), '
</div>';
// If Quick Moderation is enabled start the form.
if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !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="1" class="bordercolor boardsframe">';
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<thead>
<tr>
<th width="9%" colspan="2" class="catbg3 headerpadding"> </th>
<th class="catbg3 headerpadding"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th class="catbg3 headerpadding" width="11%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th class="catbg3 headerpadding" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th class="catbg3 headerpadding" width="4%" align="center"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th class="catbg3 headerpadding" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
// Show a "select all" box for quick moderation?
if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<th class="catbg3 headerpadding" width="24">
<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />
</th>';
// If it's on in "image" mode, don't show anything but the column.
elseif (!empty($context['can_quick_mod']))
echo '
<th class="catbg3 headerpadding" width="4%"> </th>';
echo '
</tr>
</thead>';
}
echo '
<tbody>';
if (!empty($settings['display_who_viewing']))
{
echo '
<tr class="windowbg2">
<td colspan="', !empty($context['can_quick_mod']) ? '8' : '7', '" class="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.
if (!empty($context['unapproved_posts_message']))
{
echo '
<tr class="windowbg2">
<td colspan="', !empty($context['can_quick_mod']) ? '8' : '7', '" class="smalltext headerpadding">
<span class="alert">!</span> ', $context['unapproved_posts_message'], '
</td>
</tr>';
}
// No topics.... just say, "sorry bub".
if (empty($context['topics']))
echo '
<tr class="windowbg2">
<td class="catbg3" colspan="', !empty($context['can_quick_mod']) ? '8' : '7', '"><strong>', $txt['msg_alert_none'], '</strong></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'));
// Is this topic pending approval, or does it have any posts pending approval?
if ($context['can_approve_posts'] && $topic['unapproved_posts'])
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
// Sticky topics should get a different color, too.
elseif ($topic['is_sticky'] && !empty($settings['separate_sticky_lock']))
$color_class = 'windowbg3';
// Last, but not least: regular topics.
else
$color_class = 'windowbg';
// Some columns require a different shade of the color class.
$alternate_class = 'windowbg2';
echo '
<tr>
<td class="', $alternate_class, ' icon1">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="', $alternate_class, ' icon2">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="subject ', $color_class, '" ', (!empty($topic['quick_mod']['modify']) ? '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'] . '\');"' : ''), '>';
if (!empty($settings['separate_sticky_lock']))
echo '
', $topic['is_locked'] ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" class="align_right" alt="" id="lockicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '', '
', $topic['is_sticky'] ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" class="align_right" alt="" id="stickyicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '';
echo '
', $topic['is_sticky'] ? '<strong>' : '', '<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'] ? '</strong>' : '';
// 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 '
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
</td>
<td class="', $alternate_class, ' starter">
', $topic['first_post']['member']['link'], '
</td>
<td class="', $color_class, ' replies">
', $topic['replies'], '
</td>
<td class="', $color_class, ' views">
', $topic['views'], '
</td>
<td class="', $alternate_class, ' lastpost">
<a href="', $topic['last_post']['href'], '"><
Instead of doing that can you just attach the unedited file to your next post please. :)
Sorry. Sorry.
attachments below.
Try these. Remembr to back up the originals before adding these.
QuoteTry these. Remembr to back up the originals before adding these.
Ok I'm not getting errors but I tried a new set of icons on the board_1
under /forum/Themes/Extreme6/images/icons/1/on.png
/forum/Themes/Extreme6/images/icons/1/on2.png
/forum/Themes/Extreme6/images/icons/1/off.png
but the old icons are still repeating. Is something wrong here ?
/forum/Themes/Extreme6/icons/1/on.png
/forum/Themes/Extreme6/icons/1/off.png
/forum/Themes/Extreme6/icons/1/on2.png
This is where it should be.
Quote/forum/Themes/Extreme6/icons/1/on.png
/forum/Themes/Extreme6/icons/1/off.png
/forum/Themes/Extreme6/icons/1/on2.png
This is where it should be.
Ok so here is what I did, I uploaded and replaced the BoardIndex / MessageIndex with the files you uploaded. Also attached below.
I also uploaded only the first board as a test. And no current changes. I uploaded it under the file names >>>
/forum/Themes/Extreme6/icons/1/on.png
/forum/Themes/Extreme6/icons/1/off.png
/forum/Themes/Extreme6/icons/1/on2.png
- There are no errors but also none of the images in that folder are showing up under Board_1
what exactly should I do now ? Re-Check the Index ?
Have you cleared your forum cache and your browser cache. Do you have a link to your site.
QuoteHave you cleared your forum cache and your browser cache. Do you have a link to your site.
How do I clear my forum cache ?
- the web address is http://hiddenshard.com
Under maintenance, forum maintenance, then routine.
There is no image here:
/forum/Themes/Extreme6_RC_Final/icons/1/off.png
QuoteThere is no image here:
/forum/Themes/Extreme6_RC_Final/icons/1/off.png
Yeah here are the links >
http://hiddenshard.com/forum/Themes/Extreme6_RC_Final/images/icons/1/off.png
http://hiddenshard.com/forum/Themes/Extreme6_RC_Final/images/icons/1/on.png
http://hiddenshard.com/forum/Themes/Extreme6_RC_Final/images/icons/1/on2.png
>I also uploaded the files under >
http://hiddenshard.com/forum/Themes/Extreme6_RC_Final/BoardIndex.template.php
http://hiddenshard.com/forum/Themes/Extreme6_RC_Final/MessageIndex.template.php
What - should I be changing ?
Also "The maintenance task 'Empty the file cache' was executed successfully." I completely empty the cache as you asked. No changes among the board icons.
you did not read...
hiddenshard.com/forum/Themes/Extreme6_RC_Final/images/icons/1/off.png
should be
hiddenshard.com/forum/Themes/Extreme6_RC_Final/icons/1/off.png
Hello.
Why when I install this mod (it installs without errors) ... paint the letters on my forum from orange (defaut theme) change to blue ???
2.0 RC4
Others have said this as well. It is something I will have to look into as I have said before. It's such a small thing I keep forgetting though. There's not much code there so it has to be something easy.
I do not know if I like and others change color Tektite ... mainly me the default theme looks like
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi54.tinypic.com%2F2hcqkaw.png&hash=9eb8de330d38c902a8367fc248e824ed75a1a171)
Is there a solution to the font color back to normal?
I haven't looked into it yet but like I said it can't be anything big. If I get a chance I will look into it later. I would think it has something to do with this piece of code:
<td class="windowbg2 info">
QuoteWhy when I install this mod (it installs without errors) ... paint the letters on my forum from orange (defaut theme) change to blue
QuoteOthers have said this as well. It is something I will have to look into as I have said before. It's such a small thing I keep forgetting though. There's not much code there so it has to be something easy.
Big Guy, this happens on a fresh install of RC4 and is reproduceable every time for me.
Groovy, a possible solution for you if you want orange board names and use this mod is, install the mod and then in the Admin board panel where you set the board names, you can actually use HTML when writing those names like in the following:
<font color="#D97B33">My Board Title</font>
On the face of it, the only noticeable thing is when you mouse over the board title you should find the underline link will still be blue. There are other effects such as the board names in your profile stats will be orange rather than the default blue (which personally I prefer).
bad idea... you should not use html in the names. as bigguy says.... it looks to be a misconfig/use of css styles
Why is that a bad idea Kindred?
Its the only way that I could use this mod and have not yet seen any real negatives from using html in board names.
Quoteyou did not read...
hiddenshard.com/forum/Themes/Extreme6_RC_Final/images/icons/1/off.png
should be
hiddenshard.com/forum/Themes/Extreme6_RC_Final/icons/1/off.png
Thanks
Mode is really perfect, but unfortunately, changes the color letters we really do not like ... this is my only gripe with the mod ... and just would like to fix it:) :P
I will see what I can do today to fix that ok. Lately I have not had much time. I have been re-opening a site of mine.
is compatible with 2.0 RC5 and 1.1.13?
Check out my sig. ;)
I know, but i was asking if will work on that versions too.
But don't worry, I've check the code and I've seen it only needs a little adjust in a few lines to work.
Thanks anyway.
I should update my sig so it says 1.1.13. :)
Hmm I've compared the part of the code that is replaced on RC4 and RC5 and it's exactly the same, but the cbi code seems outdated and unoptimized :S
The cbi code is the same for both RC4 and 5....it is old code that has been used for years. Still works. ;)
That still works doesnt mean it's good... in fact, it's breaking the board's name class:
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
and some other things... and it's very unoptimized.
Here's the code updated and optimized for RC4 & 5, please, update it.
I've made a little modification to the path of the icons, to be more organized should be in images/icons.
Instead of:
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
I've used:
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
I've added support for redirection boards too:
forum/Themes/default/images/icons/board_id/redirect.png
Added support for theme variants too.
Note: This doesnt check anymore for on2.png because i've assumed all people that use a custom on.png uses an on2.png too, so the check it's not needed.
./Themes/default/BoardIndex.template.php
Find (Beware: it's not exactly the same selection as the original! this ends a bit early):
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
Replace with:
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
./Themes/default/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_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<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'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
I will definitely take a look at this a bit closer in the morning and quite possible package it up. Thank you for taking the time to go over the code. That was nice of you. :)
No problem, I needed it for my forums, so I did it. I hope it will be useful for everyone. ;)
PD: I've tested it and works fine.
I just finished the package and added your name to the credits for a small thanks in helping out. I did find one error. In BoardIndex.template.php the code was missing a '; at the end. Adding that got past a parse error. I will upload it on my site for now to see how it works for people. The new version number is 1.7.0 The package can be found here for now until the readme is updated. No registration is required to download the mod.
Uh? a missing '; ? where? o_o I cant see it
Edit: LOL I see what you did... you didnt read my warning XD
Quote from: Daegaladh on February 28, 2011, 10:30:34 PM
./Themes/default/BoardIndex.template.php
Find (Beware: it's not exactly the same selection as the original! this ends a bit early):
You have to remove this lines from the search in BoardIndex.template.php:
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
And that '; you added in the replacement part
Edit2: You missed that now support the redirect buttons and theme variants in the readme
No I read the whole thing but I was in to much of a rush to get the damn package out, lmao. Ok, I gotta take it down for now. I will package it up right tomorrow when I get up. It won't take long but it is getting late here. :)
EDIT: Mod has been removed from my site for now. I will package it up tomorrow morning. :) Thanks for catching that.
The new version is out for testing now and can be gotten here. Remember this is only in the testing stage so we can see what errors if any there are. The version number has changed and so has the instructions for where the icons should go. Please read the readme, thank you.
Ok, now the code is fine ;)
But the readme file has something weird...
For redirect boards use this:
forum/Themes/default/images/icons/board_id/off.png
Or:
forum/Themes/default/images/icons/board_id/on.png
Should be:
forum/Themes/default/images/icons/board_id/redirect.png
And now also support theme variations:
forum/Themes/default/images/icons/board_id/_variation/on.png
forum/Themes/default/images/icons/board_id/_variation/on2.png
forum/Themes/default/images/icons/board_id/_variation/off.png
forum/Themes/default/images/icons/board_id/_variation/redirect.png
For example, if I use a theme like Curve Minimal Multicolor, the Ferrari variation, it will be something like:
forum/Themes/curve_minimal_multicolor/images/icons/1/_Ferrari/on.png
Ok, I will change that after I get back from work this morning. I should not be gone long so that can wait. If no one finds problems with it I will upload it to the mod site and make the necessary changes there. :)
Readme has been updated.
I've checked the readme and saw 2 things:
CBI 1.0 {Custom Board Icons v1.6.3} should be 1.7.0
And you forgot to add how to use it with theme variations, as I said in my last post.
lol....been working on the readme and I found errors in my package-info.xml file as well....plus I added a redirect in it. So I have been doing a lot of work on it right now. I will add that as well. Give me a minute or two and I will upload the new version with a GOOD readme.txt, lol. :)
Ok, I do believe I have found all errors and corrected them all. Please find the beta package at my site by clicking the below link:
CLICK (http://community.smfhelper.info/index.php?action=downloads;sa=view;down=18)
Now I think is all fine ;)
Thank you for all the help you have given. I will leave it up for a bit where it is to get any feedback and then it will be on to the downloads site. Again, thank you. :)
CLICK (http://community.smfhelper.info/index.php?action=downloads;sa=view;down=18)
i searched for the lines i was supposed to replace in my code for the theme i am using and it wasnt finding them. I didnt want to install the mod not knowing if it would do the trick or not..
My theme also doesnt have a messageindex.template file it does have an index.template though unless it takes the message index from the default..
www.nhfragswap.com/forum
This is the part that needs changed. Also. If your theme does not have a messageindex.template.php file then when the mod installs it alters the default template, which your theme uses because it doesn't have one. I hope that made sense. :)
/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr class="windowbg2">
<td class="iconb">
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="infob">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
made sense to me :)
if i only want to change 4 board icons i just make the folders for those 4 correct? and the others stay the same.. and new board keep the default icons?
thanks for the quick responses :)
Yup, that's right. :) Glad you got it. :)
when i just downloaded and hit install the boardindex was the only one that tested sucessful. the other failed.
I cant find the line to replace in the messageindex either.
its weird that the default code cant be found..
what do i replace in the messageindex file i posted the code from
It's possible that you have installed another mod that altered the code in the messageindex.template.php This would be why the cbi mod can not find the right position to edit it. This is what you are looking for in that file:
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">
<a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
i just tried making the mods on both files and got parse errors on the board index file.
message index file seemed fine
OMG!
1- use code tags, not quote tags, PLEASE! :)
2- posting your whole file is not necessary... post just the questionable sections, as bigguy did in response, please.
--edit, it seems that Bigguy does want the whole file... but post that as an attachment rather than text in the message. :)
-note: I removed the code form your post in order to keep it from breaking the thread flow.
If you want to post that file and tell me what version of SMF you are using I will see what I can do for you. :)
its rc3
i'll repost it .. hopefully that mod wont delete it again ;) (i'll to just grab the code from the area you need this time)
<tr class="windowbg2">
<td class="iconb">
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="infob">
<a class="subject" 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'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show 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['new_posts'] : $txt['old_posts']) . ' (Konu: ' . $child['topics'] . ', Mesaj: ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/new_some.png" width="12" height="12" alt=""/><b>' . $child['link'] . '</b>' : '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/new_none.png" width="12" height="12" alt=""/>' . $child['link'];
}
echo '
<table style="float:right; padding-left:10px;" width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>';
$child_counter = 0;
if(empty($settings['child_boards_rows']))
{
echo '
<td style="width:50%" class="smalltext" valign="top">';
for(; $child_counter < ceil(count($children)/2); $child_counter++)
echo $children[$child_counter], '<br />';
}
echo '
</td>
<td style="width:50%" class="smalltext" valign="top">';
for(; $child_counter < count($children); $child_counter++)
echo $children[$child_counter], '<br />';
echo '
</td>
</tr>
</table>';
}
In order to edit the file properly I need the whole file. I can't just do it like this. If you would like to do it that's cool as well. Using the package parser is a great way to learn how to edit code. Are you using cbi 1.6.3 with SMF 2.0 RC3 ??? Also upgrading to RC5 would be a great choice as it is more secure than RC3 was. :) I can do it for you if you like. :)
Kindred is not a mod but is right. Please try to use code tags as you have in the above post to post code examples. :)
okay sorry i got busy yesterday i will post the code in a minute
okay here is the board index template one. thanks a bunch for looking into this for me :) I cant wait to use this :)
I was on a forum the other day using this http://aquariumclassifieds.com/index.php?PHPSESSID=b83fb7dace52481d27edb4e1684783a5&action=forum
i loved how they put mini banners for the sponsors.
<?php
// Version: 2.0 RC3; BoardIndex
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
// Show some statistics if stat info is off.
if (!$settings['show_stats_index'])
echo '
<div id="index_common_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'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</div>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div id="newsfader">
<div class="cat_bar">
<h3 class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
</div>
<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';
foreach ($context['news_lines'] as $news)
echo '
<li>', $news, '</li>';
echo '
</ul>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfFadeScroller\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></script>';
}
echo '
<div id="boardindex_table">
<table class="table_list" cellspacing="0">';
/* 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)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<tbody class="header">
<tr>
<td colspan="7" class="catbg"><span class="left"></span>';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
echo '
', $category['link'], '
</td>
</tr>
</tbody>
<tbody class="content">';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr class="windowbg2">
<td class="iconb">
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="infob">
<a class="subject" 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'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show 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['new_posts'] : $txt['old_posts']) . ' (Konu: ' . $child['topics'] . ', Mesaj: ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/new_some.png" width="12" height="12" alt=""/><b>' . $child['link'] . '</b>' : '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/new_none.png" width="12" height="12" alt=""/>' . $child['link'];
}
echo '
<table style="float:right; padding-left:10px;" width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>';
$child_counter = 0;
if(empty($settings['child_boards_rows']))
{
echo '
<td style="width:50%" class="smalltext" valign="top">';
for(; $child_counter < ceil(count($children)/2); $child_counter++)
echo $children[$child_counter], '<br />';
}
echo '
</td>
<td style="width:50%" class="smalltext" valign="top">';
for(; $child_counter < count($children); $child_counter++)
echo $children[$child_counter], '<br />';
echo '
</td>
</tr>
</table>';
}
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg2b" valign="middle" align="center" style="width: 8ex;">
<p>', comma_format($board['posts']), ' <br />', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '
</p>
</td>
<td class="windowbg2b" valign="middle" align="center" style="width: 8ex;">
<p>', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' <br />' . $txt['board_topics'], '</p>
</td>
<td class="lastpostb">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
echo '
</td>
</tr>';
}
}
echo '
</tbody>
<tbody class="divider">
<tr>
<td colspan="4"></td>
</tr>
</tbody>';
}
echo '
</table>
</div>';
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="align_left">';
// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']), );
echo '
<ul class="reset">
<li class="align_left"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
<li class="align_left"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="align_left"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
}
else
{
echo '
<div id="posting_icons" class="flow_hidden">
<ul class="reset">
<li class="align_left"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="align_left"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
}
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo '
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">
<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
</h3>
</div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
', $txt['recent_posts'], '
</span>
</h4>
</div>
<div class="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 '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_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>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '
</span>
</h4>
</div>
<p class="smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</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'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</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'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
}
echo '
</p>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
', $txt['forum_stats'], '
</span>
</h4>
</div>
<p>
', $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'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';
}
// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($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[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
echo $context['show_who'] ? '</a>' : '', '
</p>
<p class="inline 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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</p>
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>';
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span>', $txt['personal_message'], '</span>
</span>
</h4>
</div>
<p class="pminfo">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</p>';
}
echo '
</div>
</div></div>
<span class="lowerframe"><span></span></span>';
// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
}
?>
I meant attach the file to your post. I guess I was not clear on that. :) I will try to do it like this for you though hold on. :)
got ya. if you need the file i can do that too
Try this out but make sure to back up the original first.
no parse error.. but its not working.. i uploaded the files/folders icons/(board id#)/on.png.. etc
the font for the board names changed.. which i kind of like lol
the forum is still calling for the original on/off files/locations
not calling for the ones in the icon folders
just in case this file has something to do with it (in the theme there is the board index, index and index template
the icon file goes
Theme/darkmark/icons/18/on.png right?
Got IT!
the original post said to make the off.gif instead of the off.png
i just realized that and fixed it.. thanks a bunch!
Bigguy when the problem would be solved with changing the color of the letters ... after the installation mode?
Try this one but please read the readme as things have changed in this version.
CLICK (http://community.smfhelper.info/index.php?action=downloads;sa=view;down=18)
It's still in beta until it is tested a bit more but still works great.
1.7 installation goes smoothly, but does not work ... it is not showing icons next to section ... we 1.6.3 works fine ... just change the font color ... unfortunately :)
Can you give me a screenshot of 1.7.0 please. :)
For RC3 Manaul
Find Themes/defualt/BoardIndex.template.php
Themes/defualt/MessageIndex.template.php
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
replace with
Quote// If the board is new, show a strong indicator.
if ($board['new']) {
if (file_exists($settings['theme_dir'] . '/images/on_' . $board['id'] . '.gif'))
$board_new_img=$settings['images_url']. '/on_' . $board['id'] . '.gif';
else
$board_new_img=$settings['images_url']. '/on.gif';
echo '<img src="', $board_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// This board doesn't have new posts, but its children do.
} elseif ($board['children_new']) {
if (file_exists($settings['theme_dir'] . '/images/on2_' . $board['id'] . '.gif'))
$childboard_new_img=$settings['images_url']. '/on2_' . $board['id'] . '.gif';
else
$childboard_new_img=$settings['images_url']. '/on2.gif';
echo '<img src="', $childboard_new_img,'" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all! The agony!!
} else {
if (file_exists($settings['theme_dir'] . '/images/off_' . $board['id'] . '.gif'))
$board_nonew_img=$settings['images_url']. '/off_' . $board['id'] . '.gif';
else
$board_nonew_img=$settings['images_url']. '/off.gif';
echo '<img src="', $board_nonew_img,'" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
}
you can use .gif or. png by change type of icon as you want
Folder of image /Themes/default/images
Example: on_2.gif, on2_2.gif, off_2.gif
Is it deliberate that if a board is really a redirect board and it doesn't have an icon set for it, it defaults to the standard 'off' logo complete with the 'no new posts' tooltip? (Based on 1.6.3 on 2.0 RC4)
Probably overlooked is more like it. :) it should default to the original redirect image for SMF. Thanks for pointing that out and I will see what I can do about getting it fixed. :)
Awesome, thanks :)
(For anyone wondering why I care, SimpleDesk has the ability to present part of itself in the board index as a sort of virtual board, and I've been getting it to be able to display its own icons for the board icon, which only works if it's able to actually find the redirect image. Though I guess, if this mod is installed, you could use it to configure the icon anyway... Themeless edits FTW!)
You can if you like try the beta version of this mod (1.7.0) that is posted on SMFH. It was coded by another user here and is up for testing right now for anyone who wants to.
Thanks :) Got a link to it at all? I did a quick bit of looking but couldn't find it. :(
People are supposed to be able to get here (http://community.smfhelper.info/index.php?action=downloads;sa=view;down=18). Can you. ??? Hope so. :)
Ah, I didn't think to look in the download area...
EDIT: Looks like the issue I've reported is fixed in that, thanks :)
Your more than welcome, it's still beta til it gets tested more but it does work fine. :)
Okay I need to know if this mod works on RC3 and if it does which version should I install?
cbi157 should work with RC3, if not try the latest version.
So I installed it but doesn't seem to be working bud. Kinda require some assistance here... I installed cbi157... I had to make edits manually since I usually have an issue when it comes to installation.... I'm attaching the two files I edited... What do you think could be wrong?
You have not attached anything.
Quote from: Bigguy on May 08, 2011, 02:43:32 PM
You have not attached anything.
Whooops I tend to get lost sometimes... :D
Here you go mate.
The edits look fine and there are no errors there. Are you putting the icons in the right place. ???
Quote from: Bigguy on May 08, 2011, 05:47:30 PM
The edits look fine and there are no errors there. Are you putting the icons in the right place. ???
Yes, sir. Mind checking it out?
PM me if you like.
Mod doesn't works for me with SMF RC5 and latest cbi manual installation instructions.
Nice mod.
Thank you.
Try this (http://community.smfhelper.info/index.php?action=downloads;cat=4) one and see if it works for you.
Uhm, not. I've correctly installed, but I can't see any difference.
Are your icons in the right place. Please refer to the readme in each of the mods for the position they should be in.
Yes, the icons is in the correct directory with the correct tree. I have used the mod with SMF 2.0 RC2 and it worked perfectly.
I'll try again tonight and I'll let you know.
Thank you.
Hey guys the mod doesn't work for SMF 1.1.13 too. It's a pity this mod doesn't work for the new versons of SMF.
The mod does work with both current versions of SMF.
Is it tested and confirmed man? Because I have installed it and it doesn't even work on the default theme. And another member said that the mod doesn't work in 2.0 RC5 version too. Thanks for your time!
have you actually added any icons? (on 1.1.x, with custom themes, did you manually install?) Because, as Bigguy stated, this mod works fine on all current versions.
Thanks Kindred. :) It states on the mods page what version works with what. Also if you look up a couple posts you will see a link to a beta version on my site.
Quote from: Kindred on June 04, 2011, 07:13:03 PM
have you actually added any icons? (on 1.1.x, with custom themes, did you manually install?) Because, as Bigguy stated, this mod works fine on all current versions.
That was not actually necessary to check if the mod works. Even if you hadn't added any icons something like "there is no image" would appear.
Anyway gonna try again tommorow because I want this mod so bad. Thanks for creating it man. :)
actually... no. if no image is present, it defaults to the standard forum image
Back in SMF 1.1.11 no but maybe in the newer versions. Gonna test it right now.
This might be a dumb question, but I'm sure it isn't my first one. Does this mod work with 2.0? I see 2.0 RC5 listed on the mod's page but not just 2.0. I just upgraded my forum and would like to use this mod, but I'm not sure if it's compatible or not. Thanks!
To be honest I have not even tried to install with 2.0 final. Give it a shot and post back. ;)
Quote from: Bigguy on June 14, 2011, 09:20:23 PM
To be honest I have not even tried to install with 2.0 final. Give it a shot and post back. ;)
Is there a chance it could mess up my forum? It will take me quite a while to get all of my icons together so I won't be able to post back very quickly.
I just tried it and got "Test failed" on everything. :(
Quote from: arreferee on June 14, 2011, 10:05:04 PM
I just tried it and got "Test failed" on everything. :(
Let me know if you have any ideas on this or if you plan to update this to 2.0.
Thanks! (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.refstripes.com%2Fforum%2FSmileys%2Fclassic%2Fthumbs.gif&hash=62e41e672436245e3234697348bab4c40175c601)
Try this one and see if it works for you. It's still in beta right now but does work well. PLease read the readme that is attached to it to find out where icons go and such.
http://community.smfhelper.info/index.php?action=downloads;sa=view;down=18
Quote from: Bigguy on June 15, 2011, 06:47:12 PM
Try this one and see if it works for you. It's still in beta right now but does work well. PLease read the readme that is attached to it to find out where icons go and such.
http://community.smfhelper.info/index.php?action=downloads;sa=view;down=18
I tried to install is and received the following error:
Installations actions for "cbi 1.0"
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
I'm using SMF 2.0. Am I doing something wrong?
No your not...I have not updated the package. I am sorry for that. Got a day off tomorrow so I will work on it then. :)
Quote from: Bigguy on June 16, 2011, 12:17:10 AM
No your not...I have not updated the package. I am sorry for that. Got a day off tomorrow so I will work on it then. :)
Sounds good...thanks. I'm really looking forward to incorporating this into my forum. :D
It can be manually incorporated by using the package parser on the page you downloaded the mod from. This not only gets the mod installed but also teaches you about SMF coding. :) it's just an option. ;)
Quote from: Bigguy on June 16, 2011, 12:17:10 AM
No your not...I have not updated the package. I am sorry for that. Got a day off tomorrow so I will work on it then. :)
Thank you!
Quote from: Bigguy on June 16, 2011, 12:17:10 AM
No your not...I have not updated the package. I am sorry for that. Got a day off tomorrow so I will work on it then. :)
Were you able to get this updated for 2.0? I have been so busy, I haven't had a chance to try to manually incorporate it.
Not yet, no. Sorry. I have been busy and will try to get to it as soon as possible. People are having success using emulate version in the advanced options of the package manager thought. ;)
Quote from: Bigguy on June 23, 2011, 11:37:06 PM
Not yet, no. Sorry. I have been busy and will try to get to it as soon as possible. People are having success using emulate version in the advanced options of the package manager thought. ;)
I think I was able to get it manually installed tonight. The only issue I see is that the descriptions of the board are being duplicated. I've checked on the board setup and they aren't duplicated there. Any ideas as to how I can fix that? Here's how they look:
Announcements
This is for board announcements, upgrade information, etc.
This is for board announcements, upgrade information, etc.
Thanks!
You have duplicate code somewhere in the template files.
Quote from: Bigguy on June 24, 2011, 01:38:44 AM
You have duplicate code somewhere in the template files.
The following is what I added to the template files based on the parser for 2.0 on the mod page. I see some duplicate information, but I'm not sure what I would need to cut out...if any of it.
Boardindex.template
// If the board is new, show a strong indicator.
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[333], '" title="', $txt[333], '" 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[333], '" title="', $txt[333], '" 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[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'];
Messageindex.template
// If the board is new, show a strong indicator.
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[333], '" title="', $txt[333], '" 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[333], '" title="', $txt[333], '" 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[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'];
Can you attach the two files that were modified by you. ???
Quote from: Bigguy on June 25, 2011, 07:45:43 PM
Can you attach the two files that were modified by you. ???
Here ya go...
What version do you have installed. 1.6.3 ??? try the one from my site but read the readme included with it. I have looked over your files and there is no duplicate code like I though. I can not find anything wrong. Maybe just not lookin hard enough.
Quote from: Bigguy on June 27, 2011, 11:22:10 PM
What version do you have installed. 1.6.3 ??? try the one from my site but read the readme included with it. I have looked over your files and there is no duplicate code like I though. I can not find anything wrong. Maybe just not lookin hard enough.
I just made the changes from the parser for 2.0 (http://custom.simplemachines.org/mods/index.php?action=parse). I'm not sure if that is 1.6.3 or a different version. I tried downloading a couple of different versions (see several posts above this one) and couldn't get either of them to work.
Maybe you would allow me to check things out for you. It's up to you though and I might not be able to do it today. it's a possibility though, depends on if the wife has anything for me to do, lol.
Quote from: Bigguy on June 28, 2011, 05:14:15 PM
Maybe you would allow me to check things out for you. It's up to you though and I might not be able to do it today. it's a possibility though, depends on if the wife has anything for me to do, lol.
Sorry for the delay in getting back to you. What will you need for this? Admin access to the forum? I don't currently have it installed since it was duplicating everything. The only changes I made were in the two files I attached a few posts up. I just renamed them with a "1" on the end and put the original ones back out there until I could get it figured out.
Thanks!
Maybe we can do this later tonight or tomorrow. Did you try the beta version that is located on my site. ???
Quote from: Bigguy on July 02, 2011, 03:23:01 PM
Maybe we can do this later tonight or tomorrow. Did you try the beta version that is located on my site. ???
The version that is under Beta Mods on your site (cbi 1.7.0) is the one I tried to install earlier and received the following error:
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.Could it have something to do with the theme I'm running? I installed it on my test board and I don't have the same duplication of the board descriptions. If so, do I need to check with the theme creator?
Quote from: arreferee on July 02, 2011, 04:18:58 PM
Could it have something to do with the theme I'm running? I installed it on my test board and I don't have the same duplication of the board descriptions. If so, do I need to check with the theme creator?
I posted this question in the thread for the theme I'm running and Dr. Deejay was able to help me get this fixed.
Thanks for the help, Bigguy!
I'm hoping a 2.0 version of this is released soon. My forum looks Dull :P.
Many Thanks
To put all the icons the same? Without writing the ID number every time? Thanks ..;)
I will get this mod updated this week for 2.0 and probably post 1.7.0 version from my site to here as well.
Thank u!! :-) not sure if this is possible.. But could it be coded so u don't have to enter the ID.. bur instead have a 'browse button' or a 'URL' so it knows where the picture is... ? Thanks
It's something that can be looked into for sure. :)
Can't wait for this to work on 2.0 and have a browse button or option...something different from the ID's lol
Thanks !
Hi,
I'm not pushing you or nothing, but this MOD is a must as my board looks dull as hell lol...Any quicxker would be much aprpeciated.. Thanks!
I will take a look at the beta mod on my site and see if it will upgrade tonight. Then it will be posted on SMFH for the night and moved to the mod page here.
Thanks dude :-)
Ok all I have done so far is updated the package-info.xml. This mod SHOULD NOT BE USED ON A LIVE SITE UNTIL TESTED I have NOT tested it. This is why it is only on my site right now. There are no code changes but please read the readme. If you guys wanna test it please feel free to. I will have more time to test it later tonight.
Nice one.. I'll wait until your next reply when you have confirmed it tested ok on live sites :-)
Lol, ok...well I did a quick test and it installs and uninstalls cleanly. There should be no problems. It is still in beta right now but it's the same code and it was tested with no errors by a few people before. New download link:
click (http://community.smfhelper.info/index.php?action=downloads;sa=view;down=20)
Same rules apply as the first post. SHOULD NOT BE USED ON A LIVE SITE UNTIL TESTED
I have tested it somewhat this time. ;)
Many Thanks... I'll give it ago soon...
Did you manage to do a 'Browse' as the ID number is a right pain!!! :D
Let me know. Thanks
No, sorry I did not do that. All I did was make changes to the package-info.xml file. Thanks for reminding me though. I will try to get to that soon. :)
The problem with adding a configurable browse is that it will require a database write/read.... On large, active sites, this will add more overhead.
Personally, I think naming the files by iD is clean, elegant and simple.
I disagree th using a separate directory per image, which is why I always change my installation to just use the filename with the Id, like on_22.gif, on2_22.gif and off_22.gif (or .png if your using the newest style)
That's right. I remember that being mentioned years ago when this mod started or shortly after I think. Maybe two versions are in order....I did get permission to take over that other board icon mod and was planning to integrate them to one. I actually even started on it but have had zero time to do anything in months.
for 1.1.14 smf what cbi is suitable? ???
[edit] ok problem solved.
I installed your new download link on 2.0 and it gave me "Tests Failed" in Red...I click Install and it doesn't work eitherway. I did the folder correctly as I did it before....See what's wrong please mate.. Thanks
Where there two test failed or just one. if just one, which file was it.
Looks like it failed on all of them mate...see screenshot.
Ok, I will have to go over it later tonight then.
The quicker the better dude...Many Thanks though. Martin
Bigguy I am using 1.1.14 smf version. Which version of your mod is suitable with mine? THanks alot . I am asking because I have accrosed a lot of problems these days with this specific package (it change my forum , like double name of child boards blabla)
Look at the mod page...it should tell you on there what version to use. If I have time tonight I will be upgrading this mod.
Have you sorted 2.0 yet mate? :-)
Ok, try this and see what happens:
CLICK (http://community.smfhelper.info/index.php?action=downloads;sa=view;down=21)
No...Didn't work. They all Failed on all Themes Mate..Sorry, Screenshot attached.
It installed fine on my forum so your forum has been edited by other mods and this is probably why it will not install. You may have to do it manually.
Ok, If I needed to do it Manually....Do I have to click Install Now regarding of the test failing and then do manual edit or do it before installing your mod?
Recommendation?
No, just look at the modifications.xml file inside the mod and make the necessary changes to the boardindex.template.php and the messageindex.template.php. You can't use the parser on the mod page of this site cause it is not uploaded here yet and my parser needs an update. If you can find one that would be easier.
I'm not very good at coding mate....I can use the parser very well...and I can use the 2.0 on your mod page, but as you said it's not updated.
If you can update the praser mate...It will really really help..Thanks Dude..I know your busy busy lol
Been meaning to do it for a bit now. Might have it done tonight.
Any quicker and witin the next hour would be fantastic...I'm pushing it now aint I lol lol ha aha
A little yes, lol. You will find a parser link in the footer on my site. It should be up to date now and working.
Cool. thanks...Did u just update that one on your site now lol?
Yes, yes I did. A member here requested that it be done, lol. ;)
Bigguy can I install now your mod at SMF 2.0? ???
I tried cbi172 but it makes tests failed.
Ohh Thanks dude....Ermmm..You know your mod...Does it have a Administration page? Where is it based?
See...I'm not the only one getting test Failed...Hotman got it too lol....You sure u fixed it bigguy?
Martin did you manage to add it on 2.0 version? If yes please contact me on msn ;)
Bigguy do you want to connect with teamviewer in my pc in order to install it?
If that the case,....You can do mine too Bigguy lol lol...Or Can you fixed it Bigguy - Your the man and we want your mod lol
Quote from: Martingonnella on July 14, 2011, 07:42:10 PM
If that the case,....You can do mine too Bigguy lol lol...Or Can you fixed it Bigguy - Your the man and we want your mod lol
haha , same here :P
If you are getting a test failed then it is probably due to another mod editing the files that this one does. As I said I have installed it and there are no errors. The package parser is there for you to use and the whole SMF community is here to answer questions for you. You guys give a manual install a try and see how it goes....just back up the files you edit that's all. :)
Quote from: Bigguy on July 14, 2011, 07:55:17 PM
If you are getting a test failed then it is probably due to another mod editing the files that this one does. As I said I have installed it and there are no errors. The package parser is there for you to use and the whole SMF community is here to answer questions for you. You guys give a manual install a try and see how it goes....just back up the files you edit that's all. :)
OK I will check it in 5-6 hours from now. I dont know how to make backup :-[
Just save a copy of the original file somewhere. Just in case your edits don't work you can put back the originals. ;)
OK I am going to test it right now.. ::)
WTF I cant find the lines exactly like in parse given.
./Themes/default/BoardIndex.template.php
I cant 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], '" />';
echo '</a>
</td>
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
and replace it with this
// If the board is new, show a strong indicator.
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[333], '" title="', $txt[333], '" 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[333], '" title="', $txt[333], '" 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[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'];
BoardIndex.php (original) (http://www.megaupload.com/?d=PXCZNH6C)
What version are you parsing and what version of SMF are you installing to. Also are you looking in the default theme files or custom ones.
I am using smf 2.0 (the latest package) . I am using also the default theme... ;)
- I select in parse the 2.0
Maybe i can look at this tomorrow for you. Today I am a bit busy.
Um there is a cbi 1.7.2 and it should work just fine. The reason it is not on this site is because I have not put it here yet:
http://community.smfhelper.info/index.php?action=downloads;sa=view;down=21
Hi,
I can't find this exact code in my Board Index. Any help would be appreciated.
I have attached BoardIndex.template to this if it helps.
Please please :) :)
// If the board or children is new, show an indicator.
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['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.png';
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.png';
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.png" alt="*" title="*" border="0" />';
echo '</a>
</td>
<td class="windowbg2 info">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';
Ok, I tried 1.7.2 or whatever, but that ended up giving me a parse error. So I removed it and went back to 1.6.3. But it's kind of pointless because for some reason, which I can't figure out for the life of me, the custom board icons simple will not show up...
Same here. lol
Okay, I just figured out my problem. I swear, the icon path/naming convention of these theme bothered me when I first had to mess with it and it bothers me now...
If the icons refuse to work for you, check your paths. You need your custom icons here:
root/smf-install-directory/themes/Your-Theme/icons/2(for example)/on.png
NOT here:
root/smf-install-directory/themes/Your-Theme/images/icons/2/on.png
This is stupid... -_-
Just an imo here, but they should be in the icons folder inside the images directory. Or even better, do like I did a while back when i changed this mod to how I liked it:
root/smf-install-directory/themes/Your-Theme/images/board_icons/2_on.png (2_on2.png and 2_off.png)...
that's whow I revised the mod myself (one directory with the boardID as part of the filename i.e. on_23.gif, on2_23.gif)
I've still got this problem to get through first lol
I can't find this exact code in my Board Index. Any help would be appreciated.
I have attached BoardIndex.template to this if it helps.
Please please :) :)
// If the board or children is new, show an indicator.
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['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.png';
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.png';
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.png" alt="*" title="*" border="0" />';
echo '</a>
</td>
<td class="windowbg2 info">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b>';
Version 2.0?thank you..:)
Not sure why everyone is having problems but I will look at the versions again tonight when I get home.
I have not had a chance yet to look at anything yet but this weekend I will for sure. At least I will have an update for you. :)
Thanks... Thank you lots!
Does this mod work with child boards? I'm trying to set up a child board and I can't get the icon to work correctly. I'm using a custom theme, but all of the other icons are working in the regular board. I have a different folder set up under the icons folder on the server with on.png and off.png files in it, but they don't seem to be working. Am I missing something?
Quote from: arreferee on August 02, 2011, 03:04:47 PM
Does this mod work with child boards? I'm trying to set up a child board and I can't get the icon to work correctly. I'm using a custom theme, but all of the other icons are working in the regular board. I have a different folder set up under the icons folder on the server with on.png and off.png files in it, but they don't seem to be working. Am I missing something?
It works with all boards, i didn't notice any child boards on your site
Quote from: kingkingston on August 03, 2011, 01:32:13 AM
Quote from: arreferee on August 02, 2011, 03:04:47 PM
Does this mod work with child boards? I'm trying to set up a child board and I can't get the icon to work correctly. I'm using a custom theme, but all of the other icons are working in the regular board. I have a different folder set up under the icons folder on the server with on.png and off.png files in it, but they don't seem to be working. Am I missing something?
It works with all boards, i didn't notice any child boards on your site
The child board that I just set up is in a secure section. I guess I'll have to play around with it a little longer and see if I can get it figured out.
Quote from: arreferee on August 03, 2011, 08:16:15 AM
Quote from: kingkingston on August 03, 2011, 01:32:13 AM
Quote from: arreferee on August 02, 2011, 03:04:47 PM
Does this mod work with child boards? I'm trying to set up a child board and I can't get the icon to work correctly. I'm using a custom theme, but all of the other icons are working in the regular board. I have a different folder set up under the icons folder on the server with on.png and off.png files in it, but they don't seem to be working. Am I missing something?
It works with all boards, i didn't notice any child boards on your site
The child board that I just set up is in a secure section. I guess I'll have to play around with it a little longer and see if I can get it figured out.
well you just do the same as you have on your home forum index page
if you have a custom theme, you may have to modify the template file...
for normal boards, boardindex.template.php
for child boards, messageindex.template.php
Quote from: kingkingston on August 03, 2011, 11:11:44 AM
The child board that I just set up is in a secure section. I guess I'll have to play around with it a little longer and see if I can get it figured out.
well you just do the same as you have on your home forum index page
[/quote]
I have it set up like the other boards, but when I look at the image location for the child board, I see the following:
hxxp:www.mysite.com/forum/Themes/Mobile_2_0/images/off.png
It should be in:
hxxp:www.mysite.com/forum/Themes/Mobile_2_0/icons/55/off.png
How can I change that for the child board?
Quote from: arreferee on August 04, 2011, 05:01:28 PM
Quote from: kingkingston on August 03, 2011, 11:11:44 AM
The child board that I just set up is in a secure section. I guess I'll have to play around with it a little longer and see if I can get it figured out.
well you just do the same as you have on your home forum index page
I have it set up like the other boards, but when I look at the image location for the child board, I see the following:
hxxp:www.mysite.com/forum/Themes/Mobile_2_0/images/off.png
It should be in:
hxxp:www.mysite.com/forum/Themes/Mobile_2_0/icons/55/off.png
How can I change that for the child board?
[/quote]
I registered at your website so i can have a look at the problem to see if i can help in any way :)
Quote from: kingkingston on August 04, 2011, 05:57:45 PM
I registered at your website so i can have a look at the problem to see if i can help in any way :)
Sorry for the delay, but I just now was able to check email. I just approved your registration.
I also gave you access to the Refstripes.com Heroes board. It should be the first board at the top of the forum. The child board is under that...Refstripes Heroes Repository.
Quote from: arreferee on August 04, 2011, 10:19:50 PM
Quote from: kingkingston on August 04, 2011, 05:57:45 PM
I registered at your website so i can have a look at the problem to see if i can help in any way :)
Sorry for the delay, but I just now was able to check email. I just approved your registration.
I also gave you access to the Refstripes.com Heroes board. It should be the first board at the top of the forum. The child board is under that...Refstripes Heroes Repository.
did you get it sorted out ?
Quote from: kingkingston on August 07, 2011, 01:20:54 AM
Quote from: arreferee on August 04, 2011, 10:19:50 PM
Quote from: kingkingston on August 04, 2011, 05:57:45 PM
I registered at your website so i can have a look at the problem to see if i can help in any way :)
Sorry for the delay, but I just now was able to check email. I just approved your registration.
I also gave you access to the Refstripes.com Heroes board. It should be the first board at the top of the forum. The child board is under that...Refstripes Heroes Repository.
did you get it sorted out ?
No, I haven't gotten it figured out yet. I'm sure there's something small I'm missing, but I haven't been able to find it yet.
Quote from: arreferee on August 07, 2011, 06:12:33 PM
Quote from: kingkingston on August 07, 2011, 01:20:54 AM
Quote from: arreferee on August 04, 2011, 10:19:50 PM
Quote from: kingkingston on August 04, 2011, 05:57:45 PM
I registered at your website so i can have a look at the problem to see if i can help in any way :)
Sorry for the delay, but I just now was able to check email. I just approved your registration.
I also gave you access to the Refstripes.com Heroes board. It should be the first board at the top of the forum. The child board is under that...Refstripes Heroes Repository.
did you get it sorted out ?
No, I haven't gotten it figured out yet. I'm sure there's something small I'm missing, but I haven't been able to find it yet.
i will have another look later on
I figured it out and have changed the download on my site. The link is here (http://community.smfhelper.info/index.php?action=downloads;sa=view;down=22). As it says, it has been tested for install, uninstall, errors and functionality. It does work. Please read the readme file attached to the mod when installing for instructions. I am very sorry for any inconvenience to anyone. I have been terribly busy lately.
Does this work with 2.0? It would be awesome if you could just upload the icons you wanted from the ACP and apply them to boards from there...
Quote from: oldrow on August 11, 2011, 11:05:02 AM
Does this work with 2.0? It would be awesome if you could just upload the icons you wanted from the ACP and apply them to boards from there...
Yes, it works with 2.0.
Quote from: oldrow on August 11, 2011, 11:05:02 AM
Does this work with 2.0? It would be awesome if you could just upload the icons you wanted from the ACP and apply them to boards from there...
It does work with 2.0 final. Your idea about uploading the icons is in the works soon. :)
Quote from: Bigguy on August 11, 2011, 12:02:23 AM
I figured it out and have changed the download on my site. The link is here (http://community.smfhelper.info/index.php?action=downloads;sa=view;down=22). As it says, it has been tested for install, uninstall, errors and functionality. It does work. Please read the readme file attached to the mod when installing for instructions. I am very sorry for any inconvenience to anyone. I have been terribly busy lately.
Just so the link does not get lossed. :)
How soon? Is it worth the wait?
Quote from: oldrow on August 11, 2011, 02:56:45 PM
How soon? Is it worth the wait?
No it's not. Download this one.
Just wanted to throw out the link once more so a couple more people can try it before I upload it to the mod site.
http://community.smfhelper.info/index.php?action=downloads;sa=view;down=22
Does this mod work with pretty urls?
I don't think anyone has posted any problems about it...ever. i have not tested it though.
Quote from: Bigguy on August 11, 2011, 11:43:11 PM
I don't think anyone has posted any problems about it...ever. i have not tested it though.
I was thinking if you used prettyurls,you would need to use the name like general-discussion instead of the board id. I tested it and it worked fine,just need to use the number.
That's good to hear, thanks for testing. :)
Quote from: Bigguy on August 12, 2011, 08:56:58 AM
That's good to hear, thanks for testing. :)
Yep yep,I guess its good someone like myself put it out there,so someone else like myself don't have to ask lol.
Mod site updated. :)
Bud, thanks for re-writing for 2.0!
Not a problem. :)
Parse for 1.1.11 for this mod doesn't work. Is anyone can give me parse instalation for SMF 1.1.11 ??
Check the mod page for the correct version
Awesome! What are the standard sizes for making custom icons?
I use just a bit bigger then what SMF uses but it's really up to the individual.
what size do you use... i dont even know where to start :laugh:
When I use them I think it's 42x42 that I use. or 40x40. Either will work.
Is there anyway to make the icons show the on version to guests,instead of the off?
Also it seems the new version will not work. i have the icons uploaded to the directory,but it is only showing the default icons.
Is there something new I have to enable?
NOt to sure about showing them on to guests. Don't know how that would be done. Yes the new version does work. Have you read the readme file. ??? Nothing new to enable.
Quote from: Bigguy on August 27, 2011, 06:36:44 PM
NOt to sure about showing them on to guests. Don't know how that would be done. Yes the new version does work. Have you read the readme file. ??? Nothing new to enable.
Yep I read the readme. I am also confused as to why it is not working.
Now I am not to bright on php,but couldn't you make simple setting that says what icon to use for guest? So the user can just choose on off or on2.
Do you have cache enable in the admin panel. ??? if so clear your forum cache and your browser cache. That will make a difference.
Quote from: Bigguy on August 27, 2011, 08:12:53 PM
Do you have cache enable in the admin panel. ??? if so clear your forum cache and your browser cache. That will make a difference.
Yes I have done that and the problem persists. I do notice though that after the forum loads the icons do a flicker,like they are trying to load the custom icons.
What version of the mod are you using, the most recent. ???
Quote from: Bigguy on August 28, 2011, 01:53:41 PM
What version of the mod are you using, the most recent. ???
Right now 1.6.3 since it gives no problem. 1.7.2(the latest) is the one giving issues.
In the latest version the place for the icons has changed eh. If you have 1.6.3 working though that's fine. There really si not much change from the latest version.
Quote from: Bigguy on August 28, 2011, 02:48:14 PM
In the latest version the place for the icons has changed eh. If you have 1.6.3 working though that's fine. There really si not much change from the latest version.
Ah okay, that explains it. However how has it changed,according to the readme you still upload to the same area.
Also did you see my note on the show x icon for guests? I gave my thoughts on how it might be possible.
No in the old versions you have to make an icons folder and then folders in that to correspond with the board id's. In the new version you put folders for the boards in the already existing icons folder under the images folder in each theme. Yes I did see your note on that. There is code over at the simple portal website that will show the on.png to guests on their portal....maybe it could be used in SMF to give you the same results. You should see where I posted on that site about it if you look into it.
Quote from: Bigguy on August 29, 2011, 03:59:24 PM
No in the old versions you have to make an icons folder and then folders in that to correspond with the board id's. In the new version you put folders for the boards in the already existing icons folder under the images folder in each theme. Yes I did see your note on that. There is code over at the simple portal website that will show the on.png to guests on their portal....maybe it could be used in SMF to give you the same results. You should see where I posted on that site about it if you look into it.
Ah okay that makes since, and I will look into that.(I can't seem to find the thread though) Hopefully I have enough basic php knowledge to do something lol..
This (http://simpleportal.net/index.php?topic=4176.msg26966#msg26966) should be it.
i got problem
after i try install
http://www.image-share.com/ipng-890-291.html
You will have to install manually into those themes. This mod only installs to the default theme by default.
Quote from: Bigguy on August 29, 2011, 11:14:05 PM
This (http://simpleportal.net/index.php?topic=4176.msg26966#msg26966) should be it.
Hummm I think I might be able to whip something up. Thank you. I will post back with my results.
Quote from: Bigguy on August 31, 2011, 07:55:12 AM
You will have to install manually into those themes. This mod only installs to the default theme by default.
you mean this edit? http://custom.simplemachines.org/mods/index.php?action=parse
Quote from: NBK*Twitch on August 31, 2011, 08:24:06 PM
Quote from: Bigguy on August 29, 2011, 11:14:05 PM
This (http://simpleportal.net/index.php?topic=4176.msg26966#msg26966) should be it.
Hummm I think I might be able to whip something up. Thank you. I will post back with my results.
Sounds good. :)
Quote from: dvd123 on September 01, 2011, 02:03:48 AM
Quote from: Bigguy on August 31, 2011, 07:55:12 AM
You will have to install manually into those themes. This mod only installs to the default theme by default.
you mean this edit? http://custom.simplemachines.org/mods/index.php?action=parse
There are two edits.
what size should the pictures be
i got 2 forum i used at frst forum work fine and i try use at another forum and dont work :( and nothing diferent at this 2 forum
and i upload here /public_html/Themes/Overview/images/icons whit on /on2/off
you can see my files
Quote from: Monkey50 on September 03, 2011, 05:03:43 AM
what size should the pictures be
http://www.simplemachines.org/community/index.php?topic=126263.msg3138726#msg3138726
Quote from: dvd123 on September 03, 2011, 02:54:53 PM
i got 2 forum i used at frst forum work fine and i try use at another forum and dont work :( and nothing diferent at this 2 forum
and i upload here /public_html/Themes/Overview/images/icons whit on /on2/off
you can see my files
I see nothing wrong with the files. Check icon location and image extension. Also it may help to empty browser and forum caches.
Okay I have done some tinkering and figured out how to get it to work. Sadly,I do not know enough php to actually do it.
What needs to happen is this -
// If the board or children is new, show an indicator.
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['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.png';
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.png';
echo '<img src="', $board_nonew_img,'" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" border="0" />';
}
The above codes needs an addition to its if statement.
The addition being $context['user']['is_guest']
Then copy and paste the entire code and have it with the statement
$context['user']['is_logged']
From there you can set which images show for what variable.
I again saly cannot figure out how to implement it though,without getting errors. The best I did was get a 2 icons shows one with the correct setting one without the correct setting.
i give wrong icon location i fix now work fine
@ NBK*Twitch: I will check things out but wont promise anything. :)
Glad You got it dvd. :)
Quote from: Bigguy on September 05, 2011, 08:48:50 PM
@ NBK*Twitch: I will check things out but wont promise anything. :)
Glad You got it dvd. :)
Okay Bigguy I hope you get further then I did.
I am currently using the theme "Silent Darkness"
2.0 RC3
folder/ files include >
/css
/icons
/images
/index.php
/index.template.php
/scripts
Index.template.php >
function template_init()
{
global $context, $settings, $options, $txt;
/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';
/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';
/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 RC2';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;
/* Use plain buttons - as opposed to text buttons? */
$settings['use_buttons'] = true;
/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;
/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;
/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}
// The main sub template above the content.
function template_html_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="', $context['page_title_html_safe'], '" />
<meta name="keywords" content="', $context['meta_keywords'], '" />
<title>', $context['page_title_html_safe'], '</title>';
// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />';
// Present a canonical url for search engines to prevent duplicate content in their indices.
if (!empty($context['canonical_url']))
echo '
<link rel="canonical" href="', $context['canonical_url'], '" />';
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css?rc2" media="print" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" />
<link rel="search" href="', $scripturl, '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
echo '
<link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['rss'], '" href="', $scripturl, '?type=rss;action=.xml" />';
// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0" />';
// Some browsers need an extra stylesheet due to bugs/compatibility issues.
foreach (array('ie7', 'ie6', 'firefox', 'webkit') as $cssfix)
if ($context['browser']['is_' . $cssfix])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/', $cssfix, '.css" />';
// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css" />';
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?rc2"></script>
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/theme.js?rc2"></script>
<script type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_default_theme_url = "', $settings['default_theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "', $context['character_set'], '";', $context['show_pm_popup'] ? '
var fPmPopup = function ()
{
if (confirm("' . $txt['show_personal_messages'] . '"))
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
}
addLoadEvent(fPmPopup);' : '', '
var ajax_notification_text = "', $txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
// ]]></script>';
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];
echo '
</head>
<body>';
}
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
<div id="header"><div class="frame">
<div id="top_section">
<h1 class="forumtitle">
<a href="', $scripturl, '">', empty($settings['header_logo_url']) ? $context['forum_name'] : '<img src="' . $settings['header_logo_url'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</h1>';
// the upshrink image, right-floated
echo '
<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';
echo '
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="SilentDarkness" title="SilentDarkness" />' : '<div id="siteslogan" class="align_left">' . $settings['site_slogan'] . '</div>', '
</div>
<div id="upper_section" class="middletext"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<div class="user">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
echo '
<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
echo '
<li>', $context['current_time'], '</li>
</ul>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
elseif (!empty($context['show_login_bar']))
{
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="info">', $txt['login_or_register'], '</div>
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="43200">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
<div class="info">', $txt['quick_login_dec'], '</div>';
if (!empty($modSettings['enableOpenID']))
echo'
<br /><input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />';
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</div>
<div class="news normaltext">
<form id="search_form" style="margin: 0;" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '</form>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>';
echo '
</div>
</div>
<br class="clear" />';
// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upper_section\'
],
aSwapImages: [
{
sId: \'upshrink\',
srcExpanded: smf_images_url + \'/upshrink.png\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/upshrink2.png\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrink\'
}
});
// ]]></script>';
// Show the menu here, according to the menu sub template.
template_menu();
echo '
<br class="clear" />';
// Show the navigation tree.
theme_linktree();
echo '
</div></div>';
// The main content should go here.
echo '
<div id="content_section"><div class="frame">
<div id="main_content_section">';
}
function template_body_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
</div>
</div></div>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footer_section"><div class="frame">
<ul class="reset">
<li class="copyright">', theme_copyright(), '</li>
<li><a href="http://www.pakxone.co.cc" target="_blank"><span>SilentDarkness by H@55@N, A Pakistani</span></a></li>
<li><a id="button_xhtml" href="http://validator.w3.org/check/referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
<li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>', $txt['wap2'], '</span></a></li>
</ul>';
// Show the load time?
if ($context['show_load_time'])
echo '
<p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';
echo '
</div></div>';
}
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo !empty($settings['forum_width']) ? '
</div>' : '', '
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show = false)
{
global $context, $settings, $options, $shown_linktree;
// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;
// Reverse the linktree in right to left mode.
if ($context['right_to_left'])
$context['linktree'] = array_reverse($context['linktree'], true);
echo '
<div class="navigate_section">
<ul>';
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';
// Don't show a separator for the last one (RTL mode)
if ($link_num != count($context['linktree']) - 1 && $context['right_to_left'])
echo '« ';
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] .'</span>';
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1 && !$context['right_to_left'])
echo ' »';
echo '
</li>';
}
echo '
</ul>
</div>';
$shown_linktree = true;
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';
foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_', $act, '">
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
</a>';
if (!empty($button['sub_buttons']))
{
echo '
<ul>';
foreach ($button['sub_buttons'] as $childbutton)
{
echo '
<li>
<a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>
<span', isset($childbutton['is_last']) ? ' class="last"' : '', '>', $childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' : '', '</span>
</a>';
// 3rd level menus :)
if (!empty($childbutton['sub_buttons']))
{
echo '
<ul>';
foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a', $grandchildbutton['active_button'] ? ' class="active"' : '', ' href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
<span', isset($grandchildbutton['is_last']) ? ' class="last"' : '', '>', $grandchildbutton['title'], '</span>
</a>
</li>';
echo '
</ul>';
}
echo '
</li>';
}
echo '
</ul>';
}
echo '
</li>';
}
echo '
</ul>
</div>';
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $strip_options = array())
{
global $settings, $context, $txt, $scripturl;
if (!is_array($strip_options))
$strip_options = array();
// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a ' . (isset($value['active']) ? 'class="active" ' : '') . 'href="' . $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a>';
}
// No buttons? No button strip either.
if (empty($buttons))
return;
// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);
echo '
<div class="buttonlist', !empty($direction) ? ' align_' . $direction : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '>
<ul>
<li>', implode('</li><li>', $buttons), '</li>
</ul>
</div>';
}
?>
Now I don't understand what I need to change / edit it the index.template.php to change the board icons / and text colors of the board. - Do I need to edit other files on the default theme?
There is no Message / board index.
Please help me. Thank you.
no edits needed.
However, you NEED to update your installation ASAP! 2.0RC3 has major (known) security issues which have been patched up to 2.0.1
ok. but how do I edit the Board icons. How can I make each board a different icon ?
Quote from: Kindred on September 26, 2011, 04:17:33 PM
no edits needed.
However, you NEED to update your installation ASAP! 2.0RC3 has major (known) security issues which have been patched up to 2.0.1
You have to either make your own or use a search with google or bing to find free icons to use.
what if the template i am currently using has no Board/Message Index files...? ::)
Then the ones from the default theme are used and the mod should still work. ;)
Great mod, makes the board(s) look much nicer!
I installed this and made a minor change to group all the icons in a single directory for ease of use.
I used the path '/Themes/{theme_name}/images/icons/cbi/' so they're all in one place.
The only difference in the icon naming was to name them (for example) '10on.png', '10on2.png', and '10off.png'.
This way they can all coexist in the same directory. In the code you'll need to add 'cbi/' to the paths so the directory is found, and change '/' to just '' (remove the slash). This causes the board_id to be prepended directly to the image name. (If you want details on exactly what changes to make, please PM me.)
You can see this in action here if you want: http://mgkiller.com/ (http://mgkiller.com/)
Thanks again for a great mod.
How you're doing Bigguy!? Hope you're ok :)
Please forgive for not looking the whole board. Question is, how can I make it work with core theme?
Can you guide me please? I have seen this mod working fine with prior versions of smf I had in the past. Have a good one buddy!
You may have to do manual edits. Parse the mod and see if you can find the edits in the core theme.
I was using this mod on my SMF forum 1.1.15, now I upgraded it to SMF 2.0.1 and this mod doesn't work anymore. I uploaded new icons but it didn't change anything, what can be the reason?
Quote from: bharatforum on October 19, 2011, 11:00:29 AM
I was using this mod on my SMF forum 1.1.15, now I upgraded it to SMF 2.0.1 and this mod doesn't work anymore. I uploaded new icons but it didn't change anything, what can be the reason?
Are you using the proper package of the mod?
Quote from: Masterd on October 19, 2011, 11:01:42 AM
Quote from: bharatforum on October 19, 2011, 11:00:29 AM
I was using this mod on my SMF forum 1.1.15, now I upgraded it to SMF 2.0.1 and this mod doesn't work anymore. I uploaded new icons but it didn't change anything, what can be the reason?
Are you using the proper package of the mod?
What do you mean? I was using cbi172, is it the right mod?
172 is for 2.0 , uninstall then try to emulate...
I emulated first and then installed this mod but still it doesn't work. I don't see my new icons on the main board. Should I try again to uninstall it and install again?
If I get errors when I try to install this mod here can it be the reason why this mod is not working properly?
Execute Modification ./Themes/core/BoardIndex.template.php Test failed
1. Replace ./Themes/core/BoardIndex.template.php Test failed
Execute Modification ./Themes/core/MessageIndex.template.php Test failed
1. Replace ./Themes/core/MessageIndex.template.php Test failed
On default theme is looks fine:
Execute Modification ./Themes/default/BoardIndex.template.php Test successful
* 2. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
Can someone help me with this problem?
One more question, does this mod works with SMF Default Theme - Curve or only with Core?
Just a quick note- I really, really like this mod, and so we added it to this site:
Atheist Roundtable (http://atheistroundtable.com/forum/)
Honestly, I think this mod ought to be a standard feature of SMF. It makes the board index look so much better.
Quote from: bharatforum on October 19, 2011, 12:41:21 PM
If I get errors when I try to install this mod here can it be the reason why this mod is not working properly?
Execute Modification ./Themes/core/BoardIndex.template.php Test failed
1. Replace ./Themes/core/BoardIndex.template.php Test failed
Execute Modification ./Themes/core/MessageIndex.template.php Test failed
1. Replace ./Themes/core/MessageIndex.template.php Test failed
On default theme is looks fine:
Execute Modification ./Themes/default/BoardIndex.template.php Test successful
* 2. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
Just follow the instructions in Replace
Quote from: bharatforum on October 20, 2011, 09:39:56 AM
One more question, does this mod works with SMF Default Theme - Curve or only with Core?
Both...also in custom, see my test forum with theme Blue Moonlight, by Akyhne
Do you think the problem is because of these errors? Why can't I see my new icons?
are your icons in the directories for EVERY theme that you use?
I use only this theme: SMF Default Theme - Curve and I have the folder icons only in this theme.
then confirm that the edits were made to your default/boardindex.template.php file
Which version would be better to use for SMF 2.0.1, is the latest the right one?
If I get errors in all other themes should I edit them manually?
Of course, if they are in use...
I am using only the default one and it didn't give any errors, that's why I asked if I still should edit other themes which give errors?
well, yes...... if there is an error during the auto-install, then that means that you have to manually install that portion
It didn't help, first of all I can't find exactly the same words in the template I try to modify and even if I change it, it still gives an error. Any idea why it happens like this? Only default theme doesn't get any errors.
well, yes, of course you're not finding the exact code.... if the exact code was there, then the auto-install would work.
You have to do the installation - copy down the areas of failure and then apply the code as best you can in the themes that you have (i.e. find the closest matching code)
I changed code in the default theme, alhrogh it didn't show any errors and after doing it, it gave me errors. I wonder why does it happen all the time?
unfortunately, you are not being clear in your explanation.
1- install the mod (note any failures)
2- FINISH installing the mod
3- find the appropriate sections in the failed files and manually change them
you should not be changing the files to have the mod find the automatic install points, you should be changing the files to add the actual mod into them
Should I still finish the installation even if there are errors? One more question, I can't find the right code in one theme template, should I just add it there?
of course you should complete the installation.... how else will it be installed if you don't complete the installation? (please read the docs! !!! this is explained in the wiki)
Of course, you only complete the installation if you are then going to manually change the code that failed.
And no.... you don't just "add it there". You have to find the correct point to add the new or changed code. You have to use human intuition, and coding knowledge, if the theme has used slightly different code to create the template...
That's why I asked, I didn't find anything similar that's why I can't replace the code.
I completed the installation, replaced the code and tried to add my own icons but they are not shown up.
Quote from: Kindred on October 21, 2011, 08:11:43 AM
You have to use human intuition, and coding knowledge, if the theme has used slightly different code to create the template...
Quote from: bharatforum on October 21, 2011, 08:26:41 AM
I completed the installation, replaced the code and tried to add my own icons but they are not shown up.
If you sure, you must check this
In 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)
Please, read carefully...
for example:If the General discussion board has ID=1 you must create a folder with name "1" , of course, in the icons folder and finally extension must be png.That's all...see my ftp screenshots
I seem to be having trouble installing this mod. I use SMF version 2.0.1 but on installation, I'm getting an error that says the mod is incompatible with my SMF version. If I revert my theme to version 2.0, I get the following error message:
Quote
Error 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.
Suggestions?
Click advanced in the package manger and change the install version to 2.0
That's what I did and got the error message shown above.
I want change the position of the icons, of the left of the description of the section, is it possible?
I enclose an image
sorry, is there the italian support for this mod? if yes, where is it?
That IS where these icons are displayed...
so you can't move just to the right, right?
move to the right, where? That column is a built part of the message index in that theme...
I would like to move the icons to the right, as it does image on board
please be more specific.... to the right... WHERE?
ok, this is a div html...
<td class="windowbg2 info">
next to the descriptions of sections
http://custom.simplemachines.org/mods/index.php?action=download;mod=1266;id=59088;image
That is a completely different mod.... this mod replaces the on, on2 and off images with customized ones, defined per board. that mods does something else...
ok thanks
Hi,when will this mod for 2.0.1 version? i mean Custom Board Icon .very urgent need! help
cbi 172 - SMF 2.0 Gold...try emulation in Package manager
and please do not double post, nikolo.
It is not working with my theme how should i change things to make this modification work for my theme my SMF is 2.0 rc 5 and it is loacted at forum.currentblips.com kindly select the theme dvs4 ! to check that how to make this work and tell me if i have to attach some pictures !
Please read carefully 1.6.3 README INSTRUCTIONS for this modification its very important.You need instal all image folders in your custom theme , just copy and paste all folders from default theme, of course each folder number represent board or sub-board ID
Ok sir i have carefully checkedBut everything seems very different in my side firstly I cant find values associated in manual instruction here my attached boardindex php file ! after the installation of cbi but no icons are changed !
Everything is fine with the code. As suggested, please check the placement of icons.
I have placed the icon ! In the theme inside images folder that is "forum.currentblips.com/themes/dvs4/images/icons" ! i am not doing it for the first time I am Using it For Several Themes and on different sites ! But this site Looks very different As if you notice it does not have agony area after //redirection line ! secondly i suspect there are several commands more need to modify somewhere to change the icons ! kindly review it again ! by the way i havent change the whole forum theme so login to see the dvs4 theme ! and these are the theme index files kindly watch this issue plxxxxx !
What version of the mod are you using. ???
1.6.3
Have you tried using 1.7.2 ???
OK AS YOU SAID ! I INSTALLED 172 cbi version ! and you know what happens ??? ITS WORKS !!! WOW THANK YOU SO MuCH I LOVE U !
Not a problem. Glad I could help. :)
NOTE TO ALL:
cbi mod has just been updated for SMF 2.0.1 New version is cbi 1.7.3 (no code changes at all just updated to work with 2.0.1)
THANKS ONCE AGAIN !
Thanks , it's working for 2.0.1 version
Your all very welcome. :)
SMF 2.0.2 :(
Installations actions for "cbi 1.0"
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Use the advanced option in the package manager to revert back to 2.0 and it will work. I will update the mod soon. :)
Hi,
I am using 2.0.1 version and just installed this mod...installation was easy and I also followed the path :
themes/default/images/icon/..and under icons I created 16 folders ( the no of boards in my forum).
But I am not getting the part from here where it says to rename the image files on.png,on2.png and off.png.
I named the folders according to the order of the boards....now he problem is that I get the picture inthe first board just fine....but after that the second image goes to the third board and, I have to put it in the third folder to make it appear on the second board and the and the third board's image on the second folder to make it appear on the second board....also I have to name them off.png....I am jst confused with naming of the images with the extension on.png,on2.png and off.png.....and where to use it.........I dont have any child board in my forum so dont need anything for that.
I know this could be really simple and it migh look silly..but I am really new to this, and really need help from the fellowmembers.
that's becaus eyour boards are apparently not actually in order 1-2-3... but seem to be 1-3-2 (or something like that).
Hover over the board-link in your index and check the URL -- see what board number it actually is.
Thanks Kindred for the help...the issue is resolved and it works like a charm now, and the forum definitely looks better now...also thanks to Bigguy for this wonderful mod.
Looks like i have a problem with another mod: tidy child boards.
All is installed fine (manually), the custom board icons showing up in the main board, but not for the child boards.
can somebody help, please?
i attached my MessageIndex.template.php...
HAPPY NEW YEAR!
What version of cbi are you using. ???
i am using cbi 163 (what is v1.0 i think) - for SMF 2 RC5.
Hi,
This is a great mod and as mentioned, should be PART of SMF.
I had this functionality under 1.x and LOVED it! But I have upgraded to 2.02 and lost everything! I am MOST anxious for this lovely mod to be tweaked for .02. I am happy to MANUALLY code files, but I only know enough to be dangerous... what is 2.02 status? Can you point us to what we have to to do manually? ( looked at cbi code, messed with BoardIndex and trashed my forum, had t restore boardindex file...)
Puh-leeeeeeeeeeease.... :'(
Thanks
Looks like, a part of the tidy-child-boards-mod in the boardindex.template.php causes the problem:
function template_tidy_children() {
global $context, $settings, $txt, $modSettings, $scripturl;
echo '
<div class="board_children">';
foreach($context['tidy_board']['tidy_children'] as $key => $child_block) {
echo '
<div class="tidy_child">
<ul>';
foreach($child_block as $child) {
echo '
<li>';
if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.png" width="12" height="12" alt=""> ';
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" /></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'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
if(!empty($modSettings['tidy_child_boards_bold']) && $child['new'])
$child['link'] = '<strong>' . $child['link'] . '</strong>';
echo $child['link'], '</li>';
}
echo '
</ul>
</div>';
}
echo '
</div>';
}
special this line need some changes:
if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.png" width="12" height="12" alt=""> ';
can somebody help?
I'm an idiot talking nonsense, but it seems to me that the problem is pointing to the child boards with the new folder structure. The "as is" install says off/on are in "images", but the mod requires them to be in "images/icons/[boards by ID number]", and I don't know enough to tell the boardindex file to look there. ???
Quote from: rokket on January 01, 2012, 07:37:42 PMthe mod requires them to be in "images/icons/[boards by ID number]"
actually, the icons folder isn't suppose to be in your images folder. Icons folder needs to be in the root folder of each theme, where index.template.php and boardindex.template.php are located.
Have somebody a solution for make this mod work with "tidy child board"-mod?
Quote from: Bigguy on December 23, 2011, 08:42:33 PM
Use the advanced option in the package manager to revert back to 2.0 and it will work. I will update the mod soon. :)
Sorry, im very new to the SMF so i cant find the advanced option in the package manager, where i can find it?
thanks!
@bigguy:
If you update this mod, do you integrate support for the tidy-child-board-mod?
Quote from: Radgack on January 12, 2012, 05:04:45 PMSorry, im very new to the SMF so i cant find the advanced option in the package manager, where i can find it?
On the Packages page look at the bottom right hand side , under the package listing, you'll see a link text 'Advanced'
Quote from: Draffi on January 07, 2012, 01:32:37 PM
Have somebody a solution for make this mod work with "tidy child board"-mod?
What seems to be the problem, error on installation, or did you make the manual edits and they didn't work?
Seems like this would work ( these edits take place directly below the tidy child board edit in the file.
Themes/default/BoardIndex.template.php ( and custom themes)
Find
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
Replace with
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
Ohhh...thank you so much that you would help me!
looks like that i forgot to mention that i use SMF2 RC5.
Anyway: I installed booth mod's with the package-manager without errors.
i attach my boardindex.template.php
please tell me what i need to change in this case.
thank you so much, Sir!
Everything looks like it should be, actually. My guess is you installed cbi before tidy childs MOD, which would explain how they installed with one another.
Here's the MOST important question ...
Did you follow these instructions on the MOD page.
QuoteIn the icons folder in to your /Themes/default/images/icons/.
create folder which name is the boards id,(meaning only the
number of the board) where you want custom board icon.
Then put on.png, on2.png and off.png in that folder.
Did you create an icons folder in the root of each Themes folder?
well, i was doing in the default theme, not in each folder (the other one is "core" in my case. i have no more themes), directly in the root-directory, where you can find the boardindex.template.php.
And i was installing booth mods in different order in my xampp-area, because i was thinking the order must be important, too...
i think in this line is the problem...:
http://www.simplemachines.org/community/index.php?topic=126263.msg3239633#msg3239633
Have you tried removing the line
if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.png" width="12" height="12" alt=""> ';
If that doesn'r work, try removing all of this
if(!empty($modSettings['tidy_child_boards_icon']))
echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.png" width="12" height="12" alt=""> ';
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
if (!empty($modSettings['tidy_child_boards_new']) && $child['new'])
$child['link'] .= ' <a href="' . $child['href'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) .
sure, i was doing. With booth methods, at the end i have no icons...
(in the child-boards)
can you register me a test account, and PM me log in info and link to your site. Unless guests can access the forum, then log in wont be necessary, just the link
i will do, tomorrow, if this is ok for you. like i was telling you, i installed this mods in my xampp-test-area...
for the moment, i need to sleep a bit.
i contact you with PM, okay?
(and i give you FTP-access, too)...
at least link me to your site, so i can see, before u go
PM for the moment sent...
helpme please, smf 2.0.2
my bordeaarindex.template.php of Fundamentalsmf20 theme
echo '
<tr id="board_', $board['id'], '" class="'.$win.'">
<td class="icon '.$win.'"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.gif" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
thanks
Have no idea what you're asking help for?
Anyone got this working on 2.0.2 ?
Installations actions for "cbi 1.0"
The package you are trying to download or install is either corrupt or not compatible with this version of
Quote from: rootuid on January 16, 2012, 06:37:42 AM
Anyone got this working on 2.0.2 ?
Installations actions for "cbi 1.0"
The package you are trying to download or install is either corrupt or not compatible with this version of
use cbi173.zip , and emulate to 2.0.1 , link labeled 'Advanced' at the bottom right in the package manager, to install
always click the zip and parse on the MOD download page to see which version zip goes with which smf version.
ChangeLog on the MOD page also helps determine this
QuoteUP-TO-DATE VERSIONS:
cbi 173 - Installs with SMF 2.0.1
cbi 172 - Installs with SMF 2.0 Gold PLEASE READ THE README
cbi 163 - Installs with SMF 2.0 RC4, RC5
cbi 11- installs with SMF 1.1.12, .13
Ah thanks.
I'm using 2.0.2 and I installed the mod using 2.0.1 emulation.
I don't see any new icons. I created the folder 5 to correspond with forum 5 forum/index.php/board,5.0.html
This is the folder : /forum/Themes/default/images/icons/5/ Inside this I have a file on.gif .This isn't displayed. Any ideas?
You must use .png not .gif
Thanks for the reply. I tried that but no custom icon :(
Is the path correct? this is what is specified in the docs:
/forum/Themes/default/images/icons/5/on.png
This is for default theme...also in your custom theme
problem solved . Only a normal member had permissions to view.
does this mod cause more load on the server?
I have never heard of it ever causing any problems in the past. It may increase load a touch but nothing major.
Tho scary, emulated 2.01 to get this wonderful mod installed. It couldn't see my theme, which must be for 2.0.2. Abandoned.
Anxiously awaiting update for 2.0.2
lol, it wroks perfectly for 2.0.2 you have to make manual edits for your custom theme. Make the edits to BoardIndex.template.php for your custom theme
Hello, I have transfer my forum to another hosting and now CBI has stopped to work.
I have already tried to install the latest version of the mod and i have already ran Repair_settings file to fix the paths.
What could be the problem?
Thank you.
There should be no problem at all. This mod only edits two files. You could parse the mod and see if the edits are there.
Did some cleaning and now this easy and fantastic mod works1 My old custom icons are back. Thanks!
Glad you like it. :)
Hiii Am trying your mod. I am using SMF 2.0.2 and Installed cbi v 1.7.5
I have installed in default/themes/icons/1/help.png
No image shows up. Any help is greatly appreciated.
Thanks, Vinny
Why icon name is help.png?
It should be on.png on2.png and off.png and send it to /Themes/theme_name/images/icons/ID_Board
I named my folders inside the icons folder 1-50 is that not correct? changing the file name did not help
Thanks
you need to have on.png in each numbered folder.
You can not use any other filename.
same for on2.png and off.png
if you have changed the filenames, then 1- clear your server cache (smf admin > maintenance) and 2- clear your browser cache (f5)
Thanks for the reply Kindred; Can you explain it in layman's terms my knowledge of SMF, PHP etc is very limited.
Are my numbered folders done correctly?
/public_html/anything-goes.net/Forum/Themes/default/images/icons/1
I cleared the forum and browser caches
Yes that is right. In that folder you put the images:
on
off
on2.png
Thanks BigGuy I love the concept of this mod but I'm not having much success getting it working. I must be doing something terribly wrong :(
Are you using a custom theme. ???
I'm using the Default theme and smf 2.0.2
not sure where I find the images. on , off, and on2.png ??
1. Auto Embed Video Clips 2.1.4 [ Uninstall ] [ List Files ] [ Delete ]
2. cbi 1.0 1.7.5 [ Uninstall ] [ List Files ] [ Delete ]
3. SMF Arcade 2.5 RC1 [ List Files ] [ Delete ]
4. Anti Bot: Are You Human/Bot? 3.0 [ Uninstall ] [ List Files ] [ Delete ]
5. Ultimate Profile 0.9.1 [ Uninstall ] [ List Files ] [ Delete ]
6. Member Color Link 3.0.7 [ List Files ] [ Delete ]
7. PaypalDonations 2.0 [ List Files ] [ Delete ]
8. SMF Arcade 2.0.18 [ List Files ] [ Delete ]
9. SMF Arcade Trophies Mod 1.1.2 [ Install Mod ] [ List Files ] [ Delete ]
10. Welcome Topic Mod 1.1 [ List Files ] [ Delete ]
11. Ad Managment 2.3 [ List Files ] [ Delete ]
12. SMF Arcade 2.0.20 [ List Files ] [ Delete ]
13. SmfArcade Skins Final 2.0.0 [ List Files ] [ Delete ]
14. Anti-Spam Verification Questions 1.02 [ List Files ] [ Delete ]
15. SMF 1.1.14 Update 1.0 [ List Files ] [ Delete ]
16. SMF 1.1.15 Update 1.0 [ List Files ] [ Delete ]
17. SMF 1.0.22 / 1.1.16 Update 1.0 [ List Files ] [ Delete ]
18. NChat 1.3.2 [ Uninstall ] [ List Files ] [ Delete ]
19. Effectively Remove SMF Logo 2.0 [ Uninstall ] [ List Files ] [ Delete ]
You make them, or find free ones on the net. The same size as the default ones, or a bit bigger in .png format.
Here's what my file manager looks like, and it appears the mod is installed correctly as far as I can tell.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi276.photobucket.com%2Falbums%2Fkk15%2Fatgvinny%2Ffiles.jpg&hash=8212d842b10e4739f41591311379a72b495141a9)
Can i have a link to your forum.
you sure can: http://www.anything-goes.net/Forum/index.php
you can sign in as:
Would it be ok if I PM you Bigguy??
Yup go ahead
Problem solved. :)
Thanks Very Much for your help Bigguy. You rock !!! and this mod is awesome ;D ;D ;D ;D
Your more than welcome. I enjoy being able to help out. :)
Hey there Bigguy, can you help me with my forum, I'm trying to put Modern Mario And Modern Sonic as my board icons, but I need some help in solving this problem, can you help me?
Sure I can help. Whats up. I can help ya here or ya can visit my website. :)
Well can i make you admin so you can help me, with making those icons work? My site is here (http://marioandsonicfanforum.co.cc/index.php)
The link says ya forums domain is now available??
made a mistake in spelling sorry :(
Quote from: Sonic X360 on April 18, 2012, 09:03:33 PM
made a mistake in spelling sorry :(
/me looks for the frying pan.
/me *facepalm*
So can you guys help me, I did it the old way, but i want to use cbi, and i am having troubles understanding it? I was wondering if i could make you admin Bigguy and you can help me out here.
I see your icons ok...if they are supposed to be like your avatar. ???
Thanks for joining btw. :)
You're welcome :), okay thanks for clarifying that everything is okay :).
Glad to hear you got it worked out. :)
I'm using this mod, but my "on2.png" has stopped working on the rest of the forum, when I made a sub forum. (only works for the subforum now, where I don't need it :( )
Is there any way to fix this? I may be using an older version of the mod, but is this a known issue?
My forum is 2.0.2
No not that I know of. There are no known issues. try using the latest version of the mod. There is no reason for on2.png to stop working.
Hey there, I have some problems with this mod. I used it last year in a test forum and it worked just fine but now something is wrong. I am using smf 2.0.2, a default and a custom theme. I install the mod but nothing seems to change. I remember when you install this mod there used be an "x" meaning that there are no icons in the folder, and it was a sign that the mod was working, But now nothing changes. :/
Did you read the readme. Things have changed a bit compared to older versions.
Yeap problem solved. Thanks anyway. :)
Glad to hear you got it solved.
I am new to smf.I installed cbi 1.0 but i do not know where to create icon folder,in the control panel or in themes ans layout?can you please tell me in an easy fashion.
you have to create the folder and icon files via your site's cpanel or ftp. There is no admin interface
I have installed cbi 1.0,created icons folder in themes/default and placed png images in board id but icon is still not displaying.What can be the reason?
I am using smf 2.02
is it necessary to place on.png,on1.png and off.png in every borad id?i have placed three png icons in theme/default/icons/3 but i couldn't see them working.I named the icons on.png,on1.png and off.png.I'm also using pretty urls,does that effect?
You don't have to use all three in each folder, just the ones that have child boards. Pretty url's could effect cbi but I am not sure.
problem unsolved.
I have uninstalled pretty urls,placed png icons in public_html/themes/default/images/icons/5/on.png.What else should i do?
are you using the default theme? if not, you will have to create icons folders for EACH theme
Problem solved.I think the issue was;it takes some time before the icons display on board. Now i am having another problem that when i log on with one username a few icons appear and when i log on with some other username some other icons(which were not visible previously) appear.Any idea?how all icons will display?and why icons do not appear when you visit the site as guest.Thanx
There are no permissions for this mod. So all icons should show for all people.
this is my first time doing it bro it only show in new plz how can i eliminate off.png and alow all board to be new
boards are only marked as new when there actually are new messages...
If you don't want the icons to change, then just upload the same icon as both on and off
can someone help me with installing images onto the Zone99 theme?
images attatched...
If the mod is installed why would you need help. ???
follow the instructions for adding images... specifically, size of the image... location to place the image file(s) and what to name the image file(s)
Also, please remove all those attachments.
Themes/zone99/images/icons
create a new folder for Boards you're wanting to change, have the folder names the NUMBER that the Board ID is. upload the images as on.png and off.png .... simple.
Example, if CoD4 board's ID is 8 , you'll create a folder under the "icons" directory and name is 8 , then upload the CoD4 image as on.png in folder 8
tests failed on aqua theme
Aqua Style
Execute Modification ./Themes/Aqua/BoardIndex.template.php Test failed
1. Replace ./Themes/Aqua/BoardIndex.template.php Test failed
You may have to try to edit the code manually.
Quote from: Bigguy on August 27, 2012, 06:11:15 PM
You may have to try to edit the code manually.
looks like it, but managed to get an image mod for board titles to work, but doesnt work on child boards, so might try to get this working on child boards alone
Quote from: knowlsey on August 29, 2012, 01:01:49 PM
looks like it, but managed to get an image mod for board titles to work, but doesnt work on child boards, so might try to get this working on child boards alone
Actually, the edits made in BoardIndex.template.php , apply the same in MessageIndex.template.php to get them on child boards ... i believe they're identical. This works for both the SMF mods that let you have custom board icons. I've used both MODs and made the edits for them to work on child boards
This is my current path to "off" icon:
http://www.teamfod.com/Themes/carbonate202b/images/_dioxide/off.png
Should I add an images/icons set of folders inside the _dioxide folder? I have tried that and it does not work. I have also completed the manual theme edits.
First of all, what you list is not a path... that is a url.
the correct path would be........ serverstuff.../Themes/carbonate202b/images/icons
and, afaik, there is no support in here for sub-themes
Excuse me for not correcting my post, I had a path but I edited it.....anyways
I will ask bloc...thanks kindred.
Hi everyone, how're you doing? Hopefully not as bad as me because I just can't, for the life of me, get CBI working and I've tried a lot of things.
It helps to be concise so allow me to itemize:
1. I have created the correct paths the the new board icons under the folder of the theme I am using ((in default and the theme I use) - plus I checked the paths and files in said folders and they are correct.
2. I have modified both board and message files (in default and the theme I use) - although a note here might be important for the possible malfunction of CBI I am experiencing: The theme I use doesn't come with a messageindex.php file. Now I have been made to understand that when such is the case, the program uses the messageindex.php file of Curve so is this actually a non-issue then?
3. I use 2.0.2 with Vertex as my theme.
4. The attached file shows what I got for my efforts.
Well, that is pretty much the gist of my experience up until now. Can anyone, especially Bigguy, put me out of my misery?
Thanks in advance.
Where are your on, off and on2.png images stored for each board.
Hi Bigguy...
Board #2 for instance:
Vertex path: /Themes/Vertex-Theme2-0-2-v1-2/images/icons/2/off.png
Curve path: /Themes/default/images/icons/2/off.png
And the other boards have similar paths. (This is what you were asking right? I apologize I'm rather new).
Hmm. For some reason I show the image that is supposed to be there as 0kb Maybe try re-uploading the image. It's weird, if you right click and go to properties where the image should be it gives all the details of the image but shows it as 0kb
Oh Jesus, I didn't reload them after I got desperate and was trying variations. Terribly sorry about that. All the others in the rest of the boards are there though.
Ok, now every folder has the relevant file in it. Could you look again please?
Edit: I haven't modified the .php files though. I mean ı changed them back to their original state after I couldn't get it to work. Do you need me to modify both files again?
Try this image in board 2 and see what happens.
I did but the original off.png is showing when I view it?!?!?! (I put your icon in both Default and Vertex by the way).
Note: I haven't modified the .php files though. I mean I changed them back to their original state after I couldn't get it to work. Do you need me to modify both files again?
Oh, I thought you still had it all modified still. I don't see any images at all.
Sorry man. Ok I'll go modify both .php files.
Do you have any idea why I'm showing my old off.png picture after I uploaded yours into my File Directory while I modify the .php files? Thanks.
Ok I modified and saved both .php files.
boardindex at Default and Vertex
messageindex at Default because there is none in Vertex.
And the off.png icon you gave that I upload into board 2's off.png folder still shows as the one I deleted to put yours in.
I think I'm cursed.
Edit: Ok the off.png icon you gave me is showing, I just had to refresh-damn I hate being a rookie!
Are you clearing your forum cache after making changes.Is this were the image is:
http://www.gooddeedz.org/Themes/Vertex-Theme2-0-2-v1-2/images/icons/2/off.png
Quote from: Bigguy on December 13, 2012, 05:20:51 PM
Are you clearing your forum cache after making changes.Is this were the image is:
http://www.gooddeedz.org/Themes/Vertex-Theme2-0-2-v1-2/images/icons/2/off.png
Clearing the cache? Um, is that "to refresh?" If so, yes I just did and your off.png icon is on my directory, no doubt about it.
And the image is at two places, and these are copied straight from my File Directory:
1. /Themes/default/images/icons/2/off.png
2. /Themes/Vertex-Theme2-0-2-v1-2/images/icons/2/off.png
Can you attach the two files here that you modified.
Modified boardindex in Default:
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0
*/
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show some statistics if stat info is off.
if (!$settings['show_stats_index'])
echo '
<div id="index_common_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'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</div>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div id="newsfader">
<div class="cat_bar">
<h3 class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
</div>
<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';
foreach ($context['news_lines'] as $news)
echo '
<li>', $news, '</li>';
echo '
</ul>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfFadeScroller\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></script>';
}
echo '
<div id="boardindex_table">
<table class="table_list">';
/* 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)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<tbody class="header" id="category_', $category['id'], '">
<tr>
<td colspan="4">
<div class="cat_bar">
<h3 class="catbg">';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
echo '
', $category['link'], '
</h3>
</div>
</td>
</tr>
</tbody>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<tbody class="content" id="category_', $category['id'], '_boards">';
/* 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 id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
<td class="info">
<a class="subject" 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'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats windowbg">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
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'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($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'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $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 id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
</td>
</tr>';
}
}
echo '
</tbody>';
}
echo '
<tbody class="divider">
<tr>
<td colspan="4"></td>
</tr>
</tbody>';
}
echo '
</table>
</div>';
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="floatleft">';
// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
);
echo '
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
}
else
{
echo '
<div id="posting_icons" class="flow_hidden">
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
}
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo '
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">
<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
</h3>
</div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
', $txt['recent_posts'], '
</span>
</h4>
</div>
<div class="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 '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_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>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '
</span>
</h4>
</div>
<p class="smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</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'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</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'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
}
echo '
</p>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
', $txt['forum_stats'], '
</span>
</h4>
</div>
<p>
', $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'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';
}
// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($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[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
echo $context['show_who'] ? '</a>' : '', '
</p>
<p class="inline 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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</p>
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>';
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span>', $txt['personal_message'], '</span>
</span>
</h4>
</div>
<p class="pminfo">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</p>';
}
echo '
</div>
</div></div>
<span class="lowerframe"><span></span></span>';
// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
}
?>
One second, the others are coming (message too long).
Modified boardindex Vertex (I modified Vertex and Default separately but they should be the same):
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0
*/
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show some statistics if stat info is off.
if (!$settings['show_stats_index'])
echo '
<div id="index_common_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'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</div>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div id="newsfader">
<div class="cat_bar">
<h3 class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
</div>
<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';
foreach ($context['news_lines'] as $news)
echo '
<li>', $news, '</li>';
echo '
</ul>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfFadeScroller\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></script>';
}
echo '
<div id="boardindex_table">
<table class="table_list">';
/* 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)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<tbody class="header" id="category_', $category['id'], '">
<tr>
<td colspan="4">
<div class="cat_bar">
<h3 class="catbg">';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
echo '
', $category['link'], '
</h3>
</div>
</td>
</tr>
</tbody>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<tbody class="content" id="category_', $category['id'], '_boards">';
/* 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 id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
<td class="info">
<a class="subject" 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'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats windowbg">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
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'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($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'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $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 id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
</td>
</tr>';
}
}
echo '
</tbody>';
}
echo '
<tbody class="divider">
<tr>
<td colspan="4"></td>
</tr>
</tbody>';
}
echo '
</table>
</div>';
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="floatleft">';
// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
);
echo '
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
}
else
{
echo '
<div id="posting_icons" class="flow_hidden">
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
}
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo '
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">
<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
</h3>
</div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
', $txt['recent_posts'], '
</span>
</h4>
</div>
<div class="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 '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_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>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '
</span>
</h4>
</div>
<p class="smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</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'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</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'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
}
echo '
</p>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
', $txt['forum_stats'], '
</span>
</h4>
</div>
<p>
', $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'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';
}
// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($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[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
echo $context['show_who'] ? '</a>' : '', '
</p>
<p class="inline 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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</p>
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>';
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span>', $txt['personal_message'], '</span>
</span>
</h4>
</div>
<p class="pminfo">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</p>';
}
echo '
</div>
</div></div>
<span class="lowerframe"><span></span></span>';
// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
}
?>
Modified messageindex in Default:
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0
*/
function template_main()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
echo '
<a id="top"></a>';
if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{
echo '
<div class="tborder childboards" id="board_', $context['current_board'], '_childboards">
<div class="cat_bar">
<h3 class="catbg">', $txt['parent_boards'], '</h3>
</div>
<div class="table_frame">
<table class="table_list">
<tbody id="board_', $context['current_board'], '_children" class="content">';
foreach ($context['boards'] as $board)
{
echo '
<tr id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/' .$context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/' .$context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/' .$context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
<td class="info">
<a class="subject" 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'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats windowbg">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'], '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
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'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($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'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $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 id="board_', $board['id'], '_children"><td colspan="3" class="children windowbg"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td></tr>';
}
}
echo '
</tbody>
</table>
</div>
</div>';
}
if (!empty($options['show_board_desc']) && $context['description'] != '')
echo '
<p class="description_board">', $context['description'], '</p>';
// Create the button set...
$normal_buttons = array(
'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', 'active' => true),
'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'),
'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : ''). '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'] . ';' . $context['session_var'] . '=' . $context['session_id']),
'markread' => array('text' => 'mark_read_short', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
);
// 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']);
// Allow adding new buttons easily.
call_integration_hook('integrate_messageindex_buttons', array(&$normal_buttons));
if (!$context['no_topic_listing'])
{
echo '
<div class="pagesection">
<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#bot"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
', template_button_strip($normal_buttons, 'right'), '
</div>';
// If Quick Moderation is enabled start the form.
if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
echo '
<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" class="clear" name="quickModForm" id="quickModForm">';
echo '
<div class="tborder topic_table" id="messageindex">
<table class="table_grid" cellspacing="0">
<thead>
<tr class="catbg">';
// Are there actually any topics to show?
if (!empty($context['topics']))
{
echo '
<th scope="col" class="first_th" width="8%" colspan="2"> </th>
<th scope="col" class="lefttext"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['started_by'], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>
<th scope="col" width="14%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> / <a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['views'], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
// Show a "select all" box for quick moderation?
if (empty($context['can_quick_mod']))
echo '
<th scope="col" class="lefttext last_th" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
else
echo '
<th scope="col" class="lefttext" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
// Show a "select all" box for quick moderation?
if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<th scope="col" class="last_th" width="24"><input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" /></th>';
// If it's on in "image" mode, don't show anything but the column.
elseif (!empty($context['can_quick_mod']))
echo '
<th class="last_th" width="4%"> </th>';
}
// No topics.... just say, "sorry bub".
else
echo '
<th scope="col" class="first_th" width="8%"> </th>
<th colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th>
<th scope="col" class="last_th" width="8%"> </th>';
echo '
</tr>
</thead>
<tbody>';
if (!empty($settings['display_who_viewing']))
{
echo '
<tr class="windowbg2 whos_viewing">
<td colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '" class="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.
if (!empty($context['unapproved_posts_message']))
{
echo '
<tr class="windowbg2">
<td colspan="', !empty($context['can_quick_mod']) ? '6' : '5', '">
<span class="alert">!</span> ', $context['unapproved_posts_message'], '
</td>
</tr>';
}
foreach ($context['topics'] as $topic)
{
// Is this topic pending approval, or does it have any posts pending approval?
if ($context['can_approve_posts'] && $topic['unapproved_posts'])
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
// We start with locked and sticky topics.
elseif ($topic['is_sticky'] && $topic['is_locked'])
$color_class = 'stickybg locked_sticky';
// Sticky topics should get a different color, too.
elseif ($topic['is_sticky'])
$color_class = 'stickybg';
// Locked topics get special treatment as well.
elseif ($topic['is_locked'])
$color_class = 'lockedbg';
// Last, but not least: regular topics.
else
$color_class = 'windowbg';
// Some columns require a different shade of the color class.
$alternate_class = $color_class . '2';
echo '
<tr>
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="subject ', $alternate_class, '">
<div ', (!empty($topic['quick_mod']['modify']) ? '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'] . '\');"' : ''), '>
', $topic['is_sticky'] ? '<strong>' : '', '<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'] ? '</strong>' : '';
// 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 '
<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
</p>
</div>
</td>
<td class="stats ', $color_class, '">
', $topic['replies'], ' ', $txt['replies'], '
<br />
', $topic['views'], ' ', $txt['views'], '
</td>
<td class="lastpost ', $alternate_class, '">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
', $topic['last_post']['time'], '<br />
', $txt['by'], ' ', $topic['last_post']['member']['link'], '
</td>';
// Show the quick moderation options?
if (!empty($context['can_quick_mod']))
{
echo '
<td class="moderation ', $color_class, '" align="center">';
if ($options['display_quick_mod'] == 1)
echo '
<input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_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;', $context['session_var'], '=', $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;', $context['session_var'], '=', $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;', $context['session_var'], '=', $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($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']))
{
echo '
<tr class="titlebg">
<td colspan="6" align="right">
<select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
<option value="">--------</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>' : '', $context['can_approve'] ? '
<option value="approve">' . $txt['quick_mod_approve'] . '</option>' : '', $context['user']['is_logged'] ? '
<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 class="qaction" 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'], '\');" class="button_submit qaction" />
</td>
</tr>';
}
echo '
</tbody>
</table>
</div>
<a id="bot"></a>';
// Finish off the form - again.
if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics']))
echo '
<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
</form>';
echo '
<div class="pagesection">
', template_button_strip($normal_buttons, 'right'), '
<div class="pagelinks">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' <a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
</div>';
}
// Show breadcrumbs at the bottom too.
theme_linktree();
echo '
<div class="tborder" id="topic_icons">
<div class="description">
<p class="floatright" id="message_index_jump_to"> </p>';
if (!$context['no_topic_listing'])
echo '
<p class="floatleft smalltext">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? '
<img src="' . $settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' . $txt['participation_caption'] . '<br />' : '', '
<img src="' . $settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' . $txt['normal_topic'] . '<br />
<img src="' . $settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' . sprintf($txt['hot_topics'], $modSettings['hotTopicPosts']) . '<br />
<img src="' . $settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' . sprintf($txt['very_hot_topics'], $modSettings['hotTopicVeryPosts']) . '
</p>
<p class="smalltext">
<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" alt="" align="middle" /> ' . $txt['locked_topic'] . '<br />' . ($modSettings['enableStickyTopics'] == '1' ? '
<img src="' . $settings['images_url'] . '/icons/quick_sticky.gif" alt="" align="middle" /> ' . $txt['sticky_topic'] . '<br />' : '') . ($modSettings['pollMode'] == '1' ? '
<img src="' . $settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' . $txt['poll'] : '') . '
</p>';
echo '
<script 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['quick_mod_go'], '"
});
// ]]></script>
<br class="clear" />
</div>
</div>';
// Javascript for inline editing.
echo '
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
<script 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'], '", "', $context['session_var'], '");
}
function modify_topic_keypress(oEvent)
{
if (typeof(oEvent.keyCode) != "undefined" && oEvent.keyCode == 13)
{
modify_topic_save("', $context['session_id'], '", "', $context['session_var'], '");
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)" class="input_text" /><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>';
}
?>
Hey man I just want to say I really appreciate your time and what you're doing-even if this doesn't work out. You're a good man.
Ok, I checked those out and modified them myself from what is on the mod site. Try these out but backup your originals first.
Thanks Bigguy. Ok, I got my backup just now and will try your codes. Fingers crossed :)
I hate to say this but it didn't work. Damn...
Do they work on the default theme...Also originally when you first went to use this mod did you install through the package manager. ???
No, they don't work on the default theme either.
Yes, I install everything from Package Manager.
I will gladly give you my admin login details for both the site and my host if you want to check it out.
Maybe for your host. I'll check things out there if you want to PM me details.
Thank you for that - I don't know if it makes any difference to you but my site is a charity site. Anyway, I'll send you my host details right away.
You have folders named off.png and then the image in there. That is not how it goes. You have to upload a image file to this location:
/Themes/Vertex-Theme2-0-2-v1-2/images/icons/2
So the image would be here:
/Themes/Vertex-Theme2-0-2-v1-2/images/icons/2/off.png
Right now you have it like this:
/Themes/Vertex-Theme2-0-2-v1-2/images/icons/2/off.png/off.png
Here is your image:
http://www.gooddeedz.org/Themes/Vertex-Theme2-0-2-v1-2/images/icons/2/off.png/off.png (http://www.gooddeedz.org/Themes/Vertex-Theme2-0-2-v1-2/images/icons/2/off.png/off.png)
Oh God. I'm really sorry to have wasted your time man, honestly. I'll make the corrections immediately.
That's alright. No waste of time at all. Glad to help out. :)
I worked!!! IT WORKED!!!! Oh wow! Oh dude you have made me SO happy that it's officially flip it out time bhut I wont go there!!!
Thanks SO much Bigguy, I can't even.... :) :) :) :) :) :)
Glad ya got it working. ;)
So awesome! But like I think the code got mixed up because if you look at the attachment you'll see that the board title and "unread posts" got bundled together on the left. Would you happen to know a way to fix that?
I have never run into that with this mod...Maybe it was something I did when I manually put the edits in. I will look over what I did.
Thank you :) I also tried to understand the issue and when I right clicked on looked at the source code it showed like this (they changed places I think?):
<a class="collapse" href="http://www.gooddeedz.org/index.php?action=collapse;c=1;sa=collapse;bc0d553ad=b210b19fc1cbc01deeb57b6ddc95d074#c1"><img src="http://www.gooddeedz.org/Themes/Vertex-Theme2-0-2-v1-2/images/collapse.gif" alt="-" /></a>
<a class="unreadlink" href="http://www.gooddeedz.org/index.php?action=unread;c=1">Unread Posts</a>
<a id="c1"></a><a href="http://www.gooddeedz.org/index.php?action=collapse;c=1;sa=collapse;bc0d553ad=b210b19fc1cbc01deeb57b6ddc95d074#c1">Welcome Mat</a>
Had something else to do for a minute. I will look at this now. :)
Just registered on your site to take a look at that problem you are having. I looked over my code and I can't seem to find or figure out where or why these edits would have effected that. Does the default theme look the same.
I'll check.
No it doesn' t, must be just that theme then. You will have to check out what it looks like without the edits to confirm it is actually the cbi mod changing things around. If it's not the cbi mod, maybe a trip over to the theme authors thread is needed. :)
Yes it doesn't.
When you say "without edit", what edits are you referring to? To modified board and messageindex.php files or?
Yes to the two modified files in the custom theme...or I guess just the one in there that is modified. If you replace it with an unmodified version and that error corrects itself then it is the mod somehow. If not then it is the theme.
Ok Bigguy, I'll try replacing both the boardindex and messageindex files one at a time and see what happens.
Well, I'm about to hit the sack right about now-already had my wife/buddy come down and and rightfully grumble at me so it's best I not push it :)
Once again, thanks for everything.
Ok, we'll talk tomorrow then, have a good night.
Hi Bigguy, how're you doing? Listen, I did what you suggested and replaced the modified boardindex.template.php file with the original version and placed it into Vertex but the problem persists so I took your advice, visited the theme author's thread, and tried to explain the situation the best I could (www.simplemachines.org/community/index.php?topic=442036.80) - fingers crossed for a speedy and permanent resolution.
Was there any other problems like yours in that thread at all. Maybe there is a solution posted, or did you check that already. ???
Thanks for the heads up but I read that thread thru and thru 3 times (only 5 pages anyway) and there is no reference, not even remotely, to a problem that resembles mine.
Although the greatest lessons are the hidden ones as they say - I am quickly learning not to use the most recent SMF version with custome themes because for a beginner like me it's like trying to run before I can walk.
Do you have any other mods installed that may have played around with that area of the template. ???
I might, but I cannot be sure. I have 26 normal mods and 12 avatar mod packages installed so I think what you're suggesting seems quite possible. Here are the mods if you want see them:
Normal:
1. TopicStarter Mod 1.7 [ Uninstall ] [ List Files ] [ Delete ]
2. Be Square Smileys 1.0 [ Uninstall ] [ List Files ] [ Delete ]
3. Adk Snow Effect 2.0 [ Uninstall ] [ List Files ] [ Delete ]
4. Additional Instant Messengers 1.0.1 [ Uninstall ] [ List Files ] [ Delete ]
5. Stars to Profile 2.0 [ Uninstall ] [ List Files ] [ Delete ]
6. Captcha on Reminder 1.3 [ Uninstall ] [ List Files ] [ Delete ]
7. BoardColor V1 [ Uninstall ] [ List Files ] [ Delete ]
8. AvatarSelect 1.2.1 [ Uninstall ] [ List Files ] [ Delete ]
9. More Spiders 1.2 [ Uninstall ] [ List Files ] [ Delete ]
10. Spiders Don't Increase Topic Views 1.1.1 [ Uninstall ] [ List Files ] [ Delete ]
11. Smart Pagination 0.8.2 [ Uninstall ] [ List Files ] [ Delete ]
12. Users Online Today 2.0.3 [ Uninstall ] [ List Files ] [ Delete ]
13. Share This Topic 4.1.2 [ Uninstall ] [ List Files ] [ Delete ]
14. Bad Behavior mod 1.5.13 [ Uninstall ] [ List Files ] [ Delete ]
15. Stop Forum Spam 1.0 [ Uninstall ] [ List Files ] [ Delete ]
16. cbi 1.0 1.7.5 [ Uninstall ] [ List Files ] [ Delete ]
17. Notify of posts and replys by default 1.1 [ Uninstall ] [ List Files ] [ Delete ]
18. Avatar on Member List 2.0 [ Uninstall ] [ List Files ] [ Delete ]
19. Menu_Icons 1.0 [ Uninstall ] [ List Files ] [ Delete ]
20. Google Tagged 2.0 [ Uninstall ] [ List Files ] [ Delete ]
21. Profile Comments 2.0.2 [ Uninstall ] [ List Files ] [ Delete ]
22. Minimun Characters or Words Mod 1.1.2 [ Uninstall ] [ List Files ] [ Delete ]
23. PM Quote 1.0 [ Uninstall ] [ List Files ] [ Delete ]
24. Remember Position After Login/Logout v1.0.3 1.3 [ Uninstall ] [ List Files ] [ Delete ]
25. Karma Buttons 1.1 [ Uninstall ] [ List Files ] [ Delete ]
26. Auto Refresh Who Index 1.1 [ Uninstall ] [ List Files ] [ Delete ]
Avatar:
1. Tux Starsigns 1.0 [ Uninstall ] [ List Files ] [ Delete ]
2. Techno and Pc Avatars 1.0 [ Uninstall ] [ List Files ] [ Delete ]
3. Blacy E. Avatars 1.0 [ Uninstall ] [ List Files ] [ Delete ]
4. Lots-of-Avatars-Animated 1.0 [ Uninstall ] [ List Files ] [ Delete ]
5. Letter Number Avatars 1.0 [ Uninstall ] [ List Files ] [ Delete ]
6. Lots-of-Avatars-Animals 1.0 [ Uninstall ] [ List Files ] [ Delete ]
7. Periodic Table Avatars 1.0 [ Uninstall ] [ List Files ] [ Delete ]
8. BMW Cars Avatar Pack v1.0 1.0 [ Uninstall ] [ List Files ] [ Delete ]
9. Scrabble Tile Avatars 1.0 [ Uninstall ] [ List Files ] [ Delete ]
10. Lots-of-Avatars-Eyes 1.0 [ Uninstall ] [ List Files ] [ Delete ]
11. Street Sign Avatars 1.0 [ Uninstall ] [ List Files ] [ Delete ]
12. Sci-Fi Avatars 1.0 [ Uninstall ] [ List Files ] [ Delete ]
I don't see anything there that would effect anything in that area.
Bummer - it could have been a lifeline if I knew a few potential candidates to unistall and check :(
By the way, an interesting thing is manifesting itself with regards to this situation I'm having. If one opens up the site without being logged in, everything appears hunky dory. Only when one logs in do the board names and Unread Posts get mixed (files attached).
Yeah I noticed that.
Just installed this and got the icons working but then noticed a problem. Nothing is listed in the last posts.
Hmm, are you sure that's from this mod. ???
Yes, everything worked fine until I added CBI.
then I suspect you manually added it and did so incorrectly - or had another mod in the same place which caused a bad interaction.... nothing that this mod does would affect that section
I added the mod through the package manager, and to be honest I wouldn't have the slightest clue how to edit it manually lol
Also I have no other mods like this one installed or even attempt to install.
Do you have any errors in the log fie pertaining to that. ???
No and after I removed all the mods problem was still there,so let me think it isn't the mod after all.
Now just lost on how to get it back lol
Is it a custom theme or the default one. If all mods are uninstalled and it is the default theme then re-upload all the files in the default theme folder.
It's a theme I have been making
Aah, well...I would think you have left something out ere or there. Best go back over what you have done. :)
problem is though all I did was remove somethings in the header area and some css edits.
Might wanna go back over things though just in case you missed something. Maybe you tool out a css entry to do with that area.
be easier to change over to my other theme.
Can you please update this for 2.0.3? When I try to install I get: "The package you are trying to download or install is either corrupt or not compatible with this version of SMF."
Yes I will, please use the advanced options when installing this at the bottom of the package manager to emulate 2.0.2 It will install then. :)
Thanks, that worked.
Not a problem. :)
This mod has been updated to work with SMF 2.0.3 If you have cbi 1.7.5 installed right now there is no reason to uninstall it. All that changed was the version number and the ability to install to the latest SMF.
Just got the the new version for 2.0.3 while it was fresh from the over :D
Great mod but i must warn users that it wont play well with modification Board Color and Icons (http://custom.simplemachines.org/mods/index.php?mod=3023). These two mods are not essentially doing the same things but I could not install CBI until I removed the Board Color and Icons.
Is it too much to ask to have it configured so that you can select or {INPUT} image files name in Manage Boards > Modify in currrent Board settings? I mean it would be so much easier. Just a food for hungry minds.
Great mod btw.
That suggestion you made IS going to be implemented as soon as I can. I'm glad you like the mod and thanks for letting me know about the problems with the other mod. :)
Wow that was fast and good news...rare to see these days. They say Big Guys have big hearts :laugh:
Thank you and glad I could be of a help.
No problem at all. I have been meaning to put an admin panel with this mod for awhile. Finding time and not being a coder seem to stand in my way once and a while though. I'll get'r done. ;)
Alright if have NO idea how to install it on my Theme im using the "Overview" Theme ( http://custom.simplemachines.org/themes/index.php?lemma=373 )
So i only have a index.template.php and a settings.template.php but not the template files like its edited on "default" ..... Help please? T__T i cant even find the stuff in those files i need to edit
If your theme does not have the additional template files, then it uses the default versions... Which means that, if the mod installed to the default then it is installed....
Oh really is that so? Okay so i need to use the "Default" folder then too? Because it doesnt show up ^^
Wat do you mean, the default theme does not show up. It had better, or your board is trashed. The default theme is required, even if you are not using it...
No i mean i uploaded the images in a new "icons" folder on the default and my custom theme but on both it doesnt replace the on/off.png images it still shows the "normal" one i made for every board. So its not working :x
Did you clear the server cache and our browser cache?
Did all the code changes for the mod get applied?
Quote from: NekoSteamBoy on April 16, 2013, 07:34:15 PMi uploaded the images in a new "icons" folder on the default and my custom theme
are you also creating separate folders inside the "icons" folder. each one numbered according to the board ID, THEN adding your custom png images there? some images don't show right away, an F5 refresh may need ot be done
Nvm got it to work thanks alot :D
Strange. As long as that one edit was made from the MOD and you're uploading your images correctly I don't see why they're not being displayed.
EDIT::
Good deal, what was the issue?
Hello there :) Just wondering, is an update for 2.0.4 in the making? I'm trying to figure out the changes it makes now but a package would save so much time :DD
this works just fine on 2.0.4
I have the mod cdi installed (change board icons) basically when i add in the folder and picture -
/Themes/default/images/icons/1/on.gif
it doesn't appear as my board icon.. whats happening?
Are you using a custom theme?
if so:
Did you apply the mod code changes to your custom theme?
Did you also create the images/icons/#/*.gif files in your custom theme directory?
if not:
Did you clear the forum cache?
Did you clear your browser cache?
i am using a theme called blackhead and idk i don't think so what code is it and 2nd one what do you mean?
and on my smf theme you get when you start it doens't show there either.
well... if you are using a custom theme, you may have to manually adjust the boardindex.template.php file (if your theme has that file) and you will definitely have to place the images in that theme's directory structure...
if it's not workong on the default theme, then you did something wrong during the install
http://www.youtube.com/watch?v=IXovP7vJ0f4
no idea what that is, but I can't view youtube... if you have an issue that you want help with, then either use attached screen shots or describe it in text.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi1255.photobucket.com%2Falbums%2Fhh635%2Fkillercat125%2Fooi_zpsf9b96166.png&hash=98e96c9d3376d8096da9fbf0861968ea96a63268) (http://s1255.photobucket.com/user/killercat125/media/ooi_zpsf9b96166.png.html)
i get this when clicking install mod
ok... and what does that tell you?
it tells you that you have already modified the target code (in some way) that the mod is looking for...
if you click install now, you won't have any changes made, ebcause the automatic installer can't do the install...
http://wiki.simplemachines.org/smf/Error_in_mod_installation
Sorry for this but what do i edit i'm new to SMF .
did you read the wiki?
Yes :D
that explains what you have to do...
Since I wrote the wiki article, I am unsure how to explain it any simpler....
But what code do i edit..
whatever code the mod tells you that you need to edit... clikc the paper/pencil icon that id displayed on the failure screen
You can also use the package parser to find all the edit the mod makes to your forum. :)
I got the code i had to edit but it didn't even exist..
yes... that is why the automatic installer failed.
As detailed in the wiki link that I gave, you will need to use some human intition to find the appropriate place and then figure our what needs to be edited in...
(you'll be looking for on.gif)
On.gif is not even in there :o
perhaps on.png?
yep that doens't exist either, either does .jpg
What directory/file are you looking in?
{public_html}/themes/default/boardindex.template.php
Ah. I see.... it's not that simple.
Search for off.png
found that sorry about late reply.. i added it under that but got errors.
you don't "add it under" you need to find the code as referenced in the mod instructions and CHANGE IT
its not in the file. i told you this.
and we're back to this...
Quote from: Kindred on June 21, 2013, 08:26:04 PM
yes... that is why the automatic installer failed.
As detailed in the wiki link that I gave, you will need to use some human intuition to find the appropriate place and then figure our what needs to be edited in...
the only change is that off.png is the code fragment which will indicate the correct area.
I am new at this and using the default theme in setting up my forum and had this option with my trial forum but now that I installed the smf forum through a web hosting installer, the option of adding a pic to my board via a custom board icon, it's gone. I tried loading the mod through the package installer but it said "error, file corrupted." Any tips for a non-complicated way to get this mod? Thanks..
.
Did it really say just file corrupted? Or was there perhaps more to the error message?
When you indicate that there was an error, yo need to include the full error message.
Look at the wiki faq regarding installing mods into a different version.
This is what I get when trying to install with the download to my computer from the smf mod site: "The package you are trying to download or install is either corrupt or not compatible with this version of SMF." I don't see one for anything past the 2.0.3 version.
UP-TO-DATE VERSIONS:
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 README
cbi 163 - Installs with SMF 2.0 RC4, RC5
cbi 11- installs with SMF 1.1.12, .13
http://custom.simplemachines.org/mods/index.php?mod=511 (http://custom.simplemachines.org/mods/index.php?mod=511)
http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version
I tried it but got this red message: And I don't know what I am doing to continue on..:(
"Error 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."
http://wiki.simplemachines.org/smf/Error_in_mod_installation
ezportal should have no interaction with this mod at all... they modify completely different spots in the code
There is only so much that we can do, though... eventually, you'll have ot bite the bullet and try editing files (you can use the godaddy file manager to do that)
the trick is: always take a backup (-- actually two backups database for content, files for display)
goDaddy saves your database backups in the backup folder - which you can access and donwload files from within the file manager.
I don't know where or how godaddy saves the files backups.
Okay thanks... Would it be better if I went with an older version of the simple portal that is compatible with the mod?
I will have to contact GD to see how I backup files for display as well as the database content. Wow, I am really wondering if this is the route to go now. We may be safer staying with the Google group and FB private group for our meeting places since I am not that skilled at this.
I am confused...
you are using Simple Machines Forum (SMF)
SMF has nothing to do with SimplePortal, unless that was the portal mod that you installed
and ****NO**** you shoudl NEVER use an outdated version of the software. SMF makes releases for security fixes... if you install an older version, you are leaving your site open to hackers.
no... again, it is unlikely that simple portal is cnflicting with this mod either. Just like EZPortal, the edits are done elsewhere in thecode
I just posted in here and it is gone wtf. This mod will work with the current version of smf. Use the advanced options at the bottom of the package manager to emulate versin number. Also, as I stated before for the other user cbi installs with all poral systems.
Hi BG, I did that already and got this red box warning:
"Error 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."
Modify message
Another mod is probably conflicting th cbi. Not sure what mod it would be though.
Okay, I think you are right as I just tried it again with just the simple portal mod and it installed but there were about three "tests failed" with the install. I cannot see the custom icon option on my boards either?
this does not add an interface for the icons... you add the icons via FTP and use specific directories and filenames.
Also, I alread linked you to what you need to do if there are tests failed messages....
This is what it says when I attempt to install:
Installing this package will perform the following actions:
Type Action Description
* 1. Execute Modification ./Themes/default/BoardIndex.template.php Test successful
* 2. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
Install in Other Themes
To use this modification in themes other than the default, the package manager needs to make additional changes to the other themes. If you'd like to install this modification in the other themes, please select these themes below.
Core Theme
* Execute Modification ./Themes/core/BoardIndex.template.php Test failed
1. Replace ./Themes/core/BoardIndex.template.php Test failed
Execute Modification ./Themes/core/MessageIndex.template.php Test failed
1. Replace ./Themes/core/MessageIndex.template.php Test failed
Okay, posted that for bg.
My question is, will this mod get updated anytime soon?
first of all, the mod does not need to be updated. It works just fine - you just have to use the emulation.
second - the errors that you see are for the "core" theme. Since they all failed, it is more than likely that you ARE NOT USING that theme, meaning the files are missing, which is what caused the "error" message.
why are you switching to the core theme? If you don't plan to use it, then just ignore the errors and move on.
the default/Curve theme is the only one that really matters.
I know you deal with tons of people here on a daily basis and understand all the lingo, but I don't so please have patience with me as I took it as I needed the core theme to use it. I am moderating my group now and understand that the newbs do not understand all of our "sickie" terms so it would help if you could break it down a little more.
I am trying to use this mod without trying to use code to change it in my files or whatever as I do not understand how to do that. I wish it was just as simple as downloading other mods and installing over all of that. Is there any other way to use these custom icons outside of me screwing everything up?
ummm... I think we've said.
Install the mod. (ignore the errors with the core theme)
create the directories
upload the images.
You probably did not see my response earlier to BG when I told him I tried that, it installed okay in spite of the errors but there still was no custom image link on my boards to upload an image. I will try again and if not, I will just go with a more colorful theme or something, thanks for your time. :)
no... you missed the point.
There is no interface for this mod. There are no settings or upload capability for this mod
This mod will pick up the image files if they are in the correct directory (you must upload them yourself, not through the smf admiin)
This is what my first forum boards have on the end of them where you can upload an image, is this the custom image mod? I will try to figure it out by reading through this thread again.
Redirect to a web address
Note: Board must be empty of topics to enable this option.
Count Posts:
Makes new replies and topics raise members' post counts.
Custom Board Icon
Enter a Url to to an image
Or Upload an image:
Delete Uploaded Category Image
no. this mod does not add that field.
Wow, all this time I thought I was looking for that mod and that is what I was looking for this whole time cross posting in the forum...sigh..
Okay, do you know how I would get this option?
All that has to be done, like Kindred has said is...install the mod...Ignore the errors about the core theme....Under the images directory of the theme you want to use you have to make directories for the images of each board. Each board should have 3 images. on, off on2. All in png format. So if you have a board (which you will) with an id of 1 then create a directory named 1 and place all 3 images in there. This is important...clear your browser cache and hit ctrl + f5 to refresh the page right from the server. This should bring up the new icons.
If you see those fields you mentioned then you may not be using this mod. It could be the other mod that was made by a different author.
I don't think that is what feature I am looking for as Kindred said in the previous post but thanks for the help. :)
I am trying to find out what my first forum had on the board that allowed me to upload a picture from my computer in jpg format to the board icon spot. Here's a screen shot of the first forum board:
Hi Friends,
I'm a newbie (first time admin), thinking of installing this mod. But something about the description is unclear to me. So before I decide whether to try installing it, I want to be clear. And I apologize, this is probably something that's very clear to you. But I'm still learning.
Oh, and actually, before you read on -- would this mod work on 2.0.4? Because I see that some of the mod versions are specific to SMF versions, and none is shown for 2.0.4. If it won't work in 2.0.4, then you can ignore the rest :laugh:
This is the description:
"This 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."
My questions are about the part that I've underlined. Does "only installs to the default theme" mean that this mod only works in the default theme? Does that mean the SMF default (which is sometimes called Curve) or does that mean whatever theme you might have installed, and promoted to your forum's default?
I'm not sure if there should be a period instead of a comma somewhere in there. Does it only install to the default theme if you are using a custom theme with "BoardIndex.template.php" and "MessageIndex.template.php" files?
Or should it be read this way "....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.
And then the next sentence. "Those are the only two files this package modifies." Those 2 files are "BoardIndex.template.php" and "MessageIndex.template.php"? If those are the only 2 files this package modifies, they why do they have to be modified manually? Are they both modified by the package, and require manual modification, at the same time?
What is the manual modification? Does that refer to making the new folders in the theme's directory? Or does something need to be changed in those 2 PHP files that were mentioned?
Thanks for your help :)
1- any mod for 2.0.x will mostly likely (99%) work just fine on any other verison of 2.0.x. There is a FAQ article on installing a mod which has not been specifically updated for your current version.
2- with all mods for 2.0, the package manager will *ATTMEPT* to add mods into custom themes. Sometimes, the coding is too different from the standard theme... and will require a manual install into the custom theme.
Additionally, you will have to create icons for ALL themes and upload them (individually and via FTP) to each theme that your site uses.
3- manual modification refers to manually editing the target files because the auto-installed was unable to find the target code ot change (either because ti was a cusotm theme that used something significantly different form the default standard or becuas eanother mod has alreyad modified the target code)
I am sorry to everyone. I will update this mod very soon. I have just been really busy as of late and have not been able to find the time.
Mod is updated....Also, it installs with SMF 2.1 with emulation. ;)
Love it! Used it!
The only way it could be better if it added a custom sound file as well! Now that I think about it, an animated gif could be pretty cool as well! ;D
magnoliaoutdoorforums.com
Glad you like it. :)
Mmmmm, it would be hard to change from
Quoteforum/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
to something like
Quoteforum/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
?
(just files with unique names boardid-status, instead directories showing files using the same name everywhere)
Its better to update files, you do not need to go inside a lot of directories...
Or at the setup... you create files at just one place
And every file has it own name... not a lot of ON ON2 OFF....
More work than I think I am up for right now. I will look into it though for the future. Thank you for your feedback. :)
Thanks you for listening us!
Great mod
That's what we're here for and thank you. :)
Actually, it's not much of a change. 4 little changes in 4 lines of code. I actually installed this mod and then made that change because I didn't want separate directories.
Well, if it's workin out ok...cool. I'll PM you later about it. Just got done diggin a basement and am a bit tired right now, lol. :)
I am looking to start to use this mod because I want different images on this page http://forum.viewfromtheboundary.com/index.php?board=16.0 (http://forum.viewfromtheboundary.com/index.php?board=16.0)
Will I be able to have different images for each one?
yes
Quote from: chep on February 13, 2007, 08:12:34 PM
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.
I would love the same thing, sorta. But in a separate cell so its the same height as the post indicator cell. If you add it to the board description with html, then it throws off the alignment.
Not sure how much work it would be but if possible, also the option to input a image url in the modify boards section that points to the board icon.
Or... you could make the new post/no new post indicator automatically show just before the board description. :-\
What would the code be to include the custom board icons on the "Show unread posts since last visit" page in the Recent.template.php?
Just to show the corresponding board's on.png next to each new post on that page would do.
Will gladly Paypal five dollars for the code (SMF 2.0.2). Thanks :)
doing that would involve a moderate amount of coding in sources and template files
Quote from: Kindred on October 25, 2013, 08:19:16 PM
Actually, it's not much of a change. 4 little changes in 4 lines of code. I actually installed this mod and then made that change because I didn't want separate directories.
Quote from: Bigguy on October 26, 2013, 12:19:52 AM
Well, if it's workin out ok...cool. I'll PM you later about it. Just got done diggin a basement and am a bit tired right now, lol. :)
Can you share the changes? it would be great!
Id really like to have this work for 2.0.7 but the parser says that it wont and wont even parse it. Anyone know if it will work and what edits I would need to use to make it work?
I am using the curve theme.
How can I install a mod that doesn't work in my SMF version? (http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn%27t_work_in_my_SMF_version)
How do i make this work in 2.0.8
It works just fine in 2.0.8
Yes of course it does, i was not thinking straight. What i was trying to say was, how do i make this work in 2.0.8 when i am using a custom theme. Which part do i modify in "BoardIndex.template.php" and "MessageIndex.template.php" if its possible
look at the manual install instructions....
It does not give any instructions in 2.0.8
It should, when you go to install it there is a readme. If not the mod can be parsed.
There was a version change today. I updated the mod to install to 2.0.9 I also changed the license on it. You are now free to modify and distribute as long as the readme stays intact.
Same here i am having issues installing this mod.
I have all test fails on my site
my site is running 2.0.9
It will fail on your site, Bruce, your theme is quite a bit different under the hood to how SMF is normally built.
Oh
But i need this mod as i want to change my icons for me boards.
What should i use or is this a custom install
It will have to be a custom install by hand I think :(
I never once had i thought that browsing the mod sites for packages would mean that most are incomparable for my theme.
It is disappointing as I really liked the theme that i purchased for what i got and paid for, but never did i think this would be the outcome.
Sad reality, I'm afraid... most themes that diverge from the default theme to any significant degree will also break mod compatibility :(
Unfortunately being new here you learn the hard way.
I wonder if SimplePortal is able to do this feature?
I might have to ask in that forum :-\
Search the modsite for "board icon", there is at leasta nother one from DreamPortal.
And there was another one from ADK but for that you need to check their site (which, on my computer, is not working ATM)
Dunno, maybe one of those is more "friendly" to your theme. Yet, if it's *that* different from default, they'll all probably fail :(
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.
Quote from: Kindred on October 25, 2013, 08:19:16 PM
Actually, it's not much of a change. 4 little changes in 4 lines of code. I actually installed this mod and then made that change because I didn't want separate directories.
Quote from: Bigguy on October 26, 2013, 12:19:52 AM
Well, if it's workin out ok...cool. I'll PM you later about it. Just got done diggin a basement and am a bit tired right now, lol. :)
Hey Kindred, if you find some time do not forget to share those changes
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
This will let you place all of your icons into the icons folder, with the filenames on###.png, on2_###.png, off_###.png, redirect_###.png -- and will fall back on the original theme's files if the custom ones are not present
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'on_' . $board['id'] . '.png'))
$board_new_img = '/icons';
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '_' : '2_', ', $board['id'] , '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'redirect_' . $board['id'] . '.png'))
$board_redirect_img = '/icons';
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect_', $board['id'], '.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'off_' . $board['id'] . '.png'))
$board_nonew_img = '/icons';
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off_', $board['id'], '.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
or this version... which requires you to put your custom files AND the fallback files into the icons direcory
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'on_' . $board['id'] . '.png'))
$board_new_img = 'on_' . $board['id'] . '.png';
$board_new_img2 = 'on2_' . $board['id'] . '.png';
else
$board_new_img = 'on.png';
$board_new_img2 = 'on2.png';
echo '
<img src="', $settings['images_url'], '/icons/', $context['theme_variant_url'], $board['new'] ? $board_new_img : $board_new_img2, '" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'redirect_' . $board['id'] . '.png'))
$board_redirect_img = 'redirect_' . $board['id'] . '.png';
else
$board_redirect_img = 'redirect.png';
echo '
<img src="', $settings['images_url'], '/icons/', $context['theme_variant_url'], $board_redirect_img, '" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $context['theme_variant_url'] . 'off_' . $board['id'] . '.png'))
$board_nonew_img = 'off_' . $board['id'] . '.png';
else
$board_nonew_img = 'off.png';
echo '
<img src="', $settings['images_url'], '/icons/', $context['theme_variant_url'], $board_nonew_img, '" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
You then need to do a similar change to the MessageIndex.template.php updates
Quote from: Bigguy on December 19, 2014, 06:10:42 AM
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.
I found it!
but it doesn't work
sorry Bigguy
wrong mod for this topic
yeah... that is not this mod.... this mod has no interface needed.
Quote from: Bruce the Shark on December 20, 2014, 02:49:43 AM
Quote from: Bigguy on December 19, 2014, 06:10:42 AM
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.
I found it!
but it doesn't work
sorry Bigguy
wrong mod for this topic
This is the support topic you need:
http://www.simplemachines.org/community/index.php?topic=496396.0
Quote from: ♞ Burke Knight ♞ on December 20, 2014, 07:51:18 AM
Quote from: Bruce the Shark on December 20, 2014, 02:49:43 AM
Quote from: Bigguy on December 19, 2014, 06:10:42 AM
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.
I found it!
but it doesn't work
sorry Bigguy
wrong mod for this topic
This is the support topic you need:
http://www.simplemachines.org/community/index.php?topic=496396.0
Thanks for that. I had started to search for this mod in Modification and Packages...This Topic "Board Icons" but i was only getting Custom Board Icons showing up.
Strange still so difficult to find.
I am reading this board right now. So interesting as it appears other are having similar issues as me with not showing the icons. The Author says regardless of the theme it will work.
So there is hope :laugh:
Quote from: Bigguy on December 19, 2014, 06:10:42 AM
Sorry you are having problems. I've been off-line for a few days and did not see this. (No regular internet connection right now) They are right though. If your theme is that different a lot of mods may fail.
Still your mod looks good.
I would like to give it a go and see how far i get.
Just a quick question here as this is good practice for me, i have edited the boardindex.template and the MessageIndex.template for my site.
This might sound like a silly question to ask but why are there two fiIe with almost the very same name within my theme.
I have only edited one.
eg
messageindex.template.php
messageindex.template.php~
boardindex.template.php
boardindex.template.php~
note fyi: i have edited the files without the end extension ( ~ )
The tilde files are backups created by PackMan when it edits a file ;)
ok thanks i just read up on this tilde files.
Still i don't think there has been any significant change, unless i am not seeing it in my admin panel.
Read the readme for the mod. It should explain everything you need to know. In short though if you make an icons folder under the theme directory that you are using, then in there one folder for each board you have, and then put the icons in there. SO say you are using the default theme and you have a board with the id of 1 This is what it would look like:
/Themes/default/images/icons/1/on.png
/Themes/default/images/icons/1/off.png
/Themes/default/images/icons/1/on2.png
Hope that helps.
That can be an issue, if have a lot of boards.
Having settings in the modify boards would be a lot easier. ;)
not really... putting a file in the icons directory seems simple enough to me...
(see my edits above)
also much simple to create a full set and upload them than to have to modify each and every board --- ESPECIALLY if you have a ton of boards...
True, but if have several boards using the same image, like I do, as my site is mainly different icons for each category, then would have a lot of duplicate images....LOL
However, that is decent. Nice job, Kindred. :)
EDIT:
Kindred, getting a TPE on your edits:
syntax error, unexpected 'id' (T_STRING), expecting ',' or ';'
fixed it... had a rogue "." in the code... (it was showing ,. instead of just , - bad copy/paste on my part)
Okay, I installed the mod onto another site. Have custom theme, and it edited the files with no errors onto that theme.
I did not use Kindred's edits on this site, since have so few boards.
However, I have made boards, and set the directories for each board in the icons like it states.
I even have them in the custom theme's icons, as well as in each of the color variations.
Yet, the images will not change to the ones I have placed into the directories.
Now, even though the site has very few boards, it does have high 2 digit numbers for them, if that makes any difference.
You might need to hard refresh your browser's cache. If you use Cloudflare, you also need to empty its cache.
I had tried... Oh well, uninstalled it, as that site really does not need it...
However, I do plan on using this on another site, so hope I can get it working on that one....
The fun part, will be all the boards I need to make images and directories for....LOL
Hence my edit... I had 45 boards... I didn't feel like making 45 directories
Yes, I do plan on using your edit for that one site....
But, with all the boards being custom, I wonder if it's really going to be a time saver.
I'd still have to make all the images. Then name them all for the board ID's...
You would have to do the same creation no matter what mod you use.... If you want custom icons for the board(s)
Not exactly... The mod I'm currently using, has the settings in the modify boards.
However, there's the issue that it is messed up, so Simple Desk will not show its images.
So, I'll be switching to this, and since some boards will use the same images, will have to make duplicates of many of the images I have, with the board ID's in the names.
You make it sound like such a hardship.
Which takes all of 5 seconds...
Copy on_12.png to on_15.png
Quote from: Bigguy on December 21, 2014, 09:06:49 AM
Read the readme for the mod. It should explain everything you need to know. In short though if you make an icons folder under the theme directory that you are using, then in there one folder for each board you have, and then put the icons in there. SO say you are using the default theme and you have a board with the id of 1 This is what it would look like:
/Themes/default/images/icons/1/on.png
/Themes/default/images/icons/1/off.png
/Themes/default/images/icons/1/on2.png
Hope that helps.
I have edited my boardindex.template and Messageindex.template as described here and uploaded and replaced it via ftp.
Also these folders where added in manually
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
the ( board_id ) i just have 1,2,3 in them
with my png images
still i haven't seen any significant change :(
as described where?
in the manual mod instructions or in the code changes that I posted?
As described here in the first post front page of this topic from Bigguy.
The manual mod regarding the board_id
Quote from: Bigguy on January 03, 2007, 02:16:10 PM
@ 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" />';
}
as described here with the boardindex.template and Messageindex.template i used the above as an example only.
I used my own theme and i looked at my errors that i was getting when installing my mod that i thought needed those changes
Right or wrong i dont know if this is the correct procedure.
well, if your theme is significantly different from the standard theme, and you manually applied the mod updates with changes that you THINK are right... and it's still not working... then I submit that your changes were NOT correct....
Quote from: Kindred on December 22, 2014, 08:12:34 AM
well, if your theme is significantly different from the standard theme, and you manually applied the mod updates with changes that you THINK are right... and it's still not working... then I submit that your changes were NOT correct....
I could have told you that. As mentioned above i did say that there hasn't been any significant changes.
Thats why i am still posting my issue here.
Any ideas Kindred, whats plan B for me
or should i post my code right here so that you can see the changes i made
attach your boardindex.template.php file
no promises on timeline though
my original boardindex.template
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0
*/
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
// Show some statistics if stat info is off.
if (!$settings['show_stats_index'])
echo '
<div id="index_common_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'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</div>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div id="newsfader">
<div class="cat_bar">
<h3 class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
</div>
<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';
foreach ($context['news_lines'] as $news)
echo '
<li>', $news, '</li>';
echo '
</ul>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfFadeScroller\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></script>';
}
echo '
<div id="boardindex_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 image),
and boards. (see below.) */
foreach ($context['categories'] as $category)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<table class="table_list">
<tbody class="header" id="category_', $category['id'], '">
<tr>
<td colspan="4">
<div class="cat_bar">
<h3 class="catbg">';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
echo '
', $category['link'], '
</h3>
</div>
</td>
</tr>
</tbody>
</table>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<div class="tb-boards">
<table class="table_list tb-content">
<tbody class="content" id="category_', $category['id'], '_boards">';
/* 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 id="board_', $board['id'], '" class="lgf_boards">
<td class="icon', ($board['new'] || $board['children_new']) ? ' border_mnb' : '', '">
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="info">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<span class="regular_text"><a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></span>';
// No new posts at all! The agony!!
else
echo '
<a class="subject2" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
// If the board is new show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<span class="mobile_on btn btn-primary btn-xs">', $txt['new'], '</span>';
// 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'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
// 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'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($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'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
$children[] = $child['new'] ? '' . $child['link'] . '' : $child['link'];
}
echo '
<ul id="board_', $board['id'], '_children" class="reset subforum_lgf children">
<li>', implode(', ', $children), '</li>
</ul>';
}
echo '
<p class="board-description">', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats">
<p><strong>', comma_format($board['posts']), '</strong> ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : '<strong>'. comma_format($board['topics']). '</strong>' . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
echo '
</td>
</tr>';
}
echo '
</tbody>
</table>
</div>';
}
echo '
<br />';
//Display ads Between cats
if (function_exists("show_category"))
{
$ads = show_category($category['id']);
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
}
echo '
</div>';
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="floatleft">';
// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
);
echo '
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on.png" alt="" /> ', $txt['new_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
}
else
{
echo '
<div id="posting_icons" class="flow_hidden">
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
}
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo '
<br class="clear" />
<div id="iclinks" align="center">
<ul class="iclinks">
<li class="value">', $context['common_stats']['total_posts'], '</li><li>', $txt['posts_made'], ' ', $txt['in'], ' ', $txt['total'], '</li>
<li class="value">', $context['common_stats']['total_members'], '</li><li>', $txt['members'], ' ', $txt['in'], ' ', $txt['total'], '</li>
<li class="value">' . $context['common_stats']['latest_member']['link'] . '</li><li>', $txt['latest_member'] . '</li>
<li class="value">', comma_format($modSettings['mostOnline']), '</li><li>', $txt['most_online_ever'], '</li>
</ul>
</div>
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">
<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
</h3>
</div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
', $txt['recent_posts'], '
</span>
</h4>
</div>
<div class="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 '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_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>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '
</span>
</h4>
</div>
<p class="smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</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'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</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'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
}
echo '
</p>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
', $txt['forum_stats'], '
</span>
</h4>
</div>
<p>
', $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'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';
}
// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($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[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
echo $context['show_who'] ? '</a>' : '', '
</p>
<p class="inline 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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</p>
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>';
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span>', $txt['personal_message'], '</span>
</span>
</h4>
</div>
<p class="pminfo">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</p>';
}
echo '
</div>
</div></div>
<span class="lowerframe"><span></span></span>';
// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
}
?>
i added this into it
/* 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 id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
The post got cropped. Attach the file instead ;)
This is what i have right now uploaded.
i hope this is better.
Can you see it?
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0
*/
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
// Show some statistics if stat info is off.
if (!$settings['show_stats_index'])
echo '
<div id="index_common_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'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</div>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div id="newsfader">
<div class="cat_bar">
<h3 class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
</div>
<ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';
foreach ($context['news_lines'] as $news)
echo '
<li>', $news, '</li>';
echo '
</ul>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfFadeScroller\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></script>';
}
echo '
<div id="boardindex_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 image),
and boards. (see below.) */
foreach ($context['categories'] as $category)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<table class="table_list">
<tbody class="header" id="category_', $category['id'], '">
<tr>
<td colspan="4">
<div class="cat_bar">
<h3 class="catbg">';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
echo '
', $category['link'], '
</h3>
</div>
</td>
</tr>
</tbody>
</table>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<div class="tb-boards">
<table class="table_list tb-content">
<tbody class="content" id="category_', $category['id'], '_boards">';
/* 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 id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
<td class="info">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<span class="regular_text"><a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></span>';
// No new posts at all! The agony!!
else
echo '
<a class="subject2" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
// If the board is new show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<span class="mobile_on btn btn-primary btn-xs">', $txt['new'], '</span>';
// 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'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
// 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'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($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'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
$children[] = $child['new'] ? '' . $child['link'] . '' : $child['link'];
}
echo '
<ul id="board_', $board['id'], '_children" class="reset subforum_lgf children">
<li>', implode(', ', $children), '</li>
</ul>';
}
echo '
<p class="board-description">', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats">
<p><strong>', comma_format($board['posts']), '</strong> ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : '<strong>'. comma_format($board['topics']). '</strong>' . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
echo '
</td>
</tr>';
}
echo '
</tbody>
</table>
</div>';
}
echo '
<br />';
//Display ads Between cats
if (function_exists("show_category"))
{
$ads = show_category($category['id']);
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
}
echo '
</div>';
if ($context['user']['is_logged'])
{
echo '
<div id="posting_icons" class="floatleft">';
// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
);
echo '
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on.png" alt="" /> ', $txt['new_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
}
else
{
echo '
<div id="posting_icons" class="flow_hidden">
<ul class="reset">
<li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
<li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
</ul>
</div>';
}
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo '
<br class="clear" />
<div id="iclinks" align="center">
<ul class="iclinks">
<li class="value">', $context['common_stats']['total_posts'], '</li><li>', $txt['posts_made'], ' ', $txt['in'], ' ', $txt['total'], '</li>
<li class="value">', $context['common_stats']['total_members'], '</li><li>', $txt['members'], ' ', $txt['in'], ' ', $txt['total'], '</li>
<li class="value">' . $context['common_stats']['latest_member']['link'] . '</li><li>', $txt['latest_member'] . '</li>
<li class="value">', comma_format($modSettings['mostOnline']), '</li><li>', $txt['most_online_ever'], '</li>
</ul>
</div>
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">
<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
</h3>
</div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
', $txt['recent_posts'], '
</span>
</h4>
</div>
<div class="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 '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_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>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '
</span>
</h4>
</div>
<p class="smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</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'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</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'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
}
echo '
</p>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
', $txt['forum_stats'], '
</span>
</h4>
</div>
<p>
', $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'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';
}
// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($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[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
echo $context['show_who'] ? '</a>' : '', '
</p>
<p class="inline 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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</p>
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>';
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span>', $txt['personal_message'], '</span>
</span>
</h4>
</div>
<p class="pminfo">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</p>';
}
echo '
</div>
</div></div>
<span class="lowerframe"><span></span></span>';
// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
}
?>
Please ATTACH the files, which is what I originally asked. Don't include the code in a post.
Quote from: Kindred on December 22, 2014, 09:20:11 AM
attach your boardindex.template.php file
no promises on timeline though
Is this what your looking for.
I am still new to this please bear with me
Are you using a custom theme. ??
Unfortunately
Yes
Then if the files that need to be edited are present in the custom theme folder they need to be edited. Also the file structure for the icons needs to be under the custom theme folder and not the default. If you switch back to the default theme do you see the icons. ??
No i dont see the icon.
When i switched it back as you suggested to the default theme, it hasn't shown up.
Both themes aren't showing anything.
PM sent. :)
Thanks Bigguy for your assistance.
It appears i have placed my images in the wrong directory. Noob
I have now corrected this.
Some items are now starting to show.
I still need to work on this. I shall let you know.
I see them now as well. Good work. :) I'll be here to help as much as I can. ;)
Quote from: Bigguy on December 26, 2014, 07:04:22 PM
I see them now as well. Good work. :) I'll be here to help as much as I can. ;)
Thank you. :)
Hello,
I have forum version 2.0.9 with SimplePortal 2.3.6.
Last versione of cbi is compatible?
Yes it is. :)
Will this mod be updated for 2.0.10?
It works fine on 2.0.10
Quote from: Kindred on June 20, 2015, 09:00:13 PM
It works fine on 2.0.10
I've installed it (emulating as 2.0.9), created proper folder with files:
Themes/default/images/icons/1/on.png
And nothing has changed ;/
I tried also:
Themes/Redsy/images/icons/1/on.png
And also nothing ;/EDIT: I've fix it :P Anyway thx for help :P
This plugin don't works on 2.0.11 :(
I have not updated it yet. Thanks I will do that tonight or tomorrow.
For some reason I can not update the version of the mod on the mod page but I just uploaded version 1.8.1 which is the latest version. It should work fine for you. Keep in mind this has not been tested by me as all it was was a simple update of the version of SMF it runs with.
Ok, I will test it right now :)
Edit:
When I try to install it SMF tell me that can't replace:
/* 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 id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
For:
/* 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 id="board_', $board['id'], '" class="windowbg2">
<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'on.png'))
$board_new_img = '/icons/' . $board['id'];
else
$board_new_img = '';
echo '
<img src="', $settings['images_url'], $board_new_img, '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'redirect.png'))
$board_redirect_img = '/icons/' . $board['id'];
else
$board_redirect_img = '';
echo '
<img src="', $settings['images_url'], $board_redirect_img, '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if (file_exists($settings['theme_dir'] . '/images/icons/' . $board['id'] . '/' . $context['theme_variant_url'] . 'off.png'))
$board_nonew_img = '/icons/' . $board['id'];
else
$board_nonew_img = '';
echo '
<img src="', $settings['images_url'], $board_nonew_img, '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}
echo '
</a>
</td>
In Core Theme and in Redsy (the theme of my forums).
This mod only installs to the default theme. For any other theme you will have to manually edit the code.
OMG... well... I will try it :(
Edit:
This is so hard for me, I must look for other way :'(
It's not that hard if you have a good editor for php. Use the parser on the cbi mod page to parse the code. Seach for it in the file and replace it.
Well... I don't know how much hours I spend to make it works... (I'm a noob in PHP xD), but FINALLY IS WORKING!
*Run around crying*
Thanks for all Bigguy :')
http://foro.bauldelafriki.com/index.php
Now to create the others icons :)
Hey, I'm glad ya got it. Changing other icons is no problem really. Find an image you want to replace. Find the replacement image and make sure it is the same dimensions as the old one and name it the same as the old one then upload it to your host so it overwrites the old icon with the new. I hope that made sense.
Or rename the original icon to something like 'iconnameold' and then upload the new one. That way, you can always go back to the original if you want. :)
Good call Steve. :)
Massive Errors:
Installation FAILED:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FWDQOSom.png&hash=28cd725f7fd4514e16f86e992136354e933b96e0)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fl8rDBAN.png&hash=42d4851e71575e576cb48191c822e03f690a0237)
Please HELP
Quote from: Kosuki on April 14, 2016, 06:33:33 PM
Massive Errors:
Installation FAILED:
Please HELP
Do you still emulating version of smf gives you trouble? Another alternative is via FTP search for the line of code manually to modify it without any problems and then install the modification still causing problems because the lines of code are ... You must look at the parse of the amendment to know what to do but can get some there are several issues pertaining!
Regards!
Kosuki: you probably have other mods installed that have changed the base code of SMF so this mod can not install. What other mods do you have installed.
Hello, when i try to install cbi on 2.0.11 i get a lot of errors :/ how can i install it without getting errors, i have 3 mods installed (mentions, menu editor lite and The Rules)
What are the errors. ??
[offtopic]Hey Bigguy, glad to see you're still around![/offtopic]
Thanks Steve, I'll always be around. Right now just got a bit goin on. It's nice to be missed though. :)
Can you please tell me if it is possible to add images for the Child Boards?
Quote from: bharat on November 29, 2016, 02:40:11 AM
Can you please tell me if it is possible to add images for the Child Boards?
Yes, it's possible, you should add icons the same way as for main boards, please take a look at the instructions in the readme file or at the mods page.
do note that child board do not show icons in the main board index they only show on the message index (within the parent board)
I am using a mod Tidy Child Boards and now it looks like this (please check the attachment) so I was wondering if I can use another image.
no. that image belongs to the PARENT... as I told you.
Quote from: Kindred on November 29, 2016, 04:52:09 PM
do note that child board do not show icons in the main board index they only show on the message index (within the parent board)
A license for this mod has been added.
I'd love to have this mod on my forum but I can't make it work. :( I want to have it on my custom theme. I try to manually change "BoardIndex.template.php" and "MessageIndex.template.php" files in its folder but after this my forum crashes and looks like this:
(https://i.imgur.com/vtPN80n.jpg)
Can you help me with this? The theme is Reseller, and its files are in the attachment if you'd like to have a look.
Are these edited files or are these clean with no edits from cbi mod. ??
Clean, before editing.
I'm so sorry man, I forgot about this. I will see what I can do now for you.
Here, try these, they should work fine.
Unfortunately, nothing has changed. ;/ It's still the same like in the screen above.
It has to have changed. Have you cleared forum and browser cache. ??
I did it but still the same. I've sent you a link to my forum, perhaps it may help.
I got the link and will check later. :)
I checked the mod with my other theme and the result is the same. I mean it works because I can see a changed icon when I put it in the proper place, however in both cases the forum itself is broken as you can see on the screen.
Is it the same with the default theme. ??
It installs without errors on default them and works perfectly. I uninstalled it and changed everything manually and again it works.
In other themes when I do the same and change boardindex and messageindex manually, the main site is a mess.
Hmm. I'll have to take a closer look at those theme files. Maybe it has something to do with the avatar being there that is messing things up. The theme author MIGHT have to help you out but I will see what I can do.
I think the problem was in the messageindex file. I have edited them again, please see if this works.
bod22 - please provide a link to your website/forum page which shows this issue?
I'm betting it's a badly formed table or CSS
QuoteI'm betting it's a badly formed table or CSS
It could be. I think he was adding a bit of code twice. The same thing I did when I edited the files the first time. I think anyway, lol. Let's see what he says. :)
Quote from: Bigguy on August 08, 2018, 12:57:18 PM
Maybe it has something to do with the avatar being there that is messing things up.
I uninstalled this avatar mod and nothing has changed. I also used your newly edited files and the situation is the same as it was. ;/
Link to my forum is strefapsx.pl/forum
Well, the edits are pretty straight forward so I am unsure of what is going on. Maybe Kindred is onto something here.
I need your url
Remove the rowspan=2 from the icon td, looking at the images, the theme in question removes that property, but the mod adds it
Ignore me if I'm wrong :P I'm just on phone
Quote from: Kindred on August 08, 2018, 08:46:30 PM
I need your url
I posted it above. ;) https://strefapsx.pl/forum/
Quote from: SychO on August 09, 2018, 03:02:47 AM
Remove the rowspan=2 from the icon td, looking at the images, the theme in question removes that property, but the mod adds it
As you can see I'm not very good at this staff, where can I find this rowspan to be removed?
that link does nto show any broken layout... I would need to see the actual broken layout.
However, Sycho is likely correct. If there is a rowspan=2 in the mod code but not in your theme code, then yes - it could have an effect similar to your images.
You'd have to fix the mod code addition in both MessageIndex and BoardIndex
Yeah, there is. I just noticed it.
Ok, so looking at the code I might have come up with a solution....maybe. rowspan is only present in the boardindex so I combined the code and this SHOULD work. No promises though.
EDIT: Use this file and the messageindex attached to the last post I made with attachments.
Today is my lucky day! Finally, it works on all themes. Thank you very much for your patience and help.
That's great to hear. I'm glad it's working for you. If there are any errors, please post back and we'll do what we can to get ya up and runnin. :)
@bod22: Try these files out. Sorry for the wait.
Thank you, I'll try them in the evening.
Sounds good. :)
Did those work for you. ??
Yes, everyhing's great. Thanks!
It doesn't work on Flexive theme even if I manually replace it.
Original and modified files are attached. The Flexive theme: https://custom.simplemachines.org/themes/index.php?lemma=2846. It has Awesomefont icons but you can disable it in theme settings and then standart .png icons are displayed.
Yes, I've checked it in default, the mod works on default theme, so the problem is in Flexive theme.
You might need to talk to the theme author but I will check these files out in a bit here.
Making those changes for the theme would be an individual thing, since the changes and files would depend completely on what other mods that you have installed.
Altered files will probably be removed, lest someone get confused and try to use them.
Also, as with any mod.... specific themes may always require manual changes...
All right I gave this a shot. Please backup your originals before you try these. After you get them they can be removed if the higher powers see fit to do so. :) If these do not work maybe the theme author can help you out.
Quote from: Bigguy on December 09, 2018, 06:04:11 PM
All right I gave this a shot. Please backup your originals before you try these. After you get them they can be removed if the higher powers see fit to do so. :) If these do not work maybe the theme author can help you out.
Now it works :) But there are a little of mistakes.
That's not from this mod.
It's something to do with font awesome icons
Which could be the theme you are using or another mod. Thanks live627
Hey bigguy just wanted to pop in and thank you for this mod. I wanted to customize my icons in a custom theme and didn't know how. It didn't dawn on me to check if there was a mod for that until today :)
It's 3am by me and I just got it to work on my test site. Now I've got to sleep. Tomorrow I hope to get it to work on my main site.
Thanks!
Hello Bogguy, will it work with 2.1?
No, I am sorry it will not work yet with 2.1. I have found another way to do it though until I update the mod, if I can. It's a little harder. If you look at my site you will see it acts a little different as well. Link under my avatar. Nice lookin site btw. :)
I have installed it, do i have to install it manually in my custom theme?
If your custom themes have the template files that this mod edits then yes. If not then you should be done.
Quote from: Bigguy on March 21, 2019, 09:37:20 AM
If your custom themes have the template files that this mod edits then yes. If not then you should be done.
Ok, thanks.
Hey, not a problem. :)
this doesn't seem to work on 2.0.15, I try installing and it shows a bunch of errors, is there any way to resolve this?
Can you post the errors it makes so I can check things out please.
EDIT: Are you using a custom theme. ??
Hello. I ran all the instructions but when I go to the forum this error comes up:
syntax error, unexpected 's' (T_STRING), expecting ',' or ';' smf
I'm using a custom theme, smf version 2.0.15
Is there a way to solve it?
sounds like you made manual edits which were not correctly coded.
Did it install right on the default theme. ??
Hello,
Does this mod will work properly on 2.0.17 version?
It should yes.
Hi, I'm using version 2.0.17, and it doesn't work.
I have cbi195 installed.
I'm using theme 'Exodus'. (perhaps board icons should go here?)
Anyway, I put the directories/images:
h*tp://4srs.biz/Themes/default/icons/6/on.png
h*tp://4srs.biz/Themes/default/icons/6/on2.png
h*tp://4srs.biz/Themes/default/icons/6/off.png
6 is the ID of my 'Newsroom' board.
It doesn't change the board icon.
Should I use smaller icons? Is .png unsupported? What should I do?
Okay, they're in <theme>/images/icons/<board ID>/on/on2/off.png
BUT - I try this with all the themes, including default, and it still doesn't work.
I can install in RC2?
I will update the mod in the next week and it should work fine then. For any custom themes, you will have to manually edit the themes files in order to get it to work.
Hello, I'm on SMF 2.0.17 and if I try to install "cbi195.zip" I get the following error:
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
What's wrong?
It has not been updated to the latest version of SMF.
Quote from: Bigguy on February 26, 2020, 06:59:17 AM
I will update the mod in the next week and it should work fine then. For any custom themes, you will have to manually edit the themes files in order to get it to work.
Still works with version emulation. Tested it myself the other day, out of curiosity.
Quote from: Bigguy on February 29, 2020, 11:38:46 AM
It has not been updated to the latest version of SMF.
Sorry, I missed your previous message. New version will work for version 2.1 as well?
No it won't, sorry not yet.
Updated to work with 2.0.17 This is the only change. Work for a 2.1 version will start soon maybe.
Quote from: Bigguy on December 04, 2020, 09:06:20 AM
Updated to work with 2.0.17 This is the only change. Work for a 2.1 version will start soon maybe.
Thank you! I will wait for 2.1 version :)
Quote from: smartmouse on December 04, 2020, 09:52:08 AM
Quote from: Bigguy on December 04, 2020, 09:06:20 AM
Updated to work with 2.0.17 This is the only change. Work for a 2.1 version will start soon maybe.
Thank you! I will wait for 2.1 version :)
There is similar mod for 2.1
https://custom.simplemachines.org/mods/index.php?mod=4224
Oh, great!
Thanks
Would be cool if this mod supported FontAwesome icons -:)
Quote from: spiros on April 22, 2021, 09:18:11 AM
Would be cool if this mod supported FontAwesome icons -:)
that would be a completely different mod, since this one SPECIFICALLY looks for images.
As a matter of fact...
https://custom.simplemachines.org/mods/index.php?mod=4224
Thanks! Pity only supports 2.1
Mod is not working on my SMF 2.0.17 version. When trying to install it i am getting Test Failed on my default theme.
Running WAMP with PHP version 5.6.40.
(https://ibb.co/RyXc13K)
if you click on the icon next to the line that's giving the error it should tell you what it is looking for and what it is wanting to do
something else you installed more than likely changed what this mod is looking for
https://wiki.simplemachines.org/smf/Error_in_mod_installation
Quote from: Bigguy on December 04, 2020, 09:06:20 AMUpdated to work with 2.0.17 This is the only change. Work for a 2.1 version will start soon maybe.
Just checking in: are there still plans for a version that supports SMF 2.1?
This mod is absolutely amazing and remember using it back in 2017, I really hope this gets an update for 2.1.x as i feel this is almost essential and wish SMF would of actually implemented this already...
Also one suggestion would be to maybe the ability to add a Image to the category as well as I remember we used to code that in ourselves.
You're an absolute legend for creating this in the first place and much appreciated for the work you put in it
My 2.0.x forum had so many mods and manual edits that I managed to lock myself at 2.0.14 without some massive work.
My 2.1.x forum has 10 mods total thus far and I REFUSE to make any manual edits. I want to be able to update this forum.
As such, the stock look is very much evident on the forum currently. This mod would go a long way toward adding a little bit of "custom" feel to the forums without having to resort to manual edits.
I too raise my hand if asked... "Would you like to see this mod converted to 2.1?"
Quote from: FrizzleFried on March 03, 2022, 09:55:58 AMI too raise my hand if asked... "Would you like to see this mod converted to 2.1?"
I agree
This mod may not get an update for the 2.1.x series of SMF. I'm not sure yet. There are other mods though that do do the same thing or almost the same. I will be looking closer at this mod soon to see if I can update it.
Quote from: Bigguy on March 04, 2022, 10:51:02 AMThis mod may not get an update for the 2.1.x series of SMF. I'm not sure yet. There are other mods though that do do the same thing or almost the same. I will be looking closer at this mod soon to see if I can update it.
Thanks for the reply Bigguy. Yes there is one that does 'Replace Board Title With Image' but it's not been updated to work on 2.1.1., I have tested it but get errors. As far as I can see, the FA mod only works with FA icons. I have a whole load of icons I used in the SMF2.0 version of 'Images On Board' but that's not been updated either.
So we'll have to wait ;)
Quote from: Bigguy on March 04, 2022, 10:51:02 AMThis mod may not get an update for the 2.1.x series of SMF. I'm not sure yet. There are other mods though that do do the same thing or almost the same. I will be looking closer at this mod soon to see if I can update it.
As far as i'm aware all the other mods don't work with 2.1 they are throwing up errors. This is the only one that work.
https://custom.simplemachines.org/index.php?mod=4224 i don't know but i don't think you can upload your own icons with this you only select from what's available on the site.
Hi,
SMF 2.1 Board Icon Mod CSS Sprite mod adapted for SMF 2.1
You need to make detailed adjustments, but it is successful.
https://smf.konusal.com/index.php?topic=592.0
1.png
board-edit.png
mod-set.png
sprite.png
icon path: /Themes/default/images/snrjicon.png
Quote from: gevv on March 04, 2022, 01:00:41 PMHi,
SMF 2.1 Board Icon Mod CSS Sprite mod adapted for SMF 2.1
You need to make detailed adjustments, but it is successful.
https://smf.konusal.com/index.php?topic=592.0
1.png
board-edit.png
mod-set.png
sprite.png
icon path: /Themes/default/images/snrjicon.png
The mod installed no errors so you upload the files somewhere what site do you upload them to i see a lot of css sprites generator sites. Sorry if i'm confused but most of the writing in the video isn't in english.
I'm using the FA Board Icons mod in the interim but it's very much not equivalent to this mod. The icon selection is extremely limited and is missing many icons that I'd want to use.
I'll continue to subscribe to notifications on this mod and cross my fingers that it gets updated for SMF 2.1.1
Quote from: Dave J on March 04, 2022, 11:22:04 AMAs far as I can see, the FA mod only works with FA icons. I have a whole load of icons
ALthough it only works with Fa icons to start with, I posted how to add additional icon sets into the support thread... (for example, I use the star wars glyphs icon set within the that mod for my test site at the moment.)
Quote from: Kindred on March 04, 2022, 02:13:28 PMQuote from: Dave J on March 04, 2022, 11:22:04 AMAs far as I can see, the FA mod only works with FA icons. I have a whole load of icons
ALthough it only works with Fa icons to start with, I posted how to add additional icon sets into the support thread... (for example, I use the star wars glyphs icon set within the that mod for my test site at the moment.)
Thanks Kindred I'll look into that
Quote from: gevv on March 04, 2022, 01:00:41 PMHi,
SMF 2.1 Board Icon Mod CSS Sprite mod adapted for SMF 2.1
You need to make detailed adjustments, but it is successful.
https://smf.konusal.com/index.php?topic=592.0
1.png
board-edit.png
mod-set.png
sprite.png
icon path: /Themes/default/images/snrjicon.png
So i've been still testing this and notice some problems one is i see that there is a file Konusal-BoardIcons.english.php
But yet when in the modify board the text isn't in english it's probably Turkish. Also under the modify boards in the field boxes where you enter the background codes i can no longer remove them once i press save they stay there and don't go blank. I still haven't figured how to work this.
@KittyGalore I tried to prepare a simple explanation. I hope it helps (my english is not good, lots of pictures :) )
1 Mod updated install new version (thanks
@Snrj )
2 Prepare your icons (64x64)
3 Upload all icons https://www.toptal.com/developers/css/sprite-generator/ (Align elements: Top-down)
4 Save icon file as snrjicon.png and put it in images folder
5 Edit boards
Sample CSS General Discussion Icon New Posts: background-position: 0px -54px;
Icon No Post: background-position: 0px -5px;
Board-2 Icon New Posts: background-position: 0 -154px;
Icon No Post: background-position: 0px -104px;
Board-3 Icon New Posts: background-position: 0 -274px;
Icon No Post: ground-position: 0 -204px;
SubBoard Icon New Posts: ground-position: 0 -254px;
Subb-1Icon New Posts: background-position: 0px -404px;
Icon No Post: background-position: 0px -354px;
The values are increasing. You can continue with this example
nopost.png
newpost.png
home-subbnewpost.png
board-subb-nopost.png
board-subb-newpost.png
Quote from: gevv on March 06, 2022, 03:02:58 AM@KittyGalore I tried to prepare a simple explanation. I hope it helps (my english is not good, lots of pictures :) )
1 Mod updated install new version (thanks @Snrj )
2 Prepare your icons (64x64)
3 Upload all icons https://www.toptal.com/developers/css/sprite-generator/ (Align elements: Top-down)
4 Save icon file as snrjicon.png and put it in images folder
5 Edit boards
Sample CSS
General Discussion
Icon New Posts: background-position: 0px -54px;
Icon No Post: background-position: 0px -5px;
Board-2
Icon New Posts: background-position: 0 -154px;
Icon No Post: background-position: 0px -104px;
Board-3
Icon New Posts: background-position: 0 -274px;
Icon No Post: ground-position: 0 -204px;
SubBoard Icon New Posts: ground-position: 0 -254px;
Subb-1
Icon New Posts: background-position: 0px -404px;
Icon No Post: background-position: 0px -354px;
The values are increasing. You can continue with this example
nopost.png
newpost.png
home-subbnewpost.png
board-subb-nopost.png
board-subb-newpost.png
Thank you the new update to the mod and everything has worked perfect i managed to get the icons i wanted working. I know English isn't your language so i appreciate the time you took to spent trying to translate and explain everything clearly. Thank you. :)
Are the recent messages here a new/updated version of this mod? Or do I have to hack and slash my way in the code to make this work for 2.1.2?
Thank you!
The latter, or you could use this other mod if you think is a decent alternative: https://custom.simplemachines.org/index.php?mod=4224
Quote from: Senkusha on June 23, 2022, 01:52:14 PMOr do I have to hack and slash my way in the code to make this work for 2.1.2
This mod is not working with the current version of SMF. If/when I have time I will look into it. Sorry for any inconvenience.
I shall eagerly await for this. :) Thank you for your work!
2.1 board icons are all done with CSS, so if you know how to write basic CSS you can do custom board icons quite easily. It's just a matter of adding calls for your own icons by board ID. No template hacking or hooks are necessary.
Oh, that's good to know! Time to learn some basic CSS, I guess. :)
you could adapt it to 2.1.4