Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

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

{jr_theme_not_logged_in} Index {jr_theme_page_jumper}

{jr_theme_online}


{jr_theme_online} is used for embedding a small "whos online" box into an Artist Theme template, showing if the User Accounts associated with the Artist or Member Profile are currently online:

 

Note: {jr_theme_online} is a deprecated function, and should no longer be used in Jamroom 3.1 and newer.  The {jr_online} template function can perform the same functions as the {jr_theme_online} template function, but with better support.  This page has been left here for reference purposes only.

 

Note: This Template function ONLY WORKS within Jamroom Artist/Member Theme templates - it will not work in the general Jamroom Templates located in the jamroom/skins directory.

Parameters:

Name Type Required Default Description
band_id integer 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.
theme_dir string yes n/a the theme_dir option tells the function which Theme Directory to look inside to find the template.

 

Examples:

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

{jr_theme_online band_id=$BAND_ID template="users_online.tpl" theme_dir="Cobalt"}


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=Cobalt" 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_theme_not_logged_in} page 106 of 185 {jr_theme_page_jumper}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2024 The Jamroom Network