rah_external_output
Published under current TXP projects
Output external content-type snippets. The plugin, rah_external_output, is used to output external scripts with custom content types. By external we mean that you don’t have to waste sections, forms nor page templates for the scripts, and scripts (aka global output forms) can be easily used for other applications, for example ajax calls or a custom XML page.
Image: rah_external_output
List of features
- Clean interface to write and adjust code snippets.
- Create and set content-types for the code snippets.
- Two ways to display the scripts: An automatic URL call, and an alternative tag function to display the end results.
Requirements
Rah_external_output’s minimum requirements:
- Textpattern 4.4.1+
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 the new interface under TXP / Extensions / External output.
Attributes
The tag is <txp:rah_external_output /> and attributes for it follow. The tag is a secondary feature, and the automatic URL call method should be preferred over the tag.
name
Name of the external output you want to display.
Default name="" Example: "LoginShowToExtSiteScript"
Changelog
Version 0.9
- Fixed: now handles raw PHP tags.
- Changed: now parses tag structure in same fashion as core. Do it twice. Provides identical results with core in every scenario.
- Added: ability to display tag trace, and error reporting, by adding
rah_external_output_traceparameter (&rah_external_output_trace=1) to the snippet URL when site’s production status is set to debugging.
Version 0.8
- Added: CSRF (session riding) protection using Textpattern’s core functions introduced in v4.4.1.
- Changed: Make sure the plugin interfaces is all in one language.
- Changed: Only try to drop old database tables when humanly possible that there is old leftovers. Don’t run queries when updating from clean to clean.
- Changed: set temporary version number when installing. Removes the possibility of running the installer twice for no reason.
- Now requires Textpattern version 4.4.1 or newer.
Version 0.7
- Fixed: Error in
<txp:rah_external_output />tag. - Fixed: Closed open
<thead>tag in the main list view. - Fixed: Now admin-side page title uses language strings.
Version 0.6
- Fixed: Saving snippets while changing name.
- Fixed: Now keeps the sent data in the editor if error occurs during saving instead of fetching the old data from the database.
- Added: Translation support. Interface now uses language strings.
- Added:
<txp:rah_external_output />tag now caches fetched results. - Added: Now uses plugin_lifecycle callbacks, and includes uninstaller.
- Added: Adds an options link to the Plugins pane which directs to the plugin’s admin-interface.
- Removed: Mime-interface. Was confusing and not so many used it. Trying to simplify the user interface.
- Changed: The user-interface and markup. Removed heading, removed inline styles, added
<tbody>and<thead>tags to the tables. - Changed: Now uses new, improved multi-selection/edit feature, seen in other rah-plugins.
- Changed: now uses
textpatterncallback instead of outputting the snippets right away when the plugin is loaded. - Changed: Now checks if the saving/updating succeeds, instead of expecting.
- Now requires Textpattern 4.2.0 (or newer) for full feature compatibility.
Version 0.5
- Added disable and activate actions to multiedit feature.
Version 0.4
- Fixed forgotten insert query escaping.
Version 0.3
- Fixed error caused by non-set
$pretext(note: TXP load order). - Set
$pretextindexes to empty: we are not on page template.
Version 0.2
- Fixed forgotten parse call.
Version 0.1
- First release