<!--{{{-->
<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]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}

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

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

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

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

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

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

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

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

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

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

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left: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>>










Creates tiddlyLinks with a purple left border...
{{{
Background:#FFF
Foreground:#000
PrimaryPale:#999
PrimaryLight:#777
PrimaryMid:#111
PrimaryDark:#000
SecondaryPale:#CCF
SecondaryLight:#9AF
SecondaryMid:#69C
SecondaryDark:#05A
TertiaryPale:#EEE
TertiaryLight:#CCC
TertiaryMid:#999
TertiaryDark:#333
Error:#F88
}}}
Some colored tags...
<<tiddler Show with: {{
var f=true,v,s='',t,ti,ts=store.getTaggedTiddlers('ColoredLinksLegacy');
for(t=0;t<ts.length;t++){
ti=ts[t].title;
v=store.getTiddlerText(ti+'::Version');
s+=(f?'':'\n')+'* [['+v+'|'+ti+']]';
f=false;
}
ti="ColoredLinksPlugin";
s+=(f?'':'\n')+'*[['+store.getTiddlerText(ti+'::Version')+'|'+ti+']]';
s;}}>>
/***
|''Name''|ColoredLinksPlugin|
|''Description''|adds color to tiddlyLinks depending on the tag assigned to the corresponding tiddler|
|''Documentation''|http://ColoredLinks.tiddlyspot.com|
|''Version''|1.1.0 (2013-09-25)|
|''Author''|[[TobiasBeer]]|
|''CoreVersion''|2.5.2|
|''Source''|https://raw.github.com/tobibeer/TiddlyWikiPlugins/master/plugins/ColoredLinksPlugin.js|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
!Code
***/
//{{{
(function($){

var me = config.extensions.coloredLinks = {
    colorTags: true,
    colorTitles: true,
    titleSelector: 'div.title',
    excludeTagged: 'noColor',

    color: function (btn, title, takeTitle) {
        var bd, f, l = '', t, ta, ti = '', tg,
            e = btn,
            c = config.options;

        if (takeTitle) {
            ti = title;
        } else {
            do {
                ti = e && e.getAttribute ? e.getAttribute('tiddler') : null;
                l = ti ? e : l;
                e = e.parentNode;
            } while (e);
            ti = l ? l.getAttribute('tiddler') : '';
        }
        t = store.getTiddler(ti);
        if (t && t.tags.containsAny(this.excludeTagged.readBracketedList())) return;

        t = store.getTiddler(title);
        //check tiddler tags
        if (t && t.tags) {
            ta = 0;

            while (!tg && ta < t.tags.length) {
                f = store.getValue(t.tags[ta], 'tagcolor');
                tg = f ? t.tags[ta] : '';
                ta++;
            }
            if (!tg) tg = t.tags[0]; //none? -> take first
        }
        //none found ?-> check tiddler itself
        f = f ? f : store.getValue(title, 'tagcolor');
        //when tags to be colored, take title
        if (!tg && this.colorTags && f) tg = title;
        if (f) {
            f = f.replace(/\s*;\s*/g, '","').replace(/\s*:\s*/g, '":"').trim();
            if (f.substr(f.length - 2, 2) == ',"') f = f.substr(0, f.length - 2);
            f = '{"' + f + '}';
            $(btn).css($.parseJSON(f)).addClass('coloredLink');
        }
        //always assign firsttag accordingly
        if (tg)$(btn).attr('firsttag', tg);
    }
}

createTiddlyLink_COLOR = createTiddlyLink;
createTiddlyLink = function (place, title, includeText, className, isStatic, linkedFromTiddler, noToggle) {
    var b = createTiddlyLink_COLOR.apply(this, arguments);
    me.color(b, title);
    return b;
}

createTagButton_COLOR = createTagButton;
createTagButton = function (place, tag, excludeTiddler, title, tooltip) {
    var b = createTagButton_COLOR.apply(this, arguments);
    addClass(b, store.getTaggedTiddlers(tag).length > 0 ? 'hastags' : 'hasnotags');
    me.color(b, tag);
    return b;
}

config.macros.allTags.handler_COLOR = config.macros.allTags.handler;
config.macros.allTags.handler = function (place, macroName, params) {
    config.macros.allTags.handler_COLOR.apply(this, arguments);
    $('.button, .tiddlyLink', place).each(function (i) {
        var btn = $(this),
            title = btn.attr('tiddlyLink');
        if (
            !title && btn.hasClass('hastags') ||
            btn.hasClass('hasnotags')
        )
            title = btn.attr('tag');

        if (title)
            me.color(this, title);
    });
};


Story.prototype.refreshTiddler_COLOR = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function (title, template, force, customFields, defaultText) {
    var el = Story.prototype.refreshTiddler_COLOR.apply(this, arguments);
    //titles to be colored?
    if (me.colorTitles)
        //color it
        me.color(
            //the title
            $(el).find(me.titleSelector)[0],
            title,
            true
        );
    return el;
};

})(jQuery);
//}}}
/***
|''Name''|ColoredLinksPlugin|
|''Description''|adds color to tiddlyLinks depending on the tag assigned to the corresponding tiddler|
|''Version''|1.0.0 (2010-09-08)|
|''Type''|plugin|
|''Author''|[[TobiasBeer]]|
|''Source''|http://ColoredLinks.tiddlyspot.com|
|''Documentation''|http://ColoredLinks.tiddlyspot.com/#Welcome|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
!Code
***/
//{{{
config.extensions.coloredLinks={
colorTags:true,
colorTitles:true,
titleSelector:'div.title',
excludeTagged:'noColor',

color:function(btn,title,takeTitle){
	var bd,c=config.options,e=btn,f,l='',t,ti='',tg;
	if(takeTitle)ti=title;
	else{
		do{
			ti=e&&e.getAttribute?e.getAttribute('tiddler'):null;
			l=ti?e:l;
			e=e.parentNode;
		}while(e);
		ti=l?l.getAttribute('tiddler'):'';
	}
	t=store.getTiddler(ti);
	if(t&&t.tags.containsAny(this.excludeTagged.readBracketedList()))return;

	t=store.getTiddler(title);
	tg=t&&t.tags?t.tags[0]:'';
	if(this.colorTags&&(!tg||tg&&!store.getValue(tg,'tagcolor')))tg=title;
	if(tg)jQuery(btn).attr('firsttag',tg);else return;
	f=store.getValue(tg,'tagcolor');
	if(f){
		f=(f).replace(/\;/g,'","').replace(/\:/g,'":"');
		if(f.substr(f.length-2,2)==',"')f=f.substr(0,f.length-2);
		f='{"'+f+'}';
		jQuery(btn).css(jQuery.parseJSON(f)).addClass('coloredLink');
	}
}
}

createTiddlyLink_COLOR = createTiddlyLink;
createTiddlyLink = function(place,title,includeText,className,isStatic,linkedFromTiddler,noToggle){
	var b = createTiddlyLink_COLOR.apply(this,arguments);
	config.extensions.coloredLinks.color(b,title);
	return b;
}

createTagButton_COLOR=createTagButton;
createTagButton = function (place,tag,excludeTiddler,title,tooltip){
	var b = createTagButton_COLOR.apply(this,arguments);
	addClass(b,store.getTaggedTiddlers(tag).length>0?'hastags':'hasnotags');
	config.extensions.coloredLinks.color(b,tag);
	return b;
}

config.macros.allTags.handler_COLOR = config.macros.allTags.handler;
config.macros.allTags.handler = function(place,macroName,params){
	config.macros.allTags.handler_COLOR.apply(this,arguments);
	jQuery('.button, .tiddlyLink', place).each(function(i) {
		var btn=jQuery(this),title=btn.attr('tiddlyLink');
		if(!title&&btn.hasClass('hastags')||btn.hasClass('hasnotags'))title=btn.attr('tag');
		if(title)config.extensions.coloredLinks.color(this,title);
	});
};

Story.prototype.displayTiddler_COLOR=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle,animationSrc){
	var el = Story.prototype.displayTiddler_COLOR.apply(this,arguments),
	t=tiddler.title,c=config.extensions.coloredLinks;
	if(c.colorTitles)c.color(jQuery(c.titleSelector,el),t?t:tiddler,true);
	return el;
};
//}}}
/***
|''Name''|ColoredLinksPlugin|
|''Description''|adds color to tiddlyLinks depending on the tag assigned to the corresponding tiddler|
|''Version''|1.0.1 (2010-09-09)|
|''Type''|plugin|
|''Author''|[[TobiasBeer]]|
|''Source''|http://ColoredLinks.tiddlyspot.com|
|''Documentation''|http://ColoredLinks.tiddlyspot.com/#Welcome|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
!Code
***/
//{{{
config.extensions.coloredLinks={
colorTags:true,
colorTitles:true,
titleSelector:'div.title',
excludeTagged:'noColor',

color:function(btn,title,takeTitle){
	var bd,c=config.options,e=btn,f,l='',t,ta,ti='',tg;
	if(takeTitle)ti=title;
	else{
		do{
			ti=e&&e.getAttribute?e.getAttribute('tiddler'):null;
			l=ti?e:l;
			e=e.parentNode;
		}while(e);
		ti=l?l.getAttribute('tiddler'):'';
	}
	t=store.getTiddler(ti);
	if(t&&t.tags.containsAny(this.excludeTagged.readBracketedList()))return;

	t=store.getTiddler(title);
	//check tiddler tags
	if(t&&t.tags){
		ta=0;
		
		while(!tg&&ta<t.tags.length){
			f=store.getValue(t.tags[ta],'tagcolor');
			tg=f?t.tags[ta]:'';
			ta++;
		}
		if(!tg)tg=t.tags[0]; //none? -> take first
	}
	//none found ?-> check tiddler itself
	f=f?f:store.getValue(title,'tagcolor');
	//when tags to be colored, take title
	if(!tg&&this.colorTags&&f)tg=title;
	if(f){
		f=(f).replace(/\;/g,'","').replace(/\:/g,'":"');
		if(f.substr(f.length-2,2)==',"')f=f.substr(0,f.length-2);
		f='{"'+f+'}';
		jQuery(btn).css(jQuery.parseJSON(f)).addClass('coloredLink');
	}
	//always assign firsttag accordingly
	if(tg)jQuery(btn).attr('firsttag',tg);
}
}

createTiddlyLink_COLOR = createTiddlyLink;
createTiddlyLink = function(place,title,includeText,className,isStatic,linkedFromTiddler,noToggle){
	var b = createTiddlyLink_COLOR.apply(this,arguments);
	config.extensions.coloredLinks.color(b,title);
	return b;
}

createTagButton_COLOR=createTagButton;
createTagButton = function (place,tag,excludeTiddler,title,tooltip){
	var b = createTagButton_COLOR.apply(this,arguments);
	addClass(b,store.getTaggedTiddlers(tag).length>0?'hastags':'hasnotags');
	config.extensions.coloredLinks.color(b,tag);
	return b;
}

config.macros.allTags.handler_COLOR = config.macros.allTags.handler;
config.macros.allTags.handler = function(place,macroName,params){
	config.macros.allTags.handler_COLOR.apply(this,arguments);
	jQuery('.button, .tiddlyLink', place).each(function(i) {
		var btn=jQuery(this),title=btn.attr('tiddlyLink');
		if(!title&&btn.hasClass('hastags')||btn.hasClass('hasnotags'))title=btn.attr('tag');
		if(title)config.extensions.coloredLinks.color(this,title);
	});
};

Story.prototype.refreshTiddler_COLOR=Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template,force,customFields,defaultText){
	var el = Story.prototype.refreshTiddler_COLOR.apply(this,arguments),
	t=tiddler.title,c=config.extensions.coloredLinks;
	if(c.colorTitles)c.color(jQuery(el).find(c.titleSelector)[0],t?t:tiddler,true);
	return el;
};
//}}}
/***
|''Name''|ColoredLinksPlugin|
|''Description''|adds color to tiddlyLinks depending on the tag assigned to the corresponding tiddler|
|''Version''|1.0.2 (2010-09-13)|
|''Type''|plugin|
|''Author''|[[TobiasBeer]]|
|''Source''|http://ColoredLinks.tiddlyspot.com|
|''Documentation''|http://ColoredLinks.tiddlyspot.com/#Welcome|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
!Code
***/
//{{{
config.extensions.coloredLinks={
colorTags:true,
colorTitles:true,
titleSelector:'div.title',
excludeTagged:'noColor',

color:function(btn,title,takeTitle){
	var bd,c=config.options,e=btn,f,l='',t,ta,ti='',tg;
	if(takeTitle)ti=title;
	else{
		do{
			ti=e&&e.getAttribute?e.getAttribute('tiddler'):null;
			l=ti?e:l;
			e=e.parentNode;
		}while(e);
		ti=l?l.getAttribute('tiddler'):'';
	}
	t=store.getTiddler(ti);
	if(t&&t.tags.containsAny(this.excludeTagged.readBracketedList()))return;

	t=store.getTiddler(title);
	//check tiddler tags
	if(t&&t.tags){
		ta=0;
		
		while(!tg&&ta<t.tags.length){
			f=store.getValue(t.tags[ta],'tagcolor');
			tg=f?t.tags[ta]:'';
			ta++;
		}
		if(!tg)tg=t.tags[0]; //none? -> take first
	}
	//none found ?-> check tiddler itself
	f=f?f:store.getValue(title,'tagcolor');
	//when tags to be colored, take title
	if(!tg&&this.colorTags&&f)tg=title;
	if(f){
		f=(f).replace(/\;/g,'","').replace(/\:/g,'":"');
		if(f.substr(f.length-2,2)==',"')f=f.substr(0,f.length-2);
		f='{"'+f+'}';
		jQuery(btn).css(jQuery.parseJSON(f)).addClass('coloredLink');
	}
	//always assign firsttag accordingly
	if(tg)jQuery(btn).attr('firsttag',tg);
}
}

createTiddlyLink_COLOR = createTiddlyLink;
createTiddlyLink = function(place,title,includeText,className,isStatic,linkedFromTiddler,noToggle){
	var b = createTiddlyLink_COLOR.apply(this,arguments);
	config.extensions.coloredLinks.color(b,title);
	return b;
}

createTagButton_COLOR=createTagButton;
createTagButton = function (place,tag,excludeTiddler,title,tooltip){
	var b = createTagButton_COLOR.apply(this,arguments);
	addClass(b,store.getTaggedTiddlers(tag).length>0?'hastags':'hasnotags');
	config.extensions.coloredLinks.color(b,tag);
	return b;
}

config.macros.allTags.handler_COLOR = config.macros.allTags.handler;
config.macros.allTags.handler = function(place,macroName,params){
	config.macros.allTags.handler_COLOR.apply(this,arguments);
	jQuery('.button, .tiddlyLink', place).each(function(i) {
		var btn=jQuery(this),title=btn.attr('tiddlyLink');
		if(!title&&btn.hasClass('hastags')||btn.hasClass('hasnotags'))title=btn.attr('tag');
		if(title)config.extensions.coloredLinks.color(this,title);
	});
};


Story.prototype.refreshTiddler_COLOR=Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template,force,customFields,defaultText){
	var el = Story.prototype.refreshTiddler_COLOR.apply(this,arguments),
	c=config.extensions.coloredLinks;
if(!title)alert('foo');
	if(c.colorTitles)c.color(jQuery(el).find(c.titleSelector)[0],title,true);
	return el;
};
//}}}
#future###make action###mark as a future action######-
#queued###queue###put this action into the task queue######-
#next###make next###mark as next action item######-
#done###set done###mark action as done######-
#waiting###set waiting###mark action as waiting######-
#queued###queue###put this action into the task queue######-
1 high###1###set priority to high######-
2 medium###2###set priority to medium######-
3 low###3###set priority to low######-
/%
!INFO
|''Name''|CycleTags|
|''Version''|1.0.0|
|''Author''|Tobias Beer|
|''~CoreVersion''|2.5|
|''Type''|transclusion|
|''Source''|http://coloredlinks.tiddlyspot.com/#CycleTags|
|''Documentation''|http://coloredlinks.tiddlyspot.com/#CycleTagsInfo|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Description''|allows to cycle through a defined list of tags|

''Usage:'' {{{<<tiddler CycleTags with: TagList Tiddler>>}}}
| !Parameter | !Required | !Info h|
|~TagList|yes|refers to a tiddler with a defined list of tags see [[CycleTagsInfo]]|
|Tiddler|no|when defined, sets the tags on the specified tiddler instead of the one calling the script|

