rah_uppercase
Published under current TXP projects
The plugin, rah_uppercase, provides a container tag that allows you to transform certain characters from lowercase to uppercase. You can either uppercase first character of every word, string’s first character or all alphabetic characters.
Image: rah_uppercase
List of features
- Comes with simple tag,
<txp:rah_uppercase>###</txp:rah_uppercase>that allows you to:- Uppercase first character of the contained content.
- Uppercase first character of every contained word.
- Uppercase every contained alphabetic character.
- Fast to parse, plus short and lightweight code.
Requirements
- PHP 4.3.0+
- Textpattern 4.x.x+
Installation and usage
The general behavior stands: paste plugin code to the plugin installer textarea and run the automatic setup. Then just activate the plugin and you are ready to use new tags that plugin includes like others.
Attributes
The tag is a conteiner tag, <txp:rah_uppercase>###</txp:rah_uppercase>, and attributes for it follow.
what
What to uppercase. Values: each, first and all. Value each will uppercase first character of every word, first will uppercase only the very first character and all will uppercase every alphabetic character.
Default: what="each" Example: "first"
Example
Example #1
<txp:rah_uppercase what="all">Hi, I'm Mike.</txp:rah_uppercase>
Outputs HI I’M MIKE.
Example #2
<txp:rah_uppercase what="first">hi, I'm Mike.</txp:rah_uppercase>
Outputs Hi, I’m Mike.
Example #3
<txp:rah_uppercase what="each">Hi, i'm mike.</txp:rah_uppercase>
Outputs Hi, I’m Mike.
Changelog
Version 0.1
- First release.