Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default whos online location move

    I would like to get rid of this sidebox due to clutter but, I still want use the whos online information on the pages. I want to possiby have it show below the copyright in just words with no box. How would I do this?

    Thanks,
    Chad

  2. #2
    Join Date
    Mar 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: whos online location move

    You'll need to copy some of the code from

    /includes/modules/sideboxes/whos_online.php
    to your /includes/templates/YOUR TEMPLATE/common/ tpl_footer.php file

    give this a shot

    Code:
    <!---Chunk for attempting who's online in the footer--->
    
    <?php
      $n_guests = 0;
      $n_members = 0;
    
    // Set expiration time, default is 1200 secs (20 mins)
    
      $xx_mins_ago = (time() - 1200);
    
      $db->Execute("delete from " . TABLE_WHOS_ONLINE . " where time_last_click < '" . $xx_mins_ago . "'");
    
      $whos_online_query = $db->Execute("select customer_id from " . TABLE_WHOS_ONLINE);
    
      while (!$whos_online_query->EOF) {
        if (!$whos_online_query->fields['customer_id'] == 0) $n_members++;
        if ($whos_online_query->fields['customer_id'] == 0) $n_guests++;
        $user_total = sprintf($whos_online_query->RecordCount());
        $whos_online_query->MoveNext();
      }
    
      if ($user_total == 1) {
        $there_is_are = BOX_WHOS_ONLINE_THEREIS . '&nbsp;';
      } else {
       $there_is_are = BOX_WHOS_ONLINE_THEREARE . '&nbsp;';
      }
    
      if ($n_guests == 1) {
        $word_guest = '&nbsp;' . BOX_WHOS_ONLINE_GUEST;
      } else {
        $word_guest = '&nbsp;' . BOX_WHOS_ONLINE_GUESTS;
      }
      if ($n_members == 1) {
        $word_member = '&nbsp;' . BOX_WHOS_ONLINE_MEMBER;
      } else {
        $word_member = '&nbsp;' . BOX_WHOS_ONLINE_MEMBERS;
      }
    
      if (($n_guests >= 1) && ($n_members >= 1)) { 
        $word_and = '&nbsp;' . BOX_WHOS_ONLINE_AND . '&nbsp;<br />';
      } else {
        $word_and = "";
      }
    
    
      $textstring = $there_is_are;
      if ($n_guests >= 1) $textstring .= $n_guests . $word_guest;
      $textstring .= $word_and;
      if ($n_members >= 1) $textstring .= $n_members . $word_member;
      $textstring .= '&nbsp;' . BOX_WHOS_ONLINE_ONLINE;
      $whos_online[] = $textstring;
    ?>
    <div id="whos_online_footer"><?php echo $textstring; ?></div>
    
    <!--End Chunk--->
    I put it after
    <!--eof-ip address display -->
    so it shows up after the IP but before the copyright.
    I got rid of the checking stuff, so it should stay on even if you turn the sidebox off. I'd still make a backup mind you...

  3. #3
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default Re: whos online location move

    Thankl you so much!!!! I have posted this awhile back with no responce. I also added the:
    Code:
    You will also want to add stuff to your stylesheet.css file
    
    #whos_online_footer{
    text-align: center;
    }
    to my stylesheet and it works great!! Thanks again

  4. #4
    Join Date
    Mar 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: whos online location move

    Whoops! Yeah, forgot to add the stylesheet stuff to my previous post.

 

 

Similar Threads

  1. Disable Whos Online?
    By hey_you in forum General Questions
    Replies: 2
    Last Post: 19 Aug 2011, 02:16 AM
  2. Change whos online
    By Wilkesy in forum General Questions
    Replies: 0
    Last Post: 20 May 2008, 10:26 PM
  3. Whos Online Questions
    By keystonewebworks in forum General Questions
    Replies: 2
    Last Post: 3 Mar 2008, 12:16 PM
  4. whos online
    By oxicottin in forum General Questions
    Replies: 0
    Last Post: 7 May 2007, 04:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg