BuddyDev

Search

Display the counter of the photo being viewed by the user

Tagged: 

  • Participant
    Level: Initiated
    Posts: 5
    Arslan on #27779

    Good afternoon.
    Show me snippet or function how to display the counter of the photo, audio viewed user

  • Keymaster
    (BuddyDev Team)
    Posts: 24653
    Brajesh Singh on #27783

    Hi Arslan,
    Thank you for using MediaPress.

    I am sorry, we don’t have anything for this.

    Since MediaPress media is attachment, you can use (mpp_is_single_media(), mpp_get_media()) to access the details and store the view counts in meta and then show it where you please.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 5
    Arslan on #34261

    You probably didn’t understand me. I mean the count of downloaded media files of users.

    The plugin has a counter function mpp_get_media_count

    For example, the “My Audio” counter can be made like this by passing the necessary arguments to it:

    function agni_user_my_audio_count() {
    $total_uploaded_audio = mpp_get_media_count(array(
    ‘component_id’ => bp_displayed_user_id(),
    ‘component’ => ‘members’,
    ‘type’ => ‘audio’,
    ‘status’ => ‘public’
    ) );

    echo $total_uploaded_audio;
    }

    In this way, you can show the counters of photos, videos, files, and audio recordings.

    • This reply was modified 4 years, 1 month ago by Arslan.
    • This reply was modified 4 years, 1 month ago by Arslan.
  • Keymaster
    (BuddyDev Team)
    Posts: 24653
    Brajesh Singh on #34268

    Hi Arslan,
    Thank you for the reply.

    I am sorry, MediaPress does not count number of downloads or number of views currently.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved