My Wiki is loading...
My Wiki -
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
<<importTiddlers>>
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])

<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]

----
Also see [[AdvancedOptions]]
<!--{{{-->
<div class='header' role='banner' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' role='navigation' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' role='navigation' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' role='complementary' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea' role='main'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected {color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:alpha(opacity=60);}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0; top:0;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0 3px 0 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0; padding-bottom:0;}

.fieldsetFix {border:0; padding:0; margin:1px 0px;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='toolbar' role='navigation' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
|''Type:''|file|
|''URL:''|http://jackparke.tiddlyspot.com/|
|''Workspace:''|(default)|

This tiddler was automatically created to record the details of this server
<<options>>
<<option chkSinglePageMode>> Display one tiddler at a time
/***
|''Name:''|ArchivePlugin|
|''Description:''|The archive plugin allows you to store tiddler text outside of the tiddlywiki file.|
|''Version:''|2.4.0|
|''Date:''|2 Jun 2008|
|''Source''|http://cawoodm.github.io/tiddlywiki.html#ArchivePlugin|
|''Author:''|[[Marc Cawood]]|
|''Type:''|Plugin|
!Description
The archive plugin allows you to store tiddler text outside of the tiddlywiki file.
Typically you would tag bulky tiddlers or those with infrequently needed content as "Archive" and these would
then be archived as separate html files in the sub folder called "archive".
!Usage
#Create a folder "archive" in the same folder as your tiddlywiki file.
#Install the Archive Plugin and reload your tiddlywiki
#Tag your bulky tiddlers with "Archive"
#Save your tiddlywiki file
#Don't tag your systemConfig tiddlers (e.g. Plugins) with Archive. It doesn't work.
!To Do
* Synchronize tiddler renames/deletions with file system
* Lazy loading of archived files via HTTP
!Code
***/
//{{{
version.extensions.ArchivePlugin = {major: 2, minor: 4, revision: 0, date: new Date("Jun 6, 2008")};
config.macros.ArchivePlugin = {};
config.macros.ArchivePlugin.init = function () {
 this.archivePath = getWikiPath('archive');
}

// Hijacking the built-in functions
TW21Saver.prototype.externalizeTiddler = function(store,tiddler)
{
	try {
		var extendedAttributes = "";
		var usePre = config.options.chkUsePreForStorage;
		store.forEachField(tiddler,
			function(tiddler,fieldName,value) {
				// don't store stuff from the temp namespace
				if(typeof value != "string")
					value = "";
				if (!fieldName.match(/^temp\./))
					extendedAttributes += ' %0="%1"'.format([fieldName,value.escapeLineBreaks().htmlEncode()]);
			},true);
		var created = tiddler.created.convertToYYYYMMDDHHMM();
		var modified = tiddler.modified.convertToYYYYMMDDHHMM();
		var vdate = version.date.convertToYYYYMMDDHHMM();
		var attributes = tiddler.modifier ? ' modifier="' + tiddler.modifier.htmlEncode() + '"' : "";
		attributes += (usePre && modified == created) ? "" : ' modified="' + modified +'"';
		attributes += (usePre && created == vdate) ? "" :' created="' + created + '"';
		var tags = tiddler.getTags();
		if(!usePre || tags)
			attributes += ' tags="' + tags.htmlEncode() + '"';
		return ('<div %0="%1"%2%3>%4</'+'div>').format([
				usePre ? "title" : "tiddler",
				tiddler.title.htmlEncode(),
				attributes,
				extendedAttributes,
				usePre ? "\n<pre>" + tiddler.saveMe() + "</pre>\n" : tiddler.escapeLineBreaks().htmlEncode()
			]);
	} catch (ex) {
		throw exceptionText(ex,config.messages.tiddlerSaveError.format([tiddler.title]));
	}
};

Tiddler.prototype.saveMe = function() {
 if (this.tags.indexOf('Archive') != -1) {
 // Save tiddler body to a file in the archive folder
 if (this.text) saveFile(config.macros.ArchivePlugin.archivePath + this.title.filenameEncode() + '.html', this.text)
 return '';
 }
 else
 return this.text.htmlEncode();
}

// This hijack ensures plugins can also be archived
var archivePlugin_getPluginInfo = getPluginInfo;
getPluginInfo = function(tiddler) {
alert(tiddler.title)
 tiddler.text = store.getValue(tiddler, 'text');
 return archivePlugin_getPluginInfo(tiddler);
}

TiddlyWiki.prototype.getValue = function(tiddler, fieldName) {
 var t = this.resolveTiddler(tiddler);
 if (!t)
 return undefined;

 fieldName = fieldName.toLowerCase();

 if (t.tags.indexOf('Archive')!=-1 && fieldName=='text' && t['text']=='') {
 try {
   var tmp = loadFile(config.macros.ArchivePlugin.archivePath + t.title.filenameEncode() + '.html');
   tmp = (tmp.charCodeAt(0) == 239 ? manualConvertUTF8ToUnicode(tmp) : tmp);
 } catch (e) {
   return ''; //alert("{{{Error: Unable to load file '" + config.macros.ArchivePlugin.archivePath + t.title.filenameEncode() + '.html' + "'}}}");
 }
return tmp;
 } else {
 var accessor = TiddlyWiki.standardFieldAccess[fieldName];
 if (accessor) {
 return accessor.get(t);
 }
 }
 
 return t.fields ? t.fields[fieldName] : undefined;
}

String.prototype.filenameEncode = function() {
 return(this.toLowerCase().replace(/[^a-z0-9_-]/g ,"_"));
}

function getWikiPath(folderName) {
 if (!document.location.protocol.match(/file/)) return '';
 var originalPath = document.location.toString();
 if(originalPath.substr(0,5) != 'file:') {
  alert(config.messages.notFileUrlError);
  if(store.tiddlerExists(config.messages.saveInstructions))
   story.displayTiddler(null,config.messages.saveInstructions);
  return;
 }
 var localPath = getLocalPath(originalPath);
 var backSlash = localPath.lastIndexOf('\\') == -1 ? '/' : '\\';
 var dirPathPos = localPath.lastIndexOf(backSlash);
 var subPath = localPath.substr(0,dirPathPos) + backSlash + (folderName ? folderName + backSlash : '');
 return subPath;
}
// Deleting archive files
TiddlyWiki.prototype.archivePlugin_removeTiddler = TiddlyWiki.prototype.removeTiddler;
TiddlyWiki.prototype.removeTiddler = function(title) {
 var tiddler = store.getTiddler(title);
 var filePath = config.macros.ArchivePlugin.archivePath + title.filenameEncode() + '.html';
 if (tiddler.tags.indexOf('Archive') != -1) ieDeleteFile(filePath);
 this.archivePlugin_removeTiddler(title);
}
function ieDeleteFile(filePath) {
// IE Support only
 if (!config.browser.isIE) return false;
	try {
		var fso = new ActiveXObject("Scripting.FileSystemObject");
	} catch(ex) {return null;}
	try {
	 var file = fso.GetFile(filePath);
	 file.Delete();
	} catch(ex) {return null;}
	return true;
}
//}}}
/***
|''Name:''|BreadCrumbsPlugin|
|''Version:''|2.2.1|
|''Date:''|Jul 5, 2007|
|''Author:''|AlanHecht|
|''Adapted By:''|[[Marc Cawood]]|
|''Type:''|Plugin|
!Description
This plugin creates an area at the top of the tiddler area that displays "breadcrumbs" of where you've been. This is especially useful for ~TWs using SinglePageMode by Eric Schulman.
!Usage
Just install the plugin and tag with systemConfig. Optionally position the following div in your PageTemplate to control the positioning of the breadcrumbs menu:
{{{
<div id='breadCrumbs'></div>
}}}
!Revision History
* Original by AlanHecht
* 2.0 Made 2.0.x compatible by [[Marc Cawood]]
* Made 2.0.10 compatible (onstart paramifier)
* Bugfix -> return false in onClickTiddlerLink()
* 2.2 Made 2.2.x compatible
!Code
***/

// // Use the following line to set the number of breadcrumbs to display before rotating them off the list.
//{{{
version.extensions.breadCrumbs = {major: 2, minor: 2, revision: 1, date: new Date("Jul 5, 2007")};
var crumbsToShow = 7;
var breadCrumbs = [];

onClickTiddlerLink_orig_breadCrumbs = onClickTiddlerLink;
onClickTiddlerLink = function(e){
 onClickTiddlerLink_orig_breadCrumbs(e);
 breadcrumbsAdd(e);
 return false;
}

restart_orig_breadCrumbs = restart;
function restart() {
 invokeParamifier(params,"onstart");
 var defaultParams = store.getTiddlerText("DefaultTiddlers").parseParams("open",null,false);
 invokeParamifier(defaultParams,"onstart");
 breadCrumbs = [];
 breadcrumbsRefresh();
 window.scrollTo(0,0);
 return false;
}

function breadcrumbsAdd(e) {
 var uniqueCrumb = true;
 var crumbIndex = 0;
 if (!e) var e = window.event;
 var target = resolveTarget(e);
 var thisCrumb="[["+resolveTarget(e).getAttribute("tiddlyLink")+"]]";
 var lastInactiveCrumb = breadCrumbs.length -(breadCrumbs.length < crumbsToShow ? breadCrumbs.length : crumbsToShow);
 for(t=lastInactiveCrumb; t<breadCrumbs.length; t++)
 if(breadCrumbs[t] == thisCrumb) {
 uniqueCrumb = false;
 crumbIndex = t+1;
 }
 if(uniqueCrumb)
 breadCrumbs.push(thisCrumb);
 else
 breadCrumbs = breadCrumbs.slice(0,crumbIndex);
 breadcrumbsRefresh(); 
}

function breadcrumbsRefresh() {
 
 if (!document.getElementById("breadCrumbs")) {
 // Create breadCrumbs div
 var ca = document.createElement("div");
 ca.id = "breadCrumbs";
 ca.style.visibility= "hidden";
 var targetArea = document.getElementById("tiddlerDisplay")||document.getElementById("storyDisplay");
 targetArea.parentNode.insertBefore(ca,targetArea);
 }

 var crumbArea = document.getElementById("breadCrumbs");
 crumbArea.style.visibility = "visible";
 removeChildren(crumbArea);
 createTiddlyButton(crumbArea,"Home",null,restart);
 crumbArea.appendChild(document.createTextNode(" > "));
 
 var crumbLine = "";
 var crumbCount = breadCrumbs.length;
 var firstCrumb = crumbCount -(crumbCount < crumbsToShow ? crumbCount : crumbsToShow);
 for(t=firstCrumb; t<crumbCount; t++) {
 if(t != firstCrumb)
 crumbLine += " > ";
 crumbLine += breadCrumbs[t];
 }
 wikify(crumbLine,crumbArea)
}


//}}}
Background: #fff
Foreground: #000
PrimaryPale: #EEE
PrimaryLight: #777
PrimaryMid: #111
PrimaryDark: #D0D
SecondaryPale: #EEF
SecondaryLight: #CCF
SecondaryMid: #69C
SecondaryDark: #36C
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #333
Error: #f88
<<tabs tabsClass
Layout "Layout Templates" SystemLayout
System "System Tiddlers" SystemTiddlers
Style "StyleSheets" StyleSheets
"Side Bar" "Side Bar Elements" SystemSideBars
Options "Personal Preferences" SystemOptions
Plugins "Installed Plugins" SystemPlugins
Shadows "Hidden System Pages" ShadowPages
>>
<<configOptions
chkHttpReadOnly=false
chkSinglePageMode=false
>>
See the ConfigOptionsMacro
/***
|''Name:''|ConfigOptionsMacro|
|''Description:''|Allows you to store Tiddlywiki options in a tiddler.|
|''Version:''|0.1|
|''Date:''|May 31, 2007|
|''Source''|http://cawoodm.github.io/tiddlywiki.html#ConfigOptionsMacro|
|''Author:''|[[Marc Cawood]]|
!Description
This plugin allows you to store TiddlyWiki options in a tiddler. This means the options are part of the store and are not shared among TiddlyWiki files. The options are also more robust and persist when cookies are loaded.
!Usage
*After installation, enter the options you want persisted into the [[ConfigOptions]] tiddler
*In view mode of this tiddler you can see and modify the options
*Changes are effective and written immediately to the ConfigOptions tiddler as you modify them
*The options are loaded from ConfigOptions on startup of TiddlyWiki overriding any cookie settings
!Revision History
* Original by [[Marc Cawood]] 31 May 2007

!Code
***/
//{{{
version.extensions.configOptions = {major: 0, minor: 0, revision: 1, date: new Date('May 31, 2007')};

config.shadowTiddlers.ConfigOptions = '<<configOptions\nchkAutoSave=false\ntxtUserName=Your Name\n>>'

config.macros.configOptions = {};
config.macros.configOptions.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var resultText = this.parseOptions(paramString);
 if (resultText) {
  resultText = '|!Option|!Value|\n' + resultText;
  wikify(resultText, place)
  //createTiddlyButton(place,'Update','Saves your current options to the ConfigOptions tiddler.',this.update);
  applyHtmlMacros(place,tiddler)
 }
}

config.macros.configOptions.init = function() {
 var txtConfigOptions = store.getValue('ConfigOptions', 'text') || config.shadowTiddlers.ConfigOptions; 
 txtConfigOptions = txtConfigOptions.substr(txtConfigOptions.indexOf('\n')).substr(0, txtConfigOptions.length-2);
 this.parseOptions(txtConfigOptions);
}
config.macros.configOptions.parseOptions = function (paramString) {
 var resultText = ''
 var options = paramString.split(/\n/);
 for(var i=0; i < options.length; i++) {
  var opt = options[i].split('=');
  if(opt.length > 1) {
   if (opt[1] != 'true' && opt[1] != 'false' && !opt[1].match(/^\d+$/))
    opt[1] = '\'' + opt[1].replace(/'/, '\\\'') + '\'';
    resultText += '|' + opt[0].replace(/^[a-z]{2,3}/,'') + '|<<option ' + opt[0] + '>>|\n'
   try {
    eval('config.options.' + opt[0] + ' = ' + opt[1] + ';');
    //alert('config.options.' + opt[0] + ' = ' + opt[1] + ';')
   } catch (e) {
    debugger
   }
  }
 }
 return resultText;
}
config.macros.option.propagateOption = function(opt,valueField,value,elementType)
{
	config.options[opt] = value;
//	saveOptionCookie(opt);
	//if (opt=='txtUserName') debugger;
	if ((new RegExp('\n' + opt + '=','g')).test(store.getValue('ConfigOptions','text'))) {
	 config.macros.configOptions.updateOption(opt, decodeCookie(config.optionHandlers[opt.substr(0,3)].get(opt)))
	}
	
	var nodes = document.getElementsByTagName(elementType);
	for(var t=0; t<nodes.length; t++) {
		var optNode = nodes[t].getAttribute("option");
		if(opt == optNode)
			nodes[t][valueField] = value;
		}

}
config.macros.configOptions.updateOption = function(name, value) {
 var txtConfigOptions = store.getValue('ConfigOptions', 'text'); 
 var t1 = txtConfigOptions.indexOf('\n' + name + '=');
 var t2 = txtConfigOptions.indexOf('\n', t1+1);
 txtConfigOptions = txtConfigOptions.substr(0,t1) + '\n' + name + '=' + value + txtConfigOptions.substr(t2)
 store.setValue('ConfigOptions', 'text', txtConfigOptions)
}
//}}}
<<tiddlerList tags:"Data" itemTemplate:"* %link (<<slicer tiddler:%title field:version$)))\n">>
[[Plugins]]
/***
|''Name:''|Definition Macro|
|''Description:''|Define glossary terms for use in tool tips.|
|''Version:''|0.1|
|''Date:''|May 24 2006|
|''Source''|http://cawoodm.github.io/tiddlywiki.html#DefinitionMacro|
|''Author:''|[[Marc Cawood]]|
|''Type:''|Macro|
!Description
Allow definitions of glossary terms to be easily visible via mouseover
!Usage
{{{<<def MyTermTiddler>>}}}
!Examples
{{{Do you know what <<def EDM>> is?}}}
Do you know what <<def EDM>> is?

!Revision History
* Original by [[Marc Cawood]] 24 May 2006
!Code
***/
//{{{
version.extensions.def = {major: 0, minor: 1, revision: 0, date: new Date("May 24, 2006")};

config.macros.def = {};
config.macros.def.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var text = store.getTiddlerText(params[0]);
 var wrapper = createTiddlyButton(place,params[0],text?"":"No definition available.",onClickTiddlerLink,"definition")
 var e = createTiddlyElement(wrapper,"span",null,null,text)
 wrapper.setAttribute("tiddlyLink", params[0])
}
config.macros.def.editMe = function(e) {
 var title = this.getAttribute("tiddlyLink");
 clearMessage();
 story.displayTiddler(null,title,DEFAULT_VIEW_TEMPLATE);
 story.focusTiddler(title,"text");
}
setStylesheet("a.definition {position:relative; z-index:24;} a.definition:hover {z-index:25;} a.definition span{display:none;} a.definition:hover span{display:block; position:absolute; top:2em; left:2em; width:15em; border:1px solid #ffd; background-color:#ffd; color:#000; text-align: center}");

//}}}
/***
|''Name:''|DeliciousTaggingPlugin|
|''Description:''|Allows easy 'del.icio.us'-like tagging by showing all tags as a list of link-buttons.|
|''Version:''|0.1|
|''Date:''|Jun 11, 2007|
|''Source''|http://cawoodm.github.io/tiddlywiki.html#DeliciousTaggingPlugin|
|''Author:''|[[Marc Cawood]]|
!Description
Allows easy 'del.icio.us'-like tagging in the EditTemplate by showing all tags as a list of link-buttons.
!Usage
Replace your the editorFooter div in your [[EditTemplate]] with the following:
{{{
<div class='editorFooter' macro='deliciousTagging'></div>
}}}
!Code
***/
//{{{
version.extensions.deliciousTagging = {major: 0, minor: 1, revision: 0, date: new Date("June 11, 2007")};

config.macros.deliciousTagging= {};

config.macros.deliciousTagging.onTagClick = function(e)
{
 if(!e) var e = window.event;
 var tag = this.getAttribute("tag");
 var title = this.getAttribute("tiddler");
 if(!readOnly)
  story.setTiddlerTag(title,tag,0);
 return false;
};

config.macros.deliciousTagging.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 if(tiddler instanceof Tiddler) {
  var title = tiddler.title;
  if(!e) var e = window.event;
  var tags = store.getTags();
  var lingo = config.views.editor.tagChooser;
  for(var t=0; t<tags.length; t++) {
   var theTag = createTiddlyButton(place,tags[t][0],lingo.tagTooltip.format([tags[t][0]]),config.macros.deliciousTagging.onTagClick);
   theTag.setAttribute("tag",tags[t][0]);
   theTag.setAttribute("tiddler",tiddler.title);
   place.appendChild(document.createTextNode(" "));
  }
 }
};
//}}}
/***
|''Name:''|DoBackupMacro|
|''Description:''|Creates a button which allows you to backup your wiki on demand.|
|''Version:''|2.0|
|''Date:''|Apr 9, 2006|
|''Author:''|[[Marc Cawood]]|
|''Type:''|Macro|
!Description
Creates a button which allows you to backup your TiddlyWiki on demand.
!Usage
Add the following command to your SideBarOptions tiddler:
{{{<<doBackup>>}}}
!Revision History
* Original by [[Marc Cawood]] 9-Apr-2006
!To Do
* List non-explicit links (e.g. from tagging macro)

!Code
***/
//{{{
version.extensions.doBackup= {major: 2, minor: 0, revision: 0, date: new Date("Apr 9, 2006")};
config.macros.doBackup={label: "backup", prompt: "Backup this TiddlyWiki"}
config.macros.doBackup.handler = function(place)
{
 if(!readOnly)
 createTiddlyButton(place,this.label,this.prompt,function ()
{doBackup(); return false;},null,null,this.accessKey);
}

