[pmwiki-users] About (:attachlist:) display format
marc
gmane at auxbuss.com
Thu Jan 11 09:48:13 CST 2007
Angel Rodríguez said...
> Hi, is it possible to change the attachlist format?. I mean, how can I
> change the style?. I don?t want the date, neither the size being displayed.
> Thanks.
Not by default :-(
(:attachlist:) calls FmtUploadList() in upload.php. The format is
embedded right at the end of that function:
$out[] = "<li> <a href='$name'>$file</a>$overwrite ... ".
number_format($stat['size']) . " bytes ... " .
strftime($TimeFmt, $stat['mtime']) . "</li>";
So, for your requirements, you could replace this with:
$out[] = "<li> <a href='$name'>$file</a>$overwrite";
You can also remove '$overwrite' if it's not needed.
Another way to do it would be to replicate the (:attachlist:) markup
using a new name:
Markup('myattachlist', 'directives',
'/\\(:myattachlist\\s*(.*?):\\)/ei',
"Keep('<ul>'.MyFmtUploadList('$pagename',PSS('$1')).'</ul>')");
then copy FmtUploadList() as MyFmtUploadList(), and hack the output
format as above.
--
Cheers,
Marc
More information about the pmwiki-users
mailing list