-
Posts
2,124 -
Joined
-
Last visited
-
Days Won
144
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
This provides very little information. What engine are you using (if any)? Are you looking for someone to repair it, or are you wanting a new system? If the latter, what are you looking for in a referral system?
-
This part depends on the topsite and whether they offer incentive voting
-
Your vote links won't work (as intended) for anyone else. Here's the list (without ref IDs): Arena-Top100 Browser Game Rank MMOHub Top 100 Arena Top Web Games Xtreme Top 100
-
To streamline author updates. Intent is to reduce the amount of messing around to release updates. It can become an arduous process, posting the same update to multiple places. It can be easy to forget a thing or two. On a personal level; ideally, if I'm already posting the code to a repo (or branch thereof) which can handle pipelines/webhooks/callbacks, etc., why not have the repo send the updates to where they need to be?
-
Is it possible and would you consider supporting Git via the marketplace?
-
mccode-v2 Best Way to Prevent Repetitive Attacks?
Magictallguy replied to TonyCisseroni's topic in Game Support
Could be seen as harassment once it hits a certain point. As a preventative measure, I don't see x-per-time-limiting same-player hits as a bad idea - as long as it's not too restrictive.- 9 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
..Yes, he already has done. He's attempting to get that variable from the settings
-
This method would hard-code the email address. OP wants to use the dynamically-set address in the site settings. I'm not massively familiar with GL, so I can't advise further
-
Site appears to use minified resource. Your updates wouldn't automatically be applied. If you're using an editor (such as Sublime Text, Atom, Emacs, VSCode, etc), then you can likely find a plugin to generate minified resources - I personally use VSCode's Minify and Atom's atom-minify. Alternatively, you can minify resources online with tools such as CSS Minifier. So! 1. Minify bootstrap.css (to get an updated bootstrap.min.css) 2. Upload your new bootstrap.min.css
-
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
-
With strict standards, it'd throw an error (Undefined variable: result)
- 25 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
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
-
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.
-
Looks like MCCv1 to me. Have you updated your mysql.php to initiate a MySQLi connection?
-
- Heavily-modified gRPG v1 base - I didn't test security. - Invalid markup.
- 15 replies
-
- mccode-v2
- mccode-lite
-
(and 3 more)
Tagged with:
-
Is there anybody out there?
-
Uh-huh.. Keep reading 😛 Nah, serious note though, welcome to MWG! ^.^
-
Out of scope and invalid markup
-
Based purely on function name alone; you're not returning an image with your equipment, only a name.
-
I forgot define accepted a 3rd arg! Never saw the point in it though.
-
Capitalise it. djlk34jlk -> DJLK34JLK
-
Then there's something updating it on every load. How have you set up the refill?
-
.. 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
-
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?