• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ Feature Requests (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

logmysql.class.php to make possible /whowas

This forum is now locked as we will no longer be developing the v1.x branch

Moderators: OldWolf, re*s.t.a.r.s.*2

Topic locked
2 posts • Page 1 of 1

Postby dragger » Mon Mar 05, 2007 7:37 pm

kerphi, HenkBB, datacompboy

I am grateful for any guidance to develop this:
http://www.phpfreechat.net/forum/viewtopic.php?id=1086

kerphi wrote:Yes you can modify the existing src/proxies/log.class.php to write the data in mysql instead of in a file.
Another way is to write a new proxy that you can call src/proxies/logmysql.class.php and to append this proxy in the "post_proxies" parameter.
ex: $params['post_proxies'] = array('logmysql');

I think the way to go is a separate table that keys with the mysql.class.php table for a given chat, and log UserMeta ip as set by connect. class.php

on connect, joins, and changes nicks.

Then we could have a /whowas command.

Also, please tell me if I am wrong:
This doesn't appear to me that it will work ...?

feric wrote:
nishil wrote:Can the data log record the IP (Source) too.

Solution just with V1.0-beta7 (I guess)
Code: Select all
Open file
/src/proxys/log.class.php

Find Line 37
{

After the bracket insert:
$ip_address  = $_SERVER['REMOTE_ADDR'];

Then Replace line
$log = $recipient."t";

With this line:
$log = "$ip_address - $recipient"."t";

Save file back to your Webspace...

Are you aware, that this will slightly decrease performance and will need more space for Logfile(s)?

http://www.phpfreechat.net/forum/viewtopic.php?id=631
http://www.phpfreechat.net/forum/viewtopic.php?id=618
dragger
Member
 
Posts: 18
Joined: Sat Feb 24, 2007 11:11 am
Location: Morro Bay, California
  • Website
Top

Postby dragger » Thu Mar 08, 2007 8:41 pm

Progess report:

I was glad to find JavaScript Powered PHP Debugging because of the way 110mb.com is set up, Zend Studio, Eclipse, and Xdebug will not work.

To use it with Firefox, you must allow pop-ups for the domain hosting your chat.
Also, be sure to fix the typo mentioned in users' comment's.

I have added "debugwin" to the auth.class.php command array
and made a copy of debug.class.php, debugwin.class.php, and edited pfcclient.js to make sure debugwin would work exactly like debug.

Now, only admins can run debugwin, and that much works.

Preliminary tests (not using custom command debugwin) with class and object functions work.

It has begun to work

My sense of it is now, I will build a menu of script handlers, debugwin.class.php and see what I can see. I did place the window.open in a new handler on the pfcclient.js side, but the method is pretty much the same as response. One thing I must do, is be sure to close the pop-up when (better before) I close the chat. It will dangle there as a half-open connection otherwise.

update March 26, 2007

I have been waiting to see when Jim Plush's debugger/profiler is released how I might be able to implement it.
Last edited by dragger on Mon Mar 26, 2007 8:01 pm, edited 1 time in total.
dragger
Member
 
Posts: 18
Joined: Sat Feb 24, 2007 11:11 am
Location: Morro Bay, California
  • Website
Top


Topic locked
2 posts • Page 1 of 1

Return to Feature Requests (v1.x)

Who is online

Users browsing this forum: No registered users and 2 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub