• 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

Integrating PHP Freechat and Kohana

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

Post a reply
2 posts • Page 1 of 1

Postby Sunchaser » Thu Mar 29, 2012 6:06 pm

Hi i am trying to integrate PHP Free Chat in a kohana-framework application. The chat doesn't load for the following problem:

Code: Select all
GET http://localhost:81/me20_v2.0.7/index.php/libraries/vendors/phpfreechat-1.3/data/public/js/compat.js 404 (File Not Found)

That's because the framework uses a redirect. I read that i can use the parameters data_private_path, so i did it:

Code: Select all
require_once( "application/libraries/vendors/phpfreechat-1.3/src/phpfreechat.class.php");
$params["serverid"] = md5(__FILE__); // used to identify the chat
$params["data_private_path"] = '/public';
$chat = new phpFreeChat($params);

However the problem is still there. Any help please?
Sunchaser
Member
 
Posts: 11
Joined: Thu Mar 29, 2012 6:01 pm
Top

Postby Sunchaser » Fri Mar 30, 2012 9:38 am

Solved:

Code: Select all
public function freechat()
   {
      $view = new View('chat/freechat');
      $sheets  = array('gamelayout'=>'screen', 'chat' => 'screen', 'submenu'=>'screen');

      require_once( "/application/libraries/vendors/phpfreechat-1.3/src/phpfreechat.class.php");
      $params["serverid"] = md5(__FILE__); // used to identify the chat
      $params["data_public_url"] = url::base() . '/application/libraries/vendors/phpfreechat-1.3/data/public';
      $params["server_script_url"] = 'freechat';
      
      
      $chat = new phpFreeChat($params);
      
      $this -> template->sheets = $sheets;
      $view -> chat = $chat ;
      $this -> template -> content = $view;
      
   }
Sunchaser
Member
 
Posts: 11
Joined: Thu Mar 29, 2012 6:01 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 11 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