%META:TOPICINFO{author="TWikiContributor" date="1302156957" format="1.1" version="1"}%
---+!! Update Info Plugin
<!--
   Contributions to this plugin are appreciated. Please update the plugin page at
   http://twiki.org/cgi-bin/view/Plugins/UpdateInfoPlugin or provide feedback at
   http://twiki.org/cgi-bin/view/Plugins/UpdateInfoPluginDev.
   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

<nop>UpdateInfoPlugin will add a "new" or "updated" icon after a %SYSTEMWEB%.WikiWord link if a =%<nop>ISNEW%= variable is used after the link, and the linked topic was recently touched.

=<nop>WikiWord %<nop>ISNEW%= will be expanded to:

   * <nop>WikiWord - if the topic is neither new nor updated
   * <nop>WikiWord %N% - if the topic is younger than five days and is revision 1.1
   * <nop>WikiWord %U% - if the topic revision is higher than 1.1 and the topic was updated during the last five days

Default values for the "version" and "days" parameters are set sitewide here in %TOPIC%#PluginSettings, but can be overridden per topic (or in !WebPreferences per web), by setting variables =UPDATEINFOVERSION= and/or =UPDATEINFODAYS=.

---++ Syntax Rules

The %<nop>ISNEW% variable must be written after a <nop>WikiWord separated by _exactly one space_.

Full %<nop>ISNEW% syntax takes one or two options:

   * days: Changes the number of days a Topic is marked as new or updated
   * version: Specifies which revision is still considered to be new

Full syntax overrides site/topic defaults.

---++ Syntax Examples

   * =<nop>MyTopic %<nop>ISNEW%=
   * =<nop>Web.ToPic %<nop>ISNEW%=
   * =<nop>Gr&oslash;dWeb.Bl&aring;B&aelig;rGr&oslash;d %<nop>ISNEW%= (<nop>I18N characters in <nop>WikiWords and <nop>WebNames are matched)
   * =<nop>TopIc %<nop>ISNEW{days="15"}%=
   * =<nop>TopiC %<nop>ISNEW{days="20" version="1.4"}%=

The <nop>%TOPIC% supports these <nop>TWikiML link syntaxes:

   * =WikiWord=
   * <nop>WikiWord as =WebName.WikiWord=
   * =[<nop>[WikiWord][link text]]=
   * =[<nop>[WebName.WikiWord][link text]]=
   * =[<nop>[link text]]=
   * =[<nop>[link-text]]= (links to non-WikiWord topics, i.e. topic names containing special chars like "-")
   * =[<nop>[singleword]]=
   * =WIK IWO RDS= (abbreviations / acronyms) 

(All followed by the =%<nop>ISNEW%= variable).

---++ Examples (Work if Installed)

   * UpdateInfoPlugin %ISNEW%
   * Main.WebHome %ISNEW%
   * TWiki.WebHome %ISNEW{days="15"}%
   * TWiki.TWikiPreferences %ISNEW{days="20" version="1.4"}%
   * Sandbox.UpdateInfoPluginTest %ISNEW% (Edit and save the <nop>Sandbox.UpdateInfoPluginTest topic, and it should be highlighted with a %N% icon)

#PluginSettings
---++ <nop>%TOPIC% Settings

   * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
      * Set SHORTDESCRIPTION = Visually indicate if a topic behind a %SYSTEMWEB%.WikiWord was created or updated recently

   * Sitewide "version" default
      * Set UPDATEINFOVERSION = 1.1

   * Sitewide "days" default
      * Set UPDATEINFODAYS = 5

   * Debug plugin: (See output in =data/debug.txt=)
      * Set DEBUG = 0

---++ Installation Instructions

   * For an __automated installation__, run the [[%SCRIPTURL{configure}%][configure]] script and follow "Find More Extensions" in the in the __Extensions__ section.

   * Or, follow these __manual installation__ steps:
      * Download the ZIP file from the Plugins home (see below).
      * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content:
        | *File:* | *Description:* |
        | ==data/TWiki/%TOPIC%.txt== | Plugin topic |
        | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |
      * Set the ownership of the extracted directories and files to the webserver user.
      * Install the dependencies (if any).

   * Plugin __configuration and testing__:
      * Run the [[%SCRIPTURL{configure}%][configure]] script and enable the plugin in the __Plugins__ section.
      * Configure additional plugin settings in the __Extensions__ section if needed.
      * Test if the installation was successful: See example above.

---++ Plugin Info

|  Plugin Author: | TWiki:Main.ChrisHuebsch, TWiki:Main.SteffenPoulsen |
|  Copyright: | &copy; 2002 TWiki:Main.ChrisHuebsch <br /> &copy; 2005-2006 TWiki:Main.SteffenPoulsen <br /> &copy; 2008-2011 TWiki:TWiki.TWikiContributor |
|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
|  Plugin Version: | 2011-04-07 |
|  Change History: | <!-- versions below in reverse order -->&nbsp; |
|  2011-04-06: | TWikibug:Item6638: Doc improvements -- TWiki:Main.PeterThoeny |
|  26 Jul 2006: | (v2.0) - Updated to use default graphic icons from %SYSTEMWEB%.TWikiDocGraphics. |
|  20 Apr 2006: | (v1.9) - Cairo+Dakar compatibility (TWiki:Main.SteffenPoulsen) |
|  10 Jan 2006: | (v1.8) - Dakar compatibility |
|  7 Apr 2005: | (v1.7) - New variable name in plugin settings |
|  6 Apr 2005: | (v1.6) - Fetch default "days" and "version" variables from TWiki variables |
|  4 Apr 2005: | (v1.5) - Support for non-WikiWord topics in <nop>TWikiML link syntaxes |
|  2 Apr 2005: | (v1.4) - Support for more <nop>TWikiML link syntaxes |
|  1 Apr 2005: | (v1.3) - Plugin is now I18N-aware |
|  30 Mar 2005: | (v1.2) - implemented changes/fixes from TWiki:Plugins.UpdateInfoPluginDev |
|  15 Apr 2002: | Initial version |
|  CPAN Dependencies: | none |
|  Other Dependencies: | none |
|  Perl Version: | 5.005 |
|  TWiki:Plugins/Benchmark: | %SYSTEMWEB%.GoodStyle 99%, %SYSTEMWEB%.FormattedSearch 99%, %TOPIC% 99% |
|  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:__ %SYSTEMWEB%.TWikiPreferences, %SYSTEMWEB%.UserDocumentationCategory, %SYSTEMWEB%.TWikiPlugins
