tbGTD is loading...
requires javascript
tbGTD - a tiddlywiki based system to Get Things Done
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
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
/*{{{*/
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]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.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]];}

#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:0px; top:0px;}

.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:0px 3px 0px 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:0px; padding-bottom:0px;}

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

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.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='header' 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' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' 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>
<!--}}}-->
<!--{{{-->
<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>>
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]]
<<importTiddlers>>
done actions...
furure actions...
next actions to do...
queued actions...
Actions waiting for a certain event before they are actionable...
active projects...
completed projects...
projects that may be undertaken in the future...
deferred projects...
family stuff...
related to friends...
research and such...
related to sports...
development related issues
private stuff...
work related things...
company contact informations...
my friends...
social contacts and organisations...
(information) technology related contacts...
work related contacts...
calls to make...
developping stuff...
get the hammer out...
go, get it...
Stuff I need to find (or research)...
where I need to go...
mail to write...
things to read...
/***
|''Name:''|AccordionMenuPlugin|
|''Description:''|Turn an unordered list into an accordion style menu|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#AccordionMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0|
|''Date:''|03/11/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|
((_@@color:red;modified version for tbGTD@@(''Note'': This version has been modified for tbGTD, i.e. doubleclick opening all categories.)))
!!Usage:
* put {{{<<accordion>>}}} on the line after your unordered list
!!Customizing:
* customize the css via the shadow tiddler [[StyleSheetAccordionMenu]]
* or give the list a custom class by passing the classes as parameters to the macro.
** Eg: {{{<<accordion ClassName1 ClassName2>>}}}
***/
//{{{
config.macros.accordion={
	dblClick:true, //allows doubleclick to open all
	dropchar:"", //" \u00BB",
	handler:function(place,macroName,params,wikifier,paramString,tiddler){
		list=findRelated(place.lastChild,"UL","tagName","previousSibling");
		if(!list)return;
		addClass(list,"accordion");
		if(params.length)addClass(list,paramString);
		this.fixLinks(list.childNodes);		
	},
	fixLinks:function(els){
		for(var i=0;i<els.length;i++){
			if(els[i].tagName.toLowerCase()=="li"){
				var link=findRelated(els[i].firstChild,"A","tagName","nextSibling");
				if(!link){
					var ih=els[i].firstChild.data;
					els[i].removeChild(els[i].firstChild);
					link=createTiddlyElement(null,"a",null,null,ih+this.dropchar,{href:"javascript:;"});
					els[i].insertBefore(link,els[i].firstChild);
				}
				else{
					link.firstChild.data=link.firstChild.data + this.dropchar;
					removeClass(link,"tiddlyLinkNonExisting");
				}
				link.onclick=this.show;
				addClass(link,'main');
				if(this.dblClick)link.ondblclick=this.showall;
			}
		}
	},
	showall:function(e){
		var i,u=this.parentNode.parentNode;
		for(i=0;i<u.childNodes.length;i++)u.childNodes[i].setAttribute('class','accordion-active')
	},
	show:function(e){
		var list=this.parentNode.parentNode;
		var els=list.childNodes;
		for(var i=0;i<els.length;i++){removeClass(els[i],"accordion-active");}
		addClass(this.parentNode,"accordion-active");
	}	
}
config.shadowTiddlers["StyleSheetAccordionMenu"] =
	 "ul.accordion li ul {display:none;}\n"+
	 "ul.accordion li.accordion-active ul {display:block;}\n"+
store.addNotification("StyleSheetAccordionMenu",refreshStyles);
//}}}
/***
|Name|CalendarPlugin|
|Source|http://www.TiddlyTools.com/#CalendarPlugin|
|Version|1.5.0|
|Author|Eric Shulman|
|Original Author|SteveRumsby|
|License|unknown|
|~CoreVersion|2.1|
|Type|plugin|
|Description|display monthly and yearly calendars|
NOTE: For //enhanced// date popup display, optionally install [[DatePlugin]] and [[ReminderMacros]]
!!!Usage:
<<<
|{{{<<calendar>>}}}|full-year calendar for the current year|
|{{{<<calendar year>>}}}|full-year calendar for the specified year|
|{{{<<calendar year month>>}}}|one month calendar for the specified month and year|
|{{{<<calendar thismonth>>}}}|one month calendar for the current month|
|{{{<<calendar lastmonth>>}}}|one month calendar for last month|
|{{{<<calendar nextmonth>>}}}|one month calendar for next month|
|{{{<<calendar +n>>}}}<br>{{{<<calendar -n>>}}}|one month calendar for a month +/- 'n' months from now|
<<<
!!!Configuration:
<<<
|''First day of week:''<br>{{{config.options.txtCalFirstDay}}}|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|
|''First day of weekend:''<br>{{{config.options.txtCalStartOfWeekend}}}|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|
<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//
|''Week number display format:''<br>{{{config.options.txtWeekNumberDisplayFormat }}}|<<option txtWeekNumberDisplayFormat >>|
|''Week number link format:''<br>{{{config.options.txtWeekNumberLinkFormat }}}|<<option txtWeekNumberLinkFormat >>|
<<<
!!!Code
***/
//{{{
version.extensions.CalendarPlugin= { major: 1, minor: 5, revision: 0, date: new Date(2009,5,31)};
//}}}
//{{{
if(config.options.txtCalFirstDay == undefined)
	config.options.txtCalFirstDay = 0;
if(config.options.txtCalStartOfWeekend == undefined)
	config.options.txtCalStartOfWeekend = 5;
if(config.options.chkDisplayWeekNumbers == undefined)
	config.options.chkDisplayWeekNumbers = false;
if(config.options.chkDisplayWeekNumbers)
	config.options.txtCalFirstDay = 0;
if(config.options.txtWeekNumberDisplayFormat == undefined)
	config.options.txtWeekNumberDisplayFormat = 'w0WW';
if(config.options.txtWeekNumberLinkFormat == undefined)
	config.options.txtWeekNumberLinkFormat = 'YYYY-w0WW';
if(config.options.txtCalendarReminderTags == undefined)
	config.options.txtCalendarReminderTags = 'reminder';

config.macros.calendar = {
	monthnames:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
	daynames:['M','T','W','T','F','S','S'],
	todaybg:'#070',
	weekendbg:'#333',
	monthbg:'#111',
	holidaybg:'#093',
	journalDateFmt:'DD MMM YYYY',
	monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],
	holidays:[ ] // for customization see [[CalendarPluginConfig]]
};
//}}}
//{{{
function calendarIsHoliday(date)
{
	var longHoliday = date.formatString('0DD/0MM/YYYY');
	var shortHoliday = date.formatString('0DD/0MM');
	for(var i = 0; i < config.macros.calendar.holidays.length; i++) {
		if(   config.macros.calendar.holidays[i]==longHoliday
		   || config.macros.calendar.holidays[i]==shortHoliday)
			return true;
	}
	return false;
}
//}}}
//{{{
config.macros.calendar.handler = function(place,macroName,params) {
	var calendar = createTiddlyElement(place, 'table', null, 'calendar', null);
	calendar.cellPadding="0";calendar.cellSpacing="0";
	var tbody = createTiddlyElement(calendar, 'tbody');
	var today = new Date();
	var year = today.getYear();
	if (year<1900) year+=1900;

 	// get journal format from SideBarOptions (ELS 5/29/06 - suggested by MartinBudden)
	var text = store.getTiddlerText('SideBarOptions');
	var re = new RegExp('<<(?:newJournal)([^>]*)>>','mg'); var fm = re.exec(text);
	if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }

	var month=-1;
	if (params[0] == 'thismonth') {
		var month=today.getMonth();
	} else if (params[0] == 'lastmonth') {
		var month = today.getMonth()-1; if (month==-1) { month=11; year--; }
	} else if (params[0] == 'nextmonth') {
		var month = today.getMonth()+1; if (month>11) { month=0; year++; }
	} else if (params[0]&&'+-'.indexOf(params[0].substr(0,1))!=-1) {
		var month = today.getMonth()+parseInt(params[0]);
		if (month>11) { year+=Math.floor(month/12); month%=12; };
		if (month<0)  { year+=Math.floor(month/12); month=12+month%12; }
	} else if (params[0]) {
		year = params[0];
		if(params[1]) month=parseInt(params[1])-1;
		if (month>11) month=11; if (month<0) month=0;
	}

	if (month!=-1) {
		cacheReminders(new Date(year, month, 1, 0, 0), 31);
		createCalendarOneMonth(tbody, year, month);
	} else {
		cacheReminders(new Date(year, 0, 1, 0, 0), 366);
		createCalendarYear(tbody, year);
	}
	window.reminderCacheForCalendar = null;
}
//}}}
//{{{
// cache used to store reminders while the calendar is being rendered
// it will be renulled after the calendar is fully rendered.
window.reminderCacheForCalendar = null;
//}}}
//{{{
function cacheReminders(date, leadtime)
{
	if (window.findTiddlersWithReminders == null) return;
	window.reminderCacheForCalendar = {};
	var leadtimeHash = [];
	leadtimeHash [0] = 0;
	leadtimeHash [1] = leadtime;
	var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);
	for(var i = 0; i < t.length; i++) {
		//just tag it in the cache, so that when we're drawing days, we can bold this one.
		window.reminderCacheForCalendar[t[i]['matchedDate']] = 'reminder:' + t[i]['params']['title']; 
	}
}
//}}}
//{{{
function createCalendarOneMonth(calendar, year, mon)
{
	var row = createTiddlyElement(calendar, 'tr');
	createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon]+' '+year, true, year, mon);
	row = createTiddlyElement(calendar, 'tr');
	createCalendarDayHeader(row, 1);
	createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarMonth(calendar, year, mon)
{
	var row = createTiddlyElement(calendar, 'tr');
	createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon]+' '+ year, false, year, mon);
	row = createTiddlyElement(calendar, 'tr');
	createCalendarDayHeader(row, 1);
	createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarYear(calendar, year)
{
	var row;
	row = createTiddlyElement(calendar, 'tr');
	var back = createTiddlyElement(row, 'td');
	var backHandler = function() {
		removeChildren(calendar);
		createCalendarYear(calendar, parseInt(year)-1);
		return false; // consume click
	};
	createTiddlyButton(back, '<', 'Previous year', backHandler);
	back.align = 'center';
	var yearHeader = createTiddlyElement(row, 'td', null, 'calendarYear', year);
	yearHeader.align = 'center';
	yearHeader.setAttribute('colSpan',config.options.chkDisplayWeekNumbers?22:19);//wn**
	var fwd = createTiddlyElement(row, 'td');
	var fwdHandler = function() {
		removeChildren(calendar);
		createCalendarYear(calendar, parseInt(year)+1);
		return false; // consume click
	};
	createTiddlyButton(fwd, '>', 'Next year', fwdHandler);
	fwd.align = 'center';
	createCalendarMonthRow(calendar, year, 0);
	createCalendarMonthRow(calendar, year, 3);
	createCalendarMonthRow(calendar, year, 6);
	createCalendarMonthRow(calendar, year, 9);
}
//}}}
//{{{
function createCalendarMonthRow(cal, year, mon)
{
	var row = createTiddlyElement(cal, 'tr');
	createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);
	createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);
	createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);
	row = createTiddlyElement(cal, 'tr');
	createCalendarDayHeader(row, 3);
	createCalendarDayRows(cal, year, mon);
}
//}}}
//{{{
function createCalendarMonthHeader(cal, row, name, nav, year, mon)
{
	var month;
	if (nav) {
		var back = createTiddlyElement(row, 'td');
		back.align = 'center';
		back.style.background = config.macros.calendar.monthbg;

		var backMonHandler = function() {
			var newyear = year;
			var newmon = mon-1;
			if(newmon == -1) { newmon = 11; newyear = newyear-1;}
			removeChildren(cal);
			cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
			createCalendarOneMonth(cal, newyear, newmon);
			return false; // consume click
		};
		createTiddlyButton(back, '<', 'Previous month', backMonHandler);
		month = createTiddlyElement(row, 'td', null, 'calendarMonthname')
		createTiddlyLink(month,name,true);
		month.setAttribute('colSpan', config.options.chkDisplayWeekNumbers?6:5);//wn**
		var fwd = createTiddlyElement(row, 'td');
		fwd.align = 'center';
		fwd.style.background = config.macros.calendar.monthbg; 

		var fwdMonHandler = function() {
			var newyear = year;
			var newmon = mon+1;
			if(newmon == 12) { newmon = 0; newyear = newyear+1;}
			removeChildren(cal);
			cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
			createCalendarOneMonth(cal, newyear, newmon);
			return false; // consume click
		};
		createTiddlyButton(fwd, '>', 'Next month', fwdMonHandler);
	} else {
		month = createTiddlyElement(row, 'td', null, 'calendarMonthname', name)
		month.setAttribute('colSpan',config.options.chkDisplayWeekNumbers?8:7);//wn**
	}
	month.align = 'center';
	month.style.background = config.macros.calendar.monthbg;
}
//}}}
//{{{
function createCalendarDayHeader(row, num)
{
	var cell;
	for(var i = 0; i < num; i++) {
		if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, 'td');//wn**
		for(var j = 0; j < 7; j++) {
			var d = j + (config.options.txtCalFirstDay - 0);
			if(d > 6) d = d - 7;
			cell = createTiddlyElement(row, 'td', null, null);
			createTiddlyElement(cell,'span',null,'button',config.macros.calendar.daynames[d]);
			if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))
				cell.style.background = config.macros.calendar.weekendbg;
		}
	}
}
//}}}
//{{{
function createCalendarDays(row, col, first, max, year, mon) {
	var i;
	if (config.options.chkDisplayWeekNumbers){
		if (first<=max) {
			var ww = new Date(year,mon,first);
			var td=createTiddlyElement(row, 'td');//wn**
			var link=createTiddlyLink(td,ww.formatString(config.options.txtWeekNumberLinkFormat),false,"weekNo");
			link.appendChild(document.createTextNode(
				ww.formatString(config.options.txtWeekNumberDisplayFormat)));
		}
		else createTiddlyElement(row, 'td');//wn**
	}
	for(i = 0; i < col; i++)
		createTiddlyElement(row, 'td');
	var day = first;
	for(i = col; i < 7; i++) {
		var d = i + (config.options.txtCalFirstDay - 0);
		if(d > 6) d = d - 7;
		var daycell = createTiddlyElement(row, 'td');
		var isaWeekend=((d==(config.options.txtCalStartOfWeekend-0)
			|| d==(config.options.txtCalStartOfWeekend-0+1))?true:false);
		if(day > 0 && day <= max) {
			var celldate = new Date(year, mon, day);
			// ELS 10/30/05 - use <<date>> macro's showDate() function to create popup
			// ELS 05/29/06 - use journalDateFmt 
			if (window.showDate) showDate(daycell,celldate,'popup','DD',
				config.macros.calendar.journalDateFmt,true, isaWeekend);
			else {
				if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;
				var title = celldate.formatString(config.macros.calendar.journalDateFmt);
				if(calendarIsHoliday(celldate))
					daycell.style.background = config.macros.calendar.holidaybg;
				var now=new Date();
				if ((now-celldate>=0) && (now-celldate<86400000)) // is today?
					daycell.style.background = config.macros.calendar.todaybg;
				if(window.findTiddlersWithReminders == null) {
					var link = createTiddlyLink(daycell, title, false);
					link.appendChild(document.createTextNode(day));
				} else
					var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);
			}
		}
		day++;
	}
}
//}}}
//{{{
// Create a pop-up containing:
// * a link to a tiddler for this date
// * a 'new tiddler' link to add a reminder for this date
// * links to current reminders for this date
// NOTE: this code is only used if [[ReminderMacros]] is installed AND [[DatePlugin]] is //not// installed.
function onClickCalendarDate(ev) { ev=ev||window.event;
	var d=new Date(this.getAttribute('title')); var date=d.formatString(config.macros.calendar.journalDateFmt);
	var p=Popup.create(this);  if (!p) return;
	createTiddlyLink(createTiddlyElement(p,'li'),date,true);
	var rem='\\n\\<\\<reminder day:%0 month:%1 year:%2 title: \\>\\>';
	rem=rem.format([d.getDate(),d.getMonth()+1,d.getYear()+1900]);
	var cmd="<<newTiddler label:[[new reminder...]] prompt:[[add a new reminder to '%0']]"
		+" title:[[%0]] text:{{store.getTiddlerText('%0','')+'%1'}} tag:%2>>";
	wikify(cmd.format([date,rem,config.options.txtCalendarReminderTags]),p);
	createTiddlyElement(p,'hr');
	var t=findTiddlersWithReminders(d,[0,31],null,1);
	for(var i=0; i<t.length; i++) {
		var link=createTiddlyLink(createTiddlyElement(p,'li'), t[i].tiddler, false);
		link.appendChild(document.createTextNode(t[i]['params']['title']));
	}
	Popup.show(); ev.cancelBubble=true; if (ev.stopPropagation) ev.stopPropagation(); return false;
}
//}}}
//{{{
function calendarMaxDays(year, mon)
{
	var max = config.macros.calendar.monthdays[mon];
	if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) max++;
	return max;
}
//}}}
//{{{
function createCalendarDayRows(cal, year, mon)
{
	var row = createTiddlyElement(cal, 'tr');
	var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
	if(first1 < 0) first1 = first1 + 7;
	var day1 = -first1 + 1;
	var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
	if(first2 < 0) first2 = first2 + 7;
	var day2 = -first2 + 1;
	var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
	if(first3 < 0) first3 = first3 + 7;
	var day3 = -first3 + 1;

	var max1 = calendarMaxDays(year, mon);
	var max2 = calendarMaxDays(year, mon+1);
	var max3 = calendarMaxDays(year, mon+2);

	while(day1 <= max1 || day2 <= max2 || day3 <= max3) {
		row = createTiddlyElement(cal, 'tr');
		createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
		createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;
		createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;
	}
}
//}}}
//{{{
function createCalendarDayRowsSingle(cal, year, mon)
{
	var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
	if(first1 < 0) first1 = first1+ 7;
	var day1 = -first1 + 1;
	var max1 = calendarMaxDays(year, mon);
	while(day1 <= max1) {
		row = createTiddlyElement(cal, 'tr');
		createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
	}
}
//}}}
//{{{
setStylesheet('.calendar, .calendar table, .calendar th, .calendar tr, .calendar td { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }', 'calendarStyles');
//}}}
Background: #fff
Foreground: #000
PrimaryPale: #EEE
PrimaryLight: #777
PrimaryMid: #111
PrimaryDark: #000
SecondaryPale: #EEF
SecondaryLight: #CCF
SecondaryMid: #69C
SecondaryDark: #36C
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #333
Error: #f88
/***
|Name|[[DatePlugin]]|
|Source|http://www.TiddlyTools.com/#DatePlugin|
|Documentation|http://www.TiddlyTools.com/#DatePluginInfo|
|Version|2.7.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|formatted dates plus popup menu with 'journal' link, changes and (optional) reminders|
This plugin provides a general approach to displaying formatted dates and/or links and popups that permit easy navigation and management of tiddlers based on their creation/modification dates.
!!!!!Documentation
>see [[DatePluginInfo]]
!!!!!Configuration
<<<
<<option chkDatePopupHideCreated>> omit 'created' section from date popups
<<option chkDatePopupHideChanged>> omit 'changed' section from date popups
<<option chkDatePopupHideTagged>> omit 'tagged' section from date popups
<<option chkDatePopupHideReminders>> omit 'reminders' section from date popups
<<option chkShowJulianDate>> display Julian day number (1-365) below current date

see [[DatePluginConfig]] for additional configuration settings, for use in calendar displays, including:
*date formats
*color-coded backgrounds
*annual fixed-date holidays
*weekends
<<<
!!!!!Code
***/
//{{{
version.extensions.DatePlugin= {major: 2, minor: 7, revision: 1, date: new Date(2009,5,31)};

config.macros.date = {
	format: 'YYYY.0MM.0DD', // default date display format
	linkformat: 'YYYY.0MM.0DD', // 'dated tiddler' link format
	linkedbg: '#033',
	todaybg: '#070',
	weekendbg: '#333',
	holidaybg: '#662',
	createdbg: '#026',
	modifiedsbg: '#406',
	remindersbg: '#800',
	weekend: [ 1,0,0,0,0,0,1 ], // [ day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6 ],
	holidays: [ '01/01', '07/04', '07/24', '11/24' ]
	// NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)
};

config.macros.date.handler = function(place,macroName,params)
{
	// default: display current date
	var now =new Date();
	var date=now;
	var mode='display';
	if (params[0]&&['display','popup','link'].contains(params[0].toLowerCase()))
		{ mode=params[0]; params.shift(); }

	if (!params[0] || params[0]=='today')
		{ params.shift(); }
	else if (params[0]=='filedate')
		{ date=new Date(document.lastModified); params.shift(); }
	else if (params[0]=='tiddler')
		{ date=store.getTiddler(story.findContainingTiddler(place).id.substr(7)).modified; params.shift(); }
	else if (params[0].substr(0,8)=='tiddler:')
		{ var t; if ((t=store.getTiddler(params[0].substr(8)))) date=t.modified; params.shift(); }
	else {
		var y = eval(params.shift().replace(/Y/ig,(now.getYear()<1900)?now.getYear()+1900:now.getYear()));
		var m = eval(params.shift().replace(/M/ig,now.getMonth()+1));
		var d = eval(params.shift().replace(/D/ig,now.getDate()+0));
		date = new Date(y,m-1,d);
	}
	// date format with optional custom override
	var format=this.format; if (params[0]) format=params.shift();
	var linkformat=this.linkformat; if (params[0]) linkformat=params.shift();
	showDate(place,date,mode,format,linkformat);
}

window.showDate=showDate;
function showDate(place,date,mode,format,linkformat,autostyle,weekend)
{
	mode	  =mode||'display';
	format	  =format||config.macros.date.format;
	linkformat=linkformat||config.macros.date.linkformat;

	// format the date output
	var title=date.formatString(format);
	var linkto=date.formatString(linkformat);

	// just show the formatted output
	if (mode=='display') { place.appendChild(document.createTextNode(title)); return; }

	// link to a 'dated tiddler'
	var link = createTiddlyLink(place, linkto, false);
	link.appendChild(document.createTextNode(title));
	link.title = linkto;
	link.date = date;
	link.format = format;
	link.linkformat = linkformat;

	// if using a popup menu, replace click handler for dated tiddler link
	// with handler for popup and make link text non-italic (i.e., an 'existing link' look)
	if (mode=='popup') {
		link.onclick = onClickDatePopup;
		link.style.fontStyle='normal';
	}
	// format the popup link to show what kind of info it contains (for use with calendar generators)
	if (autostyle) setDateStyle(place,link,weekend);
}
//}}}
//{{{
// NOTE: This function provides default logic for setting the date style when displayed in a calendar
// To customize the date style logic, please see[[DatePluginConfig]]
function setDateStyle(place,link,weekend) {
	// alias variable names for code readability
	var date=link.date;
	var fmt=link.linkformat;
	var linkto=date.formatString(fmt);
	var cmd=config.macros.date;

	if ((weekend!==undefined?weekend:isWeekend(date))&&(cmd.weekendbg!=''))
		{ place.style.background = cmd.weekendbg; }
	if (hasModifieds(date)||hasCreateds(date)||hasTagged(date,fmt))
		{ link.style.fontStyle='normal'; link.style.fontWeight='bold'; }
	if (hasReminders(date))
		{ link.style.textDecoration='underline'; }
	if (isToday(date))
		{ link.style.textDecoration = 'underline';}
	if (isHoliday(date)&&(cmd.holidaybg!=''))
		{ place.style.background = cmd.holidaybg; }
	if (hasCreateds(date)&&(cmd.createdbg!=''))
		{ place.style.background = cmd.createdbg; }
	if (hasModifieds(date)&&(cmd.modifiedsbg!=''))
		{ place.style.background = cmd.modifiedsbg; }
	if ((hasTagged(date,fmt)||store.tiddlerExists(linkto))&&(cmd.linkedbg!=''))
		{ place.style.background = cmd.linkedbg; }
	if (hasReminders(date)&&(cmd.remindersbg!=''))
		{ place.style.background = cmd.remindersbg; }
	if (isToday(date)&&(cmd.todaybg!=''))
		{ place.style.background = cmd.todaybg; }
	if (config.options.chkShowJulianDate) { // optional display of Julian date numbers
		var m=[0,31,59,90,120,151,181,212,243,273,304,334];
		var d=date.getDate()+m[date.getMonth()];
		var y=date.getFullYear();
		if (date.getMonth()>1 && (y%4==0 && y%100!=0) || y%400==0)
			d++; // after February in a leap year
		wikify('@@font-size:80%;<br>'+d+'@@',place);
	}

}
//}}}
//{{{
function isToday(date) // returns true if date is today
	{ var now=new Date(); return ((now-date>=0) && (now-date<86400000)); }
function isWeekend(date) // returns true if date is a weekend
	{ return (config.macros.date.weekend[date.getDay()]); }
function isHoliday(date) // returns true if date is a holiday
{
	var longHoliday = date.formatString('0MM/0DD/YYYY');
	var shortHoliday = date.formatString('0MM/0DD');
	for(var i = 0; i < config.macros.date.holidays.length; i++) {
		var holiday=config.macros.date.holidays[i];
		if (holiday==longHoliday||holiday==shortHoliday) return true;
	}
	return false;
}
//}}}
//{{{
// Event handler for clicking on a day popup
function onClickDatePopup(e) { e=e||window.event;
	var p=Popup.create(this); if (!p) return false;
	// always show dated tiddler link (or just date, if readOnly) at the top...
	if (!readOnly || store.tiddlerExists(this.date.formatString(this.linkformat)))
		createTiddlyLink(createTiddlyElement(p,'li'),this.date.formatString(this.linkformat),true);
	else
		createTiddlyText(createTiddlyElement(p,'li'),this.date.formatString(this.linkformat));
	if (!config.options.chkDatePopupHideCreated)
		addCreatedsToPopup(p,this.date,this.format);
	if (!config.options.chkDatePopupHideChanged)
		addModifiedsToPopup(p,this.date,this.format);
	if (!config.options.chkDatePopupHideTagged)
		addTaggedToPopup(p,this.date,this.linkformat);
	if (!config.options.chkDatePopupHideReminders)
		addRemindersToPopup(p,this.date,this.linkformat);
	Popup.show(); e.cancelBubble=true; if(e.stopPropagation)e.stopPropagation(); return false;
}
//}}}
//{{{
function indexCreateds() // build list of tiddlers, hash indexed by creation date
{
	var createds= { };
	var tiddlers = store.getTiddlers('title','excludeLists');
	for (var t = 0; t < tiddlers.length; t++) {
		var date = tiddlers[t].created.formatString('YYYY0MM0DD')
		if (!createds[date])
			createds[date]=new Array();
		createds[date].push(tiddlers[t].title);
	}
	return createds;
}
function hasCreateds(date) // returns true if date has created tiddlers
{
	if (!config.macros.date.createds) config.macros.date.createds=indexCreateds();
	return (config.macros.date.createds[date.formatString('YYYY0MM0DD')]!=undefined);
}

function addCreatedsToPopup(p,when,format)
{
	var force=(store.isDirty() && when.formatString('YYYY0MM0DD')==new Date().formatString('YYYY0MM0DD'));
	if (force || !config.macros.date.createds) config.macros.date.createds=indexCreateds();
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var createds = config.macros.date.createds[when.formatString('YYYY0MM0DD')];
	if (createds) {
		createds.sort();
		var e=createTiddlyElement(p,'div',null,null,'created ('+createds.length+')');
		for(var t=0; t<createds.length; t++) {
			var link=createTiddlyLink(createTiddlyElement(p,'li'),createds[t],false);
			link.appendChild(document.createTextNode(indent+createds[t]));
		}
	}
}
//}}}
//{{{
function indexModifieds() // build list of tiddlers, hash indexed by modification date
{
	var modifieds= { };
	var tiddlers = store.getTiddlers('title','excludeLists');
	for (var t = 0; t < tiddlers.length; t++) {
		var date = tiddlers[t].modified.formatString('YYYY0MM0DD')
		if (!modifieds[date])
			modifieds[date]=new Array();
		modifieds[date].push(tiddlers[t].title);
	}
	return modifieds;
}
function hasModifieds(date) // returns true if date has modified tiddlers
{
	if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();
	return (config.macros.date.modifieds[date.formatString('YYYY0MM0DD')]!=undefined);
}

function addModifiedsToPopup(p,when,format)
{
	var date=when.formatString('YYYY0MM0DD');
	var force=(store.isDirty() && date==new Date().formatString('YYYY0MM0DD'));
	if (force || !config.macros.date.modifieds) config.macros.date.modifieds=indexModifieds();
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var mods = config.macros.date.modifieds[date];
	if (mods) {
		// if a tiddler was created on this date, don't list it in the 'changed' section
		if (config.macros.date.createds && config.macros.date.createds[date]) {
			var temp=[];
			for(var t=0; t<mods.length; t++)
				if (!config.macros.date.createds[date].contains(mods[t]))
					temp.push(mods[t]);
			mods=temp;
		}
		mods.sort();
		var e=createTiddlyElement(p,'div',null,null,'changed ('+mods.length+')');
		for(var t=0; t<mods.length; t++) {
			var link=createTiddlyLink(createTiddlyElement(p,'li'),mods[t],false);
			link.appendChild(document.createTextNode(indent+mods[t]));
		}
	}
}
//}}}
//{{{
function hasTagged(date,format) // returns true if date is tagging other tiddlers
{
	return store.getTaggedTiddlers(date.formatString(format)).length>0;
}

function addTaggedToPopup(p,when,format)
{
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var tagged=store.getTaggedTiddlers(when.formatString(format));
	if (tagged.length) var e=createTiddlyElement(p,'div',null,null,'tagged ('+tagged.length+')');
	for(var t=0; t<tagged.length; t++) {
		var link=createTiddlyLink(createTiddlyElement(p,'li'),tagged[t].title,false);
		link.appendChild(document.createTextNode(indent+tagged[t].title));
	}
}
//}}}
//{{{
function indexReminders(date,leadtime) // build list of tiddlers with reminders, hash indexed by reminder date
{
	var reminders = { };
	if(window.findTiddlersWithReminders!=undefined) { // reminder plugin is installed
		var t = findTiddlersWithReminders(date, [0,leadtime], null, null, 1);
		for(var i=0; i<t.length; i++) reminders[t[i].matchedDate]=true;
	}
	return reminders;
}

function hasReminders(date) // returns true if date has reminders
{
	if (window.reminderCacheForCalendar)
		return window.reminderCacheForCalendar[date]; // use calendar cache
	if (!config.macros.date.reminders)
		config.macros.date.reminders = indexReminders(date,90); // create a 90-day leadtime reminder cache
	return (config.macros.date.reminders[date]);
}

function addRemindersToPopup(p,when,format)
{
	if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed

	var indent = String.fromCharCode(160)+String.fromCharCode(160);
	var reminders=findTiddlersWithReminders(when, [0,31],null,null,1);
	createTiddlyElement(p,'div',null,null,'reminders ('+(reminders.length||'none')+')');
	for(var t=0; t<reminders.length; t++) {
		link = createTiddlyLink(createTiddlyElement(p,'li'),reminders[t].tiddler,false);
		var diff=reminders[t].diff;
		diff=(diff<1)?'Today':((diff==1)?'Tomorrow':diff+' days');
		var txt=(reminders[t].params['title'])?reminders[t].params['title']:reminders[t].tiddler;
		link.appendChild(document.createTextNode(indent+diff+' - '+txt));
	}
	if (readOnly) return;	// readonly... omit 'new reminder...' command
	var rem='\\<\\<reminder day:%0 month:%1 year:%2 title:"Enter a reminder title here"\\>\\>';
	rem=rem.format([when.getDate(),when.getMonth()+1,when.getYear()+1900]);
	var cmd="<<newTiddler label:[["+indent+"new reminder...]] prompt:[[add a reminder to '%0']]"
		+" title:[[%0]] text:{{var t=store.getTiddlerText('%0','');t+(t.length?'\\n':'')+'%1'}} tag:%2>>";
	wikify(cmd.format([when.formatString(format),rem,config.options.txtCalendarReminderTags||'']),
		createTiddlyElement(p,'li'));
}
//}}}
[[desk]]
/***
|''Name:''|DeliciousTaggingPlugin|
|''Version:''|0.5|
|''Source''|http://tbGTD.tiddlyspot.com|
|''Author:''|[[TobiasBeer]]|
!Description
@@color:red;Mod of Jack's [[DeliciousTaggingPlugin|http://jackparke.googlepages.com/jtw.html]] to allow...
*custom tag-chosers
*tag-exclusion
@@
Allows easy tagging in the EditTemplate by showing all tags as a list of link-buttons.
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={
catChose:"Tag this tiddler with '%0' its sub-tags or tiddlers tagging to them",
catList:'x-tagger config##Tags',
catsMore:['archive','reference'],
exclude:['noCloud','excludeLists'],
arrow:document.all?"▼":"▾",
handler:function(place,macroName,params,wikifier,paramString,tiddler){
if(tiddler instanceof Tiddler){
	var b,c,g,t,tx,tg,tn,tgs,ex=[],x,xx=this.exclude,lng=config.views.editor.tagChooser;
	for(tx=0;tx<xx.length;tx++){
		x=store.getTaggedTiddlers(xx[tx]);
		for(t=0;t<x.length;t++)ex.pushUnique(x[t].title);
	}
	g=store.getTiddlerText(this.catList);g=g?g.readBracketedList():[];
	for(c=0;c<this.catsMore.length;c++)g.pushUnique(this.catsMore[c]);
	for(c=0;c<g.length;c++){
		if(!store.getTiddler(g[c]))continue;
		b=createTiddlyButton(place,g[c]+this.arrow,this.catChose.format([g[c]]),this.clickCat);
		b.setAttribute("tiddler",tiddler.title);b.setAttribute("tags",g[c]);
	}
	tgs=store.getTags();
	for(t=0;t<tgs.length;t++){
		tn=tgs[t][0];if(ex.contains(tn))continue;
		tg=createTiddlyButton(place,tn,lng.tagTooltip.format([tn]),config.macros.tagChooser.onTagClick);
		tg.setAttribute("tag",tn);tg.setAttribute("tiddler",tiddler.title);
		place.appendChild(document.createTextNode(" "));
	}
}
},
clickCat:function(e){
	var b,pop,t,tg,ti,tgs=[],tgt,c,cx,lng=config.views.editor.tagChooser;
	e=e||window.event;
	pop=Popup.create(this);
	t=this.getAttribute('tags');tgs.pushUnique('MAIN:'+t);
	cx=store.getTaggedTiddlers(t);
	for(c=0;c<cx.length;c++){
		ti=cx[c].title;
		tgs.pushUnique('GROUP:'+ti);
		tgt=store.getTaggedTiddlers(ti);
		for(t=0;t<tgt.length;t++)tgs.pushUnique(tgt[t].title);
	}
	for(t=0;t<tgs.length;t++){
		tg=tgs[t];
		if(tg.indexOf('MAIN:')==0)tg=ti=tg.substr(5);
		else if(tg.indexOf('GROUP:')==0){tg=tg.substr(6);ti='\u00A0\u00A0'+tg;}
		else ti='\u00A0\u00A0\u00A0\u00A0'+tg;
		b=createTiddlyButton(createTiddlyElement(pop,"li"),ti,lng.tagTooltip.format([tg]),config.macros.tagChooser.onTagClick);
		b.setAttribute("tiddler",this.getAttribute("tiddler"));b.setAttribute("tag",tg);
	}
	Popup.show();
	e.cancelBubble = true;
	if(e.stopPropagation) e.stopPropagation();
	return false;
}
}
//}}}
/***
|''Name:''|FE2|
|''Description:''|create, edit, view and delete commands in toolbar <<toolbar fields>>|
|''Version:''|1.0.2|
|''Date:''|Oct. 21,2009|
|''Source:''|http://tbGTD.tiddlyspot.com|
|''Author:''|Tobias Beer|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.5.3|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Note
This is a refactored version of [[FieldsEditorPlugin|http://visualtw.ouvaton.org/VisualTW.html#FieldsEditorPlugin]] by Pascal Collin
!Installation:
*import this tiddler, keep tagged as systemConfig, save and reload
!Code
***/
//{{{
//language settings for header, also see language options for macro.FE2 below!
config.commands.fields.lang={field:"field",actions:"actions",value:"value"};
config.commands.fields.handlePopup=function(popup,title){
	addClass(popup,'FE2');
	var tid=store.fetchTiddler(title);
	if(!tid)return;
	var t='[['+title+']]';
	var fields={};
	store.forEachField(tid,function(tid,field,v){fields[field]=v;},true);
	var list=[];
	for(var f in fields){
		var e='[['+f+']]';
		list.push({
			field:f,
			value:fields[f],
			actions:"<<FE2 "+t+" rename "+e+">> <<FE2 "+t+" delete "+e+">> <<FE2 "+t+" edit "+e+">>"
		});
	}
	list.sort(function(a,b){return a.field<b.field?-1:(a.field==b.field?0:+1);});
	list.push({field:'',value:"",actions:"<<FE2 "+t+" create>>"});
	var table=ListView.create(popup,list,{
		columns:[
			{name:'Field',field:'field',title:this.lang.field,type:'String'},
			{name: 'Actions',field:'actions',title:this.lang.actions,type: 'WikiText'},
			{name:'Value',field:'value',title:this.lang.value,type:'WikiText'}
		],
		rowClasses:[
				{field:'actions'}
		],
		buttons:[	//can't use button for selected then delete, because click on checkbox will hide the popup
		]
	});
}
config.macros.FE2={
	//language options
	lang:{
		'delete':'delete', //string since keyword!
		rename:'<rename',
		create:'Create a new field...',
		edit:'edit>',
		lineBreaks:"The field value contains linebreaks.\nEditing here will convert it to a single line!\nProceed?",
		enterName:"Enter new field name...",
		enterNewName:"Enter new name for '%1'...",
		enterVal:"Enter field value for '%1'...", 
		enterNewVal:"Enter new value for '%1'..",
		doDelete:"Delete field '%1' from tiddler '%2' ?",
		existing:"This field already exists! "
	},
	handler:function(place,macroName,params,wikifier,paramString,tiddler){
		if(!readOnly){
			var tid=params[0];
			var mode=params[1];
			var field=params[2];
			var btn=createTiddlyButton(place,this.lang[mode],this.lang[mode]+" "+field,this.clicked);
			btn.setAttribute("tiddler",tid);
			btn.setAttribute("field",field);
			btn.setAttribute("mode",mode);
		}
	},
	clicked:function(){
		var lng=config.macros.FE2.lang;
		var title=this.getAttribute("tiddler");
		var field=this.getAttribute("field");
		var mode=this.getAttribute("mode");
		var tid=store.getTiddler(title);
		if(!tid)return;
		switch(mode){
			case'create':
				var first="";
				do{
					field=prompt(first+ lng.enterName,"");
					first=lng.existing;
				}while(store.getValue(tid,field));
				if(field){
					var v=prompt(lng.enterVal.replace(/%1/,field),"");
					if(v)tid.fields[field]=v;else return;
				}else return;
				break;
			case'delete':
				if(confirm(lng.doDelete.replace(/%1/,field).replace(/%2/,title))){
					delete tid.fields[field];
				}else return;
				break;
			case'edit':
				var v=tid.fields[field]||'';
				if(!v.match(/\n/mg)||confirm(lng.lineBreaks)){
					var v=prompt(lng.enterNewVal.replace(/%1/,field),v);
					if(v||v=='')tid.fields[field]=v;else return;
				}else return;
				break;
			case'rename':
				var name=prompt(lng.enterNewName.replace(/%1/,field),field);
				if(name){
					tid.fields[name]=tid.fields[field];
					delete tid.fields[field];
				}else return;
				break;
			default:return;
		}
		store.saveTiddler(tid.title,tid.title,tid.text,tid.modifier,tid.modified,tid.tags,tid.fields);
		story.refreshTiddler(title,null,true);
		return false;
	}
}
config.shadowTiddlers.StyleSheetFE2=
	".FE2 td br{display:block;}\n"+
	".FE2 td {font-size:12px;padding:1px 3px}\n"+
	".FE2 .button {border:0;padding:0 0.2em;}\n"+
	".FE2 .twtable,.FE2 .twtable thead, .FE2 .twtable tr{border:0}\n"+
	".FE2 .twtable tr:hover{background:"+store.getTiddlerSlice('ColorPalette','TertiaryDark')+"}\n"+
	".FE2 .twtable thead{font-size:13px;}";
store.addNotification("StyleSheetFE2",refreshStyles);
//}}}
/***
|Name|GotoPlugin|
|Source|http://www.TiddlyTools.com/#GotoPlugin|
|Documentation|http://www.TiddlyTools.com/#GotoPluginInfo|
|Version|1.9.2|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|view any tiddler by entering it's title - displays list of possible matches|
''View a tiddler by typing its title and pressing //enter//.''  As you type, a list of possible matches is displayed.  You can scroll-and-click (or use arrows+enter) to select/view a tiddler, or press escape to close the listbox to resume typing.  When the listbox is not displayed, pressing //escape// clears the current input.
!!!Configuration
<<<
*Match titles only after {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters are entered.<br>Use down-arrow to start matching with shorter input.  //Note: This option value is also set/used by [[SearchOptionsPlugin]]//.
*To set the maximum height of the listbox, you can create a tiddler tagged with <<tag systemConfig>>, containing:
//{{{
config.macros.gotoTiddler.listMaxSize=10;  // change this number
//}}}
!!!Code
***/
//{{{
version.extensions.GotoPlugin= {major: 1, minor: 9, revision: 2, date: new Date(2009,5,22)};

// automatically tweak shadow SideBarOptions to add <<gotoTiddler>> macro above <<search>>
config.shadowTiddlers.SideBarOptions=config.shadowTiddlers.SideBarOptions.replace(/<<search>>/,"{{button{goto}}}\n<<gotoTiddler>><<search>>");
if (config.options.txtIncrementalSearchMin===undefined) config.options.txtIncrementalSearchMin=2;

config.macros.gotoTiddler= { 
	listMaxSize: 10,
	listHeading: 'Found %0 matching title%1...',
	searchItem: "Search for '%0'...",
	handler:
	function(place,macroName,params,wikifier,paramString,tiddler) {
		var quiet	=params.contains("quiet");
		var showlist	=params.contains("showlist");
		var search	=params.contains("search");
		params = paramString.parseParams("anon",null,true,false,false);
		var instyle	=getParam(params,"inputstyle","");
		var liststyle	=getParam(params,"liststyle","");
		var filter	=getParam(params,"filter","");
		var html=this.html;
		var keyevent=window.event?"onkeydown":"onkeypress"; // IE event fixup for ESC handling
		html=html.replace(/%keyevent%/g,keyevent);
		html=html.replace(/%search%/g,search);
		html=html.replace(/%quiet%/g,quiet);
		html=html.replace(/%showlist%/g,showlist);
		html=html.replace(/%display%/g,showlist?'block':'none');
		html=html.replace(/%position%/g,showlist?'static':'absolute');
		html=html.replace(/%instyle%/g,instyle);
		html=html.replace(/%liststyle%/g,liststyle);
		html=html.replace(/%filter%/g,filter);
		//if (config.browser.isIE) html=this.IEtableFixup.format([html]);
		var span=createTiddlyElement(place,'span');
		span.innerHTML=html; var form=span.getElementsByTagName("form")[0];
		if (showlist) this.fillList(form.list,'',filter,search,0);
	},
	html:
	'<form onsubmit="return false" style="display:inline;margin:0;padding:0">\
		<input name=gotoTiddler type=text value="search..." autocomplete="off" accesskey="G" style="%instyle%"\
			title="ENTER=search | SHIFT+ENTER=open | DOWN=list"\
			onfocus="this.select(); this.setAttribute(\'accesskey\',\'G\');"\
			%keyevent%="return config.macros.gotoTiddler.inputEscKeyHandler(event,this,this.form.list,%search%,%showlist%);"\
			onkeyup="return config.macros.gotoTiddler.inputKeyHandler(event,this,%quiet%,%search%,%showlist%);">\
		<select name=list style="display:%display%;position:%position%;%liststyle%"\
			onchange="if (!this.selectedIndex) this.selectedIndex=1;"\
			onblur="this.style.display=%showlist%?\'block\':\'none\';"\
			%keyevent%="return config.macros.gotoTiddler.selectKeyHandler(event,this,this.form.gotoTiddler,%showlist%);"\
			onclick="return config.macros.gotoTiddler.processItem(this.value,this.form.gotoTiddler,this,%showlist%);">\
		</select><input name="filter" type="hidden" value="%filter%">\
	</form>',
	IEtableFixup:
	"<table style='width:100%;display:inline;padding:0;margin:0;border:0;'>\
		<tr style='padding:0;margin:0;border:0;'><td style='padding:0;margin:0;border:0;'>\
		%0</td></tr></table>",
	getItems:
	function(list,val,filter) {
		if (!list.cache || !list.cache.length || val.length<=config.options.txtIncrementalSearchMin) {
			// starting new search, fetch and cache list of tiddlers/shadows/tags
			list.cache=new Array();
			if (filter.length) {
				var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
				var tiddlers=store.sortTiddlers(fn.apply(store,[filter]),'title');
			} else 
				var tiddlers=store.reverseLookup('tags','');
			for(var t=0; t<tiddlers.length; t++) list.cache.push(tiddlers[t].title);
			if (!filter.length) {
				for (var t in config.shadowTiddlers) list.cache.pushUnique(t);
				var tags=store.getTags();
				for(var t=0; t<tags.length; t++) list.cache.pushUnique(tags[t][0]);
			}
		}
		var found = [];
		var match=val.toLowerCase();
		for(var i=0; i<list.cache.length; i++)
			if (list.cache[i].toLowerCase().indexOf(match)!=-1) found.push(list.cache[i]);
		return found;
	},
	getItemSuffix:
	function(t) {
		if (store.tiddlerExists(t)) return "";  // tiddler
		if (store.isShadowTiddler(t)) return " (shadow)"; // shadow
		return " (tag)"; // tag 
	},
	fillList:
	function(list,val,filter,search,key) {
		if (list.style.display=="none") return; // not visible... do nothing!
		var indent='\xa0\xa0\xa0';
		var found = this.getItems(list,val,filter); // find matching items...
		found.sort(); // alpha by title
		while (list.length > 0) list.options[0]=null; // clear list
		var hdr=this.listHeading.format([found.length,found.length==1?"":"s"]);
		list.options[0]=new Option(hdr,"",false,false);
		for (var t=0; t<found.length; t++) list.options[list.length]=
			new Option(indent+found[t]+this.getItemSuffix(found[t]),found[t],false,false);
		if (search)
			list.options[list.length]=new Option(this.searchItem.format([val]),"*",false,false);
		list.size=(list.length<this.listMaxSize?list.length:this.listMaxSize); // resize list...
		list.selectedIndex=key==38?list.length-1:key==40?1:0;
	},
	keyProcessed:
	function(ev) { // utility function
		ev.cancelBubble=true; // IE4+
		try{event.keyCode=0;}catch(e){}; // IE5
		if (window.event) ev.returnValue=false; // IE6
		if (ev.preventDefault) ev.preventDefault(); // moz/opera/konqueror
		if (ev.stopPropagation) ev.stopPropagation(); // all
		return false;
	},
	inputEscKeyHandler:
	function(event,here,list,search,showlist) {
		if (event.keyCode==27) {
			if (showlist) { // clear input, reset list
				here.value=here.defaultValue;
				this.fillList(list,'',here.form.filter.value,search,0);
			}
			else if (list.style.display=="none") // clear input
				here.value=here.defaultValue;
			else list.style.display="none"; // hide list
			return this.keyProcessed(event);
		}
		return true; // key bubbles up
	},
	inputKeyHandler:
	function(event,here,quiet,search,showlist) {
		var key=event.keyCode;
		var list=here.form.list;
		var filter=here.form.filter;
		// non-printing chars bubble up, except for a few:
		if (key<48) switch(key) {
			// backspace=8, enter=13, space=32, up=38, down=40, delete=46
			case 8: case 13: case 32: case 38: case 40: case 46: break; default: return true;
		}
		// blank input... if down/enter... fall through (list all)... else, and hide or reset list
		if (!here.value.length && !(key==40 || key==13)) {
			if (showlist) this.fillList(here.form.list,'',here.form.filter.value,search,0);
			else list.style.display="none";
			return this.keyProcessed(event);
		}
		// hide list if quiet, or below input minimum (and not showlist)
		list.style.display=(!showlist&&(quiet||here.value.length<config.options.txtIncrementalSearchMin))?'none':'block';
		// non-blank input... enter=show/create tiddler, SHIFT-enter=search for text
		if (key==13 && here.value.length) return this.processItem(event.shiftKey?here.value:'*',here,list,showlist);
		// up or down key, or enter with blank input... shows and moves to list...
		if (key==38 || key==40 || key==13) { list.style.display="block"; list.focus(); }
		this.fillList(list,here.value,filter.value,search,key);
		return true; // key bubbles up
	},
	selectKeyHandler:
	function(event,list,editfield,showlist) {
		if (event.keyCode==27) // escape... hide list, move to edit field
			{ editfield.focus(); list.style.display=showlist?'block':'none'; return this.keyProcessed(event); }
		if (event.keyCode==13 && list.value.length) // enter... view selected item
			{ this.processItem(list.value,editfield,list,showlist); return this.keyProcessed(event); }
		return true; // key bubbles up
	},
	processItem:
	function(title,here,list,showlist) {
		if (!title.length) return;
		list.style.display=showlist?'block':'none';
		if (title=="*")	{ story.search(here.value); return false; } // do full-text search
		if (!showlist) here.value=title;
		story.displayTiddler(null,title); // show selected tiddler
		return false;
	}
}
//}}}

On Freitag, 13. November 2009 19:07:08, Tobias imported 1 tiddler from
[[C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html|C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html]]:
<<<
#[[tbGTD help]] - added
<<<

----
On Freitag, 13. November 2009 19:05:51, Tobias imported 9 tiddlers from
[[C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html|C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html]]:
<<<
#[[DeliciousTagging]] - replaces DeliciousTagging - 11/9/2009 23:37:00 by Tobias
#[[StyleSheetShortcuts]] - replaces StyleSheetShortcuts - 11/9/2009 23:51:00 by Tobias
#[[TagCloud]] - replaces TagCloud - 11/9/2009 23:37:00 by Tobias
#[[TagCloudMacro]] - replaces TagCloudMacro - 11/7/2009 23:53:00 by Tobias
#[[TiddlersBarPlugin]] - replaces TiddlersBarPlugin - 11/10/2009 03:24:00 by Tobias
#[[help]] - replaces help - 11/10/2009 02:19:00 by Tobias
#[[tbGtdTheme]] - replaces tbGtdTheme - 11/9/2009 23:50:00 by Tobias
#[[x-plore]] - replaces x-plore - 11/9/2009 23:53:00 by Tobias
#[[x-tagger]] - replaces x-tagger - 11/7/2009 22:46:00 by Tobias
<<<

----
On Freitag, 13. November 2009 19:05:32, Tobias imported 1 tiddler from
[[C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html|C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html]]:
<<<
#[[update]] - added
<<<
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 5, date: new Date(2009,4,11)};

config.formatters.push( {
	name: "inlineJavascript",
	match: "\\<script",
	lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",

	handler: function(w) {
		var lookaheadRegExp = new RegExp(this.lookahead,"mg");
		lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			var src=lookaheadMatch[1];
			var label=lookaheadMatch[2];
			var tip=lookaheadMatch[3];
			var key=lookaheadMatch[4];
			var show=lookaheadMatch[5];
			var code=lookaheadMatch[6];
			if (src) { // external script library
				var script = document.createElement("script"); script.src = src;
				document.body.appendChild(script); document.body.removeChild(script);
			}
			if (code) { // inline code
				if (show) // display source in tiddler
					wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
				if (label) { // create 'onclick' command link
					var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
					var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
					link.code="function _out(place,tiddler){"+fixup+"\n};_out(this,this.tiddler);"
					link.tiddler=w.tiddler;
					link.onclick=function(){
						this.bufferedHTML="";
						try{ var r=eval(this.code);
							if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
								var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
							if(this.bufferedHTML.length)
								s.innerHTML=this.bufferedHTML;
							if((typeof(r)==="string")&&r.length) {
								wikify(r,s,null,this.tiddler);
								return false;
							} else return r!==undefined?r:false;
						} catch(e){alert(e.description||e.toString());return false;}
					};
					link.setAttribute("title",tip||"");
					var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
					URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
					URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
					link.setAttribute("href",URIcode);
					link.style.cursor="pointer";
					if (key) link.accessKey=key.substr(0,1); // single character only
				}
				else { // run script immediately
					var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
					var c="function _out(place,tiddler){"+fixup+"\n};_out(w.output,w.tiddler);";
					try	 { var out=eval(c); }
					catch(e) { out=e.description?e.description:e.toString(); }
					if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
				}
			}
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
	}
} )
//}}}

// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
	if(limit > 0) text = text.substr(0,limit);
	var wikifier = new Wikifier(text,formatter,null,tiddler);
	return wikifier.wikifyPlain();
}
//}}}

// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
/***
|Name:|LessBackupsPlugin|
|Description:|Intelligently limit the number of backup files you create|
|Version:|3.0.1 ($Rev: 2320 $)|
|Date:|$Date: 2007-06-18 22:37:46 +1000 (Mon, 18 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
|Author:|Simon Baird|
|Email:|simon.baird@gmail.com|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second.  So total number won't exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!Notes
Works in IE and Firefox only.  Algorithm by Daniel Baird. IE specific code by by Saq Imtiaz.
***/
//{{{

var MINS  = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS  = 24 * HOURS;

if (!config.lessBackups) {
	config.lessBackups = {
		// comment out the ones you don't want or set config.lessBackups.modes in your 'tweaks' plugin
		modes: [
			["YYYY",  365*DAYS], // one per year for ever
			["MMM",   31*DAYS],  // one per month
			//["ddd",   7*DAYS],   // one per weekday
			["d0DD",  1*DAYS],   // one per day of month
			//["h0hh",  24*HOURS], // one per hour
			//["m0mm",  1*HOURS],  // one per minute
			//["s0ss",  1*MINS],   // one per second
			["latest",0]         // always keep last version. (leave this).
		]
	};
}

window.getSpecialBackupPath = function(backupPath) {

	var now = new Date();

	var modes = config.lessBackups.modes;

	for (var i=0;i<modes.length;i++) {

		// the filename we will try
		var specialBackupPath = backupPath.replace(/(\.)([0-9]+\.[0-9]+)(\.html)$/,
				'$1'+now.formatString(modes[i][0]).toLowerCase()+'$3')

		// open the file
		try {
			if (config.browser.isIE) {
				var fsobject = new ActiveXObject("Scripting.FileSystemObject")
				var fileExists  = fsobject.FileExists(specialBackupPath);
				if (fileExists) {
					var fileObject = fsobject.GetFile(specialBackupPath);
					var modDate = new Date(fileObject.DateLastModified).valueOf();
				}
			}
			else {
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
				var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
				file.initWithPath(specialBackupPath);
				var fileExists = file.exists();
				if (fileExists) {
					var modDate = file.lastModifiedTime;
				}
			}
		}
		catch(e) {
			// give up
			return backupPath;
		}

		// expiry is used to tell if it's an 'old' one. Eg, if the month is June and there is a
		// June file on disk that's more than an month old then it must be stale so overwrite
		// note that "latest" should be always written because the expiration period is zero (see above)
		var expiry = new Date(modDate + modes[i][1]);
		if (!fileExists || now > expiry)
			return specialBackupPath;
	}
}

// hijack the core function
window.getBackupPath_mptw_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
	return getSpecialBackupPath(getBackupPath_mptw_orig(localPath));
}

//}}}
<script>
var out='',s,t,tags=[],tids=[],ti,tgt; 
tags=store.getTiddlerText('x-tagger config##Tags').readBracketedList();
for(t=0;t<tags.length;t++){
	ti=tags[t];tgt=tids.contains(ti)?[]:store.getTaggedTiddlers(ti);
	if(tgt.length==0)tags.splice(t,1);//takes out subitems of toplevel ones, e.g. $active projects
	else for(var s=0;s<tgt.length;s++)tids.pushUnique(tgt[s].title);
}
for(t=0;t<tags.length;t++){
	ti=tags[t];tids=store.getTaggedTiddlers(ti);
	out+="*"+(tids[0]?' '+tids[0].title.substr(0,1)+' ':'')+ti+"\n";
	for(s=0;s<tids.length;s++){
		ti=tids[s].title;
		out+="**<<newTiddler label:+ title:'new "+ti+"' prompt:'create a new "+ti+"' focus:title tag:'"+ti+"'>><<tag "+ti+">>\n";
	}
}
return out;
</script><<accordion>>/%do all you want, but please be so kind as to leave the link to http://tbGTD.tiddlyspot.com in here%/
<html>
	<a class="noCopy" href="javascript:story.displayTiddler(null,'tweet');" title="post on twitter" style="clear:both;display:block;width:46%;padding:0 2%;float:left;text-align:center;">tweet</a>
<a class="noCopy" href="http://tbgtd.tiddlyspot.com" title="go to the original tbGTD" style="display:block;width:46%;padding:0 2% 0 0;float:left;text-align:center;" target="_blank">tbGTD</a>
</html>
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' /><style type="text/css">body {background:black;}#contentWrapper {display:none;}</style><div id="SplashScreen" style="display: block; text-align: center; width: 500px; margin: 100px auto; padding: 20px 30px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#333;color:#FFF;border: 2px solid #ddd;-moz-border-radius:5px; -webkit-border-radius:5px;"><b>tbGTD</b> is loading<span style="text-decoration: blink;">...</span><br/><span style="font-size: 14px; color:#FDD;">requires javascript</span></div>
<!--}}}-->
//{{{
config.options.txtFadeTimer = 5000; // 5 seconds 

window.displayMessage=function(text,linkText,fadeTimer) { 
        var e = getMessageDiv(); 
        if(!e) { 
                alert(text); 
                return; 
        } 
        if(linkText) { 
                var link = createTiddlyElement(e,"a",null,null,text); 
                link.href = linkText; 
                link.target = "_blank"; 
        } else { 
                e.appendChild(document.createTextNode(text)); 
        } 
        if(config.options.txtFadeTimer > 0) { 
                setTimeout(clearMessage, config.options.txtFadeTimer); 
        } 
}
//}}}
/***
|Name:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
	newHere: {
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]] prompt:'Create a new tiddler tagging to this tiddler'>>",place,null,tiddler);
		}
	},
	newJournalHere: {
		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			wikify("<<newJournal "+paramString+" label:'journal' tag:journal tag:[["+tiddler.title+"]] prompt:'Create a new journal entry tagging to this tiddler'>>",place,null,tiddler);
		}
	}
});

//}}}
/***
|Name:|NewMeansNewPlugin|
|Description:|If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on|
|Version:|1.1 ($Rev: 2263 $)|
|Date:|$Date: 2007-06-13 04:22:32 +1000 (Wed, 13 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Note: I think this should be in the core
***/
//{{{

String.prototype.getNextFreeName = function() {
       var numberRegExp = / \(([0-9]+)\)$/;
       var match = numberRegExp.exec(this);
       if (match) {
               var num = parseInt(match[1]) + 1;
               return this.replace(numberRegExp," ("+num+")");
       }
       else {
               return this + " (1)";
       }
}

config.macros.newTiddler.checkForUnsaved = function(newName) {
	var r = false;
	story.forEachTiddler(function(title,element) {
		if (title == newName)
			r = true;
	});
	return r;
}

config.macros.newTiddler.getName = function(newName) {
       while (store.getTiddler(newName) || config.macros.newTiddler.checkForUnsaved(newName))
               newName = newName.getNextFreeName();
       return newName;
}


config.macros.newTiddler.onClickNewTiddler = function()
{
	var title = this.getAttribute("newTitle");
	if(this.getAttribute("isJournal") == "true") {
		var now = new Date();
		title = now.formatString(title.trim());
	}

	title = config.macros.newTiddler.getName(title); // <--- only changed bit

	var params = this.getAttribute("params");
	var tags = params ? params.split("|") : [];
	var focus = this.getAttribute("newFocus");
	var template = this.getAttribute("newTemplate");
	var customFields = this.getAttribute("customFields");
	story.displayTiddler(null,title,template,false,null,null);
	var tiddlerElem = document.getElementById(story.idPrefix + title);
	if(customFields)
		story.addCustomFields(tiddlerElem,customFields);
	var text = this.getAttribute("newText");
	if(typeof text == "string")
		story.getTiddlerField(title,"text").value = text.format([title]);
	for(var t=0;t<tags.length;t++)
		story.setTiddlerTag(title,tags[t],+1);
	story.focusTiddler(title,focus);
	return false;
};

//}}}
/***
|''Name:''|~PopupMacro|
|''Author:''|Saq Imtiaz (mod Tobias Beer)|
|''Version:''|1.1 (2009-11-08)|
|''Description:''|Create popups with custom content|
|''Source:''|http://tbGTD.tiddlyspor.com/#PopupMacro|
|''Documentation:''|http://tw.lewcid.org/#PopupMacroDocs|
|''Requires:''|TW Version 2.0.8 or better|
@@((mod for tbGTD(^removed styles and code cleanup)))@@
!Code
***/
//{{{
config.macros.popup={
err1:'missing macro parameters',
err2:'missing label or content parameter',
arrow:document.all?"▼":"▾",
handler:function(place,macroName,params,wikifier,paramString,theTiddler){
var cls,id,lbl,src,click;
if(!params[0]||!params[1]){createTiddlyError(place,this.err1,this.err2);return false;}
lbl=params[0];
src=(params[1]).replace(/\$\)\)/g,">>");
id=params[2]?params[2]:'nestedpopup';
cls='popup'+(params[3]?' ' +params[3]:'');
click=function(e){
	var btn,nest,p,tgt;
	e=e||window.event;
	tgt=resolveTarget(e);
	nest=!isNested(tgt);
	id=nest?id:'popup';
	if(nest&&Popup.stack.length>1)Popup.removeFrom(1);
	else if(!nest&&Popup.stack.length>0)Popup.removeFrom(0);
	p=createTiddlyElement(document.body,"ol",id,cls,null);
	Popup.stack.push({root:this,popup:p});
	wikify(src,p);
	Popup.show(p,true);e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;
}
btn=createTiddlyButton(place,lbl+this.arrow,lbl,click,null);
}
}
window.isNested=function(el){
	var c=document.getElementById("contentWrapper");
	while(el!=null){if(el==c)return true;el=el.parentNode;}return false;
}
setStylesheet('#nestedpopup {margin-left:1em;}','PopupMacroStyles');
//}}}
/***
|Name:|PrettyDatesPlugin|
|Description:|Provides a new date format ('pppp') that displays times such as '2 days ago'|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#PrettyDatesPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Notes
* If you want to you can rename this plugin. :) Some suggestions: LastUpdatedPlugin, RelativeDatesPlugin, SmartDatesPlugin, SexyDatesPlugin.
* Inspired by http://ejohn.org/files/pretty.js
***/
//{{{
Date.prototype.prettyDate = function() {
	var diff = (((new Date()).getTime() - this.getTime()) / 1000);
	var day_diff = Math.floor(diff / 86400);

	if (isNaN(day_diff))      return "";
	else if (diff < 0)        return "in the future";
	else if (diff < 60)       return "just now";
	else if (diff < 120)      return "1 minute ago";
	else if (diff < 3600)     return Math.floor(diff/60) + " minutes ago";
	else if (diff < 7200)     return "1 hour ago";
	else if (diff < 86400)    return Math.floor(diff/3600) + " hours ago";
	else if (day_diff == 1)   return "Yesterday";
	else if (day_diff < 7)    return day_diff + " days ago";
	else if (day_diff < 14)   return  "a week ago";
	else if (day_diff < 31)   return Math.ceil(day_diff/7) + " weeks ago";
	else if (day_diff < 62)   return "a month ago";
	else if (day_diff < 365)  return "about " + Math.ceil(day_diff/31) + " months ago";
	else if (day_diff < 730)  return "a year ago";
	else                      return Math.ceil(day_diff/365) + " years ago";
}

Date.prototype.formatString_orig_mptw = Date.prototype.formatString;

Date.prototype.formatString = function(template) {
	return this.formatString_orig_mptw(template).replace(/pppp/,this.prettyDate());
}

// for MPTW. otherwise edit your ViewTemplate as required.
// config.mptwDateFormat = 'pppp (DD/MM/YY)'; 
config.mptwDateFormat = 'pppp'; 

//}}}
<script>if(!window.tbQA)window.tbQA={
	bigSize:'300px',//height for bigger-size textarea
	searchAll:true,//determines whether all tiddlers will be scanned to find unidentified tags in quick-add
	lingo:{//translation
		none:"Nothing to be added! Open quick-add help?",
		empty:"No message, no nothing.",
		noMatch:"No match found for '%0', neither in added nor in existing tiddlers!%1Try again...",
		justAdded:"All those you just added are:%0. ",
		notFound:"No %0tag found matching '%1' for '%2'! ",
		noDefault:"No default %0-tag defined. ",
		useShort:"Use any shortform of '%0'. ",
		usePrefix:"Alternatively, use just the prefix '%0' for '%1'. ",
		enterNew:"Enter another %0tag for '%1'...",
		listPrefix:"|linkTable|k\n| type | tiddler | tags | action |h\n"
	},
	cfg:{
	//---tbGTD quick-add configuration (stored as global object)---
	//edit to suit your needs ...changes apply only after reload!
	//all inspected prefixes (not allowed: 'fst','all'!)
	p:['#','^','$','§','@','?','&','-'],
	//definition arrays for those prefixes -> comma (!) separated strings
	//'prefix':[0='master-tag', 1='default subtag, [2='arr of allowed subitems {...for multi-level-add}']],
	'$':['project','$active',['$','§','#','?']], //only those with subitems are allowed as line-starters! 
	'#':['action','#next',['#','?']],
	'^':['priority','^1.high'],
	'§':['stage',,['#','?']],
	'@':['context'],
	'?':['contact'],
	'&':['area'],
	'-':['realm','-private-'] //-> mind the last comma on each line, but not on the last!
	//---end of quick-add setup---
	//better not edit below
	},
	init:function(){
		var c,cat,def,pr,t,tag,tgt,tit;
		c=this.cfg;c.fst=[];c.all=[]; 
		//c=quickkad cfg, cat=category, def=definition, pr=prefix, t,tag=tag, tgt=tagged, tit=title
		for(pr=0;pr<c.p.length;pr++){
			cat=c.p[pr];def=c[cat];
			if(def){
				tag=def[0];
				if(tag){
					if(def[2])c.fst.pushUnique(cat);//arr with prefixes allowed to have subitems
					c[cat]['tags']=[];//named arr for the following prefixed(!) subtags
					tgt=store.getTaggedTiddlers(tag);
					for(t=0;t<tgt.length;t++){
						tit=tgt[t].title;
						c[cat]['tags'].pushUnique(tit);//store subtag
						c.all.pushUnique(tit);//all allowed
					}
				}
			}
		}
	},
	find:function(dt,pr,ti){//dt=tag from def, pr=prefix, ti=new title
		var c=tbQA.cfg,ct,fo='',l=tbQA.lingo,t,nd;
		//c=config, ct=check-tag, fo=return: found tag, l=lingo, t=ctrl var, nd=no default
		while(fo==''&&dt){//while invalid and tag given
			nd=false;
			if(dt.length<=1){//only prefix
				if(c[pr][1])fo=c[pr][1];//get default from cfg
				else nd=true;
			}else{//prefix+string
				for(t=0;t<c[pr]['tags'].length;t++){
					ct=c[pr]['tags'][t];//check tagged
					if(ct.indexOf(dt)==0){fo=ct;break;}//starting characters match
				}
			}
			//if not found, ask again
			if(!fo)dt=prompt((nd?l.noDefault.format([c[pr][0]]):l.notFound.format([c[pr][0]+'-',dt,ti]))+
				(c[pr][0]?l.useShort.format([c[pr]['tags']]):'')+
				(c[pr][1]?l.usePrefix.format([pr,c[pr][1]]):'')+
				l.enterNew.format([c[pr][0]+'-',ti]),pr).trim();
		}
		return fo;
	}
};
tbQA.init();//get GTD tags
config.shadowTiddlers['Recent notes']='<<tiddlerList filter:"tiddler.tags.containsAny([\'quickadd\',\'note\'])" top:"5" order:"-created" dateFormat:"pppp" itemTemplate:"!@@background:#DDD;display:block;width:98%;padding:5px 1%;%link@@\\n<<tiddler scripts##deleteTiddler with: \'%title\' \'Recent notes\' norefresh$)) (%created) @@padding-left:2em;tags: %tags@@\\n\\n%text\\n">>';
</script><html><nowiki><form id="qNotes" style="width:100%;">
<table class='borderless' cellpadding='0' cellspacing='0' style='width:100%;'>
<tr><td style='width:75%;margin-left:-5px;'>
<input name='tags' type='text' title='add tags to this note (in addition, all tags will be tagged "note")' cols='60' style='width:29.5%;float:right;border:1px solid #CCC;'>
<input  name='title' type='text' title='note title ...when blank this timestamp will be inserted: YYYY-0MM-0DD 0hh:0mm:0ss' cols='60' style='width:69.25%;float:right;border:1px solid #CCC;'>
</td><td rowspan='2' style='width:25%'>
<input type='button' class='button btn' value='list all notes' id='toggleNotesArchive' title="click to show or hide a list of all tiddlers tagged 'note'" onclick="
	var show=value=='list all notes';
	var el=document.getElementById('showNoteList');
	show?wikify(store.getTiddlerText('QuickNotes##archive'),el):el.innerHTML='';
	el.style.display=show?'block':'none';
	this.value=show?'hide note-list':'list all notes';
	return false;">
<input type='button' class='button btn' value='bigger size' id='toggleInputSize' title='click to toggle the size of the textarea' onclick="
	var big=this.value=='bigger size';
	this.value=(big?'normal':'bigger') + ' size';
	this.form.note.style.height=(big?tbQA.bigSize:'120px');
	return false;">
<input type='button' class='button btn' value='add reminder' title='add a reminder to the current note' onClick='
	var d=new Date();
	this.form.note.value=this.form.note.value+"\n"+"<<reminder year:%0 month:%1 day:%2 title:\"reminder title\">>".format(
		[d.getFullYear(),
		String.zeroPad(d.getMonth()+1,2),
		String.zeroPad(d.getDate(),2)]);
	this.form.note.focus();
	return false;'>
<input type='button' class='button btn' value='quick-add help' title='show help for quick-add' onclick="story.displayTiddler(null,'quick-add help');">
<input type='button' name='save' class='button btn' value='add note (click)
quick-add (ctrl+click)' style='height:55px;' title='click to add note | ctr-click to quick-add projects, actions, etc...' onclick="
	var arr,c,cs=0,cul,def,dt,ev,fi,fo,hr,ind,la=[],key,lash,l,len,lev,li,ll;
	//arr= tmp array, c=quickadd cfg, cs=corrected shift, cul=curr line, dt=def tag, ev=event, fi=first char, fo=found, ind=indent ftc
	//key=keycode, l=lingo, la=arr of last entries, lash=last shift value, len=arr length, lev=level, li=lines, ll=last line
	var nu,ok,out,note,ntgs,pos,pr,sh,subs,t,tag,tgs=[],tid,tids=[],ti='',txt='',who,when,x;
	//nu=new tid, ok=write tid. out=output, pr=prefix, pos=char position, ntgs=quickadd tags, sh=shift
	//t/tag=tag, tid=added tiddler title , tids=tiddlers to be created, tgs=tags, txt=tid text
	c=tbQA.cfg,l=tbQA.lingo;//get cfg, find & lingo
	ev=event||window.event;
	ok=function(ti){return !store.tiddlerExists(ti)||confirm(config.messages.overwriteWarning.format([ti]))};
	who=config.options.txtUserName;
	when=new Date();
	tgs=this.form.tags.value.readBracketedList();
	note=this.form.note.value;
	if(note==''){alert(l.empty);return;}//no empty notes
	if(ev.ctrlKey){//quickadd
		tids['add']=[];//init arr for all added tids
		tids['all']=store.getTiddlers('title');//&all existing ones too
		li=note.split('\n');//split lines
		while(true){
			ll=li.length==0;
			cul=li.shift();//get first line of rest
			if(!ll){
				sh=cul.match(/^(\.*)/)[0].length;//get shifted dots (.)
				cs=Math.min(cs+1,sh);//correct -> max one deeper 
				subs=cs>0&&la[cs-1]?c[la[cs-1][1]][2]:[];//get allowed subitems for this level from cfg
				fi=cul.substr(sh,1);//get first char
			}
			if(ll||cs==0&&c.fst.contains(fi)||(subs&&subs.contains(fi))){//valid definition prefix
				if(ti&&ok(ti)){//if new title exists yet & confirm overwrite, create & remember new tiddler
					tids['add'].pushUnique(ti);
					tids.push([ti,lash,ntgs,pr]);
					store.saveTiddler(ti,ti,txt,who,when,ntgs,{});
				}if(ll)break;//no more lines -> we're done
				cul=cul.substr(sh,cul.length);//get rest of line
				pr=fi;
				ti=txt='';//reset tid title & text
				ntgs=tgs.slice();//reset tid tags to global tags
				pos=cul.indexOf(' ');//split at first empty
				if(pos<0)continue;//only prefix -> invalid 
				dt=cul.substr(0,pos);//get category tag
				cul=cul.substr(pos+1,cul.length);//get rest
				arr=cul.split('|');//split rest by divider
				ti=arr[0].trim();//first part is new title
				fo=tbQA.find(dt,pr,ti);//find this tag
				if(fo)ntgs.push(fo);//found? -> add tag
				def=arr[1]?arr[1].readBracketedList():[];//remaining GTD tags
				while(def[0]){//loop 'em
					dt=def.shift().trim();//get next
					fi=dt.substr(0,1);
					fi=c.p.contains(fi)?fi:'';
					if(fi){
						fo=tbQA.find(dt,fi,ti);//find
						if(fo)ntgs.push(fo);//found? -> add tag
					}else{
						fo='';
						while(!fo&&dt){
							for(t=0;t<tids['add'].length;t++){
								tid=tids['add'][t];
								if(tid.indexOf(dt)==0){fo=tid;break;}
							}
							if(!fo&&tbQA.searchAll){
								for(t=0;t<tids['all'].length;t++){
									tid=tids['all'][t].title;
									if(tid.indexOf(dt)==0){fo=tid;break;}
								}
							}
							if(!fo)dt=prompt(l.noMatch.format([dt],(tids['add'].length==0?'':l.justAdded.format([tids['add']]))),dt);
							else ntgs.push(fo);//found? -> add tag
						}
					}			
				}
				if(cs>0&&store.getTiddler(la[cs-1][0]))ntgs.pushUnique(la[cs-1][0]);//subitem -> push parent tag
				la[cs]=[ti,pr];//remember new subitem title & prefix
				lash=cs;//store 'last shift' value
			}else txt+=cul+'\n';//add to content
		}
		//quick-add summary
		if(tids.length==0){
			if(confirm(l.none))story.displayTiddler(null,'quick-add help');
		}else{
			txt=l.listPrefix;
			for(t=0;t<tids.length;t++){//for all added
				nu=tids[t];
				tgs=nu[2].map(function(t){return '<<tag [['+t+']]>>'}).join(',');
				txt+='|<<tag [['+c[nu[3]][0]+']]>>|padding-right:5px;padding-left:'+(nu[1]*20+5)+'px;<<tag [['+nu[0]+']]>>|'+tgs+
					'|<<tiddler scripts##deleteTiddler with: [['+nu[0]+']] [[Recent notes]] norefresh >>|\n';
			}
			tit='quick-add '+when.formatString('YYYY-0MM-0DD 0hh:0mm');//timestamp as summary title 
			store.saveTiddler(tit,tit,txt,who,when,'quickadd',{});//save summary
		}
	}else{//regular note
		tit=this.form.title.value||when.formatString('YYYY-0MM-0DD 0hh:0mm:0ss');//entered title or timestamp
		tgs.push('note');//add 'note' tag
		if(ok(tit))store.saveTiddler(tit,tit,note,who,when,tgs,{});//if ok -> save
	}
	this.form.note.focus();
	story.refreshTiddler('Recent notes',null,true);
	refreshDisplay();">
</td></tr><tr><td><textarea name='note' title='note text' rows='5' cols='60' style='height:120px;width:99%;float:right;border:1px solid #CCC;'></textarea></td><td>
</td></tr></table>
</form><div id="showNoteList" style="clear:both;width:98%;margin:2px 0 5px 0;padding:2px 1%;display:none;"></div><h1 style="padding-top:0;">Recent notes</h1></html><<tiddler 'Recent notes'>>/%
!archive
<<tiddlerList tags:"note" order:"-modified" dateFormat:"pppp" itemTemplate:"<<tiddler scripts##deleteTiddler with:'%title' 'Recent notes' norefresh $)): %link (%created) @@padding-left:2em;tags: %tags@@\n">>
!end%/<<tiddler {{
jQuery("#qNotes .button").css({'margin':'0','padding':'0','display':'block'});
jQuery("#qNotes .btn").css({'margin':'0 0 2px 0','clear':'both','z-index':'1','width':'98%','display':'block','float':'right'});
"";}}>>
/***
|Name:|QuickOpenTagPlugin|
|Description:|Changes tag links to make it easier to open tags as tiddlers|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|

@@color:red; ((modified for tbGTD(^mod by Tobias Beer ...optionally does not show ~QuickOpenTag-button if there are no tagging tiddlers)))@@

***/
//{{{
config.quickOpenTag = {
	hideIfNoneTagging:true,
	dropdownChar: "\u25be", //(document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?
	createTagButton: function(place,tag,excludeTiddler) {
		// little hack so we can do this: <<tag PrettyTagName|RealTagName>>
		var splitTag = tag.split("|");
		var pretty = tag;
		if (splitTag.length == 2) {
			tag = splitTag[1];
			pretty = splitTag[0];
		}
		var sp = createTiddlyElement(place,"span",null,"quickopentag");
		createTiddlyText(createTiddlyLink(sp,tag,false),pretty);

		if(config.quickOpenTag.hideIfNoneTagging&&store.getTaggedTiddlers(tag).length==0)return; //tbGTD
		var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
                        config.views.wikified.tag.tooltip.format([tag]),onClickTag);
		theTag.setAttribute("tag",tag);
		if (excludeTiddler)
			theTag.setAttribute("tiddler",excludeTiddler);
    		return(theTag);
	},

	miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var tid=params[0]?params[0]:tiddler;
		if (!store.getValue(tid,'nominitag')&&store.getTaggedTiddlers(tid.title).length>0) {
			var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
                        	config.views.wikified.tag.tooltip.format([tid.title]),onClickTag);
			theTag.setAttribute("tag",tid.title);
			theTag.className = "miniTag";
		}
	},

	allTagsHandler: function(place,macroName,params) {
		var tags = store.getTags(params[0]);
		var filter = params[1]; // new feature
		var ul = createTiddlyElement(place,"ul");
		if(tags.length == 0)
			createTiddlyElement(ul,"li",null,"listTitle",this.noTags);
		for(var t=0; t<tags.length; t++) {
			var title = tags[t][0];
			if (!filter || (title.match(new RegExp('^'+filter)))) {
				var info = getTiddlyLinkInfo(title);
				var theListItem =createTiddlyElement(ul,"li");
				var theLink = createTiddlyLink(theListItem,tags[t][0],true);
				var theCount = " (" + tags[t][1] + ")";
				theLink.appendChild(document.createTextNode(theCount));
				var theDropDownBtn = createTiddlyButton(theListItem," " +
					config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
				theDropDownBtn.setAttribute("tag",tags[t][0]);
			}
		}
	},

	// todo fix these up a bit
	styles: [
"/*{{{*/",
"/* created by QuickOpenTagPlugin */",
".tagglyTagged .quickopentag, .tagged .quickopentag {margin-right:1.2em; border:1px solid [[ColorPalette::TertiaryPale]]; padding:2px 0 2px 1px;}",
".quickopentag .tiddlyLink, .quickopentag a.button {padding:1px;margin:0;}",
".miniTag:hover {background:[[ColorPalette::SecondaryLight]]}",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink {border:0px solid [[ColorPalette::Foreground]];}",
"/*}}}*/",
	""].join("\n"),

	init: function() {
		// we fully replace these builtins. can't hijack them easily
		window.createTagButton = this.createTagButton;
		config.macros.allTags.handler = this.allTagsHandler;
		config.macros.miniTag = { handler: this.miniTagHandler };
		config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;
		store.addNotification("QuickOpenTagStyles",refreshStyles);
	}
}

config.quickOpenTag.init();

//}}}
/***
|''Name:''|ReminderPlugin|
|''Version:''|2.3.11 (Oct 17, 2009)|
|''Source:''|http://remindermacros.tiddlyspot.com|
|''Author:''|Jeremy Sheeley(pop1280 [at] excite [dot] com) / Modded: Tobias Beer|
|''Licence:''|[[BSD open source license]]|
|''Macros:''|reminder, showreminders, displayTiddlersWithReminders, newReminder|
|''TiddlyWiki:''|2.0+|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|
@@color:red;massively modded for tbGTD!  ...shrinked code| dateformat | list format + prefix@@
!Description
This plugin provides macros for tagging a date with a reminder. Use the {{{reminder}}} macro to do this. 
The macros {{{showReminders}}} and {{{displayTiddlersWithReminder}}} search through all available tiddlers looking for upcoming reminders.
!Code
***/
//{{{
version.extensions.ReminderPlugin={major:2,minor:3,revision:11,date:new Date(209,10,17),source:"http://remindermacros.tiddlyspot.com/"};

//========== Configuration... modify this section to change the defaults for  leadtime and display strings
config.macros["reminder"]={};
config.macros["newReminder"]={};
config.macros["showReminders"]={};
config.macros["displayTiddlersWithReminders"]={};

config.macros.reminders={
	defaultLeadTime:[-365,6000],
	defaultReminderMessagePrefix:"@@padding-right:5px;color:"+store.getTiddlerSlice('ColorPalette','SecondaryMid')+";''reminder&#58;''@@",
	defaultReminderMessage:"DATE ANNIVERSARY @@color:"+store.getTiddlerSlice('ColorPalette','TertiaryMid')+";(DIFF)@@@@padding:0 3px;TITLE@@",
	defaultShowReminderMessagePrefix:"|noborder|k\n", //|__''when''__|__''what''__|__''tiddler''__|\n",
	defaultShowReminderMessage:"|DATE ANNIVERSARY @@color:"+store.getTiddlerSlice('ColorPalette','TertiaryMid')+";(DIFF)@@|TITLE|<<tag TIDDLER>>|",
	defaultAnniversaryMessage:"(DIFF)",
	untitledReminder:"Untitled Reminder",
	noReminderFound:"Overdue reminder? Couldn't find a match for 'TITLE' in the next LEADTIMEUPPER days.",
	todayString:"Today",
	tomorrowString:"Tomorrow",
	ndaysString:"DIFF days",
	dateFormat:"MMM. DD",
	emtpyShowRemindersString:"no upcoming events",
	txtRemindTip:"open a form to add a new reminder to this tiddler",
	txtRemind:"remind",
	txtTitle:"Please enter a title",
	txtEachYear:"Every year",
	txtEachMonth:"Every month",
	txtEachDay:"Every day"
}

//========== Code... no need to edit below!
//holds the cache of reminders, so that we don't recompute the same reminder over again
var reminderCache={};
config.macros.showReminders.handler=function showReminders(place,macroName,params){
	var lead=[0,14];
	var now=new Date().getMidnight();
	var r=getParamsForReminder(params);
	var hasDate=r["year"]!=null||r["month"]!=null||r["day"]!=null||r["dayofweek"]!=null;
	if(r["leadtime"]!=null){
		lead=r["leadtime"];
		//If they've entered a day, we need to make sure to find it
		if(hasDate)r["leadtime"]=[-10000,10000];
	}
	var match=now;
	if(hasDate){
		var LBound=new Date().getMidnight().addDays(r["leadtime"][0]);
		var UBound=new Date().getMidnight().addDays(r["leadtime"][1]);
		match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
	}
	
	var arr=findTiddlersWithReminders(match,lead,r["tag"],r["limit"]);
	var el=createTiddlyElement(place,"span",null,null,null);
	var msg="";
	c=config.macros.reminders;
	if(arr.length==0)msg+=c.emtpyShowRemindersString;
	else msg+=!r["format"]||r["format"]&&!r["formatprefix"]?c.defaultShowReminderMessagePrefix:r["formatprefix"]; //tbGTD
	for(var x=0;x<arr.length;x++){
		var t=arr[x];
	  if(r["format"]!=null)t["params"]["format"]=r["format"];
	  else arr[x]["params"]["format"]=c.defaultShowReminderMessage;
	  msg+=getReminderMessageForDisplay(t["diff"],t["params"],t["matchedDate"],t["tiddler"]);
	  msg+="\n";
	}
	wikify(msg,el,null,null);
};


config.macros.displayTiddlersWithReminders.handler=function displayTiddlersWithReminders(place,macroName,params){
	var now=new Date().getMidnight();
	var lead=[0,14];
	var r=getParamsForReminder(params);
	var hasDate=r["year"]!=null||r["month"]!=null||r["day"]!=null||r["dayofweek"]!=null;
	if(r["leadtime"]!=null){
		lead=r["leadtime"];
		//If they've entered a day, make sure to find it 
		if(hasDate)r["leadtime"]=[-10000,10000];
	}
	var match=now;
	if(hasDate){
		var LBound=new Date().getMidnight().addDays(r["leadtime"][0]);
		var UBound=new Date().getMidnight().addDays(r["leadtime"][1]);
		match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
	}
	var arr=findTiddlersWithReminders(match,lead,r["tag"],r["limit"]);
	for(var x=0;x<arr.length;x++)displayTiddler(null,arr[x]["tiddler"],0,null,false,false,false);
};

config.macros.reminder.handler=function reminder(place,macroName,params){
	var set=config.macros.reminders;
	var r=getParamsForReminder(params);
	if(r["hidden"]!=null)return;
	var lead=r["leadtime"];
	var c=config.macros.reminders;
	if(lead==null)lead=c.defaultLeadTime;
	var LBound=new Date().getMidnight().addDays(lead[0]);
	var UBound=new Date().getMidnight().addDays(lead[1]);
	var match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
	var tid=story.findContainingTiddler(place);if(!tid)return;
	var title=tid.getAttribute('tiddler');
	if(match!=null){
		var diff=match.getDifferenceInDays(new Date().getMidnight());
		var el=createTiddlyElement(place,"span",null,set.txtRemind,null);
		var msg=c.defaultReminderMessagePrefix+getReminderMessageForDisplay(diff,r,match,title);
		wikify(msg,el,null,null);
	}else createTiddlyElement(place,"span",null,"remind",c.noReminderFound.replace("TITLE",r["title"]).replace("LEADTIMEUPPER",lead[1]).replace("LEADTIMELOWER",lead[0]).replace("TIDDLERNAME",title).replace("TIDDLER","[["+title+"]]"));
}

config.macros.newReminder.handler=function newReminder(place,macroName,params){
  var set=config.macros.reminders;
  var today=new Date().getMidnight();
  var out='<html><form id="addReminderForm"><select name="year"><option value="">'+set.txtEachYear+'</option>';
  for(var i=0;i<5;i++)
		out+='<option'+(i==0?' selected':'')+' value="'+(today.getFullYear()+i)+'">'+(today.getFullYear()+i)+'</option>';
		out+='</select><select name="month"><option value="">'+set.txtEachMonth+'</option>';
  for(i=0;i<12;i++)
		out+='<option'+(i==today.getMonth()?' selected':'')+' value="'+(i+1)+'">'+config.messages.dates.months[i]+'</option>';
		out+='</select><select name="day"><option value="">'+set.txtEachDay+'</option>';
  for(i=1;i<32;i++)
		out+='<option'+(i==today.getDate()?' selected':'')+' value="'+i+'">'+i+'</option>';
		out+='</select><input type="text" size="25" name="title" value="'+set.txtTitle+'" onfocus="this.select();"><input type="button" value="ok" onclick="addReminderToTiddler(this.form)"></form></html>';
  var panel=config.macros.slider.createSlider(place,null,set.txtRemind,set.txtRemindTip);
  wikify(out,panel,null,store.getTiddler(params[1]));
}

// onclick: process input and insert reminder at 'marker'
window.addReminderToTiddler=function(form){
	if(!store.getTiddler)store.getTiddler=function(title){return this.tiddlers[title];};
	var title=story.findContainingTiddler(form).getAttribute('tiddler');
	var tiddler=store.getTiddler(title);
	var add='\n<<reminder ';
	if(form.year.value!="")add+='year:'+form.year.value+' ';
	if(form.month.value!="")add+='month:'+form.month.value+' ';
	if(form.day.value!="")add+='day:'+form.day.value+' ';
	add+='title:"'+form.title.value+'" ';
	add+='>>';
	tiddler.set(null,tiddler.text+add);
	form.parentNode.parentNode.previousSibling.onclick(); //tbGTD: close form when done processing
	story.refreshTiddler(title,1,true);
	store.setDirty(true);
};

function hasTag(tags,filters){
	//Make sure we respond well to empty tiddlerTaglists or tagFilterlists
	if(filters.length==0||tags.length==0)return true;
	var bHasTag=false;
	var bNoPos=true;
	for(var t3=0;t3<filters.length;t3++){
		for(var t2=0;t2<tags.length;t2++){
			if(filters[t3].length>1&&filters[t3].charAt(0)=='!'){
				//If at any time a negative filter is matched, we return false
				if(tags[t2]==filters[t3].substring(1))return false;
			}else{
				//We encountered the first positive filter
				if(bNoPos)bNoPos=false;
				//A positive filter is matched. As long as no negative filter is matched, hasTag will return true
				if(tags[t2]==filters[t3])bHasTag=true;
			}
		}
	}
	return (bNoPos||bHasTag);
};

window.findTiddlersWithReminders=function findTiddlersWithReminders(base,lead,tags,limit){
	var expr=new RegExp("<<(reminder)(.*)>>","mg");
	var matches=store.search(expr,"title","");
	var arr=[];
	var arrTags=null;
	//allows tags with spaces. thanks Robin Summerhill, 4-Oct-06.
	if(tags!=null)arrTags=tags.readBracketedList();
	for(var t=matches.length-1;t>=0;t--){
		if(arrTags!=null&&!hasTag(matches[t].tags,arrTags))continue;
		var targetText=matches[t].text;
		do{
			// Get the next formatting match
			var match=expr.exec(targetText);
			if(match&&match[1]!=null&&match[1].toLowerCase()=="reminder"){
				//Find the matching date.
				var params=match[2]!=null ? match[2].readMacroParams():{};
				var r=getParamsForReminder(params);
				if(limit!=null||r["leadtime"]==null){
					if(lead==null)r["leadtime"]=lead;
					else{
						r["leadtime"]=[];
						r["leadtime"][0]=lead[0];
						r["leadtime"][1]=lead[1];
					}
				}
				if(r["leadtime"]==null)r["leadtime"]=config.macros.reminders.defaultLeadTime;
				var LBound=base.addDays(r["leadtime"][0]);
				var UBound=base.addDays(r["leadtime"][1]);
				var found=findDateForReminder(r,base,LBound,UBound);
				while(found!=null){
					var tmp={};
					tmp["diff"]=found.getDifferenceInDays(base);
					tmp["matchedDate"]=new Date(found.getFullYear(),found.getMonth(),found.getDate(),0,0);
					tmp["params"]=cloneParams(r);
					tmp["tiddler"]=matches[t].title;
					tmp["tags"]=matches[t].tags;
					arr.pushUnique(tmp);
					if(r["recurdays"]!=null||(r["year"]==null)){
						LBound=LBound.addDays(found.getDifferenceInDays(LBound)+ 1);
						found=findDateForReminder(r,base,LBound,UBound);
					}
					else found=null;
				}
			}
		}while(match);
	}
	//Sort the array by number of days remaining
	if(arr.length>1)arr.sort(function(a,b){if(a["diff"]==b["diff"])return(0);else return a["diff"]<b["diff"]?-1:+1;});
	return arr;
};

//Takes the reminder macro parameters and generates the string that is used for display ...not intended to be called by other plugins.
window.getReminderMessageForDisplay= function getReminderMessageForDisplay(diff,params,match,tid){
	var c=config.macros.reminders;
	var anniv="";
	var reminderTitle=params["title"];
	if(reminderTitle==null)reminderTitle=c.untitledReminder;
	if(params["firstyear"]!=null)anniv=c.defaultAnniversaryMessage.replace("DIFF",(match.getFullYear()-params["firstyear"]));
	var sDiff="";
	if(diff==0)sDiff=c.todayString;
	else if(diff==1)sDiff=c.tomorrowString;
	else sDiff=c.ndaysString.replace("DIFF",diff);
	msg=params["format"]!=null?params["format"]:c.defaultReminderMessage;
	msg=msg.replace(/TIDDLER/g,"TIDELER"); //Avoid replacing DD in TIDDLER with the date
	msg=match.formatStringDateOnly(msg);
	msg=msg.replace(/TIDELER/g,"TIDDLER");
	if(tid!=null){
		msg=msg.replace(/TIDDLERNAME/g,tid);
		msg=msg.replace(/TIDDLER/g,"[["+tid+"]]");
	}
	msg=msg.replace("DIFF",sDiff).replace("TITLE",reminderTitle).replace("DATE",match.formatString("mmm. 0DD")).replace("ANNIVERSARY",anniv);
	return msg;
};

// Parse macro params into a hashtable.  This handles the arguments for reminder, showReminders and displayTiddlersWithReminders
window.getParamsForReminder=function getParamsForReminder(params){
	var r={};
	var type="";
	var num=0;
	var title="";
	for(var p=0;p<params.length;p++){
		var split=params[p].split(":");
		type=split[0].toLowerCase();
		var value=split[1];
		for(var i=2;i<split.length;i++)value+=":"+split[i];
		if(type=="nolinks"||type=="limit"||type=="hidden")num=1;
		else if(type=="leadtime"){
			var leads=value.split("...");
			if(leads.length==1){leads[1]=leads[0];leads[0]=0;}
			leads[0]=parseInt(leads[0],10);
			leads[1]=parseInt(leads[1],10);
			num=leads;
		}
		else if(type=="offsetdayofweek"){
			if(value.substr(0,1)=="-"){r["negativeOffsetDayOfWeek"]=1;value=value.substr(1);}
			num=parseInt(value,10);
		}
		else if(type!="title"&&type!="tag"&&type!="format")num=parseInt(value,10);
		else{
			p++;
			title=value;
			while(title.substr(0,1)=='"'&&title.substr(title.length-1,1)!='"'&&params[p]!=undefined)title+= " "+params[p++];
			//Trim off the leading and trailing quotes
			if(title.substr(0,1)=="\""&&title.substr(title.length-1,1)== "\""){
			  title=title.substr(1,title.length-2);
			  p--;
			}
			num=title;
		}
		r[type]=num;
	}
	//date is synonymous with day
	if(r["day"]==null)r["day"]=r["date"];
	return r;
};

//Finds the date specified in the reminder params; returns null if no match found; not intended for use by other plugins
window.findDateForReminder= function findDateForReminder(r,base,LBound,UBound){
	if(base==null)base=new Date().getMidnight();
	var key=base.convertToYYYYMMDDHHMM();
	for(var k in r)key+=","+k+"|"+r[k];
	key+=","+LBound.convertToYYYYMMDDHHMM();
	key+=","+UBound.convertToYYYYMMDDHHMM();
	//If we don't find a match in this run, then cache that the reminder can't be matched
	if(reminderCache[key]==null)reminderCache[key]=false;
	//We've already tried this date and failed
	else if(reminderCache[key]==false)return null;
	else return reminderCache[key];
	var bOffsetSpecified=
		r["offsetyear"]!=null||
		r["offsetmonth"]!=null||
		r["offsetday"]!=null||
		r["offsetdayofweek"]!=null||
		r["recurdays"]!=null;
	// If matching the base date for a dayofweek offset, look for the base date a little further back.
	var tmp1LBound=LBound;
	if(r["offsetdayofweek"]!=null)tmp1LBound=LBound.addDays(-6);
	var match=base.findMatch(r,tmp1LBound,UBound);
	if(match!=null){
		var newMatch=match;
		if(r["recurdays"]!=null)
			while(newMatch.getTime()<LBound.getTime())newMatch=newMatch.addDays(r["recurdays"]);
		else if(
				r["offsetyear"]!=null||
				r["offsetmonth"]!=null||
				r["offsetday"]!=null||
				r["offsetdayofweek"]!=null){
			var tmp=cloneParams(r);
			tmp["year"]=r["offsetyear"];
			tmp["month"]=r["offsetmonth"];
			tmp["day"]=r["offsetday"];
			tmp["dayofweek"]=r["offsetdayofweek"];
			var tmpL=LBound;
			var tmpU=UBound;
			if(tmp["offsetdayofweek"]!=null){
				if(tmp["negativeOffsetDayOfWeek"]==1){
					tmpL=match.addDays(-6);
					tmpU=match;
				}else{
					tmpL=match;
					tmpU=match.addDays(6);
				}
			}
			newMatch=match.findMatch(tmp,tmpL,tmpU);
			//The offset couldn't be matched.  return null.
			if(newMatch==null)return null;
		}
		if(newMatch.isBetween(LBound,UBound)){
		  reminderCache[key]=newMatch;
		  return newMatch;
		}
	}
	return null;
};

//Does the same job as findDateForReminder, but doesn't deal with offsets or recurring reminders.
Date.prototype.findMatch=function findMatch(r,LBound,UBound){
	var Y=(r["year"]!=null);
	var M=(r["month"]!=null);
	var D=(r["day"]!=null);
	var W=(r["dayofweek"]!=null);
	if(D&&M&&Y)return new Date(r["year"],r["month"]-1,r["day"],0,0);
	if(D&&M&&!Y&&!W){
		//Shortcut: first try this year... if too small, try next year
		var tmp=new Date(this.getFullYear(),r["month"]-1,r["day"],0,0);
		if(tmp.getTime()<LBound.getTime())tmp=new Date((this.getFullYear()+1),r["month"]-1,r["day"],0,0);
		if(tmp.isBetween(LBound,UBound))return tmp;
		else return null;
	}
	var newDate=LBound;
	while(newDate.isBetween(LBound,UBound)){
		var test=testDate(newDate,r,Y,M,D,W);
		if(test!=null)return test;
		newDate=newDate.addDays(1);
	}
}

function cloneParams(p){var tmp={};for(var i in p)tmp[i]=p[i];return tmp;}
function testDate(str,d,Y,M,D,W){if((!Y&&d["year"]==str.getFullYear())&&(!M&&(d["month"]-1)==str.getMonth())&&(!D&&d["day"]==str.getDate())&&(!W&&d["dayofweek"]==str.getDay())) return str;}
//Returns true if the date is in between two given dates
Date.prototype.isBetween=function isBetween(lowerBound,upperBound){return(this.getTime()>=lowerBound.getTime()&&this.getTime()<=upperBound.getTime());}
//Return a new date, with the time set to midnight (0000)
Date.prototype.getMidnight=function getMidnight(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0);}
//Add the specified number of days to a date
Date.prototype.addDays=function addDays(numberOfDays){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+numberOfDays,0,0);}
//Return the number of days between two dates
Date.prototype.getDifferenceInDays=function getDifferenceInDays(d){
	//ignores daylight savings
	var tmp=this.addDays(0);
	if(this.getTime()>d.getTime()){for(var i=0;tmp.getTime()>d.getTime();i++)tmp=tmp.addDays(-1);return i;}
	else{for(var i=0;tmp.getTime()<d.getTime();i++)tmp=tmp.addDays(1);return i*-1;}
	return 0;
}
//Substitute date components into a string
Date.prototype.formatStringDateOnly=function formatStringDateOnly(d){
	d=d.replace("YYYY",this.getFullYear());
	d=d.replace("YY",String.zeroPad(this.getFullYear()-2000,2));
	d=d.replace("MMM",config.messages.dates.months[this.getMonth()]);
	d=d.replace("0MM",String.zeroPad(this.getMonth()+1,2));
	d=d.replace("MM",this.getMonth()+1);
	d=d.replace("DDD",config.messages.dates.days[this.getDay()]);
	d=d.replace("0DD",String.zeroPad(this.getDate(),2));
	d=d.replace("DD",this.getDate());
	return d;
};

//}}}
/***
|Name:|RenameTagsPlugin|
|Description:|Allows you to easily rename or delete tags across multiple tiddlers|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
Rename a tag and you will be prompted to rename it in all its tagged tiddlers.
***/
//{{{
config.renameTags = {

	prompts: {
		rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",
		remove: "Remove the tag '%0' from %1 tidder%2?"
	},

	removeTag: function(tag,tiddlers) {
		store.suspendNotifications();
		for (var i=0;i<tiddlers.length;i++) {
			store.setTiddlerTag(tiddlers[i].title,false,tag);
		}
		store.resumeNotifications();
		store.notifyAll();
	},

	renameTag: function(oldTag,newTag,tiddlers) {
		store.suspendNotifications();
		for (var i=0;i<tiddlers.length;i++) {
			store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old
			store.setTiddlerTag(tiddlers[i].title,true,newTag);  // add new
		}
		store.resumeNotifications();
		store.notifyAll();
	},

	storeMethods: {

		saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,

		saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields) {
			if (title != newTitle) {
				var tagged = this.getTaggedTiddlers(title);
				if (tagged.length > 0) {
					// then we are renaming a tag
					if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))
						config.renameTags.renameTag(title,newTitle,tagged);

					if (!this.tiddlerExists(title) && newBody == "")
						// dont create unwanted tiddler
						return null;
				}
			}
			return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields);
		},

		removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,

		removeTiddler: function(title) {
			var tagged = this.getTaggedTiddlers(title);
			if (tagged.length > 0)
				if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))
					config.renameTags.removeTag(title,tagged);
			return this.removeTiddler_orig_renameTags(title);
		}

	},

	init: function() {
		merge(TiddlyWiki.prototype,this.storeMethods);
	}
}

config.renameTags.init();

