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

Custom Commands

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

Post a reply
2 posts • Page 1 of 1

Postby Chryzo » Thu Feb 26, 2009 9:34 pm

Hello all,

PFC Version: 1.6.2
PHP Version: 5?2?6

Shared or Dedicated Hosting: hmm... shared i guess even though the server is mine
Link to your website: in the present case and as a test bed: http://ffm.chryzo.net/news.php

Are you able to reproduce the issue on the official demo (http://www.phpfreechat.net/demo)? not tested, is it testable ?

Have you set any parameters? No paramters set

Are you seeing any error messages, such as javascript errors? no error are appearing

What is the issue you are experiencing in detail?

So I implemented phpFreeChat on e107. It is working perfectly fine.

Now I am trying to add custom commands. So I created a file test.class.php in the src/commands directory.
When I type the /test in the chat channel nothing happens. No error. No text. No Nothing :(

What could be the reason ?

I based my command on the /me command and here is my file:
<?php


// create the customized command
require_once dirname(__FILE__)."/../src/pfccommand.class.php";
class pfcCommand_test extends pfcCommand
{
function run(&$xml_reponse, $p)
{
$clientid = $p["clientid"];
$param = $p["param"];
$sender = $p["sender"];
$recipient = $p["recipient"];
$recipientid = $p["recipientid"];

$c =& pfcGlobalConfig::Instance();
$u =& pfcUserConfig::Instance();
$ct =& pfcContainer::Instance();

$nick = $u->getNickname();
$text = trim($param);

$ct->write($recipient, $nick, "send", $text);

}
}
?>

Best regards,
Last edited by Chryzo on Thu Feb 26, 2009 9:45 pm, edited 1 time in total.
Chryzo
New member
 
Posts: 3
Joined: Thu Feb 26, 2009 9:22 pm
Top

Postby Chryzo » Thu Feb 26, 2009 10:00 pm

My error found:
require_once dirname(__FILE__)."/../src/pfccommand.class.php";

is actually:
require_once dirname(__FILE__)."/../pfccommand.class.php";

might help other people though, and thus source might need to be corrected
Chryzo
New member
 
Posts: 3
Joined: Thu Feb 26, 2009 9:22 pm
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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