Jump to content
MakeWebGames

KyleMassacre

Members
  • Posts

    2,921
  • Joined

  • Last visited

  • Days Won

    48

Everything posted by KyleMassacre

  1. What that snippet will do is account for people that have another window/tab open. It will perform an Ajax request when the tab is only in focus (if I remember correctly lol). This way it's not just sitting there updating every 5 seconds when there not even playing the game. But if the tab is active and they are sitting there like typing a mail message or what have you it will refresh. But in reality all you need to do is create a new file for the Ajax to perform a request to, include globals.php, add the $nohdr variable and set it to true, and echo out json_encode($ir); Then you need to give your HTML elements some ids to add the data to.
  2. Ummm, no. That is not true at all. Your trying to say that globals.php and the header class get loaded on every other link click or page refresh?   create a file that includes globals_nonauth.php (you may be able to include globals.php and use the $nohdr = true variable under include('globals.php');) Perform some database queries of the information that you need and json_encode() the data. Then create an ajax call to that script and parse the json data and load into the html ids that you want to put it in I did something like this for the Mccodes.com staff panel http://pastie.org/10799955
  3. I would just have to ask, why? The get updated every time the user clicks a link. It will just add more strain on your server. The script will update via ajax then a use clicks and clicks and clicks. So its just double updating
  4. I believe you give the site a postback url that they hit when a user from your site votes. So in your example you would give them the url of http://www.yoursite.com/votingpage.php?ID= You tell them what to send back to you but what I would do is also provide them with the ID of Top 100 in your database, this way you can have one script for all. So for example you would do: http://www.yoursite.com/votingpage.php?site=2&ID=. You just change the 2 to the number they are in your sites table. The problem with this script is that you have to get fancy because some sites like Top 100 Arena require a special get key like "incentive" to be passed to them so they know to send data back to you.
  5. It should be something like: yourGame.com/register.php?REF={userid}
  6. Most likely. It looks like there is a file called default.htaccess so just rename that
  7. In your explore.php
  8. Probably something along the lines of: if($ir['location'] != $r['location']) { //put the link here }
  9. Keep the class system but just make it better. He'll just use eloquent
  10. It's in the create_faction function. Remember to use isset and/or array_key_exists
  11. Find mysql_insert_id($c) and replace with $db->last_id()
  12. You can try something like: $one = floor(1/$ir['maxhp'])*100; $ten = floor(10/$ir['maxhp'])*100; $rand = rand($one,$ten); if($rand > $ir['hp']) { $rand = $ir['hp']; } $db->query('update users set hp = hp - '.$rand.' where userid = '.$ir['userid']);
  13. Haha yeah I try.
  14. *cough* I'm right here ;) I respond to tickets just don't perform payouts
  15. They probably can't be repaired because they are not InnoDB. To answer your original question, like other people have said, MCC doesn't use the .htaccess at all. Can you see your .htaccess file? If so, what does it look like? But chances are it's bare bones and probably just has some error pages defined if there is an error and your server admin doesn't really know what he's talking about. Because if you can reload he page and get it working 1 out of 100 times, chances are it's not your htaccess file
  16. They are just HTML tags that are in th head section
  17. The only way I can show you is in pseudo code which is what I already showed you above
  18. define defines a constant: define('SOME_CONSTANT',3); echo SOME_CONSTANT; // returns 3 And comparison functions/statements are crucial to programming. You will need to know this stuff in order to be effective. if($something == $somethingElse) { echo "true"; } else { echo "false"; }
  19. You can try tagging [uSER=68637]ags_cs4[/uSER]. Hopefully this tag works ;)
  20. It used to work because I have used it. I recall that you upgraded to PHP 7? If so then it won't work because mysql_* has been not only deprecated but removed in 7
  21. $_GET['action'] = (isset($_GET['action']) && ctype_alpha($_GET['action'])) ? $_GET['action'] : null;
  22. Because it was using the old mysql_query()'s. That's why I told you that you will have to add $db as a global variable in your functions.
  23. MCCodes just uses the fetch_row() which uses the fetch_assoc equivalent
  24. CPanel is CPanel. A lot of hosting companies usually roll out their own version of CPanel which is basically just a theme hooked up with the CPanel API but you can always switch it. But if you like CPanel then maybe try out interserver with that coupon code I mentioned
  25. There probably will be some cases where doing something live may be better than locally but the point of this is to try to avoid as much live development as possible. Generally get your site ready for live and then when you have the main config done you can make that push
×
×
  • Create New...