rah_plugin

Published under current TXP projects

Allows you to display installed plugins and plugin data like articles on frontend. With the help of 20 unique tags you can create a list of installed plugins, individual plugin context layouts. Go fancy and display plugins code, md5 hashes, help files and/or even paginate lists.

Download rah_plugin v0.01bRC2

Image: rah_plugin

Image: rah_plugin

List of features

Requirements

Minimum requirements:

Recommended:

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 and tags

<txp:rah_plugin_list />

The tag, <txp:rah_plugin_list />, is a single tag and is used to output one or more plugins depending on the attributes used. Default attributes will be used when nothing specific is assigned. The <txp:rah_plugin_list /> tag is context sensitive. It will output different results depending on whether the page being viewed, is an plugin list or an individual plugin. Attributes follow.

form
Use a misc form to format and display the plugins.
Default: form="plugin" Example: "mypluginform"

limit
The maximum number of articles to display per page.
Default: limit="10" Example: "250"

offset
The number of plugins to skip from the start.
Default: offset="0" Example: "10"

sort
Sort and order criterias for the plugin list. Available sort values name, status, author, author_uri, version, description, help, code, code_restore, code_md5, type, load_order and rand(), and orders asc and desc.
Default: sort="name asc" Example: "author desc"

pgonly
Do the plugin count, but display nothing. Used when you want to show a search result count, or page navigation tags before the list of articles. Make sure that, other than pgonly, both <txp:rah_plugin_list /> tags have identical attributes. Available values 0 (don’t use pgonly) and 1 (only do count).
Default: pgonly="0" Example: "1"

status
Availabe values: 1 (active), 0 (disabled) or "" (unset, all)@. Default value is unset, and shows all statuses.
Default: status="" Example: "1"

author
Default value is unset, shows plugins by any author.
Default: author="" Example: "John Doe"

author_uri
Restrict listed plugins to a certain author URL. Default is unset (show plugins with any URL).
Default: author_uri="" Example: "http://author-site.com"

version
Default: version="" Example: "1.5"

prefix
Restrict listed plugins to a certain author prefix(es). Default is unset (show plugins with any prefix). The attribute expects that plugins’ use a valid three lettered prefixes. Invalid plugin names won’t be tolerated. Comma seperated if multiple.
Default: prefix="" Example: "opv,qqc"

type
Restrict listed plugins to a certain plugin type. Available values: 0 (Client side), 1 (Admin/Client side), 2 (Library), 3 (Admin only) or "" (unset, all). Comma seperated if multiple. Default is unset (show plugins of any type).
Default: type="" Example: "1"

order
Filter listed plugins to a specific load order. Values from 1 to 10. Comma seperated if multiple. Default is unset (shows plugins with any load order).
Default: order="" Example "5,10"

allow_pagination
Allow usage of pagination. If disabled, clicking newer and older links won’t do anything. Available values: 1 (allow) or 0 (disable).
Default: allow_pagination="1" Example: "0"

allow_search
The tag returns search results or not. Available values: 1 (allow) or 0 disable.
Default: allow_search="1" Example: "0"

use_plugin_download_filter
Use the plugin filtering defined in rah_plugin_download plugin’s filtering preferences. use_plugin_download_filter overwrites and merges to the filters you set in other attributes. If you want to use only rah_plugin_download’s filtering, leave other filtering attributes unset. Available values: 1 (use) or 0 (don’t use).
Default: use_plugin_download_filter="0" Example: "1"

label
Label text for the top of the list.
Default: label="" Example: "List of plugins"

labeltag
(X)HTML tag (without brackets) to wrap around label.
Default: labeltag="" Example: "h3"

wraptag
The (X)HTML tag, without brackets, to wrap around each plugin.
Default: wraptag="" Example: "div"

break
The (X)HTML tag (without brackets) or string to separate list items.
Default: break="" Example: "br"

class
The (X)HTML class applied to the wraptag.
Default: class="" Example: "plugin"

<txp:rah_plugin_list_custom />

The tag, <txp:rah_plugin_list_custom />, is a single tag and is used to output one or more plugins depending on the attributes used. Default attributes will be used when nothing specific is assigned. The <txp:rah_plugin_list_custom /> tag, unlike rah_plugin_list, is not context sensitive. It always returns same content, where ever it is placed and the listing completely depend on the attributes. Use rah_plugin_list instead to return context sensitive listings. Attributes follow.

form
Use a misc form to format and display the plugins.
Default: form="plugin" Example: "mypluginform"

limit
The maximum number of articles to display per page.
Default: limit="10" Example: "250"

offset
The number of plugins to skip from the start.
Default: offset="0" Example: "10"

sort
Sort and order criterias for the plugin list. Available sort values name, status, author, author_uri, version, description, help, code, code_restore, code_md5, type, load_order and rand(), and orders asc and desc.
Default: sort="name asc" Example: "author desc"

name
Only show certain named plugins. Default is unset (shows any plugin). Comma seperated if multiple.
Default: name="" Example: "xxx_plugin_name"

status
Availabe values: 1 (active), 0 (disabled) or "" (unset, all)@. Default value is unset, and shows all statuses.
Default: status="" Example: "1"

author
Default value is unset, shows plugins by any author.
Default: author="" Example: "John Doe"

author_uri
Restrict listed plugins to a certain author URL. Default is unset (show plugins with any URL).
Default: author_uri="" Example: "http://author-site.com"

version
Default: version="" Example: "1.5"

prefix
Restrict listed plugins to a certain author prefix(es). Default is unset (show plugins with any prefix). The attribute expects that plugins’ use a valid three lettered prefixes. Invalid plugin names won’t be tolerated. Comma seperated if multiple.
Default: prefix="" Example: "opv,qqd"

type
Restrict listed plugins to a certain plugin type. Available values: 0 (Client side), 1 (Admin/Client side), 2 (Library), 3 (Admin only) or "" (unset, all). Comma seperated if multiple. Default is unset (show plugins of any type).
Default: type="" Example: "1"

order
Filter listed plugins to a specific load order. Values from 1 to 10. Comma seperated if multiple. Default is unset (shows plugins with any load order).
Default: order="" Example "5,10"

use_plugin_download_filter
Use the plugin filtering defined in rah_plugin_download plugin’s filtering preferences. use_plugin_download_filter overwrites and merges to the filters you set in other attributes. If you want to use only rah_plugin_download’s filtering, leave other filtering attributes unset. Available values: 1 (use) or 0 (don’t use).
Default: use_plugin_download_filter="0" Example: "1"

label
Label text for the top of the list.
Default: label="" Example: "List of plugins"

labeltag
(X)HTML tag (without brackets) to wrap around label.
Default: labeltag="" Example: "h3"

wraptag
The (X)HTML tag, without brackets, to wrap around each plugin.
Default: wraptag="" Example: "div"

break
The (X)HTML tag (without brackets) or string to separate list items.
Default: break="" Example: "br"

class
The (X)HTML class applied to the wraptag.
Default: class="" Example: "plugin"

The <txp:rah_plugin_permlink /> can be used to return the permanent url or full XHTML link (permlink) to the individual plugin page. Attributes follow.

name
The name of the plugin to link. If left empty (unset), uses the current plugin being displayed.
Default: name="" (unset) Example: "xxx_plugin_name"

<txp:rah_plugin_name />

Returns the name of the plugin being display. Usually used in the plugin form. The tag has no attributes.

<txp:rah_plugin_prefix />

Returns the three letter author prefix of the plugin being displayed. Usually used in the plugin form. The tag has no attributes.

<txp:rah_plugin_status />

Returns the status of the plugin being displayed. Usually used in the plugin form. Attributes follow.

status_1
The text label for the status number #1 (active).
Default: status_1="Active" Example: "On Duty"

status_0
The text label for the status number #0 (disabled).
Default: status_0="Disabled" Example: "Off"

number
What to display. Display numbers (0,@1@) or the text labels defined in status_0 and status_1. Available values: 0 (display text labels) and 1 (display numbers).
Default: number="0" Example: "1"

<txp:rah_plugin_author />

Returns the author of the plugin being displayed. Usually used in the plugin form. Attributes follow.

escape
Escape the (X)HTML markup. Available values html and unset ("").
Default: escape="html" Example: ""

<txp:rah_plugin_author_uri />

Returns the author URL of the plugin being displayed. Usually used in the plugin form. Attributes follow.

escape
Escape the (X)HTML markup. Available values html and unset ("").
Default: escape="html" Example: ""

<txp:rah_plugin_version />

Returns the version number of the plugin being displayed. Usually used in the plugin form. The tag has no attributes.

<txp:rah_plugin_description />

Returns the description of the plugin being displayed. Usually used in the plugin form. Attributes follow.

escape
Escape the (X)HTML markup. Available values html and unset ("").
Default: escape="html" Example: ""

<txp:rah_plugin_help />

