online user statics

View previous topic View next topic Go down

online user statics Empty online user statics

Post by _Twisted_Mods_ 1/24/2015, 7:20 pm

_Twisted_Mods_
_Twisted_Mods_
Founder
Founder

Posts : 101
Reputation : 3
Birthday : 1986-08-05
Join date : 2014-10-03
Age : 37
Location : USA

online users box like the on i have here on the homepage

goto

acp>display>templates>index_body

replace


Code:
<!-- BEGIN disable_viewonline -->
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
   <tr>
      <td class="catHead" colspan="2" height="28">
      <!-- BEGIN switch_viewonline_link -->
 
     <span class="cattitle"><a class="cattitle"
href="{U_VIEWONLINE}"
rel="nofollow">{L_WHO_IS_ONLINE}</a></span>
      <!-- END switch_viewonline_link -->

      <!-- BEGIN switch_viewonline_nolink -->
      <span class="cattitle">{L_WHO_IS_ONLINE}</span>
      <!-- END switch_viewonline_nolink -->
      </td>
   </tr>
   <tr>
 
     <td class="row1" rowspan="6" align="center"
valign="middle"><img src="{L_ONLINE_IMG}" id="i_whosonline"
alt="{L_WHO_IS_ONLINE}" /></td>
      <td class="row1" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />
      {TOTAL_USERS}<br />
      {NEWEST_USER}</span></td>
   </tr>
   <tr>
      <td class="row1"><span class="gensmall">{TOTAL_USERS_ONLINE}<br />
      {RECORD_USERS}<br />
      <br />
      {LOGGED_IN_USER_LIST}</span></td>
   </tr>
   {L_CONNECTED_MEMBERS}
   {L_WHOSBIRTHDAY_TODAY}
   {L_WHOSBIRTHDAY_WEEK}
   <tr>
      <td class="row1"><span class="gensmall">{LEGEND}&nbsp;:&nbsp;{GROUP_LEGEND}</span></td>
   </tr>
   <!-- BEGIN switch_chatbox_activate -->
   <tr>
      <td class="row1">
         <span class="gensmall">{TOTAL_CHATTERS_ONLINE}&nbsp;:&nbsp; {CHATTERS_LIST}<br />
            <!-- BEGIN switch_chatbox_popup -->
            <div id="chatbox_popup"></div>
            <script type="text/javascript">
            //<![CDATA[
 
         
 insertChatBoxPopup('{disable_viewonline.switch_chatbox_activate.switch_chatbox_popup.U_FRAME_CHATBOX}',
 '{L_CLICK_TO_JOIN_CHAT}');
            //]]>
            </script>
            <!-- END switch_chatbox_popup -->
         </span>
      </td>
   </tr>
   <!-- END switch_chatbox_activate -->
</table>
<!-- END disable_viewonline -->

with



Code:
<!-- BEGIN disable_viewonline -->
<table Id="onlineuserst">

<tr>
<th>Total Post</th>
<th>Total Online Users</th>
</tr>


<tr>
<div class=tbfontsize>
<td align="center">{TOTAL_POSTS}</td>
<td align="center">{TOTAL_USERS_ONLINE}</td>
</div>
</tr>


<tr>
<th>Total Users</th>
<th>Online Registered Users</th>
</tr>


<tr>
<div class=tbfontsize>
  <td align="center">{TOTAL_USERS}</td></div>
<td rowspan="3"><div class=scrollable>{LOGGED_IN_USER_LIST}</div></td>

</tr>


<tr>
<th>Newest User</th>
</tr>


<tr>
<div class=tbfontsize>
<td align="center">{NEWEST_USER}</td>
</div>
</tr>


<tr>
<div class=tbfontsize>
<td colspan="2"><span class="gensmall"><center><span id="groupLegend">{GROUP_LEGEND}</span></center></span></td>
</div>
</tr>


 <script type="text/javascript">(function() {
                      var who = document.getElementById('onlineuserst');
 
                     who.innerHTML = who.innerHTML.replace(/(\Registered
 Users: )/,'').replace(/In total there is
<strong>\d+<\/strong> (users) online :: /,'').replace(/In
total there is <strong>\d+<\/strong> (user) online ::
/,'').replace(new RegExp('Our users have posted a total of '),
'').replace(new RegExp('We have '), '').replace(/(\The newest registered
 user is )/,'').replace(/(\d+ Registered)/,'<span
class="users1">$1</span>').replace(/(\d+ Hidden)/,'<span
class="users2">$1</span>').replace(/(\d+ Guests)/,'<span
class="users3">$1</span>');
                    })();</script>



</table>
<!-- END disable_viewonline -->

then goto

acp>display>pictures&colors>colors>css

and add

Code:   Select Content
Code:
/* online users bottom of homepage */
div.scrollable {
    width: 280px;
    height: 70px;
    margin: 0;
    padding-left: 15;
    overflow: auto;
      font-size: 75%;
  color:blue;}


#onlineuserst { font-size:75%; }
#onlineuserst td{
clear: both;
    border: 2px solid black; !important
   font-size: small !important;
}
.users1{color: green;}
.users2{color: #0099FF;}
.users3{color: red;}
/*_________________END_OF_ONLINEUSERS____________*/

Back to top Go down

online user statics Empty Re: online user statics

Post by Guest 1/25/2015, 1:00 pm

avatar
Guest
Guest


Implemented and styled. Thanks for the code, _Twisted_Mods_. That worked like a dream!

Blending _Twisted_Mod_'s and Ange Tuteur's tutorial (http://help.forumotion.com/t136323-modify-the-brackets-on-the-group-legend#919431) together, the following stylish result can be achieved in phpBB3 (Dutch): http://prntscr.com/5y0fnw

phpbb3


index_body template partial replacement involved:

Code:
<!-- BEGIN disable_viewonline -->
<center>
<table Id="onlineuserst">

<tr>
<th><font color=#FA8A16>Aantal Berichten op Friendcodes</font></th>
<th><font color=#FA8A16>Aantal Online Gebruikers</font></th>
</tr>


<tr>
<div class=tbfontsize>
<td align="center">{TOTAL_POSTS}</td>
<td align="center">{TOTAL_USERS_ONLINE}</td>
</div>
</tr>

  

<tr>
<br>
<th><font color=#FA8A16>Aantal Leden op Friendcodes</font></th>
<th><font color=#FA8A16>Online Leden</font></th>
</tr>


<tr>
<div class=tbfontsize>
<td align="center">{TOTAL_USERS}</td></div>
  <td rowspan="3"><img src="http://i38.servimg.com/u/f38/19/05/73/25/fcicon10.png" style="width:25px;height:25px"><b><font size="4em"><a href="http://www.friendcodes.nl">riendcodes</a></font></b><div class=scrollable>{LOGGED_IN_USER_LIST}</div></td>

</tr>


<tr>
<th><font color=#FA8A16>Nieuwste Lid</font></th>
</tr>


<tr>
<div class=tbfontsize>
<td align="center">{NEWEST_USER}</td>
</div>
</tr>


<tr>
<div class=tbfontsize>
<td colspan="2"><span class="gensmall"><center><span id="groupLegend">{GROUP_LEGEND}</span></center></span></td>
</div>
</tr>


 <script type="text/javascript">(function() {
                      var who = document.getElementById('onlineuserst');
 
                     who.innerHTML = who.innerHTML.replace(/(\Registered
 Users: )/,'').replace(/In total there is
<strong>\d+<\/strong> (users) online :: /,'').replace(/In
total there is <strong>\d+<\/strong> (user) online ::
/,'').replace(new RegExp('Our users have posted a total of '),
'').replace(new RegExp('We have '), '').replace(/(\The newest registered
 user is )/,'').replace(/(\d+ Registered)/,'<span
class="users1">$1</span>').replace(/(\d+ Hidden)/,'<span
class="users2">$1</span>').replace(/(\d+ Guests)/,'<span
class="users3">$1</span>');
                    })();</script>



</table>
  </center>
<!-- END disable_viewonline -->


JS

[script=Replace Group Legend Brackets (Index)=Index]
Code:
<script> jQuery(function() { var oldc =   jQuery('td span:contains(Website Beheerders)').html();    newc = oldc.replace(/\[/g,'').replace(/\]/g,'').replace(/\Legend : /g,''); jQuery('td span:contains(Website Beheerders)').html(newc); }); </script>



CSS

[css]
Code:
/**** ONLINE USERS INDEX FOOTER **********************************/
div.scrollable {width: 380px;height: 80px;margin: -15px;padding-left: 15px;overflow: auto;font-size: 100%;font-weight: bold;color:#36F!important;}
#onlineuserst {font-size:100%;}
#onlineuserst td b a{color:#fff;}
#onlineuserst td{clear: both;border: 0px solid #FF5100!important;background:url(http://2img.net/s/t/14/29/94/i_list_bg.gif) repeat-x top left #FA8A16;}
.users1{color: green;}
.users2{color: #0099FF;}
.users3{color: red;}
#groupLegend {font-size:0}
#groupLegend b {font-size:11px}
#groupLegend b:after {content:" • "}
#groupLegend b:last-child:after {content:""}

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum