SimplePortal

Customization => Custom Coding => Topic started by: GVALFER on March 09, 2011, 06:21:20 PM

Title: [HELP] Block - Who's Online
Post 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?
Title: Re: [HELP] Block - Who's Online
Post by: Ares on March 10, 2011, 04:53:00 AM
this has already been asked and solved here by me
http://simpleportal.net/index.php?topic=7720.0
Title: Re: [HELP] Block - Who's Online
Post by: GVALFER on March 10, 2011, 05:33:05 PM
you not understend.
please see:

(http://img508.imageshack.us/img508/3782/trtoe.png)
Title: Re: [HELP] Block - Who's Online
Post by: Ares on March 10, 2011, 07:12:23 PM
try this in php block
Code: [Select]
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(']&nbsp;&nbsp;[', $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>';
Title: Re: [HELP] Block - Who's Online
Post by: GVALFER on March 11, 2011, 07:05:43 AM
what is the file?
Title: Re: [HELP] Block - Who's Online
Post by: tombillings on March 11, 2011, 07:09:35 AM
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.
Title: Re: [HELP] Block - Who's Online
Post by: GVALFER on March 11, 2011, 01:15:42 PM
you not understend :( please see image
(http://img508.imageshack.us/img508/3782/trtoe.png)
Title: Re: [HELP] Block - Who's Online
Post by: Ares on March 13, 2011, 06:03:14 PM
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
SimplePortal 2.3.8 © 2008-2024, SimplePortal