<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://gwiki3.thatlinuxbox.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Trinity</id>
		<title>GeeklogWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://gwiki3.thatlinuxbox.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Trinity"/>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/Special:Contributions/Trinity"/>
		<updated>2026-04-06T05:15:48Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.5</generator>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Dynamic_Blocks&amp;diff=3886</id>
		<title>Dynamic Blocks</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Dynamic_Blocks&amp;diff=3886"/>
				<updated>2005-11-22T00:34:29Z</updated>
		
		<summary type="html">&lt;p&gt;Trinity: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dynamic Block Plugin API in Geeklog 1.4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The dynamic block plugin API is a new feature of Geeklog 1.4. This new API function alows plugin &lt;br /&gt;
developers to create left and right blocks in Geeklog on the fly without adding a block to the blocks table.&lt;br /&gt;
This is acomplished by inserting the block data directly into the aray of blocks that is created from a SQL &lt;br /&gt;
call to the blocks table before it is used to create what is displayed. What follows is an description of the &lt;br /&gt;
API call and its use in a plugin..&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Dynamic Block API&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This section will describe and document how to enable your plugin to use the Geeklog dynamic block API.&lt;br /&gt;
This will be a usefull feature of plugin functionality for many developers and it has been designed to be easy to integrate&lt;br /&gt;
into your plugin. We have done our best to make this straight forward &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;NOTE:&amp;lt;/b&amp;gt; You will need to be using Geeklog version 1.4 or later to successfully use the Dynamic Block API. This &lt;br /&gt;
plugin  API is only avaliable in Geeklog 1.4 and is not present in previous versions of Geeklog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only one plugin function that is requiered to support dynamic blocks in a plugin. &lt;br /&gt;
The example function that is included in this explanation are very complete. &lt;br /&gt;
You should only need to edit them for your plugin name name. The following table summarizes the functions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;table cellPadding=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
style=&amp;quot;border-collapse: collapse&amp;quot; bordercolor=&amp;quot;#111111&amp;quot;&lt;br /&gt;
cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th vAlign=&amp;quot;top&amp;quot; width=&amp;quot;4%&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th vAlign=&amp;quot;top&amp;quot; width=&amp;quot;31%&amp;quot;&amp;gt;Function&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th vAlign=&amp;quot;top&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;Description of Function&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
	  &amp;lt;td class=&amp;quot;codeheader&amp;quot; vAlign=&amp;quot;top&amp;quot; width=&amp;quot;5%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;font&lt;br /&gt;
size=&amp;quot;2&amp;quot;&amp;gt;1&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	  &amp;lt;td class=&amp;quot;codeheader&amp;quot; vAlign=&amp;quot;top&amp;quot; width=&amp;quot;10%&amp;quot;&amp;gt;&amp;lt;font&lt;br /&gt;
size=&amp;quot;2&amp;quot;&amp;gt;plugin_getBlocks_&amp;amp;lt;plugin name&amp;amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	  &amp;lt;td class=&amp;quot;code&amp;quot; vAlign=&amp;quot;top&amp;quot; width=&amp;quot;85%&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;This&lt;br /&gt;
function expects two parameters:  side and topic&lt;br /&gt;
. This function is called when a left and right blocks are created with COM_showBlocks in lib-common.php.  &lt;br /&gt;
It is up to the plugin to make sure that&lt;br /&gt;
the requesting user has sufficient permissions to veiw any blocks that are returned&lt;br /&gt;
. It should return an aray of block data containing the dynamicaly generated blocks&lt;br /&gt;
 that you wish the user to see.&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Function Details and Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Examples provided here have been provided from an initial example created by the &lt;br /&gt;
developer of the Dynamic Block API for a plugin curently in development&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This function expects two parameters:  side and topic&lt;br /&gt;
. This function is called when a left and right blocks are created with COM_showBlocks in lib-common.php.  &lt;br /&gt;
It is up to the plugin to make sure that the requesting user has sufficient permissions to veiw any blocks that are returned&lt;br /&gt;
. It should return an aray of block data containing the dynamicaly generated blocks&lt;br /&gt;
 that you wish the user to see.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;white-space:pre; border: solid; border-color: black;&lt;br /&gt;
border-width: 1; background-color: #DDDDDD; padding: 6px 6px 6px 6px;&lt;br /&gt;
font-size: x-small&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
* Returns blocks for this plugin that should appear when COM_showBlocks is run&lt;br /&gt;
*&lt;br /&gt;
* NOTE: this MUST return the label/value pairs in the following format&lt;br /&gt;
* &amp;amp;#36;items[] = array('label1' =&amp;gt; 'value', 'label2' =&amp;gt; 'value')&lt;br /&gt;
* Basic avaliable lables are..&lt;br /&gt;
*   name     Name of block (BLOCK_ID)&lt;br /&gt;
*   type       Must always be set 'dynamic' unless you use advanced API labels&lt;br /&gt;
*                Advanced API means you set all fields that COM_showBlocks &lt;br /&gt;
*                expects to see from the blocks table. All labels are column names&lt;br /&gt;
*   title        Title of block&lt;br /&gt;
*   blockorder     Block order number&lt;br /&gt;
*   content         Body of the block (the html output)&lt;br /&gt;
*   help            Optional url to a help page&lt;br /&gt;
*&lt;br /&gt;
*  You must only return left or right blocks based on &amp;amp;#36;side and&lt;br /&gt;
*  you must also do your own security checks. Everything you send &lt;br /&gt;
*  will show up on a page load&lt;br /&gt;
* &lt;br /&gt;
*&lt;br /&gt;
* &lt;br /&gt;
*/&lt;br /&gt;
function plugin_getBlocks_glcommerce(&amp;amp;#36;side, &amp;amp;#36;topic='' )&lt;br /&gt;
&amp;amp;#123;&lt;br /&gt;
    global &amp;amp;#36;_CONF, &amp;amp;#36;_USER, &amp;amp;#36;HTTP_SERVER_VARS, &amp;amp;#36;REQUEST_URI, &amp;amp;#36;sess, &amp;amp;#36;db;&lt;br /&gt;
    // only show on a page in the plugin's dir&lt;br /&gt;
    If (in_string('glcommerce', &amp;amp;#36;REQUEST_URI))&lt;br /&gt;
   &amp;amp;#123;&lt;br /&gt;
        // generate left blocks&lt;br /&gt;
        if (&amp;amp;#36;side=='left')&lt;br /&gt;
        &amp;amp;#123;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;display1 = glc_makemenu();&lt;br /&gt;
            &amp;amp;#36;display2 = glc_latestprod();&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;items[] = array('name' =&amp;gt; 'glcommerce_1',&lt;br /&gt;
                                           'type' =&amp;gt; 'dynamic',&lt;br /&gt;
                                           'onleft' =&amp;gt; 1,&lt;br /&gt;
                                           'title' =&amp;gt; 'Shop Menu', &lt;br /&gt;
                                           'blockorder' =&amp;gt; 1,&lt;br /&gt;
                                           'content' =&amp;gt; &amp;amp;#36;display1, &lt;br /&gt;
                                           'help' =&amp;gt; '/glcommerce/help.html');&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;items[] = array('name' =&amp;gt; 'glcommerce_2',&lt;br /&gt;
                                           'type' =&amp;gt; 'dynamic',&lt;br /&gt;
                                           'onleft' =&amp;gt; 1,&lt;br /&gt;
                                           'title' =&amp;gt; 'Latest Products ',&lt;br /&gt;
                                           'blockorder' =&amp;gt; 1,&lt;br /&gt;
                                           'content' =&amp;gt; &amp;amp;#36;display2,&lt;br /&gt;
                                           'help' =&amp;gt; '/glcommerce/help.html');&lt;br /&gt;
&lt;br /&gt;
        &amp;amp;#125; else &amp;amp;#123;&lt;br /&gt;
        // else generate right blocks&lt;br /&gt;
            &amp;amp;#36;display3 = glc_featuredprod()'&lt;br /&gt;
            &amp;amp;#36;display4 = glc_minicart();&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;items[] = array('name' =&amp;gt; 'glcommerce_3', &lt;br /&gt;
                                           'type' =&amp;gt; 'dynamic',&lt;br /&gt;
                                           'onleft' =&amp;gt; 0,&lt;br /&gt;
                                           'title' =&amp;gt; 'Featured Stuff',&lt;br /&gt;
                                           'blockorder' =&amp;gt; 1,&lt;br /&gt;
                                           'content' =&amp;gt; &amp;amp;#36;display3, &lt;br /&gt;
                                           'help' =&amp;gt; '/glcommerce/help.html'); &lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;items[] = array('name' =&amp;gt; 'glcommerce_4',&lt;br /&gt;
                                           'type' =&amp;gt; 'dynamic',&lt;br /&gt;
                                           'onleft' =&amp;gt; 0,&lt;br /&gt;
                                           'title' =&amp;gt; 'My Cart', &lt;br /&gt;
                                           'blockorder' =&amp;gt; 1, &lt;br /&gt;
                                           'content' =&amp;gt; &amp;amp;#36;display4, &lt;br /&gt;
                                           'help' =&amp;gt; '/glcommerce/help.html'); &lt;br /&gt;
&lt;br /&gt;
       &amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
   &amp;amp;#125;&lt;br /&gt;
   return &amp;amp;#36;items;&lt;br /&gt;
&amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Function PLG_getBlocks() for refrence&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;white-space:pre; border: solid; border-color: black;&lt;br /&gt;
border-width: 1; background-color: #DDDDDD; padding: 6px 6px 6px 6px;&lt;br /&gt;
font-size: x-small&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* gets Geeklog blocks from plugin's&lt;br /&gt;
*&lt;br /&gt;
* Returns data for blocks on a given side and, potentially, for&lt;br /&gt;
* a given topic.&lt;br /&gt;
*&lt;br /&gt;
* @param        string      &amp;amp;#36;side       Side to get blocks for (right or left for now)&lt;br /&gt;
* @param        string      &amp;amp;#36;topic      Only get blocks for this topic&lt;br /&gt;
* @return   array of block data&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
function PLG_getBlocks( &amp;amp;#36;side, &amp;amp;#36;topic='')&lt;br /&gt;
&amp;amp;#123;&lt;br /&gt;
    global &amp;amp;#36;_PLUGINS;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;#36;ret = array();&lt;br /&gt;
    foreach (&amp;amp;#36;_PLUGINS as &amp;amp;#36;pi_name)&lt;br /&gt;
    &amp;amp;#123;&lt;br /&gt;
        &amp;amp;#36;function = 'plugin_getBlocks_' . &amp;amp;#36;pi_name;&lt;br /&gt;
        if (function_exists(&amp;amp;#36;function))&lt;br /&gt;
        &amp;amp;#123;&lt;br /&gt;
            &amp;amp;#36;items = &amp;amp;#36;function(&amp;amp;#36;side, &amp;amp;#36;topic='');&lt;br /&gt;
            if (is_array (&amp;amp;#36;items))&lt;br /&gt;
            &amp;amp;#123;&lt;br /&gt;
                &amp;amp;#36;ret = array_merge (&amp;amp;#36;ret, &amp;amp;#36;items);&lt;br /&gt;
            &amp;amp;#125;&lt;br /&gt;
        &amp;amp;#125;&lt;br /&gt;
    &amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
    // future code to do a lib-custom function&lt;br /&gt;
    /*&lt;br /&gt;
    if (function_exists('CUSTOM_getBlocks')) &amp;amp;#123;&lt;br /&gt;
       &amp;amp;#36;cust_items .= CUSTOM_getBlocks(&amp;amp;#36;side, &amp;amp;#36;topic='');&lt;br /&gt;
       if (is_array (&amp;amp;#36;cust_items)) &amp;amp;#123;&lt;br /&gt;
          &amp;amp;#36;ret = array_merge (&amp;amp;#36;ret, &amp;amp;#36;cust_items)&lt;br /&gt;
       &amp;amp;#125;&lt;br /&gt;
    &amp;amp;#125;&lt;br /&gt;
    */&lt;br /&gt;
    return &amp;amp;#36;ret;&lt;br /&gt;
&amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Geeklog_1.3x_Documentation|Main TOC]]&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Complete TOC]]&lt;/div&gt;</summary>
		<author><name>Trinity</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Dynamic_Blocks&amp;diff=3884</id>
		<title>Dynamic Blocks</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Dynamic_Blocks&amp;diff=3884"/>
				<updated>2005-11-22T00:33:22Z</updated>
		
		<summary type="html">&lt;p&gt;Trinity: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dynamic Block Plugin API in Geeklog 1.4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The dynamic block plugin API is a new feature of Geeklog 1.4. This new API function alows plugin &lt;br /&gt;
developers to create left and right blocks in Geeklog on the fly without adding a block to the blocks table.&lt;br /&gt;
This is acomplished by inserting the block data directly into the aray of blocks that is created from a SQL &lt;br /&gt;
call to the blocks table before it is used to create what is displayed. What follows is an description of the &lt;br /&gt;
API call and its use in a plugin..&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Dynamic Block API&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This section will describe and document how to enable your plugin to use the Geeklog dynamic block API.&lt;br /&gt;
This will be a usefull feature of plugin functionality for many developers and it has been designed to be easy to integrate&lt;br /&gt;
into your plugin. We have done our best to make this straight forward &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;NOTE:&amp;lt;/b&amp;gt; You will need to be using Geeklog version 1.4 or later to successfully use the Dynamic Block API. This &lt;br /&gt;
plugin  API is only avaliable in Geeklog 1.4 and is not present in previous versions of Geeklog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only one plugin function that is requiered to support dynamic blocks in a plugin. &lt;br /&gt;
The example function that is included in this explanation are very complete. &lt;br /&gt;
You should only need to edit them for your plugin name name. The following table summarizes the functions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;table cellPadding=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
style=&amp;quot;border-collapse: collapse&amp;quot; bordercolor=&amp;quot;#111111&amp;quot;&lt;br /&gt;
cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th vAlign=&amp;quot;top&amp;quot; width=&amp;quot;4%&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th vAlign=&amp;quot;top&amp;quot; width=&amp;quot;31%&amp;quot;&amp;gt;Function&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;th vAlign=&amp;quot;top&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;Description of Function&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
	  &amp;lt;td class=&amp;quot;codeheader&amp;quot; vAlign=&amp;quot;top&amp;quot; width=&amp;quot;5%&amp;quot; align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;font&lt;br /&gt;
size=&amp;quot;2&amp;quot;&amp;gt;1&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	  &amp;lt;td class=&amp;quot;codeheader&amp;quot; vAlign=&amp;quot;top&amp;quot; width=&amp;quot;10%&amp;quot;&amp;gt;&amp;lt;font&lt;br /&gt;
size=&amp;quot;2&amp;quot;&amp;gt;plugin_getBlocks_&amp;amp;lt;plugin name&amp;amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	  &amp;lt;td class=&amp;quot;code&amp;quot; vAlign=&amp;quot;top&amp;quot; width=&amp;quot;85%&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;This&lt;br /&gt;
function expects two parameters:  side and topic&lt;br /&gt;
. This function is called when a left and right blocks are created with COM_showBlocks in lib-common.php.  &lt;br /&gt;
It is up to the plugin to make sure that&lt;br /&gt;
the requesting user has sufficient permissions to veiw any blocks that are returned&lt;br /&gt;
. It should return an aray of block data containing the dynamicaly generated blocks&lt;br /&gt;
 that you wish the user to see.&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Function Details and Examples&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Examples provided here have been provided from an initial example created by the &lt;br /&gt;
developer of the Dynamic Block API for a plugin curently in development&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This function expects two parameters:  side and topic&lt;br /&gt;
. This function is called when a left and right blocks are created with COM_showBlocks in lib-common.php.  &lt;br /&gt;
It is up to the plugin to make sure that the requesting user has sufficient permissions to veiw any blocks that are returned&lt;br /&gt;
. It should return an aray of block data containing the dynamicaly generated blocks&lt;br /&gt;
 that you wish the user to see.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;white-space:pre; border: solid; border-color: black;&lt;br /&gt;
border-width: 1; background-color: #DDDDDD; padding: 6px 6px 6px 6px;&lt;br /&gt;
font-size: x-small&amp;quot;&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
* Returns blocks for this plugin that should appear when COM_showBlocks is run&lt;br /&gt;
*&lt;br /&gt;
* NOTE: this MUST return the label/value pairs in the following format&lt;br /&gt;
* &amp;amp;#36;items[] = array('label1' =&amp;gt; 'value', 'label2' =&amp;gt; 'value')&lt;br /&gt;
* Basic avaliable lables are..&lt;br /&gt;
*   name     Name of block (BLOCK_ID)&lt;br /&gt;
*   type       Must always be set 'dynamic' unless you use advanced API labels&lt;br /&gt;
*                Advanced API means you set all fields that COM_showBlocks &lt;br /&gt;
*                expects to see from the blocks table. All labels are column names&lt;br /&gt;
*   title        Title of block&lt;br /&gt;
*   blockorder     Block order number&lt;br /&gt;
*   content         Body of the block (the html output)&lt;br /&gt;
*   help            Optional url to a help page&lt;br /&gt;
*&lt;br /&gt;
*  You must only return left or right blocks based on &amp;amp;#36;side and&lt;br /&gt;
*  you must also do your own security checks. Everything you send &lt;br /&gt;
*  will show up on a page load&lt;br /&gt;
* &lt;br /&gt;
*&lt;br /&gt;
* &lt;br /&gt;
*/&lt;br /&gt;
function plugin_getBlocks_glcommerce(&amp;amp;#36;side, &amp;amp;#36;topic='' )&lt;br /&gt;
&amp;amp;#123;&lt;br /&gt;
    global &amp;amp;#36;_CONF, &amp;amp;#36;_USER, &amp;amp;#36;HTTP_SERVER_VARS, &amp;amp;#36;REQUEST_URI, &amp;amp;#36;sess, &amp;amp;#36;db;&lt;br /&gt;
    // only show on a page in the plugin's dir&lt;br /&gt;
    If (in_string('glcommerce', &amp;amp;#36;REQUEST_URI))&lt;br /&gt;
   &amp;amp;#123;&lt;br /&gt;
        // generate left blocks&lt;br /&gt;
        if (&amp;amp;#36;side=='left')&lt;br /&gt;
        &amp;amp;#123;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;display1 = glc_makemenu();&lt;br /&gt;
            &amp;amp;#36;display2 = glc_latestprod();&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;items[] = array('name' =&amp;gt; 'glcommerce_1',&lt;br /&gt;
                                           'type' =&amp;gt; 'dynamic',&lt;br /&gt;
                                           'onleft' =&amp;gt; 1,&lt;br /&gt;
                                           'title' =&amp;gt; 'Shop Menu', &lt;br /&gt;
                                           'blockorder' =&amp;gt; 1,&lt;br /&gt;
                                           'content' =&amp;gt; &amp;amp;#36;display1, &lt;br /&gt;
                                           'help' =&amp;gt; '/glcommerce/help.html');&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;items[] = array('name' =&amp;gt; 'glcommerce_2',&lt;br /&gt;
                                           'type' =&amp;gt; 'dynamic',&lt;br /&gt;
                                           'onleft' =&amp;gt; 1,&lt;br /&gt;
                                           'title' =&amp;gt; 'Latest Products ',&lt;br /&gt;
                                           'blockorder' =&amp;gt; 1,&lt;br /&gt;
                                           'content' =&amp;gt; &amp;amp;#36;display2,&lt;br /&gt;
                                           'help' =&amp;gt; '/glcommerce/help.html');&lt;br /&gt;
&lt;br /&gt;
        &amp;amp;#125; else &amp;amp;#123;&lt;br /&gt;
        // else generate right blocks&lt;br /&gt;
            &amp;amp;#36;display3 = glc_featuredprod()'&lt;br /&gt;
            &amp;amp;#36;display4 = glc_minicart();&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;items[] = array('name' =&amp;gt; 'glcommerce_3', &lt;br /&gt;
                                           'type' =&amp;gt; 'dynamic',&lt;br /&gt;
                                           'onleft' =&amp;gt; 0,&lt;br /&gt;
                                           'title' =&amp;gt; 'Featured Stuff',&lt;br /&gt;
                                           'blockorder' =&amp;gt; 1,&lt;br /&gt;
                                           'content' =&amp;gt; &amp;amp;#36;display3, &lt;br /&gt;
                                           'help' =&amp;gt; '/glcommerce/help.html'); &lt;br /&gt;
&lt;br /&gt;
            &amp;amp;#36;items[] = array('name' =&amp;gt; 'glcommerce_4',&lt;br /&gt;
                                           'type' =&amp;gt; 'dynamic',&lt;br /&gt;
                                           'onleft' =&amp;gt; 0,&lt;br /&gt;
                                           'title' =&amp;gt; 'My Cart', &lt;br /&gt;
                                           'blockorder' =&amp;gt; 1, &lt;br /&gt;
                                           'content' =&amp;gt; &amp;amp;#36;display4, &lt;br /&gt;
                                           'help' =&amp;gt; '/glcommerce/help.html'); &lt;br /&gt;
&lt;br /&gt;
       &amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
   &amp;amp;#125;&lt;br /&gt;
   return &amp;amp;#36;items;&lt;br /&gt;
&amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Function PLG_getBlocks() for refrence&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;white-space:pre; border: solid; border-color: black;&lt;br /&gt;
border-width: 1; background-color: #DDDDDD; padding: 6px 6px 6px 6px;&lt;br /&gt;
font-size: x-small&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* gets Geeklog blocks from plugin's&lt;br /&gt;
*&lt;br /&gt;
* Returns data for blocks on a given side and, potentially, for&lt;br /&gt;
* a given topic.&lt;br /&gt;
*&lt;br /&gt;
* @param        string      &amp;amp;#36;side       Side to get blocks for (right or left for now)&lt;br /&gt;
* @param        string      &amp;amp;#36;topic      Only get blocks for this topic&lt;br /&gt;
* @return   array of block data&lt;br /&gt;
*&lt;br /&gt;
*/&lt;br /&gt;
function PLG_getBlocks( &amp;amp;#36;side, &amp;amp;#36;topic='')&lt;br /&gt;
&amp;amp;#123;&lt;br /&gt;
    global &amp;amp;#36;_PLUGINS;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;#36;ret = array();&lt;br /&gt;
    foreach (&amp;amp;#36;_PLUGINS as &amp;amp;#36;pi_name)&lt;br /&gt;
    &amp;amp;#123;&lt;br /&gt;
        &amp;amp;#36;function = 'plugin_getBlocks_' . &amp;amp;#36;pi_name;&lt;br /&gt;
        if (function_exists(&amp;amp;#36;function))&lt;br /&gt;
        &amp;amp;#123;&lt;br /&gt;
            &amp;amp;#36;items = &amp;amp;#36;function(&amp;amp;#36;side, &amp;amp;#36;topic='');&lt;br /&gt;
            if (is_array (&amp;amp;#36;items))&lt;br /&gt;
            &amp;amp;#123;&lt;br /&gt;
                &amp;amp;#36;ret = array_merge (&amp;amp;#36;ret, &amp;amp;#36;items);&lt;br /&gt;
            &amp;amp;#125;&lt;br /&gt;
        &amp;amp;#125;&lt;br /&gt;
    &amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
    // future code to do a lib-custom function&lt;br /&gt;
    /*&lt;br /&gt;
    if (function_exists('CUSTOM_getBlocks')) &amp;amp;#123;&lt;br /&gt;
       &amp;amp;#36;cust_items .= CUSTOM_getBlocks(&amp;amp;#36;side, &amp;amp;#36;topic='');&lt;br /&gt;
       if (is_array (&amp;amp;#36;cust_items)) &amp;amp;#123;&lt;br /&gt;
          &amp;amp;#36;ret = array_merge (&amp;amp;#36;ret, &amp;amp;#36;cust_items)&lt;br /&gt;
       &amp;amp;#125;&lt;br /&gt;
    &amp;amp;#125;&lt;br /&gt;
    */&lt;br /&gt;
    return &amp;amp;#36;ret;&lt;br /&gt;
&amp;amp;#125;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Trinity</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Misc_Plugin_API%27s_that_dont_fit_any_where_else&amp;diff=3882</id>
		<title>Misc Plugin API's that dont fit any where else</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Misc_Plugin_API%27s_that_dont_fit_any_where_else&amp;diff=3882"/>
				<updated>2005-11-22T00:28:58Z</updated>
		
		<summary type="html">&lt;p&gt;Trinity: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Severial API's have been added to make wrteing plugins easier. these API's dont fit into any spcific catagory&lt;br /&gt;
&lt;br /&gt;
*[[Dynamic Blocks]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Geeklog_1.3x_Documentation|Main TOC]]&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Complete TOC]]&lt;/div&gt;</summary>
		<author><name>Trinity</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Misc_Plugin_API%27s_that_dont_fit_any_where_else&amp;diff=3881</id>
		<title>Misc Plugin API's that dont fit any where else</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Misc_Plugin_API%27s_that_dont_fit_any_where_else&amp;diff=3881"/>
				<updated>2005-11-22T00:26:40Z</updated>
		
		<summary type="html">&lt;p&gt;Trinity: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Severial API's have been added to make wrteing plugins easier. these API's dont fit into any spcific catagory&lt;br /&gt;
&lt;br /&gt;
*[[Dynamic Blocks]]&lt;/div&gt;</summary>
		<author><name>Trinity</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Misc_Plugin_API%27s_that_dont_fit_any_where_else&amp;diff=3880</id>
		<title>Misc Plugin API's that dont fit any where else</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Misc_Plugin_API%27s_that_dont_fit_any_where_else&amp;diff=3880"/>
				<updated>2005-11-22T00:25:31Z</updated>
		
		<summary type="html">&lt;p&gt;Trinity: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Severial API's have been added to make wrteing plugins easier. these API's dont fit into any spcific catagory&lt;br /&gt;
&lt;br /&gt;
[[Dynamic Blocks]]&lt;/div&gt;</summary>
		<author><name>Trinity</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Programmers/Developers_Documentation&amp;diff=3878</id>
		<title>Programmers/Developers Documentation</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Programmers/Developers_Documentation&amp;diff=3878"/>
				<updated>2005-11-22T00:21:42Z</updated>
		
		<summary type="html">&lt;p&gt;Trinity: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#[[IntroDoc|Introduction]]&lt;br /&gt;
#[[Installing Geeklog]]&lt;br /&gt;
#[[Administration]]&lt;br /&gt;
#[[Users Documentation]]&lt;br /&gt;
#[[Programmers/Developers Documentation]]&lt;br /&gt;
##[[Geeklog Coding Standards]]&lt;br /&gt;
##[[Beginner's Guide to Programming]]&lt;br /&gt;
##[[Plugin Development]]&lt;br /&gt;
##[[Plugin Developers Handbook]]&lt;br /&gt;
##[[Plugin API]]&lt;br /&gt;
##*[[Extending Site Statistics with your plugin | Statistics]]&lt;br /&gt;
##*[[Integrating the Comment Engine | Comments]] &lt;br /&gt;
##*[[Using Geeklog's Search Engine | Search]] &lt;br /&gt;
##*[[Adding Moderation Capability | Moderation]]&lt;br /&gt;
##*[[RSS API]]&lt;br /&gt;
##*[[Misc Plugin API's that dont fit any where else | Misc]]&lt;br /&gt;
##[[Theme Developers Guide]]&lt;br /&gt;
##[[Translations]]&lt;br /&gt;
##[[FAQ]]&lt;br /&gt;
##[[Database Schema]]&lt;br /&gt;
##[[Common Errors and problems]]&lt;br /&gt;
&lt;br /&gt;
[[Geeklog_1.3x_Documentation|Main TOC]]&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Complete TOC]]&lt;/div&gt;</summary>
		<author><name>Trinity</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Programmers/Developers_Documentation&amp;diff=3877</id>
		<title>Programmers/Developers Documentation</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Programmers/Developers_Documentation&amp;diff=3877"/>
				<updated>2005-11-22T00:20:20Z</updated>
		
		<summary type="html">&lt;p&gt;Trinity: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#[[IntroDoc|Introduction]]&lt;br /&gt;
#[[Installing Geeklog]]&lt;br /&gt;
#[[Administration]]&lt;br /&gt;
#[[Users Documentation]]&lt;br /&gt;
#[[Programmers/Developers Documentation]]&lt;br /&gt;
##[[Geeklog Coding Standards]]&lt;br /&gt;
##[[Beginner's Guide to Programming]]&lt;br /&gt;
##[[Plugin Development]]&lt;br /&gt;
##[[Plugin Developers Handbook]]&lt;br /&gt;
##[[Plugin API]]&lt;br /&gt;
##*[[Extending Site Statistics with your plugin | Statistics]]&lt;br /&gt;
##*[[Integrating the Comment Engine | Comments]] &lt;br /&gt;
##*[[Using Geeklog's Search Engine | Search]] &lt;br /&gt;
##*[[Adding Moderation Capability | Moderation]]&lt;br /&gt;
##*[[RSS API]]&lt;br /&gt;
##*[[Misc]]&lt;br /&gt;
##[[Theme Developers Guide]]&lt;br /&gt;
##[[Translations]]&lt;br /&gt;
##[[FAQ]]&lt;br /&gt;
##[[Database Schema]]&lt;br /&gt;
##[[Common Errors and problems]]&lt;br /&gt;
&lt;br /&gt;
[[Geeklog_1.3x_Documentation|Main TOC]]&amp;lt;br/&amp;gt;&lt;br /&gt;
[[Complete TOC]]&lt;/div&gt;</summary>
		<author><name>Trinity</name></author>	</entry>

	<entry>
		<id>http://gwiki3.thatlinuxbox.com/index.php?title=Geeklog%27s_way_of_doing_things&amp;diff=1278</id>
		<title>Geeklog's way of doing things</title>
		<link rel="alternate" type="text/html" href="http://gwiki3.thatlinuxbox.com/index.php?title=Geeklog%27s_way_of_doing_things&amp;diff=1278"/>
				<updated>2005-05-16T03:01:48Z</updated>
		
		<summary type="html">&lt;p&gt;Trinity: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All of Geeklog's php files are pure php. PHP allows you to use php as a scripting language imbedded in html files but this is not how Geeklog does it. All of Geeklog's php files must have &amp;lt;?php as the first five characters and end with ?&amp;gt;. Failure to structure your Geeklog files this way will cause session and header errors. Geeklog attempts as much as possible to have only php code in the php files. Two of the conventions used in Geeklog to accomplish this are the use of templates and language files.&lt;br /&gt;
&lt;br /&gt;
Time will be well spent by the Geeklog plugin or block developer to become familiar with several Geeklog libraries. The following section outlines the more important or frequently used libraries, functions and standards. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== lib-common.php: ==&lt;br /&gt;
&lt;br /&gt;
The Geeklog plugin or block developer should have a good understanding of lib-common.php which contains most of the display routines as well as some other general purpose routines. All of the Geeklog display routines return html. They do not contain echos or prints themselves. The way the Geeklog system is designed; you usually put your code between Geeklog display routines. For example: code to display a page would look like this: &lt;br /&gt;
&lt;br /&gt;
$display  = COM_siteHeader();&amp;lt;br&amp;gt;&lt;br /&gt;
$display .= COM_startBlock(&amp;quot;Title of Your Block&amp;quot;);&amp;lt;br&amp;gt;&lt;br /&gt;
$display .= &amp;quot;Some words&amp;quot;;&amp;lt;br&amp;gt;&lt;br /&gt;
$display .= somefunction();&amp;lt;br&amp;gt;&lt;br /&gt;
$display .= COM_endBlock;&amp;lt;br&amp;gt;&lt;br /&gt;
$display .= COM_siteFooter(true);&amp;lt;br&amp;gt;&lt;br /&gt;
echo $display;&lt;br /&gt;
&lt;br /&gt;
A summary of commonly used Geeklog functions are described below but reference the attached lib-common.php documentation for further examples. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== lib-security.php: ==&lt;br /&gt;
&lt;br /&gt;
The lib-security.php file contains the interface routines to the security system used in Geeklog. See the attached lib-security.php documentation. There are several SEC type functions that you may want to use in your projects. The table Commonly Used Geeklog Functions at the end of this section defines a couple of the more commonly used functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== lib-database.php: ==&lt;br /&gt;
&lt;br /&gt;
All database access should take place through the database abstraction in lib-database.php and table names should be accessed through the $_TABLES array. The table definitions in this array will then include whatever table prefix this site is using.  You should ensure that your plugin or block uses the $_TABLES['mytable'] for all Database access related functions.&lt;br /&gt;
*Block developers and site admins installing the block need to edit the lib-database.php program and add the new $_TABLES entries for your block tables. Ensure you follow the same standard by using the $_DB_table_prefix. &lt;br /&gt;
*Plugin developers need to define their tables in the plugin config.php file. You have the ability to use the $_TABLES array or use your own plugin specific array to maintain the table definitions. It's recommend that your arrays use a name such as _XX_TABLES, where XX are two letters to describe your plugin. Once the plugin is installed and enabled, the tables defined in the config.php for the plugin are automatically known as globals.&lt;br /&gt;
&lt;br /&gt;
== lib-plugins.php: ==&lt;br /&gt;
&lt;br /&gt;
This library contains all the code used to interface your plugin or block to Geeklog. You will not call any code from here directly. The functions in this file are called by the Geeklog main programs as they are used to call all plugins and are used to resolve the plugin name and check if your plugin has a particular function. You will usually only have to look at this file to understand some nuance of the implementation. See the documentation for functions.inc and the original plugin documentation for further help. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== How your Plug-in or Block Interacts with Geeklog: ==&lt;br /&gt;
&lt;br /&gt;
The program lib-common.php is the key to all interaction with Geeklog. It includes Geeklog's config.php and the rest of the Geeklog code libraries.&lt;br /&gt;
*At the top of lib-common.php is an include of lib-custom.php. This is where you place all your block functions. They are then included when the site index.php is called. &lt;br /&gt;
*At the very end of lib-common.php is a check for all enabled plugins. A plugin is registered with Geeklog when it has a record in the plugins table and the field pi_enabled is true. For all registered and enabled plugins, the code in lib-common.php will include the functions.inc file for each plugin. This is why the naming convention and location for each plugin file is strictly defined. All code libraries or configuration files your plugin needs should be included in your functions.inc. Since the plugins config.php is now also included this way - via the include in functions.inc - the variables in your plugin config.php become global and can be referenced in your plugin functions.&lt;br /&gt;
&lt;br /&gt;
== Common Global Variables ==&lt;br /&gt;
&lt;br /&gt;
There are a few commonly used globals within Geeklog that you will want to use and reference. The following table outlines the more frequently used ones and its recommended that these be used instead of hard coding paths and table names  in your links or project code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-collapse: collapse&amp;quot; bordercolor=&amp;quot;#111111&amp;quot; width=&amp;quot;75%&amp;quot; id=&amp;quot;AutoNumber2&amp;quot; height=&amp;quot;72&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;27%&amp;quot; bgcolor=&amp;quot;#000000&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font color=&amp;quot;#FFFFFF&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;Variable&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; bgcolor=&amp;quot;#000000&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font color=&amp;quot;#FFFFFF&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp; Description&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;27%&amp;quot; height=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;$_CONF['path_html']&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;17&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Fully qualified path to your &lt;br /&gt;
    sites public_htmk path&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;27%&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;$_CONF['site_url']&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Full URL to your sites &lt;br /&gt;
    public_html directory&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;27%&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;$_CONF['site_admin_url']&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Full URL to your sites admin &lt;br /&gt;
    directory&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;27%&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;$_USER['uid']&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Current user ID. A uid of 1 is an &lt;br /&gt;
    anonymous user&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;27%&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;$_TABLES['tablename']&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;A array of geeklog tables with &lt;br /&gt;
    the site prefix defined.&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Commonly used Geeklog functions ==&lt;br /&gt;
&lt;br /&gt;
The following is a list of commonly used Geeklog functions that as developers we use and recommend you become more familiar with and use in your development projects. You will find example usage of these functions throughout the Geeklog code. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; style=&amp;quot;border-collapse: collapse&amp;quot; bordercolor=&amp;quot;#111111&amp;quot; width=&amp;quot;100%&amp;quot; id=&amp;quot;AutoNumber1&amp;quot; height=&amp;quot;197&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; bgcolor=&amp;quot;#000000&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font color=&amp;quot;#FFFFFF&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;Function Name&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; bgcolor=&amp;quot;#000000&amp;quot; height=&amp;quot;18&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font color=&amp;quot;#FFFFFF&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; Description&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;COM_siteHeader&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Display the main site header and &lt;br /&gt;
    optionally if 'none' is passed &amp;lt;b&amp;gt;do not &amp;lt;/b&amp;gt;display the left blocks&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;COM_siteFooter&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Display the main site footer and &lt;br /&gt;
    optionally if 'true' is passed display the right blocks&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;32&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;COM_startBlock&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;32&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Formats the block title using the &lt;br /&gt;
    selected theme - pass the title, helpfile if any and optional block theme to &lt;br /&gt;
    apply if you do not want to use default&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;COM_endBlock&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Formats the block footer using &lt;br /&gt;
    the selected theme or the optional block theme if you do not want to use &lt;br /&gt;
    default&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;COM_errorLOG&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;12&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Use to format an error message or &lt;br /&gt;
    use for debugging - view output in &amp;amp;lt;geeklog_dir&amp;amp;gt;/logs/error.log&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;14&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;DB_query&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;14&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Execute a formatted SQL query and &lt;br /&gt;
    return the record set to an array of records (which is also an array)&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;DB_fetchArray&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Retrieve a record as an array &lt;br /&gt;
    from the returned record set - which DB_query returned.&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;DB_numROWS&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Returns the number of records &lt;br /&gt;
    retrieved by the DB_query result&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;DB_getItem&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;16&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Retrieve one record as an array. &lt;br /&gt;
    Pass a formatted SQL stmt with WHERE clause to retrieve one record&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;COM_checkHTML&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Use to strip out $, &amp;amp;lt;, &amp;amp;gt; , [code] &lt;br /&gt;
    and replace with the HTML codes&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;COM_checkWords&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Use to check passed text for any &lt;br /&gt;
    HTML tags that are not allowed as per the site config.php setting&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;SEC_inGroup&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Used to check if user has passed &lt;br /&gt;
    group rights. Example: SEC_inGroup('Root') - returns true if user is&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;13%&amp;quot; height=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;&amp;amp;nbsp;SEC_hasRights&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td width=&amp;quot;73%&amp;quot; height=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Used to check if user has access &lt;br /&gt;
    right (feature). Example: SEC_hasRights('myplugin.edit')&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugin_Developers_Handbook]]&lt;/div&gt;</summary>
		<author><name>Trinity</name></author>	</entry>

	</feed>