doBackup = function() {
 var optSaveBackups = config.options.chkSaveBackups
 config.options.chkSaveBackups = true
 saveChanges()
 config.options.chkSaveBackups = optSaveBackups
}

//}}}

<div class='toolbar' macro='toolbar +saveTiddler saveClose -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div>
<div class='editorFooter' macro='deliciousTagging'></div>
<<tiddlerList tags:"Favorite">>
/***
My favorite hacks!
!!Fix javascript; issue
Fix new window issue with javascript:;
***/
//{{{
var hacks = {};
hacks.createTiddlyButton = createTiddlyButton;
createTiddlyButton = function() {
  btn = hacks.createTiddlyButton.apply(this,arguments);
  btn.removeAttribute('href');
  btn.style.cursor = "pointer";
  //btn.setAttribute('href', '#');
  return btn;
}
//}}}
/***
!!Message Area
Close message automatically after 3 seconds
***/
//{{{
hacks.displayMessage = displayMessage;
displayMessage = function() {
  hacks.displayMessage.apply(this, arguments);
  window.setTimeout(clearMessage, 3000);
}
//}}}
/***
!!Fix CORS Issue
Ensure HTTP (XHR) Requests work for local tiddlywikis (file:// protocol):
***/
//{{{
jQuery.support.cors = true;
//}}}

/***
!!Horizontal Tags
Make the list of tags horizontal
***/
//{{{
config.macros.tags.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 if(params[0] && store.tiddlerExists(params[0]))
 tiddler = store.getTiddler(params[0]);
 for(var t=0; t<tiddler.tags.length;t++)
 createTagButton(createTiddlyElement(place,"span"),tiddler.tags[t],tiddler.title);
}
//}}}

/***
!!Simple Tag Display
// // This makes the tagging macro present a simple list without title
***/
//{{{
config.macros.tagging.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var theList = createTiddlyElement(place,"ul");
 var title = "";
 if(tiddler instanceof Tiddler)
 title = tiddler.title;
 if(params[0])
 title = params[0];
 var tagged = store.getTaggedTiddlers(title);
 for(var t=0; t<tagged.length; t++)
 createTiddlyLink(createTiddlyElement(theList,"li"),tagged[t].title,true);
 return false;
}
//}}}

/***
!!Close on Cancel New Tiddler
When you click new tiddler then click cancel the new tiddler is automatically closed.
***/
//{{{
hacks.cancelTiddler = config.commands.cancelTiddler.handler;
config.commands.cancelTiddler.handler = function(event,src,title)
{
  var ret = hacks.cancelTiddler.apply(this,arguments);
  if (!store.tiddlerExists(title) || store.fetchTiddler(title).modifier == config.views.wikified.defaultModifier) {
    story.closeTiddler(title,false);
    store.removeTiddler(title)
  } else {
    story.displayTiddler(null,title);
  }
  return ret;
}
//}}}

/***
!!!Other
***/
//{{{
// Hide backstage open text
config.messages.backstage.open.text='';
config.messages.backstage.close.text='';
config.messages.backstage.prompt='';
//}}}
<<tiddlerList tags:"-Config,-systemConfig,-Template,-systemServer" group:'tiddler.title.toUpperCase().substr(0,1)' groupTemplate:"<<section %group\n" groupFooterTemplate:"$))\n">>
|[[Plugins]]|

[[MainMenu]]
[[Hacks]]
[[StyleSheet]]
[[Config]]
[[To Do]]
cawoodm [at] gmail
<style type="text/css">#contentWrapper {display:none;}</style>
<div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 20px; background-color:#eee;">
<b>My Wiki</b> is loading...
</div>
/***
|''Name:''|~MyMacroMacro|
|''Description:''|Allows you to define named shortcuts to your own macros with parameters.|
|''Version:''|0.1.1|
|''Date:''|Apr 22, 2006|
|''Author:''|[[Marc Cawood]]|
|''Type:''|Macro|
!Description
Allows you to define named shortcuts to your own macros with parameters and simplifies calling them. The {{{<<defineMyMacro>>}}} statements should go in your MainMenu or some other tiddler which displayed at startup.
!Usage
{{{<<defineMyMacro shortName realMacroName realMacroParameters...>>}}}
{{{<<myMacro shortName>>}}}
!Example
{{{<<defineMyMacro csvPlugins tiddlerList tags:"Plugin,-Template" format:csv>>}}}
{{{<<myMacro csvPlugins>>}}}
<<defineMyMacro csvPlugins tiddlerList tags:"Plugin,-Template" format:csv>><<myMacro csvPlugins>>
{{{<<myMacro csvPlugins order:"-title">>}}}
<<myMacro csvPlugins order:"-title">>
!Code
***/
//{{{
version.extensions.myMacro = {major: 0, minor: 1, revision: 1, date: new Date("Apr 22, 2006")};

config.macros.defineMyMacro={macroList:{}}
config.macros.defineMyMacro.handler=function(place,macroName,params,wikifier,paramString,tiddler) {
 this.macroList[params[0]] = paramString.substr(params[0].length+1)
}

config.macros.myMacro={}
config.macros.myMacro.handler=function(place,macroName,params,wikifier,paramString,tiddler) {
 wikify("<<" + config.macros.defineMyMacro.macroList[params[0]] + paramString.substr(params[0].length) + ">>", place)
 applyHtmlMacros(place,tiddler)
}
//}}}
<<defineMyMacro niceList tiddlerList header:"|>|!Plugin|\n|bgcolor(#ddf):''Title''|bgcolor(#ddf):''Version''|" itemTemplate:"|%link|%custom|\n" format:"table" group:"tiddler.modified.formatString('DDD, DD MMM YYYY')" groupTemplate:"|>|bgcolor(#eef):%group |\n" order:"-modified" customParameter:"tiddler.text.match(/\|[^|]*Version[^|]*\|(.*)\|/)[1]">>
<<defineMyMacro docDate tiddlerList header:{{(new Date(document.lastModified)).formatString('DDD, DD MMM YYYY')}} top:0>>
<<tiddlerList top:20 order:"-modified">>
version:1.0
<<option chkSinglePageMode>> Single Page Mode
<<option chkAutoSave>> AutoSave
See AdvancedOptions and ConfigOptions
<!--{{{-->
<div class='header' role='banner'>
 <div class='headerShadow'>
  <span class='searchBar' macro='search'></span>
  <img src=icon.png width=32>
  <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
  <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
 </div></div>
<div id='mainMenu' role='navigation' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' role='navigation' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' role='complementary' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea' role='main'>
<div id='messageArea'></div>
<div id='breadCrumbs'></div>
<div id='tiddlersBar' refresh='content' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
/***
|''Name:''||
|''Description:''||
|''Version:''|x.x.x|
|''Source''|http://cawoodm.github.io/tiddlywiki.html#XXX|
|''Author:''|[[Marc Cawood]]|
|''Type:''|xxx|
!Description
xxxxxxxxxxxxxxxxxx
!Usage
{{{<<xxx>>}}}
!Revision History
* Original by [[Marc Cawood]] xxxx
!To Do
* xxxx

!Code
***/
//{{{
version.extensions.xxx = {major: 2, minor: 0, revision: 0, date: new Date("Mar 2, 2006")};

config.macros.xxx = {};
config.macros.xxx.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 //xxx
}
//}}}
<<tiddlerList tags:"Plugin,-Template" header:"|!Plugin|!Description|!Version|!Date|" itemTemplate:"|%link|<<slicer tiddler:%title field:Description$))|<<slicer tiddler:%title field:Version$))|<<slicer tiddler:%title field:Date$))|\n">>

Table generated by the TiddlerListMacro using:
{{{<<tiddlerList tags:"Plugin,-Template" header:"|!Plugin|!Description|!Version|!Date|" itemTemplate:"|%link|<<slicer tiddler:%title field:Description$))|<<slicer tiddler:%title field:Version$))|<<slicer tiddler:%title field:Date$))|\n">>}}}

<<tiddlerList tags:"systemConfig,-Plugin,-Template" header:"|!Plugin|!Description|!Version|!Date|" itemTemplate:"|%link|<<slicer tiddler:%title field:Description$))|<<slicer tiddler:%title field:Version$))|<<slicer tiddler:%title field:Date$))|\n">>
/***
|''Name:''|PluralAliasPlugin|
|''Description:''|This plugin ensures links to tiddlers in plural or singular form.|
|''Version:''|2.1|
|''Date:''|May 29, 2007|
|''Author:''|Marc Cawood|
|''Type:''|Plugin|
!Description
This plugin ensures links to tiddlers in plural or singular form without the need to create duplicate tiddlers or resort to pretty linking. Example: "I love [[SiameseCat]] and even had a beautiful [[SiameseCat]] once."
!Usage
Just install the plugin and tag with systemConfig.
!Revision History
* Original by [[Marc Cawood]] on 2-Mar-2006
* Support createTiddler() function for aliased permalinks
* Support for reverseLookups (referrers functionality, thanks to Mike Fuellbrandt)
!Code
***/
//{{{
version.extensions.pluralAlias = {major: 2, minor: 1,
revision: 0, date: new Date("May 29, 2007")};

pluralAlias_createTiddlyLink = createTiddlyLink;
createTiddlyLink = function(place,title,includeText,theClass,isStatic) {
 title = pluralAlias_getTitle(title);
 return pluralAlias_createTiddlyLink(place,title,includeText,theClass,isStatic);
}
Story.prototype.pluralAlias_createTiddler= Story.prototype.createTiddler;
Story.prototype.createTiddler = function(place,before,title,template) {
 title = pluralAlias_getTitle(title);
 return this.pluralAlias_createTiddler(place,before,title,template);
}
function pluralAlias_getTitle(title) {
 if (!store.tiddlerExists(title)) {
 var aliasTitle = title.match(/s$/)?title.substr(0, title.length-1):title+"s";
 if (store.tiddlerExists(aliasTitle)) title = aliasTitle;
 }
 return title;
}
TiddlyWiki.prototype.reverseLookup = function(lookupField,lookupValue,lookupMatch,sortField)
{
 var results = [];
 this.forEachTiddler(function(title,tiddler) {
 var f = !lookupMatch;
 for(var lookup=0; lookup<tiddler[lookupField].length; lookup++)
 if(tiddler[lookupField][lookup] == lookupValue || pluralAlias_getTitle(tiddler[lookupField][lookup]) == lookupValue)
 f = lookupMatch;
 if(f)
 results.push(tiddler);
 });
 if(!sortField)
 sortField = "title";
 results.sort(function(a,b) {return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);});
 return results;
}
//}}}
/***
|''Name:''|Publish Macro|
|''Description:''|Export selected tiddlers as .html files.|
|''Version:''|2.4.1|
|''Date:''|Jul 2, 2008|
|''Source''|http://cawoodm.github.io/tiddlywiki.html#PublishMacro|
|''Author:''|[[Marc Cawood]]|
|''Type:''|Macro|
!Description
<<doPublish>> tiddlers tagged with these tags <<option txtPublishTags>> (comma seperated) as HTML pages to the subfolder 'publish' (you must create this). Use the [[PublishTemplateHead]] and [[PublishTemplateBody]] templates to style your pages and the [[PublishIndexTemplate]] to define an index page. For publishing individual tiddlers the [[PublishTemplateBodySingle]] template is used.
!Usage
To publish all tagged tiddlers:
{{{<<doPublish>>}}} <<doPublish>>
To publish a single tiddler, use the {{{<<publishTiddler>>}}} macro or add the "publishTiddler" command to your ViewTemplate
!Template placeholders
|!Placeholder|!Meaning|
|%0|Your SiteTitle "<<tiddler SiteTitle>>"|
|%1|The current tiddler title|
|%2|The rendered tiddler HTML|
|%3|CSV list of tags|
|%4|Tiddler modifier|
|%5|Tiddler modified date|
|%6|Tiddler creation date|
|%7|Tiddler wiki text|
!Revision History
* Original by [[Marc Cawood]] 24 May 2006
* Updated 2 Jan 2007
* Refactored 4 Jan 2007
* Small improvements
* Publish single tiddlers
* Template placeholder %7 for tiddler's wiki text

!Code
***/
//{{{
version.extensions.doPublish = {
 major: 2,
 minor: 4,
 revision: 1,
 date: new Date("July 2, 2008")
};
config.macros.doPublish = {
 label: "publish",
 prompt: "Publish Tiddlers as HTML files"
};
if (config.options.txtPublishTags == undefined) config.options.txtPublishTags = "Publish";
config.shadowTiddlers.PublishTemplateHead = '<title>%0 - %1</title>\n<link rel="stylesheet" type="text/css" href="style.css"/>\n<meta name="keywords" content="%3"/>'
config.shadowTiddlers.PublishTemplateBody = '<div class=\'viewer\' id=\'contentWrapper\'><small><a href=\"./publish/index.html\">Home</a> > %1</small><h1>%0</h1>\n<h2>%1</h2>\n%2\n<hr>Tags: %3\n<hr>%4, %5&nbsp;(created %6)\n</div>\n'
config.shadowTiddlers.PublishTemplateBodySingle = '<h1>%0</h1>\n<h2>%1</h2>\n%2\n<hr>Tags: %3\n<hr>%4, %5&nbsp;(created %6)\n</div>\n'
config.shadowTiddlers.PublishIndexTemplate = '<div class=\'viewer\' id=\'contentWrapper\'><small><a href="./publish/index.html">Home</a> > %1</small><h1>%0</h1><h2>%1</h2>\n<ul>%2\n</ul>\n<small>Published: %6</small>\n</div>\n';
config.macros.doPublish.handler = function(place)
 {
 if (!readOnly)
 createTiddlyButton(place, this.label, this.prompt, 
 function() {
  doPublish();
  return false;
 },
 null, null, this.accessKey);

}
config.macros.publishTiddler = {
 label : 'publish',
 prompt : 'Publish this tiddler as an HTML file.',
 handler : function(place,macroName,params,wikifier,paramString,tiddler)
 {
  var btn = createTiddlyButton(place, this.label, this.prompt, 
  function(e) {
   if(!e) var e = window.event;
   publishTiddler(this.getAttribute('tiddler'))
   return false;
  },
  null, null, this.accessKey);
  btn.setAttribute('tiddler', tiddler.title);
}}
config.commands.publishTiddler = {handler : function(event,src,title) {publishTiddler(title);},text: "publish", tooltip: "Publish this tiddler as HTML"};
function publishTiddler(title) {
 //debugger
 
 var PublishFolder = getWikiPath('publish');
 if (!PublishFolder) return;
 var place = document.getElementById(story.container)
 var HTMLTemplateHead = store.getTiddlerText("PublishTemplateHead");
 var HTMLTemplateBody = store.getTiddlerText("PublishTemplateBodySingle") || store.getTiddlerText("PublishTemplateBody");
 HTMLTemplateBody = renderTemplate(HTMLTemplateBody)
 HTMLTemplateBody = wiki2Web(HTMLTemplateBody);
 
 var tiddler = store.getTiddler(title);
 var tiddlerText = store.getValue(tiddler, 'text');
 var tiddlerHTML = wikifyStatic(tiddlerText);
 var HTML = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + HTMLTemplateBody + '\n</body>\n</html>';
 HTML = HTML.format([
  wikifyPlain("SiteTitle").htmlEncode(), 
  tiddler.title.htmlEncode(), 
  wiki2Web(tiddlerHTML), 
  tiddler.tags.join(", "), 
  tiddler.modifier, 
  tiddler.modified.toLocaleString(), 
  tiddler.created.toLocaleString(),
  tiddlerText
 ]);
 saveFile(PublishFolder + tiddler.title.filenameEncode() + ".html", HTML);
 //story.closeTiddler(tiddler.title);
 var indexWin = window.open((PublishFolder + title.filenameEncode() + ".html").replace(/\\/g, "/"), null);
 indexWin.focus();
}
function doPublish() {
 var savedTiddlers = [];
 var tiddlers = store.getTiddlers("title");
 var place = document.getElementById(story.container)
 var HTMLTemplateHead = store.getTiddlerText("PublishTemplateHead");
 var HTMLTemplateBody = store.getTiddlerText("PublishTemplateBody");
 HTMLTemplateBody = renderTemplate(HTMLTemplateBody)
 HTMLTemplateBody = wiki2Web(HTMLTemplateBody);

 var PublishTags = config.options.txtPublishTags || "publish";
 PublishTags = PublishTags.split(",")
 var PublishFolder = getWikiPath('publish');
 if (!PublishFolder) return;
 var indexFile = "";

 var indexFileTemplate = store.getTiddlerText("PublishIndexTemplate");
 // This does not allow <<myMacro>> but wants <div macro="myMacro">
 indexFileTemplate = renderTemplate(indexFileTemplate)
 // This option allows WIKI-syntax but is limited in it's HTML capabilities
 //indexFileTemplate = wikifyStatic(indexFileTemplate)

 for (var t = 0; t < tiddlers.length; t++) {
  var tiddler = tiddlers[t];
  if (tiddler.tags.containsAny(PublishTags)) {
   var tiddlerText = store.getValue(tiddler, 'text');
   var tiddlerHTML = wikifyStatic(tiddlerText);
   var HTML = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + HTMLTemplateBody + '\n</body>\n</html>';
   HTML = HTML.format([
   wikifyPlain("SiteTitle").htmlEncode(), 
   tiddler.title.htmlEncode(), 
   wiki2Web(tiddlerHTML), 
   tiddler.tags.join(", "), 
   tiddler.modifier, 
   tiddler.modified.toLocaleString(), 
   tiddler.created.toLocaleString(),
  tiddlerText
   ]);
   //saveFile(PublishFolder + tiddler.created.formatString("YYYY0MM0DD") + ".html", HTML);
   saveFile(PublishFolder + tiddler.title.filenameEncode() + ".html", HTML);
   indexFile += "<li><a href=\"" + tiddler.title.filenameEncode() + ".html" + "\" class=\"tiddlyLink tiddlyLinkExisting\">" + tiddler.title + "</a></li>\n";
   story.closeTiddler(tiddler.title);

  }

 }
 indexFileTemplate = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + indexFileTemplate + '\n</body>\n</html>';
 indexFileTemplate = indexFileTemplate.format([wikifyPlain("SiteTitle").htmlEncode(), wikifyPlain("SiteSubtitle").htmlEncode(), "%2", "", "", "", (new Date()).toLocaleString()])

 indexFile = indexFileTemplate.replace("%2", indexFile)
 indexFile = wiki2Web(indexFile);
 saveFile(PublishFolder + "index.html", indexFile)
 saveFile(PublishFolder + "style.css", store.getTiddlerText("StyleSheet") + store.getTiddlerText("StyleSheetLayout") + store.getTiddlerText("StyleSheetColors"))
 var indexWin = window.open("file://" + PublishFolder.replace(/\\/g, "/") + "index.html", null);
 indexWin.focus();

}

function renderTemplate(html) {
 var result = document.createElement("div");
 result.innerHTML = html;
 applyHtmlMacros(result, null);
 var temp = result.innerHTML;
 //result.parentNode.removeChild(result);
 return temp;

}

// Convert wikified text to html
function wiki2Web(wikiHTML) {
 //var regexpLinks = new RegExp("<a tiddlylink=.*?</a>", "img");
 var regexpLinks = /<a[^>]+tiddlylink\s*=\s*["']?\s*?([^ "'>]*)\s*["']?[^>]*>[^<]+<\/a>/img;
 var result = wikiHTML.match(regexpLinks);
 if (result) {
  for (i = 0; i < result.length; i++) {
   var className = result[i].match(/ class="(.*?)"/i) ? result[i].match(/ class="(.*?)"/i)[1] : "";
   var tiddlerName = result[i].match(/ tiddlylink="(.*?)"/i)[1]; 
   var url = tiddlerName.htmlDecode().filenameEncode() + ".html"; 
   var tiddlerLabel = result[i].match(/">(.*?)<\/a>/i)[1]; 
   if (!className.match(/tiddlyLinkNonExisting/i)) 
   wikiHTML = wikiHTML.myReplace(result[i], "<a class=\"" + className + "\" href=\"" + url + "\">" + tiddlerLabel + "</a>"); 
   else
   wikiHTML = wikiHTML.myReplace(result[i], "<a class=\"" + className + "\" title=\"Page does not exist\" href=\"#\">" + tiddlerName + "</a>");

  }
  wikiHTML = wikiHTML.replace(/ href="http:\/\//gi, " target=\"_blank\" href=\"http://");

 }
 return wikiHTML

}
function getWikiPath(folderName) {
 if (!document.location.protocol.match(/file/)) return '';
 var originalPath = document.location.toString();
 if (originalPath.substr(0, 5) != 'file:') {
  alert(config.messages.notFileUrlError);
  if (store.tiddlerExists(config.messages.saveInstructions))
  story.displayTiddler(null, config.messages.saveInstructions);
  return;

 }
 var localPath = getLocalPath(originalPath);
 var backSlash = localPath.lastIndexOf('\\') == -1 ? '/': '\\';
 var dirPathPos = localPath.lastIndexOf(backSlash);
 var subPath = localPath.substr(0, dirPathPos) + backSlash + (folderName ? folderName + backSlash: '');
 return subPath;

}

// Replace without regex
String.prototype.myReplace = function(sea, rep) {
 var t1 = this.indexOf(sea);
 var t2 = parseInt(this.indexOf(sea)) + parseInt(sea.length);
 var t3 = this.length;
 return this.substring(0, t1) + rep + this.substring(t2, t3)

}
// Convert illegal characters to underscores
String.prototype.filenameEncode = function()
 {
 return (this.toLowerCase().replace(/[^a-z0-9_-]/g, "_"));

}
//}}}
<div class='viewer' id='contentWrapper'><small><a href="./publish/index.html">Home</a> > %1</small><h1>%0</h1>
<h2>%1</h2>
%2
<pre>%7</pre>
<hr>Tags: %3
<hr>%4, %5&nbsp;(created %6)
</div>
<h1>%0</h1>
<h2>%1</h2>
%2
<hr>Tags: %3
<hr>
<h3>Tiddler WIKI Text</h3>
<pre>
%7
</pre>
<hr>%4, %5&nbsp;(created %6)
</div>
/***
|''Name:''|ReferrersMacro|
|''Description:''|Display a list of tiddlers linking to the current tiddler.|
|''Version:''|2.0|
|''Date:''|Mar 2, 2006|
|''Author:''|[[Marc Cawood]]|
|''Type:''|Macro|
!Description
Display a list of tiddlers linking to this plugin.
!Usage
{{{<<referrers>>}}}
!Revision History
* Original by [[Marc Cawood]] 2-Mar-2006
!To Do
* List non-explicit links (e.g. from tagging macro)
!Code
***/
//{{{
version.extensions.referrers = {major: 2, minor: 0, revision: 0, date: new Date("Mar 2, 2006")};

config.macros.referrers = {};
config.macros.referrers.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 var tiddlers = store.getReferringTiddlers(tiddler.title);
 var theList = createTiddlyElement(place,"ul");
 for(var t=0; t<tiddlers.length; t++)
 if (!params[0] || tiddlers[t].tags.contains(params[0]))
 createTiddlyLink(createTiddlyElement(theList,"li"),tiddlers[t].title,true);
}
//}}}
Connection1: DRIVER={SQL Server};SERVER=(local);DATABASE=Northwind;
pubs: DRIVER={SQL Server};SERVER=(local);DATABASE=pubs;
{{{<<SQLQuery sql:"SELECT TOP 10 ProductID, ProductName FROM Products">>}}}
<<SQLQuery sql:"SELECT TOP 10 ProductID, ProductName FROM Products">>

{{{<<SQLQuery sql:"SELECT TOP 10 au_id, au_lname, au_fname FROM Authors" connection:pubs>>}}}
<<SQLQuery sql:"SELECT TOP 10 au_id, au_lname, au_fname FROM Authors" connection:pubs>>
/***
|''Name:''|SQLQueryPlugin|
|''Description:''|Query a SQL database and display results in a tiddler.|
|''Version:''|0.1|
|''Date:''|Aug 23, 2007|
|''Source''|http://cawoodm.github.io/tiddlywiki.html#SQLQueryPlugin|
|''Author:''|[[Marc Cawood]]|

!Description
Query a SQL database (defined in [[SQLConfig]]) and display results in a tiddler. See [[SQLExamples]].
See http://www.connectionstrings.com for connection strings examples.

!Usage
{{{<<SQLQuery sql:"SELECT * FROM Products">>}}}

!Advanced Usage
{{{<<SQLQuery sql:"SELECT * FROM Products" connection:pubs rowstart:"*" colsep:"," rowend:{{\n}} headerstart:!>>}}}

!Configuration
Define all database connection strings (ADO) in the [[SQLConfig]] tiddler.
Example:
{{{
Northwind: DRIVER={SQL Server};SERVER=(local);DATABASE=Northwind;
pubs: DRIVER={SQL Server};SERVER=(local);DATABASE=pubs;
CompanyContacts: DRIVER={SQL Server};SERVER=MyCompanyServer;DATABASE=Contacts;UID=sa;pwd=admin;
}}}
!Code
***/
//{{{
version.extensions.SQLQuery= {major: 0, minor: 1, revision: 0, date: new Date("Aug 23, 2007")};

config.macros.SQLQuery= {};
//config.shadowTiddlers.SQLConfig = 'Connection1: DRIVER={SQL Server};SERVER=(local);DATABASE=Northwind;';
config.macros.SQLQuery.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var parameters = paramString.parseParams('name',null,true);
 var pSQL = parameters[0]['sql']?parameters[0]['sql'][0]:-1;
 if (!pSQL) return false;
 var Connection = parameters[0]['connection']?parameters[0]['connection'][0]:'Connection1';
 var SQLConnection = store.getTiddlerText('SQLConfig::' + Connection)
 if (!SQLConnection) return wikify('Please configure this connection \'' + Connection + '\' in [[SQLConfig]]!', place, null, tiddler);
 var RowStart = parameters[0]['rowstart']?parameters[0]['rowstart'][0]:'|';
 var ColSep = parameters[0]['colsep']?parameters[0]['colsep'][0]:'|';
 var RowEnd = parameters[0]['rowend']?parameters[0]['rowend'][0]:'|\n';
 var HeaderStart = parameters[0]['headerstart']?parameters[0]['headerstart'][0]:'!~';
 try {
  var strResult = sql_DBQuery(SQLConnection, pSQL, RowStart, ColSep, RowEnd, HeaderStart, 'No results')
  wikify(strResult,place, null, tiddler)
 } catch (err) {
  wikify('Error ' + err.message,place, null, tiddler)
 }
}
function sql_DBQuery(ConnStr, SQL, RowStart, ColSep, RowEnd, HeaderStart, NoData) {
 var Conn = new ActiveXObject('ADODB.Connection');
 Conn.open(ConnStr);
 var RS = Conn.execute(SQL);
 var strOut='';
 if (!RS.eof) {
  strOut += RowStart;
  for (var i=0; i < RS.Fields.Count; i++) {
     strOut += HeaderStart + RS.Fields(i).name.toString() + (i<RS.Fields.Count-1?ColSep:'');
  }
  strOut += RowEnd;
  while (!RS.eof) {
    strOut += RowStart;
    for (var i=0; i < RS.Fields.Count; i++) {
       strOut += RS.Fields(i).Value.toString() + (i<RS.Fields.Count-1?ColSep:'');
    }
    strOut += RowEnd;
    RS.MoveNext
  }
 } else {
  strOut = NoData;
 }
 return strOut;
 RS.close()
 Conn.close()
}
//}}}
<<tiddlerList tags:Plugin group:"tiddler.title.substr(0,1)" groupTemplate:"!%group\n" itemTemplate:"%link"  separator:" - " groupFooterTemplate:"\n">>


