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

Questions about pfc versions & integration with IPB

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

Post a reply
7 posts • Page 1 of 1

Questions about pfc versions & integration with IPB

Postby Letacla » Sun Nov 11, 2012 6:41 am

Good morning PFC members :D

I would like to install pfc (1.x or 2.x, depends) but I have some questions before and I really need to make that properly.

So...

To begin, what really difference between 1.x and 2.x?
This question because I've noticed that 1.x has follow feature : msn theme (with smileys, etc.), and 2.x version hasn't.
I saw that 2.x will have more features but when? (approximatively)

Second question (most important) :

I'm running on IPB (last version, 3.3) ; I mean Invision Power Board software.
I saw there is solution to integrate pfc with phpBB and others plateforms.
But concerning IPB, I've not found anything.

I don't want install PFC on same sql base that IPB.
But I would like to use IPB users data to permit them login/use pfc without create an other personnal count.
If it's possible, please, how to do that?

Thanks a lot in advance :)

P.S.: Excuse my english (I'm french).
Letacla
New member
 
Posts: 6
Joined: Sun Nov 11, 2012 6:36 am
Top

Re: Questions about pfc versions & integration with IPB

Postby OldWolf » Sun Nov 11, 2012 8:05 pm

1.x is a much more complete branch... 2.x is brand new and without most features complete yet. I would recommend 1.x for the time being for production purposes.

As for integrating anything, it's really as easy as having whatever login system you want pass the username to $params['nick'] and you're set.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Re: Questions about pfc versions & integration with IPB

Postby Letacla » Tue Nov 13, 2012 6:16 am

Hi OldWolf,

Ok. I will use 1.x Branch for this moment.

Thank your for your reply but I don't know how I can use IPB users login infos to connect them with pfc.
For example, I've found and tried to follow this topic (posted on 2007!) but I'm running on IPB 3.3.x and tutorial what I evocated seems outdated :(

Does anyone use pfc 1.x with IPB 3?

Thank you in advance.
Letacla
New member
 
Posts: 6
Joined: Sun Nov 11, 2012 6:36 am
Top

Re: Questions about pfc versions & integration with IPB

Postby OldWolf » Wed Nov 14, 2012 6:11 pm

Easiest thing to do would be to contact the IPB folks and ask them how one would "echo the username"... the process will be almost identical to what you want to do. Bring that info here and I can give you the rest.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Re: Questions about pfc versions & integration with IPB

Postby Letacla » Mon Nov 19, 2012 9:32 pm

Good evening OldWolf.

Thank you for your reply.

We just give me these indications :

This article will demonstrate one way in which you can check if a member is currently logged into IP.Board and retrieve their data.

Firstly, include the initdata.php and admin/sources/base/ipsRegistry.php files and initiate the registry:

Code: Select all
require_once( 'initdata.php' );
            require_once( CP_DIRECTORY.'/sources/base/ipsRegistry.php' );
            $registry = ipsRegistry::instance();
            $registry->init();

You can now fetch the member's data by calling $registry->member()->fetchMemberData(); which will return an array of data on the currently logged in user.

If there is no member logged in, the function will return data for the guest user. To check if a user is logged in, just look at the member_id element - if 0, then the user is not logged in. For example:

Code: Select all
// Use the same code shown above here

// Fetch member details
$member = $registry->member()->fetchMemberData();

// Print the display name
print $member['members_display_name'];

Link to article

I've tested and it's ok : that returns member's name, if we're logged in, and Guest if user is not logged in.

Now, how can I manage this with pfc 1.5?

Thank you for your attention.
Letacla
New member
 
Posts: 6
Joined: Sun Nov 11, 2012 6:36 am
Top

Re: Questions about pfc versions & integration with IPB

Postby OldWolf » Tue Nov 20, 2012 1:44 am

Place that info at the top of your index.php. Then instead of
print $member['members_display_name'];
find your parameter list and add
$params['nick'] = $member['members_display_name'];
$params['frozen_nick'] = true;

Make sure it's with the other parameters. If you have any issues, post your entire index.php inside of code tags ([code])
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Re: Questions about pfc versions & integration with IPB

Postby Letacla » Tue Nov 20, 2012 3:53 pm

Hi OldWolf! :)

Thanks a lot for your patience and your attention!

It's ok. Auto identification name works like a charm \o/

Here, the correct file index.php of PFC with path to forum software files :

Code: Select all
<?php
require_once( '/home/.../forums/initdata.php' );
            require_once( '/home/.../forums/admin/sources/base/ipsRegistry.php' );
            $registry = ipsRegistry::instance();
            $registry->init();

require_once dirname(__FILE__)."/src/phpfreechat.class.php";

// Fetch member details
$member = $registry->member()->fetchMemberData();

$params["serverid"]    = md5(__FILE__); // calculate a unique id for this chat
$params["title"]       = "chat.domain.fr";
$params["channels"]   = array ("Room");
$params["nick"]        = $member['members_display_name'];  // setup the intitial nickname
$params["theme"]       = "msn";
$params['frozen_nick'] = true;
$params['firstisadmin'] = false;
$params["max_channels"] = 2;
$params["time_format"] = "H:i";
$params["height"]         = "500px";  // max high in px

$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>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Room</title>

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

  </head>

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

  </body>
</html>
Letacla
New member
 
Posts: 6
Joined: Sun Nov 11, 2012 6:36 am
Top


Post a reply
7 posts • Page 1 of 1

Return to General Support (v2.x)

Who is online

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