$OtherCode = ""; # Comment next line to always compile (slower) #$OtherCode = <<'#END_OF_OTHER_CODE';Does this mean that a simple patch would be to uncomment the second line and thereby save about 40% of the code being compiled when the user is only reading a page? (I realise that if I knew more about Perl conditional compilation I would not need to ask)
- return $name . &GetEditLink($id, "?"); + return &GetEditLink($id, $name, 1);and remove the if ($FreeLinks) .. part.
- $link .= &GetEditLink($page, "?"); + $link = &GetEditLink($page, $link, 1);
In GetEditLink
+ my ($id, $name, $new) = @_; + my $attr=""; + if ($new) { + $attr = " class=\"new\""; + } - return &ScriptLink("action=edit&id=$id", $name); + return &ScriptLink("action=edit&id=$id", $name, $attr);
And change ScriptLink into:
my ($action, $text, $attr) = @_; return "<a href=\"$ScriptName?$action\" $attr>$text</a>";
Well - it's a little bit ugly...
I use a number of UseModWikis? to collaborate on various projects. I've found it very helpful to receive notifications by email when the Wikis change, especially when changes are infrequent. [mail_usemod_changes] reads the UseModWiki's RSS feed, keeps a cache of already notified entries, and emails new entries to interested parties. (Not a patch, but a separate Perl program, designed to be run from cron.) --JTJM
I don't know where to put this. Or if this patch already exists. Please remove if it is redundant. I want to be able to use the same wiki script for multiple wikis. Here's a patch for usemod 1.0:
30a31 > use File::Basename; 68c69 < $DataDir = "/tmp/mywikidb"; # Main wiki directory --- > $DataDir = "../wikidbs/" . basename($0); # Main wiki directoryThen I simply make symbolic links with the same names as the wiki databases. Of course works for 0.92 too. Of course your default storage point for wiki databases may be different from mine.
--PEZ