Dave Posted May 17, 2010 Share Posted May 17, 2010 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. Quote Link to comment Share on other sites More sharing options...
Equinox Posted May 17, 2010 Share Posted May 17, 2010 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 Quote Link to comment Share on other sites More sharing options...
Dave Posted May 17, 2010 Author Share Posted May 17, 2010 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. Quote Link to comment Share on other sites More sharing options...
CJ - Twitch Posted May 17, 2010 Share Posted May 17, 2010 Very Nice. :D Quote Link to comment Share on other sites More sharing options...
Equinox Posted May 17, 2010 Share Posted May 17, 2010 Just throwing it out there :) Still, great job Quote Link to comment Share on other sites More sharing options...
Djkanna Posted May 17, 2010 Share Posted May 17, 2010 Nice one Dave Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted May 18, 2010 Share Posted May 18, 2010 I thought you wasn't making mods anymore lol Quote Link to comment Share on other sites More sharing options...
Dave Posted May 19, 2010 Author Share Posted May 19, 2010 I thought you wasn't making mods anymore lol Paid mods. Quote Link to comment Share on other sites More sharing options...
Curt Posted May 20, 2010 Share Posted May 20, 2010 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... Quote Link to comment Share on other sites More sharing options...
Djkanna Posted May 20, 2010 Share Posted May 20, 2010 Probably would make it a slight faster load nothing else but that's not your problem calling the js framework from the Google CDN is a much better option ;) Quote Link to comment Share on other sites More sharing options...
CrazyT Posted May 20, 2010 Share Posted May 20, 2010 Looks "ok", but that "getUsername()" function is useless, what is the point in that? running aload more queries when there is no need. Quote Link to comment Share on other sites More sharing options...
Curt Posted May 20, 2010 Share Posted May 20, 2010 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 Quote Link to comment Share on other sites More sharing options...
Equinox Posted May 20, 2010 Share Posted May 20, 2010 Erm, Maybe I'm being blind, but.... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Is that being used anywhere? O.o Quote Link to comment Share on other sites More sharing options...
Danny696 Posted May 20, 2010 Share Posted May 20, 2010 erm mabey im blind, but doent $db allready do the or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
Dave Posted May 20, 2010 Author Share Posted May 20, 2010 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. Quote Link to comment Share on other sites More sharing options...
Equinox Posted May 20, 2010 Share Posted May 20, 2010 Yes Danny, I think it does. But still, I believe that query is useless....Selecting all from users and it's not even being used? O.o Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted May 20, 2010 Share Posted May 20, 2010 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). Quote Link to comment Share on other sites More sharing options...
Equinox Posted May 21, 2010 Share Posted May 21, 2010 I'm not 'downing'. I'm simply asking why that query is there? I've already said it's a good script. Quote Link to comment Share on other sites More sharing options...
Dave Posted May 23, 2010 Author Share Posted May 23, 2010 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? Quote Link to comment Share on other sites More sharing options...
CrazyT Posted May 24, 2010 Share Posted May 24, 2010 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). Quote Link to comment Share on other sites More sharing options...
CJ - Twitch Posted June 5, 2010 Share Posted June 5, 2010 Could someone convert xml_shoutbox.php to V1 please? Quote Link to comment Share on other sites More sharing options...
CJ - Twitch Posted June 5, 2010 Share Posted June 5, 2010 Done it... @Dave. Thanks for this. I have learnt a lot from this little script. Cheers. Quote Link to comment Share on other sites More sharing options...
ddgamedesign Posted July 7, 2010 Share Posted July 7, 2010 Can someone post the v1 version of the xml_shoutbox.php please? Quote Link to comment Share on other sites More sharing options...
Dave Posted July 18, 2010 Author Share Posted July 18, 2010 Done it... @Dave. Thanks for this. I have learnt a lot from this little script. Cheers. :) Was the main goal! Quote Link to comment Share on other sites More sharing options...
Aurora078 Posted August 9, 2010 Share Posted August 9, 2010 Nice one dave. I'm learning jQuery myself Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.