Closed (fixed)
Project:
PEAR Wiki Filter
Version:
5.x-1.0
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2008 at 22:09 UTC
Updated:
19 Jan 2008 at 21:21 UTC
using mediawiki...
I want to be able to link to non image files.
Image files seem to work with [[image:....]]
I couldn't get media files to work
So, I hacked in
$path = '';
if (preg_match("/^media:(.*)$/",$page,$match)) {
$path=file_directory_path().'/'.($match[1]);
}
// When wikitools is enabled, just create a wikitools link.
elseif
in the pearwiki_filter_page_path function
This isn't cleaver, and it's not funny, and dont try it at home... it's not how it should be done. But how SHOULD it be done?
Comments
Comment #1
markfoodyburton commentedNice easy answer.... Hope somebody else is as stupid as me and finds this helpful
Dont go hacking the module - simply go to the config page and put a
line in, like
Media | media | /files/%s
under the "interwiki" section
GEEZE thats nice !!!!!
Well done module writer :-)
BTW, did find a small issue in the Interwiki code - the regexp excludes ()'s, my URL's happen to have ()'s in them (dont ask) - anyway, patching the regexp has fixed it for me, but I am not sure that this is the right thing to do - looks to me like the regex should just simplified in that module....
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.