!END%/<<tiddler {{

var cfg={
	refreshTids:'TaskOverview CycleTagsInfo',
	txtSet:"set '%0'",
	txtTip:"assign '%0' to this tiddler",
	txtRemove:"remove tag '%0'",
	errTid:'@@color:red;invalid tiddler reference for [[cycleTags]]@@',
	errList:'@@color:red;invalid taglist@@'
}

var btn,d,cls,cTid,def='$1',e=place,fresh,i,l,lns,nuBtn,nxt,out='',rBtn,tid='$2',tag,tip,txt;
if('$1'=='$'+'1')out='CycleTags##INFO';
window.runOnce=!window.runOnce;
if(window.runOnce){

do{
		cTid=e&&e.getAttribute?e.getAttribute('tiddler'):null;
		l=cTid?e:l;
		e=e.parentNode;
}while(e);
cTid=l?store.getTiddler(l.getAttribute('tiddler')):null;
if(tid=='$'+'2')tid=cTid;
else{
	if(tid=='')tid=cTid;else tid=store.getTiddler(tid);
	if(!tid)out=cfg.errTid;
}
fresh='$3'=='$'+'3'?'':'$3 ';
if(!store.getTiddler(def))out=cfg.errList;

if(!out&&tid){
	lns=store.getTiddlerText(def).split("\n");
	nxt=-1;i=0;rmv="";
	while (nxt<0 && i<lns.length){ //find current
		var d=lns[i].split('###');
		if(tid.tags.contains(d[0])){ //found
			nxt=i+1;rmv=d[0];
			}
		i++;
	}

	i>=lns.length?nxt=0:nxt=i;
	d=lns[nxt].split('###');

	tag=d[0];
	txt=d[1]?d[1]:cfg.txtSet.format([tag]);
	tip=d[2]?d[2]:cfg.txtTip.format([tag]);
	cls=d[3]?d[3]:'';
	rBtn=d[4]?d[4]:'';
	
	nuBtn=function(txt,tip,cls,add){
		var t,tg;
		btn=createTiddlyButton(place,txt,tip,
			function(){
				var ti=this.getAttribute('tid'),
					rmv=this.getAttribute('rmv'),
					add=this.getAttribute('add'),
					r,rs=this.getAttribute('refresh').readBracketedList();
				rs.pushUnique(ti);
				if(add){
					//replace tag, instead of adding it to the end
					t=store.fetchTiddler(ti);
					if(t){
						var tg = t.tags.indexOf(rmv);
						if(tg!=-1)t.tags[tg]=add;
						else t.tags.unshift(add); //add to beginning
						t.changed();
						t.incChangeCount();
						store.notify(ti,true);
						store.setDirty(true);
					}
				}else store.setTiddlerTag(ti,0,rmv);
				for(r=0;r<rs.length;r++)story.refreshTiddler(rs[r],null,true);
			},cls);
		if(add)btn.setAttribute('add',add);
		btn.setAttribute('rmv',rmv);
		btn.setAttribute('tid',tid.title);
		btn.setAttribute('refresh',fresh+cfg.refreshTids+' [['+cTid.title+']]');
	}
	if(rmv&&rBtn)nuBtn(rBtn,cfg.txtRemove.format([rmv]),cls,false);
	nuBtn(txt,tip,cls,tag);
}
}
out;}}>>
CycleTags is a  transclusion that I wrote with the help of [[Eric Schulman|http://www.tiddlytools.com]]. It allows you to cycle through a list of tags, successively assigning these tags while removing the "last state".
!Installation
Get CycleTags from this TiddlyWiki and, if you need to, CycleAction as a template for defining your custom "tag cycle" ...explanations below.
!Configuration
To use it, transclude CycleTags like so:

example: {{{<<tiddler CycleTags with: CycleAction>>}}} results in <<tiddler CycleTags with: CycleAction>>
in general: {{{<<tiddler cycleTags with: TagDefinitionTiddler NameOfTaggedTiddler RefreshTids>>}}}

The parameters following the {{{with:}}} statement are:
|Parameter|Required?|Comment|h
|{{{TagDefinitionTiddler}}} | yes |a tiddler or section containing a valid definition list for the tags to be included|
|{{{NameOfTaggedTiddler}}}| no |name of the tiddler for which you want to cycle trough the tags, default is the current tiddler|
|{{{RefreshTids}}}| no |bracketedList of tiddlers to be refreshed upon change|
!The tag definition tiddler
You always need one of those. Set it up the following way, each line representing a state of your @@color:darkblue;tag cycle@@:
{{{
tag1Name###button1Text###button1Tooltip###button1Class###button1Remove
tag2Name###button2Text###button2Tooltip###button2Class###button2Remove
...
}}}
|Parameter|Required?|Comment|h
|tagName| yes |the name of the tag|
|buttonText| no |the text for the button displayed when this tag is to be set|
|buttonTooltip| no |tooltip for the button displayed when this tag is to be set|
|buttonClass| no |css class(es) assigned to the button|
|buttonRemove| no |any text you put here will display an additional @@border:1px solid #db4;padding:0px 3px;-@@ button to remove the current tag|
!An example
You find a simple task status switch in the toolbar at the top of each tiddler that uses the tiddler [[CycleAction]] as its definition:
@@display:block;padding:7px;margin-left:10px;margin-top:10px;background-color:#FFC;border:1px solid #FE8;<<tiddler CycleAction>>@@
A corresponding toolbar section in the [[ViewTemplate]] might look like:
{{{
<div class='toolbar'>
  <span macro='tiddler CycleTags with: CycleAction'></span>
...
}}}
<<tiddler TaskOverview>>
!Revisions
| !Version | !Change Notes |h
|1.0.0|- complete reqrite as a transclusion<br>- now replaces the tag in a tiddlers tag array or adds it to the beginning|
|0.1.2|- Fixed error (again in button handler) where [[task overview]] wouldn't update on changes. |
|0.1.1|- Fixed js error on button handler. |
|0.1.0|- Let's call this the first official release. I just inverted the removeButton functionality, so please adopt to it ;o) |
Welcome
<!--{{{-->
<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>
<div macro='edit tagcolor' style="margin-top:1em;">
<span class='label' style="margin-right:10px;">Tag Color (valid css!):</label>
</div>
<!--}}}-->
/***
|''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','TertiaryLight')+"}\n"+
	".FE2 .twtable thead{font-size:13px;}";
store.addNotification("StyleSheetFE2",refreshStyles);
//}}}
//{{{
//
// source: http://plugins.jquery.com/project/floatobject
//
// usage: jQuery(selector).makeFloat(params);
//
// where params is an object:
// x: number of pixels from the left of the window, or the string 'current' to use the current object location
// y: the same is x but for the Y axis
// speed: 'slow' , 'normal', 'fast'
//
// example: jQuery('#mydiv').makeFloat({x:'current',y:'100',speed:'normal'});
//

(function($){
/*----------------------------------------------------------------------------------
Class: FloatObject
-------------------------------------------------------------------------------------*/
	function FloatObject(jqObj, params)
	{
		this.jqObj = jqObj;
		
		switch(params.speed)
		{
			case 'fast': this.steps = 5; break;
			case 'normal': this.steps = 10; break;
			case 'slow': this.steps = 20; break;
			default: this.steps = 10;
		};
		
		var offset = this.jqObj.offset();
		this.currentX = offset.left;
		this.currentY = offset.top;
		this.width = this.jqObj.width();
		this.height = this.jqObj.height();
		this.alwaysVisible = params.alwaysVisible;
		this.alwaysTop = params.alwaysTop;
		
		
		this.origX = typeof(params.x) == "string" ?  this.currentX : params.x;
		this.origY = typeof(params.y) == "string" ?  this.currentY : params.y;
				
		
		//now we make sure the object is in absolute positions.
		this.jqObj.css({'position':'absolute' , 'top':this.currentY ,'left':this.currentX});
	}
	
	FloatObject.prototype.updateLocation = function()
	{
		this.updatedX = $(window).scrollLeft() + this.origX;
		
		if( this.alwaysTop == false ){
			this.updatedY = $(window).scrollTop()+ this.origY;
			
			if( this.alwaysVisible ){
				if( this.origX + this.width > this.windowWidth() ) 
					this.updatedX = this.windowWidth() - this.width + $(window).scrollLeft();
				if( this.origY + this.height > this.windowHeight() ) 
				{
					this.updatedY = $(window).scrollTop() + this.windowHeight() - this.height;
					if( this.updatedY < this.origY ) this.updatedY = this.origY;
				}				
			}
		}
		else
		{

			if( $(window).scrollTop() > this.origY )
			{
				this.updatedY = $(window).scrollTop() + 5;
			}
			else
			{
				this.updatedY = this.origY + 5;
			}
		}
		this.dx = Math.abs(this.updatedX - this.currentX );
		this.dy = Math.abs(this.updatedY - this.currentY );
		
		return this.dx || this.dy;
	}
	
	FloatObject.prototype.windowHeight = function()
	{
		var de = document.documentElement;
		
		return self.innerHeight ||
			(de && de.clientHeight) ||
			document.body.clientHeight;
	}
	
	FloatObject.prototype.windowWidth = function()
	{
		var de = document.documentElement;
		
		return self.innerWidth ||
			(de && de.clientWidth) ||
			document.body.clientWidth;
	}
	
	
	FloatObject.prototype.move = function()
	{
		if( this.jqObj.css("position") != "absolute" ) return;
		var cx = 0;
		var cy = 0;
		
		if( this.dx > 0 )
		{			
			if( this.dx < this.steps / 2 )
				cx = (this.dx >= 1) ? 1 : 0;
			else
				cx = Math.round(this.dx/this.steps);
			
			if( this.currentX < this.updatedX )
				this.currentX += cx;
			else
				this.currentX -= cx;
		}
		
		if( this.dy > 0 )
		{
			if( this.dy < this.steps / 2 )
				cy = (this.dy >= 1) ? 1 : 0;
			else
				cy = Math.round(this.dy/this.steps);
			
			if( this.currentY < this.updatedY )
				this.currentY += cy;
			else
				this.currentY -= cy;
		}
		
		this.jqObj.css({'left':this.currentX, 'top': this.currentY });			
	}

	
	
/*----------------------------------------------------------------------------------
Object: floatMgr
-------------------------------------------------------------------------------------*/		
	$.floatMgr = {
		
		FOArray: new Array() ,
		
		timer: null ,
		
		initializeFO: function(jqObj,params) 
		{
			var settings =  $.extend({
				x: 0 ,
				y: 0 ,
				speed: 'normal'	,
				alwaysVisible: false ,
				alwaysTop: false},params||{});
			var newFO = new FloatObject(jqObj,settings);
			
			$.floatMgr.FOArray.push(newFO);
			
			if( !$.floatMgr.timer ) $.floatMgr.adjustFO();
			
			//now making sure we are registered to all required window events
			if( !$.floatMgr.registeredEvents ) 
			{
					$(window).bind("resize", $.floatMgr.onChange);
					$(window).bind("scroll", $.floatMgr.onChange);
					$.floatMgr.registeredEvents = true;
			}		
		} , 
		
		adjustFO: function() 
		{
			$.floatMgr.timer = null;
			
			var moveFO = false;
			
			for( var i = 0 ; i < $.floatMgr.FOArray.length ; i++ )
			{
				 FO = $.floatMgr.FOArray[i];
				 if( FO.updateLocation() )  moveFO = true;
			}
			
			if( moveFO )
			{
				for( var i = 0 ; i < $.floatMgr.FOArray.length ; i++ )
				{
					FO = $.floatMgr.FOArray[i];
					FO.move();
				}
				
				if( !$.floatMgr.timer ) $.floatMgr.timer = setTimeout($.floatMgr.adjustFO,50);
			}
		}	,
		
		stopFloatChk: false ,
		
		onChange: function()
		{
			if( !$.floatMgr.timer && !$.floatMgr.stopFloatChk ) $.floatMgr.adjustFO();
		} 		
	};
	
/*----------------------------------------------------------------------------------
Function: makeFloat
-------------------------------------------------------------------------------------*/		
	$.fn.makeFloat = function(params) {
		var obj = this.eq(0); //we only operate on the first selected object;
		$.floatMgr.initializeFO(obj,params); 
		if( $.floatMgr.timer == null ) $.floatMgr.adjustFO();
		return obj;
	};
	$.fn.stopFloat = function(params) {
		$.floatMgr.stopFloatChk = true;
	};
	
	$.fn.restartFloat = function(params) {
		$.floatMgr.stopFloatChk = false;
	};
})(jQuery);
//}}}
/***
|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.
!!!Documentation
>see [[GotoPluginInfo]]
!!!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
//}}}
<<<
!!!Revisions
<<<
2009.05.22 [1.9.2] use reverseLookup() for IncludePlugin
|please see [[GotoPluginInfo]] for additional revision details|
2006.05.05 [0.0.0] started
<<<
!!!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=3;

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 autocomplete="off" accesskey="G" style="%instyle%"\
			title="Enter title text... ENTER=goto, SHIFT-ENTER=search for text, DOWN=select from 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','excludeLists');
			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;
	}
}
//}}}

/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|4.0.0|
|Date:|2010-09-09|
|Author:|Simon Baird, Tobias Beer|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{

window.hideWhenLastTest = false;

window.removeElementWhen = function(test,place) {
	window.hideWhenLastTest = test;
	if(test){
		removeChildren(place);
		place.parentNode.removeChild(place);
	}
};

(function(){
var s,show=false,f,fs={
	When:'eval(paramString)',
	WhenTagged:'tiddler.tags.containsAll(params)',
	WhenTaggedAny:'tiddler.tags.containsAny(params)',
	WhenTaggedAll:'tiddler.tags.containsAll(params)',
	WhenExists:'store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])',
	TitleIs:'tiddler.title == params[0]',
	'"else"':'!window.hideWhenLastTest'
}
for(var f in fs){
	do{
		s=f=='"else"'?'':(show?'show':'hide');
		eval('merge(config.macros,{\n'+s+f+':{\n'+
			'handler:function(place,macroName,params,wikifier,paramString,tiddler){\n'+
				'removeElementWhen('+(show?'!':'')+fs[f]+',place);\n'+
			'}}});');
		show=!show&&s!='';
	}while(show);
}
})();
//}}}
Let's see if something will come out of this simplifying TiddlyWiki css debugging.
[[Welcome]]
<<tiddler {{
(function($){
	window.clickers=[];
	$('.tiddlyLink',place).each(function(i){
		var e=$(this),n=window.clickers.length;
		window.clickers.push(this.onclick);
		e.unbind('click');
		e.attr('clicker',n);
		e.click(function(event){
			var el=$(this),c='clicker',e=event||window.event;
			el.click(window.clickers[el.attr(c)]);
			el.removeAttr(c);
			window.clickers=undefined;
			e.stopPropagation();
		});
	});
})(jQuery);
'';}}>>
/***
|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));
}

//}}}
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
 major: 1, minor: 1, revision: 0, 
 date: new Date("mar 17, 2007"), 
 source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};

if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};

bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
 if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){ 
 url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
 }
 return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
[[Home|Welcome]] ColoredLinksPlugin [[CycleTags|CycleTagsInfo]]

ViewTemplate EditTemplate StyleSheet

<html><a class="tiddlyLink tiddlyLinkExisting" href="javascript:;" onclick="window.scroll(0,0);">â–² to top â–²</a></html><<toolbar jump>><<rB ' â–² jump to â–¼'>><<closeAll>><<rB 'X close all X'>>[[? help ?|MainMenu Help]] <<tiddler test2>>
Thanks to [[a jquery script|FloatObject]] this MainMenu is floatable. Floating is initiated in the PageTemplate via...

{{{<span macro="tiddler {{jQuery('#mainMenu').makeFloat({x:'current',y:65,speed:'fast'});'';}}"></span>}}}
//{{{
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); 
        } 
}
//}}}
<!--{{{-->
<div class='header'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
<span class='toggleButton' refresh='content' tiddler='toggleLeft'></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 id='search' refresh='content' tiddler='Search'></div>
<span macro="tiddler {{jQuery('#mainMenu').makeFloat({y:63,speed:'fast'});'';}}"></span>
<!--}}}-->
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
	major: 1, minor: 0, revision: 2, 
	date: new Date("Apr 19, 2007"),
	source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
	coreVersion: '2.2.0 (Beta 5)'
};

config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");

merge(config.macros.option.types, {
	'pas': {
		elementType: "input",
		valueField: "value",
		eventName: "onkeyup",
		className: "pasOptionInput",
		typeValue: config.macros.option.passwordInputType,
		create: function(place,type,opt,className,desc) {
			// password field
			config.macros.option.genericCreate(place,'pas',opt,className,desc);
			// checkbox linked with this password "save this password on this computer"
			config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);			
			// text savePasswordCheckboxLabel
			place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
		},
		onChange: config.macros.option.genericOnChange
	}
});

merge(config.optionHandlers['chk'], {
	get: function(name) {
		// is there an option linked with this chk ?
		var opt = name.substr(3);
		if (config.options[opt]) 
			saveOptionCookie(opt);
		return config.options[name] ? "true" : "false";
	}
});

merge(config.optionHandlers, {
	'pas': {
 		get: function(name) {
			if (config.options["chk"+name]) {
				return encodeCookie(config.options[name].toString());
			} else {
				return "";
			}
		},
		set: function(name,value) {config.options[name] = decodeCookie(value);}
	}
});

// need to reload options to load passwordOptions
loadOptionsCookie();

/*
if (!config.options['pasPassword'])
	config.options['pasPassword'] = '';

merge(config.optionsDesc,{
		pasPassword: "Test password"
	});
*/
//}}}

/***
|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["StyleSheetQuickOpenTag"] = this.styles;
		store.addNotification("StyleSheetQuickOpenTag",refreshStyles);
	}
}

config.quickOpenTag.init();

//}}}

/***
|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();

//}}}
<<toggleSideBarTB right show>><<gotoTiddler  search liststyle:"display:block;position:absolute;right:0em;top:20px;z-index:100;border:1px solid #ccc;padding:0;width:auto;display:none;">>
/%
!INFO
{{title{@@color:red;Unfortunately, the definition tiddler is not working yet... see [[here|SetCssRules]]@@}}}
|Name|SetCss|
|Source|http://www.coloredlinks.tiddlyspot.com/#SetCss|
|Version|1.0.0|
|Author|Tobias Beer|
|Type|transclusion|
|Description|Sets or removes a CSS class for a tiddler or its elements depending on the tiddler's tags|
|Documentation|http://www.coloredlinks.tiddlyspot.com/#SetCssInfo ([[SetCssInfo]])|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
This transclusion is inspired by [[SetTiddlerBackground from TiddlyTools...|http://www.tiddlytools.com/#SetTiddlerBackground]]

''Usage''
{{{
<<tiddler SetCss with: class tag selector>>
<<tiddler SetCss with: 'config=DefinitionTiddler'>>
}}}
See [[SetCssInfo]] or [[SetCssInfo@tiddlyspot|http://www.coloredlinks.tiddlyspot.com/#SetCssInfo]] for more info.
!OUT
$1
!SHOW
<<tiddler SetCss##OUT with: {{
	//defaults
	var defaultSelector='.viewer';

	var c='$1',d,ds,e=place,lst,out='',t='$2',s='$3',ti,$,r,x;
	c=c=='$'+'1'?'':c;
	r=c.substr(0,7)=='config=';
	ti=r?c.substr(7):c;
	if(r){
		ds=store.getTiddlerText(ti).split('\n');
		for(d=0;d<ds.length;d++){
			pre=ds[d].substr(0,1);
			if(pre!=' '&&pre!='<'&&ds[d]!=''){
				x=ds[d].readMacroParams();
				out+='<\<tiddler SetCss with: [['+x[0]+']]'+
					(x[1]?' [['+x[1]+']]':'')+
					(x[2]?' [['+x[2]+']]':'')+'\>\>\n';
			}
		}
	out="{{{\n"+out+"\}\}\}\n{{title{The above doesn't get triggered and I have no idea as to why not!}\}\}\nPlease read right after the output from ColorPalette here below which is there to show you that transclusion generally works with output from SetCss!\n\nForeground from ColorPalette:<<tiddler [[ColorPalette::Foreground]]>\>"+out+"<<tag Urgent>\>";
	}else{
		r=c.substr(0,1)=='-';
		c=r?c.substr(1):c;
		t=t=='$'+'2'?'':t;
		s=s=='$'+'3'?defaultSelector:s;
		$=s.substr(0,1)=='$';
		s=$?s.substr(1):s;
		do{
			ti=e&&e.getAttribute?e.getAttribute('tiddler'):null;
			lst=ti?e:lst;
			e=e.parentNode;
		}while(e);
		ti=store.getTiddler(lst?lst.getAttribute('tiddler'):'');
		if (c&&!t||ti&&ti.isTagged(t)){
			if($)e=jQuery(s);
			else{
				e=jQuery(lst);
				if(s!='.tiddler')e=e.find(s);
			}
			r?e.removeClass(c):e.addClass(c);
		}
	}
out;}}>>
!END%/<<tiddler {{
	var src='SetCss';
	src+(tiddler&&tiddler.title==src?'##INFO':'##SHOW');
}} with: [[$1]] [[$2]] [[$3]]>>
<<tiddler SetCss##INFO>>
!Parameters...
#the only one required being either...
##''simple mode:'' the css {{{class}}} being added to the tiddler element
##*for what it's worth, if you prefix this parameter with a dash ({{{-}}}) instead of being added, the class will be removed from the element!
##''enhanced mode:'' {{{'config=Definition Tiddler'}}}
##*points to a tiddler containing serveral definitions, one per line (see SetCssRules below)
#{{{tag}}} (optional)
#*a tag that triggers coloring
#{{{selector}}} (optional / default: {{{.viewer}}})
#*is a css selector corresponding to the elements you want to style
#**if you use {{{.tiddler}}} the class will be added to the tiddler itself
#***might require a refresh of that tiddler if its tag information has changed
#**using {{{.title}}} adds the class to the {{{title}}} element(s) instead of the {{{viewer}}}
#**if you prepend the selector with a {{{$}}} dollar sign, e.g. {{{$#displayArea}}}, you can reach any document element you want.
''Note:'' Any added classes will only be removed later...
*when the element, e.g. a tiddler, is being closed or refreshed by user action
*if you specifically remove the class later on ...see dash ({{{-}}}) switch for first parameter
!Example
{{{<<tiddler SetCss with: Transclusion '' 'td'>>}}} sets the class {{{transclusion}}} for all table cells in the corresponding tiddler.
!Definition tiddler

Consider defining your styling rules in a single convenient tiddler, e.g, SetCssRules, containing something like this:
<<tiddler Show with: {{'{{{\n'+store.getTiddlerText('SetCssRules')+'\n}\}\}';}}>>
Simply note the parameters as you would supply them calling SetCss individually.

To apply this set of tag-based css rules, transclude the SetCss like so...
{{{<<tiddler SetCss with: 'config=SetCssRules'>>}}}
or put it in your ViewTemplate for it to apply to all tiddlers...
{{{<span macro='tiddler SetCss with: "config=SetCssRules"' style='display:none'></span>}}}

Once you set those tags in your definitions for SetCss, the styles will be applied.

Don't forget to add corresponding css definitions to your StyleSheet{{title{!}}} like this...
{{{
.red{background:#fbb;border:1px solid #f99;}
}}}
!Rules
red Urgent
yellow #next
green #done
!End Rules

 Trigger:{{{<<tiddler SetCss with: 'config=SetCssRules##Rules'>>}}}<<tiddler SetCss with: 'config=SetCssRules##Rules'>>
 {{quote{Please note that any other macro output is being invoked, which you see by the wikified value for Foreground from ColorPalette and the <<tag Urgent>> button right above which has been added to the output to show you that it works! These were the statements used: {{{<<tiddler [[ColorPalette::Foreground]]>>}}} and {{{<<tag Urgent>>}}} which worked as opposed to... {{{<<tiddler SetCss with: [[green]] [[#done]]>>}}} which only works when put right into the tiddler (try it out!), yet not if ''re-transcluded'' via {{{<<tiddler SetCss with: 'config=SetCssRules##Rules'>>}}}!

 {{title red{ @@text-align:center;display:block;padding:0 2em;line-height:1em;font-size:3em; So...<br>What is going on?!?@@ }}}



}}}
$1
<<permaview>><<newTiddler>><<saveChanges>><<tiddler TspotSidebar>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
<<slider chkSidebarTabs SideBarTabs##SHOW "lists »" "show SideBarTabs">><<tiddler {{
jQuery('#sidebarTabs > a').addClass('buttontabs');
'';}}>>/%
!SHOW
<<tabs txtMainTab tags "list of tags" TabTags recent "list tiddlers by date" SideBarTabs##RECENT all "lists all tiddlers" TabAll more "standard lists and more" TabMore>>
!RECENT
{{recent{<<timeline "modified" "17" "YYYY-0MM-0DD">>
----
@@padding-left:10px;[[::Complete Timeline::|Timeline]]@@}}}
!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"
//}}}
bringing color to your tagging experience
[[ColoredLinks|Welcome]]

/*{{{*/
/*
BigRound:-moz-border-radius:15px; -webkit-border-radius:15px;border-radius:15px;
*/

.header{height:5.5em;border-bottom:5px solid [[ColorPalette::SecondaryDark]];}
.headerForeground{display:none;}
.headerForeground,  .headerShadow{padding:1em;margin:0;}
.headerShadow,.headerShadow .tiddlyLink{color:white;}
.siteTitle{padding-left:10px;}
.siteSubtitle{padding-left:1em;}
.headerShadow .tiddlyLink:hover{text-decoration:underline;}
.top{float:right;margin-top:10px;display:none;}

#displayArea {clear:both;margin-left:18em;margin-right:19.1em;}
#messageArea {background:[[ColorPalette::TertiaryPale]];position:absolute;top:5px;left:35%;padding:1em 1%;margin:0 0 0 1%;width:35%;border:3px solid [[ColorPalette::TertiaryLight]];-moz-border-radius:5px; -webkit-border-radius:5px;border-radius:5px;background:[[ColorPalette::MsgLo]];}
#messageArea .messageToolbar {display:block;float:right;padding:0.1em;text-align:right;width:60px;}
#messageArea a, #messageArea .button {background:transparent;text-decoration:none;color:[[ColorPalette::TertiaryDark]];border:0;}
#messageArea a:hover{color:black;border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
#backstageToolbar {text-align:center;}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryMid]];margin:0;}
.popup {background:[[ColorPalette::TertiaryPale]];border: 1px solid [[ColorPalette::TertiaryMid]];}
.popup li a {height:20px;line-height:20px;}

#mainMenu{width:15em;padding-top:2.5em;position:absolute;top:63px;left:0;}
#mainMenu .tiddlyLink, #mainMenu .button, .toolbar .button, #sidebarOptions .button, #searchResults .button, .buttontabs{line-height:1em;font-size:14px;display:block;text-align:center;color:[[ColorPalette::Background]] !important;font-weight:bold;background:[[ColorPalette::SecondaryMid]];padding:10px;margin:0 0 5px 0;[[StyleSheet::BigRound]]}
#mainMenu .tiddlyLink:hover, #mainMenu .button:hover, .toolbar .button:hover,  #sidebarOptions .button:hover, #searchResults .button:hover, .buttontabs:hover{background:[[ColorPalette::SecondaryDark]];color:[[ColorPalette::Background]];}
.toolbar .button{display:inline;display:inline-block;margin-bottom:0;}

#sidebar{width:19em;margin-top:2em;margin-right:1em;}
#sidebarTabs .tabContents {width:17em;}
#sidebarOptions{padding:0.3em 0.3em 0 0.3em;}
#sidebarTabs{padding:0 0.3em 0.3em 0.3em;}
#sidebarOptions .sliderPanel {padding-top:15px;background:[[ColorPalette::TertiaryPale]];border:1px solid [[ColorPalette::TertiaryLight]];font-size:110%;margin:0 0 5px 0;[[StyleSheet::BigRound]]}
#sidebar .txtOptionInput,#sidebar  .pasOptionInput{display:block;width:12em;}
#sidebar li{padding: 2px 0;}

.button{cursor:pointer;}
a{color:[[ColorPalette::TertiaryDark]];font-weight:normal;}
a:hover{color:[[ColorPalette::SecondaryDark]];background:none;}

#search{position:absolute;top:2.2em;right:2em;background:transparent;z-index;100;width:265px;height:20px;}
#search input{float:right;clear:none;display:inline;position:absolute;right:0;top:0;display:inline;border:1px solid #ccc;padding:0px;width:180px;z-index:0;margin-left:5px;}
#search .button, .toggleButton .button {background:none;border:0;color:#eee;font-size:115%;font-weight:bold;padding:3px 2em;}
.viewer .button{padding:1px 3px;margin:0 1px;background:[[ColorPalette::SecondaryPale]];border-color:[[ColorPalette::SecondaryMid]];}
#searchResults{margin:2em 1em 0 1em;background:[[ColorPalette::TertiaryPale]];padding:1em;[[StyleSheet::BigRound]]}
#searchResults .button {float:right;}
.viewer .button {padding:0 1px;}

.tiddler{margin-bottom:2em;}
.viewer{margin-top:1em;}
.viewer li{margin-top:3px;}
.marked{background:[[ColorPalette::SecondaryPale]];padding:0 2px;}
.wideInput input{width:500px;}

.hastags{font-weight:bold !important;color:[[ColorPalette::SecondaryDark]] !important;}
.selected .tagged, .tagged, .selected .tagging, .tagging{background:none;border:none;list-style-type:circle;}
.tagging li{margin-left:15px;list-style-type:circle;margin-top:2px;}
.tagged .listTitle, .tagging .listTitle{list-style-type:none;margin-bottom:3px;color:[[ColorPalette::SecondaryDark]];}
.tagging ul, .tagging li, .tagging li a {display:block;width:100%;}
.tagging ul{padding-right:100px;}
.tagging li a{border:1px solid transparent;border-left-width:0;border-right-width:0;}
.tagging li a:hover{border-color:[[ColorPalette::SecondaryLight]];}
.subtag a{font-size:120%;color:[[ColorPalette::SecondaryDark]];}
.noTitle .listTitle{display:none;}
.tagglyTagged {margin-bottom:7px;}
.tagglyTagged .quickopentag, .tagged .quickopentag {padding:0 !important}

div.title {margin-bottom:3px;font-size:1.6em !important;}
#sidebarTabs .tiddlyLink{font-size:1em !important;border-color:transparent;padding-left:4px !important;border-left-width:10px !important;border-left-style:solid  !important;}

