Jamroom Logo
Newsletter
Member Spotlight
416031
Motagator
"When I was first introduced to Jamroom, it looked a useful application to manage the bands in which I play, or am associated, on a single website. It installed and ran successfully, and only then did I realize what Jamroom was about and its potential. Opening my site up to other bands I knew, I had a few takers, and am now in the process of promoting Motagator further. Motagator is open to all genres of music, but specializes in Cajun, Zydeco, Folk, Roots and Blues (my favorites). I'll be staying with Jamroom, wherever Brian takes it - it has been, and will be an interesting adventure."
Follow Jamroom on Twitter!

This document applies to Jamroom 3 only!
For current Jamroom 4 Documentation, visit the main Jamroom Documentation section.

{jr_not_logged_in} Index {jr_page_history}

{jr_online}


{jr_online} is used for embedding a small "whos online" box into a Template, showing if the User Accounts associated with the Artist or Member Profile are currently online.

Parameters

Name Type Required Default Description
band_id number yes n/a the band_id to find User Accounts for.  This parameter is required.
template string yes n/a name of templates, located in Artist/Member Theme directory, that will be used to format the output of the function.
tpl_dir string no "theme" The "tpl_dir" parameter tells Jamroom the directory to find the template in - it will either be in a "skin" directory, or a "theme" directory.
theme string yes * n/a If the "tpl_dir" parameter is NOT set, or has been set to "theme", then you must provide the name of the Profile Theme that Jamroom can find the template in.
skin string yes * n/a If the "tpl_dir" parameter has been set to "skin", you must provide the name of the skin that contains the template.
online_time number no Jamroom Config timer The "online_time" parameter tells Jamroom how many seconds must pass without activity for the User to no longer be "online".  If this parameter is not given, the the value of the Jamroom Config -> Environment Options -> Max Session Length is used.
user_id number no n/a If you want to see if a specific User ID is online, you can use the user_id parameter to tell Jamroom to look for a specific user_id.
admin number no n/a If you would prefer that the Admin account not show in the whos online output, set the "admin" parameter to "0".

 

Example

Example embedding the {jr_online} Template function into an Artist/Member theme template:

{jr_online band_id=$BAND_ID template="users_online.tpl" tpl_dir="theme" theme="Cobalt3" admin="0"}


the contents of the users_online.tpl template file, found in the jamroom/themes/Cobalt directory (as used in example above):

<table width="100%" cellpadding="0" cellspacing="0" border="0">
  {foreach from=$USERS key=key item=_usr name=user}
  <tr>
    <td width="02%" style="padding: 2px;"><img src="{$_usr.USER_IMAGE_URL}&amp;width=24" width="24" border="0" alt="User Image" title="User Image"></td>
    <td width="83%">
      <a href="{$JAMROOM_URL}/ranking.php?mode=user&amp;user_id={$_usr.USER_ID}&amp;row_template=jr_ranking_user_profile.tpl&amp;skin=Cobalt3" onclick="popwin(this.href,'name',550,400,'yes');return false">{$_usr.USER_NICKNAME}</a>
    </td>
    <td width="13%" align="center" style="padding-right: 2px">
      {if $_usr.USER_ONLINE == 1}
        <span class="small-link-txt" style="color: #CC6600; background-color: #000000;">online</span>
      {else}
        <span class="small-link-txt" style="background-color: #000000;">offline</span>
      {/if}
    </td>
    <td width="02%">
      {* let's check if the viewer is logged in, and our user accepts Private Notes *}
      {if is_numeric($_USER.user_id) && strlen($_USER.user_nickname) > 0 && $_usr.USER_ACCEPT_NOTES == 1}
        <a href="{$JAMROOM_URL}/note.php?mode=compose&amp;user_id={$_usr.USER_ID}&amp;header=false" onclick="popwin(this.href,'PN',730,550,'yes'); return false;"><img src="{$JAMROOM_URL}/skins/Cobalt/images/pn.png" border="0" alt="Send Private Note" title="Send Private Note"></a>
      {/if}
    </td>
  </tr>
  {/foreach}
</table

{jr_not_logged_in} page 163 of 185 {jr_page_history}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom Core
Jamroom Addons
Jamroom Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2012 Talldude Networks, LLC.