Thanks again Petko. Your advice was perfect as usual. I've now got more or less what I wanted. https://classic-sf.com/Titles/DownloadStories
Regards Dave Cooke -----Original Message----- From: Petko Yotov <[email protected]> Sent: 27 November 2019 15:13 To: [email protected] Cc: 'PMWiki' <[email protected]> Subject: Re: [pmwiki-users] Attachlist configuration On 27/11/2019 16:01, Petko Yotov wrote: > There is currently no concise/succinct way to configure the output of > Attachlist, you need to override and redefine the whole markup > directive. This will redefine (:attachlist:) and will work for the pages where this markup is already present (like the default ?action=upload form). If you prefer, the same way you can define a new markup directive while also keeping the existing one. In that case, change the first and the third argument to the Markup() call: Markup('myattachlist', 'directives', '/\\(:myattachlist\\s*(.*?):\\)/i', "DavidMarkupFmtUploadList"); and in a wiki page use the other directive (:myattachlist:). See for example in the cookbook how FileList and Attachtable implement it. Petko > Something like this in config.php: > > Markup('attachlist', 'directives', > '/\\(:attachlist\\s*(.*?):\\)/i', > "DavidMarkupFmtUploadList"); > function DavidMarkupFmtUploadList($m) { > extract($GLOBALS["MarkupToHTML"]); # get $pagename > return Keep('<ul>'.DavidFmtUploadList($pagename,$m[1]).'</ul>'); > } > > function DavidFmtUploadList($pagename, $args) { > ## copy here the code from upload.php:FmtUploadList() > ## and adapt it for your needs. > > } > > Petko > > On 27/11/2019 15:28, [email protected] wrote: >> Is there any way to configure output from Attachlist. I am especially >> interested in supressing file details and would like to reconfigure >> in the possible using fmt= with pagelist. > > _______________________________________________ > pmwiki-users mailing list > [email protected] > http://www.pmichaud.com/mailman/listinfo/pmwiki-users This email has been scanned by BullGuard antivirus protection. For more info visit www.bullguard.com _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
