rah_plugin_download

Published under current TXP projects

Allows plugin authors serve plugin downloads easily with out saving and uploading files again and again.

Download rah_plugin_download v1.0

Image: rah_plugin_download

Image: rah_plugin_download

Intro and description

A Textpattern plugin used to allow public plugin downloads directly from the database. A tool that plugin developers can use to allow users to download their amazing plugins. For example it can be used alongside with ied_plugin_composer, or you can make the plugin locally and then install it to your public Textpattern install, where rah_plugin_downloads allows the public downloading.

List of features

Requirements

Minimum:

Recommended:

Installation and usage

Plugin mostly used plugin devs. You all know how to install plugin, right. Yes, insert it to the plugin install textarea and run the automatic setup. Then it’s ready.

To add more preferences, in example allow just some plugins to be downloaded, go to Externsion / rah_plugin_download in your Textpattern admin panel.

Attributes

The tag is <txp:rah_plugin_download /> and attributes for it follow. The tag outputs a download URL.

name
The name of plugin to be served. The attribute is required.
Default: name="" Example: name="xxx_myplugin"

type
The type of file served, or set the tag to output download count. Allowed values zip, count or unset. If zip is used, URL points to compressed plugin download. The default value unset (empty) outputs URL to the normal file, and with count, the tag shows download count instead of the download URL.
Default: type="" Example: "zip"

version
Which version’s download count is shown. The attribute is only effective when download count is shown instead of the download link. Allowed values are version number and unset (empty). If leaved empty total download count is shown.
Default: version="" Example: "0.1"

Examples

Example #1: Return plugin download URL

Code:

<txp:rah_plugin_download name="xxx_myplugin" />

Returns:

http://example.com/?rah_plugin_download=xxx_myplugin

Example #2: Container usage

<txp:rah_plugin_download name="xxx_myplugin">
	Download the plugin
</txp:rah_plugin_download>

Returns:

<a href="http://example.com/?rah_plugin_download=xxx_myplugin">
	Download the plugin
</a>

Example #3: Output link using articles

If you post articles titled by the name of the plugin, you could do the url, plus link, automatically.

Code:

<a href="<txp:site_url />?rah_plugin_download=<txp:title />">Download the plugin</a>

Returns:

<a href="http://example.com/?rah_plugin_download=xxx_myplugin">Download the plugin</a>

Example #4: Article listings using same method as above Example #2

Example uses articles to notify users about your plugins.

Code:

<txp:article_custom limit="999">
	<a href="<txp:site_url />?rah_plugin_download=<txp:title />"><txp:title /> [Click to download]</a>
</txp:article_custom>

Example #5: Output download count

Code:

<txp:rah_plugin_download name="xxx_myplugin" type="count" />

Returns:

1

Changelog

Version 1.0

Version 0.9

Version 0.8

Version 0.7

Version 0.6

Version 0.5.3

Version 0.5.2

Version 0.5

Version 0.4

Version 0.3

Version 0.2.1

Version 0.2

Version 0.1

Thanks to