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

Jamroom Application Bridges Index Working with Jamroom Templates

Creating Artist Electronic Press Kits (EPKs)

One of the features of Jamroom 4.1 is the ability to create Electronic Press Kits (EPKs) for your artists.  This feature requires the Jamroom Bonus Pack be installed and configured.

Configuration

In order to allow your artists to have an EPK, you must first enable it in their quota.  You can enable Artist EPKs by going to the Jamroom Config > Jamroom Quotas > (Modify Quota), click on the "Site Features" tab, scroll down to "Additional Site Features" and set "Artist EPK" to "Yes."  Note that simply turning it "on" is not enough -- your artist theme has to support EPKs as well.

Step 1 - Create a Template

An Artist EPK is basically a Smarty template (like all of the templates used in Jamroom) that is converted into a PDF file.  As such, these templates function the same way as the other templates used throughout Jamroom, so so your templates can contain HTML, as well as Template Functions and Variable Modifiers to create the Artist Electronic Press kits.

There are a number of variables that can be used in your EPKs.  Generally, any variable that can be used in a theme template (i.e. all Artist variables, such as {$BAND_NAME}, {$BAND_ID}, etc., and all Quota variables) can be used in your EPK template.  Note, however, that because this information will be used to create a PDF file that you will not be able to use certain types of functions/variables, such as those pertaining to the user viewing the file (i.e. all variables in the {$_USER} array, as well as functions such as {jr_logged_in}, will not function correctly).

You can now begin to create your EPK.  The default template name for an EPK is script_epk.tpl, but you can use any template name you please.

Step 2 - Generating the EPK

Once you have created your EPK template, you will need to create a link to it in your theme.  The URL you will need to use for the EPK is {$JAMROOM_URL}/epk.php?band_id={$BAND_ID}, i.e.:

<a href="{$JAMROOM_URL}/epk.php?band_id={$BAND_ID}">Press Kit</a>

The link above assumes that your EPK template is named script_epk.tpl, unless you have specified a different epk_template in the theme config (config.cfg.php) file.  The band_id URL query string must always be given so that the Jamroom EPK system knows which artist directory to place the EPK into.

Step 3 (Optional) - Creating Additional EPK Templates

The Jamroom EPK system allows you to create multiple Electronic Press Kits, if you so desire.  In fact, an EPK can be created from almost any template in your skins or themes directories.  In order to create an additional EPK, or an EPK using a different template name than the default EPK template name, you can use the following URL query strings:

Name Type Required Default Description
template string no script_epk.tpl The template name you would like the EPK to be generated from
tpl_dir string no n/a Directory containing the Jamroom template - can be "skin" or "theme".  If this is not supplied, the epk.php script will look in the current theme directory.
theme string no n/a If a tpl_dir value of "theme" is given, then the name of the Artist Theme needs to be passed in with the theme parameter.
skin string no n/a If a tpl_dir value of "skin" is given, then the name of the Skin needs to be passed in with the skin parameter.

 Using these URL query strings, you can create an EPK from almost any template in your Jamroom.  For example, if you wanted all artists to be able to have an EPK of your Weekly Charts, and you are using the Cobalt3 skin, you can do so with the following URL:

<a href="{$JAMROOM_URL}/epk.php?band_id={$BAND_ID}&template=chart_audio.tpl&tpl_dir=skin&skin=Cobalt3">Weekly Charts</a>

Additional Information

The Artist EPKs are generated with the html2pdf library.  Using this library, Jamroom first creates an HTML file from the EPK template, from which a PDF file is then generated and displayed to the user.  You can find the HTML files that have been generated by the EPK system in each artist directory, with the naming convention epk_theme/template.html, where theme/template is either the name of theme being used if not template is given (i.e. epk_cobalt3.html), or the template from which the HTML file was generated (i.e. epk_chart_audio.html).  Sometimes, Smarty functions used in your EPK templates will not work correctly when viewing the PDF (particularly, {debug output="html"}).  In order to view this information, you can view the generated HTML file, and you will then be able to see all of the debug information.


Jamroom Application Bridges page 84 of 171 Working with Jamroom Templates
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