Returns the help doc of the plugin being displayed. Usually used in the plugin form. Attributes follow.

textile
Textile the help content. Available values 1 (yes, Textile it) and 0 (don’t Textile).
Default: textile="0" Example: "1"

auto_textile
Textile the help content if it contains h1.. Available values 1 (yes, auto Textile) and 0 (don’t use auto Textile).
Default: auto_textile="1" Example: "0"

<txp:rah_plugin_code />

Returns the code of the plugin being displayed. The tag is usually used in the plugin form. Attributes follow.

escape
Escape the XHTML markup. Available values html (ecape it, recommended) and "" (unset).
Default: escape="html" Example: ""

highlight
Highlight (colorize) the plugin code. Values: 0 (no) and 1 (yes).
Default: highlight="0" Example: "1"

<txp:rah_plugin_restore />

Returns the restore point code of the plugin being displayed. The tag is usually used in the plugin form. Attributes follow.

escape
Escape the XHTML markup. Available values html (ecape it, recommended) and "" (unset).
Default: escape="html" Example: ""

highlight
Highlight (colorize) the plugin code. Values: 0 (no) and 1 (yes).
Default: highlight="0" Example: "1"

<txp:rah_plugin_code_md5 />

Returns the MD5 hash of the plugin being displayed. The tag is usually used in the plugin form. The tag has no attributes.

<txp:rah_plugin_type />

Returns the type of the plugin being displayed. The tag is usually used in the plugin form. Attributes follow.

types
Set the array of type names. Each item is comma seperated.
Default: types="Client side,Admin/Client side,Library,Admin only" Example: "Front,All,Lib,Back"

number
What to display. Display numbers (0,@1@) or the text labels defined in types. Available values: 0 (display text labels) and 1 (display numbers).
Default: number="0" Example: "1"

<txp:rah_plugin_load_order />

Returns the load order of the plugin being displayed. Usually used in the plugin form. The tag has no attributes.

<txp:rah_plugin_if_first>###</txp:rah_plugin_if_first>

The tag will execute the contained statement if the displayed plugin is the first in the currently displayed list. Usually used in the plugin form. The tag has no attributes. Supports <txp:else />.

<txp:rah_plugin_if_last>###</txp:rah_plugin_if_last>

The tag will execute the contained statement if the displayed plugin is the last in the currently displayed list. Usually used in the plugin form. The tag has no attributes. Supports <txp:else />.

<txp:rah_plugin_if_individual>###</txp:rah_plugin_if_individual>

The tag will execute the contained statement if an individual plugin page is being displayed. Usually used in the plugin form. The tag has no attributes. Supports <txp:else />.

<txp:rah_plugin_if_list>###</txp:rah_plugin_if_list>

The tag will execute the contained statement if an plugin list is being displayed (not showing an individual context). Usually used in the plugin form. The tag has no attributes. Supports <txp:else />.

<txp:rah_plugin_page_prev />

Output navigation link to next page. Works in both, individual and list context. The tag has no attributes.

<txp:rah_plugin_page_next />

Output navigation link to next page. Works in both, individual and list context. The tag has no attributes.

Examples

Display context sensitive list of plugins

<txp:rah_plugin_list>
	<h3>
		<txp:rah_plugin_permlink>
			<txp:rah_plugin_name />
		</txp:rah_plugin_permlink>
	</h3>
	<p>
		by
		<txp:rah_plugin_author_uri>
			<txp:rah_plugin_author />
		</txp:rah_plugin_author_uri>
	</p>
	<txp:rah_plugin_if_individual>
		<txp:rah_plugin_help />
	</txp:rah_plugin_if_individual>
</txp:rah_plugin_list>

Display context insesitive list of links, limited by author attribute

<ul>
	<txp:rah_plugin_list_custom limit="5" author="John Doe">
		<li>
			<a title="View details" href="<txp:rah_plugin_permlink />">
				<txp:rah_plugin_name />
			</a>
		</li>
	</txp:rah_plugin_list>
</ul>

Show Pagination navigation

The plugin listing. Uses my_plugin_list form:

<txp:rah_plugin_list allow_pagination="1" limit="5" form="my_plugin_list" />

Code for the navigation links:

<txp:rah_plugin_page_prev>Prev</txp:rah_plugin_page_prev>
<txp:rah_plugin_page_next>Next</txp:rah_plugin_page_next>

Changelog

No 0.1 -series releases yet. Betas follow.

Version 0.1b RC2

Version 0.1b pre RC