<<tiddler [[ColorPalette::Foreground]]>> 


<<write {{'[[todays meeting:' + (new Date()).formatString('YYYY/MM/DD') + ']]'}}>>

<<tiddlerList tags:Menu itemTemplate:{{'%link\n<<tiddlerList tags:Menu-%title$))'}}>>
/***
|''Name:''|~SectionMacro|
|''Description:''|Create collapsable sections within one tiddler.|
|''Version:''|0.9.4|
|''Date:''|Apr 20, 2007|
|''Author:''|[[Marc Cawood]]|
|''Type:''|Macro|
!Description
Allows you to create collapsable sections just like the slider macro but without needing to create new tiddlers for these sections.
!Usage
{{{<<section Title Tiddler Text goes here...
and can be multi-
line and include {${${monospace text}$}$}.
>>}}}
<<section Title Tiddler Text goes here...
and can be multi-
line and include {${${monospace text}$}$}.
>>
!Revision History
* Original by [[Marc Cawood]] 0.9
* Nested sliders and cookie persistence 0.9.1
* Removed crappy cookie persistance 0.9.2
* Bug-fix with quoted 2st parameter (thanks M. Macolio) 0.9.3
* Bug-fix with monospace text (thanks M. Macolio) 0.9.4
!Code
***/
//{{{
version.extensions.section = {major: 0, minor: 9, revision: 4, date: new Date("Apr 20, 2007")};

