Tags:
create new tag
, view all tags

UpdateInfoPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on UpdateInfoPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below
• See UpdateInfoPluginDevArchive for older discussions.

Feedback on UpdateInfoPlugin

-- ChrisHuebsch - 15 Apr 2002

Updated plugin to be Dakar+Cairo compatible, released new version from SVN. Old discussion moved to UpdateInfoPluginDevArchive.

-- SteffenPoulsen - 20 Apr 2006

Current version of UpdateInfoPlugin (r24) has attachment issues. The .zip attachment is an older revision (1.6?), and the tgz (looks like 1.9) gets served with the wrong MIME type for some reason.

-- StevenMaggs - 05 Jun 2006

Mime type bug fixed on twiki.org and in SVN, Bugs:Item2427.

-- PeterThoeny - 06 Jun 2006

I am using V4.0.3 of Twiki and made the following modifications to /lib/TWiki/Plugins/UpdateInfoPlugin.pm to make it work:

66a67
> 
71,73c72
<   my $webre = TWiki::Func::getRegularExpression('webNameRegex');
<   my $wwre = TWiki::Func::getRegularExpression('wikiWordRegex');
<   $wikiword =~ s/\[\[($webre\.$wwre|$wwre)\]\[.*?\]\]/$1/o;
---
>   $wikiword =~ 
> s/\[\[($regex{webNameRegex}\.$regex{wikiWordRegex}|$regex{wikiWordRege
> x})\]\[.*?\]\]/$1/o;
79a79
> 
83,85c83,84
<   my $mixanumre = TWiki::Func::getRegularExpression('singleMixedAlphaNumRegex');
<   $topic =~ s/\s($mixanumre)/\U$1/go;
<   $topic =~ s/\[\[($mixanumre)(.*?)\]\]/\u$1$2/o;
---
>   $topic =~ s/\s($regex{singleMixedAlphaNumRegex})/\U$1/go;
>   $topic =~ 
> s/\[\[($regex{singleMixedAlphaNumRegex})(.*?)\]\]/\u$1$2/o;
87c86
<   my ( $meta, $dummy ) = TWiki::Func::readTopic($web, $topic);
---
>   ( $meta, $dummy ) = TWiki::Store::readTopMeta($web, $topic);
101,103c100,102
<     my ($date, $author, $rev, $comment) = $meta->getRevisionInfo();
<     $updated = ((time-$date)/86400) < $params{"days"}; #24*60*60
<     $new = $updated && (($rev) le ($params{"version"}));
---
>     %info = $meta->findOne( "TOPICINFO" );
>     $updated = ((time-$info{"date"})/86400) < $params{"days"}; #24*60*60
>     $new = $updated && (($info{"version"}) le ($params{"version"}));
124a124
> 
126,129c126
<     my $wwre = TWiki::Func::getRegularExpression('wikiWordRegex');
<     my $webre = TWiki::Func::getRegularExpression('webNameRegex');
<     my $abbrre = TWiki::Func::getRegularExpression('abbrevRegex');
<    $_[0] =~ s/($webre\.$wwre|$wwre|\[\[$wwre\]\[.*?\]\]|\[\[$webre\.$wwre\]\[.*?\]\]|\[\[.*?\]\]|$abbrre) %ISNEW({.*?})?%/"$1".update_info($web, $1, $2)/geo;
---
>    $_[0] =~ 
> s/($regex{webNameRegex}\.$regex{wikiWordRegex}|$regex{wikiWordRegex}|\
> [\[$regex{wikiWordRegex}\]\[.*?\]\]|\[\[$regex{webNameRegex}\.$regex{w
> ikiWordRegex}\]\[.*?\]\]|\[\[.*?\]\]|$regex{abbrevRegex}) 
> %ISNEW({.*?})?%/"$1".update_info($web, $1, $2)/geo;

I also changed the icons to use the ones from TWikiDocGraphics (they're nicer - no offence to the author smile )

-- DarrenElkerton - 26 Jul 2006

Thanks for spending some of your time with this plugin Darren! smile Unfortunately I am afraid it was spent in vain to some degree, as the plugin was already updated to work for both Cairo and Dakar - but the case being that the zip was broken as stated above (I'm afraid that comment has slipped my attention, should have done something about that earlier).

- I like your suggestion on using the TWikiDocGraphics icons, I have updated the plugin accordingly.

-- SteffenPoulsen - 26 Jul 2006

No Problem ... I'm learning perl by fixing the plugins I'm trying to use wink

Since Peter's reply was several weeks ago, I assumed (perhaps incorrectly) that the zip had been fixed and was the correct one, and that the problems I was having were specific to my installation (since the "tested on TWiki" area in the Plugin page shows 4.0.0 not the latest). I guess I must've missed something confused

-- DarrenElkerton - 26 Jul 2006

I never saw this error with a broken zip before - apparently description was new, but content old. Let's hope it was a one-timer smile

4.0.0 is synonymous with the whole set of TWiki-4 releases, agreed it does look a bit cryptic with the "extra" .0.0.

-- SteffenPoulsen - 27 Jul 2006

Saw bad .zip content behaviour also on TocPlugin, Bugs:Item2700 reported.

-- SteffenPoulsen - 28 Jul 2006

In the apache error log I see the following lines whenever a topic is accessed which uses the plugin:

[...] [error] [client ...] [...] view: Use of uninitialized value in concatenation (.) or string at D:/twikitest/lib/TWiki/Plugins/UpdateInfoPlugin.pm line 113., referer: http://twiki.da.gei/twiki/bin/view/Main/WebHome
[...] [error] [client ...] [...] view: Use of uninitialized value in concatenation (.) or string at D:/twikitest/lib/TWiki/Plugins/UpdateInfoPlugin.pm line 114., referer: http://twiki.da.gei/twiki/bin/view/Main/WebHome

I think, it should not be too difficult to fix this minor problem wink

-- MichaelSchmidt - 01 Nov 2006

Not sure of the proper protocol for reporting bugs/suggesting fixes, but...

I noticed that the plugin was not picking up the site-wide value for the number of days. In the module UpdateInfoPlugin.pm I changed line 69 from

      || &TWiki::Func::getPreferencesValue("UPDATEINFOPLUGIN_DAYS")
to
      || &TWiki::Func::getPreferencesValue("UPDATEINFOPLUGIN_UPDATEINFODAYS")
This seems to have fixed the problem. I believe a similar fix is indicated for the UPDATEINFOVERSION variable.

-- RonRisley - 16 Jul 2007

Does not work correctly with non-Wikiwords, as follows:

  • Sandbox.M73 %ISNEW% <-- this does not work: [[Sandbox.M73][Sandbox.M73]]
  • Sandbox.MiD73 %ISNEW% <-- This works ok, only difference is the name of the topic.
  • Sandbox.M73 %ISNEW% <-- Doesn't work: [[Sandbox.M73]]

In other words, it does not support:

  • [[Nonwikiword][Link Text]] syntax
  • [[Nonwikiword]] syntax

I fixed this for my purposes, as follows:

Old (starting at line 102):

    # clear [[-style formatting for [[WikiWordAsWebName.WikiWord][link text]] 
    # and [[WikiWord][link text]]
    $wikiword =~ s/\[\[($wnre\.$wwre|$wwre)\]\[.*?\]\]/$1/o;

New:

    # clear [[-style formatting for [[WikiWordAsWebName.WikiWord][link text]] 
    # and [[WikiWord][link text]] and [[nonwikiword]] and [[nonwikiword][Link text]]
    $wikiword =~ s/\[\[(.*?)\]\[.*?\]\]/$1/o;
    $wikiword =~ s/\[\[(.*?)\]\]/$1/o;

Original (starting at line 205):

    $_[0] =~
s/($wnre\.$wwre|$wwre|\[\[$wwre\]\[.*?\]\]|\[\[$wnre}\.$wwre\]\[.*?\]\]|\[\[.*?\]\]|$abbre) %ISNEW({.*?})?%/"$1".update_info($web, $1, $2)/geo;

New:

    $_[0] =~
s/($wnre\.$wwre|$wwre|\[\[.*?\]\[.*?\]\]|\[\[.*?\]\]|$abbre) %ISNEW({.*?})?%/"$1".update_info($web, $1, $2)/geo;

-- RaymondLutz - 17 Jul 2007

Can this plugin be enabled for all WikiWords globally, without being forced to add %ISNEW% behind each and every one of them ? What kind of performance hit would that cause ?

Is it possible to adjust the new / updated icons, or define a CSS class for the same ?

-- KeithHelfrich - 18 Jul 2007

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt UpdateInfoPlugin_revised.txt r1 manage 6.7 K 2007-07-17 - 19:52 RaymondLutz revised version of the UpdateInfoPlugin.pm that correctly deals with nonwikiword links.
Edit | Attach | Watch | Print version | History: r50 < r49 < r48 < r47 < r46 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r50 - 2007-07-18 - KeithHelfrich
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.