{jrCore_item_create_button}

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

    Function
    jrCore_item_create_button
    parameter
    type
    default
    required
    description
    module
    string
    -
    on
    The module, such as jrAudio
    profile_id
    int
    -
    on
    The profile the item would be created on, usually $_profile_id
    view
    string
    create
    off
    The module view the button opens
    action
    string
    -
    off
    A URL path to open instead, relative to the site (also create_action)
    onclick
    string
    -
    off
    JavaScript to run instead
    title
    string
    -
    off
    The button's tooltip (also create_title, create_alt, alt)
    icon
    string
    plus
    off
    The icon (also create_icon)
    size, color, class
    string
    -
    off
    Icon size and color, and a CSS class
    id
    string
    (module)_create
    off
    The button's HTML id
    group
    string
    -
    off
    master or admin: only show the button to that group
    profile_check
    bool
    true
    off
    false shows the button outside profile pages too
    assign
    string
    -
    off
    Put the result in this variable instead of showing it

    Shows a module's create button (the +) to users who can create items on the profile. Visitors and other users see nothing.

    {jrCore_item_create_button module="jrAudio" profile_id=$_profile_id}
    {jrCore_item_create_button module="jrAudio" profile_id=$_profile_id view="create_album" title="Create Album"}
  • Module templates usually call it through {jrCore_item_list_buttons} and the module's index template.

Tags