EXTENDED functions are rarely used, and therefore are not included in the normal widget package. To use them, link to widget_extended.js instead of widget_lib.js.

showFiles

This function is a wiki editor's tool like listLinks, opening a window that shows all files and also creates the links to insert into your WikiStyle code either as a normal link or as an image (if the file IS an image). Put it in your SideBar and you have easy access to a file directory for when you're editing. Note that it needs to be called from some clickable element, like a button or link, because some browsers have security set so that windows cannot be opened unless the user does something.

Here are two examples, in link form and in button form (you would put this code directly into your page, without <script> tags:

<a href="#" onclick="widget.showFiles();return false;">Show Files!</a>

<!--OR-->

<input type="button" value="Show Files!" onclick="widget.showFiles()" />

It may be useful to only show these links if someone is logged in (since the link codes are only useful to a wiki editor). See the example for listLinks for an idea of how to do that.


Page Information

  • 1 year ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts