From: <de...@de...> - 2010-11-09 08:22:44
|
Author: PeterThoeny Date: 2010-11-09 02:22:35 -0600 (Tue, 09 Nov 2010) New Revision: 19785 Trac url: http://develop.twiki.org/trac/changeset/19785 Modified: twiki/branches/TWikiRelease05x00/HtmlMetaPlugin/data/TWiki/HtmlMetaPlugin.txt twiki/branches/TWikiRelease05x00/HtmlMetaPlugin/lib/TWiki/Plugins/HtmlMetaPlugin.pm Log: Item6530: Doc updates Modified: twiki/branches/TWikiRelease05x00/HtmlMetaPlugin/data/TWiki/HtmlMetaPlugin.txt =================================================================== --- twiki/branches/TWikiRelease05x00/HtmlMetaPlugin/data/TWiki/HtmlMetaPlugin.txt 2010-11-09 08:21:13 UTC (rev 19784) +++ twiki/branches/TWikiRelease05x00/HtmlMetaPlugin/data/TWiki/HtmlMetaPlugin.txt 2010-11-09 08:22:35 UTC (rev 19785) @@ -1,9 +1,20 @@ -%META:TOPICINFO{author="DougClaar" date="1149115625" format="1.1" version="1.11"}% +%META:TOPICINFO{author="TWikiContributor" date="1289290328" format="1.1" version="$Rev$"}% ---+!! <nop>%TOPIC% +<!-- + Contributions to this TWiki plugin are appreciated. Please update the plugin page at + http://twiki.org/cgi-bin/view/Plugins/HtmlMetaPlugin or provide feedback at + http://twiki.org/cgi-bin/view/Plugins/HtmlMetaPluginDev. + If you are a TWiki contributor please update the plugin in the SVN repository. +--> +<sticky><div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;"> +%TOC{title="Page contents"}% +</div></sticky> +%SHORTDESCRIPTION% + +---++ Introduction + This plugin exists for one reason, and one reason only: To get <meta> tags into the html header. Why? It turns out that some search engines won't index a page without "proper" meta tags. Other search engines give better results with meta tags. Unfortunately, TWiki didn't have a good way to do this. %<nop>HTTP_EQUIV_ON_VIEW% isn't really up to the task, as it only allows you to specify one thing. -%TOC% - ---++ Syntax Rules * %<nop>HTMLMETA{[name=]"meta name" content="meta content" [visibility="number"]}% @@ -24,8 +35,8 @@ Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop><plugin>_<setting>%==, i.e. ==%<nop>NEWPLUGIN_SHORTDESCRIPTION%== - * One line description, is shown in the %TWIKIWEB%.TextFormattingRules topic: - * Set SHORTDESCRIPTION = _Insert html "meta name" entries into html header_ + * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic: + * Set SHORTDESCRIPTION = Insert HTML "meta name" entries into html header * To get debug messages (in data/debug.txt), set DEBUG to 1. Default: 0 * Set DEBUG = 0 @@ -37,17 +48,16 @@ __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) + * 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 + * Run the [[%SCRIPTURL{configure}%][configure]] script to enable the plugin + * Change the plugin settings as needed * Test if the installation was successful: - * Since this plugin creates Html Metadata in the <head&rt; section, you have to view source to tell if it worked. If so, it will look something like: + * Since this plugin creates HTML Metadata in the <head> section, you have to view source to tell if it worked. If so, it will look something like: <verbatim> <!--HTMLMETAkeywords--> <meta name="keywords" content="TWiki wabbit" /> @@ -109,22 +119,21 @@ ---++ Plugin Info | Plugin Author: | TWiki:Main.DougClaar | -| Copyright: | © 2006, TWiki:Main.DougClaar | +| Copyright: | © 2006, TWiki:Main.DougClaar <br /> © 2006-2010 TWiki:TWiki/TWikiContributor | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | -| Plugin Version: | 09 May 2006 (V1.000) | +| Plugin Version: | 2010-11-09 (V1.1) | | Change History: | <!-- versions below in reverse order --> | -| 09 May 2006: | Initial version | +| 2010-11-09: | Doc improvements | +| 2006-05-09: | 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 100%, %TWIKIWEB%.FormattedSearch 100%, %TOPIC% 100% | +| [[TWiki:Plugins/Benchmark][Benchmarks]]: | %SYSTEMWEB%.GoodStyle 100%, %SYSTEMWEB%.FormattedSearch 100%, %TOPIC% 100% | | 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 +__Related Topics:__ %SYSTEMWEB%.TWikiPlugins, %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.TWikiPreferences --- TWiki:Main.DougClaar - 09 May 2006 - %META:TOPICMOVED{by="DougClaar" date="1147209048" from="TWiki.HtmlHead" to="TWiki.HtmlMeta"}% Modified: twiki/branches/TWikiRelease05x00/HtmlMetaPlugin/lib/TWiki/Plugins/HtmlMetaPlugin.pm =================================================================== --- twiki/branches/TWikiRelease05x00/HtmlMetaPlugin/lib/TWiki/Plugins/HtmlMetaPlugin.pm 2010-11-09 08:21:13 UTC (rev 19784) +++ twiki/branches/TWikiRelease05x00/HtmlMetaPlugin/lib/TWiki/Plugins/HtmlMetaPlugin.pm 2010-11-09 08:22:35 UTC (rev 19785) @@ -1,10 +1,9 @@ # Plugin for TWiki Enterprise Collaboration Platform, http://TWiki.org/ # -# Copyright (C) 2000-2003 Andrea Sterbini, a.s...@fl... -# Copyright (C) 2001-2006 Peter Thoeny, pe...@th... -# and TWiki Contributors. All Rights Reserved. TWiki Contributors -# are listed in the AUTHORS file in the root of this distribution. -# NOTE: Please extend that file, not this notice. +# Copyright (C) 2006 TWiki:Main.DougClaar +# Copyright (C) 2006-2010 TWiki Contributors. All Rights Reserved. +# TWiki Contributors are listed in the AUTHORS file in the root of +# this distribution. NOTE: Please extend that file, not this notice. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -27,26 +26,15 @@ =cut -# change the package name and $pluginName!!! package TWiki::Plugins::HtmlMetaPlugin; -# 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 $HtmlMetaCfgVisibility); -# This should always be $Rev: 9598$ 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: 9598$'; +$RELEASE = '2010-11-09'; -# 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 = 'HtmlMetaPlugin'; @@ -58,28 +46,6 @@ * =$user= - the login name of the user * =$installWeb= - the name of the web the plugin is installed in -REQUIRED - -Called to initialise the plugin. If everything is OK, should return -a non-zero value. On non-fatal failure, should write a message -using TWiki::Func::writeWarning and return 0. In this case -%FAILEDPLUGINS% will indicate which plugins failed. - -In the case of a catastrophic failure that will prevent the whole -installation from working safely, this handler may use 'die', which -will be trapped and reported in the browser. - -You may also call =TWiki::Func::registerTagHandler= here to register -a function to handle variables that have standard TWiki syntax - for example, -=%MYTAG{"my param" myarg="My Arg"}%. You can also override internal -TWiki variable handling functions this way, though this practice is unsupported -and highly dangerous! - -__Note:__ Please align variables names with the Plugin name, e.g. if -your Plugin is called FooBarPlugin, name variables FOOBAR and/or -FOOBARSOMETHING. This avoids namespace issues. - - =cut sub initPlugin { |