a few aesthetics related questions

Started by anunlike, March 07, 2005, 03:26:47 PM

Previous topic - Next topic

anunlike

Hi. I've got a few questions that, basically, if answered, would just change the aesthetics of my forums. As such, they're not very important, but would make it better looking / more convenient.

I'm a newbie to SMF and this kind of thing, in general, so I probably need to be walked through some of these.


1) How would I go about moving only specific parts of the 'Info Center' that's at the bottom to the top- above the "expanded stuff" (the USER INFO, NEWS BOX, KEY STATS boxes; the Search (box); and the various buttons directly underneath (everything above where the original horizontal rule is)), but below my title banner/graphic? I'd really like to move only the 'Recent Posts' & 'Users Online' up to the top (but keep everything else where they are) so that whoever visits can get quickly view these without needing to scroll down to the bottom.

Actually, now that I think about it, I don't need the 'Forum Stats' at all since the information presented there is listed in other areas. How would I go about removing that?


2) How would I go about making the Child Board listings on the board index to be listed vertically, instead of horizontally? That is, how could I get them listed on top of each other instead of in a row seperated by commas?

I found Another question on child boards and i'm referring to:
Quote from: [Unknown]
Parent Board          ##     ##     Last post
   Child Board        ##     ##     Last post
   Child Board        ##     ##     Last post


3) How (where) would I change 'Users OnLine Today' to 'Users Online Today', which came from the OnLine Users Today package?

As the 'Users Online' is with the lowercase L, I was just wanting to make things consistent.


I'd very much appreciate the help!

Thanks much!

Louis (CSpotkill)

I don't have time to type out everything exactly, but I'll try to give some pointers in the right direction, maybe you can take it from here ...

Search for // This is the "Recent Posts" bar. in Themes/default/BoardIndex.template.php - that's where the Recent Posts bar is. I'm not sure if you can move it above the collapse, because the heading is on every page (and stored in index.template.php) while the stuff you're talking about is only on BoardIndex by default. It might work, I've never tried it ...

To hide the bottom statistics, uncheck SP1-style statistics in the current theme options. (I'm pretty sure that'll fix it.)
My SMF Mods:

anunlike

QuoteTo hide the bottom statistics, uncheck SP1-style statistics in the current theme options. (I'm pretty sure that'll fix it.)
Yeah, I knew that, but then it puts the same statistics right above the main board on the right side, which I'd very much not want to have.


QuoteSearch for // This is the "Recent Posts" bar. in Themes/default/BoardIndex.template.php - that's . . .
Tried, but not getting anywhere. I'll prob keep it at BoardIndex.template.php.


Thanks so far.


May I move this or have someone else move this to "Graphics and Templates"? I suppose it should've gone there originally and I'd prob get better assistance.

A.M.A

1. It would be difficult to accomplish and will slow down the forum because you are moving parts from another location to the index page which will be shown everywhere causing extra query to be executed.
So it is best to move the parts you need just in the beginning of board index. I'm sure I've mentioned how to move some parts up there .. just forget where .. but if you find difficulties moving any I'll show you how.


2. in Boardindex.template.php look for:
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 '
<div style="padding-top: 1px;" class="smalltext"><i>', $txt['parent_boards'], ': ', implode(', ', $children), '</i></div>';
}

replace with:
foreach ($board['children'] as $child)
{
echo '
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="33%" class="smalltext"><b><a href="' . $child['href'] . '">' . $child['name'] . '</a></b></td>
    <td width="33%" class="smalltext">' , $child['posts'],  ' ' , $txt[21], ' ', $txt['smf88'], ' ' , $child['topics'], ' ' , $txt[330], '</td>
    <td width="34%" class="smalltext">', $child['last_post']['link'], '</td>
  </tr>
</table>';

}
}


3. I would suggested asking the Mod author on how to do this.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

anunlike

I appreciate the help. Thanks much.


Quote3. I would suggested asking the Mod author on how to do this.
Actually, I found where to go to change this.

Modifications.english.php  >>

//OnLine Users Today
$txt['158bis'] = 'Users Online Today';
$txt['smf_stats_14bis'] = 'Users Online Today';

I forgot which one of these two to change. It's one of them, though (whichever has the 'L' ;))

anunlike

#5
I have tried and tried to move the Info Center up to the top and under the News Scroller, but I've had no luck.

I'm using DefaultXT theme and it contains the javascript for expanding and collapsing the headers. I think this is why I'm having so much trouble with it.

I found: http://www.simplemachines.org/community/index.php?topic=25159.0
but am not having any luck with it.

It's probably just a few minor changes that I need to make with the original Info Center code, but I don't know how to do it.

here's my code:

// defaultXT Theme mod. (collapse)...................
echo '
<script language="JavaScript" type="text/javascript"><!--
function setcookie(name, value, expire)
{
var theDate = new Date();
theDate.setTime(expire);

if (expire)
document.cookie = name + "=" + escape(value) + "; expires=" + theDate.toGMTString();
else
document.cookie = name + "=" + escape(value);
}
function getcookie(name)
{
var cookies = document.cookie.split(/[;][ ]?/), temp;

for (var i = 0; i < cookies.length; i++)
{
temp = cookies[i].split("=");
if (temp[0] == name)
return temp[1];
}
return typeof(undefined) != "undefined" ? undefined : 0;
}

function boardIndexCollapse(what)
{
var collapseImage = document.getElementById("collapse_" + what);
var collapseRow = document.getElementById("row_" + what);

if (!collapseImage)
return;

if (collapseRow.style.display == "")
{
collapseRow.style.display = "none";
collapseImage.src = smf_images_url + "/expand.gif";

setcookie("xtBI_" + what, "1", new Date().getTime() + 525600 * 60);
}
else
{
collapseRow.style.display = "";
collapseImage.src = smf_images_url + "/collapse.gif";

setcookie("xtBI_" + what, "0", new Date());
}
}

function boardIndexCheck()
{
var bars = ["recent", "calendar", "members", "sp1", "users", "pm", "userson", "messages", "login"];

for (var i = 0; i < bars.length; i++)
{
if (getcookie("xtBI_" + bars[i]) == "1")
boardIndexCollapse(bars[i]);
}
}
// --></script>';

// Here's where the "Info Center" starts...
if ($context['user']['is_logged'])
echo '
<br />
<div class="bordercolor" color="#5C3317" style="padding: 3px; margin-left: 40px; margin-right: 40px; margin-top: 0px"><table border="0" width="100%" cellspacing="0" cellpadding="4">
<tr class="titlebg">
<td align="center" colspan="2;"><b>', $txt[685], '</b></td>
</tr>';

// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="catbg" colspan="2" align="center"><a href="javascript:boardIndexCollapse(\'recent\');"><img src="', $settings['images_url'], '/collapse.gif" alt="" border="0" id="collapse_recent" /></a>', $txt[214], '</td>
</tr>
<tr id="row_recent">
<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], '" border="0" /></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. (it's id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table 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 align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], ']</td>
<td valign="top">', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '</td>
<td align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}

// "Users online" - in order of activity.
if ($context['user']['is_logged'])
echo '
<tr>
<td class="catbg" colspan="2" align="center" style="font-family: verdana, arial, sans-serif; color: #ffffff"><a href="javascript:boardIndexCollapse(\'users\');"><img src="', $settings['images_url'], '/collapse.gif" alt="" border="0" id="collapse_users" />', $txt[158], '</a>

<div class="smalltext"> <b>·</b> ', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ' 
<b> ·</b>', $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'],'
',(empty($context['num_users_hidden']) ? '' : ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')'), '
<b> : </b>', $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddylist_buddy'] : $txt['buddylist_buddies'],'</td>

</tr><tr id="row_users">
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=who">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">

<span 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>' : '', '
</span>
</td>
</tr>';

   // "Users online Today"
if ($context['user']['is_logged'])
   echo '
   <tr>
<td class="catbg" colspan="2" align="center" style="font-family: verdana, arial, sans-serif; color: #ffffff"> <a href="javascript:boardIndexCollapse(\'userson\');"> <img src="', $settings['images_url'], '/collapse.gif" alt="" border="0" id="collapse_userson"  />', $txt['158bis'], '</a>

<div class="smalltext"><b>·</b>', $context['num_users_today'], ' ', $context['num_users_today'] == 1 ? $txt['user'] : $txt['users'], '</td>


   </tr><tr id="row_userson">
      <td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['158bis'], '" border="0" /></td>
      <td class="windowbg2" width="100%"><span class="smalltext">', $context['user_today'], '</span></td>
   </tr>';

