Thread subject: Official Home of the PHPFusion CMS :: Chat Program for 8.00.100

Posted by daimonbok1 on 18-08-2022 14:24
#1

[quote name=Grimloch post=211594]@Grimloch - Fred. If you have the GroChat script please send it to me.[/quote]

Grimloch, look in your PM area for the link...

Gene

Posted by Grimloch on 18-08-2022 15:43
#2

@daimonbok1
Thanks for the link but my friend Fred already sent me the zip.
I'm afraid I have some bad news. After trying to run this script(s) and examinng all the error logs I'm getting, this code is just too old and would require an almost complete re-write. That is sometning that unfortunately, is beyond my capabilities. I tried several things such as re-doing the 'class' part in chat.php and can't even get that to work. I'm pretty good at modifying someone elses code to do what I want it to do as long as it's fairly new stuff but this is beyond me as like I said, it requires an almost complete re-write.
Sorry man; this is a hill I just can't climb.

Posted by daimonbok1 on 18-08-2022 16:40
#3

[quote name=Grimloch post=211596]@Grimloch - @daimonbok1
Thanks for the link but my friend Fred already sent me the zip.
I'm afraid I have some bad news. After trying to run this script(s) and examinng all the error logs I'm getting, this code is just too old and would require an almost complete re-write. That is sometning that unfortunately, is beyond my capabilities. I tried several things such as re-doing the 'class' part in chat.php and can't even get that to work. I'm pretty good at modifying someone elses code to do what I want it to do as long as it's fairly new stuff but this is beyond me as like I said, it requires an almost complete re-write.
Sorry man; this is a hill I just can't climb.[/quote]

No problem...was a thought as it ran well under early php 5....

Sooner of later, something will work...

Gene

Posted by afoster on 18-08-2022 17:01
#4

After doing some googling, I found that if you change this "$HTTP_SESSION_VARS" (without the quotes) to $_SESSION in all the files, the binding error message goes away and a message that [username] enters the room is displayed.

The problem is that if you enter a message, what you get is "username > lack" (again without the quotes) and I have not been able to figure out how to fix that bit of problem.

Posted by Grimloch on 18-08-2022 19:58
#5

