Jump to content
MakeWebGames

Daron

Members
  • Posts

    151
  • Joined

  • Last visited

Daron's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. oh yea, very true, thnx once again good sirs lol. i'll go do that now *runs off happily*
  2. Hey just curious is there an mod around that has locations inside locations? like for example lets say i had 3 locations in my db, California, Los Angeles, and New York. In order to travel to L.A you would have to travel to california first. Any mod out like that or similar to that?
  3. ohhh ^_^ thanx Seker! it worked!!!!!! Thanx a lot
  4. Hey i have something im trying work out, i have a tier of ranks, and each rank is earned by being online(well thats what i want) the way i was trying go about it is on my hourly cron have it set so those online go up a rank and those offline go down a rank, BUT i dont know how to properly run that query. i tried this $db->query("UPDATE users SET rank=rank+1 WHERE laston >= time()-15*60");   i think its because this "time()" but im not really sure how to pull this off ????:confused:
  5. ohhhh that makes sooooooo much sense thanx everyone! dont know what i would do without this forum ^_^
  6. Hey i have something on my game when players can make like biography/journal/diary whatever u wanna call it, and they can use bbcode, and i know most people just dont allow images but come on what player dont like to share images xDD BUT i dont want anyone to post any humongous image and mess things up, so is it a way to put a limit on the dimmensions of images posted using bbcode?
  7. =O those links were very enlightening and scary xD, crazy how he ran a script through a image 0.0 thank you for showing me that. So the 2nd link seemed to be most useful and based of what i seen i think what i was suppose to do is add a .htaccess file to the folder with the uploaded avys and add this code right? ForceType application/octet-stream <FilesMatch "(?i)\.gif$"> ForceType image/gif </FilesMatch> <FilesMatch "(?i)\.png$"> ForceType image/png </FilesMatch>
  8. oooh nice, so after reading that i got it so they can overwrite, now u think ya can help me out with figuring how to change the name of the uploads? i thought of an plan to set each persons uploaded avy to be named after them so that way when they upload another it would be assigned same name and just overwrite. EDIT: Nevermind i got it working! It now names the avy after the user here is the code i came up with   function do_pic_change() { global $ir,$c,$userid,$h; $allowedExts = array("gif", "png"); $extension = end(explode(".", $_FILES["file"]["name"])); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 30000) && in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { $filename = basename($_FILES['file']['name']); $extension = pathinfo($filename, PATHINFO_EXTENSION); $new = $ir['username'].'.'.$extension; move_uploaded_file($_FILES["file"]["tmp_name"], "avys/{$new}"); mysql_query("UPDATE users SET display_pic='avys/{$new}' WHERE userid=$userid",$c); echo "Avy Changed!"; } } else { echo "Invalid file"; } }
  9. ah makes sense, but hmm i might be better off going back to the URLs tho, would save me from having to manually delete who knows how many avys. wish it was a way to overwrite uploaded avys
  10. ight i know this is going be a stupid crazy question and im sure the answer is no, but is it anyway to run a query that deletes from the server o.o not the database. Basically what happened is i created a avy uploading thingy so no more giving url of your avy u have to upload it, and how it works is it uploads the avy to a folder and a query runs to set that newly uploaded avy as your avy. 2 big problems tho, one if an image with the same name exist in the folder it wont allow the pic to be uploaded, and 2 which is the biggest problem, is that if a user uploads another pic then the previous pic is still stored in the folder 0.0 that could be a lot of unnecessary storage taken up, plus users wouldnt be able to use that pic again since a pic of same name cant be uploaded twice. Here is the code:   function do_pic_change() { global $ir,$c,$userid,$h; $allowedExts = array("gif", "png"); $extension = end(explode(".", $_FILES["file"]["name"])); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 30000) && in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { if (file_exists("avys/" . $_FILES["file"]["name"])) { echo "That avy is already uploaded! "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "avys/" . $_FILES["file"]["name"]); mysql_query("UPDATE users SET display_pic='avys/{$_FILES['file']['name']}' WHERE userid=$userid",$c); mysql_query("UPDATE users SET display_pic='avys/{$_FILES['file']['name']}' WHERE userid=$userid",$c); echo "Avy Changed!"; } } } else { echo "Invalid file"; } }
  11. xDD oops i didnt even see that thread thanx! I undertstand what yall were saying
  12. Hey how around many queries should be going on, on my site? I have a line of code in to show how many queries are on the page and im using that to monitor the amount of queries i run, whats a good number?
  13. Thnx guys, the array thing worked out for me
  14. Hey i started working on a game from scratch and not using an engine anymore, and im working on my registration page and for my game i have 12 races and its 6 stats and a location that different for each race. So the way i planned to do it was like for example: if ($_POST['race']='Human'') { $location=1; $stat1=15; $stat2=20; } if ($_POST['race']='Dog'') { $location=2; $stat1=30; $stat2=25; }   So it would be 12 different IF statements declaring 7 variables each o.o is there a more efficient and clean way of doing this?
  15. dmca received - unlicensed mccodes install, do not unsuspend [purchasing software not an option as this is a verified dmca]. damn somebody got me suspended =( cruel world not that serious imo, but i guess the things people will do for money...
×
×
  • Create New...