Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,142
  • Joined

  • Last visited

  • Days Won

    148

Everything posted by Magictallguy

  1. Lines 4,457 to 4,500 of themes/default/css/bootstrap.css. Change the colours to whatever you wish. Be sure to clear your cache afterwards* Note: If you're using an intermediary service to serve your site (such as CloudFlare), you will need to purge the file from its cache too. Recommendation: Leave the original vendor sources alone and put your customisations into their own CSS file
  2. Here
  3. With strict standards, it'd throw an error (Undefined variable: result)
  4. Basic checks; Is there an input named "notify_url" in your donation form? Do you currently have an IPN implemented into your site and, if so, did it previously work? If applicable, does your IPN use its own certificate? If so, it may have expired. Failing that, I could write up an IPN for you
  5. MCC Lite (and v1) are hard-coded to MySQL. So you've got quite the task ahead of you. Not only would you need to initialise the MySQLi connection, you'd then need to update every file that runs a query. Basic instantiation (OOP): // Begin connection $db = new mysqli('host', 'user', 'pass', 'dbname'); // Verify connection if($db->connect_error) { exit('Connect Error (' . $db->connect_errno . ') ' . $db->connect_error); } Basic instantiation (procedural): // Begin connection $db = mysqli_connect('host', 'user', 'pass', 'dbname'); // Verify connection if(mysqli_connect_error()) { exit('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } Assume variables have values: $id, $name Queries (OOP - non-prepared): (assume $name is escaped) // Select $select = $db->query('SELECT userid, username FROM users WHERE userid = '.$id) or exit($db->error); // Insert $db->query('INSERT INTO users (userid, username) VALUES ('.$id.', "'.$name.'")') or exit($db->error); // Update $db->query('UPDATE users SET username = "'.$name.'" WHERE userid = '.$id) or exit($db->error); // Delete $db->query('DELETE FROM users WHERE userid = '.$id) or exit($db->error); Queries (procedural - non-prepared): (assume $name is escaped) // Select $select = mysqli_query($db, 'SELECT userid, username FROM users WHERE userid = '.$id) or exit(mysqli_error($db)); // Insert mysqli_query($db, 'INSERT INTO users (userid, username) VALUES ('.$id.', "'.$name.'")') or exit(mysqli_error($db)); // Update mysqli_query($db, 'UPDATE users SET username = "'.$name.'" WHERE userid = '.$id) or exit(mysqli_error($db)); // Delete mysqli_query($db, 'DELETE FROM users WHERE userid = '.$id) or exit(mysqli_error($db)); Queries (OOP - prepared): // Select (with parameters) $statement = $db->prepare('SELECT userid, username FROM users WHERE userid = :id'); $statement->bind(':id', $id); $statement->execute(); // Select (without parameters) $statement = $db->query('SELECT userid, username FROM users'); $statement->execute(); // ------- // Insert (with parameters) $statement = $db->prepare('INSERT INTO users (userid, username) VALUES (:id, :name)'); $statement->bind(':id', $id); $statement->bind(':name', $name); $statement->execute(); // Insert (without parameters) $statement = $db->query('INSERT INTO settings (name, content) VALUES ("demonstrative_name", "some value")'); $statement->execute(); Returning data (OOP - non-prepared): (assume $name is escaped) // 1 result expected, assume matching data exists $select = $db->query('SELECT userid, username FROM users WHERE username = "'.$name.'" LIMIT 1'); $row = $db->fetch_assoc($select); echo $row['username']; // multiple results expected, assume matching data exists $select = $db->query('SELECT userid, username FROM users WHERE userid BETWEEN 1 AND 100'); while($row = $db->fetch_assoc($select)) { echo $row['username'].'<br>'; } Returning data (procedural): (assume $name is escaped) // 1 result expected, assume matching data exists $select = mysqli_query($db, 'SELECT userid, username FROM users WHERE username = "'.$name.'" LIMIT 1'); $row = mysqli_fetch_assoc($select); echo $row['username']; // multiple results expected, assume matching data exists $select = mysqli_query($db, 'SELECT userid, username FROM users WHERE userid BETWEEN 1 AND 100'); while($row = mysqli_fetch_assoc($select)) { echo $row['username'].'<br>'; } Returning data (OOP - prepared): // 1 result expected, assume matching data exists $stmt = $db->prepare('SELECT userid, username FROM users WHERE username = :name LIMIT 1'); $stmt->bind(':name', $name); $stmt->execute(); $row = $stmt->fetch_assoc(); echo $row['username']; // multiple results expected, assume matching data exists $stmt = $db->query('SELECT userid, username FROM users WHERE userid BETWEEN 1 AND 100'); $rows = $stmt->fetch_assoc(); foreach($rows as $row) { echo $row['username'].'<br>'; } Recommendation: Throw your MySQLi into a wrapping class. Doing this means you'd be able to change your connection type in one file without having to edit absolutely everything that relies on it. Recommendation: Update your code to use Prepared Statements. Recommendation: OOP vs Procedural: It's entirely up to you which method you use. However, you're working on a project that re-uses variables/functions quite often, so I'd advise OOP Note: Prepared Statements are not available in procedural-style MySQLi.
  6. Looks like MCCv1 to me. Have you updated your mysql.php to initiate a MySQLi connection?
  7. - Heavily-modified gRPG v1 base - I didn't test security. - Invalid markup.
  8. Is there anybody out there?
  9. Uh-huh.. Keep reading 😛 Nah, serious note though, welcome to MWG! ^.^
  10. Out of scope and invalid markup
  11. Based purely on function name alone; you're not returning an image with your equipment, only a name.
  12. I forgot define accepted a 3rd arg! Never saw the point in it though.
  13. Capitalise it. djlk34jlk -> DJLK34JLK
  14. Then there's something updating it on every load. How have you set up the refill?
  15. .. Yes. You want to subtract miningpower. The code you've posted is written to use `$MSI['mine_power_use']`. `$MSI` is an associative array coming from the table mining_data. In that table, there should be some rows (run the query below). Do all the rows in that table have a mine_power_use of at least 1? SELECT * FROM mining_data
  16. This is a user-created module, not an original part of the engine. The code appears to check out at first glance. Does the corresponding row in your database have a value for mine_power_use?
  17. Until a better fit can be found, the DBAD License
  18. About £3000 if you've got it spare please
  19. So you do. Apologies, it's been a long day
  20. Postman and Insomnia are good alternatives.
  21. I remember this argument from the days of old; so allow me to bring forward a piece of wisdom from that time. It is not for you to decide whether the author's asking price is too much or too little. All you can do is decide whether it's too much or too little for you. Let's turn the tables for a moment. Let's say you've worked for hours (even days!) on something you intend to release. At the completion of that project, you've got not only the time you spent on writing it, but the time and effort that went into learning how to do it. You (the author) may decide you should be financially rewarded by whomever wishes to use the result of your time and effort. Now, what if I told you that the price you put on your product is unfair or unacceptable? What if you were in a superstore? Would you tell the cash registrar that the price on the item you've already picked up is too much, or would you realise the situation and either pay for it or put it back? Note for future reference: You don't have to like the price of something to respect what went into it. Be mindful, please.
  22. You're welcome to gravedig, but please don't be a dick about it ?
  23. That domain is no longer registered, nor do I have the original screenshots. Here's a couple of screenshots from a game where it's been extensively implemented. Ranks: Index Ranks: Add New (1) Ranks: Add New (2) Ranks: View (1) Ranks: View (2) Ranks: Edit (1) Ranks: Edit (2) Deletion has an interstitial confirm dialog then redirects back to Rank Index upon confirmation/cancellation.
  24. This is for gRPG v1
  25. Possibly missing PHP's zip library from your installation? Have you successfully installed other modifications before this?
×
×
  • Create New...