• 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

phpbb integration

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

Post a reply
36 posts • Page 2 of 3 • 1, 2, 3

Postby King Moonraiser » Thu Aug 23, 2007 11:26 pm

kikigirl wrote:Regarding the sample from King Moonraiser.

I feel like I'm missing something. It seemed to work at first, but then the chat directory overwrote my forum directory in the links... so everything (style, login name, etc.) is trying to find items under the 'phpfreechat' folder.

So, thinks I, I'll take out that index file, and try to put it back in... now it's looking for everything under a filestructure that seems to be based on repetition of my user name. (Note: I didn't change anything except go back to the original index.php file and verify the chat was working without the code changes, then try to replace the modified index.php from the sample here.)

Is there a text file somewhere I need to blow away to get back to a clean setup? Is this my browser blowing up? Do I need to call it a day and look at this later?

TIA
-K

What's the URL to your forum and what's the URL to your chat?
King Moonraiser
Member
 
Posts: 98
Joined: Fri Jun 22, 2007 9:42 pm
  • Website
Top

Postby Yautja_cetanu » Mon Aug 27, 2007 2:13 pm

kiki you've changed the phpbb "script" path instead of the "cookie" path.
Yautja_cetanu
Member
 
Posts: 18
Joined: Sat Feb 25, 2006 1:47 am
Top

Postby raq » Sun Sep 02, 2007 5:22 pm

Hey thanks for this great Mod,

I've installed this successfully on my board, and it has been well received by the members,

you can test it out here:

http://www.bengaliforums.co.uk/forum/index.php

and click Chatroom (BETA) on the top Nav

username: phpfreechat
password: demo

I've also integrated the number of users online.

---

A Big big request, and I will be willing to attempt this if you can point me in the right direction.

At the moment the way the integration is done, only phpbb members can access the chatroom.

Can a channel on the chatroom be opened up for non-members?

So the idea is two have two channels:
1. Members only
2. Public

Phpbb members are allowed access to both channels.
Public members can only see the public channel.

Access URL will ideally be different for Public members.

Many thanks again.
When Freedom is Outlawed, Only Outlaws will be Free
raq
New member
 
Posts: 1
Joined: Thu Jun 08, 2006 11:02 am
Location: London
  • Website
Top

Postby Yautja_cetanu » Mon Sep 24, 2007 12:19 pm

Yeah We've been looking at this. Is it possible to have different access rules for different rooms?
Yautja_cetanu
Member
 
Posts: 18
Joined: Sat Feb 25, 2006 1:47 am
Top

Postby itshee » Mon Oct 29, 2007 10:09 am

I followed the King Moonraiser code above but it didn't work to me. I got a message saying that
Code: Select all
Fatal error: Call to undefined function: session_pagestart()

What did I do wrong.

My chat is at
http://itshee.com/6tub1/chat/

My phpBB is at
http://itshee.com/6tub1/webboard/

I changed the code as listed below

Code: Select all
$phpbb_folder_name = 'webboard';
$phpfreechat_folder_name = 'chat';
itshee
New member
 
Posts: 5
Joined: Mon Oct 29, 2007 10:05 am
Top

Postby itshee » Mon Oct 29, 2007 10:22 am

Got it now. I use phpBB3.
itshee
New member
 
Posts: 5
Joined: Mon Oct 29, 2007 10:05 am
Top

Postby AnthonyArde2 » Sun Jan 13, 2008 11:35 am

Error: 'chat.js.tpl.php' could not be found, please check your themepath 'C:wampwwwdeschatchatsrc/../themes' and your theme 'myphpbb2' are correct

where is this error generating from, ive almost got phpbb integrated.

i had to move my chat to refelct the std dir structure

/forum
/chat


deschat/chat was my old dir structure.
This error comes up after i open the chat and login, the path is:
http://localhost/chat/index.php?sid=75b ... c5ae4268be

Thanks for your posts, it has really been helpful
Last edited by AnthonyArde2 on Sun Jan 13, 2008 11:57 am, edited 1 time in total.
AnthonyArde2
New member
 
Posts: 5
Joined: Fri Dec 28, 2007 5:56 pm
Top

Postby alexey_mos » Sat Mar 01, 2008 6:07 pm

I started a separate topic on problems with phpBB3 integration here: http://www.phpfreechat.net/forum/viewtopic.php?id=2266

Alexey
Last edited by alexey_mos on Sun Mar 02, 2008 11:10 am, edited 1 time in total.
alexey_mos
Member
 
Posts: 17
Joined: Sat Mar 01, 2008 6:01 pm
Top

Postby alexey_mos » Sat Mar 01, 2008 6:41 pm

I found some troubleshooting here: http://www.phpbb.com/community/viewtopi ... n#p3458715

Still I can't make the thing work.

Alexey
Last edited by alexey_mos on Sun Mar 02, 2008 11:11 am, edited 1 time in total.
alexey_mos
Member
 
Posts: 17
Joined: Sat Mar 01, 2008 6:01 pm
Top

Postby osdave » Wed Mar 12, 2008 12:54 pm

Hi everyone,
I have a strange problem with IE: when I login or logout it redirects me to http://www.mydomain.com/phpfreechat/ind ... 0de2bd41de but I have a wrong operation message.
If I refresh it appears correctly.
Any clue?

thanks in advance
osdave
New member
 
Posts: 1
Joined: Wed Mar 12, 2008 12:51 pm
Top

Postby DangerousPT » Fri Jul 31, 2009 10:52 pm

you need to include common.php
DangerousPT
New member
 
Posts: 1
Joined: Thu Jul 30, 2009 4:11 am
Top

Postby install3845 » Sat Aug 15, 2009 9:48 am

King Moonraiser wrote:Some minor updates to make integration a little smoother.

Step 1: Movie the cookie location in the phpBB administrator.

In phpBB, log in as administrator, go to "General Admin," "Configuration," scroll down to "Cookie Settings." Change the cookie path to "/". You may need to delete all of your cookies to ensure the change registers in your browser.

Step 2: Install PHPFREECHAT.

See the website for instructions on how to install. Remember to install it in a directory peer to your forum. For example, if your forum is located at http://www.website.com/phpbb, then install phpfreechat at http://www.website.com/phpfreechat

Step 3: Replace the index.php file for PHPFREECHAT.

I came up with this replacement to the standard index.php file that comes with phpfreechat. You need to modify the $phpbb_folder_name and $phpfreechat_folder_name variables to reflect your actual directory names for phpbb and phpfreechat. Also, edit the title, channel name(s), and any censored words you wish to block.

I designed it to use the subSilver CSS file. Feel free to experiment with your forum's own CSS file. Sorry, I don't know how to get the page to use whatever template stylesheet the user has in their control panel settings.

Code: Select all
<?php
Header("Cache-control: private, no-cache");
Header("Expires: Mon, 26 Jun 1997 05:00:00 GMT");
Header("Pragma: no-cache");


define('IN_PHPBB', true);
$phpbb_folder_name = 'phpBB';
$phpfreechat_folder_name = 'phpfreechat';

$phpbb_root_path = '../'.$phpbb_folder_name.'/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "phpBB Forum Chat";
$params["serverid"] = md5("phpfreechat"); // calculate a unique id for this chat
$params["channels"] = array("General");
$params["language"] = "en_US";
//$params["nick"] = iconv("iso-8859-1", "UTF-8", $userdata[username]);
$params["nick"] = iconv("windows-1251", "UTF-8", $userdata[username]);
$params["theme"] = "phpbb2";
$params["frozen_nick"] = true;
$params["proxies_cfg"]["censor"]["words"] = array("heck","darn");
$params["isadmin"] = false;
$params["max_nick_len"] = 30;
$params["timeout"] = 60000;
if ($userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD) $params['isadmin'] = true;
//$params["isadmin"] = true; // just for debug ;)
//$params["debug"] = 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 xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="pragma" content="no-cache" />
    <title>
      <?php echo($board_config['sitename']); ?> :: Chat
    </title>

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

    <link rel="stylesheet" href="<?php echo($phpbb_root_path . 'templates/subSilver/subSilver.css'); ?>"
    type="text/css" />
    <style type="text/css">
      #pfc_minmax { display: none; }

      a:link, a:visited, a:hover {
          font-weight: bold;
          text-decoration: none;
      }
      a:hover {
          text-decoration: underline;
      }
      .nospace { word-spacing: -0.35em; }
      div.content {
                    margin-top: 5px;
                    margin-bottom: 4px;
                    padding: 1em;
                    margin-left: 6px;
                    margin-right: 6px;
                    background-color: #FFF;
                    border: 2px #006699 solid;
                    min-height: 40em;
                    font-family: Verdana, Sans-Serif;
                    font-size: 100%;
                  }
      div.content * { margin-top: 0.5em; margin-bottom: 0.5em; }
      div.content a img { border: none; }
      div.content h2 { border-bottom: 1px #444 solid; }
      div.content h3 { text-decoration: underline; font-size: 100%; margin: 1em 0 1em 0; }
      div.content a:link, div.content a:visited, div.content a:hover { color: #0081ac; }
      div.content a:visited { color: #ac0011; }
      div.content code { background-color: #EFE; border: 1px #444 dotted; }
      div.content pre { padding: 1em; background-color: #f3fce5; border: 1px #444 dotted; }
      div.content ul { margin-left: 3em; }
      div.content ol { margin-left: 3em; }
      div.content dd { margin-left: 3em; }
      div.content dt { font-weight: bold; margin: 2em 0 2em 0; }
      div.content .abstract { border: 2px #999 solid; background-color: #EEE; padding: 1em; color: #000; text-align: justify; }
    </style>
  </head>
  <body>
    <?php
    if($userdata['session_logged_in'])
    {
      echo('<span class="gen">');
      echo('Hi '.$userdata['username'].'! <a href="'.$phpbb_root_path.'login.php?logout=true&sid='.$userdata['session_id'].'&redirect=..%2F'.$phpfreechat_folder_name.'%2F'.'">Logout</a>');
      echo('</span><br />');
    ?>
    <div class="content">
      <?php $chat->printChat(); ?>
    <p>
      Tips:
    </p>
    <ul>
      <li>
        To open a <strong>private chat</strong>, click on
         the nickname in the right column (user list).
      </li>
      <li>
        To <strong>join a channel</strong>, type this
         text in the input box : <code>/join yourchannelname</code>
         (replace yourchannelname by what your want)
      </li>
      <li>
        To listen <strong>sound notification</strong>,
        put your chat window in the background and wait
        for someone post a message.
      </li>
    </ul>
    </div>
    <?php
    }
    else
    {
    ?>
    <span class="gen">Hi Guest!</span><br />
    <form action="<?php echo($phpbb_root_path); ?>login.php" method="post" enctype="multipart/form-data">
      <table width="400" cellpadding="4" cellspacing="1" border=
      "0" class="forumline" align="center" summary="Login Box">
        <tr>
          <th height="25" class="thHead" nowrap="nowrap">
            Please enter your username and password to log in.
          </th>
        </tr>
        <tr>
          <td class="row1">
            <table border="0" cellpadding="3" cellspacing="1"
            width="100%" summary="">
              <tr>
                <td colspan="2" align="center">
                   
                </td>
              </tr>
              <tr>
                <td width="35%" align="right">
                  <span class="gen">Username:</span>
                </td>
                <td>
                  <input type="text" name="username" size="25"
                  maxlength="40" value="" />
                </td>
              </tr>
              <tr>
                <td align="right">
                  <span class="gen">Password:</span>
                </td>
                <td>
                  <input type="password" name="password" size=
                  "25" maxlength="32" />
                </td>
              </tr>
              <tr align="center">
                <td colspan="2">
                  <span class="gen">Log me on automatically each
                  visit: <input type="checkbox" name="autologin"
                  value="ON" /></span>
                </td>
              </tr>
              <tr align="center">
                <td colspan="2">
                  <input type="hidden" name="redirect" value=
                  "../<?php echo($phpfreechat_folder_name); ?>/index.php" /><input type="submit"
                  name="login" class="mainoption" value=
                  "Log in" />
                </td>
              </tr>
              <tr align="center">
                <td colspan="2">
                  <span class="gensmall"><a href=
                  "<?php echo($phpbb_root_path.'profile.'.$phpEx.'?mode=sendpassword'); ?>"
                  class="gensmall">I forgot my password</a>
                   :: 
                  <a href=
                  "<?php echo($phpbb_root_path.'profile.'.$phpEx.'?mode=register'); ?>"
                  class="gensmall"><?php echo $lang['Register']; ?></a>
                  </span>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </form>
    <?php
    }
    ?>
  </body>
</html>


This sounds like what I want to do, but I keep getting this error:
Code: Select all
Warning: main(../phpBB3/extension.inc): failed to open stream: No such file or directory in /home/content/webroot/html/chat/index.php on line 13

Warning: main(): Failed opening '../phpBB3/extension.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/webroot/html/chat/index.php on line 13

Fatal error: Call to undefined function: session_pagestart() in /home/content/webroot/html/chat/index.php on line 16

Cookie path is / in phpBB

Line 13 is include($phpbb_root_path . 'extension.inc');
Line 16 is $userdata = session_pagestart($user_ip, PAGE_INDEX);

Anyone have an idea?
install3845
New member
 
Posts: 2
Joined: Sat Aug 15, 2009 9:27 am
Top

Postby drevv » Sat Aug 15, 2009 11:10 pm

already tried to delete the cache folder?
drevv
Member
 
Posts: 11
Joined: Tue Aug 11, 2009 4:33 pm
Top

Postby install3845 » Sun Aug 16, 2009 4:49 am

Yeah, I think what it was is that phpBB3 doesn't use that file anymore.
install3845
New member
 
Posts: 2
Joined: Sat Aug 15, 2009 9:27 am
Top

Postby MarkHoward » Tue Sep 29, 2009 3:37 am

I have a problem integrating with phpBB3.
I'm testing locally and have directly under .htdocs
NZMotorhomeForum - which is the root folder for the forum and
NZMotorhomeChat - the phpFreeChat folder

My code is as follows:
Code: Select all
  define('IN_PHPBB', true);
  $phpbb_folder_name = 'NZMotorhomeForum';
  $phpfreechat_folder_name = 'NZMotorhomeChat';
 
  $phpbb_root_path = '../'.Sphpbb_folder_name.'/'; // adjust this path to your forum installation root
  include( $phpbb_root_path . 'extension.inc' );
  include( $phpbb_root_path . 'common.' . $phpEx );
 
  $userdata = session_pagestart($user_ip, PAGE_INDEX);
  init_userprefs($userdata);
 
  // redirect to phpBB logon page if the user is not logged in
  if ( !$userdata['session_logged_in'] )
    redirect(append_sid($phpbb_root_path . "login.$phpEx?redirect=" . $chat_root_phpbbrealtive_path . "index.$phpEx", true));

and the error messages are:
Code: Select all
Warning: include(../Sphpbb_folder_name/extension.inc) [function.include]: failed to open stream: No such file or directory in D:xampphtdocsNZMotorhomeChatchat.php on line 9

Warning: include() [function.include]: Failed opening '../Sphpbb_folder_name/extension.inc' for inclusion (include_path='.;D:xamppphppear') in D:xampphtdocsNZMotorhomeChatchat.php on line 9

Warning: include(../Sphpbb_folder_name/common.) [function.include]: failed to open stream: No such file or directory in D:xampphtdocsNZMotorhomeChatchat.php on line 10

Warning: include() [function.include]: Failed opening '../Sphpbb_folder_name/common.' for inclusion (include_path='.;D:xamppphppear') in D:xampphtdocsNZMotorhomeChatchat.php on line 10

Fatal error: Call to undefined function session_pagestart() in D:xampphtdocsNZMotorhomeChatchat.php on line 12

I have searched for a file called extension.inc and cannot find one in the Xampp (localhost) folder structure.
I hope someone can give me some pointers - I'm not a php programmer.
BTW the cookie location in phpBB3 is set to /
MarkHoward
Member
 
Posts: 20
Joined: Sun Jul 19, 2009 12:47 am
Top

PreviousNext

Post a reply
36 posts • Page 2 of 3 • 1, 2, 3

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

Who is online

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