config.macros.section = {count:0,display:'none'};
config.macros.section.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 this.slider(place,"chkSection" + this.count++,paramString.substr(params[0].length+(paramString.substr(params[0].length+1,1).match(/['"]/)?2:1)).replace(/\$\>/g, '>').replace(/}\$}\$}/, '}}}').replace(/{\${\${/, '{{{'),params[0], "tooltip");
}

config.macros.section.slider = function(place,cookie,text,title,tooltips) {
 var btn = createTiddlyButton(place,title,tooltips,config.macros.slider.onClickSlider,"tiddlyLink tiddlyLinkExisting"); 
 var panel = createTiddlyElement(place,"div",null,"timelineSliderPanel",null);
 panel.setAttribute("cookie",cookie);
 panel.style.display = config.options[cookie] ? "block" : "none";
 panel.style.display=this.display;
 if(text) wikify(text,panel);
};
//}}}
<<list shadowed>>
<<closeAll>><<newTiddler>><<doBackup>><<saveChanges>>
|[[Config]]|
|AdvancedOptions|
<<tabs txtMainTab
Tags 'All tags' TabTags
New 'Recently modified tiddlers' New
Fav 'Favorite Tiddlers' Favorite
All 'Index' Index
>>
/***
|Version:|2.1.1|
***/
//{{{
version.extensions.SinglePageMode= {major: 2, minor: 1, revision: 1, date: new Date(2006,2,4)};

if (config.options.chkSinglePageMode==undefined)
 config.options.chkSinglePageMode=false;

config.shadowTiddlers.AdvancedOptions
 += "\n<<option chkSinglePageMode>> Display one tiddler at a time";

config.SPMTimer = 0;
config.lastURL = window.location.hash;
function checkLastURL()
{
 if (!config.options.chkSinglePageMode)
 { window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }
 if (config.lastURL == window.location.hash)
 return;
 var tiddlerName = convertUTF8ToUnicode(decodeURI(window.location.hash.substr(1)));
 tiddlerName=tiddlerName.replace(/\[\[/,"").replace(/\]\]/,""); // strip any [[ ]] bracketing
 if (tiddlerName.length) story.displayTiddler(null,tiddlerName,1,null,null);
}

Story.prototype.coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,title,template,animate,slowly)
{
 if (config.options.chkSinglePageMode) {
 window.location.hash = encodeURIComponent(String.encodeTiddlyLink(title));
 config.lastURL = window.location.hash;
 document.title = wikifyPlain("SiteTitle") + " - " + title;
 story.closeAllTiddlers();
 if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
 }
 this.coreDisplayTiddler(srcElement,title,template,animate,slowly)
}

Story.prototype.coreDisplayTiddlers=Story.prototype.displayTiddlers;
Story.prototype.displayTiddlers = function(srcElement,titles,template,unused1,unused2,animate,slowly)
{
 // suspend single-page mode when displaying multiple tiddlers
 var save=config.options.chkSinglePageMode;
 config.options.chkSinglePageMode=false;
 this.coreDisplayTiddlers(srcElement,titles,template,unused1,unused2,animate,slowly);
 config.options.chkSinglePageMode=save;
}
//}}}

My Wiki
/***
|''Name:''|SliceMacro|
|''Description:''|Display value of a tiddler's slice|
|''Version:''|0.1.0|
|''Date:''|Oct 29, 2016|
|''Author:''|Marc Cawood (cawoodm (at) gmail (dot) com)|
|''License:''|MIT|
|''~CoreVersion:''|2.1.0|
!!Examples
Get the slice (field) ''version'' of the tiddler ''One'':
{{{
<<slicer One version>>
}}}
<<slicer One version>>

Get the version of this plugin (alternative syntax):
{{{
<<slicer tiddler:"SlicerMacro" field:"Version">>
}}}
<<slicer tiddler:"SlicerMacro" field:"Version">>

!!Code
***/
//{{{
version.extensions.slicer = {major: 2, minor: 0, revision: 0, date: new Date("Oct 29, 2016")};
config.macros.slicer = {};
config.macros.slicer.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	var parameters = paramString.parseParams("name", null, true);
	var pTiddler = parameters[0]["tiddler"]||params[0];
	var pField = parameters[0]["field"]||params[1];
	var ret = store.getTiddlerSlice(pTiddler,pField);
	wikify(ret, place);
}
//}}}
/***
|Name|SplashScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#SplashScreenPlugin|
|Version|0.21 |
|Requires|~TW2.08+|
!Description:
Provides a simple splash screen that is visible while the TW is loading.

!Installation
Copy the source text of this tiddler to your TW in a new tiddler, tag it with systemConfig and save and reload. The SplashScreen will now be installed and will be visible the next time you reload your TW.

!Customizing
Once the SplashScreen has been installed and you have reloaded your TW, the splash screen html will be present in the MarkupPreHead tiddler. You can edit it and customize to your needs.

!History
* 20-07-06 : version 0.21, modified to hide contentWrapper while SplashScreen is displayed.
* 26-06-06 : version 0.2, first release

!Code
***/
//{{{
window.old_lewcid_splash_restart=window.restart;

window.restart = function()
{   if (document.getElementById("SplashScreen"))
        document.getElementById("SplashScreen").style.display = "none";
      if (document.getElementById("contentWrapper"))
        document.getElementById("contentWrapper").style.display = "block";
    
    window.old_lewcid_splash_restart();
   
    if (splashScreenInstall)
       {if(config.options.chkAutoSave)
			{saveChanges();}
        displayMessage("TW SplashScreen has been installed, please save and refresh your TW.");
        }
}


var oldText = store.getTiddlerText("MarkupPreHead");
if (oldText.indexOf("SplashScreen")==-1)
   {var siteTitle = store.getTiddlerText("SiteTitle");
   var splasher='\n\n<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';
   if (! store.tiddlerExists("MarkupPreHead"))
       {var myTiddler = store.createTiddler("MarkupPreHead");}
   else
      {var myTiddler = store.getTiddler("MarkupPreHead");}
      myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);
      store.setDirty(true);
      var splashScreenInstall = true;
}
//}}}
/*{{{*/
#mainMenu {display:none;}
#displayArea {margin:1em 17em 0 1em;}
div.toolbar {float:right}
body {background-color:#ddd;}
.tiddler {background-color:#eee;}
.viewer {background-color:#fff;}
span.tabUnselected, span.tabSelected {padding:0px;}
span.tabUnselected a, span.tabSelected a {padding:7px;}
#sidebar {padding-top:45px}
/*}}}*/
/***
!!!Message Area
***/
/*{{{*/
* {font-family:Consolas}
#messageArea {position:fixed; top:0px; right:300; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
#messageArea a {color:888;}
/*}}}*/

/***
!!!Smaller header bar
***/
/*{{{*/
.headerShadow {background-color: [[ColorPalette::TertiaryMid]]; position:relative; padding:0.5em 0 1em 1em; left:-1px; top:-1px;}
/*}}}*/

/***
!!!Search Bar in Header
***/
/*{{{*/
.searchBar {position:absolute !important; margin-top:1.3em; right:10px;}
.searchBar .button {color:#999;}
.searchBar .button:hover {color:#4F4B45;}
.searchBar input {border: 1px solid #CCC; margin-right:3px;}
.searchBar a {display:none;}
/*}}}*/

/*{{{*/
#mainMenu {left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#_breadCrumbs {display:none;}
.view {
 border-top:1px dashed #ddd;
 border-bottom:1px dashed #ddd;
}
span.listParent {
 padding:4px;
}
li.listGroup {
 list-style-type: none;
 margin-left: -2em;
 font-weight:bold;
}
.viewer th, thead td {
 background-color: [[ColorPalette::SecondaryMid]];
}
th a {
 color:#fff;
}
.viewer li {
 list-style-type: square;
 list-style-color: #800;
}

/*}}}*/

/***
!Tabs /%==================================================%/
***/
/*{{{*/
.tab {
 margin: 0em 0em 0em 0.25em;
 padding: 2px;
}

.tabContents ul, .tabContents ol {
 margin: 0;
 padding: 0;
}

.txtMainTab .tabContents li {
 list-style: none;
}

.tabContents li.listLink {
 margin-left: .75em;
}
/*}}}*/
/***
!Tabs /%==================================================%/
***/
/*{{{*/
.tab {
 margin: 0em 0em 0em 0.25em;
 padding: 2px;
}

.tabContents ul, .tabContents ol {
 margin: 0;
 padding: 0;
}

.txtMainTab .tabContents li {
 list-style: none;
}

.tabContents li.listLink {
 margin-left: .75em;
}
/*}}}*/
* StyleSheet
** StyleSheetColors
*** ColorPalette
** StyleSheetLayout
** StyleSheetPrint
|>|>|![[SplashScreen|MarkupPreHead]]|
|>|>|!PageTemplate|
|>|>|[[SiteTitle]] - [[SiteSubtitle]]|
|[[MainMenu]]|[[DefaultTiddlers]]<br><br>[[ViewTemplate]]<br>[[ToolbarCommands]]<br>[[EditTemplate]]|[[SideBarOptions]]|
|~|~|[[OptionsPanel]]<br>AdvancedOptions|
|~|~|SideBarTabs|
|>|>|[[SiteUrl]]|
* AdvancedOptions
* OptionsPanel
<<section Mine <<tiddlerList tags:"-Template,Plugin" $>$> >>
<<section 3rdParty <<tiddlerList tags:"systemConfig,-Template,-Plugin"$>$> >>
<<section All <<tiddlerList tags:"systemConfig,-Template"$>$> >>
* SideBarOptions
* SideBarTabs
* TabAll
* TabMore
* TabMoreMissing
* TabMoreOrphans
* TabTags
* TabTimeline
* DefaultTiddlers
* MainMenu
* SiteSubtitle
* SiteTitle
* SiteUrl
/***
|Name|TabEditPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#TabEditPlugin|
|Version|0.32|
|Requires|~TW2.x|

!Description
Makes editing of tabs easier.

!Usage
*Double click a tab to edit the source tiddler
*Double click outside the tabset to edit the containing tiddler. 

!Demo
TestTabs

!History
*28-04-06, v0.32 - fixed previous bug fix!
*27-04-06, v0.31 - fixed conflicts with tabs created using PartTiddler.
*26-04-06, v0.30 - first public release

***/

//{{{

//tab on double click event handler
Story.prototype.onTabDblClick = function(e){
 if (!e) var e = window.event;
 var theTarget = resolveTarget(e);
 var title= this.getAttribute("source");
 if ((version.extensions.PartTiddlerPlugin)&&(title.indexOf("/")!=-1))
 {if (!oldFetchTiddler.call(this, [title]))
 {return false;}} 
 story.displayTiddler(theTarget,title,2,false,null)
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
 }

config.macros.tabs.switchTab = function(tabset,tab)
{
 var cookie = tabset.getAttribute("cookie");
 var theTab = null
 var nodes = tabset.childNodes;
 for(var t=0; t<nodes.length; t++)
 if(nodes[t].getAttribute && nodes[t].getAttribute("tab") == tab)
 {
 theTab = nodes[t];
 theTab.className = "tab tabSelected";
 }
 else
 nodes[t].className = "tab tabUnselected"
 if(theTab)
 {
 if(tabset.nextSibling && tabset.nextSibling.className == "tabContents")
 tabset.parentNode.removeChild(tabset.nextSibling);
 var tabContent = createTiddlyElement(null,"div",null,"tabContents",null);
 tabset.parentNode.insertBefore(tabContent,tabset.nextSibling);
 var contentTitle = theTab.getAttribute("content");

 //set source attribute equal to title of tiddler displayed in tab
 tabContent.setAttribute("source",contentTitle);
 //add dbl click event
 tabContent.ondblclick = story.onTabDblClick;

 wikify(store.getTiddlerText(contentTitle),tabContent,null,store.getTiddler(contentTitle));
 if(cookie)
 {
 config.options[cookie] = tab;
 saveOptionCookie(cookie);
 }
 }
}

//}}}
<<allTags excludeLists>>
TiddlersAndTags
/***
|''Name:''|TiddlerListMacro|
|''Description:''|List tiddlers in any way you like.|
|''Version:''|2.3|
|''Date:''|Jan 8, 2008|
|''Source''|http://cawoodm.github.io/tiddlywiki.html#TiddlerListMacro|
|''Author:''|[[Marc Cawood]]|
|''Type:''|Macro|
|''Documentation:''|http://cawoodm.github.io/tiddlywiki.html#TiddlerListMacroDoc|
!Description
List tiddlers in any way you like.
!Usage
{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}
See TiddlerListMacroDocumentation and TiddlerListMacroExamples
!Code
***/
//{{{
version.extensions.tiddlerList = {major: 2, minor: 3, revision: 0, date: new Date("Jan 08, 2008")};
// template = [header, item, separator, group, footer]
config.macros.tiddlerList={
 formats : {list:true, nlist:true, span:true, stack:true, csv:true, table:true},
 templates : {
 list : [ "%0\n", "* %0\n", "", "%group\n", "%0\n"],
 nlist : [ "%0", "# %0\n", "", "%group\n", "%0\n"],
 span : [ "%0", "%0", " ", "%group", "%0"],
 stack : [ "%0", "%0", "\n", "%group", "%0"],
 csv : [ "%0", "%0", ", ", "%0", "%0\n"],
 table : ["|!%0|\n", "|%0|\n", "", "|%group|\n", "|%0|\n"]
 },
 dateFormat : "DD MMM YYYY"
}

if (typeof gCurrentTiddler == 'undefined')
 var gCurrentTiddler;

config.macros.tiddlerList.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 // Some globals
 var count=0, groupCount=0, theGroup="", lastGroup="", firstInGroup = false;
 var currentTiddler = tiddler;
 gCurrentTiddler = tiddler;
 var listWikiText="";
 var formats = this.formats;
 
 // SQL-Like parameters
 var parameters = paramString.parseParams("name",null,true);
 var pTags = parameters[0]["tags"]?parameters[0]["tags"][0].split(','):[];
 var pOrder = parameters[0]["order"]?parameters[0]["order"][0]:"title";
 var pTop = parameters[0]["top"]?parameters[0]["top"][0]:-1;
 var pText = parameters[0]["text"]?parameters[0]["text"][0]:"";
 var pTitle = parameters[0]["title"]?parameters[0]["title"][0]:"";
 var pSearch = parameters[0]["search"]?parameters[0]["search"][0]:"";
 var pFilter = parameters[0]["filter"]?parameters[0]["filter"][0]:"";
 var pHeader = parameters[0]["header"]?paramFormat(parameters[0]["header"][0]):"";
 var pFooter = parameters[0]["footer"]?paramFormat(parameters[0]["footer"][0]):"";
 var pGroup = parameters[0]["group"]?parameters[0]["group"][0]:"";
 var pDateFormat = parameters[0]["dateFormat"]?parameters[0]["dateFormat"][0]:this.dateFormat;
 var pCustomParameter = parameters[0]["customParameter"]?parameters[0]["customParameter"][0]:"";
 var pFormat = parameters[0]["format"]?parameters[0]["format"][0]:"list";
 pFormat = formats[pFormat]?pFormat:"list"
 
 // Separator
 var pSeparator = parameters[0]["separator"]?paramFormat(parameters[0]["separator"][0]):(parameters[0]["seperator"]?paramFormat(parameters[0]["seperator"][0]):this.templates[pFormat][2])

 // Template for group
 var pGroupTemplate = this.templates[pFormat][3];
 if (parameters[0]["groupTemplate"])
 pGroupTemplate = paramFormat(parameters[0]["groupTemplate"][0])
 pGroupTemplate = pGroupTemplate.replace(/\$\)\)/g, ">>")
 
 // Template for group footer
 var pGroupFooterTemplate = "";
 if (parameters[0]["groupFooterTemplate"])
 pGroupFooterTemplate = paramFormat(parameters[0]["groupFooterTemplate"][0]);
 pGroupFooterTemplate = pGroupFooterTemplate.replace(/\$\)\)/g, ">>");
 
 // Template for item
 var pItemTemplate = this.templates[pFormat][1];
 if (parameters[0]["itemTemplate"])
 pItemTemplate = paramFormat(parameters[0]["itemTemplate"][0])
 pItemTemplate = pItemTemplate.replace(/\$\)\)/g, ">>").replace(/%link/g, "%0").replace(/%item/g, "%1").replace(/%abstract/g, "%2").replace(/%text/g, "%3").replace(/%created/g, "%4").replace(/%modified/g, "%5").replace(/%modifier/g, "%6").replace(/%group/g, "%7").replace(/%title/g, "%8").replace(/%tags/g, "%9").replace(/%nolink/g, "%10").replace(/%custom/g, "%11")
 // Template for footer
 var pFooterTemplate = this.templates[pFormat][4].replace(/%count/g, "%1")

 // Get all tiddlers
 var tiddlers = store.reverseLookup("tags","",false);

 // Sorting
 if(!pOrder)
 pOrder = "title";
 if (pOrder.match(/^\-/i)) {
 pOrder = pOrder.substr(1)
 var sortDesc = true;
 }
 // Sorting on a standard field
 if (pOrder.match(/(title)|(text)|(modifier)|(modified)|(created)|(tags)/))
  if (sortDesc)
   tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] > b[pOrder]) ? -1 : +1; });
  else
  tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] < b[pOrder]) ? -1 : +1; });
 else
  if (sortDesc)
   tiddlers.sort(function (a,b) {if(a.fields[pOrder] == b.fields[pOrder]) return(0); else return (a.fields[pOrder] > b.fields[pOrder]) ? -1 : +1; });
  else
   tiddlers.sort(function (a,b) {if(a.fields[pOrder] == b.fields[pOrder]) return(0); else return (a.fields[pOrder] < b.fields[pOrder]) ? -1 : +1; });

 // Header
 if (pHeader)
 listWikiText += formatItem(this.templates[pFormat][0], [pHeader], pFormat)
 
 for(var t=0; t<tiddlers.length; t++) {
 tiddler = tiddlers[t];
 if (pText!="" && tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
 if (pTop==-1 || count<pTop) {
 if (pText=="" || tiddler.text.match(pText)) {
 if (pTitle=="" || tiddler.title.match(pTitle)) {
 if (pSearch=="" || (tiddler.title.match(pSearch) || tiddler.text.match(pSearch))) {
 if (pFilter=="" || eval(pFilter)) {
 if (pTags.length==0 || compareArrays(tiddler.tags, pTags, "all")) {
 count++;
 if (tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
 // Grouping
 if (pGroup) {
 theGroup = eval(pGroup);
 if(theGroup != lastGroup) {
 groupCount++;firstInGroup = true;
 if (pGroupFooterTemplate && groupCount>1)
 listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
 listWikiText += pGroupTemplate.replace("%group", theGroup)
 lastGroup = theGroup;
 } else
  firstInGroup = false;
 }
 // Separators
 if (count>1 && !firstInGroup) listWikiText += pSeparator;
 //Plaintext title
 var noLink = tiddler.title.match(config.textPrimitives.wikiLink)?"~" + tiddler.title:tiddler.title;
 // Custom parameter
 if (pCustomParameter)
 var custom="";
 try {
 custom = eval(pCustomParameter)
 } catch (e) {}
 // List individual tiddler
 var strItem = formatItem(pItemTemplate,["[[" + tiddler.title + "]]",count,tiddler.text.substr(0,300),tiddler.text,tiddler.created.formatString(pDateFormat),tiddler.modified.formatString(pDateFormat),tiddler.modifier,theGroup,tiddler.title,(tiddler.tags.length>0?"[["+tiddler.tags.join("]], [[")+"]]":""),noLink,custom], pFormat)
 for (var fld in tiddler.fields) strItem = strItem.replace('%field.' + fld, tiddler.fields[fld]);
 listWikiText += strItem
 }
 }
 }
 }
 }
 }
 }
 
 // Last group footer
 if (pGroup && pGroupFooterTemplate && count>0)
 listWikiText += pGroupFooterTemplate.replace("%group", theGroup)

 // Footer
 if (pFooter) {
 pFooter = pFooter.replace("%count", count)
 listWikiText += formatItem(pFooterTemplate, [pFooter], pFormat)
 }
 
 // Render result
 if (!parameters[0]["debug"])
 wikify(listWikiText,place, null, currentTiddler)
 else
 place.innerHTML = "<textarea style=\"width:100%;\" rows=30>" + listWikiText + "</textarea>"
 
 
 // Local functions
 
 function paramFormat(param) {
 // Allow "\n" in non evalled parameters
 return param.replace(/\\n/g, "\n");
 }
 
 function formatItem(template, values, format) {
 // Fill template with values (depending on list format)
 if (format.match(/table/) && values[0].match(/\|/))
 return ("%0\n").format(values)
 else
 return template.format(values)
 }
 
 function compareArrays(array, values, logic) {
 // Compare items in array with AND("all") or OR("any") logic
 var matches=0;
 for(var v=0; v<values.length; v++) 
 if(values[v].replace(/^\s+|\s+$/g,"").match(/^\-/) && !array.contains(values[v].replace(/^\s+|\s+$/g,"").substr(1)))
 matches++;
 else if (array.contains(values[v]))
 matches++;
 return ((logic=="all" && matches==values.length) || (logic!="all" && matches>0))
 }
 
}

String.prototype.prettyTrim = function(len,prefix,postfix) {
 var result = this.trim().replace(/\r\n/g,' ').replace(/\n/g,' ');
 if (!prefix) prefix = '';
 if (!postfix) postfix = '';
 if (result.length > len - 3)
 return prefix + result.substr(0,len) + '...' + postfix;
 else if (result.length > 0)
 return prefix + result + postfix;
 else
 return result;
}

//}}}
!Description
The TiddlerListMacro lists tiddlers with ~SQL-Like features:
* List tiddlers containing a word in the title or text (case-sensitive)
* List tiddlers tagged with given tags or exclude certain tags
* Ascending and descending sorting of single fields
* Limit number of tiddlers displayed
* Specify different HTML formats for the lists
* Grouping of items in a list
* Customizable wiki templates
* Numbering and totals
!Revision History
* Original by [[Marc Cawood]] 17-Apr-2006
* Added formatting (v2.0.1 18-Apr-2006)
* Added grouping (v2.0.2 18-Apr-2006)
* Added flexible filtering (v2.0.3 19-Apr-2006)
* Added custom item templates (v2.0.4 20-Apr-2006)
* Added custom templates (v2.0.5 21-Apr-2006)
* Allow evalled parameters (v2.0.7 23-Apr-2006)
* Allow groupFooterTemplate (v2.0.9 30-Apr-2006)
* Added the customParameter (v2.0.10 2-May-2006)
!To Do
* Case-insensitive searching
* Sorting on multiple fields
!Usage
{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}
!Examples ([[TiddlerListMacroExamples]])
List all tiddlers tagged with "Plugin"
{{{<<tiddlerList tags:Plugin>>}}}
List newest 3 plugins which are not templates:
{{{<<tiddlerList tags:"Plugin,-Template" top:3 order:"-created">>}}}
List all tiddlers containing "Marc Cawood" in their title or text (last modified first):
{{{<<tiddlerList search:"Marc Cawood" order:"-modified">>}}}
List all tiddlers starting with "T" in a table:
{{{<<tiddlerList title:"^T" format:"table" header:"Tiddlers beginning with T" footer:"%count items listed">>}}}
Group tiddlers by first letter
{{{<<tiddlerList top:"15" group:"tiddler.title.substr(0,1)" groupTemplate:"''%group''">>}}}
Show a list of all tiddlers with creation date (overrides default item template)
{{{<<tiddlerList itemTemplate:"* %link (%created)\n">>}}}
Show all tiddlers that have the host's tiddler title in their tag list
{{{<<tiddlerList filter:"tiddler.tags.contains(currentTiddler.title)">>}}}
!Parameters
|!Parameter|!Type|!Meaning|!Example|
|top|Integer|Number of tiddlers to display|"10"|
|tags|String|List tiddlers with matching tags (AND Logic). Leading - to exclude.|"~ToDo,Urgent,-Done"|
|title|~RegEx|List tiddlers with matching title|"^[Pp]"|
|text|~RegEx|List tiddlers with matching text|"Searchtext"|
|search|~RegEx|List tiddlers with matching title OR text|"Problem"|
|filter*|~JavaScript|List tiddlers according to boolean expression)|"tiddler.title.length<4 && tiddler.tags.contains('Idea')"|
|format|String (fixed list)|HTML formatting of list. list (ul, default), nlist (ol), span, stack (div), csv, table.|"list"|
|order|String|Sort order of tiddlers. - is descending, + ascending|"-created"|
|group*|~JavaScript|Grouping field|tiddler.title.substr(0,1)|
|customParameter*|~JavaScript|Custom parameter to be evalled for use in the itemTemplate|tiddler.text.match(/Version: (.*)/)[1]|
|header|String|Top caption|"Tiddlers beginning with T"|
|footer|String|Bottom caption|"End of list"|
|itemTemplate|~WikiTemplate|~WikiText with %placeholders|"%link\n%abstract\n%modified"|
|groupTemplate|~WikiTemplate|~WikiText with %placeholders for the start of each group|"!!%group"|
|groupFooterTemplate|~WikiTemplate|~WikiText with %placeholders for the end of each group|"----\n"|
|dateFormat|String|Date formatting string when displaying dates|~YYYY-MM-DD|
|separator|String|Define a string or character to be inserted between items listed|" "|
|debug|Boolean|Set to 1 or true for debug mode where only wikitext will be output|debug:1|
{{{*}}} Parameter will be evalled (do not pass with {{{{{ }} }}} unless you want it evalled twice!)
!Template Placeholders
Placeholder values for itemTemplate parameter
|!Placeholder|!Field|
|%item|List item number|
|%link|Link to Tiddler {{{[[MyTiddler]]}}}|
|%title|Tiddler Name {{{MyTiddler}}}|
|%nolink|Unlinked Tiddler Title {{{~MyTiddler}}}|
|%abstract|First 300 chars of tiddler text|
|%text|All tiddler text|
|%tags|Tags separated by space|
|%created|Creation date|
|%modified|Modified date|
|%modifier|Last modifier|
|%group|Name of group field|
|%custom|The result of your evalled customParameter|
|%count|Number of items listed (footer only)|
!Variables
{{{{{currentTiddler}} }}}refers to the current (host) tiddler in function scope (i.e. within the filter or group parameters)
{{{{{gCurrentTiddler}} }}}refers to the current (host) tiddler in global scope (i.e. within{{{ {{}} }}}evalled parameters. Example:
{{{<<tiddlerList tags:{{gCurrentTiddler.title}}>>}}}
!Style
No styles are pre-assigned to the lists. Use {{{@@}}} notation to define custom styles in the header, footer, groupTemplate and itemTemplate parameters.
Examples using the TiddlerListMacro:
!List Formatting
List all tiddlers tagged with "Plugin"
{{{<<tiddlerList tags:Plugin>>}}}
<<tiddlerList tags:Plugin>>
List top 1 plugins which are not templates:
{{{<<tiddlerList tags:"Plugin,-Template" top:1>>}}}
<<tiddlerList tags:"Plugin,-Template" top:1>>
List all tiddlers containing "Plugin" in their title and text (newest first):
{{{<<tiddlerList title:"Plugin" text:"Plugin" order:"-created">>}}}
<<tiddlerList title:"Plugin" text:"Plugin" order:"-created">>
List all tiddlers containing "Marc Cawood" in their title or text (oldest first):
{{{<<tiddlerList search:"Marc Cawood" order:"created">>}}}
<<tiddlerList search:"Marc Cawood" order:"created">>
List all tiddlers starting with "T":
{{{<<tiddlerList title:"^T">>}}}
<<tiddlerList title:"^T">>
List all tiddlers tagged with the current tiddler's title:
{{{<<tiddlerList tags:{{window.currentTiddler.title}}>>}}}
<<tiddlerList tags:{{window.currentTiddler.title}}>>
!Other Formats
Simple unnumbered list of tiddlers
{{{<<tiddlerList top:"3" format:"list">>}}}
<<tiddlerList top:"3" format:"list">>
Numbered list of tiddlers
{{{<<tiddlerList top:"3" format:"nlist">>}}}
<<tiddlerList top:"3" format:"nlist">>
Table with header and footer
{{{<<tiddlerList top:"3" format:"table" header:"Plugins" footer:"Tiddlers: %count">>}}}
<<tiddlerList top:"3" format:"table" header:"Plugins" footer:"Tiddlers: %count">>
Simple horizontal list:
{{{<<tiddlerList top:"3" format:"span">>}}}
<<tiddlerList top:"3" format:"span">>
Comma Separated list
{{{<<tiddlerList top:"3" format:"csv" header:"Plugins: [ " footer:" ]">>}}}
<<tiddlerList top:"3" format:"csv" header:"Plugins: [ " footer:" ]">>
Custom Separated list
{{{<<tiddlerList top:"10" separator:" - " format:"span">>}}}
<<tiddlerList top:"10" separator:" - " format:"span">>
!Grouping
Group tiddlers by first letter
{{{<<tiddlerList top:"7" group:"tiddler.title.substr(0,1)">>}}}
<<tiddlerList top:"7" group:"tiddler.title.substr(0,1)">>
!Custom Item Templates
List tiddlers in a custom format (title, date, abstract)
{{{<<tiddlerList tags:"News,-Template" itemTemplate:"* %link (%created)<<br>>%abstract\n" order:"-created">>}}}
<<tiddlerList tags:"News,-Template" filter:"tiddler.title!=currentTiddler.title" itemTemplate:"%link (%created)\n%abstract" order:"-created">>
!!!Beware of infinite recursion!!
!Advanced
Tiddlers created today
{{{<<tiddlerList format:table filter:"tiddler.created.formatString('YYYYMMDD')==(new Date()).formatString('YYYYMMDD')" header:{{'Tiddlers created on ' + (new Date()).formatString('DDD, DD MMM YYYY')}}>>}}}
<<tiddlerList format:table filter:"tiddler.created.formatString('YYYYMMDD')==(new Date()).formatString('YYYYMMDD')" header:{{'Tiddlers created on ' + (new Date()).formatString('DDD, DD MMM YYYY')}}>>
Fancy table with grouping on modified date
{{{<<tiddlerList top:"10" header:"|>|!Tiddlers|\n|bgcolor(#ddf):''Title''|bgcolor(#ddf):''Created''|" itemTemplate:"|%0|%4|\n" format:"table" group:"tiddler.created.formatString('DD MMM YYYY')" groupTemplate:"|>|bgcolor(#eef): ''Updated: %group'' |\n" dateFormat:"DDD, DD MM YYYY">>}}}
<<tiddlerList top:"10" header:"|>|!Tiddlers|\n|bgcolor(#ddf):''Title''|bgcolor(#ddf):''Created''|" itemTemplate:"|%0|%4|\n" format:"table" group:"tiddler.created.formatString('DD MMM YYYY')" groupTemplate:"|>|bgcolor(#eef): ''Updated: %group'' |\n" dateFormat:"DDD, DD MM YYYY">>
<<tiddlerList top:100 tags:Config format:table itemTemplate:"|%link|<<tags %title$))|\n" header:"|!Tiddler|!Tags|">>
/***
|''Name:''|TiddlersBarPlugin|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.1|
|''Date:''|Dec 21,2007|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demos
On [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], open several tiddlers to use the tabs bar.
!Installation
#import this tiddler from [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] (tagged as systemConfig)
#save and reload
#''if you're using a custom [[PageTemplate]]'', add {{{<div id='tiddlersBar' refresh='content' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>}}} before {{{<div id='tiddlerDisplay'></div>}}}
#optionally, adjust StyleSheetTiddlersBar
!Tips
*Doubleclick on the tiddlers bar (where there is no tab) create a new tiddler.
*Tabs include a button to close {{{x}}} or save {{{!}}} their tiddler.
*By default, click on the current tab close all others tiddlers.
!Configuration options 
<<option chkDisableTabsBar>> Disable the tabs bar (to print, by example).
<<option chkHideTabsBarWhenSingleTab >> Automatically hide the tabs bar when only one tiddler is displayed. 
<<option txtSelectedTiddlerTabButton>> ''selected'' tab command button.
!Code
***/
//{{{
config.options.chkDisableTabsBar = config.options.chkDisableTabsBar ? config.options.chkDisableTabsBar : false;
config.options.chkHideTabsBarWhenSingleTab  = config.options.chkHideTabsBarWhenSingleTab  ? config.options.chkHideTabsBarWhenSingleTab  : false;
config.options.txtSelectedTiddlerTabButton = config.options.txtSelectedTiddlerTabButton ? config.options.txtSelectedTiddlerTabButton : "closeOthers";
config.macros.tiddlersBar = {
	tooltip : "see ",
	tooltipClose : "click here to close this tab",
	tooltipSave : "click here to save this tab",
	promptRename : "Enter tiddler new name",
	currentTiddler : "",
	previousState : false,
	handler: function(place,macroName,params) {
		if (config.macros.tiddlersBar.isShown())
			story.forEachTiddler(function(title,e){
				if (title==config.macros.tiddlersBar.currentTiddler){
					var d = createTiddlyElement(null,"span",null,"tab tabSelected");
					config.macros.tiddlersBar.createActiveTabButton(d,title);
				}
				else {
					var d = createTiddlyElement(place,"span",null,"tab tabUnselected");
					var btn = createTiddlyButton(d,title,config.macros.tiddlersBar.tooltip + title,config.macros.tiddlersBar.onSelectTab);
					btn.setAttribute("tiddler", title);
					btn.className += " tiddlerTab";
				}
				var isDirty =story.isDirty(title);
				var c = createTiddlyButton(d,isDirty ?"!":"x",isDirty?config.macros.tiddlersBar.tooltipSave:config.macros.tiddlersBar.tooltipClose, isDirty ? config.macros.tiddlersBar.onTabSave : config.macros.tiddlersBar.onTabClose,"tabButton");
				c.setAttribute("tiddler", title);
				if (place.childNodes) {
					place.insertBefore(document.createTextNode(" "),place.firstChild); // to allow break line here when many tiddlers are open
					place.insertBefore(d,place.firstChild); 
				}
				else place.appendChild(d);
			})
	}, 
	refresh: function(place,params){
		removeChildren(place);
		config.macros.tiddlersBar.handler(place,"tiddlersBar",params);
		if (config.macros.tiddlersBar.previousState!=config.macros.tiddlersBar.isShown()) {
			story.refreshAllTiddlers();
			if (config.macros.tiddlersBar.previousState) story.forEachTiddler(function(t,e){e.style.display="";});
			config.macros.tiddlersBar.previousState = !config.macros.tiddlersBar.previousState;
		}
	},
	isShown : function(){
		if (config.options.chkDisableTabsBar) return false;
		if (!config.options.chkHideTabsBarWhenSingleTab) return true;
		var cpt=0;
		story.forEachTiddler(function(){cpt++});
		return (cpt>=0);
	},
	selectNextTab : function(){  //used when the current tab is closed (to select another tab)
		var previous="";
		story.forEachTiddler(function(title){
			if (!config.macros.tiddlersBar.currentTiddler) {
				story.displayTiddler(null,title);
				return;
			}
			if (title==config.macros.tiddlersBar.currentTiddler) {
				if (previous) {
					story.displayTiddler(null,previous);
					return;
				}
				else config.macros.tiddlersBar.currentTiddler=""; 	// so next tab will be selected
			}
			else previous=title;
			});		
	},
	onSelectTab : function(e){
		var t = this.getAttribute("tiddler");
		if (t) story.displayTiddler(null,t);
		return false;
	},
	onTabClose : function(e){
		var t = this.getAttribute("tiddler");
		if (t) {
			if(story.hasChanges(t) && !readOnly) {
				if(!confirm(config.commands.cancelTiddler.warning.format([t])))
				return false;
			}
			story.closeTiddler(t);
		}
		return false;
	},
	onTabSave : function(e) {
		var t = this.getAttribute("tiddler");
		if (!e) e=window.event;
		if (t) config.commands.saveTiddler.handler(e,null,t);
		return false;
	},
	onSelectedTabButtonClick : function(event,src,title) {
		var t = this.getAttribute("tiddler");
		if (!event) event=window.event;
		if (t && config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton])
			config.commands[config.options.txtSelectedTiddlerTabButton].handler(event, src, t);
		return false;
	},
	onTiddlersBarAction: function(event) {
		var source = event.target ? event.target.id : event.srcElement.id; // FF uses target and IE uses srcElement;
		if (source=="tiddlersBar") story.displayTiddler(null,'New Tiddler',DEFAULT_EDIT_TEMPLATE,false,null,null);
	},
	createActiveTabButton : function(place,title) {
		if (config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton]) {
			var btn = createTiddlyButton(place, title, config.commands[config.options.txtSelectedTiddlerTabButton].tooltip ,config.macros.tiddlersBar.onSelectedTabButtonClick);
			btn.setAttribute("tiddler", title);
		}
		else
			createTiddlyText(place,title);
	}
}

