{jrCore_get_count}

Applies to: Jamroom 7.0+ Last verified: 2026-10-24
  • jrCore_get_count

    Function
    jrCore_get_count
    parameter
    type
    default
    required
    description
    module
    string
    -
    on
    The module, such as jrProfile
    name
    string
    -
    off
    The counter, such as profile_view. Without it: the number of items.
    item_id
    int
    -
    off
    The count of this one item
    profile_id
    int
    -
    off
    Only count this profile's items
    assign
    string
    -
    off
    Put the result in this variable instead of showing it

    Reads a count kept by {jrCore_counter}, or counts items.

    Views: {jrCore_get_count module="jrProfile" name="profile_view" item_id=$_profile_id}
    Streams: {jrCore_get_count module="jrAudio" name="audio_file_stream" profile_id=$_profile_id}
    Songs: {jrCore_get_count module="jrAudio" profile_id=$_profile_id}
    • With name and item_id: the count of one item, such as a profile's views.
    • With name and profile_id: the total for all the profile's items, such as all its audio streams.
    • Without name: how many items the module has, or the profile has.

    Returns 0 when the module isn't active.

Tags