<Plugins>

The <Plugins> option is used to load plugins. Plugins can be used to easily add well-behaved, third-party scripts and specialized PHP code to your website headers and footers. Plugins are loaded in the order they are defined. Most people will never need to add new plugins or modify the order they are loaded. To get a better understanding of how plugins work, you should review the plugins provided in the Gigatrees5 distribution, especially default.header, metadata and default.footer. To create a new plugin, create a folder with the name of your plugin in the plugins folder and create a text file named plugin.xml in that folder. That file should contain the <Gigatrees> and <Setup> XML wrappers and any additional metadata options required by that plugin. Additional support files can be put anywhere inside the named plugin folder or into subfolders and then accessed using %PluginsPath%.

The metadata plugin also makes use of a number of substitution hooks.

%Application%This value is determined at runtime by the Gigatrees5 application with the application name and version number.
%AppName%This value is determined at runtime by the Gigatrees5 application with the application name.
%AppVersion%This value is determined at runtime by the Gigatrees5 application with the application version number.
%BuildVersion%This value is determined at runtime by the Gigatrees5 application with the build version number.
%Description%This value is determined at runtime by the <SiteDescription> option.
%Domain% This value is determined at runtime by the <WebsiteURL> option.
%DropBody% This value is determined at runtime by the <DropBody> option.
%DropHeader% This value is determined at runtime by the <DropHeader> option.
%DropFooter% This value is determined at runtime by the <DropFooter> option.
%DropMenu% This value is determined at runtime by the <DropMenu> option and is used to replace the existing menu (as is done by this website)
%DropStyles% This value is determined at runtime by the <DropStyles> option.
%Favicon% This value is determined at runtime by the <Favicon> option.
%FeedLink% This value is determined, providing a link to the feed ( feed.rss ) located in the <OutputPath> where the blog is located.
%Keywords% This value is determined at runtime on <BlogPosts> by the post's <Tag> option. It also includes hastags embedded within the blog post.
%LangCode% This value is determined at runtime by the <LangCode> option.
%OutputPath% This value is determined at runtime by the <OutputPath> option.
%PageAuthor% This value is determined at runtime on <BlogPosts> by the post's <Author>. On all other pages, the <Name> option.
%PageStyles% This value is determined at runtime on <BlogPosts> by the post's <StyleOverrides> option.
%PageTitle% This value is determined at runtime on <BlogPosts> by the post's <Title> option. On all other pages, the <Title> option.
%PageURL% This value is determined at runtime. <BlogPosts> may provide a <Filename>, other pages determine this value automatically of the page's context.
%PluginsPath%This value is determined at runtime using the relative path of the plugins folder. This hook should be used in every plugin that needs access to this path.
%PreHeader% This value is determined at runtime by the <PreHeader> option. This hook is not used by any of the existing plugins, but may be useful to web developers for adding PHP code. I use it to add login code on a private website.
%SiteTitle% This value is determined at runtime by the <SiteTitle> option.
Gigatrees:
CopyPlugins> [ true ] By default, all configured plugins are copied to the <OutputPath>. Since plugins seldom change once created, you could choose to not copy the plugins.
<Plugin> [ ] The content is the absolute or relative path to a plugin folder.
Example:

The following example copies over the normal set of plugins used in the plugins configuration file ( plugins.xml ).

<Plugins>
<Plugin> plugins\default.header </Plugin>
<Plugin> plugins\metadata </Plugin>
<Plugin> plugins\opengraph </Plugin>
<Plugin> plugins\twitter </Plugin>
<Plugin> plugins\fontawesome </Plugin>
<Plugin> plugins\jquery </Plugin>
<Plugin> plugins\jqueryui </Plugin>
<Plugin> plugins\bootstrap </Plugin>
<Plugin> plugins\adminlte </Plugin>
<Plugin> plugins\googlefonts </Plugin>
<Plugin> plugins\styles </Plugin>
<Plugin> plugins\fancybox </Plugin>
<Plugin> plugins\googlemaps </Plugin>
<Plugin> plugins\ie8 </Plugin>
<Plugin> plugins\d3fancharts </Plugin>
<Plugin> plugins\photo.mosaic </Plugin>
<Plugin> plugins\tablesorter </Plugin>
<Plugin> plugins\default.footer </Plugin>
</Plugins>

Gigatrees5 provides many useful plugins in the distribution. The following is a list of plugins not loaded by default.

Plugin Description
Hide Sidebar This plugin can be used when the <MenuBar> option is disabled to hide the empty sidebar. This can be useful when embedding your tree into another website like WordPress, or when creating standalone blogs or standalone galleries.
Change Sidebar Width This plugin can be used when you are using the <DropMenu> or <ExtendMenu> options to include your own menu items in the sidebar and when the added links exceed the default width of the sidebar. You will need to edit the plugin to replace all occurances or "260" with whatever pixel width you need. This may require some trial and error to determine.
Photo Mosaic This plugin can be used to create a photo mosaic gallery that automatically resizes to fit your screen (The plugin is now included as part of the distribution and the default build). The syntax to create the gallery is simple.

  <div class="gallery">
    <div class="gimage"><a href="photo1.jpg"><img src="photo1_i.jpg" title="" alt="Photo 1" /></a></div>
    ...
    <div class="gimage"><a href="photo16.jpg"><img src="photo16_i.jpg" title="" alt="Photo 16" /></a></div>
  </div>							

Gigatrees also supports HTML extensions that will do the same thing.

  <gallery>
    <picture><link>photo1.jpg<:><thumb>photo1_i.jpg<caption>Photo 1</caption></thumb></link></picture>
    ...
    <picture><link>photo16.jpg<:><thumb>photo16_i.jpg<caption>Photo 16</caption></thumb></link></picture>
  </gallery>							
Before & After This plugin can be used to display a Before & After control element on any image. The container's id ( ba-container-1 ) is hardcoded into the plugin, so should not be changed. The plugin will need to be modified if you need to display more than one Before & After image on a single page.

  <div class="ba-container" id="ba-container-1">  
    <img src="original.gif" width="500" height="333">  
    <img src="modified.gif" width="500" height="333">
  </div>