{maketoc}
|
! Introduction
|
-In this Tutorial - I will try to explain the basics questions about all Liberty Plugins. I'll answer the Basic Questions - What / Where / How & Why. This Tutorial does go get Technical - the contents of a simple Liberty Plugin is displayed. The underlying Sectioning within a Liberty Plugin / what each does / and how they interact is explained. What this Tutorial __Does Not Do__ - is Provide an easy Step-by-Step Methodology for Creating a Liberty Plugin. The ((Tutorial - Liberty Plugins II)) page does all of that and a __Lot__ more.
|
+This Tutorial concerns Liberty Data Plugins and tries to answer the Basic Questions - What / Where / How & Why. It uses simple English most of the time but does get Technical in place (the contents of source code is displayed). It describes what each sections within a Liberty Data Plugin does and how the sections interact. What this Tutorial __Does Not Do__ - is Provide a __))Step-by-Step((__ Methodology for Creating a Liberty Plugin. The __((Tutorial - Liberty Plugins II))__ does that and a __Lot__ more. |
|
! Should I be Reading This?
|
-This Tutorial is provided primarilly for Site Administrators and Developers or anyone wanting to add functionallity to a bitweaver Powered Site. A User on a bitweaver Powered Site would gain a little knowledge from reading the Heading __"How is a Plugin used?"__.
|
+This Tutorial is provided primarily for Site Administrators and Developers (or anyone) wanting to add functionality to a bitweaver Powered Site. A User on a bitweaver Powered Site would gain a little knowledge from reading the Heading __"How is a Plugin Used?"__. |
|
-! So what is a Liberty Plugin? And why do you keep saying Liberty anyway - isn't Plugin enough?
|
-There are all kinds of Plugins. Every Package that is added to __bitweaver__ incorporates (as an Application Framework) has it's own definition of what a Plugin is / what it does / and where it is used. There are even three different types of Plugins that belong to the ((LibertyPackage)). They are:
|
+! So what is a Liberty Plugin? |
+! And why do you keep saying Liberty Data Plugins anyway - isn't Plugin enough? |
+There are all kinds of Plugins. Every Package incorporated into __bitweaver__ (in it's Application Framework Mode) has it's own definition of what a Plugin is / what it does / and where it is used. Even within the ((LibertyPackage)) there are even three different kinds of Plugins. They are: |
* Liberty Data Plugins - What this tutorial is all about.
|
* Liberty Format Plugins - Used to handle different types of data.
|
* Liberty Storage Plugins - Used to store the data in different ways.
|
|
-In this Tutorial - saying __"Liberty Plugins"__ means Liberty Data Plugins. These Plugins that can be used in any Package that uses the Liberty Storage System - and that includes: the Wiki / UserPages / Blogs / and - well - nearly everything bitweaver.
|
+Liberty Data Plugins can be used in any Package that uses the Liberty Storage System - that includes: the Wiki / UserPages / Blogs / and - well - nearly everything else __bitweaver__. |
|
-! Adding Functionallity? How can a Liberty Plugin do that?
|
-Easy! Here is the situation. You are updating a page - and when your finished you look at it and say "Not Bad - but I wish I had some ))EyeCandy(( to make this more noticable". If you were doing things the old fashioned way using pure HTML pages - there are thousands of different things that could be easilly added to give you exactly the effect you want - if you have the skill to add it. Wiki page are not like a pure HTML pages - but anything that works in an HTML can be placed in a Plugin and will work in a Wiki page.
|
-The Plugin __"))EyeCandy(( ))NeonText((" (ECNT)__ Plugin is a very good example. It was written for two reasons:
|
+If it will make things easier though - in the remainder of this Tutorial - all __Plugins__ are __Liberty Data Plugins__. |
+ |
+! How can a Plugin Add Functionality? |
+Easy! Here's a situation for you. You've just updated a page - and say "Not Bad - I just wish I had some ))EyeCandy(( to make this more noticeable". Now if we were doing things the old fashioned way using pure HTML pages - there are literally thousands of different things that could be easily added to give you exactly the effect you want - providing you have the skill to add it. Bitweaver's pages are not like a pure HTML pages - but anything that works in an HTML page can be placed in a Plugin and will work in a bitweaver page. |
+The __"))EyeCandy(( ))NeonText((" (ECNT)__ Plugin is a very good example. It was written for two reasons: |
# I renamed a finished a Proposed Plugin ((PluginProposal-HideText)) and wanted some ))EyeCandy(( to make a __Notice - It's Done__ statement.
|
# I decided to create the second Tutorial ((Tutorial - Liberty Plugins II)) and needed a good example for it.
|
-__Note:__ The Plugin __"))EyeCandy(( ))NeonText((" (ECNT)__ applies a Neon Lighting Effect (an age old technique of attracting attention) to a string. A DHTML Script file from [http://www.dynamicdrive.com] was used as the source.
|
-Of course - not everything is as simple as this - but sometimes the simple things are the most rewarding.
|
+__Note:__ The Plugin __"))EyeCandy(( ))NeonText((" (ECNT)__ applies a Neon Lighting Effect (an age old technique of attracting attention) to a string. The original source is a DHTML Script file from [http://www.dynamicdrive.com]. Of course - not everything is as simple as this was - but sometimes the simple things are the most rewarding. |
|
-! Well I'm impressed. I not a Geek or a Computer Guru though.
|
-Liberty Plugins can be fairly simple or as complex as you want to them to be. They provide a good place for a beginners to play and learn. At the minimum - all that is required is a little knowledge of HTML / the PHP language / and the ability to look things up.
|
+! But I'm not a Computer Guru! |
+You don't have to be. At the minimum - all that is required is a little knowledge of HTML / the PHP language / the ability to look things up / and the ability to experiment a little. Plugins can be as simple or as complex as you want to them to be. They provide an excellent place for a beginner to play and learn. |
|
^::__The Plugin "Comment" will be used as an example throughout this Tutorial.__::^
|
|
! What does this Plugin do?
|
The Comment Plugin is the simplest Plugin imaginable. All it does is - well - nothing. By doing "nothing" though - it allow text to be stored in a page that is not displayed or processed in any way.
|
-! So how is a Plugin used?
|
-The Comment Plugin (unlike most Plugins) operates on the text encased between a pair of Code Blocks. A Code Block is the name of the Plugin within a pair of curly brackets “{“ and “}” like this: ~123~))COMMENT(( ~125~
|
-~123~))COMMENT(( ~125~ The Text Inside the Block ~123~COMMENT~125~
|
-In this case - the Comment Plugin prevents the text from being displayed.
|
+! How is a Plugin Used? |
+The __Comment__ Plugin allows text to be stored in a page - and prevents it from being displayed. It is used like this: ~123~))COMMENT(( ~125~ The Text Inside the Block ~123~COMMENT~125~ |
+ |
+The Comment Plugin (unlike most Plugins) operates on the text encased between a pair of __Code Blocks__. A __Code Block__ is the __Key__ used to start the Plugin encased in curly brackets “{“ and “}” like this: ~123~))COMMENT(( ~125~ |
+__Parameters__ are used to make a Plugins more useful. They provide additional information / and control how the Plugin works. Parameters are added to the first code block in the form of __parameter_name=’value’__. This works because the Plugin defines each __Parameter__ that it will use and knows what to expect. The __Value__ can be a single number (123456) / single words like TRUE / FALSE / or a ))KeyWord(( (again defined by the Plugin). None of these __Has__ to be quoted. It can also be a __String__ - defined as: |
+Any series of numbers or text that contains white spaces or non-alphanumeric characters. |
+__Must be Quoted__ - the quote character can be either a single quote or a double quote (characters ' or "). |
|
-To make Plugins more functional, additional information (parameters) can be passed to it. The parameters are added to the first code block in the form of parameter_name=’value’. Each Plugin defines the names of the parameters and what is expected. Most Plugins accept multiple parameters – which are separated by a space character.
|
-__Please Note:__ The 'Value' does not always have to be encased in quotes. A single number (123456) / single words like TRUE / FALSE / or ))KeyWords(( (defined by the plugin) do not require quotation. __Strings Do__! Any text that contains whitespaces or non-alphanumeric characters is considered to be a String and __Has__ to be quoted. The quote character can be either a single quote or a double quote (characters ' or ").
|
-__Note 2:__ Capitolization is not manditory. ~123~))COMMENT(( ~125~ = ~123~comment ~125~ / and / ))PARAMETER_NAME(( = ))Prameter_Name(( = ))parameter_name((.
|
-! Where do I find these Plugins?
|
-The best way to become fluent with the Liberty Plugins is to use them. A complete listing of all Active Plugins can be found at the bottom of the page while editing a Page. Look for the __Plugin Help__ tab. Selecting “More Details” shows the Plugins Parameters are and what they do. It will also show an example or two.
|
-The Files are stored in the Liberty/Plugins directory. The files use a strict file naming convention that must be adhered to. For our Example Plugin, the filename is “data.example.php”.
|
+__Note:__ Capitalization is __Not__ mandatory with the Plugins Key or with Parameter Names. |
+__~123~))COMMENT(( ~125~ = ~123~Comment ~125~ = ~123~comment ~125~ / and / ))PARAMETER_NAME(( = ))Prameter_Name(( = ))parameter_name((__ |
+With the Parameter's __Value__ - it could be! |
+! Where do I find the Plugins? |
+The best way to become fluent with the Plugins is to use them. A complete listing of all Active Plugins can be found inside the __Page Editor__ at the bottom of the page. Look for the __Plugin Help__ tab. Selecting __“More Details”__ shows each of the Plugin's Parameters and explains what they do. Normally - an __Example__ or two is also given. |
+The Files are stored in the Liberty/Plugins directory. The files use a strict file naming convention that must be adhered to. For our Example Plugin, that filename is “data.example.php”. |
|
! Show me a Plugin then.
|
{CODE source=php num=on }<?php
|