• 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

PunBB integration

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
17 posts • Page 1 of 2 • 1, 2

Postby daz » Fri Feb 10, 2006 6:42 am

Can you make authorization feature,
and integrate with PunBB?

10x
daz
New member
 
Posts: 1
Joined: Fri Feb 10, 2006 6:37 am
Top

Postby phpfreechat » Fri Feb 10, 2006 10:04 am

[EDIT]

The FAQ entry is ready now :
http://www.phpfreechat.net/faq.en.html#punbb


The following code can be just ignored.
[/EDIT]
-----------
I already write a piece of code for my phpbb forum but it's not clean enought to add a FAQ entry about this.

Here is the code. If you have time to make this code cleanner I will be pleased to integrate your contribution in the FAQ (or better, into a special API for that) :

Code: Select all
<?php

require_once "config.php"; // the phpbb2 config file
$tp = $table_prefix;

session_start();

$pseudo = isset($_SESSION["enclume_pseudo"]) ? $_SESSION["enclume_pseudo"] : "";
if ($pseudo == "" || isset($_GET["init"])) // check the pseudo from the BDD or just get it into the sessions
{
if (!isset($_COOKIE["phpbb2mysql_sid"]))
  die("Connectez vous au forum avant de vous connecter sur le chat");
$sid = $_COOKIE["phpbb2mysql_sid"];

$conn = mysql_connect($dbhost,$dbuser,$dbpasswd);
if (!$conn) { echo "Connection impossiblen"; exit; }
@mysql_select_db($dbname) or die( "Unable to select database");
$query = "SELECT * FROM ".$tp."sessions, ".$tp."users WHERE session_id = '".$sid."' AND session_user_id = user_id LIMIT 1";
$result = mysql_query($query);
$row = mysql_fetch_array($result, MYSQL_NUM);
mysql_free_result($result);
mysql_close();
//print_r($row);
$pseudo = isset($row[9]) && isset($row[1]) && $row[1] > 0 ? $row[9] : "";
if ($pseudo == "") die("Votre nom d'utilisateur n'a pas ete trouvé, veuillez vous reconnecter au forum.");

$_SESSION["enclume_pseudo"] = $pseudo;
}


require_once "phpxchat/trunk/src/phpfreechat.class.php";
$params = array();
$params["title"]          = "Le chat de l'ENCLUME";
$params["nick"]           = $pseudo;
$params["frozen_nick"]    = true;
$chat = new phpFreeChat( $params );

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title><?php echo $params["title"]; ?></title>

<?php $chat->printJavascript(); ?>
<?php $chat->printStyle(); ?>

   </head>
   <body>
   
<a href="http://enclume.jeu-gratuit.net/index.php"><img src="http://enclume.jeu-gratuit.net/templates/darkside/enclume.gif" /></a>

<?php $chat->printChat(); ?>

   </body>
</html>
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Yautja_cetanu » Sun Feb 26, 2006 12:37 am

I'm confused, this isn't the code for phpbb right?
Yautja_cetanu
Member
 
Posts: 18
Joined: Sat Feb 25, 2006 1:47 am
Top

Postby phpfreechat » Sun Feb 26, 2006 10:50 am

Right. sorry, I read phpBB
I didn't look at a punBB integration yet.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby andrewbelcher » Tue Feb 28, 2006 1:53 am

I'm currently in the process of integrating v0.7 (the latest one I could download) with phpBB. You're integration will work fine, but it doesn't run on the same system as the rest of the phpBB Forum software, as that runs on parsing templates and seperate php files. Once I've completed it, including having all the settings controlled via the Admin Panel and hopefully displaying who is in the chatroom on the "Who's online" panel, I can give you it with documentation if you'd like? I think that will probably be a few days.
Last edited by andrewbelcher on Tue Feb 28, 2006 1:54 am, edited 1 time in total.
andrewbelcher
Member
 
Posts: 32
Joined: Tue Feb 28, 2006 1:47 am
Top

Postby helens » Sun Apr 16, 2006 11:26 am

andrewbelcher wrote:I'm currently in the process of integrating v0.7 (the latest one I could download) with phpBB.

I would reaallly appreciate any code/documents/explanations on how that could be done. :)
Please!!! :)
helens
New member
 
Posts: 1
Joined: Mon Apr 10, 2006 7:42 am
Top

Postby andrewbelcher » Mon Apr 17, 2006 4:41 pm

Ok - I've a couple other things on the go at the moment, but will do that as soon as possible and post it up here!
andrewbelcher
Member
 
Posts: 32
Joined: Tue Feb 28, 2006 1:47 am
Top

Postby bigus » Fri Apr 28, 2006 5:20 pm

hello. i try integrate phpfreechat with Joomla but it isn't work.

It is possobility to get from joomla cookie 's nick and paste to nick phpfreechat??
and do how to do that users can't change his nick name one again after login on chat??

thank you
bigus
New member
 
Posts: 2
Joined: Fri Apr 28, 2006 5:08 pm
Top

Postby phpfreechat » Fri Apr 28, 2006 8:37 pm

bigus, this topic could help you : http://www.phpfreechat.net/forum/viewtopic.php?id=242
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby bigus » Fri Apr 28, 2006 8:58 pm

fanks for quick replay, but this topic unuseful for me :(

ok. meaby tell me and do how to do that users can't change his nick name one again after login on chat.
bigus
New member
 
Posts: 2
Joined: Fri Apr 28, 2006 5:08 pm
Top

Postby mikesz » Sun Aug 06, 2006 3:12 pm

Hello Andrewbelcher, Any word on the phpbb integration effort mentioned above? I would be happy to test it out for you when you have finished it... regards, mikesz
mikesz
New member
 
Posts: 1
Joined: Sun Aug 06, 2006 2:54 pm
Top

Postby phpfreechat » Mon Dec 04, 2006 6:48 pm

This FAQ entry could help you :
http://www.phpfreechat.net/faq.en.html#punbb
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby nifty-stuff.com » Wed Dec 27, 2006 8:39 pm

Hi All,

I really like this script. Very clean install and runs well. I've integrated it into my PunBB forum and everything is working smoothly. My issue is that I want to prohibit guests from logging in to chat. Is there a relatively easy way to do this? For example: if nickname = guest (or blank) then disallow chat?

Keep up the great work!
nifty-stuff.com
New member
 
Posts: 9
Joined: Wed Dec 27, 2006 8:33 pm
Top

Postby nifty-stuff.com » Thu Dec 28, 2006 1:22 am

Oh, one other thing: I want to host the chat on a different hosting account on my server but still want to integrate with punbb on my intial account (the reason is because I don't want all the chat page refreshes showing up in my awstats).

Is there an easy change to the punbb integration code to have the chat script on one site and the forum on another?

Thanks!
nifty-stuff.com
New member
 
Posts: 9
Joined: Wed Dec 27, 2006 8:33 pm
Top

Postby nifty-stuff.com » Sat Jan 06, 2007 5:52 am

Okay, I've given up on the idea of hosting chat in a different location from my punbb forum, but I REALLY need good instructions on how to limit usage of PhpFreeChat to registered members of my forum. I can't use this script unless I can block "guests".

Thanks!
nifty-stuff.com
New member
 
Posts: 9
Joined: Wed Dec 27, 2006 8:33 pm
Top

Next

Topic locked
17 posts • Page 1 of 2 • 1, 2

Return to Feature Requests (v1.x)

Who is online

Users browsing this forum: No registered users and 1 guest

  • 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