Results 1 to 6 of 6

Thread: Help with shout time posted

  1. #1
    Senior Member analyzer's Avatar
    Join Date
    Mar 2011
    Posts
    101
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Rep Power
    3

    Default Help with shout time posted

    Guys. .i need your help. .i want code which informing users when the sh0ut is shouted. .i am talking about the time. .like 2 mins. ago, 4 days ago, 51 secs. ago like in fb. .my script is lavalair. .please help me. .i am a new php learner. .
    It's n0t that i am afraid to die. Its just that if i die, wh0 wilL loVe her as muCh as i Do?

  2. #2
    Senior Member kei_ki7's Avatar
    Join Date
    Jun 2009
    Location
    Philippines
    Posts
    435
    Thanks
    54
    Thanked 24 Times in 20 Posts
    Rep Power
    4

    Default

    Refer with the codes with the online chatroom list. Or wait for a while.
    Did I help you?
    You can help me too [Only registered and activated users can see links. Click Here To Register...]
    Your donations will help me finance my studies.

  3. #3
    Senior Member Ponick's Avatar
    Join Date
    Jul 2009
    Location
    bangladesh
    Posts
    215
    Thanks
    13
    Thanked 10 Times in 9 Posts
    Rep Power
    4

    Default

    in my old script i used this
    PHP Code:
    function ponick_time $start$end false)
    {
    if (
    $end == false//if you don't pass a second parameter,
    $end time(); //we assume you're comparing to now.

    $tme=date("h:ia",$start);
    $dati=date("d/m/y"$start);

    $diff $end $start;
    $days floor $diff/86400 ); //calculate the days
    $diff $diff - ($days*86400); // subtract the days

    $hours floor $diff/3600 ); // calculate the hours
    $diff $diff - ($hours*3600); // subtract the hours

    $mins floor $diff/60 ); // calculate the minutes
    $diff $diff - ($mins*60); // subtract the mins

    $secs $diff// what's left is the seconds;
    if ($secs 30) {
    $returnval "just now";
    }

    if (
    $secs 30) {
    $returnval "about $secs second".(($secs>1) ? "s":"")." ago";
    }


    if (
    $mins 0) {
    $returnval "$mins minute".(($mins>1) ? "s":"")." ago";
    }

    if (
    $hours 0) {
    $returnval "$hours hour".(($hours>1) ? "s":"")." ago";
    }

    if (
    $days 0) {
    $returnval "$days day".(($days>1) ? "s":"")." ago";
    }

    if (
    $days == 2) {
    $returnval "Yesterday at $tme";
    }
    if (
    $days 2) {
    $returnval "$days day".(($days>1) ? "s":"")." ago";
    }

    if (
    $days ==7) {
    $returnval "a week ago";
    }

    if (
    $days ==30) {
    $returnval "a month ago";
    }
    if (
    $days 30) {
    $returnval "$dati";
    }

    return 
    $return $returnval;

    use this like
    PHP Code:
    ponick_time($shouttime); 
    Last edited by Ponick; 01-05-11 at 13:43.

  4. #4
    Senior Member analyzer's Avatar
    Join Date
    Mar 2011
    Posts
    101
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Rep Power
    3

    Default

    Tnx p0nic. . I will try it. .
    It's n0t that i am afraid to die. Its just that if i die, wh0 wilL loVe her as muCh as i Do?

  5. #5
    Member doriann's Avatar
    Join Date
    Dec 2008
    Location
    Brasil
    Posts
    93
    Thanks
    0
    Thanked 11 Times in 4 Posts
    Rep Power
    0

    Default

    tabks ponick very

  6. #6
    Senior Member analyzer's Avatar
    Join Date
    Mar 2011
    Posts
    101
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Rep Power
    3

    Default

    Is that complete ponick?. .and is it working?. .where do i put function ponick_time?. .and ponick_time($shouttime);? And where is $shouttime?. .i can't find it. .
    It's n0t that i am afraid to die. Its just that if i die, wh0 wilL loVe her as muCh as i Do?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. comment on shout (quote shout) for lava
    By love_444 in forum Coding Forum
    Replies: 0
    Last Post: 06-03-11, 08:28
  2. new shout box needed
    By shakil420 in forum REQUEST FORUM
    Replies: 1
    Last Post: 08-08-10, 19:24
  3. shout box help ?????
    By 12345xmen in forum Site / Script testing and error fixing
    Replies: 5
    Last Post: 06-10-09, 01:25
  4. SHout box nr 2
    By riderz in forum REQUEST FORUM
    Replies: 4
    Last Post: 20-06-09, 17:50
  5. Shout Box Script
    By sakthi in forum REQUEST FORUM
    Replies: 1
    Last Post: 27-08-08, 01:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19