[Home]WikiProposalPatchs

UseModWiki | RecentChanges | Preferences

Question: possible patch?

around line 2442:
 $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)
--RiVer

Where is the patch to allow a wiki user to upload a file onto the server where the wiki is stored? I want to refer documents created by someone else, and use the wiki to upload them.
There is not such patch. Care to write one? :-) -- DavidCollantes

No, I'd rather someone else wrote and debugged it for me! ;-) -- Stew Stryker

See http://www.andrewgray.uklinux.net/tpwiki/wiki.pl?FileUploadScript for one possible solution. This isn't a patch but an add-on perl script. -- Andrew Gray

You might also find http://www.toothycat.net/wiki/wiki.pl?ToothyWikiInternals/ImageServer interesting - it's another add-on perl script that handles image uploads. It checks the first few bytes of the file being uploaded to ensure it's an image, and attempts to enforce a quota on image directory space.

UseModWithUploads


No ? but CSS for not existing pages

At the end of GetPageOrEditLink
 - return $name . &GetEditLink($id, "?");
 + return &GetEditLink($id, $name, 1);
and remove the if ($FreeLinks) .. part.

In PrintLinkList

 - $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...


Mail UseMod Changes

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


Multiple wikis using the same script

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 directory
Then 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


UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited December 28, 2007 7:43 pm by JuanmaMP (diff)
Search: