[pmwiki-users] About Upload form

Petko Yotov 5ko at 5ko.fr
Sat Jan 7 14:38:18 CST 2012


On Saturday 07 January 2012 13:38:54, V.Krishn wrote :
> I am trying to add some directives in Site/UploadQuickReference.
> Seems that if directive scripts sets $HTMLHeaderFmt[] from within a
> function it does not reflect on the page.
> Is this same issue as in http://www.pmwiki.org/wiki/PITS/01139 ?

Yes.

> Does core support an upload form to be in a wiki page, similar to
> Site/EditForm?

You can define your own $PageUploadFmt array which should contain the upload 
form and possibly the quick reference, for example:

  $PageUploadFmt = array(
    'wiki:Site.UploadForm',
    'wiki:$[{$SiteGroup}/UploadQuickReference]'
  );

but this will not allow you to modify the $HTMLHeaderFmt entries by some 
directives in these pages.

There is also a recipe http://www.pmwiki.org/wiki/Cookbook/UpForm .

> Any suggestions appreciated.

To set certain $HTMLHeaderFmt entries only when the wiki is called with 
?action=upload, you can use something like this in config.php:

  if($action == 'upload') {
    $HTMLHeaderFmt['some-key'] = 'My custom HTML header';
  }

Petko



More information about the pmwiki-users mailing list