Jamroom Logo
Member Spotlight
469154
CastMP3.com
"CastMP3 is an international company founded by a group of friends from Switzerland, France and Germany, all of them enthusiastic internet and music lovers with various backgrounds. We believe that everybody who makes the effort of producing music, video and image on their own should be given the opportunity to be distributed. Our vision: an international, multilingual web site where independent artists can publish their music, videos and images and where music lovers can discover and directly buy their art. Jamroom is the only platform that can support our ambitions. CastMP3.com is headquartered in Zurich, Switzerland."
Follow Jamroom on Twitter!


Introduction - Who should develop a Jamroom Module? Index Required Module File: include.php

Jamroom Module Structure

The first step in creating a new Jamroom Module is to understand the proper file and directory structure for the module.  All Jamroom add-on modules will be found in the "modules" directory within your Jamroom directory.

For example, if your Jamroom was installed in the:

/home/jamroom/public_html

directory, the Jamroom modules would be installed in:

/home/jamroom/public_html/modules

EACH module must have it's own directory inside the /modules directory.

As an example, in this guide we will be creating a small Jamroom Module that will allow user's to add YouTube videos to their profile.  This module will be called "jrYouTube".

So for our example, our module would be located at:

/home/jamroom/public_html/modules/jrYouTube

It is HIGHLY recommended that you use a 2 letter "prefix" for your module name to ensure it is unique.  We use "jr", so you'll want to use something else ;)

Within the module directory there are several other files and directories - some required, and some optional.  The following files and directories would be located INSIDE your module directory (i.e. /home/jamroom/public_html/modules/jrYouTube):

  • include.php - this is the main "includer" for the module and is required.  If your module does not have a include.php script within, Jamroom will ignore the module as if it does not exist.
  • quota.php - (optional) The quota.php script defines settings that can be adjusted and set on a per Jamroom Quota basis for your modules.
  • schema.php (optional) If your module creates a Jamroom database table, the schema.php script is where the database table definitions reside, and includes the main function that is run for the module when the user runs a Jamroom Integrity Check.
  • theme.php - (optional) If your module creates an item that can be used in a Profile Theme, the theme.php script gives you control over that items "loop" when the Profile Theme is being generated.
  • image.php - (optional) If your module saves images uploaded by the user, the image.php script is used to integrate the image display with Jamroom's image.php script.
  • cp/ - (directory, optional) - the cp directory will contain any Control Panel interface PHP scripts that generate "sections" in the Jamroom Control Panel.
  • include/ - (directory, optional) - the include directory is where you would want to store any PHP function libraries or classes for use in your module.
  • language/ - (directory, optional) - If your module provides a Control Panel interface, the custom language strings for your module would be found in the language directory.
  • ranking/ - (directory, optional) - Any custom Jamroom Ranking System plugins will be located here.
  • smarty/ (directory, optional) - Any custom Smarty (Jamroom templates) functions, blocks and modifiers would be located here.

Each of these scripts and directories will be covered in detail on the following pages.

 

Introduction - Who should develop a Jamroom Module? Introduction - Who should develop a Jamroom Module? page 2 of 23 Required Module File: include.php Required Module File: include.php
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom Core
Jamroom Addons
Jamroom Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2013 The Jamroom Network