[pmwiki-users] attachtable questions
eemeli at gmail.com
Wed Jun 25 16:59:42 CDT 2008
2008/6/23 adam overton <a at plus1plus1plus.org>:
> i have two attachtable questions:
> How would one go about changing the display of filesize from bytes to
> KB, or even to MB?
You'll need a function to turn the filesize in bytes to the string
that you want, and replace the string "number_format($stat['size'])"
in attachtable.php with a call to your function, eg.
"your_function($stat['size'])". One such function that I could quickly
find is at <http://php.net/manual/en/function.number-format.php#72969>.
Apologies for leaving this up to you to finish; I haven't had a need
to even look at the code for months now, and I've been rather busy
with other work.
> After renaming, deleting, etc, how can I prevent attachtable from
> redirecting to the confirmation on Group.Page?action=upload...? I'd
> rather it just go back to the page where I was uploading from (in
> this case, Group/Uploads)? In fact, I'd love to be able to have an
> options field like this:
> (:attachtable MyGroup.MyUploadPage
> Is there an easy solution to making this possible, and maybe even
> adding this as an option? - i took a look around and tried a few
> solutions, all of which led to errors...
I'm not quite sure what you're looking for here. My own sites use
Attachtable as a replacement for (:attachlist:) in
More information about the pmwiki-users