kuraku@TiddlyWiki is loading ...

Requires Javascript.
クラク@TiddlyWiki - HowTo/FAQ/Plugin
<!--{{{-->
<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]];}

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

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

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

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

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

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

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

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

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

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

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

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

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

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

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='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>>
*[X]fold/unfold をヴィジュアル的にやりたい
*--[ ]突然アウトラインフォントになる件調査 (ブラウザ設定の問題かも)-- (ブラウザの問題の様)
**フォントの件は、[[こちら|http://mix-mplus-ipa.sourceforge.jp/]] のフォントをインストールしたら、小さい文字でもアウトライン表示されるようになった。こんな解決でいいのか分からないが...
*[X]plugin、macro の使い方、効能をまとめる
**[X]HaloscanMacro
**[X]CollapseTiddlersPlusPlugin
*[X]Calendar の日付 dropdown を見やすく
**Blueberry2Style のみ対応した
*[X]HoverMenu の「s」で 「save to web」できるように
*[X]hold/unhold plugin CollapseTiddlersPlusPlugin インストール
HoverMenu の 「s (saveChanges)」が出てこない。
原因不明。save の機構に手を入れてあるからかもしれない。
これがあるとずいぶん便利なのだが。
!!Upgrade
RenameTagsPlugin は 2.1 からしか使えないようだ。
ver 2.0.11 であるからして使えない。

2.1に上げることはできるだろうか?

!!Main Menu tips
MainMenu は縦より横に並べた方が良いようだ。
追記(2006.10.06): ↑ というメニューの場合は、である。SideMenu にしたいなら縦にしないと

!!plugin tag
{{{
<<tag Plugins|plugins>>
}}}
という記述で「plugins」タグリストを持つボタンになる。

!!Ver 2.1 Upgrade
Ver 2.1へ上げてみる。
See:[[TiddlyWiki 2.1 Approaches|http://tiddlyspot.com/blog/archives/general/tiddlywiki-21-approaches/]]

#tiddlyspot から download (これを絶対 backup しておく)
#download したファイルを 2.1 に upgrade
##通常の TiddlyWiki の verUp 手順
##ブラウザでローカルの TiddlyWiki ファイルを開いた状態にして
##Ver 2.1 の download をしてローカルファイルを上書き
##開いてあったローカルの TiddlyWiki で save
##それを reload する
#そして upload

結果、options にあったパスワード入力フィールドが消えた。([[Welcome|Welcome to your tiddlyspot.com site!]] からセット可能)
他にもなにかあるかもしれない。

追記:
*とつぜんアウトラインフォントになるときがある。なにかのタイミングで戻ったりする。キモチ悪い。
*IE では tagCloud、upload plugin が使えなくなった。なにかあるようだ、よく分からない。

!!!新機能 Ver2.1
[[NewVersion 2.1]] を貰ってきて置いておく(タイトルは変えた)
ImportTiddlers PluginManager が大きな変更になるのかな。

PluginManager はかなり嬉しい機能。タグ sysytemConfigDisable を付加したり消したりして on/off するようだ、こういったまとめて管理機能がもっと欲しい。
ImportTiddlers はまだ試してない。

2.1 にしたことで RenameTagsPlugin が使用可能になった。僕の様にあまり考えずに付けたタグをまとめたりするのに便利だろう。

!!気になること
自分の TiddlyWiki を幾つか開いて作業していると、情報が錯綜するときがある。(username が移動していたりして) Bug か?? 使い方が悪いのか?

UploadLog がグングン伸びて行くのだが、消しても作られるのだろうか??→[[2006.10.11]]
!!importTiddlers
Ver 2.1 より実装された ImportTiddlers はかなり素敵。

ネット上にある tiddler なら URL を、PC上であれば file を指定して fetch する。
少し待たされてリストが一覧される。この中から欲し tiddler をチェックしてプルダウンから 「Import these tiddlersl」をすると import される。
import というだけあってすぐに自分の Timeline には出てこないし、やってみるとレイアウトの乱れがあったりするが reload すれば大丈夫。

plugin の投入などはずいぶん楽になるし、なんと云っても複数の tiddler のコピーができるのだ。

!!ToDo リスト
仕事で使っている ToDoリストは CheckboxPlugin と NestedSlidersPlugin を組み合わせて使用している。

!!!Todo sample (開いてください)
+++(todo)[todo >]
*Bug 対応+++(todo)
**ToDo: [X]調査 [X]修正作業 [X]テスト [ ]リリース
**調査
***[X]再度確認
***[_]レポート提出
***[ ]リリース
===

*新規案件+++(todo)
**設計フェーズ
***[X]基本設計
***[_]詳細設計
****[ ]I/F設計
===

===
{{{
+++(todo)[todo >]
*Bug 対応+++(todo)
**ToDo: [X]調査 [ ]修正作業 [ ]テスト [ ]リリース
**調査
***[X]再度確認
***[ ]レポート提出
***[ ]リリース
===

*新規案件+++(todo)
**設計フェーズ
***[X]基本設計
***[ ]詳細設計
****[ ]I/F設計
===

===
}}}
open/close の状態を cookie で覚えている。
syntax については NestedSlidersPlugin を。

!!checkbox と tiddler XX
{{{
<<tiddler XX>>
}}}
とすると XX の内容が表示されるが。XX の内容に checkbox を含んでいると大変なことになる。

!!showClock
ShowClockMacro を追加。SideBar に表示。
!!Cool Site
[[TiddlyWiki's Cool Site]] を修正。

!!レイアウト
EditTemplate を修正。「Type tags...」をタグ入力エリアの上に。
existing tags を使うときに楽かなと思い。

!!top リンク
ずっと思っていたのだが View の jump プルダウンに top があってもいいかな、と。
しかし考えてみれば一番上のものを指定すれば top に飛ぶことに気付く。
HoverMenu→ もあるしね。

!!TiddlySpot verUp
いつしか TiddlySpot の初期テンプレートが ver2.1.2 になっている。
簡単に Upgrade する方法は提供されていないのだろうか。
!!UploadLog
UploadLog は消せばまた作られるのを確認。
定期的に消すべきかもしれない。(save が劇的に早くなるわけではないが)

!!Upgrade
http://tiddlywikiguides.org/index.php?title=Upgrading_your_TiddlyWiki_to_2.1.x
で問題ないのだと思う。
以前 ver2.1 へ上げたときとけっきょく同じ方法であった。
「1click で Upgrade」をちょっと期待したのだが。

ver2.1.2 へ問題無く Upgrade。
確認→「<<version>>」
!!改変することについて
使えそうな Plugin や Macro を自分の TiddlyWiki にどんどん組み入れていくところにこのツールの醍醐味があるのだが。
けっこう自分向けに表示フォーマットを変えたりしている。ソース元が plugin の tiddler に示されていれば変更は問題ないと思うが。
ただただソースが書いてあるものについて手を入れたりするのは少し抵抗がある。どうしたものか。

!!YourSearchPlugin
YourSearchPlugin を入れてみた。
検索結果がたくさんあると時間がかかったり、キーインの途中で探し始めたりしてストレスであったが、それが無くなるかも。

また、
>'Search As You Type' Mode (No RETURN required to start search)
のチェックをしておけば検索文字入力の途中でガリガリと検索を始めることはなく、リターンを押すまで待ってくれる。
!!AutoCloseMessagePlugin
AutoCloseMessagePlugin を入れた。
save したときなどに右上に出るメッセージを一定時間で消すもの。

!!DatePlugin
Calendar と一緒に動かせば良かったのか。どうして必要なのかあまり分からなかった・・
しかし日付プルダウンが見難い。文字をヌキにしたいところだが。
あと、休日が「欧米か!?」ってなっている。

!!ReminderMacros
ReminderMacros とともに、[[Holidays]] を自分で入れてみた。間違っているかも。
!!Todo
*Calendar の日付 dropdown を見やすく
*HoverMenu の「s」で 「save to web」できるように
!!RSS
RSS の出力をしようとしたが。
どうでもよい修正でも RSS 出力の対象になってしまうみたいで、自分でも RSS で修正をチェックしようという気にならない。

RSS出力を制御できるタグなど設定できるとありがたいのだが。

RssReaderMacro(改) を入れてみるがエラーになってしまう。XMLHttpRequest がうまく行かないのか。
そう云えば ImportTiddlers もうまく行っていない。
そもそも TiddlySpot では XMLHttpRequest はできないのか?
→__download したファイルからはできるようだ。__

!!FaviconMacro
FaviconMacro を入れてみた。
うまく行くが、ちゃんとしたのにシタイ。
→とりあえず変えてみたが・・ ダメかも、手抜きだし。ちゃんとしたの作ろう。
!!~TiddlyWiki の良いところ
仕事で使っているの TiddlyWiki が、まぁ色々入れてみたりした結果 1MB に逹っしようとしている今。TiddlyWikiのウリのトップに挙げられるであろう ''1ファイルが全て'' であるということについて、疑問が出てきてしまった。

正直、load が遅い、save 遅いのである。使い方が悪いと云われればそれまでなんだけど。

いまジブンが思う TiddlyWiki の良いところって、
*インターフェース
*拡張のし易さ
に尽きるのである。1ファイルであることの効果は TiddlySpot に移行するとしたら薄れてしまうと思うし。
いくつか perl や php で TiddlyWiki を実現しているシステムがあるようだが。いずれはサーバサイドでデータを(データベースで)持ちインターフェースを現状の使い勝手の良いものにしていくのが良いのだろうと考える。

まぁ議論し尽くされていることだろうけど。
そちらも調べておく必要アリだろう。
!!心配なので
仕事の TW で
{{{
[ ](心配なので)確認
}}}
というチェックボックスを ToDo に入れていたら。
チェックするとタグに「心配なので」が追加されることに気付いた。

しばらく、誰かに心配され続けられていると思って怖かった・・・
⇒[ ](心配なので)確認
!!save
TiddlySpot上、save したつもりで、されていないことがよくある。
なにかあるのだろうか?
save が反映されるまでにタイムラグがあるようだ。

タイムラグで変わっていない状態に気付かないままのタイミングで、再度 save したらおかしいことになるかもしれない。
このタイミングに馴れよということか。
!!HaloscanMacro
HaloscanMacro をインストール。[[HoloScan.com|http://holoscan.com/]] に登録。
使い方をまとめること ⇒[[HaloscanMacro のインストール]]

!!欲しい機能追加
<<<
<<tiddler "TiddlyWiki に欲しい機能">>
<<<
!!RSS reader
[[Proxy service available for Tiddlyspot sites|http://announce.tiddlyspot.com/#%5B%5BProxy%20service%20available%20for%20Tiddlyspot%20sites%5D%5D]]
を参考に Tiddly関連の [[RSSFeeds]] を作る。
+++
<<tiddler RSSFeeds-TiddlyWiki>>
===
*あいかわらず、突然フォントがアウトライン(ガタガタの汚ない文字) になる。なんとかしたい ⇒[[@ToDo]]
**ブラウザの問題もあるようだが

*昨日設定した RSS が表示されていない。URL を叩くと not allow になる
**なにか作業中か? 許可サイトが増えればバンザイなんだが
!!カラー
[[colors]] を見つけた良いかも (http://doc.tiddlywiki.org/#colors)

!!日記をまとめて読む
サイドバーの search テキストボックスに「2006.10.」と入れ、リターン。
開いたダイアログの上にある open all をクリック。

close all してからの方が良いかも。
!!XMLHttpRequest
仕事で使っている TW を 2.1.2 に Upgrade したところ、URL からの ImportTiddlers が使えなくなってしまった。Upgrade 前はよく import していたので使えていたことは間違いない。

XMLHttpRequest の __permission が無い__と云われてしまう、ハテ、突然なぜ?
サーバ側が許可していないということを云っているのだと思うのだけど Tiddly.com が拒絶しているとも思えず。

!!TiddlyWiki って
TW って使い方が分かってくると本当に面白い。

それでどんどん Macro や Plugin を入れて行って、どんどん使い易くなっていって。
よし、自分のカスタムした TW を他の人にも使ってもらえるくらいまでに使い勝手を良くして行くゾ、てなって。

そうやっていくウチにどんどん、どんどんページが重くなっていって、なんだぁけっきょく使い難いなぁ、なんてて。
そうならない方策をいまのうちに考えたい・・・
!!pre タグ
何度か調べてみても分からなかった pre タグの Style を変える方法があった。
(via: [[Google Group TiddlyWiki|http://groups.google.com/group/TiddlyWiki/browse_frm/thread/44737aeaa6629545/195eec939bc5099a#195eec939bc5099a]])
{{{
.viewer pre {
        font-size: 1.0em;
        line-height: 1.2em;
} 
.viewer code {
        font-size: 1.0em;
        line-height: 1.2em;
} 
}}}
pre は上記のような囲み、code は {{{code}}} こんなやつ (書式はソース参照のこと)
Blueberry2StyleSheet にだけ追記した。

!!XMLhttpRequest 
[[Google Group TiddlyWiki >Best way of handling "Permission denied method XMLHttpRequest.open"|http://groups.google.com/group/TiddlyWiki/browse_frm/thread/dee9d7933adb78a1/45d1e55363d48626?lnk=gst&q=XMLhttprequest&rnum=1#45d1e55363d48626]]という情報があったので、
<<<
In "about:config", set signed.applets.codebase_principal_support = true 
<<<
をしてみたが変わらず、ふうむ。client の問題の気がしてきた。
ということは他の人には普通に見えているのか?
!!XMLHttpRequest

[[2006.10.31]] のこと、
<<<
仕事で使っている TW を 2.1.2 に Upgrade したところ、URL からの ImportTiddlers が使えなくなってしまった。Upgrade 前はよく import していたので使えていたことは間違いない。

XMLHttpRequest の permission が無いと云われてしまう、ハテ、突然なぜ?
サーバ側が許可していないということを云っているのだと思うのだけど Tiddly.com が拒絶しているとも思えず。
<<<

これに関して、[[本家|http://tiddlywiki.com]]に関係ありそうなことが書いてあった、
(via http://tiddlywiki.com/#ImportTiddlers)
<<<
Note that the popular Firebug extension for Firefox interferes with ImportTiddlers if its "Show XMLHttpRequest" option is switched on
You cannot import tiddlers into a read-only TiddlyWiki. Try opening the TiddlyWiki file from a file:// URL
<<<

FireBug の option から、「Show XMLHttpRequest」を外したら、ImportTiddlers ができるようになった。
ローカルファイルからのみであることは変わらないが。

!!download
TiddlySpot から download して、__ローカルでファイルを開くと何も表示されない__。
今日も Upgrade 作業をしたわけだが、やはり load しても白紙のまんま。以前からのことなので分かっているのだが。

仕事で使っているローカルの Cookie が悪さをしているらしく、これを消せば問題なく表示される。
まぁ、設定をし直す必要はあるけど。
Upgrade のときは毎回そうしているけど、ジブンだけかなぁ。
!!疑問
忘れているだけかもしれないけど、

tiddler の !、!! などの項目へのリンクは付けられないのだろうか?

!!GenerateRssHijack
GenerateRssHijack を入れる。
tiddler に、「toRSS」 というタグを付けると、RSS へ書き出される対象となる。
[[Whats new]] で日記への toRSS タグ付けをチェックボックスにしてみた。

!!Whats new
[[Whats new]] を FrontPage から切り離す。DefaultTiddlers を修正。
SplashScreenPlugin を入れた。最近ロードが重いのでいいかも。

ついでに <<tag plugintips>> も書く。

SmileyPlugin を入れる <<smiley>> <<smiley :-(>> <<smiley ;-)>> <<smiley :-|>> <<smiley :-D>> 役に立つ?
{{{
 <<smiley>> <<smiley :-(>> <<smiley ;-)>> <<smiley :-|>> <<smiley :-D>> 
}}}
!!![[ForEachTiddlerPlugin]] 入れる
FrontPage に 「recent 20 tidders...」を追加。

!!![[TiddlyWiki's Cool Site]] に abegoExtensions を追加
''Your search の作成元。''
!!ConfigTweaks を作成。
Tweaks とは「ちょっとした調整」らしい。ちょっとした config はここに書く。

!!重い??
このところ tiddly 書いたあとの done が重たい なぜか?
⇒ smiley のせいかも

SmileyPlugin を外すことで落ちついた。
仕事で使っている TW が 1M を超えた。
これは記念日なのか??

!!toRSS
[[toRSS]] タグの tiddler に さいきんの 20項目をリスト。
[[toRSS]] タグが付けられるようにする。
[[HighLight Macro]] を追加。
検索時などの@@ハイライト@@ との見分けがつかないので<<hl 別にする>>。
!!!風邪でふせっておりました
風邪をこじらせました。
「めまい」がひどく仕事を数日休み。
__「ウィルスが内耳に入ると、風邪でもめまいが起きる」__とセンセイに恐しいことを云われまして。

*control panel の [[Hit Count|http://tiddlyspot.com/blog/archives/general/stats-page-is-back/]] が表示されるようになりましたね。
*カレンダーを月曜始まりに変更しました
**CalendarPluginConfig を変更
あけましておめでとうございます。
ちゃんと情報を追っていないので、とくに更新もありませんが。とくに TW の ~VerUp とかは無いですね。
[[RSSFeeds-TiddlyWiki]] になにかあるかな?
!!アウトラインフォントの件
Firefox2 にした頃から、TW を使用していると、突然フォントがアウトラインになってキタなくなってしまうということがあって。
もうこうなってしまうのが当たり前で、馴れてしまっていたのだけれど。
[[こちら|http://mix-mplus-ipa.sourceforge.jp/]](via:http://mix-mplus-ipa.sourceforge.jp/) のフォントをインストールしたら、小さい文字でもアウトライン表示されるようになった。

「circle」じゃない2つのフォントをインストールしただけで~~(M+1* だけで良いかもしれない)~~ Firefox のフォント設定は変えていない。
同じことでお困りの人は、解決にはならないが入れてみてはどうだろう。
!!TiddlerListMacro
簡単で強力なリスト機能が使えるようになる。
*TiddlerListMacroDocumentation
*TiddlerListMacroExamples
[[A-Z を作ってみた|A-Z]]。
*TiddlySpot が調子悪いのか、この TW が悪いのか「save to web」できなくなってしまった
*download > upload は問題なくできるのもまた、よく分からず (おかげで更新はできる)
*自サイトで upload に対応したくなってきた
**(前にやってみたが挫折している...)
*http://seanclarkhess.com/tw/
**Google group で見つけた。Server Side の TW のようだ。「差分だけ update する」とあるが
!!MIniTiddlyServer
*こちら([[MiniTiddlyServer|http://seanclarkhess.com/tw/]]) 設定してみるもうまく行かない
**置いて、config.php を動かすだけとあるが、その後にどうなったら正しいのかが分からず

!!GTDtwcal
*[[33ad/GTDtwcal|http://33ad.org/tools/gtdtwcal.php?month=1&year=2007&horiz=1]]
**こういうものを作ろうとするアイデアって素晴しい。

!!??
*[ Problem retrieving XML data:Not Found ]
**仕事で使用している TW でこの様なメッセージが起動時に表示されるようになってしまった
***ナニ?
****→そのまんま、XML データが取れないと云っていた。RTM の認証が通っていないので RSS が取れなかったみたい
*Whats new を変更
**TiddlerListMacro を使って、最新の日記を3件表示するようにした
**メンテナンスの必要が無くなる
こんな、
<<<
{{{<<tiddlerList search:"^200\d.\d\d.\d\d$" tiddlerList top:"3" itemTemplate:"!!!【%link】 ~~created: %created modified: %modified [ (%title|toRSS)]toRSS~~\n%text\n----\n" dateFormat:"YYYY.0MM.0DD" order:"-created">>}}}
<<<
!!引越し
tiddllyspot が不安定なので自分の借りている所へ持ってきた。
*[[http://kuraku.net/tw/|http://kuraku.net/tw/]]
いまのところ upload もうまく行っている。TiddlySpot の記述を変えるのと、HOLOSCAN の設定を変えないといけない。

download ができないことに気付く。
download.cgi (ruby) を入れてみるが 500 error だって。

!!MTS
[[MiniTiddlyServer|http://seanclarkhess.com/tw/]] サーバに置いてみたがうまく行かなかった。 ⇒[[2007.01.29]]

テストで PC 上の anhttpd と php のコンビでセットアップしてみるが。
#ドキュメントルート上に置く
#config.php でアクセス、管理画面(title:AjaxTiddlyWiki) が表示される
##admin のパスワード入力
##Wrapper Path (ie: "test.php"): mts.php
##Wiki Path (ie: "source.html"): mts.html 
#[Save and Complete] ボタン を押す
とすると、mts.php に飛んで、確かに作成された TW にアクセスできるようになる。admin にて確かに loginできる。
とまぁ、ここまではいいのだが。

new tiddler して、なにか書き。閉じ、[save changes] すると。{{{The file was saved successfully}}} 
できた、と思いつつ reload すると。
<<<
Warning: fread() [function.fread]: Length parameter must be greater than 0 in C:\Application\httpd142p\htdocs\MTSv0-6\mts.php on line 14
<<<
なんじゃらほい、と見れば TW のファイルである mts.html が空になってたり、やたらと小さいファイルになっている。どうやらいま書いたものが入っているようなのだが、本体の TW はどこぞに消えてしまった。
!!引越し後
download.cgi は動くようになった。rubyスクリプトをバイナリモードで ftp していたかららしい。
テキストで上げたらうまく行く。

poxy.cgi も置くが、RSS がうまく読み込めないみたい。
なんとかしよう。

あと、store については、tw ディレクトリの権限の other に w が要るようだ (705とか)
other が書き込みしてるのか。(lolipop での話)

!!!store.cgi
lolipop での store.cgi の使い方がよく分からずいろいろしてみた。

結果、CGI は 自分のユーザ で SuExec することと、PHP は apacheユーザで実行されるっぽいことが分かった。
そして、ruby スクリプト (store.cgi) は パーミッション o+w (other の write ON) のディレクトリでは実行できないらしい。

download.cgi、proxy.cgi などは ruby なので、store.php と一緒に使うとするとうまく行かない。store.cgi を使うことで ruby に統一しようということになり。
{{{
<<upload http://kuraku.net/tw/store.cgi index.html backup . kuraku>>
}}}
[[SideBarOptions]] の upload の記述を変更。

!!!backup
ちなみに、バックアップだが、AdvanceOptions の __Folder name for backup files: __ の指定では backup ディレクトリへは save されず、上記のように store.cgi のオプションとして指定したらうまく行く。

!!!RSS reader
見直すこと。
{{{XX/proxy/http://XX}}} が機能していないみたい。

!!!download.cgi
tw のディレクトリを共通にして clip.html を置いてみる。
SidebarOptions を修正して。download.cgi?file=clip.html と指定することで、これが落とせることが分かる。
デフォルトは index.html 。
*これはびっくり[[IncludePlugin]] を入れてみた (via: [[google gloup|http://groups.google.com/group/TiddlyWiki/browse_frm/thread/e847ce6e595d6f99/db4cfe50cf6020b4#db4cfe50cf6020b4]])
**[[IncludeList]] を書いただけで、clip  の内容がそのままこちらで見られる
**やっと TW の1ファイルの呪縛から逃れられると思われる
**TW 作者も「いい」と云ってるし本体に入れてくれないかな
*[[MTS v0.7|http://www.minitiddlyserver.com/]]
**MTS の version0.7 がリリースされたそうなので、まずは PC 上でテスト。
***問題なく動いた、使えるだろうか?
***こちらにするメリットは??
* myEmpty Control を作成
**myEmpty を簡単に付けられるリスト。全部出てくる。
*ファイル名を変更
**index.html ⇒ tw.html に
**index.html はまとめの tw にするので (用意中)
*[[DeleteListPlugin]] 作ってみた([[sample|DeleteListPlugin Sample]])
**tiddler をリストしてまとめて削除できる plugin
**tag を指定してのリストも可能
**systemConfig, toRSS のtag on/off が可能
*[[DcTableOfContentsPlugin|http://kuraku.net/tw/tw.html#DcTableOfContentsPlugin]] を修正して、不具合に対応。
**(こういう自分向けの修正ってどうしていけばいいのかいまだに分からず)
**[[メモ|http://kuraku.net/tw/clip.html#2007.03.07]]
*[[TiddlerListMacro]] を修正。
**[[CheckboxPlugin]] との併用に無理があるため自分用に修正した。
**[X] を、TiddlyList 表示では (X) にするだけ。
**[[こちら|http://kuraku.net/tw/clip.html#TiddlerListMacro]]
*[[DeleteListPlugin]] を VerUp (ver.0.1.1)
**チェックボックスを表示する Tag を *Config でセットできるようにした
**version object を追加 (合っているのか?)
*[[CheckboxPlugin]] の patch を修正
**(X) → [ X ] とスペースを入れるだけにした
**これ「 [X]」
*HelpTextMacro をリリース
**なんだかんだで、よく見たくなるので
**ホントは html で表示したかった

*DeleteListPlugin VerUp (ver 0.1.2)
**終了メッセージを追加、とりあえず
**キタない実装なのでまた直す
*[[WikiBar]] に感動
**ちょっとこの手のを作ってみたいなとか思っていたココロは軽くフンサイ
**Color Palette を[[こちらから|http://www.iosart.com/firefox/colorzilla/palettes.html]]セット

*[[ここ|http://www.kultofbubb.net/tiddlywiki/index.html#StartUpHacks]]を参考に Template を変えてみた。
**http://www.kultofbubb.net/tiddlywiki/index.html#wikibarAddons もチェック
*WikiBar 良いです
**これ出しっぱなしでいいんだけど。できるかな。
*いまさら UploadPlugin が古いのに気付く
**Update しよう
*HelpTextMacro (ver.0.1.1) に
**いちおう一通りの表示ができるまでなった
**Style をどうしたもんか思案中
*DeleteListPlugin (ver 0.1.3)
**削除結果表示内容の修正
*<<tag plugintips>> 追加
**[[ResizeEditorPlugin tips]]
**[[DcTableOfContentsPlugin tips]]
*TW 2.2 リリースが間近?
*<<tag plugintips>> 追加
**[[WikiBar tips]]
*さいきんのまとめ
**[[HideWhenPlugin]] [[ToggleTagPlugin]] を入れる
***日記のタイトルにだけ toRSS のチェックが出るように
***systemConfig のタイトルには disable のチェック
**[[RearrangeTiddlersPlugin]] を入れる
***タイトルをドラッグして位置変えができる。楽しいけど使うか??
**[[PartTiddlerPlugin]] を入れる
***これはすごい、TW 本体にあって良い機能だと思う
*<<tag plugintips>> 書かないと。
*<<tag plugintips>>
**[[HoverMenuPlugin tips]] を修正
*[[RedirectMacro]] 導入、alias できる。
*[[DirtyFlagMacro]] を作る
**編集したかどうかをマークで表示する
**「save 忘れを防ぐ・余計な save を減らす」ことができるのでは、
**一応、2.2b4 でも動くことを確認 (ソースを見ただけだが)
**このサイトでは [[SiteTitle]]、[[HoverMenu]]にマクロを追加した
***編集中ならば、
****→HoverMenu の下に「*」が出る
****↑サイトタイトルの前に「*」が出る (見難いが)
**[[HoverMenu]]と使うと思った以上に良い。やっつけだったけど、ちゃんと使い方を追記しよう
*[[DirtyFlagMacro]] (ver.0.1.2)
**BugFix
***dirtyflag が変わったときに__表示されているものしか切り替わらない__ バグを修正<br>dirtyflag が true の状態で、{{{<<dirtyflag>>}}} の書いてある tiddler を開いてもマーク表示されていなかった
*[[DirtyFlagMacro]] (ver.0.1.1)
**使い方など追記
**Style を指定できるようにした
*セキュリティを考慮して Upload 周りを修正
**Upload 関連はまとめたいところ
*[[サーバサイドの TiddlyWiki 運用-UploadPluginの使い方]] を作成
**けっこう気合いを入れて書きました 
*[[DeleteListPlugin]] (ver.0.1.4)
**追加仕様
***shadow に [[DeleteList]] を追加。(sample のリンク先もこちらに)
***chkDeleteListDisplayInOptionsフラグを設ける[>]<<option chkDeleteListDisplayInOptions>>。チェックすれば [[OptionsPanel]] に [[DeleteList]] が表示される 
*[[HelpTextMacro]] (ver.0.1.2)
**Style の見直し
**英語のドキュメントを追記 (アレだが)
**バージョンの表示
*[[ShadowsPatch]] を追加
**[[Configuration]] は必ず欲しいので入れておく
*[[TiddlyWiki 一問一答]] を書き始めました
**TW がもっと広がればいいなと思って作りました。随時追加していきます
**自分のメモにもなるし
*[[TiddlyWiki 一問一答]] へ追記
*いつもお世話になっている [[TiddlyTools|http://www.TiddlyTools.com/]] より [[QuickEditToolbar]] を導入
**入力サポート機能。(編集モードで上に出てくる) こんな感じ[>]<<tiddler QuickEditToolbar>>
**自分で使い易いように機能を追加する (ライセンスは[[こちらに従います|http://creativecommons.org/licenses/by-sa/2.5/]])
**[[WikiBar|WikiBar]] ではオーバースペックだと云い続けて来たが、ようするにこのくらいで十分なのだ
**quicklink はセレクトしたテキストに適用できないのかな、修正したいな
*[[CSS Reference]] をいただいてきた、すごい役に立つだろう
*[[DeleteListPlugin]] (0.1.5)
**systemConfig タグがチェックされているかをデフォルトで表示します(表示だけ)
**一件も tiddler が無かった場合にエラーを表示
**指定されたタグを上部に表示
**構文を変えました
***{{{<<deletelist list:krkExtension check:systemConfig,macros>>}}}
***krkExtension タグの tiddler をリスト。systemConfig と macro のチェックボックスも表示する
**ソースを直しました
**Delete するより、タグの On/Off に使ってるなぁ、
<<<
<<deletelist list:krkExtension check:systemConfig,macros>>
<<<
**IE6 では表示されませんね。ずっと表示できなかったのだろうか・・[>]直した。
*[[TiddlyWiki 一問一答]] へ追記
*[[Flickr image tag To TW image format]] を作る
**Flickr タグを TW img フォーマットに変換できる tiddler
###Flickr サイトにて個々の画像のページを開いて、
###「ALL SIZES (虫めがねのアイコン)」をクリック
###貼りたいサイズを選択して、テキストエリアの内容をコピー
###[[こちら|Flickr image tag To TW image format]] の上のフォームエリアに貼って、format.. ボタン
###下フォームをコピーして任意の場所に貼りつける
**まぁ HTML タグで囲めばそのまま表示できるのですが、
**[img[http://farm1.static.flickr.com/166/379253545_f32bccd223_m.jpg][http://www.flickr.com/photos/kuraku/379253545/]]
*なんとなく「tiddly」の意味を調べてみた
<<<
 tiddly
【名】 〈英俗〉酒、中国人{ちゅうごく じん}
【形-1】 ほろ酔い気分の
【形-2】 小さい
<<<
**「ほろ酔い気分」というのがいいね。
*[[HelpTextMacro]] (ver 0.1.3)
**Style をより default のものに近付けました
*これのさらに一歩進めたものを作っているのですがうまく行かず
**wikify() の仕様がやっぱりよく分からず・・ 
*[[TWGuideForJPMacro]] (ver 0.1.0) リリース
**日本語の TW 記述ガイドを編集モードに追加します
**まぁ [[HelpTextMacro]] のアレンジなんですが
**[[HelpTextMacro]] は別にヘルプの tiddler を用意する必要がありますが、こちらは同梱してます
**ShadowTiddlers に TWGuideForJP が追加されます
**手順
###[[TWGuideForJPMacro]] をインストール
###[[EditTemplate]] の toolbar マクロに guidejp を追加
###編集モードに <<toolbar guidejp>> が追加される
**ちょっと納得行かないところがあるが、まぁまぁ
*いつもお世話になっている [[BidiX|http://tiddlywiki.bidix.info/]] にて [[IsDirtyPlugin|http://tiddlylab.bidix.info/#IsDirtyPlugin]] を発見
**タイトルの通り、拙作 [[DirtyFlagMacro|http://kuraku.net/tw/tw.html#DirtyFlagMacro]] と同じ機能
**というか間違いなくこちらより使えるのだろうな、考えることはミナ同じか
***もっと早く知っていれば‥

*plugin について、考
**style をカスタムできるように切り出しているが、
**そもそも StyleSheet で設定できるんだから、plugin レベルではなにも設定せず
**使うひとに任せてしまった方がスマートなのかもしれない、
***{{{ {{class{<<macro>>}}} }}} をして、style は好きにしてということの方がシンプルな気もする
***ただ、使用する人がみんな StyleSheet をきちんと使いこなせているかというと、
***使用する人に優しいものがあっても良い気がする
*[[AttachFilePlugin]] が良さげで入れてみる
**画像などをテキストにして tiddler 化するもの
**当然大きな画像は大きな tiddler になる、アイコンっぽいものを使うには良いでしょう
***[[my-sheep.gif]] [img[tooltip|my-sheep.gif]]
*[[TWGuideForJPMacro]]
**ソースのバージョンが間違えていたので直しました
*[[AttachFilePlugin tips]] を追加
*[[TiddlyWiki 一問一答]] に追記
*[[TiddlyWiki 一問一答]]に追記
*tiddler のメニュー(右上の) のレイアウトを変えた
*ぼちぼち本格的に 2.2 への移行を始めたいところ
**しかし、いつリリースなのだろう
*TWGuideForJPMacro ver 0.1.1
**ガイドの内容を修正
***もしカスタムしている方がいたらすみません。というか、是非ご連絡ください
***修正後→<<toolbar guidejp>>
**IE できちんと表示できなかったので対応
***setAttribute("style", XX) は IE で禁止なのか?
*[[IncludePlugin]] がバージョンアップしてますね
**ウチの [[Top|http://kuraku.net/tw/tw.html]] に反映しましたら、What news がリストされなくなった。開くタイミングと読み込みのタイミングが変わったのか
***現状 Top での TiddlerList との組み合わせでは使用できていない
**そもそもの機能として、IncludeList で読み込まれないものでも、タグ {{{<<include XX.html>>}}}  を tiddler に書いておけば、それを開いただときにinclude されるようだ。これは良い、いまさらだが。
**[[IncluePlugin Documentation|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]] あとでちゃんと読む
*同じく [[Lewcid TW - a repository of my extensions for TW|http://tw.lewcid.org/]] にて、[[ShowUpdatesPlugin]] がリリースされています
**機能的には最新の更新をリストできるもののよう
**現在 [[Whats new]] でしているようなことができるみたい
***このサイトでは [[Whats new]] を [[TiddlerListPlugin]] を使用して、最新の日記を内容までリストするようにしている。機能次第ではそちらに移行したいところ
**まだドキュメントは揃っていないようだ
***ソースを読んでみるか
*[[TiddlyWiki 一問一答]] 追記
**[[プラグイン/マクロ 「こんなときはこれを使え!」|TiddlyWiki 一問一答]]
*[[トップ|http://kuraku.net/tw/]] で使用していることもあって、[[IncludePlugin]] の仕様を理解した上で修正をいろいろ
**[[FrontPage|http://kuraku.net/tw/#FrontPage]] から include しているのだが、
**こういう使用方法もできるということで、こちらのサイトでも [[Load KRK CLip]]  を書く
***[[Load KRK CLip]] を開くと http://kuraku.net/tw/clip.html のものが load される
***この開いたときにロードされる、というのが肝心。
**これまで不満であった、tiddler がその TW のものか include されたものか分からないという点
***--[[ArchivedTimeline]] を修正することで、include したものには「+」を付加した--
***include したものは、どの TW からのものかを表示できるようにした(タイトル横) [>][[IncludeSiteLinkMacro]]
**--[[ArchivedTimeline]] をさらに修正。--
***--[[IncludePlugin]] が入ってなければエラーになっていたので、--
**[[IncludeSiteLinkMacro]] を修正
***[[IncludePlugin]] が入ってなければ何もしない
*長らく放りっぱなしであった、http://kuraku.tiddlyspot.com の方に『大鉈』を振るう予定
**削除しようかと思っていたのだけれど
***tiddlyspot の今後も気になるので、使い続けたいということと
***やはり tiddlyspot というネームバリューで見られることもあるかと
**しかし、いま見るととても使えたものではない、
**で、『大鉈』ということになりました
**終ったらこちらからもきちんとリンクします
*[[TiddlyWiki Udo's YourSearch bookmarklet|http://xdexavier.googlepages.com/yoursearch.html]]
**これはヨイ
**僕も[[YourSearch]] を使っているので、他のTiddlyWiki サイトを見ているときに、
**その TW サイトがノーマルの検索だと悲しい
**そこでこの Bookmarklet を使うと、YourSearch がそこの TW ロードされて使えるようになります
*[[IncludePlugin]] 周り
**いろいろ考えて [[ArchivedTimeline]] の修正は元に戻す
**[[IncludedTiddlerStylePlugin]] を作成
***include した tiddler のリンクには tiddlyLinkIncluded クラスを付ける
***[[StyleSheet]] で色や形状を指定する
***IE でナゼ、スタイルの設定ができないのは分からず...
**ということで、[[IncludeSiteLinkMacro]] と [[IncludedTiddlerStylePlugin]] でとりあえず自分の要求は満たせました
**[[ロードしてみて|Load KRK CLip]] Timeline をご覧ください
*そんなわけで [[TiddlySpot|http://kuraku.tiddlyspot.com]] を一新
**作業してみると以前ほど save に時間がかからなくなってる
**2.2b5 にしようとしたが backstage 周りがうまく動作しないみたい。とりあえず断念
*なんとか [[tiddlyspot|http://kuraku.tiddlyspot.com]] を 2.2b5 にした
**ImportTiddlers がうまく行かなかったのを調べたところ
**[[DcTableOfContentsPlugin]] が問題になったようだ
**新しい Import ではタイトルをクリックすると内容が見られるようになっていて
**format.handler を override している。これが実際に無いものを見ようとしていたようだ
***[[DcTableOfContentsPlugin]] を修正した
**backstage の save がローカルの保存しかないみたい、リモートの保存ボタンも欲しいなぁ
**import 機能で、あらかじめ server が登録できるのが良いね。sync も使えそう
*[[一問一答|TiddlyWiki 一問一答]] にて、TW の丸ごとコピーに import 機能を使えとあるが、VersionUp 方式の方が分かり易いと気付く、近々追記します
*仕事でも TW を使用しているのだが、
**これまで [[CheckboxPlugin]] でToDo の管理をしてきたのだがどうもうまくない
**[[MonkeyGTD]] を使ってみることにした
***最初なかなか使い方が分からなかったのだが、触っているうちに見えてきた
***しばらく使ってみます
*[[2007.05.17]] にて、
**> import 機能で、あらかじめ server が登録できるのが良いね。sync も使えそう
**とあるがこれは ImportTidders の元々の機能のよう
**「URL: http://kuraku.net/tw/tw.html」といった tiddler に「contentPublisher 」というタグを付ければ
**プルダウンリストに出てくる。
***[>][[こういうこと|KuRaKu TiddlyWikiUpgrade]]
*[[MonkeyGTD]] の refresh toolbar ボタンがすごく便利で、
**もらってきました。
*「やることがあった」と TW の Reminder に付けようと思って
**でも、どの tiddler に入れるべきなのか思いつかなくって
***わざわざ tidder を新しく作って登録しておくほどのものでない、と
****そのままにして、けっきょく忘れることがあるんですわ (ナガイ)
**[[Reminder about ...]] を作ってみる
><<tiddler "Reminder about ...">>
**使うかなぁ‥。GTD 使ってても、リマインダが弱い気がするからイイカモ
*[[TiddlyWiki 一問一答]] 追記。
**「リンクの形態」を追記。「TW が壊れた」を修正
**他こまごまと
*やっぱり、Top ページに最新日記を開きたくなり、
**[[TiddlerListMacro]] でも良いのだけれど、やっぱりそのものが見たい
**[[DisplayDiaryMacro]] で実現した
***しかし、最初の表示で、Comment/Trackback ボタンが見えず
*[[GoogleSearch]] をクイック調理
**{{{<<googlesearch TiddlyWiki>>}}}
**<<googlesearch TiddlyWiki>>
***引数が無ければ、tiddler のタイトルを取る。用語集用に作ったものなので
****[[ViewTemplate]] に、[[HideWhenPlugin]] と合わせて使用している
*Journal (日記) にナビゲートボタンを付けるための [[NavigatorTiddlerMacro]] を作る
**日記の下部に、前日と次の日へのリンクが現われるというもの
**遡って見ていくには便利。ずっと欲しかったもの
**最初と最後への jump も要るか?
*Plugin なんかでよく HTML を記述する必要があるのだが
**こういう書き方をハッケン
**<<tiddler ./html>>
<part html hidden>
{{{
'html':[
 "<tr><td class=\"label\">Type:</td></tr>",
 "<tr><td class=\"label\">Realm:</td></tr>"
].join("\n"),
}}}
</part>
*[[TiddlerTweaker|TiddlerTweaker]]
**少し前に入れたのでしたわ
**[[TiddlyTools|http://www.tiddlytools.com/]] より
***tiddler のプロパティを変更できます。スグレモノ、
***script tiddler (と呼ぶものかな)
*''TiddlyWiki 2.2 リリース''しましたね
**近々移行します
**む、会社が変わってる [[UnaMesa|http://www.unamesa.org/]] ??
*いないとは思うのですが、
**このサイトの [[DcTableOfContentsPlugin]] を使ってらっしゃる方は
**もう一度こちらから、入れ直してください、__2.2 では Import が機能しなくなってしまいます__
***これは、新しい Import において、内容を覗き見する機能追加がされたためのようです
***ここに無いものを参照しようとして DcTOC のチェックで失敗してしまうみたいです
***またパッチを当てました。いまのところうまく動いています
*「[[いないとは思うのですが、|2007.06.07]] 」と書きましたが、
**使ってくださっていた方がいらっしゃいました
***コメントくださって嬉しかったのです
**メゲずに続けてて良かった、[[HaloScan|http://www.haloscan.com/]]
*TW 2.2.1 に上げました
**いつの間にかひとつ revision が上がってましたね
**これまで beta 検証を何度かしているので問題無いとは思いますが、
***問題などありましたらお教えください
*[[DeleteListPlugin|DeleteListPlugin]] ver.0.1.6
**__17:30 に上げたものが最新です__。すみません何度か上げ直しました
**「お待ちください」表示を追加、プログレスバーの画像など入れられます
***ちょっと削除しようとしてみてください (消えやしませんので)
<<<
<<deletelist list:config>>
<<<
**そして、けっこう大きな Bug がありました
***ダイアログのキャンセルがうまく機能していませんでした、すみません
**最初に作った Plugin なので、あちこち変なことしてました。目についたところは直しましたが、まだあるかも...
*いつもお世話になっている [[BidiXTW|http://tiddlywiki.bidix.info/]] 
**リンクリストに無かったので追加しました
*[[サーバサイドの TiddlyWiki 運用-UploadPluginの使い方]] を修正
*メモ
**TW の知らないフォーマットがあった。
<<<
[[Martin's wiki - Martin Budden's plugins and extensions for TiddlyWiki|http://www.martinswiki.com/#%5B%5BDocument%20Formatting%5D%5D]]
<<<
*[[TiddlyWiki 2.2 新機能メモ]]
**追記していくかどうかは分かりません
*Version 2.2.2 に upgrade
*WikipediaSearch も作成
**{{{<<wikipediasearch タマネギ部隊>>}}}
**<<wikipediasearch タマネギ部隊>>
**Google を経由する方法なので 1click 多くなりますが早いです
*TW Version 2.2にしたら
**[[TWGuideForJPMacro]] の style が反映されてなくなってしまったようです (見っともない)
**2.2 にしたせいなのかはまだ分かっていませんが。調査します
***[>]Style の部分直しましたが、一部納得行っていません‥
*ちなみに
**Ver 2.2.4 にしたらカレンダーなどの pulldown menu が開かなくなったので戻しました、どうしてだろう
**安定するまで待つのが得策とは思うケド
*2.2 では style の仕様が変わったのかあちこち影響が出てます
**なんとなく Bug が取れたのか、という風に見えます
**いい加減にしてたところが露呈しているカンジ
***あちこち見直しします。
*「[[TiddlyWiki 一問一答]]」に追記
**「表(テーブル)をもっと簡単に作りたい」を追加しました
***表を簡単に作るためのツールを紹介してます。
**合わせて [[QuickEditToolbar tips]] を追加
***<<tag plugintips>>
*[[QuickEditToolbar]] が正式版になったようなので移行
**追加した機能についてはとくに問題ない
**ついでに、unindent、wikilink、url を追加
***[>]<<tiddler QuickEditToolbar>>
***[[QuickEditToolbar tips]] にも追記した。
*関連して [[GotoPlugin]] も ~VerUp していることに気付く
**名前が変わっていて二箇所に影響。直す
*[[QuickEditToolbar]] にさらに、color系を追加した
**wikibar のカラー選択に頼ることがあったけど、2.2 になったら動かないみたいで
**追加してみた
***[[colors]] を表示して code をコピーしてダイアログに入れるカンジで
*>「Ver 2.2.4 にしたらカレンダーの pulldown menu が開かなくなったので...」 の件
**[[DatePlugin|DatePlugin]] の Bug であったらしい、Fix 済みとのことで、
**新しくしたら問題は無くなった
**というわけで、2.2.4 に。
*[[QuickEditToolbar]] に color、bgcolor、colors を追加した件、
**[[QuickEditToolbar tips]] にも追記
*2.2 になってから Style が思い通りに設定されてないです
**[[StyleSheet]] は後の方で呼ばれると思うのだけど、
**どうも他のものから上書きされてしまっているみたい
**[[IncludedTiddlerStylePlugin]] の Style を [[StyleSheet]] で設定しても、color が変わらない
**それで  __!important__ 入れてしまっています、
***時間ができたら調べます
*2.1.3 と 2.2.x 間の Up/Downgrade についてちょっと実験
**結果はこちら[>][[TiddlyWiki 2.2 新機能メモ]]
**実験対象が少なかったのでいまいち確信が持てない、ドキュメントを探した方が良いのでは、
*[[QuickEditToolbar]] を少し修正
**quicklink Alt-Q、format Alt-F でオープン
*[[TiddlyWiki 一問一答]] に追記
**「この部分はプリンタ出力したくないです」
*Downgrade ですが、
**「[[TiddlyWiki 2.2 新機能メモ]]」にて import で可能と書きましたが、うまく行かないようです
**そのときは、少ない tiddler で試したからうまく行ったのでしょうか・・
*2.2 では、[[DirtyFlagMacro]] の表示について
**IE ではうまく見えていないようです、調べます
*[[AnchorJumpMacro]] を作成
**アンカージャンプができるようになる
***{{{<<anchorjump jump JumpToAnchor>>}}}  <<anchorjump jump JumpToAnchor>>
***html タグ
****に差し替えてる
****だけ
****ですが。
***<<anchor jump>>{{{<<anchor jump>>}}} ここへジャンプ
*TW ~VersionUp によって、
**IE での Style 表示がやはり変わったみたいで、[[IncludedTiddlerStylePlugin]] の表示にも影響がありました
**すみません、いずれ直します
*ええと、このサイトを見ていて (どうしてさいきんの日記が最初に表示できるのだろうか?)
**と思っている方がいらっしゃるかもしれません
***[[DisplayDiaryMacro]] というマクロを作りました、
***トップの [[FrontPage]] の中に {{{<<displaydiary 5>>}}} を最後に入れて
***さいきんの5件分の日記を表示するようにしているのです
***[[DefaultTiddlers]] には [[FrontPage]] のみを指定しています。
***~~(あんまり効率の良いマクロとは云えないのですが)~~
*Ver.2.2.4 で確認したのですが
**{{{<<tabs XXX>>}}} を使用しているとき問題があるみたいです、(SideBar の Timeline 部分で使用している)
**タブ部分の箱の下にエラーメッセージが出てしまう場合があります。動作に問題は無いようです
***それが出たり出なかったりでいまいち把握できないのですが
***僕の環境ではどうやら [[PartTiddlerPlugin]] を入れているとこの現象が出るようです。
*[[TiddlyTools|http://www.tiddlytools.com/]] を参考に、<<anchorjump bks20070710 BackstageToolBar>> をカスタマイズ
**[[BackstageTweaks]] を作成して、
***[[DeleteList]] と[[TiddlerTweaker]] を追加してみた。
**config.tasks に xxTask オブジェクトを追加して、config.backstageTasks リストに push するだけで OK
*~BackstageToolBar は<<anchor bks20070710>>
**TW 2.2 から追加された機能。編集モードでTW 画面の右上に「__backstage__」ボタンが現れる
**出ていなければ、~AdvancedOptions(~SideBar>options>) の ''chkHttpReadOnly のチェックを外して reload'' してみてください
*[[DisplayDiaryMacro]] の Usage が間違えてました (displaydialy になってました)
**ツマらないことですみません。直しました
*[[DirtyFlagMacro]] の IEでの 表示の不具合を直しました。
**Name で Element を取得していたのですが、それが IE では問題あり
**Class にしてチェックするように変更、手間がかかってしまいますが
***良い方法が見つかればそちらに変更したいです
*TW を IE で使っている人ってどのくらいいるんでしょ
**[[IncludedTiddlerStylePlugin]] の問題も IE のことですし‥
*>  {{{<<tabs XXX>>}}} を使用しているとき問題があるみたいです、(SideBar の Timeline 部分で使用している)
**こちらの件ですが、[[PartTiddlerPlugin]] に修正が入って問題が無くなっています
*[[IncludedTiddlerStylePlugin]] で IE においてスタイルが指定できない件、
**そもそも IE では getTiddlyLinkInfo() が override できなかったみたい
**Firefox では問題ないのだが
**そんなことがあるのだろうか‥
*[[EV値]] の計算と表
**EV値 って? という人には関係ないです
*Ver2.2 のローカライズを始めてみました
**[[JapaneseTranslationPlugin]]
**英語はまったく得意ではないのですが、
**[[MemoWiki さんが作られたもの|http://flow.dip.jp/mt/archives/u/twmemo.html#JapaneseTranslation]] を、大変参考にさせていただいております
**当然僕の趣味というか、趣向が強いものになっていくのでしょうけど
***まだ途中です、主要なところは終っているつもりですが、
****のんびりやって行きますので
**上記の Plugin と別に、追加した機能による部分のローカライズは [[zJapaneseTranslationTweaks]] (名前は未定) に集約するつもりです
***この二つを off にすれば、元に戻るという前提で進めます
***(すみません。検証のため shadow を修正をしたものについては、そのまま戻るというわけにはいきません)
*やっと、家の PC からまともにアクセスできるようになりました
**ちょっとウラシマ状態なので、もうちょっと現場復帰に時間がかかりそうです
*URL が変わりました
**http://kuraku.net/tw/tw.html から、
**http://tw.kuraku.net/tw.html になります
**間違い探しみたいな感じですが、/tw パスの下を tw.kuraku.net に設定しただけです
***とは云っても、これまで通りの URL でアクセスは可能ですので気にしないでください
***ただ、公開する URL としてはこちらに移行します
***Feed で見ているという酔狂な方がいらしたら、URL を新しくしてもらった方が良いかもしれません
*[[zJapaneseTranslationTweaks]] にひどい間違いがありました
**きちんと動作しておりませんでしたので、直しました
*[[DirtyFlagMacro]] を修正 (0.1.4)
**以前のものよりは効率がよくなったと思われますが、
**もはや何が正解なのか‥
*[[TWGuideForJPMacro]] は大変な問題を抱えておりました
**~~(<<toolbar guidejp>> というように、編集画面のヘルプガイドを付けるものなのですが)~~
**スタイルを捏ねくり回していたことはこちらにも書きましたが、そこにそもそも Bug がありまして、
**ID を指定して Popup を作っていたのに、setStylesheet() で ID の指定をしておらず、
***どうなるかというと、ID を指定しないで Style を設定するわけですから‥
***全体の Style に影響するわけです。この小さな Macro が全体の Style を上書きしてしまっていたわけです
**というわけで直しました (Ver.0.1.3)
**Class をセットして、そちらを Style にセットします(ID 指定がどうにもうまく行かず‥)
***独自の StyleSheet を使用している場合、なるべくそちらを表示するようにしていますが、環境に因るみたいです
**分かっていない頃に作ったのは怖いですね
***もし使用している方いらっしゃいましたら、すみませんすみやかに ~VersionUp をお願いします
*[[TiddlyThemes|http://tiddlythemes.com/#Home]] が Ver 2.2 に対応されたそうです
**[[SplashScreen|SplashScreenPlugin]] とか、乱れず表示されたりするのかな、
**どの部分を直すと、2.2 対応になるのか教えて欲しいところ
*[[TWGuideForJPMacro]] ですが、
**初期のものはキチンと ID で StyleSheet を設定していました
**途中でいろいろやり過ぎた模様です、すみませんでした
*そして、やっぱりこちらの方が使い易いだろうと、スクロールを可能にしました
**<<toolbar guidejp>> こちらの scrollbar をチェックしてみてください。(チェックにより一度閉じてしまいますがまた開いてください)
**[[TWGuideForJPMacro]] (0.1.4) です
*[[TWGuideForJPMacro]] (0.1.5) です、連日の ~VerUp すみません
**見出しはずいぶん前から H6 まで対応されているのでした
**スタイルの調整をしました
*[[QuickEditToolbar]] に comm(prg/css): プログラムのコメント追加 、-delcomm: コメントを全て取る、 を追加
**> revised by kuraku(Ver0.1.2-2007.08.22)
**プログラムコメント /* XX */ をよく使うので
**<<tiddler QuickEditToolbar>> こんなです ~~(編集時にしか使えません)~~
*setAttribute("style",XX) しているところがまだあった
**[[DeleteListPlugin]] (0.1.7)
**[[SpMark]]
***を直す
***~~(この方法では IE のスタイル設定がされないのです)~~
*[[JapaneseTranslationPlugin]] (0.0.3)
**主に使用する部分はローカライズできたつもりです
**おかしなところがあればお報せしていただけると助かります
*[[TiddlyWiki Ver2.2.5|http://www.tiddlywiki.com/]] に上げました
*リマインダを使いたいときが定期的にありまして、
**以前 [[Reminder about ...]] という [[InlineJavascriptPlugin]] を利用して script  tiddler を作ったのでした、
**コンセプトとしては、リマインダを書く場所があちこちになるのがイヤだったので、
***フォームとリマンダの内容表示をひとつの tiddler にしてしまえ、てことでした
***まぁこれは間違いだったな、リマインダが書いてある tiddler を表示するとよけいなものまで表示されてしまいますので
**それでリマインダ登録 tiddler を切り離して、機能アップを図りました
***[[addReminder]] (1.0)
<<<
<<tiddler addReminder>>
<<<
***「Reminders」という tiddler を作って、そこに Reminder を追加していきます。
***Reminder が一箇所で管理できるので僕は使えると思ったのですが、うーんどうでしょう
*[[NestedSlidersPlugin]] のバージョンを上げました、ずいぶん上げていなかったようで、
**「*」の指定の方法を知らなかったです
**これを使うと、編集時の [[QuickEditToolbar]] の表示がスマートになります
***どういうことかと云うと、これまでは編集中に「format」を押すとプルダウンで機能一覧が出るのですが、
***''もう一度 format をクリックしないと''プルダウン表示が消えなかった
***今は プルダウン表示した後、関係ないところをクリックすれば消えてくれます、これってけっこう重要
***<<tiddler QuickEditToolbar>> ~~(編集時に使用)~~
*[[QuickEditToolbar tips]] を修正
*とんでもない間違いをしておりました
**[[QuickEditToolbar]] に私が機能追加した「+number」ですが
**リストの頭に「+」を付けるという仕様になってました
**他の Wiki の書き方ですね。TW ではもちろん「#」です
***修正しました。
***<<tiddler QuickEditToolbar>> 
*[[Ver 2.2.6|http://www.tiddlywiki.com/]] がリリースされていますね
**ローカルで使ってみています
**こちらの upgrade はもうちょっとしたら、
*[[TiddlyWiki 日本語化プラグイン配布サイト - for Version 2.2|http://ogoshi.tiddlyspot.com/]]
**きちんとした日本語化 plugin がありました。tiddlywiki.org からリンクされてるから official なものになるのかな
**かなり参考にさせてもらえそう、
***いや「参考に」ですよ
**[[Link|TiddlyWiki's Cool Site]] に追加しました
*[[TWGuideForJPMacro]] のコメントを少しだけ変えました
**Version は変わっておりません
*[[VisualTW - Wysiwyg, tabs, fields editor and more plugins|http://visualtw.ouvaton.org/VisualTW.html]] こちらの、
**wysiwyg 編集もすごいけれど、''tiddler のタブ表示''の部分に目が行った
**内容によっては使えそう
*[[TiddlyWiki Bookmarklets — Tiddly Learning|http://lewcid.org/tiddlywiki-bookmarklets/]]
**TW を開いた状態で Bookmarklet を実行すると、いろいろな機能が使えます
**このアイデアが良いですね「EnableEdit」なんて良く使うかも
*[[DeleteListPlugin|DeleteListPlugin]] ver.0.1.8
**~JavaScript の構文を修正しました (機能は変わりません)
***無駄な部分を省いたという感じです、あとハズかしいミスも直しました。
<<<
<<deletelist list:config>>
<<<
*[[QuickEditToolbar|http://www.tiddlytools.com/#QuickEditToolbar]] が 2.0.0 になっていますね
**合わせて [[InlineJavascriptPlugin|http://www.TiddlyTools.com/#InlineJavascriptPlugin]] も 1.6.1 にする必要があるようです
***ボタンになってますねぇ、うーん善し悪しだな
***使うときだけ出したい気もするし、
****''追記: ''[[QuickEditToolbarCommand|http://www.TiddlyTools.com/#QuickEditToolbarCommand]] を使えばメニューにボタンを表示して、出したり消したりできるみたいですね
***使い易いのは間違いないですね

**さっそく導入してみました。
***<<toolbar editTiddler>> を押してみてください、そして メニューの toolbar を押してみると‥
***けっこう手間でしたので、以下に手順を
***''【インストール手順】:''
***#事前に必要なもの: [[InlineJavascriptPlugin|http://www.TiddlyTools.com/#InlineJavascriptPlugin]]、[[StyleSheetShortcuts|http://www.TiddlyTools.com/#StyleSheetShortcuts]]
***#それぞれの最新の tiddler をインストール
***#StyleSheetShortcuts を使用可能にする。(僕は [[StyleSheet]] の最後に読ませました)
***#[[QuickEditToolbar|http://www.tiddlytools.com/#QuickEditToolbar]] ver2 をインストール (kuraku version は[[こちらを|QuickEditToolbar]])
***#[[QuickEditToolbarCommand|http://www.TiddlyTools.com/#QuickEditToolbarCommand]] もインストール
***#[[EditTemplate]] を修正
****{{{<span class='toolbar' macro='tiddler QuickEditToolbarCommand'>}}}<br>を、メニューに追加
****{{{<span class='toolbar' macro='tiddler QuickEditToolbar'></span>}}}<br>を、ツールバーを表示する位置に入れる
****実際の内容は [[EditTemplate]] を参照してください
***[[InlineJavascriptPlugin]] のインストール以外は reload の必要はないはずです。
***インストールにより {{{chkShowQuickEdit}}} の情報を持つようになります
**ちなみに僕の追加した機能はまだ全部移行できていません、近々やりたいなぁ。

*ついでに tw を 2.2.6 にしました。
*ついでに、[[ToggleTopButton|ToggleTopButton]] を付けました。画面右下。
*QET
**[[revised by kuraku(Ver0.1.1-2007.11.26)|QuickEditToolbar]]
***これまでの機能も移行しました
***Colors は、[[colors|colors]] の内容を表示しています (これまで通りですが一応)
***「~」を追加
****これけっこう良いかも、リンクされてしまったワードを double click して選択した状態で押します
*[[DirtyFlagMacro]] ver 0.1.6
**ソースの修正
*[[DeleteListPlugin]] ver 0.1.9
**BackStage に表示する option を追加
**ソースの修正
***~~(合わせて [[BackstageTweaks]] の DelList を削除)~~
*[[QuickEditToolbar]] revised by kuraku(Ver0.1.2-2007.11.29)
**「-del」追加など
*[[TW Ver.2.3.0|http://tiddlywiki.com/]] がリリースされました。
**まだちゃんと見ていませんが、作者の GoogleGroup のコメントを見て (これは) と思ったのは、
***テーマの切替えサポート
***セクションを URL 指定できるようになった
**詳細はこちらです [[History - TiddlyWiki - Trac|http://trac.tiddlywiki.org/wiki/History]]
**使ってみて、またレポートします
**(import を使って upgrade せよ、となっているのは‥)
*Ver 2.3.0 にしました
**仕事で使っていますがとくに問題などは出ていません
**そして、新しい機能についてはまだ触れていません
***~~というかよく分からず、section のリンクとか使いたいのだけれど見ているヒマがない‥~~
**まるごと import しましたが、すごく速くなっていますね、
***これなら気軽に import でまるごとコピーなどできます
*ふと思うに、
**Upload Plugin の VerUp をそろそろしたい、便利な機能が増えているので、
**ただ、もう php 一本っぽいので、ううむ。ruby版の新しいバージョンは提供されていない
**いいんだけど、ううむ
*地味に始めたこちらのページですが
**コンスタントに訪れてくれる方がいらっしゃるようで、''5000Hit'' してました
**たまに一日で、100近い hit があるときも見るのだけれど、何が起こっているのかはよく分からず‥
***''とりあえずはありがとうございます。''
*よく使うであろう Bookmarklet をちゃんと作ってみた、
**[[bookmarklet: Check Version|javascript:(function(){if(window.version&&window.version.title=='TiddlyWiki'){var v=version;var d=displayMessage;d("TiddlyWiki version: %0.%1.%2%3".format([v.major,v.minor,v.revision,(v.beta?' (b'+v.beta+')':'')]));d("Last modified: "+document.lastModified);d("UserName: "+config.options.txtUserName);}})()]]
**[[bookmarklet: Change Minor Mode|javascript:(function(){if(window.version&&window.version.title=='TiddlyWiki'){if(confirm("MinorUpdate is *"+config.options.chkForceMinorUpdate+"*\nChange MinorMode?")){config.options.chkForceMinorUpdate=!config.options.chkForceMinorUpdate;refreshDisplay();}}})();]]
***リンク先をコピーして(あるいはドラッグして) このページのアドレスへ貼ってリターンすると、
***~~ムカシ URL は 256 文字まで、ってあったと思うがもういいのか??~~
*風邪ひいてました、一週間ほど
**とくに tw で変わったできごとも無さそう‥
*あけましておめでとうございます
**いまさら。
*[[DirtyFlagStickyMacro]] を作成しました
**[[DirtyFlagMacro]] の簡易版です
**特に設定も要らず、macro を導入するだけで、左上に編集中マークが出ます ~~(IE では動きません、すみません)~~
**Template いちいちイジっているのが面倒なときとかに、
**あと、Template の修正方法がよく分からない人でも、入れるだけで使えるということ、
**スクロールしてもマークがくっついて来ますのでいつでも確認できます。
**--[[DirtyFlagMacro]]  との併用も可能 (なハズ)-- 
***(ごめんなさいムリでした。TiddlyWiki.setDirty() を上書きしてます。もう片方のオブジェクトも存在したら実行する、とかにすればまぁ‥)
**表示の場所を変えたいときには直接 macro を修正してください、コメントしてあります、簡単です。
*「まとめてタグを付けるにはどうするのですか?」というご質問をコメントにていただきました
**回答のコメントを付けさせていただきました
***コメントが見られないという方はこちらへ →http://www.haloscan.com/comments/kuraku/TiddlyWiki_____/#60180
*[[TW 2.4.0|http://trac.tiddlywiki.org/wiki/History]] が beta2 へと進んでいる模様
**Opera、Safari の保存が可能になるようです (でも jar ファイルが別に要るのかな)
**ちょっと使ってみて、また
*[[QuickEditToolbar|http://www.tiddlytools.com/#QuickEditToolbar]] も VersionUp しているなぁ
**機能ごと部品化されているっぽい、(ちら見)
**自分が追加した分を分けられるといいかも、
***近々見られると良いが、
*ええと、さいきん環境が色々変わって、変化について行けてませぬ
**自分の使っている Plugin のバージョンチェックくらいはしたいなぁ
*2.4 beta2 ですが、仕事で使ってます
**まったく問題なし、plugin もちゃんと動いてる
*さいきんは Linux の firefox で使ってますが、
**これまたまったく問題ナシ
*[[QuickEditToolbar|QuickEditToolbar]]見なきゃね [X]
*うわっ、油断してた、2.4.0 になってる
*さて、2.4.1 にしようかな
**?? import できない...
**Firefox3 での import に問題があったようです
***私は Ubuntu(Linux)8.0.4 + Firefox3.0.1 + TW2.4.1 でした
***けっきょく、XP で Upgrade しました... 周知なようなので改善されるかと。突き詰めはしませんw
**あとローカルだとエラーが出たな..
*なにかあれば声をかけてください、[[kuraku@twitter|http://twitter.com/kuraku]]
* これは使ってくれてる人いるかなー、というものを [[github|http://github.com/]] に上げてみました
** [[kuraku-tiddlywiki-plugins|http://github.com/kuraku/tiddlywiki-plugins/tree/master]]
* [[Google Group|http://groups.google.co.jp/group/TiddlyWiki]] から何度かリンクされててびっくりした
** アト昨日のアクセス数の伸びはなにかしら...
* (長く) 懸案の [[QuickEditPlugin|QuickEditPlugin]] をやっと見ている
** [[NestedSlidersPlugin|NestedSlidersPlugin]] は最新にする必要があるでしょう。[[InlineJavascriptPlugin|InlineJavascriptPlugin]] もかな
** plugin化されてて分かり易くなったのでは。
** 自分に必要な機能のみを入れられるのは良い
** 足りない機能だけ追加できそうなので、拡張していたものを作ってみる予定
* Firefox3 で import がうまく行かない件
** もう素直に [[ImportTiddlersPlugin|ImportTiddlersPlugin]] を使わせてもらうことにした
** まったく [[TiddlyTools|http://www.TiddlyTools.com]] さんにはお世話になり通しでw
* そろそろ UploadPlugin を VerUp しよう [ ]
* [[QuickEditToolbar|QuickEditToolbar]] によく使っていた機能を追加する macro を作った
** [[QuickEdit_list|QuickEdit_list]] (選択エリアをリストにする)
** [[QuickEdit_tab2tbl|QuickEdit_tab2tbl]] (選択エリアのタブ区切りを tw のテーブルに変換、逆も OK)
*** [[QuickEditToolbar|QuickEditToolbar]] の終りに以下を追加した
{{{
## krk
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_list>>/%
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_tab2tbl>>/%
}}}
** どちらを組み込んでも {{{config.quickEdit.replaceRegexSelection}}} という function が追加される。これにより regex 置換ができるようになる
*** ので、けっこうなんでもアリになる
** [[QuickEditToolbar tips|QuickEditToolbar tips]] を修正必要もあるのだけれど...ぶっちゃけ使ってる人いる?
*すみませんでした
** ドメインの登録更新をしておりませんでした
** お見苦しいところをお見せして申し訳ありません
* iPhone用 tw だそうです、どなたか使ってみますか
** http://itw.bidix.info/
''あけましておめでとうございます、今年もよろしくお願いします。''
*年末から年始にかけてサイトがアクセスできない状態になっておりました、申し訳ありません
**例によってプロパイダの更新処理を怠っておりました
*TiddlyWiki は落ち着いている感じですねぇ。もう普通に使っている人は満足しているのでしょうか
**とりあえず僕は普通に仕事で使ってます。いろいろやりたいことはあったけど落ち着いたかなぁ
**Twitter plugin でも作ろうかと思ったけどニーズ無さそうだし
*[[TW Version 2.4.3|http://www.tiddlywiki.com/]]
**バージョンアップしてますね、あとで確認します
*[[TiddlyWiki 2.5.0|http://www.tiddlywiki.com/]] がリリースされてますね
*このサイトを [[TiddlyWiki 2.5.0|http://www.tiddlywiki.com/]] へ VersionUpしました
**importで問題なく Upgade できました
**こんなサイトでも参照してくれている方がいらっしゃるようなので簡単に Upgrade方法を
***(2.4.1からしか確認してませんが、よほど古いものでなければ大丈夫です、きっと。でもown riskでね)
***''【Upgrade方法】''
****1) TWサイトから empty.html(最新スケルトン) をdownload
*****[[TiddlyWiki|http://www.tiddlywiki.com/]] の「download」ボタンを押す
****2) empty.html を適当な名前に変えて、ブラウザで開く
****3) 右上の「backstage」をクリックしてメニューを開く
*****backstageが表示されないようであれば、AdvancedOptions を確認
****4) Import から自分の TWファイルを選択する
****5) 自分の TWファイルの一覧が表示されるので、左上のチェックボックスをクリックして全部選択する
****6) 一覧の一番下の「Import」ボタンを押す
****7) 読み込まれた状態で backstageメニューの「save」をクリック
****8) 保存されたので、ブラウザをreloadする (reloadするまでは表示が乱れているかもしれません)
**jQuery を内包したとのこと
**少し早くなったかな
*Emacsのキーバインドが使いたいので、[[unbindkey|unbindkey]] を書きました
*このサイトの upload がうまく行っていないようです。なんどか書いたものが消えてしまいました。
*[[TiddlyWiki 2.5.2|http://www.tiddlywiki.com/]] リリースされてますね。
*[[TiddlyWiki 2.5.3|http://www.tiddlywiki.com/]] になってますね
**仕事ではとっくに使っているのですが、、

*[[TwitterTabs|http://www.TiddlyTools.com/#TwitterTabs]] 入れてみました、とりあえず
**(トップでいきなりロードするのはあれなので後でなんかする)
+++[TwitterTabs Demo]
<<tabs txtTwitterTabs
'kuraku'		'show tweets from @kuraku'	[[TwitterTabs##kuraku]]
'find...'		'find tweets containing...'	[[TwitterTabs##search]]
'from...'		'show tweets from...'		[[TwitterTabs##user]]
'tiddlytools'		'show tweets from @tiddlytools'	[[TwitterTabs##tiddlytools]]
'jermolene'		'show tweets from @jermolene'	[[TwitterTabs##jermolene]]
'TiddlyWiki'	'show tweets from @TiddlyWiki'	[[TwitterTabs##TiddlyWiki]]
>>
===
*~TiddlySpot へ移行作業
**http://kuraku.tiddlyspot.com/
**save と save to web の両方出てしまっているが、、、
*Todo
**[X]twをバージョンアップして問題が無いか、spotのドキュメントを読む
**[ ]ドキュメント見直し
**[ ]plugin
***導入しているものを最新にする
***作ったもののURLをこちらにする
**[X]RSSの独自設定を外す
*保存に失敗するときがあるのか、前にもあったような・・・
*キャッシュが効いているのかな
**保存に失敗するように見える。どうしたもんか →Tiddlyspot
*コメント、トラックバックのために使わせてもらっていた [[Haloscan|http://www.haloscan.com/]] よりメールがありまして
** ソフトもハードもトラブルでサービスが続けられませーん ><
***らしい、、、
**2/19 までのサービスとのことなので折を見てリンク等外します
***もうコメントも見られないのかな
*RSS のエラーが出ますね、すみません
**Haloscan 関連を外さないと
*Haloscan 関連使用しないようにしました。
*[[Tiddlywiki 2.6.0|http://www.tiddlywiki.com/]] になってますね
**こちらのサイトをアップデートできるかトライしたのですが、うまく行かず、、、
***また試します
*''ver 2.6.0 に Upgrade しました''
*viewマクロが変わったかな?
**ver2.6.0 にて
***[[ViewTemplate|ViewTemplate]] の<<br>>{{{<span macro='view modified date [[YYYY.0MM.0DD-0hh:0mm]]'>}}} <<br>>では、時間が出なくなっている。{{{[[ ]]}}} を取ったら表示された
***そもそもなにか間違っていたのか、、 ver2.5.0 のこちらのページは問題ありません。''@@color:#F03;⇒@@2.6.0にしたので対応''
*[[YourSearchPlugin|YourSearchPlugin]] など新しくしました。
*windowsでは {{{shift + 保存}}} で@@更新日時が変わらない@@ってどこかに書いたっけ
*[[QuickEditToolbar|QuickEditToolbar]] をごっそり新しくしました。
**[[QuickEdit_list|QuickEdit_list]] を追加。<<br>><<tiddler QuickEditToolbar>>
**[[QuickEdit_customList|QuickEdit_customList]] はイジった
*[[ResizeEditorPlugin|ResizeEditorPlugin]] をやめて、[[TextAreaPlugin|TextAreaPlugin]] にしました、[[EditTemplate|EditTemplate]] は修正無しです
*元のサイトの更新を停止しました
**今後はこちらの~TiddlySpotサイトを更新していきます
**よろしくお願いいたします
*[[TiddlyWiki5|http://www.tiddlywiki.com/tiddlywiki5/]] をぼちぼちマジメに見ようか
*[[TwitterTabs|TwitterTabs]] はブラウザによって見えたり見えなかったりするようだ。自分の最新の一件だけ表示するとかでいいんだけど
**考え中

*[[RecentTweet|RecentTweet]]
**作ってみたが。いくつか同時に表示するとおかしなことになるようだ
**なにかあった気がするが、覚えていないので放置
*http://groups.google.com/group/tiddlywiki/msg/012b730f07c253f5
<<<
 >Think I got it from Wolfgang.

And I got it from Xavier :-)

But lately I found a QuickEditPlugin addition by @@Rakugo@@, which allows
a tab2table and a table2tab conversion of excel tables within any
tiddler:

http://tw.kuraku.net/tw.html#QuickEditToolbar

Regards,

W. 
<<<
**|ω・) ラクゴ?
*[[RecentTweet|RecentTweet]]
**Twitter API http://api.twitter.com/1/statuses/user_timeline/ ...
**が思っていない動きをする、count=1 で読めたり読めなかったり仕様が分っていないのか
***count=2 にしたら来た、、、
*なんだろう [[TiddlySpace|http://tiddlyspace.com/]]
**とりあえず作ってみた →http://kuraku.tiddlyspace.com/
***tiddler の privateモード、publicモードがあるようだ
**[[Google Group|http://groups.google.com/group/tiddlywiki/search?q=tiddlyspace&start=10&sa=N&]] にいろいろ情報がありそう、後で見る
*chrome テスト
**いちおう保存できたかな
*[[Version 2.6.1|http://www.tiddlywiki.com/]] がリリースされていますね
*しばらく、Chromeで使用していますが、まったく問題ないですねー
*[[TiddlySpace|http://tiddlyspace.com/]] も良いです。すぐに保存されるし、プライベートでTiddlerが持てるのでメモ書きに重宝してます
*Tiddlywiki関連の方のTwitterアカウント
**[[Tiddlywiki|http://twitter.com/tiddlywiki]]
**[[Osmosoft|http://twitter.com/osmosoft]]
**[[Jeremy Ruston|http://twitter.com/jermolene]]
**[[Eric Shulman(TiddlyTools)|http://twitter.com/tiddlytools]]
***全然探せなかった。。。
*[[docs-ja - TiddlyWiki documents for Japanese|http://docs-ja.tiddlyspace.com/]]
**ogoshima さんのTiddlyWiki日本語情報のサイトですって、ありがたや
*[[つぶやけるTiddlyWikiプラグインを作りました ~ LocalTweetPlugin~|http://d.hatena.ne.jp/tuto0621/20100704/1278259431]]
**こちらもハッケン。あとで見る
*[ ]ドキュメント見直し
*[ ]Plugin
**[ ]導入しているものを最新にする
**[ ]作ったもののURLをこちらにする (kuraku.tiddlyspot.com)
*[ ]Tiddlywiki5 仕様理解
*[ ]TiddlySpace 仕様理解
*Chromeで使っていてずっと気になっていた点
**''TiddlyWiki の設定が保存できない'' (http://d.hatena.ne.jp/aramakie/20090522)
***>Google Chrome の起動パラメータに {{{"--enable-file-cookies"}}} を指定してください。
*年末だしと思いちょいと見返してみると
**今年最初のtiddler→ [[2010.01.13|2010.01.13]]
***ドキュメント見直しとか...
****一年経った|д・)
*****ぼちぼち見直しするか
****** [>] [[2010.12 ToDo]] +++ <<tiddler "2010.12 ToDo">> ===

*面白そうなサイト
**http://schedule.tiddlyspot.com/
**TWでスケジュール管理
*やっと、[[Ver2.6.1|TiddlyWiki]] にした
**chromeではempty.htmlからのimportに失敗したのでFirefoxでアップグレードした
**アレ http://trac.tiddlywiki.org/wiki/History  coreが ver2.6.2 になってるけど、、、
***あ、リリース前ってことか
*こういう使い方ができるのか tiddlyspace
**TiddlyWiki interview project
***http://interview.tiddlyspace.com/
*[[AnchorJumpMacro]] にBugあり? というかファンクション名が変わったとかかな
**あとで見れたらみるか、みれたら、、、
**+++[2ch log...]
http://www.hozen.org/bbs/85/1144955224/
{{{
433 名前:名無しさん@お腹いっぱい。投稿日:2010/03/14(日) 19:57:09 ID:cFDGISR60
>>432 
AnchorJumpMacroでジャンプにscrollAnchorVisibleを呼んでるけど、 
最新のTWだとscrollAnchorVisibleがなくなってる。スクロールとかの処理が変わった影響っぽい。 
}}}
===

*おとといくらいに書いたtiddlerが消えてる |ω・) 
**もう[[space|http://kuraku.tiddlyspace.com/]]に移行しよかな
*Ver. 2.6.3 になってますね
**追っかけられて無いです。。。
*TiddlySpace重いな
*Ver.2.6.4へupgradeしました
**importにて
**Backstage>upgrade はまだ使えないんだろうか。。。
*↓エラー出てんなぁ |ω・) 
*http://tiddlyweb.com/
**{{{TiddlyWeb is an open source implementation of a server side for TiddlyWiki with a robust HTTP API for storing and accessing content on the web.}}}
**サーバ側が提供されてるのかな。
*[[DcTableOfContentsPlugin]] よく使うので修正させてもらった(元ソースは見つからない)
**styleをshadowへ出した。→[[StyleSheetDcTableOfContents]]
**こんな↓
====
<<showtoc>>
!!~DcTableOfContensPlugin とは
!!!目次を作ります
!!!!H1,H2 のタイトルを自動でまとめます

*tabs のマクロエラー見れてないす。再帰エラーみたいな。。。
*[[Version 2.6.5|http://tiddlywiki.com/]] に上がってますね。
Version 2.6.6 になってますね。
2.6.5 あたりからImportでの移行ができずにほったらかしにしていたのですがちょっと調べました

!!!バージョンアップできない問題の解決内容
*firefox (15.0.1を現状使用)
**file:// では使えないとか、forefox自身のバージョンアップによりセキュリティ制限ができたようだ
***→ https://addons.mozilla.org/ja/firefox/addon/tiddlyfox/
***Jeremy Ruston 本人作のfirefox pluginを導入する
***なんやらダイアログが毎回出るが、保存なども問題無くできるようになる
*データ移行
**firefox / chrome
***事象は違うがimportがいずれもできず
**firefoxで昔ながらの方法で移行できた
**''昔ながらの方法''
***現:A.html 新TW:empty.html
**#A.html を普通にブラウザで開く
**#そのまま、ファイル A.html を消す(名前を変えても) empty.html を A.html に名前変更
**#ブラウザで「保存(save)」、リロード

現状使えてます… own risk で (^_^;
検証足りなくてすみません。
TiddlySpot ではどうかな。。。 → |ω・ิ)ダメダナ...

(quickedit 動いてねぇし… あとでみる)
*Ver. 2.7.1 リリースされてますね
**仕事のtwは対応してしまった

*なにげに参照されているようです。情報は古い…
**[[TiddlyWiki 一問一答|http://tiddlyspace.com/bags/kuraku_public/tiddlers/TiddlyWiki%20%E4%B8%80%E5%95%8F%E4%B8%80%E7%AD%94]]
*なにげに修正入れてます。古い情報に註を足した感じです。普段使いであれば新しい情報は少ないですし
**[[TiddlyWiki 一問一答|http://tiddlyspace.com/bags/kuraku_public/tiddlers/TiddlyWiki%20%E4%B8%80%E5%95%8F%E4%B8%80%E7%AD%94]]

*TiddlyWiki Ver. 2.7.2
**[[リリース|http://tiddlywiki.com]] されてますね
**TiddlySpot は、いつからかtwのバージョンアップできなくなってますね
***正確に云うと、''新しいバージョンでの upload ができない'' (ホントか?
***いろいろ実験してみているのですがどうも無理っぽい、、、 なにか方法あったら教えていただきたい

*[[TiddlySpot|http://tiddlyspot.com]] サイトはあんまりやる気が感じられない。さっさと [[TiddlySpace|http://tiddlyspace.com]]に移行せよということかもしれないけど
**ちとスペックオーバーなんだなぁ、重いし… |ω・)
*tiddler 内容が表示されないというよく分からない現象が起きる
**例えば → [[TiddlyWiki 一問一答]]
**タイトルだけ見えて内容が出ないときがある
**「リフレッシュ」で表示される

*Ver. 2.8.0 リリースされてますね
**http://www.tiddlywiki.com/
*TiddlyWiki5 が使える雰囲気ですね
**http://tiddlywiki.com/tiddlywiki5/
**http://five.tiddlywiki.com/
**いろいろ面白そうなことができそうですが
**… ちと重いですな
*TODO: Version up → 2.8.1
**なんかで失敗したんだっけか…
*TwitterAPI 仕様変更があったなぁずいぶん前。表示できてない… ↑

*[[TiddlyWiki 5 works on tiddlyspot|http://tiddlyspot.blogspot.jp/2013/10/tiddlywiki-5-works-on-tiddlyspot.html]]
**おっ!! Σ(゚Д゚,,)
*** → http://kuraku5.tiddlyspot.com
***できた、ちとあとで方法まとめる
*[[TiddlyWiki.com|http://tiddlywiki.com]] のバージョンが、''5'' になったようですね (5.03-beta)
**いままでのものは、[[classic.tiddlywiki.com|http://classic.tiddlywiki.com/]] ですって
**[[Tiddlyspot|http://tiddlyspot.com]] のテンプレートも5になってます。
*http://kuraku5.tiddlyspot.com/
**へ移行の潮時かなと思いつつ
**まるごと移してみたら、なんか別フォーマットなんだな…
***変換のものは無いかな
**Plugin はどうするのかね

**と思ったら、もう最初の移行は古いバージョンだわ orz
***リモートのものをupgradeするのはどうやるんだろうね
*最新のempty.htmを使用すればいいんじゃないかということになりやってみた
**同様にempty.htmにファイルインポートして保存したら、移行ができるんじゃないか?
*試行錯誤した結果
**http://kuraku5.tiddlyspot.com/ を最新コアにしてみた (5.0.7-beta)

!!TW5 を Tiddlyspot で使う
#TiddlySpotアカウントを普通に取得
#http://tiddlywiki.com/empty.html へアクセス
#「歯車」アイコンより
#「Saving」タブを選択
#*Wiki Name: TiddlySpotアカウント入力
#*Password: TiddlySpotパスワード入力
#*Server URL: http://[アカウント].tiddlyspot.com/store.cgi  自分のアカウントを付ける
#「歯車」アイコン隣の [↓] アップロード(ダウンロード)ボタンを押す

現行のTWを移行する場合は、最後のアップロード前に Import をすれば良い
*ver2.8.1 にしたいのだけどやはりうまく行かない…
**ローカルに落として、ファイル差し替え→保存でバージョンは上がるが、
**それをそのまま webに上げようとすると、サーバから何も返ってこない状態
*けっきょくのところ、、
**TiddlyWiki5 にはなじめず、classic派w

*http://tiddlywiki.com/#TiddlyWikiClassic
**http://compare-tw2-tw5.tiddlyspace.com
**違いがわかるサイト。かな、
**このくらい落ち着いたレイアウトというかフォントサイズだと使う気になるかなぁ、と関係ないところで思った。
***テーマが馴染めないだけかも
*[[heroku備忘録|http://heroku.kuraku.tiddlyspot.com]]

*TiddlySpot saveが軽くなったな
*[[TiddlyWiki5を使ってみよう|http://bacchus.ivory.ne.jp/bourbon/]]
**これはすばらしいサイト
**TW5にしたいけど… という人にピッタリ
***→オレダ

*それで久々に [[TW5|http://kuraku5.tiddlyspot.com]]をイジってみたが、
*バージョン上げてみたらすごく使い易くなっていた
**こちらの方法で→[[2014.02.04]] ※ダウンロードボタンではなく「チェックボタン」になってた
**このチェックボタンがファイルが変更されると''赤くなる''
*** DirtyFlag!! Oh!
**Journal tiddler などを移してみた。快適だ…
***tidderごと upgradeしなきゃいかんのか?? 記法が古いと云われる。タブンなにか方法があるな
****→http://tiddlywiki.com/static/Upgrading.html   あるわ…
****ちがう、思ってたのと違う。ファイルのアップグレードだ、便利だが。個々の tiddlerはボタン押してくしかないのか?
****→解決プラグインで

**(以前からかもしれないが) 使い易くなった点
***セーブがアッサリ
***変更アリボタン
***view、edit、side のボタンの ON/OFF が簡単
***autosave が効いてる

**うーむ、という点
***ダブルクリックで編集モードへ切り替わらなくなってる (戻った)
***改行を明示的に入れなきゃいけない ({{{<br>}}}とか)
***shift+ctl+return (変更時間を変えずに保存) ができない

**一度フィールド内の情報が消えて、saveするとdownloadを開始することがあった
**しかしデフォルトでここまでできるとなると移行を考えるもありかと (何回目だ…)

**プラグインとかテーマとかどうやって追加していくのかなぁ
***リンクを DnD だわ、楽だわ :-)
***`$:/plugins/tiddlywiki/tw2parser`  プラグイン入れたらなんの問題もなくなった、<br>classic tiddler もふつーに表示できる
Index of all tiddlers
<<tiddlerList group:"tiddler.title.substr(0,1)" groupTemplate:"[ ''%group'' ]\n">>
config.options.chkHttpReadOnly = false;
/***
!!Usage
!!!Mark anchor
{{{<<anchor (name)>>}}}
{{{
<html><a name="(name)"/></html>
}}}
!!!Jump to anchor
{{{<<anchorjump (name) (title)>>}}}
{{{
<html><a href="javascript:;" onclick="scrollAnchorVisible('(name)',null, event)">(title)</a></html>
}}}
!!Exsample
{{{
<<anchorjump anchorpoint JumpTo>>
1.
2.
3.
<<anchor anchorpoint>>=== anchor ===
}}}
<<<
<<anchorjump anchorpoint JumpTo>>
1.
2.
3.
<<anchor anchorpoint>>=== anchor ===
<<<
!!Source
***/
/*{{{*/
config.macros.anchor = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler){
		if(!params[0] || params[0] == "")
			return;
		var name = params[0];
		var e = createTiddlyElement(place,"span");
		e.innerHTML = "<html><a name=\""+name+"\"/></html>";
	}
}
config.macros.anchorjump = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler){
		if(!params[0] || params[0] == "")
			return;
		if(!params[1] || params[1] == "")
			return;
		var anchor = params[0];
		var title = params[1];
		var e = createTiddlyElement(place,"span");
		e.innerHTML = "<html><a href=\"javascript:;\" onclick=\"scrollAnchorVisible('"
					+anchor+"',null, event)\">"+title+"</a></html>";
	}
}
/*}}}*/
/***
|''Name:''|ArchivedTimeline|
|''Version:''|0.3.1 (Feb 04, 2006)|
|''Source:''|https://sourceforge.net/projects/ptw/|
|''Author:''|BramChen|
|''Type:''|Macro|
!Description
Timeline archived monthly.
!Syntax/Examples
>{{{<<timeline [modified | created]>>}}}

!Known issues/Todos
* 

!Instructions

!Notes
* 

!Revision history
* v0.3.1 (04 Feb 2006)
** JSLint checked
* v0.3.0 (Feb 04, 2006)
** Fixed several missing variable declarations
* v0.2.0 (Dec 26, 2005)
** changed for the new feature of Macro timeline of TW 2.0.0 beta 6
* v0.1.0 (Nov 3, 2005)
** Initial release.

!Code
***/
//{{{
version.extensions.archivedTimeline = {major: 0, minor: 3, revision: 1,
 date: new Date("Feb 04, 2006"),
 name: "ArchivedTimeline",
 type: "Macro",
 author: "BramChen",
 source: "http://sourceforge.net/project/showfiles.php?group_id=150646"
};

config.macros.archivedTimeline = {
 tooltips: "Archives sorted by ",
 msg : "The param of macro timeline should be 'created' or 'modified'",
 //dateFormat: "YYYY0MM0DD"
 //dateFormat: "YYYY.0MM.0DD"
 dateFormat: "DD MMM YYYY"
};
config.macros.timeline = config.macros.archivedTimeline;

config.macros.timeline.handler = function(place,macroName,params) {
 var field = params[0] ? params[0] : "modified";
 if (field != "modified" && field != "created") {
 displayMessage(config.macros.timeline.msg);
 return;
 }
 place.appendChild(document.createTextNode(this.tooltips + field));
 var tiddlers = store.reverseLookup("tags","excludeLists",false,field);
 var lastMonth = ""; var lastDay = ""; var theText = "----\n"; var i = 0;
 var cookie; var archives;
 for (var t=tiddlers.length-1; t>=0; t--) {
 var tiddler = tiddlers[t];
 var theField = (field == "created") ? tiddler.created : tiddler.modified;
 var theMonth = theField.convertToYYYYMMDDHHMM().substr(0,6);
 var theDay = theField.convertToYYYYMMDDHHMM().substr(0,8); 
 if(theMonth != lastMonth) {
 if (lastMonth === "") {
 lastMonth = theMonth;
 }
 else {
 place.appendChild(document.createElement("hr")); 
 cookie = 'chktimeline'+(i++);
 archives = this.formatString(this.dateFormat, lastMonth);
 this.slider(place,cookie,theText,archives,this.tooltips + archives); 
 lastMonth = theMonth; theText = "----\n"; 
 }
 }
 if(theDay != lastDay){
 theText += theField.formatString(this.dateFormat) + '\n';
 lastDay = theDay; 
 }
 theText += '* [[' + tiddler.title + ']]\n'; 
 }
 place.appendChild(document.createElement("hr"));
 cookie = 'chktimeline'+(i++);
 archives = this.formatString(this.dateFormat, lastMonth);
 this.slider(place,cookie,theText,archives,this.tooltips + archives); 
 place.appendChild(document.createElement("hr"));
};

config.macros.timeline.onClickSlider = config.macros.slider.onClickSlider;

config.macros.timeline.slider = function(place,cookie,text,id,tooltips)
{
 var btn = createTiddlyButton(place,id,tooltips,this.onClickSlider); 
 var panel = createTiddlyElement(place,"div",null,"timelineSliderPanel",null);
 panel.setAttribute("cookie",cookie);
 panel.style.display = config.options[cookie] ? "block" : "none";
 if(text){
 wikify(text,panel);
 }
};

config.macros.timeline.formatString = function(template, yyyymm)
{
 var dateString = new Date(yyyymm.substr(0,4)+'/'+yyyymm.substr(4,2)+'/01');
 template = template.replace(/DDD|0DD|DD|hh|mm|ss/g,'');
 return dateString.formatString(template+" "+(document.all?"▼":"▾"));
};
//}}}
ArchivedTimeline は timeline を月別にまとめて表示する。

{{{
<<timeline [modified | created]>>
}}}

modified: 更新順、created: 作成順 となる。
default の timeline のように 件数を指定することはできなくなるようだ。

+++[sample..]
<<timeline modified>>
===


個人的に月のタイトルがリストに紛れてしまうように見えるので最後の方で以下のように「▼」を追加して使用している。
{{{
 return dateString.formatString(template+" "+(document.all?"▼":"▾")); //kuraku upd
}}}
text/plain
.txt .text .js .vbs .asp .cgi .pl
----
text/html
.htm .html .hta .htx .mht
----
text/comma-separated-values
.csv
----
text/javascript
.js
----
text/css
.css
----
text/xml
.xml .xsl .xslt
----
image/gif
.gif
----
image/jpeg
.jpg .jpe .jpeg
----
image/png
.png
----
image/bmp
.bmp
----
image/tiff
.tif .tiff
----
audio/basic
.au .snd
----
audio/wav
.wav
----
audio/x-pn-realaudio
.ra .rm .ram
----
audio/x-midi
.mid .midi
----
audio/mp3
.mp3
----
audio/m3u
.m3u
----
video/x-ms-asf
.asf
----
video/avi
.avi
----
video/mpeg
.mpg .mpeg
----
video/quicktime
.qt .mov .qtvr
----
application/pdf
.pdf
----
application/rtf
.rtf
----
application/postscript
.ai .eps .ps
----
application/wordperfect
.wpd
----
application/mswrite
.wri
----
application/msexcel
.xls .xls3 .xls4 .xls5 .xlw
----
application/msword
.doc
----
application/mspowerpoint
.ppt .pps
----
application/x-director
.swa
----
application/x-shockwave-flash
.swf
----
application/x-zip-compressed
.zip
----
application/x-gzip
.gz
----
application/x-rar-compressed
.rar
----
application/octet-stream
.com .exe .dll .ocx
/***
|Name|AttachFilePlugin|
|Source|http://www.TiddlyTools.com/#AttachFilePlugin|
|Version|3.5.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin,macro|
|Requires||
|Overrides|'image' and 'prettyLink' formatters, TiddlyWiki.prototype.getRecursiveTiddlerText()|
|Description|Store binary files as base64-encoded tiddlers with fallback links for separate local and/or remote file storage|

Store or link binary files (such as jpg, gif, pdf or even mp3) within your TiddlyWiki document and then use them as images or links from within your tiddler content.   Binary file content can be stored in three different locations:
<<<
#embedded in the attachment tiddler (encoded as base64)
#on your filesystem (a 'local link' path/filename)
#on a web server (a 'remote link' URL)
<<<
The plugin creates an "attachment tiddler" for each file you attach.  Regardless of where you store the binary content, your document can refer to the attachment tiddler rather than using a direct file or URL reference in your embedded image or external links, so that changing document locations will not require updating numerous tiddlers or copying files from one system to another.

@@display:block;font-size:8pt;line-height:110%;Note: although you can edit an attachment tiddler, ''don't change any of the encoded content below the attachment header'', as it has been prepared for use in the rest of your document, and even changing a single character can make the attachment unusable.  //If needed, you ''can'' edit the header information or even the MIME type declaration in the attachment data, but be very careful not to change any of the base64-encoded binary data.//@@
!!!!!Inline interface (live)
><<attach demoID>>
!!!!!Usage
<<<
When you attach a file, a tiddler (tagged with<<tag attachment>>) is generated (using the source filename as the tiddler's title).  The tiddler contains //''base64 text-encoded binary data''//, surrounded by {{{/%...%/}}} comment markers (so they are not visible when viewing the tiddler).  The tiddler also includes summary details about the file: when it was attached, by whom, etc. and, if the attachment is an image file (jpg, gif, or png), the image is automatically displayed below the summary information.

With embedded data, your TW document can be completely self-contained...unfortunately, embedding just a few moderately-sized binary files using base64 text-encoding can dramatically increase the size of your document.   To avoid this problem, you can create attachment tiddlers that define external local filesystem (file://) and/or remote web server (http://) 'reference' links, without embedding the binary data directly in the tiddler (i.e., uncheck "embed data" in the 'control panel').

These links provide an alternative source for the binary data: if embedded data is not found (or you are running on Internet Explorer, which does not currently support using embedded data), then the plugin tries the local filesystem reference.  If a local file is not found, then the remote reference (if any) is used.  This "fallback" approach also lets you 'virtualize' the external links in your document, so that you can access very large binary content such as PDFs, MP3's, and even *video* files, by using just a 'remote reference link' without embedding any data or downloading huge files to your hard disk.

Of course, when you //do// download an attached file, the local copy will be used instead of accessing a remote server each time, thereby saving bandwidth and allowing you to 'go mobile' without having to edit any tiddlers to alter the link locations...

Lastly, though not completed (but nearly there), the plugin includes an integrated 'uploader' that will let you create a 'remote link' attachment tiddler AND transfer the local file to a remote server location in the same step!
<<<
!!!!!Syntax / Examples
<<<
To embed attached files as images or link to them from other tiddlers, use the standard ~TiddlyWiki image syntax ({{{[img[tooltip|filename]]}}}), linked image syntax ({{{[img[tooltip|filename][tiddlername]]}}}) , or "external link" syntax ({{{[[text|URL]]}}}), replacing the filename or URL that is normally entered with the title of an attachment tiddler.

embedded image data:
>{{{[img[Meow|AttachFileSample]]}}}
>[img[Meow|AttachFileSample]]
embedded image data with link to larger remote image:
>{{{[img[click for larger view|AttachFileSample][AttachFileSample2]]}}}
>[img[click for larger view|AttachFileSample][AttachFileSample2]]
'external' link to embedded image data:
>{{{[[click to view attachment|AttachFileSample]]}}}
>[[click to view attachment|AttachFileSample]]
'external' link to remote image:
>{{{[[click to view attachment|AttachFileSample2]]}}}
>[[click to view attachment|AttachFileSample2]]
regular ~TiddlyWiki links to attachment tiddlers:
>{{{[[AttachFileSample]]}}} [[AttachFileSample]]
>{{{[[AttachFileSample2]]}}} [[AttachFileSample2]]
<<<
!!!!!Defining MIME types and Server Scripts
<<<
When you select a source file, a ''[[MIME|http://en.wikipedia.org/wiki/MIME]]'' file type is automatically suggested, based on filename extension.  The AttachFileMIMETypes tiddler defines the list of MIME types that will be recognized by the plugin.  Each MIME type definition consists of exactly two lines of text: the official MIME type designator (e.g., "text/plain", "image/gif", etc.), and a space-separated list of file extensions associated with that type.  List entries are separated by "----" (horizontal rules).

To upload files, a script must first be installed on a remote server so it can receive and store the files online.  The AttachFileServerScripts tiddler defines the list of ''server scripts'' that will be available for you to select from when attaching and uploading a file.  The list format is as described above for MIME types, except that the first line is simply the text that will appear in the ''server scripts'' droplist, while the second line is the fully-qualified URL for submitting files to that server (e.g., {{{http://www.xyz.com/path/to/cgi-bin/upload.cgi}}} or something similar).
<<<
!!!!!Known Limitations
<<<
* ''Internet Explorer does not support the use of //embedded// data for TW file attachments.  However, you can still use the local/remote link definitions to create file attachments that are stored externally''
## //while it is easy to read text files, reading binary files is not supported by IE's FileSystemObject (FSO) methods, and other file I/O techniques are subject to security barriers or require additional MS proprietary technologies (like ASP or VB) that make implementation more difficult.//
## //IE does not support the data: URI scheme, and cannot render the embedded images or links.  This would seem to be an insurmountable shortcoming in the browser.  Let's hope it is added in the next version...//
<<<
!!!!!Installation
<<<
Import (or copy/paste) the following tiddlers into your document:
* AttachFilePlugin (tagged with <<tag systemConfig>>)
* AttachFilePluginFormatters ("distribution library") (tagged with <<tag systemConfig>>)
* AttachFileSample and AttachFileSample2 //(sample attachment tiddler containing an image file)//
* AttachFileMIMETypes //(defines known binary file types)//
* AttachFileServerScripts //(remote upload server locations)//
<<<
!!!!!Revision History
<<<
''2007.03.01 [3.5.3]'' use apply() to invoke hijacked function
''2007.02.25 [3.5.2]'' in hijack of "prettyLink", fix version check for TW2.2 compatibility (prevent incorrect use of fallback handler)
''2007.01.09 [3.5.1]'' onClickAttach() refactored to create separate createAttachmentTiddler() API for use with FileDropPluginHandlers
|please see [[AttachFilePluginHistory]] for additional revision details|
''2005.07.20 [1.0.0]'' Initial Release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.attach = {major: 3, minor: 5, revision: 3, date: new Date(2007,3,1)};
//}}}
config.macros.attach = {
// // configuration
//{{{
	hideUpload: false,
//}}}
// // lingo
//{{{
	label: "attach file",
	tooltip: "Attach a file to this document",
	linkTooltip: "Attachment: ",

	scriptList: "AttachFileServerScripts",
	typeList: "AttachFileMIMETypes",

	titlePrompt: " enter tiddler title...",
	MIMEPrompt: "<option value=''>select MIME type...</option><option value='editlist'>[edit list...]</option>",
	localPrompt: " enter local path/filename...",
	URLPrompt: " enter remote URL...",
	scriptPrompt: "<option value=''>select server script...</option><option value='editlist'>[edit list...]</option>",
	targetPrompt: " enter remote path/filename...",

	tiddlerErr: "Please enter a tiddler title",
	sourceErr: "Please enter a source path/filename",
	storageErr: "Please select a storage method: embedded, local or remote",
	MIMEErr: "Unrecognized file format.  Please select a MIME type",
	localErr: "Please enter a local path/filename",
	URLErr: "Please enter a remote URL",
	scriptErr: "Please select a server script",
	targetErr: "Please enter a remote target path/filename",
	fileErr: "Invalid path/file or file not found",

	sourceReport: "| source file:|{{{%0}}}|\n",
	nosourceReport: "| source file:|//none//|\n",
	dateReport: "| attached on:|%0 by %1|\n",
	notesReport: "| description:|%0|\n",
	dataReport: "| embedded:|[[%0|%0]] - {{{type=%1, size=%2 bytes, encoded=%3 bytes}}}|\n",
	nodataReport: "| embedded:|//none//|\n",
	localReport: "| local file:|/%LOCAL_LINK%/[[%0|%1]]|\n",
	nolocalReport: "| local file:|//none//|\n",
	URLReport: "| remote link:|/%REMOTE_LINK%/[[%0|%0]]|\n",
	noURLReport: "| remote link:|//none//|\n",

	uploadReport: "upload\n<<<\n__server script__\n''%0''\n{{{%1}}}\n__remote path/filename__\n{{{%2}}}\n__transfer log__\n%3/%RESULT%/\n<<<\n",

	imageReport: "image\n<<<\nusage: {{{[img[tooltip|%0]] or [img[tooltip|%0][link]]}}}\n[img[tooltip|%0]]\n<<<\n",
	dataBlock: "\n/% DO NOT EDIT BELOW THIS POINT\n---BEGIN_DATA---\n%0;base64,\n%1\n---END_DATA---\n%/",
//}}}
// // macro definition
//{{{
	handler:
	function(place,macroName,params) {
		if (params && !params[0]) { createTiddlyButton(place,this.label,this.tooltip,this.toggleAttachPanel); return; }
		var id=params.shift();
		this.createAttachPanel(place,id+"_attachPanel",params);
		document.getElementById(id+"_attachPanel").style.position="static";
		document.getElementById(id+"_attachPanel").style.display="block";
	},
//}}}
//{{{
	createAttachPanel:
	function(place,panel_id,params) {
		if (!panel_id || !panel_id.length) var panel_id="_attachPanel";
		// remove existing panel (if any)
		var panel=document.getElementById(panel_id); if (panel) panel.parentNode.removeChild(panel);
		// set styles for this panel
		setStylesheet(this.css,"attachPanel");
		// create new panel
		var title=""; if (params && params[0]) title=params.shift();
		var types=this.MIMEPrompt+this.formatListOptions(store.getTiddlerText(this.typeList)); // get MIME types
		var scripts=this.scriptPrompt+this.formatListOptions(store.getTiddlerText(this.scriptList)); // get server scripts
		panel=createTiddlyElement(place,"span",panel_id,"attachPanel",null);
		var html=this.html.replace(/%id%/g,panel_id);
		html=html.replace(/%title%/g,title);
		html=html.replace(/%disabled%/g,title.length?"disabled":"");
		html=html.replace(/%types%/g,types);
		html=html.replace(/%scripts%/g,scripts);
		panel.innerHTML=html;
		return panel;
	},
//}}}
//{{{
	toggleAttachPanel:
	function (e) {
		if (!e) var e = window.event;
		var parent=resolveTarget(e).parentNode;
		var panel = document.getElementById("_attachPanel");
		if (panel==undefined || panel.parentNode!=parent)
			panel=config.macros.attach.createAttachPanel(parent,"_attachPanel");
		var isOpen = panel.style.display=="block";
		if(config.options.chkAnimate)
			anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));
		else
			panel.style.display = isOpen ? "none" : "block" ;
		e.cancelBubble = true;
		if (e.stopPropagation) e.stopPropagation();
		return(false);
	},
//}}}
//{{{
	formatListOptions:
	function(text,getparams) {
		if (!text || !text.trim().length) return "";
		// get server script list content from tiddler
		var parts=text.split("\n----\n");
		var out="";
		this.scriptParams=["","",""]; // first 3 list items: blank, prompt, editlist
		for (var p=0; p<parts.length; p++) {
			var lines=parts[p].split("\n");
			var label=lines.shift(); // 1st line=display text
			var URL=lines.shift(); // 2nd line=item value
			var params=lines.join("\n").replace(/<<<\n/g,"").replace(/\n<<</g,""); // extra lines=script params inside blockquotes
			this.scriptParams.push(params?params:"");
			out +='<option value="%1">%0</option>'.format([label,URL]);
		}
		return out;
	},
//}}}
// // interface definition
//{{{
	css:
	".attachPanel { display: none; position:absolute; z-index:10; width:35em; right:105%; top:0em;\
		background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\
		border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\
		padding: 0.5em; margin:0em; -moz-border-radius:1em; }\
	.attachPanel form { display:inline;border:0;padding:0;margin:0; }\
	.attachPanel select { width:99%;margin:0px;font-size:8pt;line-height:110%;}\
	.attachPanel input  { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\
	.attachPanel textarea { width:98%;margin:0px;height:2em;font-size:8pt;line-height:110%}\
	.attachPanel table { width:100%;border:0;margin:0;padding:0;color:inherit; }\
	.attachPanel tbody, .attachPanel tr, .attachPanel td { border:0;margin:0;padding:0;color:#000; }\
	.attachPanel .box { border:1px solid black; padding:.3em; margin:.3em 0px; background:#f8f8f8; -moz-border-radius:5px; }\
	.attachPanel .chk { width:auto;border:0; }\
	.attachPanel .btn { width:auto; }\
	.attachPanel .btn2 { width:49%; }\
	",
//}}}
//{{{
	html:
	'<form>\
		attach from source file <input type="file" name="source" size=56 onChange="config.macros.attach.onChangeSource(this)">\
		<div class="box">\
		<table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			embed data <input type=checkbox class=chk name="useData"\
				onclick="if (!this.form.MIMEType.value.length)\
					this.form.MIMEType.selectedIndex=this.checked?1:0; ">&nbsp;\
		</td><td style="border:0">\
			<select size=1 name="MIMEType" \
				onchange="this.title=this.value; if (this.value==\'editlist\')\
					{ this.selectedIndex=this.form.useData.checked?1:0; story.displayTiddler(null,config.macros.attach.typeList,2); return; }">\
				<option value=""></option>\
				%types%\
			</select>\
		</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			local link <input type=checkbox class=chk name="useLocal"\
				onclick="this.form.local.value=this.form.local.defaultValue=this.checked?config.macros.attach.localPrompt:\'\';">&nbsp;\
		</td><td style="border:0">\
			<input type=text name="local" size=15 autocomplete=off value=""\
				onchange="this.form.useLocal.checked=this.value.length" \
				onkeyup="this.form.useLocal.checked=this.value.length" \
				onfocus="if (!this.valuelength) this.value=config.macros.attach.localPrompt; this.select()">\
		</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			remote link <input type=checkbox class=chk name="useURL"\
				onclick="this.form.URL.value=this.form.URL.defaultValue=this.checked?config.macros.attach.URLPrompt:\'\';\
					config.macros.attach.toggleUploadControls(\'%id%\',this.checked);">&nbsp;\
		</td><td style="border:0">\
			<input type=text name="URL" size=15 autocomplete=off value=""\
				onfocus="if (!this.value.length) this.value=config.macros.attach.URLPrompt; this.select()"\
				onchange="this.form.useURL.checked=this.value.length;\
					config.macros.attach.toggleUploadControls(\'%id%\',this.value.length);"\
				onkeyup="this.form.useURL.checked=this.value.length;\
					config.macros.attach.toggleUploadControls(\'%id%\',this.value.length);">\
		</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			<div id="%id%_upcheck" style="display:none">\
			upload file <input type=checkbox class=chk name="upload"\
				onclick="this.form.uploadScript.selectedIndex=this.checked?1:0;\
					this.form.uploadScript.title=\'\';\
					this.form.uploadTarget.disabled=!this.checked;\
					this.form.uploadTarget.value=this.form.uploadTarget.defaultValue=this.checked?config.macros.attach.targetPrompt:\'\';\">&nbsp;\
			</div>\
		</td><td style="border:0">\
			<div id="%id%_uplist" style="display:none">\
			<select size=1 name="uploadScript"\
				onchange="this.title=this.value; if (this.value==\'editlist\')\
						{ this.selectedIndex=this.form.upload.checked?1:0; story.displayTiddler(null,config.macros.attach.scriptList,2); return; }\
					this.form.upload.checked=this.value.length;\
					if (!this.form.uploadTarget.value.length && this.value.length)\
						this.form.uploadTarget.value=this.form.uploadTarget.defaultValue=config.macros.attach.targetPrompt;\
					this.form.uploadTarget.disabled=!this.value.length;">\
				<option value=""></option>\
				%scripts%\
			</select>\
			</div>\
		</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			<div id="%id%_saveas" style="display:none">save as&nbsp;</div>\
		</td><td style="border:0">\
			<input type=text name="uploadTarget" id="%id%_uptarget" size=15 autocomplete=off value="" disabled\
				onfocus="if (!this.value.length) this.value=config.macros.attach.targetPrompt; this.select()" style="display:none">\
		</td></tr></table>\
		</div>\
		<table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			attach as&nbsp;\
		</td><td style="border:0" colspan=2>\
			<input type=text name="tiddlertitle" size=15 autocomplete=off value="%title%"\
				onkeyup="if (!this.value.length) { this.value=config.macros.attach.titlePrompt; this.select(); }"\
				onfocus="if (!this.value.length) this.value=config.macros.attach.titlePrompt; this.select()" %disabled%>\
		</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			description&nbsp;\
		</td><td style="border:0" colspan=2>\
			<input type=text name="notes" size=15 autocomplete=off>\
		</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
			add tags&nbsp;\
		</td><td style="border:0">\
			<input type=text name="tags" size=15 autocomplete=off value="" onfocus="this.select()">\
		</td><td style="width:40%;text-align:right;border:0">\
			<input type=button class=btn2 value="attach"\
				onclick="config.macros.attach.onClickAttach(this)"><!--\
			--><input type=button class=btn2 value="close"\
				onclick="var panel=document.getElementById(\'%id%\'); if (panel) panel.parentNode.removeChild(panel);">\
		</td></tr></table>\
	</form>',
//}}}
// // control processing
//{{{
	onChangeSource:
	function(here) {
		var form=here.form;
		var list=form.MIMEType;
		var theFilename  = form.source.value;
		var theExtension = theFilename.substr(theFilename.lastIndexOf('.')).toLowerCase();
		for (var i=0; i<list.options.length; i++)
			if (list.options[i].value.indexOf(theExtension)!=-1) {
				list.selectedIndex = i;
				form.useData.checked = true;
				form.useLocal.checked = true;
				form.local.value = theFilename;
				break;
			}
		theFilename=theFilename.replace(/\\/g,"/"); // fixup: change \ to /
		if (!form.tiddlertitle.disabled)
			form.tiddlertitle.value=theFilename.substr(theFilename.lastIndexOf('/')+1); // get tiddlername from filename
	},
//}}}
//{{{
	toggleUploadControls:
	function(id,show) {
		if (config.macros.attach.hideUpload) return;
		document.getElementById(id+'_upcheck').style.display
			=document.getElementById(id+'_uplist').style.display
			=document.getElementById(id+'_saveas').style.display
			=document.getElementById(id+'_uptarget').style.display
			=show?'block':'none';
	},
//}}}
//{{{
	onClickAttach:
	function (here) {
		clearMessage();
		// get input values
		var form=here.form;
		var theDate=(new Date()).formatString(config.macros.timeline.dateFormat);
		var theSource = form.source.value!=form.source.defaultValue?form.source.value:"";
		var theTitle=form.tiddlertitle.value;
		var theLocal = form.local.value!=form.local.defaultValue?form.local.value:"";
		var theURL = form.URL.value!=form.URL.defaultValue?form.URL.value:"";
		var theNotes = form.notes.value;
		var theTags = "attachment excludeMissing "+form.tags.value;
		var useData=form.useData.checked;
		var useLocal=form.useLocal.checked;
		var useURL=form.useURL.checked;
		var upload=form.upload.checked;
		var theMIMEType = form.MIMEType.value.length?form.MIMEType.options[form.MIMEType.selectedIndex].text:"";
		// validate checkboxes and get filename
		if (useData||upload) {
			if (theSource.length) { if (!theLocation) var theLocation=theSource; }
			else { alert(this.sourceErr); form.source.focus(); return false; }
		}
		if (useLocal) {
			if (theLocal.length) { if (!theLocation) var theLocation = theLocal; }
			else { alert(this.localErr); form.local.focus(); return false; }
		}
		if (useURL) {
			if (theURL.length) { if (!theLocation) var theLocation = theURL; }
			else { alert(this.URLErr); form.URL.focus(); return false; }
		}
		if (!(useData||useLocal||useURL))
			{ form.useData.focus(); alert(this.storageErr); return false; }
		if (!theLocation)
			{ form.source.focus(); alert(this.sourceErr); return false; }
		if (!theTitle || !theTitle.trim().length || theTitle==this.titlePrompt)
			{ form.tiddlertitle.focus(); alert(this.tiddlerErr); return false; }
		if (upload) {
			var theScript = form.uploadScript.value!=form.uploadScript.defaultValue?form.uploadScript.value:"";
			if (!theScript.length) { alert(this.scriptErr); form.uploadScript.focus(); return false; }
			var theServer = form.uploadScript.options[form.uploadScript.selectedIndex].text;
			var theParams = this.scriptParams[form.uploadScript.selectedIndex];
			var theTarget = form.uploadTarget.value!=form.uploadTarget.defaultValue?form.uploadTarget.value:"";
			if (!theTarget.length) { alert(this.targetErr); form.uploadTarget.focus(); return false; }
		}
		// if not already selected, determine MIME type based on filename extension (if any)
		if (!theMIMEType.length && theLocation.lastIndexOf('.')!=-1) {
			var theExt = theLocation.substr(theLocation.lastIndexOf('.')).toLowerCase();
			var theList=form.MIMEType;
			for (var i=0; i<theList.options.length; i++)
				if (theList.options[i].value.indexOf(theExt)!=-1)
					{ var theMIMEType=theList.options[i].text; theList.selectedIndex=i; break; }
		}
		// attach the file
		return this.createAttachmentTiddler(theSource, theDate, theNotes, theTags, theTitle,
			useData, useLocal, useURL, theLocal, theURL, theMIMEType, upload);
	},
	getMIMEType:
	function(src,def) {
		var ext = src.substr(src.lastIndexOf('.')).toLowerCase();
		var list=store.getTiddlerText(this.typeList);
		if (!list || !list.trim().length) return def;
		// get server script list content from tiddler
		var parts=list.split("\n----\n");
		for (var p=0; p<parts.length; p++) {
			var lines=parts[p].split("\n");
			var mime=lines.shift(); // 1st line=MIME type
			var match=lines.shift(); // 2nd line=matching extensions
			if (match.indexOf(ext)!=-1) return mime;
		}
		return def;
	},
	createAttachmentTiddler:
	function (theSource, theDate, theNotes, theTags, theTitle,
		useData, useLocal, useURL, theLocal, theURL, theMIMEType, upload) {
		// encode the data
		if (useData) {
			if (!theMIMEType.length) {
				alert(this.MIMEErr);
				form.MIMEType.selectedIndex=1; form.MIMEType.focus();
				return false;
			}
			var theData = this.readFile(theSource); if (!theData) { return false; }
			displayMessage('encoding '+theSource);
			var theEncoded = this.encodeBase64(theData);
			displayMessage('file size='+theData.length+' bytes, encoded size='+theEncoded.length+' bytes');
		}
		// upload the file
		if (upload)
			var uploadresult=this.uploadFile(theTitle,theSource,theMIMEType,theServer,theScript,theParams,theTarget);
		// generate tiddler and refresh
		var theText = "";
		theText +=theSource.length?this.sourceReport.format([theSource]):this.nosourceReport;
		theText +=this.dateReport.format([theDate,config.options.txtUserName]);
		theText +=theNotes.length?this.notesReport.format([theNotes]):"";
		theText +=useData?this.dataReport.format([theTitle,theMIMEType,theData.length,theEncoded.length]):this.nodataReport;
		theText +=useLocal?this.localReport.format([theLocal,'file:///'+theLocal.replace(/\\/g,"/")]):this.nolocalReport;
		theText +=useURL?this.URLReport.format([theURL]):this.noURLReport;
		theText +=(theMIMEType.substr(0,5)=="image")?this.imageReport.format([theTitle]):"";
		theText +=upload?uploadresult:"";
		theText +=useData?this.dataBlock.format([theMIMEType,theEncoded]):"";
		store.saveTiddler(theTitle,theTitle,theText,config.options.txtUserName,new Date(),theTags);
		var panel=document.getElementById("attachPanel"); if (panel) panel.style.display="none";
		story.displayTiddler(null,theTitle);
		story.refreshTiddler(theTitle,null,true);
		displayMessage('attached "'+theTitle+'"');
		return true;
	},
//}}}
// // base64 conversion
//{{{
	encodeBase64:
	function (theData) {
		if (!theData) return null;
		// encode as base64
		var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
		var out = "";				//This is the output
		var chr1, chr2, chr3 = "";		//These are the 3 bytes to be encoded
		var enc1, enc2, enc3, enc4 = "";	//These are the 4 encoded bytes
		for (var count=0,i=0; i<theData.length; )
			{
			chr1 = theData.charCodeAt(i++); //Grab the first byte
			chr2 = theData.charCodeAt(i++); //Grab the second byte
			chr3 = theData.charCodeAt(i++); //Grab the third byte
			enc1 = chr1 >> 2;
			enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
			enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
			enc4 = chr3 & 63;
			if (isNaN(chr2))
				enc3 = enc4 = 64;
			else if (isNaN(chr3))
				enc4 = 64;
			out += keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);
			chr1 = chr2 = chr3 = "";
			enc1 = enc2 = enc3 = enc4 = "";
			count+=4; if (count>60) { out+='\n'; count=0; } // add line break every 60 chars for readability
			}
		return out;
	},
//}}}
// // I/O functions
//{{{
	readFile:
	function(filePath) {
		if(!window.Components) { return null; }
		try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
		catch(e) { alert("access denied: "+filePath); return null; }
		var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
		try { file.initWithPath(filePath); } catch(e) { alert("cannot read file - invalid path: "+filePath); return null; }
		if (!file.exists()) { alert("cannot read file - not found: "+filePath); return null; }
		var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
		inputStream.init(file, 0x01, 00004, null);
		var bInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);
		bInputStream.setInputStream(inputStream);
		return(bInputStream.readBytes(inputStream.available()));
	},
//}}}
//{{{
	writeFile:
	function(filepath,data) {
		// TBD: decode base64 and write data to specified local path/filename
		return(false);
	},
//}}}
//{{{
	uploadFile:
	function(title,source,MIMEType,server,URL,scriptparams,target) {
		displayMessage("begin upload: \""+title+"\"");
		if (URL==undefined || !URL.length)
			return this.uploadReport.format([server,URL,target,"error: missing script URL"]);
		var x; // XML object
		try {x = new XMLHttpRequest()}
		catch(e) {
			try {x = new ActiveXObject("Msxml2.XMLHTTP")}
			catch (e) {
				try {x = new ActiveXObject("Microsoft.XMLHTTP")}
				catch (e) { return this.uploadReport.format([server,URL,target,"error: could not create XMLHttpRequest object"]); }
			}
		}
		var starttime=new Date();
		x.onreadystatechange = function() {
			if (x.readyState == 4) {
				var endtime=new Date();
				var elapsed=(endtime-starttime+1)/1000;
				displayMessage("end upload: \""+title+"\" ("+elapsed+" seconds)");
				var response="\n''"+endtime.formatString("DD MMM YYYY 0hh:0mm:0ss")+"'' - upload ended (elapsed="+elapsed+" seconds).\n";
;				response+="status code="+x.status+"\nserver response:\n{{{\n"+x.responseText+"\n}}}\n";
				var tiddler=store.getTiddler(title);
				if (tiddler) {
					var marker="/%RESULT%/"; var pos=tiddler.text.indexOf(marker);
					if (pos!=-1) {
						tiddler.set(null,tiddler.text.substr(0,pos)+response+tiddler.text.substr(pos+marker.length));
						story.displayTiddler(null,title); story.refreshTiddler(title,null,true); store.setDirty(true);
					}	
				}
			}
		}
		if ((document.location.protocol=="file:") && (typeof(netscape)!="undefined")) { // UniversalBrowserRead only works from a local file context
			try { netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead')}
			catch (e) { displayMessage(e.description?e.description:e.toString()); }
		}
		try {
			var data=this.readFile(source);
			if (!data) return this.uploadReport.format([server,URL,target,"could not read local source file"]);
			scriptparams=scriptparams.replace(/%TARGET%/g,target).replace(/%TYPE%/g,MIMEType).replace(/%SIZE%/g,data.length);
			if (scriptparams.indexOf("\n")==-1) { // single-line params=GET
				x.open("GET",URL,true);
				scriptparams=scriptparams.replace(/%DATA%/g,encodeURIComponent(data));
				x.setRequestHeader('Content-type','application/x-www-form-urlencoded');
			}
			else { // multi-line params=POST
				x.open("POST",URL,true);
				var boundary="----------AttachFilePluginDataBoundary----------";
				scriptparams="\n"+scriptparams.replace(/%BOUNDARY%/g,boundary).replace(/%DATA%/g,data)+"\n";
				x.setRequestHeader('Content-Length',scriptparams.length);
				x.setRequestHeader('Content-Type','multipart/form-data; boundary='+boundary);
			}
			x.send(scriptparams);
			// DEBUG alert("params\n-----\n"+scriptparams+"\n-----\n"); // wffl DEBUG
		}
		catch (e) { displayMessage(e.description?e.description:e.toString()); }
		var response="''"+starttime.formatString("DD MMM YYYY 0hh:0mm:0ss")+"'' - upload started...";
		return this.uploadReport.format([server,URL,target,response]);
	}
};
//}}}

/***
!!!!!Formatters
|NOTE: These functions are also defined separately in a small, "run-time library" plugin: AttachFilePluginFormatters, which provides "stand-alone" processing for //rendering// attachment tiddlers, but does not include the AttachTiddlers control panel and supporting functions.  To reduce your document size, you can include AttachFilePluginFormatters ''instead of'' AttachFilePlugin when distributing documents that contain attachments, as long you don't intend to create any new attachment tiddlers to your document.|

''Extends wikify() formatters to process attachment tiddler references''
* embedded images: {{{[img[tooltip|image]]}}}
* linked embedded images: {{{[img[tooltip|image][link]]}}}
* external/"pretty" links: {{{[[label|link]]}}}

***/
//{{{
if (config.macros.attach==undefined) config.macros.attach= { };
//}}}
//{{{
if (config.macros.attach.isAttachment==undefined) config.macros.attach.isAttachment=function (title) {
	var tiddler = store.getTiddler(title);
	if (tiddler==undefined || tiddler.tags==undefined) return false;
	return (tiddler.tags.find("attachment")!=null);
}
//}}}

//{{{
// test for local file existence
// Returns true/false without visible error display
// Uses Components for FF and ActiveX FSO object for MSIE
if (config.macros.attach.fileExists==undefined) config.macros.attach.fileExists=function(theFile) {
	var found=false;
	// DEBUG: alert('testing fileExists('+theFile+')...');
	if(window.Components) {
		try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
		catch(e) { return false; } // security access denied
		var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
		try { file.initWithPath(theFile); }
		catch(e) { return false; } // invalid directory
		found = file.exists();
	}
	else { // use ActiveX FSO object for MSIE 
		var fso = new ActiveXObject("Scripting.FileSystemObject");
		found = fso.FileExists(theFile)
	}
	// DEBUG: alert(theFile+" "+(found?"exists":"not found"));
	return found;
}
//}}}

//{{{
if (config.macros.attach.getAttachment==undefined) config.macros.attach.getAttachment=function(title) {

	// extract embedded data, local and remote links (if any)
	var startmarker="---BEGIN_DATA---\n";
	var endmarker="\n---END_DATA---";
	var pos=0; var endpos=0;
	var text = store.getTiddlerText(title);
	var embedded="";
	var locallink="";
	var remotelink="";

	// look for embedded data, convert to data: URI
	if ((pos=text.indexOf(startmarker))!=-1 && (endpos=text.indexOf(endmarker))!=-1)
		embedded="data:"+(text.substring(pos+startmarker.length,endpos)).replace(/\n/g,'');
	if (embedded.length && !config.browser.isIE)
		return embedded; // use embedded data if any... except for IE, which doesn't support data URI

	// no embedded data... fallback to local/remote reference links...

	// look for 'attachment link markers'
	if ((pos=text.indexOf("/%LOCAL_LINK%/"))!=-1)
		locallink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));
	if ((pos=text.indexOf("/%REMOTE_LINK%/"))!=-1)
		remotelink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));

	// document is being served remotely... use remote URL (if any)  (avoids security alert)
	if (remotelink.length && document.location.protocol!="file:")
		return remotelink;  

	// local link only... return link without checking file existence (avoids security alert)
	if (locallink.length && !remotelink.length) 
		return locallink; 

	// local link, check for file exist... use local link if found
	if (locallink.length) { 
		if (this.fileExists(getLocalPath(locallink))) return locallink;
		// maybe local link is relative... add path from current document and try again
		var pathPrefix=document.location.href;  // get current document path and trim off filename
		var slashpos=pathPrefix.lastIndexOf("/"); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf("\\"); 
		if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);
		if (this.fileExists(getLocalPath(pathPrefix+locallink))) return locallink;
	}

	// no embedded data, no local (or not found), fallback to remote URL (if any)
	if (remotelink.length) 
		return remotelink;

	return ""; // attachment URL doesn't resolve
}
//}}}
//{{{
if (config.macros.attach.init_formatters==undefined) config.macros.attach.init_formatters=function() {
	if (this.initialized) return;
	// find the formatter for "image" and replace the handler
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="image"; i++);
	if (i<config.formatters.length)	config.formatters[i].handler=function(w) {
		if (!this.lookaheadRegExp)  // fixup for TW2.0.x
			this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) // Simple bracketted link
			{
			var e = w.output;
			if(lookaheadMatch[5])
				{
				var link = lookaheadMatch[5];
				// ELS -------------
				if (!config.formatterHelpers.isExternalLink) // fixup for TW2.0.x
					var external=!store.tiddlerExists(link)&&!store.isShadowTiddler(link);
				else
					var external=config.formatterHelpers.isExternalLink(link);
				if (external)
					{
					if (config.macros.attach.isAttachment(link))
						{
						e = createExternalLink(w.output,link);
						e.href=config.macros.attach.getAttachment(link);
						e.title = config.macros.attach.linkTooltip + link;
						}
					else
						e = createExternalLink(w.output,link);
					}
				else 
					e = createTiddlyLink(w.output,link,false,null,w.isStatic);
				// ELS -------------
				addClass(e,"imageLink");
				}
			var img = createTiddlyElement(e,"img");
			if(lookaheadMatch[1])
				img.align = "left";
			else if(lookaheadMatch[2])
				img.align = "right";
			if(lookaheadMatch[3])
				img.title = lookaheadMatch[3];
			img.src = lookaheadMatch[4];
			// ELS -------------
			if (config.macros.attach.isAttachment(lookaheadMatch[4]))
				img.src=config.macros.attach.getAttachment(lookaheadMatch[4]);
			// ELS -------------
			w.nextMatch = this.lookaheadRegExp.lastIndex;
		}
	}
//}}}
//{{{
	// find the formatter for "prettyLink" and replace the handler
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="prettyLink"; i++);
	if (i<config.formatters.length)	{
		var v=version.major+.1*version.minor+.01*version.revision;
		if (v>=2.13) {
		config.formatters[i].handler=function(w) 
			{
			this.lookaheadRegExp.lastIndex = w.matchStart;
			var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
			if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
				{
				var e;
				var text = lookaheadMatch[1];
				if(lookaheadMatch[3])
					{
					// Pretty bracketted link
					var link = lookaheadMatch[3];
					if (config.macros.attach.isAttachment(link))
						{
						e = createExternalLink(w.output,link);
						e.href=config.macros.attach.getAttachment(link);
						e.title=config.macros.attach.linkTooltip+link;
						}
					else e = (!lookaheadMatch[2] && config.formatterHelpers.isExternalLink(link))
						? createExternalLink(w.output,link)
						: createTiddlyLink(w.output,link,false,null,w.isStatic);
					}
				else
					{
					e = createTiddlyLink(w.output,text,false,null,w.isStatic);
					}
				createTiddlyText(e,text);
				w.nextMatch = this.lookaheadRegExp.lastIndex;
				}
			}
		} else { // FALLBACK for TW2.1.2 and earlier
		config.formatters[i].handler=function(w)
			{
			if (!this.lookaheadRegExp)  // fixup for TW2.0.x
				this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
			this.lookaheadRegExp.lastIndex = w.matchStart;
			var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
			if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
				{
				var e;
				var text = lookaheadMatch[1];
				if (lookaheadMatch[2]) // Simple bracketted link
					{
					e = createTiddlyLink(w.output,text,false,null,w.isStatic);
					}
				else if(lookaheadMatch[3]) // Pretty bracketted link
					{
					var link = lookaheadMatch[4];
					// ELS -------------
					if (!config.formatterHelpers.isExternalLink) // fixup for TW2.0.x
						var external=!store.tiddlerExists(link)&&!store.isShadowTiddler(link);
					else
						var external=config.formatterHelpers.isExternalLink(link);
					if (external)
						{
						if (config.macros.attach.isAttachment(link))
							{
							e = createExternalLink(w.output,link);
							e.href=config.macros.attach.getAttachment(link);
							e.title = config.macros.attach.linkTooltip + link;
							}
						else
							e = createExternalLink(w.output,link);
						}
					else 
						e = createTiddlyLink(w.output,link,false,null,w.isStatic);
					// ELS -------------
					}
				createTiddlyText(e,text);
				w.nextMatch = this.lookaheadRegExp.lastIndex;
				}
			}
		} // END FALLBACK
	} // if "prettyLink" formatter found
	this.initialized=true;
}
//}}}
//{{{
config.macros.attach.init_formatters(); // load time init
//}}}
//{{{
if (TiddlyWiki.prototype.coreGetRecursiveTiddlerText==undefined) {
	TiddlyWiki.prototype.coreGetRecursiveTiddlerText = TiddlyWiki.prototype.getRecursiveTiddlerText;
	TiddlyWiki.prototype.getRecursiveTiddlerText = function(title,defaultText,depth) {
		return config.macros.attach.isAttachment(title)?
			config.macros.attach.getAttachment(title):this.coreGetRecursiveTiddlerText.apply(this,arguments);
	}
}
//}}}
[[AttachFilePlugin]] はファイルを TW に attach する機能を提供する。
画像ファイルなどを base64 でテキスト化して、tiddler化する。

{{{
<<attach ID>>
}}}
ID には重複しない ID を指定する。
(重複して表示すると前のフォームが使えない(消える)ようになっている)

<<attach attachtips>>
* attach from source file: 指定したファイルパス
* embed data: ファイルのフォーマットを指定 (デフォルトで判断)
* local link: ローカルのファイルパスが必要ならば
* remote link: リンク先があれば
* attach as: tidder 名
* description: 説明
* add tags: 追加するタグ (デフォルトで attachment excludeMissing)

作成した画像の tiddler
*[[my-sheep.gif]] [img[tooltip|my-sheep.gif]]
tiddler のソースを見ると何をしているか分かります。

{{{
| source file:|{{{D:\home\public_html\images\my-sheep.gif}}}|
| attached on:|6 May 2007 by 九楽|
| embedded:|[[my-sheep.gif|my-sheep.gif]] - {{{type=image/gif, size=1731 bytes, encoded=2344 bytes}}}|
| local file:|//none//|
| remote link:|//none//|
image
<<<
usage: {{{[img[tooltip|my-sheep.gif]] or [img[tooltip|my-sheep.gif][link]]}}}
[img[tooltip|my-sheep.gif]]
<<<

/% DO NOT EDIT BELOW THIS POINT
---BEGIN_DATA---
image/gif;base64,
R0lGODlhLAAlAPf/AP////f39+/v7+fn597e3tbW1s7OzsbGxr29vbW1ta2traWl
pZycnJSUlIyMjISEhHt7e3Nzc2tra2NjY1paWlJSUkpKSkJCQjk5OTExMSkpKSEh
IRgYGBAQEAgICL21tXtzc4R7e3Nra2NaWlJKSkI5OTkxMTEpKffOzpR7e2NSUr2c
...
}}}
/***

!~AutoCloseMessagePlugin - 時限メッセージダイアログ

''説明''
~TiddlyWikiで保存したり検索したときに右上に出るダイアログ風の
ポップアップは意外と邪魔になるものです。どうせ定型的な内容だし、
それをクリックするような状況もほとんどないので数秒たったら自動的に
消えるようなプラグインを作成しました。

''インストール''
 この記事の内容をペースト、systemConfigタグを付けて保存、リロード。
 全てのメッセージダイアログが3秒で消えるようになります。
 {{{timeout: 3000}}}の箇所を変更すると消えるまでの時間を設定できます。

----
''ソースコード''
***/
//{{{
config.autoCloseMessage = {
	timeout: 6000
};

javascript:(
	function() {
		var orig_displayMessage = displayMessage;
		displayMessage = hook_displayMessage;

		function hook_displayMessage(text,linkText) {
			orig_displayMessage(text,linkText);
			setTimeout("clearMessage()", config.autoCloseMessage.timeout);
		}
	}
)();
//}}}
/*{{{*/
// add TidIDE
config.tasks.tTidIDE = {
	text: "TidIDE",
	tooltip: "TiddlerEdit tool",
	content: "<<tidIDE SystemInfo +TiddlerTweaker CompareTiddlers edit>>"
}
config.backstageTasks.push("tTidIDE");

// add TspotSetup
config.tasks.tTspotSetup = {
	text: "TspotSetup",
	tooltip: "Tspot setup",
	content: "<<tiddler TspotControls>>"
}
config.backstageTasks.push("tTspotSetup");
/*}}}*/
/%CSS syntax attribute reference chart%/
{{menubox{{{small{
~~Source: Paul Petterson~~
|>|>| !Selectors |
| ''Selector'' | ''Sample'' | ''Description'' |
| tag | H1 { color: blue ; } |Selects all of the specified HTML tags |
| class | .myClass { color: blue; } |Selects all HTML tags with the attribute class="myClass" specified |
| ID | #tag56 { color: blue; } |Selects the single HTML tag with the attibute ID="tag56" specified |
| Grouping | H1, H2, H3 { color: blue ; } | selects all specified selectors (tags, class, or ID can be specified) |
| Contextual | H1 B { color: red; } |selects all 'B' tags in H1. Context selectors can be tag, class, or ID selectors |

|>|>|>| !Units |
| ''Type'' | ''Unit'' | ''Description'' |
| Length | mm, cm, in |millimeters, centimeters, inches |
|~| pt, pc |point size, pica |
|~| em, ex |relative to the point size of the font, relative to x-height of the font |
|~| px |pixel (device dependent) |
| Percentage | % |calculated as a percentage of their default size used in context |
| Keywords | .. | ... |
| Color | <name> |Color names ex: green see: ColorNames |
|~| rgb() |specify number or percengate rgb(100%, 0, 100%) |
|~| <hex value> |specify hex RGB number of color ex: #00FF00 see: ColorChart |

|>|>|>| !Font Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| font-family |[font name or type] | font-family: Verdana, Arial; | Y |
| font-style |normal, italic | font-style:italic; | Y |
| font-variant |normal, small-cap | font-variant:small-caps; | Y |
| font-weight |normal, bold | font-weight:bold; | Y |
| font-size |[ xx-large, x-large, large, medium, small, x-small, xx-small ], [ larger, smaller ], \\percentage'\\, //length// | font-size:12pt; | Y |
| font |[//font-style// / //font-variant// / //font-weight//] ? //font-size// [//line-height//] ? //font-family// | font: bold 12pt Arial; | Y |

|>|>|>| !Color and Background Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| color |//color // | color: red | Y |
| background-color |//color//, transparent | background-color: yellow | N* |
| background-image |//url//, none | background-image: url(house.jpg)| N* |
| background-repeat |repeat, repeat-x, repeat-y, no-repeat | background-repeat: no-repeat | N* |
| background-attachment |scroll, fixed | background-attachment: fixed | N* |
| background-position |[ //position// , //length// ], {1,2}, [ top, center, bottom ] -or- [ left, center, right ] | background-position: top center | N* |
| background |transparent, //color// -or- //url// -or- repeat -or- scroll -or- //position// | background: silver url(house.jpg) repeat-y | N* |
|>|>|>| !*Starting in CSS2, these properties are inherited. |

|>|>|>| !Text Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| letter-spacing |normal, //length// | letter-spacing:5pt | Y |
| text-decoration |none, underline, overline, line-through | text-decoration:underline | N |
| vertical-align |sub, super, | vertical-align:sub | N |
| text-transform |capitalize, uppercase, lowercase, none | text-transform:lowercase | N |
| text-align |left, right, center, justify | text-align:center | N |
| text-indent |//length//, //percentage// | text-indent:25px | N |
| line-height |normal, //number//, //length//, //percentage// | line-height:15pt | N |


''The //CSS Box//''
<html>
<div style="color:black;background-color:#FFFFCC;padding:1em;border:thin solid black;text-align:center;width=30%">margin
<div style="color:white;background-color:black;padding:1em;border:thin solid black;text-align:center;width=100%">border
<div style="color:black;background-color:#FFCC99;padding:1em;border:thin solid black;text-align:center;width=100%">padding
<div style="color:black;background-color:white;border:thin solid black;text-align:center;width=100%">content<br/>
<div style="float:left"><-</div><div style="float:right">-></div>CSS 'width'
</div>
</div>
</div>
</div>
</html>


|>|>|>| !Box Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| margin-top |//length//, //percentage//, auto | margin-top:5px | N |
| margin-right |//length//, //percentage//, auto | margin-right:5px | N |
| margin-bottom |//length//, //percentage//, auto | margin-bottom:1em | N |
| margin-left |//length//, //percentage//, auto | margin-left:5pt | N |
| margin |//length//, //percentage//, auto {1,4}| margin: 10px 5px 10px 5px | N |
| padding-top |//length//, //percentage// | padding-top:10%| N |
| padding-right |//length//, //percentage// | padding-right:15px | N |
| padding-bottom |//length//, //percentage// | padding-bottom:1.2em | N |
| padding-left |//length//, //percentage// | padding-left:10pt; } | N |
| padding |//length//, //percentage// {1,4}| padding: 10px 10px 10px 15px | N |
| border-top-width |thin, medium, thick, //length// | border-top-width:thin | N |
| border-right-width |thin, medium, thick, //length// | border-right-width:medium | N |
| border-bottom-width |thin, medium, thick, //length// | border-bottom-width:thick | N |
| border-left-width |thin, medium, thick, //length// | border-left-width:15px | N |
| border-width |thin, medium, thick, //length// {1,4}| border-width: 3px 5px 3px 5px | N |
| border-top-color |//color // | border-top-color:navajowhite | N |
| border-right-color |//color// | border-right-color:whitesmoke | N |
| border-bottom-color |//color// | border-bottom-color:black | N |
| border-left-color |//color// | border-left-color:#C0C0C0 | N |
| border-color |//color// {1,4} | border-color: green red white blue; } | N |
| border-top-style |none, solid, double, groove, ridge, inset, outset | border-top-style:solid | N |
| border-right-style |none, solid, double, groove, ridge, inset, outset | border-right-style:double | N |
| border-bottom-style |none, solid, double, groove, ridge, inset, outset | border-bottom-style:groove | N |
| border-left-style |none, solid, double, groove, ridge, inset, outset | border-left-style:none | N |
| border-style |none, solid, double, groove, ridge, inset, outset | border-style:ridge; }| N |
| border-top |//border-width//, //border-style//, //border-color// | border-top: medium outset red | N |
| border-right |//border-width//, //border-style//, //border-color// | border-right: thick inset maroon | N |
| border-bottom |//border-width//, //border-style//, //border-color// | border-bottom: 10px ridge gray | N |
| border-left |//border-width//, //border-style//, //border-color// | border-left: 1px groove red | N |
| border |//border-width//, //border-style//, //border-color// | border: thin solid blue | N |
| float |none, left, right | float:none | N |
| clear |none, left, right, both | clear:left | N |

|>|>|>| !Classification Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| display |none, block, inline, list-item | display:none | N |
| list-style-type |disk, circle, square, decimal, lower-roman, upper-roman, lower-alpha, upper-alpha, none | list-style-type:upper-alpha | Y |
| list-style-image |//url//, none | list-style-image:url(icFile.gif) | Y |
| list-style-position |inside, outside | list-style-position:inside | Y |
| list-style |//keyword// -or- //position// -or- //url// | list-style: square outside url(icFolder.gif) | Y |

|>|>|>| !Positioning Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Applies Too'' | ''Inherited?'' |
| clip |//shape//, auto | clip:rect(0px 200px 200px 0px) | all element | N |
| height |//length//, auto | height:200px | DIV, SPAN and replaced element | N |
| left |//length//, //percentage//, auto | left:0px | absolutely and relatively positioned element | N |
| overflow |visible, hidden, scroll, auto | overflow:scroll | all element | N |
| position |absolute, relative, static | position:absolute | all element | N |
| top |//length//, //percentage//, auto | top:0px | absolutely and relatively positioned element | N |
| visibility |visible, hidden, inherit | visibility:visible | all element | N |
| width |//length//, //percentage//, auto | width:80%| DIV, SPAN and replaced element | N |
| z-index |auto, //integer// | z-index:-1| absolutely and relatively positioned element | N |

|>|>|>| !Printing Properties |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| page-break-before |auto, always -or- left, right | page-break-before:alway | N |
| page-break-after |auto, always -or- left, right | page-break-before:auto | N |

|>|>|>| !Pseudo Classes |
| ''Property'' | ''Valid Values'' | ''Example'' | ''Inherited?'' |
| cursor |auto, crosshair, default, hand, move, e-resize, ne-resize, nw-resize, n-resize, se-resize, sw-resize, s-resize, w-resize, text, wait, help | { cursor:hand; } | Y |
| active, hover, link, visited | n/a | a:hover { color:red; } | Y |
| first-letter, first-line |any font manipulating declaration | p:first-letter{ float:left;color:blue } | N |
}}}}}}
!H1
h1です。
!!H2
h2です。
!!!H3
h3です。
!!!!H4
h4です。
!!!!!H5
h5です。
/***
|''Name:''|CalendarPlugin|
|''Source:''|http://www.TiddlyTools.com/#CalendarPlugin|
|''Author:''|SteveRumsby|
|''License:''|unknown|
|''~CoreVersion:''|2.0.10|

// // updated by Jeremy Sheeley to add cacheing for reminders
// // see http://www.geocities.com/allredfaq/reminderMacros.html
// // ''Changes by ELS 2006.08.23:''
// // added handling for weeknumbers (code supplied by Martin Budden. see "wn**" comment marks)
// // ''Changes by ELS 2005.10.30:''
// // config.macros.calendar.handler()
// // ^^use "tbody" element for IE compatibility^^
// // ^^IE returns 2005 for current year, FF returns 105... fix year adjustment accordingly^^
// // createCalendarDays()
// // ^^use showDate() function (if defined) to render autostyled date with linked popup^^
// // calendar stylesheet definition
// // ^^use .calendar class-specific selectors, add text centering and margin settings^^


!!!!!Configuration:
<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//
|''First day of week:''|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|
|''First day of weekend:''|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|

!!!!!Syntax:
|{{{<<calendar>>}}}|Produce a full-year calendar for the current year|
|{{{<<calendar year>>}}}|Produce a full-year calendar for the given year|
|{{{<<calendar year month>>}}}|Produce a one-month calendar for the given month and year|
|{{{<<calendar thismonth>>}}}|Produce a one-month calendar for the current month|
|{{{<<calendar lastmonth>>}}}|Produce a one-month calendar for last month|
|{{{<<calendar nextmonth>>}}}|Produce a one-month calendar for next month|

***/
// //Modify this section to change the text displayed for the month and day names, to a different language for example. You can also change the format of the tiddler names linked to from each date, and the colours used.

//{{{
config.macros.calendar = {};

config.macros.calendar.monthnames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
config.macros.calendar.daynames = ["M", "T", "W", "T", "F", "S", "S"];

config.macros.calendar.weekendbg = "#c0c0c0";
config.macros.calendar.monthbg = "#e0e0e0";
config.macros.calendar.holidaybg = "#ffc0c0";

//}}}
// //''Code section:''
// (you should not need to alter anything below here)//
//{{{
if(config.options.txtCalFirstDay == undefined)
 config.options.txtCalFirstDay = 0;
if(config.options.txtCalStartOfWeekend == undefined)
 config.options.txtCalStartOfWeekend = 5;
if(config.options.chkDisplayWeekNumbers == undefined)//wn**
 config.options.chkDisplayWeekNumbers = false;
if(config.options.chkDisplayWeekNumbers)
 config.options.txtCalFirstDay = 0;

config.macros.calendar.tiddlerformat = "0DD/0MM/YYYY"; // This used to be changeable - for now, it isn't// <<smiley :-(>> 
config.macros.calendar.tiddlerformat = "YYYY.0MM.0DD"; 

version.extensions.calendar = { major: 0, minor: 6, revision: 0, date: new Date(2006, 1, 22)};
config.macros.calendar.monthdays = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

config.macros.calendar.holidays = [ ]; // Not sure this is required anymore - use reminders instead
//}}}

// //Is the given date a holiday?
//{{{
function calendarIsHoliday(date)
{
 var longHoliday = date.formatString("0DD/0MM/YYYY");
 var shortHoliday = date.formatString("0DD/0MM");

 for(var i = 0; i < config.macros.calendar.holidays.length; i++) {
 if(config.macros.calendar.holidays[i] == longHoliday || config.macros.calendar.holidays[i] == shortHoliday) {
 return true;
 }
 }
 return false;
}
//}}}

// //The main entry point - the macro handler.
// //Decide what sort of calendar we are creating (month or year, and which month or year)
// // Create the main calendar container and pass that to sub-ordinate functions to create the structure.
// ELS 2005.10.30: added creation and use of "tbody" for IE compatibility and fixup for year >1900//
// ELS 2005.10.30: fix year calculation for IE's getYear() function (which returns '2005' instead of '105')//
// ELS 2006.05.29: add journalDateFmt handling//
//{{{
config.macros.calendar.handler = function(place,macroName,params)
{
 var calendar = createTiddlyElement(place, "table", null, "calendar", null);
 var tbody = createTiddlyElement(calendar, "tbody", null, null, null);
 var today = new Date();
 var year = today.getYear();
 if (year<1900) year+=1900;
 
 // get format for journal link by reading from SideBarOptions (ELS 5/29/06 - based on suggestion by Martin Budden)
 var text = store.getTiddlerText("SideBarOptions");
 this.journalDateFmt = "DD-MMM-YYYY";
 var re = new RegExp("<<(?:newJournal)([^>]*)>>","mg"); var fm = re.exec(text);
 if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }

 if (params[0] == "thismonth")
 {
 cacheReminders(new Date(year, today.getMonth(), 1, 0, 0), 31);
 createCalendarOneMonth(tbody, year, today.getMonth());
 } 
 else if (params[0] == "lastmonth") {
 var month = today.getMonth()-1; if (month==-1) { month=11; year--; }
 cacheReminders(new Date(year, month, 1, 0, 0), 31);
 createCalendarOneMonth(tbody, year, month);
 }
 else if (params[0] == "nextmonth") {
 var month = today.getMonth()+1; if (month>11) { month=0; year++; }
 cacheReminders(new Date(year, month, 1, 0, 0), 31);
 createCalendarOneMonth(tbody, year, month);
 }
 else {
 if (params[0]) year = params[0];
 if(params[1])
 {
 cacheReminders(new Date(year, params[1]-1, 1, 0, 0), 31);
 createCalendarOneMonth(tbody, year, params[1]-1);
 }
 else
 {
 cacheReminders(new Date(year, 0, 1, 0, 0), 366);
 createCalendarYear(tbody, year);
 }
 }
 window.reminderCacheForCalendar = null;
}
//}}}
//{{{
//This global variable is used to store reminders that have been cached
//while the calendar is being rendered. It will be renulled after the calendar is fully rendered.
window.reminderCacheForCalendar = null;
//}}}
//{{{
function cacheReminders(date, leadtime)
{
 if (window.findTiddlersWithReminders == null)
 return;
 window.reminderCacheForCalendar = {};
 var leadtimeHash = [];
 leadtimeHash [0] = 0;
 leadtimeHash [1] = leadtime;
 var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);
 for(var i = 0; i < t.length; i++) {
 //just tag it in the cache, so that when we're drawing days, we can bold this one.
 window.reminderCacheForCalendar[t[i]["matchedDate"]] = "reminder:" + t[i]["params"]["title"]; 
 }
}
//}}}
//{{{
function createCalendarOneMonth(calendar, year, mon)
{
 var row = createTiddlyElement(calendar, "tr", null, null, null);
 createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, true, year, mon);
 row = createTiddlyElement(calendar, "tr", null, null, null);
 createCalendarDayHeader(row, 1);
 createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}

//{{{
function createCalendarMonth(calendar, year, mon)
{
 var row = createTiddlyElement(calendar, "tr", null, null, null);
 createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, false, year, mon);
 row = createTiddlyElement(calendar, "tr", null, null, null);
 createCalendarDayHeader(row, 1);
 createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}

//{{{
function createCalendarYear(calendar, year)
{
 var row;
 row = createTiddlyElement(calendar, "tr", null, null, null);
 var back = createTiddlyElement(row, "td", null, null, null);
 var backHandler = function() {
 removeChildren(calendar);
 createCalendarYear(calendar, year-1);
 };
 createTiddlyButton(back, "<", "Previous year", backHandler);
 back.align = "center";

 var yearHeader = createTiddlyElement(row, "td", null, "calendarYear", year);
 yearHeader.align = "center";
 //yearHeader.setAttribute("colSpan", 19);
 yearHeader.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?22:19);//wn**

 var fwd = createTiddlyElement(row, "td", null, null, null);
 var fwdHandler = function() {
 removeChildren(calendar);
 createCalendarYear(calendar, year+1);
 };
 createTiddlyButton(fwd, ">", "Next year", fwdHandler);
 fwd.align = "center";

 createCalendarMonthRow(calendar, year, 0);
 createCalendarMonthRow(calendar, year, 3);
 createCalendarMonthRow(calendar, year, 6);
 createCalendarMonthRow(calendar, year, 9);
}
//}}}

//{{{
function createCalendarMonthRow(cal, year, mon)
{
 var row = createTiddlyElement(cal, "tr", null, null, null);
 createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);
 createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);
 createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);
 row = createTiddlyElement(cal, "tr", null, null, null);
 createCalendarDayHeader(row, 3);
 createCalendarDayRows(cal, year, mon);
}
//}}}

//{{{
function createCalendarMonthHeader(cal, row, name, nav, year, mon)
{
 var month;
 if(nav) {
 var back = createTiddlyElement(row, "td", null, null, null);
 back.align = "center";
 back.style.background = config.macros.calendar.monthbg;

/*
 back.setAttribute("colSpan", 2);

 var backYearHandler = function() {
 var newyear = year-1;
 removeChildren(cal);
 cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);
 createCalendarOneMonth(cal, newyear, mon);
 };
 createTiddlyButton(back, "<<", "Previous year", backYearHandler);
*/
 var backMonHandler = function() {
 var newyear = year;
 var newmon = mon-1;
 if(newmon == -1) { newmon = 11; newyear = newyear-1;}
 removeChildren(cal);
 cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
 createCalendarOneMonth(cal, newyear, newmon);
 };
 createTiddlyButton(back, "<", "Previous month", backMonHandler);


 month = createTiddlyElement(row, "td", null, "calendarMonthname", name)
// month.setAttribute("colSpan", 3);
// month.setAttribute("colSpan", 5);
 month.setAttribute("colSpan", config.options.chkDisplayWeekNumbers?6:5);//wn**

 var fwd = createTiddlyElement(row, "td", null, null, null);
 fwd.align = "center";
 fwd.style.background = config.macros.calendar.monthbg; 

// fwd.setAttribute("colSpan", 2);
 var fwdMonHandler = function() {
 var newyear = year;
 var newmon = mon+1;
 if(newmon == 12) { newmon = 0; newyear = newyear+1;}
 removeChildren(cal);
 cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
 createCalendarOneMonth(cal, newyear, newmon);
 };
 createTiddlyButton(fwd, ">", "Next month", fwdMonHandler);
/*
 var fwdYear = createTiddlyElement(row, "td", null, null, null);
 var fwdYearHandler = function() {
 var newyear = year+1;
 removeChildren(cal);
 cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);
 createCalendarOneMonth(cal, newyear, mon);
 };
 createTiddlyButton(fwd, ">>", "Next year", fwdYearHandler);
*/
 } else {
 month = createTiddlyElement(row, "td", null, "calendarMonthname", name)
 //month.setAttribute("colSpan", 7);
 month.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?8:7);//wn**
 }
 month.align = "center";
 month.style.background = config.macros.calendar.monthbg;
}
//}}}

//{{{
function createCalendarDayHeader(row, num)
{
 var cell;
 for(var i = 0; i < num; i++) {
 if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, "td");//wn**
 for(var j = 0; j < 7; j++) {
 var d = j + (config.options.txtCalFirstDay - 0);
 if(d > 6) d = d - 7;
 cell = createTiddlyElement(row, "td", null, null, config.macros.calendar.daynames[d]);
 if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))
 cell.style.background = config.macros.calendar.weekendbg;
 }
 }
}
//}}}

//{{{
function createCalendarDays(row, col, first, max, year, mon)
{
 var i;
 if (config.options.chkDisplayWeekNumbers){
 if (first<=max) {
 var ww = new Date(year,mon,first);
 createTiddlyElement(row, "td", null, null, "w"+ww.getWeek());//wn**
 }
 else createTiddlyElement(row, "td", null, null, null);//wn**
 }
 for(i = 0; i < col; i++) {
 createTiddlyElement(row, "td", null, null, null);
 }
 var day = first;
 for(i = col; i < 7; i++) {
 var d = i + (config.options.txtCalFirstDay - 0);
 if(d > 6) d = d - 7;
 var daycell = createTiddlyElement(row, "td", null, null, null);
 var isaWeekend = ((d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))? true:false);

 if(day > 0 && day <= max) {
 var celldate = new Date(year, mon, day);
 // ELS 2005.10.30: use <<date>> macro's showDate() function to create popup
 if (window.showDate) {
 showDate(daycell,celldate,"popup","DD",config.macros.calendar.journalDateFmt,true, isaWeekend); // ELS 5/29/06 - use journalDateFmt 
 } else {
 if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;
 var title = celldate.formatString(config.macros.calendar.tiddlerformat);
 if(calendarIsHoliday(celldate)) {
 daycell.style.background = config.macros.calendar.holidaybg;
 }
 if(window.findTiddlersWithReminders == null) {
 var link = createTiddlyLink(daycell, title, false);
 link.appendChild(document.createTextNode(day));
 } else {
 var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);
 }
 }
 }
 day++;
 }
}
//}}}

// //We've clicked on a day in a calendar - create a suitable pop-up of options.
// //The pop-up should contain:
// // * a link to create a new entry for that date
// // * a link to create a new reminder for that date
// // * an <hr>
// // * the list of reminders for that date
//{{{
function onClickCalendarDate(e)
{
 var button = this;
 var date = button.getAttribute("title");
 var dat = new Date(date.substr(6,4), date.substr(3,2)-1, date.substr(0, 2));

 date = dat.formatString(config.macros.calendar.tiddlerformat);
 var popup = createTiddlerPopup(this);
 popup.appendChild(document.createTextNode(date));
 var newReminder = function() {
 var t = store.getTiddlers(date);
 displayTiddler(null, date, 2, null, null, false, false);
 if(t) {
 document.getElementById("editorBody" + date).value += "\n<<reminder day:" + dat.getDate() +
 " month:" + (dat.getMonth()+1) +
 " year:" + (dat.getYear()+1900) + " title: >>";
 } else {
 document.getElementById("editorBody" + date).value = "<<reminder day:" + dat.getDate() +
 " month:" + (dat.getMonth()+1) +
 " year:" + (dat.getYear()+1900) + " title: >>";
 }
 };
 var link = createTiddlyButton(popup, "New reminder", null, newReminder); 
 popup.appendChild(document.createElement("hr"));

 var t = findTiddlersWithReminders(dat, [0,14], null, 1);
 for(var i = 0; i < t.length; i++) {
 link = createTiddlyLink(popup, t[i].tiddler, false);
 link.appendChild(document.createTextNode(t[i].tiddler));
 }
}
//}}}

//{{{
function calendarMaxDays(year, mon)
{
 var max = config.macros.calendar.monthdays[mon];
 if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) {
 max++;
 }
 return max;
}
//}}}

//{{{
function createCalendarDayRows(cal, year, mon)
{
 var row = createTiddlyElement(cal, "tr", null, null, null);

 var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
 if(first1 < 0) first1 = first1 + 7;
 var day1 = -first1 + 1;
 var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
 if(first2 < 0) first2 = first2 + 7;
 var day2 = -first2 + 1;
 var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
 if(first3 < 0) first3 = first3 + 7;
 var day3 = -first3 + 1;

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

 while(day1 <= max1 || day2 <= max2 || day3 <= max3) {
 row = createTiddlyElement(cal, "tr", null, null, null);
 createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
 createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;
 createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;
 }
}
//}}}

//{{{
function createCalendarDayRowsSingle(cal, year, mon)
{
 var row = createTiddlyElement(cal, "tr", null, null, null);

 var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
 if(first1 < 0) first1 = first1+ 7;
 var day1 = -first1 + 1;
 var max1 = calendarMaxDays(year, mon);

 while(day1 <= max1) {
 row = createTiddlyElement(cal, "tr", null, null, null);
 createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
 }
}
//}}}

// //ELS 2005.10.30: added styles
//{{{
setStylesheet(".calendar, .calendar table, .calendar th, .calendar tr, .calendar td { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }", "calendarStyles");
//}}}
[[CalendarPlugin]] をインストールすることで、カレンダーが表示できる。
{{{
<<calendar thismonth>>
}}}
<<calendar thismonth>>

紆余曲折あって ~SideBar に入れてます、MainMenu だとレイアウトによっては使えないし。

[[CalendarPlugin]] にある通り、
<<<
First day of week:[ ]		(Monday = 0, Sunday = 6)
First day of weekend:[ ]		(Monday = 0, Sunday = 6)
<<<
スタートの曜日が指定できます。
plugin の tiddler にセットすれば良いはずなのだがどうも忘れがちの(勝手に消える) あったので、私は [[CalendarPluginConfig]] こちらで設定しています。

とはいえ実は単体ではあまり効果的に使用することはできず。
*[[DatePlugin]]
*[[ReminderMacros]]
と併わせて使うべきものである。
// // override cookie settings for CalendarPlugin:
//{{{
//First day of week:(Monday = 0, Sunday = 6)
config.options.txtCalFirstDay=0;

//First day of weekend:(Monday = 0, Sunday = 6)
config.options.txtCalStartOfWeekend=5;

config.macros.calendar.weekendbg = "#FFC9D7";
//}}}
<<deletelist check:toRSS>>
/***
|Name|CheckboxPlugin|
|Source|http://www.TiddlyTools.com/#CheckboxPlugin|
|Version|2.2.4|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Add checkboxes to your tiddler content|
This plugin extends the TiddlyWiki syntax to allow definition of checkboxes that can be embedded directly in tiddler content.  Checkbox states are preserved by either:
* automatically modifying the tiddler content (deprecated)
* or, by setting/removing tags on specified tiddlers,
* or, by setting custom field values on specified tiddlers,
* or, by saving to a locally-stored cookie ID.
When an ID is assigned to the checkbox, it enables direct programmatic access to the checkbox DOM element, as well as creating an entry in TiddlyWiki's config.options[ID] internal data.  In addition to tracking the checkbox state, you can also specify custom javascript for programmatic initialization and onClick event handling for any checkbox, so you can provide specialized side-effects in response to state changes.
!!!!! Inline wiki-syntax usage
<<<
//{{{
[ ]or[_] and [x]or[X]
//}}}
Simple checkboxes using 'Inline X' storage.  The current unchecked/checked state is indicated by the character between the {{{[}}} and {{{]}}} brackets ("_" means unchecked, "X" means checked).  When you click on a checkbox, the current state is retained by directly modifying the tiddler content to place the corresponding "_" or "X" character in between the brackets.
>//''NOTE: 'Inline X' syntax has been deprecated...''  This storage format only works properly for checkboxes that are directly embedded and accessed from content in a single tiddler.  However, if that tiddler is 'transcluded' into another (by using the {{{<<tiddler TiddlerName>>}}} macro), the 'Inline X' will be ''erroneously stored in the containing tiddler's source content, resulting in corrupted content in that tiddler.''  For anything but the most simple of "to do list" uses, you should select from the various alternative storage methods described below...//
//{{{
[x=id]
//}}}
Assign an optional ID to the checkbox so you can use {{{document.getElementByID("id")}}} to manipulate the checkbox DOM element, as well as tracking the current checkbox state in {{{config.options["id"]}}}.  If the ID starts with "chk" the checkbox state will also be saved in a cookie, so it can be automatically restored whenever the checkbox is re-rendered (overrides any default {{{[x]}}} or {{{[_]}}} value).  If a cookie value is kept, the "_" or "X" character in the tiddler content remains unchanged, and is only applied as the default when a cookie-based value is not currently defined.
//{{{
[x(title|tag)] or [x(title:tag)]
//}}}
Initializes and tracks the current checkbox state by setting or removing a particular tag value from a specified tiddler.  If you omit the tiddler title (and the | or : separator), the specified tag is assigned to the current tiddler.  If you omit the tag value, as in {{{(title|)}}}, the default tag, {{{checked}}}, is assumed.  Omitting both the title and tag, {{{()}}}, tracks the checkbox state by setting the "checked" tag on the current tiddler.  When tag tracking is used, the "_" or "X" character in the tiddler content remains unchanged, and is not used to set or track the checkbox state.  If a tiddler title named in the tag does not exist, the checkbox state defaults to the "inline X" value.  If this value is //checked//, or is subsequently changed to //checked//, it will automatically create the missing tiddler and then add the tag to it.  //''NOTE: beginning with version 2.1.2 of this plugin, the "|" separator is the preferred separator between the title and tag name, as it avoids syntactic ambiguity when ":" is used within tiddler titles or tag names.''//
//{{{
[x(field@tiddler)]
//}}}
Initializes and tracks the current checkbox state by setting a particular custom field value from a specified tiddler.  If you omit the tiddler title (but not the "@" separator), the specified field on the current tiddler is used.  If you omit the field name, as in {{{(@tiddler)}}}, a default fieldname of {{{checked}}} is assumed.  Omitting both the field and the tiddler title, {{{(@)}}}, defaults to setting the "checked" field on the current tiddler.  When field tracking is used, the "_" or "X" character in the tiddler content remains unchanged, and is not used to set or track the checkbox state.  If the tiddler title named in the parameter does not exist, the checkbox state defaults to the "inline X" value.  If this value is //checked// or is subsequently changed to //checked//, it will automatically create the missing tiddler and then add the field to it.
//{{{
[x{javascript}{javascript}]
//}}}
You can define optional javascript code segments to add custom initialization and/or 'onClick' handling to a checkbox.  The current checkbox state (and it's other DOM attributes) can be set or read from within these code segments by reference to the default context-object, 'this'.

The first code segment will be executed when the checkbox is initially displayed, so that you can programmatically determine it's starting checked/unchecked state.  The second code segment (if present) is executed whenever the checkbox is clicked, so that you can perform programmed responses or intercept and override the checkbox state based on complex logic using the TW core API or custom functions defined in plugins (e.g. testing a particular tiddler title to see if certain tags are set or setting some tags when the checkbox is clicked).

Note: if you want to use the default checkbox initialization processing with a custom onclick function, use this syntax: {{{ [x=id{}{javascript}] }}} 
<<<
!!!!! Macro usage
<<<
In addition to embedded checkboxes using the wiki syntax described above, a ''macro-based syntax'' is also provided, for use in templates where wiki syntax cannot be directly used.  This macro syntax can also be used in tiddler content, as an alternative to the wiki syntax.  When embedded in [[PageTemplate]], [[ViewTemplate]], or [[EditTemplate]] (or custom alternative templates), use the following macro syntax:
//{{{
<span macro="checkbox target checked id onInit onClick"></span>
//}}}
or, when embedded in tiddler content, use the following macro syntax:
//{{{
<<checkbox target checked id onInit onClick>>
//}}}
where:
''target''
>is either a tag reference (e.g., ''tagname|tiddlername'') or a field reference (e.g. ''fieldname@tiddlername''), as described above.
''checked'' (optional)
>is a keyword that sets the initial state of the checkbox to "checked".  When omitted, the default checkbox state is "unchecked".
''id'' (optional)
>specifies an internal config.options.* ID, as described above.  If the ID begins with "chk", a cookie-based persistent value will be created to track the checkbox state in between sessions.
''onInit'' (optional)
>contains a javascript event handler to be performed when the checkbox is initially rendered (see details above).
''onClick'' (optional)
>contains a javascript event handler to be performed each time the checkbox is clicked (see details above).
>//note: to use the default onInit handler with a custom onClick handler, use "" (empty quotes) as a placeholder for the onInit parameter//
<<<
!!!!!Examples
<<<
''checked and unchecked static default ("inline X") values:''
//{{{
[X] label
[_] label
//}}}
>[X] label
>[_] label
''document-based value (id='demo', no cookie):''
//{{{
[_=demo] label
//}}}
>[_=demo] label
''cookie-based value  (id='chkDemo'):''
//{{{
[_=chkDemo] label
//}}}
>[_=chkDemo] label
''tag-based value (TogglyTagging):''
//{{{
[_(CheckboxPlugin|demotag)]
[_(CheckboxPlugin|demotag){this.refresh.tagged=this.refresh.container=false}]
//}}}
>[_(CheckboxPlugin|demotag)] toggle 'demotag' (and refresh tiddler display)
>[_(CheckboxPlugin|demotag){this.refresh.tagged=this.refresh.container=false}] toggle 'demotag' (no refresh)
''field-based values:''
//{{{
[_(demofield@CheckboxPlugin)] demofield@CheckboxPlugin
[_(demofield@)] demofield@ (equivalent to demonfield@ current tiddler)
[_(checked@CheckboxPlugin)] checked@CheckboxPlugin
[_(@CheckboxPlugin)] @CheckboxPlugin
[_(@)] @ (equivalent to checked@ current tiddler)
//}}}
>[_(demofield@CheckboxPlugin)] demofield@CheckboxPlugin
>[_(demofield@)] demofield@ (current tiddler)
>[_(checked@CheckboxPlugin)] checked@CheckboxPlugin
>[_(@CheckboxPlugin)] @CheckboxPlugin
>[_(@)] toggle field: @ (defaults to "checked@here")
>click to view current: <<toolbar fields>>
''custom init and onClick functions:''
//{{{
[X{this.checked=true}{alert(this.checked?"on":"off")}] message box with checkbox state
//}}}
>[X{this.checked=true}{alert(this.checked?"on":"off")}] message box with checkbox state
''retrieving option values:''
>config.options['demo']=<script>return config.options['demo']?"true":"false";</script>
>config.options['chkDemo']=<script>return config.options['chkDemo']?"true":"false";</script>
<<<
!!!!!Configuration
<<<
Normally, when a checkbox state is changed, the affected tiddlers are automatically re-rendered, so that any checkbox-dependent dynamic content can be updated.  There are three possible tiddlers to be re-rendered, depending upon where the checkbox is placed, and what kind of storage method it is using.
*''container'': the tiddler in which the checkbox is displayed. (e.g., this tiddler)
*''tagged'': the tiddler that is being tagged (e.g., "~MyTask" when tagging "~MyTask:done")
*''tagging'': the "tag tiddler" (e.g., "~done" when tagging "~MyTask:done")
You can set the default refresh handling for all checkboxes in your document by using the following javascript syntax either in a systemConfig plugin, or as an inline script.  (Substitute true/false values as desired):
{{{config.checkbox.refresh = { tagged:true, tagging:true, container:true };}}}

You can also override these defaults for any given checkbox by using an initialization function to set one or more of the refresh options.  For example:
{{{[_{this.refresh.container=false}]}}}
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''CheckboxPlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
2007.08.06 - 2.2.5 supress automatic refresh of any tiddler that is currently being edited.  Ensures that current tiddler edit sessions are not prematurely discarded (losing any changes).  However, if checkbox changes a tag on a tiddler being edited, update the "tags" input field (if any) so that saving the edited tiddler correctly reflects any changes due to checkbox activity... see refreshEditorTagField().
2007.07.13 - 2.2.4 in handler(), fix srctid reference (was "w.tiddler", should have been "w.tiddler.title").  This fixes broken 'inline X' plus fatal macro error when using PartTiddlerPlugin.  Thanks to cmari for reporting the problem and UdoBorkowski for finding the code error.
2007.06.21 - 2.2.3 suppress automatic refresh of tiddler when using macro-syntax to prevent premature end of tiddler editing session.
2007.06.20 - 2.2.2 fixed handling for 'inline X' when checkboxes are contained in a 'trancluded' tiddler.  Now, regardless of where an inline X checkbox appears, the X will be placed in the originating source tiddler, rather than the tiddler in which the checkbox appears.
2007.06.17 - 2.2.1 Refactored code to add checkbox //macro// syntax for use in templates (e.g., {{{macro="checkbox ..."}}}. Also, code cleanup of existing tag handling.
2007.06.16 - 2.2.0 added support for tracking checkbox states using tiddler fields via "(fieldname@tiddlername)" syntax.
2006.05.04 - 2.1.3 fix use of findContainingTiddler() to check for a non-null return value, so that checkboxes won't crash when used outside of tiddler display context (such as in header, sidebar or mainmenu)
2006.03.11 - 2.1.2 added "|" as delimiter to tag-based storage syntax (e.g. "tiddler|tag") to avoid parsing ambiguity when tiddler titles or tag names contain ":".   Using ":" as a delimiter is still supported but is deprecated in favor of the new "|" usage.  Based on a problem reported by JeffMason.
2006.02.25 - 2.1.0 added configuration options to enable/disable forced refresh of tiddlers when toggling tags
2006.02.23 - 2.0.4 when toggling tags, force refresh of the tiddler containing the checkbox.
2006.02.23 - 2.0.3 when toggling tags, force refresh of the 'tagged tiddler' so that tag-related tiddler content (such as "to-do" lists) can be re-rendered.
2006.02.23 - 2.0.2 when using tag-based storage, allow use [[ and ]] to quote tiddler or tag names that contain spaces:
{{{[x([[Tiddler with spaces]]:[[tag with spaces]])]}}}
2006.01.10 - 2.0.1 when toggling tags, force refresh of the 'tagging tiddler'.  For example, if you toggle the "systemConfig" tag on a plugin, the corresponding "systemConfig" TIDDLER will be automatically refreshed (if currently displayed), so that the 'tagged' list in that tiddler will remain up-to-date.
2006.01.04 - 2.0.0 update for ~TW2.0
2005.12.27 - 1.1.2 Fix lookAhead regExp handling for {{{[x=id]}}}, which had been including the "]" in the extracted ID.  
Added check for "chk" prefix on ID before calling saveOptionCookie()
2005.12.26 - 1.1.2 Corrected use of toUpperCase() in tiddler re-write code when comparing {{{[X]}}} in tiddler content with checkbox state. Fixes a problem where simple checkboxes could be set, but never cleared.
2005.12.26 - 1.1.0 Revise syntax so all optional parameters are included INSIDE the [ and ] brackets.  Backward compatibility with older syntax is supported, so content changes are not required when upgrading to the current version of this plugin.   Based on a suggestion by GeoffSlocock
2005.12.25 - 1.0.0 added support for tracking checkbox state using tags ("TogglyTagging")
Revised version number for official post-beta release.
2005.12.08 - 0.9.3 support separate 'init' and 'onclick' function definitions.
2005.12.08 - 0.9.2 clean up lookahead pattern
2005.12.07 - 0.9.1 only update tiddler source content if checkbox state is actually different.  Eliminates unnecessary tiddler changes (and 'unsaved changes' warnings)
2005.12.07 - 0.9.0 initial BETA release
<<<
!!!!!Credits
<<<
This feature was created by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
//{{{
version.extensions.CheckboxPlugin = {major: 2, minor: 2, revision:5 , date: new Date(2007,8,6)};
//}}}

//{{{
config.checkbox = { refresh: { tagged:true, tagging:true, container:true } };
config.formatters.push( {
	name: "checkbox",
	match: "\\[[xX_ ][\\]\\=\\(\\{]",
	lookahead: "\\[([xX_ ])(=[^\\s\\(\\]{]+)?(\\([^\\)]*\\))?({[^}]*})?({[^}]*})?\\]",
	handler: function(w) {
		var lookaheadRegExp = new RegExp(this.lookahead,"mg");
		lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			// get params
			var checked=(lookaheadMatch[1].toUpperCase()=="X");
			var id=lookaheadMatch[2];
			var target=lookaheadMatch[3];
			if (target) target=target.substr(1,target.length-2).trim(); // trim off parentheses
			var fn_init=lookaheadMatch[4];
			var fn_click=lookaheadMatch[5];
			var tid=story.findContainingTiddler(w.output);  if (tid) tid=tid.getAttribute("tiddler");
			var srctid=w.tiddler?w.tiddler.title:null;
			config.macros.checkbox.create(w.output,tid,srctid,w.matchStart+1,checked,id,target,config.checkbox.refresh,fn_init,fn_click);
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
	}
} );
config.macros.checkbox = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		if(!(tiddler instanceof Tiddler)) { // if no tiddler passed in try to find one
			var here=story.findContainingTiddler(place);
			if (here) tiddler=store.getTiddler(here.getAttribute("tiddler"))
		}
		var srcpos=0; // "inline X" not applicable to macro syntax
		var target=params.shift(); if (!target) target="";
		var defaultState=params[0]=="checked"; if (defaultState) params.shift();
		var id=params.shift(); if (id && !id.length) id=null;
		var fn_init=params.shift(); if (fn_init && !fn_init.length) fn_init=null;
		var fn_click=params.shift(); if (fn_click && !fn_click.length) fn_click=null;
		var refresh={ tagged:true, tagging:true, container:false };
		this.create(place,tiddler.title,tiddler.title,0,defaultState,id,target,refresh,fn_init,fn_click);
	},
	create: function(place,tid,srctid,srcpos,defaultState,id,target,refresh,fn_init,fn_click) {
		// create checkbox element
		var c = document.createElement("input");
		c.setAttribute("type","checkbox");
		c.onclick=this.onClickCheckbox;
		c.srctid=srctid; // remember source tiddler
		c.srcpos=srcpos; // remember location of "X"
		c.container=tid; // containing tiddler (may be null if not in a tiddler)
		c.tiddler=tid; // default target tiddler 
		c.refresh = {};
		c.refresh.container = refresh.container;
		c.refresh.tagged = refresh.tagged;
		c.refresh.tagging = refresh.tagging;
		place.appendChild(c);
		// set default state
		c.checked=defaultState;
		// track state in config.options.ID
		if (id) {
			c.id=id.substr(1); // trim off leading "="
			if (config.options[c.id]!=undefined)
				c.checked=config.options[c.id];
			else
				config.options[c.id]=c.checked;
		}
		// track state in (tiddlername|tagname) or (fieldname@tiddlername)
		if (target) {
			var pos=target.indexOf("@");
			if (pos!=-1) {
				c.field=pos?target.substr(0,pos):"checked"; // get fieldname (or use default "checked")
				c.tiddler=target.substr(pos+1); // get specified tiddler name (if any)
				if (!c.tiddler || !c.tiddler.length) c.tiddler=tid; // if tiddler not specified, default == container
				if (store.getValue(c.tiddler,c.field)!=undefined)
					c.checked=(store.getValue(c.tiddler,c.field)=="true"); // set checkbox from saved state
			} else {
				var pos=target.indexOf("|"); if (pos==-1) var pos=target.indexOf(":");
				c.tag=target;
				if (pos==0) c.tag=target.substr(1); // trim leading "|" or ":"
				if (pos>0) { c.tiddler=target.substr(0,pos); c.tag=target.substr(pos+1); }
				if (!c.tag.length) c.tag="checked";
				var t=store.getTiddler(c.tiddler);
				if (t && t.tags)
					c.checked=t.isTagged(c.tag); // set checkbox from saved state
			}
		}
		if (fn_init) c.fn_init=fn_init.trim().substr(1,fn_init.length-2); // trim off surrounding { and } delimiters
		if (fn_click) c.fn_click=fn_click.trim().substr(1,fn_click.length-2);
		c.init=true; c.onclick(); c.init=false; // compute initial state and save in tiddler/config/cookie
	},
	onClickCheckbox: function(event) {
		if (this.fn_init)
			// custom function hook to set initial state (run only once)
			{ try { eval(this.fn_init); this.fn_init=null; } catch(e) { displayMessage("Checkbox init error: "+e.toString()); } }
		else if (this.fn_click)
			// custom function hook to override or react to changes in checkbox state
			{ try { eval(this.fn_click) } catch(e) { displayMessage("Checkbox click error: "+e.toString()); } }
		if (this.id)
			// save state in config AND cookie (only when ID starts with 'chk')
			{ config.options[this.id]=this.checked; if (this.id.substr(0,3)=="chk") saveOptionCookie(this.id); }
		if (this.srctid && this.srcpos>0 && (!this.id || this.id.substr(0,3)!="chk") && !this.tag && !this.field) {
			// save state in tiddler content only if not using cookie, tag or field tracking
			var t=store.getTiddler(this.srctid); // put X in original source tiddler (if any)
			if (t && this.checked!=(t.text.substr(this.srcpos,1).toUpperCase()=="X")) { // if changed
				t.set(null,t.text.substr(0,this.srcpos)+(this.checked?"X":"_")+t.text.substr(this.srcpos+1),null,null,t.tags);
				if (!story.isDirty(t.title)) story.refreshTiddler(t.title,null,true);
				store.setDirty(true);
			}
		}
		if (this.field) {
			if (this.checked && !store.tiddlerExists(this.tiddler))
				store.saveTiddler(this.tiddler,this.tiddler,"",config.options.txtUserName,new Date());
			// set the field value in the target tiddler
			store.setValue(this.tiddler,this.field,this.checked?"true":"false");
			// DEBUG: displayMessage(this.field+"@"+this.tiddler+" is "+this.checked);
		}
		if (this.tag) {
			if (this.checked && !store.tiddlerExists(this.tiddler))
				store.saveTiddler(this.tiddler,this.tiddler,"",config.options.txtUserName,new Date());
			var t=store.getTiddler(this.tiddler);
			if (t) {
				var tagged=(t.tags && t.tags.find(this.tag)!=null);
				if (this.checked && !tagged) { t.tags.push(this.tag); store.setDirty(true); }
				if (!this.checked && tagged) { t.tags.splice(t.tags.find(this.tag),1); store.setDirty(true); }
			}
			// if tag state has been changed, update display of corresponding tiddlers (unless they are in edit mode...)
			if (this.checked!=tagged) {
				if (this.refresh.tagged) {
					if (!story.isDirty(this.tiddler)) story.refreshTiddler(this.tiddler,null,true); // the TAGGED tiddler in view mode
					else config.macros.checkbox.refreshEditorTagField(this.tiddler,this.tag,this.checked); // the TAGGED tiddler in edit mode (with tags field)
				}
				if (this.refresh.tagging)
					if (!story.isDirty(this.tag)) story.refreshTiddler(this.tag,null,true); // the TAGGING tiddler
			}
		}
		// refresh containing tiddler (but not during initial rendering, or we get an infinite loop!) (and not when editing container)
		if (!this.init && this.refresh.container && this.container!=this.tiddler)
			if (!story.isDirty(this.container)) story.refreshTiddler(this.container,null,true); // the tiddler CONTAINING the checkbox
		return true;
	},
	refreshEditorTagField: function(title,tag,set) {
		var tagfield=story.getTiddlerField(title,"tags");
		if (!tagfield||tagfield.getAttribute("edit")!="tags") return; // if no tags field in editor (i.e., custom template)
		var tags=tagfield.value.readBracketedList();
		if (tags.contains(tag)==set) return; // if no change needed
		if (set) tags.push(tag); // add tag
		else tags.splice(tags.indexOf(tag),1); // remove tag
		for (var t=0;t<tags.length;t++) tags[t]=String.encodeTiddlyLink(tags[t]);
		tagfield.value=tags.join(" "); // reassemble tag string (with brackets as needed)
		return;
	}
}
//}}}
/***
|''Name:''|Based on CollapseTiddlersPlugin|
|''Source:''|http://gensoft.revhost.net/Collapse.html|
|''Author:''|Bradley Meck|
|''License:''|unknown|
|''~CoreVersion:''|2.0.10|

|JOS 9/14/2006: changed text for 'collapse all' and 'expand all' to lower-case (consistency's sake); cleanned-up syntax (readability's sake) |
|JOS 9/14/2006: removed "WebCollapsedTemplate" altogether; added compat code for topOfPageMode; added tool tips for collapseAll and expandAll |
|ELS 2/24/2006: added fallback to "CollapsedTemplate if "WebCollapsedTemplate" is not found |
|ELS 2/6/2006: added check for 'readOnly' flag to use alternative "WebCollapsedTemplate" |
***/
//{{{
config.commands.collapseTiddler = {
  text: "fold",
  tooltip: "Collapse this tiddler",
  handler: function(event,src,title){
    var e = story.findContainingTiddler(src);
    var t = "CollapsedTemplate";
    if (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }
    if (config.options.chkTopOfPageMode!=undefined) {
      var pm=config.options.chkTopOfPageMode;
      config.options.chkTopOfPageMode=false;
    }
    if(e.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE]){
      if(e.getAttribute("template") != t ){
        e.setAttribute("oldTemplate",e.getAttribute("template"));
        story.displayTiddler(null,title,t);
      }
    }
    if (config.options.chkTopOfPageMode!=undefined) config.options.chkTopOfPageMode=pm;
  }
}

config.commands.expandTiddler = {
  text: "unfold",
  tooltip: "Expand this tiddler",
  handler: function(event,src,title){
    if (config.options.chkTopOfPageMode!=undefined) {
      var pm=config.options.chkTopOfPageMode;
      config.options.chkTopOfPageMode=false;
    }
    var e = story.findContainingTiddler(src);
    story.displayTiddler(null,title,e.getAttribute("oldTemplate"));
    if (config.options.chkTopOfPageMode!=undefined) config.options.chkTopOfPageMode=pm;
  }
}

config.macros.collapseAll = {
  handler: function(place,macroName,params,wikifier,paramString,tiddler){
    createTiddlyButton(place,"collapse all","Collapse all tiddlers",function(){
                         var t = "CollapsedTemplate";
                         if (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }
                         if (config.options.chkTopOfPageMode!=undefined) {
                           var pm=config.options.chkTopOfPageMode;
                           config.options.chkTopOfPageMode=false;
                         }
                         story.forEachTiddler(function(title,tiddler){
                                                if(tiddler.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE])
                                                  story.displayTiddler(null,title,t);
                                              })
                           if (config.options.chkTopOfPageMode!=undefined) config.options.chkTopOfPageMode=pm;
                       })
  }
}

config.macros.expandAll = {
  handler: function(place,macroName,params,wikifier,paramString,tiddler){
    createTiddlyButton(place,"expand all","",function(){
                         var t = "CollapsedTemplate";
                         if (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }
                         if (config.options.chkTopOfPageMode!=undefined) {
                           var pm=config.options.chkTopOfPageMode;
                           config.options.chkTopOfPageMode=false;
                         }
                         story.forEachTiddler(function(title,tiddler){
                                                if(tiddler.getAttribute("template") == t) story.displayTiddler(null,title,tiddler.getAttribute("oldTemplate"));
                                              })
                           if (config.options.chkTopOfPageMode!=undefined) config.options.chkTopOfPageMode=pm;
                       })
  }
}

config.commands.collapseOthers = {
  text: "focus",
  tooltip: "Expand this tiddler and collapse all others",
  handler: function(event,src,title){
    var e = story.findContainingTiddler(src);
    var t = "CollapsedTemplate";
    if (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }
    if (config.options.chkTopOfPageMode!=undefined) {
      var pm=config.options.chkTopOfPageMode;
      config.options.chkTopOfPageMode=false;
    }
    story.forEachTiddler(function(title,tiddler){
                           if(tiddler.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE]){
                             if (tiddler!=e) story.displayTiddler(null,title,t);
                           }
                         })
    if (config.options.chkTopOfPageMode!=undefined) config.options.chkTopOfPageMode=pm;
  }
}
//}}}
<!--{{{-->
<div class='toolbar' macro='toolbar editTiddler permalink closeOthers +expandTiddler closeTiddler'></div>
<div><span class='title' macro='view title'></span><span style="font-size: 0.8em; padding-left:1em;" macro="includeSiteLink"></span><span class='subtitle' macro='toolbar +expandTiddler'></span></div>
<!--}}}-->
[img[http://accnt.dp34000138.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=total]]
[img[http://accnt.dp34000138.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=today]]
[img[http://accnt.dp34000138.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=yesterday]]
/***
|''Name:''|CryptoFunctionsPlugin|
|''Description:''|Support for cryptographic functions|
***/
//{{{
if(!version.extensions.CryptoFunctionsPlugin) {
version.extensions.CryptoFunctionsPlugin = {installed:true};

//--
//-- Crypto functions and associated conversion routines
//--

// Crypto "namespace"
function Crypto() {}

// Convert a string to an array of big-endian 32-bit words
Crypto.strToBe32s = function(str)
{
	var be = Array();
	var len = Math.floor(str.length/4);
	var i, j;
	for(i=0, j=0; i<len; i++, j+=4) {
		be[i] = ((str.charCodeAt(j)&0xff) << 24)|((str.charCodeAt(j+1)&0xff) << 16)|((str.charCodeAt(j+2)&0xff) << 8)|(str.charCodeAt(j+3)&0xff);
	}
	while (j<str.length) {
		be[j>>2] |= (str.charCodeAt(j)&0xff)<<(24-(j*8)%32);
		j++;
	}
	return be;
};

// Convert an array of big-endian 32-bit words to a string
Crypto.be32sToStr = function(be)
{
	var str = "";
	for(var i=0;i<be.length*32;i+=8)
		str += String.fromCharCode((be[i>>5]>>>(24-i%32)) & 0xff);
	return str;
};

// Convert an array of big-endian 32-bit words to a hex string
Crypto.be32sToHex = function(be)
{
	var hex = "0123456789ABCDEF";
	var str = "";
	for(var i=0;i<be.length*4;i++)
		str += hex.charAt((be[i>>2]>>((3-i%4)*8+4))&0xF) + hex.charAt((be[i>>2]>>((3-i%4)*8))&0xF);
	return str;
};

// Return, in hex, the SHA-1 hash of a string
Crypto.hexSha1Str = function(str)
{
	return Crypto.be32sToHex(Crypto.sha1Str(str));
};

// Return the SHA-1 hash of a string
Crypto.sha1Str = function(str)
{
	return Crypto.sha1(Crypto.strToBe32s(str),str.length);
};

// Calculate the SHA-1 hash of an array of blen bytes of big-endian 32-bit words
Crypto.sha1 = function(x,blen)
{
	// Add 32-bit integers, wrapping at 32 bits
	add32 = function(a,b)
	{
		var lsw = (a&0xFFFF)+(b&0xFFFF);
		var msw = (a>>16)+(b>>16)+(lsw>>16);
		return (msw<<16)|(lsw&0xFFFF);
	};
	// Add five 32-bit integers, wrapping at 32 bits
	add32x5 = function(a,b,c,d,e)
	{
		var lsw = (a&0xFFFF)+(b&0xFFFF)+(c&0xFFFF)+(d&0xFFFF)+(e&0xFFFF);
		var msw = (a>>16)+(b>>16)+(c>>16)+(d>>16)+(e>>16)+(lsw>>16);
		return (msw<<16)|(lsw&0xFFFF);
	};
	// Bitwise rotate left a 32-bit integer by 1 bit
	rol32 = function(n)
	{
		return (n>>>31)|(n<<1);
	};

	var len = blen*8;
	// Append padding so length in bits is 448 mod 512
	x[len>>5] |= 0x80 << (24-len%32);
	// Append length
	x[((len+64>>9)<<4)+15] = len;
	var w = Array(80);

	var k1 = 0x5A827999;
	var k2 = 0x6ED9EBA1;
	var k3 = 0x8F1BBCDC;
	var k4 = 0xCA62C1D6;

	var h0 = 0x67452301;
	var h1 = 0xEFCDAB89;
	var h2 = 0x98BADCFE;
	var h3 = 0x10325476;
	var h4 = 0xC3D2E1F0;

	for(var i=0;i<x.length;i+=16) {
		var j,t;
		var a = h0;
		var b = h1;
		var c = h2;
		var d = h3;
		var e = h4;
		for(j = 0;j<16;j++) {
			w[j] = x[i+j];
			t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=16;j<20;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=20;j<40;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k2);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=40;j<60;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),(b&c)|(d&(b|c)),w[j],k3);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=60;j<80;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k4);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}

		h0 = add32(h0,a);
		h1 = add32(h1,b);
		h2 = add32(h2,c);
		h3 = add32(h3,d);
		h4 = add32(h4,e);
	}
	return Array(h0,h1,h2,h3,h4);
};


}
//}}}
/***
|''Name:''|DateFormatString|
|''Version:''||
|''Source:''|[[AiddlyWiki|http://aiddlywiki.sourceforge.net]]|
|''Author:''|[[Arphen Lin|mailto:arphenlin@gmail.com]]|
|''Type:''|WikiBar addon|
|''Required:''|WikiBar 2.0.0+|
!Description
Add date format string syntax.
!Installation
#Install WikiBar firstly.
#Create your addon as a tiddler and add 'wikibarAddons' tag.
!Code
***/
//{{{

//----------------------------------------------------------------------------
// addon install function: this is a must
//----------------------------------------------------------------------------
function wikibar_addonInstall(unused)
{
  // define tools
  var dateFormatString={
    TYPE:'MENU',
    CAPTION: 'date format string',
    TOOLTIP: 'often used with \"today\" macro',
    YYYY:
    {
      TOOLTIP:    'full year',
      syntax: 'YYYY',
      HANDLER: wikibar_editFormatByCursor
    },
    YY:
    {
      TOOLTIP:    '2-digit year',
      syntax: 'YY',
      HANDLER: wikibar_editFormatByCursor
    },
    MMM:
    {
      TOOLTIP:    'month name',
      syntax: 'MMM',
      HANDLER: wikibar_editFormatByCursor
    },
    MM:
    {
      TOOLTIP:    'month',
      syntax: 'MM',
      HANDLER: wikibar_editFormatByCursor
    },
    OMM:
    {
      TOOLTIP:    'zero-leading month',
      syntax: '0MM',
      HANDLER: wikibar_editFormatByCursor
    },
    DDD:
    {
      TOOLTIP:    'week day',
      syntax: 'DDD',
      HANDLER: wikibar_editFormatByCursor
    },
    DD:
    {
      TOOLTIP:    'day',
      syntax: 'DD',
      HANDLER: wikibar_editFormatByCursor
    },
    '0DD':
    {
      TOOLTIP:    'zero-leading day',
      syntax: '0DD',
      HANDLER: wikibar_editFormatByCursor
    },
    DDth:
    {
      TOOLTIP:    'day with trailing (English) suffix',
      syntax: 'DDth',
      HANDLER: wikibar_editFormatByCursor
    },
    hh:
    {
      TOOLTIP:    'hour',
      syntax: 'hh',
      HANDLER: wikibar_editFormatByCursor
    },
    '0hh':
    {
      TOOLTIP:    'zero-leading hour',
      syntax: '0hh',
      HANDLER: wikibar_editFormatByCursor
    },
    mm:
    {
      TOOLTIP:    'minute',
      syntax: 'mm',
      HANDLER: wikibar_editFormatByCursor
    },
    '0mm':
    {
      TOOLTIP:    'zero-leading minute',
      syntax: '0mm',
      HANDLER: wikibar_editFormatByCursor
    },
    ss:
    {
      TOOLTIP:    'second',
      syntax: 'ss',
      HANDLER: wikibar_editFormatByCursor
    },
    '0ss':
    {
      TOOLTIP:    'zero-leading second',
      syntax: '0ss',
      HANDLER: wikibar_editFormatByCursor
    }
  };

  // register tools
  wikibarStore.addon.dateFormatString = dateFormatString;
}

// for debugging: you can turn it off in final release ----------------------
wikibar_addonInstall();


//}}}
/***
|Name|DatePlugin|
|Source|http://www.TiddlyTools.com/#DatePlugin|
|Version|2.3.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|formatted dates plus popup menu with 'journal' link, changes and (optional) reminders|

There are quite a few calendar generators, reminders, to-do lists, 'dated tiddlers' journals, blog-makers and GTD-like schedule managers that have been built around TW.  While they all have different purposes, and vary in format, interaction, and style, in one way or another each of these plugins displays and/or uses date-based information to make finding, accessing and managing relevant tiddlers easier.  This plugin provides a general approach to embedding dates and date-based links/menus within tiddler content.

This plugin display formatted dates, for the specified year, month, day using number values or mathematical expressions such as (Y+1) or (D+30).  Optionally, you can create a link from the formatted output to a 'dated tiddler' for quick blogging or create a popup menu that includes the dated tiddler link plus links to changes made on that date as well as links to any pending reminders for the coming 31 days (if the RemindersPlugin is installed).  This plugin also provides a public API for easily incorporating formatted date output (with or without the links/popups) into other plugins, such as calendar generators, etc.
!!!!!Usage
<<<
When installed, this plugin defines a macro: {{{<<date [mode] [date] [format] [linkformat]>>}}}.  All of the macro parameters are optional and, in it's simplest form, {{{<<date>>}}}, it is equivalent to the ~TiddlyWiki core macro, {{{<<today>>}}}.

However, where {{{<<today>>}}} simply inserts the current date/time in a predefined format (or custom format, using {{{<<today [format]>>}}}), the {{{<<date>>}}} macro's parameters take it much further than that:
* [mode] is either ''display'', ''link'' or ''popup''.  If omitted, it defaults to ''display''.  This param let's you select between simply displaying a formatted date, or creating a link to a specific 'date titled' tiddler or a popup menu containing a dated tiddler link, plus links to changes and reminders.
* [date] lets you enter ANY date (not just today) as ''year, month, and day values or simple mathematical expressions'' using pre-defined variables, Y, M, and D for the current year, month and day, repectively.  You can display the modification date of the current tiddler by using the keyword: ''tiddler'' in place of the year, month and day parameters.  Use ''tiddler://name-of-tiddler//'' to display the modification date of a specific tiddler.  You can also use keywords ''today'' or ''filedate'' to refer to these //dynamically changing// date/time values.  
* [format] and [linkformat] uses standard ~TiddlyWiki date formatting syntax.  The default is "YYYY.0MM.0DD"
>^^''DDD'' - day of week in full (eg, "Monday"), ''DD'' - day of month, ''0DD'' - adds leading zero^^
>^^''MMM'' - month in full (eg, "July"), ''MM'' - month number, ''0MM'' - adds leading zero^^
>^^''YYYY'' - full year, ''YY'' - two digit year, ''hh'' - hours, ''mm'' - minutes, ''ss'' - seconds^^
>^^//note: use of hh, mm or ss format codes is only supported with ''tiddler'', ''today'' or ''filedate'' values//^^
* [linkformat] - specify an alternative date format so that the title of a 'dated tiddler' link can have a format that differs from the date's displayed format

In addition to the macro syntax, DatePlugin also provides a public javascript API so that other plugins that work with dates (such as calendar generators, etc.) can quickly incorporate date formatted links or popups into their output:

''{{{showDate(place, date, mode, format, linkformat, autostyle, weekend)}}}'' 

Note that in addition to the parameters provided by the macro interface, the javascript API also supports two optional true/false parameters:
* [autostyle] - when true, the font/background styles of formatted dates are automatically adjusted to show the date's status:  'today' is boxed, 'changes' are bold, 'reminders' are underlined, while weekends and holidays (as well as changes and reminders) can each have a different background color to make them more visibly distinct from each other.
* [weekend] - true indicates a weekend, false indicates a weekday.  When this parameter is omitted, the plugin uses internal defaults to automatically determine when a given date falls on a weekend.
<<<
!!!!!Examples
<<<
The current date: <<date>>
The current time: <<date today "0hh:0mm:0ss">>
Today's blog: <<date link today "DDD, MMM DDth, YYYY">>
Recent blogs/changes/reminders: <<date popup Y M D-1 "yesterday">> <<date popup today "today">> <<date popup Y M D+1 "tomorrow">>
The first day of next month will be a <<date Y M+1 1 "DDD">>
This tiddler (DatePlugin) was last updated on: <<date tiddler "DDD, MMM DDth, YYYY">>
The SiteUrl was last updated on: <<date tiddler:SiteUrl "DDD, MMM DDth, YYYY">>
This document was last saved on <<date filedate "DDD, MMM DDth, YYYY at 0hh:0mm:0ss">>
<<date 2006 07 24 "MMM DDth, YYYY">> will be a <<date 2006 07 24 "DDD">>
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''DatePlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
''2007.06.20 [2.3.1]'' in onClickDatePopup(), use Popup.show() instead of deprecated ScrollToTiddlerPopup().  Fixes fatal error that prevents popups from being properly displayed
''2007.05.31 [2.3.0]'' list "created" tiddlers in date popup.  Also, force re-cache of created/modified indices when displaying current date and store.isDirty(), so that popup is kept in sync with tiddler changes.
''2006.05.09 [2.2.1]'' added "todaybg" handling to set background color of current date.  Also, honor excludeLists tag when getting lists of tiddlers.  Based on suggestions by Mark Hulme.
''2006.05.05 [2.2.0]'' added "linkedbg" handling to set background color when a 'dated tiddler' exists.  Based on a suggestion by Mark Hulme.
''2006.03.08 [2.1.2]'' add 'override leadtime' flag param in call to findTiddlersWithReminders(), and add "Enter a title" default text to new reminder handler.  Thanks to Jeremy Sheeley for these additional tweaks.
''2006.03.06 [2.1.0]'' hasReminders() nows uses window.reminderCacheForCalendar[] when present.  If calendar cache is not present, indexReminders() now uses findTiddlersWithReminders() with a 90-day look ahead to check for reminders.  Also, switched default background colors for autostyled dates: reminders are now greenish ("c0ffee") and holidays are now reddish ("ffaace").
''2006.02.14 [2.0.5]'' when readOnly is set (by TW core), omit "new reminders..." popup menu item and, if a "dated tiddler" does not already exist, display the date as simple text instead of a link.
''2006.02.05 [2.0.4]'' added var to variables that were unintentionally global.  Avoids FireFox 1.5.0.1 crash bug when referencing global variables
''2006.01.18 [2.0.3]'' In 1.2.x the tiddler editor's text area control was given an element ID=("tiddlerBody"+title), so that it was easy to locate this field and programmatically modify its content.  With the addition of configuration templates in 2.x, the textarea no longer has an ID assigned.  To find this control we now look through all the child nodes of the tiddler editor to locate a "textarea" control where attribute("edit") equals "text", and then append the new reminder to the contents of that control.
''2006.01.11 [2.0.2]'' correct 'weekend' override detection logic in showDate()
''2006.01.10 [2.0.1]'' allow custom-defined weekend days (default defined in config.macros.date.weekend[] array)
added flag param to showDate() API to override internal weekend[] array
''2005.12.27 [2.0.0]'' Update for TW2.0
Added parameter handling for 'linkformat'
''2005.12.21 [1.2.2]'' FF's date.getYear() function returns 105 (for the current year, 2005).  When calculating a date value from Y M and D expressions, the plugin adds 1900 to the returned year value get the current year number.  But IE's date.getYear() already returns 2005.  As a result, plugin calculated date values on IE were incorrect (e.g., 3905 instead of 2005).  Adding +1900 is now conditional so the values will be correct on both browsers.
''2005.11.07 [1.2.1]'' added support for "tiddler" dynamic date parameter
''2005.11.06 [1.2.0]'' added support for "tiddler:title" dynamic date parameter
''2005.11.03 [1.1.2]'' when a reminder doesn't have a specified title parameter, use the title of the tiddler that contains the reminder as "fallback" text in the popup menu.  Based on a suggestion from BenjaminKudria.
''2005.11.03 [1.1.1]'' Temporarily bypass hasReminders() logic to avoid excessive overhead from generating the indexReminders() cache.  While reminders can still appear in the popup menu, they just won't be indicated by auto-styling the date number that is displayed.  This single change saves approx. 60% overhead (5 second delay reduced to under 2 seconds).
''2005.11.01 [1.1.0]'' corrected logic in hasModifieds() and hasReminders() so caching of indexed modifieds and reminders is done just once, as intended.  This should hopefully speed up calendar generators and other plugins that render multiple dates...
''2005.10.31 [1.0.1]'' documentation and code cleanup
''2005.10.31 [1.0.0]'' initial public release
''2005.10.30 [0.9.0]'' pre-release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].
<<<
!!!!!Code
***/
//{{{
version.extensions.date = {major: 2, minor: 3, revision: 1, date: new Date(2007,6,20)};
//}}}

//{{{
config.macros.date = {
	format: "YYYY.0MM.0DD", // default date display format
	linkformat: "YYYY.0MM.0DD", // 'dated tiddler' link format
	linkedbg: "#babb1e", // "babble"
	todaybg: "#ffab1e", // "fable"
	weekendbg: "#c0c0c0", // "cocoa"
	holidaybg: "#ffaace", // "face"
	createdbg: "#bbeeff", // "beef"
	modifiedsbg: "#bbeeff", // "beef"
	remindersbg: "#c0ffee", // "coffee"
	holidays: [ "01/01", "07/04", "07/24", "11/24" ], // NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)
	weekend: [ 1,0,0,0,0,0,1 ] // [ day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6 ]
};
//}}}

//{{{
config.macros.date.handler = function(place,macroName,params)
{
	// do we want to see a link, a popup, or just a formatted date?
	var mode="display";
	if (params[0]=="display") { mode=params[0]; params.shift(); }
	if (params[0]=="popup") { mode=params[0]; params.shift(); }
	if (params[0]=="link") { mode=params[0]; params.shift(); }
	// get the date
	var now = new Date();
	var date = now;
	if (!params[0] || params[0]=="today")
		{ params.shift(); }
	else if (params[0]=="filedate")
		{ date=new Date(document.lastModified); params.shift(); }
	else if (params[0]=="tiddler")
		{ date=store.getTiddler(story.findContainingTiddler(place).id.substr(7)).modified; params.shift(); }
	else if (params[0].substr(0,8)=="tiddler:")
		{ var t; if ((t=store.getTiddler(params[0].substr(8)))) date=t.modified; params.shift(); }
	else {
		var y = eval(params.shift().replace(/Y/ig,(now.getYear()<1900)?now.getYear()+1900:now.getYear()));
		var m = eval(params.shift().replace(/M/ig,now.getMonth()+1));
		var d = eval(params.shift().replace(/D/ig,now.getDate()+0));
		date = new Date(y,m-1,d);
	}
	// date format with optional custom override
	var format=this.format; if (params[0]) format=params.shift();
	var linkformat=this.linkformat; if (params[0]) linkformat=params.shift();
	showDate(place,date,mode,format,linkformat);
}
//}}}

//{{{
window.showDate=showDate;
function showDate(place,date,mode,format,linkformat,autostyle,weekend)
{
	if (!mode) mode="display";
	if (!format) format=config.macros.date.format;
	if (!linkformat) linkformat=config.macros.date.linkformat;
	if (!autostyle) autostyle=false;

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

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

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

	// if using a popup menu, replace click handler for dated tiddler link
	// with handler for popup and make link text non-italic (i.e., an 'existing link' look)
	if (mode=="popup") {
		link.onclick = onClickDatePopup;
		link.style.fontStyle="normal";
	}

	// format the popup link to show what kind of info it contains (for use with calendar generators)
	if (!autostyle) return;
	if (hasModifieds(date)||hasCreateds(date))
		{ link.style.fontStyle="normal"; link.style.fontWeight="bold"; }
	if (hasReminders(date))
		{ link.style.textDecoration="underline"; }
	if(isToday(date))
		{ link.style.border="1px solid black"; }

	if( (weekend!=undefined?weekend:isWeekend(date)) && (config.macros.date.weekendbg!="") )
		{ place.style.background = config.macros.date.weekendbg; }
	if(isHoliday(date)&&(config.macros.date.holidaybg!=""))
		{ place.style.background = config.macros.date.holidaybg; }
	if (hasCreateds(date)&&(config.macros.date.createdbg!=""))
		{ place.style.background = config.macros.date.createdbg; }
	if (hasModifieds(date)&&(config.macros.date.modifiedsbg!=""))
		{ place.style.background = config.macros.date.modifiedsbg; }
	if (store.tiddlerExists(linkto)&&(config.macros.date.linkedbg!=""))
		{ place.style.background = config.macros.date.linkedbg; }
	if (hasReminders(date)&&(config.macros.date.remindersbg!=""))
		{ place.style.background = config.macros.date.remindersbg; }
	if(isToday(date)&&(config.macros.date.todaybg!=""))
		{ place.style.background = config.macros.date.todaybg; }
}
//}}}

//{{{
function isToday(date) // returns true if date is today
	{ var now=new Date(); return ((now-date>=0) && (now-date<86400000)); }

function isWeekend(date) // returns true if date is a weekend
	{ return (config.macros.date.weekend[date.getDay()]); }

function isHoliday(date) // returns true if date is a holiday
{
	var longHoliday = date.formatString("0MM/0DD/YYYY");
	var shortHoliday = date.formatString("0MM/0DD");
	for(var i = 0; i < config.macros.date.holidays.length; i++) {
		var holiday=config.macros.date.holidays[i];
		if (holiday==longHoliday||holiday==shortHoliday) return true;
	}
	return false;
}
//}}}

//{{{
// Event handler for clicking on a day popup
function onClickDatePopup(e)
{
	if (!e) var e = window.event;
	var theTarget = resolveTarget(e);
	var popup = Popup.create(this);
	if(popup) {
		// always show dated tiddler link (or just date, if readOnly) at the top...
		if (!readOnly || store.tiddlerExists(this.date.formatString(this.linkformat)))
			createTiddlyLink(popup,this.date.formatString(this.linkformat),true);
		else
			createTiddlyText(popup,this.date.formatString(this.linkformat));
		addCreatedsToPopup(popup,this.date,this.format);
		addModifiedsToPopup(popup,this.date,this.format);
		addRemindersToPopup(popup,this.date,this.linkformat);
	}
	Popup.show(popup,false);
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	return(false);
}
//}}}

//{{{
function indexCreateds() // build list of tiddlers, hash indexed by creation date
{
	var createds= { };
	var tiddlers = store.getTiddlers("title","excludeLists");
	for (var t = 0; t < tiddlers.length; t++) {
		var date = tiddlers[t].created.formatString("YYYY0MM0DD")
		if (!createds[date])
			createds[date]=new Array();
		createds[date].push(tiddlers[t].title);
	}
	return createds;
}
function hasCreateds(date) // returns true if date has created tiddlers
{
	if (!config.macros.date.createds) config.macros.date.createds=indexCreateds();
	return (config.macros.date.createds[date.formatString("YYYY0MM0DD")]!=undefined);
}

function addCreatedsToPopup(popup,when,format)
{
	var force=(store.isDirty() && when.formatString("YYYY0MM0DD")==new Date().formatString("YYYY0MM0DD"));
	if (force || !config.macros.date.createds) config.macros.date.createds=indexCreateds();
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var createds = config.macros.date.createds[when.formatString("YYYY0MM0DD")];
	if (createds) {
		createds.sort();
		var e=createTiddlyElement(popup,"div",null,null,"created:");
		for(var t=0; t<createds.length; t++) {
			var link=createTiddlyLink(popup,createds[t],false);
			link.appendChild(document.createTextNode(indent+createds[t]));
			createTiddlyElement(popup,"br",null,null,null);
		}
	}
}
//}}}

//{{{
function indexModifieds() // build list of tiddlers, hash indexed by modification date
{
	var modifieds= { };
	var tiddlers = store.getTiddlers("title","excludeLists");
	for (var t = 0; t < tiddlers.length; t++) {
		var date = tiddlers[t].modified.formatString("YYYY0MM0DD")
		if (!modifieds[date])
			modifieds[date]=new Array();
		modifieds[date].push(tiddlers[t].title);
	}
	return modifieds;
}
function hasModifieds(date) // returns true if date has modified tiddlers
{
	if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();
	return (config.macros.date.modifieds[date.formatString("YYYY0MM0DD")]!=undefined);
}

function addModifiedsToPopup(popup,when,format)
{
	var force=(store.isDirty() && when.formatString("YYYY0MM0DD")==new Date().formatString("YYYY0MM0DD"));
	if (force || !config.macros.date.modifieds) config.macros.date.modifieds=indexModifieds();
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	var mods = config.macros.date.modifieds[when.formatString("YYYY0MM0DD")];
	if (mods) {
		mods.sort();
		var e=createTiddlyElement(popup,"div",null,null,"changed:");
		for(var t=0; t<mods.length; t++) {
			var link=createTiddlyLink(popup,mods[t],false);
			link.appendChild(document.createTextNode(indent+mods[t]));
			createTiddlyElement(popup,"br",null,null,null);
		}
	}
}
//}}}

//{{{
function indexReminders(date,leadtime) // build list of tiddlers with reminders, hash indexed by reminder date
{
	var reminders = { };
	if(window.findTiddlersWithReminders!=undefined) { // reminder plugin is installed
		// DEBUG var starttime=new Date();
		var t = findTiddlersWithReminders(date, [0,leadtime], null, null, 1);
		for(var i=0; i<t.length; i++) reminders[t[i].matchedDate]=true;
		// DEBUG var out="Found "+t.length+" reminders in "+((new Date())-starttime+1)+"ms\n";
		// DEBUG out+="startdate: "+date.toLocaleDateString()+"\n"+"leadtime: "+leadtime+" days\n\n";
		// DEBUG for(var i=0; i<t.length; i++) { out+=t[i].matchedDate.toLocaleDateString()+" "+t[i].params.title+"\n"; }
		// DEBUG alert(out);
	}
	return reminders;
}

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

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

	var indent = String.fromCharCode(160)+String.fromCharCode(160);
	var reminders=findTiddlersWithReminders(when, [0,31],null,null,1);
	var e=createTiddlyElement(popup,"div",null,null,"reminders:"+(!reminders.length?" none":""));
	for(var t=0; t<reminders.length; t++) {
		link = createTiddlyLink(popup,reminders[t].tiddler,false);
		var diff=reminders[t].diff;
		diff=(diff<1)?"Today":((diff==1)?"Tomorrow":diff+" days");
		var txt=(reminders[t].params["title"])?reminders[t].params["title"]:reminders[t].tiddler;
		link.appendChild(document.createTextNode(indent+diff+" - "+txt));
		createTiddlyElement(popup,"br",null,null,null);
	}
	if (readOnly) return;	// omit "new reminder..." link
	var link = createTiddlyLink(popup,indent+"new reminder...",true); createTiddlyElement(popup,"br");
	var title = when.formatString(format);
	link.title="add a reminder to '"+title+"'";
	link.onclick = function() {
		// show tiddler editor
		story.displayTiddler(null, title, 2, null, null, false, false);
		// find body 'textarea'
		var c =document.getElementById("tiddler" + title).getElementsByTagName("*");
		for (var i=0; i<c.length; i++) if ((c[i].tagName.toLowerCase()=="textarea") && (c[i].getAttribute("edit")=="text")) break;
		// append reminder macro to tiddler content
		if (i<c.length) {
			if (store.tiddlerExists(title)) c[i].value+="\n"; else c[i].value="";
			c[i].value += "<<reminder";
			c[i].value += " day:"+when.getDate();
			c[i].value += " month:"+(when.getMonth()+1);
			c[i].value += " year:"+when.getFullYear();
			c[i].value += ' title:"Enter a title" >>';
		}
	};
}
//}}}
[[DatePlugin]] は様々な日付フォーマットを提供してくれる。
!!フォーマット ([[DatePlugin]] より)
!!!!!Examples
<<<
The current date: <<date>>
The current time: <<date today "0hh:0mm:0ss">>
Today's blog: <<date link today "DDD, MMM DDth, YYYY">>
Recent blogs/changes/reminders: <<date popup Y M D-1 "yesterday">> <<date popup today "today">> <<date popup Y M D+1 "tomorrow">>
The first day of next month will be a <<date Y M+1 1 "DDD">>
This tiddler (DatePlugin) was last updated on: <<date tiddler "DDD, MMM DDth, YYYY">>
The SiteUrl was last updated on: <<date tiddler:SiteUrl "DDD, MMM DDth, YYYY">>
This document was last saved on <<date filedate "DDD, MMM DDth, YYYY at 0hh:0mm:0ss">>
<<date 2006 07 24 "MMM DDth, YYYY">> will be a <<date 2006 07 24 "DDD">>
<<<
!!!!!書式
{{{
The current date: <<date>>
The current time: <<date today "0hh:0mm:0ss">>
Today's blog: <<date link today "DDD, MMM DDth, YYYY">>
Recent blogs/changes/reminders: <<date popup Y M D-1 "yesterday">> <<date popup today "today">> <<date popup Y M D+1 "tomorrow">>
The first day of next month will be a <<date Y M+1 1 "DDD">>
This tiddler (DatePlugin) was last updated on: <<date tiddler "DDD, MMM DDth, YYYY">>
The SiteUrl was last updated on: <<date tiddler:SiteUrl "DDD, MMM DDth, YYYY">>
This document was last saved on <<date filedate "DDD, MMM DDth, YYYY at 0hh:0mm:0ss">>
<<date 2006 07 24 "MMM DDth, YYYY">> will be a <<date 2006 07 24 "DDD">>
}}}

他にカレンダーに今日の枠が付く。これがけっこう大きい。

またカレンダーの日付クリックでプルダウンリストが開く、その日修正した tiddler などリストされる。ReminderMacros が入っていればその内容もリストされる。

カレンダーのプルダウンのリンクが見難いようであれば、以下のあたりを修正する。
{{{
.popup { background: #04b; border: 1px solid #04b; color: #ccc;} //upd krk
.popup a {color: #eee;} //upd krk
}}}
/***
|Name|DcTableOfContentsPlugin|
|Created by|Doug Compton|
|Source|http://www.zagware.com/tw/plugins.html#DcTableOfContentsPlugin|
|Version|0.3.0.2 - 14/9/2011 - changed kuraku|
!Description
This macro will insert a table of contents reflecting the headings that are used in a tiddler and will be automatically updated when you make changes.  Each item in the table of contents can be clicked on to jump to that heading.  It can be used either inside of select tiddlers or inside a system wide template.

A parameter can be used to show the table of contents of a seperate tiddler, <<showtoc tiddlerTitle>>

It will also place a link beside each header which will jump the screen to the top of the current tiddler.  This will only be displayed if the current tiddler is using the <<showtoc>> macro.

The appearance of the table of contents and the link to jump to the top can be modified using CSS.  An example of this is given below.

!Examples
If you had a tiddler with the following headings

 ! Heading1
 !! Heading2
 !! Heading3
 !!! Heading4
 ! Heading5

this table of contents would be automatically generated
*Heading1
**Heading2
**Heading3
***Heading4
*Heading5

!Changing how it looks
The styling can be modified in the StyleSheetDcTableOfContents shadow tiddler.

!Usage
!!Only in select tiddlers
The table of contents above is an example of how to use this macro in a tiddler.  Just insert <<showtoc>> in a tiddler on a line by itself.

It can also display the table of contents of another tiddler by using the macro with a parameter, <<showtoc tiddlerTitle>>
!!On every tiddler
It can also be used in a template to have it show on every tiddler.  An example ViewTemplate is shown below.

//{{{
<div class='toolbar' macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'>Created <span macro='view created date DD-MM-YY'></span>, updated <span macro='view modified date DD-MM-YY'></span></div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class="toc" macro='showtoc'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
//}}}

!History
!!0.3.0.2 - 2011.09.14
*Added shadow tiddler StyleSheetDcTableOfContents - kuraku
!!0.3.0.1 - 2007.06.07
*patched - KuRaKu
!!0.3.0 - 04/12/2006
*Added the ability to show the table of contents of a seperate tiddler.
*Fixed an error when a heading had a ~WikiLink in it.
!!0.2.0 - 04/10/2006
*Added the [top] link on headings to jump to the top of the current tiddler.
*The appearance can now be customized using CSS.
*All event handlers now return false.
!!0.1.0 - 04/07/2006
*Initial version

!Code
***/
//{{{

version.extensions.DcTableOfContentsPlugin= {
	major: 0, minor: 3, revision: 0,
	date: new Date(2006, 4, 12), 
	type: 'macro',
	source: "http://www.zagware.com/tw/plugins.html#DcTableOfContentsPlugin"
};

// Replace heading formatter with our own
for (var n=0; n<config.formatters.length; n++) {
	var format = config.formatters[n];
	if (format.name == 'heading') {
		format.handler = function(w) {

			// following two lines is the default handler
			var e = createTiddlyElement(w.output, "h" + w.matchLength);
			//w.subWikify(e, this.terminator);
			w.subWikifyTerm(e,this.termRegExp); //change krk

			// Only show [top] if current tiddler is using showtoc
			//if (w.tiddler.isTOCInTiddler == 1) {
			if (w.tiddler && w.tiddler.isTOCInTiddler == 1) { // change krk
				// Create to outter SPAN containing the default CSS values
				var span = createTiddlyElement(e, "span");
				span.style.fontSize = ".5em";
				span.style.color = "blue";

				// Create the link to jump to the top
				createTiddlyButton(span, " [top]", "Go to top of tiddler", window.scrollToTop, "dcTOCTop", null, null);
			}
		}
		break;
	}
}


config.macros.showtoc = {
	handler: function(place, macroName, params, wikifier, paramString, tiddler) {
		var text = "";
		var title = "";
		var myTiddler = null;

		// Did they pass in a tiddler?
		if (params.length) {
			title = params[0];
			myTiddler = store.getTiddler(title);
		} else {
			myTiddler = tiddler;
		}

		if (myTiddler == null) {
			wikify("ERROR: Could not find " + title, place);
			return;
		}

		var lines = myTiddler .text.split("\n");
		myTiddler.isTOCInTiddler = 1;

		// Create to SPAN so the TOC can be customized using CSS
		var span = createTiddlyElement(place, "span", null, "dcTOC");

		if (lines != null) {
			for (var x=0; x<lines.length; x++) {
				var line = lines[x];
				if (line.substr(0,1) == "!") {
					// Find first non ! char
					for (var i=0; i<line.length; i++) {
						if (line.substr(i, 1) != "!") {
							break;
						}
					}
					var desc = line.substring(i);
					// Remove WikiLinks
					desc = desc.replace(/\[\[/g, "");
					desc = desc.replace(/\]\]/g, "");

					text += line.substr(0, i).replace(/[!]/g, '*');
					text += '<html><a href="javascript:;" onClick="window.scrollToHeading(\'' + title + '\', \'' + desc+ '\', event)">' + desc+ '</a></html>\n';
				}
			}
		}
		wikify(text, span);
	}
}

window.scrollToTop = function(evt) {
	if (! evt)
		var evt = window.event;

	var target = resolveTarget(evt);
	var tiddler = story.findContainingTiddler(target);

	if (! tiddler)
		return false;

	window.scrollTo(0, ensureVisible(tiddler));

	return false;
}

window.scrollToHeading = function(title, anchorName, evt) {
	var tiddler = null;

	if (! evt)
		var evt = window.event;

	if (title) {
		story.displayTiddler(store.getTiddler(title), title, null, false);
		tiddler = document.getElementById(story.idPrefix + title);
	} else {
		var target = resolveTarget(evt);
		tiddler = story.findContainingTiddler(target);
	}

	if (tiddler == null)
		return false;

	var children1 = tiddler.getElementsByTagName("h1");
	var children2 = tiddler.getElementsByTagName("h2");
	var children3 = tiddler.getElementsByTagName("h3");
	var children4 = tiddler.getElementsByTagName("h4");
	var children5 = tiddler.getElementsByTagName("h5");

	var children = new Array();
	children = children.concat(children1, children2, children3, children4, children5);

	for (var i = 0; i < children.length; i++) {
		for (var j = 0; j < children[i].length; j++) {
			var heading = children[i][j].innerHTML;

			// Remove all HTML tags
			while (heading.indexOf("<") >= 0) {
				heading = heading.substring(0, heading.indexOf("<")) + heading.substring(heading.indexOf(">") + 1);
			}

			// Cut off the code added in showtoc for TOP
			heading = heading.substr(0, heading.length-6);

			if (heading == anchorName) {
				var y = findPosY(children[i][j]);
				window.scrollTo(0,y);
				return false;
			}
		}
	}
	return false
}

// add kuraku 11.09.14(wed)
config.shadowTiddlers.StyleSheetDcTableOfContents = "/*{{{*/\n"
	+ ".dcTOC ul {\n	color: red;\n	list-style-type: lower-roman;\n}\n"
	+ ".dcTOC a {\n	color: green;\n	border: none;\n}\n"
	+ ".dcTOC a:hover {\n	background: white;\n	border: solid 1px\n}\n"
	+ ".dcTOCTop {\n	font-size: 2em;\n	color: green;\n}\n"
    + "/*}}}*/";
store.addNotification("StyleSheetDcTableOfContents", refreshStyles);
//}}}
[[DcTableOfContentsPlugin]] は見出しを抽出して目次を作成する。

以下を [[ViewTemplate]] へ追記。
{{{
<div class="toc" macro='showtoc'></div>
}}}

書式は以下の様にする。
{{{
<<showtoc>>
}}}
<<showtoc>>
----
!!見出し1
!!!見出し2
!!見出し3
!!!見出し4
!!!!見出し5
----

tiddler を指定することで、その tiddler の目次を表示できる。
{{{
<<showtoc DcTableOfContentsPlugin>>
}}}
<<<
<<showtoc DcTableOfContentsPlugin>>
<<<
ただし、top リンクで戻っては来れない。当然だが。
[[FrontPage]]
/***
|''Name:''|DeleteListPlugin|
|''Source:''|http://tw.kuraku.net/tw.html#DeleteListPlugin|
|''Author:''|kuraku|
|''License:''|http://creativecommons.org/licenses/by-sa/2.5/|
|''Version:''|0.1.9 (2007-11-29)|
|''~CoreVersion:''|2.2|

!!Description
tiddler をまとめて消すことができます。
@@color(red):実際に削除を行なうときにはバックアップをしてください。@@
(間違えて消えてしまっても責任は持てません)

tiddler を複数指定した場合は削除に時間がかかりますのでしばらくお待ちください。

It is possible to erase it bringing tiddler together. 
@@color(red):Please back up when you actually delete it. @@
(The responsibility cannot be taken even if disappearing by mistake. )

It takes time for the deletion and wait for a while, please when you specify two or 
more tiddler. 

!!Examples
{{{
<<deletelist [list:tagname1[,tagname2]] [check:tagname3[,tagname4]]>>
}}}
''list:'' Tag list of tiddler that wants to list
''check:'' Tag list of tiddler that wants to checked

When you want to list 'systemConfig' tag of tiddler with 'plugins' tag. 
{{{<<deletelist list:plugins check:systemConfig>>}}}

see: [[DeleteListPlugin sample|DeleteList]]

!!Tagcheck Configuration
You can set checktag of default.
Please add tiddler [[DeleteListPluginConfig]] after making systemConfig tag.
{{{
config.macros.deletelist.tags = [ "systemConfig", "systemConfigDisable", "toRSS", "today" ];
}}}
If you put "systemConfig" tag, it is necessary to put "systemConfigDisable" tag too.

!!Add OptionsPanel/BackStage Coniguration
Display DeleteList in OptionsPanel: <<option chkDeleteListDisplayInOptions>>
~~if flag is true appear in OptionsPanel of sidebar.~~

Display DeleteList in BackStage: <<option chkDeleteListDisplayInBackStage>>
~~if flag is true appear in BackStage.~~

!!Custom display "Wait message" or "Progress indicator"
You can set wait message.
{{{
config.macros.deletelist.waitmessage = "<blink>Wait ...</blink>";
}}}
Or set indicator animetion picture.
{{{
config.macros.deletelist.waitmessage = "<img src='http://kuraku.net/tw/indicator.white.gif'>";
}}}
Add or Create [[DeleteListPluginConfig]] and set waitmessage by html format.

!!tips
If you want to add new collectively tag, let's use this. 
You only have to make new tiddler of the content of {{{<<deletelist check:newtag>>}}}.

!!History
*2007.11.29, ver 0.1.9:
**added option "chkDeleteListDisplayInBackStage". if check this flag, appear "DelList" in BackStages.
*2007.11.15, ver 0.1.8:
**improved javascript syntax and typo.
*2007.08.23, ver 0.1.7:
**improved set style. dont use setAttribute.
*2007.06.11, ver 0.1.6:
**added display indicator or wait message.
**improved content of source.
**BugFix select cancel on dialog.
*2007.04.25, ver 0.1.5:
**added flag of the SystemConfig tag is displayed by default. 
**added error is displayed if there is no matched tiddler. 
**added display list tiddler tags.
**improved new parameter list and check are added.
**improved content of source.
*2007.04.16, ver 0.1.4:
**added shadow tiddler "DeleteList" (is in only {{{<<deletelist>>}}}).
**added option "chkDeleteListDisplayInOptions". if check this flag, appear "DeleteList" in options.

!!Source
***/
/*{{{*/
version.extensions.deletelist = { major: 0, minor: 1, revision: 9, date: new Date(2007,11,29),
	source: "http://tw.kuraku.net/tw.html#DeleteListPlugin"
};

config.macros.deletelist = {};
config.macros.deletelist.version="Version %0.%1.%2".format([version.extensions.deletelist.major,version.extensions.deletelist.minor,version.extensions.deletelist.revision]);

config.macros.deletelist.tags = [];

if(config.options.chkDeleteListDisplayInOptions == undefined)
  config.options.chkDeleteListDisplayInOptions = false;
if(config.options.chkDeleteListDisplayInBackStage == undefined)
  config.options.chkDeleteListDisplayInBackStage = false;

config.macros.deletelist.waitmessage = "<span style='fonze-size:0.8em;color:#d00;'><blink>>> wait a minute...</blink></span>";

config.macros.deletelist.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	var e = createTiddlyElement(place,"div");
	e.setAttribute("refresh","macro");
	e.setAttribute("macroName","deletelist");
	e.setAttribute("params",paramString);
	createTiddlyElement(place,"div","result_dlp");
	this.refresh(e,paramString);
};

config.macros.deletelist.refresh = function(place,params) {
	var parameters = params.parseParams("name",null,true);
	var list_tags = parameters[0]["list"]?parameters[0]["list"][0].split(","):[];
	var check_tags = parameters[0]["check"]?parameters[0]["check"][0].split(","):[];

	var tagslists = [];
	tagslists = config.macros.deletelist.tags;
	if(check_tags.length > 0)
		tagslists = check_tags;

	var listViewTemplate = {
		columns: [
			{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
			{name: 'systemConfig', field: 'systemConfig', title: 'S',  type: 'Boolean', trueText: "S", falseText: ""},
			{name: 'Title', field: 'title', tiddlerLink: 'title', title: "Title", type: 'TiddlerLink'}
		],
		rowClasses: [
			{className: 'error', field: 'error'},
			{className: 'warning', field: 'warning'}
			],
		actions: [
			{caption: "More actions...", name: ''},
			{caption: "Delete these tiddlers forever", name: 'delete'}
		]};

	var i;
	for(i=0; i<tagslists.length; i++){
    	var tagname = tagslists[i];
		var tmpl = {name: tagname, field: tagname, title: tagname, type: 'TagCheckbox', tag:tagname};
		listViewTemplate.columns.push(tmpl);
	}

	var selectedRows = [];
	ListView.forEachSelector(place,function(e,rowName) {
		if(e.checked)
			selectedRows.push(e.getAttribute("rowName"));
		});

	removeChildren(place);

	tagname = params;
	var lists = [];
	var j,tiddler,p;
	var configTiddlers = [];

	if(list_tags.length > 0){
		for(i=0; i<list_tags.length; i++){
			var tagtiddlers = store.getTaggedTiddlers(list_tags[i]);
			configTiddlers = configTiddlers.concat(tagtiddlers);
		}
	}else
		configTiddlers = store.getTiddlers();

	// no match error
	if(configTiddlers.length <= 0){
		createTiddlyError(place,"Don't Match tiddler","no exist your input tagname tiddler.");
		return;
	}

	for(i=0; i<configTiddlers.length; i++){
		tiddler = configTiddlers[i];

		p = store.getTiddlerSlices(tiddler.title,["Name","Description","Version","CoreVersion","Date","Source","Author","License","Browsers"]);
		p.tiddler = tiddler;
		p.title = tiddler.title;

		for(j=0; j<tagslists.length; j++){
			var tn = tagslists[j];
			p[tn] = p.tiddler.isTagged(tagslists[j]);
		}

		p['systemConfig'] = ( (p.tiddler.isTagged('systemConfig')) && !(p.tiddler.isTagged('systemConfigDisable')) );

		lists.push(p);
	}

	for(i=0; i<lists.length; i++){
		p = lists[i];
		p.Selected = selectedRows.indexOf(lists[i].title) != -1;
	}

	var sysInfo = createTiddlyElement(place,"div",null,null,"S: 'systemConfig' tag and not 'systemConfigDisable' tag");
	sysInfo.style.cssText = "font-size:0.8em;";
	if(list_tags.length > 0){
		var listtagsInfo = createTiddlyElement(place,"div",null,null,"list tiddler tags: "+list_tags.toString().replace(",", " / "));

		listtagsInfo.style.cssText = "font-size:0.8em;";
	}

	if(lists.length === 0)
		createTiddlyElement(place,"em",null,null,this.noPluginText);
	else
		ListView.create(place,lists,listViewTemplate,this.onSelectCommand);

	var ver = createTiddlyElement(place,"div",null,null,"DeleteListPlugin "+config.macros.deletelist.version);
	ver.style.cssText = "font-size:0.8em;";
	// wait message area
	createTiddlyElement(place,"div","wait_dlp");
};

config.macros.deletelist.onSelectCommand = function(obj,command,rowNames) {
	var reslist = document.getElementById("result_dlp");
	var wait = document.getElementById("wait_dlp");
	var i;

	switch(command) {
		case "remove":
			for(i=0; i<rowNames.length; i++)
				store.setTiddlerTag(rowNames[i],false,"systemConfig");
			break;
		case "delete":
			wait.innerHTML = config.macros.deletelist.waitmessage;

			if(rowNames.length > 0 && confirm(config.macros.plugins.confirmDeleteText.format([rowNames.join(", ")]))) {
				for(i=0; i<rowNames.length; i++) {
					store.removeTiddler(rowNames[i]);
					story.closeTiddler(rowNames[i],true,false);
				}
				//message display
				createTiddlyElement(reslist,"H5",null,null,"Delete tiddler count: "+rowNames.length+"\n");
				var disp = createTiddlyElement(reslist,"ul",null,null); 
				for(i=0; i<rowNames.length; i++){
					createTiddlyElement(disp, "li",null,null,rowNames[i]+"\n");
				}
			}
			wait.innerHTML = "";
			break;
		default:
			break;
	}
	if(config.options.chkAutoSave)
		saveChanges(true);
};

//set shadow tiddler
config.shadowTiddlers["DeleteList"]="<<deletelist>>";
//add OptionsPanel
if(config.options.chkDeleteListDisplayInOptions){
	config.shadowTiddlers.OptionsPanel+="\nDeleteList";
}
// Add BackStage
if(config.options.chkDeleteListDisplayInBackStage){
	if(config.tasks && config.backstageTasks){
		config.tasks.DeleteListTask = {
			text: "DelList",
			tooltip: "Delete List tool",
			content: "<<deletelist>>"
		};
		config.backstageTasks.push("DeleteListTask");
	}
}
/*}}}*/
//{{{
config.macros.deletelist.tags = [ "toRSS", "today", "excludeLists", "excludeSearch" ];
config.macros.deletelist.waitmessage = "<img src='http://kuraku.net/tw/indicator.white.gif'>";
//}}}
/***
|''Name:''|DeprecatedFunctionsPlugin|
|''Description:''|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};

//--
//-- Deprecated code
//--

// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)
{
	w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);
};

// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
{
	var lookaheadRegExp = new RegExp(this.lookahead,"mg");
	lookaheadRegExp.lastIndex = w.matchStart;
	var lookaheadMatch = lookaheadRegExp.exec(w.source);
	if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
		var text = lookaheadMatch[1];
		if(config.browser.isIE)
			text = text.replace(/\n/g,"\r");
		createTiddlyElement(w.output,"pre",null,null,text);
		w.nextMatch = lookaheadRegExp.lastIndex;
	}
};

// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)
{
	createTiddlyElement(place,"br");
};

// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
{
	var i = this.indexOf(item);
	return i == -1 ? null : i;
};

// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
{
	return store.getLoader().internalizeTiddler(store,this,title,divRef);
};

// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
{
	return store.getSaver().externalizeTiddler(store,this);
};

// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
{
	return store.allTiddlersAsHtml();
}

// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)
{
	refreshPageTemplate(title);
}

// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)
{
	story.displayTiddlers(srcElement,titles,template,animate);
}

// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)
{
	story.displayTiddler(srcElement,title,template,animate);
}

// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;

// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");

}
//}}}
/***
|''Name:''|DirtyFlagMacro|
|''Source:''|http://tw.kuraku.net/tw.html#DirtyFlagMacro|
|''Author:''|kuraku|
|''License:''|http://creativecommons.org/licenses/by-sa/2.5/|
|''Version:''|0.1.6 (2007-11-29)|
|''~CoreVersion:''|2.1.3|
|''Overrides:''|TiddlyWiki.prototype.setDirty|

!!Description
TW を編集中かどうかを、TiddlyWiki.dirty をチェックしてマーク表示できるマクロ。
「save 忘れを防ぐ・余計な save を減らす」ことができるはずである。

''オススメ:'' [[HoverMenu]] と使用するととても便利。

!!Examples
{{{
TW DirtyFlag is: <<dirtyflag>>
}}}
TW DirtyFlag is: <<dirtyflag>>

!!Configureration
[[DirtyFlagMacroConfig]] を作成することにより、マークの書式が変更できる。
{{{
config.macros.dirtyflag.flagT = "#";
config.macros.dirtyflag.flagF = "";
config.macros.dirtyflag.style = "color: #00f; font-size: 1.2em;";
}}}

!!History
*2007.11.29
**improved content of source and comment.
*2007.11.19 コメントのミス修正
*2007.08.13 mark のセット部分ロジックの見直し
*2007.07.17 IE での表示に問題があり対応。(IE6 のみで検証)

!!Source
***/
/*{{{*/
version.extensions.dirtyflag = { 
	major: 0, minor: 1, revision: 6, date: new Date(2007,11,29),
	source: "http://kuraku.net/tw/tw.html#DirtyFlagMacro"
};

config.macros.dirtyflag = {};
config.macros.dirtyflag.flagT = "*";
config.macros.dirtyflag.flagF = "";
config.macros.dirtyflag.style = "color: #f00;";

config.macros.dirtyflag.counter = 0;

config.macros.dirtyflag.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	var e = createTiddlyElement(place,"span","dirtyFlag_" + this.counter);
	this.counter++;

	e.setAttribute("refresh","macro");
	e.setAttribute("macroName","dirtyflag");
	e.style.cssText = config.macros.dirtyflag.style;
	this.changeMark();
};

config.macros.dirtyflag.changeMark = function() {
	// get dirtyflag
	var dirty = ((store && store.isDirty && store.isDirty()) ||
				 (story && story.areAnyDirty && story.areAnyDirty()));

	// change dirtyflag mark
	var dirtyFg = (dirty===true)?this.flagT:this.flagF;
	for(var i=0; i<this.counter; i++){
		var dt = document.getElementById("dirtyFlag_" + i);
		if(dt){
			dt.innerHTML = dirtyFg;
		}
	}
};

TiddlyWiki.prototype.setDirty = function(dirty) {
	this.dirty = dirty;

	// added check & display
	config.macros.dirtyflag.changeMark();
};
/*}}}*/
/*{{{*/
config.macros.dirtyflag.style = "color: #f00; font-size: 1.6em;";
/*}}}*/
/***
|''Name:''|DirtyFlagStickyMacro|
|''Source:''|http://tw.kuraku.net/tw.html#DirtyFlagStickyMacro|
|''Author:''|kuraku|
|''License:''|http://creativecommons.org/licenses/by-sa/2.5/|
|''Version:''|0.1.0 (2008-01-24)|
|''~CoreVersion:''|2.1.3|
|''Overrides:''|TiddlyWiki.prototype.setDirty|
!!Description
Whether or not TW while compiling, checking TiddlyWiki.dirty, the macro which it can mark can indicate.
This macro is not use with IE. sorry.
!!History
*2008.01.24
**create on the basis DirtyFlagMacro 0.1.6
!!Source
***/
/*{{{*/
version.extensions.dirtyflagsticky = { 
	major: 0, minor: 1, revision: 0, date: new Date(2008,01,24),
	source: "http://tw.kuraku.net/tw.html#DirtyflagstickyMacro"
};

config.macros.dirtyflagsticky = {};
config.macros.dirtyflagsticky.flagT = "*";
config.macros.dirtyflagsticky.flagF = "";

config.macros.dirtyflagsticky.initexec = function(place,macroName,params,wikifier,paramString,tiddler) {
	var e=document.getElementById("dirtyflagsticky");
	if(e) e.parentNode.removeChild(e);
	if (config.browser.isIE) return; // cannot use IE

	e = createTiddlyElement(null,"span",null,null,config.macros.dirtyflagsticky.flagF);
	e.id = "dirtyflagsticky";
	e.title = "dirty-flag";

	var sty = e.style;
	sty.position = "fixed";
	sty.zIndex = "1001";
	sty.cursor = "default";

	/* custom display place */
	sty.top = ".2em";
	//sty.bottom = ".2em";
	//sty.right = ".2em";
	sty.left = ".2em";

	/* custom color / fontSize */
	sty.color = "#f00;";
	sty.fontSize = "12pt";

	document.body.insertBefore(e,null);
};

config.macros.dirtyflagsticky.changeMark = function() {
	// get dirtyflagsticky
	var dirty = ((store && store.isDirty && store.isDirty()) ||
				 (story && story.areAnyDirty && story.areAnyDirty()));

	// change dirtyflag mark
	var dirtyFg = (dirty===true)?this.flagT:this.flagF;
	var dt = document.getElementById("dirtyflagsticky");
	if(dt){
		dt.innerHTML = dirtyFg;
	}
};

TiddlyWiki.prototype.setDirty = function(dirty) {
	this.dirty = dirty;

	// added check & display
	config.macros.dirtyflagsticky.changeMark();
};

// create flag element
config.macros.dirtyflagsticky.initexec();
/*}}}*/
IT
/***
|Name|DisableWikiLinksPlugin|
|Source|http://www.TiddlyTools.com/#DisableWikiLinksPlugin|
|Version|1.4.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Tiddler.prototype.autoLinkWikiWords, 'wikiLink' formatter|
|Description|selectively disable TiddlyWiki's automatic ~WikiWord linking behavior|

This plugin allows you to disable TiddlyWiki's automatic ~WikiWord linking behavior, so that WikiWords embedded in tiddler content will be rendered as regular text, instead of being automatically converted to tiddler links.  To create a tiddler link when automatic linking is disabled, you must enclose the link text within {{{[[...]]}}}.

You can also block automatic WikiWord linking behavior only for non-existing tiddler titles, while still automatically linking WikiWords that correspond to existing tiddlers titles or shadow tiddler titles.

You can also block specific selected WikiWords from being automatically linked by listing them in [[DisableWikiLinksList]], separated by whitespace.  This tiddler is optional and, when present, causes the listed words to always be excluded, even if automatic linking of other WikiWords is being permitted.  

Note: WikiWords contained in default ''shadow'' tiddlers will be automatically linked unless you select an additional checkbox option lets you disable these automatic links as well, though this is not recommended, since it can make it more difficult to access some TiddlyWiki standard default content (such as AdvancedOptions or SideBarTabs)

!!!!!Configuration
<<<
Self-contained control panel:
<<option chkDisableNonExistingWikiLinks>> Disable automatic WikiWord links for non-existing tiddlers
<<option chkDisableWikiLinks>> Disable ALL automatic WikiWord tiddler links
<<option chkAllowLinksFromShadowTiddlers>> ... except for WikiWords contained in shadow tiddlers
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''DisableWikiLinksPlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
''2006.12.31 [1.4.0]'' in formatter, test for chkDisableNonExistingWikiLinks
''2006.12.09 [1.3.0]'' in formatter, test for excluded wiki words specified in DisableWikiLinksList
''2006.12.09 [1.2.2]'' fix logic in autoLinkWikiWords() (was allowing links TO shadow tiddlers, even when chkDisableWikiLinks is TRUE).  
''2006.12.09 [1.2.1]'' revised logic for handling links in shadow content
''2006.12.08 [1.2.0]'' added hijack of Tiddler.prototype.autoLinkWikiWords so regular (non-bracketed) WikiWords won't be added to the missing list
''2006.05.24 [1.1.0]'' added option to NOT bypass automatic wikiword links when displaying default shadow content (default is to auto-link shadow content)
''2006.02.05 [1.0.1]'' wrapped wikifier hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals
''2005.12.09 [1.0.0]'' initial release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
//{{{
version.extensions.disableWikiLinks= {major: 1, minor: 4, revision: 0, date: new Date(2006,12,31)};

if (config.options.chkDisableNonExistingWikiLinks==undefined) config.options.chkDisableNonExistingWikiLinks= false;
if (config.options.chkDisableWikiLinks==undefined) config.options.chkDisableWikiLinks= false;
if (config.options.chkAllowLinksFromShadowTiddlers==undefined) config.options.chkAllowLinksFromShadowTiddlers=true;

// find the formatter for wikiLink and replace handler with 'pass-thru' rendering
initDisableWikiLinksFormatter();
function initDisableWikiLinksFormatter() {
	for (var i=0; i<config.formatters.length && config.formatters[i].name!="wikiLink"; i++);
	config.formatters[i].coreHandler=config.formatters[i].handler;
	config.formatters[i].handler=function(w) {
		// supress any leading "~" (if present)
		var skip=(w.matchText.substr(0,1)==config.textPrimitives.unWikiLink)?1:0;
		var title=w.matchText.substr(skip);
		var exists=store.tiddlerExists(title);
		var inShadow=w.tiddler && store.isShadowTiddler(w.tiddler.title);

		// check for specific excluded wiki words
		var t=store.getTiddlerText("DisableWikiLinksList")
		if (t && t.length && t.indexOf(w.matchText)!=-1)
			{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }

		// if not disabling links from shadows (default setting)
		if (config.options.chkAllowLinksFromShadowTiddlers && inShadow)
			return this.coreHandler(w);

		// check for non-existing non-shadow tiddler
		if (config.options.chkDisableNonExistingWikiLinks && !exists)
			{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }

		// if not enabled, just do standard WikiWord link formatting
		if (!config.options.chkDisableWikiLinks)
			return this.coreHandler(w);

		// just return text without linking
		w.outputText(w.output,w.matchStart+skip,w.nextMatch)
	}
}

Tiddler.prototype.coreAutoLinkWikiWords = Tiddler.prototype.autoLinkWikiWords;
Tiddler.prototype.autoLinkWikiWords = function()
{
	// DEBUG alert("processing: "+this.title);
	// if all automatic links are not disabled, just return results from core function
	if (!config.options.chkDisableWikiLinks)
		return this.coreAutoLinkWikiWords.apply(this,arguments);
	return false;
}
//}}}
/***
''Usage:''
{{{
<<displaydiary [days count:default 3]>>
}}}
''Source:''
***/
/*{{{*/
config.macros.displaydiary = {};
config.macros.displaydiary.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
  var tiddlers = store.reverseLookup("tags","excludeLists",false,"title");
  var cnt = params[0]?params[0]:3;
  var dsptid = [];

  for(var t=tiddlers.length-1; t>=0; t--) {
    var diary = tiddlers[t];
    if(diary.title.match(/^\d\d\d\d\.\d\d\.\d\d/)) {
      dsptid.push(diary);
      cnt--;
    }
    if(cnt<=0)
      break;
  }

  for(var t=0; t<dsptid.length; t++) {
      var tid = dsptid[t];
      story.displayTiddler("bottom", tid.title);
  }
}
/*}}}*/
!!EV 値計算
<script>
if(!config.krk){
  config.krk = {author: "KuRaKu"};
}
config.krk.calcEV = function(here){
	var form = here.form;
	var ff = form.ff.value;
	var tv = form.tv.value;
	var iso = form.iso.value;

	ff = parseInt(ff);
	tv = 1/parseInt(tv);
	iso = parseInt(iso)/100;

	ff = Math.pow(ff, 2);
	ff = Math.log(ff) / Math.log(2);
	tv = Math.log(tv) / Math.log(2);
	iso = Math.log(iso) / Math.log(2);

	var exv = ff - tv - iso;

	document.getElementById("ev20070719").innerHTML = Math.round(exv * 10) / 10;
};
</script>
<html>
<form>
F (絞り値):<select name="ff" onchange='config.krk.calcEV(this);'>
<option value="1.4">1.4</option>
<option value="2">2</option>
<option value="2.8">2.8</option>
<option value="4">4</option>
<option value="5.6">5.6</option>
<option value="8" selected>8</option>
<option value="11">11</option>
<option value="16">16</option>
<option value="22">22</option>
<option value="32">32</option>
</select><br>
T (シャッタースピード): 1 / <select name="tv" onchange='config.krk.calcEV(this);'>
<option value="1">1</option>
<option value="2">2</option>
<option value="4">4</option>
<option value="8">8</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="60">60</option>
<option value="125" selected>125</option>
<option value="250">250</option>
<option value="500">500</option>
<option value="1000">1000</option>
<option value="2000">2000</option>
<option value="4000">4000</option>
</select><br>
ISO (フィルム感度): <select name="iso" onchange='config.krk.calcEV(this);'>
<option value="100">100</option>
<option value="200">200</option>
<option value="400" selected>400</option>
<option value="800">800</option>
<option value="1600">1600</option>
</select><br>
<br>
<b>EV値:</b> <u><span id="ev20070719" size="3" style="color: #f00; font-weight: bold;">11</span></u>
</form>
</html>
!!適正露出表(EV)
|Tv \ F  |bgcolor(#0ff):1.4 |bgcolor(#0ff):2  |bgcolor(#0ff):2.8 |bgcolor(#0ff):4  |bgcolor(#0ff):5.6 |bgcolor(#0ff):8  |bgcolor(#0ff):11 |bgcolor(#0ff):16 |bgcolor(#0ff):22 |bgcolor(#0ff):32 ||~ISO100 |5|||
|bgcolor(#0ff):8 |-2 |-1 |0  |1  |2  |3  |4  |5  |6  |7  ||~ISO200 |6|||
|bgcolor(#0ff):4     |-1 |0  |1  |2  |3  |4  |5  |6  |7  |8  ||~ISO400 |7|||
|bgcolor(#0ff):2     |0  |1  |2  |3  |4  |5  |6  |7  |8  |9  ||~ISO800 |8|||
|bgcolor(#0ff):1     |1  |2  |3  |4  |5  |6  |7  |8  |9  |10 ||~ISO1600|9|||
|bgcolor(#0ff):1/2   |2  |3  |4  |5  |6  |7  |8  |9  |10 |11 ||||||
|bgcolor(#0ff):1/4   |3  |4  |5  |6  |7  |8  |9  |10 |11 |12 ||bgcolor(#0ff):明るさ    |bgcolor(#0ff):Bv|bgcolor(#0ff):100|bgcolor(#0ff):200|bgcolor(#0ff):400|
|bgcolor(#0ff):1/8   |4  |5  |6  |7  |8  |9  |10 |11 |12 |13 ||ローソク  |1 |6 |7  |8  |
|bgcolor(#0ff):1/15  |5  |6  |7  |8  |9  |10 |11 |12 |13 |14 ||明るい夜景|2 |7 |8  |9  |
|bgcolor(#0ff):1/30  |6  |7  |8  |9  |10 |11 |12 |13 |14 |15 ||暗い室内  |3 |8 |9  |10 |
|bgcolor(#0ff):1/60  |7  |8  |9  |10 |11 |12 |13 |14 |15 |16 ||室内      |4 |9 |10 |11 |
|bgcolor(#0ff):1/125 |8  |9  |10 |11 |12 |13 |14 |15 |16 |17 ||明るい室内|5 |10 |11 |12 |
|bgcolor(#0ff):1/250 |9  |10 |11 |12 |13 |14 |15 |16 |17 |18 ||日陰・曇り|6 |11 |12 |13 |
|bgcolor(#0ff):1/500 |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 ||薄曇り    |7 |12 |13 |14 |
|bgcolor(#0ff):1/1000|11 |12 |13 |14 |15 |16 |17 |18 |19 |20 ||晴れ      |8 |13 |14 |15 |
|bgcolor(#0ff):1/2000|12 |13 |14 |15 |16 |17 |18 |19 |20 |21 ||快晴      |9 |14 |15 |16 |
|bgcolor(#0ff):1/4000|13 |14 |15 |16 |17 |18 |19 |20 |21 |22 ||夏の快晴  |10|15 |16 |17 |
<!--{{{-->
<div align='right'><span class='toolbar' macro='toolbar toggleQuickEdit'></span>  
<span class='toolbar' macro='toolbar deleteTiddler guidejp saveCloseTiddler cancelCloseTiddler +saveTiddler -cancelTiddler'></span></div>
<div><span class='title' macro='view title'></span><span style='font-size: 0.8em; padding-left: 1em;' macro='includeSiteLink'></span></div>
<div class='editor' macro='edit title'></div>
<div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<div class='editor' macro='edit tags'></div>
<span class='toolbar' macro='tiddler QuickEditToolbar'></span>
<div class='editor' macro='edit text'></div>
<!-- add span with 'resizeEditor' macro anywhere in the edit template -->
<!-- span macro='resizeEditor'><!-- /span>
<!--}}}-->
!!Bench っぽいもの
{{{
(let ((time (string-to-number (format-time-string "%s"))))
  (hanoi 10)
  (format "%d" (- (string-to-number (format-time-string "%s")) time)))
}}}
version.extensions.favicon = {major: 0, minor: 1, revision: 0, date:
"18 July 2005"};
var n = document.createElement("link");
n.rel = "shortcut icon";
n.href = "http://kuraku.net/tw/KRK.ico";
//n.href = "http://kuraku.net/tw/favicon4.ico";
document.getElementsByTagName("head")[0].appendChild(n);
FaviconMacro はブラウザの favicon 表示を変えることができる。
{{{
n.href = "http://kuraku.net/favicon_blue.ico";
}}}
URL 部分を指定する。
同じディレクトリにあれば "favicon.ico" のみで良い。
<<saveChanges>>
<<upload http://tw.kuraku.net/store.cgi tw.html backup .>>

Username: <<option txtUploadUserName>>
Password: <<option pasUploadPassword>>
----
[[download|http://tw.kuraku.net/download.cgi?file=tw.html]]
いずれ自分のところにも付ける。
{{{
<html>
<a href="http://www.flickr.com" style="text-align:center;">www.<strong style="color:#3993ff">flick<span style="color:#ff1c92">r</span></strong>.com</a>
<iframe style="background-color:#ffffff; border-color:#ffffff; border:none;" width="113" height="151" frameborder="0" scrolling="no" src="http://www.flickr.com/apps/badge/badge_iframe.gne?zg_bg_color=ffffff&zg_person_id=16512503%40N00" title="Flickr Badge"></iframe>
</html>
}}}

Flickr のサイトで Badge の設定を進めて終りの貼りつけるソースを見て。
my badge: 97997926@N00

<html>
<a href="http://www.flickr.com" style="text-align:center;">www.<strong style="color:#3993ff">flick<span style="color:#ff1c92">r</span></strong>.com</a>
<iframe style="background-color:#ffffff; border-color:#ffffff; border:none;" width="113" height="151" frameborder="0" scrolling="no" src="http://www.flickr.com/apps/badge/badge_iframe.gne?zg_bg_color=ffffff&zg_person_id=97997926%40N00" title="Flickr Badge"></iframe>
</html>
''filckrs image format example:''
{{{<a href="http://www.flickr.com/photos/kuraku/450767452/" title="Photo Sharing"><img src="http://farm1.static.flickr.com/204/450767452_adf677efc6_m.jpg" width="240" height="161" alt="FH000015" /></a>}}}
<script>
if(!config.krk){
  config.krk = {author: "KuRaKu"};
}
if(!config.krk.flickr2twimg){
	config.krk.flickr2twimg = function(here){
		var form = here.form;
		var fimg = form.fimg.value;
		if(fimg.length <= 0 || !fimg.match(/\.flickr\./i) ){
			alert("Please input flickr img tag!!"); 
			return;
		}
		var getlink = fimg.match(/href=\"([^\"]+)\".*src=\"([^\"]+)\"/);
		if(!getlink){
			alert("Don't Match link or image source or both!!"); 
			return;
		}
		var twimg = "[img["+getlink[2]+"]["+getlink[1]+"]]";
		timg = document.getElementById('timg');
		timg.value = twimg;
		timg.focus();
		timg.select();
		document.getElementById("img").innerHTML=fimg;
	};
}
</script>
<html>
INPUT flickr image tag:
<form>
<textarea name="fimg" id="fimg" style="width:90%; height:3; font-size:1.0em"></textarea>
<p>
<input type="button" value=" format for tw image " onclick='config.krk.flickr2twimg(this);'>&nbsp;&nbsp;
<input type="button" value=" clear " onclick='document.getElementById(
"fimg").value="";document.getElementById("timg").value="";document.getElementById("img").innerHTML="";'>
<p>
<textarea id="timg" style="width:90%; height:3; font-size:1.0em"></textarea>
</form>
<div id="img"></div>
</html>
/***
|Name|FontSizePlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#FontSizePlugin|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Resize tiddler text on the fly. The text size is remembered between sessions by use of a cookie.
You can customize the maximum and minimum allowed sizes.
(only affects tiddler content text, not any other text)

Also, you can load a TW file with a font-size specified in the url.
Eg: http://lewcid.googlepages.com/lewcid.html#font:110

!Demo:
Try using the font-size buttons in the sidebar, or in the MainMenu above.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Then put {{{<<fontSize "font-size:">>}}} in your SideBarOptions tiddler, or anywhere else that you might like.

!Usage
{{{<<fontSize>>}}} results in <<fontSize>>
{{{<<fontSize font-size: >>}}} results in <<fontSize font-size:>>

!Customizing:
The buttons and prefix text are wrapped in a span with class fontResizer, for easy css styling.
To change the default font-size, and the maximum and minimum font-size allowed, edit the config.fontSize.settings section of the code below.

!Notes:
This plugin assumes that the initial font-size is 100% and then increases or decreases the size by 10%. This stepsize of 10% can also be customized.

!History:
*27-07-06, version 1.0 : prevented double clicks from triggering editing of containing tiddler.
*25-07-06, version 0.9

!Code
***/

//{{{
config.fontSize={};

//configuration settings
config.fontSize.settings =
{
 defaultSize : 100, // all sizes in %
 maxSize : 200,
 minSize : 40,
 stepSize : 10
};

//startup code
var fontSettings = config.fontSize.settings;

if (!config.options.txtFontSize)
 {config.options.txtFontSize = fontSettings.defaultSize;
 saveOptionCookie("txtFontSize");}
setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
setStylesheet("#contentWrapper .fontResizer .button {display:inline;font-size:105%; font-weight:bold; margin:0 1px; padding: 0 3px; text-align:center !important;}\n .fontResizer {margin:0 0.5em;}","fontResizerButtonStyles");

//macro
config.macros.fontSize={};
config.macros.fontSize.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{

 var sp = createTiddlyElement(place,"span",null,"fontResizer");
 sp.ondblclick=this.onDblClick;
 if (params[0])
 createTiddlyText(sp,params[0]);
 createTiddlyButton(sp,"+","increase font-size",this.incFont);
 createTiddlyButton(sp,"=","reset font-size",this.resetFont);
 createTiddlyButton(sp,"–","decrease font-size",this.decFont);
}

config.macros.fontSize.onDblClick = function (e)
{
 if (!e) var e = window.event;
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
}

config.macros.fontSize.setFont = function ()
{
 saveOptionCookie("txtFontSize");
 setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
}

config.macros.fontSize.incFont=function()
{
 if (config.options.txtFontSize < fontSettings.maxSize)
 config.options.txtFontSize = (config.options.txtFontSize*1)+fontSettings.stepSize;
 config.macros.fontSize.setFont();
}

config.macros.fontSize.decFont=function()
{

 if (config.options.txtFontSize > fontSettings.minSize)
 config.options.txtFontSize = (config.options.txtFontSize*1) - fontSettings.stepSize;
 config.macros.fontSize.setFont();
}

config.macros.fontSize.resetFont=function()
{

 config.options.txtFontSize=fontSettings.defaultSize;
 config.macros.fontSize.setFont();
}

config.paramifiers.font =
{
 onstart: function(v)
 {
 config.options.txtFontSize = v;
 config.macros.fontSize.setFont();
 }
};
//}}}
FontSizePlugin は、サイトのフォントサイズを変えるインターフェースを提供する。

{{{<<fontSize>>}}} で <<fontSize>>
{{{<<fontSize font-size: >>}}} で <<fontSize font-size:>>

SideBarOptions に付けてはみたものの滅多に使わないです。
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.7 (2007-03-28)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description

Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.

''Syntax:'' 
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and  {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and  {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]]  is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|

See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].

!Revision history
* v1.0.7 (2007-03-28)
** Also support "pre" formatted TiddlyWikis (introduced with TW 2.2) (when using "in" clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides "viewerTiddler", i.e. the tiddler used to view the macro. Most times this is equal to the "inTiddler", but when using the "tiddler" macro both may be different.
** Support "begin", "end" and "none" expressions in "write" action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features: 
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen) 
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features: 
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs: 
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features: 
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version

!Code
***/
//{{{

	
//============================================================================
//============================================================================
//		   ForEachTiddlerPlugin
//============================================================================
//============================================================================

// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {

if (!window.abego) window.abego = {};

version.extensions.ForEachTiddlerPlugin = {
	major: 1, minor: 0, revision: 7, 
	date: new Date(2007,2,28), 
	source: "http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin",
	licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
	copyright: "Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"
};

// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
	TiddlyWiki.prototype.forEachTiddler = function(callback) {
		for(var t in this.tiddlers) {
			callback.call(this,t,this.tiddlers[t]);
		}
	};
}

//============================================================================
// forEachTiddler Macro
//============================================================================

version.extensions.forEachTiddler = {
	major: 1, minor: 0, revision: 7, date: new Date(2007,2,28), provider: "http://tiddlywiki.abego-software.de"};

// ---------------------------------------------------------------------------
// Configurations and constants 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler = {
	 // Standard Properties
	 label: "forEachTiddler",
	 prompt: "Perform actions on a (sorted) selection of tiddlers",

	 // actions
	 actions: {
		 addToList: {},
		 write: {}
	 }
};

// ---------------------------------------------------------------------------
//  The forEachTiddler Macro Handler 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler.getContainingTiddler = function(e) {
	while(e && !hasClass(e,"tiddler"))
		e = e.parentNode;
	var title = e ? e.getAttribute("tiddler") : null; 
	return title ? store.getTiddler(title) : null;
};

config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	// config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);

	if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
	// --- Parsing ------------------------------------------

	var i = 0; // index running over the params
	// Parse the "in" clause
	var tiddlyWikiPath = undefined;
	if ((i < params.length) && params[i] == "in") {
		i++;
		if (i >= params.length) {
			this.handleError(place, "TiddlyWiki path expected behind 'in'.");
			return;
		}
		tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the where clause
	var whereClause ="true";
	if ((i < params.length) && params[i] == "where") {
		i++;
		whereClause = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the sort stuff
	var sortClause = null;
	var sortAscending = true; 
	if ((i < params.length) && params[i] == "sortBy") {
		i++;
		if (i >= params.length) {
			this.handleError(place, "sortClause missing behind 'sortBy'.");
			return;
		}
		sortClause = this.paramEncode(params[i]);
		i++;

		if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
			 sortAscending = params[i] == "ascending";
			 i++;
		}
	}

	// Parse the script
	var scriptText = null;
	if ((i < params.length) && params[i] == "script") {
		i++;
		scriptText = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the action. 
	// When we are already at the end use the default action
	var actionName = "addToList";
	if (i < params.length) {
	   if (!config.macros.forEachTiddler.actions[params[i]]) {
			this.handleError(place, "Unknown action '"+params[i]+"'.");
			return;
		} else {
			actionName = params[i]; 
			i++;
		}
	} 
	
	// Get the action parameter
	// (the parsing is done inside the individual action implementation.)
	var actionParameter = params.slice(i);


	// --- Processing ------------------------------------------
	try {
		this.performMacro({
				place: place, 
				inTiddler: tiddler,
				whereClause: whereClause, 
				sortClause: sortClause, 
				sortAscending: sortAscending, 
				actionName: actionName, 
				actionParameter: actionParameter, 
				scriptText: scriptText, 
				tiddlyWikiPath: tiddlyWikiPath});

	} catch (e) {
		this.handleError(place, e);
	}
};

// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {

	var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);

	var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
	context["tiddlyWiki"] = tiddlyWiki;
	
	// Get the tiddlers, as defined by the whereClause
	var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
	context["tiddlers"] = tiddlers;

	// Sort the tiddlers, when sorting is required.
	if (parameter.sortClause) {
		this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
	}

	return {tiddlers: tiddlers, context: context};
};

// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
	return this.getTiddlersAndContext(parameter).tiddlers;
};

// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
//				  The following properties are supported:
//
//						place
//						whereClause
//						sortClause
//						sortAscending
//						actionName
//						actionParameter
//						scriptText
//						tiddlyWikiPath
//
//					All properties are optional. 
//					For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
	var tiddlersAndContext = this.getTiddlersAndContext(parameter);

	// Perform the action
	var actionName = parameter.actionName ? parameter.actionName : "addToList";
	var action = config.macros.forEachTiddler.actions[actionName];
	if (!action) {
		this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
		return;
	}

	var actionHandler = action.handler;
	actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};

// ---------------------------------------------------------------------------
//  The actions 
// ---------------------------------------------------------------------------

// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
	// Parse the parameter
	var p = 0;

	// Check for extra parameters
	if (parameter.length > p) {
		config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);
		return;
	}

	// Perform the action.
	var list = document.createElement("ul");
	place.appendChild(list);
	for (var i = 0; i < tiddlers.length; i++) {
		var tiddler = tiddlers[i];
		var listItem = document.createElement("li");
		list.appendChild(listItem);
		createTiddlyLink(listItem, tiddler.title, true);
	}
};

abego.parseNamedParameter = function(name, parameter, i) {
	var beginExpression = null;
	if ((i < parameter.length) && parameter[i] == name) {
		i++;
		if (i >= parameter.length) {
			throw "Missing text behind '%0'".format([name]);
		}
		
		return config.macros.forEachTiddler.paramEncode(parameter[i]);
	}
	return null;
}

// Internal.
//
// --- The write Action ---------------------------------------------------
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
	// Parse the parameter
	var p = 0;
	if (p >= parameter.length) {
		this.handleError(place, "Missing expression behind 'write'.");
		return;
	}

	var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
	p++;

	// Parse the "begin" option
	var beginExpression = abego.parseNamedParameter("begin", parameter, p);
	if (beginExpression !== null) 
		p += 2;
	var endExpression = abego.parseNamedParameter("end", parameter, p);
	if (endExpression !== null) 
		p += 2;
	var noneExpression = abego.parseNamedParameter("none", parameter, p);
	if (noneExpression !== null) 
		p += 2;

	// Parse the "toFile" option
	var filename = null;
	var lineSeparator = undefined;
	if ((p < parameter.length) && parameter[p] == "toFile") {
		p++;
		if (p >= parameter.length) {
			this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");
			return;
		}
		
		filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
		p++;
		if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
			p++;
			if (p >= parameter.length) {
				this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");
				return;
			}
			lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
			p++;
		}
	}
	
	// Check for extra parameters
	if (parameter.length > p) {
		config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);
		return;
	}

	// Perform the action.
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
	var count = tiddlers.length;
	var text = "";
	if (count > 0 && beginExpression)
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
	
	for (var i = 0; i < count; i++) {
		var tiddler = tiddlers[i];
		text += func(tiddler, context, count, i);
	}
	
	if (count > 0 && endExpression)
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);

	if (count == 0 && noneExpression) 
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
		

	if (filename) {
		if (lineSeparator !== undefined) {
			lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
			text = text.replace(/\n/mg,lineSeparator);
		}
		saveFile(filename, convertUnicodeToUTF8(text));
	} else {
		var wrapper = createTiddlyElement(place, "span");
		wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
	}
};


// ---------------------------------------------------------------------------
//  Helpers
// ---------------------------------------------------------------------------

// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
	return {
		place : placeParam, 
		whereClause : whereClauseParam, 
		sortClause : sortClauseParam, 
		sortAscending : sortAscendingParam, 
		script : scriptText,
		actionName : actionNameParam, 
		actionParameter : actionParameterParam,
		tiddlyWikiPath : tiddlyWikiPathParam,
		inTiddler : inTiddlerParam, // the tiddler containing the <<forEachTiddler ...>> macro call.
		viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
	};
};

// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of 
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
	if (!idPrefix) {
		idPrefix = "store";
	}
	var lenPrefix = idPrefix.length;
	
	// Read the content of the given file
	var content = loadFile(this.getLocalPath(path));
	if(content === null) {
		throw "TiddlyWiki '"+path+"' not found.";
	}
	
	var tiddlyWiki = new TiddlyWiki();

	// Starting with TW 2.2 there is a helper function to import the tiddlers
	if (tiddlyWiki.importTiddlyWiki) {
		var errorText = tiddlyWiki.importTiddlyWiki(content);
		if (errorText)
			throw "File '"+path+"' is not a TiddlyWiki.";
		tiddlyWiki.dirty = false;
		return tiddlyWiki;
	}
	
	// The legacy code, for TW < 2.2
	
	// Locate the storeArea div's
	var posOpeningDiv = content.indexOf(startSaveArea);
	var posClosingDiv = content.lastIndexOf(endSaveArea);
	if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
		throw "File '"+path+"' is not a TiddlyWiki.";
	}
	var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
	
	// Create a "div" element that contains the storage text
	var myStorageDiv = document.createElement("div");
	myStorageDiv.innerHTML = storageText;
	myStorageDiv.normalize();
	
	// Create all tiddlers in a new TiddlyWiki
	// (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
	var store = myStorageDiv.childNodes;
	for(var t = 0; t < store.length; t++) {
		var e = store[t];
		var title = null;
		if(e.getAttribute)
			title = e.getAttribute("tiddler");
		if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
			title = e.id.substr(lenPrefix);
		if(title && title !== "") {
			var tiddler = tiddlyWiki.createTiddler(title);
			tiddler.loadFromDiv(e,title);
		}
	}
	tiddlyWiki.dirty = false;

	return tiddlyWiki;
};


	
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
// 
//	 (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
	var script = context["script"];
	var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
	var fullText = (script ? script+";" : "")+functionText+";theFunction;";
	return eval(fullText);
};

// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
	var result = [];
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
	tiddlyWiki.forEachTiddler(function(title,tiddler) {
		if (func(tiddler, context, undefined, undefined)) {
			result.push(tiddler);
		}
	});
	return result;
};

// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
	var message = "Extra parameter behind '"+actionName+"':";
	for (var i = firstUnusedIndex; i < parameter.length; i++) {
		message += " "+parameter[i];
	}
	this.handleError(place, message);
};

// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
	var result = 
		(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
			? 0
			: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
			   ? -1 
			   : +1; 
	return result;
};

// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
	var result = 
		(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
			? 0
			: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
			   ? +1 
			   : -1; 
	return result;
};

// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
	// To avoid evaluating the sortClause whenever two items are compared 
	// we pre-calculate the sortValue for every item in the array and store it in a 
	// temporary property ("forEachTiddlerSortValue") of the tiddlers.
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
	var count = tiddlers.length;
	var i;
	for (i = 0; i < count; i++) {
		var tiddler = tiddlers[i];
		tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
	}

	// Do the sorting
	tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);

	// Delete the temporary property that holds the sortValue.	
	for (i = 0; i < tiddlers.length; i++) {
		delete tiddlers[i].forEachTiddlerSortValue;
	}
};


// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
	displayMessage(message);
};

// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
	var message ="<<"+macroName;
	for (var i = 0; i < params.length; i++) {
		message += " "+params[i];
	}
	message += ">>";
	displayMessage(message);
};


// Internal.
//
// Creates an element that holds an error message
// 
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
	var message = (exception.description) ? exception.description : exception.toString();
	return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);
};

// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
	if (place) {
		this.createErrorElement(place, exception);
	} else {
		throw exception;
	}
};

// Internal.
//
// Encodes the given string.
//
// Replaces 
//	 "$))" to ">>"
//	 "$)" to ">"
//
config.macros.forEachTiddler.paramEncode = function(s) {
	var reGTGT = new RegExp("\\$\\)\\)","mg");
	var reGT = new RegExp("\\$\\)","mg");
	return s.replace(reGTGT, ">>").replace(reGT, ">");
};

// Internal.
//
// Returns the given original path (that is a file path, starting with "file:")
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the "#" and stuff following)
// is stripped.
// 
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
	// Remove any location part of the URL
	var hashPos = originalPath.indexOf("#");
	if(hashPos != -1)
		originalPath = originalPath.substr(0,hashPos);
	// Convert to a native file format assuming
	// "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
	// "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
	// "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
	// "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
	var localPath;
	if(originalPath.charAt(9) == ":") // pc local file
		localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
	else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file
		localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
	else if(originalPath.indexOf("file:///") === 0) // mac/unix local file
		localPath = unescape(originalPath.substr(7));
	else if(originalPath.indexOf("file:/") === 0) // mac/unix local file
		localPath = unescape(originalPath.substr(5));
	else // pc network file
		localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");	
	return localPath;
};

// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
	".forEachTiddlerError{color: #ffffff;background-color: #880000;}",
	"forEachTiddler");

//============================================================================
// End of forEachTiddler Macro
//============================================================================


//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.startsWith = function(prefix) {
	var n =  prefix.length;
	return (this.length >= n) && (this.slice(0, n) == prefix);
};



//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.endsWith = function(suffix) {
	var n = suffix.length;
	return (this.length >= n) && (this.right(n) == suffix);
};


//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.contains = function(substring) {
	return this.indexOf(substring) >= 0;
};

//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or 
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.indexOf = function(item) {
	for (var i = 0; i < this.length; i++) {
		if (this[i] == item) {
			return i;
		}
	}
	return -1;
};

//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false. 
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
	return (this.indexOf(item) >= 0);
};

//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements 
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAny = function(items) {
	for(var i = 0; i < items.length; i++) {
		if (this.contains(items[i])) {
			return true;
		}
	}
	return false;
};


//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
// 
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null] 
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
	for(var i = 0; i < items.length; i++) {
		if (!this.contains(items[i])) {
			return false;
		}
	}
	return true;
};


} // of "install only once"

// Used Globals (for JSLint) ==============
// ... DOM
/*global 	document */
// ... TiddlyWiki Core
/*global 	convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink, 
			displayMessage, endSaveArea, hasClass, loadFile, saveFile, 
			startSaveArea, store, wikify */
//}}}


/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/

ForEachTiddlerPlugin は tiddler を様々な条件でリストすることができる。
「ある tag がついている tiddler でタイトルに XX を含まないものをリスト」など可能。

''plugin より syntax''
{{{
<<forEachTiddler [in tiddlyWikiPath]
 [where whereCondition]
 [sortBy sortExpression [ascending or descending]]
 [script scriptText]
 [action [actionParameters]]>>
}}}

!!![[FrontPage]] の recent 20 tiddlers
{{{
<<forEachTiddler
 where 'tiddler.title!="UploadLog"'
 sortBy 'tiddler.modified' descending 
 script 'function tagsLine(tiddler){var tags=tiddler.tags; var result=""; for (var i = 0; i < tags.length;i++) {result += (i==0)?"/"+tags[i] + "/": tags[i]+"/";} return result;}'
 write '(index<20?"*[["+tiddler.title+"]]@@color:#999;font-size:90%;" +tiddler.modified.formatString(" - YY.MM.DD 0hh:0mm")+" (created "+tiddler.created.formatString("YY.MM.DD")+") {{{"+tagsLine(tiddler)+"}}}@@\n" : "")'
>>
}}}
*[[UploadLog]] を除外している (where)
*さいきん修正されたもの順 (sortBy)
*tag をすべて並べる function (script)
*20までのものを表示、作成日、更新日、tag を出力 (write)
''実際のリスト:'' +++[recent 20 tiddlers...]<<forEachTiddler
 where 'tiddler.title!="UploadLog"'
 sortBy 'tiddler.modified' descending 
 script 'function tagsLine(tiddler){var tags=tiddler.tags; var result=""; for (var i = 0; i < tags.length;i++) {result += (i==0)?"/"+tags[i] + "/": tags[i]+"/";} return result;}'
 write '(index<20?"*[["+tiddler.title+"]]@@color:#999;font-size:90%;" +tiddler.modified.formatString(" - YY.MM.DD 0hh:0mm")+" (created "+tiddler.created.formatString("YY.MM.DD")+") {{{"+tagsLine(tiddler)+"}}}@@\n" : "")'
>>===


!!![[toRSS]] のチェックリスト
{{{
<<forEachTiddler 
 where 'tiddler.title!="UploadLog" && tiddler.title!="toRSS"'
 sortBy 'tiddler.modified' descending 
 write '(index==0?"| !toRSS | !title | !modified date |\n":"")+(index<20?"|[ ("+tiddler.title+"|toRSS)]|[["+tiddler.title+"]]|"+tiddler.modified.formatString("YY.0MM.0DD-0hh:0mm")+"|\n":"")'
>>
}}}
*[[UploadLog]] [[toRSS]] を除外 (where)
*さいきん修正されたもの順 (sortBy)
*最初の行(0) に table のヘッダを出力
*20行まで table 表示
''実際のリスト:'' +++[toRSS list...]<<forEachTiddler 
 where 'tiddler.title!="UploadLog" && tiddler.title!="toRSS"'
 sortBy 'tiddler.modified' descending 
 write '(index==0?"| !toRSS | !title | !modified date |\n":"")+(index<20?"|[ ("+tiddler.title+"|toRSS)]|[["+tiddler.title+"]]|"+tiddler.modified.formatString("YY.0MM.0DD-0hh:0mm")+"|\n":"")'
>>===


!!サンプル
他の例はやはりこちらを見てもらうしかない。
[[ForEachTiddlerMacroExamples|http://tiddlywiki.abego-software.de/#ForEachTiddlerExamples]]
Wiki を書くというより、[[TiddlyWiki|http://www.tiddlywiki.com/]] のためのメモです。
入口はこちら http://kuraku.tiddlyspot.com/ になります。[[TiddlySpot|http://tiddlyspot.com/]] を使用させていただいてます。
質問などは Twitter が早いですきっと [[twitter / kuraku|http://twitter.com/kuraku]]
/% ><<recenttweet>> %/
[[TiddlyWiki|http://www.tiddlywiki.com/]] の様々な機能を日々取り入れていきますので、タイミングによっては動作に不備が見つかる場合もあるかと思います。
*僕が作成した Extension はこちら <<tag krkExtension>>
*[s]『[[TiddlyWiki 一問一答]]』--FAQ を随時追加中です。--~~(情報が古いものがありますお気をつけください)~~+++^*[目次...]<<showtoc "TiddlyWiki 一問一答">>===

*[s]TiddlyWiki の[[ローカライズ(日本語化)|JapaneseTranslationPlugin]] を行なっております。
*<<tag plugintips>> をつけていってます。
*TiddlyWiki 関連 RSS : [[RSSFeeds-TiddlyWiki]]
*参考にさせてもらっているサイト: [[TiddlyWiki's Cool Site]]
*さいきんの journal : [[Whats new]]
*日常のことは、[[KRK CLip|http://tw.kuraku.net/clip.html]] にあります(更新停止してます)。--[[RSS feed|http://tw.kuraku.net/clip.xml]] / [[KRK CLip をロードする|Load KRK CLip]]--

[[Firefox|http://www.mozilla-japan.org/products/firefox/central.html]]、[[Chrome|http://www.google.co.jp/chrome]] 推奨です。IE では表示がおかしくなる時があるようです。~~(※IE では動かない Plugin がすでにいくつかあります。ご了承ください。)~~
@@color:red;【注意】@@ TiddlyWiki最新版に情報が追いついておりません、作成日更新日などをご確認ください。
/%[img[FireFox2|http://sfx-images.mozilla.org/affiliates/Buttons/firefox2/firefox-spread-btn-1.png][http://www.mozilla-japan.org/products/firefox/]]%/
/%__コメント・トラックバックが可能です。__~~(※IE からはできません。Comment/Trackback ボタンが見えない場合は、refresh(リフレッシュ) を押してください)~~
<html><a href="http://www.haloscan.com/"><img width="88" height="31" src="http://www.haloscan.com/halolink.gif" border="0" alt="Weblog Commenting and Trackback by HaloScan.com" target=_blank></a></html>
^^+++[comments >]<<tiddler HaloscanRSS>>
===^^%/<<displaydiary 5>>
こちら Ver5 へ移行しつつあります。
{{title {[[TiddlyWiki5版へ|http://kuraku5.tiddlyspot.com/]]}}}
/***
|''Name:''|GenerateRssHijack|
|''Description:''|Generate an RSSFeed with plaintext, html and TiddlyWiki content|
|''Version:''|0.1.4|
|''Date:''|Oct 23, 2006|
|''Source:''|http://tiddlywiki.bidix.info/#GenerateRssHijack|
|''Documentation:''|http://tiddlywiki.bidix.info/#GenerateRssHijackDoc|
|''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.0.0|
|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|
|''Include:''|none|
|''Require:''|none|
***/
//{{{
version.extensions.GenerateRssHijack= {
	major: 0, minor: 1, revision: 3, 
	date: new Date(2006,9,29),
	source: 'http://tiddlywiki.bidix.info/#GenerateRssHijack',
	documentation: 'http://tiddlywiki.bidix.info/#GenerateRssHijackDoc',
	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.0.0',
	browser: 'Firefox 1.5; InternetExplorer 6.0; Safari'	
};

// Return the tiddlers as a sorted array
TiddlyWiki.prototype.getTiddlersTaggedWith = function(field,includeTag)
{
	var results = [];
	this.forEachTiddler(function(title,tiddler) {
		if(tiddler.tags.find(includeTag) != null)
			results.push(tiddler);
		});
	if(field)
		results.sort(function (a,b) {if(a[field] == b[field]) return(0); else return (a[field] < b[field]) ? -1 : +1; });
	return results;
}

// generate RSS file with tiddlers tagged with toRSS
window.generateRss_ori = window.generateRss;
window.generateRss = function ()
{
	var s = [];
	var d = new Date();
	var u = store.getTiddlerText("SiteUrl",null);
	// Assemble the header 
	s.push("<" + "?xml version=\"1.0\"" + " encoding='UTF-8'" + "?>");
	s.push("<rss version=\"2.0\" xmlns:tiddlywiki=\"http://tiddlywiki.bidix.info/#TiddlyWikiNamespace\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">");
	s.push("<channel>");
	s.push("<title>" + wikifyPlain("SiteTitle").htmlEncode() + "</title>");
	if(u)
		s.push("<link>" + u.htmlEncode() + "</link>");
	s.push("<description>" + wikifyPlain("SiteSubtitle").htmlEncode() + "</description>");
	s.push("<language>en-us</language>");
	s.push("<copyright>Copyright " + d.getFullYear() + " " + config.options.txtUserName.htmlEncode() + "</copyright>");
	s.push("<pubDate>" + d.toGMTString() + "</pubDate>");
	s.push("<lastBuildDate>" + d.toGMTString() + "</lastBuildDate>");
	s.push("<docs>http://blogs.law.harvard.edu/tech/rss</docs>");
	s.push("<generator>TiddlyWiki " + version.major + "." + version.minor + "." + version.revision + "</generator>");
	// The body
	var tiddlers = store.getTiddlersTaggedWith("modified","toRSS");
	var n = config.numRssItems > tiddlers.length ? 0 : tiddlers.length-config.numRssItems;
	for (var t=tiddlers.length-1; t>=n; t--)
		s.push(tiddlers[t].saveToRss(u));
	// And footer
	s.push("</channel>");
	s.push("</rss>");
	// Save it all
	return s.join("\n");
}

Tiddler.prototype.getAsInnerHTML = function() {
 var wrapper = createTiddlyElement(document.body,"span",null,null);
 wikify(this.text,wrapper ,null,this);
 var text = wrapper.innerHTML;
 wrapper.parentNode.removeChild(wrapper);
 //replace tddlylink with externallink
 var u = store.getTiddlerText("SiteUrl",null);
var pattern;
var substitution;
 if ((version.major = 2) && (version.minor > 0)) {
 	pattern = /<a\s+tiddlylink="([^"]+)"\s+refresh="link"\s+class=\"([^"]+)\"\s+title=\"([^"]+)\"\s+href="([^"]+)"/mg;
 	substitution = "<a href=\""+u+"#[[$1]]\" class=\"$2\" title=\"$3\" tiddlylink=\"$1\" refresh=\"link\" ";
 }
 else {
	pattern = /<a\s+tiddlylink="([^"]+)"\s+refresh="link"\s+title="([^"]+)"\s+href="([^"]+)"/mg;
	substitution = "<a tiddlylink=\"$1\" refresh=\"link\" title=\"$2\" href=\""+u+"#[[$1]]\"";
 }
 text = text.replace(pattern, substitution);
 return text;
};

Tiddler.prototype.saveToRss = function(url)
{
	var s = [];
	s.push("<item>");
	s.push("<title>" + this.title.htmlEncode() + "</title>");
	//plain text
	s.push("<description>" + this.text.replace(regexpNewLine,"<br />").htmlEncode() + "</description>");
	// html text
	s.push("<content:encoded><![CDATA[	" + this.getAsInnerHTML() +"]]></content:encoded>");
	// tiddler
	s.push("<tiddlywiki:title>" + this.title.htmlEncode() + "</tiddlywiki:title>");
	s.push("<tiddlywiki:wikitext>" + this.text.htmlEncode() + "</tiddlywiki:wikitext>");
	s.push("<tiddlywiki:modifier>" + this.modifier.htmlEncode() + "</tiddlywiki:modifier>");
	s.push("<tiddlywiki:modified>" + this.modified.convertToYYYYMMDDHHMM() + "</tiddlywiki:modified>");
	s.push("<tiddlywiki:created>" + this.created.convertToYYYYMMDDHHMM() + "</tiddlywiki:created>");
	//s.push("<tiddlywiki:links>" + this.text.htmlEncode() + "</tiddlywiki:links>");
	s.push("<tiddlywiki:tags>" + this.getTags().htmlEncode() + "</tiddlywiki:tags>");
	for(var t=0; t<this.tags.length; t++)
		s.push("<category>" + this.tags[t] + "</category>");
	s.push("<link>" + url + "#" + encodeURIComponent(String.encodeTiddlyLink(this.title)) + "</link>");
	s.push("<pubDate>" + this.modified.toGMTString() + "</pubDate>");
	s.push("</item>");
	return(s.join("\n"));
}
//}}}
GenerateRssHijack は RSS出力を制御する。
また、tiddly のリンクを href  に変換してくれるようだ。

タグに @@toRSS@@ を入れて、通常の RSS の書き出しを設定すれば良い。
ちなみに、[[AdvancedOptions]] の「GenerateAnRssFeed」をチェックして、そのまま save すれば index.xml が作成される。

CheckboxPlugin と組み合わせると、
[ (toRSS)]toRSS
なんてこともできる。(この tiddler に タグが付くでしょ)
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>>

[[TiddlyWiki|http://www.tiddlywiki.com/]] Version: <<version>>
//{{{
config.macros.googlesearch = {};
config.macros.googlesearch.handler = function(place,macroName,params,wikifier,paramString,tiddler){
var searchvalue = params[0]?params[0]:tiddler.title;
var gform = "";
gform += "<html>\n";
gform += "<FORM method=\"GET\" action=\"http://www.google.co.jp/search\" target=\"_blank\">\n";
gform += "	<label for=\"search\" accesskey=\"4\">Google Search:</label>\n";
gform += "	<INPUT type=\"text\" name=\"q\" size=\"20\" maxlength=\"255\" value=\""+searchvalue+"\">\n";
gform += "	<INPUT type=\"submit\" name=\"btnG\" value=\"検索\">\n";
gform += "	<INPUT type=\"hidden\" name=\"hl\" value=\"ja\">\n";
gform += "	<INPUT type=\"hidden\" name=\"num\" value=\"20\">\n";
gform += "	<INPUT type=\"hidden\" name=\"ie\" value=\"UTF-8\">\n";
gform += "	<INPUT type=\"hidden\" name=\"oe\" value=\"UTF-8\">\n";
gform += "</FORM>\n";
gform += "</html>\n";
var g = createTiddlyElement(place,"span");
g.innerHTML = gform;
}
//}}}
/***
|Name|GotoPlugin|
|Source|http://www.TiddlyTools.com/#GotoPlugin|
|Version|1.4.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|view any tiddler by entering it's title - displays list of possible matches|

''View a tiddler by typing its title and pressing //enter//.''  Input just enough to uniquely match a single tiddler title and ''press //enter// to auto-complete the title for you!!''  If multiple titles match your input, a list 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//'' being displayed, press //escape// to clear the current text input and start over.

Note: ''At any time, you can move the focus directly to the text input field by using the ~ALT-G keyboard shortcut.''
!!!!!Examples
<<<
| //IMPORTANT NOTE:// ''As of version 1.4.0 (2007.04.25), the {{{<<goto>>}}} macro has been renamed to {{{<<gotoTiddler>>}}}'' |
syntax: {{{<<gotoTiddler quiet insert inputstyle liststyle>>}}}
All parameters are optional.
* ''quiet'' prevents //automatic// display of the list as each character is typed.  To view the list when ''quiet'', use //down// or //enter//.
* ''insert'' causes the selected tiddler title to be inserted into the tiddler source currently being edited (use with EditTemplate)
* ''inputstyle'' and ''liststyle'' are CSS declarations that modify the default input and listbox styles.  Note: styles containing spaces must be surrounded by ({{{"..."}}} or {{{'...'}}}) or ({{{[[...]]}}}).
{{{<<gotoTiddler>>}}}
<<gotoTiddler>>
{{{<<gotoTiddler quiet>>}}}
<<gotoTiddler quiet>>
{{{<<goto width:20em width:20em>>}}}
<<gotoTiddler width:20em width:20em>>

You can also invoke the macro with the "insert" keyword.  When used in the [[EditTemplate]], like this:
{{{
<span macro="gotoTiddler insert"></span>
}}}
it allows you to type/select a tiddler title, and instantly insert a link to that title (e.g. {{{[[TiddlerName]]}}}) into the tiddler source being edited.
<<<
!!!!!Configuration
<<<
The following ~TiddlyWiki search options (see AdvancedOptions) are applied when matching tiddler titles:
><<option chkRegExpSearch>> use regular expressions (text patterns)
><<option chkCaseSensitiveSearch>> use case sensitive matching
You can also create a tiddler tagged with <<tag systemConfig>> to control listing of tiddlers/shadows/tags, as well as the maximum height of the listbox.  //The default values are shown below://
//{{{
config.macros.gotoTiddler.includeTiddlers=true;
config.macros.gotoTiddler.includeShadows=true;
config.macros.gotoTiddler.includeTags=true;
config.macros.gotoTiddler.listMaxSize=10;
//}}}
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''GotoPlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revisions
<<<
''2007.04.25 [1.4.0]'' renamed macro from "goto" to "gotoTiddler".  This was necessary to avoid a fatal syntax error in Opera (and other browsers) that require strict adherence to ECMAScript 1.5 standards which defines the identifier "goto" as "reserved for FUTURE USE"... *sigh*
''2007.04.21 [1.3.2]'' in html definition, removed DIV around droplist (see 1.2.6 below).  It created more layout problems then it solved. :-(
''2007.04.01 [1.3.1]'' in processItem(), ensure that correct textarea field is found by checking for edit=="text" attribute
''2007.03.30 [1.3.0]'' tweak SideBarOptions shadow to automatically add {{{<<goto>>}}} when using default sidebar content
''2007.03.30 [1.2.6]'' in html definition, added DIV around droplist to fix IE problem where list appears next to input field instead of below it.  
''2007.03.28 [1.2.5]'' in processItem(), set focus to text area before setting selection (needed for IE to get correct selection 'range')
''2007.03.28 [1.2.4]'' added prompt for 'pretty text' when inserting a link into tiddler content
''2007.03.28 [1.2.3]'' added local copy of core replaceSelection() and modified for different replace logic
''2007.03.27 [1.2.2]'' in processItem(), use story.getTiddlerField() to retrieve textarea control
''2007.03.26 [1.2.1]'' in html, use either 'onkeydown' (IE) or 'onkeypress' (Moz) event to process <esc> key sooner, to prevent <esc> from 'bubbling up' to the tiddler (which will close the current editor).
''2007.03.26 [1.2.0]'' added support for optional "insert" keyword param. When used in [[EditTemplate]], (e.g. {{{<span macro="goto insert"></span>}}}) it triggers alternative processing: instead of displaying the selected tiddler, that tiddler's title is inserted into a tiddler's textarea edit field surrounded by {{{[[...]]}}}.
''2006.05.10 [1.1.2]'' when filling listbox, set selection to 'heading' item... auto-select first tiddler title when down/enter moves focus into listbox
''2006.05.08 [1.1.1]'' added accesskey ("G") to input field html (also set when field gets focus).  Also, inputKeyHandler() skips non-printing/non-editing keys. 
''2006.05.08 [1.1.0]'' added heading to listbox for better feedback (also avoids problems with 1-line droplist)
''2006.05.07 [1.0.0]'' list matches against tiddlers/shadows/tags.  input field auto-completion... 1st enter=complete matching input (or show list)... 2nd enter=view tiddler.  optional "quiet" param controls when listbox appears.
''2006.05.06 [0.5.0]'' added handling for enter (13), escape(27), and down(40) keys.   Change 'ondblclick' to 'onclick' for list handler to view tiddlers (suggested by Florian Cauvin - prevents unintended trigger of tiddler editor).  shadow titles inserted into list instead of appended to the end.
''2006.05.05 [0.0.0]'' started
<<<
!!!!!Credits
>This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
!!!!!Code
***/
//{{{
version.extensions.gotoTiddler = {major: 1, minor: 4, revision: 0, date: new Date(2007,4,25)};

// automatically tweak shadow SideBarOptions to add "sendTiddler" toolbar command (following "editTiddler")
config.shadowTiddlers.SideBarOptions=config.shadowTiddlers.SideBarOptions.replace(/<<search>>/,"{{button{goto}}}\n<<gotoTiddler>><<search>>");

config.macros.gotoTiddler= { 
	handler:
	function(place,macroName,params) {
		var quiet=(params[0] && params[0]=="quiet"); if (quiet) params.shift();
		var insert=(params[0] && params[0]=="insert"); if (insert) params.shift();
		var instyle=params.shift(); if (!instyle) instyle="";
		var liststyle=params.shift(); if (!liststyle) liststyle="";
		var keyevent=window.event?"onkeydown":"onkeypress";
		createTiddlyElement(place,"span").innerHTML
			=this.html.replace(/%keyevent%/g,keyevent).replace(/%insert%/g,insert).replace(/%quiet%/g,quiet).replace(/%instyle%/g,instyle).replace(/%liststyle%/g,liststyle);
	},

	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 a tiddler title"\
			onfocus="this.select(); this.setAttribute(\'accesskey\',\'G\');"\
			%keyevent%="return config.macros.gotoTiddler.inputEscKeyHandler(event,this,this.form.list);"\
			onkeyup="return config.macros.gotoTiddler.inputKeyHandler(event,this,this.form.list,%quiet%,%insert%);">\
		<select name=list style="%liststyle%;display:none;position:absolute"\
			onchange="if (!this.selectedIndex) this.selectedIndex=1;"\
			onblur="this.style.display=\'none\';"\
			%keyevent%="return config.macros.gotoTiddler.selectKeyHandler(event,this,this.form.gotoTiddler,%insert%);"\
			onclick="return config.macros.gotoTiddler.processItem(this.value,this.form.gotoTiddler,this,%insert%);">\
		</select>\
	</form>',
	
	getItems:
	function() {
		var items=[];
		var tiddlers=store.reverseLookup("tags","excludeSearch",false,"title");
		if (this.includeTiddlers) for(var t=0; t<tiddlers.length; t++) items.push(tiddlers[t].title);
		if (this.includeShadows) for (var t in config.shadowTiddlers) items.pushUnique(t);
		if (this.includeTags) { var tags=store.getTags(); for(var t=0; t<tags.length; t++) items.pushUnique(tags[t][0]); }
		return items;
	},
	includeTiddlers: true, includeShadows: true, includeTags: true,

	getItemSuffix:
	function(t) {
		if (store.tiddlerExists(t)) return "";  // tiddler
		if (store.isShadowTiddler(t)) return " (shadow)"; // shadow
		return " (tag)"; // tag 
	},

	keyProcessed:
	function(ev) { // utility function: exits handler and prevents browser from processing the keystroke
		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) {
		var key=event.keyCode;
		// escape... hide list (2nd esc=clears input)
		if (key==27) {
			if (list.style.display=="none")
				here.value=here.defaultValue;
			list.style.display="none";
			return this.keyProcessed(event);
		}
		return true; // key bubbles up
	},

	inputKeyHandler:
	function(event,here,list,quiet,insert) {
		var key=event.keyCode;
		// non-printing chars... bubble up, except: backspace=8, enter=13, space=32, down=40, delete=46
		if (key<48) switch(key) { case 8: case 13: case 32: case 40: case 46: break; default: return true; }
		// blank input... if down/enter... fall through (list all)... else, hide list
		if (!here.value.length && !(key==40 || key==13))
			{ list.style.display="none"; return this.keyProcessed(event); }
		// find matching items...
		var pattern=config.options.chkRegExpSearch?here.value:here.value.escapeRegExp();
		var re=new RegExp(pattern,config.options.chkCaseSensitiveSearch?"mg":"img");
		var found = []; var items=this.getItems();
		for(var t=0; t<items.length; t++) if(items[t].search(re)!=-1) found.push(items[t]);
		// matched one item... enter... not *exact* match... autocomplete input field
		if (found.length==1 && quiet && key==13 && here.value!=found[0])
			{ list.style.display="none"; here.value=found[0]; return this.keyProcessed(event); }
		// no match/exact match... enter... create/show it
		if (found.length<2 && key==13)
			return this.processItem(found.length?found[0]:here.value,here,list,insert);
		// quiet/no match... hide list...
		list.style.display=(!quiet && found.length)?"block":"none";
		// no matches... key bubbles up
		if (!found.length) return true;
		// down/enter... show/move to list...
		if (key==40 || key==13)  { list.style.display="block"; list.focus(); }
		// list is showing... fill list...
		if (list.style.display!="none") {
			while (list.length > 0) list.options[0]=null; // clear list...
			found.sort();
			list.options[0]=new Option(found.length==1?this.listMatchMsg:this.listHeading.format([found.length]),"",false,false);
			for (var t=0; t<found.length; t++)  // fill list...
				list.options[t+1]=new Option(found[t]+this.getItemSuffix(found[t]),found[t],false,false);
			list.size=(found.length<this.listMaxSize?found.length:this.listMaxSize)+1; // resize list...
			list.selectedIndex=(key==40 || key==13)?1:0;
		}
		return true; // key bubbles up
	},
	listMaxSize: 10,
	listHeading: 'Found %0 matching titles:',
	listMatchMsg: 'Press enter to open tiddler...',

	selectKeyHandler:
	function(event,list,editfield,insert) {
		if (event.keyCode==27) // escape... hide list, move to edit field
			{ editfield.focus(); list.style.display="none"; return this.keyProcessed(event); }
		if (event.keyCode==13 && list.value.length) // enter... view selected item
			{ this.processItem(list.value,editfield,list,insert); return this.keyProcessed(event); }
		return true; // key bubbles up
	},

	askForText: "Enter the text to display for this link",

	processItem:
	function(title,here,list,insert) {
		if (!title.length) return; here.value=title; list.style.display='none';
		if (insert) {
			var tidElem=story.findContainingTiddler(here); if (!tidElem) { here.focus(); return false; }
			var e=story.getTiddlerField(tidElem.getAttribute("tiddler"),"text");
			if (!e||e.getAttribute("edit")!="text") return false;
			var txt=prompt(this.askForText,title); if (!txt||!txt.length) { here.focus(); return false; }
			e.focus(); // put focus on target field before setting selection
			this.replaceSelection(e,"[["+txt+"|"+title+"]]"); // insert selected tiddler as a PrettyLink
		}
		else
			story.displayTiddler(null,title); // show selected tiddler
		return false;
	},

	replaceSelection:
	function (e,text) { // copied from 2.1.3 core and then tweaked
		if (e.setSelectionRange) {
			var oldpos = e.selectionStart;
			var isRange=e.selectionEnd-e.selectionStart;
			e.value = e.value.substr(0,e.selectionStart) + text + e.value.substr(e.selectionEnd);
			e.setSelectionRange( isRange?oldpos:oldpos+text.length, oldpos+text.length);
			var linecount = e.value.split('\n').length;
			var thisline = e.value.substr(0,e.selectionStart).split('\n').length-1;
			e.scrollTop = Math.floor((thisline-e.rows/2)*e.scrollHeight/linecount);
		}
		else if (document.selection) {
			var range = document.selection.createRange();
			if (range.parentElement() == e)	{
				var isCollapsed = range.text == "";
				range.text = text;
				 if (!isCollapsed) {
					range.moveStart('character', -text.length);
					range.select();
				}
			}
		}
	}
}
//}}}
!!このサイトへのコメント一覧
/%
<<rssReader asText "http://kuraku.tiddlyspot.com/proxy/http://www.haloscan.com/members/rss.php?user=kuraku">>

<<rssReader noDesc proxy.cgi?url=http://www.haloscan.com/members/rss.php?user=kuraku>>
%/
/***
|Name|HaloscanMacro|
|Created by|JimSpeth|
|Location|http://end.com/~speth/HaloscanMacro.html|
|Version|1.1.0|
|Requires|~TW2.x|

!Description
Comment and trackback support for TiddlyWiki (via Haloscan).

!History
* 16-Feb-06, version 1.1.0, drastic changes, now uses settings from haloscan account config
* 31-Jan-06, version 1.0.1, fixed display of counts for default tiddlers
* 30-Jan-06, version 1.0, initial release

!Examples
|!Source|!Output|h
|{{{<<haloscan comments>>}}}|<<haloscan comments>>|
|{{{<<haloscan trackbacks>>}}}|<<haloscan trackbacks>>|

!Installation
Register for a [[Haloscan|http://www.haloscan.com]] account.  It's free and painless.
Install the HaloscanMacro in a new tiddler with a tag of systemConfig (save and reload to activate).
In the macro configuration code (below), change //YourName// to your Haloscan account name.
Use the macro somewhere in a tiddler (see ViewTemplate for an example).

!Settings
You can adjust various options for your account in the member configuration area of Haloscan's web site.  The macro will use these settings when formatting the links.

!Code
***/
//{{{

/* change "YourName" to your Haloscan account name */
config.macros.haloscan = {account: "kuraku", baseURL: "http://www.haloscan.com/load/"};

var haloscanLoaded = 0;
config.macros.haloscan.load = function ()
{
    if (haloscanLoaded == 1)
        return;
    
    account = config.macros.haloscan.account;
    if (!account || (account == "YourName"))
        account = store.getTiddlerText("SiteTitle");
    
    var el = document.createElement('script');
    el.language = 'JavaScript'; 
    el.type = 'text/javascript'; 
    el.src = config.macros.haloscan.baseURL + account;
    document.documentElement.childNodes[0].appendChild(el);
    
    haloscanLoaded = 1;
}
config.macros.haloscan.load();

/* this totally clobbers document.write, i hope that's ok */
var safeWrite = function(s)
{
    document.written = s;
    return s;
};
document.write = safeWrite;

config.macros.haloscan.refreshDefaultTiddlers = function ()
{
    var start = store.getTiddlerText("DefaultTiddlers");
    if (start)
    {
        var titles = start.readBracketedList();
        for (var t=titles.length-1; t>=0; t--)
            story.refreshTiddler(titles[t], DEFAULT_VIEW_TEMPLATE, 1);
    }
}

var haloscanRefreshed = 0;
config.macros.haloscan.handler = function (place, macroName, params, wikifier, paramString, tiddler)
{
    if (typeof HaloScan == 'undefined')
    {
        if (haloscanRefreshed == 0)
        {
            setTimeout("config.macros.haloscan.refreshDefaultTiddlers()", 1);
            haloscanRefreshed = 1;
        }
        return;
    }
    
    var id = story.findContainingTiddler(place).id.substr(7);
    var hs_search = new RegExp('\\W','gi');
    id = id.replace(hs_search,"_");
    
    account = config.macros.haloscan.account;
    if (!account || (account == "YourName"))
        account = store.getTiddlerText("SiteTitle");
    
    var haloscanError = function (msg)
    {
        createTiddlyError(place, config.messages.macroError.format(["HaloscanMacro"]), config.messages.macroErrorDetails.format(["HaloscanMacro", msg]));
    }
    
    if (params.length == 1)
    {
        if (params[0] == "comments")
        {
            postCount(id);
            commentsLabel = document.written; //"Add/view comments";
            commentsPrompt = "Comments on this tiddler";
            var commentsHandler = function(e) { HaloScan(id); return false; };
            var commentsButton = createTiddlyButton(place, commentsLabel, commentsPrompt, commentsHandler);
        }
        else if (params[0] == "trackbacks")
        {
            postCountTB(id);
            trackbacksLabel = document.written; //"Add/view trackbacks"; 
            trackbacksPrompt = "Trackbacks for this tiddler";
            var trackbacksHandler = function(e) { HaloScanTB(id); return false; };
            var trackbackButton = createTiddlyButton(place, trackbacksLabel, trackbacksPrompt, trackbacksHandler);
        }
        else
            haloscanError("unknown parameter: " + params[0]);
    }
    else if (params.length == 0)
        haloscanError("missing parameter");
    else
        haloscanError("bad parameter count");
}

//}}}
/%
<<rssReader asText proxy.cgi?url=http://www.haloscan.com/members/rss.php?user=kuraku>>
%/
{{{
''太字''
--取消線--
__下線__
//斜体//
2^^3^^=8
a~~ij~~ = -a~~ji~~
}}}
''太字''
--取消線--
__下線__
//斜体//
2^^3^^=8
a~~ij~~ = -a~~ji~~
 
{{{
@@ハイライト@@
@@color(green):着色(ここでは緑)@@
@@color:red;文字列(赤)@@
@@bgcolor(#000000):color(#00FFFF):背景色の設定もできます。@@
@@color:#0ff;background-color:#000;文字列@@
@@font-size:+2;文字列@@
}}}
@@ハイライト@@
@@color(green):着色(ここでは緑)@@
@@color:red;文字列(赤)@@
@@bgcolor(#000000):color(#00FFFF):背景色の設定もできます。@@
@@color:#0ff;background-color:#000;文字列@@
@@font-size:+2;文字列@@
 
{{{
{{{固定幅の表示}} }
{{{
 <monospacedtext>固定幅の表示(ブロック)</monospacedtext>
}} }
表示されないコメントを入れる。
/% comment %/ これは見えません。
"""装飾無し(「"」三つで囲む)"""
~装飾無し
水平線
----
}}}
{{{固定幅の表示}}}
{{{
 <monospacedtext>固定幅の表示(ブロック)</monospacedtext>
}}}
表示されないコメントを入れる。
/% comment %/ これは見えません。
"""装飾無し(「"」三つで囲む)"""
~装飾無し
水平線
----

通常リスト
{{{
* 一段目
** 階層化もできます。
** 同一レベルに記述するとこんなかんじ。
* そして元に戻ります。
}}}
* 一段目
** 階層化もできます。
** 同一レベルに記述するとこんなかんじ。
* そして元に戻ります。

番号リスト
序数を付けたリストです。
{{{
#item1
#item2
##item2.1
##item2.2
##item2.3
#item3
##item3.1
###item3.1.1
###item3.1.2
}}}
#item1
#item2
##item2.1
##item2.2
##item2.3
#item3
##item3.1
###item3.1.1
###item3.1.2

見出し
いわゆる <h2>...</h2> などに相当する見出しです。五段階に対応してます。
{{{
!Header 1
!!Header 2
!!!Header 3
!!!!Header 4
!!!!!Header 5
}}}
!Header 1
!!Header 2
!!!Header 3
!!!!Header 4
!!!!!Header 5 
外部リンク
他のサイトへのリンクをする場合、[[Google|http://www.google.com/]]などと記載します。
 
画像の埋込み
{{{
[img[Google|http://www.google.co.jp/images/logo_sm.gif]]
}}}
[img[Google|http://www.google.co.jp/images/logo_sm.gif]]
さらにリンク
{{{
[img[Google|http://www.google.co.jp/images/logo_sm.gif][http://google.co.jp/]]
}}}
[img[Google|http://www.google.co.jp/images/logo_sm.gif][http://google.co.jp/]]
同じフォルダにある場合はパス名は不要なようです。
 
引用
{{{
<<<
引用しています。
引用しています。
<<<
}}}
<<<
引用しています。
引用しています。
<<<

{{{
>level 1
>level 1
>>level 2
>>level 2
>>>level 3
>>>level 3
>>level 2
>level 1
}}}
>level 1
>level 1
>>level 2
>>level 2
>>>level 3
>>>level 3
>>level 2
>level 1 
表組
{{{
|!th1111111111|!th2222222222|
|>| colspan |
| rowspan |left|
|~| right|
|bgcolor(#a0ffa0):colored| center |
|caption|c
}}}
|!th1111111111|!th2222222222|
|>| colspan |
| rowspan |left|
|~| right|
|bgcolor(#a0ffa0):colored| center |
|caption|c

ドキュメント内リンク (追加)
{{{
[[GettingStarted]]
[[スタートのメモ|GettingStarted]]
}}}
[[GettingStarted]]
[[スタートのメモ|GettingStarted]]
/***
|''Name:''|HelpTextMacro|
|''Source:''|http://kuraku.net/tw/tw.html#HelpTextMacro|
|''Author:''|KuRaKu|
|''License:''|http://creativecommons.org/licenses/by-sa/2.5/|
|''Version:''|0.1.3 (2007-04-27)|
|''~CoreVersion:''|2.1.3|

!!Description
編集時にヘルプを表示できます。
デフォルトでは [[HelpText]] という名前の tiddler を表示します。

When editing tiddler, help can be displayed. 
Tiddler named HelpText is displayed in default. 

!!Install
この [[HelpTextMacro]] をコピーした後、タグに systemConfig を追加。
とりあえずはこちらの [[HelpText]] もコピーしてください。
保存してリロードしてください。

[[EditTemplate]] に以下のように「helptext」を追記します。

After this [[HelpTextMacro]] is copied, //systemConfig// is added to tag. 
Please copy [[HelpText]] tiddler here for the time being. 
It preserves and reload. 

"helptext" is added to [[EditTemplate]] as follows. 
//{{{
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler helptext deleteTiddler'></div>
...
//}}}
([[EditTemplate]] はこれまでに修正したことが無ければ {{{Sidebar: More>Shadow}}} を見てください<br>Please look at {{{Sidebar:More>Shadow}}} about EditTemplate so far if not having corrected it. )

!!Configuration
[[HelpTextMacroConfig]] を作って、以下のように記述すると表示する tiddler の指定ができます。
同様に systemConfig タグを付けて保存してください。

Tiddler displayed to describe it making [[HelpTextMacroConfig]] as follows can be specified. 
Please preserve the systemConfig tag similarly putting it. 
//{{{
config.commands.helptext.helptiddler = "HelpText";
//}}}

!!History
*2007.04.27, ver 0.1.3
**Improved style
*2007.04.19, ver 0.1.2:
**Improved style
**Added 'version' display
**Added english document
/%
Style を変更することもできます。以下がデフォルトです。
Style can be changed. The following are defaults. 
//{{{
.helpText {
	background: #fff; color: #222;
} 
.helpText p pre {
	font-size: 1.0em; line-height: 1.1em;
}
//}}}
%/
!!Source
***/
/*{{{*/
version.extensions.helptext = { major: 0, minor: 1, revision: 3, date: new Date(2007,4,27),
	source: "http://kuraku.net/tw/tw.html#HelpTextMacro"
};

config.commands.helptext = {};
config.commands.helptext.version = "Version %0.%1.%2".format([version.extensions.helptext.major,version.extensions.helptext.minor,version.extensions.helptext.revision]);
config.commands.helptext.helptiddler = "HelpText";
config.commands.helptext.handler = function(event,src,title)
{
	var popup = Popup.create(src);
	if(popup)
		{
		createTiddlyElement(popup,"H1","helpText",null,"TiddlyWiki Format Help:");
		var helptext = store.fetchTiddler(config.commands.helptext.helptiddler).text;

		popup.setAttribute("style","background:#fff; color: #222;");
		var wrapper = createTiddlyElement(popup, "span", "helpText");

		wikify(helptext, wrapper, null, store.getTiddler(config.commands.helptext.helptiddler));
		var version = createTiddlyElement(popup,"div","helpText",null
					,"\n\nHelpTextMacro "+config.commands.helptext.version);
		version.setAttribute("style", "font-size: 0.8em; padding-top: 5px;");
		}
	Popup.show(popup,false);
	event.cancelBubble = true;
	if (event.stopPropagation) event.stopPropagation();
	return false;
}

merge(config.commands.helptext,{
	text: "help",
	tooltip: "help to help file"});

setStylesheet("#helpText a:link{color:#0044BB}\n #helpText a:hover{background:#0044BB; color:#fff;}\n #helpText blockquote {border-left: 3px solid;}\n #helpText pre {background: #FFFFCC none repeat ; border:1px solid #FFEE88;}\n #helpText table {border-collapse:collapse;border: 2px solid;}\n #helpText th, thead {color:#fff; background: #DDBB44; border: 1px solid #000;}\n #helpText td {background: #fff; border: 1px solid #000; color: #000;}");
/*}}}*/
/***
| Name|HideWhenPlugin|
| Description|Allows conditional inclusion/exclusion in templates|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://mptw.tiddlyspot.com/#HideWhenPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| 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.removeElementWhen = function(test,place) {
	if (test) {
		removeChildren(place);
		place.parentNode.removeChild(place);
	}
};

merge(config.macros,{

	hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( eval(paramString), place);
	}},

	showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !eval(paramString), place);
	}},

	hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAll(params), place);
	}},

	showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAll(params), place);
	}},

	hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAny(params), place);
	}},

	showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAny(params), place);
	}},

	hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( tiddler.tags.containsAll(params), place);
	}},

	showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !tiddler.tags.containsAll(params), place);
	}},

	hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);
	}},

	showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);
	}}

});

//}}}

/***
文字列を<<hl ハイライトして>>出力する。
!!!Usage
{{{
<<hl 文字列>>
<<hl "文字列 スペースを含む場合はクォートで囲む">>
}}}
***/
//{{{
config.macros.hl = {};
config.macros.hl.handler = function(place,macroName,params)
{
var e = createTiddlyElement(place,"span",null,null,params[0]);
e.style["backgroundColor"] = "#0ff";
}
//}}}
*<<reminder month:1 day:1 title:"元日">>
*<<reminder month:1 day:8 offsetdayofweek:1 title:"成人の日">>
*<<reminder month:2 day:11 title:"建国記念の日">>
*<<reminder month:3 day:21 title:"春分の日">>
*<<reminder month:4 day:29 title:"昭和の日">>
*<<reminder month:5 day:3 title:"憲法記念日">>
*<<reminder month:5 day:4 title:"みどりの日">>
*<<reminder month:5 day:5 title:"子供の日">>
*<<reminder month:7 day:20 title:"海の日">>
*<<reminder month:9 day:15 offsetdayofweek:1 title:"敬老の日">>
*<<reminder month:9 day:23 title:"秋分の日">>
*<<reminder month:10 day:9 offsetdayofweek:1 title:"体育の日">>
*<<reminder month:11 day:3 title:"文化の日">>
*<<reminder month:11 day:23 title:"勤労感謝の日">>
*<<reminder month:12 day:23 title:"天皇誕生日">>
<<top>>
<<toggleSideBar>>
<<jump j '' top>>
<<upload http://kuraku.tiddlyspot.com/store.cgi index.html . .  kuraku>><<renameButton w 'Save To Web'>>
<<newTiddler>><<renameButton n>>
<<newJournal  "YYYY.0MM.0DD" "today">><<renameButton t>>
<<dirtyflag>>
/***
|Name|HoverMenuPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#HoverMenuPlugin|
|Version|1.11|
|Requires|~TW2.x|
!Description:
Provides a hovering menu on the edge of the screen for commonly used commands, that scrolls with the page.

!Demo:
Observe the hovering menu on the right edge of the screen.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
To customize your HoverMenu, edit the HoverMenu shadow tiddler.

To customize whether the menu sticks to the right or left edge of the screen, and its start position, edit the HoverMenu configuration settings part of the code below. It's well documented, so don't be scared!

The menu has an id of hoverMenu, in case you want to style the buttons in it using css.

!Notes:
Since the default HoverMenu contains buttons for toggling the side bar and jumping to the top of the screen and to open tiddlers, the ToggleSideBarMacro, JumpMacro and the JumpToTopMacro are included in this tiddler, so you dont need to install them separately. Having them installed separately as well could lead to complications.

If you dont intend to use these three macros at all, feel free to remove those sections of code in this tiddler.

!To Do:
* rework code to allow multiple hovering menus in different positions, horizontal etc.
* incorporate code for keyboard shortcuts that correspond to the buttons in the hovermenu

!History:
*03-08-06, ver 1.11: fixed error with button tooltips
*27-07-06, ver 1.1 : added JumpMacro to hoverMenu
*23-07-06

!Code
***/

/***
start HoverMenu plugin code
***/
//{{{
config.hoverMenu={};
//}}}

/***
HoverMenu configuration settings
***/
//{{{
config.hoverMenu.settings={
 align: 'right', //align menu to right or left side of screen, possible values are 'right' and 'left' 
 x: 1, // horizontal distance of menu from side of screen, increase to your liking.
 y: 158 //vertical distance of menu from top of screen at start, increase or decrease to your liking
 };
//}}}

//{{{
//continue HoverMenu plugin code
config.hoverMenu.handler=function()
{
 var theMenu = createTiddlyElement(document.getElementById("contentWrapper"), "div","hoverMenu");
 theMenu.setAttribute("refresh","content");
 theMenu.setAttribute("tiddler","HoverMenu");
 var menuContent = store.getTiddlerText("HoverMenu");
 wikify(menuContent,theMenu);

 var Xloc = this.settings.x;
 Yloc =this.settings.y;
 var ns = (navigator.appName.indexOf("Netscape") != -1);
 function SetMenu(id)
 {
 var GetElements=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];
 if(document.layers)GetElements.style=GetElements;
 GetElements.sP=function(x,y){this.style[config.hoverMenu.settings.align]=x +"px";this.style.top=y +"px";};
 GetElements.x = Xloc;
 GetElements.y = findScrollY();
 GetElements.y += Yloc;
 return GetElements;
 }
 window.LoCate_XY=function()
 {
 var pY = findScrollY();
 ftlObj.y += (pY + Yloc - ftlObj.y)/15;
 ftlObj.sP(ftlObj.x, ftlObj.y);
 setTimeout("LoCate_XY()", 10);
 }
 ftlObj = SetMenu("hoverMenu");
 LoCate_XY();
};

window.old_lewcid_hovermenu_restart = restart;
restart = function()
{
 window.old_lewcid_hovermenu_restart();
 config.hoverMenu.handler();
};

setStylesheet(
"#hoverMenu .button, #hoverMenu .tiddlyLink {border:none; font-weight:bold; background:#18f; color:#FFF; padding:0 5px; float:right; margin-bottom:4px;}\n"+
"#hoverMenu .button:hover, #hoverMenu .tiddlyLink:hover {font-weight:bold; border:none; color:#fff; background:#000; padding:0 5px; float:right; margin-bottom:4px;}\n"+
"#hoverMenu .button {width:100%; text-align:center}"+
"#hoverMenu { position:absolute; width:7px;}\n"+
"\n","hoverMenuStyles");


config.macros.renameButton={};
config.macros.renameButton.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{

 if (place.lastChild.tagName!="BR")
 {
 place.lastChild.firstChild.data = params[0];
 if (params[1]) {place.lastChild.title = params[1];}
 }
};

config.shadowTiddlers["HoverMenu"]="<<top>>\n<<toggleSideBar>><<renameButton '>' >>\n<<jump j '' top>>\n<<saveChanges>><<renameButton s 'Save TiddlyWiki'>>\n<<newTiddler>><<renameButton n>>\n";
//}}}
//end HoverMenu plugin code

//Start ToggleSideBarMacro code
//{{{
config.macros.toggleSideBar={};

config.macros.toggleSideBar.settings={
 styleHide : "#sidebar { display: none;}\n"+"#contentWrapper #displayArea { margin-right: 1em;}\n"+"",
 styleShow : " ",
 arrow1: "«",
 arrow2: "»"
};

config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
 var tooltip= params[1]||'toggle sidebar';
 var mode = (params[2] && params[2]=="hide")? "hide":"show";
 var arrow = (mode == "hide")? this.settings.arrow1:this.settings.arrow2;
 var label= (params[0]&&params[0]!='.')?params[0]+" "+arrow:arrow;
 var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,"button HideSideBarButton");
 if (mode == "hide")
 { 
 (document.getElementById("sidebar")).setAttribute("toggle","hide");
 setStylesheet(this.settings.styleHide,"ToggleSideBarStyles");
 }
};

config.macros.toggleSideBar.onToggleSideBar = function(){
 var sidebar = document.getElementById("sidebar");
 var settings = config.macros.toggleSideBar.settings;
 if (sidebar.getAttribute("toggle")=='hide')
 {
 setStylesheet(settings.styleShow,"ToggleSideBarStyles");
 sidebar.setAttribute("toggle","show");
 this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
 }
 else
 { 
 setStylesheet(settings.styleHide,"ToggleSideBarStyles");
 sidebar.setAttribute("toggle","hide");
 this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
 }

 return false;
}

setStylesheet(".HideSideBarButton .button {font-weight:bold; padding: 0 5px;}\n","ToggleSideBarButtonStyles");
//}}}
//end ToggleSideBarMacro code

//start JumpToTopMacro code
//{{{
config.macros.top={};
config.macros.top.handler=function(place,macroName)
{
 createTiddlyButton(place,"^","jump to top",this.onclick);
}
config.macros.top.onclick=function()
{
 window.scrollTo(0,0);
};

config.commands.top =
{
 text:" ^ ",
 tooltip:"jump to top"
};

config.commands.top.handler = function(event,src,title)
{
 window.scrollTo(0,0);
}
//}}}
//end JumpToStartMacro code

//start JumpMacro code
//{{{
config.macros.jump= {};
config.macros.jump.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
 var label = (params[0] && params[0]!=".")? params[0]: 'jump';
 var tooltip = (params[1] && params[1]!=".")? params[1]: 'jump to an open tiddler';
 var top = (params[2] && params[2]=='top') ? true: false; 

 var btn =createTiddlyButton(place,label,tooltip,this.onclick);
 if (top==true)
 btn.setAttribute("top","true")
}

config.macros.jump.onclick = function(e)
{
 if (!e) var e = window.event;
 var theTarget = resolveTarget(e);
 var top = theTarget.getAttribute("top");
 var popup = Popup.create(this);
 if(popup)
 {
 if(top=="true")
 {createTiddlyButton(createTiddlyElement(popup,"li"),'Top ↑','Top of TW',config.macros.jump.top);
 createTiddlyElement(popup,"hr");}
 
 story.forEachTiddler(function(title,element) {
 createTiddlyLink(createTiddlyElement(popup,"li"),title,true);
 });
 }
 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
}

config.macros.jump.top = function()
{
 window.scrollTo(0,0);
}
//}}}
//end JumpMacro code

//utility functions
//{{{
Popup.show = function(unused,slowly)
{
 var curr = Popup.stack[Popup.stack.length-1];
 var rootLeft = findPosX(curr.root);
 var rootTop = findPosY(curr.root);
 var rootHeight = curr.root.offsetHeight;
 var popupLeft = rootLeft;
 var popupTop = rootTop + rootHeight;
 var popupWidth = curr.popup.offsetWidth;
 var winWidth = findWindowWidth();
 if (isChild(curr.root,'hoverMenu'))
 var x = config.hoverMenu.settings.x;
 else
 var x = 0;
 if(popupLeft + popupWidth+x > winWidth)
 popupLeft = winWidth - popupWidth -x;
 if (isChild(curr.root,'hoverMenu'))
 {curr.popup.style.right = x + "px";}
 else
 curr.popup.style.left = popupLeft + "px";
 curr.popup.style.top = popupTop + "px";
 curr.popup.style.display = "block";
 addClass(curr.root,"highlight");
 if(config.options.chkAnimate)
 anim.startAnimating(new Scroller(curr.popup,slowly));
 else
 window.scrollTo(0,ensureVisible(curr.popup));
}

window.isChild = function(e,parentId) {
 while (e != null) {
 var parent = document.getElementById(parentId);
 if (parent == e) return true;
 e = e.parentNode;
 }
 return false;
};
//}}}


HoverMenuPlugin は便利なオペレーション I/F を提供してくれる。
右端のボタン「^」「>」「j」「f」「s」「n」のこと。それぞれ、
|^ |トップへ|
|{{{>}}}|サイドバーを隠す(トグル)|
|j|表示されている tiddler へのジャンプ|
|f|フルスクリーンにする(トグル)|
|s|セーブする|
|n|新しい tiddler を開く|

「f」のフルスクレリーン機能は FullScreenPlugin が必要となる。

importTiddler を実行したりすると、これが消えたりするが reload すればまたちゃんと表示される。

!!save to web
(以前は、ローカルで使用する場合にのみ「s」で save が可能になる、と書いたが)
[[HoverMenu]] を修正することで web 上での save も可能になる。([*]もちろん uploadplugin がきちんと動作していることが前提)
{{{
<<top>>
<<toggleSideBar>><<renameButton '>' >>
<<jump j '' top>>
<<fullscreen f>>
<<saveChanges>><<renameButton s 'Save TiddlyWiki'>>
<<upload http://your/site/store.cgi index.html . .>><<renameButton s 'Save To Web'>>
<<newTiddler>><<renameButton n>>
}}}
このように、saveChanges の下に upload を追加すれば良い。

tiddlyspot などであれば、[[SideBarOptions]] の upload マクロの呼び出しをコピーするのが早いだろう。
~~([*]2007.04.06 追記)~~
/*{{{*/
config.macros.toggleSideBar.settings.arrow1 = "<";
config.macros.toggleSideBar.settings.arrow2 = ">";
/*}}}*/
/***
|Name|ImageSizePlugin|
|Source|http://www.TiddlyTools.com/#ImageSizePlugin|
|Version|1.2.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|adds support for resizing images|
This plugin adds optional syntax to scale an image to a specified width and height and/or interactively resize the image with the mouse.
!!!!!Usage
<<<
The extended image syntax is:
{{{
[img(w+,h+)[...][...]]
}}}
where ''(w,h)'' indicates the desired width and height (in CSS units, e.g., px, em, cm, in, or %). Use ''auto'' (or a blank value) for either dimension to scale that dimension proportionally (i.e., maintain the aspect ratio). You can also calculate a CSS value 'on-the-fly' by using a //javascript expression// enclosed between """{{""" and """}}""". Appending a plus sign (+) to a dimension enables interactive resizing in that dimension (by dragging the mouse inside the image). Use ~SHIFT-click to show the full-sized (un-scaled) image. Use ~CTRL-click to restore the starting size (either scaled or full-sized).
<<<
!!!!!Examples
<<<
{{{
[img(100px+,75px+)[images/meow2.jpg]]
}}}
[img(100px+,75px+)[images/meow2.jpg]]
{{{
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img(  1%+,+)[images/meow.gif]]
}}}
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img(  1%+,+)[images/meow.gif]]
{{tagClear{
}}}
<<<
!!!!!Revisions
<<<
2009.02.24 [1.2.1] cleanup width/height regexp, use '+' suffix for resizing
2009.02.22 [1.2.0] added stretchable images
2008.01.19 [1.1.0] added evaluated width/height values
2008.01.18 [1.0.1] regexp for "(width,height)" now passes all CSS values to browser for validation
2008.01.17 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.ImageSizePlugin= {major: 1, minor: 2, revision: 1, date: new Date(2009,2,24)};
//}}}
//{{{
var f=config.formatters[config.formatters.findByField("name","image")];
f.match="\\[[<>]?[Ii][Mm][Gg](?:\\([^,]*,[^\\)]*\\))?\\[";
f.lookaheadRegExp=/\[([<]?)(>?)[Ii][Mm][Gg](?:\(([^,]*),([^\)]*)\))?\[(?:([^\|\]]+)\|)?([^\[\]\|]+)\](?:\[([^\]]*)\])?\]/mg;
f.handler=function(w) {
	this.lookaheadRegExp.lastIndex = w.matchStart;
	var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
	if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
		var floatLeft=lookaheadMatch[1];
		var floatRight=lookaheadMatch[2];
		var width=lookaheadMatch[3];
		var height=lookaheadMatch[4];
		var tooltip=lookaheadMatch[5];
		var src=lookaheadMatch[6];
		var link=lookaheadMatch[7];

		// Simple bracketted link
		var e = w.output;
		if(link) { // LINKED IMAGE
			if (config.formatterHelpers.isExternalLink(link)) {
				if (config.macros.attach && config.macros.attach.isAttachment(link)) {
					// see [[AttachFilePluginFormatters]]
					e = createExternalLink(w.output,link);
					e.href=config.macros.attach.getAttachment(link);
					e.title = config.macros.attach.linkTooltip + link;
				} else
					e = createExternalLink(w.output,link);
			} else 
				e = createTiddlyLink(w.output,link,false,null,w.isStatic);
			addClass(e,"imageLink");
		}

		var img = createTiddlyElement(e,"img");
		if(floatLeft) img.align="left"; else if(floatRight) img.align="right";
		if(width||height) {
			var x=width.trim(); var y=height.trim();
			var stretchW=(x.substr(x.length-1,1)=='+'); if (stretchW) x=x.substr(0,x.length-1);
			var stretchH=(y.substr(y.length-1,1)=='+'); if (stretchH) y=y.substr(0,y.length-1);
			if (x.substr(0,2)=="{{")
				{ try{x=eval(x.substr(2,x.length-4))} catch(e){displayMessage(e.description||e.toString())} }
			if (y.substr(0,2)=="{{")
				{ try{y=eval(y.substr(2,y.length-4))} catch(e){displayMessage(e.description||e.toString())} }
			img.style.width=x.trim(); img.style.height=y.trim();
			config.formatterHelpers.addStretchHandlers(img,stretchW,stretchH);
		}
		if(tooltip) img.title = tooltip;

		// GET IMAGE SOURCE
		if (config.macros.attach && config.macros.attach.isAttachment(src))
			src=config.macros.attach.getAttachment(src); // see [[AttachFilePluginFormatters]]
		else if (config.formatterHelpers.resolvePath) { // see [[ImagePathPlugin]]
			if (config.browser.isIE || config.browser.isSafari) {
				img.onerror=(function(){
					this.src=config.formatterHelpers.resolvePath(this.src,false);
					return false;
				});
			} else
				src=config.formatterHelpers.resolvePath(src,true);
		}
		img.src=src;
		w.nextMatch = this.lookaheadRegExp.lastIndex;
	}
}

config.formatterHelpers.addStretchHandlers=function(e,stretchW,stretchH) {
	e.title=((stretchW||stretchH)?'DRAG=stretch/shrink, ':'')
		+'SHIFT-CLICK=show full size, CTRL-CLICK=restore initial size';
	e.statusMsg='width=%0, height=%1';
	e.style.cursor='move';
	e.originalW=e.style.width;
	e.originalH=e.style.height;
	e.minW=Math.max(e.offsetWidth/20,10);
	e.minH=Math.max(e.offsetHeight/20,10);
	e.stretchW=stretchW;
	e.stretchH=stretchH;
	e.onmousedown=function(ev) { var ev=ev||window.event;
		this.sizing=true;
		this.startX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
		this.startY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
		this.startW=this.offsetWidth;
		this.startH=this.offsetHeight;
		return false;
	};
	e.onmousemove=function(ev) { var ev=ev||window.event;
		if (this.sizing) {
			var s=this.style;
			var currX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
			var currY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
			var newW=(currX-this.offsetLeft)/(this.startX-this.offsetLeft)*this.startW;
			var newH=(currY-this.offsetTop )/(this.startY-this.offsetTop )*this.startH;
			if (this.stretchW) s.width =Math.floor(Math.max(newW,this.minW))+'px';
			if (this.stretchH) s.height=Math.floor(Math.max(newH,this.minH))+'px';
			clearMessage(); displayMessage(this.statusMsg.format([s.width,s.height]));
		}
		return false;
	};
	e.onmouseup=function(ev) { var ev=ev||window.event;
		if (ev.shiftKey) { this.style.width=this.style.height=''; }
		if (ev.ctrlKey)  { this.style.width=this.originalW; this.style.height=this.originalH; }
		this.sizing=false;
		clearMessage();
		return false;
	};
	e.onmouseout=function(ev) { var ev=ev||window.event;
		this.sizing=false;
		clearMessage();
		return false;
	};
}
//}}}
/***
|Name|ImportTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#ImportTiddlersPlugin|
|Documentation|http://www.TiddlyTools.com/#ImportTiddlersPluginInfo|
|Version|4.3.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|config.macros.importTiddlers.handler|
|Description|interactive controls for import/export with filtering.|
This plugin lets you selectively combine tiddlers from any two TiddlyWiki documents.  An interactive control panel lets you pick a document to import from, and then select which tiddlers to import, with prompting for skip, rename, merge or replace actions when importing tiddlers that match existing titles.  Automatically add tags to imported tiddlers so they are easy to find later on.  Generates a detailed report of import 'history' in ImportedTiddlers.
!!!!!Documentation
<<<
see [[ImportTiddlersPluginInfo]] for details
<<<
!!!!!interactive control panel:
<<<
<<importTiddlers inline>>
{{clear{
^^(see also: [[ImportTiddlers]] shadow tiddler)^^}}}
<<<
!!!!!Installation Notes
<<<
* As of 6/27/2007, "patch" functions that provide backward-compatibility with TW2.1.x and earlier have been split into a separate [[ImportTiddlersPluginPatch]] tiddler to reduce installation overhead for //this// plugin.  You only need to install the additional plugin tiddler when using ImportTiddlersPlugin in documents using TW2.1.x or earlier.
* As of 3/21/2007, the interactive {{{<<importTiddlers>>}}} and non-interactive {{{<<loadTiddlers>>}}} macro definitions and related code have been split into separate [[ImportTiddlersPlugin]] and [[LoadTiddlersPlugin]] to permit selective installation of either the interactive and/or non-interactive macro functions.
* Quick Installation Tip: If you are using an unmodified version of TiddlyWiki (core release version <<version>>), you can get a new, empty TiddlyWiki with the Import Tiddlers plugin pre-installed (''[[download from here|TW+ImportExport.html]]''), and then simply import all your content from your old document into this new, empty document.
<<<
!!!!!Revisions
<<<
2008.08.12 [4.3.3] rewrite backstage and shadow tiddler definitions for easier customization
|please see [[ImportTiddlersPluginInfo]] for additional revision details|
2005.07.20 [1.0.0] Initial Release
<<<
!!!!!Code
***/
//{{{
version.extensions.ImportTiddlersPlugin= {major: 4, minor: 3, revision: 3, date: new Date(2008,8,12)};
//}}}
//{{{
// IE needs explicit global scoping for functions/vars called from browser events
window.onClickImportButton=onClickImportButton;
window.refreshImportList=refreshImportList;

// default cookie/option values
if (!config.options.chkImportReport) config.options.chkImportReport=true;

// default shadow definition
config.shadowTiddlers.ImportTiddlers="Use ~TiddlyWiki built-in importer (below) or, ";
config.shadowTiddlers.ImportTiddlers+="<<importTiddlers link 'Use ImportTiddlersPlugin control panel...'>>\n";
config.shadowTiddlers.ImportTiddlers+="<<importTiddlers core>>";

// use shadow tiddler content in backstage panel
if (config.tasks) config.tasks.importTask.content="<<tiddler ImportTiddlers>>" // TW2.2 or above

// $(...) function: 'shorthand' convenience syntax for document.getElementById()
if (typeof($)=="undefined") { // avoid redefinition
function $() {
	var elements=new Array();
	for (var i=0; i<arguments.length; i++) {
		var element=arguments[i];
		if (typeof element=='string') element=document.getElementById(element);
		if (arguments.length==1) return element;
		elements.push(element);
	}
	return elements;
}
}
//}}}
//{{{
merge(config.macros.importTiddlers,{
	label: "import tiddlers",
	prompt: "Copy tiddlers from another document",
	openMsg: "Opening %0",
	openErrMsg: "Could not open %0 - error=%1",
	readMsg: "Read %0 bytes from %1",
	foundMsg: "Found %0 tiddlers in %1",
	filterMsg: "Filtered %0 tiddlers matching '%1'",
	summaryMsg: "%0 tiddler%1 in the list",
	summaryFilteredMsg: "%0 of %1 tiddler%2 in the list",
	plural: "s are",
	single: " is",
	countMsg: "%0 tiddlers selected for import",
	processedMsg: "Processed %0 tiddlers",
	importedMsg: "Imported %0 of %1 tiddlers from %2",
	loadText: "please load a document...",
	closeText: "close",	// text for close button when file is loaded
	doneText: "done",	// text for close button when file is not loaded
	startText: "import",	// text for import button
	stopText: "stop",	// text for import button while importing
	local: true,		// default to import from local file
	src: "",		// path/filename or URL of document to import (retrieved from SiteUrl tiddler)
	proxy: "",		// URL for remote proxy script (retrieved from SiteProxy tiddler)
	useProxy: false,	// use specific proxy script in front of remote URL
	inbound: null,		// hash-indexed array of tiddlers from other document
	newTags: "",		// text of tags added to imported tiddlers
	addTags: true,		// add new tags to imported tiddlers
	listsize: 10,		// # of lines to show in imported tiddler list
	importTags: true,	// include tags from remote source document when importing a tiddler
	keepTags: true,		// retain existing tags when replacing a tiddler
	sync: false,		// add 'server' fields to imported tiddlers (for sync function)
	lastFilter: "",		// most recent filter (URL hash) applied
	lastAction: null,	// most recent collision button performed
	index: 0,		// current processing index in import list
	sort: ""		// sort order for imported tiddler listbox
});
//}}}
//{{{
// replace core macro handler
if (config.macros.importTiddlers.coreHandler==undefined)
	config.macros.importTiddlers.coreHandler=config.macros.importTiddlers.handler; // save built-in handler
config.macros.importTiddlers.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	if (!params[0] || params[0].toLowerCase()=='core') { // default to built in
		if (config.macros.importTiddlers.coreHandler)
			config.macros.importTiddlers.coreHandler.apply(this,arguments);
		else 
			createTiddlyButton(place,this.label,this.prompt,onClickImportMenu);
	} else if (params[0]=='link') { // show link to floating panel
		createTiddlyButton(place,params[1]||this.label,params[2]||this.prompt,onClickImportMenu);
	} else if (params[0]=='inline') {// show panel as INLINE tiddler content
		createImportPanel(place);
		$("importPanel").style.position="static";
		$("importPanel").style.display="block";
	} else if (config.macros.loadTiddlers)
		config.macros.loadTiddlers.handler(place,macroName,params); // any other params: loadtiddlers
}
//}}}
//{{{
// Handle link click to create/show/hide control panel
function onClickImportMenu(e)
{
	if (!e) var e = window.event;
	var parent=resolveTarget(e).parentNode;
	var panel = $("importPanel");
	if (panel==undefined || panel.parentNode!=parent)
		panel=createImportPanel(parent);
	var isOpen = panel.style.display=="block";
	if(config.options.chkAnimate)
		anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));
	else
		panel.style.display = isOpen ? "none" : "block" ;
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	return(false);
}
//}}}
//{{{
// Create control panel: HTML, CSS
function createImportPanel(place) {
	var cmi=config.macros.importTiddlers; // abbreviation
	var panel=$("importPanel");
	if (panel) { panel.parentNode.removeChild(panel); }
	setStylesheet(cmi.css,"importTiddlers");
	panel=createTiddlyElement(place,"span","importPanel",null,null)
	panel.innerHTML=cmi.html;
	refreshImportList();
	var siteURL=store.getTiddlerText("SiteUrl"); if (!siteURL) siteURL="";
	$("importSourceURL").value=siteURL;
	cmi.src=siteURL;
	var siteProxy=store.getTiddlerText("SiteProxy"); if (!siteProxy) siteProxy="SiteProxy";
	$("importSiteProxy").value=siteProxy;
	cmi.proxy=siteProxy;
	if (config.browser.isGecko) { // FF3 FIXUP
		$("fileImportSource").style.display="none";
		$("importLocalPanelFix").style.display="block";
	}
	return panel;
}
//}}}
//{{{
config.macros.importTiddlers.css = '\
#importPanel {\
	display: none; position:absolute; z-index:11; width:35em; right:105%; top:3em;\
	background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\
	border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\
	padding: 0.5em; margin:0em; -moz-border-radius:1em;\
}\
#importPanel a, #importPanel td a { color:#009; display:inline; margin:0px; padding:1px; }\
#importPanel table { width:100%; border:0px; padding:0px; margin:0px; font-size:8pt; line-height:110%; background:transparent; }\
#importPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }\
#importPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }\
#importPanel select { width:100%;margin:0px;font-size:8pt;line-height:110%;}\
#importPanel input  { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\
#importPanel .box { border:1px solid #000; background-color:#eee; padding:3px 5px; margin-bottom:5px; -moz-border-radius:5px;}\
#importPanel .topline { border-top:1px solid #999; padding-top:2px; margin-top:2px; }\
#importPanel .rad { width:auto; }\
#importPanel .chk { width:auto; margin:1px;border:0; }\
#importPanel .btn { width:auto; }\
#importPanel .btn1 { width:98%; }\
#importPanel .btn2 { width:48%; }\
#importPanel .btn3 { width:32%; }\
#importPanel .btn4 { width:23%; }\
#importPanel .btn5 { width:19%; }\
#importPanel .importButton { padding: 0em; margin: 0px; font-size:8pt; }\
#importPanel .importListButton { padding:0em 0.25em 0em 0.25em; color: #000000; display:inline }\
#backstagePanel #importPanel { left:10%; right:auto; }\
';
//}}}
//{{{
config.macros.importTiddlers.html = '\
<!-- source and report -->\
<table><tr><td align=left>\
	import from\
	<input type="radio" class="rad" name="importFrom" id="importFromFile" value="file" CHECKED\
		onclick="onClickImportButton(this,event)" title="show file controls"> local file\
	<input type="radio" class="rad" name="importFrom" id="importFromWeb"  value="http"\
		onclick="onClickImportButton(this,event)" title="show web controls"> web server\
</td><td align=right>\
	<input type=checkbox class="chk" id="chkImportReport" checked\
		onClick="config.options[\'chkImportReport\']=this.checked;"> create report\
</td></tr></table>\
\
<div class="box" id="importSourcePanel" style="margin:.5em">\
<div id="importLocalPanel" style="display:block;margin-bottom:2px;"><!-- import from local file  -->\
enter or browse for source path/filename<br>\
<input type="file" id="fileImportSource" size=57 style="width:100%"\
	onKeyUp="config.macros.importTiddlers.src=this.value"\
	onChange="config.macros.importTiddlers.src=this.value;$(\'importLoad\').onclick()">\
<div id="importLocalPanelFix" style="display:none"><!-- FF3 FIXUP -->\
	<input type="text" id="fileImportSourceFix" style="width:90%"\
		title="Enter a path/file to import"\
		onKeyUp="config.macros.importTiddlers.src=this.value"\
		onChange="config.macros.importTiddlers.src=this.value; $(\'importLoad\').onclick()">\
	<input type="button" id="fileImportSourceFixButton" style="width:7%" value="..."\
		title="Select a path/file to import"\
		onClick="var r=config.macros.importTiddlers.askForFilename(this); if (!r||!r.length) return;\
			$(\'fileImportSourceFix\').value=r;\
			config.macros.importTiddlers.src=r;\
			$(\'importLoad\').onclick()">\
</div><!--end FF3 FIXUP-->\
</div><!--end local-->\
<div id="importHTTPPanel" style="display:none;margin-bottom:2px;"><!-- import from http server -->\
<table><tr><td align=left>\
	enter a URL or <a href="javascript:;" id="importSelectFeed"\
		onclick="onClickImportButton(this,event)" title="select a pre-defined \'systemServer\' URL">\
		select a server</a><br>\
</td><td align=right>\
	<input type="checkbox" class="chk" id="importUsePassword"\
		onClick="config.macros.importTiddlers.usePassword=this.checked;\
			config.macros.importTiddlers.showPanel(\'importIDPWPanel\',this.checked,true);">password\
	<input type="checkbox" class="chk" id="importUseProxy"\
		onClick="config.macros.importTiddlers.useProxy=this.checked;\
			config.macros.importTiddlers.showPanel(\'importSiteProxy\',this.checked,true);">proxy\
</td></tr></table>\
<input type="text" id="importSiteProxy" style="display:none;margin-bottom:1px" onfocus="this.select()" value="SiteProxy"\
	onKeyUp="config.macros.importTiddlers.proxy=this.value"\
	onChange="config.macros.importTiddlers.proxy=this.value;">\
<input type="text" id="importSourceURL" onfocus="this.select()" value="SiteUrl"\
	onKeyUp="config.macros.importTiddlers.src=this.value"\
	onChange="config.macros.importTiddlers.src=this.value;">\
<div id="importIDPWPanel" style="text-align:center;margin-top:2px;display:none";>\
username: <input type=text id="txtImportID" style="width:25%" \
	onChange="config.options.txtRemoteUsername=this.value;">\
 password: <input type=password id="txtImportPW" style="width:25%" \
	onChange="config.options.txtRemotePassword=this.value;">\
</div><!--end idpw-->\
</div><!--end http-->\
</div><!--end source-->\
\
<div class="box" id="importSelectPanel" style="display:none;margin:.5em;">\
<table><tr><td align=left>\
select:\
<a href="javascript:;" id="importSelectAll"\
	onclick="onClickImportButton(this);return false;" title="SELECT all tiddlers">\
	all</a>\
&nbsp;<a href="javascript:;" id="importSelectNew"\
	onclick="onClickImportButton(this);return false;" title="SELECT tiddlers not already in destination document">\
	added</a>\
&nbsp;<a href="javascript:;" id="importSelectChanges"\
	onclick="onClickImportButton(this);return false;" title="SELECT tiddlers that have been updated in source document">\
	changes</a>\
&nbsp;<a href="javascript:;" id="importSelectDifferences"\
	onclick="onClickImportButton(this);return false;" title="SELECT tiddlers that have been added or are different from existing tiddlers">\
	differences</a>\
</td><td align=right>\
<a href="javascript:;" id="importListSmaller"\
	onclick="onClickImportButton(this);return false;" title="SHRINK list size">\
	&nbsp;&#150;&nbsp;</a>\
<a href="javascript:;" id="importListLarger"\
	onclick="onClickImportButton(this);return false;" title="GROW list size">\
	&nbsp;+&nbsp;</a>\
<a href="javascript:;" id="importListMaximize"\
	onclick="onClickImportButton(this);return false;" title="MAXIMIZE/RESTORE list size">\
	&nbsp;=&nbsp;</a>\
</td></tr></table>\
<select id="importList" size=8 multiple\
	onchange="setTimeout(\'refreshImportList(\'+this.selectedIndex+\')\',1)">\
	<!-- NOTE: delay refresh so list is updated AFTER onchange event is handled -->\
</select>\
<div style="text-align:center">\
	<a href="javascript:;"\
		title="click for help using filters..."\
		onclick="alert(\'A filter consists of one or more space-separated combinations of:\\n\\ntiddler titles\\ntag:[[tagvalue]]\\ntag:[[tag expression]] (requires MatchTagsPlugin)\\nstory:[[TiddlerName]]\\nsearch:[[searchtext]]\\n\\nUse a blank filter for all tiddlers.\')"\
	>filter</a>\
	<input type="text" id="importLastFilter" style="margin-bottom:1px; width:65%"\
		title="Enter a combination of one or more filters. Use a blank filter for all tiddlers."\
		onfocus="this.select()" value=""\
		onKeyUp="config.macros.importTiddlers.lastFilter=this.value"\
		onChange="config.macros.importTiddlers.lastFilter=this.value;">\
	<input type="button" id="importApplyFilter" style="width:20%" value="apply"\
		title="filter list of tiddlers to include only those that match certain criteria"\
		onclick="onClickImportButton(this)">\
	</div>\
</div><!--end select-->\
\
<div class="box" id="importOptionsPanel" style="text-align:center;margin:.5em;display:none;">\
	apply tags: <input type=checkbox class="chk" id="chkImportTags" checked\
		onClick="config.macros.importTiddlers.importTags=this.checked;">from source&nbsp;\
	<input type=checkbox class="chk" id="chkKeepTags" checked\
		onClick="config.macros.importTiddlers.keepTags=this.checked;">keep existing&nbsp;\
	<input type=checkbox class="chk" id="chkAddTags" \
		onClick="config.macros.importTiddlers.addTags=this.checked;\
			config.macros.importTiddlers.showPanel(\'txtNewTags\',this.checked,true);\
			if (this.checked) $(\'txtNewTags\').focus();">add tags<br>\
	<input type=text id="txtNewTags" style="margin-top:4px;display:none;" size=15\ onfocus="this.select()" \
		title="enter tags to be added to imported tiddlers" \
		onKeyUp="config.macros.importTiddlers.newTags=this.value;\
		$(\'chkAddTags\').checked=this.value.length>0;" autocomplete=off>\
	<nobr><input type=checkbox class="chk" id="chkSync" \
		onClick="config.macros.importTiddlers.sync=this.checked;">\
		link imported tiddlers to source document (for sync later)</nobr>\
</div><!--end options-->\
\
<div id="importButtonPanel" style="text-align:center">\
	<input type=button id="importLoad"	class="importButton btn3" value="open"\
		title="load listbox with tiddlers from source document"\
		onclick="onClickImportButton(this)">\
	<input type=button id="importOptions"	class="importButton btn3" value="options..."\
		title="set options for tags, sync, etc."\
		onclick="onClickImportButton(this)">\
	<input type=button id="importStart"	class="importButton btn3" value="import"\
		title="start/stop import of selected source tiddlers into current document"\
		onclick="onClickImportButton(this)">\
	<input type=button id="importClose"	class="importButton btn3" value="done"\
		title="clear listbox or hide control panel"\
		onclick="onClickImportButton(this)">\
</div>\
\
<div class="none" id="importCollisionPanel" style="display:none;margin:.5em 0 .5em .5em;">\
	<table><tr><td style="width:65%" align="left">\
		<table><tr><td align=left>\
			tiddler already exists:\
		</td><td align=right>\
			<input type=checkbox class="chk" id="importApplyToAll" \
			onclick="$(\'importRename\').disabled=this.checked;"\
			checked>apply to all\
		</td></tr></table>\
		<input type=text id="importNewTitle" size=15 autocomplete=off">\
	</td><td style="width:34%" align="center">\
		<input type=button id="importMerge"\
			class="importButton" style="width:47%" value="merge"\
			title="append the incoming tiddler to the existing tiddler"\
			onclick="onClickImportButton(this)"><!--\
		--><input type=button id="importSkip"\
			class="importButton" style="width:47%" value="skip"\
			title="do not import this tiddler"\
			onclick="onClickImportButton(this)"><!--\
		--><br><input type=button id="importRename"\
			class="importButton" style="width:47%" value="rename"\
			title="rename the incoming tiddler"\
			onclick="onClickImportButton(this)"><!--\
		--><input type=button id="importReplace"\
			class="importButton" style="width:47%" value="replace"\
			title="discard the existing tiddler"\
			onclick="onClickImportButton(this)">\
	</td></tr></table>\
</div><!--end collision-->\
';
//}}}
//{{{
// process control interactions
function onClickImportButton(which,event)
{
	var cmi=config.macros.importTiddlers; // abbreviation

	var list = $('importList');
	if (!list) return;
	var thePanel = $('importPanel');
	var theCollisionPanel = $('importCollisionPanel');
	var theNewTitle = $('importNewTitle');
	var count=0;
	switch (which.id)
		{
		case 'importFromFile':	// show local panel
		case 'importFromWeb':	// show HTTP panel
			cmi.local=(which.id=='importFromFile');
			cmi.showPanel('importLocalPanel',cmi.local);
			cmi.showPanel('importHTTPPanel',!cmi.local);
			break;
		case 'importOptions':	// show/hide options panel
			cmi.showPanel('importOptionsPanel',$('importOptionsPanel').style.display=='none');
			break;
		case 'fileImportSource':
		case 'importLoad':		// load import source into hidden frame
			importReport();		// if an import was in progress, generate a report
			cmi.inbound=null;	// clear the imported tiddler buffer
			refreshImportList();	// reset/resize the listbox
			if (cmi.src=="") break;
			// Load document, read it's DOM and fill the list
			cmi.loadRemoteFile(cmi.src,cmi.filterTiddlerList);
			break;
		case 'importSelectFeed':	// select a pre-defined systemServer feed URL
			var p=Popup.create(which); if (!p) return;
			var tids=store.getTaggedTiddlers('systemServer');
			if (!tids.length)
				createTiddlyText(createTiddlyElement(p,'li'),'no pre-defined server feeds');
			for (var t=0; t<tids.length; t++) {
				var u=store.getTiddlerSlice(tids[t].title,"URL");
				var d=store.getTiddlerSlice(tids[t].title,"Description");
				if (!d||!d.length) d=store.getTiddlerSlice(tids[t].title,"description");
				if (!d||!d.length) d=u;
				createTiddlyButton(createTiddlyElement(p,'li'),tids[t].title,d,
					function(){
						var u=this.getAttribute('url');
						$('importSourceURL').value=u;
						config.macros.importTiddlers.src=u;
						$('importLoad').onclick();
					},
					null,null,null,{url:u});
			}
			Popup.show(p,false);
			event.cancelBubble = true;
			if (event.stopPropagation) event.stopPropagation();
			return(false);
			// create popup with feed list
			// onselect, insert feed URL into input field.
			break;
		case 'importSelectAll':		// select all tiddler list items (i.e., not headings)
			importReport();		// if an import was in progress, generate a report
			for (var t=0,count=0; t < list.options.length; t++) {
				if (list.options[t].value=="") continue;
				list.options[t].selected=true;
				count++;
			}
			clearMessage(); displayMessage(cmi.countMsg.format([count]));
			$('importStart').disabled=!count;
			break;
		case 'importSelectNew':		// select tiddlers not in current document
			importReport();		// if an import was in progress, generate a report
			for (var t=0,count=0; t < list.options.length; t++) {
				list.options[t].selected=false;
				if (list.options[t].value=="") continue;
				list.options[t].selected=!store.tiddlerExists(list.options[t].value);
				count+=list.options[t].selected?1:0;
			}
			clearMessage(); displayMessage(cmi.countMsg.format([count]));
			$('importStart').disabled=!count;
			break;
		case 'importSelectChanges':		// select tiddlers that are updated from existing tiddlers
			importReport();		// if an import was in progress, generate a report
			for (var t=0,count=0; t < list.options.length; t++) {
				list.options[t].selected=false;
				if (list.options[t].value==""||!store.tiddlerExists(list.options[t].value)) continue;
				for (var i=0; i<cmi.inbound.length; i++) // find matching inbound tiddler
					{ var inbound=cmi.inbound[i]; if (inbound.title==list.options[t].value) break; }
				list.options[t].selected=(inbound.modified-store.getTiddler(list.options[t].value).modified>0); // updated tiddler
				count+=list.options[t].selected?1:0;
			}
			clearMessage(); displayMessage(cmi.countMsg.format([count]));
			$('importStart').disabled=!count;
			break;
		case 'importSelectDifferences':		// select tiddlers that are new or different from existing tiddlers
			importReport();		// if an import was in progress, generate a report
			for (var t=0,count=0; t < list.options.length; t++) {
				list.options[t].selected=false;
				if (list.options[t].value=="") continue;
				if (!store.tiddlerExists(list.options[t].value)) { list.options[t].selected=true; count++; continue; }
				for (var i=0; i<cmi.inbound.length; i++) // find matching inbound tiddler
					{ var inbound=cmi.inbound[i]; if (inbound.title==list.options[t].value) break; }
				list.options[t].selected=(inbound.modified-store.getTiddler(list.options[t].value).modified!=0); // changed tiddler
				count+=list.options[t].selected?1:0;
			}
			clearMessage(); displayMessage(cmi.countMsg.format([count]));
			$('importStart').disabled=!count;
			break;
		case 'importApplyFilter':	// filter list to include only matching tiddlers
			importReport();		// if an import was in progress, generate a report
			clearMessage();
			if (!cmi.all) // no tiddlers loaded = "0 selected"
				{ displayMessage(cmi.countMsg.format([0])); return false; }
			var hash=$('importLastFilter').value;
			cmi.inbound=cmi.filterByHash("#"+hash,cmi.all);
			refreshImportList();	// reset/resize the listbox
			break;
		case 'importStart':		// initiate the import processing
			importReport();		// if an import was in progress, generate a report
			$('importApplyToAll').checked=false;
			$('importStart').value=cmi.stopText;
			if (cmi.index>0) cmi.index=-1; // stop processing
			else cmi.index=importTiddlers(0); // or begin processing
			importStopped();
			break;
		case 'importClose':		// unload imported tiddlers or hide the import control panel
			// if imported tiddlers not loaded, close the import control panel
			if (!cmi.inbound) { thePanel.style.display='none'; break; }
			importReport();		// if an import was in progress, generate a report
			cmi.inbound=null;	// clear the imported tiddler buffer
			refreshImportList();	// reset/resize the listbox
			break;
		case 'importSkip':	// don't import the tiddler
			cmi.lastAction=which;
			var theItem	= list.options[cmi.index];
			for (var j=0;j<cmi.inbound.length;j++)
			if (cmi.inbound[j].title==theItem.value) break;
			var theImported = cmi.inbound[j];
			theImported.status='skipped after asking';			// mark item as skipped
			theCollisionPanel.style.display='none';
			cmi.index=importTiddlers(cmi.index+1);	// resume with NEXT item
			importStopped();
			break;
		case 'importRename':		// change name of imported tiddler
			cmi.lastAction=which;
			var theItem		= list.options[cmi.index];
			for (var j=0;j<cmi.inbound.length;j++)
			if (cmi.inbound[j].title==theItem.value) break;
			var theImported		= cmi.inbound[j];
			theImported.status	= 'renamed from '+theImported.title;	// mark item as renamed
			theImported.set(theNewTitle.value,null,null,null,null);		// change the tiddler title
			theItem.value		= theNewTitle.value;			// change the listbox item text
			theItem.text		= theNewTitle.value;			// change the listbox item text
			theCollisionPanel.style.display='none';
			cmi.index=importTiddlers(cmi.index);	// resume with THIS item
			importStopped();
			break;
		case 'importMerge':	// join existing and imported tiddler content
			cmi.lastAction=which;
			var theItem	= list.options[cmi.index];
			for (var j=0;j<cmi.inbound.length;j++)
			if (cmi.inbound[j].title==theItem.value) break;
			var theImported	= cmi.inbound[j];
			var theExisting	= store.getTiddler(theItem.value);
			var theText	= theExisting.text+'\n----\n^^merged from: ';
			theText		+='[['+cmi.src+'#'+theItem.value+'|'+cmi.src+'#'+theItem.value+']]^^\n';
			theText		+='^^'+theImported.modified.toLocaleString()+' by '+theImported.modifier+'^^\n'+theImported.text;
			var theDate	= new Date();
			var theTags	= theExisting.getTags()+' '+theImported.getTags();
			theImported.set(null,theText,null,theDate,theTags);
			theImported.status   = 'merged with '+theExisting.title;	// mark item as merged
			theImported.status  += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");
			theImported.status  += ' by '+theExisting.modifier;
			theCollisionPanel.style.display='none';
			cmi.index=importTiddlers(cmi.index);	// resume with this item
			importStopped();
			break;
		case 'importReplace':		// substitute imported tiddler for existing tiddler
			cmi.lastAction=which;
			var theItem		  = list.options[cmi.index];
			for (var j=0;j<cmi.inbound.length;j++)
			if (cmi.inbound[j].title==theItem.value) break;
			var theImported     = cmi.inbound[j];
			var theExisting	  = store.getTiddler(theItem.value);
			theImported.status  = 'replaces '+theExisting.title;		// mark item for replace
			theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");
			theImported.status += ' by '+theExisting.modifier;
			theCollisionPanel.style.display='none';
			cmi.index=importTiddlers(cmi.index);	// resume with THIS item
			importStopped();
			break;
		case 'importListSmaller':		// decrease current listbox size, minimum=5
			if (list.options.length==1) break;
			list.size-=(list.size>5)?1:0;
			cmi.listsize=list.size;
			break;
		case 'importListLarger':		// increase current listbox size, maximum=number of items in list
			if (list.options.length==1) break;
			list.size+=(list.size<list.options.length)?1:0;
			cmi.listsize=list.size;
			break;
		case 'importListMaximize':	// toggle listbox size between current and maximum
			if (list.options.length==1) break;
			list.size=(list.size==list.options.length)?cmi.listsize:list.options.length;
			break;
		}
}
//}}}
//{{{
config.macros.importTiddlers.showPanel=function(place,show,skipAnim) {
	if (typeof place == "string") var place=$(place);
	if (!place||!place.style) return;
	if(!skipAnim && anim && config.options.chkAnimate) anim.startAnimating(new Slider(place,show,false,"none"));
	else place.style.display=show?"block":"none";
}
//}}}
//{{{
function refreshImportList(selectedIndex)
{
	var cmi=config.macros.importTiddlers; // abbreviation

	var list  = $("importList");
	if (!list) return;
	// if nothing to show, reset list content and size
	if (!cmi.inbound) 
	{
		while (list.length > 0) { list.options[0] = null; }
		list.options[0]=new Option(cmi.loadText,"",false,false);
		list.size=cmi.listsize;

		// toggle buttons and panels
		$('importLoad').disabled=false;
		$('importLoad').style.display='inline';
		$('importStart').disabled=true;
		$('importOptions').disabled=true;
		$('importOptions').style.display='none';
		$('fileImportSource').disabled=false;
		$('importFromFile').disabled=false;
		$('importFromWeb').disabled=false;
		$('importStart').value=cmi.startText;
		$('importClose').value=cmi.doneText;
		$('importSelectPanel').style.display='none';
		$('importOptionsPanel').style.display='none';
		return;
	}
	// there are inbound tiddlers loaded...
	// toggle buttons and panels
	$('importLoad').disabled=true;
	$('importLoad').style.display='none';
	$('importOptions').style.display='inline';
	$('importOptions').disabled=false;
	$('fileImportSource').disabled=true;
	$('importFromFile').disabled=true;
	$('importFromWeb').disabled=true;
	$('importClose').value=cmi.closeText;
	if ($('importSelectPanel').style.display=='none')
		cmi.showPanel('importSelectPanel',true);

	// get the sort order
	if (!selectedIndex)   selectedIndex=0;
	if (selectedIndex==0) cmi.sort='title';		// heading
	if (selectedIndex==1) cmi.sort='title';
	if (selectedIndex==2) cmi.sort='modified';
	if (selectedIndex==3) cmi.sort='tags';
	if (selectedIndex>3) {
		// display selected tiddler count
		for (var t=0,count=0; t < list.options.length; t++) {
			if (!list.options[t].selected) continue;
			if (list.options[t].value!="")
				count+=1;
			else { // if heading is selected, deselect it, and then select and count all in section
				list.options[t].selected=false;
				for ( t++; t<list.options.length && list.options[t].value!=""; t++) {
					list.options[t].selected=true;
					count++;
				}
			}
		}
		clearMessage(); displayMessage(cmi.countMsg.format([count]));
	}
	$('importStart').disabled=!count;
	if (selectedIndex>3) return; // no refresh needed

	// get the alphasorted list of tiddlers
	var tiddlers=cmi.inbound;
	tiddlers.sort(function (a,b) {if(a['title'] == b['title']) return(0); else return (a['title'] < b['title']) ? -1 : +1; });
	// clear current list contents
	while (list.length > 0) { list.options[0] = null; }
	// add heading and control items to list
	var i=0;
	var indent=String.fromCharCode(160)+String.fromCharCode(160);
	if (cmi.all.length==tiddlers.length)
		var summary=cmi.summaryMsg.format([tiddlers.length,(tiddlers.length!=1)?cmi.plural:cmi.single]);
	else
		var summary=cmi.summaryFilteredMsg.format([tiddlers.length,cmi.all.length,(cmi.all.length!=1)?cmi.plural:cmi.single]);
	list.options[i++]=new Option(summary,"",false,false);
	list.options[i++]=new Option(((cmi.sort=="title"   )?">":indent)+' [by title]',"",false,false);
	list.options[i++]=new Option(((cmi.sort=="modified")?">":indent)+' [by date]',"",false,false);
	list.options[i++]=new Option(((cmi.sort=="tags")?">":indent)+' [by tags]',"",false,false);
	// output the tiddler list
	switch(cmi.sort) {
		case "title":
			for(var t = 0; t < tiddlers.length; t++)
				list.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);
			break;
		case "modified":
			// sort descending for newest date first
			tiddlers.sort(function (a,b) {if(a['modified'] == b['modified']) return(0); else return (a['modified'] > b['modified']) ? -1 : +1; });
			var lastSection = "";
			for(var t = 0; t < tiddlers.length; t++) {
				var tiddler = tiddlers[t];
				var theSection = tiddler.modified.toLocaleDateString();
				if (theSection != lastSection) {
					list.options[i++] = new Option(theSection,"",false,false);
					lastSection = theSection;
				}
				list.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);
			}
			break;
		case "tags":
			var theTitles = {}; // all tiddler titles, hash indexed by tag value
			var theTags = new Array();
			for(var t=0; t<tiddlers.length; t++) {
				var title=tiddlers[t].title;
				var tags=tiddlers[t].tags;
				if (!tags || !tags.length) {
					if (theTitles["untagged"]==undefined) { theTags.push("untagged"); theTitles["untagged"]=new Array(); }
					theTitles["untagged"].push(title);
				}
				else for(var s=0; s<tags.length; s++) {
					if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }
					theTitles[tags[s]].push(title);
				}
			}
			theTags.sort();
			for(var tagindex=0; tagindex<theTags.length; tagindex++) {
				var theTag=theTags[tagindex];
				list.options[i++]=new Option(theTag,"",false,false);
				for(var t=0; t<theTitles[theTag].length; t++)
					list.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);
			}
			break;
		}
	list.selectedIndex=selectedIndex;		  // select current control item
	if (list.size<cmi.listsize) list.size=cmi.listsize;
	if (list.size>list.options.length) list.size=list.options.length;
}
//}}}
//{{{
// re-entrant processing for handling import with interactive collision prompting
function importTiddlers(startIndex)
{
	var cmi=config.macros.importTiddlers; // abbreviation

	if (!cmi.inbound) return -1;

	var list = $('importList');
	if (!list) return;
	var t;
	// if starting new import, reset import status flags
	if (startIndex==0)
		for (var t=0;t<cmi.inbound.length;t++)
			cmi.inbound[t].status="";
	for (var i=startIndex; i<list.options.length; i++)
		{
		// if list item is not selected or is a heading (i.e., has no value), skip it
		if ((!list.options[i].selected) || ((t=list.options[i].value)==""))
			continue;
		for (var j=0;j<cmi.inbound.length;j++)
			if (cmi.inbound[j].title==t) break;
		var inbound = cmi.inbound[j];
		var theExisting = store.getTiddler(inbound.title);
		// avoid redundant import for tiddlers that are listed multiple times (when 'by tags')
		if (inbound.status=="added")
			continue;
		// don't import the "ImportedTiddlers" history from the other document...
		if (inbound.title=='ImportedTiddlers')
			continue;
		// if tiddler exists and import not marked for replace or merge, stop importing
		if (theExisting && (inbound.status.substr(0,7)!="replace") && (inbound.status.substr(0,5)!="merge"))
			return i;
		// assemble tags (remote + existing + added)
		var newTags = "";
		if (cmi.importTags)
			newTags+=inbound.getTags()	// import remote tags
		if (cmi.keepTags && theExisting)
			newTags+=" "+theExisting.getTags(); // keep existing tags
		if (cmi.addTags && cmi.newTags.trim().length)
			newTags+=" "+cmi.newTags; // add new tags
		inbound.set(null,null,null,null,newTags.trim());
		// set the status to 'added' (if not already set by the 'ask the user' UI)
		inbound.status=(inbound.status=="")?'added':inbound.status;
		// set sync fields
		if (cmi.sync) {
			if (!inbound.fields) inbound.fields={}; // for TW2.1.x backward-compatibility
			inbound.fields["server.page.revision"]=inbound.modified.convertToYYYYMMDDHHMM();
			inbound.fields["server.type"]="file";
			inbound.fields["server.host"]=(cmi.local?"file://":"")+cmi.src;
		}
		// do the import!
		store.suspendNotifications();
		store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, inbound.tags, inbound.fields, true, inbound.created);
                store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value (needed for TW2.1.x and earlier)
		store.resumeNotifications();
		}
	return(-1);	// signals that we really finished the entire list
}
function importStopped()
{
	var cmi=config.macros.importTiddlers; // abbreviation
	var list = $('importList');
	var theNewTitle = $('importNewTitle');
	if (!list) return;
	if (cmi.index==-1){ 
		$('importStart').value=cmi.startText;
		importReport();		// import finished... generate the report
	} else {
		// import collision...
		// show the collision panel and set the title edit field
		$('importStart').value=cmi.stopText;
		cmi.showPanel('importCollisionPanel',true);
		theNewTitle.value=list.options[cmi.index].value;
		if ($('importApplyToAll').checked
			&& cmi.lastAction
			&& cmi.lastAction.id!="importRename") {
			onClickImportButton(cmi.lastAction);
		}
	}
}
//}}}
//{{{
function importReport()
{
	var cmi=config.macros.importTiddlers; // abbreviation
	if (!cmi.inbound) return;

	// if import was not completed, the collision panel will still be open... close it now.
	var panel=$('importCollisionPanel'); if (panel) panel.style.display='none';

	// get the alphasorted list of tiddlers
	var tiddlers = cmi.inbound;
	// gather the statistics
	var count=0; var total=0;
	for (var t=0; t<tiddlers.length; t++) {
		if (!tiddlers[t].status || !tiddlers[t].status.trim().length) continue;
		if (tiddlers[t].status.substr(0,7)!="skipped") count++;
		total++;
	}
	// generate a report
	if (total) displayMessage(cmi.processedMsg.format([total]));
	if (count && config.options.chkImportReport) {
		// get/create the report tiddler
		var theReport = store.getTiddler('ImportedTiddlers');
		if (!theReport) { theReport= new Tiddler(); theReport.title = 'ImportedTiddlers'; theReport.text  = ""; }
		// format the report content
		var now = new Date();
		var newText = "On "+now.toLocaleString()+", "+config.options.txtUserName
		newText +=" imported "+count+" tiddler"+(count==1?"":"s")+" from\n[["+cmi.src+"|"+cmi.src+"]]:\n";
		if (cmi.addTags && cmi.newTags.trim().length)
			newText += "imported tiddlers were tagged with: \""+cmi.newTags+"\"\n";
		newText += "<<<\n";
		for (var t=0; t<tiddlers.length; t++) if (tiddlers[t].status) newText += "#[["+tiddlers[t].title+"]] - "+tiddlers[t].status+"\n";
		newText += "<<<\n";
		// update the ImportedTiddlers content and show the tiddler
		theReport.text	 = newText+((theReport.text!="")?'\n----\n':"")+theReport.text;
		theReport.modifier = config.options.txtUserName;
		theReport.modified = new Date();
                store.saveTiddler(theReport.title, theReport.title, theReport.text, theReport.modifier, theReport.modified, theReport.tags, theReport.fields);
		story.displayTiddler(null,theReport.title,1,null,null,false);
		story.refreshTiddler(theReport.title,1,true);
	}
	// reset status flags
	for (var t=0; t<cmi.inbound.length; t++) cmi.inbound[t].status="";
	// mark document as dirty and let display update as needed
	if (count) { store.setDirty(true); store.notifyAll(); }
	// always show final message when tiddlers were actually loaded
	if (count) displayMessage(cmi.importedMsg.format([count,tiddlers.length,cmi.src.replace(/%20/g," ")]));
}
//}}}
//{{{
// // File and XMLHttpRequest I/O
config.macros.importTiddlers.askForFilename=function(here) {
	var msg=here.title; // use tooltip as dialog box message
	var path=getLocalPath(document.location.href);
	var slashpos=path.lastIndexOf("/"); if (slashpos==-1) slashpos=path.lastIndexOf("\\"); 
	if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash
	var file="";
	var result="";
	if(window.Components) { // moz
		try {
			netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');

			var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
			var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
			picker.init(window, msg, nsIFilePicker.modeOpen);
			var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
			thispath.initWithPath(path);
			picker.displayDirectory=thispath;
			picker.defaultExtension='html';
			picker.defaultString=file;
			picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
			if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;
		}
		catch(e) { alert('error during local file access: '+e.toString()) }
	}
	else { // IE
		try { // XPSP2 IE only
			var s = new ActiveXObject('UserAccounts.CommonDialog');
			s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|';
			s.FilterIndex=3; // default to HTML files;
			s.InitialDir=path;
			s.FileName=file;
			if (s.showOpen()) var result=s.FileName;
		}
		catch(e) {  // fallback
			var result=prompt(msg,path+file);
		}
	}
	return result;
}

config.macros.importTiddlers.loadRemoteFile = function(src,callback) {
	if (src==undefined || !src.length) return null; // filename is required
	var original=src; // URL as specified
	var hashpos=src.indexOf("#"); if (hashpos!=-1) src=src.substr(0,hashpos); // URL with #... suffix removed (needed for IE)
	clearMessage();
	displayMessage(this.openMsg.format([src.replace(/%20/g," ")]));
	if (src.substr(0,5)!="http:" && src.substr(0,5)!="file:") { // if not a URL, read from local filesystem
		var txt=loadFile(src);
		if (!txt) { // file didn't load, might be relative path.. try fixup
			var pathPrefix=document.location.href;  // get current document path and trim off filename
			var slashpos=pathPrefix.lastIndexOf("/"); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf("\\"); 
			if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);
			src=pathPrefix+src;
			if (pathPrefix.substr(0,5)!="http:") src=getLocalPath(src);
			var txt=loadFile(src);
		}
		if (!txt) { // file still didn't load, report error
			displayMessage(config.macros.importTiddlers.openErrMsg.format([src.replace(/%20/g," "),"(filesystem error)"]));
		} else {
			displayMessage(config.macros.importTiddlers.readMsg.format([txt.length,src.replace(/%20/g," ")]));
			if (callback) callback(true,original,convertUTF8ToUnicode(txt),src,null);
		}
	} else {
		var name=config.options.txtRemoteUsername; var pass=config.options.txtRemotePassword;
		var xhr=doHttp("GET",src,null,null,name,pass,callback,original,null)
		if (!xhr) displayMessage(config.macros.importTiddlers.openErrMsg.format([src,"(XMLHTTPRequest error)"]));
	}
}

config.macros.importTiddlers.readTiddlersFromHTML=function(html)
{
	var remoteStore=new TiddlyWiki();
	remoteStore.importTiddlyWiki(html);
	return remoteStore.getTiddlers("title");	
}

config.macros.importTiddlers.filterTiddlerList=function(success,params,txt,src,xhr) {
	var cmi=config.macros.importTiddlers; // abbreviation
	var src=src.replace(/%20/g," ");
	if (!success) { displayMessage(cmi.openErrMsg.format([src,xhr.status])); return; }
	cmi.all = cmi.readTiddlersFromHTML(txt);
	var count=cmi.all?cmi.all.length:0;
	var querypos=src.lastIndexOf("?"); if (querypos!=-1) src=src.substr(0,querypos);
	displayMessage(cmi.foundMsg.format([count,src]));
	cmi.inbound=cmi.filterByHash(params,cmi.all); // use full URL including hash (if any)
	$("importLastFilter").value=cmi.lastFilter;
	window.refreshImportList(0);
}

config.macros.importTiddlers.filterByHash=function(src,tiddlers)
{
	var hashpos=src.lastIndexOf("#"); if (hashpos==-1) return tiddlers;
	var hash=src.substr(hashpos+1); if (!hash.length) return tiddlers;
	var tids=[];
	var params=hash.parseParams("anon",null,true,false,false);
	for (var p=1; p<params.length; p++) {
		switch (params[p].name) {
			case "anon":
			case "open":
				tids.pushUnique(params[p].value);
				break;
			case "tag":
				if (store.getMatchingTiddlers) { // for boolean expressions - see MatchTagsPlugin
					var r=store.getMatchingTiddlers(params[p].value,null,tiddlers);
					for (var t=0; t<r.length; t++) tids.pushUnique(r[t].title);
				} else for (var t=0; t<tiddlers.length; t++)
					if (tiddlers[t].isTagged(params[p].value))
						tids.pushUnique(tiddlers[t].title);
				break;
			case "story":
				for (var t=0; t<tiddlers.length; t++)
					if (tiddlers[t].title==params[p].value) {
						tiddlers[t].changed();
						for (var s=0; s<tiddlers[t].links.length; s++)
							tids.pushUnique(tiddlers[t].links[s]);
						break;
					}
				break;
			case "search":
				for (var t=0; t<tiddlers.length; t++)
					if (tiddlers[t].text.indexOf(params[p].value)!=-1)
						tids.pushUnique(tiddlers[t].title);
				break;
		}
	}
	var matches=[];
	for (var t=0; t<tiddlers.length; t++)
		if (tids.contains(tiddlers[t].title))
			matches.push(tiddlers[t]);
	displayMessage(config.macros.importTiddlers.filterMsg.format([matches.length,hash]));
	config.macros.importTiddlers.lastFilter=hash;
	return matches;
}
//}}}
New stuff for today:
/%
<<include "clip.html">>
%/
/***
|''Name:''|abego.IncludePlugin|
|''Version:''|1.0.1 (2007-04-30)|
|''Type:''|plugin|
|''Source:''|http://tiddlywiki.abego-software.de/#IncludePlugin|
|''Author:''|Udo Borkowski (ub [at] abego-software [dot] de)|
|''Documentation:''|[[IncludePlugin Documentation|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]]|
|''Community:''|([[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23IncludePlugin]]) ([[Support|http://groups.google.com/group/TiddlyWiki]])|
|''Copyright:''|&copy; 2007 [[abego Software|http://www.abego-software.de]]|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''~CoreVersion:''|2.1.3|
|''Browser:''|Firefox 1.5.0.9 or better; Internet Explorer 6.0|
***/
/***
This plugin's source code is compressed (and hidden). Use this [[link|http://tiddlywiki.abego-software.de/archive/IncludePlugin/Plugin-Include-src.1.0.0.js]] to get the readable source code.
***/
///%
if(!window.abego){window.abego={};}var invokeLater=function(_1,_2,_3){return abego.invokeLater?abego.invokeLater(_1,_2,_3):setTimeout(_1,_2);};abego.loadFile=function(_4,_5,_6){var _7=function(_8,_9,_a,_b,_c){return _8?_5(_a,_b,_9):_5(undefined,_b,_9,"Error loading %0".format([_b]));};if(_4.search(/^((http(s)?)|(file)):/)!=0){if(_4.search(/^((.\:\\)|(\\\\)|(\/))/)==0){_4="file://"+_4;}else{var _d=document.location.toString();var i=_d.lastIndexOf("/");_4=_d.substr(0,i+1)+_4;}_4=_4.replace(/\\/mg,"/");}loadRemoteFile(_4,_7,_6);};abego.loadTiddlyWikiStore=function(_f,_10,_11,_12){var _13=function(_14,_15){if(_12){_12(_14,"abego.loadTiddlyWikiStore",_15,_f,_11);}};var _16=function(_17,_18){var _19=_18.indexOf(startSaveArea);var _1a=_18.indexOf("<!--POST-BODY-END--"+">");var _1b=_18.lastIndexOf(endSaveArea,_1a==-1?_18.length:_1a);if((_19==-1)||(_1b==-1)){return config.messages.invalidFileError.format([_f]);}var _1c="<html><body>"+_18.substring(_19,_1b+endSaveArea.length)+"</body></html>";var _1d=document.createElement("iframe");_1d.style.display="none";document.body.appendChild(_1d);var doc=_1d.document;if(_1d.contentDocument){doc=_1d.contentDocument;}else{if(_1d.contentWindow){doc=_1d.contentWindow.document;}}doc.open();doc.writeln(_1c);doc.close();var _1f=doc.getElementById("storeArea");_17.loadFromDiv(_1f,"store");_1d.parentNode.removeChild(_1d);return null;};var _20=function(_21){_13("Error when loading %0".format([_f]),"Failed");_10(undefined,_f,_11,_21);return _21;};var _22=function(_23){_13("Loaded %0".format([_f]),"Done");_10(_23,_f,_11);return null;};var _24=function(_25,_26,_27,_28){if(_25===undefined){_20(_28);return;}_13("Processing %0".format([_f]),"Processing");var _29=config.messages.invalidFileError;config.messages.invalidFileError="The file '%0' does not appear to be a valid TiddlyWiki file";try{var _2a=new TiddlyWiki();var _2b=_16(_2a,_25);if(_2b){_20(_2b);}else{_22(_2a);}}catch(ex){_20(exceptionText(ex));}finally{config.messages.invalidFileError=_29;}};_13("Start loading %0".format([_f]),"Started");abego.loadFile(_f,_24,_11);};(function(){if(abego.TiddlyWikiIncluder){return;}var _2c="waiting";var _2d="loading";var _2e=1000;var _2f=-200;var _30=-100;var _31=-300;var _32;var _33=[];var _34={};var _35=[];var _36;var _37=[];var _38;var _39=function(){if(_32===undefined){_32=config.options.chkUseInclude===undefined||config.options.chkUseInclude;}return _32;};var _3a=function(url){return "No include specified for %0".format([url]);};var _3c=function(){var _3d=_35;_35=[];if(_3d.length){for(var i=0;i<_37.length;i++){_37[i](_3d);}}};var _3f;var _40=function(){if(_36!==undefined){clearInterval(_36);}_3f=0;var _41=function(){abego.TiddlyWikiIncluder.sendProgress("","","Done");};_36=setInterval(function(){_3f++;if(_3f<=10){return;}clearInterval(_36);_36=undefined;abego.TiddlyWikiIncluder.sendProgress("Refreshing...","","");refreshDisplay();invokeLater(_41,0,_2f);},1);};var _42=function(_43){var _44;for(var i=0;i<_33.length;i++){var _46=abego.TiddlyWikiIncluder.getStore(_33[i]);if(_46&&(_44=_43(_46,_33[i]))){return _44;}}};var _47=function(){if(!window.store){return invokeLater(_47,100);}var _48=store.fetchTiddler;store.fetchTiddler=function(_49){var t=_48.apply(this,arguments);if(t){return t;}if(config.shadowTiddlers[_49]!==undefined){return undefined;}if(_49==config.macros.newTiddler.title){return undefined;}return _42(function(_4b,url){var t=_4b.fetchTiddler(_49);if(t){t.includeURL=url;}return t;});};if(_33.length){_40();}};var _4e=function(){if(!window.store){return invokeLater(_4e,100);}var _4f=store.getTiddlerText("IncludeList");if(_4f){wikify(_4f,document.createElement("div"));}};var _50=function(_51){var _52=function(){var _53=store.forEachTiddler;var _54=function(_55){var _56={};var _57;var _58=function(_59,_5a){if(_56[_59]){return;}_56[_59]=1;if(_57){_5a.includeURL=_57;}_55.apply(this,arguments);};_53.call(store,_58);for(var n in config.shadowTiddlers){_56[n]=1;}_56[config.macros.newTiddler.title]=1;_42(function(_5c,url){_57=url;_5c.forEachTiddler(_58);});};store.forEachTiddler=_54;try{return _51.apply(this,arguments);}finally{store.forEachTiddler=_53;}};return _52;};var _5e=function(_5f,_60){return _5f[_60]=_50(_5f[_60]);};abego.TiddlyWikiIncluder={};abego.TiddlyWikiIncluder.setProgressFunction=function(_61){_38=_61;};abego.TiddlyWikiIncluder.getProgressFunction=function(_62){return _38;};abego.TiddlyWikiIncluder.sendProgress=function(_63,_64,_65){if(_38){_38.apply(this,arguments);}};abego.TiddlyWikiIncluder.onError=function(url,_67){displayMessage("Error when including '%0':\n%1".format([url,_67]));};abego.TiddlyWikiIncluder.hasPendingIncludes=function(){for(var i=0;i<_33.length;i++){var _69=abego.TiddlyWikiIncluder.getState(_33[i]);if(_69==_2c||_69==_2d){return true;}}return false;};abego.TiddlyWikiIncluder.getIncludes=function(){return _33.slice();};abego.TiddlyWikiIncluder.getState=function(url){var s=_34[url];if(!s){return _3a(url);}return typeof s=="string"?s:null;};abego.TiddlyWikiIncluder.getStore=function(url){var s=_34[url];if(!s){return _3a(url);}return s instanceof TiddlyWiki?s:null;};abego.TiddlyWikiIncluder.include=function(url,_6f){if(!_39()||_34[url]){return;}var _70=this;_33.push(url);_34[url]=_2c;var _71=function(_72,_73,_74,_75){if(_72===undefined){_34[url]=_75;_70.onError(url,_75);return;}_34[url]=_72;_35.push(url);invokeLater(_3c);};var _76=function(){_34[url]=_2d;abego.loadTiddlyWikiStore(url,_71,null,_38);};if(_6f){invokeLater(_76,_6f);}else{_76();}};abego.TiddlyWikiIncluder.forReallyEachTiddler=function(_77){var _78=function(){store.forEachTiddler(_77);};_50(_78).call(store);};abego.TiddlyWikiIncluder.getFunctionUsingForReallyEachTiddler=_50;abego.TiddlyWikiIncluder.useForReallyEachTiddler=_5e;abego.TiddlyWikiIncluder.addListener=function(_79){_37.push(_79);};abego.TiddlyWikiIncluder.addListener(_40);if(config.options.chkUseInclude===undefined){config.options.chkUseInclude=true;}config.shadowTiddlers.AdvancedOptions+="\n<<option chkUseInclude>> Include ~TiddlyWikis (IncludeList | IncludeState | [[help|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]])\n^^(Reload this ~TiddlyWiki to make changes become effective)^^";config.shadowTiddlers.IncludeState="<<includeState>>";var _7a=function(e,_7c,_7d){if(!anim||!abego.ShowAnimation){e.style.display=_7c?"block":"none";return;}anim.startAnimating(new abego.ShowAnimation(e,_7c,_7d));};abego.TiddlyWikiIncluder.getDefaultProgressFunction=function(){setStylesheet(".includeProgressState{\n"+"background-color:#FFCC00;\n"+"position:absolute;\n"+"right:0.2em;\n"+"top:0.2em;\n"+"width:7em;\n"+"padding-left:0.2em;\n"+"padding-right:0.2em\n"+"}\n","abegoInclude");var _7e=function(){var e=document.createElement("div");e.className="includeProgressState";e.style.display="none";document.body.appendChild(e);return e;};var _80=_7e();var _81=function(_82){removeChildren(_80);createTiddlyText(_80,_82);_7a(_80,true,0);};var _83=function(){invokeLater(function(){_7a(_80,false,_2e);},100,_30);};var _84=function(_85,_86,_87,url,_89){if(_87=="Done"||_87=="Failed"){_83();return;}if(_86=="abego.loadTiddlyWikiStore"){_3f=0;if(_87=="Processing"){_81("Including...");}}else{_81(_85);}};return _84;};abego.TiddlyWikiIncluder.setProgressFunction(abego.TiddlyWikiIncluder.getDefaultProgressFunction());config.macros.include={};config.macros.include.handler=function(_8a,_8b,_8c,_8d,_8e,_8f){_8c=_8e.parseParams("url",null,true,false,true);var _90=parseInt(getParam(_8c,"delay","0"));var _91=_8c[0]["url"];var _92=getFlag(_8c,"hide",false);if(!_92){createTiddlyText(createTiddlyElement(_8a,"code"),_8d.source.substring(_8d.matchStart,_8d.nextMatch));}for(var i=0;_91&&i<_91.length;i++){abego.TiddlyWikiIncluder.include(_91[i],_90);}};config.macros.includeState={};config.macros.includeState.handler=function(_94,_95,_96,_97,_98,_99){var _9a=function(){var s="";var _9c=abego.TiddlyWikiIncluder.getIncludes();if(!_9c.length){return "{{noIncludes{\nNo includes or 'include' is disabled (see AdvancedOptions)\n}}}\n";}s+="|!Address|!State|\n";for(var i=0;i<_9c.length;i++){var inc=_9c[i];s+="|{{{"+inc+"}}}|";var t=abego.TiddlyWikiIncluder.getState(inc);s+=t?"{{{"+t+"}}}":"included";s+="|\n";}s+="|includeState|k\n";return s;};var _a0=function(){removeChildren(div);wikify(_9a(),div);if(abego.TiddlyWikiIncluder.hasPendingIncludes()){invokeLater(_a0,500,_31);}};var div=createTiddlyElement(_94,"div");invokeLater(_a0,0,_31);};var _a2=Tiddler.prototype.isReadOnly;Tiddler.prototype.isReadOnly=function(){return _a2.apply(this,arguments)||this.isIncluded();};Tiddler.prototype.isIncluded=function(){return this.includeURL!=undefined;};Tiddler.prototype.getIncludeURL=function(){return this.includeURL;};var _a3={getMissingLinks:1,getOrphans:1,getTags:1,reverseLookup:1,updateTiddlers:1};for(var n in _a3){_5e(TiddlyWiki.prototype,n);}var _a5=function(){if(abego.IntelliTagger){_5e(abego.IntelliTagger,"assistTagging");}};var _a6=function(){if(config.macros.forEachTiddler){_5e(config.macros.forEachTiddler,"findTiddlers");}};_47();invokeLater(_4e,100);invokeLater(_a5,100);invokeLater(_a6,100);})();
//%/
/***
|''Name:''|IncludeSiteLinkMacro|
|''Version:''|0.1.1 (2007-05-15)|
|''Requires:''|[[IncludePlugin]]|
|''Author:''|KuRaKu (kuraku.net@gmail.com)|

!!IncludePlugin Licence & Version
|''Name:''|abego.IncludePlugin|
|''Version:''|1.0.1 (2007-04-30)|
|''Type:''|plugin|
|''Source:''|http://tiddlywiki.abego-software.de/#IncludePlugin|
|''Author:''|Udo Borkowski (ub [at] abego-software [dot] de)|
|''Documentation:''|[[IncludePlugin Documentation|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]]|
|''Community:''|([[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23IncludePlugin]]) ([[Support|http://groups.google.com/group/TiddlyWiki]])|
|''Copyright:''|&copy; 2007 [[abego Software|http://www.abego-software.de]]|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''~CoreVersion:''|2.1.3|
|''Browser:''|Firefox 1.5.0.9 or better; Internet Explorer 6.0|

!!install
exp.
{{{
<div><span class="title" macro="view title"></span><span style="font-size: 0.8em; padding-left:2em;" macro="includeSiteLink"></span></div>
}}}

!!configuration
Please change {{{config.macros.includeSiteLink.sitelist}}} and {{{config.macros.includeSiteLink.template}}}.

!!Source
***/
/*{{{*/
config.macros.includeSiteLink = {};
config.macros.includeSiteLink.sitelist = 
[
  {match: /tw\.html$/,  name:"KuRaKu TiddlyWiki 備忘録", url:"tw.html"},
  {match: /clip\.html$/, name:"KRK CLip よしなしこと、", url:"clip.html"}
];
config.macros.includeSiteLink.template = "(include from %0)";

config.macros.includeSiteLink.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
  if(!tiddler.isIncluded)
    return;

  if(tiddler.isIncluded()){
    var url = tiddler.getIncludeURL();
    var name = "<i>other site</i>";
    var site = "";

    for(var i=0;i<this.sitelist.length;i++){
      if( url.match(this.sitelist[i].match) ){
        if(this.sitelist[i].name && this.sitelist[i].name != "")
          name = this.sitelist[i].name;
        if(this.sitelist[i].url && this.sitelist[i].url != "")
          site = this.sitelist[i].url;
        break;
      }
    }
    var e = createTiddlyElement(place, "span");
    var link = (site=="")?name:"<a href=\""+site+"\">"+name+"</a>";
    e.setAttribute("refresh","macro");
    e.innerHTML = this.template.format([link]);
  }
};
/*}}}*/
/***
|''Name:''|IncludedTiddlerLinkPlugin|
|''Version:''|0.1.0 (2007-05-16)|
|''Author:''|KuRaKu (kuraku.net@gmail.com)|
|''Requires:''|[[IncludePlugin]]|
|''override:''|getTiddlyLinkInfo()|

!!IncludePlugin Licence & Version
|''Name:''|abego.IncludePlugin|
|''Version:''|1.0.1 (2007-04-30)|
|''Type:''|plugin|
|''Source:''|http://tiddlywiki.abego-software.de/#IncludePlugin|
|''Author:''|Udo Borkowski (ub [at] abego-software [dot] de)|
|''Documentation:''|[[IncludePlugin Documentation|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]]|
|''Community:''|([[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23IncludePlugin]]) ([[Support|http://groups.google.com/group/TiddlyWiki]])|
|''Copyright:''|&copy; 2007 [[abego Software|http://www.abego-software.de]]|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''~CoreVersion:''|2.1.3|
|''Browser:''|Firefox 1.5.0.9 or better; Internet Explorer 6.0|

!!Description
Class is defined in the link of Included tiddler. 
The class name is tiddlyLinkInclluded. 

!![[StyleSheet]] example
{{{
.tiddlyLinkIncluded {
	color: #369;
	font-style: italic;
	font-weight: normal;
}
}}}

!!Source
***/
/*{{{*/
function getTiddlyLinkInfo(title,currClasses)
{
	var classes = currClasses ? currClasses.split(" ") : [];
	classes.pushUnique("tiddlyLink");
	var tiddler = store.fetchTiddler(title);
	var subTitle;
	if(tiddler)
		{
		subTitle = tiddler.getSubtitle();
		if(tiddler.isIncluded && tiddler.isIncluded() == true){
			classes.remove("tiddlyLinkExisting");
			classes.remove("tiddlyLinkNonExisting");
			classes.pushUnique("tiddlyLinkIncluded");
		}else{
			classes.pushUnique("tiddlyLinkExisting");
			classes.remove("tiddlyLinkNonExisting");
			classes.remove("tiddlyLinkIncluded");
		}
		classes.remove("shadow");
		}
	else
		{
		classes.remove("tiddlyLinkExisting");
		classes.pushUnique("tiddlyLinkNonExisting");
		classes.remove("tiddlyLinkIncluded");
		if(store.isShadowTiddler(title))
			{
			subTitle = config.messages.shadowedTiddlerToolTip.format([title]);
			classes.pushUnique("shadow");
			}
		else
			{
			subTitle = config.messages.undefinedTiddlerToolTip.format([title]);
			classes.remove("shadow");
			}
		}
	return {classes: classes.join(" "), subTitle: subTitle};
}

/*}}}*/
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2008.06.11 [1.9.3] added $(...) function as 'shorthand' convenience syntax for document.getElementById()
2008.03.03 [1.9.2] corrected declaration of wikifyPlainText() for 'TW 2.1.x compatibility fallback' (fixes Safari "parse error")
2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' attribute on link element (fixes IE errors)
2008.02.21 [1.9.0] 'onclick' scripts now allow returned text (or document.write() calls) to be wikified into a span that immediately follows the onclick link.  Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed).  Thanks to Xavier Verges for suggestion and preliminary code.
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 3, date: new Date(2008,6,11)};

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

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

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

// // $(...) function: 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=="undefined") { // avoid redefinition
function $() {
	var elements=new Array();
	for (var i=0; i<arguments.length; i++) {
		var element=arguments[i];
		if (typeof element=='string') element=document.getElementById(element);
		if (arguments.length==1) return element;
		elements.push(element);
	}
	return elements;
}
}
//}}}
<!--{{{-->
<div class='title' macro='view title'></div>
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<div class='viewer' macro='view text wikified'></div>
<!--}}}-->
/***
|''Name:''|IntelliTaggerPlugin|
|''Version:''|1.0.1 (2007-05-18)|
|''Type:''|plugin|
|''Source:''|http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin|
|''Author:''|Udo Borkowski (ub [at] abego-software [dot] de)|
|''Documentation:''|[[IntelliTaggerPlugin Documentation]]|
|''~SourceCode:''|[[IntelliTaggerPlugin SourceCode]]|
|''Licence:''|[[BSD open source license (abego Software)]]|
|''~CoreVersion:''|2.0.8|
|''Browser:''|Firefox 1.5.0.2 or better|
***/
// /%
if(!version.extensions.IntelliTaggerPlugin){
if(!window.abego){
window.abego={};
}
if(!abego.internal){
abego.internal={};
}
abego.alertAndThrow=function(s){
alert(s);
throw s;
};
if(version.major<2){
abego.alertAndThrow("Use TiddlyWiki 2.0.8 or better to run the IntelliTagger Plugin.");
}
version.extensions.IntelliTaggerPlugin={major:1,minor:0,revision:1,date:new Date(2007,4,18),type:"plugin",source:"http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin",documentation:"[[IntelliTaggerPlugin Documentation]]",sourcecode:"[[IntelliTaggerPlugin SourceCode]]",author:"Udo Borkowski (ub [at] abego-software [dot] de)",licence:"[[BSD open source license (abego Software)]]",tiddlywiki:"Version 2.0.8 or better",browser:"Firefox 1.5.0.2 or better"};
abego.createEllipsis=function(_2){
var e=createTiddlyElement(_2,"span");
e.innerHTML="&hellip;";
};
abego.isPopupOpen=function(_4){
return _4&&_4.parentNode==document.body;
};
abego.openAsPopup=function(_5){
if(_5.parentNode!=document.body){
document.body.appendChild(_5);
}
};
abego.closePopup=function(_6){
if(abego.isPopupOpen(_6)){
document.body.removeChild(_6);
}
};
abego.getWindowRect=function(){
return {left:findScrollX(),top:findScrollY(),height:findWindowHeight(),width:findWindowWidth()};
};
abego.moveElement=function(_7,_8,_9){
_7.style.left=_8+"px";
_7.style.top=_9+"px";
};
abego.centerOnWindow=function(_a){
if(_a.style.position!="absolute"){
throw "abego.centerOnWindow: element must have absolute position";
}
var _b=abego.getWindowRect();
abego.moveElement(_a,_b.left+(_b.width-_a.offsetWidth)/2,_b.top+(_b.height-_a.offsetHeight)/2);
};
abego.isDescendantOrSelf=function(_c,e){
while(e){
if(_c==e){
return true;
}
e=e.parentNode;
}
return false;
};
abego.toSet=function(_e){
var _f={};
for(var i=0;i<_e.length;i++){
_f[_e[i]]=true;
}
return _f;
};
abego.filterStrings=function(_11,_12,_13){
var _14=[];
for(var i=0;i<_11.length&&(_13===undefined||_14.length<_13);i++){
var s=_11[i];
if(s.match(_12)){
_14.push(s);
}
}
return _14;
};
abego.arraysAreEqual=function(a,b){
if(!a){
return !b;
}
if(!b){
return false;
}
var n=a.length;
if(n!=b.length){
return false;
}
for(var i=0;i<n;i++){
if(a[i]!=b[i]){
return false;
}
}
return true;
};
abego.moveBelowAndClip=function(_1b,_1c){
if(!_1c){
return;
}
var _1d=findPosX(_1c);
var _1e=findPosY(_1c);
var _1f=_1c.offsetHeight;
var _20=_1d;
var _21=_1e+_1f;
var _22=findWindowWidth();
if(_22<_1b.offsetWidth){
_1b.style.width=(_22-100)+"px";
}
var _23=_1b.offsetWidth;
if(_20+_23>_22){
_20=_22-_23-30;
}
if(_20<0){
_20=0;
}
_1b.style.left=_20+"px";
_1b.style.top=_21+"px";
_1b.style.display="block";
};
abego.compareStrings=function(a,b){
return (a==b)?0:(a<b)?-1:1;
};
abego.sortIgnoreCase=function(arr){
var _27=[];
var n=arr.length;
for(var i=0;i<n;i++){
var s=arr[i];
_27.push([s.toString().toLowerCase(),s]);
}
_27.sort(function(a,b){
return (a[0]==b[0])?0:(a[0]<b[0])?-1:1;
});
for(i=0;i<n;i++){
arr[i]=_27[i][1];
}
};
abego.getTiddlerField=function(_2d,_2e,_2f){
var _30=document.getElementById(_2d.idPrefix+_2e);
var e=null;
if(_30!=null){
var _32=_30.getElementsByTagName("*");
for(var t=0;t<_32.length;t++){
var c=_32[t];
if(c.tagName.toLowerCase()=="input"||c.tagName.toLowerCase()=="textarea"){
if(!e){
e=c;
}
if(c.getAttribute("edit")==_2f){
e=c;
}
}
}
}
return e;
};
abego.setRange=function(_35,_36,end){
if(_35.setSelectionRange){
_35.setSelectionRange(_36,end);
var max=0+_35.scrollHeight;
var len=_35.textLength;
var top=max*_36/len,bot=max*end/len;
_35.scrollTop=Math.min(top,(bot+top-_35.clientHeight)/2);
}else{
if(_35.createTextRange!=undefined){
var _3b=_35.createTextRange();
_3b.collapse();
_3b.moveEnd("character",end);
_3b.moveStart("character",_36);
_3b.select();
}else{
_35.select();
}
}
};
abego.internal.TagManager=function(){
var _3c=null;
var _3d=function(){
if(_3c){
return;
}
_3c={};
store.forEachTiddler(function(_3e,_3f){
for(var i=0;i<_3f.tags.length;i++){
var tag=_3f.tags[i];
var _42=_3c[tag];
if(!_42){
_42=_3c[tag]={count:0,tiddlers:{}};
}
_42.tiddlers[_3f.title]=true;
_42.count+=1;
}
});
};
var _43=TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler=function(_44,_45,_46,_47,_48,_49){
var _4a=this.fetchTiddler(_44);
var _4b=_4a?_4a.tags:[];
var _4c=(typeof _49=="string")?_49.readBracketedList():_49;
_43.apply(this,arguments);
if(!abego.arraysAreEqual(_4b,_4c)){
abego.internal.getTagManager().reset();
}
};
var _4d=TiddlyWiki.prototype.removeTiddler;
TiddlyWiki.prototype.removeTiddler=function(_4e){
var _4f=this.fetchTiddler(_4e);
var _50=_4f&&_4f.tags.length>0;
_4d.apply(this,arguments);
if(_50){
abego.internal.getTagManager().reset();
}
};
this.reset=function(){
_3c=null;
};
this.getTiddlersWithTag=function(tag){
_3d();
var _52=_3c[tag];
return _52?_52.tiddlers:null;
};
this.getAllTags=function(_53){
_3d();
var _54=[];
for(var i in _3c){
_54.push(i);
}
for(i=0;_53&&i<_53.length;i++){
_54.pushUnique(_53[i],true);
}
abego.sortIgnoreCase(_54);
return _54;
};
this.getTagInfos=function(){
_3d();
var _56=[];
for(var _57 in _3c){
_56.push([_57,_3c[_57]]);
}
return _56;
};
var _58=function(a,b){
var a1=a[1];
var b1=b[1];
var d=b[1].count-a[1].count;
return d!=0?d:abego.compareStrings(a[0].toLowerCase(),b[0].toLowerCase());
};
this.getSortedTagInfos=function(){
_3d();
var _5e=this.getTagInfos();
_5e.sort(_58);
return _5e;
};
this.getPartnerRankedTags=function(_5f){
var _60={};
for(var i=0;i<_5f.length;i++){
var _62=this.getTiddlersWithTag(_5f[i]);
for(var _63 in _62){
var _64=store.getTiddler(_63);
if(!(_64 instanceof Tiddler)){
continue;
}
for(var j=0;j<_64.tags.length;j++){
var tag=_64.tags[j];
var c=_60[tag];
_60[tag]=c?c+1:1;
}
}
}
var _68=abego.toSet(_5f);
var _69=[];
for(var n in _60){
if(!_68[n]){
_69.push(n);
}
}
_69.sort(function(a,b){
var d=_60[b]-_60[a];
return d!=0?d:abego.compareStrings(a.toLowerCase(),b.toLowerCase());
});
return _69;
};
};
abego.internal.getTagManager=function(){
if(!abego.internal.gTagManager){
abego.internal.gTagManager=new abego.internal.TagManager();
}
return abego.internal.gTagManager;
};
(function(){
var _6e=2;
var _6f=1;
var _70=30;
var _71;
var _72;
var _73;
var _74;
var _75;
var _76;
if(!abego.IntelliTagger){
abego.IntelliTagger={};
}
var _77=function(){
return _72;
};
var _78=function(tag){
return _75[tag];
};
var _7a=function(s){
var i=s.lastIndexOf(" ");
return (i>=0)?s.substr(0,i):"";
};
var _7d=function(_7e){
var s=_7e.value;
var len=s.length;
return (len>0&&s[len-1]!=" ");
};
var _81=function(_82){
var s=_82.value;
var len=s.length;
if(len>0&&s[len-1]!=" "){
_82.value+=" ";
}
};
var _85=function(tag,_87,_88){
if(_7d(_87)){
_87.value=_7a(_87.value);
}
story.setTiddlerTag(_88.title,tag,0);
_81(_87);
abego.IntelliTagger.assistTagging(_87,_88);
};
var _89=function(n){
if(_76){
if(_76.length>n){
return _76[n];
}
n-=_76.length;
}
return (_74&&_74.length>n)?_74[n]:null;
};
var _8b=function(n,_8d,_8e){
var _8f=_89(n);
if(_8f){
_85(_8f,_8d,_8e);
}
};
var _90=function(_91){
var pos=_91.value.lastIndexOf(" ");
var _93=(pos>=0)?_91.value.substr(++pos,_91.value.length):_91.value;
return new RegExp(_93.escapeRegExp(),"i");
};
var _94=function(_95,_96){
var _97=0;
for(var i=0;i<_95.length;i++){
if(_96[_95[i]]){
_97++;
}
}
return _97;
};
var _99=function(_9a,_9b,_9c){
var _9d=1;
var c=_9a[_9b];
for(var i=_9b+1;i<_9a.length;i++){
if(_9a[i][1].count==c){
if(_9a[i][0].match(_9c)){
_9d++;
}
}else{
break;
}
}
return _9d;
};
var _a0=function(_a1,_a2){
var _a3=abego.internal.getTagManager().getSortedTagInfos();
var _a4=[];
var _a5=0;
for(var i=0;i<_a3.length;i++){
var c=_a3[i][1].count;
if(c!=_a5){
if(_a2&&(_a4.length+_99(_a3,i,_a1)>_a2)){
break;
}
_a5=c;
}
if(c==1){
break;
}
var s=_a3[i][0];
if(s.match(_a1)){
_a4.push(s);
}
}
return _a4;
};
var _a9=function(_aa,_ab){
return abego.filterStrings(abego.internal.getTagManager().getAllTags(_ab),_aa);
};
var _ac=function(){
if(!_71){
return;
}
var _ad=store.getTiddlerText("IntelliTaggerMainTemplate");
if(!_ad){
_ad="<b>Tiddler IntelliTaggerMainTemplate not found</b>";
}
_71.innerHTML=_ad;
applyHtmlMacros(_71,null);
refreshElements(_71,null);
};
var _ae=function(e){
if(!e){
var e=window.event;
}
var tag=this.getAttribute("tag");
if(_73){
_73.call(this,tag,e);
}
return false;
};
var _b2=function(_b3){
createTiddlyElement(_b3,"span",null,"tagSeparator"," | ");
};
var _b4=function(_b5,_b6,_b7,_b8,_b9){
if(!_b6){
return;
}
var _ba=_b8?abego.toSet(_b8):{};
var n=_b6.length;
var c=0;
for(var i=0;i<n;i++){
var tag=_b6[i];
if(_ba[tag]){
continue;
}
if(c>0){
_b2(_b5);
}
if(_b9&&c>=_b9){
abego.createEllipsis(_b5);
break;
}
c++;
var _bf="";
var _c0=_b5;
if(_b7<10){
_c0=createTiddlyElement(_b5,"span",null,"numberedSuggestion");
_b7++;
var key=_b7<10?""+(_b7):"0";
createTiddlyElement(_c0,"span",null,"suggestionNumber",key+") ");
var _c2=_b7==1?"Ctrl-Space or ":"";
_bf=" (Shortcut: %1Alt-%0)".format([key,_c2]);
}
var _c3=config.views.wikified.tag.tooltip.format([tag]);
var _c4=(_78(tag)?"Remove tag '%0'%1":"Add tag '%0'%1").format([tag,_bf]);
var _c5="%0; Shift-Click: %1".format([_c4,_c3]);
var btn=createTiddlyButton(_c0,tag,_c5,_ae,_78(tag)?"currentTag":null);
btn.setAttribute("tag",tag);
}
};
var _c7=function(){
if(_71){
window.scrollTo(0,ensureVisible(_71));
}
if(_77()){
window.scrollTo(0,ensureVisible(_77()));
}
};
var _c8=function(e){
if(!e){
var e=window.event;
}
if(!_71){
return;
}
var _cb=resolveTarget(e);
if(_cb==_77()){
return;
}
if(abego.isDescendantOrSelf(_71,_cb)){
return;
}
abego.IntelliTagger.close();
};
addEvent(document,"click",_c8);
var _cc=Story.prototype.gatherSaveFields;
Story.prototype.gatherSaveFields=function(e,_ce){
_cc.apply(this,arguments);
var _cf=_ce.tags;
if(_cf){
_ce.tags=_cf.trim();
}
};
var _d0=function(_d1){
story.focusTiddler(_d1,"tags");
var _d2=abego.getTiddlerField(story,_d1,"tags");
if(_d2){
var len=_d2.value.length;
abego.setRange(_d2,len,len);
window.scrollTo(0,ensureVisible(_d2));
}
};
var _d4=config.macros.edit.handler;
config.macros.edit.handler=function(_d5,_d6,_d7,_d8,_d9,_da){
_d4.apply(this,arguments);
var _db=_d7[0];
if((_da instanceof Tiddler)&&_db=="tags"){
var _dc=_d5.lastChild;
_dc.onfocus=function(e){
abego.IntelliTagger.assistTagging(_dc,_da);
setTimeout(function(){
_d0(_da.title);
},100);
};
_dc.onkeyup=function(e){
if(!e){
var e=window.event;
}
if(e.altKey&&!e.ctrlKey&&!e.metaKey&&(e.keyCode>=48&&e.keyCode<=57)){
_8b(e.keyCode==48?9:e.keyCode-49,_dc,_da);
}else{
if(e.ctrlKey&&e.keyCode==32){
_8b(0,_dc,_da);
}
}
setTimeout(function(){
abego.IntelliTagger.assistTagging(_dc,_da);
},100);
return false;
};
_81(_dc);
}
};
var _e0=function(e){
if(!e){
var e=window.event;
}
var _e3=resolveTarget(e);
var _e4=_e3.getAttribute("tiddler");
if(_e4){
story.displayTiddler(_e3,_e4,"IntelliTaggerEditTagsTemplate",false);
_d0(_e4);
}
return false;
};
var _e5=config.macros.tags.handler;
config.macros.tags.handler=function(_e6,_e7,_e8,_e9,_ea,_eb){
_e5.apply(this,arguments);
abego.IntelliTagger.createEditTagsButton(_eb,createTiddlyElement(_e6.lastChild,"li"));
};
var _ec=function(){
if(_71&&_72&&!abego.isDescendantOrSelf(document,_72)){
abego.IntelliTagger.close();
}
};
setInterval(_ec,100);
abego.IntelliTagger.displayTagSuggestions=function(_ed,_ee,_ef,_f0,_f1){
_74=_ed;
_75=abego.toSet(_ee);
_76=_ef;
_72=_f0;
_73=_f1;
if(!_71){
_71=createTiddlyElement(document.body,"div",null,"intelliTaggerSuggestions");
_71.style.position="absolute";
}
_ac();
abego.openAsPopup(_71);
if(_77()){
var w=_77().offsetWidth;
if(_71.offsetWidth<w){
_71.style.width=(w-2*(_6e+_6f))+"px";
}
abego.moveBelowAndClip(_71,_77());
}else{
abego.centerOnWindow(_71);
}
_c7();
};
abego.IntelliTagger.assistTagging=function(_f3,_f4){
var _f5=_90(_f3);
var s=_f3.value;
if(_7d(_f3)){
s=_7a(s);
}
var _f7=s.readBracketedList();
var _f8=_f7.length>0?abego.filterStrings(abego.internal.getTagManager().getPartnerRankedTags(_f7),_f5,_70):_a0(_f5,_70);
abego.IntelliTagger.displayTagSuggestions(_a9(_f5,_f7),_f7,_f8,_f3,function(tag,e){
if(e.shiftKey){
onClickTag.call(this,e);
}else{
_85(tag,_f3,_f4);
}
});
};
abego.IntelliTagger.close=function(){
abego.closePopup(_71);
_71=null;
return false;
};
abego.IntelliTagger.createEditTagsButton=function(_fb,_fc,_fd,_fe,_ff,id,_101){
if(!_fd){
_fd="[edit]";
}
if(!_fe){
_fe="Edit the tags";
}
if(!_ff){
_ff="editTags";
}
var _102=createTiddlyButton(_fc,_fd,_fe,_e0,_ff,id,_101);
_102.setAttribute("tiddler",(_fb instanceof Tiddler)?_fb.title:String(_fb));
return _102;
};
abego.IntelliTagger.getSuggestionTagsMaxCount=function(){
return 100;
};
config.macros.intelliTagger={label:"intelliTagger",handler:function(_103,_104,_105,_106,_107,_108){
var _109=_107.parseParams("list",null,true);
var _10a=_109[0]["action"];
for(var i=0;_10a&&i<_10a.length;i++){
var _10c=_10a[i];
var _10d=config.macros.intelliTagger.subhandlers[_10c];
if(!_10d){
abego.alertAndThrow("Unsupported action '%0'".format([_10c]));
}
_10d(_103,_104,_105,_106,_107,_108);
}
},subhandlers:{showTags:function(_10e,_10f,_110,_111,_112,_113){
_b4(_10e,_74,_76?_76.length:0,_76,abego.IntelliTagger.getSuggestionTagsMaxCount());
},showFavorites:function(_114,_115,_116,_117,_118,_119){
_b4(_114,_76,0);
},closeButton:function(_11a,_11b,_11c,_11d,_11e,_11f){
var _120=createTiddlyButton(_11a,"close","Close the suggestions",abego.IntelliTagger.close);
},version:function(_121){
var t="IntelliTagger %0.%1.%2".format([version.extensions.IntelliTaggerPlugin.major,version.extensions.IntelliTaggerPlugin.minor,version.extensions.IntelliTaggerPlugin.revision]);
var e=createTiddlyElement(_121,"a");
e.setAttribute("href","http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin");
e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">"+t+"<font>";
},copyright:function(_124){
var e=createTiddlyElement(_124,"a");
e.setAttribute("href","http://tiddlywiki.abego-software.de");
e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">&copy; 2006-2007 <b><font color=\"red\">abego</font></b> Software<font>";
}}};
})();
config.shadowTiddlers["IntelliTaggerStyleSheet"]="/***\n"+"!~IntelliTagger Stylesheet\n"+"***/\n"+"/*{{{*/\n"+".intelliTaggerSuggestions {\n"+"\tposition: absolute;\n"+"\twidth: 600px;\n"+"\n"+"\tpadding: 2px;\n"+"\tlist-style: none;\n"+"\tmargin: 0;\n"+"\n"+"\tbackground: #eeeeee;\n"+"\tborder: 1px solid DarkGray;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .currentTag   {\n"+"\tfont-weight: bold;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .suggestionNumber {\n"+"\tcolor: #808080;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .numberedSuggestion{\n"+"\twhite-space: nowrap;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .intelliTaggerFooter {\n"+"\tmargin-top: 4px;\n"+"\tborder-top-width: thin;\n"+"\tborder-top-style: solid;\n"+"\tborder-top-color: #999999;\n"+"}\n"+".intelliTaggerSuggestions .favorites {\n"+"\tborder-bottom-width: thin;\n"+"\tborder-bottom-style: solid;\n"+"\tborder-bottom-color: #999999;\n"+"\tpadding-bottom: 2px;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .normalTags {\n"+"\tpadding-top: 2px;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .intelliTaggerFooter .button {\n"+"\tfont-size: 10px;\n"+"\n"+"\tpadding-left: 0.3em;\n"+"\tpadding-right: 0.3em;\n"+"}\n"+"\n"+"/*}}}*/\n";
config.shadowTiddlers["IntelliTaggerMainTemplate"]="<!--\n"+"{{{\n"+"-->\n"+"<div class=\"favorites\" macro=\"intelliTagger action: showFavorites\"></div>\n"+"<div class=\"normalTags\" macro=\"intelliTagger action: showTags\"></div>\n"+"<!-- The Footer (with the Navigation) ============================================ -->\n"+"<table class=\"intelliTaggerFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n"+"  <tr>\n"+"\t<td align=\"left\">\n"+"\t\t<span macro=\"intelliTagger action: closeButton\"></span>\n"+"\t</td>\n"+"\t<td align=\"right\">\n"+"\t\t<span macro=\"intelliTagger action: version\"></span>, <span macro=\"intelliTagger action: copyright \"></span>\n"+"\t</td>\n"+"  </tr>\n"+"</tbody></table>\n"+"<!--\n"+"}}}\n"+"-->\n";
config.shadowTiddlers["IntelliTaggerEditTagsTemplate"]="<!--\n"+"{{{\n"+"-->\n"+"<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler'></div>\n"+"<div class='title' macro='view title'></div>\n"+"<div class='tagged' macro='tags'></div>\n"+"<div class='viewer' macro='view text wikified'></div>\n"+"<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler'></div>\n"+"<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>\n"+"<!--\n"+"}}}\n"+"-->\n";
config.shadowTiddlers["IntelliTaggerPlugin Documentation"]="[[Documentation on abego Software website|http://tiddlywiki.abego-software.de/doc/IntelliTagger.pdf]].";
config.shadowTiddlers["IntelliTaggerPlugin SourceCode"]="[[Plugin source code on abego Software website|http://tiddlywiki.abego-software.de/archive/IntelliTaggerPlugin/Plugin-IntelliTagger-src.1.0.1.js]]\n";
(function(){
var _126=restart;
restart=function(){
setStylesheet(store.getTiddlerText("IntelliTaggerStyleSheet"),"IntelliTaggerStyleSheet");
_126.apply(this,arguments);
};
})();
}

//%/
/***
|''Name:''|JapaneseTranslationPlugin|
|''Description:''|Translation of TiddlyWiki into Japanese|
|''Author:''|kuraku (kuraku (dot) net (at) gmail (dot) com)|
|''Source:''|http://tw.kuraku.net/tw.html#JapaneseTranslationPlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/association/locales/core/en/locale.en.js |
|''Version:''|0.0.3|
|''Date:''|Aug 23, 2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.1 Japan License|http://creativecommons.org/licenses/by-sa/2.1/jp/]]|
|''~CoreVersion:''|2.2|

!!History
*2007.08.23 annotation, Import を作成
*2007.08.13 annotation を作成中
*2007.07.26 init
***/

//{{{
//--
//-- Translateable strings
//--

// Strings in "double quotes" should be translated; strings in 'single quotes' should be left alone

config.locale = "ja"; // W3C language tag

if (config.options.txtUserName == 'YourName') // do not translate this line, but do translate the next line
	merge(config.options,{txtUserName: "あなたの名前"});

merge(config.tasks,{
	save: {text: "保存(save)", tooltip: "更新した内容を保存", action: saveChanges},
	sync: {text: "同期(sync)", tooltip: "他の TiddlyWiki ファイルやサーバと同期", content: '<<sync>>'},
	importTask: {text: "インポート(import)", tooltip: "他の TiddlyWiki ファイルやサーバからと Tiddler や プラグインをインポート", content: '<<importTiddlers>>'},
	tweak: {text: "カスタマイズ(tweak)", tooltip: "TiddlyWiki のカスタマイズ", content: '<<options>>'},
	plugins: {text: "プラグイン(plugins)", tooltip: "プラグインマネージャによる管理", content: '<<plugins>>'}
});

// Options that can be set in the options panel and/or cookies
merge(config.optionsDesc,{
	txtUserName: "あなたの名前(ユーザ名)",
	chkRegExpSearch: "正規表現による検索",
	chkCaseSensitiveSearch: "厳密な検索",
	chkAnimate: "アニメーション",
	chkSaveBackups: "保存時にバックアップを取る",
	chkAutoSave: "編集時に自動保存",
	chkGenerateAnRssFeed: "保存時に RSS フィードファイルを作成",
	chkSaveEmptyTemplate: "保存時にテンプレートファイルを作成",
	chkOpenInNewWindow: "外部リンクは新ウィンドウへ",
	chkToggleLinks: "リンクを押したときにその Tiddler が開いていれば閉じる",
	chkHttpReadOnly: "Web アクセスからの場合は編集できない",
	chkForceMinorUpdate: "Tiddler 編集時ユーザ名も日付も変えない",
	chkConfirmDelete: "Tiddler 削除時に確認",
	chkInsertTabs: "タブキー入力時フィールド間の移動機能ではなく、タブとして入力",
	txtBackupFolder: "バックアップフォルダ名",
	txtMaxEditRows: "編集エリアの行数",
	txtFileSystemCharSet: "保存時の文字エンコード (Firefox/Mozilla only)"});

merge(config.messages,{
	customConfigError: "プラグインの読込みで問題が発生。プラグインマネージャ参照のこと",
	pluginError: "エラー: %0",
	pluginDisabled: "'systemConfigDisable' タグにより実行がされなかった",
	pluginForced: "'systemConfigForce' タグによる強制実行",
	pluginVersionError: "このプラグインの実行には 新バージョンの TiddlyWiki が必要",
	nothingSelected: "選択がされなかった. 一つ以上の選択が必要",
	savedSnapshotError: "TiddlyWiki の保存に失敗. 詳細はこちらへ http://www.tiddlywiki.com/#DownloadSoftware",
	subtitleUnknown: "(未設定)",
	undefinedTiddlerToolTip: "'%0' はまだ作成されていない",
	shadowedTiddlerToolTip: "'%0' はまだ作成されていない (shodow には存在)",
	tiddlerLinkTooltip: "%0 - %1, %2",
	externalLinkTooltip: "%0 (外部リンク)",
	noTags: "タグの付いた Tiddler は無い",
	notFileUrlError: "変更を保存するには、この TiddlyWiki をファイルに保存(ダウンロード)がする必要がある",
	cantSaveError: "変更を保存することができない. \n理由:\n- ブラウザが保存に未対応 (Firefox, Internet Explorer, Safari ,Opera については設定が正しければ保存可能)\n- ファイルのパスに不正な文字が含まれている\n- ファイルを移動、名前の変更を行なった",
	invalidFileError: "ファイル '%0' は TiddlyWiki ファイルではない",
	backupSaved: "バックアップを保存",
	backupFailed: "バックアップの保存に失敗",
	rssSaved: "RSS フィードを保存",
	rssFailed: "RSS フィードの保存に失敗",
	emptySaved: "空テンプレートファイルを保存",
	emptyFailed: "空テンプレートファイルの保存に失敗",
	mainSaved: "TiddlyWiki ファイルを保存",
	mainFailed: "TiddlyWiki ファイルの保存に失敗. 変更内容は未保存",
	macroError: "<<\%0>> マクロにてエラー",
	macroErrorDetails: "<<\%0>> マクロにてエラー:\n%1",
	missingMacro: "マクロは見つからない",
	overwriteWarning: "'%0' Tiddler は既存. OK にて上書き",
	unsavedChangesWarning: "警告 WARNING! TiddlyWiki の変更内容が未保存状態. \n\nChoose OK で保存\nCANCEL で破棄",
	confirmExit: "--------------------------------\n\nTiddlyWiki の変更内容が未保存状態. このまま続けると変更内容は破棄されます\n\n--------------------------------",
	saveInstructions: "SaveChanges",
	unsupportedTWFormat: "TiddlyWiki にて '%0' フォーマットは未対応",
	tiddlerSaveError: "Tiddler '%0' 保存時にエラー",
	tiddlerLoadError: "Tiddler '%0' ロード時にエラー",
	wrongSaveFormat: "フォーマット '%0' による保存は未対応のため標準フォーマットにて保存",
	invalidFieldName: "フィールド名 '%0' は間違い",
	fieldCannotBeChanged: "フィールド '%0' は変更不能",
	loadingMissingTiddler: "workspace '%3', '%2' の '%1' サーバより Tiddler '%0' をロードしようとして失敗"});

merge(config.messages.messageClose,{
	text: "クローズ",
	tooltip: "このメッセージを閉じる"});

config.messages.backstage = {
	open: {text: "バックステイジ", tooltip: "backstage エリアを開く"},
	close: {text: "閉じる", tooltip: "backstage エリアを閉じる"},
	prompt: "バックステイジ: ",
	decal: {
		edit: {text: "編集", tooltip: "Tiddler '%0' を編集"}
	}
};

config.messages.listView = {
	tiddlerTooltip: "Tiddler をフルテキストにする",
	previewUnavailable: "(プレビュー不能)"
};

config.messages.dates.months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November","December"];
config.messages.dates.days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
config.messages.dates.shortMonths = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
config.messages.dates.shortDays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
// suffixes for dates, eg "1st","2nd","3rd"..."30th","31st"
config.messages.dates.daySuffixes = ["st","nd","rd","th","th","th","th","th","th","th",
		"th","th","th","th","th","th","th","th","th","th",
		"st","nd","rd","th","th","th","th","th","th","th",
		"st"];
config.messages.dates.am = "am";
config.messages.dates.pm = "pm";

merge(config.messages.tiddlerPopup,{
	});

merge(config.views.wikified.tag,{
	labelNoTags: "タグなし",
	labelTags: "タグ: ",
	openTag: "'%0' タグを開く",
	tooltip: "'%0' タグの付いた Tiddler を表示",
	openAllText: "すべて開く",
	openAllTooltip: "以下の全 Tiddler を開く",
	popupNone: "'%0' タグの付いた Tiddler は他には無い"});

merge(config.views.wikified,{
	defaultText: "'%0' Tiddler は作成されていない. ダブルクリックにより作成",
	defaultModifier: "(missing)",
	shadowModifier: "(ビルトイン shadow Tiddler)",
	dateFormat: "YYYY.0MM.0DD", // use this to change the date format for your locale, eg "YYYY MMM DD", do not translate the Y, M or D
	createdPrompt: "作成"});

merge(config.views.editor,{
	tagPrompt: "タグはスペース区切り. 必要ならば[[二重のブランケットで囲む]]. 既存の",
	defaultText: "'%0' の内容を入力"});

merge(config.views.editor.tagChooser,{
	text: "タグ",
	tooltip: "既存のタグを選択",
	popupNone: "タグが未定義",
	tagTooltip: "'%0' タグを追加"});

merge(config.messages,{
	sizeTemplates:
		[
		{unit: 1024*1024*1024, template: "%0\u00a0GB"},
		{unit: 1024*1024, template: "%0\u00a0MB"},
		{unit: 1024, template: "%0\u00a0KB"},
		{unit: 1, template: "%0\u00a0B"}
		]});

merge(config.macros.search,{
	label: "検索",
	prompt: "この TiddlyWiki を検索",
	accessKey: "F",
	successMsg: "%0 件の Tiddler にて '%1' が見つかった",
	failureMsg: "%0 は見つからない"});

merge(config.macros.tagging,{
	label: "タギング(tagging): ",
	labelNotTag: "タグなし",
	tooltip: "'%0' タグの付いた Tiddler リスト"});

merge(config.macros.timeline,{
	dateFormat: "YYYY.0MM.0DD"});// use this to change the date format for your locale, eg "YYYY MMM DD", do not translate the Y, M or D

merge(config.macros.allTags,{
	tooltip: "'%0' タグの付いた Tiddler 表示",
	noTags: "タグの付いた Tiddler は無い"});

config.macros.list.all.prompt = "アルファベット順リスト";
config.macros.list.missing.prompt = "リンクされているが存在しない Tiddler リスト";
config.macros.list.orphans.prompt = "リンクされていない Tiddler リスト";
config.macros.list.shadowed.prompt = "Shadow Tiddler リスト";
config.macros.list.touched.prompt = "局所的に変更された Tiddler リスト";

merge(config.macros.closeAll,{
	label: "すべて閉じる",
	prompt: "編集しているもの以外のすべてを閉じる"});

merge(config.macros.permaview,{
	label: "パーマビュー",
	prompt: "表示されているすべての Tiddler を表示する URL"});

merge(config.macros.saveChanges,{
	label: "保存",
	prompt: "すべての Tiddler を保存",
	accessKey: "S"});

merge(config.macros.newTiddler,{
	label: "Tiddler 作成",
	prompt: "新しい Tiddler を作成",
	title: "New Tiddler",
	accessKey: "N"});

merge(config.macros.newJournal,{
	label: "Journal 作成",
	prompt: "新しいジャーナルを作成 (タイトルが日付)",
	accessKey: "J"});

merge(config.macros.options,{
	wizardTitle: "Tweak advanced options",
	step1Title: "これらのオプションはブラウザのクッキーに保存される",
	step1Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='false' name='chkUnknown'>Show unknown options</input>",
	unknownDescription: "//(unknown)//",
	listViewTemplate: {
		columns: [
			{name: 'Option', field: 'option', title: "オプション", type: 'String'},
			{name: 'Description', field: 'description', title: "内容", type: 'WikiText'},
			{name: 'Name', field: 'name', title: "名前", type: 'String'}
			],
		rowClasses: [
			{className: 'lowlight', field: 'lowlight'} 
			]}
	});

merge(config.macros.plugins,{
	wizardTitle: "Manage plugins",
	step1Title: "現在ロードされているプラグイン",
	step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
	skippedText: "(このプラグインは起動後に追加)",
	noPluginText: "プラグインはインストールされていない",
	confirmDeleteText: "これらのプラグインを削除しますか:\n\n%0",
	removeLabel: "systemConfig タグを除去",
	removePrompt: "systemConfig タグを除去",
	deleteLabel: "削除",
	deletePrompt: "Tiddler の完全な削除",
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Size', field: 'size', tiddlerLink: 'size', title: "サイズ", type: 'Size'},
			{name: 'Forced', field: 'forced', title: "強制", tag: 'systemConfigForce', type: 'TagCheckbox'},
			{name: 'Disabled', field: 'disabled', title: "使用不可", tag: 'systemConfigDisable', type: 'TagCheckbox'},
			{name: 'Executed', field: 'executed', title: "ロード済", type: 'Boolean', trueText: "Yes", falseText: "No"},
			{name: 'Startup Time', field: 'startupTime', title: "起動時間", type: 'String'},
			{name: 'Error', field: 'error', title: "ステータス", type: 'Boolean', trueText: "エラー", falseText: "OK"},
			{name: 'Log', field: 'log', title: "ログ", type: 'StringList'}
			],
		rowClasses: [
			{className: 'error', field: 'error'},
			{className: 'warning', field: 'warning'}
			]}
	});

merge(config.macros.toolbar,{
	moreLabel: "続き",
	morePrompt: "見えていないコマンド表示"
	});

merge(config.macros.refreshDisplay,{
	label: "リフレッシュ",
	prompt: "TiddlyWiki を再描画"
	});

merge(config.macros.importTiddlers,{
	readOnlyWarning: "読み込み専用の TiddlyWiki にはインポートできない. file://URL で開き直すこと",
	wizardTitle: "他のファイル、サーバからの Tiddler インポート",
	step1Title: "ステップ 1: TiddlyWiki サーバかファイルを指定",
	step1Html: "サーバタイプを指定: <select name='selTypes'><option value=''>選択...</option></select><br>URL またはパスネームを入力: <input type='text' size=50 name='txtPath'><br>あるいはファイルの指定: <input type='file' size=50 name='txtBrowse'><br><hr>またはあらかじめ設定されたフィードの選択: <select name='selFeeds'><option value=''>選択...</option></select>",
	openLabel: "オープン",
	openPrompt: "このファイルかサーバへ接続",
	openError: "tiddlywiki ファイルの取得に問題が発生",
	statusOpenHost: "サーバホストに接続中",
	statusGetWorkspaceList: "利用可能なワークスペースを取得中",
	step2Title: "ステップ 2: ワークスペースの選択",
	step2Html: "ワークスペース名の入力: <input type='text' size=50 name='txtWorkspace'><br>...またはワークスペースの選択: <select name='selWorkspace'><option value=''>選択...</option></select>",
	cancelLabel: "キャンセル",
	cancelPrompt: "このインポートをキャンセル",
	statusOpenWorkspace: "ワークスペースをオープン中",
	statusGetTiddlerList: "利用可能な Tiddler を取得中",
	step3Title: "ステップ 3: インポートする Tiddler の選択",
	step3Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='true' name='chkSync'>後の変更を反映させられるようにこれらの Tiddler とサーバを関連づけておく</input><br><input type='checkbox' name='chkSave'>このサーバの情報を 'systemServer' として保存する Tiddler 名:</input> <input type='text' size=25 name='txtSaveTiddler'>",
	importLabel: "インポート",
	importPrompt: "Tiddler のインポート",
	confirmOverwriteText: "本当にこれらの Tiddler を上書きして良いですか:\n\n%0",
	step4Title: "ステップ 4: %0 の Tiddler をインポート",
	step4Html: "<input type='hidden' name='markReport'></input>", // DO NOT TRANSLATE
	doneLabel: "完了",
	donePrompt: "クローズ",
	statusDoingImport: "インポート中",
	statusDoneImport: "すべての Tiddler をインポート済み",
	systemServerNamePattern: "%1 の %2",
	systemServerNamePatternNoWorkspace: "%1",
	confirmOverwriteSaveTiddler: "Tiddler '%0' はすでにあります. 'OK' のクリックでサーバの内容で上書き、'Cancel' により修正を中止",
	serverSaveTemplate: "|''タイプ:''|%0|\n|''URL:''|%1|\n|''ワークスペース:''|%2|\n\nこの Tiddler はこのサーバ情報を記録するために自動的に作成された",
	serverSaveModifier: "(システム)",
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Size', field: 'size', tiddlerLink: 'size', title: "サイズ", type: 'Size'},
			{name: 'Tags', field: 'tags', title: "タグ", type: 'Tags'}
			],
		rowClasses: [
			]}
	});

merge(config.macros.sync,{
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Server Type', field: 'serverType', title: "Server type", type: 'String'},
			{name: 'Server Host', field: 'serverHost', title: "Server host", type: 'String'},
			{name: 'Server Workspace', field: 'serverWorkspace', title: "Server workspace", type: 'String'},
			{name: 'Status', field: 'status', title: "Synchronisation status", type: 'String'},
			{name: 'Server URL', field: 'serverUrl', title: "Server URL", text: "View", type: 'Link'}
			],
		rowClasses: [
			],
		buttons: [
			{caption: "Sync these tiddlers", name: 'sync'}
			]},
	wizardTitle: "Synchronize with external servers and files",
	step1Title: "Choose the tiddlers you want to synchronize",
	step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
	syncLabel: "sync",
	syncPrompt: "Sync these tiddlers",
	hasChanged: "Changed while unplugged",
	hasNotChanged: "Unchanged while unplugged",
	syncStatusList: {
		none: {text: "...", color: "none"},
		changedServer: {text: "Changed on server", color: '#80ff80'},
		changedLocally: {text: "Changed while unplugged", color: '#80ff80'},
		changedBoth: {text: "Changed while unplugged and on server", color: '#ff8080'},
		notFound: {text: "Not found on server", color: '#ffff80'},
		putToServer: {text: "Saved update on server", color: '#ff80ff'},
		gotFromServer: {text: "Retrieved update from server", color: '#80ffff'}
		}
	});

merge(config.commands.closeTiddler,{
	text: "閉じる",
	tooltip: "Tiddler を閉じる"});

merge(config.commands.closeOthers,{
	text: "他を閉じる",
	tooltip: "他の Tiddler を閉じる"});

merge(config.commands.editTiddler,{
	text: "編集",
	tooltip: "Tiddler を編集",
	readOnlyText: "ビュー",
	readOnlyTooltip: "Tiddler ソースを表示"});

merge(config.commands.saveTiddler,{
	text: "保存",
	tooltip: "この Tiddler を保存"});

merge(config.commands.cancelTiddler,{
	text: "キャンセル",
	tooltip: "Tiddler の更新をキャンセル",
	warning: "'%0' の編集内容は破棄されますがよろしいですか?",
	readOnlyText: "終了",
	readOnlyTooltip: "Tiddler ノーマル表示"});

merge(config.commands.deleteTiddler,{
	text: "削除",
	tooltip: "この Tiddler を削除",
	warning: "'%0' Tiddler を本当に削除しますか?"});

merge(config.commands.permalink,{
	text: "パーマリンク",
	tooltip: "この Tiddler のパーマリンク"});

merge(config.commands.references,{
	text: "リファレンス",
	tooltip: "この Tiddler を参照している Tiddler",
	popupNone: "リファレンスなし"});

merge(config.commands.jump,{
	text: "ジャンプ",
	tooltip: "他の Tiddler へのジャンプ"});

merge(config.commands.syncing,{
	text: "syncing",
	tooltip: "Control synchronisation of this tiddler with a server or external file",
	currentlySyncing: "<div>Currently syncing via <span class='popupHighlight'>'%0'</span> to:</"+"div><div>host: <span class='popupHighlight'>%1</span></"+"div><div>workspace: <span class='popupHighlight'>%2</span></"+"div>", // Note escaping of closing <div> tag
	notCurrentlySyncing: "Not currently syncing",
	captionUnSync: "Stop synchronising this tiddler",
	chooseServer: "Synchronise this tiddler with another server:",
	currServerMarker: "\u25cf ",
	notCurrServerMarker: "  "});

merge(config.commands.fields,{
	text: "fields",
	tooltip: "Show the extended fields of this tiddler",
	emptyText: "There are no extended fields for this tiddler",
	listViewTemplate: {
		columns: [
			{name: 'Field', field: 'field', title: "Field", type: 'String'},
			{name: 'Value', field: 'value', title: "Value", type: 'String'}
			],
		rowClasses: [
			],
		buttons: [
			]}});

merge(config.shadowTiddlers,{
	DefaultTiddlers: "[[TranslatedGettingStarted]]",
	MainMenu: "[[TranslatedGettingStarted]]\n\n\n^^~TiddlyWiki version <<version>>\n(c) 2007 [[UnaMesa|http://www.unamesa.org/]]^^",
	TranslatedGettingStarted: "未設定の TiddlyWiki から始めるためには次の Tiddler を変更する必要がある:\n* SiteTitle & SiteSubtitle: 上部に表示される、サイトのタイトルとサブタイトル (修正後、ブラウザのタイトルバーに現われる)\n* MainMenu: メニュー (通常左側)\n* DefaultTiddlers: TiddlyWiki を開くときに表示したい Tiddler 名を含む\nまた編集を行なうあなたのユーザー名を入力する必要がある: <<option txtUserName>>",
	SiteTitle: "My TiddlyWiki",
	SiteSubtitle: "a reusable non-linear personal web notebook",
	SiteUrl: "http://www.tiddlywiki.com/",
	OptionsPanel: "TiddlyWiki をカスタマイズするこれらのオプションはブラウザに保存される.\n\nあなたのユーザ名を入力する. それは WikiWord として表示される\n<<option txtUserName>>\n\n<<option chkSaveBackups>> バックアップ\n<<option chkAutoSave>> 自動保存\n<<option chkRegExpSearch>> 正規表現検索\n<<option chkCaseSensitiveSearch>> 厳密な検索\n<<option chkAnimate>> アニメーション\n\n----\nその他のオプション [[TranslatedAdvancedOptions|AdvancedOptions]]",
	SideBarOptions: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "YYYY.0MM.0DD">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "オプション >" "Change TiddlyWiki advanced options">>',
	SideBarTabs: '<<tabs txtMainTab "更新" "タイムライン" TabTimeline "すべて" "すべて" TabAll "タグ" "タグ" TabTags "他" "他リスト" TabMore>>',
	TabMore: '<<tabs txtMoreTab "Missing" "リンクがあるが存在しない Tiddler" TabMoreMissing "Orphans" "リンクされていない Tiddler" TabMoreOrphans "Shadowed" "シャドウ(既存) Tiddler" TabMoreShadowed>>'});

merge(config.annotations,{
	AdvancedOptions: "この shadow Tiddler はアドバンスオプションへのアクセスを提供する",
	ColorPalette: "この shadow Tiddler のこれらの値は ~TiddlyWiki ユーザインターフェースの配色の指定をする",
	DefaultTiddlers: "この shadow Tiddler に Tiddler をリストすることで ~TiddlyWiki スタート時に表示される Tiddler を指定する",
	EditTemplate: "この shadow Tiddler のテンプレートは編集中の Tiddler の見せ方(レイアウト)を指定する",
	GettingStarted: "この shadow Tiddler は基本的な使用法を説明する",
	ImportTiddlers: "この shadow Tiddler は Tiddler のインポートを提供する",
	MainMenu: "この shadow Tiddler は画面のメインメニューの内容として使用される",
	MarkupPreHead: "この Tiddler は ~TiddlyWiki の HTML ファイルの <head> タグの前に挿入される",
	MarkupPostHead: "この Tiddler は ~TiddlyWiki の HTML ファイルの <head> タグの後ろに挿入される",
	MarkupPreBody: "この Tiddler は ~TiddlyWiki の HTML ファイルの <body> タグの前に挿入される",
	MarkupPostBody: "この Tiddler は script ブロック直前の ~TiddlyWiki の HTML ファイルの <body> タグの後ろに挿入される",
	OptionsPanel: "この shadow Tiddler は オプションパネルスライダーの内容として使用される",
	PageTemplate: "この shadow Tiddler のテンプレートは ~TiddlyWiki のレイアウトを指定する",
	PluginManager: "この shadow Tiddler はプラグインマネージャへのアクセスを提供する",
	SideBarOptions: "この shadow Tiddler はサイドバーで選択パネルの内容として使用される",
	SideBarTabs: "この shadow Tiddler はサイドバーのタブの内容として使用される",
	SiteSubtitle: "この shadow Tiddler はページのサブタイトルとして使用される",
	SiteTitle: "この shadow Tiddler はページのタイトルとして使用される",
	SiteUrl: "この shadow Tiddler は出力のための完全なターゲット URL を指定するべきである(RSSファイルなど)",
	StyleSheetColours: "この shadow Tiddler はページの要素の色と関連する CSS を定義する",
	StyleSheet: "この Tiddler は個別の CSS (カスタムしたもの) を指定する",
	StyleSheetLayout: "この shadow Tiddler はページの要素のレイアウトと関連する CSS を定義する",
	StyleSheetLocale: "この shadow Tiddler はロケールと関連する CSS を定義する",
	StyleSheetPrint: "この shadow Tiddler は印刷と関連する CSS を定義する",
	TabAll: "この shadow Tiddler はサイドバーの「All(すべて)」タブの内容として使用される",
	TabMore: "この shadow Tiddler はサイドバーの「More(他)」タブの内容として使用される",
	TabMoreMissing: "この shadow Tiddler はサイドバーの「Missing」タブの内容として使用される",
	TabMoreOrphans: "この shadow Tiddler はサイドバーの「Orphans」タブの内容として使用される",
	TabMoreShadowed: "この shadow Tiddler はサイドバーの「Shadowed」タブの内容として使用される",
	TabTags: "この shadow Tiddler はサイドバーの「Tags(タグ)」タブの内容として使用される",
	TabTimeline: "この shadow Tiddler はサイドバーの「Timeline(更新)」タブの内容として使用される",
	ViewTemplate: "この shadow Tiddler の HTML テンプレートは Tiddler がどのように表示されるかを指定する"
	});

//}}}
URL: http://kuraku.net/tw/tw.html
/***
|''Name:''|LegacyStrikeThroughPlugin|
|''Description:''|Support for legacy (pre 2.1) strike through formatting|
|''Version:''|1.0.2|
|''Date:''|Jul 21, 2006|
|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|
|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|
|''License:''|[[BSD open source license]]|
|''CoreVersion:''|2.1.0|
***/

//{{{
// Ensure that the LegacyStrikeThrough Plugin is only installed once.
if(!version.extensions.LegacyStrikeThroughPlugin) {
version.extensions.LegacyStrikeThroughPlugin = {installed:true};

config.formatters.push(
{
	name: "legacyStrikeByChar",
	match: "==",
	termRegExp: /(==)/mg,
	element: "strike",
	handler: config.formatterHelpers.createElementAndWikify
});

} //# end of "install only once"
//}}}
<<include "clip.html" hide:true>>
<<includeState>>
/***
|''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);
}
//}}}
[[Links|TiddlyWiki's Cool Site]]
[[tags|TagCloud]]
<<tag Plugins|systemConfig>>[[]]
/%[[KRK CLip|http://tw.kuraku.net/clip.html]]
[[TiddlySpot|http://kuraku.tiddlyspot.com/]] %/
@@color(#aaa):ver.<<version>>@@/%
<script label="R">
   if (!window.story) window.story=window;
  location.reload()
</script>%/
<<tiddler LoadScripts>> 
<!--{{{-->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-622015-4";
urchinTracker();
</script>
<script type="text/javascript">
_uacct = "UA-622015-5";
urchinTracker();
</script>
<!--}}}-->
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>

<!--}}}-->

<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>kuraku@TiddlyWiki</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
/***
''Usage:''
{{{
previous tidder: <<navitiddler -1>>
next tidder: <<navitiddler +1>>
}}}
''Source:''
***/
/*{{{*/
config.macros.navitiddler = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler){
		if(!params[0] || params[0] == "0")
			return;
		var param = params[0];
		var tiddlers = store.reverseLookup("tags","excludeLists",false,"title");

		var cnt;
		for(cnt=0; cnt<tiddlers.length; cnt++) {
			if(tiddlers[cnt].title == tiddler.title) {
				break;
			}
		}

		var targetcnt = cnt + parseInt(param);
		if(targetcnt < 0 || targetcnt >= tiddlers.length)
			return;

		if(parseInt(param) < 0){
			var arrow = createTiddlyElement(place,"span");
			arrow.innerHTML = "<<<";
		}
	
		createTiddlyLink(place,tiddlers[targetcnt].title,true,"button");

		if(parseInt(param) > 0){
			var arrow = createTiddlyElement(place,"span");
			arrow.innerHTML = ">>>";
		}
	}
};
/*}}}*/
/***
|Name|NestedSlidersPlugin|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.6|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|show content in nest-able sliding/floating panels, without creating separate tiddlers for each panel's content|
!!!!!Documentation
>see [[NestedSlidersPluginInfo]]
!!!!!Configuration
<<<
<<option chkFloatingSlidersAnimate>> allow floating sliders to animate when opening/closing
>Note: This setting can cause 'clipping' problems in some versions of InternetExplorer.
>In addition, for floating slider animation to occur you must also allow animation in general (see [[AdvancedOptions]]).
<<<
!!!!!Revisions
<<<
2008.09.07 - 2.4.6 added removeOptionCookie() function for compatibility with [[CookieManagerPlugin]]
2008.06.07 - 2.4.5 in 'onmouseover' handler for 'open on hover' slider buttons,<br>use call() method when invoking document.onclick function (avoids error in IE)
|please see [[NestedSlidersPluginInfo]] for additional revision details|
2005.11.03 - 1.0.0 initial public release.  Thanks to RodneyGomes, GeoffSlocock, and PaulPetterson for suggestions and experiments.
<<<
!!!!!Code
***/
//{{{
version.extensions.NestedSlidersPlugin= {major: 2, minor: 4, revision: 6, date: new Date(2008,9,7)};

// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkFloatingSlidersAnimate===undefined)
	config.options.chkFloatingSlidersAnimate=false; // avoid clipping problems in IE

// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
	background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");

// if removeOptionCookie() function is not defined by TW core, define it here.
if (window.removeOptionCookie===undefined) {
window.removeOptionCookie=function(cookie) {
	var ex=new Date(); ex.setTime(ex.getTime()-1000);  // immediately expire cookie
	document.cookie = cookie+"=novalue; path=/; expires="+ex.toGMTString();
}
}

config.formatters.push( {
	name: "nestedSliders",
	match: "\\n?\\+{3}",
	terminator: "\\s*\\={3}\\n?",
	lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\^(?:[^\\^\\*\\@\\[\\>]*\\^)?)?(\\*)?(\\@)?(?:\\{\\{([\\w]+[\\s\\w]*)\\{)?(\\[[^\\]]*\\])?(\\[[^\\]]*\\])?(?:\\}{3})?(\\#[^:]*\\:)?(\\>)?(\\.\\.\\.)?\\s*",
	handler: function(w)
		{
			lookaheadRegExp = new RegExp(this.lookahead,"mg");
			lookaheadRegExp.lastIndex = w.matchStart;
			var lookaheadMatch = lookaheadRegExp.exec(w.source)
			if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
			{
				var defopen=lookaheadMatch[1];
				var cookiename=lookaheadMatch[2];
				var header=lookaheadMatch[3];
				var panelwidth=lookaheadMatch[4];
				var transient=lookaheadMatch[5];
				var hover=lookaheadMatch[6];
				var buttonClass=lookaheadMatch[7];
				var label=lookaheadMatch[8];
				var openlabel=lookaheadMatch[9];
				var panelID=lookaheadMatch[10];
				var blockquote=lookaheadMatch[11];
				var deferred=lookaheadMatch[12];

				// location for rendering button and panel
				var place=w.output;

				// default to closed, no cookie, no accesskey, no alternate text/tip
				var show="none"; var cookie=""; var key="";
				var closedtext=">"; var closedtip="";
				var openedtext="<"; var openedtip="";

				// extra "+", default to open
				if (defopen) show="block";

				// cookie, use saved open/closed state
				if (cookiename) {
					cookie=cookiename.trim().slice(1,-1);
					cookie="chkSlider"+cookie;
					if (config.options[cookie]==undefined)
						{ config.options[cookie] = (show=="block") }
					show=config.options[cookie]?"block":"none";
				}

				// parse label/tooltip/accesskey: [label=X|tooltip]
				if (label) {
					var parts=label.trim().slice(1,-1).split("|");
					closedtext=parts.shift();
					if (closedtext.substr(closedtext.length-2,1)=="=")	
						{ key=closedtext.substr(closedtext.length-1,1); closedtext=closedtext.slice(0,-2); }
					openedtext=closedtext;
					if (parts.length) closedtip=openedtip=parts.join("|");
					else { closedtip="show "+closedtext; openedtip="hide "+closedtext; }
				}

				// parse alternate label/tooltip: [label|tooltip]
				if (openlabel) {
					var parts=openlabel.trim().slice(1,-1).split("|");
					openedtext=parts.shift();
					if (parts.length) openedtip=parts.join("|");
					else openedtip="hide "+openedtext;
				}

				var title=show=='block'?openedtext:closedtext;
				var tooltip=show=='block'?openedtip:closedtip;

				// create the button
				if (header) { // use "Hn" header format instead of button/link
					var lvl=(header.length>5)?5:header.length;
					var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,buttonClass,title);
					btn.onclick=onClickNestedSlider;
					btn.setAttribute("href","javascript:;");
					btn.setAttribute("title",tooltip);
				}
				else
					var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,buttonClass);
				btn.innerHTML=title; // enables use of HTML entities in label

				// set extra button attributes
				btn.setAttribute("closedtext",closedtext);
				btn.setAttribute("closedtip",closedtip);
				btn.setAttribute("openedtext",openedtext);
				btn.setAttribute("openedtip",openedtip);
				btn.sliderCookie = cookie; // save the cookiename (if any) in the button object
				btn.defOpen=defopen!=null; // save default open/closed state (boolean)
				btn.keyparam=key; // save the access key letter ("" if none)
				if (key.length) {
					btn.setAttribute("accessKey",key); // init access key
					btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus
				}
				btn.setAttribute("hover",hover?"true":"false");
				btn.onmouseover=function(ev) {
					// optional 'open on hover' handling
					if (this.getAttribute("hover")=="true" && this.sliderPanel.style.display=='none') {
						document.onclick.call(document,ev); // close transients
						onClickNestedSlider(ev); // open this slider
					}
					// mouseover on button aligns floater position with button
					if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this,this.sliderPanel);
				}

				// create slider panel
				var panelClass=panelwidth?"floatingPanel":"sliderPanel";
				if (panelID) panelID=panelID.slice(1,-1); // trim off delimiters
				var panel=createTiddlyElement(place,"div",panelID,panelClass,null);
				panel.button = btn; // so the slider panel know which button it belongs to
				btn.sliderPanel=panel; // so the button knows which slider panel it belongs to
				panel.defaultPanelWidth=(panelwidth && panelwidth.length>2)?panelwidth.slice(1,-1):"";
				panel.setAttribute("transient",transient=="*"?"true":"false");
				panel.style.display = show;
				panel.style.width=panel.defaultPanelWidth;
				panel.onmouseover=function(event) // mouseover on panel aligns floater position with button
					{ if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this.button,this); }

				// render slider (or defer until shown) 
				w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
				if ((show=="block")||!deferred) {
					// render now if panel is supposed to be shown or NOT deferred rendering
					w.subWikify(blockquote?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
					// align floater position with button
					if (window.adjustSliderPos) window.adjustSliderPos(place,btn,panel);
				}
				else {
					var src = w.source.substr(w.nextMatch);
					var endpos=findMatchingDelimiter(src,"+++","===");
					panel.setAttribute("raw",src.substr(0,endpos));
					panel.setAttribute("blockquote",blockquote?"true":"false");
					panel.setAttribute("rendered","false");
					w.nextMatch += endpos+3;
					if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
				}
			}
		}
	}
)

function findMatchingDelimiter(src,starttext,endtext) {
	var startpos = 0;
	var endpos = src.indexOf(endtext);
	// check for nested delimiters
	while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
		// count number of nested 'starts'
		var startcount=0;
		var temp = src.substring(startpos,endpos-1);
		var pos=temp.indexOf(starttext);
		while (pos!=-1)  { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
		// set up to check for additional 'starts' after adjusting endpos
		startpos=endpos+endtext.length;
		// find endpos for corresponding number of matching 'ends'
		while (startcount && endpos!=-1) {
			endpos = src.indexOf(endtext,endpos+endtext.length);
			startcount--;
		}
	}
	return (endpos==-1)?src.length:endpos;
}
//}}}
//{{{
window.onClickNestedSlider=function(e)
{
	if (!e) var e = window.event;
	var theTarget = resolveTarget(e);
	while (theTarget && theTarget.sliderPanel==undefined) theTarget=theTarget.parentNode;
	if (!theTarget) return false;
	var theSlider = theTarget.sliderPanel;
	var isOpen = theSlider.style.display!="none";

	// toggle label
	theTarget.innerHTML=isOpen?theTarget.getAttribute("closedText"):theTarget.getAttribute("openedText");
	// toggle tooltip
	theTarget.setAttribute("title",isOpen?theTarget.getAttribute("closedTip"):theTarget.getAttribute("openedTip"));

	// deferred rendering (if needed)
	if (theSlider.getAttribute("rendered")=="false") {
		var place=theSlider;
		if (theSlider.getAttribute("blockquote")=="true")
			place=createTiddlyElement(place,"blockquote");
		wikify(theSlider.getAttribute("raw"),place);
		theSlider.setAttribute("rendered","true");
	}
	// show/hide the slider
	if(config.options.chkAnimate && (!hasClass(theSlider,'floatingPanel') || config.options.chkFloatingSlidersAnimate))
		anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
	else
		theSlider.style.display = isOpen ? "none" : "block";
	// reset to default width (might have been changed via plugin code)
	theSlider.style.width=theSlider.defaultPanelWidth;
	// align floater panel position with target button
	if (!isOpen && window.adjustSliderPos) window.adjustSliderPos(theSlider.parentNode,theTarget,theSlider);
	// if showing panel, set focus to first 'focus-able' element in panel
	if (theSlider.style.display!="none") {
		var ctrls=theSlider.getElementsByTagName("*");
		for (var c=0; c<ctrls.length; c++) {
			var t=ctrls[c].tagName.toLowerCase();
			if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")
				{ ctrls[c].focus(); break; }
		}
	}
	var cookie=theTarget.sliderCookie;
	if (cookie && cookie.length) {
		config.options[cookie]=!isOpen;
		if (config.options[cookie]!=theTarget.defOpen) window.saveOptionCookie(cookie);
		else window.removeOptionCookie(cookie); // remove cookie if slider is in default display state
	}

	// prevent SHIFT-CLICK from being processed by browser (opens blank window... yuck!)
	// prevent clicks *within* a slider button from being processed by browser
	// but allow plain click to bubble up to page background (to close transients, if any)
	if (e.shiftKey || theTarget!=resolveTarget(e))
		{ e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); }
	Popup.remove(); // close open popup (if any)
	return false;
}
//}}}
//{{{
// click in document background closes transient panels 
document.nestedSliders_savedOnClick=document.onclick;
document.onclick=function(ev) { if (!ev) var ev=window.event; var target=resolveTarget(ev);

	if (document.nestedSliders_savedOnClick)
		var retval=document.nestedSliders_savedOnClick.apply(this,arguments);
	// if click was inside a popup... leave transient panels alone
	var p=target; while (p) if (hasClass(p,"popup")) break; else p=p.parentNode;
	if (p) return retval;
	// if click was inside transient panel (or something contained by a transient panel), leave it alone
	var p=target; while (p) {
		if ((hasClass(p,"floatingPanel")||hasClass(p,"sliderPanel"))&&p.getAttribute("transient")=="true") break;
		p=p.parentNode;
	}
	if (p) return retval;
	// otherwise, find and close all transient panels...
	var all=document.all?document.all:document.getElementsByTagName("DIV");
	for (var i=0; i<all.length; i++) {
		 // if it is not a transient panel, or the click was on the button that opened this panel, don't close it.
		if (all[i].getAttribute("transient")!="true" || all[i].button==target) continue;
		// otherwise, if the panel is currently visible, close it by clicking it's button
		if (all[i].style.display!="none") window.onClickNestedSlider({target:all[i].button}) 
	}
	return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
	if (hasClass(panel,"floatingPanel")) {
		var rightEdge=document.body.offsetWidth-1;
		var panelWidth=panel.offsetWidth;
		var left=0;
		var top=btn.offsetHeight; 
		if (place.style.position=="relative" && findPosX(btn)+panelWidth>rightEdge) {
			left-=findPosX(btn)+panelWidth-rightEdge; // shift panel relative to button
			if (findPosX(btn)+left<0) left=-findPosX(btn); // stay within left edge
		}
		if (place.style.position!="relative") {
			var left=findPosX(btn);
			var top=findPosY(btn)+btn.offsetHeight;
			var p=place; while (p && !hasClass(p,'floatingPanel')) p=p.parentNode;
			if (p) { left-=findPosX(p); top-=findPosY(p); }
			if (left+panelWidth>rightEdge) left=rightEdge-panelWidth;
			if (left<0) left=0;
		}
		panel.style.left=left+"px"; panel.style.top=top+"px";
	}
}
//}}}
//{{{
// TW2.1 and earlier:
// hijack Slider stop handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function()
	{ this.coreStop.apply(this,arguments); this.element.style.overflow = "visible"; }

// TW2.2+
// hijack Morpher stop handler so sliderPanel/floatingPanel overflow is visible after animation has completed
if (version.major+.1*version.minor+.01*version.revision>=2.2) {
	Morpher.prototype.coreStop = Morpher.prototype.stop;
	Morpher.prototype.stop = function() {
		this.coreStop.apply(this,arguments);
		var e=this.element;
		if (hasClass(e,"sliderPanel")||hasClass(e,"floatingPanel")) {
			// adjust panel overflow and position after animation
			e.style.overflow = "visible";
			if (window.adjustSliderPos) window.adjustSliderPos(e.parentNode,e.button,e);
		}
	};
}
//}}}
This is version 2.1 of TiddlyWiki, first released on 29th September 2006. Because it's so new, existing users should consider exercising caution when upgrading critical documents. New in this release:
* ImportTiddlers macro to make InstallingPlugins and sharing content easier
* PluginManager to give better visibility and control of TiddlyWiki's powerful [[Plugins]] mechanism
* The TiddlySaver Java applet to allow saving on a range of platforms including [[Opera]] and [[Safari]]
** There's also been fixes to enable saving on [[Minimo|http://maemo.org/maemowiki/ApplicationCatalog2006#head-5bed53fbc18e9a9dae80c3476e2312358baf0ec3]] on the Nokia 770
* A ColorPalette to make it easy to [[customise TiddlyWiki's default color scheme|AlternativeColorPalette]]
* TiddlerSlicing for getting at chunks of tiddlers
* Proper em-dash formatting -- like this
* Loads and loads of minor new features and enhancements for end users and plugin deverlopers - see the full [[release note|http://trac.tiddlywiki.org/tiddlywiki/wiki/ReleaseNoteTwoPointOne]] on http://tiddlywiki.org for more details
/***
|''Name:''|NewerTiddlerPlugin|
|''Version:''|$Revision: 13 $ |
|''Source:''|http://thePettersons.org/tiddlywiki.html#NewerTiddlerPlugin |
|''Author:''|[[Paul Petterson]] |
|''Type:''|Macro Extension |
|''Requires:''|TiddlyWiki 1.2.33 or higher |
!Description
Create a 'new tiddler' button with lots more options! Specify the text to show on the button, the name of the new tiddler (with date macro expansion), one or more tags for the new tiddlers, and what text if any to include in the new tiddler body! Uses a named parameter format, simalar to the reminder plugin.

Also - if the tiddler already exists it won't replace any of it's existing data (like tags).

!Syntax
* {{{<<newerTiddler button:"Inbox" name:"Inbox YYYY/MM/DD" tags:"Journal, inbox" text:"New stuff for today:">>}}}
* {{{<<newerTiddler button:"@Action" name:"Action: what" tags:"@Action" text:"Add project and describe action">>}}}
* {{{<<newerTiddler button:"New Project" name:"Project Name?" tags:"My Projects, My Inbox, Journal" template:"MyTemplate">>}}}
!!Parameters
* name:"Name of Tiddler"
* tags:"Tag1, Tag2, Tag3" - tags for new tiddler, comma seperated //don't use square brackets //({{{[[}}})// for tags!//
* button:"name for button" - the name to display instead of "new tiddler"
* body:"what to put in the tiddler body"
* template:"Name of a tiddler containing the text to use as the body of the new tiddler"

''Note:'' if you sepecify both body and template parameters, then template parameter will be used and the body parameter overridden.

!Sample Output
* <<newerTiddler button:"Inbox" name:"Inbox YYYY/MM/DD" tags:"Journal inbox" text:"New stuff for today:">>
* <<newerTiddler button:"@Action" name:"Action: what" tags:"@Action" text:"Add project and describe action">>
* <<newerTiddler button:"New Project" name:"Project Name?" tags:"[[My Projects]] [[My Inbox]] Journal" template:"MyTemplate">>

!Todo
<<projectTemplate>>

!Known issues
* Must use double quotes (") around parameter values if they contain a space, can't use single quotes (').
* can't use standard bracketted style tags, ust type in the tags space and all and put a comma between them. For example tags:"one big tag, another big tag" uses 2 tags ''one big tag'' and ''another big tag''.

!Notes
* It works fine, and I use it daily, however I haven't really tested edge cases or multiple platforms. If you run into bugs or problems, let me know!

!Requests
* Have delta-date specifiers on the name: name:"Inbox YYY/MM/DD+1" ( ceruleat@gmail.com )
* Option to just open the tiddler instead of immediately edit it ( ceruleat@gmail.com )
* Have date formatters in tags as well as in name (me)

!Revision history
$History: PaulsNotepad.html $
 * 
 * ***************** Version 2 *****************
 * User: paulpet Date: 2/26/06 Time: 7:25p
 * Updated in $/PaulsNotepad3.0.root/PaulsNotepad3.0/PaulsPlugins/systemConfig
 * Port to tw2.0, bug fixes, and simplification!
v1.0.2 (not released) - fixed small documentation issues.
v1.0.1 October 13th - fixed a bug occurring only in FF
v1.0 October 11th - Initial public release
v0.8 October 10th - Feature complete... 
v0.7 Initial public preview

!Code
***/
//{{{
config.macros.newerTiddler = { 
name:"New(er) Tiddler",
tags:"",
text:"Type Tiddler Contents Here.",
button:"new(er) tiddler",

reparse: function( params ) {
 var re = /([^:\'\"\s]+)(?::([^\'\":\s]+)|:[\'\"]([^\'\"\\]*(?:\\.[^\'\"\\]*)*)[\'\"])?(?=\s|$)/g;
 var ret = new Array() ;
 var m ;

 while( (m = re.exec( params )) != null )
 ret[ m[1] ] = m[2]?m[2]:m[3]?m[3]:true ;

 return ret ;
},
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
 if ( readOnly ) return ;

 var input = this.reparse( paramString ) ;
 var tiddlerName = input["name"]?input["name"].trim():config.macros.newerTiddler.name ;
 var tiddlerTags = input["tags"]?input["tags"]:config.macros.newerTiddler.tags ;
 var tiddlerBody = input["text"]?input["text"]:config.macros.newerTiddler.text ;
 var buttonText = input["button"]?input["button"]:config.macros.newerTiddler.button ;
 var template = input["template"]?input["template"]:null;

 // if there is a template, use it - otherwise use the tiddlerBody text
 if ( template ) {
 tiddlerBody = store.getTiddlerText( template );
 }
 if ( tiddlerBody == null || tiddlerBody.length == 0 )
 tiddlerBody = config.macros.newerTiddler.text ;

 // mptw hack
 tiddlerBody = tiddlerBody.replace(/\$\)\)/g,">>");
 tiddlerBody = tiddlerBody.replace(/\$\}\}/g,">>");

 var now = new Date() ;
 tiddlerName = now.formatString( tiddlerName ) ;
 
 createTiddlyButton( place, buttonText, "", function() {
 var exists = store.tiddlerExists( tiddlerName );
 var t = store.createTiddler( tiddlerName );
 if ( ! exists )
 t.assign( tiddlerName, tiddlerBody, config.views.wikified.defaultModifier, now, tiddlerTags.readBracketedList() );
 
 story.displayTiddler(null,tiddlerName,DEFAULT_EDIT_TEMPLATE);
 story.focusTiddler(tiddlerName,"title");
 return false;
 });
}}
//}}}
/***
This plugin is released under the [[Creative Commons Attribution 2.5 License|http://creativecommons.org/licenses/by/2.5/]]
***/

<!--- More ideas shamesslessly begged, borrowed or stolen from..... Simon Baird, Clint Checketts and Christine Hodges :)) --->
<!--{{{-->
<div class='header' macro="gradient vert #00005a #0000ad">
 <div id='topMenu'>
 <span refresh='content' tiddler='SiteTitle'></span><span refresh='content' tiddler='MainMenu'></span></div>
 </div>
</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>
<span style='display:none' macro='tiddler ToggleTopButton'></span>
<!--}}}-->
/***
|<html><a name="Top"/></html>''Name:''|PartTiddlerPlugin|
|''Version:''|1.0.9 (2007-07-14)|
|''Source:''|http://tiddlywiki.abego-software.de/#PartTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license]]|
|''CoreVersion:''|2.1.3|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|
!Table of Content<html><a name="TOC"/></html>
* <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Description',null, event)">Description, Syntax</a></html>
* <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Applications',null, event)">Applications</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('LongTiddler',null, event)">Refering to Paragraphs of a Longer Tiddler</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Citation',null, event)">Citation Index</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('TableCells',null, event)">Creating "multi-line" Table Cells</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Tabs',null, event)">Creating Tabs</a></html>
** <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Sliders',null, event)">Using Sliders</a></html>
* <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Revisions',null, event)">Revision History</a></html>
* <html><a href="javascript:;" onclick="window.scrollAnchorVisible('Code',null, event)">Code</a></html>
!Description<html><a name="Description"/></html>
With the {{{<part aPartName> ... </part>}}} feature you can structure your tiddler text into separate (named) parts. 
Each part can be referenced as a "normal" tiddler, using the "//tiddlerName//''/''//partName//" syntax (e.g. "About/Features"). E.g. you may create links to the parts (e.g. {{{[[Quotes/BAX95]]}}} or {{{[[Hobbies|AboutMe/Hobbies]]}}}), use it in {{{<<tiddler...>>}}} or {{{<<tabs...>>}}} macros etc.


''Syntax:'' 
|>|''<part'' //partName// [''hidden''] ''>'' //any tiddler content// ''</part>''|
|//partName//|The name of the part. You may reference a part tiddler with the combined tiddler name "//nameOfContainerTidder//''/''//partName//. <<br>>If you use a partName containing spaces you need to quote it (e.g. {{{"Major Overview"}}} or {{{[[Shortcut List]]}}}).|
|''hidden''|When defined the content of the part is not displayed in the container tiddler. But when the part is explicitly referenced (e.g. in a {{{<<tiddler...>>}}} macro or in a link) the part's content is displayed.|
|<html><i>any&nbsp;tiddler&nbsp;content</i></html>|<html>The content of the part.<br>A part can have any content that a "normal" tiddler may have, e.g. you may use all the formattings and macros defined.</html>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|
<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!Applications<html><a name="Applications"/></html>
!!Refering to Paragraphs of a Longer Tiddler<html><a name="LongTiddler"/></html>
Assume you have written a long description in a tiddler and now you want to refer to the content of a certain paragraph in that tiddler (e.g. some definition.) Just wrap the text with a ''part'' block, give it a nice name, create a "pretty link" (like {{{[[Discussion Groups|Introduction/DiscussionGroups]]}}}) and you are done.

Notice this complements the approach to first writing a lot of small tiddlers and combine these tiddlers to one larger tiddler in a second step (e.g. using the {{{<<tiddler...>>}}} macro). Using the ''part'' feature you can first write a "classic" (longer) text that can be read "from top to bottom" and later "reuse" parts of this text for some more "non-linear" reading.

<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!!Citation Index<html><a name="Citation"/></html>
Create a tiddler "Citations" that contains your "citations". 
Wrap every citation with a part and a proper name. 

''Example''
{{{
<part BAX98>Baxter, Ira D. et al: //Clone Detection Using Abstract Syntax Trees.// 
in //Proc. ICSM//, 1998.</part>

<part BEL02>Bellon, Stefan: //Vergleich von Techniken zur Erkennung duplizierten Quellcodes.// 
Thesis, Uni Stuttgart, 2002.</part>

<part DUC99>Ducasse, Stéfane et al: //A Language Independent Approach for Detecting Duplicated Code.// 
in //Proc. ICSM//, 1999.</part>
}}}

You may now "cite" them just by using a pretty link like {{{[[Citations/BAX98]]}}} or even more pretty, like this {{{[[BAX98|Citations/BAX98]]}}}.

<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!!Creating "multi-line" Table Cells<html><a name="TableCells"/></html>
You may have noticed that it is hard to create table cells with "multi-line" content. E.g. if you want to create a bullet list inside a table cell you cannot just write the bullet list
{{{
* Item 1
* Item 2
* Item 3
}}}
into a table cell (i.e. between the | ... | bars) because every bullet item must start in a new line but all cells of a table row must be in one line.

Using the ''part'' feature this problem can be solved. Just create a hidden part that contains the cells content and use a {{{<<tiddler >>}}} macro to include its content in the table's cell.

''Example''
{{{
|!Subject|!Items|
|subject1|<<tiddler ./Cell1>>|
|subject2|<<tiddler ./Cell2>>|

<part Cell1 hidden>
* Item 1
* Item 2
* Item 3
</part>
...
}}}

Notice that inside the {{{<<tiddler ...>>}}} macro you may refer to the "current tiddler" using the ".".

BTW: The same approach can be used to create bullet lists with items that contain more than one line.

<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!!Creating Tabs<html><a name="Tabs"/></html>
The build-in {{{<<tabs ...>>}}} macro requires that you defined an additional tiddler for every tab it displays. When you want to have "nested" tabs you need to define a tiddler for the "main tab" and one for every tab it contains. I.e. the definition of a set of tabs that is visually displayed at one place is distributed across multiple tiddlers.

With the ''part'' feature you can put the complete definition in one tiddler, making it easier to keep an overview and maintain the tab sets.

''Example''
The standard tabs at the sidebar are defined by the following eight tiddlers:
* SideBarTabs
* TabAll
* TabMore
* TabMoreMissing
* TabMoreOrphans
* TabMoreShadowed
* TabTags
* TabTimeline

Instead of these eight tiddlers one could define the following SideBarTabs tiddler that uses the ''part'' feature:
{{{
<<tabs txtMainTab 
 Timeline Timeline SideBarTabs/Timeline 
 All 'All tiddlers' SideBarTabs/All 
 Tags 'All tags' SideBarTabs/Tags 
 More 'More lists' SideBarTabs/More>>
<part Timeline hidden><<timeline>></part>
<part All hidden><<list all>></part>
<part Tags hidden><<allTags>></part>
<part More hidden><<tabs txtMoreTab 
 Missing 'Missing tiddlers' SideBarTabs/Missing 
 Orphans 'Orphaned tiddlers' SideBarTabs/Orphans 
 Shadowed 'Shadowed tiddlers' SideBarTabs/Shadowed>></part>
<part Missing hidden><<list missing>></part>
<part Orphans hidden><<list orphans>></part>
<part Shadowed hidden><<list shadowed>></part>
}}}

Notice that you can easily "overwrite" individual parts in separate tiddlers that have the full name of the part.

E.g. if you don't like the classic timeline tab but only want to see the 100 most recent tiddlers you could create a tiddler "~SideBarTabs/Timeline" with the following content:
{{{
<<forEachTiddler 
 sortBy 'tiddler.modified' descending 
 write '(index < 100) ? "* [["+tiddler.title+"]]\n":""'>>
}}}
<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!!Using Sliders<html><a name="Sliders"/></html>
Very similar to the build-in {{{<<tabs ...>>}}} macro (see above) the {{{<<slider ...>>}}} macro requires that you defined an additional tiddler that holds the content "to be slid". You can avoid creating this extra tiddler by using the ''part'' feature

''Example''
In a tiddler "About" we may use the slider to show some details that are documented in the tiddler's "Details" part.
{{{
...
<<slider chkAboutDetails About/Details details "Click here to see more details">>
<part Details hidden>
To give you a better overview ...
</part>
...
}}}

Notice that putting the content of the slider into the slider's tiddler also has an extra benefit: When you decide you need to edit the content of the slider you can just doubleclick the content, the tiddler opens for editing and you can directly start editing the content (in the part section). In the "old" approach you would doubleclick the tiddler, see that the slider is using tiddler X, have to look for the tiddler X and can finally open it for editing. So using the ''part'' approach results in a much short workflow.

<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!Revision history<html><a name="Revisions"/></html>
* v1.0.9 (2007-07-14)
** Bugfix: Error when using the SideBarTabs example and switching between "More" and "Shadow". Thanks to cmari for reporting the issue.
* v1.0.8 (2007-06-16)
** Speeding up display of tiddlers containing multiple pard definitions. Thanks to Paco Rivière for reporting the issue.
** Support "./partName" syntax inside <<tabs ...>> macro
* v1.0.7 (2007-03-07)
** Bugfix: <<tiddler "./partName">> does not always render correctly after a refresh (e.g. like it happens when using the "Include" plugin). Thanks to Morris Gray for reporting the bug.
* v1.0.6 (2006-11-07)
** Bugfix: cannot edit tiddler when UploadPlugin by Bidix is installed. Thanks to José Luis González Castro for reporting the bug.
* v1.0.5 (2006-03-02)
** Bugfix: Example with multi-line table cells does not work in IE6. Thanks to Paulo Soares for reporting the bug.
* v1.0.4 (2006-02-28)
** Bugfix: Shadow tiddlers cannot be edited (in TW 2.0.6). Thanks to Torsten Vanek for reporting the bug.
* v1.0.3 (2006-02-26)
** Adapt code to newly introduced Tiddler.prototype.isReadOnly() function (in TW 2.0.6). Thanks to Paulo Soares for reporting the problem.
* v1.0.2 (2006-02-05)
** Also allow other macros than the "tiddler" macro use the "." in the part reference (to refer to "this" tiddler)
* v1.0.1 (2006-01-27)
** Added Table of Content for plugin documentation. Thanks to RichCarrillo for suggesting.
** Bugfix: newReminder plugin does not work when PartTiddler is installed. Thanks to PauloSoares for reporting.
* v1.0.0 (2006-01-25)
** initial version
<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!Code<html><a name="Code"/></html>
<html><sub><a href="javascript:;" onclick="window.scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>
***/
//{{{
//============================================================================
// PartTiddlerPlugin

// Ensure that the PartTiddler Plugin is only installed once.
//
if (!version.extensions.PartTiddlerPlugin) {



version.extensions.PartTiddlerPlugin = {
 major: 1, minor: 0, revision: 9,
 date: new Date(2007, 6, 14), 
 type: 'plugin',
 source: "http://tiddlywiki.abego-software.de/#PartTiddlerPlugin"
};

if (!window.abego) window.abego = {};
if (version.major < 2) alertAndThrow("PartTiddlerPlugin requires TiddlyWiki 2.0 or newer.");

//============================================================================
// Common Helpers

// Looks for the next newline, starting at the index-th char of text. 
//
// If there are only whitespaces between index and the newline 
// the index behind the newline is returned, 
// otherwise (or when no newline is found) index is returned.
//
var skipEmptyEndOfLine = function(text, index) {
 var re = /(\n|[^\s])/g;
 re.lastIndex = index;
 var result = re.exec(text);
 return (result && text.charAt(result.index) == '\n') 
 ? result.index+1
 : index;
}


//============================================================================
// Constants

var partEndOrStartTagRE = /(<\/part>)|(<part(?:\s+)((?:[^>])+)>)/mg;
var partEndTagREString = "<\\/part>";
var partEndTagString = "</part>";

//============================================================================
// Plugin Specific Helpers

// Parse the parameters inside a <part ...> tag and return the result.
//
// @return [may be null] {partName: ..., isHidden: ...}
//
var parseStartTagParams = function(paramText) {
 var params = paramText.readMacroParams();
 if (params.length == 0 || params[0].length == 0) return null;
 
 var name = params[0];
 var paramsIndex = 1;
 var hidden = false;
 if (paramsIndex < params.length) {
 hidden = params[paramsIndex] == "hidden";
 paramsIndex++;
 }
 
 return {
 partName: name, 
 isHidden: hidden
 };
}

// Returns the match to the next (end or start) part tag in the text, 
// starting the search at startIndex.
// 
// When no such tag is found null is returned, otherwise a "Match" is returned:
// [0]: full match
// [1]: matched "end" tag (or null when no end tag match)
// [2]: matched "start" tag (or null when no start tag match)
// [3]: content of start tag (or null if no start tag match)
//
var findNextPartEndOrStartTagMatch = function(text, startIndex) {
 var re = new RegExp(partEndOrStartTagRE);
 re.lastIndex = startIndex;
 var match = re.exec(text);
 return match;
}

//============================================================================
// Formatter

// Process the <part ...> ... </part> starting at (w.source, w.matchStart) for formatting.
//
// @return true if a complete part section (including the end tag) could be processed, false otherwise.
//
var handlePartSection = function(w) {
 var tagMatch = findNextPartEndOrStartTagMatch(w.source, w.matchStart);
 if (!tagMatch) return false;
 if (tagMatch.index != w.matchStart || !tagMatch[2]) return false;

 // Parse the start tag parameters
 var arguments = parseStartTagParams(tagMatch[3]);
 if (!arguments) return false;
 
 // Continue processing
 var startTagEndIndex = skipEmptyEndOfLine(w.source, tagMatch.index + tagMatch[0].length);
 var endMatch = findNextPartEndOrStartTagMatch(w.source, startTagEndIndex);
 if (endMatch && endMatch[1]) {
 if (!arguments.isHidden) {
 w.nextMatch = startTagEndIndex;
 w.subWikify(w.output,partEndTagREString);
 }
 w.nextMatch = skipEmptyEndOfLine(w.source, endMatch.index + endMatch[0].length);
 
 return true;
 }
 return false;
}

config.formatters.push( {
 name: "part",
 match: "<part\\s+[^>]+>",
 
 handler: function(w) {
 if (!handlePartSection(w)) {
 w.outputText(w.output,w.matchStart,w.matchStart+w.matchLength);
 }
 }
} )

//============================================================================
// Extend "fetchTiddler" functionality to also recognize "part"s of tiddlers 
// as tiddlers.

var currentParent = null; // used for the "." parent (e.g. in the "tiddler" macro)

// Return the match to the first <part ...> tag of the text that has the
// requrest partName.
//
// @return [may be null]
//
var findPartStartTagByName = function(text, partName) {
 var i = 0;
 
 while (true) {
 var tagMatch = findNextPartEndOrStartTagMatch(text, i);
 if (!tagMatch) return null;

 if (tagMatch[2]) {
 // Is start tag
 
 // Check the name
 var arguments = parseStartTagParams(tagMatch[3]);
 if (arguments && arguments.partName == partName) {
 return tagMatch;
 }
 }
 i = tagMatch.index+tagMatch[0].length;
 }
}

// Return the part "partName" of the given parentTiddler as a "readOnly" Tiddler 
// object, using fullName as the Tiddler's title. 
//
// All remaining properties of the new Tiddler (tags etc.) are inherited from 
// the parentTiddler.
// 
// @return [may be null]
//
var getPart = function(parentTiddler, partName, fullName) {
 var text = parentTiddler.text;
 var startTag = findPartStartTagByName(text, partName);
 if (!startTag) return null;
 
 var endIndexOfStartTag = skipEmptyEndOfLine(text, startTag.index+startTag[0].length);
 var indexOfEndTag = text.indexOf(partEndTagString, endIndexOfStartTag);

 if (indexOfEndTag >= 0) {
 var partTiddlerText = text.substring(endIndexOfStartTag,indexOfEndTag);
 var partTiddler = new Tiddler();
 partTiddler.set(
 fullName,
 partTiddlerText,
 parentTiddler.modifier,
 parentTiddler.modified,
 parentTiddler.tags,
 parentTiddler.created);
 partTiddler.abegoIsPartTiddler = true;
 return partTiddler;
 }
 
 return null;
}

// Hijack the store.fetchTiddler to recognize the "part" addresses.
//
var hijackFetchTiddler = function() {
 var oldFetchTiddler = store.fetchTiddler ;
 store.fetchTiddler = function(title) {
 var result = oldFetchTiddler.apply(this, arguments);
 if (!result && title) {
 var i = title.lastIndexOf('/');
 if (i > 0) {
 var parentName = title.substring(0, i);
 var partName = title.substring(i+1);
 var parent = (parentName == ".") 
 ? store.resolveTiddler(currentParent)
 : oldFetchTiddler.apply(this, [parentName]);
 if (parent) {
 return getPart(parent, partName, parent.title+"/"+partName);
 }
 }
 }
 return result; 
 };
};

// for debugging the plugin is not loaded through the systemConfig mechanism but via a script tag. 
// At that point in the "store" is not yet defined. In that case hijackFetchTiddler through the restart function.
// Otherwise hijack now.
if (!store) {
 var oldRestartFunc = restart;
 window.restart = function() {
 hijackFetchTiddler();
 oldRestartFunc.apply(this,arguments);
 };
} else
 hijackFetchTiddler();




// The user must not edit a readOnly/partTiddler
//

config.commands.editTiddler.oldIsReadOnlyFunction = Tiddler.prototype.isReadOnly;

Tiddler.prototype.isReadOnly = function() {
 // Tiddler.isReadOnly was introduced with TW 2.0.6.
 // For older version we explicitly check the global readOnly flag
 if (config.commands.editTiddler.oldIsReadOnlyFunction) {
 if (config.commands.editTiddler.oldIsReadOnlyFunction.apply(this, arguments)) return true;
 } else {
 if (readOnly) return true;
 }

 return this.abegoIsPartTiddler;
}

config.commands.editTiddler.handler = function(event,src,title)
{
 var t = store.getTiddler(title);
 // Edit the tiddler if it either is not a tiddler (but a shadowTiddler)
 // or the tiddler is not readOnly
 if(!t || !t.abegoIsPartTiddler)
 {
 clearMessage();
 story.displayTiddler(null,title,DEFAULT_EDIT_TEMPLATE);
 story.focusTiddler(title,"text");
 return false;
 }
}

// To allow the "./partName" syntax in macros we need to hijack 
// the invokeMacro to define the "currentParent" while it is running.
// 
var oldInvokeMacro = window.invokeMacro;
function myInvokeMacro(place,macro,params,wikifier,tiddler) {
 var oldCurrentParent = currentParent;
 if (tiddler) currentParent = tiddler;
 try {
 oldInvokeMacro.apply(this, arguments);
 } finally {
 currentParent = oldCurrentParent;
 }
}
window.invokeMacro = myInvokeMacro;

// To correctly support the "./partName" syntax while refreshing we need to hijack 
// the config.refreshers.tiddlers to define the "currentParent" while it is running.
// 
(function() {
 var oldTiddlerRefresher= config.refreshers.tiddler;
 config.refreshers.tiddler = function(e,changeList) {
 var oldCurrentParent = currentParent;
 try {
 currentParent = e.getAttribute("tiddler");
 return oldTiddlerRefresher.apply(this,arguments);
 } finally {
 currentParent = oldCurrentParent;
 }
 };
})();

// Support "./partName" syntax inside <<tabs ...>> macro
(function() {
 var extendRelativeNames = function(e, title) {
 var nodes = e.getElementsByTagName("a");
 for(var i=0; i<nodes.length; i++) {
 var node = nodes[i];
 var s = node.getAttribute("content");
 if (s && s.indexOf("./") == 0)
 node.setAttribute("content",title+s.substr(1));
 }
 };
 var oldHandler = config.macros.tabs.handler;
 config.macros.tabs.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var result = oldHandler.apply(this,arguments);
 if (tiddler)
 extendRelativeNames(place, tiddler.title);
 return result;
 };
})();

// Scroll the anchor anchorName in the viewer of the given tiddler visible.
// When no tiddler is defined use the tiddler of the target given event is used.
window.scrollAnchorVisible = function(anchorName, tiddler, evt) {
 var tiddlerElem = null;
 if (tiddler) {
 tiddlerElem = document.getElementById(story.idPrefix + tiddler);
 }
 if (!tiddlerElem && evt) {
 var target = resolveTarget(evt);
 tiddlerElem = story.findContainingTiddler(target);
 }
 if (!tiddlerElem) return;

 var children = tiddlerElem.getElementsByTagName("a");
 for (var i = 0; i < children.length; i++) {
 var child = children[i];
 var name = child.getAttribute("name");
 if (name == anchorName) {
 var y = findPosY(child);
 window.scrollTo(0,y);
 return;
 }
 }
}

} // of "install only once"
//}}}

/***
<html><sub><a href="javascript:;" onclick="scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>

!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2006 ([[www.abego-software.de|http://www.abego-software.de]])

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

<html><sub><a href="javascript:;" onclick="scrollAnchorVisible('Top',null, event)">[Top]</sub></a></html>
***/
/***
|''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"
	});
*/
//}}}
When a TiddlyWiki is located on the web (view over http), for security reasons, browsers do not allow TiddlyWiki to access a remote page located on a different site.

For example, when views over http a TiddlyWiki is unable to:
*import a plugin using EricShulman's ImportTiddlersPlugin
*access <<tag RSSFeeds>> with RSSReaderPlugin
*imbed a remote page in a tiddler
* ...

A first possibility is to bypass the browser check. However, visitors usually are not comfortable with altering the security options of their browser. 

The ProxyService tries to provide an other way. 

ProxyService is mainly a Ruby script that implements a very simple proxy.  The command: proxy.cgi?url=host.domain.com/some/page.html simply gets and returns the URL.

Nevertheless, this service should not be used for other purpose than as TiddlyWiki companion and under the author's control, the access is allowed only to a list of site contained in a separate file ([[allowedsites]] for example) and to hosts of the current domain.

Thanks to UploadToFileMacro, this allowedSiteList could be fully maintained in TiddlyWiki by editing [[allowedsites]] and using <<uploadToFile allowedsites allowedsites>> macro.

Long past, Eric included in his ImportTiddlersPlugin the ability to specify a proxy URL as a parameter SiteProxy could be provide to initialize it.

Finally, as in AllowedSiteList proxy.cgi?action=list return the current allowed host list.
This package provides a toolbar of interactive 'power tools' that you can use while editing a tiddler to quickly insert TiddlyWiki tiddler links, images, macros, etc. or common formatting sequences directly into tiddler content, as well as perform other functions (such as find/replace, sort, split, convert, etc.) that can be used to modify the current tiddler's source content in a variety of ways.

<<tiddler QuickEditToolbar with: show>>
!!!!!Installation:
<<<
Individual ~QuickEdit buttons are defined in separate tiddlers (e.g., [[QuickEdit_replace]]) that have also been //transcluded// into a single toolbar definition named [[QuickEditToolbar]].  You can edit this definition to add, remove, or rearrange the toolbar buttons to best suit your needs, and then embed the [[QuickEditToolbar]] tiddler into your document's [[EditTemplate]], like this:
{{{
<div macro='tiddler QuickEditToolbar'></div>
}}}
Next, in order to support some of the formatting 'shortcuts' provided by the toolbar, add a reference to the shortcuts CSS class definitions in your [[StyleSheet]]:
{{{
[[StyleSheetShortcuts]]
}}}
By default, the QuickEdit toolbar is hidden until you enable it by using the ''toggleQuickEdit'' command, which you can add to the ~EditToolbar definition in [[ToolbarCommands]]:
{{{
|EditToolbar|... toggleQuickEdit ...|
}}}
You can also toggle the ~QuickEdit toolbar display via a single checkbox option that can be added to [[SideBarOptions]] (or any other desired location):
{{{
<<option chkShowQuickEdit>> show QuickEdit toolbar
}}}
Note: You can 'hard-code' the ''chkShowQuickEdit'' setting, so that the toolbar will be //initially// displayed, by creating a tiddler (e.g., ConfigTweaks), tagged with <<tag systemConfig>>, containing:
{{{
config.options.chkShowQuickEdit=true;
}}}
Alternatively, if you want the toolbar to //always// be displayed, regardless of the option setting, you can add a special keyword, ''show'', to the [[EditTemplate]] syntax, like this:
{{{
<div macro='tiddler QuickEditToolbar with: show'></div>
}}}
<<<
/***
|Name|QuickEditPlugin|
|Source|http://www.TiddlyTools.com/#QuickEditPlugin|
|Documentation|http://www.TiddlyTools.com/#QuickEditPlugin|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Support functions for ~QuickEdit package: styles, utility functions, and 'toggleQuickEdit' command|
!!!!!Revisions
<<<
2009.06.11 [2.4.3] added keyup() function to abbreviate listbox handling for CR and ESC
2009.05.07 [2.4.2] added processed() function to abbreviate event handler code
2008.09.07 [2.4.1] added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.05.17 [2.4.0] copied code from StickyPopupPlugin to remove dependency
2008.05.12 [2.3.0] added "toggleQuickEdit" command handler (replaces inline script command)
2008.01.11 [2.2.0] converted from inline script
2007.03.29 [1.0.0] initial release (as inline script)
<<<
!!!!!Code
***/
//{{{
version.extensions.QuickEditPlugin= {major: 2, minor: 4, revision: 3, date: new Date(2009,6,11)};

// SET STYLESHEET
setStylesheet("\
.quickEdit a { border:2px outset ButtonFace; padding:0px 3px !important; \
	-moz-border-radius:.5em; -webkit-border-radius:.5em; \
	-moz-appearance:button !important; -webkit-appearance:push-button !important; \
	background-color:ButtonFace; color:ButtonText !important;  \
	line-height:200%; font-weight:normal; } \
.quickEdit a:hover { border: 2px inset ButtonFace; background-color:ButtonFace; }\
", "quickEditStyles");

// REMOVE COOKIE
if (window.removeCookie===undefined) {
	window.removeCookie=function(name) {
		document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;'; 
	}
}

// UTILITY FUNCTIONS
config.quickEdit = {
	processed: function(ev) { ev=ev||window.event;
		ev.cancelBubble=true;
		if(ev.stopPropagation) ev.stopPropagation();
		return false;
	},
	keyup: function(ev){ var k=(ev||window.event).keyCode;
		if (k==13) this.onclick();
		if (k==27) Popup.remove();
	},
	getField: function(where) {
		var here=story.findContainingTiddler(where); if (!here) return null;
		var e=story.getTiddlerField(here.getAttribute("tiddler"),"text");
		if (e&&e.getAttribute("edit")=="text") return e;
		return null;
	},
	setSelection: function(where,newtext) {
		var e=this.getField(where); if (!e) return false;
		e.focus(); replaceSelection(e,newtext);
		return false;
	},
	wrapSelection: function(where,before,after) {
		var e=this.getField(where); if (!e) return false;
		e.focus(); replaceSelection(e,before+config.quickEdit.getSelection(e)+after);
		return false;
	},
	getSelection: function(e) {
		var seltext="";
		if (e&&e.setSelectionRange)
			seltext=e.value.substr(e.selectionStart,e.selectionEnd-e.selectionStart);
		else if (document.selection) {
			var range = document.selection.createRange();
			if (range.parentElement()==e) seltext=range.text
		}
		return seltext;
	},
	promptForFilename: function(msg,path,file) {
		if(window.Components) { // moz
			try {
				netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
				var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
				var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
				picker.init(window, msg, nsIFilePicker.modeOpen);
				var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
				thispath.initWithPath(path);
				picker.displayDirectory=thispath;
				picker.defaultExtension='jpg';
				picker.defaultString=file;
				picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterImages);
				if (picker.show()!=nsIFilePicker.returnCancel)
					var result="file:///"+picker.file.persistentDescriptor.replace(/\\/g,'/');
			}
			catch(e) { alert('error during local file access: '+e.toString()) }
		}
		else { // IE
			try { // XP only
				var s = new ActiveXObject('UserAccounts.CommonDialog');
				s.Filter='All files|*.*|JPG files|*.jpg|GIF files|*.gif|PNG files|*.png|';
				s.FilterIndex=1; // default to JPG
				s.InitialDir=path;
				s.FileName=file;
				if (s.showOpen()) var result=s.FileName;
			}
			catch(e) { var result=prompt(msg,path+file); } // fallback for non-XP IE
		}
		return result;
	}
}
//}}}

//{{{
if (config.options.chkShowQuickEdit===undefined) config.options.chkShowQuickEdit=false;
config.commands.toggleQuickEdit = {
	hideReadOnly: true,
	getText: function() { return config.options.chkShowQuickEdit?'\u221Aquickedit':'quickedit'; },

	tooltip: 'show QuickEdit toolbar buttons',
	handler: function(event,src,title) {
		var opt='chkShowQuickEdit';
		config.options[opt]=!config.options[opt];
		config.macros.option.propagateOption(opt,"checked", config.options[opt],"input");
		if (config.options[opt]) saveOptionCookie(opt);	else removeCookie(opt);
		src.innerHTML=config.commands.toggleQuickEdit.getText();
		story.forEachTiddler(function(t,e){if (story.isDirty(t)) refreshElements(e);});
		return false;
	}
};
//}}}

// // COPIED FROM [[StickyPopupPlugin]] TO ELIMINATE PLUGIN DEPENDENCY
//{{{
if (config.options.chkStickyPopups==undefined) config.options.chkStickyPopups=false;
Popup.stickyPopup_onDocumentClick = function(ev)
{
	// if click is in a sticky popup, ignore it so popup will remain visible
	var e = ev ? ev : window.event; var target = resolveTarget(e);
	var p=target; while (p) {
		if (hasClass(p,"popup") && (hasClass(p,"sticky")||config.options.chkStickyPopups)) break;
		else p=p.parentNode;
	}
	if (!p) // not in sticky popup (or sticky popups disabled)... use normal click handling
		Popup.onDocumentClick(ev);
	return true;
};
try{removeEvent(document,"click",Popup.onDocumentClick);}catch(e){};
try{addEvent(document,"click",Popup.stickyPopup_onDocumentClick);}catch(e){};
//}}}
/%
|Name|QuickEditToolbar|
|Source|http://www.TiddlyTools.com/#QuickEditToolbar|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.2|
|Type|transclusion|
|Requires|QuickEditPlugin|
|Optional|QuickEdit_*|
|Description|format/insert TiddlyWiki content using toolbar buttons|

Usage:
* install [[QuickEditPlugin]] (runtime support functions)

* add the toolbar to [[EditTemplate]]:
	<div macro='tiddler QuickEditToolbar with: show'></div>

* 'show' (optional) forces the toolbar to always be displayed or,
  omit keyword and use <<option chkShowQuickEdit>> setting

* selected QuickEdit buttons can also be added individually to the
  regular tiddler toolbar by adding references directly in [[EditTemplate]]:
	<span class='toolbar' macro='tiddler QuickEdit_...'></span>

* see [[QuickEditPackage]] for additional installation options

%/{{hidden fine center quickEdit{
<<tiddler {{ // show/hide toolbar
	var here=story.findContainingTiddler(place); if (here) var tid=here.getAttribute('tiddler');
	var show='$1'!='$'+'1'||config.options.chkShowQuickEdit||tid=='QuickEditToolbar'; 
	place.style.display=show?'block':'none';
'';}}>>/%

TOOLBAR DEFINITION - add, remove, or re-order items as desired:
= = = = = = = = = =
%/<<tiddler QuickEdit_replace>>/%
%/<<tiddler QuickEdit_split>>/%
%/<<tiddler QuickEdit_sort>>/%
%/<<tiddler QuickEdit_convert>>/%
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_link>>/%
%/<<tiddler QuickEdit_insert>>/%
%/<<tiddler QuickEdit_macro>>/%
%/<<tiddler QuickEdit_image>>/%
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_format>>/%
%/<<tiddler QuickEdit_align>>/%
%/<<tiddler QuickEdit_color>>/%
%/<<tiddler QuickEdit_font>>/%
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_list>>/% ## krk
%/ &nbsp;/% (SPACER)
%/<<tiddler QuickEdit_custom>>/%
%/}}}
@@color:#C00;''情報が古いので現状組込まれている [[QuickEditToolbar|QuickEditToolbar]] とは食い違いがあります、いずれ修正します。''@@

tiddler 編集を補助するツールを提供するスクリプト。
前提として以下が必要となる。
*[[NestedSlidersPlugin]] (スライダを使えるようにする plugin) ~~[+] Ver 2.3.1 が必要です~~
*[[InlineJavascriptPlugin]] (tiddler 内で JavaScript が使えるようにする plugin)
また、quicklink 機能を使うならば
*[[GotoPlugin]] (目的の tiddler を簡単検索、ジャンプするための plugin)
も必要。

上記を導入後、[[QuickEditToolbar]] も入れる。これはスクリプトなので、systemConfig タグは要らない。

[[EditTemplate]] に以下のように追記する。(レイアウトは好みで設定してください)
{{{
<div align='right'><span class='toolbar' macro='tiddler QuickEditToolbar'></span>
<span class='toolbar' macro='toolbar deleteTiddler guidejp saveCloseTiddler cancelCloseTiddler +saveTiddler -cancelTiddler'></span></div>
...
}}}
編集時に「quicklink」「format」機能が追加されます。
*''quicklink:'' tiddler へのリンクを作成。外部リンクも同様に作成できる。
*''format:'' TW フォーマット入力の補助する。
!!format 機能 (kuraku Custom)
編集対象を選択した状態で指定する。
|B|ボールド体|
|Ita|イタリック体|
|U|アンダーライン|
|S|取消線|
|super|superscript 文字を小さくして上付きに|
|sub|subscript 文字を小さくして下付きに|
|*bullet|リスト|
|+number|番号付きリスト|
|-unindent|リストの階層をひとつ取り除く|
|hilight|標準ハイライト|
|hilight|cyan ハイライト (kuraku 個人的趣味)|
|color|文字色の設定|
|bgcolor|文字背景色の設定|
|colors|[[colors]] の内容を表示、color、bgcolor にコードをコピー&ペーストする|
|wikilink|TW のリンク [[ ]] を付ける|
|url|URL を付加する。あるいは tiddler を|
|image|イメージ入力|
|table|表入力|
|tab2tbl|タブ区切りを TW の「|(パイプ)」区切りに (Excel→TW)|
|tbl2tab|TW の「|(パイプ)」区切りからタブ区切りに (TW→Excel)|
|blockquote|引用|
|monospaced|装飾無し (モノスペース)|
|monoblock|モノスペース複数行|
|comment|TW コメント|
|comment(prog/css)|プログラム、CSS コメント /* XX */|
|-delcomm|コメントの除去|

!!キーバインド (kuraku custom)
|~Alt-Q|quicklink を開く|
|~Alt-F|format を開く(マウスを使うのであまり意味は無い)|

!!作者のライセンスなど
スクリプトなので使う時には表示されない情報をこちらに。
<<<
|Name|QuickEditToolbar|
|Source|http://www.TiddlyTools.com/#QuickEditToolbar|
|Version|1.0.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin, GotoPlugin, NestedSlidersPlugin|
|Overrides||
|Description|quickly insert TiddlyWiki tiddler links or common formatting sequences directly into tiddler content|

|| revised by kuraku(Ver0.1.1-2007.06.25) |
|Source|http://kuraku.net/tw/tw.html#QuickEditToolbar|

Usage:

in EditTemplate, add: <div class='toolbar' macro='tiddler QuickEditToolbar'></div>
<<<
/%
|Name|QuickEdit_align|
|Source|http://www.TiddlyTools.com/#QuickEdit_align|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - text alignment|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="align text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select text alignment...','');
	s.options[s.length]=new Option('left','left');
	s.options[s.length-1].title='{{left{...}}}';
	s.options[s.length]=new Option('center','center');
	s.options[s.length-1].title='{{center{...}}}';
	s.options[s.length]=new Option('right','right');
	s.options[s.length-1].title='{{right{...}}}';
	s.options[s.length]=new Option('justify','justify');
	s.options[s.length-1].title='{{justify{...}}}';
	s.options[s.length]=new Option('float left','floatleft');
	s.options[s.length-1].title='{{floatleft{...}}}';
	s.options[s.length]=new Option('float right','floatright');
	s.options[s.length-1].title='{{floatright{...}}}';
	s.size=s.length;
	s.onclick=function(){ if (!this.value.length) return;
		config.quickEdit.wrapSelection(this.button,'{{'+this.value+'{','}}}');
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>align</a></html>
/%
|Name|QuickEdit_color|
|Source|http://www.TiddlyTools.com/#QuickEdit_color|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - text/background color|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="text/background color - @@color:#RGB;background-color:#RGB;...@@"
onclick="var p=Popup.create(this,null,'popup sticky smallform'); if (!p) return false;
 	p.style.padding='2px';
	function hex(d) { return '0123456789ABCDEF'.substr(d,1); }
	var fg=createTiddlyElement(p,'select'); fg.button=this;
	fg.style.width='12em';
	fg.options[0]=new Option('text color...','');
	fg.options[1]=new Option('\xa0 or enter a value','_ask');
	fg.options[2]=new Option('\xa0 or use default color','');
	for (var r=0;r<16;r+=3) for (var g=0;g<16;g+=3) for (var b=0;b<16;b+=3) {
		var label=hex(r)+hex(g)+hex(b);
		fg.options[fg.length]=new Option(label,'#'+label);
		fg.options[fg.length-1].style.color='#'+label;
	}
	fg.onchange=function(){ var val=this.value;
		if (val=='_ask') { val=prompt('Enter a CSS color value');
		if (!val||!val.length) return false; }
		this.options[0].value=val; this.options[0].text=val.length?'text: '+val:'text color...';
		var bg=this.nextSibling;
		for (var i=3;i<bg.options.length;i++) bg.options[i].style.color=val;
		var preview=this.nextSibling.nextSibling.nextSibling;
		var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
		t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
		if (!t.length) t='~AaBbCcDdEeFfGgHhIiJj 1234567890';
		var fg=this.value; if (fg.length) fg='color:'+fg+';';
		var bg=this.nextSibling.value; if (bg.length) bg='background-color:'+bg+';';
		if (fg.length||bg.length) t='@@'+fg+bg+t+'@@';
		removeChildren(preview); wikify(t,preview);
		this.selectedIndex=0; return false;
	};
	var bg=createTiddlyElement(p,'select'); bg.button=this;
	bg.style.width='12em';
	bg.options[0]=new Option('background color...','');
	bg.options[1]=new Option('\xa0 or enter a value','_ask');
	bg.options[2]=new Option('\xa0 or use default color','');
	for (var r=0;r<16;r+=3) for (var g=0;g<16;g+=3) for (var b=0;b<16;b+=3) {
		var label=hex(15-r)+hex(15-g)+hex(15-b);
		bg.options[bg.length]=new Option(label,'#'+label);
		bg.options[bg.length-1].style.backgroundColor='#'+label;
	}
	bg.onchange=function(){ var val=this.value;
		if (val=='_ask') { val=prompt('Enter a CSS color value');
		if (!val||!val.length) return false; }
		this.options[0].value=val;
		this.options[0].text=val.length?'background: '+val:'background color...';
		var fg=this.previousSibling;
		for (var i=3;i<fg.options.length;i++) fg.options[i].style.backgroundColor=val;
		var preview=this.nextSibling.nextSibling;
		var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
		t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
		if (!t.length) t='~AaBbCcDdEeFfGgHhIiJj 1234567890';
		var fg=this.previousSibling.value; if (fg.length) fg='color:'+fg+';';
		var bg=this.value; if (bg.length) bg='background-color:'+bg+';';
		if (fg.length||bg.length) t='@@'+fg+bg+t+'@@';
		removeChildren(preview); wikify(t,preview);
		this.selectedIndex=0; return false;
	};
	var b=createTiddlyElement(p,'input',null,null,null,{type:'button'}); b.button=this;
	b.value='ok'; b.style.width='4em';
	b.onclick=function() {
		var fg=this.previousSibling.previousSibling.value; if (fg.length) fg='color:'+fg+';';
		var bg=this.previousSibling.value; if (bg.length) bg='background-color:'+bg+';';
		var t=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
		t=t.replace(/^@@(color\:.+;)?(background-color\:.+;)?/,'').replace(/@@$/,'');
		if (fg.length||bg.length) config.quickEdit.setSelection(this.button,'@@'+fg+bg+t+'@@');
		Popup.remove(); return false;
	};
	var preview=createTiddlyElement(p,'div',null,'viewer'); var s=preview.style;
	s.border='1px solid'; s.margin='2px'; s.width='24em'; s.padding='3px'; s.MozBorderRadius='3px';
	s.overflow='hidden'; s.textAlign='center'; s.whiteSpace='normal';
	var t=config.quickEdit.getSelection(config.quickEdit.getField(this));
	wikify(t.length?t:'~AaBbCcDdEeFfGgHhIiJj 1234567890',preview);
	Popup.show();
	event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>color</a></html>
/%
|Name|QuickEdit_convert|
|Source|http://www.TiddlyTools.com/#QuickEdit_convert|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - convert between comma/tab-separated and TW table format|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="convert between comma/tab-separated and TW table format"
onclick="var e=config.quickEdit.getField(this);
	if (e) e.focus(); var txt=config.quickEdit.getSelection(e);
	if (txt.indexOf(',')+txt.indexOf('\t')+txt.indexOf('|')==-3) {
		alert('Please select text containing tabs, commas, or TiddlyWiki table syntax.');
		return false;
	}
	var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select a converter...','');
	if (txt.indexOf(',')!=-1) {
		s.options[s.length]=new Option('commas -> table','commasToTable');
		s.options[s.length]=new Option('commas -> tabs','commasToTabs');
	}
	if (txt.indexOf('\t')!=-1) {
		s.options[s.length]=new Option('tabs -> table','tabsToTable');
		s.options[s.length]=new Option('tabs -> commas','tabsToCommas');
	}
	if (txt.indexOf('|')!=-1) {
		s.options[s.length]=new Option('table -> tabs','tableToTabs');
		s.options[s.length]=new Option('table -> commas','tableToCommas');
	}
	s.size=s.length;
	s.onclick=function(){ if (!this.value.length) return;
	        var e=config.quickEdit.getField(this.button); if (!e) return false;
		e.focus(); var txt=config.quickEdit.getSelection(e);
		switch(this.value) {
			case 'tabsToTable':
				txt=txt.replace(/\t/g,'|').replace(/^|$/g,'|');
				txt=txt.replace(/\n/g,'|\n|').replace(/^\|$/g,'');
				break;
			case 'tableToTabs':
				txt=txt.replace(/\t/g,' ').replace(/\|/g,'\t');
				txt=txt.replace(/^\t/g,'').replace(/\t$/g,'');
				txt=txt.replace(/\n\t/g,'\n').replace(/\t\n/g,'\n');
				break;
			case 'commasToTable':
				txt=txt.replace(/,/g,'|').replace(/^|$/g,'|');
				txt=txt.replace(/\n/g,'|\n|').replace(/^\|$/g,''); 
				break;
			case 'tableToCommas':
				txt=txt.replace(/,/g,' ').replace(/\|/g,',');
				txt=txt.replace(/^,/g,'').replace(/,$/g,''); 
				txt=txt.replace(/\n,/g,'\n').replace(/,\n/g,'\n'); 
				break;
			case 'tabsToCommas':
				txt=txt.replace(/\t/g,',');
				break;
			case 'commasToTabs':
				txt=txt.replace(/,/g,'\t');
				break;
		}
		replaceSelection(e,txt);
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>convert</a></html>
/%
|Name|QuickEdit_custom|
|Source|http://www.TiddlyTools.com/#QuickEdit_custom|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - custom defined formats|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

!help
Reminders:

Custom formats are stored as an "HR-separated list" in [[QuickEdit_customList]], where the first line of each list item is the text 'label' to show in the droplist, followed by one or more lines of wiki content to be inserted into the tiddler source.

Substitution markers can be used to dynamically insert values into the formatted output: $1 inserts the tiddler editor's current selected text. $[[message|default value]] interactively prompts for a value to be inserted. $[[message|$1]] uses the selected text as the default value. $[[message|{{javascript}}]] calculates the default value using javascript code.
!end help

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" title="custom defined formats"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select a custom format...','');
	var items=store.getTiddlerText('QuickEdit_customList','').split('\n----\n');
	for (var i=0; i<items.length; i++) {
		if (!items[i].length) continue; var lines=items[i].split('\n');
		var label=lines.shift(); var val=lines.join('\n');
		s.options[s.length]=new Option(label,val); s.options[s.length-1].title=val;
	}
	s.options[s.length]=new Option('[Edit custom formats...]','_edit');
	s.options[s.length-1].title='add/change custom format definitions...';
	s.size=Math.min(s.length,15);
	s.onclick=function(){ if (!this.value.length) return;
		if (this.value=='_edit') {
			alert(store.getTiddlerText('QuickEdit_custom##help'));
			story.displayTiddler(story.findContainingTiddler(this.button),
				'QuickEdit_customList',DEFAULT_EDIT_TEMPLATE);
		} else {
		        var e=config.quickEdit.getField(this.button); if (!e) return false;
			e.focus(); var txt=config.quickEdit.getSelection(e);
			replaceSelection(e, this.value.replace(/\$\x31/g,txt)
				.replace(/\$\[\[[^\]]+\]\]/g, function(t){
					x=t.substr(3,t.length-5).split('|');
					var msg=x[0]; var def=x[1]||'';
					if (def.startsWith('{{')) {
						try{def=eval(def.substr(2,def.length-4))} catch(ex){showException(ex)}
					}
					return prompt(msg,def)||'';
				})
			);
		}
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>custom</a></html>
highlight
@@$1@@
----
red
@@color:red;$1@@
----
blue
@@color:blue;$1@@
----
big red
@@font-size:18pt;color:red;$1@@
----
date time
$[[enter a date|{{new Date().formatString('YYYY-MM-DD hh:0mm:0ss')}}]]
----
time
$[[enter a date|{{new Date().formatString('hh:0mm:0ss')}}]]
----
scrollbox
@@display:block;height:10em;overflow:auto;$[[enter scrolling content|$1]]@@@@display:block;text-align:right;^^scroll for more...^^@@
----
nested slider
+++[$1]<<tiddler $1>>===
----
/%
|Name|QuickEdit_font|
|Source|http://www.TiddlyTools.com/#QuickEdit_font|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - select font family|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="set font-family CSS attribute - @@font-family:facename;...@@"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select a font family...','');
	var fonts=store.getTiddlerText('QuickEdit_fontList','').split('\n');
	for (var i=0; i<fonts.length; i++) {
		if (!fonts[i].length) continue;
		s.options[s.length]=new Option(fonts[i],fonts[i]);
		s.options[s.length-1].style.fontFamily=fonts[i];
	}
	s.options[s.length]=new Option('[Edit font list...]','_edit');
	s.options[s.length-1].title='enter fonts, one per line...';
	s.size=Math.min(s.length,15);
	s.onclick=function(){
		if (this.value=='_edit')
			story.displayTiddler(story.findContainingTiddler(this.button),'QuickEdit_fontList',DEFAULT_EDIT_TEMPLATE);			
		else
			config.quickEdit.wrapSelection(this.button,'@@font-family:\x22'+this.value+'\x22;','@@');
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>font</a></html>
Arial,helvetica,sans-serif
Times New Roman,times,serif
Courier,monospaced
/%
|Name|QuickEdit_format|
|Source|http://www.TiddlyTools.com/#QuickEdit_format|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - basic text formats, headings, blockquotes, etc.|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="plain text (remove ALL formatting)" accesskey="P" 
onclick="var e=config.quickEdit.getField(this); if (e) e.focus(); var txt=config.quickEdit.getSelection(e);
	config.quickEdit.setSelection(e,'~'+wikifyPlainText(txt)); return false;"
>&nbsp;~&nbsp;</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="''bold''" accesskey="B"
onclick="config.quickEdit.wrapSelection(this,'\x27\x27','\x27\x27'); return false;"
>&nbsp;B&nbsp;</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="//italics//" accesskey="I" 
onclick="config.quickEdit.wrapSelection(this,'//','//'); return false;"
>&nbsp;I&nbsp;</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="__underline__" accesskey="U" 
onclick="config.quickEdit.wrapSelection(this,'__','__'); return false;"
>&nbsp;U&nbsp;</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="--strikethrough--" accesskey="S" 
onclick="config.quickEdit.wrapSelection(this,'--','--'); return false;"
>&nbsp;S&nbsp;</a></html>/%

%/ &nbsp;/%  SPACER

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="format text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select text format...','');
	s.options[s.length]=new Option('CSS class wrapper','{{$1{,}}},Enter a CSS classname');
	s.options[s.length-1].title='CSS class wrapper - {{classname classname etc{...}}}';
	s.options[s.length]=new Option('inline CSS styles','@@$1,@@,Enter CSS (attribute:value;attribute:value;...;)');
	s.options[s.length-1].title='inline CSS styles - @@attr:value;attr:value;...@@';
	s.options[s.length]=new Option('heading 1','\n!,\n');
	s.options[s.length-1].title='H1 heading - !';
	s.options[s.length]=new Option('heading 2','\n!!,\n');
	s.options[s.length-1].title='H2 heading - !!';
	s.options[s.length]=new Option('heading 3','\n!!!,\n');
	s.options[s.length-1].title='H3 heading - !!!';
	s.options[s.length]=new Option('heading 4','\n!!!!,\n');
	s.options[s.length-1].title='H4 heading - !!!!';
	s.options[s.length]=new Option('heading 5','\n!!!!!,\n');
	s.options[s.length-1].title='H5 heading - !!!!!';
	s.options[s.length]=new Option('blockquote','\n\<\<\<\n,\n\<\<\<\n');
	s.options[s.length-1].title='indented blockquote - \<\<\<';
	s.options[s.length]=new Option('monospaced','{{{,}}}');
	s.options[s.length-1].title='inline monospaced text - {{{...}}}';
	s.options[s.length]=new Option('plain text','\n{{{\n,\n}}}\n');
	s.options[s.length-1].title='multi-line monospaced text box - {{{...}}}';
	s.options[s.length]=new Option('superscript','^^,^^');
	s.options[s.length-1].title='^^superscript^^';
	s.options[s.length]=new Option('subscript','~~,~~');
	s.options[s.length-1].title='~~subscript~~';
	s.options[s.length]=new Option('HTML','<html>,<\x2fhtml>');
	s.options[s.length-1].title='HTML syntax - <html>...<\x2fhtml>';
	s.options[s.length]=new Option('comment','/%,%/');
	s.options[s.length-1].title='comment (hidden content) - /%...%/';
	s.size=s.length;
	s.onclick=function(){ if (!this.value.length) return;
		var parts=this.value.split(',');
		var prefix=parts[0]; var suffix=parts[1]; var ask=parts[2];
		if (ask) {
			var val=prompt(ask); if (!val) { Popup.remove(); return false; }
			prefix=prefix.replace(/\$1/g,val); suffix=suffix.replace(/\$1/g,val);
		}
		config.quickEdit.wrapSelection(this.button,prefix,suffix);
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>format</a></html>
/%
|Name|QuickEdit_image|
|Source|http://www.TiddlyTools.com/#QuickEdit_image|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - embed an image|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
	title="embed an image (jpg/gif/png) - [img[tooltip|URL]] or [img[tooltip|path/to/file.ext]]"
	onclick="var fn=config.quickEdit.promptForFilename(
		'Enter/select an image file',getLocalPath(document.location.href),'');
	if (!fn) return false;  /* cancelled by user */
	var h=document.location.href; var p=decodeURIComponent(h.substr(0,h.lastIndexOf('/')+1));
	if (fn.startsWith(p)) fn=fn.substr(p.length); /* use RELATIVE path/filename.ext */
	var tip=prompt('Enter a tooltip for this image',''); if (!tip) tip=''; else tip+='|';
	return config.quickEdit.setSelection(this,'[img['+tip+fn+']]');"
>image</a></html>
/%
|Name|QuickEdit_insert|
|Source|http://www.TiddlyTools.com/#QuickEdit_insert|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - insert content from another tiddler or external file|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="insert content from another tiddler or external file"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';

	var s2=createTiddlyElement(p,'select'); s2.title='filter by tag';
	s2.options[0]=new Option('filter by tag...','');
	s2.options[s2.length]=new Option('[all tiddlers]','');
	var tags=store.getTags();
	for (var t=0; t<tags.length; t++) s2.options[s2.length]=new Option(tags[t][0],tags[t][0]);
	s2.onchange=function(){
		var tag=this.value;
		var tids=tag.length?store.reverseLookup('tags',tag,true):store.reverseLookup('tags','excludeLists');
		var list=this.nextSibling.nextSibling;
		while (list.length) list.options[0]=null;
		var prompt='select a tiddler or file...';
		if (tag.length) prompt='select a tagged tiddler ['+tids.length+' matches]...';
		list.options[0]=new Option(prompt,'');
		if (!tag.length) list.options[list.length]=new Option('[browse for file...]','_file');
		for (var t=0; t<tids.length; t++) {
			list.options[list.length]=new Option(tids[t].title,tids[t].title);
			list.options[list.length-1].title=tids[t].getSubtitle();
		}
		list.size=Math.min(list.length,10);
		list.selectedIndex=0; list.focus();
		this.style.width=list.offsetWidth+'px';
		if (!tag.length) this.selectedIndex=0;
	};
	createTiddlyElement(p,'br');

	var s=createTiddlyElement(p,'select'); s.button=this;
	s.title='select a tiddler or file';
	s.options[0]=new Option('select a tiddler or file...','');
	s.options[s.length]=new Option('[browse for file...]','_file');
	var tids=store.reverseLookup('tags','excludeLists');
	for (var t=0; t<tids.length; t++) {
		s.options[s.length]=new Option(tids[t].title,tids[t].title);
		s.options[s.length-1].title=tids[t].getSubtitle();
	}
	s.size=Math.min(s.length,10);
	s.onclick=function(){ if (!this.value.length) return false;
		if (this.value=='_file') {
			var fn=config.quickEdit.promptForFilename(
				'Enter/select a text file',getLocalPath(document.location.href),'');
			if (!fn) return false; /* cancelled by user */
			var txt=loadFile(getLocalPath(fn));
			if (!txt) { alert('Error: unable to read contents from \0027'+fn+'\0027'); return; }
		}
		else var txt=store.getTiddlerText(this.value);
		if (!txt) {
			displayMessage(this.value+' not found');
			this.selectedIndex=0; this.focus();
			return false;
		}
		config.quickEdit.setSelection(this.button,txt);
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s2.style.width=s.offsetWidth+'px';
	s.focus();
	return config.quickEdit.processed(event);"
>insert</a></html>
/%
|Name|QuickEdit_link|
|Source|http://www.TiddlyTools.com/#QuickEdit_link|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - link to tiddler or external file|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="add a link to a tiddler or external file - [[link text|TiddlerName]]"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';

	var s2=createTiddlyElement(p,'select'); s2.title='filter by tag';
	s2.options[0]=new Option('filter by tag...','');
	s2.options[s2.length]=new Option('[all tiddlers]','');
	var tags=store.getTags();
	for (var t=0; t<tags.length; t++) s2.options[s2.length]=new Option(tags[t][0],tags[t][0]);
	s2.onchange=function(){
		var tag=this.value;
		var tids=tag.length?store.reverseLookup('tags',tag,true):store.reverseLookup('tags','excludeLists');
		var list=this.nextSibling.nextSibling;
		while (list.length) list.options[0]=null;
		var prompt='select a tiddler or file...';
		if (tag.length) prompt='select a tagged tiddler ['+tids.length+' matches]...';
		list.options[0]=new Option(prompt,'');
		if (!tag.length) list.options[list.length]=new Option('[browse for file...]','_file');
		for (var t=0; t<tids.length; t++) {
			list.options[list.length]=new Option(tids[t].title,tids[t].title);
			list.options[list.length-1].title=tids[t].getSubtitle();
		}
		list.size=Math.min(list.length,10);
		list.selectedIndex=0; list.focus();
		this.style.width=list.offsetWidth+'px';
		if (!tag.length) this.selectedIndex=0;
	};
	createTiddlyElement(p,'br');

	var s=createTiddlyElement(p,'select'); s.button=this;
	s.title='select a tiddler or file';
	s.options[0]=new Option('select a tiddler or file...','');
	s.options[s.length]=new Option('[browse for file...]','_file');
	var tids=store.reverseLookup('tags','excludeLists');
	for (var t=0; t<tids.length; t++) {
		s.options[s.length]=new Option(tids[t].title,tids[t].title);
		s.options[s.length-1].title=tids[t].getSubtitle();
	}
	s.size=Math.min(s.length,10);
	s.onclick=function(){ if (!this.value.length) return false;
		var title=this.value; var txt=title;
		if (title=='_file') {
			title=config.quickEdit.promptForFilename('Select a file',
				getLocalPath(document.location.href),'');
			if (!title) { this.selectedIndex=0; this.focus(); return false; }
			var txt=title.substr(title.lastIndexOf('/')+1);
		}
		var txt=prompt('Enter the text to display for this link',txt);
		if (!txt) { this.selectedIndex=0; this.focus(); return false; }
		config.quickEdit.setSelection(this.button,'[['+txt+'|'+title+']]');
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s2.style.width=s.offsetWidth+'px';
	s.focus();
	return config.quickEdit.processed(event);"
>link</a></html>
/%
|Name|QuickEdit_list|
|Source|http://tw.kuraku.net/tw.html#QuickEdit_list|
|Version|2.2.0|
|Author|kuraku|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button for text formatting|

Usage:
QuickEditToolbar: <<tiddler QuickEdit_list>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_list'></span>

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="*bullet" onclick="return config.quickEdit.replaceRegexSelection(this,'^','\*');"
>*bullet</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="#numbered" onclick="return config.quickEdit.replaceRegexSelection(this,'^','\#');"
>+number</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="#numbered" onclick="return config.quickEdit.replaceRegexSelection(this,'^','>');"
> &gt; </a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="Un Indent" onclick="return config.quickEdit.replaceRegexSelection(this,'^[\*\+#>]','');"
>-unindent</a></html>/%

%/<script>
if(config.quickEdit.replaceRegexSelection == undefined){
	config.quickEdit.replaceRegexSelection = function(where, regex, replacetext) {
		var e=this.getField(where); if (!e) return false;
		e.focus(); var seltext = config.quickEdit.getSelection(e);
		var regexp = new RegExp(regex,'mg');
		seltext = seltext.replace(regexp, replacetext);
		return config.quickEdit.setSelection(where, seltext);
	};
}
</script>
/%
|Name|QuickEdit_macro|
|Source|http://www.TiddlyTools.com/#QuickEdit_macro|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - embed a macro with 'guide text'|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

Note:
Optional 'guideText' can be used to add suggested defaults/placeholders for specific macro parameters.
Add guideText to your own plugin-defined macros using:
	config.macros.macroName.guideText='guide text goes here';

%/<<tiddler {{
	/* define guide text for a few common TW core macros */
	config.macros.edit.guideText='fieldname #rows';
	config.macros.view.guideText='fieldname (link,wikified,date) format';
	config.macros.slider.guideText='cookie TiddlerName label tooltip';
	config.macros.option.guideText='(txtCookieName,chkCookieName)';
	config.macros.tiddler.guideText='TiddlerName with: params...';
	''; /* must return blank to suppress output */ }}>>/%

%/<html><hide linebreaks><a href='javascript:;' class='tiddlyLink' tabindex='-1' 
title='add a macro - \<\<macroName ...\>\>'
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select a macro...','');
	var macros=[]; for (var m in config.macros) if (config.macros[m].handler) macros.push(m); macros.sort();
	for (var i=0; i<macros.length; i++) { var m=macros[i];
		var help=config.macros[m].guideText; if (!help) help=''; else help=' '+help;
		s.options[s.length]=new Option(m,m+help);
		s.options[s.length-1].title='\<\<'+m+help+'\>\>';
	}
	s.size=Math.min(s.length,15);
	s.onclick=function(){ if (!this.value.length) return;
		config.quickEdit.setSelection(this.button,'\<\<'+this.value+'\>\>');
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>macro</a></html>
/%
|Name|QuickEdit_replace|
|Source|http://www.TiddlyTools.com/#QuickEdit_replace|
|Version|2.4.4|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - find/replace selected text with replacement text|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="find/replace selected text with replacement text"
onclick="var here=story.findContainingTiddler(this); if (!here) return false;
	var e=config.quickEdit.getField(here);
	var s=config.quickEdit.getSelection(e); 
	var p=Popup.create(this,null,'popup sticky smallform'); if (!p) return false;
	var t=createTiddlyElement(p,'input'); t.onfocus=function(){this.select()};
	t.value=s.length?s:'enter target text';
	var r=createTiddlyElement(p,'input'); r.onfocus=function(){this.select()};
	r.value='enter replacement text';
	var tid=here.getAttribute('tiddler');
	var b=createTiddlyElement(p,'button',null,null,'?',{tid:tid});
	b.style.width='2em';
	b.title='FIND/FIND NEXT target text';
	b.onclick=function(ev) { /* FIND */
		var e=story.getTiddlerField(this.getAttribute('tid'),'text');
		if (!e||e.getAttribute('edit')!='text') return;
		var t=this.previousSibling.previousSibling;
		var tv=t.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
		e.focus();
		if (e.setSelectionRange) { /* MOZ */
			var newstart=e.value.indexOf(tv,e.selectionStart+1);
			if (newstart==-1) newstart=e.value.indexOf(tv); /* wrap around */
			if (newstart==-1) { alert('\u0022'+t.value+'\u0022 not found'); t.focus(); return; }
			e.setSelectionRange(newstart,newstart+tv.length);
			var linecount=e.value.split('\n').length;
			var thisline=e.value.substr(0,e.selectionStart).split('\n').length;
			e.scrollTop=Math.floor((thisline-1-e.rows/2)*e.scrollHeight/linecount);
		} else if (document.selection) { /* IE */
			var range=document.selection.createRange();
			if(range.parentElement()==e) {
				range.collapse(false);
				var found=false; try{found=range.findText(v,e.value.length,4)}catch(e){}
				if (found) range.select();
				else { alert('\u0022'+t.value+'\u0022 not found'); t.focus(); }
			}
		}
	};
	b=createTiddlyElement(p,'button',null,null,'=',{tid:tid});
	b.style.width='2em';
	b.title='REPLACE selected text';
	b.onclick=function(ev) { /* REPLACE */
		var e=story.getTiddlerField(this.getAttribute('tid'),'text');
		if (!e||e.getAttribute('edit')!='text') return;
		var t=this.previousSibling.previousSibling.previousSibling;
		var r=this.previousSibling.previousSibling;
		var rv=r.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
		if (   (e.selectionStart!==undefined && e.selectionEnd==e.selectionStart)
		    || (document.selection && document.selection.createRange().text==''))
			this.previousSibling.click(); /* no selection... do FIND first */
		if (   (e.selectionStart!==undefined && e.selectionEnd==e.selectionStart)
		    || (document.selection && document.selection.createRange().text==''))
			{ t.focus(); return; } /* still no selection... goto target input */
		e.focus(); replaceSelection(e,rv);
	};
	b=createTiddlyElement(p,'button',null,null,'+',{tid:tid});
	b.style.width='2em';
	b.title='REPLACE selected text AND FIND NEXT target text';
	b.onclick=function(ev) { /* REPLACE and FIND NEXT */
		this.previousSibling.click();
		this.previousSibling.previousSibling.click();
	};
	b=createTiddlyElement(p,'button',null,null,'!',{tid:tid});
	b.style.width='2em';
	b.title='REPLACE ALL occurrences of target text';
	b.onclick=function(ev) { /* REPLACE ALL */
		var e=story.getTiddlerField(this.getAttribute('tid'),'text');
		if (!e||e.getAttribute('edit')!='text') return;
		var t=this.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling;
		var r=this.previousSibling.previousSibling.previousSibling.previousSibling;
		var tv=t.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
		var rv=r.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
		if (!tv.length) { alert('Please enter the target text'); t.focus(); return; }
		var m='This will replace all occurrences of:\n\n'+tv+'\n\nwith:\n\n'+rv+'\n\nAre you sure?';
		if (!confirm(m)) { r.focus(); r.select(); return; }
		e.value=e.value.replace(new RegExp(tv.escapeRegExp(),'gm'),rv);
		e.focus(); e.select(); Popup.remove();
	};
	Popup.show();
	if (!s.length) {t.focus();t.select()} else {r.focus();r.select()}
	event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>replace</a></html>
/%
|Name|QuickEdit_sort|
|Source|http://www.TiddlyTools.com/#QuickEdit_sort|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - sort lines of text|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="sort lines of text"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select sort order...','');
	s.options[s.length]=new Option('ascending','A');
	s.options[s.length-1].title='ascending';
	s.options[s.length]=new Option('descending','D');
	s.options[s.length-1].title='descending';
	s.size=s.length;
	s.onclick=function(){ if (!this.value.length) return;
		var e=config.quickEdit.getField(this.button); if (!e) return false;
		var lines=config.quickEdit.getSelection(e).split('\n').sort();
		if (this.value=='D') lines=lines.reverse();
		replaceSelection(e,lines.join('\n'));
		e.focus();
		Popup.remove(); return false;
	};
	s.onkeyup=config.quickEdit.keyup;
	Popup.show();
	s.focus();
	return config.quickEdit.processed(event);"
>sort</a></html>
/%
|Name|QuickEdit_split|
|Source|http://www.TiddlyTools.com/#QuickEdit_split|
|Version|2.4.3|
|Author|Eric Shulman|
|License|see http://www.TiddlyTools.com/#QuickEditPlugin|
|Type|html|
|Requires|QuickEditPlugin|
|Description|quickedit - move selection to new tiddler and insert link, embedded tiddler, or slider|

Usage: see  http://www.TiddlyTools.com/#QuickEditToolbar

Based on ideas originally developed by YannPerrin
(http://yann.perrin.googlepages.com/twkd.html#easySlicer)

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" tabindex="-1" 
title="move selection to new tiddler and insert link, embedded tiddler, or slider"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	p.style.whiteSpace='nowrap';
	var i=createTiddlyElement(p,'input');
	i.defaultValue='Enter a new tiddler title';
	i.onfocus=function(){this.select()};
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select type...','');
	s.options[0].title='select split type';
	s.options[1]=new Option('link','link');
	s.options[1].title='replace with [[TiddlerName]]';
	s.options[2]=new Option('embed','embed');
	s.options[2].title='replace with \<\<tiddler TiddlerName\>\>';
	s.options[3]=new Option('slider','slider');
	s.options[3].title='replace with \<\<slider \u0022\u0022 [[TiddlerName]] [[label]] [[tooltip]]\>\>';
	s.onchange=function(){
		if (s.previousSibling.value==s.previousSibling.defaultValue)
			{ alert('A tiddler title is required'); s.selectedIndex=0; s.previousSibling.focus(); return false; }
		var tid=s.previousSibling.value;
		if (store.tiddlerExists(tid) && !confirm(config.messages.overwriteWarning.format([tid])))
			{ s.previousSibling.focus(); return false; }
		switch(s.value) {
			case 'link':
				var newtxt='[['+tid+']]';
				break;
			case 'embed':
				var newtxt='\<\<tiddler [['+tid+']]\>\>';
				break;
			case 'slider':
				var label=prompt('Enter a slider label',tid);
				if (!label) { Popup.remove(); return false; }
				var tip=prompt('Enter a slider tooltip',label);
				if (!tip) { Popup.remove(); return false; }
				var newtxt='\<\<slider \u0022\u0022 [['+tid+']] [['+label+']] [['+tip+']]\>\>';
				break;
		}
		var txt=config.quickEdit.getSelection(config.quickEdit.getField(this.button));
		store.saveTiddler(tid,tid,txt,config.options.txtUserName,new Date(),[],{});
		story.displayTiddler(story.findContainingTiddler(this.button),tid);
		config.quickEdit.setSelection(this.button,newtxt);
		Popup.remove(); return false;
	};
	Popup.show();
	event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>split</a></html>
/%
|Name|QuickEdit_tab2tbl|
|Source|http://tw.kuraku.net/tw.html#QuickEdit_tab2tbl|
|Version|2.2.0|
|Author|kuraku|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button for text formatting|

Usage:
QuickEditToolbar: <<tiddler QuickEdit_tab2tbl>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_tab2tbl'></span>

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="tab to table format" onclick="config.quickEdit.replaceRegexSelection(this,'\t','|');
	config.quickEdit.replaceRegexSelection(this,'^|$','|');
	config.quickEdit.replaceRegexSelection(this,'^\\|$','');
	return false;"
>tab2tbl</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="table to tab format"
onclick="config.quickEdit.replaceRegexSelection(this,'\t',' ');
	config.quickEdit.replaceRegexSelection(this,'\\|','\t');
	config.quickEdit.replaceRegexSelection(this,'^\t','');
	config.quickEdit.replaceRegexSelection(this,'\t$','');
	return false;"
>tbl2tab</a></html>/%

%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink" title="comma to table format" onclick="config.quickEdit.replaceRegexSelection(this,',','|');
	config.quickEdit.replaceRegexSelection(this,'^|$','|');
	config.quickEdit.replaceRegexSelection(this,'^\\,$','');
	return false;"
>clm2tbl</a></html>/%

%/<script>
if(config.quickEdit.replaceRegexSelection == undefined){
	config.quickEdit.replaceRegexSelection = function(where, regex, replacetext) {
		var e=this.getField(where); if (!e) return false;
		e.focus(); var seltext = config.quickEdit.getSelection(e);
		var regexp = new RegExp(regex,'mg');
		seltext = seltext.replace(regexp, replacetext);
		return config.quickEdit.setSelection(where, seltext);
	};
}
</script>
/%
|Name|QuickEdit_tiddler|
|Source|http://www.TiddlyTools.com/#QuickEdit_tiddler|
|Version|2.2.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.2|
|Type|script|
|Requires|QuickEditPlugin|
|Overrides||
|Description|definition for toolbar button that inserts content from another tiddler|

Usage:
QuickEditToolbar: <<tiddler QuickEdit_tiddler>>
OR
EditTemplate: <span class='toolbar' macro='tiddler QuickEdit_tiddler'></span>

**** INSERT TIDDLER ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="copy content from another tiddler"
onclick="var p=Popup.create(this); if (!p) return false; p.className+=' sticky smallform';
	var s=createTiddlyElement(p,'select'); s.button=this;
	s.options[0]=new Option('select a tiddler...','');
	s.onchange=function(){
		var txt=store.getTiddlerText(this.value);
		if (!txt) { displayMessage(this.value+' not found'); this.selectedIndex=0; this.focus(); return false; }
		config.quickEdit.setSelection(this.button,txt);
		Popup.remove(); return false;
	};
	var tids=store.getTiddlers('title');
	for (var t=0; t<tids.length; t++) {
		s.options[s.length]=new Option(tids[t].title,tids[t].title);
		s.options[s.length-1].title=tids[t].getSubtitle();
	}
	var s=createTiddlyElement(p,'select');
	s.options[0]=new Option('match tag...','');
	s.onchange=function(){
		var tag=this.value;
		var tids=tag.length?store.getTaggedTiddlers(tag,'title'):store.getTiddlers('title');
		var list=this.previousSibling;
		while (list.length) list.options[0]=null;
		var prompt='select a '+(tag.length?'tagged ':'')+'tiddler'+(tag.length?(' ['+tids.length+' matches]'):'')+'...';
		list.options[0]=new Option(prompt,'');
		for (var t=0; t<tids.length; t++) {
			list.options[list.length]=new Option(tids[t].title,tids[t].title);
			list.options[list.length-1].title=tids[t].getSubtitle();
		}
	};
	var tags=store.getTags();
	for (var t=0; t<tags.length; t++) s.options[s.length]=new Option(tags[t][0],tags[t][0]);
	Popup.show(p,false);
	event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();return false;"
>tiddler</a></html>
/***
| Name|QuickOpenTagPlugin|
| Description|Changes tag links to make it easier to open tags as tiddlers|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
config.quickOpenTag = {

	dropdownChar: (document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?

	createTagButton: function(place,tag,excludeTiddler) {
		// little hack so we can to <<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);
		
		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 tagged = store.getTaggedTiddlers(tiddler.title);
		if (tagged.length > 0) {
			var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
                        	config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);
			theTag.setAttribute("tag",tiddler.title);
			theTag.className = "miniTag";
		}
	},

	allTagsHandler: function(place,macroName,params) {
		var tags = store.getTags();
		var theDateList = createTiddlyElement(place,"ul");
		if(tags.length == 0)
			createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);
		for (var t=0; t<tags.length; t++) {
			var theListItem = createTiddlyElement(theDateList,"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 #eee; padding:2px; padding-right:0px; padding-left:1px; }",
".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }",
".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}",
"/* extra specificity to make it work right */",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink ",
"	{ border:0px solid black; }",
"#displayArea .viewer .quickopentag a.button, ",
"#mainMenu .quickopentag a.button ",
"	{ margin-left:0px; padding-left:2px; }",
"#displayArea .viewer .quickopentag a.tiddlyLink, ",
"#mainMenu .quickopentag a.tiddlyLink ",
"	{ margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }",
"a.miniTag {font-size:150%;} ",
"#mainMenu .quickopentag a.button ",
"	/* looks better in right justified main menus */",
"	{ margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }", 
"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }",
"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }",
"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }",
"/*}}}*/",
		""].join("\n"),

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

config.quickOpenTag.init();

//}}}
QuickOpenTagPlugin はタグリストのインターフェースを提供します。

タグ表示の右側に、タグの振られているリスト一覧へのリンク「▼」を付加します。

例: <<tag plugintips>>

一覧リストには、「open all」、「open tag XXX」のリンクが付きます。
*open all: リストを全て開く
*open tag XXX: XXX タグの tiddler を開く。
~GoogleGroup は見れなくても、せめて ~TiddlySpot.com は許可してクダサイ...
!~RSSFeeds-TiddlyWiki
<<rssReader asHtml http://kuraku.tiddlyspot.com/proxy.cgi?url=http://www.tiddlywiki.com/index.xml>>
/%<<rssReader asHtml http://kuraku.net/tw/proxy/http://www.tiddlywiki.com/index.xml>>%/

<<rssReader asHtml http://kuraku.tiddlyspot.com/proxy.cgi?url=http://announce.tiddlyspot.com/index.xml>>

<<rssReader asHtml http://kuraku.tiddlyspot.com/proxy.cgi?url=http://faq.tiddlyspot.com/index.xml>>

<<rssReader asHtml http://kuraku.tiddlyspot.comproxy.cgi?url=http://tiddlyspot.com/blog/feed/>>

<<rssReader asHtml http://kuraku.tiddlyspot.com/proxy.cgi?url=http://tiddlywiki.bidix.info/index.xml>>
<<rssReader asHtml http://kuraku.tiddlyspot.com/proxy.cgi?url=http://www.tiddlytools.com/index.xml>>

<<rssReader asHtml http://kuraku.tiddlyspot.com/proxy.cgi?url=http://groups.google.com/group/TiddlyWiki/feed/atom_v1_0_msgs.xml>>
/***
|''Name:''|RSSReaderPlugin|
|''Description:''|This plugin provides a RSSReader for TiddlyWiki|
|''Version:''|1.1.2|
|''Date:''|2008-09-02|
|''Source:''|http://tiddlywiki.bidix.info/#RSSReaderPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#RSSReaderPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''Credit:''|BramChen for RssNewsMacro|
|''[[License]]:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''OptionalRequires:''|http://www.tiddlytools.com/#NestedSlidersPlugin|
***/
//{{{
version.extensions.RSSReaderPlugin = {
	major: 1, minor: 1, revision: 2,
	date: new Date("2008-09-02"),
	source: "http://TiddlyWiki.bidix.info/#RSSReaderPlugin",
	author: "BidiX",
	coreVersion: '2.2.0'
};

config.macros.rssReader = {
	dateFormat: "DDD, DD MMM YYYY",
	itemStyle: "display: block;border: 1px solid black;padding: 5px;margin: 5px;", //useed  '@@'+itemStyle+itemText+'@@'
	msg:{
		permissionDenied: "Permission to read preferences was denied.",
		noRSSFeed: "No RSS Feed at this address %0",
		urlNotAccessible: " Access to %0 is not allowed"
	},
	cache: [], 	// url => XMLHttpRequest.responseXML
	desc: "noDesc",
	
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var desc = params[0];
		var feedURL = params[1];
		var toFilter = (params[2] ? true : false);
		var filterString = (toFilter?(params[2].substr(0,1) == ' '? tiddler.title:params[2]):'');
		var place = createTiddlyElement(place, "div", "RSSReader");
		wikify("^^<<rssFeedUpdate "+feedURL+" [[" + tiddler.title + "]]>>^^\n",place);
		if (this.cache[feedURL]) {
			this.displayRssFeed(this.cache[feedURL], feedURL, place, desc, toFilter, filterString);
		}
		else {
			var r = loadRemoteFile(feedURL,config.macros.rssReader.processResponse, [place, desc, toFilter, filterString]);
			if (typeof r == "string")
				displayMessage(r);
		}
		
	},

	// callback for loadRemoteFile 
	// params : [place, desc, toFilter, filterString]
	processResponse: function(status, params, responseText, url, xhr) { // feedURL, place, desc, toFilter, filterString) {	
		if (window.netscape){
			try {
				if (document.location.protocol.indexOf("http") == -1) {
					netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
				}
			}
			catch (e) { displayMessage(e.description?e.description:e.toString()); }
		}
		if (xhr.status == 404)
		 {
			displayMessage(config.macros.rssReader.noRSSFeed.format([url]));
			return;
		}
		if (!status)
		 {
			displayMessage(config.macros.rssReader.noRSSFeed.format([url]));
			return;
		}
		if (xhr.responseXML) {
			// response is interpreted as XML
			config.macros.rssReader.cache[url] = xhr.responseXML;
			config.macros.rssReader.displayRssFeed(xhr.responseXML, params[0], url, params[1], params[2], params[3]);
		}
		else {
			if (responseText.substr(0,5) == "<?xml") {
				// response exists but not return as XML -> try to parse it 
				var dom = (new DOMParser()).parseFromString(responseText, "text/xml"); 
				if (dom) {
					// parsing successful so use it
					config.macros.rssReader.cache[url] = dom;
					config.macros.rssReader.displayRssFeed(dom, params[0], url, params[1], params[2], params[3]);
					return;
				}
			}
			// no XML display as html 
			wikify("<html>" + responseText + "</html>", params[0]);
			displayMessage(config.macros.rssReader.msg.noRSSFeed.format([url]));
		}
	},

	// explore down the DOM tree
	displayRssFeed: function(xml, place, feedURL, desc, toFilter, filterString){
		// Channel
		var chanelNode = xml.getElementsByTagName('channel').item(0);
		var chanelTitleElement = (chanelNode ? chanelNode.getElementsByTagName('title').item(0) : null);
		var chanelTitle = "";
		if ((chanelTitleElement) && (chanelTitleElement.firstChild)) 
			chanelTitle = chanelTitleElement.firstChild.nodeValue;
		var chanelLinkElement = (chanelNode ? chanelNode.getElementsByTagName('link').item(0) : null);
		var chanelLink = "";
		if (chanelLinkElement) 
			chanelLink = chanelLinkElement.firstChild.nodeValue;
		var titleTxt = "!![["+chanelTitle+"|"+chanelLink+"]]\n";
		var title = createTiddlyElement(place,"div",null,"ChanelTitle",null);
		wikify(titleTxt,title);
		// ItemList
		var itemList = xml.getElementsByTagName('item');
		var article = createTiddlyElement(place,"ul",null,null,null);
		var lastDate;
		var re;
		if (toFilter) 
			re = new RegExp(filterString.escapeRegExp());
		for (var i=0; i<itemList.length; i++){
			var titleElm = itemList[i].getElementsByTagName('title').item(0);
			var titleText = (titleElm ? titleElm.firstChild.nodeValue : '');
			if (toFilter && ! titleText.match(re)) {
				continue;
			}
			var descText = '';
			descElem = itemList[i].getElementsByTagName('description').item(0);
			if (descElem){
				try{
					for (var ii=0; ii<descElem.childNodes.length; ii++) {
						descText += descElem.childNodes[ii].nodeValue;
					}
				}
				catch(e){}
				descText = descText.replace(/<br \/>/g,'\n');
				if (desc == "asHtml")
					descText = "<html>"+descText+"</html>";
			}
			var linkElm = itemList[i].getElementsByTagName("link").item(0);
			var linkURL = linkElm.firstChild.nodeValue;
			var pubElm = itemList[i].getElementsByTagName('pubDate').item(0);
			var pubDate;
			if (!pubElm) {
				pubElm = itemList[i].getElementsByTagName('date').item(0); // for del.icio.us
				if (pubElm) {
					pubDate = pubElm.firstChild.nodeValue;
					pubDate = this.formatDateString(this.dateFormat, pubDate);
					}
					else {
						pubDate = '0';
					}
				}
			else {
				pubDate = (pubElm ? pubElm.firstChild.nodeValue : 0);
				pubDate = this.formatDate(this.dateFormat, pubDate);
			}
			titleText = titleText.replace(/\[|\]/g,'');
			var rssText = '*'+'[[' + titleText + '|' + linkURL + ']]' + '' ;
			if ((desc != "noDesc") && descText){
				rssText = rssText.replace(/\n/g,' ');
				descText = '@@'+this.itemStyle+descText + '@@\n';				
				if (version.extensions.nestedSliders){
					descText = '+++[...]' + descText + '===';
				}
				rssText = rssText + descText;
			}
			var story;
			if ((lastDate != pubDate) && ( pubDate != '0')) {
				story = createTiddlyElement(article,"li",null,"RSSItem",pubDate);
				lastDate = pubDate;
			}
			else {
				lastDate = pubDate;
			}
			story = createTiddlyElement(article,"div",null,"RSSItem",null);
			wikify(rssText,story);
		}
	},
	
	formatDate: function(template, date){
		var dateString = new Date(date);
		// template = template.replace(/hh|mm|ss/g,'');
		return dateString.formatString(template);
	},
	
	formatDateString: function(template, date){
		var dateString = new Date(date.substr(0,4), date.substr(5,2) - 1, date.substr(8,2)
			);
		return dateString.formatString(template);
	}
	
};

config.macros.rssFeedUpdate = {
	label: "Update",
	prompt: "Clear the cache and redisplay this RssFeed",
	handler: function(place,macroName,params) {
		var feedURL = params[0];
		var tiddlerTitle = params[1];
		createTiddlyButton(place, this.label, this.prompt, 
			function () {
				if (config.macros.rssReader.cache[feedURL]) {
					config.macros.rssReader.cache[feedURL] = null; 
			}
			story.refreshTiddler(tiddlerTitle,null, true);
		return false;});
	}
};

//}}}
/***
|Name|RearrangeTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#RearrangeTiddlersPlugin|
|Version|0.0.0|
|Author|Joe Raii|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.refreshTiddler|
|Description|drag tiddlers by title to re-order story column display|

adapted from: http://www.cs.utexas.edu/~joeraii/dragn/#Draggable
changes by ELS:
* hijack refreshTiddler() instead of overridding createTiddler()
* find title element by className instead of elementID
* set cursor style via code instead of stylesheet
* set tooltip help text
* set tiddler "position:relative" when starting drag event, restore saved value when drag ends
* update 2006.08.07: use getElementsByTagName("*") to find title element, even when it is 'buried' deep in tiddler DOM elements (due to custom template usage)
* update 2007.03.01: use apply() to invoke hijacked core function

***/
//{{{

Story.prototype.rearrangeTiddlersHijack_refreshTiddler = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template,unused1,unused2,unused3,unused4,unused5)
{
	this.rearrangeTiddlersHijack_refreshTiddler.apply(this,arguments);
	var theTiddler = document.getElementById(this.idPrefix + title); if (!theTiddler) return;
	var theHandle;
	var children=theTiddler.getElementsByTagName("*");
	for (var i=0; i<children.length; i++) if (hasClass(children[i],"title")) { theHandle=children[i]; break; }
	if (!theHandle) return theTiddler;

	Drag.init(theHandle, theTiddler, 0, 0, null, null);
	theHandle.style.cursor="move";
	theHandle.title="drag title to re-arrange tiddlers"
	theTiddler.onDrag = function(x,y,myElem) {
		if (this.style.position!="relative")
			{ this.savedstyle=this.style.position; this.style.position="relative"; }
		y = myElem.offsetTop;
		var next = myElem.nextSibling;
		var prev = myElem.previousSibling;
		if (next && y + myElem.offsetHeight > next.offsetTop + next.offsetHeight/2) { 
			myElem.parentNode.removeChild(myElem);
			next.parentNode.insertBefore(myElem, next.nextSibling);//elems[pos+1]);
			myElem.style["top"] = -next.offsetHeight/2+"px";
		}
		if (prev && y < prev.offsetTop + prev.offsetHeight/2) { 
			myElem.parentNode.removeChild(myElem);
			prev.parentNode.insertBefore(myElem, prev);
			myElem.style["top"] = prev.offsetHeight/2+"px";
		}
	};
	theTiddler.onDragEnd = function(x,y,myElem) {
		myElem.style["top"] = "0px";
		if (this.savedstyle!=undefined)
			this.style.position=this.savedstyle;
	}
	return theTiddler;
}

/**************************************************
 * dom-drag.js
 * 09.25.2001
 * www.youngpup.net
 **************************************************
 * 10.28.2001 - fixed minor bug where events
 * sometimes fired off the handle, not the root.
 **************************************************/

var Drag = {
	obj:null,

	init:
	function(o, oRoot, minX, maxX, minY, maxY) {
		o.onmousedown = Drag.start;
		o.root = oRoot && oRoot != null ? oRoot : o ;
		if (isNaN(parseInt(o.root.style.left))) o.root.style.left="0px";
		if (isNaN(parseInt(o.root.style.top))) o.root.style.top="0px";
		o.minX = typeof minX != 'undefined' ? minX : null;
		o.minY = typeof minY != 'undefined' ? minY : null;
		o.maxX = typeof maxX != 'undefined' ? maxX : null;
		o.maxY = typeof maxY != 'undefined' ? maxY : null;
		o.root.onDragStart = new Function();
		o.root.onDragEnd = new Function();
		o.root.onDrag = new Function();
	},

	start:
	function(e) {
		var o = Drag.obj = this;
		e = Drag.fixE(e);
		var y = parseInt(o.root.style.top);
		var x = parseInt(o.root.style.left);
		o.root.onDragStart(x, y, Drag.obj.root);
		o.lastMouseX = e.clientX;
		o.lastMouseY = e.clientY;
		if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
		if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
		if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
		if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
		document.onmousemove = Drag.drag;
		document.onmouseup = Drag.end;
		Drag.obj.root.style["z-index"] = "10";
		return false;
	},

	drag:
	function(e) {
		e = Drag.fixE(e);
		var o = Drag.obj;
		var ey = e.clientY;
		var ex = e.clientX;
		var y = parseInt(o.root.style.top);
		var x = parseInt(o.root.style.left);
		var nx, ny;
		if (o.minX != null) ex = Math.max(ex, o.minMouseX);
		if (o.maxX != null) ex = Math.min(ex, o.maxMouseX);
		if (o.minY != null) ey = Math.max(ey, o.minMouseY);
		if (o.maxY != null) ey = Math.min(ey, o.maxMouseY);
		nx = x + (ex - o.lastMouseX);
		ny = y + (ey - o.lastMouseY);
		Drag.obj.root.style["left"] = nx + "px";
		Drag.obj.root.style["top"] = ny + "px";
		Drag.obj.lastMouseX = ex;
		Drag.obj.lastMouseY = ey;
		Drag.obj.root.onDrag(nx, ny, Drag.obj.root);
		return false;
	},

	end:
	function() {
		document.onmousemove = null;
		document.onmouseup = null;
		Drag.obj.root.style["z-index"] = "0";
		Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style["left"]), parseInt(Drag.obj.root.style["top"]), Drag.obj.root);
		Drag.obj = null;
	},

	fixE:
	function(e) {
		if (typeof e == 'undefined') e = window.event;
		if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
		if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
		return e;
	}
};
//}}}
<<tiddlerList search:"^200\d.\d\d.\d\d" tiddlerList top:"5" itemTemplate:"!!≫【%item: %link】 ~~created: %created modified: %modified - %modifier [ (%title|toRSS)]toRSS~~\n~~(%tags)~~\n%text\n\n" dateFormat:"YYYY.0MM.0DD" order:"-created">>
/***
|''Name:''|RecentTweet|
|''Source:''|http://kuraku.tiddlyspot.com/#RecentTweet|
|''Author:''|kuraku|
|''License:''|http://creativecommons.org/licenses/by-sa/2.5/|
|''Version:''|0.1.3 (2010-05-20)|
|''~CoreVersion:''|2.2|

!!Examples
{{{
<<recenttweet userID>>
}}}
<<recenttweet>>
!!Source
***/
/*{{{*/
if(!config.krk){
  config.krk = {author: "KuRaKu"};
}

config.macros.recenttweet = {};
config.macros.recenttweet.myId = "6119832"; //kuraku

config.macros.recenttweet.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
  var id = params[0]?params[0]:this.myId;
  var e = createTiddlyElement(place,"span","recenttweet");
  e.innerHTML='connecting to twitter.com...';
  var url="http://api.twitter.com/1/statuses/user_timeline/" + id + ".json?count=2"; // why?
  result = loadRemoteFile(url, this.twcallback);
  if(typeof result == "string"){
    e.innerHTML = result;
  }
};

config.macros.recenttweet.twcallback = function(status, params, responceText, xhr){
  var tw = eval(responceText);
  var id = tw[0].id;
  var screen_name = tw[0].user.screen_name;
  var image_url = tw[0].user.profile_image_url;
  var text = tw[0].text;
  var created_at = tw[0].created_at;

  var span = "<div><a href=\"http://twitter.com/" + screen_name + "\" border=\"0\"><img src=\"" 
      + image_url + "\" style=\"border:1px solid #CCCCCC;float:left;margin:.7em; clear:both;\" ><b> "
      + screen_name +"</b><br></a> " 
      + config.krk.link_url(text) + "<br><sub><em>(<a href=\"http://twitter.com/"+ screen_name 
      +"/status/" + id + "\">" + config.krk.relative_time(created_at) + "</a>)</em></sub></div>";

  var t = document.getElementById("recenttweet");
  t.innerHTML = span;
};

// via http://creazy.net/2007/04/twitter_javascript_badge.html
config.krk.relative_time = function(time_value) { 
  time_values = time_value.split(" ");
  time_value = time_values[1]+" "+time_values[2]+", "+time_values[5]+" "+time_values[3];
  var parsed_date = Date.parse(time_value);
  var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
  var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
  delta = delta + (relative_to.getTimezoneOffset()*60);
  if(delta < 60) {
    return 'less than a minute ago';
  } else if(delta < 120) {
    return 'about a minute ago';
  } else if(delta < (45*60)) {
    return (parseInt(delta / 60)).toString() + ' minutes ago';
  } else if(delta < (90*60)) {
    return 'about an hour ago';
  } else if(delta < (24*60*60)) {
    return 'about ' + (parseInt(delta / 3600)).toString() + ' hours ago';
  } else if(delta < (48*60*60)) {
    return '1 day ago';
  } else {
    return (parseInt(delta / 86400)).toString() + ' days ago';
  }
};

config.krk.link_url = function(text){
  return text.replace(/(https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:@&=\+$,%#]+)/g,
                               "<a href=\"$1\">$1</a>");
};
/*}}}*/
/***
|Macro|redirect (alias)|
|Author|[[Clint Checketts]] and Paul Petterson|
|Version|1.1 Jan 26, 2006|
|Location|http://checkettsweb.com/styles/themes.htm#RedirectMacro|
|Description|This macro tells TW to find all instances of a word and makes it point to a different link. For example, whenever I put the word 'Clint' in a tiddler I want TiddlyWiki to turn it into a link that points to a tiddler titled 'Clint Checketts' Or the word 'TW' could point to a tiddler called 'TiddlyWiki' It even matches clint (which is lowercase) [[Clint]] leet lEEt LEET|
|Usage|{{{<<redirect TW TiddlyWiki>>}}} |
|Example|<<redirect TW "TiddlyWiki">> <<redirect Clint "Clint Checketts">> (Nothing should appear, its just setting it all up)<<redirectExact lEEt Elite>>|

!Revisions
1.1- Fixed tiddler refresh so a tiddler declaring a redirect will also render the redirect
1.0- Updated to work with TiddlyWiki 2.0 (thanks to Udo Borkowski)
0.9- Original release October 2005

!Code
***/
//{{{
version.extensions.redirectExact = {major: 1, minor: 2, revision: 0, date: new Date(2005,10,24)};
config.macros.redirectExact = {label: "Pickles Rock!"};
config.macros.redirectExact.handler = function(place,macroName,params,wikifier,paramString,tiddler){
 config.macros.redirect.handler(place,macroName,params,wikifier,paramString,tiddler);
}

version.extensions.redirect = {major: 1, minor: 2, revision: 0, date: new Date(2005,10,24)};
config.macros.redirect = {label: "Pickles Rock!"};

config.macros.redirect.handler = function(place,macroName,params,wikifier,paramString,tiddler){

var redirectExists = false
// Check to see if the wikifier exists
for (var i=0;i<config.formatters.length;i++)
 if (config.formatters[i].name == "redirect"+params[0])
 redirectExists = true;

//If it doesn't exist, add it!
if (!redirectExists){
 for( var i=0; i<config.formatters.length; i++ )
 if ( config.formatters[i].name=='wikiLink') break ;

 if ( i >= config.formatters.length ) {
 var e = "Can't find formatter for wikiLink!" ;
 displayMessage( e ) ;
 throw( e ) ;
 }

var pattern;
 if (macroName == 'redirect'){pattern=params[0].escapeRegExp().replace(/([A-Z])/img, function($1) {return("["+$1.toUpperCase()+$1.toLowerCase()+"]");});
 } else {
 pattern=params[0].escapeRegExp();
 }

 config.formatters.splice( i, 0, {
 name: "redirect"+params[0],
 match: "(?:\\b)(?:\\[\\[)?"+pattern+"(?:\\]\\])?(?:\\b)",
 subst: params[1],
 handler: function(w) {
 var link = createTiddlyLink(w.output,this.subst,false);
 w.outputText(link,w.matchStart,w.nextMatch);
 }
 });
 formatter = new Formatter(config.formatters); //update the tiddler
 if(tiddler) story.refreshTiddler(tiddler.title,null,true); //refresh tiddler so the new rule is applied
} // End if
}
//}}}
//{{{
config.commands.refresh = {
	text: 'refresh',
	tooltip: 'Refresh this tiddler',
	handler: function(e,src,title) {
		clearMessage();
		story.refreshTiddler(title,null,true);
		return false;			
	}
};
//}}}
<script>
if(!config.krk){
  config.krk = {author: "KuRaKu"};
}
if(!config.krk.newReminder){
config.krk.newReminder =  function(form,title){
  if (!window.story) {
    window.story=window; 
  }
  if (!store.getTiddler) {
    store.getTiddler=function(title) {return this.tiddlers[title];};
  }
  title = (title && title!='')?title:"Reminders";
  var tiddler=store.getTiddler(title);

  if(!tiddler){
    alert("No exist '"+title+"'\ncannot add reminder!");
    return;
  }

  var txt='\n<<reminder ';
  if (form.year.value != "")
    txt += 'year:'+form.year.value + ' ';
  if (form.month.value != "")
    txt += 'month:'+form.month.value + ' ';
  if (form.day.value != "")
    txt += 'day:'+form.day.value + ' ';
  txt += 'title:"'+form.title.value+'" ';
  txt +='>>';

  tiddler.set(null,tiddler.text + txt);
  window.story.refreshTiddler(title,1,true);
  store.setDirty(true);
};
}

var today=new Date().getMidnight();
var formstring = '<html><form><select name="year"><option value="">毎</option>';
for (var i = 0; i < 5; i++) {
   formstring += '<option' + ((i == 0) ? ' selected' : '') + ' value="' + (today.getFullYear() +i) + '">' + (today.getFullYear() + i) + '</option>';
}
  formstring += '</select><b>年</b>&nbsp;&nbsp;<select name="month"><option value="">毎</option>';
  for (i = 0; i < 12; i++)
  {
    formstring += '<option' + ((i == today.getMonth()) ? ' selected' : '') + ' value="' + (i+1) + '">' + (i+1) + '</option>';
  }
  formstring += '</select><b>月</b>&nbsp;&nbsp;<select name="day"><option value="">毎</option>';
  for (i = 1; i < 32; i++)
  {
    formstring += '<option' + ((i == (today.getDate() )) ? ' selected' : '') + ' value="' + i + '">' + i + '</option>';
  }

formstring += '</select><b>日</b><p><b>タイトル: </b><br><input type="text" size="20" name="title" value="" onfocus="this.select();"><input type="button" value="ok" onclick="config.krk.newReminder(this.form,\'Reminder about ...\')"></form></html>';

document.write(formstring);
</script>
/%- - - - - - - - - - - - - - - -%/
''Reminders:''
/***
|''Name:''|ReminderPlugin|
|''Version:''|2.3.8 (Mar 9, 2006)|
|''Source:''|http://www.geocities.com/allredfaq/reminderMacros.html|
|''Author:''|Jeremy Sheeley(pop1280 [at] excite [dot] com)|
|''Licence:''|[[BSD open source license]]|
|''Macros:''|reminder, showreminders, displayTiddlersWithReminders, newReminder|
|''TiddlyWiki:''|2.0+|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|

!Description
This plugin provides macros for tagging a date with a reminder.  Use the {{{reminder}}} macro to do this.  The {{{showReminders}}} and {{{displayTiddlersWithReminder}}} macros automatically search through all available tiddlers looking for upcoming reminders.

!Installation
* Create a new tiddler in your tiddlywiki titled ReminderPlugin and give it the {{{systemConfig}}} tag.  The tag is important because it tells TW that this is executable code.
* Double click this tiddler, and copy all the text from the tiddler's body.
* Paste the text into the body of the new tiddler in your TW.
* Save and reload your TW.
* You can copy some examples into your TW as well.  See [[Simple examples]], [[Holidays]], [[showReminders]] and [[Personal Reminders]]

!Syntax:
|>|See [[ReminderSyntax]] and [[showRemindersSyntax]]|

!Revision history
* v2.3.8 (Mar 9, 2006)
**Bug fix: A global variable had snuck in, which was killing FF 1.5.0.1
**Feature: You can now use TIDDLER and TIDDLERNAME in a regular reminder format
* v2.3.6 (Mar 1, 2006)
**Bug fix: Reminders for today weren't being matched sometimes.
**Feature:  Solidified integration with DatePlugin and CalendarPlugin
**Feature:  Recurring reminders will now return multiple hits in showReminders and the calendar.
**Feature:  Added TIDDLERNAME to the replacements for showReminders format, for plugins that need the title without brackets.
* v2.3.5 (Feb 8, 2006)
**Bug fix: Sped up reminders lots.  Added a caching mechanism for reminders that have already been matched.
* v2.3.4 (Feb 7, 2006)
**Bug fix: Cleaned up code to hopefully prevent the Firefox 1.5.0.1 crash that was causing lots of plugins 
to crash Firefox.  Thanks to http://www.jslint.com
* v2.3.3 (Feb 2, 2006)
**Feature: newReminder now has drop down lists instead of text boxes.
**Bug fix:  A trailing space in a title would trigger an infinite loop.
**Bug fix:  using tag:"birthday !reminder" would filter differently than tag:"!reminder birthday"
* v2.3.2 (Jan 21, 2006)
**Feature: newReminder macro, which will let you easily add a reminder to a tiddler. Thanks to Eric Shulman (http://www.elsdesign.com) for the code to do this.
** Bug fix: offsetday was not working sometimes
** Bug fix: when upgrading to 2.0, I included a bit to exclude tiddlers tagged with excludeSearch.  I've reverted back to searching through all tiddlers
* v2.3.1 (Jan 7, 2006)
**Feature: 2.0 compatibility
**Feature AlanH sent some code to make sure that showReminders prints a message if no reminders are found.
* v2.3.0 (Jan 3, 2006)
** Bug Fix:  Using "Last Sunday (-0)" as a offsetdayofweek wasn't working.
** Bug Fix:  Daylight Savings time broke offset based reminders (for example year:2005 month:8 day:23 recurdays:7 would match Monday instead of Tuesday during DST.

!Code
***/
//{{{

//============================================================================
//============================================================================
//           ReminderPlugin
//============================================================================
//============================================================================

version.extensions.ReminderPlugin = {major: 2, minor: 3, revision: 8, date: new Date(2006,3,9), source: "http://www.geocities.com/allredfaq/reminderMacros.html"};

//============================================================================
// Configuration
// Modify this section to change the defaults for 
// leadtime and display strings
//============================================================================

config.macros.reminders = {};
config.macros["reminder"] = {};
config.macros["newReminder"] = {};
config.macros["showReminders"] = {};
config.macros["displayTiddlersWithReminders"] = {};

config.macros.reminders["defaultLeadTime"] = [0,6000];
config.macros.reminders["defaultReminderMessage"] = "DIFF: TITLE on DATE ANNIVERSARY";
config.macros.reminders["defaultShowReminderMessage"] = "DIFF: TITLE on DATE ANNIVERSARY -- TIDDLER";
config.macros.reminders["defaultAnniversaryMessage"] = "(DIFF)";
config.macros.reminders["untitledReminder"] = "Untitled Reminder";
config.macros.reminders["noReminderFound"] = "Couldn't find a match for TITLE in the next LEADTIMEUPPER days."
config.macros.reminders["todayString"] = "Today";
config.macros.reminders["tomorrowString"] = "Tomorrow";
config.macros.reminders["ndaysString"] = "DIFF days";
config.macros.reminders["emtpyShowRemindersString"] = "There are no upcoming events";


//============================================================================
//  Code
// You should not need to edit anything 
// below this.  Make sure to edit this tiddler and copy 
// the code from the text box, to make sure that 
// tiddler rendering doesn't interfere with the copy 
// and paste.
//============================================================================

// This line is to preserve 1.2 compatibility
 if (!story) var story=window; 
//this object will hold the cache of reminders, so that we don't
//recompute the same reminder over again.
var reminderCache = {};

config.macros.showReminders.handler = function showReminders(place,macroName,params)
{
   var now = new Date().getMidnight();
   var paramHash = {};
   var leadtime = [0,14];
   paramHash = getParamsForReminder(params);
   var bProvidedDate = (paramHash["year"] != null) || 
			(paramHash["month"] != null) || 
			(paramHash["day"] != null) || 
			(paramHash["dayofweek"] != null);
   if (paramHash["leadtime"] != null)
   {
      leadtime = paramHash["leadtime"];
      if (bProvidedDate)
      {
         //If they've entered a day, we need to make 
         //sure to find it.  We'll reset the 
         //leadtime a few lines down.
         paramHash["leadtime"] = [-10000, 10000];
      }
   }
   var matchedDate = now;
   if (bProvidedDate)
   {
      var leadTimeLowerBound = new Date().getMidnight().addDays(paramHash["leadtime"][0]);
      var leadTimeUpperBound = new Date().getMidnight().addDays(paramHash["leadtime"][1]);
      matchedDate = findDateForReminder(paramHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound); 
   }

   var arr = findTiddlersWithReminders(matchedDate, leadtime, paramHash["tag"], paramHash["limit"]);
   var elem = createTiddlyElement(place,"span",null,null, null);
   var mess = "";
   if (arr.length == 0)
   {
      mess += config.macros.reminders.emtpyShowRemindersString; 
   }
   for (var j = 0; j < arr.length; j++)
   {
      if (paramHash["format"] != null)
      {
         arr[j]["params"]["format"] = paramHash["format"];
      }
      else
      {
         arr[j]["params"]["format"] = config.macros.reminders["defaultShowReminderMessage"];
      }
      mess += getReminderMessageForDisplay(arr[j]["diff"], arr[j]["params"], arr[j]["matchedDate"], arr[j]["tiddler"]);
      mess += "\n";
   }
   wikify(mess, elem, null, null);
};


config.macros.displayTiddlersWithReminders.handler = function displayTiddlersWithReminders(place,macroName,params)
{
   var now = new Date().getMidnight();
   var paramHash = {};
   var leadtime = [0,14];
   paramHash = getParamsForReminder(params);
   var bProvidedDate = (paramHash["year"] != null) || 
			(paramHash["month"] != null) || 
			(paramHash["day"] != null) || 
			(paramHash["dayofweek"] != null);
   if (paramHash["leadtime"] != null)
   {
      leadtime = paramHash["leadtime"];
      if (bProvidedDate)
      {
         //If they've entered a day, we need to make 
         //sure to find it.  We'll reset the leadtime 
         //a few lines down.
         paramHash["leadtime"] = [-10000,10000];
      }
   }
   var matchedDate = now;
   if (bProvidedDate)
   {
      var leadTimeLowerBound = new Date().getMidnight().addDays(paramHash["leadtime"][0]);
      var leadTimeUpperBound = new Date().getMidnight().addDays(paramHash["leadtime"][1]);
      matchedDate = findDateForReminder(paramHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound); 
   }
   var arr = findTiddlersWithReminders(matchedDate, leadtime, paramHash["tag"], paramHash["limit"]);
   for (var j = 0; j < arr.length; j++)
   {
      displayTiddler(null, arr[j]["tiddler"], 0, null, false, false, false);
   }
};

config.macros.reminder.handler = function reminder(place,macroName,params)
{
   var dateHash = getParamsForReminder(params);
   if (dateHash["hidden"] != null)
   {
      return;
   }
   var leadTime = dateHash["leadtime"];
   if (leadTime == null)
   {
      leadTime = config.macros.reminders["defaultLeadTime"]; 
   }
   var leadTimeLowerBound = new Date().getMidnight().addDays(leadTime[0]);
   var leadTimeUpperBound = new Date().getMidnight().addDays(leadTime[1]);
   var matchedDate = findDateForReminder(dateHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound);
   if (!window.story) 
   {
      window.story=window; 
   }
   if (!store.getTiddler) 
   {
      store.getTiddler=function(title) {return this.tiddlers[title];};
   }
   var title = window.story.findContainingTiddler(place).id.substr(7);
   if (matchedDate != null)
   {
      var diff = matchedDate.getDifferenceInDays(new Date().getMidnight());
      var elem = createTiddlyElement(place,"span",null,null, null);
      var mess = getReminderMessageForDisplay(diff, dateHash, matchedDate, title);
      wikify(mess, elem, null, null);
   }
   else
   {
      createTiddlyElement(place,"span",null,null, config.macros.reminders["noReminderFound"].replace("TITLE", dateHash["title"]).replace("LEADTIMEUPPER", leadTime[1]).replace("LEADTIMELOWER", leadTime[0]).replace("TIDDLERNAME", title).replace("TIDDLER", "[[" + title + "]]") );
   }
};

config.macros.newReminder.handler = function newReminder(place,macroName,params)
{
  var today=new Date().getMidnight();
  var formstring = '<html><form>Year: <select name="year"><option value="">Every year</option>';
  for (var i = 0; i < 5; i++)
  {
    formstring += '<option' + ((i == 0) ? ' selected' : '') + ' value="' + (today.getFullYear() +i) + '">' + (today.getFullYear() + i) + '</option>';
  }
  formstring += '</select>&nbsp;&nbsp;Month:<select name="month"><option value="">Every month</option>';
  for (i = 0; i < 12; i++)
  {
    formstring += '<option' + ((i == today.getMonth()) ? ' selected' : '') + ' value="' + (i+1) + '">' + config.messages.dates.months[i] + '</option>';
  }
  formstring += '</select>&nbsp;&nbsp;Day:<select name="day"><option value="">Every day</option>';
  for (i = 1; i < 32; i++)
  {
    formstring += '<option' + ((i == (today.getDate() )) ? ' selected' : '') + ' value="' + i + '">' + i + '</option>';
  }

formstring += '</select>&nbsp;&nbsp;Reminder Title:<input type="text" size="40" name="title" value="please enter a title" onfocus="this.select();"><input type="button" value="ok" onclick="addReminderToTiddler(this.form)"></form></html>';

  var panel = config.macros.slider.createSlider(place,null,"New Reminder","Open a form to add a new reminder to this tiddler");
  wikify(formstring ,panel,null,store.getTiddler(params[1]));
};

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

function hasTag(tiddlerTags, tagFilters)
{
  //Make sure we respond well to empty tiddlerTaglists or tagFilterlists
  if (tagFilters.length==0 || tiddlerTags.length==0)
  {
    return true;
  }

  var bHasTag = false;
  
  /*bNoPos says: "'till now there has been no check using a positive filter"
     Imagine a filterlist consisting of 1 negative filter:
         If the filter isn't matched, we want hasTag to be true.
         Yet bHasTag is still false ('cause only positive filters cause bHasTag to change)
         
     If no positive filters are present bNoPos is true, and no negative filters are matched so we have not returned false
         Thus: hasTag returns true.
      
      If at any time a positive filter is encountered, we want at least one of the tags to match it, so we turn bNoPos to false, which
      means bHasTag must be true for hasTag to return true*/
  var bNoPos=true;
  
for (var t3 = 0; t3 < tagFilters.length; t3++)
  {
      for(var t2=0; t2<tiddlerTags.length; t2++)
      {
           if (tagFilters[t3].length > 1 && tagFilters[t3].charAt(0) == '!') 
           {
              if (tiddlerTags[t2] == tagFilters[t3].substring(1))
              {
                 //If at any time a negative filter is matched, we return false
                  return false;
              }
           }
           else 
           {
              if (bNoPos)
              {
                 //We encountered the first positive filter
                 bNoPos=false;
              }
              if (tiddlerTags[t2] == tagFilters[t3])
              {
                  //A positive filter is matched. As long as no negative filter is matched, hasTag will return true
                  bHasTag=true;
              }
           }
        }
    }
    return (bNoPos || bHasTag);
};

//This function searches all tiddlers for the reminder  //macro.  It is intended that other plugins (like //calendar) will use this function to query for 
//upcoming reminders.
//The arguments to this function filter out reminders //based on when they will fire.
//
//ARGUMENTS:
//baseDate is the date that is used as "now".  
//leadtime is a two element int array, with leadtime[0] 
//         as the lower bound and leadtime[1] as the
//         upper bound.  A reasonable default is [0,14]
//tags is a space-separated list of tags to use to filter 
//         tiddlers.  If a tag name begins with an !, then 
//         only tiddlers which do not have that tag will 
//         be considered.  For example "examples holidays"  
//         will search for reminders in any tiddlers that  
//         are tagged with examples or holidays and 
//         "!examples !holidays" will search for reminders 
//         in any tiddlers that are not tagged with 
//         examples or holidays.  Pass in null to search 
//         all tiddlers.
//limit.  If limit is null, individual reminders can 
//        override the leadtime specified earlier.  
//        Pass in 1 in order to override that behavior.

window.findTiddlersWithReminders = function findTiddlersWithReminders(baseDate, leadtime, tags, limit)
{
//function(searchRegExp,sortField,excludeTag)
//   var macroPattern = "<<([^>\\]+)(?:\\*)([^>]*)>>";
   var macroPattern = "<<(reminder)(.*)>>";
   var macroRegExp = new RegExp(macroPattern,"mg");
   var matches = store.search(macroRegExp,"title","");
   var arr = [];
   var tagsArray = null;
   if (tags != null)
   {
      tagsArray = tags.split(" ");
   }
   for(var t=matches.length-1; t>=0; t--)
   {
      if (tagsArray != null)
      {
         //If they specified tags to filter on, and this tiddler doesn't 
	 //match, skip it entirely.
         if ( ! hasTag(matches[t].tags, tagsArray))
         {
            continue;
         }
      }

      var targetText = matches[t].text;
      do {
         // Get the next formatting match
         var formatMatch = macroRegExp.exec(targetText);
         if(formatMatch && formatMatch[1] != null && formatMatch[1].toLowerCase() == "reminder")
         {
            //Find the matching date.
            
            var params = formatMatch[2] != null ? formatMatch[2].readMacroParams() : {};
            var dateHash = getParamsForReminder(params);
            if (limit != null || dateHash["leadtime"] == null)
            {
               if (leadtime == null)
                   dateHash["leadtime"] = leadtime;
               else
               {
                  dateHash["leadtime"] = [];
                  dateHash["leadtime"][0] = leadtime[0];
                  dateHash["leadtime"][1] = leadtime[1];
               }
            }
	    if (dateHash["leadtime"] == null)
               dateHash["leadtime"] = config.macros.reminders["defaultLeadTime"]; 
            var leadTimeLowerBound = baseDate.addDays(dateHash["leadtime"][0]);
            var leadTimeUpperBound = baseDate.addDays(dateHash["leadtime"][1]);
            var matchedDate = findDateForReminder(dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound);
            while (matchedDate != null)
            {
               var hash = {};
               hash["diff"] = matchedDate.getDifferenceInDays(baseDate);
               hash["matchedDate"] = new Date(matchedDate.getFullYear(), matchedDate.getMonth(), matchedDate.getDate(), 0, 0);
               hash["params"] = cloneParams(dateHash);
               hash["tiddler"] = matches[t].title;
               hash["tags"] = matches[t].tags;
               arr.pushUnique(hash);
	       if (dateHash["recurdays"] != null || (dateHash["year"] == null))
	       {
	         leadTimeLowerBound = leadTimeLowerBound.addDays(matchedDate.getDifferenceInDays(leadTimeLowerBound)+ 1);
                 matchedDate = findDateForReminder(dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound);
	       }
	       else matchedDate = null;
            }
         }
      }while(formatMatch);
   }
   if(arr.length > 1)  //Sort the array by number of days remaining.
   {
      arr.sort(function (a,b) {if(a["diff"] == b["diff"]) {return(0);} else {return (a["diff"] < b["diff"]) ? -1 : +1; } });
   }
   return arr;
};

//This function takes the reminder macro parameters and
//generates the string that is used for display.
//This function is not intended to be called by 
//other plugins.
 window.getReminderMessageForDisplay= function getReminderMessageForDisplay(diff, params, matchedDate, tiddlerTitle)
{
   var anniversaryString = "";
   var reminderTitle = params["title"];
   if (reminderTitle == null)
   {
      reminderTitle = config.macros.reminders["untitledReminder"];
   }
   if (params["firstyear"] != null)
   {
      anniversaryString = config.macros.reminders["defaultAnniversaryMessage"].replace("DIFF", (matchedDate.getFullYear() - params["firstyear"]));
   }
   var mess = "";
   var diffString = "";
   if (diff == 0)
   {
      diffString = config.macros.reminders["todayString"];
   }
   else if (diff == 1)
   {
      diffString = config.macros.reminders["tomorrowString"];
   }
   else
   {
      diffString = config.macros.reminders["ndaysString"].replace("DIFF", diff);
   }
   var format = config.macros.reminders["defaultReminderMessage"];
   if (params["format"] != null)
   {
      format = params["format"];
   }
   mess = format;
//HACK!  -- Avoid replacing DD in TIDDLER with the date
   mess = mess.replace(/TIDDLER/g, "TIDELER");
   mess = matchedDate.formatStringDateOnly(mess);
   mess = mess.replace(/TIDELER/g, "TIDDLER");
   if (tiddlerTitle != null)
   {
      mess = mess.replace(/TIDDLERNAME/g, tiddlerTitle);
      mess = mess.replace(/TIDDLER/g, "[[" + tiddlerTitle + "]]");
   }
   
   mess = mess.replace("DIFF", diffString).replace("TITLE", reminderTitle).replace("DATE", matchedDate.formatString("DDD MMM DD, YYYY")).replace("ANNIVERSARY", anniversaryString);
   return mess;
};

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

//This function finds the date specified in the reminder 
//parameters.  It will return null if no match can be
//found.  This function is not intended to be used by
//other plugins.
window.findDateForReminder= function findDateForReminder( dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound)
{
   if (baseDate == null)
   {
     baseDate = new Date().getMidnight();
   }
   var hashKey = baseDate.convertToYYYYMMDDHHMM();
   for (var k in dateHash)
   {
      hashKey += "," + k + "|" + dateHash[k];
   }
   hashKey += "," + leadTimeLowerBound.convertToYYYYMMDDHHMM();
   hashKey += "," + leadTimeUpperBound.convertToYYYYMMDDHHMM();
   if (reminderCache[hashKey] == null)
   {
      //If we don't find a match in this run, then we will
      //cache that the reminder can't be matched.
      reminderCache[hashKey] = false;
   }
   else if (reminderCache[hashKey] == false)
   {
      //We've already tried this date and failed
      return null;
   }
   else
   {
      return reminderCache[hashKey];
   }
   
   var bOffsetSpecified = dateHash["offsetyear"] != null || 
				dateHash["offsetmonth"] != null || 
				dateHash["offsetday"] != null || 
				dateHash["offsetdayofweek"] != null || 
				dateHash["recurdays"] != null;
   
   // If we are matching the base date for a dayofweek offset, look for the base date a 
   //little further back.
   var tmp1leadTimeLowerBound = leadTimeLowerBound;  
   if ( dateHash["offsetdayofweek"] != null)
   {
      tmp1leadTimeLowerBound = leadTimeLowerBound.addDays(-6);  
   }
   var matchedDate = baseDate.findMatch(dateHash, tmp1leadTimeLowerBound, leadTimeUpperBound);
   if (matchedDate != null)
   {
      var newMatchedDate = matchedDate;
      if (dateHash["recurdays"] != null)
      {
         while (newMatchedDate.getTime() < leadTimeLowerBound.getTime())
         {
            newMatchedDate = newMatchedDate.addDays(dateHash["recurdays"]);
         }
      }
      else if (dateHash["offsetyear"] != null || 
		dateHash["offsetmonth"] != null || 
		dateHash["offsetday"] != null || 
		dateHash["offsetdayofweek"] != null)
      {
         var tmpdateHash = cloneParams(dateHash);
         tmpdateHash["year"] = dateHash["offsetyear"];
         tmpdateHash["month"] = dateHash["offsetmonth"];
         tmpdateHash["day"] = dateHash["offsetday"];
         tmpdateHash["dayofweek"] = dateHash["offsetdayofweek"];
	 var tmpleadTimeLowerBound = leadTimeLowerBound;
	 var tmpleadTimeUpperBound = leadTimeUpperBound;
	 if (tmpdateHash["offsetdayofweek"] != null)
	 {
	 	if (tmpdateHash["negativeOffsetDayOfWeek"] == 1)
		{
		   tmpleadTimeLowerBound = matchedDate.addDays(-6);
		   tmpleadTimeUpperBound = matchedDate;

		}
		else
		{
		   tmpleadTimeLowerBound = matchedDate;
		   tmpleadTimeUpperBound = matchedDate.addDays(6);
		}

	 }
	 newMatchedDate = matchedDate.findMatch(tmpdateHash, tmpleadTimeLowerBound, tmpleadTimeUpperBound);
         //The offset couldn't be matched.  return null.
         if (newMatchedDate == null)
         {
            return null;
         }
      }
      if (newMatchedDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
      {
         reminderCache[hashKey] = newMatchedDate;
         return newMatchedDate;
      }
   }
   return null;
};

//This does much the same job as findDateForReminder, but
//this one doesn't deal with offsets or recurring 
//reminders.
Date.prototype.findMatch = function findMatch(dateHash, leadTimeLowerBound, leadTimeUpperBound)
{

   var bSpecifiedYear =     (dateHash["year"] != null);
   var bSpecifiedMonth =     (dateHash["month"] != null);
   var bSpecifiedDay =     (dateHash["day"] != null);
   var bSpecifiedDayOfWeek =     (dateHash["dayofweek"] != null);
   if (bSpecifiedYear && bSpecifiedMonth && bSpecifiedDay)
   {
      return new Date(dateHash["year"], dateHash["month"]-1, dateHash["day"], 0, 0);
   }
   var bMatchedYear = !bSpecifiedYear;
   var bMatchedMonth = !bSpecifiedMonth;
   var bMatchedDay = !bSpecifiedDay;
   var bMatchedDayOfWeek = !bSpecifiedDayOfWeek;
   if (bSpecifiedDay && bSpecifiedMonth && !bSpecifiedYear && !bSpecifiedDayOfWeek)
   {

      //Shortcut -- First try this year.  If it's too small, try next year.
      var tmpMidnight = this.getMidnight();
      var tmpDate = new Date(this.getFullYear(), dateHash["month"]-1, dateHash["day"], 0,0);
      if (tmpDate.getTime() < leadTimeLowerBound.getTime())
      {
         tmpDate = new Date((this.getFullYear() + 1), dateHash["month"]-1, dateHash["day"], 0,0);
      }
      if ( tmpDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
      {
         return tmpDate;
      }
      else
      {
         return null;
      }
   }

   var newDate = leadTimeLowerBound; 
   while (newDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
   {
      var tmp = testDate(newDate, dateHash, bSpecifiedYear, bSpecifiedMonth, bSpecifiedDay, bSpecifiedDayOfWeek);
      if (tmp != null)
        return tmp;
      newDate = newDate.addDays(1);
   }
};

function testDate(testMe, dateHash, bSpecifiedYear, bSpecifiedMonth, bSpecifiedDay, bSpecifiedDayOfWeek)
{
   var bMatchedYear = !bSpecifiedYear;
   var bMatchedMonth = !bSpecifiedMonth;
   var bMatchedDay = !bSpecifiedDay;
   var bMatchedDayOfWeek = !bSpecifiedDayOfWeek;
   if (bSpecifiedYear)
   {
      bMatchedYear = (dateHash["year"] == testMe.getFullYear());
   }
   if (bSpecifiedMonth)
   {
      bMatchedMonth = ((dateHash["month"] - 1)  == testMe.getMonth() );
   }
   if (bSpecifiedDay)
   {
      bMatchedDay = (dateHash["day"] == testMe.getDate());
   }
   if (bSpecifiedDayOfWeek)
   {
      bMatchedDayOfWeek = (dateHash["dayofweek"] == testMe.getDay());
   }

   if (bMatchedYear && bMatchedMonth && bMatchedDay && bMatchedDayOfWeek)
   {
      return testMe;
   }
};

//Returns true if the date is in between two given dates
Date.prototype.isBetween = function isBetween(lowerBound, upperBound)
{
  return (this.getTime() >= lowerBound.getTime() && this.getTime() <= upperBound.getTime());
}
//Return a new date, with the time set to midnight (0000)
Date.prototype.getMidnight = function getMidnight()
{
   return new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0);
};
// Add the specified number of days to a date.
Date.prototype.addDays = function addDays(numberOfDays)
{
   return new Date(this.getFullYear(), this.getMonth(), this.getDate() + numberOfDays, 0, 0);
};
//Return the number of days between two dates.
Date.prototype.getDifferenceInDays = function getDifferenceInDays(otherDate)
{
//I have to do it this way, because this way ignores daylight savings
   var tmpDate = this.addDays(0);
   if (this.getTime() > otherDate.getTime())
   {
      var i = 0;
      for (i = 0; tmpDate.getTime() > otherDate.getTime(); i++)
      {
         tmpDate = tmpDate.addDays(-1);
      }
      return i;
   }
   else
   {
      var i = 0;
      for (i = 0; tmpDate.getTime() < otherDate.getTime(); i++)
      {
         tmpDate = tmpDate.addDays(1);
      }
      return i * -1;
   }
   return 0;
};
function cloneParams(what) {
    var tmp = {};
    for (var i in what) {
        tmp[i] = what[i];
    }
    return tmp;
}
// Substitute date components into a string
Date.prototype.formatStringDateOnly = function formatStringDateOnly(template)
{
	template = template.replace("YYYY",this.getFullYear());
	template = template.replace("YY",String.zeroPad(this.getFullYear()-2000,2));
	template = template.replace("MMM",config.messages.dates.months[this.getMonth()]);
	template = template.replace("0MM",String.zeroPad(this.getMonth()+1,2));
	template = template.replace("MM",this.getMonth()+1);
	template = template.replace("DDD",config.messages.dates.days[this.getDay()]);
	template = template.replace("0DD",String.zeroPad(this.getDate(),2));
	template = template.replace("DD",this.getDate());
	return template;
};

//}}}
[[ReminderMacros]] はリマインダを提供してくれる。
!!!リマインダ登録
{{{
< <reminder day:17 month:12 year:2006 title:"2006年末調整締切り" >>
}}}
<<<
<<reminder day:17 month:12 year:2006 title:"2006年末調整締切り" >>
<<<
{{{
< <reminder dayofweek:1 year:2007 title:"週次レポート (every mon)" >>
}}}
<<<
<<reminder dayofweek:1 year:2007 title:"週次レポート (every mon)" >>
<<<
{{{
< <reminder day:1 year:2007 title:"月初レポート (every month)" >>
}}}
<<<
<<reminder day:1 year:2007 title:"月初レポート (every month)" >>
<<<
!!!リマインダ一覧
60日後までのリマインダを表示。
{{{
<<showReminders leadtime:60 >>
}}}
<<<
<<showReminders leadtime:60 >>
<<<
以下の様に tag を「!」で指定すると holidays タグの付いている [[Holidays]] の内容は無視される。
{{{
<<showReminders leadtime:90 tag:"!holidays">>
}}}
<<<
<<showReminders leadtime:90 tag:"!holidays">>
<<<

リマインダの指定されてある日付はカレンダーでハイライトされる。
カレンダー上でプルダウンできるならばリマインダの内容も表示される。
The reminder macro can take the following arguments.

!!!!date syntax
* @@{{{year:NUMBER}}}@@ - The four digit representation of the year (for example {{{year:2046}}} or {{{year:1999}}}
* @@{{{month:NUMBER}}}@@ - The numerical representation of the month (for example {{{month:1}}} for January, {{{month:12}}} for December)
* @@{{{day:NUMBER}}}@@ - The numerical representation of the day of the month (for example {{{day:15}}} will match the 15th day of the month)
* @@{{{dayofweek:NUMBER}}}@@ - The numerical representation of the day of the week.  Valid values are in the range of 0-6.  {{{dayofweek:0}}} will match Sunday, and {{{dayofweek:6}}} will match Saturday.

!!!!offsets
* @@{{{offsetdayofweek:NUMBER}}}@@ - The numerical representation of a day of the week.  Valid values are in the range of 0-6.  0 will match Sunday, and 6 will match Saturday.  If offsetdayofweek is specified, the year, month, day and dayofweek will be matched as usual, and the reminder will be set to the next occurence of the day of the week specified by offsetdayofweek. For example, the first Thursday of the month can be specified as {{{day:1 offsetdayofweek:4}}} and the second Thursday can be specified as {{{day:8 offsetdayofweek4}}} If offsetdayofweek is negative, the search will be performed backward.  For example, the last Thursday in August can be found by {{{month:8 day:31 offsetdayofweek:-4}}}
* @@{{{recurdays:NUMBER}}}@@ - If recurdays is set, then the reminder will fire on the base date specified by year, month, day, and dayofweek and also every N days afterward.  For example, if the reminder is specified with {{{year:2005 month:8 day:16 recurdays:2}}} it will match August 16, 18, 20, etc.  Please make sure that you fully specify year, month and day in any recurring reminder.

!!!!leadtime
* @@{{{leadtime:NUMBER}}}@@ - Use this to specify when this reminder will appear in [[showReminders]].  If a reminder has a leadtime of 2, it will only show up in showReminders if it will be matched in the next two days.  Likewise, a reminder with a leadtime of 60 will show up in showReminders even if showReminders has a lower leadtime.  showReminders can override this behavior with the limit argument.

!!!!Reminder display options
* @@{{{title:"STRING"}}}@@ - A string used to identify this reminder when it is shown in a list of reminders. For example, {{{title:"New Year's Day"}}} or {{{title:"Elvis' Birthday"}}}.  You can put standard TiddlyWiki formatting in the title.
* @@{{{format:"STRING"}}}@@ - Use this argument to override the default string used for display.  You can put standard TiddlyWiki formatting in the format.  The following substitutions will be made in the string before it is displayed.
** DIFF will be replaced with the one of the strings "Today", "Tommorrow", or "N days", where N is the number of days between now and the date of the reminder.  
** TITLE will be replaced with the title of the reminder
** DATE will be replaced with the matched date of the reminder.
** ANNIVERSARY will be replaced with the number of years since between the matched date and firstyear
The default string is "DIFF: TITLE on DATE ANNIVERSARY"
* @@{{{firstyear:NUMBER}}}@@ - The first year that a reminder occurred, in four digit format.  For example {{{firstyear:2001}}}.  This is used when calculating the number of years that a reminder has happened.
* @@{{{hidden}}}@@ - If this option is present, the reminder will not be displayed in the regular view of the tiddler.  You can use this to have reminders for [[displayTiddlersWithReminders]] to find, without having the countdown appear.  See [[Season's Greetings example]] for an example.

/***
| Name:|RenameTagsPlugin|
| Description:|Allows you to easily rename or delete tags across multiple tiddlers|
| Version:|3.0 ($Rev: 1845 $)|
| Date:|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| 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();

//}}}

/***
|''Name:''|ResizeEditorPlugin|
|''Source:''|http://www.TiddlyTools.com/#ResizeEditorPlugin|
|''Author:''|Eric Shulman - ELS Design Studios|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.0.10|

Adds ''autosizeEditor'' toolbar command and ''resizeEditor'' macro for use in EditTemplate to permit on-the-fly adjustment of the tiddler editor text area height:
* ''autosizeEditor'' - toggles the tiddler editor textarea height between fixed-height and "automatically fit the contents".
* ''resizeEditor'' - adds 'grab handle' below textarea to stretch field height
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''ResizeEditorPlugin'' (tagged with <<tag systemConfig>>)

If you are using the default (shadow) EditTemplate, the plugin automatically updates the template to include the ''autosizeEditor'' toolbar command and ''resizeEditor'' macro.  If you have created a custom EditTemplate tiddler, you will need to manually add the ''autosizeEditor'' toolbar command and ''resizeEditor'' macro to your existing template:
{{{
<!-- add 'autosizeEditor' command to end of existing editor toolbar definition -->
<div class='toolbar' macro='toolbar ... autosizeEditor'>
}}}
and
{{{
<!-- add span with 'resizeEditor' macro anywhere in the edit template -->
<span macro='resizeEditor'></span>
}}}

<<<
!!!!!Revisions
<<<
''2006.11.02 [1.3.1]'' in DragMove() and DragStop(), check for undefined properties so IE doesn't report "Not Implemented" error when property is referenced without having been previously initialized.
''2006.11.01 [1.3.0]'' added 'resizeEditor' MACRO for 'grab handle' stretch resizing (based on code from Jon Scully and Jason Johnston (jj@lojjic.net).  
''2006.11.01 [1.2.6]'' removed increaseEditor, decreaseEditor, and resizeEditor toolbar COMMAND definitions (resize by setting 'rows' property of textarea field conflicts with resize via style.height CSS attribute as set by autosize/drag).
''2006.11.01 [1.2.5]'' fixed 'savedkeypress' handling (was writing to savedkeyup by mistake)
''2006.10.28 [1.2.4]'' added '+' to 'saveTiddler' toolbar command (enables ctrl-enter keyhandling)
''2006.10.18 [1.2.3]'' added decreaseEditor and increaseEditor commands
''2006.10.18 [1.2.2]'' onkeypress handling to redirect PGUP/PGDN to window.scrollByPages() (works in FF, but not yet in IE)
''2006.10.18 [1.2.1]'' fixed references to default string constants (oops!)
''2006.10.18 [1.2.0]'' renamed 'resizeEditor' to 'autosizeEditor' and added new 'resizeEditor' toolbar command to prompt for # of rows to display
''2006.10.02 [1.1.1]'' show checkbox in button label (when automatic resizing is enabled)
''2006.10.01 [1.1.0]'' added 'onkeyup' automatic fit-to-contents handling
''2006.09.30 [1.0.0]'' initial release
<<<
!!!!!Credits
>This feature was developed by EricShulman from [[ELS Design Studios|http://www.elsdesign.com]] with 'grab handle' stretch resizing based on code from Jon Scully and Jason Johnston (jj@lojjic.net).
!!!!!Code
***/
//{{{
version.extensions.resizeEditor = {major: 1, minor: 3, revision: 1, date: new Date(2006,11,2)};

config.commands.autosizeEditor = {
	text: 'autosize',
	tooltip: 'adjust the editor height to fit the contents',
	text_alt: '<input type="checkbox" style="padding:0;margin:0;border:0;background:transparent;" checked>autosize',
	tooltip_alt: 'uncheck to reset the editor to the standard height',
	hideReadOnly: false,
	handler: function(event,src,title) {
		var here=story.findContainingTiddler(src); if (!here) return;
		var ta=here.getElementsByTagName('textarea'); if (!ta) return;
		for (i=0;i<ta.length;i++) { ta[i].button=src; if (!ta[i].maxed) this.start(ta[i]); else this.stop(ta[i],true); }
		return false;
	},
	start: function(e) {
		if (!e.savedkeyup) e.savedkeyup=e.onkeyup;
		if (!e.savedkeypress) e.savedkeypress=e.onkeypress;
		e.savedheight=e.style.height;
		e.style.height=e.scrollHeight-2+'px'; // NOTE "-2" adjustment...  for scrollbar top+bottom border width???
		e.onkeypress=function(ev) {
			if (!ev) var ev=window.event; var e=resolveTarget(ev);
			if (ev.keyCode==33) { // PGUP
				if (window.scrollByPages) window.scrollByPages(-1);
				return false;
			}
			if (ev.keyCode==34) { // PGDN
				if (window.scrollByPages) window.scrollByPages(1);
				return false;
			}
			if (e.savedkeypress) e.savedkeypress();
		}
		e.onkeyup=function(ev) {
			if (!ev) var ev=window.event; var e=resolveTarget(ev);
			e.style.height=e.scrollHeight-2+'px';
			if (e.savedkeyup) e.savedkeyup();
		}
		e.button.innerHTML=config.commands.autosizeEditor.text_alt;
		e.button.title=config.commands.autosizeEditor.tooltip_alt;
		e.maxed=true;
	},
	stop: function(e,resetHeight) {
		if (resetHeight) e.style.height=e.savedheight;
		e.onkeyup=e.savedkeyup;
		e.onkeypress=e.savedkeypress;
		e.button.innerHTML=config.commands.autosizeEditor.text;
		e.button.title=config.commands.autosizeEditor.tooltip;
		e.maxed=false;
	}
};

config.macros.resizeEditor = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var ta=here.getElementsByTagName('textarea'); if (!ta) return;
		for (i=0;i<ta.length;i++) new window.TextAreaResizer(ta[i]);
	}
}

// TextAreaResizer script by Jason Johnston (jj@lojjic.net)
// Created August 2003.  Use freely, but give me credit.
// adds a handle below textareas that the user can drag with the mouse to resize the textarea.
// MODIFIED 2006-11-01 by ELS for cross-browser (IE) compatibility

// ELS: use explicit window.* global scope declaration for IE (required for functions called from event handlers)
window.TextAreaResizer = function(elt) {
	this.element = elt;
	this.create();
}
window.TextAreaResizer.prototype = {
	create : function() {
		var elt = this.element;
		var thisRef = this;
		var h = this.handle = document.createElement("div");
		// ELS: grab handle CSS style tweaks
		h.style.height = "3px"; // was 4px... looked too fat!
		h.style.overflow = "hidden"; // ELS: force IE to trim height to < 1em
		h.style.width=elt.offsetWidth+"px"; // ELS: match textarea width
		h.style.backgroundColor = "#999"; // ELS: standard mid-tone (dark) gray
		h.style.cursor = "s-resize";
		h.title = "Drag to resize text box";
		// ELS: IE doesn't support addEventListener()...
		// h.addEventListener("mousedown", function(evt){thisRef.dragStart(evt);}, false);
		h.onmousedown=function(evt){thisRef.dragStart(evt)};
		elt.parentNode.insertBefore(h, elt.nextSibling);
	},
	dragStart : function(evt) {
		// ELS: fixup event for IE
		if (!evt) var evt=window.event;
		// ELS: stop any ongoing drag event (from missed mouseup if outside window)
		this.dragStop(evt);
		var thisRef = this;
		this.dragStartY = evt.clientY;
		// ELS: IE doesn't support defaultView or getComputedStyle()... use offsetHeight instead
		// this.dragStartH = parseFloat(document.defaultView.getComputedStyle(this.element, null).getPropertyValue("height"));
		this.dragStartH = this.element.offsetHeight;
		// ELS: IE doesn't support addEventListener()...
		// document.addEventListener("mousemove", this.dragMoveHdlr=function(evt){thisRef.dragMove(evt);}, false);
		// document.addEventListener("mouseup", this.dragStopHdlr=function(evt){thisRef.dragStop(evt);}, false);
		document.savedmousemove=document.onmousemove;
		document.onmousemove=this.dragMoveHdlr=function(evt){thisRef.dragMove(evt)};
		document.savedmouseup=document.onmouseup;
		document.onmouseup=this.dragStopHdlr=function(evt){thisRef.dragStop(evt)};
	},
	dragMove : function(evt) {
		// ELS: fixup event for IE
		if (!evt) var evt=window.event;
		// ELS: make sure height is at least 10px
		var h=this.dragStartH+evt.clientY-this.dragStartY; if (h<10) h=10; this.element.style.height=h+"px";
		// ELS: match textarea width (which can change due to document scrollbars)
		this.handle.style.width=this.element.offsetWidth+"px";
		// ELS: when manually resizing, disable autoresizing (without restoring saved height)
		if (this.element.maxed!=undefined && this.element.maxed) config.commands.autosizeEditor.stop(this.element,false);
	},
	dragStop : function(evt) {
		// ELS: fixup event for IE
		if (!evt) var evt=window.event;
		// ELS: IE doesn't support removeEventListener()...
		// document.removeEventListener("mousemove", this.dragMoveHdlr, false);
		// document.removeEventListener("mouseup", this.dragStopHdlr, false);
		document.onmousemove=(document.savedmousemove!=undefined)?document.savedmousemove:null;
		document.onmousemove=(document.savedmouseup!=undefined)?document.savedmouseup:null;
	},
	destroy : function() {
		var elt = this.element;
		elt.parentNode.removeChild(this.handle);
		elt.style.height = "";
	}
};

// automatically tweak shadow EditTemplate to add "resizeEditor" macro and "autosizeEditor" toolbar command
config.shadowTiddlers.EditTemplate = "<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler copyTiddler deleteTiddler autosizeEditor'></div>\n<div class='title' macro='view title'></div>\n<div class='editor' macro='edit title'></div>\n<div class='editor' macro='edit text'></div>\n<div class='editor' macro='edit tags'></div>\n<div class='editorFooter'>\n<span macro='message views.editor.tagPrompt'></span>\n<span macro='tagChooser'></span>\n</div><span macro='resizeEditor'></span>";
//}}}
[[ResizeEditorPlugin]] は編集エリアをリサイズすることができる。

Plugin 導入ののち、以下を [[EditTemplate]] へ追記する。
{{{
<!-- add 'autosizeEditor' command to end of existing editor toolbar definition -->
<div class='toolbar' macro='toolbar ... autosizeEditor'>
<!-- add span with 'resizeEditor' macro anywhere in the edit template -->
<span macro='resizeEditor'></span></div>
}}}

編集時にテキストエリアの下部にリサイズのバーが現われる。
「autosize」のボタンは、テキストの内容量に応じてリサイズしてくれる。

[[ToggleSideBarMacro]] と組み合わせると大きなエリアで入力、編集が可能になったりする。
◆コメント、トラックバック
<<haloscan comments>>	Add/view comments
<<haloscan trackbacks>>	Add/view trackbacks

◆RSS
<<rssfeed http://groups.google.com/group/TiddlyWiki/feed/rss_v2_0_msgs.xml 5>>
<<rssfeed http://kuraku.net/krk/index.xml 5>>

◆SaveAndReloadMacro
セーブしてリロードする。
{{{
<<saveAndReload>>
}}}
<<saveAndReload>>

◆ShowClockMacro
|Local|<<showClock>>|
|Queensland|<<showClock +10>>|
|England (DST)|<<showClock +1>>|
|California (DST)|<<showClock -7>>|

◆NewerTiddler
 * <<newerTiddler button:"Inbox" name:"Inbox YYYY/MM/DD" tags:"Journal, inbox" text:"New stuff for today:">>
 * <<newerTiddler button:"@Action" name:"Action: what" tags:"@Action" text:"Add project and describe action">>
 * <<newerTiddler button:"New Project" name:"Project Name?" tags:"My Projects, My Inbox, Journal" template:"MyTemplate">>

◆内容引用
<<<
<<tiddler GettingStarted>>
<<<

◆inlineテスト
<script label="click here" show>
 if (!window.story) window.story=window;
 alert("Hello World!\nlinktext='"+place.firstChild.data+"'\ntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");
</script>

◇リロード
<script label="reload">
 if (!window.story) window.story=window;
 location.reload()
</script>


◆nestedslider
+++^[get info...=I|click for information or press Alt-I]
 put some general information here, plus a floating slider with more specific info:
 +++^10em^[view details...|click for details]
 put some detail here, which could include a rollover with a +++^25em^*[glossary definition]explaining technical terms===
 ===
===

を応用して。

+++^[tagCloud...]
 <<tagCloud>>
===

+++(testc)[test cookie >]
Cookie で開閉を覚える。
===


◆new feature 2.1
# Added 'emdash' formatter for --
# Added <br>, and deprecated existing <<br>> macro 

◆tag dropdown
{{{
<<tag Plugins|plugins>>
}}}
という記述で「plugins」タグリストを持つボタンになる。
<<tag Plugins|plugins>>

◆レイアウト変更
tag をタイトルの上に表示。編集時もタイトルの下に。
EditTemplate ViewTemplate StyleSheetColors を変更

◆RenameTagsPlugin
Tag のページを開いてタイトルを変えてしまう。done のときに良いか訊かれる。

◆favicon 付けた。
サイトの favicon.ico を置いて、
> <link rel="shortcut icon" href="favicon.ico">
を <head> に追加。

◆ver 2.1 に upgrade (061002)

◆emptyファイル保存
<<saveMyEmpty>>

◆checkbox
[ ]チェックボックス
[x]Todo とかに
[x(メモ|memo2)] memo2 という tag が付く↑

◆~
~~kuraku くらく~~
文字が小さくなる。もともとあったが使っていなかった。subscript

◆日付のみ表示
<<today "YYYY.0MM.0DD">>

◆7項目だけ
<<timeline "modified" 7>>

◆SideBar を隠す
<<toggleSideBar "Toggle Sidebar" "サイドバーを隠します">>

◆ジャーナルに タグをデフォルトで付ける(カレンダーからはダメ)
<<newJournal "YYYY.0MM.0DD-2" "tagtag" >>

◆Calendarplugin
<<calendar thismonth>>
今日がハイライトされない。メニューに入れると日付ドキュメントがあるか無いか分からない。
→DatePlugin を入れることでうまく行くようになる。

◆highlight マクロ。
<<hl 「hl」という名前>>。文字列にスペースが入ると駄目らしい。
<<hl "「hl」 という 名前">>。「"」で囲めば良いらしい。

new マクロ。作る <<newnew>>
なにかに応用できるか?

保存パスにスペースが入っていても大丈夫な patch を入れる。

ListTag マクロ。
<<list tag systemConfig システム設定>>

Box マクロ。
<<box マクロ>> でどぉ。

br タグとは。
*ここでおりかえす<<br>>おりかえした?

TabTimeline を60日指定にした。

Shift+確定で、@@bgcolor(#0ff):修正日付が変わらない@@。

TagCloud plugin 入れてみた。

TiddlyWiki 1.x から TiddlyWiki 2.0 へうまくバージョンアップできなかったのは、日本語メニューのせいらしい。
/***
|Name|SaveAndReloadMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#SaveAndReloadMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a button to save and reload TW. Useful if you are testing code and dont have AutoSave enabled.

!Demo:
{{{<<saveAndReload>>}}}<<saveAndReload>>

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.

!History:
*24-07-06: ver 1.0

!Code
***/
//{{{
config.macros.saveAndReload={};
config.macros.saveAndReload.handler= function(place,macroName,params,wikifier,paramString,tiddler)
{
        var label = params[0]||"Save & Reload";
        var tooltip = params[1]||"Save & reload";
        createTiddlyButton(place,label,tooltip,this.onclick);
}
config.macros.saveAndReload.onclick= function()
{
       saveChanges();
       window.location.reload( false );
}
//}}}
/***
| Name|SaveCloseTiddlerPlugin|
| Description|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://mptw.tiddlyspot.com/#SaveCloseTiddlerPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
To use these you must add them to the tool bar in your EditTemplate
***/
//{{{
merge(config.commands,{

	saveCloseTiddler: {
		text: 'done / X',
		tooltip: 'Undo changes to this tiddler and close it',
		handler: function(e,src,title) {
			config.commands.saveTiddler.handler(e,src,title);
			config.commands.closeTiddler.handler(e,src,title);
			return false;
		}
	},

	cancelCloseTiddler: {
		text: 'cancel / X',
		tooltip: 'Save changes to this tiddler and close it',
		handler: function(e,src,title) {
			config.commands.cancelTiddler.handler(e,src,title);
			config.commands.closeTiddler.handler(e,src,title);
			return false;
		}
	}

});

//}}}
//{{{
config.macros.saveMyEmpty = {
 tag: "myEmpty",
 filename: "myempty.html",
 label: "設定済み空ファイル保存",
 prompt: "設定済み空ファイルを保存する",
 message: "設定済み空ファイルを保存しました"
};

config.macros.saveMyEmpty.handler = function(place)
{
 if (!readOnly)
 createTiddlyButton(place,this.label,this.prompt,this.onClick,null,null,null);
}

config.macros.saveMyEmpty.onClick = function(e)
{
 saveMyEmpty();
 return false;
}

function taggedTiddlersAsHtml()
{
 var savedTiddlers = [];
 var tiddlers = store.reverseLookup("tags", config.macros.saveMyEmpty.tag, true, "title");
 for (var t = 0; t < tiddlers.length; t++)
 savedTiddlers.push(tiddlers[t].saveToDiv());
 return savedTiddlers.join("\n");
}

function saveMyEmpty()
{
 clearMessage();
 // Get the URL of the document
 var originalPath = document.location.toString();
 // Check we were loaded from a file URL
 if(originalPath.substr(0,5) != "file:")
 {
 alert(config.messages.notFileUrlError);
 if(store.tiddlerExists(config.messages.saveInstructions))
 displayTiddler(null,config.messages.saveInstructions);
 return;
 }
 var localPath = getLocalPath(originalPath);
 // Load the original file
 var original = loadFile(localPath);
 if(original == null)
 {
 alert(config.messages.cantSaveError);
 if(store.tiddlerExists(config.messages.saveInstructions))
 displayTiddler(null,config.messages.saveInstructions);
 return;
 }
 // Locate the storeArea div's
 var posOpeningDiv = original.indexOf(startSaveArea);
 var posClosingDiv = original.lastIndexOf(endSaveArea);
 if((posOpeningDiv == -1) || (posClosingDiv == -1))
 {
 alert(config.messages.invalidFileError.format([localPath]));
 return;
 }
 // Save new file
 var emptyPath,p;
 if((p = localPath.lastIndexOf("/")) != -1)
 emptyPath = localPath.substr(0,p) + "/" + config.macros.saveMyEmpty.filename;
 else if((p = localPath.lastIndexOf("\\")) != -1)
 emptyPath = localPath.substr(0,p) + "\\" + config.macros.saveMyEmpty.filename;
 else
 emptyPath = localPath + "." + config.macros.saveMyEmpty.filename;

 var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + 
 convertUnicodeToUTF8(taggedTiddlersAsHtml()) + "\n\t\t" +
 original.substr(posClosingDiv);
 var newSiteTitle = convertUnicodeToUTF8((wikifyPlain("SiteTitle") + " - " + wikifyPlain("SiteSubtitle")).htmlEncode());
 revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
 revised = revised.replaceChunk("<!--PRE-HEAD-START--"+">","<!--PRE-HEAD-END--"+">","\n" + store.getTiddlerText("MarkupPreHead","") + "\n");
 revised = revised.replaceChunk("<!--POST-HEAD-START--"+">","<!--POST-HEAD-END--"+">","\n" + store.getTiddlerText("MarkupPostHead","") + "\n");
 revised = revised.replaceChunk("<!--PRE-BODY-START--"+">","<!--PRE-BODY-END--"+">","\n" + store.getTiddlerText("MarkupPreBody","") + "\n");
 revised = revised.replaceChunk("<!--POST-BODY-START--"+">","<!--POST-BODY-END--"+">","\n" + store.getTiddlerText("MarkupPostBody","") + "\n");
 var save = saveFile(emptyPath,revised);
 if(save)
 {
 displayMessage(config.macros.saveMyEmpty.message,"file://" + emptyPath);
 store.setDirty(false);
 }
 else
 alert(config.messages.mainFailed);
}
//}}}
!説明
AdvancedOptionsには、empty.htmlを保存するオプションがありますが、これで保存されるファイルはダウンロードしたときと同じ全くtiddlerがない状態のHTMLファイルであり、自分でカスタマイズした内容は反映されていません。そこで、レイアウト、配色、各種基本プラグイン等といった、カスタマイズ項目のみを含んだ状態の空ファイルを保存するマクロを作成しました。このマクロを使うことで、はじめから自分用に使いやすい状態に設定されているテンプレートファイルを生成することができます。

!使用方法
#SaveMyEmptyMacroを新規tiddlerにペーストして「systemConfig」タグを付加します
#マクロを有効にするために、保存してから一度リロードします
#設定済み空ファイルに保存したいtiddlerに「myEmpty」のタグを付加します。PageTemplate、StyleSheetColors、StyleSheetLayout、[[日本語化パッチ|Opt02:日本語メッセージ]]などのtiddlerに付加するのがお勧めです
#以下のようにして設定済み空ファイル保存ボタンを設置します。設置場所はMainMenu、SideBarOptions、OptionsPanelあたりがお勧めです<<br>>{{{<<saveMyEmpty>>}}}
#設定済み空ファイル保存ボタンを押すと、元ファイルと同じフォルダにmyempty.htmlというファイルが作成されます

注.本機能は、ローカル使用の場合のみ有効です
!ソース
SaveMyEmptyMacro

やっていることはsaveChanges()の変更保存処理とほぼ同じです。allTiddlersAsHtmlで全tiddlerを取得する代わりに、指定タグのtiddlerのみ取得するtaggedTiddlersAsHtml関数を作って置き換えました。
__あらかじめ [[HaloScan|http://www.haloscan.com/]] に log In しておく必要があります。__ ~~(複数アカウントを持っている方も気をつけてください)~~
<html>
<h2>Send Trackback Pings</h2>

<form name="tbmanping" method="post" action="http://www.haloscan.com/members/tbping.php" target="_blank"><p><label for="tbBlogName"><b>Your Blog Name</b></label>  <a target="_blank" href="http://www.haloscan.com/members/help.php?type=trackback_BlogName" onclick="window.open(this.href, 'popupwindow', 'width=400,height=400,scrollbars,resizable'); return false;" class="helpbutton">?</a>:<br />

<input id="tbBlogName" name="tbBlogName" type="text" size="48" maxlength="50" value="KuRaKu TiddlyWiki - TiddlyWiki備忘録" /></p><p><label for="tbURL"><b>Your Blog Post Address (Permalink URL)</b></label>  <a target="_blank" href="http://www.haloscan.com/members/help.php?type=trackback_URL" onclick="window.open(this.href, 'popupwindow', 'width=400,height=400,scrollbars,resizable'); return false;" class="helpbutton">?</a>:<br />
<input  id="tbURL" name="tbURL" type="text" size="78" value="copy & paste permalink" maxlength="200" /></p><p><label for="tbEntryTitle"><b>Your Blog Post Title</b></label>  <a target="_blank" href="http://www.haloscan.com/members/help.php?type=trackback_EntryTitle" onclick="window.open(this.href, 'popupwindow', 'width=400,height=400,scrollbars,resizable'); return false;" class="helpbutton">?</a>: <br />
<input id="tbEntryTitle" name="tbEntryTitle" type="text" size="78" maxlength="50" value="" /></p><p><label for="tbExcerpt"><b>Your Blog Post Excerpt</b></label>  <a target="_blank" href="http://www.haloscan.com/members/help.php?type=trackback_Excerpt" onclick="window.open(this.href, 'popupwindow', 'width=400,height=400,scrollbars,resizable'); return false;" class="helpbutton">?</a>: <br /><textarea class="editor" id='tbExcerpt' name='tbExcerpt' rows='6' cols='60'></textarea></p><p><label for="tbTargets"><b>URL(s) to Ping</b></label>  <a target="_blank" href="http://www.haloscan.com/members/help.php?type=trackback_Targets" onclick="window.open(this.href, 'popupwindow', 'width=400,height=400,scrollbars,resizable'); return false;" class="helpbutton">?</a>: <br /><textarea class="editor" id='tbTargets' name='tbTargets' rows='5' cols='60'></textarea></p><p><input name="submit" type="submit" class="button" value="Send Pings" /></p></form><img src="http://www.haloscan.com/forum/stats.php?login=krkclip" width="1" height="1" alt="" title="" />
</html>
//{{{
config.shadowTiddlers["Configuration"]="PageTemplate\n|>|>|SiteTitle - SiteSubtitle|\n|MainMenu|DefaultTiddlers<<br>><<br>><<br>><<br>>ViewTemplate<<br>><<br>>EditTemplate|SideBarOptions|\n|~|~|OptionsPanel|\n|~|~|AdvancedOptions|\n|~|~|<<tiddler Configuration.SideBarTabs>>|\n\n''StyleSheet:'' StyleSheetColors - StyleSheetLayout - StyleSheetPrint\n\nSiteUrl";
config.shadowTiddlers["Configuration.SideBarTabs"]="SideBarTabs\n|[[Timeline|TabTimeline]]|[[All|TabAll]]|[[Tags|TabTags]]|>|>|[[More|TabMore]] |\n|>|>||[[Missing|TabMoreMissing]]|[[Orphans|TabMoreOrphans]]|[[Shadowed|TabMoreShadowed]]|";
config.shadowTiddlers["UploadControls"]="| Username:|<<option txtUploadUserName>>|\n| Password:|<<option pasUploadPassword>>|\n| site management:|<<upload http://your.site/store.php index.html backup .>>//(requires tiddlywiki password)//<<br>>[[download (go offline)|http://your.site/download.php]]|\n\n!Upload Macro parameters\n{{{\n<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>\n Optional positional parameters can be passed to overwrite\n UploadOptions.\n}}}";
//}}}
/***
!Example Usage
<<showClock>>
{{{
 Local:<<showClock>>
 Queensland: <<showClock +10>>
 England (DST): <<showClock +1>>
 California (DST): <<showClock -7>>
}}}
***/
//{{{
version.extensions.ShowClockMacro = { major: 0, minor: 0, revision: 1, date: new Date(2006,7,12),
 source: "http://tiddlyspot.com/timezones/#ShowClockMacro"
};

config.macros.showClock = {

 defaultClass: 'clock',
 tickDelay: 1000, 
 //format: "0DD MMM, YYYY 0hh:0mm:0ss",
 //custom
 format: "YYYY.0MM.0DD-0hh:0mm:0ss",

 styles: 
 ".clock {\n"+
 " padding:0 0.5em;\n"+
 "}\n" +
 ".clock .dow { color:#000; }\n" +
 ".clock .time { color:#000; }\n" +
 ".clock .offset { color:#999; }\n" +
 "",

 count: 0,

 handler: function (place,macroName,params,wikifier,paramString,tiddler) {
 var offset = params[0] || '';
 var useClass = params[1] || this.defaultClass;
 var c = this.count++;
 var clockElement = createTiddlyElement(place, "span", "clock" + c, useClass);
 clockElement.setAttribute("offset",offset);
 this.refreshDisplay(c);
 this.waitForTick(c);
 },

 waitForTick: function(c) {
 setTimeout("config.macros.showClock.tick(" + c + ")", this.tickDelay);
 },

 tick: function(c) {
 if (this.stillHere(c)) {
 this.refreshDisplay(c)
 this.waitForTick(c);
 }
 },

 getClock: function(c) {
 return document.getElementById("clock" + c);
 },

 stillHere: function(c) {
 return this.getClock(c) != null;
 },

 refreshDisplay: function(c) {
 var clock = this.getClock(c);
 var offset = clock.getAttribute("offset")
 var now = new Date();
 //var label = "local";
 var label = "";
 if (offset && offset != '') {
 var offsetInt = parseInt(offset);
 now.setHours(now.getHours() + (now.getTimezoneOffset() / 60) + offsetInt);
 label = "GMT " + (offsetInt == 0 ? "" : offsetInt > 0 ? "+"+offsetInt : offsetInt);
 }
 clock.innerHTML =
 // custom mas
 '<span class="time">' + now.formatString(this.format) + '</span>' + 
 '<span class="dow"> (' + now.formatString("DDD").substr(0,3) + ') </span>' +
 '<span class="offset"> ' + label + '</span>'
 }

};

setStylesheet(config.macros.showClock.styles,"showClockStyles");

//}}}
{{button{goto}}}
<<gotoTiddler width:6.5em>><<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "YYYY.0MM.0DD">><<saveChanges>><<tiddler TspotSidebar>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
<part calendar hidden>
{{viewer{<<calendar thismonth>>}}}
</part>
<<tabs txtMainTab "更新" "タイムライン" TabTimeline "すべて" "すべて" A-Z "タグ" "タグ" TabTags "他" "他リスト" TabMore>>
/% ----- Counter ----- %/~~<html><div align="right">
total:<img src="http://accnt.dp34000138.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=total"><br>
today:<img src="http://accnt.dp34000138.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=today"> / yesterday:<img src="http://accnt.dp34000138.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=yesterday">
</div></html>~~
<<tabs txtMainTab Timeline Timeline TabTimeline All 'Alphabet list' A-Z Tags 'All tags' TabTags More 'More lists' TabMore>>
/% ----- Counter ----- %/~~<html><div align="right">
total:<img src="http://sv78.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=total"><br>
today:<img src="http://sv78.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=today"> / yesterday:<img src="http://sv78.lolipop.jp/cnt/accnt.php?cnt_id=1141500&ac_id=LA11052066&mode=yesterday">
</div></html>~~
proxy.cgi?url=
HowTo/FAQ/Plugin
<<dirtyflag>>[[クラク@TiddlyWiki|FrontPage]]
http://kuraku.tiddlyspot.com/
/***
!!SpecialMark

特殊なマーク
{{{
[+] Dagger
[*] Comment
[>] Arrow
[t] todo
[d] done
[g] going
[s] Star
}}}

[+] Dagger
[*] Comment
[>] Arrow
[t] todo
[d] done
[g] going
[s] Star

!!!history
*2007.08.23 - replace setAttribute to style.cssText.
***/

/*{{{*/
version.extensions.SpMark= {major: 0, minor: 0, revision:1 , date: new Date(2007,4,6)};
 
config.formatters.push( {
  name: "SpMark",
  match: "\\[[\\+\\*\\>tdgs]\\]",
  lookahead: "\\[([\\+\\*\\>tdgs])\\]",

  handler: function(w) {
    var lookaheadRegExp = new RegExp(this.lookahead,"mg");
    lookaheadRegExp.lastIndex = w.matchStart;
    var lookaheadMatch = lookaheadRegExp.exec(w.source);

    if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
      var inside=lookaheadMatch[1];
      var style = "color:#333;display:inline;font-weight:bold;font-size:0.8em;";

      if ( inside == "+" ) { // dagger
        style += "color:#00f;";
        inside = "&nbsp;<sup>&dagger;</sup>";
      }
      else if ( inside == "*" ) { // *
        style += "color:#f00;";
        inside = "&nbsp;<sup>*</sup>";
      }
      else if ( inside == ">" ) { // ⇒
        style += "color:#f00;font-size:1.0em;";
        inside = "&nbsp;⇒&nbsp;";
      }
      // todo
      else if ( inside == "t" ) { // TODO
        style += "color:#fff;background:#f00;";
        inside = "&nbsp;TODO&nbsp;";
      }
      // done
      else if ( inside == "d" ) { // DONE
        style += "color:#fff;background:#aaa;";
        inside = "&nbsp;DONE&nbsp;";
      }
      // going
      else if ( inside == "g" ) { // GOING
        style += "color:#fff;background:#00f;";
        inside = "&nbsp;GOING&nbsp;";
      }
      // star
      else if ( inside == "s" ) { // ★
        style += "color:#f00;font-size:1.0em;";
        inside = "&nbsp;★&nbsp;";
      }

      var c = document.createElement("span");
      //c.setAttribute("style",style);
      c.style.cssText = style;
      c.innerHTML = inside;
      w.output.appendChild(c);
    }
  }
 } );
/*}}}*/
/***
|''Name:''|SparklinePlugin|
|''Description:''|Sparklines macro|
***/
//{{{
if(!version.extensions.SparklinePlugin) {
version.extensions.SparklinePlugin = {installed:true};

//--
//-- Sparklines
//--

config.macros.sparkline = {};
config.macros.sparkline.handler = function(place,macroName,params)
{
	var data = [];
	var min = 0;
	var max = 0;
	var v;
	for(var t=0; t<params.length; t++) {
		v = parseInt(params[t]);
		if(v < min)
			min = v;
		if(v > max)
			max = v;
		data.push(v);
	}
	if(data.length < 1)
		return;
	var box = createTiddlyElement(place,"span",null,"sparkline",String.fromCharCode(160));
	box.title = data.join(",");
	var w = box.offsetWidth;
	var h = box.offsetHeight;
	box.style.paddingRight = (data.length * 2 - w) + "px";
	box.style.position = "relative";
	for(var d=0; d<data.length; d++) {
		var tick = document.createElement("img");
		tick.border = 0;
		tick.className = "sparktick";
		tick.style.position = "absolute";
		tick.src = "data:image/gif,GIF89a%01%00%01%00%91%FF%00%FF%FF%FF%00%00%00%C0%C0%C0%00%00%00!%F9%04%01%00%00%02%00%2C%00%00%00%00%01%00%01%00%40%02%02T%01%00%3B";
		tick.style.left = d*2 + "px";
		tick.style.width = "2px";
		v = Math.floor(((data[d] - min)/(max-min)) * h);
		tick.style.top = (h-v) + "px";
		tick.style.height = v + "px";
		box.appendChild(tick);
	}
};


}
//}}}
/***

''Inspired by [[TiddlyPom|http://www.warwick.ac.uk/~tuspam/tiddlypom.html]]''

|Name|SplashScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#SplashScreenPlugin|
|Version|0.21 |
|Requires|~TW2.08+|
!Description:
Provides a simple splash screen that is visible while the TW is loading.

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

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

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

!Code
***/
//{{{
var old_lewcid_splash_restart=restart;

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


var oldText = store.getTiddlerText("MarkupPreHead");
if (oldText.indexOf("SplashScreen")==-1)
   {var siteTitle = store.getTiddlerText("SiteTitle");
   var splasher='\n\n<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';
   if (! store.tiddlerExists("MarkupPreHead"))
       {var myTiddler = store.createTiddler("MarkupPreHead");}
   else
      {var myTiddler = store.getTiddler("MarkupPreHead");}
      myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);
      store.setDirty(true);
      var splashScreenInstall = true;
}
//}}}
Updated to hide the contentWrapper while the SplashScreen is displayed. 
Coming Soon: easier editing of the SplashScreen.
Get it here: SplashScreenPlugin.
SplashScreenPlugin はロード時に、ロード中の画面表示を提供する。

この plugin をインストールして、save し reload すると、まず機能が組み込まれる。
再度 save して reload するとスプラッシュ画面が現われるようになる。

ロード時間が長いときには良いかもしれない。

[[MarkupPreHead]] が表示される内容なのでこれを編集すれば表示に反映される。
<!--- [[Blueberry 2|StyleSheet]] with ideas shamesslessly taken from (and suggested by) Simon Baird, Clint Checketts and Christine Hodges --->

/*{{{*/
.headerForeground { display: none;}
#sidebar {width: 171px; background: #e7ecee;border-left: solid 2px #8895bb;border-top: solid 2px #97a8d2;}
#sidebarTabs .tabContents {width: 158px; background: #dce1e3;font-weight: bold; color: #333 ;}
#sidebarOptions input { border: solid 2px #8895bb; }
#sidebarOptions .sliderPanel { background: #eee;}
#sidebarOptions a {;border: none;}
#sidebarOptions .sliderPanel a {border: none;color: #00005a;}
#displayArea {background: #fff;margin: 1em 15.7em 0em 1em;border-left: solid 2px #8895bb;}
.viewer {line-height: 1.4em;padding-bottom: 1em;border-bottom:solid 1px #dedede;}
.viewer th, thead td {background: #00009d;border: 1px solid #666;color: #fff;}
.title {color: #000}
/**h1,h2,h3,h4,h5 {color: #fff;background: #00009d;}
**/
/**KuRaKu custom**/
.viewer h1{
color: #fff;
padding-top: 1px;
border-left:2px solid #00009d;
border-top:1px solid #00009d;
border-bottom:1px solid #00009d;
background-color: #00009d;
}
.viewer h2 {
color: #000;
padding-top: 1px;
padding-left: 2px;
border-left:6px solid #00009d;
border-bottom:4px solid #00009d;
border-top:1px solid #00009d;
border-right:3px solid #00009d;
background-color: #fff;
}
.viewer h3,.viewer h4 {
color: #000;
border-left:4px solid #00009d;
border-bottom:1px solid #00009d;
border-top:1px solid #00009d;
border-right:2px solid #00009d;
background-color: #fff;
padding-left: 2px;
margin-bottom: 4px;
}
.viewer h5,.viewer h6 {
color: #000;
border-left:6px solid #00009d;
background-color: #fff;
padding-left: 2px;
margin-bottom: 2px;
}
.viewer pre {
        font-size: 1.0em;
        line-height: 1.2em;
} 
.viewer code {
        font-size: 1.0em;
        line-height: 1.2em;
} 

a{ color: #00005a;}
a:hover{ background: #00009d; color: #fff;font-weight: bold;}
.externalLink { text-decoration: underline; color: #000083;}
body { background: #97a8d2;}
.popup { background: #04b; border: 1px solid #04b; color: #ccc;} //upd krk
.popup li a:hover {background: #dedede;color: #000083;border: none;} 
.popup li.disabled {color: #000;}
.popup a {color: #eee;} //upd krk
.button:hover {color: #fff;background: #00009d;
 border: 1px solid #dedede;}
#topMenu { background: transparent; padding: 6px;margin-left: -5px;border-bottom: solid 3px #00005a}
#topMenu .button, #topMenu .tiddlyLink, tiddlyLinkExisting, #topMenu .externalLink
{
 color: #fff;
 text-align: center;
 font-weight: bold;
 font-size: 1.1em;
 text-decoration: none;
 letter-spacing: 1.5px;
 background: transparent;
 border-right: solid 1px #fff;
 padding: 5px 15px 6px 15px;
}
#topMenu a:hover {
 color: #fff;
 background: #00009d;
 border: solid 1px #db4;
}
#topMenu br {display: none; padding-right: 1em;}

/***
!tags horizontally /%==================================================%/
***/
/*{{{*/
/* displays the list of a tiddler's tags horizontally. used in ViewTemplate */
.tagglyTagged li.listTitle {
 display:none
}
.tagglyTagged li {
 display: inline; font-size:90%;
}
.tagglyTagged ul {
 margin:0px; padding:0px;
}

#displayArea {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}
#hoverMenu .button, #hoverMenu .tiddlyLink {
  background:#039;
}

.tiddlyLinkIncluded {
	color: #369 !important;
	font-style: italic;
	font-weight: normal;
}
#backstageShow, #backstageHide {
  font-size: 0.8em;
}
.popup li a {
color: #eee;
}
#messageArea {
top:0em;
}
/*}}}*/
[[StyleSheetShortcuts]] /% include style %/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
.header {display:none;}
#hoverMenu {display:none;}
}
/*}}}*/
/***
|Name|StyleSheetShortcuts|
|Source|http://www.TiddlyTools.com/#StyleSheetShortcuts|
|Version||
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|CSS|
|Requires||
|Overrides||
|Description|CSS classes for common formatting, alignment, boxes, tables, etc.|

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

/* text alignments */
.left
	{ display:block;text-align:left; }
.center
	{ display:block;text-align:center; }
.right	
	{ display:block;text-align:right; }
.justify
	{ display:block;text-align:justify; }
.indent
	{ display:block;margin:0;padding:0;border:0;margin-left:2em; }
.floatleft
	{ float:left; }
.floatright
	{ float:right; }
.clear
	{ clear:both; }
.wrap
	{ white-space:normal; }
.nowrap
	{ white-space:nowrap; }
.hidden
	{ display:none; }
.span
	{ display:span; }
.block
	{ display:block; }
.relative
	{ position:relative; }
.absolute
	{ position:absolute; }

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

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

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

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

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

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

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

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

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

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

/* colors */
.green { color:#6f6 !important }
.red { color:#f66 !important }
.blue { color:#99f !important }

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

/*}}}*/
/***
|Name|SystemInfoPlugin|
|Source|http://www.TiddlyTools.com/#SystemInfoPlugin|
|Version|1.7.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|view system internal data and settings|
~TidIDE (//prounounced "Tie Dyed"//) - ''Tid''dlyWiki ''I''ntegrated ''D''evelopment ''E''nvironment - tools for ~TiddlyWiki authors and editors.  

You can use the {{{<<systemInfo>>}}} control panel to view a variety of system internal data and functions, and view/modify ''all'' of ~TiddlyWiki's internal config.option.* settings.  NOTE: Non-default config.options are stored in cookies and are retrieved whenever the TW document is loaded into a browser; however, ''core TW functions and custom-defined plugins can explicitly ignore or reset any locally-stored cookie values and use their own, internally-defined values'' instead.  As a result, changes to these may be completely ignored, or may only have an effect during the current TW document "session" (i.e., until the TW document is reloaded), even though a persistent cookie value has been saved.
!!!!!Usage/Example
<<<
{{{<<systemInfo>>}}}
{{smallform{<<systemInfo>>}}}
<<<
!!!!!Revisions
<<<
''2007.10.31 [1.7.1]'' code reduction: when filling globals droplist, instead of using a large, static "global exclusion list", simply skip global *functions*, while still listing all other global properties, including key TW internal objects such as "config".
''2007.09.09 [1.7.0]'' split from TidIDEPlugin
|please see [[TidIDEPluginInfo]] for additional revision details|
''2006.04.15 [0.5.0]'' Initial ALPHA release. Converted from inline script.
<<<
!!!!!Code
***/
//{{{
version.extensions.SystemInfoPlugin= {major: 1, minor: 7, revision: 1, date: new Date(2006,10,31)};
config.shadowTiddlers.SystemInfo="<<systemInfo>>";
config.macros.systemInfo = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var span=createTiddlyElement(place,"span")
		span.innerHTML=this.html;
		this.getsys(span.getElementsByTagName("form")[0]); // initialize form
	},
	getsys: function(f) {
		f.sysview.value="";

		// OPTIONS
		while (f.sys_opts.options.length > 1) { f.sys_opts.options[1]=null; } // clear list
		f.config_view.value="";  // clear edit field
		var cookies = { };
		if (document.cookie != "") {
			var p = document.cookie.split("; ");
			for (var i=0; i < p.length; i++) {
				var pos=p[i].indexOf("=");
				if (pos==-1)
					cookies[p[i]]="";
				else
					cookies[p[i].substr(0,pos)]=unescape(p[i].slice(pos+1));
			}
		}
		var c=1;
		var opt=new Array(); for (var i in config.options) opt.push(i); opt.sort();
		for(var i=0; i<opt.length; i++) {
			if ((opt[i].substr(0,3)=="txt")||(opt[i].substr(0,3)=="chk")) {
				var txt = (opt[i].substr(0,3)=="chk"?("["+(config.options[opt[i]]?"x":"_")+"] "):"")+opt[i]+(cookies[opt[i]]?" (cookie)":"");
				var val = config.options[opt[i]];
				f.sys_opts.options[c++]=new Option(txt,val,false,false);
			}
		}

		// STYLESHEETS
		while (f.sys_styles.options.length > 1) { f.sys_styles.options[1]=null; } // clear list
		var c=1;
		var styles=document.getElementsByTagName("style");
		for(var i=0; i < styles.length; i++) {
			var id=styles[i].getAttribute("id"); if (!id) id="(default)";
			var txt=id;
			var val="/* stylesheet:"+txt+" */\n"+styles[i].innerHTML;
			f.sys_styles.options[c++]=new Option(txt,val,false,false);
		}

		// SHADOWS
		while (f.sys_shadows.options.length > 1) { f.sys_shadows.options[1]=null; } // clear list
		var c=1;
		for(var s in config.shadowTiddlers) f.sys_shadows.options[c++]=new Option(s,config.shadowTiddlers[s],false,false);

		// NOTIFICATIONS
		while (f.sys_notify.options.length > 1) { f.sys_notify.options[1]=null; } // clear list
		var c=1;
		for (var i=0; i<store.namedNotifications.length; i++) {
			var n = store.namedNotifications[i];
			var fn = n.notify.toString();
			fn = fn.substring(fn.indexOf("function ")+9,fn.indexOf("{")-1);
			var txt=(n.name?n.name:"any change")+"="+fn;
			var val="/* notify: "+txt+" */\n"+n.notify.toString();
			f.sys_notify.options[c++]=new Option(txt,val,false,false);
		}

		// MACROS
		while (f.sys_macros.options.length > 1) { f.sys_macros.options[1]=null; } // clear list
		var c=1;
		var macros=new Array(); for (var m in config.macros) macros.push(m); macros.sort();
		for(var i=0; i < macros.length; i++)
			f.sys_macros.options[c++]=new Option(macros[i],this.showObject(config.macros[macros[i]]),false,false);

		// COMMANDS
		while (f.sys_commands.options.length > 1) { f.sys_commands.options[1]=null; } // clear list
		var c=1;
		for(var cmd in config.commands)
			f.sys_commands.options[c++]=new Option(cmd,this.showObject(config.commands[cmd]),false,false);

		// FORMATTERS
		while (f.sys_formatters.options.length > 1) { f.sys_formatters.options[1]=null; } // clear list
		var c=1;
		for(var i=0; i < config.formatters.length; i++)
			f.sys_formatters.options[c++]=new Option(config.formatters[i].name,this.showObject(config.formatters[i]),false,false);

		// PARAMIFIERS
		while (f.sys_params.options.length > 1) { f.sys_params.options[1]=null; } // clear list
		var c=1;
		for(var param in config.paramifiers)
			f.sys_params.options[c++]=new Option(param,this.showObject(config.paramifiers[param]),false,false);

		// GLOBALS
		//global variables and functions (excluding most DOM and ~TiddyWiki core definitions)://
		while (f.sys_globals.options.length > 1) { f.sys_globals.options[1]=null; } // clear list
		if (config.browser.isIE) return; // BYPASS - 8/16/2006 // DON'T LIST GLOBALS IN IE... throws object error - WFFL
		try {
			var c=1;
			for (var v in window) if ((typeof window[v])!='function') {
				var t=window[v];
				if ((typeof window[v])=='object') {
					var t='';
					for (var p in window[v]) {
						t+=((typeof window[v][p])!='function')?('['+typeof window[v][p]+'] '+p):p;
						t+=((typeof window[v][p])!='function')?('='+window[v][p]):'';
						t+='\n';
					}
				}
				f.sys_globals.options[c++]=new Option(((typeof window[v])!='function')?('['+typeof window[v]+'] '+v):v,t,false,false);
			}	
		}
		catch(e) { ; }
	},
	setsys: function(f) {
		if (f.sys_opts.selectedIndex==0) return; // heading - do nothing
		var name=f.sys_opts.options[f.sys_opts.selectedIndex].text.replace(/\[[Xx_]\] /,'').replace(/ \(cookie\)/,'')
		var value=f.config_view.value;
		config.options[name]=value;
		saveOptionCookie(name);
		f.sys_opts.options[f.sys_opts.selectedIndex].value=value;
		return;
	},
	showObject: function(o) { // generate formatted output for displaying object references
		var t="";
		for (var p in o) {
			if (typeof o[p]=="function") {
				t+="- - - - - - - - - - "+p+" - - - - - - - - - -\n";
				t+=o[p].toString();
				t+="\n- - - - - - - - - - END: "+p+" - - - - - - - - - -\n";
			}
			else
				t+='['+typeof o[p]+'] '+p+": "+o[p]+"\n";
		}
		return t;
	},
	html: "\
	<form style='display:inline;margin:0;padding:0;'> \
		<!-- configurable options --> \
		<table style='width:100%;border:0;padding:0;margin:0'><tr style='border:0;padding:0;margin:0'> \
		<td style='width:30%;border:0;padding:0;margin:0'> \
			<select size=1 name='sys_opts' style='width:100%;' \
				onchange='this.form.config_view.value=this.value'> \
				<option value=\"\">config.options.*</option> \
			</select> \
		</td><td style='width:50%;border:0;padding:0;margin:0;'> \
			<input type=text name='config_view' size=60 style='width:99%;' value=''> \
		</td><td style='width:20%;white-space:nowrap;border:0;padding:0;margin:0;'> \
			<input type=button style='width:50%;' value='set option' title='save this TiddlyWiki option value' \
				onclick='config.macros.systemInfo.setsys(this.form);config.macros.systemInfo.getsys(this.form);'><!-- \
			--><input type=button style='width:50%;' value='refresh' title='retrieve current options and system values' \
				onclick='this.form.sysview.style.display=\"none\"; config.macros.systemInfo.getsys(this.form);'> \
		</td></tr><tr style='border:0;padding:0;margin:0'><td colspan=3 \
				style='white-space:nowrap;width:100%;border:0;padding:0;margin:0'> \
			<!-- system objects --> \
			<select size=1  name='sys_styles' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">stylesheets...</option> \
			</select><select size=1  name='sys_shadows' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">shadows...</option> \
			</select><select size=1  name='sys_notify' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">notifications...</option> \
			</select><select size=1  name='sys_globals' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">globals...</option> \
			</select><br><select size=1  name='sys_macros' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">macros...</option> \
			</select><select size=1  name='sys_commands' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">commands...</option> \
			</select><select size=1  name='sys_formatters' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">formatters...</option> \
			</select><select size=1  name='sys_params' style='width:25%;' \
				onchange='this.form.sysview.style.display=\"block\"; this.form.sysview.value=this.value'> \
				<option value=\"\">paramifiers...</option> \
			</select> \
			<!-- system value display area --> \
			<span style='white-space:normal;'><textarea id='sysview' name=sysview cols=60 rows=12 \
				onfocus='this.select()' style='width:99.5%;height:16em;display:none'></textarea></span> \
		</td></tr></table> \
	</form>"
}
//}}}
/***
|''Name:''|TWGuideForJPMacro|
|''Source:''|http://tw.kuraku.net/tw.html#TWGuideForJPMacro|
|''Author:''|kuraku|
|''License:''|http://creativecommons.org/licenses/by-sa/2.5/|
|''Version:''|0.1.5 (2007-08-22)|
|''CoreVersion:''|2.2|
!!Description
編集時にガイドを表示できます。

[[HelpTextMacro]] の姉妹品です。
ガイドを含んでいますので、このマクロさえインストールすればテキストのコピーは要りません。

<<toolbar guidejp>> こんなボタンを編集時に使えます。

!!Install
この [[TWGuideForJPMacro]] をコピーした後、タグに systemConfig を追加の後、保存してリロードしてください。

[[EditTemplate]] に以下のように「guidejp」を追記します。
//{{{
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler guidejp deleteTiddler'></div>
...
//}}}
([[EditTemplate]] はこれまでに修正したことが無ければ {{{SideBar: More>Shadow}}} を見てください。

!!~TiddlyWiki Guide Tiddler
導入により、{{{SideBar: More>Shadow}}} に [[TWGuideForJP]] が追加されます。
もし自分用に修正するのであれば、[[こちら|TWGuideForJP]]を直してください。
***/
/*{{{*/
config.shadowTiddlers["TWGuideForJP"]="''文字装飾:''\n{{{\n''太字''\n--取消線--\n__下線__\n//斜体//\n2^^3^^=8\na~~ij~~ = -a~~ji~~\n}}}\n''太字''\n--取消線--\n__下線__\n//斜体//\n2^^3^^=8\na~~ij~~ = -a~~ji~~\n{{{\n@@ハイライト@@\n@@color(green):着色(ここでは緑)@@\n@@color:red;文字列(赤)@@\n@@bgcolor(#000000):color(#00FFFF):背景色の設定もできます。@@\n@@color:#f0f;background-color:#aaa;文字列@@\n}}}\n@@ハイライト@@\n@@color(green):着色(ここでは緑)@@\n@@color:red;文字列(赤)@@\n@@bgcolor(#000000):color(#00FFFF):背景色の設定もできます。@@\n@@color:#f0f;background-color:#aaa;文字列@@\n{{{\n{{{固定幅の表示}} }\n{{{\n 固定幅の表示(ブロック)\n}} }\n/% comment %/ これは見えません。\n\"\"\"装飾無し(「\"」三つで囲む)\"\"\"\n~装飾無し\n----\n}}}\n(※「}} }」と3文字目にスペースが入っているのは表示に問題があるためです。実際はスペースを詰めてください。)\n\n{{{固定幅の表示}}}\n{{{\n 固定幅の表示(ブロック)\n}}}\n/% comment %/ これは見えません。\n\"\"\"装飾無し(「\"」三つで囲む)\"\"\"\n~装飾無し\n----\n\n''通常リスト:''\n{{{\n* 一段目\n** 階層化もできます。\n** 同一レベルに記述するとこんなかんじ。\n* そして元に戻ります。\n}}}\n* 一段目\n** 階層化もできます。\n** 同一レベルに記述するとこんなかんじ。\n* そして元に戻ります。\n\n''番号リスト:''\n序数を付けたリストです。\n{{{\n#item1\n#item2\n##item2.1\n##item2.2\n##item2.3\n#item3\n##item3.1\n###item3.1.1\n###item3.1.2\n}}}\n#item1\n#item2\n##item2.1\n##item2.2\n##item2.3\n#item3\n##item3.1\n###item3.1.1\n###item3.1.2\n\n''リストの折り返し:''\n{{{\n*item1\n**item1-1\n***ここで折り返します<br>いかが?\n}}}\n*item1\n**item1-1\n***ここで折り返します<br>いかが?\n\n''定義:''\n定義を記述します。\n{{{\n;名前\n:意味・内容\n}}}\n;名前\n:意味・内容\n\n''見出し:''\nいわゆる <h2>...</h2> などに相当する見出しです。六段階に対応してます。\n{{{\n!Header 1\n!!Header 2\n!!!Header 3\n!!!!Header 4\n!!!!!Header 5\n!!!!!!Header 6\n}}}\n!Header 1\n!!Header 2\n!!!Header 3\n!!!!Header 4\n!!!!!Header 5 \n!!!!!!Header 6\n\n''外部リンク:''\n他のサイトへのリンクをする場合、[[Google|http://www.google.com/]]などと記載します。\n \n''画像の埋込み:''\n{{{\n[img[Google|http://www.google.co.jp/images/logo_sm.gif]]\n}}}\n[img[Google|http://www.google.co.jp/images/logo_sm.gif]]\nさらにリンク\n{{{\n[img[Google|http://www.google.co.jp/images/logo_sm.gif][http://google.co.jp/]]\n}}}\n[img[Google|http://www.google.co.jp/images/logo_sm.gif][http://google.co.jp/]]\n同じフォルダにある場合はパス名は不要なようです。\n\n''引用:''\n{{{\n<<<\n引用しています。\n引用しています。\n<<<\n}}}\n<<<\n引用しています。\n引用しています。\n<<<\n{{{\n>level 1\n>level 1\n>>level 2\n>>level 2\n>>>level 3\n>>>level 3\n>>level 2\n>level 1\n}}}\n>level 1\n>level 1\n>>level 2\n>>level 2\n>>>level 3\n>>>level 3\n>>level 2\n>level 1 \n\n''表組:''\n{{{\n|!th1111111111|!th2222222222|\n|>| colspan |\n| rowspan |left|\n|~| right|\n|bgcolor(#a0ffa0):colored| center |\n|caption|c\n}}}\n|!th1111111111|!th2222222222|\n|>| colspan |\n| rowspan |left|\n|~| right|\n|bgcolor(#a0ffa0):colored| center |\n|caption|c\n\n''ドキュメント内リンク:''\n{{{\n[[GettingStarted]]\n[[スタートのメモ|GettingStarted]]\n}}}\n[[GettingStarted]]\n[[スタートのメモ|GettingStarted]]\n\n''スタイルの指定:''\n{{{<span class='subtitle'>subtitle class を指定</span>}}} のようにスタイルを指定可能。\n{{{\n{{subtitle{subtitle class を指定}}}\n}}}\n{{subtitle{subtitle class を指定}}}\n\n";
/*}}}*/
/***
!!Configration: ScrollBar is used
スクロールバーを表示する: <<option chkTWGuideJPScrollOptions>>

上のチェックボックスをチェックすることで、ガイド Popup にスクロールバーを付けて、小さな窓の状態での参照が可能になります。

!!History
*2007.08.22, ver 0.1.5
**見出し「六段階」まで
**スタイル修正
*2007.08.21, ver 0.1.4
**Popup にスクロールバーを表示することにより、ブラウザ自体のスクロールを無くすことが可能に
**padding を追加
*2007.08.20, ver 0.1.3
**スタイル設定の Bug を修正
***TWGuideJP class へスタイルを追加する
*2007.06.20, ver 0.1.2
**スタイルの設定部分の修正
**「定義」を追記
*2007.05.10, ver 0.1.1
**ガイドの内容を修正
**IE できちんと表示できなかったので対応
*2007.04.27, ver 0.1.0
**Init

!!Source
***/
/*{{{*/
version.extensions.guidejp = { major: 0, minor: 1, revision: 5, date: new Date(2007,8,22), source: "http://kuraku.net/tw/tw.html#TWGuideForJPMacro"
};

config.commands.guidejp = {};
config.commands.guidejp.version = "Version %0.%1.%2".format([version.extensions.guidejp.major,version.extensions.guidejp.minor,version.extensions.guidejp.revision]);
config.commands.guidejp.helptiddler = "TWGuideForJP";
config.commands.guidejp.layout = {
	overflow: "auto",
	width: "40em",
	height: "40em"
};

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

config.commands.guidejp.handler = function(event,src,title){
	var popup = Popup.create(src);

	if(popup) {
		addClass(popup, "TWGuideJP");

		if(config.options.chkTWGuideJPScrollOptions){
			popup.style.overflow = this.layout.overflow;
			popup.style.width = this.layout.width;
			popup.style.height = this.layout.height;
		}

		createTiddlyElement(popup,"H1",null, null, "TiddlyWiki 書き方ガイド:");
		var guidejpText = store.getTiddlerText(this.helptiddler);
		guidejpText = "~~<<option chkTWGuideJPScrollOptions>>:scrollbar~~\n\n" + guidejpText;

		var wrapper = createTiddlyElement(popup, "span");

		wikify(guidejpText, wrapper, null, store.getTiddler("SiteTitle"));
		var version = createTiddlyElement(popup,"div",null ,null ,"\n\nTWGuideForJPMacro " + this.version);
		version.style.fontSize = "0.8em";
		version.style.paddingTop = "5px";
	}
	Popup.show(popup,false);
	event.cancelBubble = true;
	if (event.stopPropagation) event.stopPropagation();
		return false;
	}

	merge(config.commands.guidejp,{
	 text: "guide",
	 tooltip: "tw guide for japanese"}
);

// Popup で表示するための Style を指定
setStylesheet(".TWGuideJP {padding:0em .5em .5em .5em !important;color:#222222 !important;background:#FFFFFF !important;} .TWGuideJP a{color:#0044BB !important} .TWGuideJP a:link{color:#0044BB} .TWGuideJP blockquote{border-left:3px solid;margin-left:2em;padding-left:0.8em;} .TWGuideJP pre{font-size:1.0em;background:#FFFFCC none repeat;border:1px solid #FFEE88;} ", "TWGuideJP");
/*}}}*/
<<timeline modified>>
<<tagCloud>>
/***
|''Name:''|TagCloudPlugin|
|''Source:''|http://www.TiddlyTools.com/#TagCloudPlugin|
|''Author:''|Clint Checketts|
|''License:''|unknown|
|''~CoreVersion:''|2.0.10|

!Usage
<<tagCloud>>

!Code
***/
//{{{
version.extensions.tagCloud = {major: 1, minor: 0 , revision: 0, date: new Date(2006,2,04)};
//Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman

config.macros.tagCloud = {
 noTags: "No tag cloud created because there are no tags.",
 tooltip: "%1 tiddlers tagged with '%0'"
};

config.macros.tagCloud.handler = function(place,macroName,params) {
 
var tagCloudWrapper = createTiddlyElement(place,"div",null,"tagCloud",null);

var tags = store.getTags();
for (var t=0; t<tags.length; t++) {
 for (var p=0;p<params.length; p++) if (tags[t][0] == params[p]) tags[t][0] = "";
}

 if(tags.length == 0) 
 createTiddlyElement(tagCloudWrapper,"span",null,null,this.noTags);
 //Findout the maximum number of tags
 var mostTags = 0;
 for (var t=0; t<tags.length; t++) if (tags[t][0].length > 0){
 if (tags[t][1] > mostTags) mostTags = tags[t][1];
 }
 //divide the mostTags into 4 segments for the 4 different tagCloud sizes
 var tagSegment = mostTags / 4;

 for (var t=0; t<tags.length; t++) if (tags[t][0].length > 0){
 var tagCloudElement = createTiddlyElement(tagCloudWrapper,"span",null,null,null);
 tagCloudWrapper.appendChild(document.createTextNode(" "));
 var theTag = createTiddlyButton(tagCloudElement,tags[t][0],this.tooltip.format(tags[t]),onClickTag,"tagCloudtag tagCloud" + (Math.round(tags[t][1]/tagSegment)+1));
 theTag.setAttribute("tag",tags[t][0]);
 }

};

//setStylesheet(".tagCloud span{height: 1.8em;margin: 3px;}.tagCloud1{font-size: 1.2em;}.tagCloud2{font-size: 1.4em;}.tagCloud3{font-size: 1.6em;}.tagCloud4{font-size: 1.8em;}.tagCloud5{font-size: 1.8em;font-weight: bold;}","tagCloudsStyles");

setStylesheet(".tagCloud span{height: 1.4em;margin: 3px !important;}.tagCloud1{font-size: 0.9em;color: #aaaaff;}.tagCloud2{font-size: 1.2em;color: #6666ff;}.tagCloud3{font-size: 1.4em;font-weight: bold;color: #6666ff;}.tagCloud4{font-size: 1.6em;color: #6666ff;}.tagCloud5{font-size: 1.6em;font-weight: bold;color: #0000ff;}","tagCloudsStyles");
//}}}
/***
|Name|TextAreaPlugin|
|Source|http://www.TiddlyTools.com/#TextAreaPlugin|
|Documentation|http://www.TiddlyTools.com/#TextAreaPluginInfo|
|Version|2.2.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Adds Find/Again keyboard search, autosize, and 'stretch bar' resize for textarea controls|
!!!!!Documentation
>see [[TextAreaPluginInfo]]
!!!!!Configuration
<<<
<<option chkTextAreaExtensions>> use control-f (find), control-g (find again) inside text area
<<option chkDisableAutoSelect>> place cursor at start of textarea instead of pre-selecting content
<<option chkResizeEditor>> modify shadow EditTemplate to add resizeable text area (and autosize command)
<<<
!!!!!Revisions
<<<
2009.04.08 [2.2.1] added autosizeEditor macro to enable automatic autosizing without using toolbar command
2009.04.06 [2.2.0] added resizeListbox macro definition and adjusted dragbar width calculation.
|please see [[TextAreaPluginInfo]] for additional revision details|
2006.01.22 [1.0.0] Moved from temporary "System Tweaks" tiddler into 'real' TextAreaPlugin tiddler.
<<<
!!!!!Code
***/
//{{{
version.extensions.TextAreaPlugin= {major: 2, minor: 2, revision: 1, date: new Date(2009,4,8)};

if (config.options.chkTextAreaExtensions===undefined) config.options.chkTextAreaExtensions=true;
if (config.options.chkDisableAutoSelect===undefined) config.options.chkDisableAutoSelect=true;
if (config.options.chkResizeEditor===undefined) config.options.chkResizeEditor=true;

// automatically tweak shadow EditTemplate to add "autosizeEditor" toolbar command
if (config.options.chkResizeEditor)
	config.shadowTiddlers.EditTemplate=config.shadowTiddlers.EditTemplate.replace(/deleteTiddler/,"deleteTiddler autosizeEditor");
// automatically tweak shadow EditTemplate to add "resizeEditor" macro
if (config.options.chkResizeEditor)
	config.shadowTiddlers.EditTemplate+="<span macro='resizeEditor'></span>";

// Put focus in a specified tiddler field
Story.prototype.TextAreaExtensions_focusTiddler=Story.prototype.focusTiddler;
Story.prototype.focusTiddler = function(title,field)
{
	this.TextAreaExtensions_focusTiddler.apply(this,arguments); // first call core
	var e = this.getTiddlerField(title,field);
	if (e && config.options.chkDisableAutoSelect) {
		if (e.setSelectionRange) // FF
			e.setSelectionRange(0,0);
		else if (e.createTextRange) // IE
			{ var r=e.createTextRange(); r.collapse(true); r.select(); }
	}
	if (e && config.options.chkTextAreaExtensions) addKeyDownHandlers(e);
}
//}}}

//{{{
function addKeyDownHandlers(e)
{
	// exit if not textarea or element doesn't allow selections
	if (e.tagName.toLowerCase()!="textarea"||!e.setSelectionRange||e.initialized) return;

	// utility function: exits keydown handler and prevents browser from processing the keystroke
	var processed=function(ev) {
		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;
	}
	// capture keydown in edit field
	e.saved_onkeydown=e.onkeydown; // save current keydown handler (if any)
	e.onkeydown=function(ev) { if (!ev) var ev=window.event;
		var key=ev.keyCode;
		if (!key) {
			var char=event.which?event.which:event.charCode;
			if (char==102) key=70;
			if (char==103) key=71;
		}
		// process CTRL-F (find matching text) or CTRL-G (find next match)
		if (ev.ctrlKey && (key==70||key==71)) {

			// prompt for text to find
			var defFind=e.findText?e.findText:e.value.substring(e.selectionStart,e.selectionEnd);
			if (key==70||!e.findText||!e.findText.length) // ctrl-f or no saved search text
				{ var f=prompt("find:", defFind); e.focus(); if (f) e.findText=f; }
			if (!e.findText||!e.findText.length) return processed(ev); //  if no search text, exit

			// do case-insensitive match with 'wraparound'...  if not found, alert and exit 
			var newstart=e.value.toLowerCase().indexOf(e.findText.toLowerCase(),e.selectionStart+1);
			if (newstart==-1) newstart=e.value.toLowerCase().indexOf(e.findText.toLowerCase());
			if (newstart==-1) { alert("'"+e.findText+"' not found"); e.focus(); return processed(ev); }

			// set new selection, scroll it into view, and report line position in status bar
			e.setSelectionRange(newstart,newstart+e.findText.length);
			var linecount=e.value.split('\n').length;
			var thisline=e.value.substr(0,e.selectionStart).split('\n').length;
			e.scrollTop=Math.floor((thisline-1-e.rows/2)*e.scrollHeight/linecount);
			window.status="line: "+thisline+"/"+linecount;
			return processed(ev);
		}
		if (e.saved_onkeydown) // call previous keydown handler (if any)
			e.saved_onkeydown(ev);
	}
	e.initialized=true;
}
//}}}

// // 'autosize' toolbar command
//{{{
config.commands.autosizeEditor = {
	text: 'autosize',
	tooltip: 'automatically adjust the editor height to fit the contents',
	text_alt: '\u221Aautosize',
	hideReadOnly: false,
	handler: function(event,src,title) {
		var here=story.findContainingTiddler(src); if (!here) return;
		var ta=here.getElementsByTagName('textarea'); if (!ta) return;
		for (i=0;i<ta.length;i++) {
			// only autosize textareas actually used to edit tiddler fields
			if (ta[i].getAttribute("edit")==undefined) continue;
			ta[i].button=src;
			if (!ta[i].maxed)
				config.commands.autosizeEditor.on(ta[i]);
			else
				config.commands.autosizeEditor.off(ta[i],true);
		}
		return false;
	},
	on: function(e) {
		if (e.maxed) return; // already autosizing!
		if (e.savedheight==undefined)
			e.savedheight=e.style.height;
		if (e.savedkeyup==undefined) {
			e.savedkeyup=e.onkeyup;
			e.onkeyup=function(ev) {
				if (!ev) var ev=window.event; var e=resolveTarget(ev);
				e.style.height=e.scrollHeight+'px';
				if (e.savedkeyup) e.savedkeyup();
			}
		}
		// IE reports error: "not implemented" for onkeypress
		if (!config.browser.isIE && e.savedkeypress==undefined) {
			e.savedkeypress=e.onkeypress;
			e.onkeypress=function(ev) {
				if (!ev) var ev=window.event; var e=resolveTarget(ev);
				if (ev.keyCode==33) { // PGUP
					if (window.scrollByPages) window.scrollByPages(-1);
					return false;
				}
				if (ev.keyCode==34) { // PGDN
					if (window.scrollByPages) window.scrollByPages(1);
					return false;
				}
				if (e.savedkeypress) e.savedkeypress();
			}
		}
		e.style.height=e.scrollHeight+'px';
		if (e.button) e.button.innerHTML=config.commands.autosizeEditor.text_alt;
		e.maxed=true;
	},
	off: function(e,resetHeight) {
		if (resetHeight) e.style.height=e.savedheight;
		e.onkeyup=e.savedkeyup;
		// IE reports error: "not implemented" for onkeypress
		if (!config.browser.isIE) e.onkeypress=e.savedkeypress;
		if (e.button) e.button.innerHTML=config.commands.autosizeEditor.text;
		e.maxed=false;
	}
};

config.macros.autosizeEditor={
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var ta=here.getElementsByTagName('textarea'); if (!ta) return;
		for (i=0;i<ta.length;i++) {
			// only autosize textareas actually used to edit tiddler fields
			if (ta[i].getAttribute("edit")==undefined) continue;
			config.commands.autosizeEditor.on(ta[i]);
		}
		return false;
	}
}
//}}}

// // grab-and-stretch handle
//{{{
config.macros.resizeEditor = { // add stretch bar to editor textarea
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var ta=here.getElementsByTagName('textarea');
		if (ta) for (i=0;i<ta.length;i++) {
			// only resize tiddler editor textareas
			if (ta[i].getAttribute("edit")==undefined) continue;
			new window.TextAreaResizer(ta[i]);
		}
	}
}

config.macros.resizeTiddler = { // add stretch bar to tiddler viewer element
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var elems=here.getElementsByTagName('div');
		if (elems) for (i=0;i<elems.length;i++) if (hasClass(elems[i],'viewer')) break;
		if (i<elems.length) new window.TextAreaResizer(elems[i]);
	}
}

config.macros.resizeFrame = { // add stretch bar to iframes
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var fr=here.getElementsByTagName('iframe');
		if (fr) for (i=0;i<fr.length;i++) new window.TextAreaResizer(fr[i]);
	}
}

config.macros.resizeListbox = { // add stretch bar to listbox controls
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) here=place;
		var fr=here.getElementsByTagName('select');
		if (fr) for (i=0;i<fr.length;i++) new window.TextAreaResizer(fr[i]);
	}
}

// TextAreaResizer script by Jason Johnston (jj@lojjic.net)
// Created August 2003.  Use freely, but give me credit.
// adds a handle below textareas that the user can drag with the mouse to resize the textarea.
// MODIFIED by ELS for use with TW

window.TextAreaResizer = function(elt) {
	this.element = elt;
	this.create();
}
window.TextAreaResizer.prototype = {
	create : function() {
		var elt = this.element;
		var thisRef = this;
		var h = this.handle = document.createElement("div");
		h.style.height = "3px"; // was 4px... looked too fat!
		h.style.overflow = "hidden"; // ELS: force IE to trim height to < 1em
		var adjust=elt.nodeName=='textarea'?4:0;  // 4 pixels for textarea border edge
//		h.style.width=(elt.offsetWidth-adjust)+"px";
		h.style.width="auto";
		h.style.backgroundColor = "#999"; // ELS: standard mid-tone (dark) gray
		h.style.cursor = "s-resize";
		h.title = "Drag to resize text box";
		h.onmousedown=function(evt){thisRef.dragStart(evt)};
		elt.parentNode.insertBefore(h, elt.nextSibling);
	},
	dragStart : function(evt) {
		if (!evt) var evt=window.event;
		this.dragStop(evt); // ELS: stop any current drag processing first
		var thisRef = this;
		this.dragStartY = evt.clientY;
		this.dragStartH = this.element.offsetHeight;
		document.savedmousemove=document.onmousemove;
		document.onmousemove=this.dragMoveHdlr=function(evt){thisRef.dragMove(evt)};
		document.savedmouseup=document.onmouseup;
		document.onmouseup=this.dragStopHdlr=function(evt){thisRef.dragStop(evt)};
	},
	dragMove : function(evt) {
		if (!evt) var evt=window.event;
		// ELS: make sure height is at least 10px
		var h=this.dragStartH+evt.clientY-this.dragStartY;
		if (h<10) h=10; this.element.style.height=h+"px";
		// ELS: match handle to textarea width (which may have changed due to document scrollbars)
//		var adjust=this.element.nodeName.toLowerCase()=='textarea'?4:0; // 4 pixels for textarea
//		this.handle.style.width=(this.element.offsetWidth-adjust)+"px";
		// ELS: when manually resizing, disable autoresizing (without restoring saved height)
		if (this.element.maxed!=undefined && this.element.maxed)
			config.commands.autosizeEditor.off(this.element,false);
	},
	dragStop : function(evt) {
		if (!evt) var evt=window.event;
		document.onmousemove=(document.savedmousemove!=undefined)?document.savedmousemove:null;
		document.onmousemove=(document.savedmouseup!=undefined)?document.savedmouseup:null;
	},
	destroy : function() {
		var elt = this.element;
		elt.parentNode.removeChild(this.handle);
		elt.style.height = "";
	}
};
//}}}
/%
|Name|TidIDECommand|
|Source|http://www.TiddlyTools.com/#TidIDECommand|
|Version|2.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|script|
|Requires|TidIDEPlugin, NestedSlidersPlugin, MoveablePanelPlugin, TextAreaPlugin, TiddlerTweakerPlugin, InlineJavascriptPlugin, CompareTiddlers|
|Description|command link invokes TidIDE editor for current tiddler|

Usage (in ViewTemplate):
	<span class='toolbar' macro='tiddler TidIDECommand'></span>
OR embedded directly in tiddler content:
	<<tiddler TidIDECommand>>

%/+++^[TidIDE|Edit this tiddler using the TiddlyWiki Integrated Development Environment].../%
	%/{{fine smallform nowrap{<<moveablePanel>>/%
	%/<<tidIDE SystemInfo TiddlerTweaker CompareTiddlers +edit:here>>/%
	%/<<resizeEditor>>}}}/%
%/===
TidIDE - TiddlyWiki Integrated Development Environment

Provides tools for authors and developers to help construct and debug the contents of their TiddlyWiki documents.
/***
|Name|TidIDEPlugin|
|Source|http://www.TiddlyTools.com/#TidIDEPlugin|
|Documentation|http://www.TiddlyTools.com/#TidIDEPluginInfo|
|Version|1.8.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|TiddlyWiki Integrated Development Environment - tools for authors and plugin writers|
~TidIDE (//prounounced "Tie Dyed"//) - ''Tid''dlyWiki ''I''ntegrated ''D''evelopment ''E''nvironment - allows you to define a set of checkboxes to toggle a stack of 'tool panels' containing tools for TiddlyWiki authors to use when creating and debugging their TiddlyWiki documents.  Each tool is defined by a separate tiddler, allowing you to define any convenient set of tools simply by adding/removing tiddler references from the {{{<<tidIDE...>>}}} macro call.

In addition to presenting checkboxes/tool panels that are defined in separate tiddlers, the {{{<<tidIDE>>}}} macro can invoke an optional built-in "editor panel" that presents an alternative tiddler editor to create, modify, and manage the tiddlers in your document... and, if you have also installed [[PreviewPlugin]], the editor can automatically display a ''//formatted preview//'' of the current tiddler content that is updated ''live, key-by-key'' while you edit the tiddler source.
!!!!!Documentation
>see [[TidIDEPluginInfo]]
!!!!!Configuration
<<<
Number of rows to display in text input area <<option txtTidIDEMaxEditRows>> 
{{{usage: <<option txtTidIDEMaxEditRows>>}}}
^^//Note: if not specified here, default uses {{{<<option txtMaxEditRows>>}}} value (see [[AdvancedOptions]])//^^
<<<
!!!!!Revisions
<<<
2009.09.22 [1.8.5] added edit='tags' to tags input so {{{<<newTiddler tags:...>>}}} can init field
2009.08.27 [1.8.4] added 'tidIDEPanel' classname to container element (for custom CSS)
|please see [[TidIDEPluginInfo]] for additional revision details|
2006.04.15 [0.5.0] Initial ALPHA release. Converted from inline script.
<<<
!!!!!Code
***/
//{{{
version.extensions.TidIDEPlugin= {major: 1, minor: 8, revision: 5, date: new Date(2009,9,22)};

// settings
if (config.options.txtTidIDEMaxEditRows==undefined)
	config.options.txtTidIDEMaxEditRows=config.options.txtMaxEditRows

// shadow payload
config.shadowTiddlers['TidIDEPluginEditorPanel']=store.getTiddlerText('TidIDEPlugin##editorPanel');

config.macros.tidIDE = {
	versionMsg: "TidIDE v%0.%1.%2: ",
	datetimefmt: "0MM/0DD/YYYY 0hh:0mm",
	titleMsg: "Please enter a new tiddler title",
	isShadowMsg: "'%0' is a shadow tiddler and cannot be removed.",
	evalMsg: "Warning!! Processing '%0' as a systemConfig (plugin) tiddler may produce unexpected results! Are you sure you want to proceed?",
	evalCompletedMsg: "Processing completed",
	toolsDef: "<html><a href='javascript:config.macros.tidIDE.set(\"%0\",\"%1\");'>edit %1...</a></html>",
	editorLabel: "TiddlerEditor"
};

config.macros.tidIDE.handler= function(place,macroName,params) {
	var here=story.findContainingTiddler(place);
	var selectors="";
	var panels="";
	var showsys=false;
	var title="";
	var id=""; if (here) id=here.getAttribute("tiddler").replace(/ /g,"_");
	var p=params.shift();
	if (!p) p="edit:here"; // default to editor if no params
	var openpanels=[];
	var panelcount=0;
	while (p) {
		var defOpen=(p.substr(0,1)=="+"); if (defOpen) p=p.substr(1);
		if (p.substr(0,3)=="id:")
			{ id=p.substr(3); }
		else if (p.substr(0,4)=="edit") {
			panelcount++;
			defOpen=defOpen || (!params[0] && panelcount==1); // if only one panel to show, default to open
			var toolname=this.editorLabel;
			if (p.indexOf('|')!=-1) toolname=p.substr(0,p.indexOf('|'));
			selectors+=this.html.editorchk.replace(/%toolname%/mg,toolname);
			selectors=selectors.replace(/%showpanel%/mg,defOpen?"CHECKED":"");
			panels+=store.getTiddlerText('TidIDEPluginEditorPanel');
			// editor panel setup...
			panels=panels.replace(/%showpanel%/mg,defOpen?"block":"none");
			panels=panels.replace(/%maxrows%/mg,config.options.txtTidIDEMaxEditRows);
			panels=panels.replace(/%disabled%/mg,readOnly?"DISABLED":"");
			panels=panels.replace(/%readonlychk%/mg,readOnly?"CHECKED":"");
			panels=panels.replace(/%minoredits%/mg,config.options.chkForceMinorUpdate&&!readOnly?"":"DISABLED");
			panels=panels.replace(/%minorchk%/mg,config.options.chkForceMinorUpdate?"CHECKED":"");
			var tiddlers=store.getTiddlers("title"); var tiddlerlist=""; 
			for (var t=0; t<tiddlers.length; t++)
				tiddlerlist+='<option value="'+tiddlers[t].title+'">'+tiddlers[t].title+'</option>';
			for (var t in config.shadowTiddlers)
				if (!store.tiddlerExists(t)) tiddlerlist+="<option value='"+t+"'>"+t+" (shadow)</option>";
			panels=panels.replace(/%tiddlerlist%/mg,tiddlerlist);
			var tags = store.getTags(); var taglist="";
			for (var t=0; t<tags.length; t++)
				taglist+="<option value='"+tags[t][0]+"'>"+tags[t][0]+"</option>";
			panels=panels.replace(/%taglist%/mg,taglist);
			if (p.substr(0,5)=="edit:") { 
				title=p.substr(5); 
				if (here && title=="here") title=here.id.substr(7);
			}
		}
		else {
			panelcount++;
			defOpen=defOpen || (!params[0] && panelcount==1); // if only one panel to show, default to open
			var toolid=toolname=p;
			if (p.indexOf('|')!=-1)
				{ toolname=p.substr(0,p.indexOf('|')); toolid=p.substr(p.indexOf('|')+1); }
			selectors+=this.html.toolschk.replace(/%toolid%/mg,toolid).replace(/%toolname%/mg,toolname);
			selectors=selectors.replace(/%showpanel%/mg,defOpen?"CHECKED":"");
			panels+=this.html.toolspanel.replace(/%toolid%/mg,toolid);
			panels=panels.replace(/%showpanel%/mg,defOpen?"block":"none");
			if (defOpen) openpanels.push(toolid);
		}
		p=params.shift(); // next param
	}
	var html=this.html.framework;
	if (panelcount<2)
		html=html.replace(/%version%/mg,'').replace(/%selector%/mg,''); // omit header/selectors if just one panel to display
	else {
		var v=version.extensions.TidIDEPlugin;
		html=html.replace(/%version%/mg, this.versionMsg.format([v.major,v.minor,v.revision]));
		html=html.replace(/%selector%/mg,selectors+"<hr style='margin:0;padding:0'>");
	}
	html=html.replace(/%panels%/mg,panels);
	html=html.replace(/%id%/mg,id);
	var newIDE=createTiddlyElement(place,"span",null,"tidIDEPanel");
	newIDE.innerHTML=html;
	if (title.length) this.set(id,title);  // pre-load tiddler editor values (if needed)
	if (openpanels.length) for (i=0;i<openpanels.length;i++) { config.macros.tidIDE.loadPanel(id,openpanels[i]); }
	// see [[TextAreaPlugin]] for extended ctrl-F/G (search/search again)and TAB handler definitions
	if (window.addKeyDownHandlers!=undefined) {
		var elems=newIDE.getElementsByTagName("textarea");
		for (var i=0;i<elems.length;i++) window.addKeyDownHandlers(elems[i]);
	}
	var prev=document.getElementById(id+'_previewpanel');
	if (config.macros.preview && prev)  // add previewer to editor (if installed)
		config.macros.preview.handler(prev,"preview",["text","15"]);
}
//}}}

// // CUSTOM PANEL FUNCTIONS 
//{{{
config.macros.tidIDE.loadPanel=function(id,toolid) {
	var place=document.getElementById(id+"_"+toolid+"_panel"); if (!place) return;
	var t=store.getTiddlerText(toolid,"");
	place.innerHTML=""; 
	if (t) wikify(t,place); else place.innerHTML=this.toolsDef.format([id,toolid]);
}
//}}}

// // EDITOR PANEL FUNCTIONS
//{{{
config.macros.tidIDE.set=function(id,title) {
	var place=document.getElementById(id+"_editorpanel"); if (!place) return;
	var f=document.getElementById(id+"_editorform");
	if (f.dirty && !confirm(config.commands.cancelTiddler.warning.format([f.current]))) return;
	// reset to form defaults
	f.dirty=false;
	f.current="";
	f.created.value=f.created.defaultValue;
	f.modified.value=f.modified.defaultValue;
	f.author.value=f.author.defaultValue;
	f.content.value=f.content.defaultValue;
	f.tags.value=f.tags.defaultValue;
	f.size.value=f.size.defaultValue;
	if (!title.length) return;
	f.current=title;
	// values for new/shadow tiddlers
	var cdate=new Date();
	var mdate=new Date();
	var modifier=config.options.txtUserName;
	var text=config.views.editor.defaultText.format([title]);
	var tags="";
	// adjust values for shadow tiddlers
	if (store.isShadowTiddler(title))
		{ modifier=config.views.wikified.shadowModifier; text=store.getTiddlerText(title) }
	// get values for specified tiddler (if it exists)
	var t=store.getTiddler(title);
	if (t)	{ var cdate=t.created; var mdate=t.modified; var modifier=t.modifier; var text=t.text; var tags=t.getTags(); }
	if (!t && !store.isShadowTiddler(title)) f.tiddlers.options[f.tiddlers.options.length]=new Option(title,title,false,true); // add item to list
	f.tiddlers.value=title; // select current title (just in case it wasn't already selected)
	f.created.value=cdate.formatString(this.datetimefmt);
	f.modified.value=mdate.formatString(this.datetimefmt);
	f.author.value=modifier;
	f.content.value=text;
	f.tags.value=tags;
	f.minoredits.checked=config.options.chkForceMinorUpdate&&!readOnly;
	f.size.value=f.content.value.length+" bytes";
}

config.macros.tidIDE.add=function(id) {
	var place=document.getElementById(id+"_editorpanel"); if (!place) return;
	var f=document.getElementById(id+"_editorform");
	if (f.dirty && !confirm(config.commands.cancelTiddler.warning.format([f.current]))) return;
	var title=prompt(this.titleMsg,config.macros.newTiddler.title);
	while (title && store.tiddlerExists(title) && !confirm(config.messages.overwriteWarning.format([title])))
		title=prompt(this.titleMsg,config.macros.newTiddler.title);
	if (!title || !title.trim().length) return; // cancelled by user
	f.dirty=false; // suppress unneeded confirmation message
	this.set(id,title);
}

config.macros.tidIDE.remove=function(id) {
	var place=document.getElementById(id+"_editorpanel"); if (!place) return;
	var f=document.getElementById(id+"_editorform");
	if (!f.current.length) return;
	if (!store.tiddlerExists(f.current) && store.isShadowTiddler(f.current)) { alert(this.isShadowMsg.format([f.current])); return; }
	if (config.options.chkConfirmDelete && !confirm(config.commands.deleteTiddler.warning.format([f.current]))) return;
	if (store.tiddlerExists(f.current)) {
		story.closeTiddler(f.current);
		store.removeTiddler(f.current);
		store.setDirty(true);
		if(config.options.chkAutoSave) saveChanges();
	}
	f.tiddlers.options[f.tiddlers.selectedIndex]=null; // remove item from list
	f.dirty=false; // suppress unneeded confirmation message
	this.set(id,""); // clear form controls
}

config.macros.tidIDE.save=function(id,saveAs) {
	var place=document.getElementById(id+"_editorpanel"); if (!place) return;
	var f=document.getElementById(id+"_editorform");
	var title=f.current;
	if (!title || !title.trim().length || saveAs) { // get a new title
		title=prompt(this.titleMsg,config.macros.newTiddler.title);
		while (title && store.tiddlerExists(title) && !confirm(config.messages.overwriteWarning.format([title])))
			title=prompt(this.titleMsg,config.macros.newTiddler.title);
		if (!title || !title.trim().length) return; // cancelled by user
		f.tiddlers.options[f.tiddlers.options.length]=new Option(title,title,false,true); // add item to list
		f.current=title;
	}
	var author=config.options.txtUserName;
	var mdate=new Date();
	var content=f.content.value;
	var tags=f.tags.value;
	var tiddler=store.saveTiddler(title,title,content,author,mdate,tags);
	if (f.minoredits.checked) {
		var author=f.author.value;
		var mdate=new Date(f.modified.value);
		var cdate=new Date(f.created.value);
		tiddler.assign(null,null,author,mdate,null,cdate);
	}
	store.setDirty(true);
	if(config.options.chkAutoSave) saveChanges();
	story.refreshTiddler(title,null,true);
	f.dirty=false;
}
//}}}

// // HTML DEFINITIONS
//{{{
config.macros.tidIDE.html = { };
config.macros.tidIDE.html.framework = " \
	<html> %version% <form style='display:inline;margin:0;padding:0;'>%selector%</form> %panels% </html> \
";
//}}}
//{{{
config.macros.tidIDE.html.editorchk = " \
	<input type=checkbox name=editor \
		style='display:inline;width:auto;margin:1px;' \
		title='add/delete/modify tiddlers' %showpanel% \
		onclick='document.getElementById(\"%id%_editorpanel\").style.display=this.checked?\"block\":\"none\";'>%toolname% \
";
config.macros.tidIDE.html.toolschk = " \
	<input type=checkbox name=tools \
		style='display:inline;width:auto;margin:1px;' \
		title='' %showpanel% \
		onclick='document.getElementById(\"%id%_%toolid%_panel\").style.display=this.checked?\"block\":\"none\"; \
			if (this.checked) config.macros.tidIDE.loadPanel(\"%id%\",\"%toolid%\");'>%toolname% \
";
//}}}
//{{{
config.macros.tidIDE.html.toolspanel = " \
	<div id='%id%_%toolid%_panel' style='display:%showpanel%;margin:0;margin-top:0.5em'> \
	</div> \
";
//}}}
/***
//{{{
!editorPanel
<div id='%id%_editorpanel' style='display:%showpanel%;margin:0;margin-top:0.5em'>
<form id='%id%_editorform' style='display:inline;margin:0;padding:0;'>

<!-- tiddler editor list and buttons -->
<select size=1 name=tiddlers style='display:inline;width:44%;'
	onchange='config.macros.tidIDE.set("%id%",this.value); this.value=this.form.current;'>
<option value=''>select a tiddler...</option>
%tiddlerlist%
</select><!--

--><input name=add type=button style='display:inline;width:8%'
	value='new' title='create a new tiddler'
	onclick='config.macros.tidIDE.add("%id%")' %disabled%><!--
--><input name=remove type=button style='display:inline;width:8%'
	value='remove' title='delete this tiddler'
	onclick='config.macros.tidIDE.remove("%id%")' %disabled%><!--
--><input name=save type=button style='display:inline;width:8%'
	value='save' title='save changes to this tiddler'
	onclick='config.macros.tidIDE.save("%id%")' %disabled%><!--
--><input name=saveas type=button style='display:inline;width:8%'
	value='save as' title='save changes to a new tiddler'
	onclick='config.macros.tidIDE.save("%id%",true)' %disabled%><!--
--><input name=view type=button style='display:inline;width:8%'
	value='open' title='open this tiddler for regular viewing'
	onclick='if (!this.form.current.length) return;	story.displayTiddler(null,this.form.current)'><!--
--><input name=run type=button style='display:inline;width:8%'
	value='run' title='evaluate this tiddler as a javascript "systemConfig" plugin'
	onclick='if (!confirm(config.macros.tidIDE.evalMsg.format([this.form.current]))) return false;
		try { window.eval(this.form.content.value); displayMessage(config.macros.tidIDE.evalCompletedMsg); }
		catch(e) { displayMessage(config.messages.pluginError.format([err])); }'><!--
--><input name=previewbutton type=button style='display:inline;width:8%;'
	value='preview' title='show "live" preview display'
	onclick='if (!config.macros.preview) { alert("Please install PreviewPlugin"); return false; }
		this.form.preview.checked=!this.form.preview.checked;
		document.getElementById("%id%_previewpanel").style.display=this.form.preview.checked?"block":"none";
		if (this.form.freeze) this.form.freeze.checked=!this.form.preview.checked;
		if (this.form.preview.checked) config.macros.preview.render(this.form.content.id,this.form.content.getAttribute("previewid"));'><!--

hidden field for preview show/hide state:
--><input name=preview type=checkbox style='display:none;'>

<!-- tiddler content edit -->
<div><textarea id='%id%_content' name='content' edit='text' cols=60 rows=%maxrows%
	style='width:100%;'
	onkeyup='var f=this.form; f.dirty=true; f.size.value=this.value.length+" bytes";'></textarea></div>

<!-- tag edit and droplist -->
<table width='100%' style='border:0;padding:0;margin:0'><tr style='border:0;padding:0;margin:0'>
<td style='border:0;padding:0;margin:0'>
	<input type=text name=tags edit='tags' size=60 style='width:100%;' value=''
		onchange='this.form.dirty=true' %disabled%>
</td><td width='1' style='border:0;padding:0;margin:0;'>
	<select size=1 name=taglist
		onchange='this.form.dirty=true; this.form.tags.value+=" "+this.value' %disabled%>
	<option value=''>select tags...</option>
	%taglist%
	</select>
</td></tr></table>

<!-- created/modified dates, author, current tiddler size -->
<div style='float:right;'>
	created <input type=text name=created size=15
		style='display:inline;;text-align:center;padding:0;' value=''
		onchange='this.form.dirty=true' %minoredits%>
	modified <input type=text name=modified size=15
		style='display:inline;text-align:center;padding:0;' value=''
		onchange='this.form.dirty=true;' %minoredits%>
	by <input type=text name=author size=15
		style='display:inline;padding:0;' value=''
		onfocus='this.select()' onchange='this.form.dirty=true' %minoredits%>
	<input type=text name=size size=10
		style='display:inline;text-align:center;padding:0;' value=''
		onfocus='this.blur()' onkeydown='return false' DISABLED>
</div>

<!-- toggles: read-only, minor edit -->
<span style='white-space:nowrap'>
<input type=checkbox name=readonly
	style='display:inline;width:auto;margin:1px;' %readonlychk%
	title='do not allow tiddler changes to be saved'
	onclick='readOnly=config.options.chkHttpReadOnly=this.checked;saveOptionCookie("chkHttpReadOnly");
		var f=this.form; f.minoredits.disabled=f.tags.disabled=f.taglist.disabled=this.checked;
		f.add.disabled=f.remove.disabled=f.save.disabled=f.saveas.disabled=this.checked;
		f.created.disabled=f.modified.disabled=f.author.disabled=this.checked||!f.minoredits.checked;'>readonly
<input type=checkbox name=minoredits
	style='display:inline;width:auto;margin:1px;' %disabled% %minorchk%
	title='check: save datestamps/author as entered, uncheck: auto-update modified/author'
	onclick='this.form.created.disabled=this.form.modified.disabled=this.form.author.disabled=!this.checked;
		config.options.chkForceMinorUpdate=this.checked;saveOptionCookie("chkForceMinorUpdate");'>minor edits
</span>

<!-- tiddler preview display -->
<div id='%id%_previewpanel' style='display:none;white-space:nowrap'></div>
!end
//}}}
***/
 
/***
|''Name:''|TiddlerListMacro|
|''Version:''|2.0.10 (01-May-2006)|
|''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:''|TiddlerListMacroDocumentation >>[[TiddlerListMacroExamples]](add krk) |
!Usage
{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}
See TiddlerListMacroDocumentation and TiddlerListMacroExamples
!Code
***/
//{{{
version.extensions.tiddlerList = {major: 2, minor: 0, revision: 10, date: new Date("May 2, 2006")};
// 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 (!gCurrentTiddler)
 var gCurrentTiddler;

config.macros.tiddlerList.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 // Some globals
 var count=0, groupCount=0, theGroup="", lastGroup="";
 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("$))", ">>")
 
 // Template for group footer
 var pGroupFooterTemplate = "";
 if (parameters[0]["groupFooterTemplate"])
 pGroupFooterTemplate = paramFormat(parameters[0]["groupFooterTemplate"][0])
 pGroupFooterTemplate = pGroupFooterTemplate.replace("$))", ">>")
 
 // Template for item
 var pItemTemplate = this.templates[pFormat][1];
 if (parameters[0]["itemTemplate"])
 pItemTemplate = paramFormat(parameters[0]["itemTemplate"][0])
 pItemTemplate = pItemTemplate.replace("$))", ">>").replace("%link", "%0").replace("%item", "%1").replace("%abstract", "%2").replace("%text", "%3").replace("%created", "%4").replace("%modified", "%5").replace("%modifier", "%6").replace("%group", "%7").replace("%title", "%8").replace("%tags", "%9").replace("%nolink", "%10").replace("%custom", "%11")
 // Template for footer
 var pFooterTemplate = this.templates[pFormat][4].replace("%count", "%1")

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

 // Sorting
 if(!pOrder)
 pOrder = "title";
 if (pOrder.match(/^\-/i)) {
 pOrder = pOrder.substr(1)
 var sortDesc = true;
 }
 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; });

 // Header
 if (pHeader)
 listWikiText += formatItem(this.templates[pFormat][0], [pHeader], pFormat)
 
 for(var t=0; t<tiddlers.length; t++) {
 tiddler = tiddlers[t];
 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++;
 // Grouping
 if (pGroup) {
 theGroup = eval(pGroup);
 if(theGroup != lastGroup) {
 groupCount++;
 if (pGroupFooterTemplate && groupCount>1)
 listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
 listWikiText += pGroupTemplate.replace("%group", theGroup)
 lastGroup = theGroup;
 }
 }
 // Separators
 if (count>1) 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

 listWikiText += formatItem(pItemTemplate,["[[" + tiddler.title + "]]",count,tiddler.text.substr(0,100),tiddler.text,tiddler.created.formatString(pDateFormat),tiddler.modified.formatString(pDateFormat),tiddler.modifier,theGroup,tiddler.title,tiddler.tags.join(" "),noLink,custom], pFormat)
 }
 }
 }
 }
 }
 }
 }
// patch krk for CheckboxPlugin
 //listWikiText = listWikiText.replace(/\[([Xx_ ])\]/g,"\($1\)");
 listWikiText = listWikiText.replace(/\[([Xx_ ])\]/g,"\[ $1 \]");
// end
 
 // 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].match(/^\-/) && !array.contains(values[v].substr(1)))
 matches++;
 else if (array.contains(values[v]))
 matches++;
 return ((logic=="all" && matches==values.length) || (logic!="all" && matches>0))
 }
 
}

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

//}}}
!Description
The TiddlerListMacro lists tiddlers with ~SQL-Like features:
* List tiddlers containing a word in the title or text (case-sensitive)
* List tiddlers tagged with given tags or exclude certain tags
* Ascending and descending sorting of single fields
* Limit number of tiddlers displayed
* Specify different HTML formats for the lists
* Grouping of items in a list
* Customizable wiki templates
* Numbering and totals
!Revision History
* Original by [[Jack]] 17-Apr-2006
* Added formatting (v2.0.1 18-Apr-2006)
* Added grouping (v2.0.2 18-Apr-2006)
* Added flexible filtering (v2.0.3 19-Apr-2006)
* Added custom item templates (v2.0.4 20-Apr-2006)
* Added custom templates (v2.0.5 21-Apr-2006)
* Allow evalled parameters (v2.0.7 23-Apr-2006)
* Allow groupFooterTemplate (v2.0.9 30-Apr-2006)
* Added the customParameter (v2.0.10 2-May-2006)
!To Do
* Case-insensitive searching
* Sorting on multiple fields
!Usage
{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}
!Examples ([[TiddlerListMacroExamples]])
List all tiddlers tagged with "Plugin"
{{{<<tiddlerList tags:Plugin>>}}}
List newest 3 plugins which are not templates:
{{{<<tiddlerList tags:"Plugin,-Template" top:3 order:"-created">>}}}
List all tiddlers containing "Jack" in their title or text (last modified first):
{{{<<tiddlerList search:"Jack" order:"-modified">>}}}
List all tiddlers starting with "T" in a table:
{{{<<tiddlerList title:"^T" format:"table" header:"Tiddlers beginning with T" footer:"%count items listed">>}}}
Group tiddlers by first letter
{{{<<tiddlerList top:"15" group:"tiddler.title.substr(0,1)" groupTemplate:"''%group''">>}}}
Show a list of all tiddlers with creation date (overrides default item template)
{{{<<tiddlerList itemTemplate:"* %link (%created)\n">>}}}
Show all tiddlers that have the host's tiddler title in their tag list
{{{<<tiddlerList filter:"tiddler.tags.contains(currentTiddler.title)">>}}}
!Parameters
|!Parameter|!Type|!Meaning|!Example|
|top|Integer|Number of tiddlers to display|"10"|
|tags|String|List tiddlers with matching tags (AND Logic). Leading - to exclude.|"~ToDo,Urgent,-Done"|
|title|~RegEx|List tiddlers with matching title|"^[Pp]"|
|text|~RegEx|List tiddlers with matching text|"Searchtext"|
|search|~RegEx|List tiddlers with matching title OR text|"Problem"|
|filter*|~JavaScript|List tiddlers according to boolean expression)|"tiddler.title.length<4 && tiddler.tags.contains('Idea')"|
|format|String (fixed list)|HTML formatting of list. list (ul, default), nlist (ol), span, stack (div), csv, table.|"list"|
|order|String|Sort order of tiddlers. - is descending, + ascending|"-created"|
|group*|~JavaScript|Grouping field|tiddler.title.substr(0,1)|
|customParameter*|~JavaScript|Custom parameter to be evalled for use in the itemTemplate|tiddler.text.match(/Version: (.*)/)[1]|
|header|String|Top caption|"Tiddlers beginning with T"|
|footer|String|Bottom caption|"End of list"|
|itemTemplate|~WikiTemplate|~WikiText with %placeholders|"%link\n%abstract\n%modified"|
|groupTemplate|~WikiTemplate|~WikiText with %placeholders for the start of each group|"!!%group"|
|groupFooterTemplate|~WikiTemplate|~WikiText with %placeholders for the end of each group|"----\n"|
|dateFormat|String|Date formatting string when displaying dates|~YYYY-MM-DD|
|separator|String|Define a string or character to be inserted between items listed|" "|
|debug|Boolean|Set to 1 or true for debug mode where only wikitext will be output|debug:1|
{{{*}}} Parameter will be evalled (do not pass with {{{{{ }} }}} unless you want it evalled twice!)
!Template Placeholders
Placeholder values for itemTemplate parameter
|!Placeholder|!Field|
|%item|List item number|
|%link|Link to Tiddler {{{[[MyTiddler]]}}}|
|%title|Tiddler Name {{{MyTiddler}}}|
|%nolink|Unlinked Tiddler Title {{{~MyTiddler}}}|
|%abstract|First 100 chars of tiddler text|
|%text|All tiddler text|
|%tags|Tags separated by space|
|%created|Creation date|
|%modified|Modified date|
|%modifier|Last modifier|
|%group|Name of group field|
|%custom|The result of your evalled customParameter|
|%count|Number of items listed (footer only)|
!Variables
{{{{{currentTiddler}} }}}refers to the current (host) tiddler in function scope (i.e. within the filter or group parameters)
{{{{{gCurrentTiddler}} }}}refers to the current (host) tiddler in global scope (i.e. within{{{ {{}} }}}evalled parameters. Example:
{{{<<tiddlerList tags:{{gCurrentTiddler.title}}>>}}}
!Style
No styles are pre-assigned to the lists. Use {{{@@}}} notation to define custom styles in the header, footer, groupTemplate and itemTemplate parameters.
Examples using the TiddlerListMacro:
!List Formatting
List all tiddlers tagged with "Plugin"
{{{<<tiddlerList tags:Plugin>>}}}
<<tiddlerList tags:Plugin>>
List top 1 plugins which are not templates:
{{{<<tiddlerList tags:"Plugin,-Template" top:1>>}}}
<<tiddlerList tags:"Plugin,-Template" top:1>>
List all tiddlers containing "Plugin" in their title and text (newest first):
{{{<<tiddlerList title:"Plugin" text:"Plugin" order:"-created">>}}}
<<tiddlerList title:"Plugin" text:"Plugin" order:"-created">>
List all tiddlers containing "Jack" in their title or text (oldest first):
{{{<<tiddlerList search:"Jack" order:"created">>}}}
<<tiddlerList search:"Jack" order:"created">>
List all tiddlers starting with "T":
{{{<<tiddlerList title:"^T">>}}}
<<tiddlerList title:"^T">>
!Other Formats
Simple unnumbered list of tiddlers
{{{<<tiddlerList top:"3" format:"list">>}}}
<<tiddlerList top:"3" format:"list">>
Numbered list of tiddlers
{{{<<tiddlerList top:"3" format:"nlist">>}}}
<<tiddlerList top:"3" format:"nlist">>
Table with header and footer
{{{<<tiddlerList top:"3" format:"table" header:"Plugins" footer:"Tiddlers: %count">>}}}
<<tiddlerList top:"3" format:"table" header:"Plugins" footer:"Tiddlers: %count">>
Simple horizontal list:
{{{<<tiddlerList top:"3" format:"span">>}}}
<<tiddlerList top:"3" format:"span">>
Comma Separated list
{{{<<tiddlerList top:"3" format:"csv" header:"Plugins: [ " footer:" ]">>}}}
<<tiddlerList top:"3" format:"csv" header:"Plugins: [ " footer:" ]">>
Custom Separated list
{{{<<tiddlerList top:"10" separator:" - " format:"span">>}}}
<<tiddlerList top:"10" separator:" - " format:"span">>
!Grouping
Group tiddlers by first letter
{{{<<tiddlerList top:"7" group:"tiddler.title.substr(0,1)">>}}}
<<tiddlerList top:"7" group:"tiddler.title.substr(0,1)">>
!Custom Item Templates
List tiddlers in a custom format (title, date, abstract)
{{{<<tiddlerList tags:"News,-Template" itemTemplate:"* %link (%created)<<br>>%abstract\n" order:"-created">>}}}
<<tiddlerList tags:"News,-Template" filter:"tiddler.title!=currentTiddler.title" itemTemplate:"%link (%created)\n%abstract" order:"-created">>
!!!Beware of infinite recursion!!
!Advanced
Tiddlers created today
{{{<<tiddlerList format:table filter:"tiddler.created.formatString('YYYYMMDD')==(new Date()).formatString('YYYYMMDD')" header:{{'Tiddlers created on ' + (new Date()).formatString('DDD, DD MMM YYYY')}}>>}}}
<<tiddlerList format:table filter:"tiddler.created.formatString('YYYYMMDD')==(new Date()).formatString('YYYYMMDD')" header:{{'Tiddlers created on ' + (new Date()).formatString('DDD, DD MMM YYYY')}}>>
Fancy table with grouping on modified date
{{{<<tiddlerList top:"10" header:"|>|!Tiddlers|\n|bgcolor(#ddf):''Title''|bgcolor(#ddf):''Created''|" itemTemplate:"|%0|%4|\n" format:"table" group:"tiddler.created.formatString('DD MMM YYYY')" groupTemplate:"|>|bgcolor(#eef): ''Updated: %group'' |\n" dateFormat:"DDD, DD MM YYYY">>}}}
<<tiddlerList top:"10" header:"|>|!Tiddlers|\n|bgcolor(#ddf):''Title''|bgcolor(#ddf):''Created''|" itemTemplate:"|%0|%4|\n" format:"table" group:"tiddler.created.formatString('DD MMM YYYY')" groupTemplate:"|>|bgcolor(#eef): ''Updated: %group'' |\n" dateFormat:"DDD, DD MM YYYY">>
/***
|Name|TiddlerTweakerPlugin|
|Source|http://www.TiddlyTools.com/#TiddlerTweakerPlugin|
|Version|2.4.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|select multiple tiddlers and modify author, created, modified and/or tag values|
~TiddlerTweaker is a 'power tool' for TiddlyWiki authors.  Select multiple tiddlers from a listbox and 'bulk modify' the creator, author, created, modified and/or tag values of those tiddlers using a compact set of form fields.  The values you enter into the fields simultaneously overwrite the existing values in all tiddlers you have selected.
!!!!!Usage
<<<
{{{<<tiddlerTweaker>>}}}
{{smallform{<<tiddlerTweaker>>}}}
By default, any tags you enter into the TiddlerTweaker will //replace// the existing tags in all the tiddlers you have selected.  However, you can also use TiddlerTweaker to quickly filter specified tags from the selected tiddlers, while leaving any other tags assigned to those tiddlers unchanged:
>Any tag preceded by a '+' (plus) or '-' (minus), will be added or removed from the existing tags //instead of replacing the entire tag definition// of each tiddler (e.g., enter '-excludeLists' to remove that tag from all selected tiddlers.  When using this syntax, care should be taken to ensure that //every// tag is preceded by '+' or '-', to avoid inadvertently overwriting any other existing tags on the selected tiddlers.  (note: the '+' or '-' prefix on each tag value is NOT part of the tag value, and is only used by TiddlerTweaker to control how that tag value is processed)
Important Notes:
* TiddlerTweaker is a 'power user' tool that can make changes to many tiddlers at once.  ''You should always have a recent backup of your document (or 'save changes' just *before* tweaking the tiddlers), just in case you accidentally 'shoot yourself in the foot'.''
* The date and author information on any tiddlers you tweak will ONLY be updated if the corresponding checkboxes have been selected.  As a general rule, after using TiddlerTweaker, always ''//remember to save your document//'' when you are done, even though the tiddler timeline tab may not show any recently modified tiddlers.
* Selecting and updating all tiddlers in a document can take a while.  Your browser may warn about an 'unresponsive script'.  Usually, if you allow it to continue, it should complete the processing... eventually.  Nonetheless, be sure to save your work before you begin tweaking lots of tiddlers, just in case something does get stuck.
<<<
!!!!!Revisions
<<<
2011.01.21 2.4.5 auto-selection: use "-" for untagged tiddlers.  Also, added 'opened', 'invert'
2009.09.15 2.4.4 added 'edit' button. moved html definition to separate section
2009.09.13 2.4.3 in settiddlers(), convert backslashed chars (\n\b\s\t) in replacement text
2009.06.26 2.4.2 only add brackets around tags containing spaces
2009.06.22 2.4.1 in setFields(), add brackets around all tags shown tweaker edit field
2009.03.30 2.4.0 added 'sort by modifier'
2009.01.22 2.3.0 added support for text pattern find/replace
2008.10.27 2.2.3 in setTiddlers(), fixed Safari bug by replacing static Array.concat(...) with new Array().concat(...)
2008.09.07 2.2.2 added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.05.12 2.2.1 replace built-in backstage tweak task with tiddler tweaker control panel (moved from BackstageTweaks)
2008.01.13 2.2.0 added 'auto-selection' links: all, changed, tags, title, text
2007.12.26 2.1.0 added support for managing 'creator' custom field (see [[CoreTweaks]])
2007.11.01 2.0.3 added config.options.txtTweakerSortBy for cookie-based persistence of list display order preference setting.
2007.09.28 2.0.2 in settiddlers() and deltiddlers(), added suspend/resume notification handling (improves performance when operating on multiple tiddlers)
2007.08.03 2.0.1 added shadow definition for [[TiddlerTweaker]] tiddler for use as parameter references with {{{<<tiddler>>, <<slider>> or <<tabs>>}}} macros.
2007.08.03 2.0.0 converted from inline script
2006.01.01 1.0.0 initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.TiddlerTweakerPlugin= {major: 2, minor: 4, revision: 5, date: new Date(2011,1,21)};

// shadow tiddler
config.shadowTiddlers.TiddlerTweaker='<<tiddlerTweaker>>';

// defaults
if (config.options.txtTweakerSortBy==undefined) config.options.txtTweakerSortBy='modified';

// backstage task
if (config.tasks) { // for TW2.2b3 or above
	config.tasks.tweak.tooltip='review/modify tiddler internals: dates, authors, tags, etc.';
	config.tasks.tweak.content='{{smallform small groupbox{<<tiddlerTweaker>>}}}';
}

// if removeCookie() function is not defined by TW core, define it here.
if (window.removeCookie===undefined) {
	window.removeCookie=function(name) {
		document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;'; 
	}
}

config.macros.tiddlerTweaker = {
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var span=createTiddlyElement(place,'span');
		span.innerHTML=store.getTiddlerText('TiddlerTweakerPlugin##html');
		this.init(span.getElementsByTagName('form')[0],config.options.txtTweakerSortBy);
	},
	init: function(f,sortby) { // set form controls
		if (!f) return; // form might not be rendered yet...
		while (f.list.options[0]) f.list.options[0]=null; // empty the list
		var tids=store.getTiddlers(sortby);
		if (sortby=='size') // descending order
			tids.sort(function(a,b) {return a.text.length > b.text.length ? -1 : (a.text.length == b.text.length ? 0 : +1);});
		var who='';
		for (i=0; i<tids.length; i++) { var t=tids[i];
			var label=t.title; var value=t.title;
			switch (sortby) {
				case 'modified':
				case 'created':
					var t=tids[tids.length-i-1]; // reverse order
					var when=t[sortby].formatString('YY.0MM.0DD 0hh:0mm ');
					label=when+t.title;
					value=t.title;
					break;
				case 'size':
					label='['+t.text.length+'] '+label;
					break;
				case 'modifier':
				case 'creator':
					if (who!=t[sortby]) {
						who=t[sortby];
						f.list.options[f.list.length]=new Option('by '+who+':','',false,false);
					}
					label='\xa0\xa0\xa0'+label; // indent
					break;
			}
			f.list.options[f.list.length]=new Option(label,value,false,false);
		}
		f.title.value=f.who.value=f.creator.value=f.tags.value='';
		f.cm.value=f.cd.value=f.cy.value=f.ch.value=f.cn.value='';
		f.mm.value=f.md.value=f.my.value=f.mh.value=f.mn.value='';
		f.stats.disabled=f.set.disabled=f.del.disabled=f.edit.disabled=f.display.disabled=true;
		f.settitle.disabled=false;
		config.options.txtTweakerSortBy=sortby;
		f.sortby.value=sortby; // sync droplist
		if (sortby!='modified') saveOptionCookie('txtTweakerSortBy');
		else removeCookie('txtTweakerSortBy');
	},
	enablefields: function(here) { // enables/disables inputs based on #items selected
		var f=here.form; var list=f.list;
		var c=0; for (i=0;i<list.length;i++) if (list.options[i].selected) c++;
		if (c>1) f.title.disabled=true;
		if (c>1) f.settitle.checked=false;
		f.set.disabled=(c==0);
		f.del.disabled=(c==0);
		f.edit.disabled=(c==0);
		f.display.disabled=(c==0);
		f.settitle.disabled=(c>1);
		f.stats.disabled=(c==0);
		var msg=(c==0)?'select tiddlers':(c+' tiddler'+(c!=1?'s':'')+' selected');
		here.previousSibling.firstChild.firstChild.nextSibling.innerHTML=msg;
		if (c) clearMessage(); else displayMessage('no tiddlers selected');
	},
	setfields: function(here) { // set fields from first selected tiddler
		var f=here.form;
		if (!here.value.length) {
			f.title.value=f.who.value=f.creator.value=f.tags.value='';
			f.cm.value=f.cd.value=f.cy.value=f.ch.value=f.cn.value='';
			f.mm.value=f.md.value=f.my.value=f.mh.value=f.mn.value='';
			return;
		}
		var tid=store.getTiddler(here.value); if (!tid) return;
		f.title.value=tid.title;
		f.who.value=tid.modifier;
		f.creator.value=tid.fields['creator']||''; // custom field - might not exist
		f.tags.value=tid.tags.map(function(t){return String.encodeTiddlyLink(t)}).join(' ');
		var c=tid.created; var m=tid.modified;
		f.cm.value=c.getMonth()+1;
		f.cd.value=c.getDate();
		f.cy.value=c.getFullYear();
		f.ch.value=c.getHours();
		f.cn.value=c.getMinutes();
		f.mm.value=m.getMonth()+1;
		f.md.value=m.getDate();
		f.my.value=m.getFullYear();
		f.mh.value=m.getHours();
		f.mn.value=m.getMinutes();
	},
	selecttiddlers: function(here,callback) {
		var f=here; while (f&&f.nodeName.toLowerCase()!='form')f=f.parentNode;
		for (var t=f.list.options.length-1; t>=0; t--)
			f.list.options[t].selected=callback(f.list.options[t]);
		config.macros.tiddlerTweaker.enablefields(f.list);
		return false;
	},
	settiddlers: function(here) {
		var f=here.form; var list=f.list;
		var tids=[];
		for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
		if (!tids.length) { alert('please select at least one tiddler'); return; }
		var cdate=new Date(f.cy.value,f.cm.value-1,f.cd.value,f.ch.value,f.cn.value);
		var mdate=new Date(f.my.value,f.mm.value-1,f.md.value,f.mh.value,f.mn.value);
		if (tids.length>1 && !confirm('Are you sure you want to update these tiddlers:\n\n'+tids.join(', '))) return;
		store.suspendNotifications();
		for (t=0;t<tids.length;t++) {
			var tid=store.getTiddler(tids[t]); if (!tid) continue;
			var title=!f.settitle.checked?tid.title:f.title.value;
			var who=!f.setwho.checked?tid.modifier:f.who.value;
			var text=tid.text;
			if (f.replacetext.checked) {
				var r=f.replacement.value.replace(/\\t/mg,'\t').unescapeLineBreaks();
				text=text.replace(new RegExp(f.pattern.value,'mg'),r);
			}				
			var tags=tid.tags;
			if (f.settags.checked) { 
				var intags=f.tags.value.readBracketedList();
				var addtags=[]; var deltags=[]; var reptags=[];
				for (i=0;i<intags.length;i++) {
					if (intags[i].substr(0,1)=='+')
						addtags.push(intags[i].substr(1));
					else if (intags[i].substr(0,1)=='-')
						deltags.push(intags[i].substr(1));
					else
						reptags.push(intags[i]);
				}
				if (reptags.length)
					tags=reptags;
				if (addtags.length)
					tags=new Array().concat(tags,addtags);
				if (deltags.length)
					for (i=0;i<deltags.length;i++)
						{ var pos=tags.indexOf(deltags[i]); if (pos!=-1) tags.splice(pos,1); }
			}
			if (!f.setcdate.checked) cdate=tid.created;
			if (!f.setmdate.checked) mdate=tid.modified;
			store.saveTiddler(tid.title,title,text,who,mdate,tags,tid.fields);
			if (f.setcreator.checked) store.setValue(tid.title,'creator',f.creator.value); // set creator
			if (f.setcdate.checked) tid.assign(null,null,null,null,null,cdate); // set create date
		}
		store.resumeNotifications();
		this.init(f,f.sortby.value);
	},
	displaytiddlers: function(here,edit) {
		var f=here.form; var list=f.list;
		var tids=[];
		for (i=0; i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
		if (!tids.length) { alert('please select at least one tiddler'); return; }
		story.displayTiddlers(story.findContainingTiddler(f),tids,edit?DEFAULT_EDIT_TEMPLATE:null);
	},
	deltiddlers: function(here) {
		var f=here.form; var list=f.list;
		var tids=[];
		for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
		if (!tids.length) { alert('please select at least one tiddler'); return; }
		if (!confirm('Are you sure you want to delete these tiddlers:\n\n'+tids.join(', '))) return;
		store.suspendNotifications();
		for (t=0;t<tids.length;t++) {
			var tid=store.getTiddler(tids[t]); if (!tid) continue;
			if (tid.tags.contains('systemConfig')) {
				var msg=tid.title+' is tagged with systemConfig.'
					+'\n\nRemoving this tiddler may cause unexpected results.  Are you sure?';
				if (!confirm(msg)) continue;
			}
			store.removeTiddler(tid.title);
			story.closeTiddler(tid.title);
		}
		store.resumeNotifications();
		this.init(f,f.sortby.value);
	},
	stats: function(here) {
		var f=here.form; var list=f.list; var tids=[]; var out=''; var tot=0;
		var target=f.nextSibling;
		for (i=0;i<list.length;i++) if (list.options[i].selected) tids.push(list.options[i].value);
		if (!tids.length) { alert('please select at least one tiddler'); return; }
		for (t=0;t<tids.length;t++) {
			var tid=store.getTiddler(tids[t]); if (!tid) continue;
			out+='[['+tid.title+']] '+tid.text.length+'\n'; tot+=tid.text.length;
		}
		var avg=tot/tids.length;
		out=tot+' bytes in '+tids.length+' selected tiddlers ('+avg+' bytes/tiddler)\n<<<\n'+out+'<<<\n';
		removeChildren(target);
		target.innerHTML="<hr><font size=-2><a href='javascript:;' style='float:right' "
			+"onclick='this.parentNode.parentNode.style.display=\"none\"'>close</a></font>";
		wikify(out,target);
		target.style.display='block';
	}
};
//}}}
/***
//{{{
!html
<style>
.tiddlerTweaker table,
.tiddlerTweaker table tr,
.tiddlerTweaker table td
	{ padding:0;margin:0;border:0;white-space:nowrap; }
</style><form class='tiddlerTweaker'><!--
--><table style="width:100%"><tr valign="top"><!--
--><td style="text-align:center;width:99%;"><!--
	--><font size=-2><div style="text-align:left;"><span style="float:right"><!--
	-->&nbsp; <a href="javascript:;" 
		title="select all tiddlers"
		onclick="return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
			return opt.value.length;
		});">all</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers currently displayed in the story column"
		onclick="return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
			return story.getTiddler(opt.value);
		});">opened</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers that are new/changed since the last file save"
		onclick="var lastmod=new Date(document.lastModified);
			return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
				var tid=store.getTiddler(opt.value);
				return tid&&tid.modified>lastmod;
			});
		">changed</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers with at least one matching tag"
		onclick="var t=prompt('Enter space-separated tags (match one or more).  Use \x22-\x22 to match untagged tiddlers');
			if (!t||!t.length) return false;
			var tags=t.readBracketedList();
			return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
				var tid=store.getTiddler(opt.value);
				return tid&&tags[0]=='-'?!tid.tags.length:tid.tags.containsAny(tags);
			});
		">tags</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers whose titles include matching text"
		onclick="var t=prompt('Enter a title (or portion of a title) to match');
			if (!t||!t.length) return false;
			return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
				return opt.value.indexOf(t)!=-1;
			});
		">titles</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="select tiddlers containing matching text"
		onclick="var t=prompt('Enter tiddler text (content) to match');
			if (!t||!t.length) return false;
			return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
				var tt=store.getTiddlerText(opt.value,'');
				return tt.indexOf(t)!=-1;
			});
		">text</a><!--
	-->&nbsp; <a href="javascript:;" 
		title="reverse selection of all list items"
		onclick="return config.macros.tiddlerTweaker.selecttiddlers(this,function(opt){
			return !opt.selected;
		});">invert</a><!--
	--></span><span>select tiddlers</span><!--
	--></div><!--
	--></font><select multiple name=list size="11" style="width:99.99%" 
		title="use click, shift-click and/or ctrl-click to select multiple tiddler titles" 
		onclick="config.macros.tiddlerTweaker.enablefields(this)" 
		onchange="config.macros.tiddlerTweaker.setfields(this)"><!--
	--></select><br><!--
	-->show<input type=text size=1 value="11" 
		onchange="this.form.list.size=this.value; this.form.list.multiple=(this.value>1);"><!--
	-->by<!--
	--><select name=sortby size=1 
		onchange="config.macros.tiddlerTweaker.init(this.form,this.value)"><!--
	--><option value="title">title</option><!--
	--><option value="size">size</option><!--
	--><option value="modified">modified</option><!--
	--><option value="created">created</option><!--
	--><option value="modifier">modifier</option><!--
	--></select><!--
	--><input type="button" value="refresh" 
		onclick="config.macros.tiddlerTweaker.init(this.form,this.form.sortby.value)"<!--
	--> <input type="button" name="stats" disabled value="totals..." 
		onclick="config.macros.tiddlerTweaker.stats(this)"><!--
--></td><td style="width:1%"><!--
	--><div style="text-align:left"><font size=-2>&nbsp;modify values</font></div><!--
	--><table style="width:100%;"><tr><!--
	--><td style="padding:1px"><!--
		--><input type=checkbox name=settitle unchecked 
			title="allow changes to tiddler title (rename tiddler)" 
			onclick="this.form.title.disabled=!this.checked">title<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=title size=35 style="width:98%" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=setcreator unchecked 
			title="allow changes to tiddler creator" 
			onclick="this.form.creator.disabled=!this.checked">created by<!--
	--></td><td style="padding:1px;"><!--
		--><input type=text name=creator size=35 style="width:98%" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=setwho unchecked 
			title="allow changes to tiddler author" 
			onclick="this.form.who.disabled=!this.checked">modified by<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=who size=35 style="width:98%" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=setcdate unchecked 
			title="allow changes to created date" 
			onclick="var f=this.form;
				f.cm.disabled=f.cd.disabled=f.cy.disabled=f.ch.disabled=f.cn.disabled=!this.checked"><!--
		-->created on<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=cm size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> / <input type=text name=cd size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> / <input type=text name=cy size=4 style="width:3em;padding:0;text-align:center" disabled><!--
		--> at <input type=text name=ch size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> : <input type=text name=cn size=2 style="width:2em;padding:0;text-align:center" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=setmdate unchecked 
			title="allow changes to modified date" 
			onclick="var f=this.form;
				f.mm.disabled=f.md.disabled=f.my.disabled=f.mh.disabled=f.mn.disabled=!this.checked"><!--
		-->modified on<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=mm size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> / <input type=text name=md size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> / <input type=text name=my size=4 style="width:3em;padding:0;text-align:center" disabled><!--
		--> at <input type=text name=mh size=2 style="width:2em;padding:0;text-align:center" disabled><!--
		--> : <input type=text name=mn size=2 style="width:2em;padding:0;text-align:center" disabled><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=replacetext unchecked
			title="find/replace matching text" 
			onclick="this.form.pattern.disabled=this.form.replacement.disabled=!this.checked">replace text<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=pattern size=15 value="" style="width:40%" disabled 
			title="enter TEXT PATTERN (regular expression)"> with<!--
		--><input type=text name=replacement size=15 value="" style="width:40%" disabled 
			title="enter REPLACEMENT TEXT"><!--
	--></td></tr><tr><td style="padding:1px"><!--
		--><input type=checkbox name=settags checked 
			title="allow changes to tiddler tags" 
			onclick="this.form.tags.disabled=!this.checked">tags<!--
	--></td><td style="padding:1px"><!--
		--><input type=text name=tags size=35 value="" style="width:98%" 
			title="enter new tags or use '+tag' and '-tag' to add/remove tags from existing tags"><!--
	--></td></tr></table><!--
	--><div style="text-align:center"><!--
	--><nobr><input type=button name=display disabled style="width:24%" value="display" 
		title="show selected tiddlers"
		onclick="config.macros.tiddlerTweaker.displaytiddlers(this,false)"><!--
	--> <input type=button name=edit disabled style="width:23%" value="edit" 
		title="edit selected tiddlers"
		onclick="config.macros.tiddlerTweaker.displaytiddlers(this,true)"><!--
	--> <input type=button name=del disabled style="width:24%" value="delete" 
		title="remove selected tiddlers"
		onclick="config.macros.tiddlerTweaker.deltiddlers(this)"><!--
	--> <input type=button name=set disabled style="width:24%" value="update" 
		title="update selected tiddlers"
		onclick="config.macros.tiddlerTweaker.settiddlers(this)"></nobr><!--
	--></div><!--
--></td></tr></table><!--
--></form><span style="display:none"><!--content replaced by tiddler "stats"--></span>
!end
//}}}
***/
 
!!TiddlySnip
Firefox の extension。
Firefox から直接 Tiddlywiki に tiddler を追加できるエクステンション。

文章を選択した状態で右クリックすると「TiddlySnip selection」が現われる。
ダイアログにて内容を確認して save する。
<<<
TiddlySnip: ¶

For now, you can grab the current beta release here: http://lewcid.googlepages.com/tiddlysnip.xpi

TiddlySnip is a firefox extension that aims to facilitate saving text to your TW, primarily from your browser. It's as simple as select some text, right click, and choose "TiddlySnip Selection". Each selection is saved in a new tiddler.

For now we are trying to make sure that the extension is very flexible and it's easy to turn settings on and off. Eventually we will decide on the best default configuration depending on community feedback.

Source: [[TiddlySnip - TiddyWiki - Trac|http://trac.tiddlywiki.org/tiddlywiki/wiki/TiddlySnip]]
<<<
TiddlySpot でも使用できるようだが、どうもうまく行かない。もうちょっと調べます。
http://www.tiddlywiki.com/
!!!BackStage lnterface
画面右上に「backstage」ボタンが出現。(編集可能なときのみ)
*save (ファイルセーブ)
*sync (サーバとの sync 機能)
*import (import 機能)
*tweak (オプション参照・変更)
*plugin (プラグインマネージャ)
へのインタフェースが提供される。

!!!ImportManager, PluginManager
それぞれ、サイズが表示されるようになったこと。
タイトル右の「↓」を押すと内容がその場で見られる。

!!!ServerSync
import を使用して入れた tiddler は、その元となった tiddler との違いを確認でき、sync することで最新のものを落とすことができる。
(・・ようである。まだ試していない)

!!!toolbar [more]
ツールバーに more 機能が追加。
{{{
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'>
}}}
基本「>」があるところまでが表示され、more を押すとさらに右側のメニューが出る。

!!!Options (tweak)
設定変数の全てを参照・変更することができるようになった。(これまでは AdvancedOptions にあるもの以外は書かなきゃいけなかった)

!!!readOnly
readOnly での起動が可能となる
{{{eg, http://www.tiddlywiki.com/beta/#readOnly:yes}}}

!!!Yellow note
特別な tiddler (DefaultTiddler など) を編集する時、tiddler の説明が表示されるようになった。

!!!source
あちこちかなり改修が入っているらしい。
とりあえずジブンに関係あることとしては、save した tiddler に改行が入り見易くなった。(これまでは一行で書かれていた)
デフォルトの StyleSheet なども見易く書かれている。

!!!--Upgrade, Downgrade---
+++
| !Up/Down | !method | !2.1.3 ⇔ 2.2 |
| Upgrade |import|>|>| × |
|~|override|>|>| ◯ |
| Downgrade |import|>|>| × |
|~|override|>|>| × |
→もう少し情報を集めて実験してみます
===
ひとまず下げます、すみません。
!文字装飾
{{{
''太字''
}}}
''太字''
{{{
--取消線--
}}}
--取消線--
{{{
__下線__
}}}
__下線__
{{{
//斜体//
}}}
//斜体//
{{{
2^^3^^=8
}}}
2^^3^^=8
{{{
a~~ij~~ = -a~~ji~~
}}}
a~~ij~~ = -a~~ji~~
{{{
@@ハイライト@@
}}}
@@ハイライト@@
{{{
@@color(green):着色(ここでは緑)@@
}}}
@@color(green):着色(ここでは緑)@@
{{{
@@bgcolor(#000000):color(#00FFFF):a背景色の設定もできます。@@
}}}
@@bgcolor(#000000):color(#00FFFF):a背景色の設定もできます。@@

{{{ {{{ }}} /%}}}%/
で囲む
/%{{{%/{{{ }}} }}}

{{{
 <monospacedtext>固定幅な表示</monospacedtext>
 if($hogehoge != ''){
 /*
 ほげほげ
 */
 }
}}}

!水平線
文書の区切りを明示する時に。
{{{
----
}}}
----

!通常リスト
箇条書きなんかに使うやつです。
{{{
* 一段目
** 階層化もできます。
** 同一レベルに記述するとこんなかんじ。
* そして元に戻ります。
}}}
* 一段目
** 階層化もできます。
** 同一レベルに記述するとこんなかんじ。
* そして元に戻ります。
!番号リスト
序数を付けたリストです。
{{{
#item1
#item2
##item2.1
##item2.2
##item2.3
#item3
##item3.1
###item3.1.1
###item3.1.2
}}}
#item1
#item2
##item2.1
##item2.2
##item2.3
#item3
##item3.1
###item3.1.1
###item3.1.2
!見出し
いわゆる{{{<h2>...</h2>}}}などに相当する見出しです。五段階に対応してます。
{{{
!Header 1
!!Header 2
!!!Header 3
!!!!Header 4
!!!!!Header 5
}}}
!Header 1
!!Header 2
!!!Header 3
!!!!Header 4
!!!!!Header 5

!外部リンク
{{{
他のサイトへのリンクをする場合、[[Google|http://www.google.com/]]などと記載します。
}}}
他のサイトへのリンクをする場合、[[Google|http://www.google.com/]]などと記載します。

!画像の埋込み
{{{
[img[Google|http://www.google.co.jp/images/logo_sm.gif]]なんてことも可能です。
}}}
[img[Google|http://www.google.co.jp/images/logo_sm.gif]]なんてことも可能です。

同じフォルダにある場合はパス名は不要なようです。

!引用
{{{
JeremyRuston said:
<<<
A TiddlyWiki is like a blog because it's divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole. I think that TiddlyWiki represents a novel medium for writing, and will promote it's own distinctive WritingStyle. This is the first version of TiddlyWiki and so, as discussed in TiddlyWikiDev, it's bound to be FullOfBugs, have many MissingFeatures and fail to meet all of the DesignGoals. And of course there's NoWarranty, and it might be judged a StupidName.
<<<
}}}
JeremyRuston said:
<<<
A TiddlyWiki is like a blog because it's divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole. I think that TiddlyWiki represents a novel medium for writing, and will promote it's own distinctive WritingStyle. This is the first version of TiddlyWiki and so, as discussed in TiddlyWikiDev, it's bound to be FullOfBugs, have many MissingFeatures and fail to meet all of the DesignGoals. And of course there's NoWarranty, and it might be judged a StupidName.
<<<

{{{
>level 1
>level 1
>>level 2
>>level 2
>>>level 3
>>>level 3
>>level 2
>level 1
}}}

>level 1
>level 1
>>level 2
>>level 2
>>>level 3
>>>level 3
>>level 2
>level 1

!表組
{{{
|!th1111111111|!th2222222222|
|>| colspan |
| rowspan |left|
|~| right|
|bgcolor(#a0ffa0):colored| center |
|caption|c
}}}
|!th1111111111|!th2222222222|
|>| colspan |
| rowspan |left|
|~| right|
|bgcolor(#a0ffa0):colored| center |
|caption|c

!ドキュメント内リンク (追加)
{{{
[[GettingStarted]]
[[スタートのメモ|GettingStarted]]
}}}

[[GettingStarted]]
[[スタートのメモ|GettingStarted]]

!他
本家へのリンク集→[[TextFormatting]]
!~TiddlyWiki に欲しい機能
[[TiddlyWikiRequests|http://groups.google.com/group/TiddlyWikiRequests]] などよく見れば解決するものもあるかもしれない。
*plugin などの Version を確認する
*Tag をまとめて管理する画面
*tiddler をまとめて管理する画面 (まとめて消すとか)
*ファイルサイズを小さくまとめるような何か
*load を早くするような何か
*現在「修正中」か、「save済み」かを確認する何か
*昔の tiddler を修正してうっかりそのまま done してしまう。(shif を押し忘れる) 修正日付の修正をしたい
TiddlyWiki (略称 TW) <<redirect TW TiddlyWiki>> の一問一答。FAQ です。
「一答」ではないかもしれませんがそこは響きで。

書きかけです。というかどんどん追加していきます。
もし質問などあれば答えられる範囲ですが追加していきたいと思います。コメントください。
/% <<showtoc>> %/
!~TiddlyWiki について
!!TiddlyWiki(TW) て何ですか?
まず wiki について知らない方はこちら via: http://ja.wikipedia.org/wiki/Wiki
>ウェブブラウザを利用してWebサーバ上のハイパーテキスト文書を書き換えるシステムの一種である
TW も wikiのひとつです。

!!他の Wiki と何が違うの?
[[ウィキ/# 9.2 TiddlyWiki系統 - Wikipedia|http://ja.wikipedia.org/wiki/Wiki#TiddlyWiki.E7.B3.BB.E7.B5.B1]]
と Wikipedia で項目があるように、WIki の中でも別カテゴリにされる様な特徴としてはまず、''html ファイル1つで実装されている'' ことが挙げられるでしょう。
さらに ''サーバが必要なく、ブラウザのみで動作する'' ことですね。他の Wiki に触れていても、TW を知らない人には「そんなことできるか?」ということになりそうですが、全て JavaScript (略称 JS)<<redirect JS JavaScript>>によって実装されているということが分かればナルホド、となるのでしょうか。
「JS だけで実装されているということは、いろいろ問題があるんじゃないの?」という疑問を持たれる方もいるかもしれません。それはその通りで、TW の避けて通れない大きなカベがあることも事実です。

!!「TiddlyWiki」て何て読むの?
「ティドリィウィキ」です。たしか‥

!!TW の何が良いの?
まず、
*サーバが必要無くブラウザさえあれば使用できること
*ファイルが一つだけである
*そのファイルはただの html ファイルである
*編集・保存が容易 (ダブルクリックで編集モードに)
これらのことが特に挙げられるでしょう。
さらに、
*プラグインの導入が簡単
*スタイルの変更が簡単
などがあると思います。
いずれの修正もブラウザからの編集によって行なわれます。プラグインの導入すらもブラウザ上にて__プラグインのテキスト__を貼り付けることにより使用可能となります。

!!tiddler って?
tiddler とは TW の記事一つひとつのことを云います。
この「[[一問一答|TiddlyWiki 一問一答]]」もひとつの tiddler です。

!導入
!!ぜひ使ってみたいけど、どうやって始めればいいの?
手順としては、
#[[TiddlyWIki|http://www.tiddlywiki.com/]] サイトの[[DownloadSoftware|http://www.tiddlywiki.com/#DownloadSoftware]] よりファイルをダウンロードする
**[[this link to empty.html|http://www.tiddlywiki.com/empty.html]] のリンクを右クリック「リンク先を保存」~~(表示される文言は違うかもしれませんが同様の機能を使用して)~~
#(empty.html の名前を使い易い名前に変える)
#ダウンロードしたファイルを開く
と、すればもうそこに wiki システムがあります。
まずはサイドバーの options スライダを開いて、フォームに自分の名前を入れましょう。

''tiddler(ひとつの記事のこと) 作成方法:''
#右のサイドバーより「new tiddler」をクリック
#フォームが表示されるので
##タイトルを入力
##内容を入力
##タグを入力(任意)
#上部にある「done」をクリック
画面上に今作成した tiddler が表示され、サイドバーの「Timeline」に今作成した tiddler が表示されているはずです。

''tiddler 編集方法:''
tiddler の上でダブルクリックするとフォームが開きます。あとは作成方法と同様に。

''save について:''
tiddler を追加・編集しました。これでどんどん書き込んでいけますね。
@@color(#cc0000):でもまだファイルには反映されていません@@。
ファイルに反映するためにはサイドバーの「save changes」をクリックする必要があります。
それでは忘れてしまいそうで恐いと思われるかもしれませんが、移動したり、ブラウザを閉じようとしたとき、保存がされていなければダイログが表示されるので安心です。

いちいち save しなければならないのかと云われる方には、サイドバーの options を開くと、
「AutoSave」のチェックあります。こちらをチェックしておけば勝手に保存してくれます。

また使用中「いま保存した状態なのかどうかが分からない」ということに悩まされるようであれば、(CM) ぜひ拙作 [[DirtyFlagMacro]] を使ってみてください。
(いつもお世話になっている [[BidiX|http://tiddlywiki.bidix.info/]] にて [[IsDirtyPlugin|http://tiddlylab.bidix.info/#IsDirtyPlugin]] があることを知りました。同じ機能のプラグインの様です)

!!TW の書き方って?
記号などを使った簡単な記法で見易い文章を作成することができます。
僕の作成した簡単なものが[[こちら|TWGuideForJP]]。
[[TWGuideForJPMacro]] に同梱しています。(インストールすると <html><a href="javascript:;" onclick="scrollAnchorVisible('1mon1tou',null, event)">ShadowTiddlers</a></html> に追加されます)

!!YourName て誰のこと?
横着して options に名前を入れずに tiddler を作るとそれは YourName さんの書いたものになってしまいます。(タイトル下の表示)
Cookie を消去したときにも同じことが起こります。

きちんと名前を入れ、tiddler を保存しなおせば自分の名前が入ります。

!!プラグインのインストールはどうするの?
たくさんのプラグインが公開されています(僕も稚拙な作りながらも提供しております) それらのプラグインの tiddler を自分の TW にコピーするだけです。
コピーの手順を分かり易く云うと、
#使いたいプラグインの tiddler を編集状態にして内容をコピー
#自分の TW で new tidder して内容・タイトルを貼り付ける
#タグに「systemConfig」を付加
# TW を reload
以上です。

さらに簡単に行なう方法としては [[ImportTiddlers]] を使用することができます。
(ローカルのファイルより) [[ImportTiddlers]] を開いてプラグインのあるサイトを指定、プラグインを指定してダウンロードすることも可能です。

!!英語は苦手です 日本語化できない?
僕も苦手ですが、もう慣れました。

でもやはり最初は日本語化して使用するのが分かり易いかと思います。入口としては。
*[[JapaneseTranslation|http://flow.dip.jp/mt/archives/u/twmemo.html#JapaneseTranslation]] 
こちらを導入するだけで日本語で使用できます。
[[MemoWikiさん|http://flow.dip.jp/mt/archives/u/twmemo.html]]に感謝です。

!使用上のこと
!!自分のサイトとしてカスタマイズしたい
*[[SiteTitle]] タイトル
*[[SiteSubtitle]] サブタイトル
*[[MainMenu]] メインメニュー
*[[DefaultTiddlers]] 最初に表示される tiddler たちを指定
まずはこのあたりを変えてみてどうなるかを見てみてください。

!!サイドバーにオプションがいろいろあるようだけど、最低限必要な設定は?
サイドバーの options のスライダを開いたところ。さらにその中の AdvancedOptions を開いた先にも設定項目があります。
*options で設定すべきこと
**SaveBackups : 保存時 TW のファイルバックアップを作成する
**AutoSave : tiddler を保存したら自動的に TW 全体も保存する
**EnableAnimations : 操作時のアニメーションを On/Off する
*AdvancedOptions で設定すべきこと
**GenerateAnRssFeed : RssFeed ファイルを書き出す。「ファイル名.xml」~~(.html の部分が .xml)~~ が別のファイルに出力される
**Folder name for backup files : バックアップを取る場合、保存先のディレクトリを指定する

!!タグって必要?
ブログのシステムや、ソーシャルブックマークなどこの頃流行りのシステムでは皆な「タグ」が重要な要素となっています。触れたことが無い人にはなかなか理解が難しいのかもしれません。

ここは自分の言葉ではなく Wikipedia を引用させていただきます、
<<<
「タグ(tag、「猫の写真」「漁業」「人工知能」など、そのコンテンツの内容・属性を一言で記述する索引語やキーワードやラベルの様なもの、タグをつけることをタグ付けという)」を自由に追加し分類し、検索などに役立てる。

Source: [[フォークソノミー - Wikipedia|http://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A9%E3%83%BC%E3%82%AF%E3%82%BD%E3%83%8E%E3%83%9F%E3%83%BC]]
<<<
難しく考えずに、後で検索するときに分かり易い言葉、キーワードと考えて良いでしょう。好きなだけタグを付けられます。

例えばこの tiddler に僕は「qa faq toRSS」という三つタグを振ってあります。
最初の二つはそのままの意味です。QA と FAQ かなぁ、と付けました。
三つめの「toRSS」というタグには「このタグが振られている tiddler は RSS への書き出し対象になる」という機能と関連付けられています。こういった機能的な使われ方も TW ではあります。

!!Timeline にプラグインやマクロの tiddler は表示したくありません
*Timeline に表示したくない tiddler には 「excludeLists」
*search する必要のない tiddler には 「excludeSearch」
のタグを付けましょう。

!!tiddler のタイトルがイタリック体のものや、色がグレーのものがあるのだけど
もちろん Style の指定によるのですが、タイトルは 3種類の表示があります
| !表示 | !内容 |
|通常のタイトル |StyleSheet 指定のもの download したままでは、『あずき色』 |
|イタリックのタイトル |まだ書かれていない tiddler <br>tiddler 内のリンクも存在していない tiddler はイタリックになります |
|グレーのタイトル |Shadow tiddler。TW が元々持っているもの<br>あるいは、プラグインなどが shadow に追加したもの |

!!リンクの形態が違うのだけれど
タイトルの表示形態と似ています。
| !リンク形態 | !内容 |
|ボールド体 |通常の存在する tiddler →「[[FrontPage]]」 |
|ボールドイタリック体 |変更していない Shadow tiddler。TW が元々持っているもの<br>あるいは、プラグインなどが shadow に追加したもの →「[[MarkupPreBody]]」|
|イタリック体 |まだ書かれていない tiddler <br>tiddler 内のリンクも存在していない tiddler →「[[no tiddler]]」|
|アンダーバー |外部リンク →「[[KRK-CLip|http://kuraku.net/tw/clip.html]]」|
(サイドバーの中はまた違ったルールになります。ボールド体のものが存在する tiddler)

また、[[IncludePlugin]] を使用して他の TW から tiddler を取り込んだ場合にも同じルールが適用されます。
Include した tiddler リンクの形態を変えたい場合は拙作 [[IncludedTiddlerStylePlugin]] を使用するとスタイルの変更が可能です。

!![[StyleSheet]] を修正してレイアウトを変えたいのですが、どこにあるのか分かりません
empty.html で落としてきた TW には、最初 tiddler が一つも無いように見えますが、__実は default で持っている tiddler があります__。[[StyleSheet]] の tiddler もその一つです。
default の tiddler はサイドバーの More > [[Shadowed|TabMoreShadowed]] にあります。

[[MainMenu]] , [[SiteTitle]], [[OptionsPanel]], [[SideBarOptions]] などが default の tiddler であることが分かります。
他にはテンプレート類があり、レイアウトの配置のための [[PageTemplate]] や、編集時の [[EditTemplate]]、tiddler 表示のための [[ViewTemplate]] などもこちらにあります。
<html><a name="1mon1tou"/></html>
!!Shadow Tiddler について、もうちょっと教えてください
TW にはもともと持っている tiddler があること、それがサイドバーの More > Shadowed の中にあるということは前記しました。
デフォルトの TW に設定されている Shadow tiddler はこれだけありました。(下のボタンをクリック)
+++[Shadow Tiddlers list...]>
# AdvancedOptions
# ColorPalette
# DefaultTiddlers
# EditTemplate
# GettingStarted
# ImportTiddlers
# MainMenu
# MarkupPostBody
# MarkupPostHead
# MarkupPreBody
# MarkupPreHead
# OptionsPanel
# PageTemplate
# PluginManager
# SideBarOptions
# SideBarTabs
# SiteSubtitle
# SiteTitle
# SiteUrl
# StyleSheet
# StyleSheetColors
# StyleSheetLayout
# StyleSheetPrint
# TabAll
# TabMore
# TabMoreMissing
# TabMoreOrphans
# TabMoreShadowed
# TabTags
# TabTimeline
# ViewTemplate
===


けっこうありますね。
リストのイタリックのものは、このサイトでも Shadow tiddler にあるデフォルトを使用しているということです。
システムで使用している tiddler を探すときには、ここから開くようにすると探す手間が省けます。

また、使用中の Shadowed タブを見ると(初期のものではなく)、通常の字体のものとボールド体になっているものとありますが。
ボールド体になっているものは、あなたが手を加えているものです。つまり、通常の tiddler にコピーして修正したもののはずです。

まだピンと来ない方もいそうです。

例えば、Shadowed の中の通常の字体のものをクリックして開いてください。それを編集モードにして手を加えないまま閉じてください。''Shadowed の tiddler タイトルはボールド体になりましたよね''。
Shadow から普通の tidder にコピーしたのです。もっと云えば、Shadowed と tiddler とに同じものが二つある無駄な状態になってます。~~(消しといてください)~~

また、このサイトの Shadowed には上記リストにない tiddler がたくさん含まれています。
それらはプラグインが追加したものです。プラグインの作者が使い勝手が良いように、あるいは大事な情報を Shadow tiddler として追加したのです。

!!StyleSheet の指定を失敗してしまった、元に戻したいのだけれど
[[StyleSheet]] はもともと TW が持っている default の tiddler ですので、戻したければ自分で作成した [[StyleSheet]] tiddler を削除してしまえば良いのです。
削除したのちに、[[Shadowed|TabMoreShadowed]] より [[StyleSheet]] を開いてやり直してください。 

!!リンクしたつもりはないのに、勝手に word にリンクが貼られます
言葉に自動的にリンクが貼られるのは、Wiki システムの特徴の一つです。
いちいちリンクの構文を書く必要がないので非常に便利なのですが。TW は存在しない tiddler タイトルへ WikiWord と見做してリンクを貼ってしまうことがあります。リンクの先は当然ありませんので空の tiddler が開くだけです。

これを回避するためには、「~」(チルダ) を付けます。
例えば TiddlyWiki と書くだけでリンクが貼られます (この場合 tiddler は存在しますが)
{{{
~TiddlyWiki
}}}
と書くと。
~TiddlyWiki。ほら、リンクされません。

また、[[DisableWikiLinksPlugin|http://www.TiddlyTools.com/#DisableWikiLinksPlugin]] というプラグインがあります。この自動リンクを抑制するものなのですが。
「全ての自動リンクを抑制する」とやってしまうと、もともとの機能として提供されているものへのリンクも切れてしまうので (例えば AdvancedOptions へのリンク) 使い方に注意が必要になります。

!!なかなか思い通りのスタイルに変えられません
StyleSheet はなかなか習得が難しいものかもしれません。僕もはっきり云ってあまり得意な方ではないです。もし興味を持たれているならば勉強してみるのも良いかもしれませんが、コツを掴むまでには少し時間が必要でしょう。(僕はよく[[この tiddler|CSS Reference]] を見返しています)

まずは公開されている TW のテーマを適応してみてはどうでしょうか。
*[[TiddlyThemes - Home|http://tiddlythemes.com/#Home]]
ここから好きなテーマを選んで、そのテーマの TW URLをコピーして、自分の PC上から [[ImportTiddlers]] で丸ごとコピーして保存、reload してみましょう。

もちろん、StyleSheet などをコピーするので、@@color(#f00):自分で修正を入れていた場合は上書きされてしまいますから@@注意してください。TW ファイルをコピーしてそちらからやってみるのが良いかと思われます。

また、テーマチェンジャーとして、
*[[SelectThemePlugin|http://lewcid.googlepages.com/lewcid.html#SelectThemePlugin]]
を導入してみるのも良いでしょう。気分が変わって楽しいですよ。

!!表(テーブル) をもっと簡単に作りたい
簡単な表であれば良いのですが、それなりに複雑な、または大きな表を作成したいときに TW のテーブル構文で書くのはけっこう大変な作業になりそうです。

馴れもあるかもしれませんが、ちまちまちまと「| (パイプ)」で囲む作業は途中で投げたくなるときもあるでしょうし、第1にメンテナンスに苦労しそうです。
立派な表はできたけど、修正作業をする気が起きなくなるということもあるでしょう。
テキストで表を作成するというのがそもそも難しいのでしょう。TW は表を作るのに向いていないことは確かです。

では僕の方法を挙げてみます。
__得意なことは得意なアプリに任せましょう。__
大きな表は Excel で作り TW フォーマットに変換して貼り付けます。メンテナンス時は逆に TW から Excel に変換して修正ののちにまた戻します。

Excel シートからコピーしたものは単純にタブ区切りのデータになりますので、タブを「|」にして行頭、行末にも「|」を付けることで OK です。「~」「>」などの特殊記号も Excel で編集中に入れておけば良いのです。
この変換については [[QuickEditToolbar]]([[使い方|QuickEditToolbar tips]]) を使います。このサイトのものはカスタマイズして「''tab2tbl''」(Excel→TW)「''tbl2tab''」(TW→Excel) 機能を追加してあります。
{{{
行1	名前1	内容1
行2	名前2	内容2
行3	名前3	内容3
行4	名前4	内容4
行5	名前5	内容5
}}}
これは Excel で作ったものをコピーペーストしました。
tiddler 編集エリア内にてこれを選択、「tab2tbl」を実行すると、
{{{
|行1|名前1|内容1|
|行2|名前2|内容2|
|行3|名前3|内容3|
|行4|名前4|内容4|
|行5|名前5|内容5|
}}}
|行1|名前1|内容1|
|行2|名前2|内容2|
|行3|名前3|内容3|
|行4|名前4|内容4|
|行5|名前5|内容5|
表示するとこんな感じ。

では変換したものを戻すことができるのかというと、「tbl2tab」を実行すればタブ区切りに戻せます。
「~」「>」の使い方を理解しておきさえすれば、rowspan / colspan も簡単に実現できる筈です。Excelにおいてセルの結合をせずに「~」「>」を入れておけば良いのです。

!!どうもおかしい、TW が壊れてしまった?
Plugin や Macro などを導入して自分専用の TW を作っていくのは楽しいですよね。でも、いろんなものを入れたりしているうちに TW の動作がおかしくなってしまうこともあるようです。

そういうときにはまず、''空の TW を再度ダウンロードして、全ての tiddler をそちらに移してしまいましょう''。

''方法1:''
TW の Upgrade の要領で、同じバージョンのものを上書きしてしまいましょう。
問題のある TW をブラウザで表示した状態で、用意した空の TW ファイルを問題のファイルと入れ替えてから、ブラウザから 「save to disk」で保存します。

(''註:'' 当初スタンダードな方法でしたが、今はImportを使用するのが良いかと思われます、importも早くなりました - 2013.04)

''方法2:''
また、[[ImportTiddlers]] を使用することもできます。
新しい空の TW で [[ImportTiddlers]] を開いて、壊れてしまった TW のファイルを指定して読み込み、全部にチェックを付けて ~~(左端の一番上のチェックを付ければ全部が選択されます)~~ 一番下のプルダウンから「 Import these tiddlers」を選びます。tiddler の量によりますが少し待たされ、ブラウザの制御が戻ってきたら tiddler のコピーが終っていますので、「save to disk」で保存しましょう。

reload すれば、以前のものが現われるはずですがいかがでしょうか?
もし、変わらずうまく行かないようであれば、いずれかの tiddler に問題があるようです。
Plugin/Macro の問題である可能性が高いので、[[PluginManager]] で「Disabled」のチェックを付けてみたりしてどの Plugin の問題であるのかつきとめる必要があります。

また、TW をエディタで開いて編集したことがあったら、保存時に文字コードや改行コードが変わってしまったかもしれません。
''UTF-8N に対応しているエディタでなければ編集はできません。''
もし対応していないエディタで開いて何もせずに保存したとしても、データは壊れてしまいます。気をつけてください。

TW を開いて見てみると分かるのですが、改行が混在しています。CRLF(キャリジリターン+ラインフィード:Windows標準)、LF(ラインフィード:UNIXシステム標準)、とが機能的に折り混ぜられているようです。
エディタによっては改行コードを書き換えてしまうものがあるかもしれませんので、この点を理解した上でファイルの編集を行なってください。

(''註:'' 現在のver2.7 では、CRが一箇所機能的に入っているだけで、改行は LF の様です - 2013.04)

!!サーバに TW を置いて公開したいのです
もちろんローカルで編集したものをサーバのドキュメントルート以下に置くことで、自分の TW を公開することができます。
ただそのままでは編集をするたびに FTP コマンドなどを使用して Upload 作業をする必要があります。

サーバ上の TW において、保存をローカル環境で行なうのと同じ様に保存するための [[UploadPlugin]] があります。
使用方法は、「[[サーバサイドの TiddlyWiki 運用-UploadPluginの使い方]]」に詳しく書きました。

!!仲間同士で同じ TW を更新するためにはどうすれば良いですか?
いくつかの方法があるようですが、僕も仕事で一つの TW を皆なで書き込むということをしています。
使用しているのは [[GroupAuthoringPlugin|http://tiddlywiki.bidix.info/#GroupAuthoringPlugin]] というプラグインです。

前記 UploadPlugin と同じ方の作でサーバ上の使用が前提になります。そして、ruby の CGI の使用が可能である必要があります。
store.cgi と連携して TW 全体に Lock をかけます。基本的に Lock した人が Unlock するまで他の人が使用できない、というシンプルなものです。

こちらに関しては使用方法をいずれまとめたいと思っています。

(''註:'' 現状のバージョンで使用できるかどうかは未検証です - 2013.04)

!!FireBug と TW の問題って?
FireBug は FireFox で TW を使っているならば無くてはならないものです。僕もこれが無ければプラグインをちょっといじってみようか、なんて気は起こらなかったと思います。
Console を叩いて JS を実行できるので、実行してファンクションの戻り値を見たり、JS の文法の確認をしたりできます。

でも、一番使用頻度が多いのは Style を修正したいときかな。
FireBug を開いて、『虫』の横にある「Inspect」というボタンを押すとInspect モードに入ります。この状態で、調べたい部分にカーソルを持っていくと枠が表示され、その枠の中の情報が Style ウィンドウに表示されます。
助かるのは、style が上書きされているものは横線で潰されて表示されるところでしょうか。StyleSheet は、継承されることと、上書きされるのとで複雑化しますので、これを調べるには良いですよ。

ただ TW との間には問題がありまして。

(via http://tiddlywiki.com/#ImportTiddlers)
<<<
Note that the popular Firebug extension for Firefox interferes with ImportTiddlers if its "Show XMLHttpRequest" option is switched on
You cannot import tiddlers into a read-only TiddlyWiki. Try opening the TiddlyWiki file from a file:// URL
<<<

FireBug の option で「Show XMLHttpRequest」をチェックしていると ImportTiddlers ができません。
というか XmlHttpRequest のリクエストができなくなるようです。

僕の場合、XHR 関連でうまく行かないときには FireBug を Disable してしまいます。~~(ブラウザの右下のアイコンを右クリックでチェック On/Off できます)~~

(''註:'' こちらはこのドキュメントを作成した当時だけの症状だったと思います)

!!この部分はプリンタ出力したくないです
僕は TW の内容をそのままプリントして資料にしています。けっこうきれいに出力されますので重宝しますよ。

ただそのままでは余計なものが表示されている状態でプリントされてしまうことが多いです。
カスタマイズがしてあるほど、そういったことがありそうです。(例えば [[HoverMenuPlugin]] のボタン)

そういうときには [[StyleSheetPrint]] を修正することで、思い通りのプリント出力に設定ができます。
[[StyleSheetPrint]] の内容を見てみると、
{{{
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
}}}
デフォルトではこれだけ。
~MainMenu や、~SideBar を {{{ {display: none} }}} して見えなくしているわけです。

表示したくない部分の設定を同じようにここに書くことができます。
その隠したい部分の class や id を探すには、FireBug を使うと良いでしょうね。

また、tiddler の内容についても部分的にプリントの必要が無い場合もあります。例えば、[[DcTableOfContentsPlugin]] を使った索引の表示など。
その場合は最初から [[StyleSheetPrint]] に書かれている noscript class で囲んでしまいましょう。
{{{
{{noscript{<<showtoc>>}}}
}}}
ブラウザ上では問題なく見えますが、プリンタ出力には出てきません。

!プラグイン/マクロ 「こんなときはこれを使え!」
!!日本語化したい
*[[JapaneseTranslation]]
**http://flow.dip.jp/mt/archives/u/twmemo.html#JapaneseTranslation
ほとんど全ての機能が日本語化されます。
TW 自体がバージョンアップした場合には、以前のバージョンのものがそのまま適応できるかは分かりませんのでご注意を。
!!カレンダーを表示したい
*[[CalendarPlugin]]
**http://www.tiddlytools.com/#CalendarPlugin
*[[DatePlugin]]
**http://www.tiddlytools.com/#DatePlugin
2つを一緒に導入することをお奨めします。日記(journal) tiddler が存在するカレンダーに色付けがされたりして使い易くなります。
[[CalendarPlugin tips]] を参考にしてください。
!!サイドバーの tiddler 一覧を月毎にまとめたい
*[[ArchivedTimeline]]
**https://sourceforge.net/projects/ptw/
[[ArchivedTimeline tips]] を参考にしてください。
!!このサイトのようにコントロールボタンを付けたい (→)
*[[HoverMenuPlugin]]
**http://lewcid.googlepages.com/lewcid.html#HoverMenuPlugin
[[HoverMenuPlugin tips]] を参考にしてください。
!!TW の入力フォームのサイズを任意に変えたい
*[[ResizeEditorPlugin]]
**http://www.tiddlytools.com/#ResizeEditorPlugin
[[ResizeEditorPlugin tips]] を参考にしてください。
!!検索をもっと使えるようにしたい
*[[YourSearchPlugin]]
**http://tiddlywiki.abego-software.de/#YourSearchPlugin
[[YourSearchPlugin tips]] を参考にしてください。
!!タグクラウドを表示したい
*[[TagCloudPlugin]]
**http://www.tiddlytools.com/#TagCloudPlugin
こんなです。
><<tagCloud>>
!!ToDoリストをチェックボックスで実現したい
*[[CheckboxPlugin]]
**http://www.tiddlytools.com/#CheckboxPlugin
こんなリストが作成可能。
<<<
*[X]一問一答を週一で書く
**[ ]ファイルサイズ問題を記述すること
<<<
!!Favicon を表示したい
*[[FaviconMacro]]
~~(リソースが不明です。分かりましたらリンクします。それまでは[[こちら|FaviconMacro]]から持っていってください)~~
[[FaviconMacro tips]] を参考にしてください。
!!リマインダを使いたい
*[[ReminderMacros]]
**http://www.geocities.com/allredfaq/reminderMacros.html
カレンダーと連携もできます。
[[ReminderMacros tips]] を参考にしてください。
!!TW の入力を補佐するツールは?
*[[WikiBar]]
**http://aiddlywiki.sourceforge.net/
*[[QuickEditToolbar]] (JavaScript tiddler)
**http://www.TiddlyTools.com/#QuickEditToolbar
[[WikiBar]] については [[WikiBar tips]] を参考にしてください。
[[QuickEditToolbar]] については [[QuickEditToolbar tips]] を。(こちらがおすすめです)
!!TW の書式をいつでも参照したい
*[[TWGuideForJPMacro]]
**http://kuraku.tiddlyspot.com#TWGuideForJPMacro
拙作です。意外と未だに見ます。<<toolbar guidejp>>
!!登録した tiddler のいろんなリストを作りたい
*[[TiddlerListMacro]]
**http://jackparke.googlepages.com/jtw.html#TiddlerListMacro
*[[ForEachTiddlerPlugin]]
**http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin
[[ForEachTiddlerPlugin]] については [[ForEachTiddlerPlugin tips]] を参考にしてください。
どちらも同じ機能ですが、それぞれに特長がありますのでどちらを使うかは使い方によります。
とりあえず [[TiddlerListMacro]] の方が記述がシンプルです。
!!tiddler を開いたり閉じたりしたい
*[[CollapseTiddlersPlusPlugin]]
**http://gensoft.revhost.net/Collapse.html
tiddler の折り畳みが可能になります。<<toolbar collapseTiddler>>
!!見出しのインデックスを表示したい
*[[DcTableOfContentsPlugin]]
**http://www.zagware.com/tw/plugins.html#DcTableOfContentsPlugin
[[DcTableOfContentsPlugin tips]] を参考にしてください。
僕の TW ではどこに入れてもきちんと動きませんでしたのでパッチを当ててあります。
!!起動のもたつきを緩和したい (気持的に)
*[[SplashScreenPlugin]]
**http://lewcid.googlepages.com/lewcid.html#SplashScreenPlugin
起動時に『ロード中』的なダイアログを表示して、待ち時間を感じさせないようにします。
もちろん程度によりますが。
[[SplashScreenPlugin tips]] を参考にしてください。
!!画像ファイルを Upload して表示したい
*[[AttachFilePlugin]]
**http://www.tiddlytools.com/#AttachFilePlugin
[[AttachFilePlugin tips]] を参考にしてください。
!!指定した tiddler のみ RSS ファイルに出力したい
*[[GenerateRssHijack]]
**http://tiddlywiki.bidix.info/#GenerateRssHijack
[[GenerateRssHijack tips]] を参考にしてください。
!!タグを表示すると、そのタグが付いている他の tiddler へのリンクリストが表示される
*[[QuickOpenTagPlugin tips]]
**http://mptw.tiddlyspot.com/#QuickOpenTagPlugin
[[QuickOpenTagPlugin tips]] を参考にしてください。
!!今現在、更新中なのかどうか分からなくなってしまった。
*[[DirtyFlagMacro]]
**http://kuraku.tiddlyspot.com#DirtyFlagMacro
拙作です。[[HoverMenu]] と一緒に表示するようにしていたら、無くてはならないものになってしまいました。
*[[lsDirtyPlugin|http://tiddlylab.bidix.info/#IsDirtyPlugin]]
**http://tiddlylab.bidix.info/#IsDirtyPlugin
こちらも同じ機能を実現しているみたいです。きっと拙作より良いものでしょう‥ ~~(ちゃんと見ていませんが)~~
!!tiddler をまとめて消したい
*[[DeleteListPlugin]]
**http://kuraku.tiddlyspot.com#DeleteListPlugin
拙作です。tiddler の整理に良いですよ。
!!tiddler のタグをまとめて付けたい
*[[DeleteListPlugin]]
**http://kuraku.tiddlyspot.com#DeleteListPlugin
拙作。こんな名前ですが、リストするタグの指定とタグのチェックボックス表示を指定できますので、タグの一括変更が可能です。

!サイト
!!TiddlyWiki の情報を交換するためのコミュニティは?
Google Group が最も活発かと思われます。
*[[Google Group: TiddlyWiki|http://groups.google.com/group/TiddlyWiki]]
*[[Google Group: TiddlyWikiDev|http://groups.google.com/group/TiddlyWikiDev]]
[[mixi|mixi.jp]] にもコミュニティが在りますが、現在はあまり活発ではないみたいです。
[>][[TiddlyWIki|http://mixi.jp/view_community.pl?id=345237]] 僕も参加しています。

/% !トラブル %/
!履歴
<part history hidden>
*2007.06.25 v0.1.8 「この部分はプリンタ出力したくないです」を追記
*2007.06.21 v0.1.7 「表(テーブル)をもっと簡単に作りたい」を追記
*2007.05.25 v0.1.6 「リンクの形態」を追記。「TW が壊れた」を修正
*2007.05.14 v0.1.5 「このプラグインを使え!」追記
*2007.05.07 v0.1.4
*2013.04.23 v0.2.0 「註」を追加。リンクを貼り直し。
</part>
<<tiddler ./history>>

TiddlyWiki 一問一答 オリジナル: http://kuraku.tiddlyspot.com/#%5B%5BTiddlyWiki%20%E4%B8%80%E5%95%8F%E4%B8%80%E7%AD%94%5D%5D
TiddlyWiki を設定する上で、大変参考にさせていただいているサイトです。

*[[TiddlyWiki 日本語化プラグイン配布サイト - for Version 2.2|http://ogoshi.tiddlyspot.com/]]
**http://ogoshi.tiddlyspot.com/

*''[[MemoWiki - メモ用Wiki by TiddlyWiki|http://flow.dip.jp/mt/archives/u/twmemo.html]]''
**http://flow.dip.jp/mt/archives/u/twmemo.html
***当サイトをリンクしてくださいました

*''[[素敵なTiddlyWiki  - カスタマイズノート 第2版|http://www.potto.client.jp/]]''
**http://www.potto.client.jp/

*''[[TiddlyThemes - Home|http://tiddlythemes.com/#Home]]''
**http://tiddlythemes.com/#Home

*''[[TiddlyWiki in Action - A showcase of TiddlyWikis used creatively around the world|http://giffmex.tiddlyspot.com/]]''
**http://giffmex.tiddlyspot.com/
**[[TiddlyWiki goodies: themes, colors, plugins and macros|http://giffmex.tiddlyspot.com/#%5B%5BTiddlyWiki%20goodies%3A%20themes%2C%20colors%2C%20plugins%20and%20macros%5D%5D]]

*''[[PamGau::TiddlySpot - ここでもTiddlyWiki|http://kyorecoba.tiddlyspot.com/]]''
**http://kyorecoba.tiddlyspot.com/
**[[tiddlyspot.com FAQ (日本語訳)|http://kyorecoba.tiddlyspot.com/#%5B%5Btiddlyspot.com%20FAQ%5D%5D]]

*''[[各種メモ - tsupo の第5のメモ|http://www.na.rim.or.jp/~tsupo/wiki/]]''
**http://www.na.rim.or.jp/~tsupo/wiki/

*''[[TiddlyWiki Style - Tips, Macros and FAQ|http://www.geocities.jp/wikistyle/]]''
**http://www.geocities.jp/wikistyle/

*--''[[Lewcid TW - a repository of my extensions for TW|http://tw.lewcid.org/]]''--
**--http://tw.lewcid.org/--

*''[[MonkeyPirateTiddlyWiki - tiddlywiki turbo-boosted. by simon baird|http://mptw.tiddlyspot.com/]]''
**http://mptw.tiddlyspot.com/
**http://mptw-beta.tiddlyspot.com/

*''[[MonkeyPirateTiddlyWiki - some plugins and hacks for tiddlywiki (2.0.10)|http://mptw2.tiddlyspot.com/]]''
**http://mptw2.tiddlyspot.com/

*''[[TiddlyTools "Small Tools for Big Ideas!" - ELS Design Studios Intuitive Interfaces for Intelligent*Interactions™|http://www.tiddlytools.com/]]''
**http://www.tiddlytools.com/

*''[[TiddyWiki - Trac|http://trac.tiddlywiki.org/]]''
**http://trac.tiddlywiki.org/

*''[[TiddlyDoc|http://doc.tiddlywiki.org/]]''
**http://doc.tiddlywiki.org/

*''[[Google Group: TiddlyWiki|http://groups.google.com/group/TiddlyWiki]]''
**http://groups.google.com/group/TiddlyWiki
*''[[Google Group: TiddlyWikiDev|http://groups.google.com/group/TiddlyWikiDev]]''
**http://groups.google.com/group/TiddlyWikiDev
**--Google Group: TiddlyWikiRequests--
**--http://groups.google.com/group/TiddlyWikiRequests--

*''[[abegoExtensions - UdoBorkowski's Extensions for TiddlyWiki|http://tiddlywiki.abego-software.de/]]''
**http://tiddlywiki.abego-software.de/

*''[[BidiXTW|http://tiddlywiki.bidix.info/]]''
**http://tiddlywiki.bidix.info/
/%
|Name|ToggleScrollingSidebars|
|Source|http://www.TiddlyTools.com/#ToggleScrollingSidebars|
|Version|0.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires||
|Overrides||
|Description||
%/<script>
	if (config.options.chkScrollSidebars==undefined)
		config.options.chkScrollSidebars=true;
	if (!config.options.txtOuterTabHeight||!config.options.txtOuterTabHeight.length)
		config.options.txtOuterTabHeight="25em";
	if (!config.options.txtInnerTabHeight||!config.options.txtInnerTabHeight.length)
		config.options.txtInnerTabHeight="21em";

	var scroll=config.options.chkScrollSidebars||config.browser.isIE?'':'fixed'; // IE doesn't do 'fixed' position
	//document.getElementById('mainMenu').style.position=scroll;
	document.getElementById('sidebar').style.position=scroll;

	// "short sheet" the SideBarTabs when sidebars are hovering (to hopefully fit "above the fold")
	var outer=config.options.chkScrollSidebars||config.browser.isIE?"auto":config.options.txtOuterTabHeight;
	var inner=config.options.chkScrollSidebars||config.browser.isIE?"auto":config.options.txtInnerTabHeight;
	var css='#sidebarTabs .tabContents { height:'+outer+'; overflow:auto; width:92.5%; }';
	css+='#sidebarTabs .tabContents .tabContents { height:'+inner+' !important; }';
	setStylesheet(css,'shortSidebarTabs');

	window.ToggleScrollingSidebars_setscroll = function() {
		if (config.browser.isIE) return; // IE doesn't support 'fixed' position
		document.getElementById('mainMenu').style.position=!config.options.chkScrollSidebars?'fixed':'';
		document.getElementById('sidebar').style.position=!config.options.chkScrollSidebars?'fixed':'';
		var outerTabHeight=config.options.txtOuterTabHeight;
		if (config.options.chkScrollSidebars) outerTabHeight="auto";
		var innerTabHeight=config.options.txtInnerTabHeight;
		if (config.options.chkScrollSidebars) innerTabHeight="auto";
		var css='#sidebarTabs .tabContents { height:'+outerTabHeight+'; overflow:auto; width:92.5%; }';
		css+='#sidebarTabs .tabContents .tabContents { height:'+innerTabHeight+' !important; }';
		setStylesheet(css,'shortSidebarTabs');
	}

</script><<option chkScrollSidebars>><script>
	place.lastChild.checked=config.options.chkScrollSidebars;
	place.lastChild.onchange=function() {
		config.options.chkScrollSidebars=this.checked;
		saveOptionCookie("chkScrollSidebars");
		window.ToggleScrollingSidebars_setscroll();
	};
</script> sidebars scroll with page
/***
| Name|ToggleTagPlugin|
| Description|Makes a checkbox which toggles a tag in a tiddler|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://tiddlyspot.com/mptw/#ToggleTagMacro|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Usage
{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}
* TagName - the tag to be toggled, default value "checked"
* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler
* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'
(If a parameter is '.' then the default will be used)

Examples:

|Code|Description|Example|h
|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|
|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|
|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|
|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|
|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|
Notes:
* If TiddlerName doesn't exist it will be silently created
* Set label to '-' to specify no label
* See also http://mgtd-alpha.tiddlyspot.com/#ToggleTag2

!Known issues
* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing

***/
//{{{

merge(config.macros,{

	toggleTag: {

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

		handler: function(place,macroName,params,wikifier,paramString,tiddler) {
			var tag = (params[0] && params[0] != '.') ? params[0] : "checked";
			var title = (params[1] && params[1] != '.') ? params[1] : tiddler.title;
			var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);
			var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;
			label = (label == '-' ? '' : label);
			var theTiddler =  title == tiddler.title ? tiddler : store.getTiddler(title);
			var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {
				if (!store.tiddlerExists(title)) {
					if (config.macros.toggleTag.createIfRequired) {
						var content = store.getTiddlerText(title); // just in case it's a shadow
						store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
					}
					else 
						return false;
				}
				store.setTiddlerTag(title,this.checked,tag);
				return true;
			});
		}
	}
});

//}}}

/%
|Name|ToggleTopButton|
|Source|http://www.TiddlyTools.com/#ToggleTopButton|
|Version|1.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|adds a floating "scroll to page top" button in the lower right corner of the window. |

%/<script> 
	window.showTopButton=function(show) {

		// remove existing "top" button (if any)
		var e=document.getElementById("scrollToTopButton"); if (e) e.parentNode.removeChild(e);
		if (config.browser.isIE) return; // IE doesn't do FIXED... do nothing.
		if (!show) return; // hiding button... we're done.

		// create a link that scrolls to the top of page
		e=createTiddlyElement(null,"A",null,null,"\u21d1");
		e.id="scrollToTopButton";
		e.title="scroll to top of page";
		e.onclick=function(){window.scrollTo(0,0)};

		// make it hover in the bottom right corner of the window
		var s=e.style;
		s.position="fixed";
		s.zIndex="1001"; // hopefully, this will be on top of ALL other elements!
		s.bottom=".5em";
		s.right=".5em";
		s.cursor="pointer";

		// make it look like a push button
		s.border="2px outset ButtonFace";
		s.padding="0px 3px";
		s.backgroundColor="ButtonFace";
		s.color="ButtonText !important;";
		s.fontSize="8pt";
		s.MozAppearance="button";

		document.body.insertBefore(e,null);
	}
	if (config.options.chkShowTopButton==undefined) config.options.chkShowTopButton=true;
	window.showTopButton(config.options.chkShowTopButton);
</script><<option chkShowTopButton>><script>
	place.lastChild.onchange=function() {
		window.showTopButton(this.checked);
		config.options.chkShowTopButton=this.checked;
		saveOptionCookie("chkShowTopButton");
	};
</script> "scroll-to-top" button
| tiddlyspot password:|<<option pasUploadPassword>>|
| site management:|<<upload http://kuraku.tiddlyspot.com/store.cgi index.html . .  kuraku>>//(requires tiddlyspot password)//<br>[[control panel|http://kuraku.tiddlyspot.com/controlpanel]], [[download (go offline)|http://kuraku.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]]|
/***
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 = 'kuraku';

// 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")

});
//}}}
<<upload http://kuraku.tiddlyspot.com/store.cgi index.html . .  kuraku>><html><a href='http://kuraku.tiddlyspot.com/download' class='button'>download</a></html>
/%
!legal
|Name|TwitterTabs|
|Source|http://www.TiddlyTools.com/#TwitterTabs|
|Version|2.0.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|transclusion|
|Description|Find recent tweets by keyword or username and show results in tabs|
!end
- - - - - DO NOT EDIT ABOVE THIS LINE - - - - -


- - - - - TABSET SECTION - - - - -
!tabset
<<tabs txtTwitterTabs
'find...'		'find tweets containing...'	[[TwitterTabs##search]]
'from...'		'show tweets from...'		[[TwitterTabs##user]]
'tiddlytools'		'show tweets from @tiddlytools'	[[TwitterTabs##tiddlytools]]
'jermolene'		'show tweets from @jermolene'	[[TwitterTabs##jermolene]]
'kuraku'		'show tweets from @kuraku'	[[TwitterTabs##kuraku]]
'TiddlyWiki'	'show tweets from @TiddlyWiki'	[[TwitterTabs##TiddlyWiki]]
'TwitterTabsInfo'	'documentation for TwitterTabs' [[TwitterTabs##info]]
>>
!tiddlytools
<<tiddler [[TwitterTabs##showUserResults]] with: tiddlytools>>
!jermolene
<<tiddler [[TwitterTabs##showUserResults]] with: jermolene>>
!TiddlyWiki
<<tiddler [[TwitterTabs##showUserResults]] with: TiddlyWiki>>
!kuraku
<<tiddler [[TwitterTabs##showUserResults]] with: kuraku>>
!end
- - - - - TWEETFORMAT SECTION - - - - -
reminder: %0=image, %1=name, %2=text, %3=timestamp
!tweetformat
@@font-size:9pt;display:block;line-height:110%;
~~[<img[%0]]''[[%1|http://twitter.com/%1]] //%3//:''~~
 %2 {{tagClear{
}}}@@
!end


- - - - - DO NOT EDIT BELOW THIS LINE - - - - -
!info
<<tiddler TwitterTabs##legal>>Usage
<<<
{{{
<<tiddler TwitterTabs>>
}}}
<<<
Configuration
<<<
Copy TwitterTabs into your document. Then, ''edit the tiddler to suit your preferences'' by adding/removing definitions from the ''tabset'' and related sections:<<tiddler TwitterTabs##showcode with: tabset>><<tiddler TwitterTabs##showcode with: tiddlytools>><<tiddler TwitterTabs##showcode with: jermolene>>You can also customize the appearance of the individual tweets by editing the ''tweetformat'' section, which uses //replacement markers// to insert values extracted from each tweet returned by Twitter's search results, where ''%0=user image, %1=user name, %2=tweet content,'' and ''%3=tweet timestamp''<<tiddler TwitterTabs##showcode with: tweetformat>>The most recently entered 'find... and 'from... search terms are automatically saved as TiddlyWiki cookie-based option values.  You can override these values by placing the following statements into a tiddler tagged with 'systemConfig'.  Each time you reload your document, the default inputs will be reset to these hard-coded values, rather than using the last value entered.
{{{
config.options["txtTweetSearch"]="search text";
config.options["txtTweetUser"]="username";
}}}
!showcode
<<tiddler TwitterTabs##out with: {{'!$1\n'+store.getTiddlerText('TwitterTabs##$1').replace(/\n\}\}\}/g,'\n}\}\}')}}>>
!out
{{{
$1
}}}
!end

!search
<<tiddler [[TwitterTabs##showSearchForm]] with: {{config.options.txtTweetSearch||'TiddlyWiki'}}>>
!user
<<tiddler [[TwitterTabs##showUserForm]] with: {{config.options.txtTweetUser||'TiddlyWiki'}}>>
!end

!showSearchForm
{{small smallform{
search for tweets containing: <<option {{config.options.txtTweetSearch='$1';'txtTweetSearch'}}>><html>
<nowiki><input type='button' value='search' onclick="
	var target=this.parentNode.parentNode.parentNode;
	var out='\<\<tiddler [[TwitterTabs##showSearchForm]] with: {{config.options.txtTweetSearch}}\>\>';
	removeChildren(target); wikify(out,target); return false;
"></html>@@display:block;white-space:normal;<<tiddler [[TwitterTabs##showSearchResults]]
	with: {{config.options.txtTweetSearch}}>>@@}}}
!end

!showUserForm
{{small smallform{
show tweets from: <<option {{config.options.txtTweetUser='$1';'txtTweetUser'}}>><html>
<nowiki><input type='button' value='search' onclick="
	var target=this.parentNode.parentNode.parentNode;
	var out='\<\<tiddler [[TwitterTabs##showUserForm]] with: {{config.options.txtTweetUser}}\>\>';
	removeChildren(target); wikify(out,target); return false;
"></html>@@display:block;white-space:normal;<<tiddler [[TwitterTabs##showUserResults]]
	with: {{config.options.txtTweetUser}}>>@@}}}
!end

!showSearchResults
<<tiddler TwitterTabs##callback>>{{toolbar{<html><a href='javascript:;' onclick="
	var target=this.parentNode.parentNode.parentNode;
	var out='<<tiddler [[TwitterTabs##showSearchResults]] with: [[$1]]>>';
	removeChildren(target); wikify(out,target); return false;
">refresh</a><nowiki></html>}}}~~__[[Recent tweets about: "$1"|http://search.twitter.com/search?q=$1]]__~~
<hr>@@display:block;height:20em;overflow:auto;<<tiddler {{
	window.twitterPlace=null;
'';}}>><<tiddler {{
	if (!window.twitterPlace) { window.twitterPlace=place;
		place.innerHTML='connecting to twitter.com...';
		var s=document.createElement("script");
		s.src="http://search.twitter.com/search.json?q=$1&rpp=25&callback=twitterCallback";
		document.body.appendChild(s);
		document.body.removeChild(s);
	}
'';}}>>@@@@display:block;text-align:right;^^scroll for more...^^@@
!end

!showUserResults
<<tiddler TwitterTabs##callback>>{{toolbar{<html><a href='javascript:;' onclick="
	var target=this.parentNode.parentNode.parentNode;
	var out='<<tiddler [[TwitterTabs##showUserResults]] with: [[$1]]>>';
	removeChildren(target); wikify(out,target); return false;
">refresh</a><nowiki></html>}}}~~__[[Recent tweets from $1|http://twitter.com/$1]]__~~
<hr>@@display:block;height:20em;overflow:auto;<<tiddler {{
	window.twitterPlace=null;
'';}}>><<tiddler {{
	if (!window.twitterPlace) { window.twitterPlace=place;
		place.innerHTML='connecting to twitter.com...';
		var s=document.createElement("script");
		s.src="http://twitter.com/statuses/user_timeline/$1.json?callback=twitterCallback";
		document.body.appendChild(s);
		document.body.removeChild(s);
	}
'';}}>>@@@@display:block;text-align:right;^^scroll for more...^^@@
!end

!callback
<<tiddler {{
window.twitterCallback=function(data){ // data object returned from twitter.com
	var fmt=store.getTiddlerText('TwitterTabs##tweetformat');
	if (data.results) data=data.results; // for SEARCH results
	removeChildren(window.twitterPlace);
	for (var i=0; i<data.length; i++) { var item=data[i];
		var img=item.user? item.user.profile_image_url : item.profile_image_url;
		var who=item.user? item.user.screen_name : item.from_user;
		wikify(fmt.format([img,who,item.text,item.created_at]),window.twitterPlace);
	}
}
'';}}>>
!end

%/<<tiddler {{tiddler&&tiddler.title=='TwitterTabs'?'HideTiddlerBackground':''}}>>/%
%/<<tiddler {{tiddler&&tiddler.title=='TwitterTabs'?'HideTiddlerTags':''}}>>/%
%/<<tiddler TwitterTabs##tabset>>
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 06/03/2015 12:29:19 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . | ok |
| 06/03/2015 12:30:03 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . | ok |
| 06/03/2015 12:46:30 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . | ok |
| 06/03/2015 12:50:13 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . |
| 06/03/2015 17:19:01 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . |
| 06/03/2015 17:48:45 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . |
| 06/03/2015 17:56:36 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . |
| 13/03/2015 11:24:32 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . | failed |
| 13/03/2015 11:24:56 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . | ok |
| 13/03/2015 11:25:24 | クラク | [[/|http://kuraku.tiddlyspot.com/]] | [[store.cgi|http://kuraku.tiddlyspot.com/store.cgi]] | . | [[index.html | http://kuraku.tiddlyspot.com/index.html]] | . |
/***
|''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");


//}}}

<!--{{{-->
<div class='toolbar' macro='toolbar fullscreen +editTiddler deleteTiddler permalink references newHere jump closeOthers refresh collapseTiddler -closeTiddler'></div>
<div class='tagglyTagged' macro='tags'></div>
<div><span class="title" macro="view title"></span><span class="miniTag" macro="miniTag"><span style="font-size: 0.8em; padding-left:1em;" macro="includeSiteLink"></span></span>
<!-- <span style="font-size:0.8em;" macro="showWhen tiddler.title.match(/^\d\d\d\d.\d\d.\d\d/)">
<span macro="toggleTag today . 'today'"></span></span> -->
<span style="padding-right:0.6em;" macro="showWhenTagged file"><span macro="uploadToFile"></span></span>
<span macro="showWhenTagged systemConfig" style="font-size:0.8em;" >
<span macro="toggleTag systemConfigDisable . 'disable'"></span>
</span></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date YYYY.0MM.0DD-0hh:0mm'></span> (created <span macro='view created date YYYY.0MM.0DD-0hh:0mm'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<div class="toolbar" macro="showWhen tiddler.title.match(/^\d\d\d\d.\d\d.\d\d/)">
  <span macro="navitiddler -1"></span> <span macro="navitiddler +1"></span>
</div>
<div class="viewer" style="text-align:right;padding-top:0.4em;font-size:0.9em;border-bottom:none;">
<!-- <span macro="hideWhen tiddler.title.match(/^(FrontPage|Whats new)$/)">
  <span macro="haloscan comments"></span>
  <span macro="haloscan trackbacks"></span>
</span> -->
</div>
<!--}}}-->
さいきんの日記 5件。
これは一覧です。--コメント/トラックバックボタンはタイトルをクリックした内容にあります。--

<<tiddlerList search:"^201\d.\d\d.\d\d" tiddlerList top:"5" itemTemplate:"!!≫【%item: %link】 ~~created: %created modified: %modified - %modifier~~\n~~(%tags)~~\n%text\n\n" dateFormat:"YYYY.0MM.0DD" order:"-created">>
WikiBar は編集時のにテキストエリア内で入力を補佐する機能群である。
導入ののち、編集モードにて(edit か tiddler のダブルクリック) 「wikibar」をクリックすると文字通り、WikiBar が現われる。

機能は以下のとおり、

*?: WikiBar について
*&infin;: プレビューの実行
*&mdash;: ダッシュの挿入
*&para;: リターンの挿入
*&sect;: 全て選択
*&times;: 選択部分を削除
*text: 選択テキストにフォーマットを適用
*paragraph: 段落にフォーマットを適用
*color: カラーの選択適用 ^^&dagger;^^
*link: Wikiリンクの適用
*more: table, HTML をタグを挿入
*addon: 追加されたアドオンを適用

^^&dagger;^^ [[ColorSilla Palettes|http://www.iosart.com/firefox/colorzilla/palettes.html]] よりカラーパレットを取得できる。

!!!addon 参考
[[WikiBar for TiddlyWiki 2.0.0 (beta 6) - a way to TiddlyWiki's formatting features|http://aiddlywiki.sourceforge.net/wikibar_demo_2.html]]
//{{{
config.macros.wikipediasearch = {};
config.macros.wikipediasearch.handler = function(place,macroName,params,wikifier,paramString,tiddler){
va