diff options
author | intrigeri <intrigeri@boum.org> | 2010-08-22 11:05:03 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2010-08-22 11:05:03 +0200 |
commit | 474b6524e0fe4b4bb3402bf6551bf97be7f3ee1f (patch) | |
tree | f303c5391cb168793bdd8d08265d37900eb96330 /doc/todo/generic_insert_links | |
parent | 0055354e3cce1d1fb8ea2ac0d5c67a4c16a2b0b0 (diff) | |
parent | 20ecef4d024f751481645db3aa68d098e1251b19 (diff) |
Merge remote branch 'upstream/master' into prv/po
Diffstat (limited to 'doc/todo/generic_insert_links')
-rw-r--r-- | doc/todo/generic_insert_links | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/todo/generic_insert_links b/doc/todo/generic_insert_links new file mode 100644 index 000000000..050f32ee7 --- /dev/null +++ b/doc/todo/generic_insert_links @@ -0,0 +1,24 @@ +The attachment plugin's Insert Links button currently only knows +how to insert plain wikilinks and img directives (for images). + +[[wishlist]]: Generalize this, so a plugin can cause arbitrary text +to be inserted for a particular file. --[[Joey]] + +Design: + +Add an insertlinks hook. Each plugin using the hook would be called, +and passed the filename of the attachment. If it knows how to handle +the file type, it returns a the text that should be inserted on the page. +If not, it returns undef, and the next plugin is tried. + +This would mean writing plugins in order to handle links for +special kinds of attachments. To avoid that for simple stuff, +a fallback plugin could run last and look for a template +named like `templates/embed_$extension`, and insert a directive like: + + \[[!template id=embed_vp8 file=my_movie.vp8]] + +Then to handle a new file type, a user could just make a template +that expands to some relevant html. In the example above, +`templates/embed_vp8` could make a html5 video tag, possibly with some +flash fallback code even. |