Book Image

Learning Joomla! 1.5 Extension Development

Book Image

Learning Joomla! 1.5 Extension Development

Overview of this book

Table of Contents (17 chapters)
Learning Joomla! 1.5 Extension Development
Credits
About the Author
About the Reviewer
Preface

An information box plug-in


Another critic was less interested in the links, but was interested in getting a box that would display the "vital details" for the restaurant of her choice. To use this feature, we will instruct the critic to enclose the name of the review in curly braces, preceded by the word reviewinfo and a space. For example, the details for "The Daily Dish" could be added in by entering {reviewinfo The Daily Dish}.

Note

Why curly braces?

Many core plug-ins use curly braces as a way of creating "plug-in tags" in content items, so that they aren't confused with HTML or XML. Frequently, you will see them used alone (as in {runmyplugin}), with parameters (as we're doing with the reviews), or enclosing text ({plugin} like this {/plugin}). PHP's Perl-style regular expression functions are very useful for detecting these patterns. More information about these functions can be found on the PHP website: http://www.php.net/manual/en/ref.pcre.php.

Before we write the code for this...