[BETA] Online today

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
DK
Registered User
Posts: 231
Joined: Fri Aug 31, 2001 1:46 pm
Location: Champaign, IL
Contact:

Post by DK »

np. I think this is a great mod and never understood why it is not part of the phpBB baseline since all the tools are in place and a lot of other forums have this be default. all personal opinion of course :D

Cross_+_Flame
Registered User
Posts: 295
Joined: Wed Oct 30, 2002 3:37 pm
Location: Okie-homa!
Contact:

Post by Cross_+_Flame »

gonna try it out now :)

tempered007
Registered User
Posts: 218
Joined: Sun Jun 27, 2004 3:21 am

Post by tempered007 »

Thank you very much! I could kiss you. My phpbb board is starting to look more and more like a well hacked XMB board every day!

Kittie
Registered User
Posts: 19
Joined: Fri Jun 25, 2004 1:14 am
Contact:

Post by Kittie »

Ahh! This is wonderful and quite simple! Great work. :) Nice, clean, and easily customized to fit my Softblue template! ;)

rhs98
Registered User
Posts: 78
Joined: Thu Jan 29, 2004 7:00 pm
Location: UK

Post by rhs98 »

DK - I have added that to the code - it now links to peoples profiles...

rhs98
Registered User
Posts: 78
Joined: Thu Jan 29, 2004 7:00 pm
Location: UK

Post by rhs98 »

battye wrote: Installed it and it works fine :)

I do have one question though, how can I remove the @ 1:23pm or whatever it is?

at the moment it says:

Users online today: Bacon @ 7:03pm, battye @ 9:47am, Boozybaz @ 12:28am, dogmeat @ 1:06am, gersfan @ 4:51am, grinch2171 @ 3:17am, me here @ 2:26am, Putt-Putt @ 5:21pm, quicksilver @ 5:48am, Rat @ 4:49pm, Red XIII @ 1:59am, tunebud @ 6:29am, Vladd44 @ 1:09pm

I want it to simply say

Users online today: Bacon, battye, Boozybaz, dogmeat, gersfan, grinch2171, me here, Putt-Putt, quicksilver, Rat, Red XIII, tunebud, Vladd44.

In the right colours still :D

thanks :D


special version doing the above (i.e. no @ time)

Find:

Code: Select all

array_push($users_online_today,sprintf("%s @ %s",$username,create_date('g:ia', $row['user_lastvisit'], $board_config['board_timezone'])));
Replace WITH

Code: Select all

array_push($users_online_today,$username);

User avatar
NoahK
Registered User
Posts: 217
Joined: Wed Nov 12, 2003 4:49 am
Location: Atlanta, GA
Contact:

Post by NoahK »

You have a fairly big bug in this buddy. Using the variables $user_id and $username in page_header.php are not a good idea. When editing a profile, it also uses those two variables, and strangely enough it grabs the info from your mod in page_header.php. Which of course is a problem. Might want to make your own unique variables for this.
Come play Final Fantasy Tactics: Online!
Features:
- Pick one of 351 class combinations. Battle 150 different monsters. Find over 2,200 weapons, armor, and items. Fight in tournaments or play the Gil Slots. Anything goes!

commandojnr
Registered User
Posts: 84
Joined: Tue Oct 14, 2003 10:05 am

Post by commandojnr »

There's another mod that does the same thing and works fine at http://mods.db9.dk/

tempered007
Registered User
Posts: 218
Joined: Sun Jun 27, 2004 3:21 am

Post by tempered007 »

commandojnr wrote: There's another mod that does the same thing and works fine at http://mods.db9.dk/


Modify 15 files for a "who's online now??!?!?!!" Christ!

commandojnr
Registered User
Posts: 84
Joined: Tue Oct 14, 2003 10:05 am

Post by commandojnr »

tempered007 wrote:
commandojnr wrote:There's another mod that does the same thing and works fine at http://mods.db9.dk/


Modify 15 files for a "who's online now??!?!?!!" Christ!


It does seem like a lot, but it does a couple of other related things, I think.

rhs98
Registered User
Posts: 78
Joined: Thu Jan 29, 2004 7:00 pm
Location: UK

Post by rhs98 »

NoahK wrote: You have a fairly big bug in this buddy. Using the variables $user_id and $username in page_header.php are not a good idea. When editing a profile, it also uses those two variables, and strangely enough it grabs the info from your mod in page_header.php. Which of course is a problem. Might want to make your own unique variables for this.


Nice spot - did not notice this. Will change tommorow. :D

tempered007
Registered User
Posts: 218
Joined: Sun Jun 27, 2004 3:21 am

Post by tempered007 »

commandojnr wrote:
tempered007 wrote:
commandojnr wrote:There's another mod that does the same thing and works fine at http://mods.db9.dk/


Modify 15 files for a "who's online now??!?!?!!" Christ!


It does seem like a lot, but it does a couple of other related things, I think.


This is the freaking Big Brother Hack...I installed it, and now I get to see, who was online, how long they were online, what posts the looked at while online, what kind of soda they had in their hand while online....Man...

rhs98
Registered User
Posts: 78
Joined: Thu Jan 29, 2004 7:00 pm
Location: UK

Post by rhs98 »

rhs98 wrote:
NoahK wrote:You have a fairly big bug in this buddy. Using the variables $user_id and $username in page_header.php are not a good idea. When editing a profile, it also uses those two variables, and strangely enough it grabs the info from your mod in page_header.php. Which of course is a problem. Might want to make your own unique variables for this.


Nice spot - did not notice this. Will change tommorow. :D


Right I've changed the variables so this should not occur again. Please tell me if there are any more problems! :D

niksa
Registered User
Posts: 612
Joined: Mon Sep 08, 2003 7:20 pm
Location: Future birthplace of James T. Kirk
Contact:

Post by niksa »

Ok, having trouble getting this working with my other mods.. :? If anyone can give me some advice about where to look in my code to find a solution, I would be grateful! :D

Here's the error I'm getting:

Code: Select all

Could not obtain regd user/online information

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY u.username ASC' at line 4

SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, u.user_lastvisit FROM phpbb_users u WHERE u.user_lastvisit >= ORDER BY u.username ASC

Line : 121
File : /home/public_html/forums/includes/page_header.php
Here's the code in question:

Code: Select all

	$sql =  "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, u.user_lastvisit
		FROM ".USERS_TABLE." u
		WHERE u.user_lastvisit >= ". $when_from . "
		ORDER BY u.username ASC";
	if ( !($uot_result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql);
	}
I know it's probably because my SELECTs are defined differently elsewhere due to other mods. My question is, how do I find out what to change - how do I know what my modified SELECT line should be?

kaisuny
Registered User
Posts: 114
Joined: Sat Dec 14, 2002 3:51 pm
Location: HKSAR

Post by kaisuny »

niksa wrote: Ok, having trouble getting this working with my other mods.. :? If anyone can give me some advice about where to look in my code to find a solution, I would be grateful! :D

Here's the error I'm getting:

Code: Select all

Could not obtain regd user/online information

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY u.username ASC' at line 4

SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, u.user_lastvisit FROM phpbb_users u WHERE u.user_lastvisit >= ORDER BY u.username ASC

Line : 121
File : /home/public_html/forums/includes/page_header.php
Here's the code in question:

Code: Select all

	$sql =  "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, u.user_lastvisit
		FROM ".USERS_TABLE." u
		WHERE u.user_lastvisit >= ". $when_from . "
		ORDER BY u.username ASC";
	if ( !($uot_result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql);
	}
I know it's probably because my SELECTs are defined differently elsewhere due to other mods. My question is, how do I find out what to change - how do I know what my modified SELECT line should be?


It is not your fault. I am in the same case.

Post Reply

Return to “[2.0.x] MODs in Development”