//}}}
{{black{
<<calendar thismonth>>
}}}
<<tabs txtMainTab tags "list of tags" TagCloud recent "list tiddlers by date" SideBarTabs##recent toc "browse tiddlers" SideBarTabs##all more "standard lists and more" TabMore>>/%
!recent
{{recent{<<timeline "modified" "17" "YYYY-0MM-0DD">>
----
@@padding-left:10px;[[::complete timeline::|timeline]]@@}}}
!all
<<tableOfContents "label:browse tiddlers..." sort:title width:100% size:20 date:YYYY-0MM-0DD>>
----
@@padding-left:10px;[[::alphabetical list::|TabAll]]@@
!end%/
/***
|''Name''|SimpleSearchPlugin|
|''Description''|displays search results as a simple list of matching tiddlers|
|''Authors''|FND|
|''Version''|0.4.1|
|''Status''|stable|
|''Source''|http://devpad.tiddlyspot.com/#SimpleSearchPlugin|
|''CodeRepository''|http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/SimpleSearchPlugin.js|
|''License''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Keywords''|search|
!Code
***/
//{{{
if(!version.extensions.SimpleSearchPlugin) { //# ensure that the plugin is only installed once
version.extensions.SimpleSearchPlugin = { installed: true };

if(!config.extensions) { config.extensions = {}; }

config.extensions.SimpleSearchPlugin = {
	heading: "Search Results",
	containerId: "searchResults",
	btnCloseLabel: "close",
	btnCloseTooltip: "dismiss search results",
	btnCloseId: "search_close",
	btnOpenLabel: "open all",
	btnOpenTooltip: "open all search results",
	btnOpenId: "search_open",

	displayResults: function(matches, query) {
		story.refreshAllTiddlers(true); // update highlighting within story tiddlers
		var el = document.getElementById(this.containerId);
		query = '"""' + query + '"""'; // prevent WikiLinks
		if(el) {
			removeChildren(el);
		} else { //# fallback: use displayArea as parent
			var container = document.getElementById("displayArea");
			el = document.createElement("div");
			el.id = this.containerId;
			el = container.insertBefore(el, container.firstChild);
		}
		var msg = "!" + this.heading + "\n";
		if(matches.length > 0) {
			msg += "''" + config.macros.search.successMsg.format([matches.length.toString(), query]) + ":''\n";
			this.results = [];
			for(var i = 0 ; i < matches.length; i++) {
				this.results.push(matches[i].title);
				msg += "* [[" + matches[i].title + "]]\n";
			}
		} else {
			msg += "''" + config.macros.search.failureMsg.format([query]) + "''"; // XXX: do not use bold here!?
		}
		createTiddlyButton(el, this.btnCloseLabel, this.btnCloseTooltip, config.extensions.SimpleSearchPlugin.closeResults, "button", this.btnCloseId);
		if(matches.length > 0) { // XXX: redundant!?
			createTiddlyButton(el, this.btnOpenLabel, this.btnOpenTooltip, config.extensions.SimpleSearchPlugin.openAll, "button", this.btnOpenId);
		}
		wikify(msg, el);
	},

	closeResults: function() {
		var el = document.getElementById(config.extensions.SimpleSearchPlugin.containerId);
		removeNode(el);
		config.extensions.SimpleSearchPlugin.results = null;
		highlightHack = null;
	},

	openAll: function(ev) {
		story.displayTiddlers(null, config.extensions.SimpleSearchPlugin.results);
		return false;
	}
};

// override Story.search()
Story.prototype.search = function(text, useCaseSensitive, useRegExp) {
	highlightHack = new RegExp(useRegExp ? text : text.escapeRegExp(), useCaseSensitive ? "mg" : "img");
	var matches = store.search(highlightHack, null, "excludeSearch");
	var q = useRegExp ? "/" : "'";
	config.extensions.SimpleSearchPlugin.displayResults(matches, q + text + q);
};

// override TiddlyWiki.search() to sort by relevance
TiddlyWiki.prototype.search = function(searchRegExp, sortField, excludeTag, match) {
	var candidates = this.reverseLookup("tags", excludeTag, !!match);
	var primary = [];
	var secondary = [];
	var tertiary = [];
	for(var t = 0; t < candidates.length; t++) {
		if(candidates[t].title.search(searchRegExp) != -1) {
			primary.push(candidates[t]);
		} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
			secondary.push(candidates[t]);
		} else if(candidates[t].text.search(searchRegExp) != -1) {
			tertiary.push(candidates[t]);
		}
	}
	var results = primary.concat(secondary).concat(tertiary);
	if(sortField) {
		results.sort(function(a, b) {
			return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
		});
	}
	return results;
};

} //# end of "install only once"
//}}}
|tblSITE|k
|width:200px;padding:0.5em;font-size:2em;SiteTitle|>|>|>|font-size:1.1em;padding-top:1em;SiteSubtitle @@padding-left:7%;[[topMenuL]]@@@@padding-left:15%;[[topMenuR]]@@|
|{{floatleft{@@padding-left:10px;font-size:0.9em;font-weight:bold;display:inline;<<tiddler topMenuL>>@@}}}{{floatright{@@text-align:right;font-size:0.9em;font-weight:bold;display:inline;<<tiddler topMenuR>>@@}}}|>|>|>|>|
|width:10%;padding:0;text-align:left; @@font-weight:bold;font-size:1.2em;padding-left:15px;[[MainMenu]]@@<br/>@@display:block;margin-top:10px;padding:0;<<tiddler MainMenu>>@@|>|>|border-bottom:1px solid #333;background:#444;color:#111;width:60%;height:15px;padding:2px 2px 0 2px;{{tblLAYOUTMID{@@background:#eee;[[TiddlersBar|TiddlersBarPlugin]]@@}}} |width:20%; <<tiddler SiteLayout##Sidebar>> |
|~|~|background:#EEE;color:#111;height:150px;text-align:center;padding-top:10px; {{tblLAYOUTMID{<<tiddler SiteLayout##Tiddlers>>}}}|>|~|
|>|>|>|>|&nbsp;|
/%
!Tiddlers
@@display:block;position:relative;left:-40%;top:0px;Tiddler viewer@@@@display:block;position:relative;right:-22%;top:-15px; [[x-tab]] / [[x-plore]] / [[x-tag|x-tagger]] / [[ToolbarCommands]]@@
@@font-size:1.5em;color:#999;displayArea / tiddlerDisplay@@
@@display:block;margin-top:15px;font-size:2em;[[tbGtdTheme]] / <<tag site>>@@
@@display:block;margin-top:5px;font-size:1em;[[StyleSheet]] / [[StyleSheetShortcuts]]@@
!Sidebar
@@display:block;width:100%;height:50px;padding-right:0%;padding-top:10px;[[SideBarOptions]]<br/>[[calendar]]@@@@display:block;margin-top:5px;width:100%;height:150px;SideBarTabs<br /><<tiddler SiteLayout##Tabs>>@@
!Tabs
@@display:block;text-align:left;font-size:0.9em;padding:5px;background:#555;height:100px;[[tags|TagCloud]]|[[recent|TabTimeline]]|[[toc|SideBarTabs]]|[[more|TabMore]]<br>[[tags|TabTags]]|[[plug|systemConfig]]|[[miss|TabMoreMissing]]|[[orph|TabMoreOrphans]]|[[shad|TabMoreShadowed]]|[[ex|excludeLists]]<br /><br />{{medium{[[TagCloud]]}}}@@
!End%/
<<tiddler {{
var s='.tblSITE, .tblSITE thead, .tblSITE tr, .tblSITE td{border:0;color:white;background:#333;}'+
'.tblSITE a,.tblSITE a.tiddlyLink, .tblSITE a.button{color:#EEE;border-color:transparent;font-weight:bold;padding:0 3px;font-style:normal;}'+
'.tblSITE a:hover,.tblSITE a.tiddlyLink:hover, .tblSITE a.button:hover{color:#39F;border-color:transparent;background:transparent;}'+
'.tblSITE{-moz-border-radius:5px; -webkit-border-radius:5px;}'+
'.tblSITE ul, .tblSITE li{list-style-type:none;}'+
'.tblLAYOUTMID a.tiddlyLink{color:#111;}';
setStylesheet(s,'StyleSheetSiteLayout');
'';}}>>
a tiddlywiki based system to ''Get Things Done''
[[tb|journal]][[GTD|desk]]
[[StyleSheetShortcuts]]
/***
|Name|StyleSheetShortcuts|
|Source|http://www.TiddlyTools.com/#StyleSheetShortcuts|
|Version||
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|CSS|
|Description|'convenience' classes for common formatting, alignment, boxes, tables, etc.|

These 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.
***/
/*{{{*/

/* text alignments */
.left
  { display:block;text-align:left; }
.center
  { display:block;text-align:center; }
.center table
  { margin:auto !important; }
.right  
  { display:block;text-align:right; }
.justify
  { display:block;text-align:justify; }
.indent
  { display:block;margin:0;padding:0;border:0;margin-left:2em; }
.floatleft
  { float:left; }
.floatright
  { float:right; }
.valignTop, .valignTop table, .valignTop tbody, .valignTop th, .valignTop tr, .valignTop td
  { vertical-align:top; }
.valignBottom, .valignBottom table, .valignBottom tbody, .valignBottom th, .valignBottom tr, .valignBottom td
  { vertical-align:bottom; }
.clear
  { clear:both; }
.wrap
  { white-space:normal; }
.nowrap
  { white-space:nowrap; }
.hidden
  { display:none; }
.show
  { display:inline !important; }
.span
  { display:span; }
.block
  { display:block; }
.relative
  { position:relative; }
.absolute
  { position:absolute; }

/* font sizes */
.big
  { font-size:14pt;line-height:120% }
.medium
  { font-size:12pt;line-height:120% }
.normal
  { font-size:9pt;line-height:120% }
.small
  { font-size:8pt;line-height:120% }
.fine
  { font-size:7pt;line-height:120% }
.tiny
  { font-size:6pt;line-height:120% }
.larger
  { font-size:120%; }
.smaller
  { font-size:80%; }

/* font styles */
.bold
  { font-weight:bold; }
.italic
  { font-style:italic; }
.underline
  { text-decoration:underline; }

/* plain list items (no bullets or indent) */
.nobullets li { list-style-type: none; margin-left:-2em; }

/* multi-column tiddler content (not supported in Internet Explorer) */
.twocolumns { display:block;
  -moz-column-count:2; -moz-column-gap:1em; -moz-column-width:50%; /* FireFox */
  -webkit-column-count:2; -webkit-column-gap:1em; -webkit-column-width:50%; /* Safari */
  column-count:2; column-gap:1em; column-width:50%; /* Opera */
}
.threecolumns { display:block;
  -moz-column-count:3; -moz-column-gap:1em; -moz-column-width:33%; /* FireFox */
  -webkit-column-count:3; -webkit-column-gap:1em; -webkit-column-width:33%; /* Safari */
  column-count:3; column-gap:1em; column-width:33%; /* Opera */
}
.fourcolumns { display:block;
  -moz-column-count:4; -moz-column-gap:1em; -moz-column-width:25%; /* FireFox */
  -webkit-column-count:4; -webkit-column-gap:1em; -webkit-column-width:25%; /* Safari */
  column-count:4; column-gap:1em; column-width:25%; /* Opera */
}

/* page breaks */
.breakbefore { page-break-before:always; }
.breakafter { page-break-before:always; } 

/* show/hide browser-specific content for InternetExplorer vs. non-IE ("moz") browsers */
*[class="ieOnly"]
  { display:none; } /* hide in moz (uses CSS selector) */
* html .mozOnly, *:first-child+html .mozOnly
  { display: none; } /* hide in IE (uses IE6/IE7 CSS hacks) */

/* borderless tables */
.borderless, .borderless table, .borderless td, .borderless tr, .borderless th, .borderless tbody
  { border:0 !important; margin:0 !important; padding:0 !important; }
.widetable, .widetable table
  { width:100%; }

/* thumbnail images (fixed-sized scaled images) */
.thumbnail img { height:5em !important; }

/* stretchable images (auto-size to fit tiddler) */
.stretch img { width:95%; }

/* grouped content */
.outline
  { display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; }
.menubox
  { display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#fff; color:#000; }
.menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting
  { color:#009 !important; }
.groupbox
  { display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#ffe; color:#000; }
.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting
  { color:#009 !important; }
.groupbox code
  { color:#333 !important; }
.borderleft
  { margin:0;padding:0;border:0;margin-left:1em; border-left:1px dotted; padding-left:.5em; }
.borderright
  { margin:0;padding:0;border:0;margin-right:1em; border-right:1px dotted; padding-right:.5em; }
.borderbottom
  { margin:0;padding:1px 0;border:0;border-bottom:1px dotted; margin-bottom:1px; padding-bottom:1px; }
.bordertop
  { margin:0;padding:0;border:0;border-top:1px dotted; margin-top:1px; padding-top:1px; }

/* scrolled content */
.scrollbars { overflow:auto; }
.height10em { height:10em; }
.height15em { height:15em; }
.height20em { height:20em; }
.height25em { height:25em; }
.height30em { height:30em; }
.height35em { height:35em; }
.height40em { height:40em; }

/* compact form */
.smallform
  { white-space:nowrap; }
.smallform input, .smallform textarea, .smallform button, .smallform checkbox, .smallform radio, .smallform select
  { font-size:8pt; }

/* stretchable edit fields and textareas (auto-size to fit tiddler) */
.stretch input { width:99%; }
.stretch textarea { width:99%; }

/* compact input fields (limited to a few characters for entering percentages and other small values) */
.onechar input   { width:1em; }
.twochar input   { width:2em; }
.threechar input { width:3em; }
.fourchar input  { width:4em; }
.fivechar input  { width:5em; }

/* text colors */
.white { color:#fff !important }
.gray  { color:#999 !important }
.black { color:#000 !important }
.red   { color:#f66 !important }
.green { color:#0c0 !important }
.blue  { color:#99f !important }

/* rollover highlighting */
.mouseover 
  {color:[[ColorPalette::TertiaryLight]] !important;}
.mouseover a
  {color:[[ColorPalette::TertiaryLight]] !important;}
.selected .mouseover
  {color:[[ColorPalette::Foreground]] !important;}
.selected .mouseover .button, .selected .mouseover a
  {color:[[ColorPalette::PrimaryDark]] !important;}

/* rollover zoom text */
.zoomover
  { font-size:80% !important; }
.selected .zoomover
  { font-size:100% !important; }

.BG{color:[[ColorPalette::Background]];}
.FG{color:[[ColorPalette::Foreground]];}
.PP{color:[[ColorPalette::PrimaryPale]];}
.PL{color:[[ColorPalette::PrimaryLight]];}
.PM{color:[[ColorPalette::PrimaryMid]];}
.PD{color:[[ColorPalette::PrimaryDark]];}
.SP{color:[[ColorPalette::SecondaryPale]];}
.SL{color:[[ColorPalette::SecondaryLight]];}
.SM{color:[[ColorPalette::SecondaryMid]];}
.SD{color:[[ColorPalette::SecondaryDark]];}
.TP{color:[[ColorPalette::TertiaryPale]];}
.TL{color:[[ColorPalette::TertiaryLight]];}
.TM{color:[[ColorPalette::TertiaryMid]];}
.TD{color:[[ColorPalette::TertiaryDark]];}
.Err{color:[[ColorPalette::Error]];}

.bgBG{background-color:[[ColorPalette::Background]];}
.bgFG{background-color:[[ColorPalette::Foreground]];}
.bgPP{background-color:[[ColorPalette::PrimaryPale]];}
.bgPL{background-color:[[ColorPalette::PrimaryLight]];}
.bgPM{background-color:[[ColorPalette::PrimaryMid]];}
.bgPD{background-color:[[ColorPalette::PrimaryDark]];}
.bgSP{background-color:[[ColorPalette::SecondaryPale]];}
.bgSL{background-color:[[ColorPalette::SecondaryLight]];}
.bgSM{background-color:[[ColorPalette::SecondaryMid]];}
.bgSD{background-color:[[ColorPalette::SecondaryDark]];}
.bgTP{background-color:[[ColorPalette::TertiaryPale]];}
.bgTL{background-color:[[ColorPalette::TertiaryLight]];}
.bgTM{background-color:[[ColorPalette::TertiaryMid]];}
.bgTD{background-color:[[ColorPalette::TertiaryDark]];}
.bgErr{background-color:[[ColorPalette::Error]];}
/*}}}*/
<<list all>>
<<allTags excludeLists>>
<<tabs txtMoreTab tags "all tags" TabTags plug "installed plugins" systemConfig miss "missing tiddlers" TabMoreMissing orph "orphaned tiddlers" TabMoreOrphans shad "shadowed tiddlers" TabMoreShadowed ex "tiddlers on excludeLists" excludeLists>>
<<list missing>>
----
[[::excludeMissing::|excludeMissing]]
{{sidebarTitle{[[all available tags:|TabTags]]}}}
{{sideBarTags{<<allTags>>}}}
/***
|Name|TableOfContentsPlugin|
|Source|http://www.TiddlyTools.com/#TableOfContentsPlugin|
|Documentation|http://www.TiddlyTools.com/#TableOfContentsPluginInfo|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|replace the standard tabbed contents list with a scrolling listbox|
When there are many tiddlers in a document, the standard 'tabbed list of tiddlers' in the right-hand sidebar can become very long, occupying a lot of page space and requiring a lot scrolling in order to locate and select a tiddler.  The TableOfContentsPlugin addresses this problem by replacing the standard tabbed list display with a single listbox/droplist control that uses a very small amount of page space, regardless of the number of tiddlers in the document.
!!!!!Documentation
>see [[TableOfContentsPluginInfo]]
!!!!!Configuration
<<option chkTOCShow>> display table of contents listbox
<<option chkTOCIncludeHidden>> include tiddlers tagged with <<tag excludeLists>> in listbox
listbox shows <<option txtTOCListSize>> lines, sorted by <<option txtTOCSortBy>>
<<<
!!!!!Code
***/
//{{{
version.extensions.TableOfContentsPlugin= {major: 2, minor: 4, revision: 3, date: new Date(2008,4,9)};
//}}}

// // 1.2.x compatibility
//{{{
if (!window.story) window.story=window;
if (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}
if (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}
if (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}
//}}}

//{{{
// define defaults for cookie-based option values
if (config.options.txtTOCSortBy==undefined)	config.options.txtTOCSortBy="modified";
if (config.options.txtTOCListSize==undefined)	config.options.txtTOCListSize=19;
if (config.options.chkTOCShow==undefined)	config.options.chkTOCShow=true;
if (config.options.chkTOCIncludeHidden==undefined)	config.options.chkTOCIncludeHidden=false;

// define macro "tableOfContents" to render controls
config.macros.tableOfContents = { label: "contents" };
config.macros.tableOfContents.cmdMax=8; // index of maximum command item

config.macros.tableOfContents.css = '\
.TOC { padding:0.5em 1em 0.5em 1em; }\
.TOC a { padding:0em 0.25em 0em 0.25em; color:inherit; }\
.TOCList { width: 100%; font-size:8pt; margin:0em; }\
';

config.macros.tableOfContents.html = '\
<div style="text-align:right">\
	<span style="float:left">\
	<a href="JavaScript:;" id="TOCMenu" style="padding: 0em;"\
		onclick="onClickTOCMenu(this)" title="show/hide table of contents">%label%</a>\
	</span>\
	<a href="JavaScript:;" id="TOCSmaller" style="display:inline"\
		onclick="resizeTOC(this)" title="reduce list size">&#150;</a>\
	<a href="JavaScript:;" id="TOCLarger"style="display:inline"\
		onclick="resizeTOC(this)" title="increase list size">+</a>\
	<a href="JavaScript:;" id="TOCMaximize"style="display:inline"\
		onclick="resizeTOC(this)" title="maximize/restore list size">=</a>\
</div>\
';

config.macros.tableOfContents.handler = function(place,macroName,params) { 
	var parsedParams = new Array();
	parsedParams['label']=this.label;
	parsedParams['inline']=false;
	while (params.length>0) {
		if (params[0]=="label:none") parsedParams['label']="";
		else if (params[0].substr(0,6)=="label:") parsedParams['label']=params[0].substr(6);
		if (params[0].substr(0,7)=="prompt:") parsedParams['prompt']=params[0].substr(7);
		if (params[0].substr(0,8)=="padding:")parsedParams['padding']=params[0].substr(8);
		if (params[0].substr(0,7)=="margin:") parsedParams['margin']=params[0].substr(7);
		if (params[0].substr(0,5)=="sort:")   parsedParams['sortby']=params[0].substr(5);
		if (params[0].substr(0,5)=="date:")   parsedParams['date']=params[0].substr(5);
		if ((params[0]=="size:auto")||(params[0]=="size:0")) parsedParams['autosize']=true;
		else if (params[0] && (params[0].substr(0,5)=="size:")) parsedParams['requestedSize']=params[0].substr(5);
		if (params[0].substr(0,6)=="width:") parsedParams['width']=params[0].substr(6);
		if (params[0]=="hidelist") parsedParams['hidelist']=true;
		if (params[0]=="inline")   parsedParams['inline']=true;
		if (params[0]=="-title")   parsedParams['hide_title']=true;
		if (params[0]=="-date")    parsedParams['hide_date']=true;
		if (params[0]=="-author")  parsedParams['hide_author']=true;
		if (params[0]=="-creator") parsedParams['hide_creator']=true;
		if (params[0]=="-tags")    parsedParams['hide_tags']=true;
		if (params[0]=="-missing") parsedParams['hide_missing']=true;
		if (params[0]=="-orphans") parsedParams['hide_orphans']=true;
		if (params[0]=="-shadows") parsedParams['hide_shadows']=true;
		params.shift(); 
	}
	setStylesheet(config.macros.tableOfContents.css,"tableOfContents");
	var newTOC=createTiddlyElement(place,parsedParams['inline']?"span":"div",null,"TOC",null)
	if (parsedParams['margin'])	{ newTOC.style.margin=parsedParams['margin']; }
	if (parsedParams['padding'])	{ newTOC.style.padding=parsedParams['padding']; }
	if (parsedParams['label']!="") newTOC.innerHTML=config.macros.tableOfContents.html.replace(/%label%/,parsedParams['label']);
	var newTOCList=createTOCList(newTOC,parsedParams)
	refreshTOCList(newTOCList);
	store.addNotification(null,reloadTOCLists);	// reload listbox after every tiddler change
}

// IE needs explicit global scoping for functions/vars called from browser events
window.onChangeTOCList=onChangeTOCList;
window.onClickTOCList=onClickTOCList;
window.onDblClickTOCList=onDblClickTOCList;
window.reloadTOCLists=reloadTOCLists;
window.refreshTOCList=refreshTOCList;
window.onClickTOCMenu=onClickTOCMenu;
window.resizeTOC=resizeTOC;
	
function createTOCList(place,params) {
	var list = createTiddlyElement(place,"select",null,"TOCList",params['prompt'])
	list.params=params;
	list.onchange=onChangeTOCList;
	list.onclick=onClickTOCList;
	list.ondblclick=onDblClickTOCList;
	list.onkeyup=onKeyUpTOCList;
	list.style.display=config.options.chkTOCShow ? "block" : "none" ;
	list.sortBy=config.options.txtTOCSortBy;
	list.dateFormat="DD MMM YYYY";
	list.requestedSize=config.options.txtTOCListSize;
	list.expandall=false;
	list.cmdMax=config.macros.tableOfContents.cmdMax;
	if (params['hide_title'])   list.cmdMax--;
	if (params['hide_date'])    list.cmdMax--;
	if (params['hide_author'])  list.cmdMax--;
	if (params['hide_creator']) list.cmdMax--;
	if (params['hide_tags'])    list.cmdMax--;
	if (params['hide_missing']) list.cmdMax--;
	if (params['hide_orphans']) list.cmdMax--;
	if (params['hide_shadows']) list.cmdMax--;
	if (params['sortby'])       { list.sortBy=params['sortby']; list.noSortCookie=true; }
	if (params['date'])         { list.dateFormat=params['date']; }
	if (params['autosize'])     { list.autosize=true; list.noSizeCookie=true; }
	if (params['requestedSize']){ list.requestedSize=params['requestedSize']; list.noSizeCookie=true; }
	if (params['width'])        { list.style.width=params['width']; }
	if (params['hidelist'])     { list.style.display ="none" ; list.noShowCookie=true; }
	if (params['expandall'])    { list.expandall=true; }
	return list;
}

function onChangeTOCList() {
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((this.size==1)&&(thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	refreshTOCList(this);
	return false;
}
function onClickTOCList(e) {
	if (!e) var e = window.event;
	if (this.size==1) return; // don't toggle display for droplist
	if (e.shiftKey) { this.expandall=!this.expandall; refreshTOCList(this);}
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return true;
}
function onDblClickTOCList(e) {
	if (!e) var e = window.event;
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return false;
}
function onKeyUpTOCList(e) {
	if (!e) var e = window.event;
	if (e.keyCode!=13) return true;
	var thisTiddler=this.options[this.selectedIndex].value;
	if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
		story.displayTiddler(null,thisTiddler,1);
	e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
	return false;
}
function reloadTOCLists() {
	var all=document.all? document.all.tags("select") : document.getElementsByTagName("select");
	for (var i=0; i<all.length; i++)
		if (all[i].className=="TOCList")
			{ all[i].selectedIndex=-1; refreshTOCList(all[i]); }
}
 
function refreshTOCList(list) {
	var selectedIndex = list.selectedIndex;
	if (selectedIndex==-1) selectedIndex=0;
	var sortBy = list.sortBy;
	var showHidden = config.options.chkTOCIncludeHidden && !(config.options.chkHttpReadOnly && readOnly);

	if (selectedIndex==0) sortBy=list.sortBy;	// "nnn tiddlers" heading - use previous sort order
	else if (selectedIndex<=list.cmdMax)sortBy=list.value;
	else { if (list.options[list.selectedIndex].value=='') expandTOC(list); return; }

	list.sortBy = sortBy; // save current sort order
	if (!list.noSortCookie) { config.options.txtTOCSortBy=sortBy; saveOptionCookie("txtTOCSortBy"); }

	// get the list of tiddlers
	var tiddlers = [];
	switch (sortBy) {
		case "missing":	tiddlers=store.getMissingLinks(); break;
		case "tags": tiddlers=store.getTags(); break;
		case "orphans":	tiddlers=store.getOrphans(); break;
		case "shadows": for (var t in config.shadowTiddlers) tiddlers.push(t); tiddlers.sort();	break;
		default: tiddlers=store.getTiddlers(sortBy=='creator'?'modifier':sortBy,showHidden?'':'excludeLists'); break;
	}

	// clear current listbox contents
	while (list.length > 0) { list.options[0] = null; }
	list.saved=null;

	// add heading and control items to list
	var i=0;
	var theHeading=tiddlers.length+' tiddlers:';
	if (sortBy=='missing') theHeading=tiddlers.length+' missing tiddlers:';
	if (sortBy=='orphans') theHeading=tiddlers.length+' orphaned tiddlers:';
	if (sortBy=='tags')    theHeading=tiddlers.length+' tags:';
	if (sortBy=='shadows') theHeading=tiddlers.length+' shadow tiddlers:';
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var sel=">";
	list.options[i++]=new Option(theHeading,'');
	function headerOpt(txt,val) { return new Option(((sortBy==val)?sel:indent)+' ['+txt+']',val); }
	if (!list.params['hide_title'])   list.options[i++]=headerOpt('by title','title');
	if (!list.params['hide_date'])    list.options[i++]=headerOpt('by date','modified');
	if (!list.params['hide_author'])  list.options[i++]=headerOpt('by author','modifier');
	if (!list.params['hide_creator']) list.options[i++]=headerOpt('by creator','creator');
	if (!list.params['hide_tags'])    list.options[i++]=headerOpt('by tags','tags');
	if (!list.params['hide_missing']) list.options[i++]=headerOpt('missing','missing');
	if (!list.params['hide_orphans']) list.options[i++]=headerOpt('orphans','orphans');
	if (!list.params['hide_shadows']) list.options[i++]=headerOpt('shadows','shadows');
	// output the tiddler list
	switch(sortBy) {
		case "title":
			for (var t = 0; t < tiddlers.length; t++)
				list.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title);
			break;
		case "modified":
		case "modifier":
		case "creator":
			if (sortBy=="modified") tiddlers.reverse(); // show newest first
			if (sortBy=="creator") { // sort by custom field with fallback value
				tiddlers.sort(function (a,b) {
					var v1=a.fields.creator||a.modifier;
					var v2=b.fields.creator||b.modifier;
					return (v1==v2)?0:(v1>v2?1:-1);
				});
			}
			var lastSection = "";
			for (var t = 0; t < tiddlers.length; t++){
				var tiddler = tiddlers[t];
				var theSection = "";
				var m=tiddler.modified;
				if (sortBy=="modified") theSection=m.getFullYear()+'.'+(m.getMonth()+1)+'.'+m.getDate();
				if (sortBy=="modifier") theSection = tiddler.modifier;
				if (sortBy=="creator") theSection=tiddler.fields['creator']||tiddler.modifier;
				if (theSection != lastSection) {
					lastSection = theSection;
					if (sortBy=="modified") theSection = m.formatString(list.dateFormat);
					list.options[i++] = new Option('+ '+theSection,"");
				}
				list.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title);
			}
			expandTOC(list);
			break;
		case "tags":
			// tagged tiddlers, by tag
			var tagcount=0;
			var lastTag = null;
			for (var t = 0; t < tiddlers.length; t++) {  // actually a list of tags, not tiddlers... 
				var theTag = tiddlers[t][0]; var tid=store.getTiddler(theTag);
				if (tid && tid.isTagged('excludeLists')) continue; // skip excluded tags
				var temp = store.getTaggedTiddlers(theTag);
				var tagged=[]; for (var q=0; q<temp.length; q++) // hide excluded tiddlers
					if (!temp[q].isTagged('excludeLists')) tagged.push(temp[q]); 
				if (tagged.length) { tagcount++;
					list.options[i++]=new Option('+ '+theTag+" ("+tagged.length+")","");
					for(var r=0; r<tagged.length; r++)
						list.options[i++]=
							new Option(indent+indent+tagged[r].title,tagged[r].title);
				}
			}
			// count untagged tiddlers
			var temp = store.getTiddlers("title");
			var c=0; for (var r=0; r<temp.length;r++) if (!temp[r].tags.length) c++;
			// create 'pseudo-tag' listing untagged tiddlers (if any)
			if (c>0) {
				list.options[i++] = new Option("+ untagged ("+c+")","");
				for (var r=0; r<temp.length;r++) if (!temp[r].tags.length)
					list.options[i++] = new
						Option(indent+indent+temp[r].title,temp[r].title);
			}
			list.options[0].text=tagcount+' tags:';
			expandTOC(list);
			break;
		case "missing": case "orphans": case "shadows":
			for (var t = 0; t < tiddlers.length; t++)
				list.options[i++] = new Option(tiddlers[t],tiddlers[t]);
			break;
	}
	list.selectedIndex=selectedIndex; // select current control item
	list.size = (list.autosize)?list.options.length:list.requestedSize;
}

// show/hide branch of TOCList based on current selection
function expandTOC(list) {
	var selectedIndex = list.selectedIndex;
	if (selectedIndex==-1) selectedIndex=0;
	var sortBy = list.sortBy;

	// don't collapse/expand list for alpha-sorted "flatlist" TOC contents
	// or list control items
	if ((sortBy=="title")||(sortBy=="missing")||(sortBy=="orphans")||(sortBy=="shadows")) return;
	if ((selectedIndex>0)&&(selectedIndex<=list.cmdMax)) return;

	// get current selected text/value and cache the 
	// complete list.  Then clear the current list contents
	var theText = list.options[selectedIndex].text;
	var theValue = list.options[selectedIndex].value;
	if (!list.saved) {
		list.saved=new Array();
		for (var i=0;i<list.length;i++) list.saved[i]=list.options[i];
	}
	while (list.length > 0) { list.options[0] = null; }

	// put back heading items until item text matches current selected heading
	var i=0;
	for (var t=0; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||(opt.value=='')||(i<=list.cmdMax)) list.options[i++] = opt;
		if (opt.text==theText) break;
	}
	selectedIndex=i-1;	// this is the NEW index of the current selected heading
	// put back items with value!='' until value==''
	for ( t++; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||opt.value!='') list.options[i++] = opt;
		if (opt.value=='') break;
	}
	// put back remaining items with value==''
	for ( ; t<list.saved.length; t++) {
		var opt=list.saved[t];
		if (list.expandall||opt.value=='') list.options[i++] = opt;
	}
	list.selectedIndex = selectedIndex;
	list.size = (list.autosize)?list.options.length:list.requestedSize;
}

// these functions process clicks on the 'control links' that are displayed above the listbox
function getTOCListFromButton(which) {
	var list = null;
	switch (which.id) {
		case 'TOCMenu':
			var theSiblings = which.parentNode.parentNode.parentNode.childNodes;
			var thePlace=which.parentNode.parentNode.parentNode.parentNode.parentNode.id;
			break;
		case 'TOCSmaller': case 'TOCLarger': case 'TOCMaximize':
			var theSiblings = which.parentNode.parentNode.childNodes;
			var thePlace=which.parentNode.parentNode.parentNode.parentNode.id;
			break;
	}
	for (var k=0; k<theSiblings.length; k++)
		if (theSiblings[k].className=="TOCList") { list=theSiblings[k]; break; }
	return list;
}
function onClickTOCMenu(which) {
	var list=getTOCListFromButton(which); if (!list) return;
	var opening = list.style.display=="none";
	if(config.options.chkAnimate) anim.startAnimating(new Slider(list,opening,false,"none"));
	else list.style.display = opening ? "block" : "none" ;
	if (!list.noShowCookie) { config.options.chkTOCShow = opening; saveOptionCookie("chkTOCShow"); }
	return(false);
}
function resizeTOC(which) {
	var list=getTOCListFromButton(which); if (!list) return;
	var size = list.size;
	if (list.style.display=="none")	// make sure list is visible
		if(config.options.chkAnimate) anim.startAnimating(new Slider(list,true,false,"none"));
		else list.style.display = "block" ;
	switch (which.id) {
		case 'TOCSmaller':	// decrease current listbox size
			if (list.autosize) { list.autosize=false; size=config.options.txtTOCListSize; }
			if (size==1)	break;
			size -= 1;	// shrink by one line
			list.requestedSize = list.size = size;
			break;
		case 'TOCLarger':	// increase current listbox size
			if (list.autosize) { list.autosize=false; size=config.options.txtTOCListSize; }
			if (size>=list.options.length)	break;
			size += 1;	// grow by one line
			list.requestedSize = list.size = size;
			break;
		case 'TOCMaximize':	// toggle autosize
			list.autosize  = (list.size!=list.options.length);
			list.size = (list.autosize)?list.options.length:list.requestedSize;
			break;
	}
	if (!list.noSizeCookie && !list.autosize)
		{ config.options.txtTOCListSize=size; saveOptionCookie("txtTOCListSize"); }
}
//}}}
<<tagCloud excludeLists noCloud>>
----
@@padding-left:10px;[[::list tiddlers by tags::|TiddlersByTags]]@@
/***
|''Plugin'' |TagCloudMacro |
|''Author'' |Clint Checketts |
|''Source URL'' |http://tiddlystyles.com |
!Usage
{{{<<tagCloud>>}}}
<<tagCloud>>
!Code
***/
//{{{
setStylesheet(".tagCloud span{height: 1.8em;margin: 3px;}.tagCloud1{font-size: 10px;}.tagCloud2{font-size:12px;}.tagCloud3{font-size: 14px;}.tagCloud4{font-size: 16px;font-weight: bold;}.tagCloud5{font-size: 20px;font-weight: bold;}","tagCloudsStyles");

version.extensions.tagCloud={major: 1, minor: 0 , revision: 0, date: new Date(2006,2,04)};
//Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman
config.macros.tagCloud={
noTags:"There are no tags.",
tooltip:"%1 tiddlers tagged with '%0'",
exclude:['excludeLists','noCloud'],
handler:function(place,macroName,params){
var el,max,p,segm,t,tg,tags,wrap;
wrap=createTiddlyElement(place,"div",null,"tagCloud",null);
tags=store.getTags();
for(t=0;t<tags.length;t++){
	tiddler=store.fetchTiddler(tags[t][0]);
	if(tiddler&&tiddler.tags.containsAny(this.exclude))tags[t][0]="";
	for(p=0;p<params.length;p++)if(tags[t][0]==params[p])tags[t][0]="";
}
if(tags.length==0)createTiddlyElement(wrap,"span",null,null,this.noTags);
max=0;//Find max num of tags
for(var t=0;t<tags.length;t++)if(tags[t][0].length>0){if(tags[t][1]>max)max=tags[t][1];}
segm=max/4;//divide max into 4 tagCloud sizes

for(t=0;t<tags.length;t++)if(tags[t][0].length>0){
	el=createTiddlyElement(wrap,"span",null,null,null);
	wrap.appendChild(document.createTextNode(" "));
	tg=createTiddlyButton(el,tags[t][0],this.tooltip.format(tags[t]),onClickTag,"tagCloudtag tagCloud"+(Math.round(tags[t][1]/segm)+1));
	tg.setAttribute("tag",tags[t][0]);
	tg.setAttribute("showOpenTag",true);
}
}
}
//}}}
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ~ViewTemplate|
|Version:|3.1 ($Rev: 4092 $)|
|Date:|$Date: 2008-03-24 12:32:33 +1000 (Mon, 24 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
config.taggly = {

	// for translations
	lingo: {
		labels: {
			asc:        "\u2191", // down arrow
			desc:       "\u2193", // up arrow
			title:      "title",
			modified:   "modified",
			created:    "created",
			show:       "+",
			hide:       "-",
			normal:     "normal",
			group:      "group",
			commas:     "commas",
			sitemap:    "sitemap",
			numCols:    "cols\u00b1", // plus minus sign
			label:      "Tagged as '%0':",
			excerpts:   "excerpts",
			descr:      "descr",
			slices:     "slices",
			contents:   "contents",
			sliders:    "sliders",
			noexcerpts: "title only"
		},

		tooltips: {
			title:    "Click to sort by title",
			modified: "Click to sort by modified date",
			created:  "Click to sort by created date",
			show:     "Click to show tagging list",
			hide:     "Click to hide tagging list",
			normal:   "Click to show a normal ungrouped list",
			group:    "Click to show list grouped by tag",
			sitemap:  "Click to show a sitemap style list",
			commas:   "Click to show a comma separated list",
			numCols:  "Click to change number of columns",
			excerpts: "Click to show excerpts",
			descr:    "Click to show the description slice",
			slices:    "Click to show all slices",
			contents: "Click to show entire tiddler contents",
			sliders:  "Click to show tiddler contents in sliders",
			noexcerpts: "Click to show entire title only"
		}
	},

	config: {
		showTaggingCounts: true,
		listOpts: {
			// the first one will be the default
			sortBy:     ["title","modified","created"],
			sortOrder:  ["asc","desc"],
			hideState:  ["show","hide"],
			listMode:   ["normal","group","sitemap","commas"],
			numCols:    ["1","2","3","4","5","6"],
			excerpts:   ["noexcerpts","excerpts","descr","slices","contents","sliders"]
		},
		valuePrefix: "taggly.",
		excludeTags: ['excludeTagging'],
		excerptSize: 50,
		excerptMarker: "/%"+"%/"
	},

	getTagglyOpt: function(title,opt) {
		var val = store.getValue(title,this.config.valuePrefix+opt);
		return val ? val : this.config.listOpts[opt][0];
	},

	setTagglyOpt: function(title,opt,value) {
		if (!store.tiddlerExists(title))
			// create it silently
			store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");
		// if value is default then remove it to save space
		return store.setValue(title,
			this.config.valuePrefix+opt,
			value == this.config.listOpts[opt][0] ? null : value);
	},

	getNextValue: function(title,opt) {
		var current = this.getTagglyOpt(title,opt);
		var pos = this.config.listOpts[opt].indexOf(current);
		// a little usability enhancement. actually it doesn't work right for grouped or sitemap
		var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);
		var newPos = (pos + 1) % limit;
		return this.config.listOpts[opt][newPos];
	},

	toggleTagglyOpt: function(title,opt) {
		var newVal = this.getNextValue(title,opt);
		this.setTagglyOpt(title,opt,newVal);
	}, 

	createListControl: function(place,title,type) {
		var lingo = config.taggly.lingo;
		var label;
		var tooltip;
		var onclick;

		if ((type == "title" || type == "modified" || type == "created")) {
			// "special" controls. a little tricky. derived from sortOrder and sortBy
			label = lingo.labels[type];
			tooltip = lingo.tooltips[type];

			if (this.getTagglyOpt(title,"sortBy") == type) {
				label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
				onclick = function() {
					config.taggly.toggleTagglyOpt(title,"sortOrder");
					return false;
				}
			}
			else {
				onclick = function() {
					config.taggly.setTagglyOpt(title,"sortBy",type);
					config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
					return false;
				}
			}
		}
		else {
			// "regular" controls, nice and simple
			label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
			tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
			onclick = function() {
				config.taggly.toggleTagglyOpt(title,type);
				return false;
			}
		}

		// hide button because commas don't have columns
		if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
			createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
	},

	makeColumns: function(orig,numCols) {
		var listSize = orig.length;
		var colSize = listSize/numCols;
		var remainder = listSize % numCols;

		var upperColsize = colSize;
		var lowerColsize = colSize;

		if (colSize != Math.floor(colSize)) {
			// it's not an exact fit so..
			upperColsize = Math.floor(colSize) + 1;
			lowerColsize = Math.floor(colSize);
		}

		var output = [];
		var c = 0;
		for (var j=0;j<numCols;j++) {
			var singleCol = [];
			var thisSize = j < remainder ? upperColsize : lowerColsize;
			for (var i=0;i<thisSize;i++) 
				singleCol.push(orig[c++]);
			output.push(singleCol);
		}

		return output;
	},

	drawTable: function(place,columns,theClass) {
		var newTable = createTiddlyElement(place,"table",null,theClass);
		var newTbody = createTiddlyElement(newTable,"tbody");
		var newTr = createTiddlyElement(newTbody,"tr");
		for (var j=0;j<columns.length;j++) {
			var colOutput = "";
			for (var i=0;i<columns[j].length;i++) 
				colOutput += columns[j][i];
			var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
			wikify(colOutput,newTd);
		}
		return newTable;
	},

	createTagglyList: function(place,title) {
		switch(this.getTagglyOpt(title,"listMode")) {
			case "group":  return this.createTagglyListGrouped(place,title); break;
			case "normal": return this.createTagglyListNormal(place,title,false); break;
			case "commas": return this.createTagglyListNormal(place,title,true); break;
			case "sitemap":return this.createTagglyListSiteMap(place,title); break;
		}
	},

	getTaggingCount: function(title) {
		// thanks to Doug Edmunds
		if (this.config.showTaggingCounts) {
			var tagCount = store.getTaggedTiddlers(title).length;
			if (tagCount > 0)
				return " ("+tagCount+")";
		}
		return "";
	},

	getExcerpt: function(inTiddlerTitle,title,indent) {
		if (!indent)
			indent = 1;

		var displayMode = this.getTagglyOpt(inTiddlerTitle,"excerpts");
		var t = store.getTiddler(title);

		if (t && displayMode == "excerpts") {
			var text = t.text.replace(/\n/," ");
			var marker = text.indexOf(this.config.excerptMarker);
			if (marker != -1) {
				return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
			}
			else if (text.length < this.config.excerptSize) {
				return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
			}
			else {
				return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
			}
		}
		else if (t && displayMode == "contents") {
			return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
		}
		else if (t && displayMode == "sliders") {
			return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
		}
		else if (t && displayMode == "descr") {
			var descr = store.getTiddlerSlice(title,'Description');
			return descr ? " {{excerpt{" + descr  + "}}}" : "";
		}
		else if (t && displayMode == "slices") {
			var result = "";
			var slices = store.calcAllSlices(title);
			for (var s in slices)
				result += "|%0|<nowiki>%1</nowiki>|\n".format([s,slices[s]]);
			return result ? "\n{{excerpt excerptIndent{\n" + result  + "}}}" : "";
		}
		return "";
	},

	notHidden: function(t,inTiddler) {
		if (typeof t == "string") 
			t = store.getTiddler(t);
		return (!t || !t.tags.containsAny(this.config.excludeTags) ||
				(inTiddler && this.config.excludeTags.contains(inTiddler)));
	},

	// this is for normal and commas mode
	createTagglyListNormal: function(place,title,useCommas) {

		var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));

		if (this.getTagglyOpt(title,"sortOrder") == "desc")
			list = list.reverse();

		var output = [];
		var first = true;
		for (var i=0;i<list.length;i++) {
			if (this.notHidden(list[i],title)) {
				var countString = this.getTaggingCount(list[i].title);
				var excerpt = this.getExcerpt(title,list[i].title);
				if (useCommas)
					output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
				else
					output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");

				first = false;
			}
		}

		return this.drawTable(place,
			this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
			useCommas ? "commas" : "normal");
	},

	// this is for the "grouped" mode
	createTagglyListGrouped: function(place,title) {
		var sortBy = this.getTagglyOpt(title,"sortBy");
		var sortOrder = this.getTagglyOpt(title,"sortOrder");

		var list = store.getTaggedTiddlers(title,sortBy);

		if (sortOrder == "desc")
			list = list.reverse();

		var leftOvers = []
		for (var i=0;i<list.length;i++)
			leftOvers.push(list[i].title);

		var allTagsHolder = {};
		for (var i=0;i<list.length;i++) {
			for (var j=0;j<list[i].tags.length;j++) {

				if (list[i].tags[j] != title) { // not this tiddler

					if (this.notHidden(list[i].tags[j],title)) {

						if (!allTagsHolder[list[i].tags[j]])
							allTagsHolder[list[i].tags[j]] = "";

						if (this.notHidden(list[i],title)) {
							allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
										+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";

							leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers

						}
					}
				}
			}
		}

		var allTags = [];
		for (var t in allTagsHolder)
			allTags.push(t);

		var sortHelper = function(a,b) {
			if (a == b) return 0;
			if (a < b) return -1;
			return 1;
		};

		allTags.sort(function(a,b) {
			var tidA = store.getTiddler(a);
			var tidB = store.getTiddler(b);
			if (sortBy == "title") return sortHelper(a,b);
			else if (!tidA && !tidB) return 0;
			else if (!tidA) return -1;
			else if (!tidB) return +1;
			else return sortHelper(tidA[sortBy],tidB[sortBy]);
		});

		var leftOverOutput = "";
		for (var i=0;i<leftOvers.length;i++)
			if (this.notHidden(leftOvers[i],title))
				leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";

		var output = [];

		if (sortOrder == "desc")
			allTags.reverse();
		else if (leftOverOutput != "")
			// leftovers first...
			output.push(leftOverOutput);

		for (var i=0;i<allTags.length;i++)
			if (allTagsHolder[allTags[i]] != "")
				output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);

		if (sortOrder == "desc" && leftOverOutput != "")
			// leftovers last...
			output.push(leftOverOutput);

		return this.drawTable(place,
				this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
				"grouped");

	},

	// used to build site map
	treeTraverse: function(title,depth,sortBy,sortOrder) {

		var list = store.getTaggedTiddlers(title,sortBy);
		if (sortOrder == "desc")
			list.reverse();

		var indent = "";
		for (var j=0;j<depth;j++)
			indent += "*"

		var childOutput = "";
		for (var i=0;i<list.length;i++)
			if (list[i].title != title)
				if (this.notHidden(list[i].title,this.config.inTiddler))
					childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);

		if (depth == 0)
			return childOutput;
		else
			return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title,depth) + "\n" + childOutput;
	},

	// this if for the site map mode
	createTagglyListSiteMap: function(place,title) {
		this.config.inTiddler = title; // nasty. should pass it in to traverse probably
		var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));
		return this.drawTable(place,
				this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
				"sitemap"
				);
	},

	macros: {
		tagglyTagging: {
			handler: function (place,macroName,params,wikifier,paramString,tiddler) {
				var refreshContainer = createTiddlyElement(place,"div");
				// do some refresh magic to make it keep the list fresh - thanks Saq
				refreshContainer.setAttribute("refresh","macro");
				refreshContainer.setAttribute("macroName",macroName);
				if (params[0])
					refreshContainer.setAttribute("title",params[0]);
				else {
        			refreshContainer.setAttribute("title",tiddler.title);
				}
				this.refresh(refreshContainer);
			},

			refresh: function(place) {
				var title = place.getAttribute("title");
				removeChildren(place);
				addClass(place,"tagglyTagging");
				if (store.getTaggedTiddlers(title).length > 0) {
					var lingo = config.taggly.lingo;
					config.taggly.createListControl(place,title,"hideState");
					if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
						createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));
						config.taggly.createListControl(place,title,"title");
						config.taggly.createListControl(place,title,"modified");
						config.taggly.createListControl(place,title,"created");
						config.taggly.createListControl(place,title,"listMode");
						config.taggly.createListControl(place,title,"excerpts");
						config.taggly.createListControl(place,title,"numCols");
						config.taggly.createTagglyList(place,title);
					}
				}
			}
		}
	},

	// todo fix these up a bit
	styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
"	margin-top:0px; padding-top:0.5em; padding-left:2em;",
"	margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
"	color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
"	border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active  {",
"	border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
".excerptIndent { margin-left:4em; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
"  margin-bottom:0.5em; }",
".tagglyTagging .indent1  { margin-left:3em;  }",
".tagglyTagging .indent2  { margin-left:4em;  }",
".tagglyTagging .indent3  { margin-left:5em;  }",
".tagglyTagging .indent4  { margin-left:6em;  }",
".tagglyTagging .indent5  { margin-left:7em;  }",
".tagglyTagging .indent6  { margin-left:8em;  }",
".tagglyTagging .indent7  { margin-left:9em;  }",
".tagglyTagging .indent8  { margin-left:10em; }",
".tagglyTagging .indent9  { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
"/*}}}*/",
		""].join("\n"),

	init: function() {
		merge(config.macros,this.macros);
		config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
		store.addNotification("TagglyTaggingStyles",refreshStyles);
	}
};

config.taggly.init();

//}}}

/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin

// syntax adjusted to not clash with NestedSlidersPlugin
// added + syntax to start open instead of closed

***/
//{{{
config.formatters.unshift( {
	name: "inlinesliders",
	// match: "\\+\\+\\+\\+|\\<slider",
	match: "\\<slider",
	// lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
	lookaheadRegExp: /(?:<slider)(\+?) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
	handler: function(w) {
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
			var btn = createTiddlyButton(w.output,lookaheadMatch[2] + " "+"\u00BB",lookaheadMatch[2],this.onClickSlider,"button sliderButton");
			var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
			panel.style.display = (lookaheadMatch[1] == '+' ? "block" : "none");
			wikify(lookaheadMatch[3],panel);
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
   },
   onClickSlider : function(e) {
		if(!e) var e = window.event;
		var n = this.nextSibling;
		n.style.display = (n.style.display=="none") ? "block" : "none";
		return false;
	}
});

//}}}
/***
|''Name:''|TiddlerListMacro|
|''Version:''|2.3 (8-Jan-2008)|
|''Source''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23TiddlerListMacro]])|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
|''Documentation:''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacroDoc|
!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;
}

//}}}
/***
|''Name:''|TiddlersBarPlugin|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.5|
|''Date:''|Jan 18,2008|
|''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='none' 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.
<<option txtPreviousTabKey>> previous tab access key.
<<option txtNextTabKey>> next tab access key.
!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.options.txtPreviousTabKey = config.options.txtPreviousTabKey ? config.options.txtPreviousTabKey : "";
config.options.txtNextTabKey = config.options.txtNextTabKey ? config.options.txtNextTabKey : "";
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,
	previousKey : config.options.txtPreviousTabKey,
	nextKey : config.options.txtNextTabKey,	
	tabsAnimationSource : null, //use document.getElementById("tiddlerDisplay") if you need animation on tab switching.
	handler: function(place,macroName,params) {
		var previous = null;
		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);
					if (previous && config.macros.tiddlersBar.previousKey) previous.setAttribute("accessKey",config.macros.tiddlersBar.nextKey);
					previous = "active";
				}
				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);
					if (previous=="active" && config.macros.tiddlersBar.nextKey) btn.setAttribute("accessKey",config.macros.tiddlersBar.previousKey);
					previous=btn;
				}
				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>1);
	},
	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) {
			//tbGTD Why? 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(config.macros.tiddlersBar.tabsAnimationSource,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);}
	if(config.options.chkSinglePagePermalink){
		var sUrl=encodeURIComponent(String.encodeTiddlyLink(title));
		window.location.hash = sUrl;
		config.lastURL = window.location.hash;
		document.title = wikifyPlain("SiteTitle") + " - " + title;
		if(window.atREFRESH)window.atREFRESH();
	}
}

var coreRefreshPageTemplate = coreRefreshPageTemplate ? coreRefreshPageTemplate : refreshPageTemplate;
refreshPageTemplate = function(title) {
	coreRefreshPageTemplate(title);
	if (config.macros.tiddlersBar) config.macros.tiddlersBar.refresh(document.getElementById("tiddlersBar"));
}

// tb: code cleanup and different highlight for selected tab
var barStyle
barStyle = "/*{{{*/\n"
+ ".tiddler {border: 3px solid [[ColorPalette::TertiaryPale]];border-left-width:2px;border-top-width:2px;clear:both;z-index:10;}\n"
+ "#tiddlersBar {z-index:0;}\n"
+ "#tiddlersBar .tab:hover {border-color:[[ColorPalette::SecondaryMid]];}\n"
+ "#tiddlersBar .tab {display:block;float:left;margin:3px 3px 0 0;padding: 2px 4px;}\n"
+ "#tiddlersBar .tabUnselected .tabButton, #tiddlersBar .tabSelected .tabButton {padding : 0 2px; margin: 0 0 0 2px;}\n"
+ "#tiddlersBar .tab {white-space:nowrap;border:0;border-top:2px solid [[ColorPalette::TertiaryMid]];border-bottom:2px solid [[ColorPalette::TertiaryPale]];margin-bottom:-2px;background:[[ColorPalette::TertiaryMid]];}\n"
+ "#tiddlersBar .button {border:0;color:[[ColorPalette::Foreground]];}\n"
+ "#tiddlersBar {padding:0 0 0 1%;marign:0;max-width:84%;}\n"
+ "#tiddlersBar .tabButton:hover, #tiddlersBar .button:hover, #tiddlersBar .tab:hover {color:[[ColorPalette::Background]];background:[[ColorPalette::SecondaryMid]]}\n"
+ "#tiddlersBar .tabSelected {background:[[ColorPalette::Background]];border:2px solid [[ColorPalette::TertiaryPale]];border-bottom:2px solid [[ColorPalette::Background]];margin-bottom:-2px;}\n"
+ "#tiddlersBar .tabSelected .button:hover{background:transparent;color:[[ColorPalette::Background]];}\n"
+ "#tiddlersBar .tabContents {border:1px [[ColorPalette::TertiaryMid]] solid;}\n"
+ "/*}}}*/";
config.shadowTiddlers.StyleSheetTiddlersBar = barStyle;
store.addNotification("StyleSheetTiddlersBar", refreshStyles);

config.refreshers.none = function(){return true;}
config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>");
//}}}
/%all tiddlers tagged with tags after 'with:' will be excluded %/<<tiddler scripts##tidsByTags with: tbGTD>>
[[manage the TagCloud...|TagCloud]]
The [[wiki|http://www.tiddlywiki.com]] that makes all this possible.
/***
!!usage
In edit-mode, the following will be replaced when you save the tiddler
* {ts} or {t} -> timestamp
* {ds} or {d} -> datestamp
Configure ''timeFormat'' and ''dateFormat'' to your needs.
!all praises go to
[[InstantTimestampPlugin@MPTW|http://mptw.tiddlyspot.com/#InstantTimestampPlugin]]
!source
***/
//{{{
config.timeStampGTD={
	timeFormat:'YYYY-0MM-0DD 0hh:0mm',
	dateFormat:'YYYY-0MM-0DD',
	excludeTags:['systemConfig'],
	excludeTiddlers:[],
	formats:[
		[/\{ts?\}(?!\}\})/ig,"'{{ts{'+t.formatString(config.timeStampGTD.timeFormat)+'}}}'"],
		[/\{ds?\}(?!\}\})/ig,"'{{ds{'+t.formatString(config.timeStampGTD.dateFormat)+'}}}'"]
	]
}
TiddlyWiki.prototype.saveTiddler_tbGTD=TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler=function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created){
	var t,f,i,c=config.timeStampGTD;
	tags=tags?tags:[];tags=(typeof(tags)=="string")?tags.readBracketedList():tags;
	if(!tags.containsAny(c.excludeTags)&&!c.excludeTiddlers.contains(newTitle)){
		t=new Date();f=c.formats;
		for(var i=0;i<f.length;i++)newBody=newBody.replace(f[i][0],eval(f[i][1]));
	}
	return this.saveTiddler_tbGTD.apply(this, arguments);
}
setStylesheet(".ts,.ds {font-weight:bold;color:#666;}","TimeStampStyles");
//}}}
The guy who took the time to design this nice TiddlyWiki flavour...
Is the same as ...[[Tobias]]
/***
|''Name:''|ToggleSideBarTB|
|''Description''|allows to toggle left and right sidebar|
|''Version:''|1.0|
|''Type''|macro|
|''Author:''|[[TobiasBeer]]|
|''Info:''|http://tbgtd.tiddlyspot.com/#ToggleSideBarTB|
|''Source:''|http://tbgtd.tiddlyspot.com/#ToggleSideBarTB|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion''|2.xx|
!Code
***/
//{{{
config.macros.toggleSideBarTB={
  settings:{
    arr1:"►",arr2:"◄",
    leftBarID:"mainMenu",leftBarLbl:"main menu",
    leftBarHide:"margin-left:1em;",leftBarShow:"margin-left:10.1em;",
    rightBarID:"sidebar",rightBarLbl:"sidebar",
    rightBarHide:"margin-right:1em;",rightBarShow:"margin-right:17.1em;"
  },
  handler:function(place,macroName,params,wikifier,paramString,tiddler){
    var l=params[0]&&params[0]=="left";
    var h=params[1]&&params[1]=="hide";
    var no=params[2]&&params[2]=="notip";
    var s=this.settings;
    var el=l?s.leftBarID:s.rightBarID;
    var btnId="ToggleSideBar"+(l?"Left":"Right");
    var arr=l?(h?s.arr1:s.arr2):(h?s.arr2:s.arr1);
    var lbl=(no?'':"toggle "+(l?s.leftBarLbl:s.rightBarLbl));
    var fct=function(){config.macros.toggleSideBarTB.toggle(btnId)};
    document.getElementById(el).setAttribute("toggle",(h?"show":"hide"));
    createTiddlyButton(place,arr,lbl,fct,"button HideSideBarButton",btnId);
  },
  toggle:function(btnId){
    var btn=document.getElementById(btnId);
    var l=btn.id=="ToggleSideBarLeft";
    var s=config.macros.toggleSideBarTB.settings;
    var bl=document.getElementById(s.leftBarID);
    var br=document.getElementById(s.rightBarID);
    var bar=(l?bl:br);
    var hl=bl.getAttribute("toggle")=='show';if(l)hl=!hl;
    var hr=br.getAttribute("toggle")=='show';if(!l)hr=!hr;
    var h=(l?hl:hr);
    setStylesheet("#contentWrapper #displayArea {"+
        (hl?s.leftBarHide:s.leftBarShow)+
        (hr?s.rightBarHide:s.rightBarShow)+
      "}","ToggleSideBarStyles");
    bar.style.display=h?"none":"block";
    bar.setAttribute("toggle",(h?"show":"hide"));
    arr1=l?s.arr2:s.arr1;arr2=l?s.arr1:s.arr2;
    btn.innerHTML=h?arr2:arr1;
  }
}
//}}}
/***

An under construction replacement for toggleTag

<<tTag mode:text text:D tag:Done>>
<<tTag mode:text text:N tag:Next>>
***/
//{{{

merge(config.macros,{

	tTag: {

		createIfRequired: true,
		shortLabel: "[[%0]]",
		longLabel: "[[%0]] [[%1]]",

		handler: function(place,macroName,params,wikifier,paramString,tiddler) {

			var parsedParams = paramString.parseParams("tags",null,true);
			
			if (!tiddler)
				tiddler = store.getTiddler(getParam(parsedParams,"title"));
			
			var tag = getParam(parsedParams,"tag","checked");
			var title = getParam(parsedParams,"title",tiddler.title);

			var refreshAll = getParam(parsedParams,"refreshAll",false);

			var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);
			var label = getParam(parsedParams,"label",defaultLabel);

			var theTiddler =  title == tiddler.title ? tiddler : store.getTiddler(title);

			var mode = getParam(parsedParams,"mode","checkbox");

			var theClass = getParam(parsedParams,"class",tag+"Button");


			var currentValue = theTiddler && 
				(macroName == "tTag" ? theTiddler.isTagged(tag) : store.getValue(theTiddler,tag)=="true");

			if (mode == "checkbox") {
				// create the checkbox

				var cb = createTiddlyCheckbox(place, label.format([tag,title]), currentValue, function(e) {
					if (!store.tiddlerExists(title)) {
						if (config.macros.tTag.createIfRequired) {
							var content = store.getTiddlerText(title); // just in case it's a shadow
							store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
						}
						else 
							return false;
					}
					//store.suspendNotifications(); 
					if (macroName == "tTag")
						store.setTiddlerTag(title,this.checked,tag);
					else // it must be tField
						store.setValue(title,tag,this.checked?"true":null);

					if (refreshAll) {
						 story.forEachTiddler(function(title,element) {
						   if (element.getAttribute("dirty") != "true") 
						     story.refreshTiddler(title,false,true);
						 });
					}

					//store.resumeNotifications();
					return true;
				});
			}
			else if (mode == "text") {
				var text = getParam(parsedParams,"text","X");

				var cl = createTiddlyButton(place, text, "Toggle "+text, function(e) {
					if(!e) var e = window.event;

					if (!store.tiddlerExists(title)) {
						if (config.macros.tTag.createIfRequired) {
							var content = store.getTiddlerText(title); // just in case it's a shadow
							store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
						}
						else 
							return false;
					}
					//store.suspendNotifications(); 
					var currentState = this.getAttribute("state")=="true";
					var newState = !currentState;

					store.setTiddlerTag(title,newState,tag);
					if (macroName == "tTag")
						store.setTiddlerTag(title,newState,tag);
					else // it must be tField
						store.setValue(title,tag,newState?"true":null);

					// this is terrible please refactor
					if (currentState) {
						cl.setAttribute("state","false");
						removeClass(cl,"on");
						addClass(cl,"off");
					}
					else {
						cl.setAttribute("state","true");
						removeClass(cl,"off");
						addClass(cl,"on");
					}

					//refreshDisplay(); 
					if (refreshAll) {
						 story.forEachTiddler(function(title,element) {
						   if (element.getAttribute("dirty") != "true") 
						     story.refreshTiddler(title,false,true);
						 });
					}
					//store.resumeNotifications();

					e.cancelBubble = true;
					if(e.stopPropagation) e.stopPropagation();

					return false;
				});

				addClass(cl,theClass.replace(/ /g,''));

				if (currentValue) {
					cl.setAttribute("state","true");
					removeClass(cl,"off");
					addClass(cl,"on");
				}
				else {
					cl.setAttribute("state","false");
					removeClass(cl,"on");
					addClass(cl,"off");
				}
				
			}
			else if (mode == "popup") {
				var cl = createTiddlyButton(place, "zzz", "Toggle "+text, function(e) {
					// props to Saq
					if(!e) var e = window.event;
					var popup = Popup.create(this);
					createTiddlyButton(createTiddlyElement(popup,"li"),"foo","bar",function(e) {
						// under contruction
						alert(this.getAttribute("tag"));
					});
					Popup.show(popup,false);
					e.cancelBubble = true;
					if(e.stopPropagation) e.stopPropagation();
					return false ;
				});
			}

		}
	}

});

config.macros.tField = config.macros.tTag;

setStylesheet(["",
".button.off {border-style:none;background:#fff;color:#ccc;}",
".button.on {border-style:none;background:#ddd;color:#000;}",
// TODO move this css elsewhere
"#realmSelector .button.off {margin:0 0.5em;padding:0 1em;border:2px solid #aaa;background:#eee;color:#333;}", // actually reversed, ie off is "on"
"#realmSelector .button.on {margin:0 0.5em;padding:0 1em;border:2px solid #999;background:#999;color:#ccc;}", // actually reversed, ie off is "on"
""].join("\n"),"tTag");

//}}}
|~ViewToolbar|refreshTiddler -closeTiddler +editTiddler deleteTiddler > syncing permalink fields <|
|~EditToolbar|-cancelTiddler +saveTiddler deleteTiddler|
All high priority items tag here...
All medium priority items tag here...
All low priority items tag here...
Archived actions...
Archived contacts...
Archived projects...
Archived references...
Actions reflect that which you want or need to do...
''New:'' <<newTiddler label:"#next" title:"new next action" prompt:"create a new next action" focus:title tag:#next>> <<newTiddler label:"#queued" title:"new queued action" prompt:"queue an new action" focus:title tag:#queued>> <<newTiddler label:"#waiting" title:"new waiting action" prompt:"create a new waiting action" focus:title tag:#waiting>><<newTiddler label:"#future" title:"new future action" prompt:"create a new future action" focus:title tag:#future>>
Use the archive to store information you no longer need for your daily work by assigning archive-tags to tiddlers. To avoid clutter and distraction, regularly import archived items into an extra tbGTD archive-document and afterwards delete them in your main document...
Areas are contextual categories for stuff...
//{{{
//utility functions for tbGTD
window.tbGTD={
	//get type of GTD element 1=toplevel, 2=subcategory, 3=tagged, noGTD=null
	type:function(title,list){
		if(!title)return;
		var l,s,t,cats,sub=[],ti,tgt;
		if(!list)list='x-tagger';
		l=store.getTiddlerText(list);if(!l)return; 
		cats=l.readBracketedList();
		for(t=0;t<cats.length;t++){
			ti=cats[t];if(title==ti)return 1;
			tgt=store.getTaggedTiddlers(ti);
			for(var s=0;s<tgt.length;s++){
				ti=tgt[s].title;
				if(title==ti)return 2;
				sub.pushUnique(ti);}
		}
		for(t=0;t<sub.length;t++){
			ti=sub[t];
			tgt=store.getTaggedTiddlers(ti);
			for(s=0;s<tgt.length;s++)if(title==tgt[s].title)return 3;
		}
		return null;
	},
	nu:function(tg,txt){
		return '<<newTiddler label:"+" title:"new '+tg+'" prompt:"create new tiddler tagging to \''+tg+'\'" focus:title text:[['+txt+']] tag:[['+tg+']]>>';
	}
}
//}}}
|widetable noborder|k
|padding:10px;<<tiddler SideBarOptions>>|vertical-align:top;padding:10px;<<showReminders leadtime:-14...7>> |
{{{-> }}}[[display calendar of the complete year|calendar year]]
{{black{<<calendar>>}}}{{tagClear{}}}
{{{-> }}}[[display calendar for this month|calendar]]
If you want to clean archived tiddlers <script label="click here!" title="click here to clean archived tiddlers.">
var t,tgt,ca,ar,clean=[];
ar=store.getTaggedTiddlers('archive');
for(ca=0;ca<ar.length;ca++){
	tgt=store.getTaggedTiddlers(ar[ca].title);
	for(t=0;t<tgt.length;t++)clean.pushUnique(tgt[t].title);
}
if(clean.length>0){
	if(!confirm('Do you really want to delete '+clean.length+' archived items?\n'+clean))return;
	for(t=0;t<clean.length;t++){
		store.removeTiddler(clean[t]);
		story.closeTiddler(clean[t],true);
	}
}else alert('Nothing to be deleted.');
</script>
''Note'': You will be asked to confirm tiddlers to be deleted.
Tag project related contacts with contact-catogories...
<html><iframe src="http://goto.bplaced.net/x/tiddlyspot/tbgtd/" style="border:0"></iframe></html>
Contexts specify the type of activity you will do to complete an action...
{{desk{
|widetable|k
|width:50%;font-size:16px; <<newTiddler label:"+" title:"new next action" prompt:"create a new next action" focus:title tag:#next>>[[next|#next]] [[actions|action]]((*({{popBtn{<<tiddler action>>}}}))) |font-size:16px; <<newTiddler label:"+" title:"new reminder" prompt:"create a new reminder" focus:title tag:reminder text:{{var d=new Date();'<<reminder year:%0 month:%1 day:%2 title:"reminder title">\>'.format([d.getFullYear(),String.zeroPad(d.getMonth()+1,2),String.zeroPad(d.getMonth(),2)]);}}>>[[this weeks |calendar]][[reminders|reminder]]((*(<<tiddler reminder##info>>))) |h
|height:20px;background-color:#eee;{{deskNew{<<newTiddler label:"+" title:"queue new action" prompt:"create a new queued action" focus:title tag:#queued>><<tag #queued>><<rB queued>><<newTiddler label:"+" title:"new waiting action" prompt:"create a waiting action" focus:title tag:#waiting>><<tag #waiting>><<rB waiting>><<newTiddler label:"+" title:"new future action" prompt:"create a new future action" focus:title tag:#future>><<tag #future>><<rB future>><<tag #done>><<rB done>>}}}|padding-left:0.7em;{{block{<<showReminders leadtime:-3...7>>}}} |
|padding:1px;{{block{<<tiddlerList tags:"#next" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' '#next'$))|\n"  header:"|noborder|k">>}}} |~|
|font-size:16px; <<newTiddler label:"+" title:"new active project" prompt:"create a new active project" focus:title tag:$active>>[[active|$active]] [[projects|project]]((*({{popBtn{<<tiddler project>>}}}))) |font-size:16px; <<newTiddler label:"+" title:"new starred tiddler" prompt:"create a new starred tiddler" focus:title tag:star>>[[starred tiddlers|star]]((*(<<tiddler star>>))) |h
|height:20px;background-color:#eee;{{deskNew{<<newTiddler label:"+" title:"new someday project" prompt:"create a new someday project" focus:title tag:$someday>><<tag $someday>><<rB someday>><<newTiddler label:"+" title:"new maybe project" prompt:"create a new maybe project" focus:title tag:$maybe>><<tag $maybe>><<rB maybe>><<tag $completed>><<rB completed>>}}}|padding:1px;{{block{<<tiddlerList tags:"star" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'star'$))|\n"  header:"|noborder|k">>}}} |
|padding:1px;{{block{<<tiddlerList tags:"$active"  order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' '$active'$))|\n"  header:"|noborder|k">>}}}|~|

<html><div style="width:80px;float:left;text-align:right;margin:0px 10px;">more views:</div></html>{{view{((_*(<<tiddler context>>)))<<tag context>><<rB contexts>>}}}{{view{((_*(<<tiddler contact>>)))<<tag contact>><<rB contacts>>}}}{{view{((_*(<<tiddler area>>)))<<tag area>><<rB areas>>}}}{{view{((_*(<<tiddler realm>>)))<<tag realm>><<rB realms>>}}}{{view{((_*(<<tiddler stage##info>>)))<<tag stage>><<rB stages>>}}}{{view{((_*(<<tiddler priority>>)))<<tag priority>><<rB priorities>>}}}{{view{<<popup 'more tools...' [[<<tiddler topMenuR##options$))]]>>}}}
!Latest articles
<<tiddlerList tags:"journal" top:"5" dateFormat:"mmm. 0DD" itemTemplate:"*[[%created - %title|%title]] \n" order:"-created">>
}}}
{{sidebarTitle{[[tagged excludeList:|excludeLists]]}}}
<<list filter [tag[excludeLists]]>>

<<list filter [tag[excludeSearch]]>>
!!Links
{{{
WikiWord
~EscapedWikiWord
[[Wiki Word With Spaces]]
[[display text|WikiWord]]
http://www.externalLink.com
[[title|URL]]
[img[my.jpg][link]]
[>img[alias|path/my.jpg][link]]

to filesystem...
[[folder/file]]         — relative path
file://///server/share  — win share
file:///c:/folder/file  — win local
file://folder/file      — unix local
}}}
!!Basics
{{{
''bold''
//italic//
__underline__
--strikethrough--
~~subscript~~
^^superscript^^
@@highlight@@
{{{monospaced}}}
{{{
multiline code
 }}}
}}}
!!Headings & lists
{{{
!h1
!!h2
!!!h3 ...
#ol1
##ol2
###ol3 ...
*ul1
**ul2
***ul3 ...
;definition title
:definition

nested example...
*bullet
*#number
*#;item
*#:definition

multiline styled contents...
#{{block{
!heading
still bullet1
 }}}
#bullet2
}}}
!!Block quotes
{{{
>indent1
>>indent2
>>>indent3 ...
<<<
	blockquoted
<<<
}}}
!!Dashes & rules
{{{
-- em dash
---- horizontal rule
}}}
!!Tables
{{{
|cssClass|k
|table caption|c
|heading|heading|h
|table|footer|f
|!heading|!heading|
|left-aligned | right-aligned|
| centered |background:blue;coloured|
|>|colspan|
|rowspan|with<br />linebreak|
|~|whatever|

|NoB|k       
.NoB,.NoB th,.NoB thead,.NoB tbody,.NoB tr,.NoB td
{border:0 !important;}   /*in StyleSheet*/
}}}
!!Escaping
{{{
"""escaped"""
/%hidden%/

/%
!section
hidden section content
!end%/
}}}
!!Markup & style
{{{
@@cssProperty:cssValue; text@@
{{{class{content styled via css class}}}
<html>valid xHTML markup</html>
linebreak: <br /> <br>
entities:  &amp; &#171;
}}}
!!Macros
{{{
tid = [[TidName]] or TidName or 'tid name'
<<tiddler tid>>
<<tiddler 'tid##section'>>
<<tiddler 'tid::slice'>>
<<tabs id label tip tid ...>>
<<slider id tid label tip>>
<<today [format]>>
<<version>>

<<timeline [date][len][format]>>
<<list [all|missing|default|
      orphans|shadowed|touched|
      filter>>
<<allTags>>
<<tag name [label] [tip]>>
<<tags [tid]>>
<<tagging [tag]>>

<<newJournal [format]>>
<<newTiddler label:tidName
    text:"text" tag:tag tag:tag
    accessKey:key focus:field>>
<<saveChanges [label] [tip]>>
<<search [term]>>
<<closeAll>>
<<permaview>>
}}}
!!Startup paramifiers
{{{
#[open:]WikiWord
#[open:]WikiWord%20WikiWord…
#start:safe
#search:text
#tag:text
#newTiddler:WikiWord
#newJournal:format
}}}
!!Date formats
{{{
YYYY MMM DDD — year month day full
YY MM DD — 2 digit nums
0MM 0DD — leading zero
mmm ddd — short names
DDth — with suffix
WW — week num
wYY with week number
hh mm ss — hours min sec
0hh 0mm 0ss — leading zero
am AM or pm PM — indicator
hh12 — hours by 12
}}}
<script>
var c='$1',fl,gt,h,o='',t,ti,toc='\n!Table of contents',hx,x=place;
hx=[
	['Introduction','intro'],
	['TiddlyWiki','tw0',[
		['General','tw'],
		['Tiddler','tid'],
		['Tags','tag'],
		['Formating','fmt']]],
	['GTD','gtd0',[
		['Method','gtd'],
		['Workflow','flow']]],
	['tbGTD','tb0',[
		['Geneneral','tbGTD'],
		['Categories','cats'],
		['Add stuff','add'],
		['Stages','stages']]],
	['How to','how',[
		['Bookmarks','bmk'],
		['Reminders','remind'],
		['QuickNotes','qn'],
		['MainMenu','menu'],
		['x-tab','xtab'],
		['x-plore','xplore'],
		['x-tag','xtag'],
		['tag-cloud','cloud'],
		['tag-choser','deli'],
		['sidebars','side']]],
	['Broken?','brk'],
	['Contact','mail']
];
gt=function(c){
	var i,s,sc,sx,tx,tab=isNaN(c);//as tabs?
	for(i=0;i<hx.length;i++){
		sc=hx[i][1];
		if(tab&&c==sc||!tab&&c==i){
			sx=hx[i][2];if(tab&&!sx)break;
			ti=hx[i][0];
			o+=tab?'@@display:block;min-height:300px;<<tabs tabHelp'+sc:'\n!'+(i+1)+'. '+ti;
			toc+="\n#''"+ti+"''";
			if(sx){
				for(s=0;s<sx.length;s++){
					ti=sx[s][0];sc=sx[s][1];
					o+=tab?" '"+ti+"' '' 'help##"+sc+"'":"\n!!"+(i+1)+'.'+String.fromCharCode(97+s)+' '+ti+"\n"+"<<tiddler help##"+sc+">>";
					toc+="\n##"+ti;
				}
				if(tab)o+='>>@@';
			}else o+="\n<<tiddler help##"+sc+">>";
		}
	}
}
switch(c){
case '$'+'1':o="{{vTabs help{<<tabs tabHelp";for(t=0;t<hx.length;t++){ti=hx[t][0];o+=" '"+ti+"' '' 'help##"+hx[t][1]+"'";}o+='>>}}}';break;
case 'all':o="{{tbHelp{TOCHELP";for(t=0;t<hx.length;t++)gt(t);o+="}}}";break;
default:gt(c);
}
if(c=='$'+'1'){
	h=createTiddlyElement(x,'div',null,'tbHelp');
	wikify(o,h);
	o="<<slider chkLayout SiteLayout SiteLayout 'Toggles the SiteLayout. You can click on any of the links to get to the tiddler responsible for that content.'>> "+
	"[[help printout|tbGTD help]]";
}
wikify((c=='all'?o.replace('TOCHELP',toc):o),x);
setStylesheet(
'.tbHelp{margin:10px 0;}'+
'.tbHelp table{border-width:1px;}'+
'.tbHelp .marked{background:#E6E6FF;}'+
'.tbHelp .tabContents{min-height:180px;}'+
'.helpInner{border:2px solid #CCC;background:#F6F6F6;display:block;padding:5px;}'+
'.vTabs .helpInner{border:0;overflow-y:scroll;}'+
'.vTabs .helpSM {height:200px;}'+
'.vTabs .helpBG {height:350px;}','GtdHelpStyles');
</script>@@display:block;height:1px;clear:both;&nbsp;@@/%
!tw0
<<tiddler help with: tw0>>
!gtd0
<<tiddler help with: gtd0>>
!tb0
<<tiddler help with: tb0>>
!how
<<tiddler help with: how>>
!intro
In the following sections you will be introduced to
*the inner workings of this document
*its elements
*how to use them

''Note'': Unless an external link -- an __underlined__ term indicates that there is a corresponding section in this [[help]] document.

This is an adaptation of __~TiddlyWiki__
*with a focus on __GTD__
*designed to help you manage your ideas and actions
*to relieve your brain from (stress related to) forgetfulness
*to aid documentation and knowledge management

@@color:#C33;''Note:'' Use this great document, but know that you do so at your own risk.@@
!tw
tbGTD is powered by [[TiddlyWiki]], which is...
*an amazing @@opensource@@ [[wiki|http://en.wikipedia.org/wiki/Wiki]] platform
*integrating all of @@content@@, @@layout@@, @@style@@ and @@javascript@@ into a @@single html file@@
*actively developped and supported by a vivacious community

Learn more at...
*the main site http://www.tiddlywiki.com
*the community wiki http://www.tiddlywiki.org
*the google user group http://groups.google.com/group/TiddlyWiki
!tid
A tiddler is the basic content element of a __[[TiddlyWiki]]__. with a few basic properties...
*a @@unique name@@
*@@text-content@@ given to it
*by an @@author@@
*@@created@@ at some date or @@modified@@ later
*@@__tags__@@, which are keywords linked to a tiddler and 
*@@fields@@ providing basic information as well as extensibility

A tiddler is displayed in two basic modes...
*@@view-mode@@ displays the content, e.g. wiki-markup  of the tiddler in the __TiddlyWiki__ @@displayArea@@
*@@edit-mode@@ displays editable fields to change the tiddlers contents
**you can easily access edit-mode by double clicking on a tiddlers display area
**use keyboard-shortcuts in edit-mode
***{{{ctrl-enter}}} saves the tiddler
***{{{escape}}} leaves edit-mode ...while not saving changes

A tiddler may be or contain...
*a content item composed of
**text __formating__ using wiki-markup, possibly with embedded contents, such as...
***images
***tables
***other tiddlers ...which is called a @@transclusion@@
*pure html content wrapped in an {{{<html></html>}}}-block, like...
**iframes ...an html-file or remote website embedded into it
**an {{{embed object}}}, sometimes called a @@widget@@ or @@gadget@@
*a plugin, macro, script or transclusion
**extending a basic __TiddlyWiki__ with more functionality
*[[css|http://en.wikipedia.org/wiki/Cascading_Style_Sheets]] design rules
**a StyleSheet defining how __TiddlyWiki__ looks
*a template ...or template-collection called a @@theme@@
**that determines the presentational @@structure@@ and @@layout@@ of your TiddlyWiki and its elements
*a shadow tiddler ...or system tiddler
**a tiddler with default content that can be overwritten but will be restored when you delete your custom content
!tag
Tags are a powerful concept to relate tiddlers to one another. In addition to ~WikiLinks -- links inside your TiddlyWiki -- they allow you to categorize tiddlers, but with the added benefit of updating upon name changes. Above all, a tag is a tiddler!

Use tags to establish...
*categories
*keywords
*relations
**between parent and child elements
*indicators or switches
**to change style or behaviour of tiddlers with a certain tag

In general, tag those tiddlers on which others depend...
*a sub-element with the corresponding higher-level element
*a task with the corresponding project or contact

In the toolbar {{button{x-tab}}}{{button{x-plore}}}&{{button{x-tag}}} provide tag-related features
*see __How to__

An important plugin integrated into this wiki is called [[TagglyTagging|TagglyTaggingPlugin]].
It is displayed at the bottom of a tiddler...
*showing you a configurable view of tiddlers tagging to the current one (if there are any)
*play with the options (!)
*[[go here|http://mptw.tiddlyspot.com]] to learn more about it
!fmt
The tiddler [[formating]] provides a reference for basic and advanced @@wiki-markup@@.
{{helpInner helpBG{<<tiddler formating>>}}}
!gtd
''GTD'' stands for @@Getting Things Done@@.
[[David Allen|http://en.wikipedia.org/wiki/David_Allen_%28author%29]] coined the term as a @@method@@ in his [[book|http://en.wikipedia.org/wiki/Getting_Things_Done]].

Central to its method is that you...
*collect
*process
*organize
*review
*do
...actions and ideas that occupy your brain capacity...
*whether you chose to or not
*which you may find worthy or in need of pursuing
!flow
|font-size:90%;incoming stuff...@@font-size:120%;margin-left:30%; ''inbox''@@ {{floatright{...What is it?}}}|>|>|>|h
| !Is it actionable? |>|>|>|
|>|>| ''yes'' |vertical-align:middle; ''no'' |
|>|>|>1 actions? -- new [[$active]] project (define success)|~|
|>|>|font-size:150%; !What is the next action? |<<tiddler help##noact>>|
| !do | !delegate | !defer |~|
|if <2 minutes|<<tiddler help##wait>>|<<tiddler help##defer>>|~|
|>|>| plan, do, review actions & projects |~|
!noact
#eliminate
**@@trash@@
#incubate
**task:@@[[#queued]], [[#future]]@@
**project:@@[[$someday]], [[$maybe]]@@
#[[reference]]
**set as tags
**tag with corresponding task, project, contact, etc.
!defer
#[[#next]]
**for me @@asap@@
#[[calendar]]
**@@specific@@ time & date
#set a [[reminder]]
!wait
*use [[#waiting]]
*tag with item (if exists)
!tbGTD
Why the name ''tbGTD''?
*Plain and simple, my initials following the you-know-what.

The original can be found at http://tbGTD.tiddlyspot.com...
*the tag <<tag site>> is a collection of tiddlers that manage the design of this tiddlywiki
*on the very bottom of this tiddler you find an illustrated layout of tbGTD
**in which you can click on most any links
***to open the tiddlers responsible for the respective content

!cats
Some tags begin or end with a special character in order to facilitate recognition:

<script>var c,f,i,l,n,o,t,x;
c=['!action','context','priority','!project','stage','contact','area','realm','!archive'];
o='| prefix | category | sub-categories |h\n';f='@@background:#fcc; %0@@';
for(x=0;x<c.length;x++){
	i=c[x].substr(0,1)=='!';	n=i?c[x].substr(1):c[x];
	t=store.getTaggedTiddlers(n);l=t.map(function(t){return '[['+t.title+']] '});
	o+='| '+t[1].title.substr(0,1)+' |'+f.format(['((_*({{popBtn{<<tiddler "'+n+'">>}}})))[['+n+']]'])+' |'+(i?f.format([l]):l)+'|\n';
}return o;</script>
To assign a new item to a category, simply tag your tiddler with the corresponding category.
@@background:#fcc;padding:0 3px;These tiddlers@@ are essential and should only be modified if you know what you're doing:
*@@background:#fcc;[[desk]], [[journal]], [[calendar]], [[reminder]], [[reference]] and all tagged <<tag site>> or <<tag tbGTD>>@@

''Note:''
*type any of those prefixes in the searchbox, hit the down key and observe!
*you are not bound to using these categories
**delete or rename whatever category you don't like or need
**might require some tweaking of the [[desk]] or [[tagger|x-tagger]] or the [[MainMenu]]
!add
First, learn the basics of [[TiddlyWiki|http://tiddlywiki.com]].

You can add new items via...
*the {{button{+}}}buttons on the desk
*the {{button{new}}}popup in the [[top-left menu|topMenuL]] 
*the MainMenu on the left hand side
*the {{button{new}}}button a tiddlers toolbar

Once you add a new tiddler, it is essential that you give it a meaningful tag...
*use the provided __categories__

To create a new [[next action|#next]], all it requires is a tiddler tagged [[#next]].
!stages
[[Stages|stage]] are a very powerful apporach for your project management and documentation, allowing you to...
*generate overviews of how much effort is going into which stages
*track project progress

''Tips'':
*adjust stages to suit your (different) project designs
**simply edit the corresponding stage-tiddlers or rename them
*consider using tbGTD template files for different project categories
*try to use stages with quick-add in [[QuickNotes]]!

Here is an overview of all <<tag stage>><<rB 'predefined stages...'>>
{{helpInner helpSM{<<tiddler stage>>}}}
!bmk
tbGTD is set-up such that the url always points to the current tiddler.

If you turned @@chkSinglePagePermalink@@ off...
*use the {{button{url}}}button on the toolbar of a tiddler
*you may need to click on the {{button{+}}}button
*then your browsers address bar shows a url pointing to the @@current tiddler@@

Retrieve a link to @@all displayed tiddlers@@ by clicking <<permaview>> under <<popup options [[<<tiddler topMenuR##options$))]]>>.
!remind
Add a reminder...
*by clicking on a date in the calendar
*using the {{button{remind}}}button in the tiddlers toolbar
*using [[QuickNotes]]

To delete or edit a reminder, edit the tiddler.
!qn
Use [[QuickNotes]] to quickly type away notes. It offers a powerful [[quick-add|quick-add help]] feature...
*allowing you to add even a complete project outline in one go
{{helpInner helpBG{<<tiddler 'quick-add help'>>}}}
!menu
The [[MainMenu]] on the left-hand side
*gives you quick access to all GTD categories
*allows to add new items
*indicates, which categories are actually used and let'S you open those subitems

The section @@Tags@@ in [[x-tagger config]] contains links to those tiddlers which are the categories used in the MainMenu as well as by [[x-tagger]] ...the {{button{x-tag}}}popup in the toolbar. Any tiddler tagging to these __categories__ will be displayed in either place.

''Note'':
*configure [[x-tagger]] using [[x-tagger config]]
**also accessible via {{button{edit categories...}}} under ''options'' in the {{button{x-tag}}}popup.
*change [[x-tagger config]] to your liking
**remove anything you don't want or need
*doubleclick on a tag-category in the MainMenu shows all categories
!cloud
To hide a __tag__ from the [[TagCloud]]...
*assign it the tag <<tag noCloud>>
*or use <<tag excludeLists>> to hide it from other lists too

You can also edit the macro call in [[TagCloud]] to exclude further tags, without using [[noCloud]].
!deli
To assign or remove a tag to a tiddler in edit-mode use...
*the default @@tag-choser@@ for any existing tag
*a GTD @@tag-choser@@ to quickly assign
**one of the main GTD __categories__
**its sub-tags
**any tiddlers tagging to the subtags

The tag-choser in edit-mode -- called [[DeliciousTagging]] -- by default ignores the same tags as does __~TagCloud__ ...see parameter @@exclude@@ in the sourcecode.
!side
There are two sidebars...
*@@left@@: MainMenu
*@@right@@: [[calendar|SideBarOptions]] and [[lists|SideBarTabs]]

To hide sidebars on startup...
*change the second parameter in {{{<<toggleSideBarTB left show>>}}} from {{{show}}} to {{{hide}}} in...
**[[topMenuL]] (@@left@@ sidebar)
**[[topMenuR]] (@@right@@ sidebar)
!xtab
Clicking on [[x-tab]] in the toolbar will open...
*an interface allowing you to see a crosstable of tagged items...
**providing you with @@presets@@ which you can delete, expand or edit
**preconfigured to @@detect@@ all GTD __categories__
**configurable to find what you're looking for the way you need it

Customize [[x-tab]]'s presets, tags and auto-detect in [[x-tab config]].
!xplore
Clicking on [[x-plore]] in the toolbar of the current tiddler
*opens a popup displaying the four most common tiddler relations
*in a treelike manner

Define elements to be excluded or truncated using the corresponding sections in [[x-plore]].
!xtag
The {{button{x-tag}}}popup allows you to easily assign tags to the current tiddler or remove them.
Customize [[x-tagger]] as described in __~MainMenu__ via [[x-tagger config]].
!brk
As tbGTD is based on __~TiddlyWiki__ it is facing the same browser restrictions that may come up.
It is highly recommended that you use Firefox! 

Something looks weird or doesn't work in Internet Explorer, Safari, Opera, Chrome?
*I am trying my best to make tbGTD work correctly in other browsers
*if you come accross css bugs - rather than complain - try to suggest a fix
!mail
Need more help? Drop a line here...
*[[tiddlywiki discussion group on google|http://groups.google.com/group/tiddlywiki/browse_frm/thread/bd6a9784706784f6]]
*[[contact me here|contact me]] or on [[tbGTD.tiddlyspot.com|http://tbGTD.tiddlyspot.com/#%5B%5Bcontact%20me%5D%5D]]
!end%/
I just had to swap the prefixes of [[project]] and [[stage]]!
*from now on, the ''$dollar''-prefix will indicate a [[project category|project]] while the ''§paragraph''-prefix indicates a [[stage]]
*the symbology just makes 10 times more sense that way
*also, you're probably accustomed to the $ key ...therefore, it's good for starters, i.e. projects
I know that this somewhat breaks backwards-compatibility and I am sorry!
''Just say'': {{{Alright then. I'ts fine... nay bother.}}}
!So here's what I recommend you should do before updating ...after the release is outthere
Assign the new prefixes of [[project]]- and [[stage]]-categories for those categories in which you have items. That will take care of reassigning the new tagname in all tagging tiddlers. The MainMenu indicates which tag-categories have items. Finally, import your tiddlers into a blank tbGTD. Wasn't all that difficult, was it?
/***
|''Name:''|jQueryPopup|
|''Description:''|Inline annotations for tiddler text with a 'jQueryfied' popup|
|''Author:''|Tobias Beer (original AnnotationsPlugin by Saq Imtiaz)|
|''Source:''|http://tbGTD.tiddlyspot.com/#jQueryPopup|
|''Version:''|0.1|
|''Date:''|2009.10.19|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
|''incompatible with!!!''|AnnotationsPlugin|

((@@color:red;background:transparent;mod of ~AnnotationsPlugin@@(^strongly modded for tbGTD<br />*added delay<br />*wikified annotated & annotation<br />*used general tw Popup<br />*jQuery magic)))
!!Usage:
*{{{((text to annotate(annotation goes here)))}}}
* To include the text being annotated, in the popup as a title, put {{{^}}} as the first letter of the annotation text.
** {{{((text to annotate(^annotation goes here)))}}}
!!Examples:
Mouse over, the text below:
* ((_banana(the best fruit in the world)))
* ((_banana(^the best fruit in the world)))
***/
//{{{
config.extensions.anno={
	show:function(id){
		var el=document.getElementById(id);
		el.timerA=false;
		
		var wrap=document.getElementById('annowrap');
		if (wrap==undefined)wrap=createTiddlyElement(document.body,"div","annowrap",null);
		else wrap.innerHTML='';
		wrap.style.display='none';
		
		var stackPosition = Popup.find(el,"popup");
		Popup.remove(stackPosition+1);
		var popup = createTiddlyElement(wrap,"ol","popup","popup");
		popup.stackPosition = stackPosition;
		Popup.stack.push({root: el, popup: popup});
		
		if(el.subject)wikify("!"+el.subject+"\n",popup);
		wikify(el.anno,popup);
		Popup.show();
		
		popup.annoId=id;
		popup.onmouseover=this.mouseover;
		popup.onmouseout=this.mouseout;
		jQuery(wrap).fadeIn('slow');
		addClass(el,"annosubover");
		el.wrap=wrap;
	},
	hide:function(id){var el=document.getElementById(id);if(el.keepAnno)return;else this.remove(id);
	},
	mouseover:function(e){
		var el=document.getElementById(this.annoId);el.keepAnno=true;if(annoHideTimer)clearTimeout(annoHideTimer);
	},
	mouseout:function(e){
		annoHideTimer=setTimeout("config.extensions.anno.remove("+this.annoId+")",200);
	},
	remove:function(id){
		var el=document.getElementById(id);
		Popup.remove();
		removeNode(el.wrap);
		el.wrap=null;
		el.keepAnno=false;		
		removeClass(el,"annosubover");
	}
}
config.formatters.unshift({
	name:"annotations",
	match:"\\(\\(",
	lookaheadRegExp:/\(\((\_{0,2})(.*?)\((\^?)((?:.|\n)*?)\)\)\)/g,
	handler:function(w){
		this.lookaheadRegExp.lastIndex=w.matchStart;
		var an=this.lookaheadRegExp.exec(w.source);
		if(an&&an.index==w.matchStart){
			var el=createTiddlyElement(w.output,"span",null,"annosub");
			if (an[1]) el=createTiddlyElement(el,"span",null,null);
			wikify('xxx'+an[2],el);
			el.innerHTML=el.innerHTML.replace(/xxx/,'',1);
			el.anno=an[4];
			if(an[3])el.subject=an[2];
			el.onmouseover=this.onmouseover;
			el.onmouseout=this.onmouseout;
			el.ondblclick=this.onmouseout;
			w.nextMatch=an.index+an[0].length;
		}
	},
	onmouseover:function(e){
		if (!this.id) this.id=new Date().getTime()+Math.random();
		if(this.timerA)return;
		this.timerA=true;
		annoTimer=setTimeout("config.extensions.anno.show("+this.id+")",300);
	},
	onmouseout:function(e){
		this.timerA=false;
		if(!this.wrap||this.keep)clearTimeout(annoTimer);
		var id=this.id;
		annoHideTimer=setTimeout("config.extensions.anno.hide("+this.id+")",200);
	}
});
setStylesheet(".anno{position:absolute;padding:0.5em;max-width:15em;z-index:101;width:expression(document.body.clientWidth > (255/12) *parseInt(document.body.currentStyle.fontSize)?'15em':'auto' );}.anno h1, .anno h2{margin-top:0;}.annosubover{cursor:text;}","AnnotationStyles");
//}}}
<<newJournal "YYYY-0MM-0DD " label:"Write a new journal entry..." focus:title prompt:"Click to create a new journal entry!" tag:journal>>
<<tiddlerList tags:"journal" dateFormat:"mmm. 0DD" itemTemplate:"*%created - %0 \n" group:"tiddler.created.formatString('YYYY, MMM')" groupTemplate:"!!!%group \n" order:"-created">>
Tiddlers hidden from the [[TagCloud]]...
All [[quick notes|QuickNotes]] are tagging here...
@@display:block;margin:1em 1em 0 1em; [[SiteLayout]] <<saveChanges 'save'>><<tiddler TspotSidebar>><<slider chkTspotControls TspotControls "more tiddlyspot options »" "Show more tiddlyspot options">><<slider chkAdvOptionsPanel AdvancedOptions "advanced options »" "Show advanced options">>@@
|widetable|k
| option | description |h
| <<tiddler TspotOptions>>|options are saved as cookies in your browser|
| <<option txtUserName>>|username for signing your edits|
| <<option chkAnimate>>|enable animations|
| <<option chkAutoSave>>|autosave|
| <<option chkSaveBackups>>|save backups|
| <<option chkRegExpSearch>>|search regular expressions|
| <<option chkCaseSensitiveSearch>>|search case sensitive|
Assign priorities to differentiate importance...
Group [[actions|action]] into projects by assigning projects as tags to action-tiddlers. Assign project-tags to projects to indicating their status...
''New'': <<newTiddler label:"$active" title:"new active project" prompt:"create a new active project" focus:title tag:$active>><<newTiddler label:"$someday" title:"new someday project" prompt:"create a new someday project" focus:title tag:$someday>> <<newTiddler label:"$maybe" title:"new maybe project" prompt:"create a new maybe project" focus:title tag:$maybe>>
!QuickNotes has two modes of operation
#''simple note'' -- saves a new [[note]]-tiddler with the following properties:
**a ''title'' (optional) {{{...if none provided a timestamp will be inserted}}}
**some ''tags'' (optional) {{{...all notes will be tagged with 'note'}}}
**a ''note'' (required) {{{...the text body of your note}}}
#''quick-add'' -- allows you to add multiple new GTD items:
**invoked via ''ctrl-click'' on the ''save note''-button
**define items to be added with a simple, yet powerful syntax {{{...as described below}}}
!Using 'quick-add'
Using the default settings only [[projects|project]] and [[actions|action]] can be added via quick-add.
Here's a first example of the syntax for adding actions:
>#q call Maria|@c &fa   {{{...creates the #queued action 'call Maria' tagged with context '@call' and area '&family'}}}
>!Notes {{{...this will be an actual heading of the content of the tiddler 'call Maria'}}}
>!!Things to talk about: {{{...a subheading}}}
>*foo {{{...you can even use lists}}}
>*http://bar.com {{{...could also be a WikiLink, like: [[bar]]}}}
>.#q remind her of Juans birthday|^1 {{{...creates a queued subaction tagging to 'call maria' with high priority }}}
''Note'': When using quick-add, a time-stamped summary will be created allowing you to check and quickly access all the tiddlers you just created.
!The syntax in detail
!!Basics
To create a default [[#next]] [[action]] or [[$active]] [[project]], just use the prefixes ''#'' or ''$'' by themselves followed by an empty space:
>''$'' my new active project
>''#'' my new next action
Append any unique starting letters of a category-tag to create something other than the defaults:
>''#q'' a queued action  
>''$s'' a someday project
And, of course, preceded by an empty character follows the title:
>''# my new next action title''
To add any other GTD tags use the separator ' ''|'' ' followed by GTD tags using the same nomenclature as above, separated with empty spaces:
># read the js cookbook''|@r &t''   {{{...adds a next action called 'read the js cookbook' tagged @read and &tech}}}
''Note'': As for all tags following ' ''|'' ', you can in fact use the starting characters of any items already added, even existing tiddlers. If those contain empty spaces use square brackets, e.g. {{{[[a q]]}}} to refer to some added item called {{{'a queued item'}}} or in fact any existing tiddler that starts with {{{'a q'}}}. Note that items which you just added will be preferred over other existing tiddlers. For example...
># ''d''o this
># then that|''d'' {{{...refers to 'do this' and will therefore be given it as a tag}}}
!!Dependencies
Use nesting or tagging to create action dependencies whereas...
*items used as tags are depending on those tagging to them
*high level items depend on lower level items, like a project depends on the completion of its subactions
!!Subitems
By adding dots ( ''.'' ) to the beginning of a line, items become nested subitems, being tagged with the name of the item of the next higher level:
>$s a someday project
>''.''#f some future subaction {{{...will be tagged with 'a someday project'}}}
>''.''#f another future subaction|§6  {{{...regarding some experiments}}}
>''..''#f the future on level two {{{...sub to 'another future subaction'}}}
>''.''#d already done in advance for my someday project
>$ another next project
>''.''#action xyz {{{...you guessed it, its subitem}}}
Which items allow nesting is defined at the beginning of the sourcecode of QuickNotes. Here are the defaults:
>''$''projects may contain any of the following subitems
>>''.$''subproject
>>''.#''stage
>>''.#''action
>>''.?''contact
>''§''stages may contain... {{{...not recommended, stages should rather be tags of actions}}}
>>''.#''action
>>''.?''contact
>''#''actions may contain...
>>''.#''action
>>''.?''contact
!!More tagging
Entering tags into the tag input field of QuickNotes will also add these tags to __all__ tiddlers created via quick-add! For example, if you entered...
>{{{[[your project name in brackets]]}}}
...it will be set as a tag to all subactions, in addition to any further nesting.

''Note'': If you forget the square brackets in the example above, all items will get 5 more tags instead of the one you wanted! However, you could as well use single- or double-quotes.
!!New item with content
Every line that doesn't start with ''#'' or ''$'' will be used as the tiddler content of the item defined beforehand:
>$s my private someday project|-p   {{{...is the definition line for 'my private someday project' tagged '-private-'}}}
>!Project Introduction {{{...here starts its content}}}
>*a list
>*in the project-tiddler text   {{{...and here it ends}}}
>.#n my nested next science action|&sc   {{{...another definition for an action tagged &science}}}
>See...http://w3.org   {{{...and its content}}}
>*#with a pseudo-numbered-list {{{...can't use # directly as that is a 'definition prefix'!}}}
>*#list item number two   {{{...ending here}}}
!Tips
Try not to confuse ''$ dollar'' (project) and ''§ paragraph'' (project stage).
[[quick-add|QuickNotes]] summaries...
Realms are the broadest context you can think of for your activities, assign them to projects...
Use this tag for information related to your actions, projects, contacts, etc...
!All reminders...
{{block{<<showReminders leadtime:-356...356>>}}}
@@color:#999;(only includes reminders +/- 1 year)@@/%
!info
Find more date and reminder related information via the [[calendar]] link in the [[left-topmenu|topMenuL]] or in the right [[sidebar|SideBarOptions]] ...or click on thse links.
!end%/
/%
!refreshBtn
<html><a class='refresh' title="redisplay the contents of $1" href="javascript:story.refreshTiddler('$1',null,true);return false;">refresh</a></html>
!refresh
<<tiddler scriptCollection##refreshBtn with: {{('$1'=='$'+'1')?tid=story.findContainingTiddler(place).getAttribute("tiddler"):'$1';}}>>
!tidsByTags
<script>
/***
|''Name:''|TiddlersByTags|
|''Description:''|Displays a table listing tiddlers by tags, excluding certain ones|
|''Author:''|Tobias Beer|
|''Source:''|http://tbGTD.tiddlyspot.com|
|''Version:''|1.1|
|''Date:''|2009.11.07|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Requires:''|InlineJavascriptPlugin|
***/
var ex=[],i,t,tx,xt='$1'.readBracketedList();
for(t=0;t<xt.length;t++){
	tx=store.getTaggedTiddlers(xt[t]);
	for(var i=0;i<tx.length;i++)ex.pushUnique(tx[i].title);
}
var out="|linkTable|k\n| tag | tiddlers |h\n";
var tags=store.getTags();
for (var tag=0;tag<tags.length;tag++) {
	if (ex.contains(tags[tag][0])) continue;
	var tids=store.getTaggedTiddlers(tags[tag][0]);
	out+="| [["+tags[tag][0]+"]]|";
	for (var t=0;t<tids.length;t++) out+="[["+tids[t].title+"]]";
	out+="|\n";
}
return out;
</script>
!deleteTiddler
<script label="delete" title="click to delete $1">
  var sTid='$1';
  var update='$2';
  var refresh='$3'!='norefresh';
  if(sTid=="$"+"1"){
    sTid=story.findContainingTiddler(place).getAttribute('tiddler');
    if (sTid=="DeleteTiddler") return;
    if (!confirm("Do you really want to delete "+sTid+"?")) return;
    else refresh=false;
  }
  var oTid=store.getTiddler(sTid);
  if (oTid==undefined){
    alert("Unable to delete '$1'. Tiddler does not exist.");
    return;
  }
  store.removeTiddler(sTid);
  story.closeTiddler(sTid,true);
  if (refresh) story.refreshTiddler(story.findContainingTiddler(place).getAttribute('tiddler'),null,true);
  if (update!="$"+"2")story.refreshTiddler("$2",null,true);
  refreshDisplay();
</script>
!miniTag
<script>
var click=function(e){
	if(!e)var e=window.event;
	var popup=Popup.create(this);
	var tags=this.getAttribute('tags').readBracketedList();
	for(var t=0; t<tags.length; t++) createTiddlyLink(createTiddlyElement(popup,"li"),tags[t],true);
	Popup.show(popup,false);
	e.cancelBubble=true;
	if(e.stopPropagation)e.stopPropagation();
	return false;
}
var title="$1"!='$'+'1'?'$1':story.findContainingTiddler(place).getAttribute('tiddler');
var tid=store.getTiddler(title);
if(tid){
	var title=('$2'!='$'+'2'?'$2':'')+'\u25b6';
	var exclude=('$3'!='$'+'3'?'$3':'').readBracketedList();
	var tags=tid.tags;
	out=[];
	for(var t=0; t<tags.length; t++)if(!exclude.contains(tags[t])) out.push(tags[t]);	
	if (out.length>0){
		addClass(place,'miniTags');
		var btn=createTiddlyButton(place,title,'show tags for \''+tid.title+'\'',click);
		btn.setAttribute('tags',(out.length>1?"[["+out.join(']][[')+']]':'[['+out+']]'));
	}
}
</script>
!end%/
Tiddlers that relate to the design of this site...
!Think in project stages
<<tiddlerList tags:"stage" order:"title" header:'| stage | description |h' itemTemplate:"|text-align:left;!<<tag '%title'$))|<<tiddler '%title'$))|\n">>/%
!info
Use [[stages|stage]] to indicate which step in your project cycle an element relates to. See [[here|stage]] for an overview of all predefined stages and their meaning. Stages are most useful when you do specific kinds of projects on a regular basis. It is essential that stages reflect your own project flow. Therefore, do not hesitate to adjust them to suit your needs or make specific tbGTD templates for different kinds of projects.
!end%/
Tiddlers tagged with star ([[★|star]]) are currently of interest or high importance so you can retrieve them quickly. Use the star {{button{[[★|star]]}}} in the toolbar to mark a tiddler...
{{sidebarTitle{[[plugin manager:|PluginManager]]}}}
<<list filter [tag[systemConfig]]>>
disabled plugins:
<<list filter [tag[systemConfigDisable]]>>

All tiddlers powering this wiki...
<<tiddler help with: all>>
|''URL:''|http://tbGTD.tiddlyspot.com/|
|''Author:''|Tobias Beer|
|''Description:''|a tiddlywiki GTD system|
|Name|tbGtdTheme|
|Description|A theme based on ~MptwTheme ($Rev: 1829 $) with innumerable customizations |
|PageTemplate|##PageTemplate|
|ViewTemplate|##ViewTemplate|
|EditTemplate|##EditTemplate|
|StyleSheet|##StyleSheet|

!PageTemplate
<!--{{{-->
<div class="topMenu" id="topMenuR" refresh='content' tiddler='topMenuR'></div>
<div class='header' 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>
<!-- horizontal MainMenu -->
<div class='topMenu' id="topMenu" macro='gradient vert [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::TertiaryDark]]'>
  <span id="topMenuL" refresh='content' tiddler='topMenuL'></span>
</div>
<div id='sidebar'>
	<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
	<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='mainMenu' refresh='content' force='true' tiddler='MainMenu'></div>
<div id='displayArea'>
	<div id='messageArea'></div>
	<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
	<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->

!ViewTemplate
<!--{{{-->

[[tbGtdTheme##Viewtemplatetoolbar]]

<div class="tagglyTagged" macro="tags"></div>

<div class='titleContainer'>
	<span class='title' macro='view title'></span>
	<span macro="miniTag"></span>
</div>

<div class='subtitle'>
	(updated <span macro='view modified date {{config.options.txtPrettyDates?config.options.txtPrettyDates:"YYYY-0MM-0DD"}}'></span>&nbsp;by&nbsp;<span macro='view modifier link'></span>)
	<!--
	(<span macro='message views.wikified.createdPrompt'></span>
	<span macro='view created date {{config.options.txtPrettyDates?config.options.txtPrettyDates:"YYYY-0MM-0DD"}}'></span>)
	-->
</div>

<div class='viewer' macro='view text wikified'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<div class='toolbar toTop' style='line-height:100%;margin-top:.5em;'><a href="javascript:;"
	onclick="window.scrollTo(0,ensureVisible(story.findContainingTiddler(this)));return false;"
	onmouseover="this.title='scroll to top of '+story.findContainingTiddler(this).getAttribute('tiddler')">&#x25b2;</a>
</div>
<!--}}}-->

!Viewtemplatetoolbar
<!--{{{-->
<div class='toolbar'>
	<span macro="tiddler {{var v=store.getValue(tiddler,'need');v?v:'';}}"></span>
	<span style="padding:1em;"></span>
	<span macro="tTag tag:star mode:text text:★" style="padding-top:0.2em;"></span>
	<span macro="xtab button defaults:true position:first" style="margin:0 0 0 10px;"></span>
	<span macro="xplore button:true toolbar:true exclude:GET==x-plore##exclude truncate:GET==x-plore##truncate class:'borderless'"></span>
	<span macro="xtagger source:'x-tagger config##Tags' exclude:'' label:'x-tag' tooltip:'Set GTD related tags' more:'x-tagger config##More'" style="margin-right:20px;"></span>
	<span macro='newHere label:"new"'></span>
	<span macro='toolbar [[ToolbarCommands::ViewToolbar]]'></span>
	<span macro='newReminder' class='reminder'></span>
</div>
<!--}}}-->

!EditTemplate
<!--{{{-->
<div class="toolbar" macro="toolbar [[ToolbarCommands::EditToolbar]]"><span macro='popup [[info on formating]] [[<<tiddler formating$))]] "" helpPopup'  style='margin-right:30px;'></span></div>
<div class="title" macro="view title"></div>
<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>
<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>
<div class='editorFooter' macro='deliciousTagging'><span class='tagChooser'  title='set tiddler tags' macro='tagChooser'></span></div>
<div macro='annotations'></div>
<div class="editLabel">Content</div><div class="editor" macro="edit text"></div>
<!--}}}-->

!StyleSheet
/*{{{*/

body{background: [[ColorPalette::TertiaryDark]];}
#backstageButton a{color:[[ColorPalette::TertiaryLight]];padding-left:10em;}
#backstageButton a:hover{color:[[ColorPalette::Background]];background:transparent;}
#backstageToolbar{text-align:center;}

#messageArea{position:absolute;top:0.3em;left:38%;padding:0.7em 1%;width:25%;border:2px solid [[ColorPalette::TertiaryLight]];-moz-border-radius:3px; -webkit-border-radius:3px;background:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::TertiaryMid]];}
#messageArea .messageToolbar{display:block;float:right;padding:0.1em;text-align:right;width:30px;}
#messageArea a, #messageArea .button{background:transparent;text-decoration:none;color:[[ColorPalette::Background]];}
#messageArea a:hover{color:[[ColorPalette::Foreground]];}

.headerShadow{padding: 1em 1em 0;font-family: 'Baskerville, Verdana, Trebuchet MS' sans-serif;font-weight:bold;}
.headerShadow, .headerShadow .siteSubtitle, .headerShadow .tiddlyLink{color: [[ColorPalette::TertiaryPale]];}
.headerShadow .tiddlyLink:hover{color:[[ColorPalette::SecondaryMid]];}
.subtitle{padding:0px;margin:0px;padding-left:1em;font-size: 90%;color: [[ColorPalette::TertiaryMid]];}
.subtitle .tiddlyLink{color: [[ColorPalette::TertiaryMid]];}

.topMenu{background-color:transparent;color:[[ColorPalette::PrimaryPale]];}
.popup .popBtn .button, .topMenu .button, .topMenu .tiddlyLink{font-weight:bold;margin:0 0.5em;padding:3px 1px;color:[[ColorPalette::PrimaryPale]];background:transparent;font-size:115%;border:0 !important;}
.popup .popBtn .button{font-size:100%;margin:0 3px;}
.popup .popBtn .button:hover, .topMenu .button:hover, .topMenu .tiddlyLink:hover{color: [[ColorPalette::SecondaryMid]];background:transparent;}
#topMenu{width:100%;padding:0.3em 0;}
#topMenuL br, #topMenuR br{display:none;}
#topMenuL{float:left;margin-left:0.5em;height:25px;}
#topMenuR{display:block;position:absolute;right:0em;z-index:11;height:25px;color:[[ColorPalette::TertiaryMid]];min-width:10%;float:right;top:4.9em;}
#topMenuClear{clear:both;width:100%;height:1px;border:0px;margin:0px;padding:0px;}

#toggleLeftSideBar{position:absolute;top:5px;left:5px;z-index:999;left:40;color:[[ColorPalette::Background]];}
#toggleLeftSideBar a{color:[[ColorPalette::Background]];background:none;border:0;}
#toggleLeftSideBar a:hover{background:none;border:0;}

#mainMenu{padding:10px 0 0 0;margin-top:-10px; width:8.1em; background:[[ColorPalette::PrimaryMid]]; -moz-border-radius:5px; -webkit-border-radius:5px;border:0; border-right: 5px solid [[ColorPalette::PrimaryMid]]; border-bottom: 5px solid [[ColorPalette::PrimaryMid]];text-align:left;z-index:0;}
#mainMenu ul{list-style:none;padding:0;margin:0px;}
#mainMenu li{clear:both;}
#mainMenu a{padding-left:5%;width:95%;margin-top:-1px;border-bottom:1px solid [[ColorPalette::Foreground]];border-top:1px solid [[ColorPalette::Foreground]];color:[[ColorPalette::PrimaryPale]];display:block;}
#mainMenu a:hover{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::TertiaryDark]];}
#mainMenu ul ul{margin-bottom:30px;}
#mainMenu .accordion ul li .button, #mainMenu .accordion ul li .button:hover ,
#mainMenu .accordion ul li .quickopentag .button,
#mainMenu .accordion ul li .quickopentag .button:hover  {border:0 none;float:left;padding:0 3%;text-align:center;width:10%;font-size:11px;}
.popup .quickopentag .button {border-color:transparent;}
#mainMenu .accordion ul li .quickopentag .tiddlyLink{border:0;float:left;padding:0 0 0 1%;width:67%;color:[[ColorPalette::SecondaryLight]];}
#mainMenu .accordion ul li .quickopentag .tiddlyLink:hover {text-decoration:underline;color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
#mainMenu .noCopy{color:[[ColorPalette::TertiaryDark]];border-top:none;}
#mainMenu .main{padding:1px 0 1px 5px;}

.xtagger .quickopentag .tiddlyLink:hover {text-decoration:underline;color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
.xtagger .quickopentag .tiddlyLink{font-size:110%;border:0;padding:0 0 0 1%;display:inline;color:[[ColorPalette::SecondaryLight]];}

#sidebar{margin:-10px 0 0 0;padding:14px 0 5px 0; background:[[ColorPalette::PrimaryMid]]; -moz-border-radius:5px; -webkit-border-radius:5px;border:0; border-left: 5px solid [[ColorPalette::PrimaryMid]]; border-bottom: 5px solid [[ColorPalette::PrimaryMid]];width:17.6em;right:0;}
#sidebarTabs{margin:1em 0 0 0.5em;}
#sidebar .button{border-style:none;padding:2px 8px 2px 2px;}
#sidebar .button:hover{color:[[ColorPalette::SecondaryMid]];}
#sidebar br{display:none;}
#sidebar hr{height:0;border:0;border-bottom:1px solid [[ColorPalette::Foreground]];}
#sidebar li a{display:block;}
#sidebar a{color:[[ColorPalette::TertiaryPale]];}
#sidebar .tiddlyLinkNonExisting{color:[[ColorPalette::TertiaryLight]];}
#sidebar .highlight, #sidebar .marked, #sidebar a:hover{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
#sidebar .tabset{margin-bottom:2px;padding:0.5em 0 0 0 !important}
#sidebar .tabset .tab {padding:3px;font-size:9px;font-weight:bold;height:16px;background-color:[[ColorPalette::Foreground]];color:[[ColorPalette::TertiaryLight]];display:inline;border:0;border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
#sidebar .tabset .tab:hover{background-color:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::Background]];}
#sidebar .tabset .tabSelected{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::TertiaryDark]];}
#sidebar .tabContents{background-color:[[ColorPalette::PrimaryMid]];border:0;border-top:1px solid [[ColorPalette::TertiaryDark]];color:[[ColorPalette::Background]];}
#sidebar .tagCloudtag, #sidebar #TOCMenu{display:inline;}
#sidebar .tabContents .tabset, #sidebar .tabContents .tabContents{padding:0;margin-left:-0.5em;}
#sidebar .tabContents .tabContents {padding-top:5px;margin-left:0.2em;}
#sidebar .tabContents .sideBarTags ul .tiddlyLink{padding:1px 0;width:88%;float:right;}
#sidebar .tabContents .sideBarTags .button{width:8%;padding:1px 1%;text-align:center;float:left;}
#sidebar .sidebarTitle a{display:block;font-size:110%;border-bottom:1px solid [[ColorPalette::Foreground]];font-weight:normal;}
#sidebar .TOC{padding:0;}
#sidebar .TOCList{padding:0;margin-top:3px;display:block;}
#sidebar .TOCList, #sidebar .TOCList option{border:[[ColorPalette::PrimaryMid]];background:[[ColorPalette::PrimaryMid]];color:[[ColorPalette::Background]];}
#sidebar .TOCList option:hover{background:[[ColorPalette::Foreground]];color:[[ColorPalette::SecondaryMid]];}

#searchResults{padding:1em;border: 1px solid [[ColorPalette::TertiaryLight]];margin:0;right:0.5em;position:absolute;background:[[ColorPalette::Background]];min-width:30%;max-width:40%;z-index:1000;}
#searchResults ul{max-height:150px;overflow:auto;}
#searchResults h1{clear:both;}
#searchResults ul{margin: 0.5em;padding-left:1.5em;}
#searchResults li{list-style-type:circle;}
#search_open,
#search_close{display:block;float:right;padding:5px 10px;width:70px;margin:5px 10px 10px 0px;text-align:center;border: 1px solid [[ColorPalette::TertiaryLight]];}
#searchResults .tiddlyLink{display:block;}

#tiddlersBar{margin-top:0px;padding-top:0px;}
.toolbar{float:right;}^
.toolbar .tiddlyLinkExisting{font-weight:normal;}
.toolbar{visibility:hidden;}
.selected .toolbar{visibility:visible;}

#displayArea{margin: 0.5em 17.1em 0em 10.1em;}
.tiddler{background:[[ColorPalette::Background]];border:3px solid [[ColorPalette::Background]];-moz-border-radius:3px; -webkit-border-radius:3px;border-right: 2px [[ColorPalette::TertiaryMid]] solid;border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;margin-bottom: 1em;padding:1em 2em 2em 1.5em;}
.viewer{clear:both; POSITION: relative;color:[[ColorPalette::TertiaryDark]];padding-bottom:3px;}
.title, .titleContainer .miniTag{font-size: 250%;color: [[ColorPalette::PrimaryLight]];font-family: 'Baskerville, Verdana,Trebuchet MS' sans-serif;}
.editor textarea, .editor input{font-family: 'Consolas' monospace;background-color:[[ColorPalette::TertiaryPale]];}
.editorFooter{line-height:1.6em;}
.tagChooser{font-weight:bold;font-size:120%;}
h1,h2,h3,h4,h5,h6{background-color: transparent;color: [[ColorPalette::Foreground]];}

.toTop a:hover{background:transparent;}
#addReminderForm{clear:both;}

.clearDiv{clear:both; margin:0px; padding:0px; width:100%; height:1px;}
.toolbar a.on{color:orange;background-color:[[ColorPalette::Background]];}

#popup {padding:3px;}
.popup li,.popup ul,.popup ol,.popup span li,.popup span ul,.popup span ol {list-style:none !important;margin:0px !important;padding:0px !important;}
#popup tr.fieldTableRow td{padding:1px 3px 1px 3px;}
#popup div{color:[[ColorPalette::SecondaryMid]];text-decoration:underline;}
ol.popup{border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryDark]]; -moz-border-radius:3px; -webkit-border-radius:3px;}
.popup{background:[[ColorPalette::PrimaryMid]];}
.popup br{display:none;}
.popup ul li .button{padding:0.4em;display:block;}
.popup hr{padding:0;margin:0;border:0;}
.popup a, ol.popup li a, .popup ul li .button, .popup .menuH .button, .popup li a:visited{background:transparent;color:[[ColorPalette::TertiaryPale]];}
.popup a:hover, ol.popup li a:hover{background:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::SecondaryMid]];}
.popup h1, .popup h2, .popup h3, .popup hr{border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.popup h1, .popup h2, .popup h3, .popup h4, .popup h5, .popup{background:[[ColorPalette::Foreground]];color:[[ColorPalette::Background]];}
.popup .menuH{display:block;margin:0.5em 0 0 3px;padding:0;font-size:1.4em;font-weight:bold;border-bottom:1px solid [[ColorPalette::TertiaryDark]];min-width:250px;}
.helpPopup{font-size:120%;font-family:overflow:none;overflow-y:scroll;height:400px;font-family:'Verdana,sans-serif';}

td, tr{vertical-align:top;}
.viewer table,table.twtable{margin:0;border-collapse:collapse;border:1px solid [[ColorPalette:TertiaryMid]];}
.viewer table, table.twtable, .viewer td, .viewer tr, .twtable td, .twtable tr,
.viewer th, .viewer thead td, .twtable th, .twtable thead td{border:1px solid [[ColorPalette:TertiaryMid]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td{font-weight:bold;}
.viewer th .tiddlyLink, .viewer th .tiddlyLinkExisting, .viewer th .externalLink,
.viewer thead .tiddlyLink, .viewer thead .tiddlyLinkExisting, .viewer thead .externalLink{color:[[ColorPalette::Foreground]];}
.viewer th .tiddlyLink:hover, .viewer th .tiddlyLinkExisting:hover, .viewer th .externalLink:hover,
.viewer thead .tiddlyLink:hover, .viewer thead .tiddlyLinkExisting:hover, .viewer thead .externalLink:hover{color:[[ColorPalette::Background]];}
.linkTable .quickopentag .tiddlyLinkExisting,.linkTable .quickopentag .externalLink{display:inline;}

.noborder, .noborder table, .noborder td, .noborder tr, .noborder th, .noborder tbody { border:0 !important;margin:0 !important;}
.noborder tbody td{padding:1px 4px 1px 2px;}

#sidebarOptions .black .calendar{text-align:center;margin:0 auto;}
.black{display:inline-block;color:[[ColorPalette::TertiaryMid]];}
.black table{border:0 !important;}
.viewer .black{border:10px solid [[ColorPalette::PrimaryMid]];-moz-border-radius:10px; -webkit-border-radius:10px;}
.black, .black table, .black th, .black tr, .black td{background:[[ColorPalette::PrimaryMid]];padding:0 !important;border:0;}
.black .calendar td{border:1px solid [[ColorPalette::PrimaryMid]] !important;border-collapse:collapse;}
.black .calendar .weekNo{font-style:normal;color:[[ColorPalette::TertiaryMid]];border-left:5px solid [[ColorPalette::PrimaryMid]];border-collapse:collapse;}
.black .calendar a,.black .calendar td .button{padding:2px 3px !important;margin:0;color:[[ColorPalette::TertiaryPale]];display:block;}
.black .calendar td .button{color:[[ColorPalette::TertiaryMid]];}
.black .tiddlyLinkNonExisting, .black .tiddlyLink, .black .button{background:transparent;border:transparent;fonts-style:normal;}
.black .calendarMonthname,
.black .calendarMonthname .tiddlyLink{color:[[ColorPalette::TertiaryMid]];font-style:normal;}
.black .calendarMonthname .tiddlyLink:hover, .black .tiddlyLink:hover, .black .button:hover{color:[[ColorPalette::SecondaryMid]];}
.black br{display:none;}

.viewer iframe{width:100%;height:450px;border:1px solid [[ColorPalette::TertiaryMid]];-moz-border-radius:3px; -webkit-border-radius:3px;}

.viewer .tiddlyLink, .viewer .tiddlyLinkExisting, .viewer .externalLink{border-bottom:1px solid transparent;border-top:1px solid transparent;color:[[ColorPalette::TertiaryDark]];}
.tiddlyLink:hover, .tiddlyLinkExisting:hover, .externalLink:hover{color:[[ColorPalette::SecondaryMid]];background:transparent;border-bottom-color:[[ColorPalette::SecondaryPale]];border-top-color:[[ColorPalette::SecondaryPale]];}
.block .tiddlyLink, .remind .tiddlyLink{padding: 0 3px;}
.block .tiddlyLink,
table.linkTable .tiddlyLinkExisting, table.linkTable .externalLink{display:block;padding-left:0.7em;}
table.linkTable .tiddlyLinkExisting{text-decoration:none;}
.block .tiddlyLink:hover,.remind .tiddlyLink:hover,
table.linkTable .tiddlyLinkExisting:hover, table.linkTable .externalLink:hover{}
.remind{padding:2px 5px;border:3px solid transparent;-moz-border-radius:3px; -webkit-border-radius:3px;}
.remind:hover{background:#f6f6f6;border-color:#f6f6f6;}

.vTabs .tabset {float:left;display:block;padding:0px;margin-top:5px;min-width:15%;}
.vTabs .tabset .tabset {margin-top:0px;}
.vTabs .tabset .tabSelected {color:[[ColorPalette::SecondaryDark]];background:[[ColorPalette::TertiatyMid]];font-weight:bold;text-decoration:underline;}
.vTabs .tabset .tab {display:block;text-align:right;padding:2px 5px; margin:0 1px 1px 0;background:transparent;border:0;color:[[ColorPalette::SecondaryMid]];}
.vTabs .tabset .tab:hover {background:[[ColorPalette::SecondaryMid]];color:[[ColorPalette::Background]];}
.vTabs .tabContents {margin-left:15%;max-width:85%;padding:0 10px 5px 10px;background:transparent;border:none;border-left:1px solid [[ColorPalette::TertiaryLight]];}

#annowrap {padding:0;margin:0;border:0;}
#annowrap .popup{display:block;min-width:100px;max-width:300px;font-size:100%;}
#annowrap .popup br {display:block !important;}
#annowrap .popup h1, .anno .popup h2{color:[[ColorPalette::TertiaryLight]];}
.annosub{cursor:pointer;padding:0px 1px 0px 3px;}
.annosub span{padding:0px 1px 0px 3px;}
.annosubover{color:[[ColorPalette::SecondaryDark]];cursor:pointer;}
.annosubover span{background-color:[[ColorPalette::SecondaryPale]];padding:0px 1px 0px 3px;}

.desk .annosub {color:[[ColorPalette::TertiaryDark]];}
.desk .view {display:block;float:left;padding:0 5px;}
.desk table .button{padding:1px 3px;border-color:transparent;font-weight:bold;}
.desk .block .noborder td{padding:0 1px 0 0;}
.desk .block .quickopentag .tiddlyLink{padding:1px 1%;width:92%;float:left;}
.desk .block .miniTags .button, .desk .block .quickopentag .button{width:4%;padding:1px 1%;text-align:center;float:left;font-size:14px;}
.desk .block .miniTags .button{width:96%;float:left;font-size:10px;}
.deskNew span{display:inline-block;width:75px;}
.miniTags .button{margin:0 2px;border:0;}
.topMenu .pL .button{padding-left:25px;}
.topMenu .pR .tiddlyLink{padding-right:25px;}
.viewer .marked {padding:0 2px;}
#tbHelp .tabContents{min-height:150px;}

@media print{
#topMenu, #topMenuR, #tiddlersBar{display: none ! important;}
.headerShadow{visibility: hidden ! important;}
.tiddler{border-style: none ! important;margin:0px ! important;padding:0px ! important;padding-bottom:2em ! important;}
.tagglyTagging .button, .tagglyTagging .hidebutton{display: none ! important;}
.tagglyTagged .quickopentag, .tagged .quickopentag{border-style: none ! important;}
.quickopentag a.button, .miniTag{display: none ! important;}
}

/* get user styles specified in StyleSheet */
[[StyleSheet]]
/*}}}*/
|linkTable|k
|width:400px; !by modified date |width:400px; !by date created |
|vertical-align:top;padding-left:20px;<<timeline "modified">>|vertical-align:top;padding-left:20px;<<timeline "created">>|
<<toggleSideBarTB left show>>|<<popup ★ [[<<tiddler topMenuL##star$))]]>>|[[desk|desk]]|<<popup journal [[<<tiddler topMenuL##journal$))]]>>|<<popup new [[<<tiddler topMenuL##new$))]]>>|<<popup next [[<<tiddler topMenuL##next$))]]>>|<<popup calendar [[<<tiddler topMenuL##calendar$))]]>>|{{pR{[[+|QuickNotes]]}}}/%
!star
{{menuH{list of starred tiddlers}}}
<<tiddlerList tags:"star" itemTemplate:"*%0 \n" -modified">>
!next
{{menuH{list of next actions}}}
<<tiddlerList tags:"#next" itemTemplate:"*%0 \n" -modified">>
!calendar
{{menuH{this month's [[calendar]] & list of [[reminders|reminder]]}}}
<<tiddler calendar>>
!journal
<<tiddlerList tags:"journal" top:"10" dateFormat:"ddd. 0DD" itemTemplate:"*[[%created - %title|%title]] \n" group:"tiddler.created.formatString('YYYY, MMM')" groupTemplate:"!!!%group \n" order:"-created">>
{{menuH{[[journal]] options}}}
*<<newJournal "YYYY-0MM-0DD" label:"write new article" focus:title prompt:"Write a new journal entry for today" tag:journal>>
*[[see all articles|journal]]
!new
{{menuH{add new content...}}}
*[[new quick note|QuickNotes]]
*<<newTiddler label:"new tiddler">>
*<<newTiddler label:"new next action" title:"new action" prompt:"create a new next action" focus:title tag:#next>>
*<<newTiddler label:"new active project" title:"new project" prompt:"create a new active project" focus:title tag:$active>>
*<<newJournal "YYYY-0MM-0DD" label:"new journal entry" focus:title prompt:"Write a new journal entry for today" tag:journal>>
*<<newTiddler label:"new reminder" title:"new reminder" prompt:"create a new reminder" focus:title tag:reminder text:{{store.getTiddlerText("templateNewReminder")}}>>
----
*<<newTiddler label:"new reference" title:"new reference" prompt:"create a new reference" focus:title tag:reference>>
*<<newTiddler label:"new action type" title:"#new action type" prompt:"create an action type" focus:title tag:action>>
*<<newTiddler label:"new project type" title:"$new project type" prompt:"create a new project type" focus:title tag:project>>
*<<newTiddler label:"new project stage" title:"§new project stage" prompt:"create a new project stage" focus:title tag:stage>>
*<<newTiddler label:"new contact group" title:"?new contact group" prompt:"create a new contact group" focus:title tag:contact>>
*<<newTiddler label:"new context" title:"@new context" prompt:"create a new context" focus:title tag:context>>
*<<newTiddler label:"new area" title:"&new area" prompt:"create a new area" focus:title tag:area>>
!end%/
{{pL{<<closeAll>><<rB x>>}}}[[help]]|<<popup options [[<<tiddler topMenuR##options$))]]>>&nbsp;&nbsp;<<gotoTiddler  inputstyle:"display:inline;border:1px solid #ccc;padding:0px;width:150px;z-index:0;margin-left:5px;" liststyle:"display:block;position:absolute;right:2.5em;top:1.7em;z-index:10;border:1px solid #ccc;padding:0;width:auto;display:none;">><<toggleSideBarTB right show>>/%
!options
*<<permaview>>
*<<saveChanges save>>
----
*[[archive]]
*[[reference]]
*[[quick-notes|QuickNotes]]
*[[x-tab config]]
*[[x-tagger config]]
----
*[[more options...|options]]
!end%/
<html><iframe src="http://www.twittergadget.com/gadget.asp"></iframe></html>
/***
|''Name:''|x-plore|
|''Description''|Explore tiddler relations|
|''Version:''|0.1|
|''Type''|macro|
|''Author:''|[[TobiasBeer]]|
|''Source:''|http://tbGTD.tiddlyspot.com/#x-plore|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Note''|idea and parts of the code have their roots in [[RelatedTiddlersPlugin|http://tiddlytools.com/#RelatedTiddlersPlugin]]|
!important
<<tiddler 'under development'>>
!configuration
Use the following sections in [[x-plore]] to define elements...
*not to be explored via ''exclude''
*to be cut of via ''truncate''
!exclude
star
!truncate
excludeLists
systemConfig
TAG==site
!help
<<tiddler {{t='x-plore info';store.getTiddler(t)?t:'x-plore::helplink'}}>>/%
helplink:For more information see or import [[x-tab info]] from [[tbGTDServer]]...
%/
!source code
***/
//{{{
config.macros.xplore={
skipped:' ...',
lblBtn:'x-plore'+(document.all?"▼":"▾"),
topBtn:'Explore tiddler relations',
lblTagging:'!!tagged by',
lblTags:'!!tagging to',
lblRefs:'!!referenced by',
lblLinks:'!!linking to',
styles:
	'#popup #xplore div {text-decoration:none;padding:7px;min-width:136px;_width:180px;}'+
	'#popup #xplore div a {padding:2px;white-space:nowrap;font-weight:normal;display:block;}'+
	'#popup #xplore blockquote {padding-left:3px;margin:0;}'+
	'#popup #xplore blockquote blockquote {border-left:1px solid #333;margin:0 0 0 10px;}'+
	'#popup #xplore blockquote a {_width:90%;}'+
	'#popup #xplore h2 {border:0;margin-top:0.5em;}'+
	'#popup #xplore td {border:1px solid transparent !important;padding: 0 5px 5px 5px !important;}'+
	'#popup #xplore td:hover{border:1px solid #333 !important;}'+
	'#popup #xplore div br {display:none;}',
handler:function(place,macroName,params,wikifier,paramString,tiddler){
	var p,btn,cls,ex,fst,min,mode,tb,tid,tit,tree,trunc,r;
	tid=story.findContainingTiddler(place);
	tit=tid?tid.getAttribute('tiddler'):'';
	p=paramString.parseParams(null,null,true);
	btn=getParam(p,'button','')=='true';
	tb=getParam(p,'toolbar','')=='true';
	if(btn&&tit){
	btn=createTiddlyButton(place,this.lblBtn,this.tipBtn,this.click,"button","xploreBtn");
	btn.setAttribute('tiddler',tit);
	btn.setAttribute('params',paramString);
	if(tb)btn.setAttribute('toolbar',true);
	return;
	}
	fst=getParam(p,'first',tit);
	cls=getParam(p,'class','');
	tree=getParam(p,'tree','true')=='true';
	var getArr=function(prm){//retrieve array from tiddler text
	var a=getParam(p,prm,'').readBracketedList(),f=a[0],i,i1,t,x,s=[];
	if(f&&f.substr(0,5).toUpperCase()=='GET=='){
	t=store.getTiddlerText(f.substr(5));
	if(s){
	a=t.readBracketedList();
	for(i=0;i<a.length;i++){
		f=a[i];
		if(f&&f.substr(0,5).toUpperCase()=='TAG=='){
			a.splice(i,1);
			x=store.getTaggedTiddlers(f.substr(5));
			for(i1=0;i1<x.length;i1++)s.pushUnique(x[i1].title);
		}
	}
	for(i=0;i<s.length;i++)a.pushUnique(s[i]);
	a.sort();
	}
	}return a;
	}
	ex=getArr('exclude');
	trunc=getArr('truncate');
	r=getParam(p,'root','')=='true';
	min=getParam(p,'minimal','')=='true';
	mode=getParam(p,'mode','');
	if(mode!=''){
	if(this['get'+mode]==undefined)mode='Tagging';
	wikify(this['lbl'+mode]+'\n'+this.list(fst,tree,trunc,ex,this['get'+mode],r,min),place);
	}else{
	wikify('|'+cls+'|k\n|||||',place);
	var tds=place.lastChild.getElementsByTagName('td');
	wikify(this.lblTagging+'\n'+this.list(fst,tree,trunc,ex,this.getTagging,r,min),tds[0]);
	wikify(this.lblTags+'\n'+this.list(fst,tree,trunc,ex,this.getTags,r,min),tds[1]);
	wikify(this.lblRefs+'\n'+this.list(fst,tree,trunc,ex,this.getRefs,r,min),tds[2]);
	wikify(this.lblLinks+'\n'+this.list(fst,tree,trunc,ex,this.getLinks,r,min),tds[3]);
	}
},
list:function(first,asTree,trunc,ex,get,r,min){
//first: tree root tid, asTree: tree <> list, trunc: [[tids]] [[limiting]] the tree
//ex: exclude tagged tids, r: display root, min: true=min spanning tree <> false=multiple pathes for 'nodes'
//get: fct getXYZ(tiddlerObj){return arrayOfTiddlerTitles;}
//    ...possibly one of getLinks, getRefs, getTags, getTagging (see below)
	var out,tids=[],tree={text:''},indent='',paths=min?undefined:[];//init sublists []
	tids=this.search(first,tids,tree,indent,trunc,ex,get,r,paths);//start recursion
	setStylesheet(this.styles,'xploreStyles');
	out= '{{xploreList{\n';
	if(asTree)out+=tree.text;//when tree return tree
	else if(tids.length>0)out+='[[' + tids.join(']][[')+']]';//when list, join as links
	return out+'}}}';
},
search: function(tid,tids,tree,indent,trunc,ex,get,r,paths,p,fst){
//trunc, ex, get, r, paths: dito
//tid: start tid, tids: searched tids[], tree: output tree 
//indent: curr indent lvl, paths: all found paths[],p: current path in paths
	var t=store.getTiddler(tid);//root tid of branch
	var ini=false;
	var b=(paths!=undefined); //multiple paths
	if(b&&p==undefined){//if so and sublist not paths
		p=0;paths[p]=[];ini=true; //init pointer, sublist and store init
	}
	if(fst==undefined)fst=tid;//check & store fst
	//return curr list, if missing, excluded via tag or already in (sub-)list
	if(!t||tid==fst&&tids.length>0||t.tags.containsAny(ex)||b&&paths[p].contains(t)||!b&&tids.contains(tid))return tids;
	//if not init of multiple paths or rootnode to be displayed... add to sublist
	if(!ini||r){
		if(b)paths[p].push(t);
		tids.push(t.title); //add tiddler to results
		var skip=trunc&&trunc.contains(tid); //skip when in truncated
		tree.text+=indent+"[["+tid+(skip?this.skipped.format([tid]):"")+"|"+tid+"]]"+"\n";
		if(skip)return tids; // branch is pruned... don't follow links
	}
	var links=get?get(t):this.getTagging(t);//get next level via get fct or links
	//init subpaths by copying the current one
	if(b)for(var i=1;i<links.length;i++)paths[p+i]=paths[p].slice(0);
	for(var i=0; i<links.length; i++)//search subnodes
	tids=this.search(links[i],tids,tree,indent+">",trunc,ex,get,r,paths,(p?p+i:p),fst);
	return tids;//return list
},
getLinks:function(t){if(!t.linksUpdated)t.changed(); return t.links;},
getRefs:function(t){
	var i,o=[],r=store.getReferringTiddlers(t.title);
	for(i=0;i<r.length;i++)if(r[i].title!=t.title)o.push(r[i].title);
	return o;
},
getTags:function(t){return t.tags;},
getTagging:function(t){
	var o=[],l=store.getTaggedTiddlers(t.title);
	for(var i=0;i<l.length;i++)if(l[i].title != t)o.push(l[i].title);
	return o;
},
click:function(e){
	e=e||window.event;
	var p=Popup.create(this);
	wikify('<<xplore first:\''+this.getAttribute('tiddler')+'\''+this.getAttribute("params")+' >>',createTiddlyElement(p,'span','xplore','xplore'));
	Popup.show(p,false);
	s=document.getElementById('sidebar');
	if(this.getAttribute('toolbar')){p.style.left='';p.style.right=(20+(s?s.offsetWidth:0))+'px';}
	e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();
	return false;
}
}
//}}}
/***
<<xtab defaults:true>>
|''Name''|x-tab|
|''Description''|a crosstable for tags|
|''Version''|1.0|
|''Type''|macro|
|''Author''|[[TobiasBeer]]|
|''Source''|http://tbGTD.tiddlyspot.com/#x-tab|
|''Documentation''|http://tbGTD.tiddlyspot.com/#%5B%5Bx-tab%20info%5D%5D|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
!Code
***/
//{{{
setStylesheet('.xtabBtn{cursor:pointer}'+
'.xtab{margin:5px 0 20px 0;background:#F6F6F6;padding:10px;border:5px solid #EEE;-moz-border-radius:5px;-webkit-border-radius:5px;}'+
'.xtabFrm td{vertical-align:bottom;height:30px;margin-right:10px !important;}'+
'.xtabFrm em{margin-left:10px;font-style:normal;color:#39C;font-weight:bold;font-size:90%;}'+ 
'.xtabFrm input{margin-left:10px;}.xtabFrm input,.xtabFrm span{cursor:pointer;}.xtabFrm .externalLink{margin-left:10px;}'+
'.xtabFrm select{padding-right:0 !important;width:210px;cursor:pointer;float:right;}'+
'.xtabFrm xtabToggle{display:inline-block;width:65px;text-align:center;cursor:pointer;margin-right:10px;}'+
'.xtabPrv{color:#888;margin:5px 0 10px 50px;display:block;}.xtabPrv span{color:#39C;}'+
'.xtabOut {max-width:100%;overflow-y:hidden;}'+
'.viewer .xtabOut .button{margin:0;}','StyleSheetGTDxLookup');
//}}}
//{{{
config.macros.xtab={
cfg:{
	//defaults: 0=taglist, 1=presetlist, 2=autodetect-config, 3=preset
	defaults:['x-tab config##Tags','x-tab config##Presets','x-tab config##Detect','xtab'],
	dropClass:'button',
	resultTabClass:'',
	miniTag:'<<tiddler scripts##miniTag with: [[%0]]>>',
	addNew:true,
	headerRightFrom:10,
	//preset identifiers
	pRows:'rows',
	pCols:'cols',
	pSec:'snd',
	pOps:'options',
	pOpAL:'ALLTAGS!',
	pOpSR:'1row',
	pOpSC:'1col',
	pOpTR:'transpose',
	//language
	info:'info',
	btnShow:"x-tab",
	btnHide:"hide x-tab",
	btnTip:"toggle x-tab panel",
	template:"preset template... ",
	noTags:"No valid tags provided for x-tab. ",
	nOkTags:"Invalid taglist for x-tab! '%0' could not be found.",
	nOkPresets:"Invalid presets for x-tab! '%0' could not be found.",
	nOkPreset:"Invalid x-tab preset! No option '%0' in dropdown '%1'. Check your custom fields or parameters.",
	nOkRender:"Could not render x-tab into %0. No such dom-element!",
	nOkDetect:"Invalid x-tab parameter '%0' for 'detect'!",
	nOkField:"x-tab can't find field '%0' for tiddler '%1'.",
	nDef:"undefined",
	P:["preset:","select a preset","select preset..."],
	R:["rows:","select a category tag for rows","select rows tag..."],
	C:["columns:","select a category tag for columns","select columns tag..."],
	S:["secondary:","select secondary for rows (first select a tag-category for rows)","select secondary..."],
	TR:["transpose","click to swap rows and columns"],
	SR:["1row","use the tag in 'rows' or 'secondary' directly instead of its subtags"],
	SC:["1col","use the tag in 'columns' directly instead of its subtags"],
	AL:["all tags","use all available tags for dropdowns"],
	PT:["template","provides a template which you can use to add to your list of preset definitions"]
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
	this.cfg.drop=document.all?"▼":"▾";
	var el,id,ps=paramString,b=params[0];
  id=new Date().getTime()+(''+Math.random()).substr(5);
  if(b&&b.toUpperCase().indexOf('BUTTON')==0){//button must be first!
		el=createTiddlyButton(place,this.cfg.btnShow+this.cfg.drop,this.cfg.btnTip,this.toggle,'button xtabBtn');
		jQuery(el).attr({'tiddler':b.substr(7),'params':ps,'xtabid':id});//set tiddler for button@tiddler
	}else this.create(id,ps,place);
},
toggle:function(e){
	var c,f,h=false; //h=hide, f=form, x=macro
	x=config.macros.xtab,c=x.cfg;
	f=document.getElementById('xtab'+this.getAttribute('xtabid')||'');
	if(f){//form exists -> toggle
		h=f.style.display!='none';
		f.style.display=h?'none':'block';
	}else x.create(this);
	this.innerHTML=(h?c.btnShow:c.btnHide)+c.drop;
	return false;
},
update:function(id){
	var a1,a2,al,by,c,chk,cols,d1,d2,el,f,hc,hd,hd2='',hr,nu,o,out='',pr,rows,sc,sr,snd,t,ti,t1,t2,tr,v,v1,v2,x=config.macros.xtab,c=x.cfg;
	by=function(i){return document.getElementById(i);}
	f=by('xtabFrm'+id);el=by('xtabOut'+id);pr=by('xtabPrv'+id);
	removeChildren(el);removeChildren(pr);
	sr=by('SR'+id).checked;
	sc=by('SC'+id).checked;
	tr=by('TR'+id).checked;
	al=by('AL'+id).checked;
	snd=by('snd'+id);
	cols=by('cols'+id);
	rows=by('rows'+id);
	d1=snd.selectedIndex>0?snd:by('rows'+id);
	d2=by('cols'+id);
	if(tr){v=d1;d1=d2;d2=v;}
	v1=d1.selectedIndex==0?null:d1.value;
	v2=d2.selectedIndex==0?null:d2.value;
	if(v1&&v2){
		a1=sc&&tr?[store.getTiddler(v1)]:(sr&&!tr?[store.getTiddler(v1)]:store.getTaggedTiddlers(v1));
		a2=sc&&!tr?[store.getTiddler(v2)]:(sr&&tr?[store.getTiddler(v2)]:store.getTaggedTiddlers(v2));
		hc='\u25bc'+v1;if(sc&&tr||sr&&!tr)hc='';
		hr=v2+'\u25b6';if(sr&&tr||sc&&!tr)hr='';
		hd='"""'+(hc&&hr?hc+'/ '+hr:(hc?hc:hr))+'"""';
		if(a2.length>=c.headerRightFrom){hr=hr?'\u25C0'+v2:'';hd2='"""'+(hc&&hr?hr+'/ '+hc:(hc?hc:hr))+'"""';}
		out='|'+c.resultTabClass+'|k\n| '+hd;
		for(t2=0;t2<a2.length;t2++){
			ti=a2[t2].title;
			nu=c.addNew?tbGTD.nu(ti):'';
			out+=' | '+nu+'<<tag [['+ti+']]>>';
		}out+=(hd2!=''?'|'+hd2:'')+' |h\n';
		for(t1=0;t1<a1.length;t1++){
			ti=a1[t1].title;
			nu=c.addNew?tbGTD.nu(ti):'';
			hd='<<tag [['+ti+']]>>';
			out+='| !'+nu+hd;
			for(t2=0;t2<a2.length;t2++){
				out+='|'
				tgt=store.getTaggedTiddlers(a1[t1].title);
				for(t=0;t<tgt.length;t++){
					if(tgt[t].tags.contains(a2[t2].title)){
						ti=tgt[t].title;out+='@@margin:0;<<tag [['+ti+']]>>'+c.miniTag.format([ti])+'@@<br />';
					}
				}
			}
			out+=(hd2!=''?'|'+hd+' ':'')+'|\n';
		}
  	//preset template
  	if(by('PT'+id).checked){
			chk=function(s){return s.indexOf(' ')>=0?"'"+s+"'":s;};
			o=sr||sc||tr;
			o=o?c.pOps+':'+
			(sr?c.pOpSR:'')+
			(sc?(sr?'&':'')+c.pOpSC:'')+
			(tr?(sr||sc?'&':'')+c.pOpTR:''):'';
			v=snd.value;v=snd.selectedIndex==0?'':v;v1=rows.value;v2=cols.value;
			wikify(c.template+'@@font-weight:bold;'+(al?c.pOpAL:'')+chk(v)+' '+chk(v1)+' by '+chk(v2)+'=='+
				c.pRows+':'+chk(v1)+' ' + (v?c.pSec+':'+chk(v)+' ':'') + c.pCols+':'+chk(v2)+' '+chk(o)+'@@',pr);
		}
	}
	//create output
	wikify(out,el);
},
create:function(id,ps,el,setAll){
	var a,all,at,c=this.cfg,cr,cs,d,dc,dt,f,fs,gd,i,p,pls,pos,pr,prs,rt,sp,src,t,ti,tid,tids=[],td,tds,tgs=[],tmp,tls,xel=false;
	if(typeof(id)=='object'){
		rt=id;
		tmp=id.getAttribute('tiddler');
		if(tmp=='')el=story.findContainingTiddler(id);//into this tid
		else{
			xel=tmp.toUpperCase().indexOf('ID==')==0;
			el=xel?document.getElementById(tmp.substr(4)):story.getTiddler(el);//into id or named tiddler 
		}
		if(!el)alert(c.nOkRender.format([tmp]));
		else{
			tid=el.getAttribute('tiddler');
			if(!xel)el=jQuery('.viewer',el)[0];//if tid, render in viewer
			//get attribs
			ps=id.getAttribute('params');
			id=id.getAttribute('xtabid');
		}
	}
	if(!tid){tid=story.findContainingTiddler(el);if(tid)tid=tid.getAttribute('tiddler');}
	p=ps.parseParams(null,null,true);//get params
	def=getParam(p,'defaults','').toUpperCase()=='TRUE';
	tls=getParam(p,'taglist');if(!tls&&def&&c.defaults[0])tls=c.defaults[0];
	pls=getParam(p,'presets');if(!pls&&def&&c.defaults[1])pls=c.defaults[1];
	dt=getParam(p,'detect','');if(!dt&&def&&c.defaults[2])dt=c.defaults[2];
	pr=getParam(p,'preset','');if(!pr&&def&&c.defaults[3])pr=c.defaults[3];
	pos=getParam(p,'position','').toUpperCase();
	all=pr.toUpperCase().indexOf(c.pOpAL)==0;
	if(all)pr=pr.substr(c.pOpAL.length);
	a=setAll||!tls||all&&setAll==undefined;
	if(a){//get tags
		tgs=store.getTags();
	}else{
		//init taglist
		if(tls){
			tgs=store.getTiddlerText(tls);
			if(!tgs)alert(c.nOkTags.format([tls]));
			else tgs=tgs.readBracketedList();
	  }
		if(tgs.length==0&&!a)alert(c.noTags);
	}
	//init presets
	if(pls){
		prs=store.getTiddlerText(pls);
		if(!prs)alert(c.nOkTags.format([pls]));
		else prs=prs.split('\n');
	}
	dc=c.dropClass;
	cr=createTiddlyElement;
	
	if(setAll==undefined){
		sp=document.createElement('span');//render container
		if(pos=='FIRST')el.insertBefore(sp,el.firstChild);
		else if(!xel&&rt&&pos!='LAST')el.insertBefore(sp,rt.nextSibling);
		else el.appendChild(sp);
	}else sp=el;
	el=cr(sp,'div','xtab'+id,'xtab');//div
	f=cr(el,'form','xtabFrm'+id,'xtabFrm');//form
	f.setAttribute('params',ps);
	wikify('|borderless|k\n|||>|\n||||\n',f);
	tds=f.lastChild.getElementsByTagName('td');
	
	td=tds[1];this.nuSel(tds[0],'presets',prs,c.P,'P',dc);
	cs=[['PT','tmpl'],['TR','trans'],['SR','oner'],['SC','onec'],['AL','allt',a]];
	for(i=0;i<cs.length;i++)this.nuChk(td,cs[i][0]+id,cs[i][1],c[cs[i][0]],dc,cs[i][2]);
	createExternalLink(td,store.getTiddlerSlice("x-tab","Documentation"),c.info);
	this.nuSel(tds[2],'rows',tgs,c.R,a?'A':'R',dc,id);
	this.nuSel(tds[3],'snd',[],c.S,'S',dc,id);
	this.nuSel(tds[4],'cols',tgs,c.C,a?'A':'C',dc,id);
	cr(el,'div','xtabPrv'+id,'xtabPrv');
	cr(el,'div','xtabOut'+id,'xtabOut');
	
	if(pr.indexOf(':')<=0){//preset from field(@tid)
		at=pr.indexOf('@');
		if(at>0){
			ti=pr.substr(at+1);
			tid=store.getTiddler(ti);
			pr=pr.substr(0,at);
			if(!tid)alert(c.nOkField.format([pr,ti]));
			else tid=tid.title;
		}
		pr=store.getValue(tid,pr);
	}
	if(tid&&dt&&!pr)pr=this.detect(dt,tid);//Autodetect
	this.setPreset(id,pr,setAll);
	return id;
},
nuChk:function(el,cid,n,t,cl,c){
	var bt,cb;
	cb=createTiddlyElement(el,'input',cid,null,null,{'type':'checkbox','name':n,'value':t[0]});
	cb.checked=c?c:false;
	cb.onclick=this.check;
	bt=createTiddlyElement(el,'span',null,cl+' xtabToggle',t[0],{'title':t[1],'toggle':cid});
	bt.onclick=this.check;
	return(cb);
},
check:function(e){
	var c,el,f,id,ns,p,x=config.macros.xtab,ps;
	c=document.getElementById(this.getAttribute('toggle'));
	if(c)c.checked=!c.checked;
	el=c?c:this;
	id=el.getAttribute('id').substr(2);
	if(el.name=='allt'){
		c=el.checked;f=el.form;
		el=f.parentNode;p=el.parentNode;
		ps=f.getAttribute('params');
		removeChildren(el);p.removeChild(el);
		x.create(id,ps,p,c);
	}else x.update(id);
},
nuSel:function(el,n,o,t,typ,c,id){
	createTiddlyElement(el,'em',null,null,t[0]);
	var s=createTiddlyElement(el,'select',n+id,c,null,{'name':n,'title':t[1]});
	s.onchange=this.chgSel;
	this.setOpt(s,o,null,typ,t[2]);
},
setOpt:function(el,o,val,typ,title){
	if(val&&el.getAttribute('cat')==val)return;
	var i,l,os;
	l=o?o.length:0;
	os=el.options;
	el.disabled=l==0;
	while(os.length>1)os[os.length-1]=null;
	os[0]=new Option(title,null,false,false);
	if(l){
		for(i=0;i<l;i++){
			var t=o[i];
			switch(typ){
			case 'P':t=t.split('==');n=t[0];v=t[1];break;
			case 'A':n=v=t[0];break;
			case 'S':t=t.title;
			default:n=t;v=t;
			}
			os[os.length]=new Option(n,v,false,false);
		}
	}
},
chgSel:function(e){
	var x=config.macros.xtab,id=this.form.getAttribute('id').substr(7);
	switch(this.name){
	case 'presets':if(this.selectedIndex>0)x.setPreset(id,this.value);break;
	case 'rows':x.initSecondary(id);
	default:x.update(id);
	}
},
initSecondary:function(id){
	var s,r,tgt,v;
	r=document.getElementById('rows'+id);
	v=r.value;
	s=document.getElementById('snd'+id);
	tgt=r.selectedIndex>0?store.getTaggedTiddlers(v):[];
	this.setOpt(s,tgt,v,'S',this.cfg.S[2]);
	s.setAttribute('cat',v?v:'');
},
setPreset:function(id,pr,setAll){
	var chk,f,l,ls,o,p,x,c=this.cfg,u=c.nDef;
	if(pr){
		f=document.getElementById('xtabFrm'+id);
		p=pr.parseParams(null,null,false);
		ls=[
			['rows',getParam(p,c.pRows,u),c.pRows],
			['cols',getParam(p,c.pCols,u),c.pCols],
			['snd',getParam(p,c.pSec),c.pSec]
		];
		document.getElementById('snd'+id).selectedIndex=0;
		for(l=0;l<ls.length;l++){if(ls[l][1]&&!this.chkSel(id,ls[l],f))return false;}
		o=getParam(p,c.pOps,'');
		x=function(n,s){document.getElementById(n+id).checked=o.indexOf(s)>=0};
		x('TR',c.pOpTR);x('SR',c.pOpSR);x('SC',c.pOpSC);if(setAll==undefined)x('AL',c.pOpAT);
	}
	this.update(id);
},
detect:function(t,tid){
	var a,d,l,n,ot,tgs,c=this.cfg;
	d=store.getTiddlerText(t);
	f=[c.pRows+':[[%0]] '+c.pCols+':[[%1]]',
		c.pRows+':[[%0]] '+c.pCols+':[[%1]] '+c.pSec+':[[%2]] '+c.pOps+':'+c.pOpTR+'&'+c.pOpSR,
		c.pRows+':[[%0]] '+c.pCols+':[[%1]] '+c.pSec+':[[%2]] '+c.pOps+':'+c.pOpTR];
	if(!d)alert(c.nOkDetect.format([t]));
	else{
		a=d.split('\n');
		while(a.length>0){
			l=a.shift().readBracketedList();n=l.length;
			if(tid==l[0]){
				switch(n){
				case 3:return f[2].format([l[0],l[1],l[2]]);
				case 2:
				case 4:return f[0].format([l[0],l[1]]);
				}
			}else{
				ot=store.getTiddler(tid);
				if(ot.tags.contains(l[0])){
					switch(n){
					case 3:return f[2].format([l[0],l[1],tid]);
					case 2:
					case 4:return f[1].format([l[0],l[1],tid]);
					}
				}
			}
		}
	}
},
chkSel:function(id,a,f){
	var c='',o,s,t,v;
	s=document.getElementById(a[0]+id);v=a[1];
	if(s){
		o=s.options;
		for(t=1;t<o.length;t++){c=o[t].value;if(v==c){s.selectedIndex=t;break;}}
	}
	if(v!=c){alert(this.cfg.nOkPreset.format([v,a[2]]));return false;}
	if(a[0]=='rows')this.initSecondary(id);//reset secondary
	return true;
}
}
//}}}
!Tags
[[action]]
[[priority]]
[[context]]
[[project]]
[[stage]]
[[$active]]
[[area]]
[[realm]]
[[contact]]
[[journal]]
[[star]]
!Presets
starred actions==rows:action cols:star options:1col
starred projects==rows:project cols:star options:1col
starred contacts==rows:contact cols:star options:1col
action by priority==rows:action cols:priority
action by area==rows:action cols:area
context by action==rows:context cols:action
context by priority==rows:context cols:priority
context by area==rows:context cols:area
stages by action==rows:stage cols:action
stages by priority==rows:stage cols:priority
stages by context==rows:stage cols:context
active projects by action==rows:project snd:$active cols:action options:transpose
active projects by stage==rows:project snd:$active cols:stage options:transpose
active projects by context==rows:project snd:$active cols:context options:transpose
active projects by priority==rows:project snd:$active cols:priority options:transpose
someday projects by context==rows:project snd:$someday cols:context options:transpose
someday projects by priority==rows:project snd:$someday cols:priority options:transpose
projects by realm==rows:project cols:realm
contacts by priority==rows:contact cols:priority
contacts by action==rows:contact cols:action
contacts by priority==rows:contact cols:priority
contacts by context==rows:contact cols:context
contacts by area==rows:contact cols:area
!Detect
action context
context action
priority action
project action $active
stage action §0.kickoff transpose
area action
realm project
contact action
/***
|''Name:''|x-tagger|
|''Version:''|1.0 (2009-11-02)|
|''Source:''|http://tbGTD.tiddlyspot.com/#x-tagger|
|''Author:''|[[TobiasBeer]]|
|''Description:''|Provides a drop down listing current tags and others to be set.|
|''~TiddlyWiki:''|Version 2.5 or better|
***/
//{{{
setStylesheet(
	".xtagger li{display:block;float:left;padding-bottom:10px !important;}"+
	".xtagger li ol li{padding:0 5px 5px 5px !important;clear:both;min-width:120px;display:inline;border:1px solid transparent;}"+
	".xtagger li ol li:hover{border:1px solid #333;}"+
	".xtagger li ol li ol li{padding:1px 0 !important;}"+
	".xtagger li ol li ol li:hover{border:1px solid transparent;}"+
	".xtagger li a{display:inline;font-weight:bold;}.xtagger .tiddlyLink:hover{background:transparent;}"+
	".xtagger .quickopentag {width:82%;display:inline-block;}"+
	".xtagger .quickopentag .tiddlyLink {display:inline;}"+
	".xtagger .quickopentag .button {display:inline;border:0;padding:0 3%;text-align:center;width:10%;font-size:11px;}"+
	".xtagger a.button{padding:0;}"+
	".xtagger a.toggleButton {display:inline;padding:0 2px;margin-right:1px; font-size:110%;}"+
	".xtagger .title {font-weight:bold;font-size:150%;color:#CCC;}","StyleSheetxTagger");
//}}}
//{{{
config.macros.xtagger={
cfg:{
	mode:1,// 0 -> ask for substitution, 1 -> substitute (silent), >1 -> always add (silent)
	horizontal:false,//all in one row
	sidebarOffset:20,//dist from sidebar
	sideWidth:'180px',//width of sides
	topMarginSides:'10px',
	newAt:16,//new block each
	archive:'archive',//archive tag
	excludeTags:'',
	list:'true',
	arrow:document.all?"▼":"▾", //only the fat works in IE

	label:'Tags: ', //language settings
	options:'options',
	more:'more...',
	tooltip:'Manage tiddler tags',
	notags:'no tags set...',
	aretags:'current tags',
	txtRemove: 'remove tag',
	txtEdit:"edit categories...",
	txtEditTip:"edit tiddler with GTD tag categories used by x-tagger",
	txtNew:"add another tag",
	txtAdd:"set tag ",
	promptNew:"Enter new tag:",
	modeAsk:"Do also you want to remove tag '%1' and other tags from category '%2'?\nCancel simply adds tag '%3'."
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
	var c,click,ex,lbl,list,more,p,src,tip,x;
	x=config.macros.xtagger;c=x.cfg;
	p=paramString.parseParams('tagman',null,true);
	lbl=getParam(p,"label",c.label)+c.arrow;
	tip=getParam(p,"tooltip",c.tooltip);
	list=getParam(p,"taglist",c.list);
	ex=getParam(p,"exclude",c.excludeTags).readBracketedList();
	src=getParam(p,"source");if(src&&!store.getTiddlerText(src))return false;
	more=getParam(p,"more",'');
	click=function(e){
		e=e||window.event;
		var ar,d1,d2,i,curr,nuBtns,nuLi,m,max=nu=c.newAt,pop,s,t,tags=[],tids,tgt;		
		pop=Popup.create(this);
		addClass(pop,'xtagger');
		if(src){//mod tb:different method for source tiddler
			tids=store.getTiddlerText(src).readBracketedList();
			for(t=0;t<tids.length;t++){
				tgt=store.getTaggedTiddlers(tids[t]);
				tags.push('TAG:'+tids[t]);
				for(s=0;s<tgt.length;s++)tags.push(tgt[s].title);
			}
		}else tags=store.getTags();
		curr=tiddler.tags.sort();
		nuLi=function(p){return createTiddlyElement(createTiddlyElement(p,"li",null,null),"ol",null,null);}
		nuBtns=function(where,text,tag,pref){
			var s,t;
			s=createTiddlyElement(createTiddlyElement(where,"li"),"span",null,null);
			t=createTiddlyButton(s,text,pref+" '"+tag+"'",x.setTag,"button toggleButton", null);
			t.setAttribute("tiddler",tiddler.title);
			t.setAttribute("tag",tag);
			t.setAttribute("source",src);
			insertSpacer(s);
			if(window.createTagButton_orig_mptw)createTagButton_orig_mptw(s,tag);
			else createTagButton(s,tag);
		}
		d1=nuLi(pop);d2=nuLi(d1);if(c.topMarginSides)d1.style.marginTop=c.topMarginSides;
		createTiddlyElement(d2,"li",null,"title",(tiddler.tags.length==0?c.notags:c.aretags));
		for(t=0;t<curr.length;t++)nuBtns(d2,"[x]",curr[t],c.txtRemove);
		if(c.sideWidth)jQuery('li',d1).css('min-width',c.sideWidth);
		
		if(list!='false'){
			for(i=0;i<tags.length;i++){
				var ti=tags[i];nu++;
				if(ti.indexOf('TAG:')==0){ti=ti.substr(4);
					if(nu>max||c.horizontal){nu=0;d1=nuLi(pop);}d2=nuLi(d1);
					createTiddlyLink(createTiddlyElement(d2,"li",null,null),ti,ti,'title');
				}
				else if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
			}
		}
		
		//options
		d1=nuLi(pop);d2=nuLi(d1);createTiddlyElement(d2,'li',null,'title',c.options);
		if(c.topMarginSides)d1.style.marginTop=c.topMarginSides;
		var newBtn=createTiddlyButton(createTiddlyElement(d2,"li"),(c.txtNew),null,x.setTag);
		newBtn.setAttribute("tiddler",tiddler.title);
		var edit=createTiddlyButton(createTiddlyElement(d2,"li"),c.txtEdit,c.txtEditTip,onClickTiddlerLink); 
		edit.setAttribute("tiddlyLink",src.split('##')[0]);
		
		//archive
		ti=c.archive;
		if(ti){
			d2=nuLi(d1);createTiddlyLink(createTiddlyElement(d2,"li",null,null),ti,ti,'title');
			ar=store.getTaggedTiddlers(ti);
			for(i=0;i<ar.length;i++){var ti=ar[i].title;
				if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
			}
		}
		//more
		m=store.getTiddlerText(more).readBracketedList();
		if(m.length>0){
			d2=nuLi(d1);createTiddlyElement(d2,'li',null,'title',c.more);
			for(i=0;i<m.length;i++){var ti=m[i];
				if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
			}
		}
		if(c.sideWidth)jQuery('li',d1).css('min-width',c.sideWidth);

		Popup.show(pop,false);
		s=document.getElementById('sidebar');
		pop.style.left='';pop.style.right=(c.sidebarOffset+(s?s.offsetWidth:0))+'px';
		e.cancelBubble=true;
		if(e.stopPropagation)e.stopPropagation();
		return false;
	}	
	createTiddlyButton(place,lbl,tip,click,"button","xtaggerDrop");
},
setTag:function(e){
	var nu,r,s,src,t,tag,ti,tid,title,c=config.macros.xtagger.cfg;
	title=this.getAttribute("tiddler");
	src=this.getAttribute("source");
	tag=this.getAttribute("tag");
	tid=store.getTiddler(title);
	if(!tag){nu=prompt(c.promptNew,"");if(!nu)return false;else tag=nu;}
	if(!tid||!tid.tags)store.saveTiddler(title,title,'',config.options.txtUserName,new Date(),tag);
	else{
		if(!tid.tags.contains(tag)){
			if(store.getTiddlerText(src)){
				if(c.mode<2){
					var cats=store.getTiddlerText(src).readBracketedList();
findTagged:	for(t=0;t<cats.length;t++){
						ti=cats[t];
						var tgt=store.getTaggedTiddlers(ti);
						for(s=0;s<tgt.length;s++){
							if(tgt[s].title==tag){
								for(r=0;r<tgt.length;r++){
									if(tid.tags.contains(tgt[r].title)){
										var ok;
										if(c.mode==0&&!ok){
											if(!confirm(c.modeAsk.replace(/%1/,tgt[r].title).replace(/%2/,ti).replace(/%3/,tag)))break findTagged;
											ok=true;
										}
										store.setTiddlerTag(title,false,tgt[r].title);
									}
								}
								break findTagged;
							}
						}
					}
				}
			}
			store.setTiddlerTag(title,true,tag);
		}
		else if(!nu)store.setTiddlerTag(title,false,tag);
		story.saveTiddler(title);
	}
}
}
window.onClickTag=function(e){
	if(!e)var e=window.event;
	var nested=true;
	var tgt=resolveTarget(e);
	var cw=document.getElementById("contentWrapper");
	while(tgt!= null){if(cw==tgt)nested=false;tgt=tgt.parentNode;}
	if((Popup.stack.length>1)&&nested)Popup.removeFrom(1);
	else if(Popup.stack.length>0 && nested==false)Popup.removeFrom(0);
	var theId=(nested==false)?"popup":"nestedtagger";
	var pop=createTiddlyElement(document.body,"ol",theId,"popup",null);
	Popup.stack.push({root:this,popup:pop});
	var tag=this.getAttribute("tag");
	var title=this.getAttribute("tiddler");
	if(pop&&tag){
		var tgt=store.getTaggedTiddlers(tag);
		var titles=[];
		for(var r=0;r<tgt.length;r++)if(tgt[r].title!=title)titles.push(tgt[r].title);
		var lingo=config.views.wikified.tag;
		if(titles.length>0){
			var openAll=createTiddlyButton(createTiddlyElement(pop,"li"),lingo.openAllText.format([tag]),lingo.openAllTooltip,onClickTagOpenAll);
			openAll.setAttribute("tag",tag);
			createTiddlyElement(createTiddlyElement(pop,"li"),"hr");
			for(r=0; r<titles.length; r++)createTiddlyLink(createTiddlyElement(pop,"li"),titles[r],true);
		}else{createTiddlyText(createTiddlyElement(pop,"li",null,"disabled"),lingo.popupNone.format([tag]));}
		if(this.getAttribute('showOpenTag')){
			createTiddlyElement(createTiddlyElement(pop,"li"),"hr");
			var h=createTiddlyLink(createTiddlyElement(pop,"li"),tag,false);
			createTiddlyText(h,lingo.openTag.format([tag]));
		}
	}
	Popup.show(pop,false);
	e.cancelBubble=true;
	if(e.stopPropagation)e.stopPropagation();
	return(false);
}
//}}}
!Notes
These sections define the categories used by [[x-tagger]] and the MainMenu. If a lower item is directly tagging to an upper item it will be ignored by the MainMenu, e.g. [[$active]]. Tags under the section ''More'' will be shown in the corresponding section in tagger. For more configuration options, look at the beginning of [[x-taggers sourcecode|x-tagger]].
!Tags
[[action]]
[[priority]]
[[context]]
[[project]]
[[stage]]
[[$active]]
[[area]]
[[realm]]
[[contact]]
!More
[[help]]
[[journal]]
[[reference]]
[[systemConfig]]
[[systemConfigDisable]]
[[excludeLists]]
[[excludeMissing]]
[[excludeSearch]]
[[noCloud]]
//{{{
//shortcuts
var c=config;
var co=c.options;
var cc=c.commands;
var cm=c.macros;
var cv=c.views;

//adopted from mptwConfig
readOnly=false;
showBackstage=true;
cv.editor.tagChooser.text='tags...';
co.txtTheme='tbGtdTheme';
//no msg when no tiddler
cv.wikified.defaultText="";
//no text for a new tiddler
cv.editor.defaultText="";
//tab as tab when editing
co.chkInsertTabs=true;
//visitors can edit
co.chkHttpReadOnly=false;
co.chkSaveBackups=true;
//backups in this folder
co.txtBackupFolder='twbackup';
//autosave when local
co.chkAutoSave=(window.location.protocol=="file:");
co.chkHideTabsBarWhenSingleTab =true;
co.chkTOCIncludeHidden=true;
co.chkDisplayWeekNumbers=true;
co.txtPrettyDates='pppp';
co.chkAnimate=false;
co.chkSinglePagePermalink=true;
co.txtLastShared='tbGTD:::http://tbGTD.tiddlyspot.com';
merge(cm.toolbar,{moreLabel:'+',lessLabel:'-'});
merge(c.messages.backstage,{open:{text:''},close:{text:''}});
//see ViewTemplate
c.mptwDateFormat='YYYY-0MM-0DD';c.mptwJournalFormat='YYYY-0MM-0DD';

//language settings
c.glyphs.codes.star=["\u22C6","\u22C6"];
cc.syncing.text="sync";
cc.references.text="ref";
cc.permalink.text="url";
var show="Show an URL in the brower address bar that ";
cc.permalink.tooltip=show+"links to the currently displayed tiddler";
cm.permaview.prompt=show+"retrieves all the currently displayed tiddlers";
cm.permaview.label="permalink";
cm.list.missing.prompt="referenced without tiddler:\n";
cm.list.orphans.prompt="tiddlers without reference:\n";
cm.list.shadowed.prompt="default shadow tiddlers:\n";
cm.option.passwordCheckboxLabel="save on this computer";

//refresh command -> for toolbar (force=true)
cc.refreshTiddler={
 text:'refresh',tooltip:'Refresh this tiddler',
 handler:function(e,src,title){clearMessage();story.refreshTiddler(title,false,true);return false;}
}

//rename buttons
cm.rB={handler:function(place,macroName,params,wikifier,paramString,tiddler){
  if(place.lastChild.tagName!="BR"){
    var p1=params.shift().split("#");
    var name=p1[0];
    var id=p1[1];
    var title=params[0];
    el=place.lastChild;
    if(el.tagName.toUpperCase()!="A")el=el.firstChild;
    el.firstChild.data=name;
    if(id)el.setAttribute('id',id);
    if(title)el.title=title;
  }
}}

//shortened splashscreen code
var tbRestart=window.restart;
window.restart = function(){
	var splash=document.getElementById('SplashScreen');
	if (splash) splash.style.display = "none";
	document.getElementById('contentWrapper').style.display = "block";
	tbRestart();
}

//fix ie styles
if(jQuery.browser.msie){setStylesheet('#topMenuR{top:4.55em !important;}','ieStyles');}

//DummyTiddlerHack
config.macros.dummy={handler:function(place,macroName,params,wikifier,paramString,tiddler){var t=params.shift();if(t)place.setAttribute('tiddler',t);}}
//}}}
Project kick-off notes link here...
Project definitions...
*goals and (measurable !) success criteria
*the system and it's environment boundaries and interfaces
Estimates regarding project requirements for...
*people
*time
*ressources
*finances
*opportunities, threats, strengths and weaknesses (swot)
Efforts to meet prerequisites, to aquire necessary data and information to get started...
The collection of design, development and improvement efforts which pave your path to success...
|borderless widetable|k
|''Validate'' design, data, processes, components and properties as to whether or not they meet requirements.| @@color:#39C;margin-left:10px;display:block;text-align:center;background:#eee;border-bottom:1px solid #39C;padding:3px;''Do the __right__ thing!''@@|
|''Verify'' efforts numerically and logically as to whether or not they actually do what they're designed for.|  @@color:#39C;margin-left:10px;display:block;text-align:center;background:#eee;padding:3px;''Do the thing __right__!''@@|

Efforts made to check whether ideas for the desired system, improved or new, are are in fact working...
Experiment, calculate or simulate different, envisioned alternatives and scenarios...
*results and statistics...
*#gather
*#evaluate
*#compare
Analyse alternatives and __decide__ as to which ones are best suitable to meet projects goals...
The project roll-out and implementation depending on the carefully chosen path...
Assessment of how implementation meets the verified and validated model and, above all, project goals and requirements...