Version 7, changed by admin. 10/30/2006. Show version history
By ScottMcmullan at 10/27/2006 06:42PM Tags: plugin, email, tag, tags, backlinks
The JotSpot sidebar has evolved over time to include a handy set of navigational tools. As of 2.8 admin can turn these 6 sidebar features on/off using the Sidebar Configuration footer menu:
You can use JotSpot plugins to further customize your sidebar by inserting new content above or below the stock sidebar.
This post collects 6 popular plugins that you can use today to make your wiki more useful. Best of all, you can modify these or use them as templates to create your own plugins.
Here's the six:
If you're not familiar with JotSpot plugins, they're simply a way to globally "plug" content -- text and/or code -- into a wiki page. You can read up on how they work here and take a quick tutorial here.
The navigation plugin simply includes the contents of a page called SideBarContent at the top of your sidebar. It's useful for making global navigation links or other "permanent" content because it is not collapsible.
To create this plugin, follow these steps.
1) Create a new page called SideBarContent and enter your sidebar content.
2) Create a new plugin called Navigation Plugin (see: JotPluginQuickstart)
3) Check the Make this plugin active by default after installation check box at the very bottom of the new plugin page
4) Paste in the following plugin code into the Plugin Contents field
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:jot="http://www.foopee.com/ns/s3/srvtmpl/">
<jot:extension target="sidebarTop">
<div class="jot-miniWindow" id="navigation-plugin">
<h3>Our Navigation</h3>
<jot:include node="/WikiHome/SideBarContent" />
</div>
</jot:extension>
</html>
Note that the content of this plugin is designed to remain open and not collapse like other sidebar plugins. If you want to make it collapsible, modify it to follow the pattern used in this mini-window example.
The back links plugin displays a list of pages that link to the current page. It's a great way to find related pages and display the emergent structure of a wiki.
You can find the plugin code, which can be copied and pasted into your wiki, on the backlinks plugin download page.
The child pages plugin displays a list of pages that immediate children of the current page. This is another great way to help you nagivate the emergent structure of your wiki as it grows.
To create this plugin, follow these steps.
1) Create a new plugin called ChildPagesPlugin (see: JotPluginQuickstart)
2) Check the Make this plugin active by default after installation check box at the very bottom of the new plugin page
3) Paste in the following plugin code into the Plugin Contents field
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:jot="http://www.foopee.com/ns/s3/srvtmpl/">
<jot:extension target="sidebarBottom">
<div class="jot-miniWindow" id="childpages-plugin">
<h3 onclick="Expander.toggle('childpages-plugin')">Child Pages</h3>
<div class="jot-content">
<jot:search forChildren="${page/path}" set="kids" limit="25" />
<jot:loop over="kids">
<ul>
<li><a href="${it/name}">${it/name}</a></li>
</ul>
</jot:loop>
</div>
</div>
</jot:extension>
</html>
The email page change plugin puts a Subscribe link on every page and sends page update notifications to all subscribers via email. Users can subscribe and unsubscribe to the page by clicking the link below each page's title.
You can find the package zip file on the email page change plugin's download page. Download the package's zip file and then install it from the Manage Packages footer menu.
Tags are keywords that help identify and categorize pages. Tagging in JotSpot has been a community-driven project led by Phil Kast, and has been blogged about many times here on the JDC.
a) Related Pages Plugin
When you download and install the tagging package, you automatically install the Related Tags Plugin that has three features:
b) Related Tag Search Plugin
There's another very useful tagging plugin that you don't get when you download and install the tagging package: Related Tag Search. The Related Tag Search Plugin has three features:
Sidebar view:
Related tag cloud view:
To create this plugin, download and install the tagging package and then follow these additional steps.
1) Create a new plugin called RelatedTagSearchPlugin (see: JotPluginQuickstart)
2) Check the Make this plugin active by default after installation check box at the very bottom of the new plugin page
3) Paste in the following plugin code into the Plugin Contents field
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:jot="http://www.foopee.com/ns/s3/srvtmpl/">
<jot:extension target="sidebarBottom">
<style>
.sidebarBox {
padding: 7px;
border: 1px solid #8CACBB;
background-color: #EEE;
}
</style>
<!-- pull in tagging functions from the tag libraries -->
<jot:include node="wiki:/TagLib" />
<div class="jot-miniWindow" id="tagsearch-plugin">
<h3 onclick="Expander.toggle('tagsearch-plugin')">Tag Search</h3>
<div class="jot-content" style="padding: 7px">
<jot:if test="${util:isDefined(page/main/tags)}">
<jot:then>
<div style="margin-bottom: 7px;">
<a href="javascript:void()" onClick="swapState('relatedtags-editBox')"
style="font-size: smaller;">
Edit page's tags
</a>:<br />
</div>
<jot:loop over="${page/main/tags}">
<a href="wiki:/RelatedTagSearch?s=${it}">${it}</a>
</jot:loop>
</jot:then>
<jot:else>
None yet -- <a href="javascript:void()"
onClick="swapState('relatedtags-editBox')">
tag this page
</a>
</jot:else>
</jot:if>
<div id="relatedtags-editBox" style="display:none">
<br />
<form action="javascript:void()" onSubmit="saveTags(pageTags.value)">
<input type="text" name="pageTags"
value="${translate(page/main/tags, '[]', '')}" size="30" />
<br />
<br />
<input type="submit" value="Update tags" />
<a href="javascript:void()"
onClick="swapState('relatedtags-editBox')" style="font-size: smaller">
Cancel
</a>
</form>
</div>
<div id="related-tagPages" style="display:none; overflow:hidden">
<!-- Should only appear if loading related pages fails -->
Oops, something went wrong!
</div>
<br />
<br />Search Tags:<br />
<form name="tagSearch" method="get" action="wiki:/RelatedTagSearch">
<input name="s" value="${req/args/tag}" size="12" />
<input type="submit" value="Go" />
</form>
</div>
</div>
</jot:extension>
</html>
5) Create a new page called RelatedTagSearch. This will be the "search pivot" page.
6) Edit the new RelatedTagSearch page in XML mode and enter the following code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:jot="http://www.foopee.com/ns/s3/srvtmpl/">
<br />
<form name="tagSearch" method="get" action="wiki:/${page/name}">
<input name="s" value="${req/args/s}" />
<input type="submit" value="Go" />
</form>
Enter a SINGLE tag (e.g. <i>search</i>) to view a list of pages and cloud of related tags<br />
<jot:if test="${util:isDefined(req/args/s)}">
<jot:then>
<jot:include node="/TagLib" />
<jot:search forAll="1" filter="${util:listContains(it/main/tags, req/args/s)}"
collect="it/main/tags" set="relatedTags" />
<br />
<jot:script>
var relatedTagArray = relatedTags.getItems();
var searchCloud = new Tag.Cloud(relatedTagArray);
searchCloud.display({pivot: 'RelatedTagSearch', idPrefix: 'searchCloud',
dynamic: 'static', containerClass: 'tagCloud'});
</jot:script>
</jot:then>
</jot:if>
</html>
Back to WikiHome