Jump to content
MakeWebGames

Simple jQuery Ajax Shoutbox


Dave

Recommended Posts

Someone had requested this to be made and because it's generally a simple task I thought I'd put together a simple free one.

This mod is very simple and lacks decent features (Such as smileys, Ban/Delete and so on.) I'd appreciate if others could reply to this with those features so I don't have to create the whole modification.

Little terms of use:

  • If you have any paid mods that you have not paid for installed on your site you are not allowed to use this modification.
  • Not for re-sale or re-distribution.
  • The comments at the top of the files must stay in place.

Firstly add this to the bottom of globals.php (Just before the ?>)

You're unable to view this code.

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

 

Create a file called xml_shoutbox.php

You're unable to view this code.

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

 

Then run the following SQL's

You're unable to view this code.

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

 
Link to comment
Share on other sites

Just a few picks

Why said the variable $userid when you can just use $_SESSION['userid'] on the queries?

You may want to do a few more checks on the message, users are so untrustable >.<

Also, htmlentities on input and then htmlentities on output? You could strip_tags and ensure it's a string...

Other than that, looks awesome. I'd test it, but I don't have McCodes, anywhere. :)

Awesome job for releasing all this free stuff aswell

Link to comment
Share on other sites

Just a few picks

Why said the variable $userid when you can just use $_SESSION['userid'] on the queries?

You may want to do a few more checks on the message, users are so untrustable >.<

Also, htmlentities on input and then htmlentities on output? You could strip_tags and ensure it's a string...

Other than that, looks awesome. I'd test it, but I don't have McCodes, anywhere. :)

Awesome job for releasing all this free stuff aswell

$userid is alot quicker to type ;)

and It was a free mod so I wasn't going to spend years trying to make sure the message output was 100% safe.

Thanks for the feedback though.

Link to comment
Share on other sites

nice mod i like it but i have players complaining that it lags too much....is this because its calling the javascript file from a 3rd party site ?....

I was wondering if i copied the js file to my server if the chat would run smoother ?...

 

Thanks Guys...

Link to comment
Share on other sites

so im curious, there is no way i can make this run with a lot less lag ?.....

I did notice when there where only like 5 or 10 posts that it did run smooth but once the Post count got higher(i set max to display 250) the lag began and would get worse the more posts that were shown....

Im willing to pay for a smooth running shoutbox/chat similar to this because its nice.

cheers

Link to comment
Share on other sites

Looks "ok", but that "getUsername()" function is useless, what is the point in that? running aload more queries when there is no need.

Not really crazyt... It's alot easier then selecting the username within the code.

so im curious, there is no way i can make this run with a lot less lag ?.....

I did notice when there where only like 5 or 10 posts that it did run smooth but once the Post count got higher(i set max to display 250) the lag began and would get worse the more posts that were shown....

Im willing to pay for a smooth running shoutbox/chat similar to this because its nice.

cheers

You could pay someone to write a better one? Or set the limit to like 20 so every time it refreshes it's not loading * amount of posts.

Link to comment
Share on other sites

People come on, please stop complaining about a "Free" script. It is "Free" not like you paid for it..

If you know a better way then make it and use/release it....

I will never understand someone downing someone over something free. (when it is something that someone wanted/requested).

Link to comment
Share on other sites

People come on, please stop complaining about a "Free" script. It is "Free" not like you paid for it..

If you know a better way then make it and use/release it....

I will never understand someone downing someone over something free. (when it is something that someone wanted/requested).

Well said... I would appreciate that people do not insult my methods of coding scripts. I have flaws within my methods but did you release this mod for free?

Link to comment
Share on other sites

Looks "ok", but that "getUsername()" function is useless, what is the point in that? running aload more queries when there is no need.

Not really crazyt... It's alot easier then selecting the username within the code.

No it isn't, a simple join onto the users table and you have the username? Then there is no need for more code (the getUsername() function).

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...
  • 3 weeks later...

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