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


Creating a Module Control Panel in the Jamroom Config: config.php Index Including additional Libraries in your Module

Creating a new Tool Option in the Jamroom Tools Menu

If your Jamroom module would like to make a new Jamroom Tool option available to the Jamroom Master Admin, you can create a special "tools.php" script that provides the Form options for your Jamroom Tool.  The "work" part of your Jamroom tool should be located in the Form Controller script.

For our example jrYouTube module, we're going to have a small Jamroom Tool that simply allows the Master Admin to browse all the entered YouTube videos and play them if they want.

So the first script we want to create is our small tools.php script - this is going to be really small since all it does is define the menu item in the Jamroom Tools menu:

<?php
/**
 * Jamroom jrYouTube Module Jamroom Tool menu item
 * @copyright 2009 by Talldude Networks LLC.
 * @author Brian Johnson - bigguy@jamroom.net
 */
defined('IN_JAMROOM') or exit();

/**
 * The _tools function creates our Jamroom Tools menu entry
 * @param array Jamroom master config
 * @return bool returns true
 */
function jrYouTube_tools($config)
{
    jmToolCell('YouTube Video Browser',"Browse YouTube Videos entered by your Users",
      'jrYouTube.php?mode=video_browse');
    return(true);
}
?>

You can see that the script is very simple - we:

  • Define a function called "jrYouTube_tools()" - Jamroom will look for a function named ModuleName_tools - if it finds it, it will execute it.
  • Within the jrYouTube_tools() function we setup a Jamroom Tools menu entry by using the jmToolCell() function, which simply creates a linkable entry that we can tie our jrYouTube.php script to.

The actual work that the new Jamroom Tool will do will be found in our Form Controller script located in the master Jamroom directory.

Creating a Module Control Panel in the Jamroom Config: config.php Creating a Module Control Panel in the Jamroom Config: config.php page 13 of 23 Including additional Libraries in your Module Including additional Libraries in your Module
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