That's funny; I extracted a fresh copy from the zip and did the same thing. Changed $HTTP_SESSION_VARS to $_SESSION_VARS but it doesn't work for me. I still get the message 'Cannot bind session'. I also changed all open php short tags '<?' to the full tag '<?php' that didn't help either. When I try to run it I get like 92K of errors in the error_log. Here are the errors I get:
Code
[18-Aug-2022 12:42:58 America/Chicago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Chat has a deprecated constructor in /home/grimsweb/rogue.grimswebdesign.us/grochat-0.4/chat.php > line 3
[18-Aug-2022 12:42:58 America/Chicago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Message has a deprecated constructor in /home/grimsweb/rogue.grimswebdesign.us/grochat-0.4/chat.php on line 300

Dunno man...

I just tried lowering my php version from 7.4 to 5.6... made no difference...

Edited by Grimloch on 18-08-2022 20:30

Posted by afoster on 18-08-2022 20:53
#6

I think that if you change from $HTTP_SESSION_VARS" (without the quotes) to $_SESSION it will work. You have added a VARS to the $_SESSION which is why I don't think it works in your case.

I still have not figured out why it won't posts any messages however.

Posted by afoster on 18-08-2022 22:55
#7

I just came across this chat script that gives you the option of using a database or text files.

https://coursesweb.net/php-mysql/scri...-simple_s2

Posted by Ernst74 on 19-08-2022 10:28
#8

@Grimloch
Change
Code
function Chat() {

to
Code
function __construct() {


and
Code
function Message($line) {

to
Code
function __construct($line) {

Posted by daimonbok1 on 19-08-2022 14:03
#9

Ernst74 thanks!!!

Gene

Posted by daimonbok1 on 19-08-2022 15:45
#10

[quote name=afoster post=211601]@afoster - I just came across this chat script that gives you the option of using a database or text files.

https://coursesweb.net/php-mysql/scri...-simple_s2[/quote]

I'll give it a check, at least it has multiple chat rooms, good for my sci fi site and adult site.

Posted by daimonbok1 on 19-08-2022 15:49
#11

[quote name=Grimloch post=211599]@Grimloch - That's funny; I extracted a fresh copy from the zip and did the same thing. Changed $HTTP_SESSION_VARS to $_SESSION_VARS but it doesn't work for me. I still get the message 'Cannot bind session'. I also changed all open php short tags '<?' to the full tag '<?php' that didn't help either. When I try to run it I get like 92K of errors in the error_log. Here are the errors I get:
Code
[18-Aug-2022 12:42:58 America/Chicago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Chat has a deprecated constructor in /home/grimsweb/rogue.grimswebdesign.us/grochat-0.4/chat.php > line 3
[18-Aug-2022 12:42:58 America/Chicago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Message has a deprecated constructor in /home/grimsweb/rogue.grimswebdesign.us/grochat-0.4/chat.php on line 300

Dunno man...

I just tried lowering my php version from 7.4 to 5.6... made no difference...[/quote]

Tried all this myself and didn't work, afoster sent a link for another chat program. I'll loadit up and see if it works in 7.4 and let you know.

Posted by daimonbok1 on 19-08-2022 16:16
#12

[quote name=afoster post=211601]@afoster - I just came across this chat script that gives you the option of using a database or text files.

https://coursesweb.net/php-mysql/scri...-simple_s2[/quote]

Got the file, uploaded it to my one site and it works great. we'll just have to use iframes to run it thru fusion. No problem on my end...

Gene

Posted by Grimloch on 19-08-2022 16:58
#13

Yes this is the one guys!! Really great script. Here is mine if you want to check it out:
Chat Test of Simple Chat

Edited by Grimloch on 19-08-2022 17:00

Posted by Grimloch on 19-08-2022 17:33
#14

[quote name=daimonbok1 post=211607]@daimonbok1 - [quote name=afoster post=211601]@afoster - I just came across this chat script that gives you the option of using a database or text files.

https://coursesweb.net/php-mysql/scri...-simple_s2[/quote]

Got the file, uploaded it to my one site and it works great. we'll just have to use iframes to run it thru fusion. No problem on my end...

Gene[/quote]
Actually Gene there is a better way (or at least another way). For mine I just moved the chat system folders to my root and created a php file to access it and created a site link. If you're interested here's the page code I created. I called it chat_test.php.
Code
<?php
require_once "maincore.php";
require_once THEMES."templates/header.php";
$settings = fusion_get_settings();
opentable(""wink;
echo "<table align='center' cellpadding='5' cellspacing='0' border='1'><tr>
<td bgcolor='#860000' align='center'><br><span style='font-size: 20px; color: #FFF;'><b>Rogue Worlds Simple Chat System</b></span><br><br>";
echo "<div id='chatarea' data-style='auto'></div>
n";
echo "</td>
 </tr></table><p></p>";
closetable();
require_once THEMES."templates/footer.php";
?>

Posted by daimonbok1 on 19-08-2022 18:52
#15

Looks Nice. Now to add to the rest of my sites. wink

Posted by Grimloch on 19-08-2022 20:25
#16

[quote name=daimonbok1 post=211610]@daimonbok1 - Looks Nice. Now to add to the rest of my sites. wink[/quote]
Take note Gene. If you add it to a ver8 site you must remove the $settings = fusion_get_settings(); from the code.

Posted by daimonbok1 on 20-08-2022 14:57
#17

[quote name=Grimloch post=211611]@Grimloch - [quote name=daimonbok1 post=211610]@daimonbok1 - Looks Nice. Now to add to the rest of my sites. wink[/quote]
Take note Gene. If you add it to a ver8 site you must remove the $settings = fusion_get_settings(); from the code.[/quote]

Working fine here.....