[pmwiki-users] Added EmbedBtn and AttachBtn to attachtable
a at plus1plus1plus.org
Wed Jun 23 01:42:42 CDT 2010
Hi there. i wonder if this following might of any use to anyone
currently using attachtable.php? i've modified Eemeli's recipe so
that in the far left column there are buttons that quickly post the
necessary attach/embed code for each file into the edit window. i've
been using a modified version of an earlier attachtable recipe with
buttons enabled for years without a hitch. i just updated to the
newest version of the recipe, and added and refined my modifications.
here's how to test it:
1. download the code (available for now at the bottom of the
Attachtable-Talk page - http://www.pmwiki.org/wiki/Cookbook/
2. substitute my version of cookbook/attachtable/attachtable.php for
the one normally used with the last distribution
3. add cookbook/attachtable/attachFileBtn03.php
4. in your pub/ directory, add the embedBtns folder (i have the
origial .ai files in case folks want to mess with the design of the
5. when adding or updating an attachtable (for instance on
Site.EditForm), simply add embedBtn=1 or attachBtn=1:
(:attachtable NAME embedBtn=1 ... :)
this will add a button next to each filename - the ones that can be
embedded in the page (via (:quicktime:), (:flash:), or as an image)
are assigned an "embed" button. all other files are given a "link"
button which simply posts the file using the "Attach:" markup.
(:attachtable NAME attachBtn=1 ... :)
this will add a button next to each filename - all files will be
posted using the simple "Attach:" markup, except for images, which
will be embedded in the page.
i can provide more in-depth info later. the buttons are using code by
PM from guiedit.php. i haven't done extensive testing on this newer
version, so there may be some bugs i've missed. if you think this
would be an interesting feature to add to the core of the recipe, i'd
be happy to write-up more extensive documentation that could be added
to the main page. otherwise, maybe i should just post it somewhere
else as an alternative version of the recipe?
thanks for the feedback.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pmwiki-users