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

XML Log

Post a bug fix, a new feature, a theme ...

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

Post a reply
1 post • Page 1 of 1

Postby DesignGoggles » Tue Aug 24, 2010 2:36 pm

Hello,

I have added XML functionality to the log in response to the note on line 56 of log.class.php:

// @todo write logs in a cleaner structured language (xml, html ... ?)


To create an XML Log, insert the following code into /src/proxies/log.class.php at line 64:

Code: Select all
   $logfile = $logpath."/chat.xml";
        if (is_writable($logpath))
        {
         $log = "<chat_entry>n";
         $log .= "t<channel>". $recipient ."</channel>n";
         $log .= "t<date>". date("d/m/Y") ."</date>n";
         $log .= "t<time>". date("H:i:s") ."</time>n";
         $log .= "t<username>". $sender ."</username>n";
         $log .= "t<message>". $param ."</message>n";
         $log .= "</chat_entry>nn";
                file_put_contents($logfile, $log, FILE_APPEND | LOCK_EX);
         
        }

Best of luck!
DesignGoggles
New member
 
Posts: 1
Joined: Tue Aug 24, 2010 2:26 pm
Top

Post a reply
1 post • Page 1 of 1

Return to Contributions (v1.x)

Who is online

Users browsing this forum: No registered users and 13 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