Jamroom Logo   Get Jamroom now for as low as !
The Powerful Social Media Platform
free download!
key features
key features
Newsletter
E-mail Address:

Spotlight
Mymaxcast.com
230781 "Mymaxcast.com was founded by Maximum Music Group, a Canadian based record label located in Vancouver, Canada, who's vision is to create a grass roots to major label offering that levels the playing field for Artists, musical or otherwise. The decision between buy versus build was made mute by the incredible ease by which Jamroom integrated into that vision."
{jr_user_online} {jr_user_online} Index {jr_windows_media_player} {jr_windows_media_player}
 

{jr_whos_online}


{jr_whos_online} is used for embedding a small "block" or section into a Jamroom template that shows users that are currently online in your Jamroom.

Function Paramaters

Name Type Required Default Description
template string yes n/a the {jr_whos_online} function requires a template that will be used to format the output.  This template needs to be located in the active Skin directory.
cache_seconds integer no 600 length of time (in seconds) the output should be cached for.  Since the output of this function will likely not change throughout the day, a value of 86400 (1 day in seconds) can work well on a busy system.  Set to a low value (or 0 to turn caching off) while testing your template design.
online_time integer no 900 By default, the {jr_whos_online} function will show users that have been active in the past 15 minutes (900 seconds).  Set this number either higher or lower to change the length odf time a user must be "active" in to show on the output.  Value is in seconds.
assign string no n/a If the "assign" attribute is given, the output of the function will be stored in the template variable given as the assign value.


Example using {jr_whos_online} function

{jr_whos_online} being called in "uncached" mode (cache_seconds has been set to 0):

{jr_whos_online template="jr_whos_online.tpl" cache_seconds="0"}


jr_whos_online.tpl file:

{if $TOTAL_ONLINE == 0}

  No Users Online

{else}

  <span class="small-txt-1">ARTISTS:</span> <span class="small-txt-2">{$ARTISTS_ONLINE}</span><br />
  <span class="small-txt-1">MEMBERS:</span> <span class="small-txt-2">{$MEMBERS_ONLINE}</span><br />
  <span class="small-txt-1">VISITORS:</span> <span class="small-txt-2">{$VISITORS_ONLINE}</span><br />
  <hr size="1">

  {foreach from=$USERS key=key item=_usr}

    {* only our admin can see hidden users - hidden users will not even make it into the $USERS array for anyone but the master admin *}
    {if strlen($_usr.USER_NICKNAME) > 0 && $_usr.USER_SHOW_ONLINE == 0}

      {* we don't link to our admin account *}
      {if $_usr.USER_ID == 0}
        <i><span class="small-txt-2" style="font-size: 11px; font-weight: normal;">{$_usr.USER_NICKNAME}</span></i><br>
      {else}
        <i><a href="{$JAMROOM_URL}/{$artist_dir}/{$_usr.USER_BAND_ID}">{$_usr.USER_NICKNAME}</a></i><br>
      {/if}

    {elseif strlen($_usr.USER_NICKNAME) > 0}

      {* we don't link to our admin account *}
      {if $_usr.USER_ID == 0}
        <span class="small-txt-2" style="font-size: 11px; font-weight: normal;">{$_usr.USER_NICKNAME}</span><br>
      {else}
        <a href="{$JAMROOM_URL}/{$artist_dir}/{$_usr.USER_BAND_ID}">{$_usr.USER_NICKNAME}</a><br>
      {/if}

    {/if}
  {/foreach}
{/if}


Global Template variables available within the {jr_whos_online} template

Variable Description
{$TOTAL_ONLINE} Total number of Users Online
{$ARTISTS_ONLINE} Total number of Users Online who are part of an Artist Profile
{$MEMBERS_ONLINE} Total number of Users Online who are attached to a "Member Profile"
{$VISITORS_ONLINE} Total number of Visitors online that are not logged in to Jamroom
{$HIDDEN_USERS} Total number of Users online that are Hidden
{$VISIBLE_USERS} Total number of Users online that are Visible


User Loop Template variables available within the {jr_whos_online} template

Variable Description
{$_usr.USER_ID} User ID of User
{$_usr.USER_BAND_ID} User Band ID of User
{$_usr.USER_CREATED} Date the User Account was created
{$_usr.USER_FULLNAME} Full Name of User (as entered in Profile)
{$_usr.USER_NICKNAME} Nickname (login name) of User
{$_usr.USER_EMAILADR} Email Address of User (as entered in Profile)
{$_usr.USER_HOMEPAGE} Home page of User (as entered in Profile)
{$_usr.USER_IMNUMBER} Instant Messenger ID Number of User (as entered in Profile)
{$_usr.USER_ADDRESS} Address of User (as entered in Profile)
{$_usr.USER_GENDER} Gender of User (as entered in Profile) 0 = unknown, 1 = Male, 2 = Female
{$_usr.USER_BIRTHDATE} User Birthdate in YYYYMMDD format
{$_usr.USER_LANGUAGE} Language selected by User in profile
{$_usr.USER_IP} Last IP Address of User
{$_usr.USER_ACCEPT_NOTES} Set to "1" if User accepts Private Notes
{$_usr.USER_SHOW_EMAIL} Set to "1" if User allows E-Mail to be viewable
{$_usr.USER_SHOW_ONLINE} Set to "1" if User ALlows others to view online status
{jr_user_online} {jr_user_online} page 178 of 184 {jr_windows_media_player} {jr_windows_media_player}
Home | Download | Support | Demo | Members | Purchase | Marketplace | Contact | Privacy
©2003 - 2008 Talldude Networks, LLC.