Jamroom Logo   Get Jamroom now for as low as !
The Powerful Social Media Platform
free download!
key features
key features
Newsletter
E-mail Address:

Spotlight
AudioJam Music
244678 "We were looking for a powerful script that could handle the membership of musicians. Never in our wildest dreams did we expect to find this script which has proven easy to use and customize, reliable and offering tons of features we didn’t even think of. AudioJam Music has really taken off and after only 3 weeks we are almost ready to upgrade to the unlimited version! The artists love it and are enjoying the process of setting up their profiles, they are finding it very easy and quick to use."
{jr_counts} {jr_counts} Index {jr_custom_skin} {jr_custom_skin}
 

{jr_create_directory}

Overview:

The {jr_create_directory} template function is a very powerful template function that can be used to create directories and process templates from within a Jamroom Template.  The created directories, and output of the processed template(s) will be placed into the given band_id's member/media/upload directory.

Usage:

Place the {jr_create_directory} function, along with any additional parameters into a Jamroom Template.

Parameters:

Name Type Required Default Description
band_id number yes n/a The "band_id" parameter tells Jamroom which band_id you want to run the function for.
name string yes n/a

The "name" function tells Jamroom the name of the sub directory you want created within the profiles directory - i.e. members/band_id/directory_name.  When called, if the directory does not exist, it will be created.

dir string no "member" The "dir" parameter tells Jamroom which Jamroom directory you want the sub directory created within.  Valid values are "member" (use this even if your member directory is named something else), "media" (use this even if your media directory is named something else) or "uploads".
files array no n/a The optional "files" parameter should be an array (prepared using the {jr_array} template function) of Templates => Out File names that you want the function to process.  The template MUST be located in the theme directory for the profile theme being used by the band_id.

Examples:

embedded {jr_create_directory} function which creates a "test" sub directory in band_id 5's members directory, and writes an index.html file inside that directory:

{jr_array name="files" key="test_index.tpl" value="index.html"}

{jr_create_directory band_id="5" name="test" dir="member" files=$files}

 

contents of jamroom/themes/Theme_Name/test_index.tpl:

<html>

<head>

<title>Welcome to the test page for {$BAND_ID}</title>

</head>

<body>

Welcome to the test page for {$BAND_NAME}!

</body>

</html>

{jr_counts} {jr_counts} page 137 of 184 {jr_custom_skin} {jr_custom_skin}
Home | Download | Support | Demo | Members | Purchase | Marketplace | Contact | Privacy
©2003 - 2008 Talldude Networks, LLC.