Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
2.00
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

ort_plugindecode

Original idea (command line & web form, no plugin) version 1.0 development: Martín Laudati
Plugin (version 2.0) development: Walter Mir – Martín Zeni – Iván de Miguel
Tutoring: Mariano Absatz

Instituto de Tecnología ORTSeminario de Tecnología y Aplicaciones

Basic Use

Paste the text within the ort_plugindecode.txt file into the “plugins” tab of Textpattern, and enable the plugin.

You will find a new tab under Extensions called Plugin Decode.

Decode installed plugin

On the left part of the screen you’ll have a list of your installed plugins (including ort_plugindecode). Select the plugin you want to decode and press the Decode butto bellow the list. Your browser will offer to save the decoded plugin in your local disk.

Even when you can decode ort_plugindecode within itself, the resulting source, when re-compiled, will only be able to work in this basic mode. It will not work in command linemode (see below).

Paste & decode

On the upper right part of the screen there is a text area with the heading Paste plugin:. You can paste a plugin text here and press the Decode button besides. Your browser will offer to save the decoded plugin in your local disk.

Uploade & decode

On the lower right part of the screen you’ll find an upload field with a Browse button. Use it to select a plugin from your local hard disk and, when done, press the Decode button below it. Your browser will offer to save the decoded plugin in your local disk.

Advanced Use

The source script ort_plugindecode.php used to produce the ort_plugindecode.txt plugin is a script that, besides being compiled as a textpattern plugin, allows you to decode a Textpattern plugin in order to get a source .php file you can edit and modify and then compile using the standard zem_tpl.

It has two different modes: command line mode works from the command line (just like zem_tpl does). Web mode works in a php enabled web server and you can invoke it from a standard browser.

Command line usage

php ort_plugindecode.php compiled_plugin.txt decoded_plugin.php

This way, the decoder takes the ‘compiled_plugin.txt’ input file and outputs the decoded php source a file named ‘decoded_plugin.php’

php ort_plugindecode.php compiled_plugin.txt

If you omit the output file name, the file will be created based in the plugin name contained within the plugin itself ($plugin['name']).

php ort_plugindecode.php <compiled_plugin.txt

Alternatively, you can provide the input file in standard input. In this case the output file name will also be generated based on the plugin name.

Web mode usage

Upload ort_plugindecode.php to a php enabled web server (like the one where you run Textpattern).

Invoke the script in a web browser (e.g. if your web server is www.example.net and you put the script in the root of that web server you will see it in a browser in http://www.example.net/ort_plugindecode.php).

This will show you a little table where you can either browse your local machine for the compiled plugin file, or paste the compiled plugin code in a small window.

Then you must press the “Decode plugin” button and your browser will show you the PHP source code. You must select all the code, copy it and paste it in a file in your computer (saving the output will not work since it will show you the html code used to highlight the code on screen).

There’s an on-line version you can use on http://ybab.net/textpattern_plugins/ort_plugindecode.php

History

This tool was inspired by this forum thread.

Martín Laudati was a student in the Instituto de Tecnología ORT and, when asked to find a project to develop a plugin for Textpattern, which he had to do to pass the course Seminario de Aplicaciones, he chose not to do a plugin but rather a plugin decoder.

Initially the decoder only worked on-line in a browser, but I asked him to generate also a command line utility, he combined both in one.

Making it easier

Walter Mir, Martín Zeni and Iván de Miguel, students of the first semester 2008, developed version 2.0 which became a Textpattern plugin so that you get the same functionality from the admin interface (of course, the two original modes will continue to work as always (the first triple play plugin) :-)

Article Request Count:
Keywords/tags:
Initially released:
14 Dec 2007
Posted here:
14 Dec 2007
Article modified:
08 Nov 2010

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern