• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

MyBB 1.6 and phpFreeChat

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

Post a reply
8 posts • Page 1 of 1

Postby Jacktips » Tue Jul 12, 2011 9:42 pm

Any tutorial/hint on how to integrate MyBB 1.6 and phpFreeChat??
Jacktips
New member
 
Posts: 5
Joined: Tue Jul 12, 2011 9:40 pm
Top

Postby re*s.t.a.r.s.*2 » Wed Jul 13, 2011 12:27 am

Hi,

for mybb 1.603, make sure you installation setup in the requires or you ll get an error.
Code: Select all
<?php
define("IN_MYBB", 1);

// use this require if you mybb is sitting at forum folder
//require_once ($_SERVER{'DOCUMENT_ROOT'}."forum/global.php");

// use this require if mybb is sitting at the root of the server folder.
require_once ($_SERVER{'DOCUMENT_ROOT'}."/global.php");

if(isset($mybb->user['username']) && $mybb->usergroup['title'] !== "Unregistered")
{
   $username= $mybb->user['username'];
}
else
{
   $username= "";
}

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = $username;//"guest".rand(1,1000);  // setup the intitial nickname
$params["isadmin"]= $mybb->usergroup['title'] == "Administrators" ? TRUE : FALSE;
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );

?>

Installation will make you admin if you are admin in your forum and pickup the nickname automatically.

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby Jacktips » Wed Jul 13, 2011 5:10 am

Ok.Thank you so much!Right now we are using a AJAX Chat but we would like to change it to phpfreechat.
I still need to figure out how everything works in phpfreechat.
Will this pick-up automatically the username of all of our users?
Jacktips
New member
 
Posts: 5
Joined: Tue Jul 12, 2011 9:40 pm
Top

Postby re*s.t.a.r.s.*2 » Wed Jul 13, 2011 5:52 am

right..

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby styve » Thu Oct 06, 2011 4:19 am

edited chat / index.php according to mentioned above but nothing happened.
Chat opens normally with anonymous users
styve
New member
 
Posts: 4
Joined: Thu Oct 06, 2011 2:08 am
Top

Postby re*s.t.a.r.s.*2 » Thu Oct 06, 2011 6:09 am

Can you explain?

What version do you have, I have tested the above version and it works , can you provide your index.php code here,... for further debugging?

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby styve » Thu Oct 06, 2011 1:27 pm

<?php
define("IN_MYBB", 1);

require_once ($_SERVER{'DOCUMENT_ROOT'}."//forum/global.php");

if(isset($mybb->user['username']) && $mybb->usergroup['title'] !== "Visitante")
{
$username= $mybb->user['username'];
}
else
{
$username= "";
}

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = $username;//"guest".rand(1,1000); // setup the intitial nickname
$params["isadmin"]= $mybb->usergroup['title'] == "Administradores" ? TRUE : FALSE;
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );

?>


the rest is the original html index.php phpfreechat

MyBB version 1.6
phpfreechat 1.3

Chat opens normally, but nothing happens differently.
Seems that this integration did not do anything.
Last edited by styve on Fri Oct 07, 2011 1:36 pm, edited 1 time in total.
styve
New member
 
Posts: 4
Joined: Thu Oct 06, 2011 2:08 am
Top

Postby re*s.t.a.r.s.*2 » Mon Oct 17, 2011 1:00 am

Hi,

Sorry to reply so late, but you need to make the integration just like the script on top of the thread, the one I have wrote, you changed some part of the script..

If you site is in Hispanic language that doesnt mean you need to change the internal vars and array to Hispanic please redo the script and try again..

regards
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top


Post a reply
8 posts • Page 1 of 1

Return to phpBB, Simple Machines Forum (SMF), and Forum Software (v1.x)

Who is online

Users browsing this forum: No registered users and 5 guests

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