story.coreCloseTiddler = story.coreCloseTiddler? story.coreCloseTiddler : story.closeTiddler;
story.coreDisplayTiddler = story.coreDisplayTiddler ? story.coreDisplayTiddler : story.displayTiddler;

story.closeTiddler = function(title,animate,unused) {
	if (title==config.macros.tiddlersBar.currentTiddler)
		config.macros.tiddlersBar.selectNextTab();
	story.coreCloseTiddler(title,false,unused); //disable animation to get it closed before calling tiddlersBar.refresh
	var e=document.getElementById("tiddlersBar");
	if (e) config.macros.tiddlersBar.refresh(e,null);
}

story.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle){
	story.coreDisplayTiddler(srcElement,tiddler,template,animate,unused,customFields,toggle);
	var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler;  
	if (config.macros.tiddlersBar.isShown()) {
		story.forEachTiddler(function(t,e){
			if (t!=title) e.style.display="none";
			else e.style.display="";
		})
		config.macros.tiddlersBar.currentTiddler=title;
	}
	var e=document.getElementById("tiddlersBar");
	if (e) config.macros.tiddlersBar.refresh(e,null);
}

ensureVisible=function (e) {return 0} //disable bottom scrolling (not useful now)

config.shadowTiddlers.StyleSheetTiddlersBar = "/*{{{*/\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .button {border:0}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .tab {white-space:nowrap}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar {padding : 1em 0.5em 2px 0.5em}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tabUnselected .tabButton, .tabSelected .tabButton {padding : 0 2px 0 2px; margin: 0 0 0 4px;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tiddler, .tabContents {border:1px [[ColorPalette::TertiaryPale]] solid;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar +="/*}}}*/";
store.addNotification("StyleSheetTiddlersBar", refreshStyles);

config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='content' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>")

//}}}
/***
|Name|TiddlyLockPlugin|
|Source|http://www.minormania.com/tiddlylock/tiddlylock.html|
|Description|Allow multiple users to edit TiddlyWiki using a lock mechanism.|
|Version|1.2.1|
|Author|Richard Hobbis|
|License|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|Type|plugin|

!!!Description
Automatically locks and unlocks the TiddlyWiki as required, allowing multiple users to edit the TiddlyWiki without fear of overwriting other users' changes.
!!!Usage
<<<
Simply import TiddlyLockPlugin into your TiddlyWiki!
<<<
!!!Installation
<<<
Import (or copy/paste) ''this tiddler'' into your TiddlyWiki and make sure it's tagged with <<tag systemConfig>>. Reload your TiddlyWiki to enable TiddlyLock.
<<<
!!!Configuration
<<<
None required!
<<<
!!!Revision History
<<<
''2016.10.29 [1.2.1]'' Disable plugin when viewed over HTTP. (Marc Cawood)
''2010.07.06 [1.2.0]'' Allow the location of the Lock File to be specified by the user, instead of defaulting to the location of the TiddlyWiki file. The default location is the same folder as the TiddlyWiki file itself, however this can be changed by editing ''//this html file//'' in a text editor and search for {{{TiddlyLock.LockPath = '';}}} The folder will be created if it doesn't exist.
''2010.07.06 [1.2.0]'' Upgraded this TiddlyWiki to core version 2.6
''2008.05.15 [1.1.0]'' Upgraded source TiddlyWiki to use core version 2.4. Tested and verified TiddlyLock under version 2.4.
''2007.06.22 [1.0.4]'' Added locking on 'new tiddler' which also traps 'new journal'. Tweaked messages.
''2007.06.20 [1.0.3]'' Fixed an issue that occurred when a user navigated away from the TiddlyWiki without saving outstanding changes.
''2007.05.10 [1.0.2]'' Implemented a timestamp to track the last update time. This fixes the multi-browser edit issue and also removes the need for a password.
''2007.05.08 [1.0.1]'' Function overrides are now done using apply() ensuring clean upgrades (thanks Martin!)
''2007.05.01 [1.0.0]'' Initial Release
<<<
!!!Known Issues
<<<
*Monkey Pirate TiddlyWiki (MPTW) adds a ''disable'' button to the toolbar for systemConfig tiddlers. This button is available even when the TW is marked as readOnly and therefore it's possible for two users to disable/enable plugins at the same time. In this case, whoever saves the TW last will 'win' and their changes will be saved. Note that this is only an issue if there are no other unsaved changes in both browsers - TiddlyLock still handles all other changes.
<<<
!!!Credits
<<<
This feature was developed by Richard Hobbis (rhobbis [at] hotmail [dot] com).
<<<
!!!Code
***/

//{{{
if (!document.location.protocol.match(/^http/)) {
// Convert a date to UTC YYYYMMDDHHMMSSMMM string format
// This is the same as the builtin function convertToYYYYMMDDHHMMSSMMM() but
// without the '.' in the middle - this allows simple date comparisons
Date.prototype.TLConvertToYYYYMMDDHHMMSSMMM = function()
{
  return(String.zeroPad(this.getUTCFullYear(),4)
    + String.zeroPad(this.getUTCMonth()+1,2)
    + String.zeroPad(this.getUTCDate(),2)
    + String.zeroPad(this.getUTCHours(),2)
    + String.zeroPad(this.getUTCMinutes(),2)
    + String.zeroPad(this.getUTCSeconds(),2)
    + String.zeroPad(this.getUTCMilliseconds(),4));
}

// namespace for TiddlyLock
TiddlyLock = {};

// Load/Last Update timestamp
TiddlyLock.TimeStamp = new Date().TLConvertToYYYYMMDDHHMMSSMMM();

// Lockfile
TiddlyLock.LockPath = ''; // custom values *must* include trailing '\\'
TiddlyLock.OldLockData = '';
TiddlyLock.LockData = '';
TiddlyLock.LockFile = TLLockPath();
// define messages
TiddlyLock.Msg = {
  Locked: 'File locked',
  Unlocked: 'File unlocked',
  LockFailed: 'Failed to lock file',
  UnlockFailed: 'Failed to unlock file',
  ReadOnly: 'Now in Read-Only mode.',
  Changed: 'This file has been changed by someone else.',
  Reload: 'Reload this file before editing.'};

// create/update the lock file
function TLSave(timeStamp,lockedBy)
{
  var lockedText='';
  if (lockedBy!='')
  {
    lockedText=timeStamp+'##'+lockedBy;
  }
  else lockedText=timeStamp+'##';
    var lockSave=saveFile(TiddlyLock.LockFile,lockedText);
  TiddlyLock.TimeStamp = timeStamp;
  return false;
}


// Create/update the lock file to prevent other users from editing the TW
function TLLock()
{
  clearMessage();
  lockSave = TLSave(new Date().TLConvertToYYYYMMDDHHMMSSMMM(),config.options.txtUserName);
  displayMessage(TiddlyLock.Msg.Locked,'');
  return false;
}


// Clear the lock file if necessary, but only if I have it locked, setting the
// timestamp in the lockfile to the specified value
function TLUnlock(timeStamp)
{
  if ((store && store.isDirty && !store.isDirty())
    && (story && story.areAnyDirty && !story.areAnyDirty())
    && TLIsLocked()
    && TLIsLockedByMe())
  {
    lockSave=TLSave(timeStamp,'','');
    displayMessage(TiddlyLock.Msg.Unlocked,'');
    TiddlyLock.OldLockData = TiddlyLock.LockData;
  }
  return false;
}

// Get the contents of the lock file, if it exists
function TLLockPath()
{
  var lockPath,pathRoot,p,fileName;
  var fullPath=document.location.toString();
  if(TiddlyLock.LockPath!='') pathRoot=TiddlyLock.LockPath; // location of lock file is defined by TiddlyLock.LockPath
  else pathRoot=getLocalPath(fullPath); // location of lock file is derived from the wiki filename
  if((p=pathRoot.lastIndexOf('\\'))!=-1) pathRoot=pathRoot.substr(0,p+1); // truncate any trailing filename (derived paths only)
  fileName=getLocalPath(fullPath); // full wiki file name, including path
  if((p=fileName.lastIndexOf('\\'))!=-1) fileName=fileName.substr(p+1); // truncate everything up to the last slash
  if((p=fileName.lastIndexOf('.'))!=-1) fileName=fileName.substr(0,p); // remove any existing extension
  fileName=fileName+'.lck'; // add new extension
  return pathRoot+fileName;
}

// Get the contents of the lock file, if it exists
function TLLockData()
{
  return loadFile(TiddlyLock.LockFile);
}

// Get the contents of the lock file, if it exists
function TLIsLocked()
{
  TiddlyLock.LockData = TLLockData();
  if (TiddlyLock.LockData
      && ( TLLockedBy(TiddlyLock.LockData)!='' // someone has it locked
         || TiddlyLock.TimeStamp < TLLockedTimeStamp(TiddlyLock.LockData) // changed by someone else but not currently locked
         )
     )
    return true;
  else
    return false;
}


// check if locked by me
function TLIsLockedByMe()
{
  if(TiddlyLock.LockData == TiddlyLock.TimeStamp+'##' + config.options.txtUserName)
    return true;
  else
    return false;
}


// returns just the timestamp portion of the supplied lock file contents
function TLLockedTimeStamp(lockData)
{
  if(lockData)
    return lockData.split('##')[0];
  else
    return '';
}


// returns just the username portion of the supplied lock file contents
function TLLockedBy(lockData)
{
  if(lockData)
    return lockData.split('##')[1];
  else
    return '';
}

// display a message if locked or changed
function TLChangesAllowed()
{
  if(TLIsLocked() && !TLIsLockedByMe())
  {
    readOnly=true;
    if(TLLockedBy(TiddlyLock.LockData))
    {
      displayMessage(TiddlyLock.Msg.Locked+' by '+TLLockedBy(TiddlyLock.LockData));
      alert(TiddlyLock.Msg.Locked+' by '+TLLockedBy(TiddlyLock.LockData)+'. '+TiddlyLock.Msg.ReadOnly);
    }
    else
    {
      displayMessage(TiddlyLock.Msg.Changed+' '+TiddlyLock.Msg.Reload);
      alert(TiddlyLock.Msg.Changed+' '+TiddlyLock.Msg.Reload);
    }
    return false;
  }
  else
    return true;
}


//*********************************************
// OVERRIDE STANDARD FUNCTIONS
//*********************************************

//
// OVERRIDE onClickNewTiddler()
//
TiddlyLock.onClickNewTiddler = config.macros.newTiddler.onClickNewTiddler;
config.macros.newTiddler.onClickNewTiddler = function(event,src,title)
{
  if (TLChangesAllowed())
  {
    TiddlyLock.OldLockData = TiddlyLock.LockData;
    TLLock();
    var ret = TiddlyLock.onClickNewTiddler.apply(this,arguments);
    return ret;
  }
	return false;
}

//
// OVERRIDE checkUnsavedChanges()
//
TiddlyLock.checkUnsavedChanges = checkUnsavedChanges;
checkUnsavedChanges = function(event,src,title)
{
  var ret = TiddlyLock.checkUnsavedChanges.apply(this,arguments);
  if(TLIsLocked() && TLIsLockedByMe())
    lockSave=TLSave(TLLockedTimeStamp(TiddlyLock.OldLockData),'','');
  return ret;
}


//
// OVERRIDE cancelTiddler()
//
TiddlyLock.cancelTiddler = config.commands.cancelTiddler.handler;
config.commands.cancelTiddler.handler = function(event,src,title)
{
  var ret = TiddlyLock.cancelTiddler.apply(this,arguments);
  TLUnlock(TLLockedTimeStamp(TiddlyLock.OldLockData));
  return ret;
}

//
// OVERRIDE deleteTiddler()
//
TiddlyLock.deleteTiddler = config.commands.deleteTiddler.handler;
config.commands.deleteTiddler.handler = function(event,src,title)
{
  if (TLChangesAllowed())
  {
    TiddlyLock.OldLockData = TiddlyLock.LockData;
    TLLock();
    var ret = TiddlyLock.deleteTiddler.apply(this,arguments);
    return ret;
  }
	return false;
}

//
// OVERRIDE editTiddler()
//
TiddlyLock.editTiddler = config.commands.editTiddler.handler;
config.commands.editTiddler.handler = function(event,src,title)
{
  if (TLChangesAllowed())
  {
    TiddlyLock.OldLockData = TiddlyLock.LockData;
    TLLock();
  }
  var ret = TiddlyLock.editTiddler.apply(this,arguments);
  return ret;
}

//
// OVERRIDE saveChanges()
//
TiddlyLock.saveChanges = saveChanges;
saveChanges = function(onlyIfDirty)
{
  if(TLChangesAllowed())
  {
    var ret = TiddlyLock.saveChanges.apply(this,arguments);
    TLUnlock(new Date().TLConvertToYYYYMMDDHHMMSSMMM());
    return ret;
  }
  else
    return false;
}

//
// OVERRIDE saveTiddler()
//
TiddlyLock.saveTiddler= config.commands.saveTiddler.handler;
config.commands.saveTiddler.handler=function(event,src,title)
{
  var ret = TiddlyLock.saveTiddler.apply(this,arguments);
  TLUnlock(new Date().TLConvertToYYYYMMDDHHMMSSMMM());
  return ret;
}
}
//}}}
* Replace banner with narrow toolbar including search bar right
* Message area to top middle
* Collapsabile left/right menu
* Splash scren?
* Logon screen?
* Remember last tiddlers open at startup
version:2.0
<!--{{{-->
<div class='toolbar' role='navigation' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<!--<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagClear'></div>-->
<!--}}}-->
/***
|''Name:''|YourSearchPlugin|
|''Version:''|2.1.6|
|''Date:''|2012-04-19|
|''Description:''|Advanced search features.|
|''Source:''|http://tiddlywiki.abego-software.de/#YourSearchPlugin|
|''Twitter:''|[[@abego|https://twitter.com/#!/abego]]|
|''GitHub:''|https://github.com/abego/YourSearchPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''License:''|[[BSD open source license|http://www.abego-software.de/legal/apl-v10.html]]|
!About YourSearch
YourSearch gives you a bunch of new features to simplify and speed up your daily searches in TiddlyWiki. It seamlessly integrates into the standard TiddlyWiki search: just start typing into the 'search' field and explore!

For more information see [[Help|YourSearch Help]].
!Compatibility
This plugin requires TiddlyWiki 2.1. 
Check the [[archive|http://tiddlywiki.abego-software.de/archive]] for ~YourSearchPlugins supporting older versions of TiddlyWiki.
!Source Code
***/
/***
This plugin's source code is compressed (and hidden). 
Use this [[link|http://tiddlywiki.abego-software.de/archive/YourSearchPlugin/2.1.6/YourSearchPlugin-2.1.6-src.js]] to get the readable source code.
***/
///%
if(!version.extensions.YourSearchPlugin){version.extensions.YourSearchPlugin={major:2,minor:1,revision:6,source:"http://tiddlywiki.abego-software.de/#YourSearchPlugin",licence:"[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",copyright:"Copyright (c) abego Software GmbH, 2005-2012 (www.abego-software.de)"};if(!window.abego){window.abego={}}if(!Array.forEach){Array.forEach=function(c,e,d){for(var b=0,a=c.length;b<a;b++){e.call(d,c[b],b,c)}};Array.prototype.forEach=function(d,c){for(var b=0,a=this.length;b<a;b++){d.call(c,this[b],b,this)}}}abego.toInt=function(b,a){if(!b){return a}var c=parseInt(b);return(c==NaN)?a:c};abego.createEllipsis=function(a){var b=createTiddlyElement(a,"span");b.innerHTML="&hellip;"};abego.shallowCopy=function(b){if(!b){return b}var a={};for(var c in b){a[c]=b[c]}return a};abego.copyOptions=function(a){return !a?{}:abego.shallowCopy(a)};abego.countStrings=function(d,c){if(!c){return 0}var a=c.length;var f=0;var e=0;while(true){var b=d.indexOf(c,e);if(b<0){return f}f++;e=b+a}return f};abego.getBracedText=function(j,e,a){if(!e){e=0}var k=/\{([^\}]*)\}/gm;k.lastIndex=e;var d=k.exec(j);if(d){var l=d[1];var b=abego.countStrings(l,"{");if(!b){if(a){a.lastIndex=k.lastIndex}return l}var g=j.length;for(var f=k.lastIndex;f<g&&b;f++){var h=j.charAt(f);if(h=="{"){b++}else{if(h=="}"){b--}}}if(!b){if(a){a.lastIndex=f-1}return j.substring(d.index+1,f-1)}}};abego.select=function(d,c,b,a){if(!a){a=[]}d.forEach(function(e){if(c.call(b,e)){a.push(e)}});return a};abego.consumeEvent=function(a){if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}a.cancelBubble=true;a.returnValue=true};abego.TiddlerFilterTerm=function(d,b){if(!b){b={}}var c=d;if(!b.textIsRegExp){c=d.escapeRegExp();if(b.fullWordMatch){c="\\b"+c+"\\b"}}var a=new RegExp(c,"m"+(b.caseSensitive?"":"i"));this.tester=new abego.MultiFieldRegExpTester(a,b.fields,b.withExtendedFields)};abego.TiddlerFilterTerm.prototype.test=function(a){return this.tester.test(a)};abego.parseNewTiddlerCommandLine=function(c){var a=/(.*?)\.(?:\s+|$)([^#]*)(#.*)?/.exec(c);if(!a){a=/([^#]*)()(#.*)?/.exec(c)}if(a){var d;if(a[3]){var b=a[3].replace(/#/g,"");d=b.parseParams("tag")}else{d=[[]]}var e=a[2]?a[2].trim():"";d.push({name:"text",value:e});d[0].text=[e];return{title:a[1].trim(),params:d}}else{return{title:c.trim(),params:[[]]}}};abego.parseTiddlerFilterTerm=function(queryText,offset,options){var re=/\s*(?:(?:\{([^\}]*)\})|(?:(=)|([#%!])|(?:(\w+)\s*\:(?!\/\/))|(?:(?:("(?:(?:\\")|[^"])+")|(?:\/((?:(?:\\\/)|[^\/])+)\/)|(\w+\:\/\/[^\s]+)|([^\s\)\-\"]+)))))/mg;var shortCuts={"!":"title","%":"text","#":"tags"};var fieldNames={};var fullWordMatch=false;re.lastIndex=offset;while(true){var i=re.lastIndex;var m=re.exec(queryText);if(!m||m.index!=i){throw"Word or String literal expected"}if(m[1]){var lastIndexRef={};var code=abego.getBracedText(queryText,0,lastIndexRef);if(!code){throw"Invalid {...} syntax"}var f=Function("tiddler","return ("+code+");");return{func:f,lastIndex:lastIndexRef.lastIndex,markRE:null}}if(m[2]){fullWordMatch=true}else{if(m[3]){fieldNames[shortCuts[m[3]]]=1}else{if(m[4]){fieldNames[m[4]]=1}else{var textIsRegExp=m[6];var text=m[5]?window.eval(m[5]):m[6]?m[6]:m[7]?m[7]:m[8];options=abego.copyOptions(options);options.fullWordMatch=fullWordMatch;options.textIsRegExp=textIsRegExp;var fields=[];for(var n in fieldNames){fields.push(n)}if(fields.length==0){options.fields=options.defaultFields}else{options.fields=fields;options.withExtendedFields=false}var term=new abego.TiddlerFilterTerm(text,options);var markREText=textIsRegExp?text:text.escapeRegExp();if(markREText&&fullWordMatch){markREText="\\b"+markREText+"\\b"}return{func:function(tiddler){return term.test(tiddler)},lastIndex:re.lastIndex,markRE:markREText?"(?:"+markREText+")":null}}}}}};abego.BoolExp=function(i,c,j){this.s=i;var h=j&&j.defaultOperationIs_OR;var e=/\s*\)/g;var f=/\s*(?:(and|\&\&)|(or|\|\|))/gi;var b=/\s*(\-|not)?(\s*\()?/gi;var a;var d=function(p){b.lastIndex=p;var l=b.exec(i);var o=false;var k=null;if(l&&l.index==p){p+=l[0].length;o=l[1];if(l[2]){var n=a(p);e.lastIndex=n.lastIndex;if(!e.exec(i)){throw"Missing ')'"}k={func:n.func,lastIndex:e.lastIndex,markRE:n.markRE}}}if(!k){k=c(i,p,j)}if(o){k.func=(function(m){return function(q){return !m(q)}})(k.func);k.markRE=null}return k};a=function(s){var n=d(s);while(true){var p=n.lastIndex;f.lastIndex=p;var k=f.exec(i);var o;var q;if(k&&k.index==p){o=!k[1];q=d(f.lastIndex)}else{try{q=d(p)}catch(r){return n}o=h}n.func=(function(t,m,l){return l?function(u){return t(u)||m(u)}:function(u){return t(u)&&m(u)}})(n.func,q.func,o);n.lastIndex=q.lastIndex;if(!n.markRE){n.markRE=q.markRE}else{if(q.markRE){n.markRE=n.markRE+"|"+q.markRE}}}};var g=a(0);this.evalFunc=g.func;if(g.markRE){this.markRegExp=new RegExp(g.markRE,j.caseSensitive?"mg":"img")}};abego.BoolExp.prototype.exec=function(){return this.evalFunc.apply(this,arguments)};abego.BoolExp.prototype.getMarkRegExp=function(){return this.markRegExp};abego.BoolExp.prototype.toString=function(){return this.s};abego.MultiFieldRegExpTester=function(b,a,c){this.re=b;this.fields=a?a:["title","text","tags"];this.withExtendedFields=c};abego.MultiFieldRegExpTester.prototype.test=function(b){var d=this.re;for(var a=0;a<this.fields.length;a++){var c=store.getValue(b,this.fields[a]);if(typeof c=="string"&&d.test(c)){return this.fields[a]}}if(this.withExtendedFields){return store.forEachField(b,function(e,g,f){return typeof f=="string"&&d.test(f)?g:null},true)}return null};abego.TiddlerQuery=function(b,a,d,c,e){if(d){this.regExp=new RegExp(b,a?"mg":"img");this.tester=new abego.MultiFieldRegExpTester(this.regExp,c,e)}else{this.expr=new abego.BoolExp(b,abego.parseTiddlerFilterTerm,{defaultFields:c,caseSensitive:a,withExtendedFields:e})}this.getQueryText=function(){return b};this.getUseRegExp=function(){return d};this.getCaseSensitive=function(){return a};this.getDefaultFields=function(){return c};this.getWithExtendedFields=function(){return e}};abego.TiddlerQuery.prototype.test=function(a){if(!a){return false}if(this.regExp){return this.tester.test(a)}return this.expr.exec(a)};abego.TiddlerQuery.prototype.filter=function(a){return abego.select(a,this.test,this)};abego.TiddlerQuery.prototype.getMarkRegExp=function(){if(this.regExp){return"".search(this.regExp)>=0?null:this.regExp}return this.expr.getMarkRegExp()};abego.TiddlerQuery.prototype.toString=function(){return(this.regExp?this.regExp:this.expr).toString()};abego.PageWiseRenderer=function(){this.firstIndexOnPage=0};merge(abego.PageWiseRenderer.prototype,{setItems:function(a){this.items=a;this.setFirstIndexOnPage(0)},getMaxPagesInNavigation:function(){return 10},getItemsCount:function(a){return this.items?this.items.length:0},getCurrentPageIndex:function(){return Math.floor(this.firstIndexOnPage/this.getItemsPerPage())},getLastPageIndex:function(){return Math.floor((this.getItemsCount()-1)/this.getItemsPerPage())},setFirstIndexOnPage:function(a){this.firstIndexOnPage=Math.min(Math.max(0,a),this.getItemsCount()-1)},getFirstIndexOnPage:function(){this.firstIndexOnPage=Math.floor(this.firstIndexOnPage/this.getItemsPerPage())*this.getItemsPerPage();return this.firstIndexOnPage},getLastIndexOnPage:function(){return Math.min(this.getFirstIndexOnPage()+this.getItemsPerPage()-1,this.getItemsCount()-1)},onPageChanged:function(a,b){},renderPage:function(a){if(a.beginRendering){a.beginRendering(this)}try{if(this.getItemsCount()){var d=this.getLastIndexOnPage();var c=-1;for(var b=this.getFirstIndexOnPage();b<=d;b++){c++;a.render(this,this.items[b],b,c)}}}finally{if(a.endRendering){a.endRendering(this)}}},addPageNavigation:function(c){if(!this.getItemsCount()){return}var k=this;var g=function(n){if(!n){n=window.event}abego.consumeEvent(n);var i=abego.toInt(this.getAttribute("page"),0);var m=k.getCurrentPageIndex();if(i==m){return}var l=i*k.getItemsPerPage();k.setFirstIndexOnPage(l);k.onPageChanged(i,m)};var e;var h=this.getCurrentPageIndex();var f=this.getLastPageIndex();if(h>0){e=createTiddlyButton(c,"Previous","Go to previous page (Shortcut: Alt-'<')",g,"prev");e.setAttribute("page",(h-1).toString());e.setAttribute("accessKey","<")}for(var d=-this.getMaxPagesInNavigation();d<this.getMaxPagesInNavigation();d++){var b=h+d;if(b<0){continue}if(b>f){break}var a=(d+h+1).toString();var j=b==h?"currentPage":"otherPage";e=createTiddlyButton(c,a,"Go to page %0".format([a]),g,j);e.setAttribute("page",(b).toString())}if(h<f){e=createTiddlyButton(c,"Next","Go to next page (Shortcut: Alt-'>')",g,"next");e.setAttribute("page",(h+1).toString());e.setAttribute("accessKey",">")}}});abego.LimitedTextRenderer=function(){var l=40;var c=4;var k=function(p,z,v){var q=p.length;if(q==0){p.push({start:z,end:v});return}var u=0;for(;u<q;u++){var w=p[u];if(w.start<=v&&z<=w.end){var o;var s=u+1;for(;s<q;s++){o=p[s];if(o.start>v||z>w.end){break}}var x=z;var y=v;for(var t=u;t<s;t++){o=p[t];x=Math.min(x,o.start);y=Math.max(y,o.end)}p.splice(u,s-u,{start:x,end:y});return}if(w.start>v){break}}p.splice(u,0,{start:z,end:v})};var d=function(n){var q=0;for(var p=0;p<n.length;p++){var o=n[p];q+=o.end-o.start}return q};var b=function(n){return(n>="a"&&n<="z")||(n>="A"&&n<="Z")||n=="_"};var f=function(p,r){if(!b(p[r])){return null}for(var o=r-1;o>=0&&b(p[o]);o--){}var q=o+1;var t=p.length;for(o=r+1;o<t&&b(p[o]);o++){}return{start:q,end:o}};var a=function(o,q,p){var n;if(p){n=f(o,q)}else{if(q<=0){return q}n=f(o,q-1)}if(!n){return q}if(p){if(n.start>=q-c){return n.start}if(n.end<=q+c){return n.end}}else{if(n.end<=q+c){return n.end}if(n.start>=q-c){return n.start}}return q};var j=function(r,q){var n=[];if(q){var u=0;do{q.lastIndex=u;var o=q.exec(r);if(o){if(u<o.index){var p=r.substring(u,o.index);n.push({text:p})}n.push({text:o[0],isMatch:true});u=o.index+o[0].length}else{n.push({text:r.substr(u)});break}}while(true)}else{n.push({text:r})}return n};var i=function(p){var n=0;for(var o=0;o<p.length;o++){if(p[o].isMatch){n++}}return n};var h=function(v,u,q,t,o){var w=Math.max(Math.floor(o/(t+1)),l);var n=Math.max(w-(q-u),0);var r=Math.min(Math.floor(q+n/3),v.length);var p=Math.max(r-w,0);p=a(v,p,true);r=a(v,r,false);return{start:p,end:r}};var m=function(r,y,o){var n=[];var v=i(r);var u=0;for(var p=0;p<r.length;p++){var x=r[p];var w=x.text;if(x.isMatch){var q=h(y,u,u+w.length,v,o);k(n,q.start,q.end)}u+=w.length}return n};var g=function(t,p,o){var n=o-d(p);while(n>0){if(p.length==0){k(p,0,a(t,o,false));return}else{var q=p[0];var v;var r;if(q.start==0){v=q.end;if(p.length>1){r=p[1].start}else{k(p,v,a(t,v+n,false));return}}else{v=0;r=q.start}var u=Math.min(r,v+n);k(p,v,u);n-=(u-v)}}};var e=function(p,x,w,n,o){if(n.length==0){return}var u=function(z,I,D,F,C){var H;var G;var E=0;var B=0;var A=0;for(;B<D.length;B++){H=D[B];G=H.text;if(F<E+G.length){A=F-E;break}E+=G.length}var y=C-F;for(;B<D.length&&y>0;B++){H=D[B];G=H.text.substr(A);A=0;if(G.length>y){G=G.substr(0,y)}if(H.isMatch){createTiddlyElement(z,"span",null,"marked",G)}else{createTiddlyText(z,G)}y-=G.length}if(C<I.length){abego.createEllipsis(z)}};if(n[0].start>0){abego.createEllipsis(p)}var q=o;for(var r=0;r<n.length&&q>0;r++){var t=n[r];var v=Math.min(t.end-t.start,q);u(p,x,w,t.start,t.start+v);q-=v}};this.render=function(p,q,o,t){if(q.length<o){o=q.length}var r=j(q,t);var n=m(r,q,o);g(q,n,o);e(p,q,r,n,o)}};(function(){function alertAndThrow(msg){alert(msg);throw msg}if(version.major<2||(version.major==2&&version.minor<1)){alertAndThrow("YourSearchPlugin requires TiddlyWiki 2.1 or newer.\n\nCheck the archive for YourSearch plugins\nsupporting older versions of TiddlyWiki.\n\nArchive: http://tiddlywiki.abego-software.de/archive")}abego.YourSearch={};var lastResults=undefined;var lastQuery=undefined;var setLastResults=function(array){lastResults=array};var getLastResults=function(){return lastResults?lastResults:[]};var getLastResultsCount=function(){return lastResults?lastResults.length:0};var matchInTitleWeight=4;var precisionInTitleWeight=10;var matchInTagsWeight=2;var getMatchCount=function(s,re){var m=s.match(re);return m?m.length:0};var standardRankFunction=function(tiddler,query){var markRE=query.getMarkRegExp();if(!markRE){return 1}var matchesInTitle=tiddler.title.match(markRE);var nMatchesInTitle=matchesInTitle?matchesInTitle.length:0;var nMatchesInTags=getMatchCount(tiddler.getTags(),markRE);var lengthOfMatchesInTitle=matchesInTitle?matchesInTitle.join("").length:0;var precisionInTitle=tiddler.title.length>0?lengthOfMatchesInTitle/tiddler.title.length:0;var rank=nMatchesInTitle*matchInTitleWeight+nMatchesInTags*matchInTagsWeight+precisionInTitle*precisionInTitleWeight+1;return rank};var findMatches=function(store,searchText,caseSensitive,useRegExp,sortField,excludeTag){lastQuery=null;var candidates=store.reverseLookup("tags",excludeTag,false);try{var defaultFields=[];if(config.options.chkSearchInTitle){defaultFields.push("title")}if(config.options.chkSearchInText){defaultFields.push("text")}if(config.options.chkSearchInTags){defaultFields.push("tags")}lastQuery=new abego.TiddlerQuery(searchText,caseSensitive,useRegExp,defaultFields,config.options.chkSearchExtendedFields)}catch(e){return[]}var results=lastQuery.filter(candidates);var rankFunction=abego.YourSearch.getRankFunction();for(var i=0;i<results.length;i++){var tiddler=results[i];var rank=rankFunction(tiddler,lastQuery);tiddler.searchRank=rank}if(!sortField){sortField="title"}var sortFunction=function(a,b){var searchRankDiff=a.searchRank-b.searchRank;if(searchRankDiff==0){if(a[sortField]==b[sortField]){return(0)}else{return(a[sortField]<b[sortField])?-1:+1}}else{return(searchRankDiff>0)?-1:+1}};results.sort(sortFunction);return results};var maxCharsInTitle=80;var maxCharsInTags=50;var maxCharsInText=250;var maxCharsInField=50;var itemsPerPageDefault=25;var itemsPerPageWithPreviewDefault=10;var yourSearchResultID="yourSearchResult";var yourSearchResultItemsID="yourSearchResultItems";var lastSearchText=null;var resultElement=null;var searchInputField=null;var searchButton=null;var lastNewTiddlerButton=null;var initStylesheet=function(){if(version.extensions.YourSearchPlugin.styleSheetInited){return}version.extensions.YourSearchPlugin.styleSheetInited=true;setStylesheet(store.getTiddlerText("YourSearchStyleSheet"),"yourSearch")};var isResultOpen=function(){return resultElement!=null&&resultElement.parentNode==document.body};var closeResult=function(){if(isResultOpen()){document.body.removeChild(resultElement)}};var closeResultAndDisplayTiddler=function(e){closeResult();var title=this.getAttribute("tiddlyLink");if(title){var withHilite=this.getAttribute("withHilite");var oldHighlightHack=highlightHack;if(withHilite&&withHilite=="true"&&lastQuery){highlightHack=lastQuery.getMarkRegExp()}story.displayTiddler(this,title);highlightHack=oldHighlightHack}return(false)};var adjustResultPositionAndSize=function(){if(!searchInputField){return}var root=searchInputField;var rootLeft=findPosX(root);var rootTop=findPosY(root);var rootHeight=root.offsetHeight;var popupLeft=rootLeft;var popupTop=rootTop+rootHeight;var winWidth=findWindowWidth();if(winWidth<resultElement.offsetWidth){resultElement.style.width=(winWidth-100)+"px";winWidth=findWindowWidth()}var popupWidth=resultElement.offsetWidth;if(popupLeft+popupWidth>winWidth){popupLeft=winWidth-popupWidth-30}if(popupLeft<0){popupLeft=0}resultElement.style.left=popupLeft+"px";resultElement.style.top=popupTop+"px";resultElement.style.display="block"};var scrollVisible=function(){if(resultElement){window.scrollTo(0,ensureVisible(resultElement))}if(searchInputField){window.scrollTo(0,ensureVisible(searchInputField))}};var ensureResultIsDisplayedNicely=function(){adjustResultPositionAndSize();scrollVisible()};var indexInPage=undefined;var currentTiddler=undefined;var pager=new abego.PageWiseRenderer();var MyItemRenderer=function(parent){this.itemHtml=store.getTiddlerText("YourSearchItemTemplate");if(!this.itemHtml){alertAndThrow("YourSearchItemTemplate not found")}this.place=document.getElementById(yourSearchResultItemsID);if(!this.place){this.place=createTiddlyElement(parent,"div",yourSearchResultItemsID)}};merge(MyItemRenderer.prototype,{render:function(pager,object,index,indexOnPage){indexInPage=indexOnPage;currentTiddler=object;var item=createTiddlyElement(this.place,"div",null,"yourSearchItem");item.innerHTML=this.itemHtml;applyHtmlMacros(item,null);refreshElements(item,null)},endRendering:function(pager){currentTiddler=null}});var refreshResult=function(){if(!resultElement||!searchInputField){return}var html=store.getTiddlerText("YourSearchResultTemplate");if(!html){html="<b>Tiddler YourSearchResultTemplate not found</b>"}resultElement.innerHTML=html;applyHtmlMacros(resultElement,null);refreshElements(resultElement,null);var itemRenderer=new MyItemRenderer(resultElement);pager.renderPage(itemRenderer);ensureResultIsDisplayedNicely()};pager.getItemsPerPage=function(){var n=(config.options.chkPreviewText)?abego.toInt(config.options.txtItemsPerPageWithPreview,itemsPerPageWithPreviewDefault):abego.toInt(config.options.txtItemsPerPage,itemsPerPageDefault);return(n>0)?n:1};pager.onPageChanged=function(){refreshResult()};var reopenResultIfApplicable=function(){if(searchInputField==null||!config.options.chkUseYourSearch){return}if((searchInputField.value==lastSearchText)&&lastSearchText&&!isResultOpen()){if(resultElement&&(resultElement.parentNode!=document.body)){document.body.appendChild(resultElement);ensureResultIsDisplayedNicely()}else{abego.YourSearch.onShowResult(true)}}};var invalidateResult=function(){closeResult();resultElement=null;lastSearchText=null};var isDescendantOrSelf=function(self,e){while(e!=null){if(self==e){return true}e=e.parentNode}return false};var onDocumentClick=function(e){if(e.target==searchInputField){return}if(e.target==searchButton){return}if(resultElement&&isDescendantOrSelf(resultElement,e.target)){return}closeResult()};var onDocumentKeyup=function(e){if(e.keyCode==27){closeResult()}};addEvent(document,"click",onDocumentClick);addEvent(document,"keyup",onDocumentKeyup);var myStorySearch=function(text,useCaseSensitive,useRegExp){lastSearchText=text;setLastResults(findMatches(store,text,useCaseSensitive,useRegExp,"title","excludeSearch"));abego.YourSearch.onShowResult()};var myMacroSearchHandler=function(place,macroName,params,wikifier,paramString,tiddler){initStylesheet();lastSearchText="";var searchTimeout=null;var doSearch=function(txt){if(config.options.chkUseYourSearch){myStorySearch(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch)}else{story.search(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch)}lastSearchText=txt.value};var clickHandler=function(e){doSearch(searchInputField);return false};var keyHandler=function(e){if(!e){e=window.event}searchInputField=this;switch(e.keyCode){case 13:if(e.ctrlKey&&lastNewTiddlerButton&&isResultOpen()){lastNewTiddlerButton.onclick.apply(lastNewTiddlerButton,[e])}else{doSearch(this)}break;case 27:if(isResultOpen()){closeResult()}else{this.value="";clearMessage()}break}if(String.fromCharCode(e.keyCode)==this.accessKey||e.altKey){reopenResultIfApplicable()}if(this.value.length<3&&searchTimeout){clearTimeout(searchTimeout)}if(this.value.length>2){if(this.value!=lastSearchText){if(!config.options.chkUseYourSearch||config.options.chkSearchAsYouType){if(searchTimeout){clearTimeout(searchTimeout)}var txt=this;searchTimeout=setTimeout(function(){doSearch(txt)},500)}}else{if(searchTimeout){clearTimeout(searchTimeout)}}}if(this.value.length==0){closeResult()}};var focusHandler=function(e){this.select();clearMessage();reopenResultIfApplicable()};var args=paramString.parseParams("list",null,true);var buttonAtRight=getFlag(args,"buttonAtRight");var sizeTextbox=getParam(args,"sizeTextbox",this.sizeTextbox);var txt=createTiddlyElement(null,"input",null,"txtOptionInput searchField",null);if(params[0]){txt.value=params[0]}txt.onkeyup=keyHandler;txt.onfocus=focusHandler;txt.setAttribute("size",sizeTextbox);txt.setAttribute("accessKey",this.accessKey);txt.setAttribute("autocomplete","off");if(config.browser.isSafari){txt.setAttribute("type","search");txt.setAttribute("results","5")}else{if(!config.browser.isIE){txt.setAttribute("type","text")}}var btn=createTiddlyButton(null,this.label,this.prompt,clickHandler);if(place){if(!buttonAtRight){place.appendChild(btn)}place.appendChild(txt);if(buttonAtRight){place.appendChild(btn)}}searchInputField=txt;searchButton=btn};var openAllFoundTiddlers=function(){closeResult();var results=getLastResults();var n=results.length;if(n){var titles=[];for(var i=0;i<n;i++){titles.push(results[i].title)}story.displayTiddlers(null,titles)}};var createOptionWithRefresh=function(place,optionParams,wikifier,tiddler){invokeMacro(place,"option",optionParams,wikifier,tiddler);var elem=place.lastChild;var oldOnClick=elem.onclick;elem.onclick=function(e){var result=oldOnClick.apply(this,arguments);refreshResult();return result};return elem};var removeTextDecoration=function(s){var removeThis=["''","{{{","}}}","//","<<<","/***","***/"];var reText="";for(var i=0;i<removeThis.length;i++){if(i!=0){reText+="|"}reText+="("+removeThis[i].escapeRegExp()+")"}return s.replace(new RegExp(reText,"mg"),"").trim()};var getShortCutNumber=function(){var i=indexInPage;return(i>=0&&i<=9)?(i<9?(i+1):0):-1};var limitedTextRenderer=new abego.LimitedTextRenderer();var renderLimitedText=function(place,s,maxLen){limitedTextRenderer.render(place,s,maxLen,lastQuery.getMarkRegExp())};var oldTiddlyWikiSaveTiddler=TiddlyWiki.prototype.saveTiddler;TiddlyWiki.prototype.saveTiddler=function(title,newTitle,newBody,modifier,modified,tags,fields){oldTiddlyWikiSaveTiddler.apply(this,arguments);invalidateResult()};var oldTiddlyWikiRemoveTiddler=TiddlyWiki.prototype.removeTiddler;TiddlyWiki.prototype.removeTiddler=function(title){oldTiddlyWikiRemoveTiddler.apply(this,arguments);invalidateResult()};config.macros.yourSearch={label:"yourSearch",prompt:"Gives access to the current/last YourSearch result",handler:function(place,macroName,params,wikifier,paramString,tiddler){if(params.length==0){return}var name=params[0];var func=config.macros.yourSearch.funcs[name];if(func){func(place,macroName,params,wikifier,paramString,tiddler)}},tests:{"true":function(){return true},"false":function(){return false},found:function(){return getLastResultsCount()>0},previewText:function(){return config.options.chkPreviewText}},funcs:{itemRange:function(place){if(getLastResultsCount()){var lastIndex=pager.getLastIndexOnPage();var s="%0 - %1".format([pager.getFirstIndexOnPage()+1,lastIndex+1]);createTiddlyText(place,s)}},count:function(place){createTiddlyText(place,getLastResultsCount().toString())},query:function(place){if(lastQuery){createTiddlyText(place,lastQuery.toString())}},version:function(place){var t="YourSearch %0.%1.%2".format([version.extensions.YourSearchPlugin.major,version.extensions.YourSearchPlugin.minor,version.extensions.YourSearchPlugin.revision]);var e=createTiddlyElement(place,"a");e.setAttribute("href","http://tiddlywiki.abego-software.de/#YourSearchPlugin");e.innerHTML='<font color="black" face="Arial, Helvetica, sans-serif">'+t+"<font>"},copyright:function(place){var e=createTiddlyElement(place,"a");e.setAttribute("href","http://www.abego-software.de");e.innerHTML='<font color="black" face="Arial, Helvetica, sans-serif">&copy; 2005-2008 <b><font color="red">abego</font></b> Software<font>'},newTiddlerButton:function(place){if(lastQuery){var r=abego.parseNewTiddlerCommandLine(lastQuery.getQueryText());var btn=config.macros.newTiddler.createNewTiddlerButton(place,r.title,r.params,"new tiddler","Create a new tiddler based on search text. (Shortcut: Ctrl-Enter; Separators: '.', '#')",null,"text");var oldOnClick=btn.onclick;btn.onclick=function(){closeResult();oldOnClick.apply(this,arguments)};lastNewTiddlerButton=btn}},linkButton:function(place,macroName,params,wikifier,paramString,tiddler){if(params<2){return}var tiddlyLink=params[1];var text=params<3?tiddlyLink:params[2];var tooltip=params<4?text:params[3];var accessKey=params<5?null:params[4];var btn=createTiddlyButton(place,text,tooltip,closeResultAndDisplayTiddler,null,null,accessKey);btn.setAttribute("tiddlyLink",tiddlyLink)},closeButton:function(place,macroName,params,wikifier,paramString,tiddler){createTiddlyButton(place,"close","Close the Search Results (Shortcut: ESC)",closeResult)},openAllButton:function(place,macroName,params,wikifier,paramString,tiddler){var n=getLastResultsCount();if(n==0){return}var title=n==1?"open tiddler":"open all %0 tiddlers".format([n]);var button=createTiddlyButton(place,title,"Open all found tiddlers (Shortcut: Alt-O)",openAllFoundTiddlers);button.setAttribute("accessKey","O")},naviBar:function(place,macroName,params,wikifier,paramString,tiddler){pager.addPageNavigation(place)},"if":function(place,macroName,params,wikifier,paramString,tiddler){if(params.length<2){return}var testName=params[1];var negate=(testName=="not");if(negate){if(params.length<3){return}testName=params[2]}var test=config.macros.yourSearch.tests[testName];var showIt=false;try{if(test){showIt=test(place,macroName,params,wikifier,paramString,tiddler)!=negate}else{showIt=(!eval(testName))==negate}}catch(ex){}if(!showIt){place.style.display="none"}},chkPreviewText:function(place,macroName,params,wikifier,paramString,tiddler){var elem=createOptionWithRefresh(place,"chkPreviewText",wikifier,tiddler);elem.setAttribute("accessKey","P");elem.title="Show text preview of found tiddlers (Shortcut: Alt-P)";return elem}}};config.macros.foundTiddler={label:"foundTiddler",prompt:"Provides information on the tiddler currently processed on the YourSearch result page",handler:function(place,macroName,params,wikifier,paramString,tiddler){var name=params[0];var func=config.macros.foundTiddler.funcs[name];if(func){func(place,macroName,params,wikifier,paramString,tiddler)}},funcs:{title:function(place,macroName,params,wikifier,paramString,tiddler){if(!currentTiddler){return}var shortcutNumber=getShortCutNumber();var tooltip=shortcutNumber>=0?"Open tiddler (Shortcut: Alt-%0)".format([shortcutNumber.toString()]):"Open tiddler";var btn=createTiddlyButton(place,null,tooltip,closeResultAndDisplayTiddler,null);btn.setAttribute("tiddlyLink",currentTiddler.title);btn.setAttribute("withHilite","true");renderLimitedText(btn,currentTiddler.title,maxCharsInTitle);if(shortcutNumber>=0){btn.setAttribute("accessKey",shortcutNumber.toString())}},tags:function(place,macroName,params,wikifier,paramString,tiddler){if(!currentTiddler){return}renderLimitedText(place,currentTiddler.getTags(),maxCharsInTags)},text:function(place,macroName,params,wikifier,paramString,tiddler){if(!currentTiddler){return}renderLimitedText(place,removeTextDecoration(currentTiddler.text),maxCharsInText)},field:function(place,macroName,params,wikifier,paramString,tiddler){if(!currentTiddler){return}var name=params[1];var len=params.length>2?abego.toInt(params[2],maxCharsInField):maxCharsInField;var v=store.getValue(currentTiddler,name);if(v){renderLimitedText(place,removeTextDecoration(v),len)}},number:function(place,macroName,params,wikifier,paramString,tiddler){var numberToDisplay=getShortCutNumber();if(numberToDisplay>=0){var text="%0)".format([numberToDisplay.toString()]);createTiddlyElement(place,"span",null,"shortcutNumber",text)}}}};var opts={chkUseYourSearch:true,chkPreviewText:true,chkSearchAsYouType:true,chkSearchInTitle:true,chkSearchInText:true,chkSearchInTags:true,chkSearchExtendedFields:true,txtItemsPerPage:itemsPerPageDefault,txtItemsPerPageWithPreview:itemsPerPageWithPreviewDefault};for(var n in opts){if(config.options[n]==undefined){config.options[n]=opts[n]}}config.shadowTiddlers.AdvancedOptions+="\n<<option chkUseYourSearch>> Use 'Your Search' //([[more options|YourSearch Options]]) ([[help|YourSearch Help]])// ";config.shadowTiddlers["YourSearch Help"]="!Field Search\nWith the Field Search you can restrict your search to certain fields of a tiddler, e.g only search the tags or only the titles. The general form is //fieldname//'':''//textToSearch// (e.g. {{{title:intro}}}). In addition one-character shortcuts are also supported for the standard fields {{{title}}}, {{{text}}} and {{{tags}}}:\n|!What you want|!What you type|!Example|\n|Search ''titles only''|start word with ''!''|{{{!jonny}}} (shortcut for {{{title:jonny}}})|\n|Search ''contents/text only''|start word with ''%''|{{{%football}}} (shortcut for {{{text:football}}})|\n|Search ''tags only''|start word with ''#''|{{{#Plugin}}} (shortcut for {{{tags:Plugin}}})|\n\nUsing this feature you may also search the extended fields (\"Metadata\") introduced with TiddlyWiki 2.1, e.g. use {{{priority:1}}} to find all tiddlers with the priority field set to \"1\".\n\nYou may search a word in more than one field. E.g. {{{!#Plugin}}} (or {{{title:tags:Plugin}}} in the \"long form\") finds tiddlers containing \"Plugin\" either in the title or in the tags (but does not look for \"Plugin\" in the text). \n\n!Boolean Search\nThe Boolean Search is useful when searching for multiple words.\n|!What you want|!What you type|!Example|\n|''All words'' must exist|List of words|{{{jonny jeremy}}} (or {{{jonny and jeremy}}})|\n|''At least one word'' must exist|Separate words by ''or''|{{{jonny or jeremy}}}|\n|A word ''must not exist''|Start word with ''-''|{{{-jonny}}} (or {{{not jonny}}})|\n\n''Note:'' When you specify two words, separated with a space, YourSearch finds all tiddlers that contain both words, but not necessarily next to each other. If you want to find a sequence of word, e.g. '{{{John Brown}}}', you need to put the words into quotes. I.e. you type: {{{\"john brown\"}}}.\n\nUsing parenthesis you may change the default \"left to right\" evaluation of the boolean search. E.g. {{{not (jonny or jeremy)}}} finds all tiddlers that contain neither \"jonny\" nor \"jeremy. In contrast to this {{{not jonny or jeremy}}} (i.e. without parenthesis) finds all tiddlers that either don't contain \"jonny\" or that contain \"jeremy\".\n\n!'Exact Word' Search\nBy default a search result all matches that 'contain' the searched text. E.g. if you search for {{{Task}}} you will get all tiddlers containing 'Task', but also '~CompletedTask', '~TaskForce' etc.\n\nIf you only want to get the tiddlers that contain 'exactly the word' you need to prefix it with a '='. E.g. typing '=Task' will find the tiddlers that contain the word 'Task', ignoring words that just contain 'Task' as a substring.\n\n!~CaseSensitiveSearch and ~RegExpSearch\nThe standard search options ~CaseSensitiveSearch and ~RegExpSearch are fully supported by YourSearch. However when ''~RegExpSearch'' is on Filtered and Boolean Search are disabled.\n\nIn addition you may do a \"regular expression\" search even with the ''~RegExpSearch'' set to false by directly entering the regular expression into the search field, framed with {{{/.../}}}. \n\nExample: {{{/m[ae][iy]er/}}} will find all tiddlers that contain either \"maier\", \"mayer\", \"meier\" or \"meyer\".\n\n!~JavaScript Expression Filtering\nIf you are familiar with JavaScript programming and know some TiddlyWiki internals you may also use JavaScript expression for the search. Just enter a JavaScript boolean expression into the search field, framed with {{{ { ... } }}}. In the code refer to the variable tiddler and evaluate to {{{true}}} when the given tiddler should be included in the result. \n\nExample: {{{ { tiddler.modified > new Date(\"Jul 4, 2005\")} }}} returns all tiddler modified after July 4th, 2005.\n\n!Combined Search\nYou are free to combine the various search options. \n\n''Examples''\n|!What you type|!Result|\n|{{{!jonny !jeremy -%football}}}|all tiddlers with both {{{jonny}}} and {{{jeremy}}} in its titles, but no {{{football}}} in content.|\n|{{{#=Task}}}|All tiddlers tagged with 'Task' (the exact word). Tags named '~CompletedTask', '~TaskForce' etc. are not considered.|\n\n!Access Keys\nYou are encouraged to use the access keys (also called \"shortcut\" keys) for the most frequently used operations. For quick reference these shortcuts are also mentioned in the tooltip for the various buttons etc.\n\n|!Key|!Operation|\n|{{{Alt-F}}}|''The most important keystroke'': It moves the cursor to the search input field so you can directly start typing your query. Pressing {{{Alt-F}}} will also display the previous search result. This way you can quickly display multiple tiddlers using \"Press {{{Alt-F}}}. Select tiddler.\" sequences.|\n|{{{ESC}}}|Closes the [[YourSearch Result]]. When the [[YourSearch Result]] is already closed and the cursor is in the search input field the field's content is cleared so you start a new query.|\n|{{{Alt-1}}}, {{{Alt-2}}},... |Pressing these keys opens the first, second etc. tiddler from the result list.|\n|{{{Alt-O}}}|Opens all found tiddlers.|\n|{{{Alt-P}}}|Toggles the 'Preview Text' mode.|\n|{{{Alt-'<'}}}, {{{Alt-'>'}}}|Displays the previous or next page in the [[YourSearch Result]].|\n|{{{Return}}}|When you have turned off the 'as you type' search mode pressing the {{{Return}}} key actually starts the search (as does pressing the 'search' button).|\n\n//If some of these shortcuts don't work for you check your browser if you have other extensions installed that already \"use\" these shortcuts.//";config.shadowTiddlers["YourSearch Options"]="|>|!YourSearch Options|\n|>|<<option chkUseYourSearch>> Use 'Your Search'|\n|!|<<option chkPreviewText>> Show Text Preview|\n|!|<<option chkSearchAsYouType>> 'Search As You Type' Mode (No RETURN required to start search)|\n|!|Default Search Filter:<<option chkSearchInTitle>>Title ('!')     <<option chkSearchInText>>Text ('%')     <<option chkSearchInTags>>Tags ('#')    <<option chkSearchExtendedFields>>Extended Fields<html><br><font size=\"-2\">The fields of a tiddlers that are searched when you don't explicitly specify a filter in the search text <br>(Explictly specify fields using one or more '!', '%', '#' or 'fieldname:' prefix before the word/text to find).</font></html>|\n|!|Number of items on search result page: <<option txtItemsPerPage>>|\n|!|Number of items on search result page with preview text: <<option txtItemsPerPageWithPreview>>|\n";config.shadowTiddlers.YourSearchStyleSheet="/***\n!~YourSearchResult Stylesheet\n***/\n/*{{{*/\n.yourSearchResult {\n\tposition: absolute;\n\twidth: 800px;\n\n\tpadding: 0.2em;\n\tlist-style: none;\n\tmargin: 0;\n\n\tbackground: #ffd;\n\tborder: 1px solid DarkGray;\n}\n\n/*}}}*/\n/***\n!!Summary Section\n***/\n/*{{{*/\n.yourSearchResult .summary {\n\tborder-bottom-width: thin;\n\tborder-bottom-style: solid;\n\tborder-bottom-color: #999999;\n\tpadding-bottom: 4px;\n}\n\n.yourSearchRange, .yourSearchCount, .yourSearchQuery   {\n\tfont-weight: bold;\n}\n\n.yourSearchResult .summary .button {\n\tfont-size: 10px;\n\n\tpadding-left: 0.3em;\n\tpadding-right: 0.3em;\n}\n\n.yourSearchResult .summary .chkBoxLabel {\n\tfont-size: 10px;\n\n\tpadding-right: 0.3em;\n}\n\n/*}}}*/\n/***\n!!Items Area\n***/\n/*{{{*/\n.yourSearchResult .marked {\n\tbackground: none;\n\tfont-weight: bold;\n}\n\n.yourSearchItem {\n\tmargin-top: 2px;\n}\n\n.yourSearchNumber {\n\tcolor: #808080;\n}\n\n\n.yourSearchTags {\n\tcolor: #008000;\n}\n\n.yourSearchText {\n\tcolor: #808080;\n\tmargin-bottom: 6px;\n}\n\n/*}}}*/\n/***\n!!Footer\n***/\n/*{{{*/\n.yourSearchFooter {\n\tmargin-top: 8px;\n\tborder-top-width: thin;\n\tborder-top-style: solid;\n\tborder-top-color: #999999;\n}\n\n.yourSearchFooter a:hover{\n\tbackground: none;\n\tcolor: none;\n}\n/*}}}*/\n/***\n!!Navigation Bar\n***/\n/*{{{*/\n.yourSearchNaviBar a {\n\tfont-size: 16px;\n\tmargin-left: 4px;\n\tmargin-right: 4px;\n\tcolor: black;\n\ttext-decoration: underline;\n}\n\n.yourSearchNaviBar a:hover {\n\tbackground-color: none;\n}\n\n.yourSearchNaviBar .prev {\n\tfont-weight: bold;\n\tcolor: blue;\n}\n\n.yourSearchNaviBar .currentPage {\n\tcolor: #FF0000;\n\tfont-weight: bold;\n\ttext-decoration: none;\n}\n\n.yourSearchNaviBar .next {\n\tfont-weight: bold;\n\tcolor: blue;\n}\n/*}}}*/\n";config.shadowTiddlers.YourSearchResultTemplate='<!--\n{{{\n-->\n<span macro="yourSearch if found">\n<!-- The Summary Header ============================================ -->\n<table class="summary" border="0" width="100%" cellspacing="0" cellpadding="0"><tbody>\n  <tr>\n\t<td align="left">\n\t\tYourSearch Result <span class="yourSearchRange" macro="yourSearch itemRange"></span>\n\t\t&nbsp;of&nbsp;<span class="yourSearchCount" macro="yourSearch count"></span>\n\t\tfor&nbsp;<span class="yourSearchQuery" macro="yourSearch query"></span>\n\t</td>\n\t<td class="yourSearchButtons" align="right">\n\t\t<span macro="yourSearch chkPreviewText"></span><span class="chkBoxLabel">preview text</span>\n\t\t<span macro="yourSearch newTiddlerButton"></span>\n\t\t<span macro="yourSearch openAllButton"></span>\n\t\t<span macro="yourSearch linkButton \'YourSearch Options\' options \'Configure YourSearch\'"></span>\n\t\t<span macro="yourSearch linkButton \'YourSearch Help\' help \'Get help how to use YourSearch\'"></span>\n\t\t<span macro="yourSearch closeButton"></span>\n\t</td>\n  </tr>\n</tbody></table>\n\n<!-- The List of Found Tiddlers ============================================ -->\n<div id="yourSearchResultItems" itemsPerPage="25" itemsPerPageWithPreview="10"></div>\n\n<!-- The Footer (with the Navigation) ============================================ -->\n<table class="yourSearchFooter" border="0" width="100%" cellspacing="0" cellpadding="0"><tbody>\n  <tr>\n\t<td align="left">\n\t\tResult page: <span class="yourSearchNaviBar" macro="yourSearch naviBar"></span>\n\t</td>\n\t<td align="right"><span macro="yourSearch version"></span>, <span macro="yourSearch copyright"></span>\n\t</td>\n  </tr>\n</tbody></table>\n<!-- end of the \'tiddlers found\' case =========================================== -->\n</span>\n\n\n<!-- The "No tiddlers found" case =========================================== -->\n<span macro="yourSearch if not found">\n<table class="summary" border="0" width="100%" cellspacing="0" cellpadding="0"><tbody>\n  <tr>\n\t<td align="left">\n\t\tYourSearch Result: No tiddlers found for <span class="yourSearchQuery" macro="yourSearch query"></span>.\n\t</td>\n\t<td class="yourSearchButtons" align="right">\n\t\t<span macro="yourSearch newTiddlerButton"></span>\n\t\t<span macro="yourSearch linkButton \'YourSearch Options\' options \'Configure YourSearch\'"></span>\n\t\t<span macro="yourSearch linkButton \'YourSearch Help\' help \'Get help how to use YourSearch\'"></span>\n\t\t<span macro="yourSearch closeButton"></span>\n\t</td>\n  </tr>\n</tbody></table>\n</span>\n\n\n<!--\n}}}\n-->\n';config.shadowTiddlers.YourSearchItemTemplate="<!--\n{{{\n-->\n<span class='yourSearchNumber' macro='foundTiddler number'></span>\n<span class='yourSearchTitle' macro='foundTiddler title'/></span>&nbsp;-&nbsp;\n<span class='yourSearchTags' macro='foundTiddler field tags 50'/></span>\n<span macro=\"yourSearch if previewText\"><div class='yourSearchText' macro='foundTiddler field text 250'/></div></span>\n<!--\n}}}\n-->";config.shadowTiddlers.YourSearch="<<tiddler [[YourSearch Help]]>>";config.shadowTiddlers["YourSearch Result"]="The popup-like window displaying the result of a YourSearch query.";config.macros.search.handler=myMacroSearchHandler;var checkForOtherHijacker=function(){if(config.macros.search.handler!=myMacroSearchHandler){alert("Message from YourSearchPlugin:\n\n\nAnother plugin has disabled the 'Your Search' features.\n\n\nYou may disable the other plugin or change the load order of \nthe plugins (by changing the names of the tiddlers)\nto enable the 'Your Search' features.")}};setTimeout(checkForOtherHijacker,5000);abego.YourSearch.getStandardRankFunction=function(){return standardRankFunction};abego.YourSearch.getRankFunction=function(){return abego.YourSearch.getStandardRankFunction()};abego.YourSearch.getCurrentTiddler=function(){return currentTiddler};abego.YourSearch.closeResult=function(){closeResult()};abego.YourSearch.getFoundTiddlers=function(){return lastResults};abego.YourSearch.getQuery=function(){return lastQuery};abego.YourSearch.onShowResult=function(useOldResult){highlightHack=lastQuery?lastQuery.getMarkRegExp():null;if(!useOldResult){pager.setItems(getLastResults())}if(!resultElement){resultElement=createTiddlyElement(document.body,"div",yourSearchResultID,"yourSearchResult")}else{if(resultElement.parentNode!=document.body){document.body.appendChild(resultElement)}}refreshResult();highlightHack=null}})()};
//%/
Type the text for 'New Tiddler'
Type the text for 'New Tiddler'
Type the text for 'New Tiddler'