{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}&width=24" width="24" border="0" alt="User Image" title="User Image"></td>
<td width="83%">
<a href="{$JAMROOM_URL}/ranking.php?mode=user&user_id={$_usr.USER_ID}&row_template=jr_ranking_user_profile.tpl&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&user_id={$_usr.USER_ID}&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 |
|