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.
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:
Joined: Dec 11, 2006
Last Visit: 15 Oct 2008
Posts: 7 Points: 589
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 ]--------------------------------
#
/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);
}
Joined: Jul 02, 2008
Last Visit: 09 Oct 2008
Posts: 10 Points: 318
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
Untergang
Reputation: 603 votes: 5
Local time: 5:41 AM Location: Lommel
Status: Offline
0.50 posts per day Medals: 0
Joined: May 08, 2007
Last Visit: 01 Dec 2008
Posts: 285 Points: 8190
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);
}
Joined: Jul 02, 2008
Last Visit: 09 Oct 2008
Posts: 10 Points: 318
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 Any ideas how to remove them again and let the MOD use the ones I made with the colors i chose..??
Joined: Jul 02, 2008
Last Visit: 09 Oct 2008
Posts: 10 Points: 318
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
Untergang
Reputation: 603 votes: 5
Local time: 5:41 AM Location: Lommel
Status: Offline
0.50 posts per day Medals: 0
Joined: May 08, 2007
Last Visit: 01 Dec 2008
Posts: 285 Points: 8190
Re: Whos online module or block...??Posted:
Thu Oct 09, 2008 2:24 pm
Open includes/page_header.php
And look for the lines starting with: $style_color
When you remove that, hte admin and mods colors should be gone.
7 Replies / 628 Views Page 1 of 1 All times are GMT
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