Jump to content

Monkuar

Members
  • Posts

    987
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Monkuar

  1. Lol'd @ a PHP Certificate. No job would gives a rat ass for one, lol
  2. CZ!!!
  3. solved, im not going to us that stupid ass function, im just going to use your simple echo intval stuff, works fine. thanks pikachu.
  4. $timestamp = time(); $date_end = strtotime("+2 days",$timestamp); Okay so I do +2days right? Then in database it shows: date_end -> 1346472794 2 days 24 hours 60 min 58 seconds Why in the hell, does it add 24hours + 60minutes + 1minute? It's supposed to be for 2 DAYS, so the remaining time should be 1day 24hours 59 minutes 59 seconds, why the hell does it add that extra time? It's so annoying. It does the same crap let's say if I add +90 days: 3 month 4 week 1 day 2 hours 24 min why the hell does it add a whole nother month and 1 day 2hours 24minute? Makes absolutely no sense, last time I checked 3 months was 90 days, not 3 months 4weeks 1 day 2 hours 24 minutes? This is the php code to xfer that timestamp that I make into the time remaining: function timeAgo2($timestamp, $granularity=5, $format='d:H:i:s'){ $difference = $timestamp; if($difference < 0) return '0 seconds ago'; elseif($difference < 8640000){ $periods = array('month' => 2630880, 'week' => 604800,'day' => 86400,'hours' => 3600,'min' => 60,'seconds' => 1); $output = ''; foreach($periods as $key => $value){ if($difference >= $value){ $time = round($difference / $value); $difference %= $value; $output .= ($output ? ' ' : '').$time.' '; $output .= (($time > 1 && $key == 'day') ? $key.'s' : $key); $granularity--; } if($granularity == 0) break; } return ($output ? $output : '0 seconds').''; } else return date($format, $timestamp); } If anyone could please help, much appreciated...
  5. Did you guys update servers? Why is the site like 3x faster right now then ever? THe hell :shrug:
  6. Lol, i don't know. w/e I did, it works though and html works haha. I just have a simple redirection page redirect("rofl.php?=1", " Thanks, page edited! "); and then I just encode both those values in base64 and rawurl and pass them through $_GET so it looks sexy in the web address bar with encoded numbers/letters, the html wasn't working so I tried this way I posted and it worked? Blah edit: mind you, no databases or nothing is involved here
  7. Just found a fix for enabling HTML IN BASE_64 ENCODING METHOD USE THIS TO ENCODE: base64_encode(rawurlencode($message)); TO DECODE USE: rawurldecode(base64_decode($message)); Thanks, have nice day everyone!!!! Add this to the snippetS !
  8. ya but is your hello bolded?
  9. Like let's say I have $message = base64_encode('<b>Hello</b>'); then i decode it $decodedmessage = base64_decode($message); it doesn't work and shows like "<b[?? " or some weird numbers. Hope u can help ! using htmlentitties works but just shows the characters , i need it to actually show html lol
  10. I want to make a event listener so I don't have to use onhover="xxxx" and put it on each html tag. let's say I have <div id='postactions' style='display:none'> hey </div> Now, instead of putting a onhover=function() on each tag, how can I make it so javascript will do that onhover function for all ID's that are postactions?
  11. Welcome to PHPF! Good advice learning is watching video tutorials at night and suck in all the information you possibly can, sometimes you wake up, or sleep you will have visions of what you can do with the multi demi arrays/mysql assoc functions/etc/etc, helps alot with designing and coming up with ideas, good luck !
  12. Okay, since we're on a a SMF Bash meme. I freaking hate how the private messages are designed, LOL it's so horrible. You have to click on top, and your messages are sorted by ASC order.. it's just ludicrous ok /rant also, I have 2 message titles that are bolded, but only 1 new one? Rofl..... I guess I cannot wait to move to ipb
  13. I was going to suggest clear cookies or w/e, but since you're a Guru you probably know all that stuff, lol. So I guess we can just blame SMF now, and listen to what the admins here say "SMF Is poorly coded" and be done with it!
  14. http://api.imgur.com/examples scroll down to Uploading - PHP perfect!!! WOW EPIC ! This should be added to the snippet place, could be useful for others !
  15. I ahve this script that uploads a image taken from your webcam (php/jquery/flash API) Is there any free hosting sites like google/picaso or something where I can use there servers and a API to upload the images onto their site instead of storing it on my server?
  16. oops i meant to post this thread http://forums.phpfreaks.com/index.php?topic=232740.0 lol looks like they fixed it now great they was showing up blank that's where I copied that image address from
  17. in this thrread: http://forums.phpfreaks.com/Themes/default/images/badges/alumni.png
  18. Should't you be using long-polling or websockets?
  19. Okay great, I guess maybe the new move will help out after all!
  20. Okay guys, not to be rude, might be a smf problem or host problem. But for the past months, I havn't said anything, but i've sometimes get around 20-30seconds of down between switching pages, it is so annoying. It's been happening for a long time now but just wanted to tell you guys about it. The server is fast, but just this happens randomly sometimes, okay sorry just wanted to tell u all. edit: Offtopic but inb4 ChristianF becomes guru
  21. (bj = 0 AND to_id={$pun_user['id']} OR from_id={$pun_user['id']}) AND YEAR(FROM_UNIXTIME(date)) = {$newdate['2']} AND MONTH(FROM_UNIXTIME(date)) = {$newdate['0']} using ( ) in the query fixes it? Wat the hell? How does using parentheses fix this problem?
  22. It's a int (10), just storing a regular timestamp. Should I make it a timestamp data type? Query is: SELECT gl.*, m.username,m.star, m2.username as fromname,m2.star as fromstar from gold_logs gl left join users m on (gl.to_id=m.id) left join users m2 on (gl.from_id=m2.id) WHERE to_id=271 OR from_id=271 AND YEAR(FROM_UNIXTIME(date)) = 2012 AND MONTH(FROM_UNIXTIME(date)) = 05 ORDER BY date DESC LIMIT 0, 35 It's selecting all the gold_logs that are sent to the user, with the from_id = 271 and showing all the gold_logs sent out from the user with to_id = 271. And screenshot of the columns. That just shows that I am left joining the to_id and from_id to the "users" table, as you can see. If I try GROUP BY to_id, it works perfect and only shows from August! But only shows to_id data, not the to_id and from_id that I need. So you're wondering, well why don't you do to_id,from_id? Well I tried that, and it goes back to my main problem, shows.. but shows other dates as well. EDIT: I know storing html in there is horrible, but please this is just development. Don't shoot me on that, lol
  23. YEAR(FROM_UNIXTIME(date)) = 2012 AND MONTH(FROM_UNIXTIME(date)) = 05 Okay, So this query is selecting the year and month to 2012 and may. I have a date column in my database, it's called "date" with the values of unixtimestamp, I have like 20-30rows. The problem is, this query works, but I see results from july and august too? how can I get a more refined result?
  24. Ew, stay away from IPB man SMF All the way!! PHPFreaks has been known for being "SMF" for years now, it's perfectly fine in my opinion Everyone who thinks of PHPFreaks knows about it's on SMF and stuff, changing this software will make me feel funny when logging in and stuff :/ This site's Nostalgic factor is to high to change it's forum system Please keep it SMF
  25. Not to be rude, but I don't really know what you want us to do? I also recommend storing those cookie data's in a db? Please explain a little bit more and I can try to help
×
×
  • 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.