Jump to content
MakeWebGames

Recommended Posts

Posted

[align=center]FREE AJAX CHAT[/align]Hi i found this old chat script on my computer, i found the simple ajax chat on the web at 1st it used an external file called chat.txt to add/read content ive edited it to run off mysql this is only a simple chat script that alows you to post and chat, i will be intergrating diffrent options as i update the mod. Things like chat ban, remove/edit post etc...

Please note i did not make the chat nor the bbcode function they were scripts i have on my computer made by someone else ... they were free to distribute i will find links to original source if i can find them

all i did was convert the chat to work with mccodes and a mysql backend insted of reading from a txt filehere is the download link ...

http://www.cddesigns.org/mods.php?dl=ajchat

 

Enjoy :D

Posted

The only problem you have there is you have set it to num rows -26 on the receive.php so throws a boolean error when you first have the chat as there is no rows.

But you can resolve that by checking the number of rows and setting the value to 0.

You can also include global_func to call in any functions for special names and colors.

Here it is quickly installed and styled to my game theme. Not going to use this one as I have an ajax chat installed already.

ajch.jpg

Very simple and clean. You would really wanna remove the ability to use img bbcode from this though as it will just create havoc!

Posted

v1.0.1 relesed

boolean error fixed,

delet posts added,

4 bb coides removed (code, size, img and quote) if you want any of these just uncomment them in receive.php

Enjoy :D

Posted

v1.0.2 Relesed

Bug Fix - users now cant submit nothing

Chat lines are deleted every 24 hours to reduce server space (editable see README file)

Instalation instructions added, for the few who dont know how to :rolleyes:

Enjoy :D

  • 2 weeks later...
Posted

Didn't work at first, just had to change send.php:

if ($_GET['msg']) {

mysql_query("INSERT INTO chat(`name`, `msg`, `time`) VALUES ('".$name."', '".$text."', UNIX_TIMESTAMP())");

to

if ($_GET['name']) {

$db->query("INSERT INTO chat VALUES ('','".$name."', '".$text."', UNIX_TIMESTAMP())");

and add a new field to the chat table called time, VARCHAR255. Other than that, nice basic little chat, with a little editing/new features it could be a nicer little chat. Thanks for sharing :)

Posted

try

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

as this checks if the user has typed anything, otherwise they can hit the send button loads of times and spam your DB

  • 5 months later...
Posted

[mysql]

CREATE TABLE IF NOT EXISTS `chat` (

`id` int(11) NOT NULL AUTO_INCREMENT,

`name` varchar(255) NOT NULL,

`msg` text NOT NULL,

`time` int(11) NOT NULL AUTO_INCREMENT,

PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;[/mysql]

gives

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

  • 1 month later...
  • 3 months later...
Posted

The link is working ... but its not.

Once on the 404 error page look at the reasons and click the alternative link to the old site ;)

Posted
The link is working ... but its not.

Once on the 404 error page look at the reasons and click the alternative link to the old site ;)

ya i did, but once i agree to fair usage thing, it directs me to the new link (404 page) again. :S
  • 5 months later...
Posted
[align=center]FREE AJAX CHAT[/align]Hi i found this old chat script on my computer, i found the simple ajax chat on the web at 1st it used an external file called chat.txt to add/read content ive edited it to run off mysql this is only a simple chat script that alows you to post and chat, i will be intergrating diffrent options as i update the mod. Things like chat ban, remove/edit post etc...

Please note i did not make the chat nor the bbcode function they were scripts i have on my computer made by someone else ... they were free to distribute i will find links to original source if i can find them

all i did was convert the chat to work with mccodes and a mysql backend insted of reading from a txt filehere is the download link ...

http://www.cddesigns.org/mods.php?dl=ajchat

 

Enjoy :D

I know this is an old post so don't kill me........ Nice chat but for some reason it does not show the time stamp. How do I make it so oh mccodes gurus?

Posted (edited)
where did you want it to display the timestamp?

Next to the message that is submitted. Another problem I cant figure out. I keep getting this on any user but id1 without doing anything. http://i51.tinypic.com/v7xe1u.png "Nope that dont work"

The code:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Edited by Mystical
Posted
I keep getting this on any user but id1 without doing anything.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

If it's working on ID 1 and no other, then is it not working correctly? Unless you mean you have other staff accounts where it doesn't work?

Posted
If it's working on ID 1 and no other, then is it not working correctly? Unless you mean you have other staff accounts where it doesn't work?

No I mean that if you are any user except id1 this shows and should not unless someone is trying to delete messages who is not the admin.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...