[pmwiki-users] "Upload new version" attachment markup

Petko Yotov 5ko at 5ko.fr
Wed Apr 18 15:56:15 CDT 2012


You don't need all of this, just set in config.php something like:

  $IMapLinkFmt['Attach:'] =
    "<a rel='nofollow' class='urllink' href='\$LinkUrl'>\$LinkText</a><a 
      rel='nofollow' class='createlink' href='\$LinkUpload'>Δ</a>";

This will redefine the Attach: link format. Clicking on the Delta letter after 
the file link will let you upload a new version.

Petko

On Wednesday 18 April 2012 13:20:14 Karl Schilke wrote:
> I've been using our lab Wiki as a central place to store all of the
> miscellaneous files (draft manuscripts, Excel files, data files and
> photos, etc.) related to scientific papers that we're writing.
> 
> Not all of the people using the Wiki are <ahem> power users...  To
> help, I've hacked up a simple InterMap that lets me write something
> like:
> 
>     [[Attach:Manuscript_draft.docx | The original draft manuscript is
> here ]]) \\
>     [[Upload:Manuscript_draft.docx | [- Upload new version -] ]]
> 
> where 'Upload:' is defined in Site.InterMap as:
> 
>      Upload: ?upname=$1&action=upload
> 
> The result is something like:
> 
>      The draft manuscript is here   (normal font)
>      Upload new version             (smaller font)
> 
> where the top line is a link to the file, and the bottom line brings
> up the Attach screen with the upname pre-loaded so that the user can
> upload a new version of the file.
> 
> This works well enough, once I've set it up, but obviously the syntax
> is a little tortured and error-prone.  I'd like to have something more
> like this:
> 
>     [[Upload:Manuscript_draft.docx | The original draft manuscript]]
> 
> which generates the same output as above (two links, one to the file,
> one to the Attach/upload screen).  I know it should be relatively easy
> to do this with InterMaps, but I'm not seeing how to make it happen.
> 
> Thanks for any suggestions!!!
> 
>       -karl



More information about the pmwiki-users mailing list