From: <de...@de...> - 2010-08-29 07:43:36
|
Author: PeterThoeny Date: 2010-08-29 02:43:29 -0500 (Sun, 29 Aug 2010) New Revision: 19389 Trac url: http://develop.twiki.org/trac/changeset/19389 Modified: twiki/trunk/ObjectPlugin/data/TWiki/ObjectPlugin.txt twiki/trunk/ObjectPlugin/lib/TWiki/Plugins/ObjectPlugin.pm Log: Item6530: Doc improvements; change TWIKIWEB to SYSTEMWEB Modified: twiki/trunk/ObjectPlugin/data/TWiki/ObjectPlugin.txt =================================================================== --- twiki/trunk/ObjectPlugin/data/TWiki/ObjectPlugin.txt 2010-08-28 22:13:28 UTC (rev 19388) +++ twiki/trunk/ObjectPlugin/data/TWiki/ObjectPlugin.txt 2010-08-29 07:43:29 UTC (rev 19389) @@ -1,38 +1,39 @@ -%META:TOPICINFO{author="TWikiGuest" date="1160739585" format="1.1" reprev="1.14" version="1.14"}% -%META:TOPICPARENT{name="TWikiPlugins"}% - +%META:TOPICINFO{author="TWikiContributor" date="1283067362" format="1.1" version="$Rev$"}% ---+!! The Object Plugin - +<!-- + Contributions to this plugin are appreciated. Please update the plugin page at + http://twiki.org/cgi-bin/view/Plugins/ObjectPlugin or provide feedback at + http://twiki.org/cgi-bin/view/Plugins/ObjectPluginDev. + If you are a TWiki contributor please update the plugin in the SVN repository. +--> %SHORTDESCRIPTION% +<sticky><div style="float:right; background-color:#eeeeee; margin:0 0 20px 20px; padding: 0 10px 0 10px"> +%TOC{title="Page contents"}% +</div></sticky> -Uses the =OBJECT= html tag to embed arbitrary content into a wiki page, with a particular bent towards media: -common media formats are detected and some "agnostic best-guess" html is used (derived from that recommended by -the plugin providers). -However, any content at all can be embedded using the object tag: java, pdf, other html, svg, -even images (although there is of course no reason to do so). -The plugin uses generic syntax when it cannot detect the type of file being embedded. +---++ Introduction -The plugin stores a range of default values (defined here on this page) -which allow you to specify a bare minimum of info in your markup and still -get acceptable results (see [[#Basic_Usage][Basic Usage]] below). -These defaults can of course be overridden on a use-by-use basis. +Uses the =OBJECT= html tag to embed arbitrary content into a wiki page, with a particular bent towards media: Common media formats are detected and some "agnostic best-guess" html is used (derived from that recommended by the plugin providers). However, any content at all can be embedded using the object tag: java, pdf, other html, svg, even images (although there is of course no reason to do so). The plugin uses generic syntax when it cannot detect the type of file being embedded. +The plugin stores a range of default values (defined here on this page) which allow you to specify a bare minimum of info in your markup and still get acceptable results (see [[#Basic_Usage][Basic Usage]] below). These defaults can of course be overridden on a use-by-use basis. + A =USEEMBED= flag should be left to "true" - I thought I could be clever before I fully understood the minefield that is browser plugin syntax. -It also supports TWiki:Plugins.EmbedPlugin's =EMBED= syntax to enable it to superceed that plugin: +It also supports TWiki:Plugins.EmbedPlugin's =EMBED= syntax to enable it to supersede that plugin: + * %<nop>EMBED{filename="string" width="number" height="number"}% ----++Basic Usage +---++ Basic Usage You *could* call the plugin as simply as: =%<nop>OBJECT{"SomeMovie.mov"}%= -This will detect that the embedded file is a QuickTime and use "media-like" syntax (and pass the correct =CLASSID= to IE - why it can't work out which plugin to use is a little beyond me). However, unlike an IMG tag, plugins do not autosize to their content, and the movie would display at the default size. You could use media of only one size site-wide and specify the dimensions as defaults, but realistically the minimum markup you need to embed things into your wiki pages is: +This will detect that the embedded file is a !QuickTime and use "media-like" syntax (and pass the correct =CLASSID= to IE - why it can't work out which plugin to use is a little beyond me). However, unlike an IMG tag, plugins do not autosize to their content, and the movie would display at the default size. You could use media of only one size site-wide and specify the dimensions as defaults, but realistically the minimum markup you need to embed things into your wiki pages is: =%<nop>OBJECT{"SomeMovie.swf" width="320" height="180"}%= ----++Advanced Usage +---++ Advanced Usage A call to the ObjectPlugin could get as complicated as: @@ -42,13 +43,13 @@ %H% Including a "mime-type" parameter may help your browser choose which browser plugin to use more efficiently ----++Paramters +---++ Parameters ObjectPlugin supports arbitrary parameters. If you pass it =cowtype="Jersey"=, that is passed on to the browser, both as a =<<nop>PARAM>= tag and inside the optional =<<nop>EMBED>= tag. A few parameters are defined and get handled a little differently (they may be "translated" to a particular browser plugins syntax) -|*Parameter*|*Value*|*Description*|*Notes**| +|*Parameter*|*Value*|*Description*|*Notes*| |src|URI|the content to embed ("src=" is optional)|| |width|std web measure (px, %, em)|with of box holding content|| |height|std web measure (px, %, em)|height of box holding content|| @@ -56,28 +57,15 @@ |play|text boolean|whether to auto-play the content| automatically added for QT and Flash| |useembed| text boolean|whether to include a non-standard (but widely recommended) =EMBED= tag|| ----++Detection of media type/Recommended plugin syntax +---++ Detection of media type!!/Recommended plugin syntax -The plugin detects most media types and uses a hybrid of the html markup -recommended by the browser plugin makers - -in the hope of providing maximum compatibility. -This is done simply by checking the extension of the filename. -*Or, if the filename contains =youtube.com= it will automatically use flash* +The plugin detects most media types and uses a hybrid of the html markup recommended by the browser plugin makers - in the hope of providing maximum compatibility. This is done simply by checking the extension of the filename. *Or, if the filename contains =youtube.com= it will automatically use flash* -Originally, the plugin used (almost) the exact recommended HTML on a type-by-type basis, -but I've abandoned this in favour of "one markup fits all" because you don't -know which plugin will be handling what - the various ISO formats (MPEG1,2,4, MP3) -will be taken by whatever plugin was installed last, and QuickTime now handles -Windows Media on Macintosh systems (at Microsoft's recommendation!). +Originally, the plugin used (almost) the exact recommended HTML on a type-by-type basis, but I've abandoned this in favour of "one markup fits all" because you don't know which plugin will be handling what - the various ISO formats (MPEG1,2,4, MP3) will be taken by whatever plugin was installed last, and !QuickTime now handles Windows Media on Macintosh systems (at Microsoft's recommendation!). -While most of the HTML is as generic as possible, the =CLASSID= value and some -other mime-type information is unique to a particular file-type, and for Flash, -QuickTime and Windows Media the Microsoft-sanctioned values are sent. -I understand MSIE has to have this info or it totally burns ... +While most of the HTML is as generic as possible, the =CLASSID= value and some other mime-type information is unique to a particular file-type, and for Flash, !QuickTime and Windows Media the Microsoft-sanctioned values are sent. I understand MSIE has to have this info or it totally burns ... -I haven't bothered with Real. -If there's huge demand, it wouldn't be hard to add - -but it may also be handled quite well by the generic media syntax already. +I haven't bothered with Real. If there's huge demand, it wouldn't be hard to add - but it may also be handled quite well by the generic media syntax already. The sytax recommendations are found: @@ -85,16 +73,11 @@ * [[http://support.microsoft.com/default.aspx?scid=kb;en-us;Q285154][Windows Media]] (is it just me or is there almost no doco from Microsoft on this?) * [[http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_4150][Flash]] -From those startpoints, basically everything gets merged: -all synonymous parameters get sent (e.g. QT's "AutoPlay", -Flash's "Play" and WMV's "AutoStart") together, set to the same value. +From those startpoints, basically everything gets merged: All synonymous parameters get sent (e.g. QT's "AutoPlay", Flash's "Play" and WMV's "AutoStart") together, set to the same value. -Then everything is smoodged onto one line, TWiki doesn't like html tags over line -breaks, but I also noticed tables and Lists getting broken from line breaks -added by the plugin, so one line for everything. +Then everything is smoodged onto one line, TWiki doesn't like html tags over line breaks, but I also noticed tables and Lists getting broken from line breaks added by the plugin, so one line for everything. -And (to keep the plugin reasonably simple) _all_ information passed inside -=PARAM= tags is also put in the =EMBED= tag (and any special =EMBED= only parameters go first). +And (to keep the plugin reasonably simple) _all_ information passed inside =PARAM= tags is also put in the =EMBED= tag (and any special =EMBED= only parameters go first). In other words, all parameters recommended by the plugin maker are sent, plus more, and in any old order. @@ -102,12 +85,11 @@ http://alistapart.com/articles/byebyeembed -This is sort-of what I was aiming for with =USEEMBED=. I assumed that you could just leave =EMBED= out, -but that will break on everything but IE, as the other browsers (a little churlishly) ingore the entire tag if it has MS's custom params in it. +This is sort-of what I was aiming for with =USEEMBED=. I assumed that you could just leave =EMBED= out, but that will break on everything but IE, as the other browsers (a little churlishly) ingore the entire tag if it has MS's custom params in it. ----++ defining additional file formats -The output of this plugin is paritally goverend by TWiki templates. the mov file output is defined in =templates/objectplugin_mov.tmpl=, -which contains the classid's, codebase etc. +---++ Defining additional file formats + +The output of this plugin is paritally goverend by TWiki templates. the mov file output is defined in =templates/objectplugin_mov.tmpl=, which contains the classid's, codebase etc. <verbatim> %TMPL:DEF{objectHeader_mov}%classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" %TMPL:END% %TMPL:DEF{embedTag_mov}%TYPE="video/quicktime" PLUGINSPAGE="http://www.apple.com/quicktime/download/" %TMPL:END% @@ -117,18 +99,17 @@ ---++ <nop>%TOPIC% Global Settings -Plugin settings are stored as preferences variables. To reference -a plugin setting write ==%<nop><plugin>_<setting>%==, for example, ==%<nop>INTERWIKIPLUGIN_SHORTDESCRIPTION%== +Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop><plugin>_<setting>%==, for example, ==%<nop>INTERWIKIPLUGIN_SHORTDESCRIPTION%== - * One line description, shown in the %TWIKIWEB%.TextFormattingRules topic: - * Set SHORTDESCRIPTION = Embed Multi-Media Objects into TWiki topics (replaces EmbedPlugin) + * One line description, shown in the %SYSTEMWEB%.TextFormattingRules topic: + * Set SHORTDESCRIPTION = Embed multi-media Objects into TWiki topics * Default parameters for plugin. These *must* be defined. (For booleans use "TRUE" for true, anything else for false) - * Set WIDTH = 320 - * Set HEIGHT = 180 - * Set CONTROLLER = TRUE - * Set PLAY = TRUE - * Set USEEMBED = TRUE + * Set WIDTH = 320 + * Set HEIGHT = 180 + * Set CONTROLLER = TRUE + * Set PLAY = TRUE + * Set USEEMBED = TRUE ---++ Installation Instructions @@ -150,22 +131,20 @@ ---++ Plugin Info | Plugin Authors: | TWiki:Main.PiersGoodhew, TWiki:Main.SvenDowideit | -| Copyright: | © 2006 TWiki:Main.PiersGoodhew, 2008 TWiki:Main.SvenDowideit | +| Copyright: | © 2006 TWiki:Main.PiersGoodhew; %BR% © 2008 TWiki:Main.SvenDowideit; %BR% © 2006-2010, TWiki:TWiki.TWikiContributor | | License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] | | Plugin Version: | %$VERSION% | -| 20 Oct 2008 | modernise with TWiki:Plugins.BuildContrib, add EMBED Tag, remove WikiWord issues, templatise html output, add youtube supprt - TWiki:Main.SvenDowideit | -| 16 Oct 2006 | initial version | | Change History: | <!-- versions below in reverse order --> | +| 2010-08-28: | TWikibug:Item6530 - doc improvements; change TWIKIWEB to SYSTEMWEB | +| 20 Oct 2008 | modernize with TWiki:Plugins.BuildContrib, add EMBED Tag, remove !WikiWord issues, templetize html output, add youtube support - TWiki:Main.SvenDowideit | +| 16 Oct 2006 | initial version | | Dependencies: | %$DEPENDENCIES% | | Plugin Home: | http://twiki.org/cgi-bin/view/Plugins/ObjectPlugin | | Feedback: | http://twiki.org/cgi-bin/view/Plugins/ObjectPluginDev | | Appraisal: | http://twiki.org/cgi-bin/view/Plugins/ObjectPluginAppraisal | -__Related Topics:__ %TWIKIWEB%.TWikiPlugins, %TWIKIWEB%.DeveloperDocumentationCategory, %TWIKIWEB%.AdminDocumentationCategory, %TWIKIWEB%.TWikiPreferences +__Related Topics:__ %SYSTEMWEB%.TWikiPlugins, %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.TWikiPreferences -<!-- Do _not_ attempt to edit this topic; it is auto-generated. Please add comments/questions/remarks to the feedback topic on twiki.org instead. --> - - -%META:FILEATTACHMENT{name="sample.html" attr="" autoattached="1" comment="sample html file" date="1160707557" path="sample.html" size="110" user="Main.TWikiGuest" version="2"}% -%META:FILEATTACHMENT{name="sample.mov" attr="" autoattached="1" comment="sample QT movie" date="1160739512" path="sample.mov" size="21681" user="Main.TWikiGuest" version="1"}% -%META:FILEATTACHMENT{name="Sample.swf" attr="" autoattached="1" comment="" date="1160707933" path="Sample.swf" size="1831" user="Main.TWikiGuest" version="1"}% +%META:FILEATTACHMENT{name="sample.html" attr="h" comment="sample html file" date="1160707557" path="sample.html" size="110" user="TWikiContributor" version="1"}% +%META:FILEATTACHMENT{name="sample.mov" attr="h" comment="sample QT movie" date="1160739512" path="sample.mov" size="21681" user="TWikiContributor" version="1"}% +%META:FILEATTACHMENT{name="Sample.swf" attr="h" comment="" date="1160707933" path="Sample.swf" size="1831" user="TWikiContributor" version="1"}% Modified: twiki/trunk/ObjectPlugin/lib/TWiki/Plugins/ObjectPlugin.pm =================================================================== --- twiki/trunk/ObjectPlugin/lib/TWiki/Plugins/ObjectPlugin.pm 2010-08-28 22:13:28 UTC (rev 19388) +++ twiki/trunk/ObjectPlugin/lib/TWiki/Plugins/ObjectPlugin.pm 2010-08-29 07:43:29 UTC (rev 19389) @@ -1,6 +1,21 @@ -# ObjectPlugin for TWiki Enterprise Collaboration Platform, http://TWiki.org/ +# Plugin for TWiki Enterprise Collaboration Platform, http://TWiki.org/ # -# Copyright (C) TWiki:Main.PiersGoodhew & TWikiContributors. +# Copyright (C) 2006 TWiki:Main.PiersGoodhew +# Copyright (C) 2006-2010 TWiki:TWiki.TWikiContributor +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. For +# more details read LICENSE in the root of this distribution. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details, published at +# http://www.gnu.org/copyleft/gpl.html +# +# As per the GPL, removal of this notice is prohibited. =pod @@ -8,29 +23,17 @@ =cut -# change the package name and $pluginName!!! package TWiki::Plugins::ObjectPlugin; -# Always use strict to enforce variable scoping use strict; -# $VERSION is referred to by TWiki, and is the only global variable that -# *must* exist in this package use vars qw( $VERSION $RELEASE $debug $pluginName $objectPluginDefHeight $objectPluginDefWidth $objectPluginDefUseEMBED $objectPluginDefController $objectPluginDefPlay $kMediaFileExtsPattern $htmlId); - -# This should always be $Rev: 9813$ so that TWiki can determine the checked-in -# status of the plugin. It is used by the build automation tools, so -# you should leave it alone. $VERSION = '$Rev$'; +$RELEASE = '2010-08-29'; -# This is a free-form string you can use to "name" your own plugin version. -# It is *not* used by the build automation tools, but is reported as part -# of the version number in PLUGINDESCRIPTIONS. -$RELEASE = 'Dakar'; - # Name of this Plugin, only used in this module $pluginName = 'ObjectPlugin'; @@ -182,3 +185,6 @@ return $objectHeader . $objectParams . $embedTags . $objectFooter; } + +1; + |