SimplePortal
Customization => Custom Coding => Topic started by: GVALFER on March 09, 2011, 06:21:20 PM
-
As extend the last block to the full width the page?
My last block is the Who's Online, I wanted to put this block to the full width of the page, as I do that?
-
this has already been asked and solved here by me
http://simpleportal.net/index.php?topic=7720.0
-
you not understend.
please see:
(http://img508.imageshack.us/img508/3782/trtoe.png)
-
try this in php block
global $txt, $modSettings, $scripturl, $context, $sourcedir;
// Get the user online list.
require_once($sourcedir . '/Subs-MembersOnline.php');
$membersOnlineOptions = array(
'show_hidden' => allowedTo('moderate_forum'),
'sort' => 'log_time',
'reverse_sort' => true,
);
$context += getMembersOnlineStats($membersOnlineOptions);
// "Users online" - in order of activity.
echo '
<div class="infocenter_section">
<div class="windowbg">
<div class="windowbg2 sectionbody">
', $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>' : '', '
<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?
global $context, $settings;
$context['membergroups'] = cache_quick_get('membergroup_list', 'Subs-Membergroups.php', 'cache_getMembergroupList', array());
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</div>
<hr />
<div class="smalltext">
', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</div></div>
</div>
</div>
</div>';
-
what is the file?
-
GVALFER,
Your not manipulating a file. All you need to do is go to your admin section then simple portal, create a new bottom block, make sure it's a custom php block, then paste the code in there...that's all you need to do.
-
you not understend :( please see image
(http://img508.imageshack.us/img508/3782/trtoe.png)
-
ok first off
the code i gave you was for you to try to see if it would do the same if so its your theme so you would need to talk to who ever made it