[DEV] PhpbbMyChat (phpMyChat Integration) V0.1.4

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
testebr
Registered User
Posts: 303
Joined: Thu Nov 28, 2002 5:05 am

Post by testebr » Sun Jan 26, 2003 5:55 pm

I installed this mod and I funcinou PERFECTLY!

Now I need to make a private room, as I I make this?

Nathan_Anderson
Registered User
Posts: 755
Joined: Tue Mar 19, 2002 5:04 pm
Contact:

Post by Nathan_Anderson » Sun Jan 26, 2003 6:19 pm

Hmm,

Both of your setting look correct: Can you both verify that the following code is located in your "include/page_header.php" around line 260.

Code: Select all

if( $userdata['session_logged_in'] ) {
   // Do Cleanup on Users in Chat mode.
   if (!defined("C_USR_DEL")) define("C_USR_DEL", '4');
   $sql = "DELETE FROM ".$table_prefix."c_users WHERE u_time < ".(time() - C_USR_DEL * 60)." OR (status = 'k' AND u_time <  ".(time() - 20).")";
   $status = $db->sql_query($sql);

   $sql = "SELECT DISTINCT username FROM ".$table_prefix."c_users";
   $status = $db->sql_query($sql);
   if ($status) {
     $l_chatting_users = $db->sql_numrows();
   } else {
     $l_chatting_users = 0;
   }
}
Pay specific attention to the line:

Code: Select all

   $sql = "SELECT DISTINCT username FROM ".$table_prefix."c_users";
verify that there is not a ';' in the "c_users;";. I had a bug in the earlier instructions and it worked on some systems and not on others with the ";"

Nathan.

Nathan_Anderson
Registered User
Posts: 755
Joined: Tue Mar 19, 2002 5:04 pm
Contact:

Post by Nathan_Anderson » Sun Jan 26, 2003 6:20 pm

testebr wrote: I installed this mod and I funcinou PERFECTLY!

Now I need to make a private room, as I I make this?


Look in the /lib/config.lib.php file; it has a array for "private" rooms. Then when you log into chat; the person would type /join my_private_Room

nathan.

Tobi
Registered User
Posts: 48
Joined: Sun Dec 30, 2001 11:44 pm
Location: Germany
Contact:

Post by Tobi » Sun Jan 26, 2003 6:36 pm

Hi,
Nathan_Anderson wrote: verify that there is not a ';' in the "c_users;";. I had a bug in the earlier instructions and it worked on some systems and not on others with the ";"


I do not think, that this is the problem. The fonts in chatlink.php looks very large, like it has problems to get the css file. Maybe there are problems with some variables...

Tobi

Nathan_Anderson
Registered User
Posts: 755
Joined: Tue Mar 19, 2002 5:04 pm
Contact:

Post by Nathan_Anderson » Sun Jan 26, 2003 7:22 pm

If that SQL statement doesn't run you will get what you are talking about (0 users alway). If the rest of the chatting works fine; then more than likely the problem is located in that bit of code that I posted.

Nathan.
P.S. I'm assuming the chat is located in the /forum/chat directory correct?

User avatar
Balint
Registered User
Posts: 952
Joined: Tue Aug 06, 2002 2:19 pm
Location: Germany
Contact:

Post by Balint » Sun Jan 26, 2003 11:57 pm

Hi!

I've installed the MOD under 2.0.3. After upgrading to 2.0.4 I'm experiencing problems. On all pages except the index.php the number of users in the chat is not shown. I checked the code in page_header.php and overall_header.tpl, they are correct.

EDIT: Removed due to session problems...

