[pmwiki-users] includefile help?
Dominique Faure
dominique.faure at gmail.com
Tue May 9 01:31:23 CDT 2006
On 5/9/06, Karin Armstrong <karindar at uvic.ca> wrote:
> Hi -- I was looking at the cookbook recipe for includefile
> http://www.pmwiki.org/wiki/Cookbook/IncludeFile
>
> I'm setting a wiki up for large scale file management, and I wanted
> to include old html pages by uploading them to the wiki.
>
> However, I can't get it to work. I added
> Markup('includefile', 'directives', '/\\(:includefile\\s+([-\\w.]+)\
> \s*:\\)/e',
> "Keep(implode('', file('/home/path/to/wiki/uploads/$1')))");
>
> to my config file, changing the url to the path to the uploads
> directory.
>
> And on the edit page, added
> (:includefile /home/path/to/wiki//uploads/Group/file.htm:)
>
> The view is of the include syntax, with no sign of the included file.
>
> Can anyone suggest what I'm doing wrong?
Since you already set a path prefix directly into the markup rule, you
don't have to give it again as a markup parameter.
Markup('includefile', 'directives', '/\\(:includefile\\s+([-\\w.]+)\\s*:\\)/e',
"Keep(implode('', file('/home/path/to/wiki/uploads/$1')))");
with: (:includefile Group/file.htm:)
or:
Markup('includefile', 'directives', '/\\(:includefile\\s+([-\\w.]+)\\s*:\\)/e',
"Keep(implode('', file('$1')))");
with: (:includefile /home/path/to/wiki//uploads/Group/file.htm:)
Regards,
Dom
More information about the pmwiki-users
mailing list