// Show information about events, birthdays, and holidays on the calendar.
if ($context['user']['is_logged'] && ($context['show_calendar']))
{
echo '
<tr>
<td class="catbg" colspan="2" align="center" style="font-family: verdana, arial, sans-serif"><a href="javascript:boardIndexCollapse(\'calendar\');"><img src="', $settings['images_url'], '/collapse.gif" alt="" border="0" id="collapse_calendar" />', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</a></td>
</tr><tr id="row_calendar">
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=calendar">
<img src="', $settings['images_url'], '/icons/calendar.gif" width="20" alt="', $txt['calendar24'], '" border="0" /></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> ' : '', '<a href="', $event['href'], '">', $event['is_today'] ? '<b>' . $event['title'] . '</b>' : $event['title'], '</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>';
}
echo'
</table></div>
<script language="JavaScript" type="text/javascript"><!--
setTimeout("boardIndexCheck()", 80);
// --></script>';
}

?>



Thanks again.

A.M.A

in Boardindex.template.php find:
// defaultXT Theme mod. (collapse)...................
echo '
<script language="JavaScript" type="text/javascript"><!--
function setcookie(name, value, expire)
{
var theDate = new Date();
theDate.setTime(expire);

if (expire)
document.cookie = name + "=" + escape(value) + "; expires=" + theDate.toGMTString();
else
document.cookie = name + "=" + escape(value);
}
function getcookie(name)
{
var cookies = document.cookie.split(/[;][ ]?/), temp;

for (var i = 0; i < cookies.length; i++)
{
temp = cookies[i].split("=");
if (temp[0] == name)
return temp[1];
}
return typeof(undefined) != "undefined" ? undefined : 0;
}

function boardIndexCollapse(what)
{
var collapseImage = document.getElementById("collapse_" + what);
var collapseRow = document.getElementById("row_" + what);

if (!collapseImage)
return;

if (collapseRow.style.display == "")
{
collapseRow.style.display = "none";
collapseImage.src = smf_images_url + "/expand1.gif";

setcookie("xtBI_" + what, "1", new Date().getTime() + 525600 * 60);
}
else
{
collapseRow.style.display = "";
collapseImage.src = smf_images_url + "/collapse1.gif";

setcookie("xtBI_" + what, "0", new Date());
}
}

function boardIndexCheck()
{
var bars = ["recent", "calendar", "members", "sp1", "users", "pm", "login"];

for (var i = 0; i < bars.length; i++)
{
if (getcookie("xtBI_" + bars[i]) == "1")
boardIndexCollapse(bars[i]);
}
}
// --></script>';

// Here's where the "Info Center" starts...
echo '
<br />
<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="4">
<tr class="titlebg">
<td align="center" colspan="2">', $txt[685], '</td>
</tr>';

// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="catbg" colspan="2"><a href="javascript:boardIndexCollapse(\'recent\');"><img src="', $settings['images_url'], '/collapse1.gif" alt="" border="0" id="collapse_recent" /></a>', $txt[214], '</td>
</tr>
<tr id="row_recent">
<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], '" border="0" /></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. (it's id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table width="100%" border="0" style="background-image: url(', $settings['images_url'], '/newsDXT.gif); background-repeat: no-repeat;">';
/* 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 align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], ']</td>
<td valign="top">', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '</td>
<td 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="catbg" colspan="2"><a href="javascript:boardIndexCollapse(\'calendar\');"><img src="', $settings['images_url'], '/collapse1.gif" alt="" border="0" id="collapse_calendar" /></a>', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</td>
</tr><tr id="row_calendar">
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=calendar">
<img src="', $settings['images_url'], '/icons/calendar.gif" width="20" alt="', $txt['calendar24'], '" border="0" /></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> ' : '', '<a href="', $event['href'], '">', $event['is_today'] ? '<b>' . $event['title'] . '</b>' : $event['title'], '</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 a member bar.  Not heavily ornate, but functional at least.
if ($settings['show_member_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2"><a href="javascript:boardIndexCollapse(\'members\');"><img src="', $settings['images_url'], '/collapse1.gif" alt="" border="0" id="collapse_members" /></a>', $txt[331], '</td>
</tr>
<tr id="row_members">
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=mlist">
<img src="', $settings['images_url'], '/icons/members.gif" width="20" alt="', $txt[332], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
<b><a href="', $scripturl, '?action=mlist">', $txt[332], '</a></b>
<div class="smalltext">', $txt[200], '</div>
</td>
</tr>';
}

// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2"><a href="javascript:boardIndexCollapse(\'sp1\');"><img src="', $settings['images_url'], '/collapse1.gif" alt="" border="0" id="collapse_sp1" /></a>', $txt[645], '</td>
</tr>
<tr id="row_sp1">
<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], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
<table border="0" width="90%"><tr>
<td class="smalltext">
<div style="float: left; width: 50%;">', $txt[490], ': <b>', $modSettings['totalTopics'], '</b></div>', $txt[489], ': <b>', $modSettings['totalMessages'], '</b><br />', !empty($context['latest_post']) ? '
' . $txt[659] . ': &quot;' . $context['latest_post']['link'] . '&quot;  (' . $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>' : '', '
</td>
<td width="32%" class="smalltext" valign="top">
', $txt[488], ': <b><a href="', $scripturl, '?action=mlist">', $modSettings['memberCount'], '</a></b><br />
', $txt[656], ': <b>', $context['latest_member']['link'], '</b><br />';
// If they are logged in, show their unread message count, etc..
if ($context['user']['is_logged'])
echo '
', $txt['smf199'], ': <b><a href="', $scripturl, '?action=pm">', $context['user']['messages'], '</a></b> ', $txt['newmessages3'], ': <b><a href="', $scripturl, '?action=pm">', $context['user']['unread_messages'], '</a></b>';
echo '
</td>
</tr></table>
</td>
</tr>';
}

// "Users online" - in order of activity.
echo '
<tr>
<td class="catbg" colspan="2"><a href="javascript:boardIndexCollapse(\'users\');"><img src="', $settings['images_url'], '/collapse1.gif" alt="" border="0" id="collapse_users" /></a>', $txt[158], '</td>
</tr><tr id="row_users">
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=who">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
<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'], (empty($context['num_users_hidden']) ? '' : ' (' . $context['num_users_hidden'] . ' ' . $txt['hidden'] . ')'), '</a><br />
<span 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>' : '', '
</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="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=pm">
<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" /></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="catbg" 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], '" border="0" /></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>
<script language="JavaScript" type="text/javascript"><!--
setTimeout("boardIndexCheck()", 80);
// --></script>';

CUT it and move it just above:
/* Each category in categories is made up of:
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

anunlike

Thank you, A.M.A.

I had been cuting and pasting over and over right in that spot. But, it appears that all I needed to do was leave the very last '}' off when moving it. It looks and works perfect now.

TarantinoArchives

look what I made of it:

www.tarantino.info/forum

but, I'd like to include who the moderator is of the specific child board

name of child board              moderator            last post

currently, my code there looks like this:

// 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();

  echo'           
<table border="0" cellpadding="0" cellspacing="0" width="80%" style="margin-left:20px; margin-top:2px; border: 1px gray; border-style: dashed; padding: 2px;">
  <tr>
     <td class="smalltext"><i>Child Boards:</i></td>
     <td class="smalltext"><i>Last post:</i></td>
  </tr>';

          /* 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)
               {
               echo '<tr>
    <td width="40%" class="smalltext"><b><a href="' . $child['href'] . '">' . $child['name'] . '</a></b></td>
    <td width="60%" class="smalltext">', $child['last_post']['link'], '</td></tr>';
               }
echo'</table>';
            }




wo how would I insert the name of the moderator in a TD just between the one that shows the board name and the one that shows the last post?

thanks in advance

TarantinoArchives

got another question (also here). right now i have:

Quote
  echo'           
<table border="0" cellpadding="0" cellspacing="0" width="90%" style="margin-left:20px; margin-top:2px; border: 1px gray; border-style: dashed; padding: 2px;">
  <tr>
     <td class="smalltext"><i>Child Boards:</i></td>
     <td class="smalltext"><i>Last post:</i></td>
     <td class="smalltext"><i>Moderator(s):</i></td>
  </tr>';

/* 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)
               {
               echo '<tr>
    <td width="30%" class="smalltext"><b><a href="' . $child['href'] . '">' . $child['name'] . '</a></b></td>
    <td width="40%" class="smalltext">', $child['last_post']['link'], '</td></tr>
    <td width="30%" class="smalltext">';
if (!empty($child['moderators']))
               echo '<i>', $board['link_moderators'], '</i>
</td>
</tr>';

what's giving me trouble is the BOLD RED  thing. i want the moderators of the respective child boards to be shown. what variable/array is it? the way it is right now it doesnt work

TarantinoArchives

can somebody tell me how i can call the moderator of the child board?

[Unknown]

I'm afraid that information isn't loaded either.

-[Unknown]

TarantinoArchives

so basically i am screwed? no way out?

Advertisement: