Clan Adverts

Custom PHPNuke Scripts

www.clan-themes.co.uk :: View topic - Whos online module or block...??

 Welcome To Clan Themes 

As the board grows please remember the Search Option and we hope you find our community useful.

We also monitor Private Messages to stop members from abusing our sites system.
If you are asking for assistance please provide your site link and nuke version, Thanks.

Whos online module or block...??

7 Replies / 628 Views


Post new topic   Reply to topic  

   www.clan-themes.co.uk Forum Index » General PhpNuke

View previous topic :: View next topic


pryma
Reputation: 4.3
Local time: 11:41 PM


Status: Offline
0.07 posts per day
Medals: 0

Joined: Jul 02, 2008
Last Visit: 09 Oct 2008
Posts: 10
Points: 318 

Post Whos online module or block...?? Posted: Fri Sep 19, 2008 12:42 pm   

It has been some time that i have searched for thistype of module and i have not found one. I have tested several but they are all the same. I am looking for the one that states this: 51 registered users visited during the last 24 hours: name, name ,name etc.. The ones i have tried only get to: Most users ever online was 26 on Thu Feb 28, 2008 10:57 am
Registered Users:

and i want it to display this:

51 registered users visited during the last 24 hours: 12PK-KILZ, Achilles, AngelLewis, baxr6, bobolicious, cobra, comptech2002, Concrete, dad-55, DBF_Tim, dochavoc, Dutch_Lady, FFAbigboy, freemich, gamble88, ghamlin219, GhOsTeD, gmc_envoy, grinch, Gumble, host2000, johnjohn, mmunsee, Nimis, onelove, paradice, pccouple5573, pedro2061, petallotus, pryma, RAIN70, realddr, Ruven, sgtmudd, snype, sousbi, strik9, SuperFree, swaggie, SwampBottom, Tazman-Dx, The_Clown, Timber, Tricky2U, Vanquish, WelshY1, Zeppelin, Zipps, Gazzasan, Loki, R3viv0r


Does any one know how I can make this happen?

Thanks in advanced.

Pryma
 

 
View user's profileSend private message Reply with quote

Untergang
Reputation: 603
votes: 5
Local time: 5:41 AM
Location: Lommel
belgium.gif

Status: Offline
0.50 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 01 Dec 2008
Posts: 285
Points: 8190 

View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

lonestar
Reputation: 472.8
Local time: 4:41 AM

uk.gif

Status: Offline
0.01 posts per day
Medals: 0

Joined: Dec 11, 2006
Last Visit: 15 Oct 2008
Posts: 7
Points: 589 

Post Whos online module or block...?? Posted: Tue Oct 07, 2008 10:35 am   

here are the code changes for the mod your after.

Code:

########################################################
##
## MOD Title:   Users of the day
## MOD Version: 2.1
## Author:     ZoZo <zozo@etoiles.net>
##
## Description: 
## Displays, under the online users list, a list of the registered users
## who have visited during the last XX hours. Can also display the list
## of the users who didn't come. (see "Edit below")
##
## Installation Level:  easy
## Installation Time:  2-3 minutes
##
## Files To Edit:         3
##                   - /themes/YOUR-THEME/forums/index_body.tpl
##                   - /modules/forums/language/lang_english/lang_main.php
##                   - /includes/page_header.php
##
## Included Files:      None
##
########################################################
## VERSION HISTORY:
##
## October 22th 2004: v2.1
## 1. Now admins are displayed first, then mods then users.
## 2. Corrected a problem in the text file with Easy Mod Installer.
##
## June 20th 2003: v2.0
## 1. The list's delay is customizable, but you must give a number in hours, 24 by default.
## 2. There's now a counter for each list.
## 3. The MOD doesn't display the list of the users who didn't visit by default.
##
## October 28th 2002: v1.1
## 1. The MOD uses the database variable "user_session_time" instead of "user_lastvisit", which is updated only when the user logs out.
## 
## October 15th 2002: v1.0
## 1. Created main features.
##   
########################################################
## TODO LIST:
##
## 1. Don't restrict the time unit to hours.
##
########################################################
##        PLEASE REPORT ANY BUGS OR SUGGESTIONS       ##
########################################################

#
#-----[ ACTION: open ]---------------------------------
#
/themes/YOUR-THEME/forums/index_body.tpl
#
#-----[ ACTION: find ]---------------------------------
#
   <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
#
#-----[ ACTION: replace by ]---------------------------
#
   <td class="row1" align="center" valign="middle" rowspan="3"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
#
#-----[ ACTION: find ]---------------------------------
#
    <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}   [ {L_WHOSONLINE_ADMIN} ]   [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
#
#-----[ ACTION: add after ]----------------------------
#
  </tr>
  <tr>
   <td class="row1" align="left"><span class="gensmall">{USERS_OF_THE_DAY_LIST}</span></td>
#
#-----[ ACTION: repeat for all templates ]-------------
#



#
#-----[ ACTION: open ]--------------------------------
#
/modules/forums/language/lang_english/lang_main.php
#
#-----[ ACTION: find ]--------------------------------
#
$lang['Registered_users'] = 'Registered Users:';
#
#-----[ ACTION: add before ]--------------------------
#
$lang['Day_users'] = '%d registered users visit during the last %d hours:';
$lang['Not_day_users'] = '%d registered users <span style="color:red">DIDN\'T</span> visit during the last %d hours:';
#
#-----[ ACTION: repeat for all languages ]------------
#



#
#-----[ ACTION: open ]--------------------------------
#
/includes/page_header.php
#
#-----[ ACTION: find ]--------------------------------
#
   'LOGGED_IN_USER_LIST' => $online_userlist,
#
#-----[ ACTION: add after ]---------------------------
#
   'USERS_OF_THE_DAY_LIST' => $day_userlist,
#
#-----[ ACTION: find ]--------------------------------
#
//
// Obtain number of new private messages
// if user is logged in
//
#
#-----[ ACTION: add before ]--------------------------
#
//
// Users of the day MOD
//

// ############ Edit below ############
// #
$display_not_day_userlist = 0;   // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24;      // change here to the number of hours wanted for the list
// #
// ############ Edit above ############

$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
   FROM ".USERS_TABLE."
   WHERE user_id > 0
   ORDER BY IF(user_level=1,3,user_level) DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}

$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;

while( $row = $db->sql_fetchrow($result) )
{
   $style_color = '';
   if ( $row['user_level'] == ADMIN )
   {
      $row['username'] = '<b>' . $row['username'] . '</b>';
      $style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
   }
   else if ( $row['user_level'] == MOD )
   {
      $row['username'] = '<b>' . $row['username'] . '</b>';
      $style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
   }
   if ( $row['user_allow_viewonline'] )
   {
      $user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
   }
   else
   {
      $user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
   }
   if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
   {
      if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
      {
         $day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
         $day_users++;
      }
      else
      {
         $not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
         $not_day_users++;
      }
   }
}

$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;

$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;

if ( $display_not_day_userlist )
{
   $day_userlist .= '<br />' . $not_day_userlist;
}

//
// End of MOD
//



#
#-----[ ACTION: save/close all ]----------------------
#

#
#-----[ ACTION: upload the modified files ]-----------
#

#
#-----[ ACTION: enjoy ]-------------------------------
#

#
#-----[ PLEASE REPORT ANY BUGS OR SUGGESTIONS]--------
#

 

 
View user's profileSend private messageSend e-mailVisit poster's websiteYahoo MessengerMSN Messenger Reply with quote




pryma
Reputation: 4.3
Local time: 11:41 PM


Status: Offline
0.07 posts per day
Medals: 0

Joined: Jul 02, 2008
Last Visit: 09 Oct 2008
Posts: 10
Points: 318 

Post Re: Whos online module or block...?? Posted: Wed Oct 08, 2008 1:56 pm   

K so how exactly is this done. Yes i see the code and read it thru.. However, I believe that i have to edit some files right. This is what the action: add or replace things are for.. but when i get to the big code right under

// ############ Edit above ############

where do i place this at?? Hope I can get this done i will keep messing with it and hopefully i get it right before anyone answer but hopefully someone can answer as well.

Thanks, regards. Pryma
 

 
View user's profileSend private message Reply with quote

Untergang
Reputation: 603
votes: 5
Local time: 5:41 AM
Location: Lommel
belgium.gif

Status: Offline
0.50 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 01 Dec 2008
Posts: 285
Points: 8190 

Post Re: Whos online module or block...?? Posted: Wed Oct 08, 2008 1:59 pm   

That part has to be in you file aswell.
So you have to add this:
Code:
//
// Users of the day MOD
//

// ############ Edit below ############
// #
$display_not_day_userlist = 0;   // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24;      // change here to the number of hours wanted for the list
// #
// ############ Edit above ############

$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
   FROM ".USERS_TABLE."
   WHERE user_id > 0
   ORDER BY IF(user_level=1,3,user_level) DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}

$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;

while( $row = $db->sql_fetchrow($result) )
{
   $style_color = '';
   if ( $row['user_level'] == ADMIN )
   {
      $row['username'] = '<b>' . $row['username'] . '</b>';
      $style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
   }
   else if ( $row['user_level'] == MOD )
   {
      $row['username'] = '<b>' . $row['username'] . '</b>';
      $style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
   }
   if ( $row['user_allow_viewonline'] )
   {
      $user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
   }
   else
   {
      $user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
   }
   if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
   {
      if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
      {
         $day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
         $day_users++;
      }
      else
      {
         $not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
         $not_day_users++;
      }
   }
}

$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;

$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;

if ( $display_not_day_userlist )
{
   $day_userlist .= '<br />' . $not_day_userlist;
}

//
// End of MOD
//

Before
Code:
//
// Obtain number of new private messages
// if user is logged in
//
 

 
View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote

pryma
Reputation: 4.3
Local time: 11:41 PM


Status: Offline
0.07 posts per day
Medals: 0

Joined: Jul 02, 2008
Last Visit: 09 Oct 2008
Posts: 10
Points: 318 

Post Re: Whos online module or block...?? Posted: Thu Oct 09, 2008 6:48 am   

Thanks guys this was very helpful.. thanks for clarifying how to install and what to add. It is working and im very happy to see it active. Thanks again very much.

Now there is only one thing that I wanted to ask.. Previously I had removed the original administrator and added my own with my own colours.. but since i added the this MOD here it brought them back Confused Any ideas how to remove them again and let the MOD use the ones I made with the colors i chose..??

Regards< pryma
 

 
View user's profileSend private message Reply with quote


pryma
Reputation: 4.3
Local time: 11:41 PM


Status: Offline
0.07 posts per day
Medals: 0

Joined: Jul 02, 2008
Last Visit: 09 Oct 2008
Posts: 10
Points: 318 

Post Re: Whos online module or block...?? Posted: Thu Oct 09, 2008 6:51 am   

Oh just a note on the obove message.. The way I removed them last time was thru the index.tpl file .. and I wanted to see if i would/could remove them thru there again but I dont want to mess the already installed MOD.. Would removing them in any case, break the MOD and not show the ADMIN AND MODS in the bottom of the forums???

Regards,

Pryma
 

 
View user's profileSend private message Reply with quote

Untergang
Reputation: 603
votes: 5
Local time: 5:41 AM
Location: Lommel
belgium.gif

Status: Offline
0.50 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 01 Dec 2008
Posts: 285
Points: 8190 

View user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger Reply with quote
Post new topic   Reply to topic  
   www.clan-themes.co.uk Forum Index » General PhpNuke


 
7 Replies / 628 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum