DataPluginLibrary

Created by: Lee LaMont Bell Jr., Last modification: 04 Aug 2006 (16:57 UTC) by mlpvolt

Summary - What Does It Do?

The Plugin Library allows Selected Library Functions to be accessed. The most important is shown in {LIB func='libAddAnchorLink' anchor='libAddAnchor' txt='Example 1' } {/LIB} which deals with Anchors and Links to them. At this point - all of the remaining Examples demonstrated different kinds of Boxes.

Why Not Just Create Plugins?

The answer is time! Each and every Plugin requires a significant amount of time spent in it's creation / writing and rewriting the help / debugging / etc. A Library Function and this Plugin provide an alternative. Adding Simple functionality can be accomplished very quickly in a Library Function. Providing Users with access to it (this Plugin) can also be accomplished very quickly.
A large percentage of our existing Plugins could be replaced with Library Functions. I'm only stating a fact - Not making a suggestion or volunteering. Plugins are still needed - but the complexity required should be the governing key.
Another issue is - at this time - the functionality provided by Library Functions can not be controlled (turned off) like a Plugins can be.

How Does It Work?

This Plugin functions like every other Plugin even though the Library Functions define most of the Parameters. In this example only the Parameter func is defined by the Plugin.
{LIB func='libHeaderBox' header='My Header' }Life is Grand!{/LIB}
{LIB func='libHeaderBox' header='My Header' }Life is Grand!{/LIB} The specifics of each function is defined in the next heading: The Plugin's Help.

The Plugin's Help

[+]

Between The Code Blocks? {LIB func='libAddAnchor' anchor='Between The Code Blocks' } {/LIB}

For those of you who don't know - the term Code Block refers to the way a Plugin is called. Some Plugins only require a single Code Block to operate while others need two. Examples are:
  • {AGENTINFO info= } requires a Single Code Block while
  • {CODE source= num= }Source Code{/CODE} requires Two Code Blocks. The first is {CODE source= num= } and the second is the closing {/CODE}.
Most Plugins that require 2 Code Blocks do so because they expect a lot of data and are designed to work on it. They use Parameters to control what they do to the data between the Code Blocks. The Plugin Library does this as well. That allows all of the boxes to contain as much data as you want to place into them.

Examples

Example 1 - libAddAnchor & libAddAnchorLink{LIB func='libAddAnchor' anchor='libAddAnchor' } {/LIB} {LIB func='libAddAnchor' anchor='libAddAnchorLink' } {/LIB}

[+]

Example 2 - libBox {LIB func='libAddAnchor' anchor='libBox' } {/LIB}

[+]

Example 3 - libErrorBox {LIB func='libAddAnchor' anchor='libErrorBox' } {/LIB}

[+]

Example 4 - libHeaderBox {LIB func='libAddAnchor' anchor='libHeaderBox' } {/LIB}

[+]

Example 5 - libContractedHeaderBox {LIB func='libAddAnchor' anchor='libContractedHeaderBox' } {/LIB}

[+]

Example 6 - libTabBox {LIB func='libAddAnchor' anchor='libTabBox' } {/LIB}

[+]

Example 7 - libContractedTabBox {LIB func='libAddAnchor' anchor='libContractedTabBox' } {/LIB}

[+]

Errors

[+]

Final Thoughts

This page demonstrates how simple functions can be added to provide a User with Options! These functions are fairly simple and didn't take a long time to create. Almost nothing in comparison to a Plugin - so as time passes - I think there will be a lot more of them.
In any case - Enjoy
StarRider (s-r on IRC)
{LIB func='libAddAnchor' anchor='PageBottom' } {/LIB}

{LIB func='libAddAnchor' anchor='PageTop' } {/LIB} {COMMENT }
1- Please use this format when adding new examples
2- Every Library Function needs an Example xxx - FunctionName Anchor combination as shown. I will admit that adding an Anchor to a Heading looks strange but on this page it is unavoidable. That is because the Help for { LIB } provides a link to this page with an Anchor - so the Anchor need to be findable - which is not the case when they are inside a Contracted Header.

Example x - libFunctionName {LIB func='libAddAnchor' anchor='libFunctionName' } {/LIB}

[+]

Introduction

The Plugin Library contains a lot of small, self-contained functions that are designed to do specific tasks. Some of them are useful to a User. This Plugin provides a Gateway to those functions.

History

[+]