Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
Forgot Password?
Navigation

Chat Program for 8.00.100

Last updated on 4 years ago
D
daimonbok1Senior Member
Posted 4 years ago

Grimloch wrote:

@Grimloch - Fred. If you have the GroChat script please send it to me.


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

Gene
G
GrimlochSenior Member
Posted 4 years ago
@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.
Energy can neither be created nor destroyed; only transformed !
D
daimonbok1Senior Member
Posted 4 years ago

Grimloch wrote:

@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.


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

Sooner of later, something will work...

Gene
A
afosterSenior Member
Posted 4 years ago
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.
G
GrimlochSenior Member
Posted 4 years ago
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:
[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 on 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...
Energy can neither be created nor destroyed; only transformed !
Edited by Grimloch on 18-08-2022 20:30, 4 years ago
A
afosterSenior Member
Posted 4 years ago
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.
A
afosterSenior Member
Posted 4 years ago
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
E
Ernst74Junior Member
Posted 4 years ago
@Grimloch
Change
function Chat() {

to
function __construct() {


and
function Message($line) {

to
function __construct($line) {
D
daimonbok1Senior Member
Posted 4 years ago
Ernst74 thanks!!!

Gene
D
daimonbok1Senior Member
Posted 4 years ago

afoster wrote:

@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


I'll give it a check, at least it has multiple chat rooms, good for my sci fi site and adult site.
D
daimonbok1Senior Member
Posted 4 years ago

Grimloch wrote:

@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:
[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 on 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...


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.
D
daimonbok1Senior Member
Posted 4 years ago

afoster wrote:

@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


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
G
GrimlochSenior Member
Posted 4 years ago
Yes this is the one guys!! Really great script. Here is mine if you want to check it out:
Chat Test of Simple Chat
Energy can neither be created nor destroyed; only transformed !
Edited by Grimloch on 19-08-2022 17:00, 4 years ago
G
GrimlochSenior Member
Posted 4 years ago

daimonbok1 wrote:

@daimonbok1 -

afoster wrote:

@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


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

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.
<?php
require_once "maincore.php";
require_once THEMES."templates/header.php";
$settings = fusion_get_settings();
opentable("");
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>
<script type='text/javascript' src='".BASEDIR."chatfiles/chatfunctions.js'></script>n";
echo "</td>
 </tr></table><p></p>";
closetable();
require_once THEMES."templates/footer.php";
?>
Energy can neither be created nor destroyed; only transformed !
D
daimonbok1Senior Member
Posted 4 years ago
Looks Nice. Now to add to the rest of my sites. wink
G
GrimlochSenior Member
Posted 4 years ago

daimonbok1 wrote:

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

Take note Gene. If you add it to a ver8 site you must remove the $settings = fusion_get_settings(); from the code.
Energy can neither be created nor destroyed; only transformed !
D
daimonbok1Senior Member
Posted 4 years ago

Grimloch wrote:

@Grimloch -

daimonbok1 wrote:

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

Take note Gene. If you add it to a ver8 site you must remove the $settings = fusion_get_settings(); from the code.


Working fine here.....
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
You cannot set up a bounty in this discussion thread.
Moderator: Support Team
Users who participated in discussion: afoster, karrak, Grimloch, douwe_yntema, Ernst74, daimonbok1