PluginProposal-Span

Created by: Dan, Last modification: 09 May 2006 (12:08 UTC)

WARNING

This is a proposal page for the Span Data Plugin. Any information given here is subject to change without notification. This Plugin does Not Exist at this time.

Introduction

I've found the Div Data Plugin very useful for formatting blocks of text with CSS paramenters. I believe having a Span Data Plugin for formatting just a word (or phrase) within a line of text would be useful as well.

Simple Creation

Using the Div Data Plugin as a template (/liberty/plugins/data.div.php), the Span Data Plugin can be easily created. Apart from changing every occurrence of DIV to SPAN (or div to span, Div to Span, etc.), each preset value's style can be changed

from
background:#eee;color:#900;border:2px solid #900;padding:0.5em 1em;margin:0.5em;
to
background:#eee;color:#900;border:1px solid #900;padding-left:0.5em;padding-right:0.5em;
using the "red" preset as an example. Also, the "centered" preset can be renamed "gray".

Finally, the pluginParams 'auto_activate' can be set to FALSE so an Administrator will have the choice of whether to activate this plugin.

Example File

The newly created file would be named data.span.php, and put in the /liberty/plugins folder. An example of this file is attached.