For (:attachlist:) I have noticed that we can list only the files which have a specific extension. But there is nothing to list all files except those with a specific extension. If you want to do that it is very simple. In the script upload.php in the function FmtUploadList after

  if (@$opt['ext']) 
    $matchext = '/\\.(' 
      . implode('|', preg_split('/\\W+/', $opt['ext'], -1, PREG_SPLIT_NO_EMPTY))
      . ')$/i'; 

(line 294) add

  if (@$opt['exceptExt']) $matchexceptExt = '/\\.('
   . implode('|', preg_split('/\\W+/', $opt['exceptExt'], -1, PREG_SPLIT_NO_EMPTY))
   . ')$/i'; 

and after

if (@$matchext && !preg_match(@$matchext, $file)) continue;

(line 310) add

if (@$matchexceptExt && preg_match(@$matchexceptExt, $file)) continue;

You can now use it that way :

(:attachlist exceptExt=txt:)

N.B.: Make sure there is no file overwriting FmtUploadList (for example AttachListSort.php ) in the cookbook.


detect setting of page directives

Is it possible, say using Conditional Markup, to detect the setting of a page directive such as noleft, or noaction?, eg

(:if pagedirective noleft:)

This is a talk page for improving PmWiki.PageDirectives.