-
Posts
2,146 -
Joined
-
Last visited
-
Days Won
149
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
This is but one of multiple occasions. If we don't bring it to light now, it'll continue. Yes, we can just fed and move on, though I'd rather not have a game full of banned accounts. It'd be simpler if players just didn't spam other sites; it's massively disrespectful and, in my mind, detracts value from the advertised site. I believe this topic should stay.
-
You appear to be popular.. Heck knows why 😛
-
Nice! Quick tip; appending an array is cheaper on the resources (and therefore faster) than array_push(). Recommendation: Alter array_push($decoded->admin, $array); to $decoded->admin[] = $array;
-
Despite my moral and ethical objections, I must admit I laughed
-
/install/index.php, canonically, but that path would also work. Patched
-
It did on every instance I've set up. Can you provide more info please (to my inbox, so we're not hijacking this thread)? I spotted the other thread
-
Passive insult aside, we're still awaiting relevant information
-
Freelance dev here. The majority of my clients have been financially hit by COVID which has had a domino-effect on my responsibilities. Hell, it took our government long enough to declare lockdown (almost 5 hours from writing this), let alone reduce the cost of living, so it's been a struggle.
-
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?