Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Archive > Modifying the Who's Online Content Box
Mottie (SuperAdmin) 4/10/2009 6:46 PM EST : Modifying the Who's Online Content Box
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Modifying the Who's Online Content Box

GuildPortal admin site link to original post

Online Box
(no icons)
Online Box
(w/ icons)

The Code
<script type="text/javascript">
$(document).ready(function() {
 var findOnlineBox = "Online";
 var includeMailIcon = true;

// ********************************
// Don't change anything below this line
// ********************************
 $('.ContentBox').each(function(){
  var bx = $(this);
  if ($(this).find('.ContentBoxTitle').text().match(findOnlineBox)){
   bx.find('.ContentTable').parent().prepend("<div id='onlineList'></div>");
   var newbx = bx.find("#onlineList");
   var txt = '';
   bx.find('.ContentTable').css('display','none').find('tr').each(function(){
       var tmp = $(this).find('td:eq(0) img').attr('alt').replace(/Send/,'').replace(/ a private message/,'');
    if (includeMailIcon){
     $(this).find('td:eq(0) a').append(tmp);
    } else {
     $(this).find('td:eq(0) a').html(tmp);
    }
    txt += $(this).find('td:eq(0)').html().replace(/&nbsp;/,'') + ', ';
   })
   newbx.html(txt.substring(0,txt.length-2));
  }
 })
})
</script>
Customizing the Code
  • Change the variable to match the title you have on your "Who's Online" content box.

    var findOnlineBox = "Online";

  • Include the mail icon with the name by setting the "includeMailIcon" variable to true

     var includeMailIcon = true;

  • Add the code to your header HTML, footer, or to any available Free Form Text/HTML box on the page where you have your "Who's Online" box.


This topic was moved from forum Instructions to forum Archive on 4/24/2009 1:25 AM by Mottie.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

RedRydur (Member) 4/23/2009 6:08 PM EST : RE: Modifying the Who's Online Content Box
RedRydur
Posts: 1065

0
Like

0
Dislike

I couldn't get this to work in the footer.... but I checked the who's online options and you can set it to do comma deliminated.
---------------------------------------------
-
RedRydur the Pure
TopBottom

Mottie (SuperAdmin) 4/24/2009 1:25 AM EST : RE: Modifying the Who's Online Content Box
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Hi RedRydur!

LOL thanks for the find.... I'll archive this one
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%