
iSOS
Members-
Posts
152 -
Joined
-
Last visited
Never -
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by iSOS
-
ooh, a link may have helped, my bad. <a href = "/gamerules.php?page=Add">Add Rule</a> Stick that in your staff panel, or the file it self, your choice. =)
-
A good way of getting some free advertising is put your game into BETA, make fan pages, just advertise to the community, google and the other search engines will see the incoming links and that will help, you'll in essence be getting some 'hype' up about your game. (Obviously it has to be good). Oh and 'CrimGame' has done a good job on the above ^.^
-
Maybe I'm wrong but wouldn't if($var['amt'] > $ir['money']) { Be fine? Why do you need to put $ir['money'] into a hidden field?
-
Good job illusions. @Jordan, what did you update that warranted it to be posted again as 'updated'?
-
Give me 2 methods of aligning text...(center,left,right) ect. Can be in any form, tables,divs,span,table cells anything.
-
Only problem for MCcodes will be 'magic_quotes', but it's a simple fix, just editing a couple of files will do the trick.
-
Sold. =) Nice smooth transaction, thanks.
-
I'm just wondering whether this was sold..?
-
Can I just ask what you have in the works for the engine, I don't want to make something you're already planning to release... Mailbox?
-
Mad Bomber ( Defuse this or have blue eyes one blew this way...)
iSOS replied to virtualshogun's topic in Free Modifications
I've previously made a modification like this just a 'lil more advanced. [mccode lite] Bomb User. Good job anyhow. -
Here ya go. <td>[[url="iteminfo.php?ID='.$item['itmid'].'"]Info[/url]][[url="itemsend.php?ID='.$item['inv_id'].'"]Send[/url]][[url="itemsell.php?ID='.$item['inv_id'].'"]Sell[/url]][[url="Auction.php?page=Add&ID={$i['itmid']}"]Add to Auction[/url]][[url="imadd.php?ID='.$item['inv_id'].'"]Add to market[/url]]';
-
Ah, thank you fbiss, the first post has been modified just to add a WHERE clause on the initial SELECT statement, it'll only select data within 1 second of being needed. Good eye fbiss :thumbsup:
-
No I wouldn't say so myself, with every user only aloud 1 auction at any time, even with 10k auctions, that means there's 10k players minimum, so "$ir" and any other of the predefined variables are pulling *alot* more data from the database than the auction query would ever have. Of course it could be done with the use of a cron, But from the usability of this particular modification a time-stamp is best. (And it would have to go in a 1 min cron anyway)
-
Thanks, & Thanks to SHAD
-
I'm not sure what you mean. Do you mean rule page? -- If so then yes.
-
Hi, this is just an updated/upgraded game rules page. As an Admin you can Add/Delete rules so it's easier than going to file. I didn't look around to see if this has been done before...But it's definitely better than the standard MC. Screenies: http://img199.imageshack.us/img199/1696/gamerulesin.png http://img85.imageshack.us/img85/4316/gameruleadd.png SQL: [mysql]CREATE TABLE IF NOT EXISTS `gRules` ( `ID` int(11) NOT NULL auto_increment, `Rule` text NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;[/mysql] Overwrite gamerules.php with...: <?php //ONLY TO BE POSTED ON MAKEWEBGAMES.COM include(DIRNAME(__FILE__).'/globals.php'); $_GET['page'] = isset($_GET['page']) ? trim($_GET['page']) : 'index'; if(in_array($_GET['page'], array('Add','Delete'))) { if($ir['user_level'] != 2) { echo ('Admins only!'); exit($h->endpage()); } } switch($_GET['page']) { case 'index' : index(); break; case 'Add' : Add(); break; case 'Delete' : Delete(); break; default : index(); break; } function index() { global $h,$ir; $Desc = 'PUT A GENERAL NOTICE HERE'; //CHANGE TO YOUR OWN $Data = mysql_query("SELECT `ID`,`Rule` FROM `gRules`"); echo (' <span style = "color:#8B0000; font-size:2em; font-family:Arial,Helvetica,sans-serif">Game Rules</span> <hr width = "90%">'.$Desc.'<hr width = "90%">'); if($ir['user_level'] == 2) { echo ('<a href = "/gamerules.php?page=Add">Add Rule</a> '); } echo (' <table class = "table" cellspacing = "1" align = "center" style = "text-align:center" width = "80%">'); if(!mysql_num_rows($Data)) { echo ('<tr> <td>No rules have been submitted</td> </tr> </table>'); exit($h->endpage()); }else{ while($rData = mysql_fetch_array($Data)) { echo (' <tr> <td width = "5%">'.number_format($rData['ID']).'</td> <td>'.stripslashes(nl2br(htmlentities($rData['Rule']))).'</td>'); if($ir['user_level'] == 2) { echo ('<td width = "10%"><a href = "gamerules.php?page=Delete&ID='.$rData['ID'].'"><span style = "color:#8B0000">Delete</span></a></td>'); } } echo ('</tr></table>'); } $h->endpage(); } function Add() { global $h; if(isset($_POST['rule']) && is_string($_POST['rule'])) { mysql_query("INSERT INTO `gRules` VALUES ('','".mysql_real_escape_string(strip_tags($_POST['rule']))."')"); echo ('You\'ve successfully added the rule. <a href = "/gamerules.php"><span style = "color:#8B0000">Go Back</span></a>'); }else{ echo (' <span style = "color:#8B0000; font-size:2em; font-family:Arial,Helvetica,sans-serif">Adding Rule</span> <hr width = "90%"> <form action = "gamerules.php?page=Add" method = "post"> <textarea rows = "15" cols = "50" name = "rule">Enter Rule Here</textarea> <input type = "submit" value = "Add Rule" /> </form>'); } } function Delete() { global $h; $Data = mysql_query("SELECT `ID` FROM `gRules` WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); if(!mysql_num_rows($Data) || !ctype_digit($_GET['ID'])) { echo ('An error has occured, please go back and try again.'); exit($h->endpage()); }else{ mysql_query("DELETE FROM `gRules` WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); echo ('You\'ve successfully deleted the rule. <a href = "/gamerules.php"><span style = "color:#8B0000">Go Back</span></a>'); } } ?>
-
Good mod, well done.
-
Nope, At the top of your function add global $db; As for the query maybe you should look these up. :) http://php.net/manual/en/function.mysql-real-escape-string.php http://php.net/manual/en/function.strip-tags.php
-
I had no idea "item_add" existed so, thanks. Was it the queries giving the problem?
-
Lol, no problem. Sweet!, thanks for letting me know. :)
-
What do you mean? - The file as a whole? - Or just auctions & the effect they would have on your game? The file as a whole is secure yes & no bugs have been reported as of yet.