Award time on site with points

front page Forums How-to Questions Award time on site with points

This topic contains 6 replies, has 3 voices, and was last updated by Avatar jandewit 2 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #33302
    Avatar
    jandewit

    Hi all,
    Does anyone know if it is possible to award sitemembers for their time online? And then especially the period that they are logged in with their WordPress account?
    Example: 1 hour logged in, get 10 points.
    Thanks, Jan

    #34125
    Avatar
    Jürgen

    i also would be very interested into this feature if it is possible!

    #34192
    Avatar
    Jürgen

    i just found this.

    anybody knows how we can add points per/hour?

    // If check is based on time
    if ( ! in_array( $period, array( ‘t’, ‘x’ ) ) ) {

    // Per day
    if ( $period == ‘d’ )
    $from = mktime( 0, 0, 0, date( ‘n’, $now ), date( ‘j’, $now ), date( ‘Y’, $now ) );

    // Per week
    elseif ( $period == ‘w’ )
    $from = mktime( 0, 0, 0, date( “n”, $now ), date( “j”, $now ) – date( “N”, $now ) + 1 );

    // Per Month
    elseif ( $period == ‘m’ )
    $from = mktime( 0, 0, 0, date( “n”, $now ), 1, date( ‘Y’, $now ) );

    $wheres[] = $wpdb->prepare( “time BETWEEN %d AND %d”, $from, $now );

    }

    #34223
    Avatar
    Jürgen

    Please help.
    That can only be a mathematical formula…

    #34351
    Avatar
    Jürgen

    please help!

    #57199
    Avatar
    Juergen Limone

    🙁

    #57234
    Avatar
    jandewit

    Sorry Juergen, not within my knowledge.. 🙁

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

11