{jrCore_get_count}

  • Overview

    The {jrCore_get_count} template function gets the count of something from a datastore that has _counts at the end of it.

    So this function returns the profile view count.
    <div class="block">
     Views: {jrCore_get_count module="jrProfile" item_id=$_profile_id name="profile_view"}
    </div>
  • Setting the count

    The {jrCore_get_count} can retrieve the counts because there are counts to retrieve.

    The companion function to {jrCore_get_count} is {jrCore_counter}.

    {jrCore_counter} is set in the footer of the profile templates so counts can be retrieved in the header.

    Below is the function to add to the count.
    {jrCore_counter module="jrProfile" item_id=$_profile_id name="profile_view"}
  • {jrCore_get_count}

    Function
    {jrCore_get_count}
    parameter
    type
    default
    required
    description
    module
    string
    -
    on
    the moule where the count is stored eg: module="jrProfile"
    item_id
    int
    -
    off
    (optional) the item_id of the item that has been counted eg: item_id=$_profile_id
    name
    string
    -
    on
    the name of the string that has a _counts value. eg: name="profile_view"
    profile_id
    int
    -
    (optional) a profile_id if you want just the info related to a specific profile. eg: count of audio streams from this profile.
    Gets a count that has been set with {jrCore_counter}
  • Artist Media Streams

    To get all the audio streams from a specific profile use this code.
    {jrCore_get_count module="jrAudio" name="audio_file_stream" profile_id=$_profile_id}

Share This

Tags