c_comdef_mainpage.txt.php

Go to the documentation of this file.
00001 <?php
00002 /***********************************************************************/
00003 /** \mainpage
00004     <div style="height:24px"></div>
00005     <div style="height:80px;background-color: #0013d2;background-image:url(../images/DocHeader.gif);background-position:center top;background-repeat:no-repeat"></div>
00006     
00007     <h1>INTRODUCTION</h1>
00008     
00009     The BMLT has two main components: The root server, which is implemented by
00010     the main_server directory, and the satellite server, which is a relatively
00011     small piece of code that connects to the root server, and is implemented by
00012     the satellite_server directory.
00013     
00014     \license This code is completely open and free. You may access it by <a href="http://magshare.org/welcome-to-magshare/bmlt-the-basic-meeting-list-toolbox/">visiting the BMLT Project Site</a>. No one is allowed to resell this code. It should never be sold.
00015     \version 1.5.3
00016     
00017     This is the standalone and PDF generator "satellite server." There are also
00018     plugins for Joomla!, Drupal and WordPress, but they are each separate projects.
00019     
00020     <h2>HOW TO USE THE SATELLITE SERVER</h2>
00021     
00022     This is the "embedable" version of the satellite. That means that it is some
00023     PHP code that you can insert into your own PHP site, and it will implement
00024     a BMLT satellite. It is not a "plug and play" plugin or component, like the
00025     WordPress, Drupal or Joomla! plugins. It needs you to do a bit of work.
00026     However, it isn't much work at all.
00027     
00028     <h3>The Structure of the Code</h3>
00029     
00030     The standalone satellite server consists of one PHP class: BMLT_Satellite. This
00031     is instantiated by your code, and you simply make a couple of calls to it in order
00032     to generate the BMLT code you need for your site.
00033     
00034     For an example of this file, look at the standalone/index.php file. It will show
00035     exactly how you implement this code.
00036     
00037     Before you start, <a href="http://bmlt-standalone.svn.sourceforge.net/viewvc/bmlt-standalone/stable/download/satellite_server.zip">download the source code for the standalone satellite</a>.
00038     
00039     The next thing to do is to set up your parameters in the standalone/config.inc file.
00040     You'll need to get a <a href="http://code.google.com/apis/maps/signup.html">Google Maps API Key</a> for your domain, and replace the
00041     default one with that.
00042     
00043     You will also need to point to whatever root server is being used. You get this URL from
00044     the root server administrator.
00045     
00046     There's a couple of other parameters in there that are pretty self-explanatory.
00047     
00048     In order to start, you should do an <a href="http://www.w3schools.com/PHP/php_includes.asp">include() or require()</a> of the BMLT_Satellite.class.php
00049     file at the beginning of your file (before any HTML), like so:
00050     
00051     \code
00052         <?php
00053             include ( dirname ( __FILE__ ).'/standalone/BMLT_Satellite.class.php' );
00054             
00055             if ( !(($bmlt_instance = BMLT_Satellite::MakeBMLT()) instanceof BMLT_Satellite) )
00056                 {
00057                 die ( 'The BMLT object could not be created' );
00058                 }
00059         ?>
00060     \endcode
00061 
00062     The "dirname ( __FILE__ )" simply tells PHP to start off where the file is, and that the
00063     path should be relative from there. It is sort of optional, but it's usually a good
00064     idea to do that. It will allow the file to be included into other files.
00065     
00066     The BMLT_Satellite::MakeBMLT() function is a "factory" function. It ensures that there is only ever
00067     one instance of the class, which is important.
00068     
00069     The $bmlt_instance variable will now contain your connection to the BMLT root server.
00070 
00071     After that, start building the Web page. Put the standard DOCTYPE stuff in there, and start the &lt;head&gt;
00072     section.
00073     
00074     Now, the BMLT will need to put some stuff in the &lt;head&gt; section of the page, so we
00075     run a quick BMLT_Satellite::Execute('head') call inside the head, like so:
00076     
00077     \code
00078 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
00079 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
00080     <head>
00081         <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
00082         <title>Demo of the BMLT</title>
00083         <?php echo ( $bmlt_instance->Execute ( 'head' ) ); ?>
00084     </head>
00085     \endcode
00086     
00087     An important note is that "<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />". This meta element
00088     is necessary, because the new <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx">Microsoft Internet Explorer 8</a> browser doesn't behave
00089     particularly well, unless it is sternly spoken to by that meta tag. Just take our word for it. Failing
00090     that, why don't you <a href="http://blogs.msdn.com/askie/archive/2009/03/23/understanding-compatibility-modes-in-internet-explorer-8.aspx">take Microsoft's word</a> for it?
00091     
00092     After that, you'll need to insert one more BMLT_Satellite::Execute() call in the &lt;body&gt;, and that's it!
00093     
00094     In this call to BMLT_Satellite::Execute(), you don't specify any parameters. The class knows what to do.
00095     
00096     \code
00097     <body>
00098         <?php echo ( $bmlt_instance->Execute ( ) ); ?>
00099     </body>
00100 </html>
00101     \endcode
00102     
00103     Here is a complete, minimalist implementation of the BMLT:
00104     
00105     \code
00106 <?php
00107     include ( dirname ( __FILE__ ).'/standalone/BMLT_Satellite.class.php' );
00108     
00109     if ( !(($bmlt_instance = BMLT_Satellite::MakeBMLT()) instanceof BMLT_Satellite) )
00110         {
00111         die ( 'The BMLT object could not be created' );
00112         }
00113 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
00114 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
00115     <head>
00116         <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
00117         <title>Demo of the BMLT</title>
00118         <?php echo ( $bmlt_instance->Execute ( 'head' ) ); ?>
00119     </head>
00120     <body>
00121         <?php echo ( $bmlt_instance->Execute ( ) ); ?>
00122     </body>
00123 </html>
00124     \endcode
00125     
00126     What could be simpler?
00127     
00128     In the example file, you will see the following CSS in the &lt;head&gt; section:
00129     
00130     \code
00131         <style type="text/css">
00132             *{ margin: 0; padding: 0 }
00133             body, html{ width:100%; height:100% }
00134         </style>
00135     \endcode
00136     
00137     This is there to ensure that the map fills the entire screen in all browsers. It's required for Internet
00138     Explorer 6.
00139     
00140     So, let's add that to our minimalist file:
00141     
00142     \code
00143 <?php
00144     include ( dirname ( __FILE__ ).'/standalone/BMLT_Satellite.class.php' );
00145     
00146     if ( !(($bmlt_instance = BMLT_Satellite::MakeBMLT()) instanceof BMLT_Satellite) )
00147         {
00148         die ( 'The BMLT object could not be created' );
00149         }
00150 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
00151 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
00152     <head>
00153         <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
00154         <title>Demo of the BMLT</title>
00155         <?php echo ( $bmlt_instance->Execute ( 'head' ) ); ?>
00156         <style type="text/css">
00157             *{ margin: 0; padding: 0 }
00158             body, html{ width:100%; height:100% }
00159         </style>
00160     </head>
00161     <body>
00162         <?php echo ( $bmlt_instance->Execute ( ) ); ?>
00163     </body>
00164 </html>
00165     \endcode
00166 
00167     That's all you need to do to give your Groups the best meeting list possible!
00168     
00169     <h3>IMPORTANT CAVEAT!</h3>
00170     If you wish to use the <em>local</em> PDF generator (set $use_local_pdf_generator to true),
00171     then you need to keep the <code>standalone</code> and <code>pdf_generator</code>
00172     directories on the same level as the main file that you use as your satellite file. It is possible
00173     to move them around, but that requires monkeying with the code, and you probably want to avoid that.
00174     Just plonk the two directories on the same level as your main file, and it should be OK.
00175 
00176     <h2 id="docs_release_notes">RELEASE NOTES:</h2>
00177     - September 18, 2010 -1.5.3 Release
00178         - Added support for specifying advanced map or advanced text as an initial screen.
00179         
00180     - August 30, 2010 -1.5.2 Release
00181         - Made all cURL calls use GET, as some servers have a cow with POST.
00182         - Added some CSS to the example index.php file to keep the map view in control.
00183         
00184     - April 26, 2010 -1.5.1 Release
00185         - Fixed an old bug that could affect the way the server interaction works (curl).
00186         
00187     - April 2, 2010 -1.5 Release
00188         - Added support for the "simple" HTML tables.
00189         
00190     - March 24, 2010 -1.4.3 Release
00191         - Added support for BlackBerry phones
00192         - Fixed a bug in one of the NY-specific list printers
00193         
00194     - March 5, 2010 -1.4.2 Release
00195         - Replaced deprecated eregi calls with preg_match
00196         
00197     - February 16, 2010 -1.4.1 Release
00198         - Added support for Android
00199     
00200     - February 13, 2010 -1.4 Release
00201         - Added iPhone support
00202         
00203     - November 11, 2009 -1.2.16 Release
00204         - The &lt;noscript&gt; element wasn't formatted correctly, and caused an issue with Total Validator. This has been fixed.
00205 
00206     - November 3, 2009 -1.2.15 Release
00207         - The first release of this project as a separate project.
00208 */
00209 ?>
 All Data Structures Files Functions Variables Enumerations