.coloredLink{border:1px solid transparent;padding:0 4px !important;}
.tiddler [firsttag='blue']:hover{background:blue !important;color:white;}
.tiddler [firsttag='Urgent']:hover{background:red !important;color:white !important;}

.red {background:#fcc;}
.yellow {background:#FDFCDC;}
.green {background:#cfc;}
/*}}}*/
Provides configuration for TagSearchPlugin...
!Tags
[[Colored]]
[[Action]]
[[Priority]]
!More
[[TAG:Archive]]
[[Journal]]
[[Reference]]
[[Transclusion]]
[[systemConfig]]
[[systemConfigDisable]]
[[excludeMissing]]
[[excludeSearch]]
[[excludeLists]]
[[ColoredLinksLegacy]]
/***
|''Name:''|TagSearchPlugin|
|''Version:''|1.0.4 (2010-09-07)|
|''Source:''|http://tagsearch.tiddlyspot.com/#TagSearchPlugin|
|''Author:''|[[Tobias Beer]]|
|''Description:''|Provides a drop down listing current tags and others to be set. Based on [[x-tagger|http://tbgtd.tiddlyspot.com/#x-tagger]] which in turn was once based on [[TaggerPlugin|http://tw.lewcid.org/#TaggerPlugin]].|
|''Documentation:''|See [[Welcome]] or [[online help|http://tagsearch.tiddlyspot.com]]|
|''~TiddlyWiki:''|Version 2.5 or better|
***/
//{{{
config.macros.tagsearch={
cfg:{
	defaultMode:1,	// 0 -> substitute (silent), 1 -> ask for substitution, >1 -> always add (silent)
	defaultOpenNew:1,	//0: never open new tiddler, 1:ask, >2: always open
	defaultMore:'',	//the default for the more section
	sidebarOffset:20,	//dist from sidebar
	colWidth:'180px',	//minwidth of sides
	newAtSingle:30,	//new block for all tags
	newAt:18,	//new block when grouped
	excludeTagged:'',	//default tags or exclusion
	arrow:document.all?" â–¼":" â–¾",	//only the fat works in IE

	label:'Tags:',	//localization starts here
	options:'Options',
	more:'More...',
	tooltip:'Manage tiddler tags',
	notags:'no tags set...',
	aretags:'Current tags',
	addTag:'Add tag...',
	addTags:'Set tag...',
	txtRemove: 'remove tag',
	txtEdit:"~ edit categories...",
	txtEditTip:"edit tiddler with GTD tag categories used by x-tagger",
	txtNew:"~ add another tag",
	txtAdd:"set tag ",
	txtFor:"To be tagged... ",
	promptNew:"Enter new tag:",
	modeAsk:"Do also you want to remove tag '%0' and other tags from category '%1'?\nCancel simply adds tag '%2'.",
	askOpen:"Do you want to open the newly created tiddler '%0' now tagged '%1'?"
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
	var c,click,e,ex=[],goto,lbl,list,open,mode,more,notags,p,source,rtid,src,tb,tid,tip,tmp,x;
	x=config.macros.tagsearch;c=x.cfg;
	p=paramString.parseParams('tagman',null,true);
	tb=params.contains("toolbar");
	notags=params.contains("notags");
	lbl=getParam(p,"label",c.label)+c.arrow;
	tip=getParam(p,"tooltip",c.tooltip);
	exclude=(getParam(p,"exclude",'')+' '+c.excludeTagged).readBracketedList();
	exclude.map(function(e){ex.pushUnique(e);});
	for(e=0;e<exclude.length;e++){
		store.getTaggedTiddlers(exclude[e]).map(function(t){ex.pushUnique(t.title)});
	}
	src=getParam(p,"source",'');
	if(src&&!store.getTiddlerText(src))return false;
	more=getParam(p,"more",c.defaultMore);
	mode=parseInt(getParam(p,"mode",c.defaultMode));
	mode=isNaN(mode)?c.defaultMode:mode;
	open=parseInt(getParam(p,"open",c.defaultOpenNew));
	open=isNaN(open)?c.defaultOpenNew:open;
	goto=getParam(p,"goto",'');
	tid=rtid=getParam(p,"tiddler");
	if(!tid){
		do{tid=tmp;tmp=story.findContainingTiddler(place);}while(tmp&&tid!=tmp);
		tid=tid?tid.getAttribute('tiddler'):'';
	}
	if(!tid)return;
	click=function(e){
		e=e||window.event;
		var ar,curr,d1,d2,fst=true,i,j,l,nuBtns,nuLi,m,max=nu=src?c.newAt:c.newAtSingle,oTid=store.getTiddler(tid),pop,s,t,tags=[],tids,ti,tgt;
		pop=Popup.create(this);
		addClass(pop,'tagsearch');
		if(src){//mod tb:different method for source tiddler
			tids=store.getTiddlerText(src).readBracketedList();
			for(t=0;t<tids.length;t++){
				if(!ex.contains(tids[t])){
					tgt=store.getTaggedTiddlers(tids[t]);
					tags.push('TAG:'+tids[t]);
					for(s=0;s<tgt.length;s++){
						if(!ex.contains(tgt[s].title))tags.push(tgt[s].title);
					}
				}
			}
		}else tags=store.getTags();
		curr=oTid?oTid.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",tid);
			t.setAttribute("tag",tag);
			t.setAttribute("source",src);
			t.setAttribute("mode",mode);
			t.setAttribute("open",open);
			insertSpacer(s);
			createTagButton(s,tag);
		}
		d1=nuLi(pop);d2=nuLi(d1);
		if(config.macros.gotoTiddler){
			if(rtid){
				l=createTiddlyElement(d2,"li",null,'addto','');
				wikify('{{title{'+c.txtFor+'}}}<<tag [['+tid+']]>>',l);
				d2=nuLi(d1);
			}
			createTiddlyElement(d2,"li",null,"title",c.addTag);
			wikify('<<gotoTiddler '+goto+' >>',d2);
		}
		d2=nuLi(d1);
		createTiddlyElement(d2,"li",null,"title",c.aretags);
		if(curr.length==0)wikify('{{added{'+c.notags+'}}}',d2);
		else for(t=0;t<curr.length;t++)nuBtns(d2,"[X]",curr[t],c.txtRemove);
		if(c.colWidth)jQuery('li',d1).css('min-width',c.colWidth);		
		if(!notags){
			for(i=0;i<tags.length;i++){
				nu++;
				ti=src?tags[i]:tags[i][0];
				if(ti.indexOf('TAG:')==0){
					ti=ti.substr(4);
					if(nu>max){nu=0;d1=nuLi(pop);}d2=nuLi(d1);nu++;
					createTiddlyLink(createTiddlyElement(d2,"li",null,null),ti,ti,'title');
				}
				else if(!curr.contains(ti)&&!ex.contains(ti)){
					if(!src&&nu>max||src&&nu>c.newAtSingle){
						nu=0;d1=nuLi(pop);d2=nuLi(d1);
						if(fst){createTiddlyElement(createTiddlyElement(d2,"li",null,null),'li',null,'title',c.addTags);fst=false;}
					}
					nuBtns(d2,"["+String.fromCharCode(160,160,160)+"]",ti,c.txtAdd);
				}
			}
			//options
			d1=nuLi(pop);d2=nuLi(d1);createTiddlyElement(d2,'li',null,'title',c.options);
			var newBtn=createTiddlyButton(createTiddlyElement(d2,"li"),(c.txtNew),null,x.setTag,'tsoption');
			newBtn.setAttribute("tiddler",tid);
			if(src){
				var edit=createTiddlyButton(createTiddlyElement(d2,"li"),c.txtEdit,c.txtEditTip,onClickTiddlerLink,'tsoption'); 
				edit.setAttribute("tiddlyLink",src.split('##')[0]);
			}

			fst=true;
			if(more){//more
				m=store.getTiddlerText(more).readBracketedList();
				if(m.length>0){
					for(i=0;i<m.length;i++){
						var ti=m[i];
						if(ti.indexOf('TAG:')==0){
							ti=ti.substr(4,ti.length-4);
							d2=nuLi(d1);createTiddlyLink(createTiddlyElement(d2,"li",null,null),ti,ti,'title');
							ar=store.getTaggedTiddlers(ti);
							for(j=0;j<ar.length;j++){var ti=ar[i].title;
								if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
							}
						}else{
							if(fst){d2=nuLi(d1);createTiddlyElement(d2,'li',null,'title',c.more);fst=false;}
							if(!curr.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
						}
					}
				}
				if(c.colWidth)jQuery('li',d1).css('min-width',c.colWidth);
			}
		}
		jQuery(pop).attr({tiddler:tid,source:src,mode:mode,open:open});
		Popup.show(pop,false);
		put=jQuery(".tagsearch form input");
		put.attr('notify','config.macros.tagsearch.notify');
		put.focus();
		if(tb){
			s=document.getElementById('sidebarTabs');
			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","tagsearchDrop");
},
setTag:function(e){
	var a,b,el,f,m,nu,o,r,s,set,src,t,tag,ti,tid,title,c=config.macros.tagsearch.cfg;
	el=e&&!e.target?e:this;
	title=el.getAttribute("tiddler");
	tag=el.getAttribute("tag");
	src=el.getAttribute("source");
	m=el.getAttribute("mode");
	o=el.getAttribute("open");
	tid=store.getTiddler(title);
	if(!tag){nu=prompt(c.promptNew,"");if(!nu)return false;else tag=nu;}
	b=!tid;
	if(!tid||!tid.tags){
		f=merge((tid?tid.fields:{}), config.defaultCustomFields);
		store.saveTiddler(title,title,'',config.options.txtUserName,new Date(),tag,f);
		if(!tid&&!document.getElementById(title)&&o>0)
			if(o>1||o==1&&confirm(c.askOpen.format([title,tag])))
				story.displayTiddler(null,title);
	}else{
		if(!tid.tags.contains(tag)){
			if(src){
				if(m<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(m==1&&!ok){
											if(!confirm(c.modeAsk.format([tgt[r].title,ti,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);
	}
	if(!e.target){e.value='';e.focus();}
},
notify:function(tag){
	var p = jQuery('.tagsearch');
	var i = jQuery('.tagsearch form input')[0];
	var t = store.getTiddler(p.attr('tiddler'));
	if(t&&t.tags.contains(tag))return false;
	wikify('{{added{ {{add{+}}} <<tag "'+tag+'">>}}}',i.parentNode);
	p.attr('tag',tag);
	this.setTag(p[0]);
	i.select();
},
tiddler:'',
src:''
}

var gt=config.macros.gotoTiddler;
if(gt){
gt.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;
	var n=here.getAttribute('notify');
	if(n)eval(n+'("'+title+'")'); //notify of selection, otherwise...
	else story.displayTiddler(null,title); // show selected tiddler (default behaviour)
	return false;
}
gt.IEtableFixup="%0";
}

var TP=store.getTiddlerText('ColorPalette::TertiaryPale'),
	TM=store.getTiddlerText('ColorPalette::TertiaryMid'),
	TD=store.getTiddlerText('ColorPalette::TertiaryDark'),
	SP=store.getTiddlerText('ColorPalette::SecondaryPale'),
	SD=store.getTiddlerText('ColorPalette::SecondaryDark');
config.shadowTiddlers["StyleSheetTagSearch"]="/*{{{*/\n"+
	".tagsearch {padding:7px !important;border:1px solid "+SD+";background: "+TP+";-moz-border-radius:5px; -webkit-border-radius:5px;border-radius:5px;}\n"+
	".tagsearch li a, .tagsearch .quickopentag .tiddlyLink {display:inline;padding:2px;color:"+TD+";clear:none;line-height:1em;height:1em;}\n"+
	".tagsearch li a.toggleButton {display:inline;margin-left:5px;}\n"+
	".tagsearch .title {margin:3px 0 0 5px;font-weight:bold;font-size:150%;color:"+SD+";padding:0;}\n"+
	".tagsearch form{display:block;float:left;clear:both;padding-left:5px !important;}\n"+
	".tagsearch .addto .quickopentag{display:block;clear:both;padding:5px;font-size:120%;}\n"+
	".tagsearch .added{display:block;clear:both;padding:5px;}\n"+
	".tagsearch .added span{display:block;float:left;}\n"+
	".tagsearch .add{clear:left;padding:0 3px;}\n"+
	".tagsearch ol{margin:0;padding:0 0 5px 0;}\n"+
	".tagsearch li{display:block;float:left;padding-bottom:10px !important;}\n"+
	".tagsearch li span{line-height:1em;}\n"+
	".tagsearch li ol li{clear:both;min-width:120px;display:inline;border:1px solid transparent;}\n"+
	".tagsearch li ol li:hover{border:1px solid "+TM+";}\n"+
	".tagsearch li ol li ol li{padding:0 !important;}\n"+
	".tagsearch li ol li ol li:hover{border:1px solid transparent;}\n"+
	".tagsearch .tiddlyLink:hover{color:"+SD+";background:"+SP+";}\n"+
	".tagsearch .quickopentag {display:inline;}\n"+
	".tagsearch .quickopentag .tiddlyLink:hover {text-decoration:underline;}\n"+
	".tagsearch .quickopentag .button {border:0;padding:2px;font-size:1.5em;}\n"+
	"/*}}}*/";
store.addNotification("StyleSheetTagSearch",refreshStyles);
//}}}
<<tiddler Tagging2##SHOW with: {{
var s='',ex='$2'.readBracketedList(),t,ti,tg='$1',tgd;
if(tg!='$'+'1'){
s='\n*{{listTitle{Subtags and tagging tiddlers...}\}\}';
tgd=store.getTaggedTiddlers(tg);
for(t=0;t<tgd.length;t++){
ti=tgd[t].title;
if(!ex.contains(ti)){
s+='\n*{{subtag{[['+ti+':|'+ti+']]}\}\}';
store.getTaggedTiddlers(ti).map(function(t){s+='\n** [['+t.title+']]';});
}
}
}
s;}}>>/%
!SHOW
$1
!END%/
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
|Version:|3.3.1 ($Rev: 9828 $)|
|Date:|$Date: 2009-06-03 21:38:41 +1000 (Wed, 03 Jun 2009) $|
|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
***/
//{{{

merge(String.prototype,{

	parseTagExpr: function(debug) {

		if (this.trim() == "")
			return "(true)";

		var anyLogicOp = /(!|&&|\|\||\(|\))/g;
		var singleLogicOp = /^(!|&&|\|\||\(|\))$/;

		var spaced = this.
			// because square brackets in templates are no good
			// this means you can use [(With Spaces)] instead of [[With Spaces]]
			replace(/\[\(/g," [[").
			replace(/\)\]/g,"]] "). 
			// space things out so we can use readBracketedList. tricky eh?
			replace(anyLogicOp," $1 ");

		var expr = "";

		var tokens = spaced.readBracketedList(false); // false means don't uniq the list. nice one JR!

		for (var i=0;i<tokens.length;i++)
			if (tokens[i].match(singleLogicOp))
				expr += tokens[i];
			else
				expr += "tiddler.tags.contains('%0')".format([tokens[i].replace(/'/,"\\'")]); // fix single quote bug. still have round bracket bug i think

		if (debug)
			alert(expr);

		return '('+expr+')';
	}

});

merge(TiddlyWiki.prototype,{
	getTiddlersByTagExpr: function(tagExpr,sortField) {

		var result = [];

		var expr = tagExpr.parseTagExpr();

		store.forEachTiddler(function(title,tiddler) {
			if (eval(expr))
				result.push(tiddler);
		});

		if(!sortField)
			sortField = "title";

		result.sort(function(a,b) {return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);});
		
		return result;
	}
});

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':",
			exprLabel:  "Matching tag expression '%0':",
			excerpts:   "excerpts",
			descr:      "descr",
			slices:     "slices",
			contents:   "contents",
			sliders:    "sliders",
			noexcerpts: "title only",
			noneFound:  "(none)"
		},

		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"
		},

		tooDeepMessage: "* //sitemap too deep...//"
	},

	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: ["excludeLists","excludeTagging"],
		excerptSize: 50,
		excerptMarker: "/%"+"%/",
		siteMapDepthLimit: 25
	},

	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) {
		// create it silently if it doesn't exist
		if (!store.tiddlerExists(title)) {
			store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");

			// <<tagglyTagging expr:"...">> creates a tiddler to store its display settings
			// Make those tiddlers less noticeable by tagging as excludeSearch and excludeLists
			// Because we don't want to hide real tags, check that they aren't actually tags before doing so
			// Also tag them as tagglyExpression for manageability
			// (contributed by RA)
			if (!store.getTaggedTiddlers(title).length) {
				store.setTiddlerTag(title,true,"excludeSearch");
				store.setTiddlerTag(title,true,"excludeLists");
				store.setTiddlerTag(title,true,"tagglyExpression");
			}
		}

		// 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);
		// supposed to automagically don't let cols cycle up past the number of items
		// currently broken in some situations, eg when using an expression
		// lets fix it later when we rewrite for jquery
		// the columns thing should be jquery table manipulation probably
		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,isTagExpr) {
		switch(this.getTagglyOpt(title,"listMode")) {
			case "group":  return this.createTagglyListGrouped(place,title,isTagExpr); break;
			case "normal": return this.createTagglyListNormal(place,title,false,isTagExpr); break;
			case "commas": return this.createTagglyListNormal(place,title,true,isTagExpr); break;
			case "sitemap":return this.createTagglyListSiteMap(place,title,isTagExpr); break;
		}
	},

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

	getTiddlers: function(titleOrExpr,sortBy,isTagExpr) {
		return isTagExpr ? store.getTiddlersByTagExpr(titleOrExpr,sortBy) : store.getTaggedTiddlers(titleOrExpr,sortBy);
	},

	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,isTagExpr) {

		var list = config.taggly.getTiddlers(title,this.getTagglyOpt(title,"sortBy"),isTagExpr);

		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,isTagExpr) {
		var sortBy = this.getTagglyOpt(title,"sortBy");
		var sortOrder = this.getTagglyOpt(title,"sortOrder");

		var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);

		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,isTagExpr) {

		var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);

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

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

		var childOutput = "";

		if (depth > this.config.siteMapDepthLimit)
			childOutput += indent + this.lingo.tooDeepMessage;
		else
			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,false);

		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,isTagExpr) {
		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"),isTagExpr);
		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 parsedParams = paramString.parseParams("tag",null,true);
				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);

				var tag = getParam(parsedParams,"tag");
				var expr = getParam(parsedParams,"expr");

				if (expr) {
					refreshContainer.setAttribute("isTagExpr","true");
					refreshContainer.setAttribute("title",expr);
					refreshContainer.setAttribute("showEmpty","true");
				}
				else {
					refreshContainer.setAttribute("isTagExpr","false");
					if (tag) {
        				refreshContainer.setAttribute("title",tag);
						refreshContainer.setAttribute("showEmpty","true");
					}
					else {
        				refreshContainer.setAttribute("title",tiddler.title);
						refreshContainer.setAttribute("showEmpty","false");
					}
				}
				this.refresh(refreshContainer);
			},

			refresh: function(place) {
				var title = place.getAttribute("title");
				var isTagExpr = place.getAttribute("isTagExpr") == "true";
				var showEmpty = place.getAttribute("showEmpty") == "true";
				removeChildren(place);
				addClass(place,"tagglyTagging");
				var countFound = config.taggly.getTiddlers(title,'title',isTagExpr).length
				if (countFound > 0 || showEmpty) {
					var lingo = config.taggly.lingo;
					config.taggly.createListControl(place,title,"hideState");
					if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
						createTiddlyElement(place,"span",null,"tagglyLabel",
								isTagExpr ? lingo.labels.exprLabel.format([title]) : 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,isTagExpr);
						if (countFound == 0 && showEmpty)
							createTiddlyElement(place,"div",null,"tagglyNoneFound",lingo.labels.noneFound);
					}
				}
			}
		}
	},

	// 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; }",
