Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. Yeah but that's why it was so cool. I mean, we all know how important it is to make a game balanced. Too much or too little of something will throw it all off. But somewhere deep down inside, especially after the nth hour of grinding or the nth time running some dungeon hoping for some item to drop from the boss, we all want to be greedy little b!tches. You can't tell me you never occasionally got your jollies off playing "God Mode" in Doom. Or after you've beaten a game, using cheat codes to run around decked out melting faces, armies at a time. Come on now, who hasn't turned on GTA and keyed in the codes for all weapons and invincibility and gone on a killing spree from time to time? To me, the diablo series honors that vice in us. It's like, the ultimate indulgence of gory death and obscene amounts of shinies.
  2. posted data (through regular form submission or through ajax) are passed to the target script either by POST or GET method. Unless you have register globals set to ON (which you shouldn't, and if you do, turn them off), the data in your target script will take the form of $_POST['varnamehere'] or $_GET['varnamehere'], depending on what method you used (post or get).
  3. bliz needs to hurry up with d3 omg I cream my pants just thinking about it. Not really. But damn, I'm excited. I was a huge d1 and d2 fan. I'm trying my uber hardest to get in on beta.
  4. Do you need to know what's actually between the link tag or do you just need to know whether it's an image or plain text? If you just need to know what it is, no need for 2 regexes...just do a preg_match looking for <img if a result is returned then assume it's an image. If not, assume it's plain text. if (preg_match("/<a.*><img.*<\/a>/",$string)) { echo "image linked <br />"; } else { echo "plain text linked <br />"; }
  5. I prefer file it puts each line into an array. Keep in mind though when you explode, the date and time will be separate elements since there is a space between them. To get your $var2 you're going to have to glue those 2 elements back together. Simple string concat will do the trick.
  6. @ken: argh! I was looking around for a 1-line solution and almost used array_filter but skipped it because I didn't read far enough into the manual to see the default w/out 2nd argument! I came up with this for the foreach loop: count(array_unique($a)) - 1; It's either got a value, or it doesn't, and you want to count the ones with values, right? I don't see why different values should make a difference. Ken's code inside the foreach loop is merely an example. It displays the magic numbers your looking for. Instead of echoing it, you would throw a condition in there. Something like: foreach ($test as $ta) { if (count(array_filter($ta)) < 2) { // we've got problems. less than 2 were selected } }
  7. We recently decided it's not our duty to be the little angel sitting on people's shoulder. If someone wants to try and get someone to do their homework for them in a class that is probably most likely voluntary in the first place, that's their prerogative. And if someone wants to come along and "help" the guy (I do use quotes because frankly, I do not think they are helping him at all), that's on them, as well. Anyways, point is, we're not babysitters or parents. We think it's retarded and stupid for someone to voluntarily take a class only to turn around and ask for other people to do the work, and even more retarded and stupid when people actually help them, but hey, that's the double edged sword of freedom of choice.
  8. mod as in moderator or mod as in modifications/addons?
  9. Don't know about WoW since I've only played it briefly enough to hate it, but in L2, one sits/stands in the same speed one would sit/stand Indian-style in real life, so it wouldn't accomplish much since the person would simply "go to town." Ah yeah well in WoW there's a sit down animation but it's only like 1.5-2s long and standing is instant. WoW is one of those games you either love or hate. I've been thinking about trying out L2. I actually participated in alpha testing for it and then a little bit into closed beta. I didn't really care for it, but I will admit it's not really fair to give final judgment on a game during testing. And it's been quite a while since it's been released, so idk, maybe.
  10. Oh God. Ouch. Yeah you can eliminate a whole lot of that by using some arrays and loops. But anyways, since it looks like your form is in the same script, you would just do something like this for the error messages: foreach ($error as $e) { echo "$e<br/>"; } Now I do notice that you seem to have a block of html/php code for each individual error message display...and that's the trick. Most of that code for each of those error message displays are the same exact thing. You're just using a different variable and label or whatever for each one. You can use an array to store those individual pieces of info and just make a loop to spit out the same code over and over. Find the pattern, make a loop. The good news is that you're at least figuring out how to make it functional on your own. That's the hardest part. Well, one could argue that finding patterns and streamlining your code is where the artform is, but business people don't really care what's going on under the hood, as long as the car drives, and since they're the ones who sign the paycheck, that's all that really matters
  11. umm... if the inputname array values are the same as the link array keys...why even bother with the inputname array at all? foreach ($link as $key => $val) { echo "<tr><td><a href='$val'><img src='{$key}.jpg' /></a></td></tr>"; } edited to add the .jpg
  12. well your original code has 2 independent if statements. Unless you tie the second one into the first one somehow, the second one is going to be evaluated regardless of what the first one is. But anyways, not sure why you using multiple boolean vars for one variable check. I suspect that you're eventually going to have some kind of if statement that looks something like this: if ($price == true && $pricenumericcheck == true && $pricerangecheck == true && $priceformatcheck == true && $thepriceisright == true) { // we're good to go } well if any one of them fail then user has to start over in the first place, from this code you show, so just use one boolean. Or better yet, simply check to see if you have an error message variable (and on that note, for the same reason, why are you using multiple error vars like that? At least use an array...) my suggestion: if (!$_POST['price'])) { $error[] = "You forgot to enter a price"; } if (!is_numeric($_POST['price'])) { $error[] = "Please enter numeric values only"; } if($error) { // display the error(s) using a loop, send $error back to form and list it there, or whatever you do in the event of fail } else { // the user is not a moron, please proceed here }
  13. You can start by telling us what the problem is and if there are any errors.
  14. so...you expect a variable that doesn't exist to be numeric?
  15. so...what's the problem?
  16. change the name attribute to name='product[]' you can then access it from $_POST['product'][0] $_POST['product'][1] etc...
  17. Reading the foreach entry in the manual could have solved your problem just as easily, if not quicker...
  18. Doubt it. I mean, the default already fits the color scheme of the logo and main site...
  19. Oh well there's no official /teabag in world of warcraft either. You just stand on top of the corpse and keep standing and sitting down.
  20. Don't you love it when someone ganks you and then teabags you?
  21. change the 2nd ? to a : It's called a ternary operator. Basically it's a shorthand version of an if..else. if(condition) { // condition is true } else { // condition is false } vs. (condition) ? 'condition is true' : 'condition is false' example: $x = 5; echo ($x < 10)? 'x is less than 10' : 'x is greater than 10'; that would echo 'x is less than 10'
  22. .josh

    Monitors

    I think the next time I buy a monitor I'm actually gonna buy an lcd or plasma hdtv with div input. You get a lot more bang for your buck that way. I hooked up my 47" tv (dynex brand) a couple weeks ago and was messing around in World of Warcraft. It was glorious. TV cost me like $650 which is a lot more than your budget but look at what it would cost to get a 47" monitor. Or rather, look into $200-$250 hdtvs I bet you can find bigger and better. Dunno if you need dvi input but they usually always at least have a vga or hdmi input. Or there's adapters out there.
  23. It's the spanish version of lolololol usually hailing from south american gamers; same in principle as kekekeke from the asians.
  24. We have no secret VIP rooms in this club. You guys were obviously talking on AIM or IRC or something. Stop messing with the poor guy.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.