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.

Adding Pages and Creating New Templates in your Jamroom Index Converting a Jamroom 2.x template set to a Jamroom 3.x Skin

Because of the range and flexibility of Jamroom, there is a wide variety of content that developers will want to pull into their pages. Some of this content will need to be "live" and parsed on each page load (login status for example), whilst other things are only parsed when the Artist theme is rebuilt.

The following Template Functions have been created to allow for bringing a range of content into your Jamroom Templates:

{include} Include another smarty template at parse time. In an artist theme this will generate the content when the site is rebuilt.
{include file="`$THEME_DIR`/menu.tpl"}
{jr_theme_template} Process a template through htmlShowTemplate (like embedding an index.php processed template into an artist template). This should only be used if the template needs to be parsed on each load of the artist page, for example jr_index_status.tpl:
{jr_theme_template template="jr_index_status.tpl"
tpl_dir="skin" skin="Cobalt"}
Note: Scripts like Guestbook and Comment need to use {include} as they are not strictly part of the Artist theme. These templates are parsed directly rather than by the theme generator, so on these pages you would need to use:
{include file="`$JAMROOM_DIR`/skins/Cobalt/jr_index_status.tpl"}
{jr_theme_php_include} Embed a <?php include() ?> in an artist page. This is the way to include a php file into your Artist theme. For example, the line othermenu.tpl | othermenu.php in theme.cfg will generate the file othermenu.php into your Artist member directory when the site is rebuilt. You can then pull that file into the page like this:
{jr_theme_php_include file="`$ARTIST_DIR`/othermenu.php"}
{jr_fetch} Replacement for {fetch}, it will fetch a URL and works on systems that have allow_url_fopen off:
{jr_fetch file="`$ARTIST_URL`/side.php"}



Using"{include}" brings the script into the same process as the currently running script. However, using {jr_fetch} pulls the data in via a separate HTTP process, so the called script gets its own "working space" so to speak. It's better to use {include} since it is faster, but in some situations the only choice is to use {jr_fetch}.


Adding Pages and Creating New Templates in your Jamroom page 115 of 185 Converting a Jamroom 2.x template set to a Jamroom 3.x Skin
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