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_barcode} Index {jr_blog}

{jr_birthday}


{jr_birthday} is used for embedding a small "block" or section into a Jamroom template that shows if any Users have a birthday on the current day.

Function Parameters

Name Type Required Default Description
template string yes n/a the {jr_birthday} 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.
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_birthday} function

jamroom/skins/Cobalt/jr_birthdays.tpl:

{if is_array($USERS)}
  {foreach from=$USERS key=id item=_usr}
    <a href="{$JAMROOM_URL}/{$artist_dir}/{$_usr.user_band_id}">{$_usr.user_nickname}</a> ({$_usr.user_age})<br>
  {/foreach}
{/if}


embedded {jr_birthday} function call in template:

{jr_birthday template="jr_birthdays.tpl" assign="birthdays"}
{if strlen($birthdays) > 0}
  <div class="head-2">TODAYS BIRTHDAYS</div>
  <div class="body-2">
  {$birthdays}
  </div>
{/if}


Template variables available within the {jr_birthday} template

Variable Description
{$_usr.user_id} User ID of User whos birthday falls on the current day
{$_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_barcode} page 130 of 185 {jr_blog}
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