BulaRae - 2007-02-21

I installed this no problem, and I work with a lot of CMS's and e-commerce even tho I don't know PHP. I can make my way around well enough and I usually know code when I'm looking for certain things.

But god help me, I can't figure out how to integrate this board into my PHPBB template! I feel so stupid!!

So this is what it says in index.php

<?php
// This is an example of what may be done to include phpMyChat into an
// existing web page, regardless of its name.
// You can also include such a file in a frameset.

// Lines below must be at the top of your file because 'index.lib.php'
// sets headers and cookies.
$ChatPath = "chat/"; // relative path to chat dir, empty value if this
// file is in the same dir than the chat;
require("./${ChatPath}lib/index.lib.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir="<?php echo(($Charset == "windows-1256") ? "RTL" : "LTR"); ?>">

<HEAD>
<?php
// You can put html head statements right after the "<HEAD>" tag.

// Both values are boolean. See explanations in 'index.lib.php' file.
send_headers(1,1);
?>
</HEAD>

<BODY>
<?php
// If nothing other than phpMyChat is loaded in this page, or if you want
// to have the same background color as phpMyChat for the whole page,
// you have to modify the BODY tag to '<BODY CLASS="ChatBody">'
// You can put html statements right after the "<BODY>" tag or add
// php code here.

$Is_Error = (isset($Error));

if (isset($HTTP_COOKIE_VARS))
{
if (isset($HTTP_COOKIE_VARS["CookieUsername"])) $CookieUsername = $HTTP_COOKIE_VARS["CookieUsername"];
if (isset($HTTP_COOKIE_VARS["CookieRoom"])) $CookieRoom = $HTTP_COOKIE_VARS["CookieRoom"];
if (isset($HTTP_COOKIE_VARS["CookieRoomType"])) $CookieRoomType = $HTTP_COOKIE_VARS["CookieRoomType"];
};
$Username = (isset($CookieUsername) ? $CookieUsername : "");
$Room_name = (isset($CookieRoom) ? $CookieRoom : "");
$Room_type = (isset($CookieRoomType) ? $CookieRoomType : "");

layout($Is_Error,$Username,$Room_name,$Room_type);

// You can add php code here, or add html statements before the "</BODY>" tag.
?>
</BODY>

</HTML>
<?php
// The following line is required
$DbLink->close();
?>

But it doesn't tell me where and how I use what parts of that? I don't get it!

My menu in my template header looks like this:

        &lt;a href=&quot;{U_PROFILE}&quot;&gt;{L_PROFILE}&lt;/a&gt; &amp;#8226;
I want to have &quot;Chat&quot; show up here as a Menu link
        &lt;a href=&quot;{U_PRIVATEMSGS}&quot;&gt;{L_PRIVATEMSGS}&lt;/a&gt; &amp;#8226; 
        &lt;a href=&quot;{U_SEARCH}&quot;&gt;{L_SEARCH}&lt;/a&gt; &amp;#8226; 
        &lt;a href=&quot;{U_FAQ}&quot;&gt;{L_FAQ}&lt;/a&gt; &amp;#8226; 
        &lt;a href=&quot;{U_MEMBERLIST}&quot;&gt;{L_MEMBERLIST}&lt;/a&gt; &amp;#8226; 
        &lt;a href=&quot;{U_GROUP_CP}&quot;&gt;{L_USERGROUPS}&lt;/a&gt; &amp;#8226; 
        &lt;a href=&quot;{U_LOGIN_LOGOUT}&quot;&gt;{L_LOGIN_LOGOUT}&lt;/a&gt;

What from the index.php file do I put in there? And do I have to change config.lib.php with some sort of Define?

I don't understand why this isn't blindingly obvious and simple to me. It seems like it should be!

THEN, I also want show Chat Activity in my Template Header. And the file chat_activity.php says this:
<?php
// This script is an example of display, in another page of your website,
// the list or number of users connected to the chat

// Lines below must be at the top of your file and completed according
// to your settings

// relative path from this page to your chat directory
$ChatPath = "chat/";

// HTML link to launch the chat (used by constants below)
$ChatLaunch = "<A HREF=\"phpMyChat.php\" TARGET=\"_self\">chatting</A>";

$ShowPrivate = "0"; // 1 to display users even if they are in a private room,
// 0 else

$DisplayUsers = "1"; // 0 to display only the number of connected users
// 1 to display a list of users

define("NB_USERS_IN","users are ".$ChatLaunch." at this time."); // used if $DisplayUsers = 0
define("USERS_LOGIN","User ".$ChatLaunch." at this time:"); // used if $DisplayUsers = 1
define("NO_USER","Nobody is ".$ChatLaunch." at this time.");

require("./${ChatPath}/lib/connected_users.lib.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>

<HEAD>
<TITLE>Integration of chat activity into your own web page</TITLE>
</HEAD>

<BODY>
<TABLE BORDER=3 CELLPADDING=5>
<TR>
<TD>
<?php
display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER);
?>
</TD>
</TR>
</TABLE>
</BODY>

</HTML>

But again, I don't know what, and where to insert! I'm confused by the top half of the file being PHP and the lower half being HTML.

If anyone has the patience to try to explain this to me, I'd really appreciate it!!