".tagglyNoneFound { margin-left:2em; color:[[ColorPalette::TertiaryMid]]; font-size:90%; font-style:italic; }",
"/*}}}*/",
		""].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;
	}
});

//}}}

!TaskOverview based on the status tags for action items
!!Extended version based on [[TiddlerListMacro]]
example code for the "#future" list:
{{{<<tiddlerList tags:"#queued" order:"modified" itemTemplate:"<<tiddler cycleTags with: CycleAction %0 $))%link\n">>}}}
<<tiddler Show with: {{
var out='| !task overview |>|>|>|>|h\n| future | queued | next | done | waiting |h\n';
var a,as=['#future','#queued','#next','#done','#waiting'];
for(a=0;a<as.length;a++)out+='|<<tiddlerList tags:"'+as[a]+'" order:"modified" itemTemplate:"<<tiddler CycleTags with: CycleAction %0 $))%link\\n">\>';
out+'|';}}>>
!Simple version based on the standard list macro
example code for the "queued" list:
{{{<<list filter [tag[queued]][sort[-modified]]>>>}}}
| !task overview |>|>|>|>|h
| future | queued | next | done | waiting |h
|<<list filter [tag[#future]][sort[-modified]]>>|<<list filter [tag[#queued]][sort[-modified]]>>|<<list filter [tag[#next]][sort[-modified]]>>|<<list filter [tag[#done]][sort[-modified]]>>|<<list filter [tag[#waiting]][sort[-modified]]>>|
It is being tagged [[Urgent]] which itself contains the following css definition for the field {{{tagcolor}}}...
<<tiddler Show with: {{'{{{\n'+store.getValue('Urgent','tagcolor')+'\n}\}\}';}}>>
/***
|''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;
}

//}}}
...the singlefile wiki under this hood.
|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">>|
[[...they guy who wrote this stuff!|Tobias Beer]]
The guy who also created [[tbGTD|http://tbGTD.tiddlyspot.com]] and provided you with [[vertical tabs|http://verticaltabs.tiddlyspot.com]] and his version of a [[RatingMacro|http://lastfm.tiddlyspot.com/#RatingMacro]].
...the author
/***
|''Name:''|ToggleSideBarTB|
|''Description''|allows to toggle left and right sidebar|
|''Version:''|1.1|
|''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:"â—„",
    lblToggle:"toggle %0",
    leftBarID:"mainMenu",leftBarLbl:"main menu",
    leftBarHide:"margin-left:1em;",leftBarShow:"margin-left:18 em;",
    rightBarID:"sidebar",rightBarLbl:"sidebar",
    rightBarHide:"margin-right:1em;",rightBarShow:"margin-right:19.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?'':s.lblToggle.format([(l?s.leftBarLbl:s.rightBarLbl)]));
    var fct=function(){config.macros.toggleSideBarTB.toggle(btnId)};
    document.getElementById(el).setAttribute("toggle","hide");
    createTiddlyButton(place,arr,lbl,fct,"button HideSideBarButton",btnId);
    if(h)config.macros.toggleSideBarTB.toggle(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;
  }
}
//}}}
<<tiddler  Show with: {{
var a=[],fst=true,ok=false,s='',t,tid,tgs,tmp=place;
do{if(fst)fst=false;else tid=tmp;tmp=story.findContainingTiddler(tmp);}while(tmp&&tid!=tmp);
tid=tid?store.getTiddler(tid.getAttribute('tiddler')):null;
store.getTaggedTiddlers('Action').map(function(t){a.push(t.title);});
store.getTaggedTiddlers('Priority').map(function(t){a.push(t.title);});
if(a&&tid&&tid.tags.containsAny(a))
	s='<<tiddler CycleTags with: CyclePriority>\>';
'<<tiddler CycleTags with: CycleAction>\>'+s;}}>>
|~ViewToolbar|closeTiddler closeOthers +editTiddler > fields syncing permalink references jump <|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|

/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{

// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'coloredlinks';

// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too

// disable autosave in d3
if (window.location.protocol != "file:")
	config.options.chkGTDLazyAutoSave = false;

// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
	SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
	SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
	OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
	DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
	MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}

// create some shadow tiddler content
merge(config.shadowTiddlers,{

'TspotOptions':[
 "tiddlyspot password:",
 "<<option pasUploadPassword>>",
 ""
].join("\n"),

'TspotControls':[
 "| tiddlyspot password:|<<option pasUploadPassword>>|",
 "| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . .  " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
 "| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),

'WelcomeToTiddlyspot':[
 "This document is a ~TiddlyWiki from tiddlyspot.com.  A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //What now?// &nbsp;&nbsp;@@ Before you can save any changes, you need to enter your password in the form below.  Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
 "<<tiddler TspotControls>>",
 "See also GettingStarted.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working online// &nbsp;&nbsp;@@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// &nbsp;&nbsp;@@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick.  You can make changes and save them locally without being connected to the Internet.  When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Help!// &nbsp;&nbsp;@@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]].  Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help.  If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
 "",
 "@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// &nbsp;&nbsp;@@ We hope you like using your tiddlyspot.com site.  Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),

'TspotSidebar':[
 "<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . .  " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n")

});
//}}}
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
	major: 4, minor: 1, revision: 3,
	date: new Date("Feb 24, 2008"),
	source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	coreVersion: '2.2.0'
};

//
// Environment
//

if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false;	// true to activate both in Plugin and UploadService
	
//
// Upload Macro
//

config.macros.upload = {
// default values
	defaultBackupDir: '',	//no backup
	defaultStoreScript: "store.php",
	defaultToFilename: "index.html",
	defaultUploadDir: ".",
	authenticateUser: true	// UploadService Authenticate User
};
	
config.macros.upload.label = {
	promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
	promptParamMacro: "Save and Upload this TiddlyWiki in %0",
	saveLabel: "save to web", 
	saveToDisk: "save to disk",
	uploadLabel: "upload"	
};

config.macros.upload.messages = {
	noStoreUrl: "No store URL in parmeters or options",
	usernameOrPasswordMissing: "Username or password missing"
};

config.macros.upload.handler = function(place,macroName,params) {
	if (readOnly)
		return;
	var label;
	if (document.location.toString().substr(0,4) == "http") 
		label = this.label.saveLabel;
	else
		label = this.label.uploadLabel;
	var prompt;
	if (params[0]) {
		prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0], 
			(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
	} else {
		prompt = this.label.promptOption;
	}
	createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};

config.macros.upload.action = function(params)
{
		// for missing macro parameter set value from options
		if (!params) params = {};
		var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
		var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
		var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
		var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
		var username = params[4] ? params[4] : config.options.txtUploadUserName;
		var password = config.options.pasUploadPassword; // for security reason no password as macro parameter	
		// for still missing parameter set default value
		if ((!storeUrl) && (document.location.toString().substr(0,4) == "http")) 
			storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
		if (storeUrl.substr(0,4) != "http")
			storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
		if (!toFilename)
			toFilename = bidix.basename(window.location.toString());
		if (!toFilename)
			toFilename = config.macros.upload.defaultToFilename;
		if (!uploadDir)
			uploadDir = config.macros.upload.defaultUploadDir;
		if (!backupDir)
			backupDir = config.macros.upload.defaultBackupDir;
		// report error if still missing
		if (!storeUrl) {
			alert(config.macros.upload.messages.noStoreUrl);
			clearMessage();
			return false;
		}
		if (config.macros.upload.authenticateUser && (!username || !password)) {
			alert(config.macros.upload.messages.usernameOrPasswordMissing);
			clearMessage();
			return false;
		}
		bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password); 
		return false; 
};

config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir) 
{
	if (!storeUrl)
		return null;
		var dest = bidix.dirname(storeUrl);
		if (uploadDir && uploadDir != '.')
			dest = dest + '/' + uploadDir;
		dest = dest + '/' + toFilename;
	return dest;
};

//
// uploadOptions Macro
//

config.macros.uploadOptions = {
	handler: function(place,macroName,params) {
		var wizard = new Wizard();
		wizard.createWizard(place,this.wizardTitle);
		wizard.addStep(this.step1Title,this.step1Html);
		var markList = wizard.getElement("markList");
		var listWrapper = document.createElement("div");
		markList.parentNode.insertBefore(listWrapper,markList);
		wizard.setValue("listWrapper",listWrapper);
		this.refreshOptions(listWrapper,false);
		var uploadCaption;
		if (document.location.toString().substr(0,4) == "http") 
			uploadCaption = config.macros.upload.label.saveLabel;
		else
			uploadCaption = config.macros.upload.label.uploadLabel;
		
		wizard.setButtons([
				{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption, 
					onClick: config.macros.upload.action},
				{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
				
			]);
	},
	options: [
		"txtUploadUserName",
		"pasUploadPassword",
		"txtUploadStoreUrl",
		"txtUploadDir",
		"txtUploadFilename",
		"txtUploadBackupDir",
		"chkUploadLog",
		"txtUploadLogMaxLine"		
	],
	refreshOptions: function(listWrapper) {
		var opts = [];
		for(i=0; i<this.options.length; i++) {
			var opt = {};
			opts.push();
			opt.option = "";
			n = this.options[i];
			opt.name = n;
			opt.lowlight = !config.optionsDesc[n];
			opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
			opts.push(opt);
		}
		var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
		for(n=0; n<opts.length; n++) {
			var type = opts[n].name.substr(0,3);
			var h = config.macros.option.types[type];
			if (h && h.create) {
				h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
			}
		}
		
	},
	onCancel: function(e)
	{
		backstage.switchTab(null);
		return false;
	},
	
	wizardTitle: "Upload with options",
	step1Title: "These options are saved in cookies in your browser",
	step1Html: "<input type='hidden' name='markList'></input><br>",
	cancelButton: "Cancel",
	cancelButtonPrompt: "Cancel prompt",
	listViewTemplate: {
		columns: [
			{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
			{name: 'Option', field: 'option', title: "Option", type: 'String'},
			{name: 'Name', field: 'name', title: "Name", type: 'String'}
			],
		rowClasses: [
			{className: 'lowlight', field: 'lowlight'} 
			]}
};

//
// upload functions
//

if (!bidix.upload) bidix.upload = {};

if (!bidix.upload.messages) bidix.upload.messages = {
	//from saving
	invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
	backupSaved: "Backup saved",
	backupFailed: "Failed to upload backup file",
	rssSaved: "RSS feed uploaded",
	rssFailed: "Failed to upload RSS feed file",
	emptySaved: "Empty template uploaded",
	emptyFailed: "Failed to upload empty template file",
	mainSaved: "Main TiddlyWiki file uploaded",
	mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
	//specific upload
	loadOriginalHttpPostError: "Can't get original file",
	aboutToSaveOnHttpPost: 'About to upload on %0 ...',
	storePhpNotFound: "The store script '%0' was not found."
};

bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
	var callback = function(status,uploadParams,original,url,xhr) {
		if (!status) {
			displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
			return;
		}
		if (bidix.debugMode) 
			alert(original.substr(0,500)+"\n...");
		// Locate the storeArea div's 
		var posDiv = locateStoreArea(original);
		if((posDiv[0] == -1) || (posDiv[1] == -1)) {
			alert(config.messages.invalidFileError.format([localPath]));
			return;
		}
		bidix.upload.uploadRss(uploadParams,original,posDiv);
	};
	
	if(onlyIfDirty && !store.isDirty())
		return;
	clearMessage();
	// save on localdisk ?
	if (document.location.toString().substr(0,4) == "file") {
		var path = document.location.toString();
		var localPath = getLocalPath(path);
		saveChanges();
	}
	// get original
	var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
	var originalPath = document.location.toString();
	// If url is a directory : add index.html
	if (originalPath.charAt(originalPath.length-1) == "/")
		originalPath = originalPath + "index.html";
	var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
	var log = new bidix.UploadLog();
	log.startUpload(storeUrl, dest, uploadDir,  backupDir);
	displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
	if (bidix.debugMode) 
		alert("about to execute Http - GET on "+originalPath);
	var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

bidix.upload.uploadRss = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		if(status) {
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
			bidix.upload.uploadMain(params[0],params[1],params[2]);
		} else {
			displayMessage(bidix.upload.messages.rssFailed);			
		}
	};
	// do uploadRss
	if(config.options.chkGenerateAnRssFeed) {
		var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
		var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
		var rssString = generateRss();
		// no UnicodeToUTF8 conversion needed when location is "file" !!!
		if (document.location.toString().substr(0,4) != "file")
			rssString = convertUnicodeToUTF8(rssString);	
		bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
	} else {
		bidix.upload.uploadMain(uploadParams,original,posDiv);
	}
};

bidix.upload.uploadMain = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		var log = new bidix.UploadLog();
		if(status) {
			// if backupDir specified
			if ((params[3]) && (responseText.indexOf("backupfile:") > -1))  {
				var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
				displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
			}
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
			store.setDirty(false);
			log.endUpload("ok");
		} else {
			alert(bidix.upload.messages.mainFailed);
			displayMessage(bidix.upload.messages.mainFailed);
			log.endUpload("failed");			
		}
	};
	// do uploadMain
	var revised = bidix.upload.updateOriginal(original,posDiv);
	bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};

bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
	var localCallback = function(status,params,responseText,url,xhr) {
		url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
		if (xhr.status == 404)
			alert(bidix.upload.messages.storePhpNotFound.format([url]));
		if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
			alert(responseText);
			if (responseText.indexOf("Debug mode") >= 0 )
				responseText = responseText.substring(responseText.indexOf("\n\n")+2);
		} else if (responseText.charAt(0) != '0') 
			alert(responseText);
		if (responseText.charAt(0) != '0')
			status = null;
		callback(status,params,responseText,url,xhr);
	};
	// do httpUpload
	var boundary = "---------------------------"+"AaB03x";	
	var uploadFormName = "UploadPlugin";
	// compose headers data
	var sheader = "";
	sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
	sheader += uploadFormName +"\"\r\n\r\n";
	sheader += "backupDir="+uploadParams[3] +
				";user=" + uploadParams[4] +
				";password=" + uploadParams[5] +
				";uploaddir=" + uploadParams[2];
	if (bidix.debugMode)
		sheader += ";debug=1";
	sheader += ";;\r\n"; 
	sheader += "\r\n" + "--" + boundary + "\r\n";
	sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
	sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
	sheader += "Content-Length: " + data.length + "\r\n\r\n";
	// compose trailer data
	var strailer = new String();
	strailer = "\r\n--" + boundary + "--\r\n";
	data = sheader + data + strailer;
	if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
	var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
	if (!posDiv)
		posDiv = locateStoreArea(original);
	if((posDiv[0] == -1) || (posDiv[1] == -1)) {
		alert(config.messages.invalidFileError.format([localPath]));
		return;
	}
	var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
				store.allTiddlersAsHtml() + "\n" +
				original.substr(posDiv[1]);
	var newSiteTitle = getPageTitle().htmlEncode();
	revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
	revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
	revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
	revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
	revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
	return revised;
};

//
// UploadLog
// 
// config.options.chkUploadLog :
//		false : no logging
//		true : logging
// config.options.txtUploadLogMaxLine :
//		-1 : no limit
//      0 :  no Log lines but UploadLog is still in place
//		n :  the last n lines are only kept
//		NaN : no limit (-1)

bidix.UploadLog = function() {
	if (!config.options.chkUploadLog) 
		return; // this.tiddler = null
	this.tiddler = store.getTiddler("UploadLog");
	if (!this.tiddler) {
		this.tiddler = new Tiddler();
		this.tiddler.title = "UploadLog";
		this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
		this.tiddler.created = new Date();
		this.tiddler.modifier = config.options.txtUserName;
		this.tiddler.modified = new Date();
		store.addTiddler(this.tiddler);
	}
	return this;
};

bidix.UploadLog.prototype.addText = function(text) {
	if (!this.tiddler)
		return;
	// retrieve maxLine when we need it
	var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
	if (isNaN(maxLine))
		maxLine = -1;
	// add text
	if (maxLine != 0) 
		this.tiddler.text = this.tiddler.text + text;
	// Trunck to maxLine
	if (maxLine >= 0) {
		var textArray = this.tiddler.text.split('\n');
		if (textArray.length > maxLine + 1)
			textArray.splice(1,textArray.length-1-maxLine);
			this.tiddler.text = textArray.join('\n');		
	}
	// update tiddler fields
	this.tiddler.modifier = config.options.txtUserName;
	this.tiddler.modified = new Date();
	store.addTiddler(this.tiddler);
	// refresh and notifiy for immediate update
	story.refreshTiddler(this.tiddler.title);
	store.notify(this.tiddler.title, true);
};

bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir,  backupDir) {
	if (!this.tiddler)
		return;
	var now = new Date();
	var text = "\n| ";
	var filename = bidix.basename(document.location.toString());
	if (!filename) filename = '/';
	text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
	text += config.options.txtUserName + " | ";
	text += "[["+filename+"|"+location + "]] |";
	text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
	text += uploadDir + " | ";
	text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
	text += backupDir + " |";
	this.addText(text);
};

bidix.UploadLog.prototype.endUpload = function(status) {
	if (!this.tiddler)
		return;
	this.addText(" "+status+" |");
};

//
// Utilities
// 

bidix.checkPlugin = function(plugin, major, minor, revision) {
	var ext = version.extensions[plugin];
	if (!
		(ext  && 
			((ext.major > major) || 
			((ext.major == major) && (ext.minor > minor))  ||
			((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
			// write error in PluginManager
			if (pluginInfo)
				pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
			eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
	}
};

bidix.dirname = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(0, lastpos);
	} else {
		return filePath.substring(0, filePath.lastIndexOf("\\"));
	}
};

bidix.basename = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("#")) != -1) 
		filePath = filePath.substring(0, lastpos);
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(lastpos + 1);
	} else
		return filePath.substring(filePath.lastIndexOf("\\")+1);
};

bidix.initOption = function(name,value) {
	if (!config.options[name])
		config.options[name] = value;
};

//
// Initializations
//

// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);

// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");

//optionsDesc
merge(config.optionsDesc,{
	txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
	txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
	txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
	txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
	txtUploadUserName: "Upload Username",
	pasUploadPassword: "Upload Password",
	chkUploadLog: "do Logging in UploadLog (default: true)",
	txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});

// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');


// Backstage
merge(config.tasks,{
	uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");


//}}}

The category for urgent items...
<!--{{{-->
<div class='toolbar'>
  <span macro='tiddler ToolbarAction'></span>
  <span macro="tagsearch source:'TagSearchConfig##Tags' exclude:'' label:'tags ' tooltip:'Set tags' more:'TagSearchConfig##More' mode:0 toolbar"></span>
  <span macro='tiddler newHere'></span>
  <span macro='toolbar [[ToolbarCommands::ViewToolbar]]'></span>
</div>
<div class="tagglyTagged" macro="tags"></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>

<!--REPLACED WITH TAGGLYTAGGED
<div class='tagged' macro='tags'></div>
-->

<div class='viewer' macro='view text wikified'></div>
<div macro='showWhenTagged Tagging2'><div class='tagging' macro='tiddler Tagging2 with: {{tiddler.title}}'></div></div>
<div macro='else'><div macro='hideWhenTagged noTagging'><div class='tagging' macro='tagging'></div></div></div>
<div class='tagClear'></div>
<!--}}}-->
{{title{ColoredLinksPlugin}}} is a TiddlyWiki plugin {{title{inspired by [[siglets|http://userweb.cs.utexas.edu/~joeraii/siglet/]]}}}.

Depending on how the target tiddlers are tagged it produces tiddlyLinks like these...
*an inline [[RedLink]] [[GreenLink]] or [[BlueLink]] or...
*a [[GreenLink]] and...
*a [[BlueLink]]
It adds css styling to {{title{any tiddlyLink}}} or tag-button depending on whether the corresponding tiddler {{title{has tags}}} and...
#starting left in the tags array {{title{any tag}}} of the corresponding tiddler
#*has a defined value for a field called {{title{tagcolor}}} containing __valid css__ or...
#the first tag is being styled via {{{[firsttag='TagName']}}} in your {{title{StyleSheet}}}
#*{{{firsttag}}} is an attribute that is going to be assigned to the ~DOM-node that is the tiddlyLink
#*if a tag with a value for {{{tagcolor}}} had been found it will also be assigned as the value of {{{firsttag}}}
#*otherwise, {{{firsttag}}} refers to the first of a tiddler's tags even if that does not have a color definition via {{{tagcolor}}}
!Use case
Think of it as color coding. Do you have tiddlers pertaining to a given tag-category and want them color coded? With ColoredLinksPlugin you simply attach a css definition to the category-tag and you're all set. For example... [[This is an urgent item!]].

ColoredLinksPlugin proves quite powerful in combination with [[CycleTags]]. Check out this [[example task|an example task]] and especially its toolbar.

You could also add colors like side-labels, giving tiddlers [[a left border]], [[dotted top and bottom borders]] or any other css styling.

ColoredLinksPlugin adds styles to...
*tiddlyLinks, e.g. [[an example task]]
*tag-buttons (optional), e.g. <<tag '1 high'>> or [[1 high]]
*tiddler titles (optional) ...open [[an example task]]
!Styles
You can define the {{title{default style}}} for a colored link in your StyleSheet by defining css properties for the class {{{coloredLink}}} like so...
{{{
.coloredLink{border:1px solid transparent;padding:0 4px !important;}
}}}
Note that in some cases it might be necessary to prioritize the rule with the keyword {{{!important}}}.

As explained above, tiddlyLinks for which the corresponding tiddler has tags will be assigned a {{{firsttag}}} attribute with the first of its tags with a valid color definition via {{{tagcolor}}} or otherwise with it's first tag. You could therefore also use the following css, which however does not work in Internet Explorer!
{{{
.viewer [firsttag='blue']:hover{background:blue !important;color:white;}
}}}
!Editing the field 'tagcolor'
For editing the tiddler-field {{{tagcolor}}} you can modify your EditTemplate by inserting the following to the end of it...
{{{
<div macro='edit tagcolor' style="margin-top:1em;">
	<span class='label' style="margin-right:10px;">Tag Color (valid css!):</label>
</div>
}}}
Try editing this tiddler and you will find such an edit field.

You could also use a flield-editor like FE2, which you can access in this wiki by clicking on the {{button{+}}} in the toolbar and then on <<toolbar fields>>

The following would be a valid input for defining the color of the category [[red]]...
<<tiddler Show with: {{'{{{\n'+store.getValue('red','tagcolor')+'\n}\}\}';}}>>
!Important!
#When using ColoredLinksPlugin the tag-order for your tiddlers is relevant.
#The field value for {{{tagcolor}}} must contain valid css otherwise you will get an error for invalid JSON.
#The class {{{coloredLink}}} is only assigned to a tiddlyLink when the field {{{tagcolor}}} has a valid css definition.
#If you tag a tiddler with {{{noColor}}} no tiddlyLink in it nor in any transcluded tiddlers in it will be colored.
If you are not always making use of the field {{{tagcolor}}} while nevertheless using the attribute {{{firsttag}}} in your css you can make sure that consistent styles are being applied by simplifying your StyleSheet using slices like so...
{{{
/*
TagColor:border:1px solid transparent;padding:0 4px;
*/
.coloredLink{[[StyleSheet::TagColor]];}
[firsttag='blue']:hover{[[StyleSheet::TagColor]];background:blue !important;}
[firsttag='green']:hover{[[StyleSheet::TagColor]];background:green !important;}
}}}
!Options
At the beginning of the plugin code you will find the following parameters...
| !Parameter | !Default | !Meaning |h
|{{{colorTags}}}|{{{true}}}|a boolean defining whether you want the defining category tag to be colored as well<br>when tagged itself with another tag providing a value for {{{tagcolor}}} the latter will be used instead!|
|{{{colorTitles}}}|{{{true}}}|a boolean defining whether you want to style the tiddler titles too|
|{{{titleSelector}}}|{{{'div.title'}}}|the css selector used to identify the tiddler title|
|{{{excludeTagged}}}|{{{'noColor'}}}|a bracketedList of tags whereas for all tiddlers tagged such no links will be colored, e.g. MainMenu|
You could change these parameters right in the plugin or set them via a [[configuration tiddler|zzConfig]] tagged systemConfig like so...
{{{
config.extensions.coloredLinks.colorTags=false;
}}}
!Change Notes
*1.0.3
**fixed bug where blanks in the css definition would prohibit them from working
*1.0.2
**fixed bug in {{{Story.prototype.refreshTiddler}}} that caused the backstage area to fail
*1.0.1
**changed tag detection
***previously only checked the first tag
***now looks for any tag in a tiddlers tags that has a color definition
***color is now determined by the first tag to have a color definition
*1.0.0
**initial release
!Version history
<<tiddler ColoredLinksLegacy>>
Is in the [[Bookmarks Category|Bookmark]]...
Take a look at the context sensitive {{button{buttons}}} to the left of [[this tiddler's|an example task]] toolbar which allow you to...
*turn a tiddler into an action item
*change (or remove) it's action status
*assign priorities
These buttons are context sensitive in that you can only set a priority for any tiddler that is already tagged with an <<tag Action>> category or which already has a <<tag Priority>> assigned.

See ViewTemplate for how CycleTags it is being integrated in the toolbar and ToolbarAction for the code which renders the buttons context sensitive.

Belongs to [[Some Fancy Category]]...


<<tiddler {{readOnly?'':'newHere##SHOW';}}>>/%
!SHOW
<<newTiddler "New tiddler" tag:{{here=story.findContainingTiddler(place);here?here.getAttribute('tiddler'):'';}}>><<rB "new" "Add a new tiddler tagging to this one">>
!END%/





<<toggleSideBarTB left show>>
//{{{
//shortcuts
var c=config,co=c.options,cc=c.commands,cm=c.macros,cmg=c.messages,cv=c.views;

co.chkAnimate=false;
co.chkAutoSave=(window.location.protocol=="file:");
co.chkHttpReadOnly=false;//visitors can edit
co.chkSaveBackups=true;//backups in this folder
co.chkInsertTabs=true;//tab as tab when editing
co.txtBackupFolder='_backup';//autosave when local
co.txtIncrementalSearchMin=2;
co.chkUploadLog=false;
co.chkSidebarTabs=true;

readOnly=!co.chkAutoSave;
showBackstage=!readOnly;

cv.editor.tagChooser.text='tags...';
cv.editor.defaultText="";//no text for a new tiddler
cv.wikified.defaultText="";//no msg when no tiddler
cv.wikified.tag.labelTags="";
cv.wikified.tag.labelNoTags="";
cv.wikified.tag.openTag= "Open '%0'";
cv.wikified.tag.otherTags= "Others from '%0'";

merge(cm.toolbar,{moreLabel:'+',lessLabel:'-'});
merge(c.messages.backstage,{open:{text:''},close:{text:''}});
//see ViewTemplate

//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";
cm.tagging.label="Tagging tiddlers...";

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

Story.prototype.findOuterTiddler = function(e){
var l,t;
do{
		t=e&&e.getAttribute?e.getAttribute('tiddler'):null;
		l=t?e:l;
		e=e.parentNode;
}while(e);
return l?l.getAttribute('tiddler'):'';
}

//}}}