This function is a wiki editor's tool, opening a window that lists all the links on a given page. Put this in your SideBar and you have easy access to a link scanner for your wiki. It categorizes links as wiki pages, non-existent wiki pages, and external links. Also, 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.listLinks();return false;">Show Links!</a> <!--OR--> <input type="button" value="Show Links!" onclick="widget.listLinks()" />
Currently, this only works if a user is logged-in, so use the following code (with <script> tags) so that the links only appear when you're logged-in:
<script>
if (widget.loggedIn())
document.write('<a href="#" onclick="widget.listLinks();return false;">Show Links!</a>');
/*OR*/
if (widget.loggedIn())
document.write('<input type="button" value="Show Links!" onclick="widget.listLinks()" />');
</script>
Page Information
|
Wiki Information |
Recent PBwiki Blog Posts |