The Basic Meeting List Toolbox

The Basic BMLT Satellite

Click Here to Go to the Intro PageThe Basic (Formerly called “Standalone”) Satellite is actually a PHP class that you integrate into your own PHP code. It does not require that your site be a Content Management System.

The Basic Satellite does require that you have PHP 5.0 or greater installed. For a complete description of the server requirements, check this page.

Getting The Code

The code is in a BitBucket code repository: https://bitbucket.org/bmlt/bmlt-basic

Instructions:

  1. Download the release version as a ZIP file. The file will be called “bmlt-basic.zip”.
    NOTE: You should always use this zipped file, as opposed to directly fetching from Git. That is because the project contains Git submodules, and Git does not recursively fetch submodules. You will end up with empty directories where the submodules are supposed to be.
  2. Unzip this file. It will create a directory (folder) called “bmlt-basic”.
  3. Inside this directory are a bunch of files prefaced with “sample_XXX.” These are examples of how to create various BMLT displays, and will not be necessary to install on your server. However, the “index.php” file is initially the most important file, as it contains exact instructions for implementing the BMLT in your site. If you run it, you will get a simple default implementation on a blank page. (NOTE: Since these are PHP files, you can’t just drag them into your browser. You need to actually install them onto a Web server, then run them on that server).
  4. You need to make sure that the “bmlt-basic” directory is in the same directory as the PHP page that you will be modifying to implement the BMLT.
  5. You will also need to set up the “config-bmlt-basic.inc.php” file. That file is extremely well documented about what you need to change.
  6. View the “index.php” file to see exactly what you need to do to set up the Basic Client.

The Code Listing

The following is the code listing for the “index.php” file:

<?php
/********************************************************************************************
*           EXAMPLE OF THE MOST BASIC IMPLEMENTATION OF THE BASIC BMLT SATELLITE            *
*                                                                                           *
*                       Find out more at: http://bmlt.magshare.org                        *
*                                                                                           *
* This file demonstrates how to integrate the default interactive search into any PHP file. *
* You do not need a content management system (like WordPress or Joomla). You just need to  *
* include the 'bmlt-basic' directory, and all its contents, into the same directory as      *
* this file. You will edit the 'config-bmlt-basic.inc.php' file to establish the settings.  *
* The 'config-bmlt-basic.inc.php' file must be in the same directory as this file.          *
*                                                                                           *
* REQUIREMENTS:                                                                             *
*   This needs to run on a server that supports PHP 5.0 or greater.                         *
*   You do NOT need MySQL or PDO. Just a PHP 5 server is sufficient.                        *
*   This file needs to be a PHP file (not an HTML file).                                    *
*                                                                                           *
* First, you need to edit the config-bmlt-basic.inc.php to set up the environment.          *
* Once that is done, then proceed with the 3 steps below.                                   *
********************************************************************************************/

/********************************************************************************************
*                           STEP ONE: INCLUDE THE CLASS FILE.                               *
*                                                                                           *
* You should do "require_once" or "include_once", just as a standard practice (It is not    *
* actually necessary in this case, but you should get in the habit).                        *
* This needs to be done first up; BEFORE the start of HTML. Notice that this is all in a    *
* PHP section. This will create a variable, called "$basic_bmlt_object", which will hold    *
* an instance of our class.                                                                 *
********************************************************************************************/
require_once ( dirname ( __FILE__ ).'/bmlt-basic/bmlt_basic.class.php' );

/********************************************************************************************
* Now, you can start the standard HTML. PHP is mixed in with classic HTML. You declare PHP  *
* sections by using <?php...?> blocks. These cause the Webserver to execute the PHP at that *
* point. You will never see the PHP in your actual page output.                             *
********************************************************************************************/
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Demonstration of Standalone BMLT Satellite</title>
        
<!-- ***********************************************************************************
     *                       STEP TWO: GENERATE THE HEAD CONTENT                       *
     *                                                                                 *
     * You should decide what shortcode you will use (our example uses the standard    *
     * '[[BMLT]]' default interactive search. You can see what other choices you have  *
     * by visiting this page: https://bmlt.magshare.net/shortcodes/                     *
     * Call the $basic_bmlt_object->output_head() function, with your shortcode as     *
     * the parameter.                                                                  *
     *********************************************************************************** -->
    <?php $basic_bmlt_object->output_head('[[BMLT]]'); ?>
<!-- *********************************************************************************** -->

    </head>
    <body>
    
<!-- ***********************************************************************************
     *                      STEP THREE: GENERATE THE BODY CONTENT                      *
     *                                                                                 *
     * This is almost exactly like STEP ONE, except that you are now calling the       *
     * $basic_bmlt_object->output_body() function. It does not need the shortcode.     *
     *                                                                                 *
     *********************************************************************************** -->
    <?php $basic_bmlt_object->output_body(); ?>
<!-- *********************************************************************************** -->

    </body>
</html>

If you take all the formatting, comments and header stuff out of the above file, you get something like this (We don’t need to specify the shortcode to get the default implementation):

<?php require_once ( dirname ( __FILE__ ).'/bmlt-basic/bmlt_basic.class.php' ); ?>
<head><?php $basic_bmlt_object->output_head(); ?></head>
<body><?php $basic_bmlt_object->output_body(); ?></body>

What could possibly be simpler?