Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bestpractical/rt-extension-articletemplates
https://github.com/bestpractical/rt-extension-articletemplates
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bestpractical/rt-extension-articletemplates
- Owner: bestpractical
- Created: 2011-05-20T19:11:48.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2021-07-06T19:17:34.000Z (over 3 years ago)
- Last Synced: 2023-04-13T18:31:28.560Z (over 1 year ago)
- Language: Perl
- Homepage: http://search.cpan.org/dist/rt-extension-articletemplates
- Size: 102 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
RT::Extension::ArticleTemplates - Turns Articles into dynamic templatesRT VERSION
Works with RT 4.4 and 5.0.DESCRIPTION
When this extension is installed, RT parses the content of Articles as a
template, when inserting the article into a ticket, using the
Text::Template module; this can be used to make your Articles dynamic.
Text::Template is the same module that RT's Templates use as well.VERY IMPORTANT
It's a SECURITY RISK to install this extension on systems where articles
can be changed by not trusted users.if your articles contain text that currently looks like a template, it
will begin being parsed as Text::Template code after this extension is
installed -- even if it is not a valid template.INSTALLATION
perl Makefile.PL
make
make install
May need root permissionsEdit your /opt/rt5/etc/RT_SiteConfig.pm
If you are using RT 4.2 or greater, add this line:Plugin('RT::Extension::ArticleTemplates');
For RT 4.0, add this line:
Set(@Plugins, qw(RT::Extension::ArticleTemplates));
or add RT::Extension::ArticleTemplates to your existing @Plugins
line.Patch RT
This step is required only for RT versions 5.0.0 and 5.0.1. Apply
the patch as follows:patch -p1 -d /path/to/rt < patches/article-preformatted-ticket-object.patch
Clear your mason cache
rm -rf /opt/rt5/var/mason_data/objRestart your webserver
CONFIGURATION
ArticleTemplatesWithRequestArgs
Enabling this option passes in the Mason request arguments to your
article templates as the hashref $request_args.Warning: Request args are user-controlled direct input, so all the
normal cautions of using them apply. Never trust user input.Disabled by default.
METHODS
The following methods from RT::Article are redefined:ParseTemplate $CONTENT, %TEMPLATE_ARGS
Parses $CONTENT string as a template (Text::Template). $Article and
other arguments from %TEMPLATE_ARGS are available in code of the
template as perl variables.AUTHOR
Best Practical Solutions, LLCBUGS
All bugs should be reported via email toL
or via the web at
L.
LICENSE AND COPYRIGHT
This software is Copyright (c) 2014 by Best Practical SolutionsThis is free software, licensed under:
The GNU General Public License, Version 2, June 1991