Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. congrats. you managed to be even less mature than me. Not a task easily accomplished.
  2. If your file looks something like this... {one|two|three|four} {one|two|three|four} {one|two|three|four} {one|two|three|four} etc.. then you can simplify the process by not storing it with the { ... } as they are unnecessary. $template = "template1.txt"; $rows = file($template); foreach($rows as $row) { $row = trim($row); $row = ltrim($row,'{'); $row = rtrim($row,'}'); $word[] = explode('|',$row); } This will for instance produce: Array ( [0] => Array ( [0] => 1one [1] => two [2] => three [3] => four ) [1] => Array ( [0] => 2one [1] => two [2] => three [3] => four ) [2] => Array ( [0] => 3one [1] => two [2] => three [3] => four ) )
  3. change your column data type to something numerical instead of string based.
  4. seriously? "simply add \n after each tag" <html>\n<head>\n</head>\n</html>\n etc... would you like me to hold your dick for you while you pee, too?
  5. Would be a million times easier on you to have a separate field for them to enter in the site they liked.
  6. that's because mysql_num_rows tells you how many rows were returned from your query. Since you are only selecting count(*) you are only returning 1 row. You need to use mysql_result or mysql_fetch_array or mysql_fetch_assoc or mysql_fetch_row. You tried fetch_row and got "array" because fetch_row returns an array of all the columns of the row. In this particular instance, since you are only selecting count(*), you would echo $commentrow[0] after fetch_row
  7. where is the string coming from? If you are hardcoding it like that, simply add \n after each tag (not <br/> : because you are using htmlspecialchars, it will just echo out the literal <br/>).
  8. You can do it using regex but you should not be validating things clientside, as anybody can disable javascript or alter it.
  9. webmaster, please do not make multiple threads in different places asking the same thing. You should know that by now.
  10. you said it's appearing because of the "r\n". What do you think you need to do to make it go away?
  11. $_SERVER['HTTP_REFERER']
  12. uh, yes you can ORDER BY a varchar field. The problem would be that it would sort it alphabetically, and that may or may not coincide with how he has his date/time format. Example: This is what he expects the asc to be sorted by, because its in chronological order: Jan 15th, 2009 Feb 15th, 2009 Mar 15th, 2009 Apr 15th, 2009 May 15th, 2009 Jun 15th, 2009 Jul 15th, 2009 Aug 15th, 2009 Sep 15th, 2009 Oct 15th, 2009 Nov 15th, 2009 Dec 15th, 2009 This is what ORDER BY ASC will give him, since it's treated as arbitrary text in a string: Apr 15th, 2009 Aug 15th, 2009 Dec 15th, 2009 Feb 15th, 2009 Jan 15th, 2009 Jul 15th, 2009 Jun 15th, 2009 Mar 15th, 2009 May 15th, 2009 Nov 15th, 2009 Oct 15th, 2009 Sep 15th, 2009
  13. I don't know what kind of effort you have been putting into trying to figure it out on your own, but you definitely need to make an increased effort in communicating your problem, here. Every time someone responds, you respond by giving a little bit more detail. You will get an answer faster, the more details you give. just lay all your cards out on the table from the get-go. what does this mean? Are you saying if there are only "am" dates, you want it to count from earliest time to latest time, but if there there is a "pm" date somewhere in the mix, to order it latest to earliest? Or only if it's all "pm"?
  14. do you have cpanel? If you do, just set a cron job through there.
  15. right. that's the number of rows returned. you need to use something like current_field like $slotstaken->current_field;
  16. Blocking GA will not fix your problem. Also btw, the GA code/server does not make any kind of request to your server. It's the other way around. You put the GA javascript on your site. It has nothing to do with your server. You put the javascript on your page, your server serves the page to the client (the user going to your website). That page contains the javascript. As far as your server is concerned, the javascript is plain text. Javascript gets parsed on the client's computer, via their browser, not on your server. The javascript, on the client's computer, makes a request to the GA server, and the GA server responds to the client. At no point in time is your server involved in any of that process. Neither your google analytics account nor the javascript you put on the page in and of itself is responsible for your flash content not working. You probably think it's GA's fault, since your flash content was working before, and it stopped working when you put GA on it, right? This was not the GA script's fault. Whoever installed the GA script must have accidentally deleted or otherwise altered your flash content code.
  17. can you give an example of what you're wanting to do?
  18. you don't need that WHERE username in there.
  19. We didn't create nor do we maintain SMF software. We're just some random site that uses it, just like anybody else. Take it up with them on their support board.
  20. '$assets[$counter2]' or else you are not utilizing $counter2 in your query elsewhere.
  21. shit like this pisses me off. It makes me angry. At the people who bitch about it. I work in the marketing industry. This thing happens thousands of times a day all over the world. This isn't racism. This is a company catering to a target audience, based on what the research shows. Unprofessional? Yes. But not because its racist. Because it's an amateur photoshopped image. Bet you $100 if they had put more effort into making it a real white guy (or at least, a more consistent photoshop), not a damn person would have been complaining. Even if they knew there was a "white" version and a "black" version. Shit is done thousands of times a day all over the world. Go to any global company website. Peruse the site by area/region/country. It's fuckin' bullshit. The people who cry racism, not the companies. What do you expect from a sue-happy world.
  22. ltf adnagaporp
  23. regex is difficult at best when dealing with nested tags like that. If you know exactly how many times something can be nested, you can with much effort use regex to parse it. But if it can be nested any number of levels deep, don't bother trying to do it with regex. I suggest you look into redoing your tag syntax and using an xml or dom parser class.
  24. Hmm...according to one of his blog posts, his book went on sale today. Coincidence?
  25. I don't think google analytics offers IP tracking. I think it's against their privacy policy or somethin'
×
×
  • 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.