Before upgrading to 2.0.4 everything worked fine... :(

Regards,
Bálint
Last edited by Balint on Mon Feb 10, 2003 11:50 pm, edited 1 time in total.

Nathan_Anderson
Registered User
Posts: 755
Joined: Tue Mar 19, 2002 5:04 pm
Contact:

Post by Nathan_Anderson » Mon Jan 27, 2003 12:14 am

All,

Is everybody that is having problems running 2.04?

Nathan.
P.S. I downloaded 2.04 but haven't spent the time to re-mod it yet. :)

uehlein
Registered User
Posts: 11
Joined: Mon Jan 20, 2003 9:18 pm

Post by uehlein » Mon Jan 27, 2003 2:31 am

My code is

Code: Select all

 $sql = "SELECT DISTINCT username FROM ".$table_prefix."c_users";
I even tried changing that to the hard code the table prefix... no luck...

uehlein
Registered User
Posts: 11
Joined: Mon Jan 20, 2003 9:18 pm

Post by uehlein » Mon Jan 27, 2003 2:54 am

I am on .04

Tobi
Registered User
Posts: 48
Joined: Sun Dec 30, 2001 11:44 pm
Location: Germany
Contact:

Post by Tobi » Mon Jan 27, 2003 5:46 pm

Hi,
Nathan_Anderson wrote: Is everybody that is having problems running 2.04?


yep, I am running 2,04 ;)

Tobi

Nathan_Anderson
Registered User
Posts: 755
Joined: Tue Mar 19, 2002 5:04 pm
Contact:

Post by Nathan_Anderson » Mon Jan 27, 2003 7:00 pm

Interesting, I just upgraded my board to v2.04 and it is working. However after looking at my instructions -- I'm pretty sure I know why you all are having problems. In the page_header.php

v2.04 added a new if statement that envelopes the code that shows how many people are online. The closeing bracket "}" is:

Code: Select all

$l_online_users = sprintf($l_t_user_s, $total_online_users);
$l_online_users .= sprintf($l_r_user_s, $logged_visible_online);
$l_online_users .= sprintf($l_h_user_s, $logged_hidden_online);
$l_online_users .= sprintf($l_g_user_s, $guests_online);
}
^- Right here.
If you follow the instructions; you will be putting the chat count code on the wrong side of the "}" :-)

Code: Select all

$l_online_users = sprintf($l_t_user_s, $total_online_users);
$l_online_users .= sprintf($l_r_user_s, $logged_visible_online);
$l_online_users .= sprintf($l_h_user_s, $logged_hidden_online);
$l_online_users .= sprintf($l_g_user_s, $guests_online);

[this is where you probably put the chat code]
}

You need to put the chat code after the closing brace; so it will be run always not only on the main page.

Code: Select all

$l_online_users = sprintf($l_t_user_s, $total_online_users);
$l_online_users .= sprintf($l_r_user_s, $logged_visible_online);
$l_online_users .= sprintf($l_h_user_s, $logged_hidden_online);
$l_online_users .= sprintf($l_g_user_s, $guests_online);

}
[this is where you need to put the chat code]

Nathan.

uehlein
Registered User
Posts: 11
Joined: Mon Jan 20, 2003 9:18 pm

Post by uehlein » Mon Jan 27, 2003 7:07 pm

I told you that you were the GREAT Nathan! This has fixed the problem! You are da Man! Thanks! Great Mod! Can I add more "!s" :)

Oh... forgot something... mine was a new isntall... would this have made a difference?

Nathan_Anderson
Registered User
Posts: 755
Joined: Tue Mar 19, 2002 5:04 pm
Contact:

Post by Nathan_Anderson » Mon Jan 27, 2003 7:34 pm

uehlein wrote: Oh... forgot something... mine was a new isntall... would this have made a difference?


Nope; wouldn't have made a difference. The instructions said to put it after those lines; but in 2.03 and prior the "}" didn't exist. So If you followed the instructions properly in 2.04 it wouldn't work. :)

Nathan.

uehlein
Registered User
Posts: 11
Joined: Mon Jan 20, 2003 9:18 pm

Post by uehlein » Mon Jan 27, 2003 7:46 pm

Well... at least I did it right ;) Thanks again!

Tobi
Registered User
Posts: 48
Joined: Sun Dec 30, 2001 11:44 pm
Location: Germany
Contact:

Post by Tobi » Mon Jan 27, 2003 10:54 pm

Hi,

great, it is also working for me! Thanks!

Tobi

Locked

Return to “[2.0.x] MODs in Development”

cron