seanybob Posted January 9, 2007 Share Posted January 9, 2007 add to jail.php (somewhere where you want it to display) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. create file jailshout.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. create a blank text file called jailshouts.txt add to a daily cron You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Basically, it adds a shoutbox to the bottom of your jail. People can post in it, it is stored in a text file (NOT DATABASE)... every day (if you added the cron) the file is reset to blank, so the shoutbox is cleared. If anyone wants to edit this to make it so its posted to a database, feel free to add that here! To make this work for hospital... do everything the same, just rename everything to hosp or hospital :) Quote Link to comment Share on other sites More sharing options...
nheimberg Posted January 9, 2007 Share Posted January 9, 2007 Re: jail/hosp shoutbox Thanks seanybob. Works Perfect!!! Quote Link to comment Share on other sites More sharing options...
BreakingLight Posted January 9, 2007 Share Posted January 9, 2007 Re: jail/hosp shoutbox yeah it works good but i am not gonna stay with it.Nothing against Seanybob.But whats to stop people from psting adverts to other games.Unless there is something i have overlooked.I dont see an admin function to clear this.If i was to post www.somegamename.com right after the day cron passes it would be there till next day if i didnty change the cron.got any ideas on how to prevent this?Cause i do like the feature Quote Link to comment Share on other sites More sharing options...
boggl Posted January 9, 2007 Share Posted January 9, 2007 Re: jail/hosp shoutbox run the cron manually, or just empty the text file Quote Link to comment Share on other sites More sharing options...
seanybob Posted January 9, 2007 Author Share Posted January 9, 2007 Re: jail/hosp shoutbox yeah it works good but i am not gonna stay with it.Nothing against Seanybob.But whats to stop people from psting adverts to other games.Unless there is something i have overlooked.I dont see an admin function to clear this.If i was to post www.somegamename.com right after the day cron passes it would be there till next day if i didnty change the cron.got any ideas on how to prevent this?Cause i do like the feature You... are hilarious ;P if you want to stop them from adverting other games, just set up an eregi statement, or a search string or something that looks for www, com, net, etc...if it finds it, it sends ID 1 an event with the full text the user was trying, along with their ID number, if it doesnt, it posts it... I'm not gonna do all your work for ya m8 :) admin function to clear it? Aye caramba... you can either open up the text file and delete it, or run the cron manually (as boggl said), or make your own admin function :P Quote Link to comment Share on other sites More sharing options...
BreakingLight Posted January 10, 2007 Share Posted January 10, 2007 Re: jail/hosp shoutbox yeah it works good but i am not gonna stay with it.Nothing against Seanybob.But whats to stop people from psting adverts to other games.Unless there is something i have overlooked.I dont see an admin function to clear this.If i was to post www.somegamename.com right after the day cron passes it would be there till next day if i didnty change the cron.got any ideas on how to prevent this?Cause i do like the feature In that i dont think i ever asked got you to do it now did i? :wink: :-P Quote Link to comment Share on other sites More sharing options...
seanybob Posted January 10, 2007 Author Share Posted January 10, 2007 Re: jail/hosp shoutbox eh, i took it as implied as "nothing against seanybob, but what stops other users from advertising their game" or something like that... Quote Link to comment Share on other sites More sharing options...
hunter Posted January 14, 2007 Share Posted January 14, 2007 Re: jail/hosp shoutbox i copyed all files right and such i get this error Warning: fopen(jailshouts.txt) [function.fopen]: failed to open stream: Permission denied in /home/deeznuts/public_html/jailshout.php on line 21 Warning: fwrite(): supplied argument is not a valid stream resource in /home/deeznuts/public_html/jailshout.php on line 28 Warning: fclose(): supplied argument is not a valid stream resource in /home/deeznuts/public_html/jailshout.php on line 29 Can anyone help? Quote Link to comment Share on other sites More sharing options...
seanybob Posted January 14, 2007 Author Share Posted January 14, 2007 Re: jail/hosp shoutbox you may have to chmod the txt file to 777 do you know how to do that? If you have cuteftp, just right click the file, click chmod, and change to 777 Quote Link to comment Share on other sites More sharing options...
boggl Posted January 14, 2007 Share Posted January 14, 2007 Re: jail/hosp shoutbox Or 755 if you, or your host has safemode on, I believe Quote Link to comment Share on other sites More sharing options...
hunter Posted January 14, 2007 Share Posted January 14, 2007 Re: jail/hosp shoutbox thank you guys ill try that Quote Link to comment Share on other sites More sharing options...
hunter Posted January 14, 2007 Share Posted January 14, 2007 Re: jail/hosp shoutbox thanks guys worked :-D Quote Link to comment Share on other sites More sharing options...
UCC Posted January 17, 2007 Share Posted January 17, 2007 Re: jail/hosp shoutbox I installed it. Only took 5 minutes to make it look pretty and modify for 2.0. Thanks! Quote Link to comment Share on other sites More sharing options...
Satans_Pimp Posted June 16, 2007 Share Posted June 16, 2007 Re: [mccode] jail/hosp shoutbox is this for v2? sorry I am a noob but you already new that..lol :lol: Just started to learn how to code ! Thanks Quote Link to comment Share on other sites More sharing options...
03laceys Posted June 16, 2007 Share Posted June 16, 2007 Re: [mccode] jail/hosp shoutbox this works for both versions mate :wink: Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted June 17, 2007 Share Posted June 17, 2007 Re: [mccode] jail/hosp shoutbox i am editinh\g it to go on my menu for every one to see does any one know what to change this to if($ir['jailtime']>0 || $ir['user_level']==2) {include_once("jailshout.php");} Quote Link to comment Share on other sites More sharing options...
Satans_Pimp Posted June 17, 2007 Share Posted June 17, 2007 Re: [mccode] jail/hosp shoutbox ok got a small problem the mod works great love it but my problem is that know one can see it but staff..not sure why can any one help? thank for the free mods Quote Link to comment Share on other sites More sharing options...
seanybob Posted June 17, 2007 Author Share Posted June 17, 2007 Re: [mccode] jail/hosp shoutbox ok got a small problem the mod works great love it but my problem is that know one can see it but staff..not sure why can any one help? thank for the free mods My best guess would be your variables in the database for jail time and hospital time have different names. To check: Open up phpmyadmin. Browse the users table. Search for the word jail. Search for the word hospital. You should find a couple fields that should be pretty simple to understand. One will say jailreason/jailtext(varchar 255) or something like that, the other will just be jail/jailtime (int 11) Make sure you use the correct variable here if($ir['jailtime']>0 || $ir['user_level']==2) {include_once("jailshout.php");} Quote Link to comment Share on other sites More sharing options...
Satans_Pimp Posted June 18, 2007 Share Posted June 18, 2007 Re: [mccode] jail/hosp shoutbox Thank you it worked like a charm! :mrgreen: Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted July 17, 2007 Share Posted July 17, 2007 Re: [mccode] jail/hosp shoutbox Well instead of putting it onto the jail.php I've put it on the index.php, and instead of You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I've put You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. (I have called it shoutbox.php and changed the necessary things for it, yet when I post it still doesn't work :'-( Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted July 17, 2007 Share Posted July 17, 2007 Re: [mccode] jail/hosp shoutbox Disregard last message...I got it working...My browser for some stupid reason doesn't accept the pressing of the ENTER key on the keyboard. When I press enter after typing in the shoutbox, it just refreshes the page O_o...Yet to figure out why!! :-P Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted August 24, 2007 Share Posted August 24, 2007 Re: [mccode] jail/hosp shoutbox wat about hosp one Quote Link to comment Share on other sites More sharing options...
Cruisey Posted August 25, 2007 Share Posted August 25, 2007 Re: [mccode] jail/hosp shoutbox or maybe you could even add a ban feature so you have some kind of control with abusive users in the jailshout. this is for any Noobs as i know the rest will already know how to do this. open up jailshout.php look for this line of code if ($message != "") then under that add if($ir['userid'] == 0 || $ir['userid'] == 0) { die("<font color=red size=+1>Banned You have been banned from chat for the folowing reasons [*]Using black in your name [*]Using a color that site owners dont like [*]You were given a warning about your name [*]Abusive language to others [*]Flooding the chat with Marquees or similar content [*]Advertising other games Contact me ID 1 to get out of blocked</font> "); } just change the 0 in if($ir['userid'] == 0 to whatever id u want to ban. add as many extra || $ir['userid'] == 0) as u need remembering to just use ) once at the last bit of code. hope that helps some of you. :mrgreen: Quote Link to comment Share on other sites More sharing options...
Cruisey Posted August 25, 2007 Share Posted August 25, 2007 Re: [mccode] jail/hosp shoutbox i'm not questioning seany's expertise but i just changed the $ir['user_level']==2) to $ir['user_level'] > 0) to make everyone see the shout. just thought that might be easier for Noobs like me to follow. :-) Quote Link to comment Share on other sites More sharing options...
seanybob Posted August 25, 2007 Author Share Posted August 25, 2007 Re: [mccode] jail/hosp shoutbox i'm not questioning seany's expertise but i just changed the $ir['user_level']==2) to $ir['user_level'] > 0) to make everyone see the shout. just thought that might be easier for Noobs like me to follow. :-) Silly ;P If I remember correctly, the shoutbox is only visible to those in jail. The $ir['user_level']==2 means that in addition to those who are in jail, Admins can always see it (regardless of being in jail or not) 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.