TWiki
>
TWiki/ Web
>
ImgPlugin
(16 Jun 2006,
MeredithLesly
?
)
(raw view)
E
dit
A
ttach
---+!! <nop>%TOPIC% This is a fairly winky-dink plugin that allows people to use =%<nop>IMG{"foo.gif"}%= instead of using HTML syntax. It allows specification of the standard attributes as well as an optional =web=<web>= and/or =topic=<topic>=. Another small step in the eradication of html in TWiki! %TOC% ---++ Syntax Rules * image name is mandatory, web and/or topic optional (defaulting to the current web and topic respectively * Supports the img attributes 'align', 'border', 'height', 'width', 'id', and 'class * Always puts in an alt tag with a value of '' if not specified. This is per XHTML spec. | *Argument* | *Meaning* | *Default* | *Required* | | =name= | attachment name | none | yes | | =web= | web name of the attachment | current web | no | | =topic= | topic name of the attachment | current topic | no | | =alt= | alternate text tag | '' | no | | =caption= | caption to go with the image | none | no | | =captionplacement= | one of =right=, =left=, =top=, =bottom= | =right= | no | One good addition would be the auto-addition of the image size when possible, since I believe that pages load faster that way. This may require imagemagick, however. ---++ Examples * =%<nop>IMG{"foo.gif"}%= * =%<nop>IMG{"foo.gif" topic="ADifferentTopic"}%= * =%<nop>IMG{"foo.gif" align="right"}%= ---++ Plugin Settings Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop><plugin>_<setting>%==, i.e. ==%<nop>IMGPLUGIN_SHORTDESCRIPTION%== * One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic: * Set SHORTDESCRIPTION = Allows TWiki variable-style insertion of images in topics * Debug plugin: (See output in =data/debug.txt=) * Set DEBUG = 0 ---++ Plugin Installation Instructions __Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server. * Download the ZIP file from the Plugin web (see below) * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: | *File:* | *Description:* | | ==data/TWiki/%TOPIC%.txt== | Plugin topic | | ==data/TWiki/%TOPIC%.txt,v== | Plugin topic repository | | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module | * Configure the Plugin: * TWiki 4.0 and up: Run the [[%SCRIPTURL%/configure%SCRIPTSUFFIX%][configure]] script to enable the Plugin * Change the Plugin settings as needed * Test if the installation was successful: * _enter samples here_ ---++ Plugin Info | Plugin Author: | TWiki:Main.MeredithLesly | | Copyright: | © 2006, TWiki:Main.MeredithLesly | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | 21 Feb 2006 (V1.000) | | Change History: | <!-- versions below in reverse order --> | | 21 Feb 2006: | Initial version | | TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 | | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.005 | | [[TWiki:Plugins/Benchmark][Benchmarks]]: | %TWIKIWEB%.GoodStyle nn%, %TWIKIWEB%.FormattedSearch nn%, %TOPIC% nn% | | Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | | Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal | __Related Topics:__ %TWIKIWEB%.TWikiPlugins, %TWIKIWEB%.DeveloperDocumentationCategory, %TWIKIWEB%.AdminDocumentationCategory, %TWIKIWEB%.TWikiPreferences -- TWiki:Main.MeredithLesly - 21 Feb 2006
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 16 Jun 2006 - 07:48:54 -
MeredithLesly
?
TWiki/
Log In
or
Register
TWiki/ Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
DnD
Main
Support
TWiki
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback