Tags:
create new tag
view all tags

Question

I don't know yet whether this is complete, but below is a patch that at least appears to get ContributorsPlugin working on 4.0.2. Prior to this it had fatal errors (was calling an object method as a function, etc).

diff -u ContributorsPlugin.pm~ ContributorsPlugin.pm
--- ContributorsPlugin.pm~      Fri Apr 28 15:09:46 2006
+++ ContributorsPlugin.pm       Fri Apr 28 15:55:32 2006
@@ -91,7 +91,7 @@
     &TWiki::Func::writeDebug( "- ContributorsPlugin::commonTagsHandler( $_[2].$_[1] )" ) if $debug;
 
     $_[0] =~ s/%CONTRIBUTORS%/&handleContributors($_[1], $_[2])/ge;
-    $_[0] =~ s/%CONTRIBUTORS{(.*?)}%/&handleContributors($_[1], $_[2], $1)/ge;
+    $_[0] =~ s/%CONTRIBUTORS\{(.*?)\}%/&handleContributors($_[1], $_[2], $1)/ge;
 
 }
 
@@ -123,10 +123,10 @@
     # If there someday is a way to get all the rev info at once, this should
     # take advantage of that.
     for ($revision=$maxRevision; $revision>($maxRevision-$last); $revision--) {
-        my @lines = &TWiki::Store::getRevisionInfo($web, $topic, $revision);
+        my @lines = $TWiki::Plugins::SESSION->{store}->getRevisionInfo($web, $topic, $revision);
         for ($lineIndex = 0; $lineIndex < $#lines; $lineIndex += 4) {
            my $date = &TWiki::Func::formatTime($lines[$lineIndex+0], "http");
-           my $author = $lines[$lineIndex+1];
+           my $author = $lines[$lineIndex+1]->wikiName;
            my $revisionNumber = $lines[$lineIndex+2];
            my $comment = $lines[$lineIndex+3];
            $contributorLine = &formatContributorLine($web, $topic, $author, $date, $revision, $format);

Environment

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, ContributorsPlugin
Server OS: Linux
Web server: Apache
Perl version: 5.8.6
Client OS: Windows
Web Browser: Firefox
Categories: Fatal error, Contributing code, Plugins

-- PeterScott - 28 Apr 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Thanks Peter for contributing the patch. With some little more changes it will work on Cairo and Dakar, as described in HandlingCairoDakarPluginDifferences. I added a pointer to this topic in ContributorsPluginDev.

-- PeterThoeny - 28 Apr 2006

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2006-04-29 - WillNorris
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.