<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

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

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

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

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

----
Also see [[AdvancedOptions]]
<<importTiddlers>>
Index of all tiddlers
<<tiddlerList group:"tiddler.title.substr(0,1)" groupTemplate:"[ ''%group'' ]\n">>
/***
!Metadata:
|''Name:''|ArchivedTimeline|
|''Description:''|Timeline archived monthly.|
|''Version:''|0.7.0|
|''Date:''|Aug 25, 2007|
|''Source:''|http://sourceforge.net/project/showfiles.php?group_id=150646|
|''Author:''|BramChen (bram.chen (at) gmail (dot) com)|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.0.11|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|

!Syntax:
{{{<<timeline [modified|created [maxentries [dateFormate]]]>>}}}
!Examples:
{{{<<timeline>>}}}
{{{<<timeline created 10>>}}}
{{{<<timeline modified 10 "MMM DD, YYYY">>}}}

!Revision History:
|''Version''|''Date''|''Note''|
|0.7.0|Jul 25, 2006|Accept a date format parameter|
|0.6.3|Jan 14, 2007|Cleaned codes, Removed config.macros.timeline.slider and config.macros.timeline.onClickSlider|
|0.6.2|Dec 10, 2006|Add monthFormat to display month format for Chinese|
|0.6.1|Aug 12, 2006|A great effect on config.macros.timeline.slider for Firefox, thanks Bob McElrath|
|0.6.0|Jul 25, 2006|Runs compatibly with TW 2.1.0 (rev #403+)|
|0.5.2|Jun 21, 2006|Fixed bugs for dateFormat of TW 2.1|
|~|~|Change default dateFormat to "0DD MMM, YYYY"|
|0.5.1|Jun 04, 2006|Added config.macros.archivedTimeline.orderBy for localization|
|0.5.0|Apr 19, 2006|Fixed bug for twice records of the same date ()|
|~|~|Added Date.prototype.convertToLocalYYYYMMDDHHMM<<br>>in order to backward compatible with 2.0.6-|
|0.4.0|Apr 03, 2006|Added new parameter, {{{<<timeline [sortfield] [maxentries]>>}}}|
|~|~|Added config.options.txtTimelineMaxentries|
|0.3.1|Feb 04, 2006|JSLint checked|
|0.3.0|Feb 04, 2006|Fixed several missing variable declarations|
|0.2.0|Dec 26, 2005|changed for the new feature of Macro timeline of TW 2.0.0 beta 6|
|0.1.0|Nov 3, 2005|Initial release|

!Code section:
***/
//{{{
version.extensions.archivedTimeline = {major: 0, minor: 7, revision: 0,
	date: new Date("Aug 26, 2007"),
	name: "ArchivedTimeline",
	type: "Macro",
	author: "BramChen",
	source: "http://sourceforge.net/project/showfiles.php?group_id=150646"
};
config.options.txtTimelineMaxentries=0;
config.macros.archivedTimeline = {
	tooltips: "Archives sorted by  ",
	orderBy:{modified: "modified", created: "created"},
	monthFormat: "0DD MMM YYYY",
	dateFormat: "0DD MMM YYYY"
};
config.macros.timeline = config.macros.archivedTimeline;

config.macros.timeline.handler = function(place,macroName,params) {
	var field = params[0] ? params[0] : "modified";

	place.appendChild(document.createTextNode(this.tooltips + this.orderBy[field]));
	var tiddlers = store.reverseLookup("tags","excludeLists",false,field);
	var lastMonth = ""; var lastDay = ""; var theText = "----\n"; var i = 0;
	var last = (params[1])?params[1]:config.options.txtTimelineMaxentries;
		last = (isNaN(last)||last<1) ? 0:tiddlers.length-Math.min(tiddlers.length,parseInt(last));
	var dateFormat = params[2] ? params[2] : this.dateFormat;
	var cookie; var archives;
	for (var t=tiddlers.length-1; t>=last; t--) {
		var tiddler = tiddlers[t];
		var theMonth = tiddler[field].convertToLocalYYYYMMDDHHMM().substr(0,6);
		var theDay = tiddler[field].convertToLocalYYYYMMDDHHMM().substr(0,8);
		if(theMonth != lastMonth) {
			if (lastMonth === "") {
				lastMonth = theMonth;
				}
			else {
				place.appendChild(document.createElement('hr'));
				cookie = 'chktimeline'+(i++);
				archives = this.formatString(this.monthFormat, lastMonth);
				var panel = config.macros.slider.createSlider(place,cookie,archives,this.tooltips + archives);
				wikify(theText,panel);
				lastMonth = theMonth; theText = '----\n';
			}
		}
		if(theDay != lastDay){
			theText +=  tiddler[field].formatString(dateFormat) + '\n';
			lastDay = theDay; 
		}
		theText += '* [[' + tiddler.title + ']]\n';
	}
	place.appendChild(document.createElement('hr'));
	cookie = 'chktimeline'+(i++);
	archives = this.formatString(this.monthFormat, lastMonth);
	var panel = config.macros.slider.createSlider(place,cookie,archives,this.tooltips + archives);
	wikify(theText,panel);
	place.appendChild(document.createElement('hr'));
};

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/g,'');
	return dateString.formatString(template);
};
if (!Date.prototype.convertToLocalYYYYMMDDHHMM){
	Date.prototype.convertToLocalYYYYMMDDHHMM = function(){
		return(String.zeroPad(this.getFullYear(),4) + String.zeroPad(this.getMonth()+1,2) + String.zeroPad(this.getDate(),2) + String.zeroPad(this.getHours(),2) + String.zeroPad(this.getMinutes(),2));
	}
}
//}}}
ArchivedTimeline は timeline を月別にまとめて表示する。

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

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

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


個人的に月のタイトルがリストに紛れてしまうように見えるので最後の方で以下のように「▼」を追加して使用している。
{{{
 return dateString.formatString(template+" "+(document.all?"▼":"▾")); //kuraku upd
}}}
/***

!~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 TiddlerTweaker
config.tasks.tTweakerTask = {
	text: "TTweaker",
	tooltip: "TiddlerTweaker tool",
	content: "<<tiddlerTweaker>>"
}
config.backstageTasks.push("tTweakerTask");
/*}}}*/
<<showtoc>>
!Contents
<<tagging Programing_cs>>
!Link
!!初心者向け系
*http://jeanne.wankuma.com/tips/csharp/
*http://ufcpp.net/study/csharp/
*http://www.kisoplus.com/
*http://wisdom.sakura.ne.jp/programming/cs/index.html
*[[C#3.0入門|http://www.atmarkit.co.jp/fdotnet/csharp30/index/index.html]]
!!逆引き
*[[Formクラスについて|http://itpro.nikkeibp.co.jp/article/COLUMN/20060720/243910/]]
*[[DataGridViewについて|http://www.atmarkit.co.jp/fdotnet/vblab/gridlab_02/gridlab_02_03.html]]
*[[DataGridViewにコントロールを付加|http://codezine.jp/a/article/aid/3.aspx]]
*[[XMLを読む|http://support.microsoft.com/kb/301101/ja]]
*[[NumericUpDownクラス|http://itpro.nikkeibp.co.jp/article/COLUMN/20060731/244744/]]
!これってなに?
*[[C++0x@Wikipedia|http://ja.wikipedia.org/wiki/C++0x]]
!入門記事
*[[BoostでC++0xのライブラリ「TR1」を先取りしよう (1)|http://codezine.jp/a/article/aid/1937.aspx]]
*[[BoostでC++0xのライブラリ「TR1」を先取りしよう (2)|http://codezine.jp/a/article/aid/1967.aspx]]
*[[BoostでC++0xのライブラリ「TR1」を先取りしよう (3)|http://codezine.jp/a/article/aid/2134.aspx]]
*[[BoostでC++0xのライブラリ「TR1」を先取りしよう (4)|http://codezine.jp/a/article/aid/2158.aspx]]
*[[BoostでC++0xのライブラリ「TR1」を先取りしよう (5)|http://codezine.jp/a/article/aid/2171.aspx]]
!!cz.2ch
*[[cz.2ch public server]]
*[[cs:cz wiki|http://wikiwiki.jp/cs2ch/]]
*[[cz.2ch(steam)|http://steamcommunity.com/groups/cscz2ch]]
*[[2chのcz本スレ|http://schiphol.2ch.net/test/read.cgi/gamef/1205841531/l50]]
!!Files
*[[Map pack Download|http://cid-ead58fb6bcd6d8ef.skydrive.live.com/browse.aspx/cz2ch_file]]
*[[CSDM@CZ|http://cid-ead58fb6bcd6d8ef.skydrive.live.com/browse.aspx/cscz?uc=1]]
!!HLDS関連
*[[Counter-Server - The Official Counter-Strike Server Admin Resource|http://server.counter-strike.net/index.php]]
*[[Neon cs index|http://halflife.luina.net/]]
*[[HLDS関連ソーシャルブックマークなど|http://rane.plus.buzzurl.jp/tag/hlds]]
*[[Team NikuQ server HP|http://www.nikuq.jp/server/]]
!!Other Link
*[[negitaku.org|http://www.negitaku.org/]]
*[[cs1.6 wiki|http://wind.s280.xrea.com/wikiplus/cs/index.php?Counter%20Strike%201.6]]
*[[cs school|http://www.na.rim.or.jp/%7Ework/cs/]]
*[[cz日本鯖検索|http://www.game-monitor.com/search.php?game=czero&location=JP]]
/%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 |
}}}}}}
/***
!Information
*Source: http://genisis329.googlepages.com/TWMath.html#CodeFormatter
**上記をC++向けに改造しました
*Usage: [[CodeFormatterPluginTipsCPP]]
!Code
***/
/*{{{*/
config.formatters.push(
{
keywords : {
	"class":"blue",	"public":"blue",	"protected":"blue",	"private":"blue",
	"const":"blue",	"static":"blue",	"extern":"blue",
	"long":"blue",	"short":"blue",	"int":"blue",	"char":"blue",	"void":"blue",
	"bool":"blue",
	"try":"blue",	"catch":"blue",
	"if":"blue",	"else":"blue",
	"for":"blue",	"do":"blue",	"while":"blue",
	"switch":"blue",	"case":"blue",	"default:":"blue",	"break":"blue",
	"#pragma":"blue",	"#include":"blue",	"#define":"blue",
	"#ifndef":"blue",	"#ifdef":"blue",	"#endif":"blue",
	"using":"blue",	"namespace":"blue",
	"return":"blue",
	"{":"brown",	"}":"brown",
	"(":"brown",	")":"brown",
	"+":"red",
	"-":"red",
	"*":"red",
	"/":"red",
	"%":"red",
	"^":"red",
	"&":"red",
	"|":"red",
	"!":"red",
	"~":"red",
	"=":"red",
	"<":"red",
	">":"red",
	"false":"DarkBlue",
	"true":"DarkBlue",
	"window":"DarkBlue",
	"document":"DarkBlue",
	"alert":"IndianRed",
	"eval":"IndianRed",
	"setInterval":"IndianRed",
	"setTimeout":"IndianRed",
	"toString":"IndianRed",
	"write":"IndianRed"
},
	match: "<[Cc][+][+]>\\n",
	lookahead: "<[Cc][+][+]>\\n((?:.|\\n)*?)\\n</[Cc][+][+]>",
	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 e = createTiddlyElement(w.output,"pre");
			var str = lookaheadMatch[1];
var Reg = /(\/\/.*?$)|(\/\*(.|\n)*?\*\/)|[&#39;]{2}|(&#39;.*?[^\\]&#39;)|["]{2}|(".*?[^\\]")|\w+|[\s\n]+|./mg;
var parts = str.match(Reg);
for(var i = 0; i < parts.length; i++){
if(parts[i].match(/^[\s\n]/))parts[i] = parts[i].replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\n/g,"<br/>").replace(/\r/g,"");
else if(parts[i].match(/^(?:\/\/)|(?:\/\*)/))parts[i] = "<span style=\"color:green;\">"+parts[i].htmlEncode().replace(/\\n/g,"&lt;br/&gt;")+"</span>";
else if(parts[i].charAt(0)=="\""||parts[i].charAt(0)=="&#39;")parts[i] = "<span style=\"color:teal;\">"+parts[i].htmlEncode()+"</span>";
else if(this.keywords[parts[i]])parts[i] = "<span style=\"color:"+this.keywords[parts[i]]+";\">"+parts[i].htmlEncode()+"</span>";
}
e.innerHTML = parts.join("");
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
			}
	}
}
);
/*}}}*/
/***
!Information
*Source: http://genisis329.googlepages.com/TWMath.html#CodeFormatter
**上記をHLDS向けに改造しました
*Usage: [[CodeFormatterPluginTipsHLDS]]
!Code
***/
/*{{{*/
config.formatters.push(
{
keywords : {
//その他・オレンジ
	"echo":"orange",
//設定絡みは青
	"log":"blue",
	"hostname":"blue",
	"sv_password":"blue",
	"sv_downloadurl":"blue",
	"sv_allowdownload":"blue",
	"sv_lan":"blue",
	"mp_friendlyfire":"blue",
	"mp_friendly_grenade_damage":"blue",
	"mp_tkpunish 0":"blue",
	"mp_autokick":"blue",
	"mp_limitteams":"blue",
	"mp_autoteambalance":"blue",
	"mp_forcechasecam":"blue",
	"mp_startmoney":"blue",
	"mp_playerid":"blue",
	"mp_mapvoteratio":"blue",
	"pausable":"blue",
	"sv_maxspeed":"blue",
	"mp_flashlight":"blue",
	"mp_maxrounds":"blue",
	"mp_forcechasecam":"blue",
	"allow_spectators":"blue",
	"decalfrequency":"blue",
	"sv_aim":"blue",
	"sv_cheats":"blue",
	"sv_gravity":"blue",
	"sv_timeout":"blue",
	"mp_winlimit":"blue",
	"fps_max":"blue",
	"sv_region":"blue",
	"sv_airaccelerate":"blue",
	"sv_airmove":"blue",
	"mp_forcecamera":"blue",
	"mp_roundtime":"blue",
	"mp_ctimer":"blue",
	"mp_freezetime":"blue",
	"sv_maxrate":"blue",
	"sv_minrate":"blue",
	"sv_voiceenable":"blue",
	"sv_alltalk":"blue",
	"sv_voicecodec":"blue",
	"sv_voicequality":"blue",
	"mapchangecfgfile":"blue",
	"mp_chattime":"blue",
	"pausable":"blue",
	"sv_clienttrace":"blue",
	"edgefriction":"blue",
	"host_framerate":"blue",
	"mp_autocrosshair":"blue",
	"mp_consistency":"blue",
	"mp_fadetoblack":"blue",
	"mp_falldamage":"blue",
	"sv_maxunlag":"blue",
	"sv_maxupdaterate":"blue",
	"sys_ticrate":"blue",
	"sv_proxies":"blue",
	"exec":"blue",
//設定値関連はbrown
	"voice_speex":"brown",
	"easy":"brown",
	"normal":"brown",
	"hard":"brown",
	"expert":"brown",
	"on":"brown",
	"off":"brown",
//bot系はred
	"bot_quota":"red",
	"bot_kick":"red",
	"bot_kick":"red",
	"bot_chatter":"red",
	"bot_defer_to_human":"red",
	"bot_difficulty":"red",
	"bot_join_after_player":"red",
	"bot_prefix":"red",
	"bot_all_weapons":"red",
	"bot_allow_shield":"red",
	"bot_allow_grenades":"red",
	"bot_allow_machine_guns":"red",
	"bot_allow_pistols":"red",
	"bot_allow_rifles":"red",
	"bot_allow_shotguns":"red",
	"bot_allow_snipers":"red",
	"bot_allow_sub_machine_guns":"red",
	"bot_auto_follow":"red",
	"bot_eco_limit":"red",
	"bot_allow_rogues":"red",
	"bot_quota_mode":"red",
	"bot_auto_vacate":"red"
},
	match: "<[Hh][Ll][Dd][Ss]>\\n",
	lookahead: "<[Hh][Ll][Dd][Ss]>\\n((?:.|\\n)*?)\\n</[Hh][Ll][Dd][Ss]>",
	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 e = createTiddlyElement(w.output,"pre");
			var str = lookaheadMatch[1];
var Reg = /(\/\/.*?$)|(\/\*(.|\n)*?\*\/)|[&#39;]{2}|(&#39;.*?[^\\]&#39;)|["]{2}|(".*?[^\\]")|\w+|[\s\n]+|./mg;
var parts = str.match(Reg);
for(var i = 0; i < parts.length; i++){
if(parts[i].match(/^[\s\n]/))parts[i] = parts[i].replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\n/g,"<br/>").replace(/\r/g,"");
else if(parts[i].match(/^(?:\/\/)|(?:\/\*)/))parts[i] = "<span style=\"color:green;\">"+parts[i].htmlEncode().replace(/\\n/g,"&lt;br/&gt;")+"</span>";
else if(parts[i].charAt(0)=="\""||parts[i].charAt(0)=="&#39;")parts[i] = "<span style=\"color:teal;\">"+parts[i].htmlEncode()+"</span>";
else if(this.keywords[parts[i]])parts[i] = "<span style=\"color:"+this.keywords[parts[i]]+";\">"+parts[i].htmlEncode()+"</span>";
}
e.innerHTML = parts.join("");
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
			}
	}
}
);
/*}}}*/
Also use the new code formatter if you like.
{{{
<C++>
void main(void){
int a = 1;
printf("hello world!");
return;
}
</C++>
}}}
<C++>
void main(void){
int a = 1;
printf("hello world!");
return;
}
</C++>
Also use the new code formatter if you like.
{{{
<HLDS>
echo "server setting loading..."
bot_kick
sv_downloadurl "http://hogehoge.com/"
exec server.cfg
</HLDS>
}}}
<HLDS>
echo "server setting loading..."
bot_kick
sv_downloadurl "http://hogehoge.com/"
exec server.cfg
</HLDS>
Background: #fff
Foreground: #000
PrimaryPale: #4169E1
PrimaryLight: #B0C4DE
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/***
|Name|CoreTweaks|
|Source|http://www.TiddlyTools.com/#CoreTweaks|
|Version|use with TW2.4.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.2.0|
|Type|plugin|
|Requires||
|Overrides|various|
|Description|a small collection of overrides to TW core functions|
This tiddler contains changes TW core functions to provide minor changes in standard features or behavior.  It is hoped that some of these tweaks may someday be added into the TW core, so that these adjustments will be available without needing these add-on definitions.
>''Note: the changes contained in this tiddler are generally applicable for version 2.4.3 of TiddlyWiki.''
>Please view [[CoreTweaksArchive]] for tweaks that may be used with earlier versions of TiddlyWiki.
***/
//{{{
// calculate TW version number - used to determine which tweaks should be applied
var ver=version.major+version.minor/10+version.revision/100;
//}}}
/***
----

***/
// // open tickets:
// // {{block{
/***
!!!831 backslash-quoting for embedding newlines in 'line-mode' formats
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/831 - OPEN
This tweak pre-processes source content to convert 'double-backslash-newline' into {{{<br>}}} before wikify(), so that literal newlines can be embedded in line-mode wiki syntax (e.g., tables, bullets, etc.)
***/
//{{{
window.coreWikify = wikify;
window.wikify = function(source,output,highlightRegExp,tiddler)
{
	if (source) arguments[0]=source.replace(/\\\\\n/mg,'<br>');
	coreWikify.apply(this,arguments);
}
//}}}
// // }}}}}}// // {{block{
/***
!!!829 """<<tag>>""" macro - sortby parameter
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/829 - OPEN
This tweak adds an optional 'sortby' parameter to the """<<tag tagname label tip sortby>>""" macro, as well as the """<<allTags excludeTag sortby>>""" macro used to generate the sidebar contents 'tags' list.  Specify the field on which the contents of each tag popup is to be sorted, with a '+' or '-' prefix to indicate ascending/descending order, respectively.

Example: """<<tag systemConfig "plugins" "list plugins by date, most recent first" "-modified">>"""
Try it: <<tag systemConfig "plugins" "list plugins by date, most recent first" "-modified">>

Similarly, to change the sort order used by the popups from all tags shown in the sidebar contents, edit the [[TagTags]] shadow tiddler and enter: """<<allTags excludeLists -modified>>"""
***/
//{{{
// hijack tag handler() to add 'sortby' attribute to tag button
config.macros.tag.CoreTweaksSortTags_handler=config.macros.tag.handler;
config.macros.tag.handler = function(place,macroName,params)
{
	this.CoreTweaksSortTags_handler.apply(this,arguments);
	var btn=place.lastChild;
	if (params[3]) btn.setAttribute('sortby',params[3]);
}

// tweak <<allTags>> macro to add 'sortby' attribute to each tag button
var fn=config.macros.allTags.handler;
var lines=fn.toString().split('\n');
lines.splice(lines.length-2,0,['if(params[1]) btn.setAttribute("sortby",params[1]);']);
fn=lines.join('\n');
eval('config.macros.allTags.handler='+fn);

// tweak tag event handler to:
// * use tag filtering (only if '[' is present in tag value)
// * use optional 'sortby' attribute
// * save 'sortby' value in 'open all' command (for displaying tiddlers in sorted order)
var fn=onClickTag;
fn=fn.toString().replace(
	/store.getTaggedTiddlers\(tag\);/g,
	'(tag.indexOf("[")==-1?store.getTaggedTiddlers(tag):store.filterTiddlers(tag));'
	+'var sortby=this.getAttribute("sortby");'
	+'if(sortby&&sortby.length) store.sortTiddlers(tagged,sortby);'
);
fn=fn.toString().replace(
	/openAll.setAttribute\("tag",\s*tag\);/g,
	'openAll.setAttribute("tag",tag); openAll.setAttribute("sortby",sortby);'
);
eval(fn);

// tweak 'open all' event handler to use 'sortby' attribute
var fn=onClickTagOpenAll;
fn=fn.toString().replace(
	/story.displayTiddlers\(this,\s*tiddlers\);/g,
	'var sortby=this.getAttribute("sortby");'
	+'if(sortby&&sortby.length) store.sortTiddlers(tiddlers,sortby);'
	+'story.displayTiddlers(this,tiddlers);'
);
eval(fn);
//}}}
// // }}}}}}// // {{block{
/***
!!!824 ~WindowTitle - alternative to combined ~SiteTitle/~SiteSubtitle in window titlebar
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/824 - OPEN
This tweak allows definition of an optional [[WindowTitle]] tiddler that, when present, provides alternative text for display in the browser window's titlebar, instead of using the combined text content from [[SiteTitle]] and [[SiteSubtitle]] (which will still be displayed as usual in the TiddlyWiki document header area).

Note: this ticket replaces http://trac.tiddlywiki.org/ticket/401 (closed), which proposed using a custom [[PageTitle]] tiddler for this purpose.  ''If you were using the previous '401 ~PageTitle' tweak, you will need to rename [[PageTitle]] to [[WindowTitle]] to continue to use your custom window title text''
***/
//{{{
config.shadowTiddlers.WindowTitle='<<tiddler SiteTitle>> - <<tiddler SiteSubtitle>>';
window.getPageTitle=function() { return wikifyPlain('WindowTitle'); }
store.addNotification('WindowTitle',refreshPageTitle); // so title stays in sync with tiddler changes
//}}}
// // }}}}}}// // {{block{
/***
!!!784 allow tiddler sections in TiddlyLinks to be used as anchor points for intra-tiddler scrolling.  
>http://trac.tiddlywiki.org/ticket/784 - OPEN - Please see separate [[SectionLinksPlugin]]
!!!683 FireFox3 Import bug: 'browse' button replacement
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/683 - OPEN
The web standard 'type=file' input control that has been used as a local path/file picker for TiddlyWiki no longer works as expected in FireFox3, which has, for security reasons, limited javascript access to this control so that *no* local filesystem path information can be revealed, even when it is intentional and necessary, as it is with TiddlyWiki.  This tweak provides alternative HTML source that patches the backstage import panel.  It replaces the 'type=file' input control with a text+button combination of controls that invokes a system-native secure 'file-chooser' dialog box to provide TiddlyWiki with access to a complete path+filename so that TW functions properly locate user-selected local files.
>Note: ''This tweak also requires http://trac.tiddlywiki.org/ticket/604 - cross-platform askForFilename()''
***/
//{{{
if (window.Components) {
	var fixhtml='<input name="txtBrowse" style="width:30em"><input type="button" value="..."'
		+' onClick="window.browseForFilename(this.previousSibling,true)">';
	var cmi=config.macros.importTiddlers;
	cmi.step1Html=cmi.step1Html.replace(/<input type='file' size=50 name='txtBrowse'>/,fixhtml);
}

merge(config.messages,{selectFile:'Please enter or select a file'}); // ready for I18N translation

window.browseForFilename=function(target,mustExist) { // note: both params are optional
	var msg=config.messages.selectFile;
	if (target && target.title) msg=target.title; // use target field tooltip (if any) as dialog prompt text
	// get local path for current document
	var path=getLocalPath(document.location.href);
	var p=path.lastIndexOf('/'); if (p==-1) p=path.lastIndexOf('\\'); // Unix or Windows
	if (p!=-1) path=path.substr(0,p+1); // remove filename, leave trailing slash
	var file=''
	var result=window.askForFilename(msg,path,file,mustExist); // requires #604
	if (target && result.length) // set target field and trigger handling
		{ target.value=result; target.onchange(); }
	return result; 
}
//}}}
// // }}}}}}// // {{block{
/***
!!!604 cross-platform askForFilename()
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/604 - OPEN
invokes a system-native secure 'file-chooser' dialog box to provide TiddlyWiki with access to a complete path+filename so that TW functions properly locate user-selected local files.
***/
//{{{
window.askForFilename=function(msg,path,file,mustExist) {
	var r = window.mozAskForFilename(msg,path,file,mustExist);
	if(r===null || r===false)
		r = window.ieAskForFilename(msg,path,file,mustExist);
	if(r===null || r===false)
		r = window.javaAskForFilename(msg,path,file,mustExist);
	if(r===null || r===false)
		r = prompt(msg,path+file);
	return r||'';
}

window.mozAskForFilename=function(msg,path,file,mustExist) {
	if(!window.Components) return false;
	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, mustExist?nsIFilePicker.modeOpen:nsIFilePicker.modeSave);
		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(ex) { displayMessage(ex.toString()); }
	return result;
}

window.ieAskForFilename=function(msg,path,file,mustExist) {
	if(!config.browser.isIE) return false;
	try {
		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;
		return s.showOpen()?s.FileName:'';
	}
	catch(ex) { displayMessage(ex.toString()); }
	return result;
}

window.javaAskForFilename=function(msg,path,file,mustExist) {
	if(!document.applets['TiddlySaver']) return false;
	// TBD: implement java-based askFile(...) function
	try { return document.applets['TiddlySaver'].askFile(msg,path,file,mustExist); } 
	catch(ex) { displayMessage(ex.toString()); }
}
//}}}
// // }}}}}}// // {{block{
/***
!!!657 wrap tabs onto multiple lines
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/657 - OPEN
This tweak inserts an extra space element following each tab, allowing them to wrap onto multiple lines if needed.
***/
//{{{
config.macros.tabs.handler = function(place,macroName,params)
{
	var cookie = params[0];
	var numTabs = (params.length-1)/3;
	var wrapper = createTiddlyElement(null,'div',null,'tabsetWrapper ' + cookie);
	var tabset = createTiddlyElement(wrapper,'div',null,'tabset');
	tabset.setAttribute('cookie',cookie);
	var validTab = false;
	for(var t=0; t<numTabs; t++) {
		var label = params[t*3+1];
		var prompt = params[t*3+2];
		var content = params[t*3+3];
		var tab = createTiddlyButton(tabset,label,prompt,this.onClickTab,'tab tabUnselected');
		createTiddlyElement(tab,'span',null,null,' ',{style:'font-size:0pt;line-height:0px'}); // ELS
		tab.setAttribute('tab',label);
		tab.setAttribute('content',content);
		tab.title = prompt;
		if(config.options[cookie] == label)
			validTab = true;
	}
	if(!validTab)
		config.options[cookie] = params[1];
	place.appendChild(wrapper);
	this.switchTab(tabset,config.options[cookie]);
};
//}}}
// // }}}}}}// // {{block{
/***
!!!628 hide 'no such macro' errors
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/628 - OPEN
When invoking a macro that is not defined, this tweak prevents the display of the 'error in macro... no such macro' message.  This is useful when rendering tiddler content or templates that reference macros that are defined by //optional// plugins that have not been installed in the current document.

<<option chkHideMissingMacros>> hide 'no such macro' error messages
***/
//{{{
if (config.options.chkHideMissingMacros===undefined)
	config.options.chkHideMissingMacros=false;

window.coreTweaks_missingMacro_invokeMacro = window.invokeMacro;
window.invokeMacro = function(place,macro,params,wikifier,tiddler) {
	if (!config.macros[macro] || !config.macros[macro].handler)
		if (config.options.chkHideMissingMacros) return;
	window.coreTweaks_missingMacro_invokeMacro.apply(this,arguments);
}
//}}}
// // }}}}}}// // {{block{
/***
!!!608/609/610 toolbars - toggles, separators and transclusion
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/608 - OPEN (more/less toggle)
http://trac.tiddlywiki.org/ticket/609 - OPEN (separators)
http://trac.tiddlywiki.org/ticket/610 - OPEN (wikify tiddler/slice/section content)

This combination tweak extends the """<<toolbar>>""" macro to add use of '<' to insert a 'less' menu command (the opposite of '>' == 'more'), as well as use of '*' to insert linebreaks and "!" to insert a vertical line separator between toolbar items.  In addition, this tweak add the ability to use references to tiddlernames, slices, or sections and render their content inline within the toolbar, allowing easy creation of new toolbar commands using TW content (such as macros, links, inline scripts, etc.)

To produce a one-line style, with "less" at the end, use
| ViewToolbar| foo bar baz > yabba dabba doo < |
resulting in:
{{{
foo bar baz more
   and
foo bar baz yabba dabba doo less
}}}
or to use the CoreTweaks? two-line style:
| ViewToolbar| foo bar baz > < * yabba dabba doo |
which would produce:
{{{
foo bar baz more
   and
foo bar baz less
yabba dabba doo
}}}
''see [[ToolbarCommands]] for examples of how these features can be used''
***/
//{{{
merge(config.macros.toolbar,{
	moreLabel: 'more\u25BC',
	morePrompt: 'Show additional commands',
	lessLabel: '\u25C4less',
	lessPrompt: 'Hide additional commands',
	separator: '|'
});
config.macros.toolbar.onClickMore = function(ev) {
	var e = this.nextSibling;
	e.style.display = 'inline'; // show menu
	this.style.display = 'none'; // hide button
	return false;
};
config.macros.toolbar.onClickLess = function(ev) {
	var e = this.parentNode;
	var m = e.previousSibling;
	e.style.display = 'none'; // hide menu
	m.style.display = 'inline'; // show button
	return false;
};
config.macros.toolbar.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	for(var t=0; t<params.length; t++) {
		var c = params[t];
		switch(c) {
			case '!':  // ELS - SEPARATOR (added)
				createTiddlyText(place,this.separator);
				break;
			case '*':  // ELS - LINEBREAK (added)
				createTiddlyElement(place,'BR');
				break;
			case '<': // ELS - LESS COMMAND (added)
				var btn = createTiddlyButton(place,
					this.lessLabel,this.lessPrompt,config.macros.toolbar.onClickLess,'moreCommand');
				break;
			case '>':
				var btn = createTiddlyButton(place,
					this.moreLabel,this.morePrompt,config.macros.toolbar.onClickMore,'moreCommand');
				var e = createTiddlyElement(place,'span',null,'moreCommand');
				e.style.display = 'none';
				place = e;
				break;
			default:
				var theClass = '';
				switch(c.substr(0,1)) {
					case '+':
						theClass = 'defaultCommand';
						c = c.substr(1);
						break;
					case '-':
						theClass = 'cancelCommand';
						c = c.substr(1);
						break;
				}
				if(c in config.commands)

					this.createCommand(place,c,tiddler,theClass);
				else { // ELS - WIKIFY TIDDLER/SLICE/SECTION (added)
					if (c.substr(0,1)=='~') c=c.substr(1); // ignore leading ~
					var txt=store.getTiddlerText(c);
					if (txt) {
						// trim any leading/trailing newlines
						txt=txt.replace(/^\n*/,'').replace(/\n*$/,'');
						// trim PRE format wrapper if any
						txt=txt.replace(/^\{\{\{\n/,'').replace(/\n\}\}\}$/,'');
						// render content into toolbar
						wikify(txt,createTiddlyElement(place,'span'),null,tiddler);
					}
				} // ELS - end WIKIFY CONTENT
				break;
		}
	}
};
//}}}
// // }}}}}}// // {{block{
/***
!!!529 IE fixup - case-sensitive element lookup of tiddler elements
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/529 - OPEN
This tweak hijacks the standard browser function, document.getElementById(), to work-around the case-INsensitivity error in Internet Explorer (all versions up to and including IE7) //''Note: This tweak is only applied when using IE, and only for lookups of rendered tiddler elements within the containing 'tiddlerDisplay' element.''//
***/
//{{{
if (config.browser.isIE) {
document.coreTweaks_coreGetElementById=document.getElementById;
document.getElementById=function(id) {
	var e=document.coreTweaks_coreGetElementById(id);
	if (!e || !e.parentNode || e.parentNode.id!='tiddlerDisplay') return e;
	for (var i=0; i<e.parentNode.childNodes.length; i++)
		if (id==e.parentNode.childNodes[i].id) return e.parentNode.childNodes[i];
	return null;
};
}
//}}}
// // }}}}}}// // {{block{
/***
!!!471 'creator' field for new tiddlers
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/471 - OPEN
This tweak HIJACKS the core's saveTiddler() function to automatically add a 'creator' field to a tiddler when it is FIRST created. You can use """<<view creator>>""" (or """<<view creator wikified>>""" if you prefer) to show this value embedded directly within the tiddler content, or {{{<span macro="view creator"></span>}}} in the ViewTemplate and/or EditTemplate to display the creator value in each tiddler.  
***/
//{{{
// hijack saveTiddler()
TiddlyWiki.prototype.CoreTweaks_creatorSaveTiddler=TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler=function(title,newTitle,newBody,modifier,modified,tags,fields)
{
	var existing=store.tiddlerExists(title);
	var tiddler=this.CoreTweaks_creatorSaveTiddler.apply(this,arguments);
	if (!existing) store.setValue(title,'creator',config.options.txtUserName);
	return tiddler;
}
//}}}
// // }}}}}}
// // closed: won't fix //(leave as core tweaks)//
// // {{block{
/***
!!!637 TiddlyLink tooltip - custom formatting
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/637 - CLOSED: WON'T FIX
This tweak modifies the tooltip format that appears when you mouseover a link to a tiddler.  It adds an option to control the date format, as well as displaying the size of the tiddler (in bytes)

Tiddler link tooltip format:
{{stretch{<<option txtTiddlerLinkTootip>>}}}
^^where: %0=title, %1=username, %2=modification date, %3=size in bytes, %4=description slice^^
Tiddler link tooltip date format:
{{stretch{<<option txtTiddlerLinkTooltipDate>>}}}
***/
//{{{
config.messages.tiddlerLinkTooltip='%0 - %1, %2 (%3 bytes) - %4';
config.messages.tiddlerLinkTooltipDate='DDD, MMM DDth YYYY 0hh12:0mm AM';

config.options.txtTiddlerLinkTootip=
	config.options.txtTiddlerLinkTootip||config.messages.tiddlerLinkTooltip;
config.options.txtTiddlerLinkTooltipDate=
	config.options.txtTiddlerLinkTooltipDate||config.messages.tiddlerLinkTooltipDate;

Tiddler.prototype.getSubtitle = function() {
	var modifier = this.modifier;
	if(!modifier) modifier = config.messages.subtitleUnknown;
	var modified = this.modified;
	if(modified) modified = modified.formatString(config.options.txtTiddlerLinkTooltipDate);
	else modified = config.messages.subtitleUnknown;
	var descr=store.getTiddlerSlice(this.title,'Description')||'';
	return config.options.txtTiddlerLinkTootip.format([this.title,modifier,modified,this.text.length,descr]);
};
//}}}
// // }}}}}}// // {{block{
/***
!!!607 add HREF link on permaview command
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/607 - CLOSED: WON'T FIX
This tweak automatically sets the HREF for the 'permaview' sidebar command link so you can use the 'right click' context menu for faster, easier bookmarking.  Note that this does ''not'' automatically set the permaview in the browser's current location URL... it just sets the HREF on the command link.  You still have to click the link to apply the permaview.
***/
//{{{
config.macros.permaview.handler = function(place)
{
	var btn=createTiddlyButton(place,this.label,this.prompt,this.onClick);
	addEvent(btn,'mouseover',this.setHREF);
	addEvent(btn,'focus',this.setHREF);
};
config.macros.permaview.setHREF = function(event){
	var links = [];
	story.forEachTiddler(function(title,element) {
		links.push(String.encodeTiddlyLink(title));
	});
	var newURL=document.location.href;
	var hashPos=newURL.indexOf('#');
	if (hashPos!=-1) newURL=newURL.substr(0,hashPos);
	this.href=newURL+'#'+encodeURIComponent(links.join(' '));
}
//}}}
// // }}}}}}// // {{block{
/***
!!!458 add permalink-like HREFs on internal TiddlyLinks
***/
// // {{groupbox small{
/***
http://trac.tiddlywiki.org/ticket/458 - CLOSED: WON'T FIX
This tweak assigns a permalink-like HREF to internal Tiddler links (which normally do not have any HREF defined).  This permits the link's context menu (right-click) to include 'open link in another window/tab' command.  Based on a request from Dustin Spicuzza.
***/
//{{{
window.coreTweaks_createTiddlyLink=window.createTiddlyLink;
window.createTiddlyLink=function(place,title,includeText,theClass,isStatic,linkedFromTiddler,noToggle)
{
	// create the core button, then add the HREF (to internal links only)
	var link=window.coreTweaks_createTiddlyLink.apply(this,arguments);
	if (!isStatic)
		link.href=document.location.href.split('#')[0]+'#'+encodeURIComponent(String.encodeTiddlyLink(title));
	return link;
}
//}}}
// // }}}}}}
// // <<foldHeadings>>
/***
|''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|DcTableOfContentsPlugin|
|Created by|Doug Compton|
|Source|http://www.zagware.com/tw/plugins.html#DcTableOfContentsPlugin|
|Version|0.3.0 - 4/12/2006|
!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
To modifiy the appearance, you can use CSS similiar to the below.
//{{{
.dcTOC ul {
	color: red;
	list-style-type: lower-roman;
}
.dcTOC a {
	color: green;
	border: none;
}

.dcTOC a:hover {
	background: white;
	border: solid 1px;
}
.dcTOCTop {
	font-size: 2em;
	color: green;
}
//}}}

!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.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 krk
setStylesheet(".dcTOC ul{color: red;list-style-type: lower-roman;}.dcTOC a{color: green !important;border: none;}","dcTOCStyles");
//}}}
[[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");

}
//}}}
<<tagging Prog_D>>
*ニコニコ:[[D言語検索|http://www.nicovideo.jp/tag/%EF%BC%A4%E8%A8%80%E8%AA%9E]]
*ニコニコ:D言語BOF
<<smviewer mylist 5343982>>
/***
|''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|[[DragScrollPlugin]]|
|Source|http://www.TiddlyTools.com/#DragScrollPlugin|
|Documentation|http://www.TiddlyTools.com/#DragScrollPlugin|
|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|plugin|
|Requires||
|Overrides||
|Description|use SHIFT-DRAG to scroll the browser window|
DragScrollPlugin allows you to use your mouse to scroll the browser window by grabbing anywhere on the background of the document while holding the SHIFT key.
!!!!!Documentation
<<<
Whenever your page contains extra-wide content that does not 'wrap' onto extra lines, in can result in both horizontal and vertical scrollbars.  Unfortunately, using each scrollbar separately to navigate across the page can become very tedious and makes it more difficult to interact with your content in a flexible and effective manner.

''Drag-scrolling allows you to move in both the horizontal and vertical direction at the same time, simply by holding SHIFT while clicking and dragging the mouse across the page.''
<<<
!!!!!Configuration
<<<
<<option chkDragScroll>> enable //drag-scrolling//
<<<
!!!!!Revisions
<<<
2008.12.01 [1.0.0] Initial public release
<<<
!!!!!Code
***/
//{{{
version.extensions.DragScrollPlugin= {major: 1, minor: 0, revision: 0, date: new Date(2008,12,01)};

if (!config.dragscroll) { // only once
	config.dragscroll={
		// use to end event handling for processed events
		processed: function(ev) {
			var ev=ev||window.event;
			if (ev) { ev.cancelBubble=true; if (ev.stopPropagation) ev.stopPropagation(); }
			return false;
		},
		// MOUSE DOWN - SET CURSOR, SAVE SCROLL DATA
		savedMouseDown: document.onmousedown,
		mousedown: function(ev) {
			var ev=ev||window.event; var target=resolveTarget(ev); var d=config.dragscroll;
			var scroll=ev.shiftKey&&config.options.chkDragScroll;
			var skip=['input','option','textarea'].contains(target.nodeName.toLowerCase());
			if (!scroll||skip) { // handle event normally
				if (d.savedMouseDown!=undefined) return d.savedMouseDown.apply(target,arguments);
				else return;
			}
			d.mX=!config.browser.isIE?ev.pageX:ev.clientX; d.sX=findScrollX();
			d.mY=!config.browser.isIE?ev.pageY:ev.clientY; d.sY=findScrollY();
			d.scrolling=true; document.body.style.cursor='move';
			return config.dragscroll.processed(ev);
		},
		// MOUSE MOVE - UPDATE SCROLL DATA AND SCROLL THE WINDOW 
		savedMouseMove: document.onmousemove,
		mousemove: function(ev) {
			var ev=ev||window.event; var target=resolveTarget(ev); var d=config.dragscroll;
			if (!d.scrolling || !ev.shiftKey) { // NOT SCROLLING
				if (d.savedMouseMove!=undefined) return d.savedMouseMove.apply(target,arguments);
				else return;
			}
			// set scroll pos based on diff between new and old (x,y)
			var mx=!config.browser.isIE?ev.pageX:ev.clientX;
			var my=!config.browser.isIE?ev.pageY:ev.clientY;
			var sx=!config.browser.isIE?findScrollX():d.sX;
			var sy=!config.browser.isIE?findScrollY():d.sY;
			window.scrollTo(sx-mx+d.mX,sy-my+d.mY);
			return config.dragscroll.processed(ev);
		},
		// MOUSEUP - CLEAR THE DRAG DATA, RESET THE CURSOR
		savedMouseUp: document.onmouseup,
		mouseup: function(ev) {
			var ev=ev||window.event; var target=resolveTarget(ev); var d=config.dragscroll;
			var wasScrolling=d.scrolling; d.scrolling=false; document.body.style.cursor='auto';
			if (d.savedMouseUp!=undefined) return d.savedMouseUp.apply(target,arguments);
			if (wasScrolling) return config.dragscroll.processed(ev);
			return;
		}
	}
	// DEFAULT SETTING (ENABLED)
	if (config.options.chkDragScroll===undefined) config.options.chkDragScroll=true;
	// HIJACK MOUSE HANDLERS
	document.onmousedown=config.dragscroll.mousedown;
	document.onmousemove=config.dragscroll.mousemove;
	document.onmouseup  =config.dragscroll.mouseup;
}
//}}}
/***
| Name:|''dropTagging''|
| Created by:|SaqImtiaz|
| Location:|http://tw.lewcid.org/|
| Version:|0.1 (06-Apr-2006)|
| Requires:|~TW2.07|

!About
*provides a drop down list of tiddlers tagged with the specified tag, a replacement for the core tagging macro.

!Demonstration
*<<dropTagging Saq>>
''I recommend using either TaggerPlugin or monkeyTagger, with dropTags and dropTagging in the toolbar:''


!Usage
{{{<<dropTagging>>}}} for tiddlers tagged by current tiddler/tag
{{{<<dropTagging 'Saq'>>}}} for tiddlers tagged by the tag 'Saq' <<dropTagging 'Saq'>>
{{{<<dropTagging 'Saq' 'custom label'>>}}} for tiddlers tagged by the tag 'Saq' with a custom label. <<dropTagging 'Saq' 'custom label'>>

!Installation:
*Copy this tiddler to your TW with the systemConfig tag
* copy the following to your ViewTemplate:
#either {{{<div class='tagging' macro='dropTagging'></div>}}} to add next to or replace tagging macro, or
#{{{<div class='toolbar' >
<span style="padding-right:1.75em;" macro='dropTagging''></span>
<span macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'></span>
</div>}}}(adjust padding to taste)

!To Do
*tweak popup css to optimize placement and colors.
*''optimize code to use core onClickTag function, can cut code size by half!''

!Code
***/
//{{{
config.macros.dropTagging={};
config.macros.dropTagging.dropdownchar = (document.all?"▼":"?"); // the fat one is the only one that works in IE
config.macros.dropTagging.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 var arrow=': '+ config.macros.dropTagging.dropdownchar;
 if(params[0] && store.tiddlerExists(params[0]))
 tiddler = store.getTiddler(params[0]);



 var droptagginglabel= (params[1] && params[1] !='.')? params[1]: 'tagging'+arrow;
 var droptaggingtooltip="tiddlers tagged with '"+tiddler.title+"'";
 
 if(params[0] && store.tiddlerExists(params[0]))
 tiddler = store.getTiddler(params[0]);
 var tagged = store.getTaggedTiddlers(tiddler.title);

 if(tagged.length==0)
 return false; 
 
 var droptagging = function(e)
 { if (!e) var e = window.event;
 var popup = Popup.create(this);
 


 for(var t=0; t<tagged.length; t++)
 createTiddlyLink(createTiddlyElement(popup,"li"),tagged[t].title,true);

 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation)
 e.stopPropagation();
 return(false);
 };
 
var createdropperButton = function(place){
var sp = createTiddlyElement(place,"span",null,"taggingdropbutton");
var theDropDownBtn = createTiddlyButton(sp,droptagginglabel,droptaggingtooltip,droptagging);
 };
createdropperButton(place);
};

setStylesheet(
 ".toolbar .taggingdropbutton {margin-right:0em; border:0px solid #eee; padding:0px; padding-right:0px; padding-left:0px; }\n"+
 ".taggingdropbutton a.button {padding:2px; padding-left:2px; padding-right:2px;}\n"+
// ".taggingdropbutton {font-size:150%;}\n"+
".popup .highlight{background: #fe8; color:#000;}\n"+
 "",
"DropTaggingStyles");

//}}}
!compiler etc
*[[D programing language 2.0|http://www.digitalmars.com/d/2.0/index.html]]
*[[Ddbg - Win32 D Debugger|http://ddbg.mainia.de/]]
*[[EasyD(D言語開発環境を簡単に構築する)|http://www.fsdev.net/projects/show/easy-d]]
!IDE
*[[descent - dsource.org|http://www.dsource.org/projects/descent/]]
!Tips
*[[C-C++に疲れた人のD言語 - ...ing wiki|http://rayerd.ddo.jp/pukiwiki/ingwiki/index.php?C%2FC%2B%2B%A4%CB%C8%E8%A4%EC%A4%BF%BF%CD%A4%CED%B8%C0%B8%EC]]
*[[D 言語入門|http://wisdom.sakura.ne.jp/programming/d/index.html]]
*[[D@WCIMH|http://hp.vector.co.jp/authors/VA028375/d/]]
*[[DMD Updater|http://www.geocities.jp/midonsan/dmdupdate.html]]
*[[dsss - dsource.org|http://www.dsource.org/projects/dsss/]]
*[[D言語研究室|http://www.sun-inet.or.jp/~yaneurao/dlang/]]
*[[D言語研究wiki|http://f17.aaa.livedoor.jp/~labamba/]]
*[[Regnessemプラグイン入門|http://brill2u.s31.xrea.com/regnessem/guide/]]
*[[わかったつもりになるD言語|http://www.kmonos.net/alang/wnd/]]
*[[プログラミング言語 D 2.0|http://www.kmonos.net/alang/d/]]
*[[Wiki4D: FrontPage|http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage]]
*[[Wiki - The D programming language|http://wiki.dprogramming.com/]]
*[[Kazuhiro Inaba|http://www.kmonos.net/]]
<!--{{{-->
<div align='right'><span class='toolbar' macro='tiddler QuickEditToolbarCommand'></span>  
<span class='toolbar' macro='toolbar deleteTiddler guidejp saveCloseTiddler cancelCloseTiddler +saveTiddler -cancelTiddler'></span></div>
<!--<div><span class='title' macro='view title'></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>
<!--}}}-->
<<showtoc>>
!用語について
|!略称|!名称|!用途|
|DAO|Data Access Object|DB処理|
|ADO|~ActiveX Data Objects|DAOの為のコントロール群 DAOより簡単だが処理が遅いらしい|
|DDE|Dynamic Data Exchange|アプリケーション相互のデータ転送|
|COM|Component Object Model|よくわかんね|
!!DAOについて
 DAO入門講座
 http://www.accessclub.jp/dao/index.html
!データ表示・処理
!!データの表示
 MSFlexGridを参照
!!Variantについて
 データタイプvtのコード一覧
 http://library.station.ez-net.jp/references/code-tables/typelib/variant.asp
!~VC-Tips
!!~CDaodatabaseなど
 VCでDAOを用いてmdbファイルを作成
 http://www.ncad.co.jp/~sunada/prog-1.html
 VCでDAOを用いてmdbファイルを編集
 http://park15.wakwak.com/~u-konko/denno/dbase/vc6dao.htm
 ~MFC-CDaoDataBase
 http://msdn2.microsoft.com/ja-jp/library/34fa51ss(VS.80).aspx
 ~MFC-CDaoRecordset
 http://msdn2.microsoft.com/ja-jp/library/8wht5w3w(VS.80).aspx
 ~MFC-CDaoFieldInfo
 http://msdn2.microsoft.com/ja-jp/library/x07sew9d(VS.80).aspx
 ~CDaoDatabaseの注意:MoveLastをしないとGetRecordCountに失敗する
 http://support.microsoft.com/kb/165563/ja
 ~CDaoDatabase::OpenでのHDRとIMEXの指定について
 http://hanatyan.sakura.ne.jp/vbhlp/dao_002.htm
 ~CDaoRecordset::OpenでのSQLクエリの命名規則など
 http://support.microsoft.com/kb/316934/ja
!!ADOを用いてmdb→xls
 ADOのヘルプはここ↓
 ~C:\WINDOWS\Help\~ADO210.CHM
 SQLコマンドのOpen構文(Executeの構文は参考にならない!)
 http://homepage2.nifty.com/inform/vbdb/mdb2xls.htm
 Execute構文
 http://lightbox.on.coocan.jp/mt/lightbox/main/archives/2006/09/_sql.html
 _ConnectionPtrについて
 http://www.alpha-net.ne.jp/users2/uk413/vc/VCT_ADO.html
 ADOを用いてmdbを操作するサンプルコード
 http://park15.wakwak.com/~u-konko/denno/dbase/vc6ado.htm
 VC++6でADOをつかってみる
 http://www.geocities.co.jp/SiliconValley-Oakland/6346/vc/vcado.html

!~VB-TIPS
 ExcelファイルをMSFlexGridに表示
 http://www.bcap.co.jp/hanafusa/VBHLP/MSFlexind.htm
 http://www.bcap.co.jp/hanafusa/VBHLP/daoexcel.htm

 Visual Basic Excel(DAOを用いて、VBでエクセルを開く)
 http://ayusya.hp.infoseek.co.jp/ProgramVBExcel.html
!Office ~SpreadSheet
 を使ったExcel編集コントロールの挿入
 http://m--takahashi.com/bbs/pastlog/02800/02715.html
 http://msdn.microsoft.com/library/ja/default.asp?url=/library/ja/modcore/html/deovrMicrosoftOfficeSpreadsheetComponent.asp
 http://www.asahi-net.or.jp/~ef2o-inue/vba_o/sub05_100.html
!COM
 VCでCOMを使ってExcelを起動してエクセルファイルを操作する
 http://www.ujasiri.com/prglib/vc/excel/vc_excel.html
//{{{
//  WebSnapr - Preview Bubble Javascript
//  Written by Juan Xavier Larrea
//  Adapted for TW by Saq Imtiaz
// requires [[this image|bg.png]]

function applyStyleString(obj,str) {
	if(document.all && !window.opera) {
		obj.style.setAttribute("cssText",str);
	} else {
		obj.setAttribute("style",str);
	}
}

// Point this variable to the correct location of the bg.png file
var bubbleImagePath = 'bg.png';

function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
        oElement = arrElements[i];      
        if(oRegExp.test(oElement.className)){
            arrReturnElements.push(oElement);
        }   
    }
    return (arrReturnElements)
}

function bindBubbles(e){
    lbActions=getElementsByClassName(document,"a","externalLink");
    for(i=0;i<lbActions.length;i++){
        addEvent(lbActions[i],"mouseover",attachBubble,false);
        addEvent(lbActions[i],"mouseout",detachBubble,false);
        lbActions[i].title = '';
        }
}

function attachBubble(_b){
    var _c;
    if(_b["srcElement"]){
        _c=_b["srcElement"];
    }else{
        _c=_b["target"];
    }
    if (_c.href == undefined){
	    _c=_c.parentNode;
     }
    var _d=_c.href;
    var _e=findPosX(_c) +5;
    var _f=findPosY(_c) +17;  
    var _10=document.createElement("div");
    document.getElementsByTagName("body")[0].appendChild(_10);
    _10.className="previewbubble";
    applyStyleString(_10,"text-align: center; z-index: 99999; position: absolute; top: "+_f+"px ; left: "+_e+"px ;  width: 240px; height: 190px; padding: 0; margin: 0;");
    if (config.browser.isIE)
        _10.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + bubbleImagePath + "',sizingMethod='image')";
   else
       _10.style.background= "url("+ bubbleImagePath +") no-repeat";
   var img=document.createElement("img");
   _10.appendChild(img);

    applyStyleString(img,"padding-top: 0; padding-left: 0; padding-right: 0; padding-bottom: 0; margin-top: 27px; margin-left: 12px; margin-bottom: 0; margin-right: 0; border: 0");
    img.setAttribute("src","http://images.websnapr.com/?url="+_d);
    img.setAttribute("width",202);
    img.setAttribute("height",152);
    img.setAttribute("alt","Snapshot");
}

function detachBubble(_12){
    lbActions=getElementsByClassName(document,"div","previewbubble");
    for(i=0;i<lbActions.length;i++){
        lbActions[i].parentNode.removeChild(lbActions[i]);
    }
}

old_websnapr_refreshTiddler = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template,force)
{
    var tiddlerElem = old_websnapr_refreshTiddler.apply(this,arguments);
    bindBubbles();
    return tiddlerElem;
}
//}}}
version.extensions.favicon = {major: 0, minor: 1, revision: 0, date:
"18 July 2005"};
var n = document.createElement("link");
n.rel = "shortcut icon";
n.href = "";
//n.href = "";
document.getElementsByTagName("head")[0].appendChild(n);
FaviconMacro はブラウザの favicon 表示を変えることができる。
{{{
n.href = "";
}}}
URL 部分を指定する。
同じディレクトリにあれば "" のみで良い。
<<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]]
/*{{{*/
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("twistar.cc") {
#site_wrapper,#timeline
{
 max-width:95%!important;
}
}
/*}}}*/
!本体
*[[mozilla.orgリリースビルド・言語パック|http://ftp.mozilla-japan.org/pub/mozilla.org/]]
*[[ayakawa版MineField|http://marilab.hp.infoseek.co.jp/buildfx/]]
!テーマ
*[[KDEFF|https://addons.mozilla.org/ja/firefox/addon/3652]]
*[[KDE+Fx3|https://addons.mozilla.org/ja/firefox/addon/7574]]
!拡張
*Toolbar
**[[Google toolbar|http://dl.google.com/firefox/google-toolbar-beta-win.xpi]]
**[[Quick Restart|https://addons.mozilla.org/ja/firefox/addon/3559]]
**[[中止ボタンがしいたけに見えて困る|https://addons.mozilla.org/ja/firefox/addon/4298]]
**[[Rssticker|https://addons.mozilla.org/en-US/firefox/addon/2325]]
*Sidebar
**[[iGoogle Sidebar|https://addons.mozilla.org/ja/firefox/addon/3130]]
**[[all-in-one sidebar|http://firefox.exxile.net/aios/]]
**[[bbs2ch|http://bbs2ch.sourceforge.jp/]]
**[[sage|http://sage.mozdev.org/]]
*UI
**[[tab mix plus|http://tmp.garyr.net/]]
***[[Nightly builds|http://tmp.garyr.net/dev-builds/]]
*Browsing
**[[GreeceMonkey|http://www.greasespot.net/]]
***[[AutoPagerize|http://userscripts.org/scripts/show/8551]]
***[[todo in Google Calender|http://userscripts.org/scripts/show/9179]]
**[[stylish|http://userstyles.org/stylish/]]
**[[Ad block|http://adblockplus.org/en/]]
**[[合間に合間に|http://www.unmht.org/aima_aimani/]]
*Downloader
**[[Video download helper|http://www.downloadhelper.net/]]
**[[DownThemAll|http://www.downthemall.net/]]
*Language
**[[Locale Switcher|http://benjamin.smedbergs.us/switch-locales/]]
**[[非公式JLPなど|http://norahmodel.exblog.jp/]]
*Other
**[[DOM inspector|http://www.mozilla.org/projects/inspector/]]
**[[nightly tester tools|https://addons.mozilla.org/ja/firefox/addon/6543]]
**[[It's all text!|https://addons.mozilla.org/ja/firefox/addon/4125]]
**[[TiddlySnip|http://tiddlysnip.com/]]
**[[ellaunch|http://ayu.commun.jp/ellaunch/]]
!パッチとか
*[[メモリの大量消費を抑える|http://firefox.geckodev.org/index.php?%E3%83%A1%E3%83%A2%E3%83%AA%E6%B6%88%E8%B2%BB]]
!Fennec
*[[about-mobile@mozilla|http://developer.mozilla.org/devnews/index.php/categories/about-mobile/]]
*[[Adobe Flex|http://www.adobe.com/jp/products/flex/?ogn=JP-gntray_prod_flex_home_jp]]
**Flex本家HP
*[[Flex2.0でリッチなWebアプリを作ろう!|http://itpro.nikkeibp.co.jp/article/COLUMN/20061110/253336/]]
**Flexの実用講座 わかりやすい
*[[AS3.0書き方講座|http://www.adobe.com/jp/devnet/flash/articles/writing_actionscript.html]]
**ActionScriptの書き方について
*[[エムスクール風な何か|http://blog.m-school.biz/]]
**RIA講座をやっている人のblog
*[[Flex User's Group|http://www.fxug.net/]]
**日本のFlex開発関連Forum。わからないことはここに聞くとほぼ確実にわかる
*[[adobe AIR|http://labs.adobe.com/technologies/air/]]
**AS3.0を利用してWindowsアプリが生成できるAdobe AIRの本家
*[[AIRで作るWindowsアプリ|http://gihyo.jp/dev/serial/01/adobe-apollo/0001]]
**AIRアプリ作成講座
/***
|''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]]
Welcome!

FirefoxまたはGoogle chromeによる閲覧を推奨します
Internet Explorerでは正常に表示・動作しません!

このサイトはTiddlyWikiというhtml1ページから成るWikiにより、作成されています
興味を持った人は[[本家TiddlyWikiのページ|http://www.tiddlywiki.com]]から本体を落として、いろいろいじってみましょう。
また、<html><a href='http://rane.tiddlyspot.com/download' class='button'>このページをダウンロード</a></html>して、どのようにカスタマイズされているのか見るのも面白いかも知れませんね:D

!About me
*name : rane
*ゲームとか
**[[XFire|http://profile.xfire.com/kathis]]+++^[...]
[img[http://miniprofile.xfire.com/bg/sh/type/0/kathis.png][http://profile.xfire.com/kathis]]
===

*Blogなど<<br>>更新情報は[[FriendFeed|http://friendfeed.com/rane]]にまとめてあります
**Blog:[[_T('w')|http://d.hatena.ne.jp/rane-hs/]]
**Twitter:[[rane_hs|http://twitter.com/rane_hs]]+++^[...]
<<gadget http://www.btinternet.com/~tdroza/gadgets/twitter/index.xml height:400 width:500 border:0 prefs:"up_max_items=5&up_username=rane_hs&up_feed=http://twitter.com/statuses/user_timeline/" >>
===

**[[個人用PukiWiki|http://www4.atpages.jp/~rane/pukiwiki/]]
*Counter strike Condition zeroのサーバーを運営しています
**[[cz.2ch public server]]
*自作プラグイン<br>改変もののライセンスは作者のライセンスに準拠します。オリジナルなものについては何かあれば一報ください
**[[SmileViewerPlugin]]
***ニコニコ閲覧iframe
**[[CodeFormatterPluginCPP]]
***C++用強調表示。手抜き
**[[CodeFormatterPluginHLDS]]
***HLDS用強調表示。需要は皆無
!Contents
*おおまかなものが[[サイトマップ|SiteMap]]にまとめてあります。
!!!TiddlyWikiについて
プラグイン・リンクそしてメモ
<<tagging TiddlyWiki>>
!!!Counter-Strikeについて
サーバーの立て方や設定・など
<<tagging cs>>
!!!Programingについて
C++やMFCネタが多いです。ほとんどメモ帳
*[[Programing|プログラミング]]
!更新履歴
<<tiddler UpdateLog>>
関数の使い方をメモしておくところ
<<showtoc>>
!MoveFileEx
*Information
http://msdn.microsoft.com/ja-jp/library/cc429621.aspx
*Usage
<C++>
MoveFileEx("c:\from.txt", "c:\to.txt", MOVEFILE_REPLACE_EXISTING);
</C++>
{{{MOVEFILE_REPLACE_EXISTING}}}により、ファイルが存在しても強制上書きをする
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>>
/***
|''Name:''||
|''Version:''||
|''Source:''|http://www.btinternet.com/~tdroza/tiddlywiki/gadget.html|
|''Author:''||
|''Type:''|Plugin|
!Usage
see [[GoogleGadgetPluginTips]]
!Code
***/
//{{{
config.macros.gadget = {};

config.macros.gadget .handler = function(place,macroName,params, wikifier, paramString) {
  var elem = createTiddlyElement(place,"iframe",null,"greeting","");
  var p = paramString.parseParams(null, null, true);

  elem.src= "http://www.gmodules.com/ig/ifr?url=" + params[0] + "&" + getParam(p,"prefs","");
  elem.height = getParam(p,"height","200");
  elem.width= getParam(p,"width","300");
  elem.style.border= getParam(p,"border","1");
 
  place.appendChild(elem);
};
//}}}
!!A gadget with some options:
<<gadget http://www.btinternet.com/~tdroza/gadgets/twitter/index.xml height:400 width:500 border:0 prefs:"up_max_items=5&up_username=downingstreet&up_feed=http://twitter.com/statuses/user_timeline/" >>

!!!!Code: 
&lt;&lt;gadget http://www.btinternet.com/~tdroza/gadgets/twitter/index.xml height:400 width:500 border:0 prefs:"up_max_items=5&up_username=downingstreet&up_feed=http://twitter.com/statuses/user_timeline/" &gt;&gt;

!!Spider gadget
<<gadget http://abowman.googlepages.com/spider.xml >>

!!!!Code 
&lt;&lt;gadget http://abowman.googlepages.com/spider.xml &gt;&gt;

!!Maps
<<gadget http://www.google.com/ig/modules/mapsearch.xml>>

!!!!Code 
&lt;&lt;gadget http://www.google.com/ig/modules/mapsearch.xml &gt;&gt;
//{{{
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();
				}
			}
		}
	}
}
//}}}
{{{
''太字''
--取消線--
__下線__
//斜体//
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";
}
//}}}
<<top>>

<<toggleSideBar '' '' hide>>

<<saveChanges>><<renameButton s 'Save TiddlyWiki'>>

<<upload http://rane.tiddlyspot.com/store.cgi index.html . .  rane>><<renameButton up>>

<html><a href='http://rane.tiddlyspot.com/download' class='button'>dl</a></html>

<<dirtyflag>>
/***
|Name|HoverMenuPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#HoverMenuPlugin|
|Version|1.11a|
|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:
*09-10-08, ver 1.11a : fixed Xpos(for Webkit) by kmny
*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);

//--------------------------------------------------------------- added begin(by kmny)
var strUA = navigator.userAgent.toLowerCase();
if(strUA.indexOf("applewebkit")!=-1) {
this.settings.x=10;
}
//--------------------------------------------------------------- added end
 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 = ">";
/*}}}*/
まだメモレベルですな
<<showtoc>>
!これってなに
.Net Framework2.0で追加されたWindowsのIPC(Inter Process Comunication)を利用したプロセス間通信のためのリモーティングチャンネルである。
ユーザ層で処理するため、Tcp Channelより高速である。
しかもIPCはローカルな通信であるため、TCPのようにファイアウォールの設定がどうとかは全く発生しない
!Tips
*[[認証処理について|http://msdn.microsoft.com/ja-jp/library/ms172351.aspx]]
*[[exe.configクライアント用|http://www.isisaka.com/blog/archives/2005/05/ipcchannelexeco_1.html]]
{{{
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <systemruntimeremoting>
        <application>
             <client url="ipc://IpcSample/SampleApp">
                <activated type="isisaka.com.Remoting.Sample.Core.Core, Core" >
            </client>
        </application>
    </systemruntimeremoting>
</configuration>
}}}
*[[exe.configサーバ用|http://www.isisaka.com/blog/archives/2005/04/ipcchannelexeco.html]]
{{{
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.runtime.remoting>
        <application>
            <service>
                <wellknown mode="SingleCall" type="Microsoft.Samples.Implementation.ImplementationClass, Server" objectUri="server.rem" />
            </service>
            <channels>
                <channel ref="ipc" portName="test" />
            </channels>
        </application>
    </system.runtime.remoting>
</configuration>
}}}
!Sample
*http://msdn.microsoft.com/ja-jp/library/xcs3s8f3.aspx
*http://d.hatena.ne.jp/PoohKid/20071226/ipc
*http://d.hatena.ne.jp/coma2n/20070918/1190091655
*http://d.hatena.ne.jp/tetsuarossa/20070325/p1
*http://tryhost.net/~catwalk/?diary%2F2007%2F07%2F04
!Forum
*http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=33383&forum=7
*http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=43911&forum=7
<<showtoc>>
!Tips
Winsock2を使う。
!Note
*インクルードする順番について
下記はエラーになる
{{{
#include <windows.h>
#include <winsock2.h>
}}}
下記に変更する。
{{{
#include <winsock2.h>
#include <windows.h>
}}}
!Link
*SDK
**[[最新版PlatformSDK|http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en#filelist]]]
**[[Winsock2.org:サンプルソースなど|http://winsock2.org/]]
*情報
**[[書籍:IPv6ネットワークプログラミング|http://www.amazon.co.jp/exec/obidos/ASIN/4756142362/]]
**[[5分でわかるIPv6プログラミング|http://www.ipv6style.jp/jp/apps/20030617/index.shtml]]
**[[WinSOCK2関連リンク|http://winsock2.org/links.htm]]
**[[MSDN:WinSOCK2|http://msdn.microsoft.com/en-us/library/ms740673(VS.85).aspx]]
/***
|Name|ImageSizePlugin|
|Source|http://www.TiddlyTools.com/#ImageSizePlugin|
|Version|1.2.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,formatter|
|Requires||
|Overrides|'image' formatter|
|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;
}
//}}}
/***
|Name|ImportTiddlersPluginInfo|
|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|documentation|
|Requires||
|Overrides||
|Description|documentation for ImportTiddlersPlugin|
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.
!!!!!Usage
<<<
{{{<<importTiddlers>>}}} or {{{<<importTiddlers core>>}}}
invokes the built-in importTiddlers macro (TW2.1.x+).  If installed in documents using TW2.0.x or earlier, fallback is to use 'link' display (see below)

{{{<<importTiddlers link label tooltip>>}}}
The ''link'' keyword creates an "import tiddlers" link that when clicked to show/hide import control panel.  ''label'' and ''tooltip'' are optional text parameters (enclosed in quotes or {{{[[...]]}}}, and allow you to override the default display text for the link and the mouseover help text, respectively.

{{{<<importTiddlers inline>>}}}
creates import control panel directly in tiddler content

<<importTiddlers inline>>

Press ''[browse]'' to select a TiddlyWiki document file to import, and then press ''[open]''.  Alternatively, you can type in the path/filename or a remote document URL (starting with http://).  When you have entered the desired source location, press ''[load]'' to retrieve the tiddlers from the remote source.  //Note: There may be some delay to permit the browser time to access and load the document before updating the listbox with the titles of all tiddlers that are available to be imported.//

Select one or more titles from the listbox (hold CTRL or SHIFT while clicking to add/remove the highlight from individual list items).  You can press ''[select all]'' to quickly highlight all tiddler titles in the list.  Use the ''[-]'', ''[+]'', or ''[=]'' links to adjust the listbox size so you can view more (or less) tiddler titles at one time.  When you have chosen the tiddlers you want to import and entered any extra tags, press ''[import]'' to begin copying them to the current TiddlyWiki document.

''select: all, new, changes, or differences''

You can click on ''all'', ''new'', ''changes'', or ''differences'' to automatically select a subset of tiddlers from the list. This makes it very quick and easy to find and import just the updated tiddlers you are interested in:
>''"all"'' selects ALL tiddlers from the import source document, even if they have not been changed.
>''"new"'' selects only tiddlers that are found in the import source document, but do not yet exist in the destination document
>''"changes"'' selects only tiddlers that exist in both documents but that are newer in the source document
>''"differences"'' selects all new and existing tiddlers that are different from the destination document (even if destination tiddler is newer)

''Import Tagging:''

Tiddlers that have been imported can be automatically tagged, so they will be easier to find later on, after they have been added to your document.  New tags are entered into the "add tags" input field, and then //added// to the existing tags for each tiddler as it is imported.

''Skip, Rename, Merge, or Replace:''

When importing a tiddler whose title is identical to one that already exists, the import process pauses and the tiddler title is displayed in an input field, along with four push buttons: ''[skip]'', ''[rename]'', ''[merge]'' and ''[replace]''.

To bypass importing this tiddler, press ''[skip]''.  To import the tiddler with a different name (so that both the tiddlers will exist when the import is done), enter a new title in the input field and then press ''[rename]''.   Press ''[merge]'' to combine the content from both tiddlers into a single tiddler.  Press ''[replace]'' to overwrite the existing tiddler with the imported one, discarding the previous tiddler content.

//Note: if both the title ''and'' modification date/////time match, the imported tiddler is assumed to be identical to the existing one, and will be automatically skipped (i.e., not imported) without asking.//

''Import Report History''

When tiddlers are imported, a report is generated into ImportedTiddlers, indicating when the latest import was performed, the number of tiddlers successfully imported, from what location, and by whom. It also includes a list with the title, date and author of each tiddler that was imported.

When the import process is completed, the ImportedTiddlers report is automatically displayed for your review.  If more tiddlers are subsequently imported, a new report is //added// to ImportedTiddlers, above the previous report (i.e., at the top of the tiddler), so that a reverse-chronological history of imports is maintained.

If a cumulative record is not desired, the ImportedTiddlers report may be deleted at any time. A new ImportedTiddlers report will be created the next time tiddlers are imported.

Note: You can prevent the ImportedTiddlers report from being generated for any given import activity by clearing the "create a report" checkbox before beginning the import processing.
<<<
!!!!!Revisions
<<<
2008.08.12 [4.3.3] rewrite backstage and shadow tiddler definitions for easier customization
2008.08.05 [4.3.2] rewrote loadRemoteFile() to eliminate use of platform-specific fileExists() function
2008.06.29 [4.3.1] More layout/animation work for simpler sequential interaction.  Code reduction/cleanup
2008.06.28 [4.3.0] HTML and CSS cleanup and tweaks to layout.  Added animation to panels
2008.06.22 [4.2.0] For FireFox, use HTML with separate text+button control instead of type='file' control
2008.06.05 [4.1.0] in filterByHash(), added support for boolean tag expressions using getMatchingTiddlers() (defined by MatchTagsPlugin)
2008.05.12 [4.0.2] automatically tweak the backstage "import" task to add the ImportTiddlers control panel as an optional alternative to the standard import wizard.  (Moved from BackstageTweaks).
2008.04.30 [4.0.1] trim #... suffix for loading files/URLs in IE
2008.04.30 [4.0.0] added source filtering (using URL paramifiers).  Also, abbreviations for code-size reduction.
2008.04.13 [3.9.0] added 'apply to all' checkbox for collision processing
2008.03.26 [3.8.0] added support for selecting pre-defined systemServer URLs
2008.03.25 [3.7.0] added support for setting 'server' fields on imported tiddlers (for later synchronizing of changes)
2008.01.03 [3.6.0] in loadRemoteFile(), use lower-level doHttp() instead of loadRemoteFile() in order to support username/password access to remote server
2007.10.30 [3.5.6] update [[ImportTiddlers]] shadow tiddler definition to include "inline" link, so the plugin control panel is displayed instead of the standard core interface.
2007.06.27 [3.5.5] added missing 'fields' params to saveTiddler() calls.  Fixes problem where importing tiddlers would lose the custom fields.  Also, moved functions for backward-compatibility with TW2.1.x to separate [[ImportTiddlersPluginPatch2.1.x]] tiddler, reducing the size of //this// plugin tiddler by a significant amount.
2007.06.25 [3.5.4] added calls to store.suspendNotifications() and store.resumeNotifications().  Eliminates redisplay processing overhead DURING import activities
2007.04.29 [3.5.3] if refreshImportList() when inbound tiddlers are loaded, change "close" button to "done", and disable certain controls to creates a modal condition, so that actions that reload tiddlers cannot be performed unless "done" is first pressed to end the mode..
2007.04.28 [3.5.2] in handler(), added param support for custom link label/prompt
2007.04.19 [3.5.1] in readTiddlersFromHTML(), for TW2.2 and above, use importTiddlyWiki() (new core functionality) to get tiddlers from remote file content.  Also, copied updated TW21Loader.prototype.internalizeTiddler() definition from TW2.2b5 so plugin can read tiddlers from TW2.2+ even when running under TW2.1.x
2007.03.22 [3.5.0] in refreshImportList(), add handling for 'select section' when a heading is selected.  Makes it really easy to import by tag or date!
2007.03.21 [3.4.0] split loadTiddlers functionality into separate plugin (see [[LoadTiddlersPlugin]])
2007.03.20 [3.3.1] tweak to previous change to allow relative file references via http: (bypasses getLocalPath() so remote URL will be used)
2007.03.20 [3.3.0] added support for local, relative file references: in loadRemoteFile(), check for fileExists().  If not found, prepend relative path location and try again.  Allows use of simple "foo.html" file references with importTiddlers and/or loadTiddlers macros
2007.02.24 [3.2.1] re-labeled control panel "open" button to "load" to avoid confusion with "open" button in system-provided Browse... dialog.  (i.e., "browse, open, open" becomes "browse, open, load")
2007.02.09 [3.2.0] loadTiddlers: added support for "noReload" tag (prevents overwriting existing tiddler, even if inbound tiddler is newer)
2007.02.08 [3.1.3] loadTiddlers: added missing code and documentation for "newTags" handling (a feature change from long, long ago that somehow got lost!)
2006.11.14 [3.1.2] fix macro handler parameter declaration (double-pasted param list corrupts IE)
2006.11.13 [3.1.1] use apply() method to invoke hijacked core handler
2006.11.13 [3.1.0] hijack TW2.1 built-in importTiddlers.handler() so it can co-exist with the plugin interface 'panel'.  Use macro without params (or use 'core' keyword) to display built-in core interface.  Use new "link" param to embed "import tiddlers" link that shows floating panel when clicked.  Renamed a few plugin utility functions so they don't collide with core internal functions.  More code restructuring to come.
2006.10.12 [3.0.8] in readTiddlersFromHTML(), fallback to find end of store area by matching "/body" when POST-BODY-START is not present (backward compatibility for older documents)
2006.09.10 [3.0.7] in readTiddlersFromHTML(), find end of store area by matching "POST-BODY-START" instead of "/body" 
2006.08.16 [3.0.6] Use higher-level store.saveTiddler() instead of store.addTiddler() to avoid conflicts with ZW and other adaptations that hijack low-level tiddler handling.  Also, in CreateImportPanel(), no longer register notify to "refresh listbox after every tiddler change" (left over from old 'auto-filtered' list handling).  Thanks to Bob McElrath for report/solution.
2006.07.29 [3.0.5] added noChangeMsg to loadTiddlers processing.  if not 'quiet' mode, reports skipped tiddlers.
2006.04.18 [3.0.4] in loadTiddlers.handler, fixed parsing of "prompt:" param. Also, corrected parameters mismatch in loadTiddlers() callback function definition (order of params was wrong, resulting in filters NOT being applied)
2006.04.12 [3.0.3] moved many display messages to macro properties for easier L10N translations via 'lingo' definitions.
2006.04.12 [3.0.2] additional refactoring of 'core candidate' code.  Proposed API now defines "loadRemoteFile()" for XMLHttpRequest processing with built in fallback for handling local filesystem access, and readTiddlersFromHTML() to process the resulting source HTML content.
2006.04.04 [3.0.1] in refreshImportList(), when using [by tags], tiddlers without tags are now included in a new "untagged" psuedo-tag list section
2006.04.04 [3.0.0] Separate non-interactive {{{<<importTiddlers...>>}}} macro functionality for incorporation into TW2.1 core and renamed as {{{<<loadTiddlers>>}}} macro.  New parameters for loadTiddlers: ''label:text'' and ''prompt:text'' for link creation,  ''ask'' for filename/URL, ''tag:text'' for filtering, "confirm" for accept/reject of individual inbound tiddlers.  Also, ImportedTiddlers report generator output has been simplified and "importReplace/importPublic" tags and associated "force" param (which were rarely, if ever, used) has been dropped.
2006.03.30 [2.9.1] when extracting store area from remote URL, look for "</body>" instead of "</body>\n</html>" so it will match even if the "\n" is absent from the source.
2006.03.30 [2.9.0] added optional 'force' macro param.  When present, autoImportTiddlers() bypasses the checks for importPublic and importReplace.  Based on a request from Tom Otvos.
2006.03.28 [2.8.1] in loadImportFile(), added checks to see if 'netscape' and 'x.overrideMimeType()' are defined (IE does *not* define these values, so we bypass this code)
Also, when extracting store area from remote URL, explicitly look for "</body>\n</html>" to exclude any extra content that may have been added to the end of the file by hosting environments such as GeoCities.  Thanks to Tom Otvos for finding these bugs and suggesting some fixes.
2006.02.21 [2.8.0] added support for "tiddler:TiddlerName" filtering parameter in auto-import processing
2006.02.21 [2.7.1] Clean up layout problems with IE.  (Use tables for alignment instead of SPANs styled with float:left and float:right)
2006.02.21 [2.7.0] Added "local file" and "web server" radio buttons for selecting dynamic import source controls in ImportPanel.  Default file control is replaced with URL text input field when "web server" is selected.  Default remote document URL is defined in SiteURL tiddler.  Also, added option for prepending SiteProxy URL as prefix to remote URL to mask cross-domain document access (requires compatible server-side script)
2006.02.17 [2.6.0] Removed "differences only" listbox display mode, replaced with selection filter 'presets': all/new/changes/differences.  Also fixed initialization handling for "add new tags" so that checkbox state is correctly tracked when panel is first displayed.
2006.02.16 [2.5.4] added checkbox options to control "import remote tags" and "keep existing tags" behavior, in addition to existing "add new tags" functionality.
2006.02.14 [2.5.3] FF1501 corrected unintended global 't' (loop index) in importReport() and autoImportTiddlers()
2006.02.10 [2.5.2] corrected unintended global variable in importReport().
2006.02.05 [2.5.1] moved globals from window.* to config.macros.importTiddlers.* to avoid FireFox 1.5.0.1 crash bug when referencing globals
2006.01.18 [2.5.0] added checkbox for "create a report".  Default is to create/update the ImportedTiddlers report.  Clear the checkbox to skip this step.
2006.01.15 [2.4.1] added "importPublic" tag and inverted default so that auto sharing is NOT done unless tagged with importPublic
2006.01.15 [2.4.0] Added support for tagging individual tiddlers with importSkip, importReplace, and/or importPrivate to control which tiddlers can be overwritten or shared with others when using auto-import macro syntax.  Defaults are to SKIP overwriting existing tiddlers with imported tiddlers, and ALLOW your tiddlers to be auto-imported by others.
2006.01.15 [2.3.2] Added "ask" parameter to confirm each tiddler before importing (for use with auto-importing)
2006.01.15 [2.3.1] Strip TW core scripts from import source content and load just the storeArea into the hidden IFRAME.  Makes loading more efficient by reducing the document size and by preventing the import document from executing its TW initialization (including plugins).  Seems to resolve the "Found 0 tiddlers" problem.  Also, when importing local documents, use convertUTF8ToUnicode() to convert the file contents so support international characters sets.
2006.01.12 [2.3.0] Reorganized code to use callback function for loading import files to support event-driven I/O via an ASYNCHRONOUS XMLHttpRequest.  Let's processing continue while waiting for remote hosts to respond to URL requests.  Added non-interactive 'batch' macro mode, using parameters to specify which tiddlers to import, and from what document source.  Improved error messages and diagnostics, plus an optional 'quiet' switch for batch mode to eliminate //most// feedback.
2006.01.11 [2.2.0] Added "[by tags]" to list of tiddlers, based on code submitted by BradleyMeck
2006.01.09 [2.1.1] When a URL is typed in, and then the "open" button is pressed, it generates both an onChange event for the file input and a click event for open button.  This results in multiple XMLHttpRequest()'s which seem to jam things up quite a bit.  I removed the onChange handling for file input field.  To open a file (local or URL), you must now explicitly press the "open" button in the control panel.
2006.01.08 [2.1.0] IMPORT FROM ANYWHERE!!! re-write getImportedTiddlers() logic to either read a local file (using local I/O), OR... read a remote file, using a combination of XML and an iframe to permit cross-domain reading of DOM elements.  Adapted from example code and techniques courtesy of Jonny LeRoy.
2006.01.06 [2.0.2] When refreshing list contents, fixed check for tiddlerExists() when "show differences only" is selected, so that imported tiddlers that don't exist in the current file will be recognized as differences and included in the list.
2006.01.04 [2.0.1] When "show differences only" is NOT checked, import all tiddlers that have been selected even when they have a matching title and date.
2005.12.27 [2.0.0] Update for TW2.0
Defer initial panel creation and only register a notification function when panel first is created
2005.12.22 [1.3.1] tweak formatting in importReport() and add 'discard report' link to output
2005.12.03 [1.3.0] Dynamically create/remove importPanel as needed to ensure only one instance of interface elements exists, even if there are multiple instances of macro embedding.  Also, dynamically create/recreate importFrame each time an external TW document is loaded for importation (reduces DOM overhead and ensures a 'fresh' frame for each document)
2005.11.29 [1.2.1] fixed formatting of 'detail info' in importReport()
2005.11.11 [1.2.0] added 'inline' param to embed controls in a tiddler
2005.11.09 [1.1.0] only load HTML and CSS the first time the macro handler is called.  Allows for redundant placement of the macro without creating multiple instances of controls with the same ID's.
2005.10.25 [1.0.5] fixed typo in importReport() that prevented reports from being generated
2005.10.09 [1.0.4] combined documentation with plugin code instead of using separate tiddlers
2005.08.05 [1.0.3] moved CSS and HTML definitions into plugin code instead of using separate tiddlers
2005.07.27 [1.0.2] core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet()
2005.07.23 [1.0.1] added parameter checks and corrected addNotification() usage
2005.07.20 [1.0.0] Initial Release
<<<
/%
<<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|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.5|
|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
<<<
2009.04.11 [1.9.5] pass current tiddler object into wrapper code so it can be referenced from within 'onclick' scripts
2009.02.26 [1.9.4] in $(), handle leading '#' on ID for compatibility with JQuery syntax
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 5, date: new Date(2009,4,11)};

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

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

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

// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
/***
|Name|InlineJavascriptPluginInfo|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.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|documentation|
|Requires||
|Overrides||
|Description|Documentation for InlineJavascriptPlugin|
''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.
!!!!!Usage
<<<
This plugin adds wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be recognized as embedded javascript code.
<script show>
	/* javascript code goes here... */
</script>Every time the tiddler content is rendered, the javascript code is automatically evaluated, allowing you to invoke 'side-effect' processing and/or produce dynamically-generated content that is then inserted into the tiddler content, immediately following the script (see below).  By including the optional ''show'' keyword as the final parameter in a {{{<script>}}} marker, the plugin will also include the script source code in the output that it displays in the tiddler.  This is helpful when creating examples for documentation purposes (such as used in this tiddler!)

__''Deferred execution from an 'onClick' link''__
<script label="click here" title="mouseover tooltip text" key="X" show>
	/* javascript code goes here... */
	alert('you clicked on the link!');
</script>
By including a {{{label="..."}}} parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered.  You may also include a {{{title="..."}}} parameter to specify the 'tooltip' text that will appear whenever the mouse is moved over the onClick link text, and a {{{key="X"}}} parameter to specify an //access key// (which must be a //single// letter or numeric digit only).

__''Loading scripts from external source files''__
<script src="URL" show>
	/* optional javascript code goes here... */
</script>You can also load javascript directly from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}).  This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins.  The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.

In addition to loading the javascript from the external file, you can also use this feature to invoke javascript code contained within the {{{<script>...</script>}}} markers.  This code is invoked //after// the external script file has been processed, and can make immediate use of the functions and/or global variables defined by the external script file.
>Note: To ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that is rendered as soon as your TiddlyWiki document is opened, such as MainMenu.  For example: put your {{{<script src="..."></script>}}} syntax into a separate 'library' tiddler (e.g., LoadScripts), and then add {{{<<tiddler LoadScripts>>}}} to MainMenu so that the library is loaded before any other tiddlers that rely upon the functions it defines. 
>
>Normally, loading external javascript in this way does not produce any direct output, and should not have any impact on the appearance of your MainMenu.  However, if your LoadScripts tiddler contains notes or other visible content, you can suppress this output by using 'inline CSS' in the MainMenu, like this: {{{@@display:none;<<tiddler LoadScripts>>@@}}}
<<<
!!!!!Creating dynamic tiddler content and accessing the ~TiddlyWiki DOM
<<<
An important difference between TiddlyWiki inline scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document: in a typical web document, you use the {{{document.write()}}} (or {{{document.writeln()}}}) function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.

However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and instead will //completely replace the entire ~TiddlyWiki document in your browser window (which is clearly not a good thing!)//.  In order to allow scripts to use {{{document.write()}}}, the plugin automatically converts and buffers all HTML output so it can be safely inserted into your tiddler content, immediately following the script.

''Note that {{{document.write()}}} can only be used to output "pure HTML" syntax.  To produce //wiki-formatted// output, your script should instead return a text value containing the desired wiki-syntax content'', which will then be automatically rendered immediately following the script.  If returning a text value is not sufficient for your needs, the plugin also provides an automatically-defined variable, 'place', that gives the script code ''direct access to the //containing DOM element//'' into which the tiddler output is being rendered.  You can use this variable to ''perform direct DOM manipulations'' that can, for example:
* generate wiki-formatted output using {{{wikify("...content...",place)}}}
* vary the script's actions based upon the DOM element in which it is embedded
* access 'tiddler-relative' DOM information using {{{story.findContainingTiddler(place)}}}
Note:
''When using an 'onclick' script, the 'place' element actually refers to the onclick //link text// itself, instead of the containing DOM element.''  This permits you to directly reference or modify the link text to reflect any 'stateful' conditions that might set by the script.  To refer to the containing DOM element from within an 'onclick' script, you can use "place.parentNode" instead.
<<<
!!!!!Instant "bookmarklets"
<<<
You can also use an 'onclick' link to define a "bookmarklet": a small piece of javascript that can be ''invoked directly from the browser without having to be defined within the current document.''  This allows you to create 'stand-alone' commands that can be applied to virtually ANY TiddlyWiki document... even remotely-hosted documents that have been written by others!!  To create a bookmarklet, simply define an 'onclick' script and then grab the resulting link text and drag-and-drop it onto your browser's toolbar (or right-click and use the 'bookmark this link' command to add it to the browser's menu).

Notes:
*When writing scripts intended for use as bookmarklets, due to the ~URI-encoding required by the browser, ''you cannot not use ANY double-quotes (") within the bookmarklet script code.''
*All comments embedded in the bookmarklet script must ''use the fully-delimited {{{/* ... */}}} comment syntax,'' rather than the shorter {{{//}}} comment syntax.
*Most importantly, because bookmarklets are invoked directly from the browser interface and are not embedded within the TiddlyWiki document, there is NO containing 'place' DOM element surrounding the script.  As a result, ''you cannot use a bookmarklet to generate dynamic output in your document,''  and using {{{document.write()}}} or returning wiki-syntax text or making reference to the 'place' DOM element will halt the script and report a "Reference Error" when that bookmarklet is invoked.  
Please see [[InstantBookmarklets]] for many examples of 'onclick' scripts that can also be used as bookmarklets.
<<<
!!!!!Special reserved function name
<<<
The plugin 'wraps' all inline javascript code inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler.  To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.
<<<
!!!!!$(...) 'shorthand' function
<<<
As described by Dustin Diaz [[here|http://www.dustindiaz.com/top-ten-javascript/]], the plugin defines a 'shorthand' function that allows you to write:
{{{
$(id)
}}}
in place of the normal standard javascript syntax:
{{{
document.getElementById(id)
}}}
This function is provided merely as a convenience for javascript coders that may be familiar with this abbreviation, in order to allow them to save a few bytes when writing their own inline script code.
<<<
!!!!!Examples
<<<
simple dynamic output:
><script show>
	document.write("The current date/time is: "+(new Date())+"<br>");
	return "link to current user: [["+config.options.txtUserName+"]]\n";
</script>
dynamic output using 'place' to get size information for current tiddler:
><script show>
	if (!window.story) window.story=window;
	var title=story.findContainingTiddler(place).getAttribute("tiddler");
	var size=store.getTiddlerText(title).length;
	return title+" is using "+size+" bytes";
</script>
dynamic output from an 'onclick' script, using {{{document.write()}}} and/or {{{return "..."}}}
><script label="click here" show>
	document.write("<br>The current date/time is: "+(new Date())+"<br>");
	return "link to current user: [["+config.options.txtUserName+"]]\n";
</script>
creating an 'onclick' button/link that accesses the link text AND the containing tiddler:
><script label="click here" title="clicking this link will show an 'alert' box" key="H" show>
	if (!window.story) window.story=window;
	var txt=place.firstChild.data;
	var tid=story.findContainingTiddler(place).getAttribute('tiddler');
	alert('Hello World!\nlinktext='+txt+'\ntiddler='+tid);
</script>
dynamically setting onclick link text based on stateful information:
>{{block{
{{{
<script label="click here">
	/* toggle "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.innerHTML=on?"enable":"disable";
	config.txtSomething=on?"OFF":"ON";
	return "\nThe current value is: "+config.txtSomething;
</script><script>
	/* initialize onclick link text based on current "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.lastChild.previousSibling.innerHTML=on?"disable":"enable";
</script>
}}}
<script label="click here">
	/* toggle "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.innerHTML=on?"enable":"disable";
	config.txtSomething=on?"OFF":"ON";
	return "\nThe current value is: "+config.txtSomething;
</script><script>
	/* initialize onclick link text based on current "txtSomething" value */
	var on=(config.txtSomething=="ON");
	place.lastChild.innerHTML=on?"enable":"disable";
</script>
}}}
loading a script from a source url:
>http://www.TiddlyTools.com/demo.js contains:
>>{{{function inlineJavascriptDemo() { alert('Hello from demo.js!!') } }}}
>>{{{displayMessage('InlineJavascriptPlugin: demo.js has been loaded');}}}
>note: When using this example on your local system, you will need to download the external script file from the above URL and install it into the same directory as your document.
>
><script src="demo.js" show>
	return "inlineJavascriptDemo() function has been defined"
</script>
><script label="click to invoke inlineJavascriptDemo()" key="D" show>
	inlineJavascriptDemo();
</script>
<<<
!!!!!Revisions
<<<
2009.02.26 [1.9.4] in $(), handle leading '#' on ID for compatibility with JQuery syntax
2008.06.11 [1.9.3] added $(...) function as 'shorthand' for document.getElementById()
2008.03.03 [1.9.2] corrected fallback declaration of wikifyPlainText() (fixes Safari "parse error")
2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' (fixes IE errors)
2008.02.21 [1.9.0] output from 'onclick' scripts (return value or document.write() calls) are now buffered and rendered into into a span following the script.  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.
2008.02.14 [1.8.1] added backward-compatibility for use of wikifyPlainText() in TW2.1.3 and earlier
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.28 [1.8.0] added support for key="X" syntax to specify custom access key definitions
2007.12.15 [1.7.0] autogenerate URI encoded HREF on links for onclick scripts.  Drag links to browser toolbar to create bookmarklets.  IMPORTANT NOTE: place is NOT defined when scripts are used as bookmarklets.  In addition, double-quotes will cause syntax errors.  Thanks to PaulReiber for debugging and brainstorming.
2007.11.26 [1.6.2] when converting "document.write()" function calls in inline code, allow whitespace between "write" and "(" so that "document.write ( foobar )" is properly converted.
2007.11.16 [1.6.1] when rendering "onclick scripts", pass label text through wikifyPlainText() to parse any embedded wiki-syntax to enable use of HTML entities or even TW macros to generate dynamic label text.
2007.02.19 [1.6.0] added support for title="..." to specify mouseover tooltip when using an onclick (label="...") script
2006.10.16 [1.5.2] add newline before closing '}' in 'function out_' wrapper.  Fixes error caused when last line of script is a comment.
2006.06.01 [1.5.1] when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly
2006.04.19 [1.5.0] added 'show' parameter to force display of javascript source code in tiddler output
2006.01.05 [1.4.0] added support 'onclick' scripts.  When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked.  'place' value is set to match the clicked button/link element.
2005.12.13 [1.3.1] when catching eval error in IE, e.description contains the error text, instead of e.toString().  Fixed error reporting so IE shows the correct response text.  Based on a suggestion by UdoBorkowski
2005.11.09 [1.3.0] for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content.  Based on a suggestion by BradleyMeck
2005.11.08 [1.2.0] handle loading of javascript from an external URL via src="..." syntax
2005.11.08 [1.1.0] pass 'place' param into scripts to provide direct DOM access 
2005.11.08 [1.0.0] initial release
<<<
/***
!2009.06.25 patched by rane for Ver2.5.2
*lessLabelを追加:「その他を閉じる」
**よい日本語案を求む

!Plugin information
|''Name:''|JapaneseTranslationPlugin |
|''Description:''|Translation of TiddlyWiki into Japanese |
|''Author:''|OGOSHI Masayuki &lt;ogoshima@gmail.com&gt; |
|''Source:''|http://ogoshi.tiddlyspot.com/#JapaneseTranslationPlugin |
|''Version:''|0.3.7-ja|
|''Date:''|Jun 03, 2008|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.1 Japan |http://creativecommons.org/licenses/by-sa/2.1/jp/]] |
|''~CoreVersion:''|2.4|

TiddlyWiki を日本語化するプラグイン。TiddlyWiki Version 2.4 上で動作を確認しました。
ライセンスは英語版のCCライセンスに準じる日本語版の CC-by-SA 2.1 ライセンスとします。

英語版のクレジットは以下のとおり。
|''Name:''|EnglishTranslationPlugin|
|''Description:''|Translation of TiddlyWiki into English|
|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|
|''Source:''|www.example.com |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/association/locales/core/en/locale.en.js |
|''Version:''|0.3.7|
|''Date:''|Jul 6, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.4|
***/

//{{{
//--
//-- 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: "保存", tooltip: "このTiddlyWikiを保存します", action: saveChanges},
	sync: {text: "同期", tooltip: "他のTiddlyWikiファイルやサーバと同期をとります", content: '<<sync>>'},
	importTask: {text: "取り込み", tooltip: "他のTiddlyWikiファイルやサーバからtiddlerやプラグインを取り込みます", content: '<<importTiddlers>>'},
	tweak: {text: "詳細設定", tooltip: "TiddlyWikiの細かな振る舞いを設定します", content: '<<options>>'},
	upgrade: {text: "アップグレード", tooltip: "TiddlyWiki本体をバージョンアップします", content: '<<upgrade>>'},
	plugins: {text: "プラグイン", tooltip: "インストール済みのプラグインを管理します", content: '<<plugins>>'}
});

// Options that can be set in the options panel and/or cookies
merge(config.optionsDesc,{
	txtUserName: "編集したtiddlerに記録されるユーザ名",
	chkRegExpSearch: "検索に正規表現を使います",
	chkCaseSensitiveSearch: "検索で大文字小文字を区別します",
	chkIncrementalSearch: "インクリメンタルサーチを行います",
	chkAnimate: "アニメーションを許可します",
	chkSaveBackups: "保存時にバックアップファイルを残します",
	chkAutoSave: "自動保存します",
	chkGenerateAnRssFeed: "保存時にRSSフィードを生成します",
	chkSaveEmptyTemplate: "空のテンプレートファイルを保存時に生成します",
	chkOpenInNewWindow: "外部へのリンクを新しいウィンドウで開きます",
	chkToggleLinks: "tiddlerへのリンククリックでtiddlerを閉じます",
	chkHttpReadOnly: "HTTP経由で開いているときに編集機能を隠します",
	chkForceMinorUpdate: "更新時にユーザ名と日付を変更しません",
	chkConfirmDelete: "tiddlerを消去する時に確認をします",
	chkInsertTabs: "タブキーを押したとき、フィールド間の移動ではなくタブ文字を挿入します",
	txtBackupFolder: "バックアップ用フォルダの名前",
	txtMaxEditRows: "編集領域の最大行数",
	txtFileSystemCharSet: "保存時のデフォルト文字コード(Firefox/Mozillaのみ)"});

merge(config.messages,{
	customConfigError: "プラグインの読み込み時に問題が発生しました。詳細は PluginManager をご覧ください",
	pluginError: "エラー: %0",
	pluginDisabled: "'systemConfigDisable'タグによって実行が禁止されています",
	pluginForced: "'systemConfigForce'タグによって強制実行されました",
	pluginVersionError: "このプラグインの実行には、新しいバージョンの TiddlyWiki が必要です。",
	nothingSelected: "何も選択されていません。一つ以上選択する必要があります。",
	savedSnapshotError: "この~TiddlyWikiは正常に保存されていません。詳細は http://www.tiddlywiki.com/#DownloadSoftware をご覧ください。",
	subtitleUnknown: "(unknown)",
	undefinedTiddlerToolTip: "この tiddler '%0' はまだ作成されていません",
	shadowedTiddlerToolTip: "この tiddler '%0' はまだ作成されていませんが、隠された規定値があります",
	tiddlerLinkTooltip: "%0 - %1, %2",
	externalLinkTooltip: "(外部へのリンク) %0",
	noTags: "タグの付いた tiddler はありません",
	notFileUrlError: "変更を保存するにはこの~TiddlyWikiをファイルとして保存(ダウンロード)する必要があります",
	cantSaveError: "変更を保存できませんでした。以下の理由が考えられます:\n- 使用しているブラウザが保存に対応していない(Firefox/Internet Explorer/Safari/Operaは、正しく設定していれば保存できます)\n- TiddlyWikiファイルの保存path名に不正な文字が含まれている\n- TiddlyWiki HTMLファイルが移動または名前を変更された",
	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: "注意! TiddlyWiki の変更が保存されていません。\n\n'OK'で保存\n'キャンセル'で変更を破棄",
	confirmExit: "--------------------------------\n\nTiddlyWikiの変更が保存されていません。このまま続けると変更が失われます\n\n--------------------------------",
	saveInstructions: "変更を保存",
	unsupportedTWFormat: "次の TiddlyWiki フォーマットには対応していません '%0'",
	tiddlerSaveError: "tiddler '%0' を保存時にエラー発生",
	tiddlerLoadError: "tiddler '%0' の読込時にエラー発生",
	wrongSaveFormat: "保存フォーマット '%0' で保存できません。標準フォーマットで保存します",
	invalidFieldName: "%0 は不正なファイル名です",
	fieldCannotBeChanged: "領域 '%0' は変更できません",
	loadingMissingTiddler: "tiddler '%0' の '%1' サーバーからの回復を試しています:\n\nワークスペース '%3' の中の '%2'",
	upgradeDone: "バージョン %0 へのアップグレードが完了しました。\n'OK' をクリックすると新しくなったTiddlyWikiをリロードします。"});

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

config.messages.backstage = {
	open: {text: "クイックメニュー", tooltip: "クイックメニューを開きます"},
	close: {text: "閉じる", tooltip: "クイックメニューを閉じます"},
	prompt: "クイックメニュー: ",
	decal: {
		edit: {text: "編集", tooltip: "tiddler '%0' を編集します"}
	}
};

config.messages.listView = {
	tiddlerTooltip: "このtiddlerのテキスト全体を表示します",
	previewUnavailable: "(プレビューがありません)"
};

config.messages.dates.months = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月","12月"];
config.messages.dates.days = ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"];
config.messages.dates.shortMonths = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
config.messages.dates.shortDays = ["日", "月", "火", "水", "木", "金", "土"];
// suffixes for dates, eg "1st","2nd","3rd"..."30th","31st"
config.messages.dates.daySuffixes = ["日","日","日","日","日","日","日","日","日","日",
		"日","日","日","日","日","日","日","日","日","日",
		"日","日","日","日","日","日","日","日","日","日",
		"日"];
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: "tiddler '%0' はまだ作成されていません。ダブルクリックで作成できます",
	defaultModifier: "(missing)",
	shadowModifier: "(built-in shadow tiddler)",
	dateFormat: "YYYY.MM.DD", // 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: "タグあり: ",
	labelNotTag: "タグなし",
	tooltip: "'%0' タグを付けたtiddlerリスト"});

merge(config.macros.timeline,{
	dateFormat: "YYYY年MM月DD日"});// 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 = "アルファベット順 全tiddler";
config.macros.list.missing.prompt = "リンクがあるのに存在しないtiddler";
config.macros.list.orphans.prompt = "どこからもリンクされていないtiddler";
config.macros.list.shadowed.prompt = "規定で隠されているtiddler";
config.macros.list.touched.prompt = "ローカルに変更されているtiddler";

merge(config.macros.closeAll,{
	label: "全て閉じる",
	prompt: "表示されている全てのtiddlerを閉じます (編集中を除く)"});

merge(config.macros.permaview,{
	label: "現況リンク",
	prompt: "現在のtiddler表示状態を再現するURLをアドレス欄に生成します"});

merge(config.macros.saveChanges,{
	label: "保存",
	prompt: "全てのtiddlerを保存します",
	accessKey: "S"});

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

merge(config.macros.newJournal,{
	label: "新規ジャーナル",
	prompt: "現在日時がタイトルの新しいtiddlerを作成します",
	accessKey: "J"});

merge(config.macros.options,{
	wizardTitle: "詳細設定",
	step1Title: "これらのオプション設定はブラウザのcookieに保存されます",
	step1Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='false' name='chkUnknown'>未知のオプションを表示</input>",
	unknownDescription: "//(未知)//",
	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: "プラグイン管理",
	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: "Error", 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.toolbar,{
	lessLabel: "その他を閉じる",
	lessPrompt: "その他のコマンドを非表示します"
	});

merge(config.macros.refreshDisplay,{
	label: "再表示",
	prompt: "TiddlyWiki全体を再描画します"
	});

merge(config.macros.importTiddlers,{
	readOnlyWarning: "読込専用のTiddlyWikiには取り込めません。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のリストを取得中",
	errorGettingTiddlerList: "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: tiddler %0 を取り込み",
	step4Html: "<input type='hidden' name='markReport'></input>", // DO NOT TRANSLATE
	doneLabel: "完了",
	donePrompt: "ウィザードを閉じる",
	statusDoingImport: "tidderlを取り込み中",
	statusDoneImport: "全てのtiddlerを取り込みました",
	systemServerNamePattern: "%1 / %2",
	systemServerNamePatternNoWorkspace: "%1",
	confirmOverwriteSaveTiddler: "'%0' というtiddlerは既に存在します。'OK'で上書きします。'キャンセル'で変更しません。",
	serverSaveTemplate: "|''種別:''|%0|\n|''URL:''|%1|\n|''ワークスペース:''|%2|\n\nこのtiddlerはこのサーバーの詳細情報を記録するために自動的に作成されました",
	serverSaveModifier: "(System)",
	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.upgrade,{
	wizardTitle: "TiddlyWiki本体のアップグレード",
	step1Title: "このTiddlyWikiを最新版へ更新(あるいは修復)",
	step1Html: "TiddlyWiki本体のバージョンを <a href='%0' class='externalLink' target='_blank'>%1</a> から最新版に更新しようとしています。この更新をしてもあなたの作成したデータが削除されることはありません。<br><br>なお、本体をアップデートすることで旧プラグインの動作に支障が出る可能性があります。もし更新後の動作に問題が生じたときは、次のサイトを参照してください。<a href='http://www.tiddlywiki.org/wiki/CoreUpgrades' class='externalLink' target='_blank'>http://www.tiddlywiki.org/wiki/CoreUpgrades</a>",
	errorCantUpgrade: "このTiddlyWikiを更新できませんでした。ローカルに保存したファイルにしか、TiddlyWikiの更新はできません。",
	errorNotSaved: "更新を行う前にまずファイルを保存してください。",
	step2Title: "更新作業の詳細を確認",
	step2Html_downgrade: "TiddlyWikiのバージョンを %0 から %1 へダウングレードしようとしています。<br><br>TiddlyWiki本体を旧バージョンにダウングレードすることは推奨されません。",
	step2Html_restore: "このTiddlyWikiはすでに最新版(%0)です。<br><br>もちろんTiddlyWiki本体が破損していたときなどのために、このまま更新を継続することもできます。",
	step2Html_upgrade: "TiddlyWikiのバージョンを %0 から %1 に更新しようとしています。",
	upgradeLabel: "更新",
	upgradePrompt: "更新処理の準備",
	statusPreparingBackup: "バックアップの準備中",
	statusSavingBackup: "バックアップファイル保存中",
	errorSavingBackup: "バックアップファイルの保存中にエラーが発生しました",
	statusLoadingCore: "本体プログラムを読み込み中",
	errorLoadingCore: "本体プログラムの読み込み中にエラーが発生しました",
	errorCoreFormat: "新しいプログラムにエラーが発生しました",
	statusSavingCore: "本体プログラムの保存中",
	statusReloadingCore: "本体プログラムのリロード中",
	startLabel: "開始",
	startPrompt: "更新処理を開始する",
	cancelLabel: "キャンセル",
	cancelPrompt: "更新処理を中断する",
	step3Title: "更新処理を中断",
	step3Html: "更新処理を中断しました"
	});

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: "種別", type: 'String'},
			{name: 'Server Host', field: 'serverHost', title: "サーバーホスト", type: 'String'},
			{name: 'Server Workspace', field: 'serverWorkspace', title: "ワークスペース", type: 'String'},
			{name: 'Status', field: 'status', title: "同期ステータス", type: 'String'},
			{name: 'Server URL', field: 'serverUrl', title: "サーバーURL", text: "開く", type: 'Link'}
			],
		rowClasses: [
			],
		buttons: [
			{caption: "これらのtiddlerを同期", name: 'sync'}
			]},
	wizardTitle: "外部サーバーやファイルとの同期",
	step1Title: "同期したいtiddlerを選択してください",
	step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
	syncLabel: "同期",
	syncPrompt: "各tiddlerを同期します",
	hasChanged: "ローカル側変更あり",
	hasNotChanged: "ローカル側変更なし",
	syncStatusList: {
		none: {text: "...", color: "transparent", display:null},
		changedServer: {text: "サーバー側で変更あり", color: '#8080ff', display:null},
		changedLocally: {text: "ローカル側で変更あり", color: '#80ff80', display:null},
		changedBoth: {text: "双方で変更あり", color: '#ff8080', display:null},
		notFound: {text: "サーバーに見つかりません", color: '#ffff80', display:null},
		putToServer: {text: "更新をサーバーに保存しました", color: '#ff80ff', display:null},
		gotFromServer: {text: "サーバーから更新を取得しました", color: '#80ffff', display:null}
		}
	});

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' を削除して良いですか?"});

merge(config.commands.permalink,{
	text: "リンクURL",
	tooltip: "このtiddlerへのURLをアドレス欄に生成します"});

merge(config.commands.references,{
	text: "参照一覧",
	tooltip: "このtiddlerへの参照を一覧表示します",
	popupNone: "参照がありません"});

merge(config.commands.jump,{
	text: "ジャンプ",
	tooltip: "他に開いているtiddlerへジャンプ"});

merge(config.commands.syncing,{
	text: "同期",
	tooltip: "このtiddlerと外部のサーバー(ファイル)との同期を制御します",
	currentlySyncing: "<div>現在の同期状態<br>種別: <span class='popupHighlight'>'%0'</span><br></"+"div><div>ホスト: <span class='popupHighlight'>%1</span></"+"div><br><div>ワークスペース: <span class='popupHighlight'>%2</span></"+"div>", // Note escaping of closing <div> tag
	notCurrentlySyncing: "同期されていません",
	captionUnSync: "このtiddlerの同期を停止",
	chooseServer: "このtiddlerを次のサーバーと同期する:",
	currServerMarker: "\u25cf ",
	notCurrServerMarker: "  "});

merge(config.commands.fields,{
	text: "拡張情報",
	tooltip: "このtiddlerの拡張情報を表示します",
	emptyText: "このtiddlerには拡張情報がありません",
	listViewTemplate: {
		columns: [
			{name: 'Field', field: 'field', title: "項目", type: 'String'},
			{name: 'Value', field: 'value', title: "値", 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:このサイトのタイトルおよびサブタイトル。この上に表示されています。<br>保存後はブラウザのタイトルバーにも表示されます。\n;MainMenu: \n:メニュー。たいていは左側に表示されています。\n;DefaultTiddlers: \n:ここにtiddlerの名前が書かれていると、この TiddlyWiki を開いたときに、<br>そのtiddlerが初期表示されます。\nあなたの名前(編集したtiddlerに表示されます): <<option txtUserName>>",
	SiteTitle: "My TiddlyWiki",
	SiteSubtitle: "a reusable non-linear personal web notebook",
	SiteUrl: "http://www.tiddlywiki.com/",
	OptionsPanel: "これらの~TiddlyWikiを制御する各オプションの設定は、使用中のブラウザに保存されます。\n\n署名として使用するあなたの名前を~WikiWord形式(例 JoeBloggs)で入力してください。\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年MM月DD日" "ジャーナル">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "オプション \u00bb" "TiddlyWiki の詳細設定">>',
	SideBarTabs: '<<tabs txtMainTab "時系列" "更新時刻の降順" TabTimeline "全て" "全てのtiddler" TabAll "タグ別" "全てのタグ" TabTags "その他" "その他の一覧" TabMore>>',
	TabMore: '<<tabs txtMoreTab "未作成" "リンクがあるのに存在しないtiddler" TabMoreMissing "孤立" "どこからもリンクされていないtiddler" TabMoreOrphans "隠し" "隠されているtiddler" TabMoreShadowed>>'});

merge(config.annotations,{
	AdvancedOptions: "このtiddlerでは詳細オプションを設定できます",
	ColorPalette: "この隠しtiddlerで設定された各値によって、この~TiddlyWikiでの色の枠組みが規定されます。",
	DefaultTiddlers: "この隠しtiddlerに列挙された各tiddlerは、この~TiddlyWIkiを開くと同時に自動的に表示されます。",
	EditTemplate: "この隠しtiddlerにあるHTMLテンプレートは、tiddler編集中の表示方法を決定します。",
	GettingStarted: "この隠しtiddlerは基本的な使用方法を説明します。",
	ImportTiddlers: "この隠しtiddlerは他のtiddlerの取り込み機能を提供します。",
	MainMenu: "この隠しtiddlerの内容は「メインメニュー」に表示されます。画面左手に表示されます。",
	MarkupPreHead: "この隠しtiddlerの内容は、このTiddlyWikiHTMLファイルの<head>セクション開始直後に挿入されます。",
	MarkupPostHead: "この隠しtiddlerの内容は、このTiddlyWikiHTMLファイルの<head>セクション終了直前に挿入されます。",
	MarkupPreBody: "この隠しtiddlerの内容は、このTiddlyWikiHTMLファイルの<body>セクション開始直後に挿入されます。",
	MarkupPostBody: "この隠しtiddlerの内容は、このTiddlyWikiHTMLファイルのスクリプトブロック直後にある、<body>セクション終了直前に挿入されます。",
	OptionsPanel: "この隠しtiddlerの内容は、右手のサイドバー内でスライド式のオプションパネルとして表示されます。",
	PageTemplate: "この隠しtiddlerにあるHTMLテンプレートは、~TiddlyWiki全体のレイアウトを決定します。",
	PluginManager: "この隠しtiddlerはプラグインマネージャ機能を提供します。",
	SideBarOptions: "この隠しtiddlerの内容は右手のサイドバー内のオプションパネルとして表示されます。",
	SideBarTabs: "この隠しtiddlerの内容は右手のサイドバー内にタブパネルとして表示されます。",
	SiteSubtitle: "この隠しtiddlerはページのサブタイトルとして利用されます。",
	SiteTitle: "この隠しtiddlerはページのメインタイトルとして利用されます。",
	SiteUrl: "この隠しtiddlerには、このTiddlyWikiを公開する際のURLを指定する必要があります。",
	StyleSheetColors: "この隠しtiddlerはページ内各要素の色に関するCSSを規定します。このtiddlerを編集しないでください。色を修正するには代わりに StyleSheet 隠しtiddler を編集してください。",
	StyleSheet: "この隠しtiddlerはカスタムCSSを規定します。",
	StyleSheetLayout: "この隠しtiddlerはページ内各要素のレイアウトに関するCSSを規定します。このtiddlerを編集しないでください。レイアウトを修正するには代わりに StyleSheet 隠しtiddler を編集してください。",
	StyleSheetLocale: "この隠しtiddlerはページ内各要素の翻訳ロケールに関するCSSを規定します。",
	StyleSheetPrint: "この隠しtiddlerは印刷に関するCSSを規定します。",
	TabAll: "この隠しtiddlerの内容は右手のサイドバー内「全て」タブに表示されます。",
	TabMore: "この隠しtiddlerの内容は右手のサイドバー内「その他」タブに表示されます。",
	TabMoreMissing: "この隠しtiddlerの内容は右手のサイドバー内「未作成」タブに表示されます。",
	TabMoreOrphans: "この隠しtiddlerの内容は右手のサイドバー内「孤立」タブに表示されます。",
	TabMoreShadowed: "この隠しtiddlerの内容は右手のサイドバー内「隠し」タブに表示されます。",
	TabTags: "この隠しtiddlerの内容は右手のサイドバー内「タグ別」タブに表示されます。",
	TabTimeline: "この隠しtiddlerの内容は右手のサイドバー内「時系列」タブに表示されます。",
	ToolbarCommands: "この隠しtiddlerはtiddlerツールバーにどのようなコマンドを表示するかを決定します。",
	ViewTemplate: "この隠しtiddlerにあるHTMLテンプレートは、各tiddlerの表示方法を決定します。"
	});
//}}}
/***
|''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"
//}}}
<<googlesearch "MFC Feature Pack">>
!これってなに
VC2008から始まった、MFCの追加パック
視覚的な強化がかなりされている
まだヘルプなど英語だが、もうすぐ配布されるsp1からは日本語対応するらしい
スマートドッキングなど便利なGUI処理が標準で内蔵され、~CDesktopAlertWndなど視覚的な付加機能が増えている
!Info
http://codezine.jp/a/article/aid/2516.aspx
Excelライクのコントロール
<<showtoc>>
!関数一覧
 MSFlexGrid関数一覧
 http://ayusya.hp.infoseek.co.jp/VCGrid.html
 MSFlexGrid使用方法
 http://hp.vector.co.jp/authors/VA014436/prg_memo/windows/vctips/004.html
!使用方法
 MSFlexGridの使用方法
 http://noribeat.s38.xrea.com/developer/03031501.html
 VCでのMSFlexGridの使用方法(codeguru-英語)
 http://www.codeguru.com/Cpp/controls/controls/gridcontrol/article.php/c5225/
 使用方法
 http://7ujm.net/C++/FlexGrid.html
 キーを押したときなどにエディットボックスを表示する方法
 http://ayusya.hp.infoseek.co.jp/ProgramCMSFlexGrid.html
!類似クラス
 codeguru-gridcontrol
 http://www.codeguru.com/Cpp/controls/controls/gridcontrol/
!MSFlexGridの主要プロパティ一覧表
MSFlexGridのプロパティって数が多く見慣れない名前の物が多いせいか、便利な機能なのに案外知られていない物があります。
独自の解釈による分類をしておりますので検討をつけて探して下さい。詳しくはヘルプを見て下さい。
!!色に関するプロパティ
*{{{BackColor}}}
**すべての非固定型のセルの色を設定します。
>{{{MSFlexGrid1.BackColor = QBColor(14)}}}
*{{{BackColorBkg}}}
**グリッドのバックグラウンドの背景色(セル以外の部分)を設定します。
>{{{MSFlexGrid1.BackColorBkg = QBColor(12)}}}|
*{{{BackColorFixed}}}
**固定のセルの背景色をせっていします。
>{{{MSFlexGrid1.BackColorFixed = QBColor(9)}}}
*{{{BackColorSel}}}
**カレントセルの背景色を設定します。但し、{{{FocusRect =flexFocusNone}}}の時に有効
>{{{MSFlexGrid1.BackColorSel = QBColor(10)}}}
*{{{CellBackColor}}}
**セルの背景色を個別に設定します。
>{{{MSFlexGrid1.CellBackColor = QBColor(15)}}}
*{{{CellBackColor}}}
**個々のセルまたは特定範囲のセルの背景色を設定・取得します
>{{{MSFlexGrid1.CellBackColor = QBColor(12)}}}
*{{{CellForeColor}}}
**個々のセルまたは特定範囲のセルの前景色を設定・取得します。
>{{{MSFlexGrid1.CellForeColor = QBColor(12)}}}
*{{{ForeColor}}}
**コントロールの非固定セルのテキストの色を設定・取得します。
>{{{MSFlexGrid1.ForeColor = QBColor(12)}}}
*{{{ForeColorFixed}}}
**コントロールの固定セルの文字色を設定・取得します。
>{{{MSFlexGrid1.ForeColorFixed = QBColor(12)}}}
*{{{ForeColorSel}}}
**コントロールの選択されている部分の文字色を設定・取得します。
>{{{MSFlexGrid1.ForeColorSel = QBColor(12)}}}
*{{{GridColor}}}
**コントロールの非固定セルのグリッド線の色を設定・取得します。
>{{{MSFlexGrid1.GridColor = QBColor(12)}}}
*{{{GridColorFixed}}}
**コントロールの固定セルのグリッド線(右と下側の外枠)の色を設定・取得します。
>{{{MSFlexGrid1.GridColorFixed = QBColor(12)}}}
!!行・列に関するプロパティ
*{{{AllowBigSelection}}}
**列見出しまたは行見出しをクリックすると、その列または行全体が選択されるようにするかどうかを設定します。値の取得も可能です。
>{{{MSFlexGrid1.AllowBigSelection =True}}}
*{{{AllowBigSelection}}}
**列見出しまたは行見出しをクリックすると、その列または行全体が選択されるようにするかどうかを設定します。
>{{{MSFlexGrid1.AllowBigSelection =True}}}
*{{{AllowUserResizing}}}
**ユーザーがマウスを使って、行および列のサイズを変更できるかどうかを決定する値を設定します。値の取得も可能です。
>{{{MSFlexGrid1.AllowUserResizing =True}}}
*{{{AllowUserResizing}}}
**行および列のサイズを変更できるかどうかを決定する値を設定します。
>{{{MSFlexGrid1.AllowUserResizing = flexResizeColumns}}}
*{{{Col}}}
**アクティブ セル(列)の座標を設定・取得します。
>{{{MSFlexGrid1.Col = 3   CurrentCol=MSFlexGrid1.Col}}}
*{{{ColData}}}
**列を識別するユーザ定義番号を設定・取得します
>ヘルプ参照
*{{{Cols}}}
**コントロール内の列の総数を設定・取得します
>{{{MSFlexGrid1.Cols = 5  MyCols = MSFlexGrid1.Cols}}}
*{{{ColSel}}}
**セルの範囲の先頭列と最終列を設定します。値の取得も可能です
>{{{MyColSel = MSFlexGrid1.ColSel}}}
*{{{MouseCol}}}
**現在のマウス ポインタの位置の列番号を返します(ヘルプの解説は要注意 設定は出来ません)
>{{{myMouseCol = MSFlexGrid1.MouseCol}}}
*{{{MouseRow}}}
**現在のマウス ポインタの位置の行番号を返します
>{{{myMouseRow = MSFlexGrid1.MouseRow}}}
*{{{Row}}}
**アクティブ セル(行)の座標を設定・取得します。
>{{{MSFlexGrid1.Row = 3   CurrentRow=MSFlexGrid1.Row}}}
*{{{RowData}}}
**行を識別するユーザ定義番号を設定・取得します
>ヘルプ参照
*{{{Rows}}}
**コントロール内の行の総数を設定・取得します
>{{{MSFlexGrid1.Rows = 8 MyRows = MSFlexGrid1.Rows}}}
*{{{RowSel}}}
**セルの範囲の先頭行と最終行を設定します。値の取得も可能です。
>{{{MSFlexGrid1.RowSel = 2MSFlexGrid1.ColSel = 4}}}
*{{{SelectionMode}}}
**行単位または列単位の範囲指定を可能にするかどうか指定する値を設定します
>{{{MSFlexGrid1.SelectionMode = flexSelectionByRow}}}

!!体裁(外観)関するプロパテイ
*{{{Appearance}}}
**実行時にコントロールが立体的に表示されるかどうかを設定します。
>{{{MSFlexGrid1.Appearance = flex3D}}}
*{{{ScrollTrack}}}
**コントロールが内容をスクロールするかどうかを決定する値を設定します。
>{{{MSFlexGrid1.ScrollTrack = True}}}
!!体裁(行・列)関するプロパテイ
*{{{CellAlignment}}}
**カレント セル内でのデータの水平配置および垂直配置を決定する値を設定・取得します。
>{{{MSFlexGrid1.CellAlignment = flexAlignRightBottom}}}
*{{{CellPicture}}}
**カレント セルまたはセルの範囲に表示されるイメージを設定・取得します
>{{{Set MSFlexGrid1.CellPicture = LoadPicture("c:\Face.ico")}}}
*{{{ColWidth()}}}
**指定のバンド内の列の幅をtwip 単位で設定・取得します。
>{{{MSFlexGrid1.ColWidth(1) = 1500}}}
*{{{FixedCols}}}
**コントロール内の固定型の列の総数を設定・取得します。
>{{{MSFlexGrid1.FixedCols = 2}}}
*{{{FixedRows}}}
**コントロール内の固定型の行の総数を設定・取得します。
>{{{MSFlexGrid1.FixedRows = 2}}}
*{{{MergeCells}}}
**複数の行または列の範囲で、同じ内容のセルを単一のセルにグループ化するかどうかを指定する値を設定します。値の取得も可能です。
>{{{MSFlexGrid1.MergeCells = flexMergeFree}}}
*{{{MergeCol}}}
**内容をマージできる列を指定する値を設定します。
>{{{MSFlexGrid1.MergeCol(3) = True<BR>MSFlexGrid1.MergeCells = flexMergeFree}}}
*{{{MergeRow}}}
**内容をマージできる行を指定する値を設定します。
>{{{MSFlexGrid1.MergeRow(3) = True<BR>MSFlexGrid1.MergeCells = flexMergeFree}}}
*{{{RowHeight}}}
**指定された行の高さをtwip 単位で設定・取得します。
>{{{MSFlexGrid1.RowHeight(2) = 350}}}
*{{{RowHeightMin}}}
**コントロール全体で最も低い行の高さをtwip 単位で設定します。値の取得も可能です。
>{{{MSFlexGrid1.RowHeightMin = 400}}}
!!体裁(図形・線等)関するプロパテイ
*{{{CellPictureAlignment}}}
**カレント セルまたは選択されたセルの範囲内のピクチャの配置を設定・取得します
>{{{MSFlexGrid1.CellPictureAlignment = flexAlignCenterCenter}}}
*{{{FocusRect}}}
**コントロールがカレント セルにフォーカスを示す四角形を描くかどうかを指定する値を設定します。値の取得も可能です。
>{{{MSFlexGrid1.FocusRect = flexFocusNone<BR>MSFlexGrid1.HighLight = flexHighlightAlways}}}
*{{{HighLight}}}
**コントロール内で選択されたセルを強調表示するかどうかを指定する値を設定します。
>{{{MSFlexGrid1.HighLight = flexHighlightNever}}}
*{{{GridLines}}}
**非固定セルのグリッド線のスタイルを設定・取得します。
>{{{MSFlexGrid1.GridLines = flexGridNone}}}
*{{{GridLinesFixed}}}
**固定セルのグリッド線のスタイルを設定・取得します。
>{{{MSFlexGrid1.GridLinesFixed = flexGridNone}}}
*{{{GridLineWidth}}}
**非固定セルのグリッド線の幅をピクセル単位で設定・取得します。
>{{{MSFlexGrid1.GridLineWidth = 3}}}
!!体裁(テキスト)関するプロパテイ
*{{{ColAlignment}}}
**列内のデータの配置を設定・取得します。
>{{{MSFlexGrid1.ColAlignment(3) = flexAlignCenterCenter}}}
*{{{FixedAlignment}}}
**固定列テキストに表示するデータの配置を設定・取得します
>{{{MSFlexGrid1.FixedAlignment(3) = flexAlignCenterCenter}}}
*{{{TextStyle}}}
**非固定セルのテキストの3D表示を設定・取得します。
>{{{MSFlexGrid1.TextStyle = flexTextRaised}}}
*{{{TextStyleFixed}}}
**固定セルのテキストの3D表示を設定・取得します。
>{{{MSFlexGrid1.TextStyleFixed = flexTextRaised}}}
*{{{WordWrap}}}
**テキストのワードラップ(折り返し機能)を設定・取得します
>{{{MSFlexGrid1.WordWrap = True}}}
!!体裁(フォント)関するプロパテイ
*{{{CellFontBold}}}
**カレント セルのフォントを太字に設定・取得します
>{{{MSFlexGrid1.CellFontBold = True}}}
*{{{CellFontItalic}}}
**カレント セルのフォントを斜体に設定・取得します
>{{{MSFlexGrid1.CellFontItalic = True}}}
*{{{CellFontName}}}
**カレント セルのテキストを特定のフォントに設定します。
>{{{MSFlexGrid1.CellFontName = "MS 明朝"}}}
*{{{CellFontSize}}}
**カレント セルのフォントサイズをポイント単位で設定・取得します
>{{{MSFlexGrid1.CellFontSize = 12}}}
*{{{CellFontStrikeThrough}}}
**カレント セルのフォントに取り消し線のスタイルを設定・取得します
>{{{MSFlexGrid1.CellFontStrikeThrough = True}}}
*{{{CellFontUnderline}}}
**カレント セルのフォントにアンダーラインを設定・取得します
>{{{MSFlexGrid1.CellFontUnderline = True}}}
*{{{CellFontWidth}}}
**カレント セルのテキストの幅をポイント単位で設定・取得します
>{{{MSFlexGrid1.CellFontWidth = 18}}}
*{{{CellTextStyle}}}
**特定のセルまたはセルの範囲にあるテキストに立体表示のテキストを設定・取得します
>{{{MSFlexGrid1.CellTextStyle = flexTextInset}}}
*{{{Font}}}
**既定のフォントまたは個々のセルのフォントを設定・取得します。
>{{{MSFlexGrid1.Font = "MS 明朝"}}}
*{{{FontWidth}}}
**表示されるテキストのフォントの幅をポイント単位で設定・取得します。
>{{{MSFlexGrid1.FontWidth = 7}}}
!!編集に関するプロパテイ
*{{{CellLeft}}}
**カレントセルの左端の位置を返します。(ヘルプ不親切)
>{{{myCellLeft = MSFlexGrid1.CellLeft}}}
*{{{CellTop}}}
**カレントセルの上端の位置を返します。(ヘルプ不親切)
>{{{myCellTop = MSFlexGrid1.CellTop}}}
*{{{CellWidth}}}
**カレントセルの幅を返します。(ヘルプ不親切)
>{{{myCellWidth = MSFlexGrid1.CellWidth}}}
*{{{CellHeight}}}
**カレントセルの高さを返します。(ヘルプ不親切)
>{{{myCellHeight = MSFlexGrid1.CellHeight}}}
*{{{Clip}}}
**選択された領域内のセルの値を設定します。値の取得も可能です
>{{{myStr = &quot;James&quot; + Chr(9) + &quot;Nancy&quot; + Chr(9) + &quot;Lisa&quot;<BR>MSFlexGrid1.Clip = myStr}}}
*{{{ColIsVisible}}}
**指定された列が現在表示されているかどうかを示す値を返します
>{{{myColIsVisible = MSFlexGrid1.ColIsVisible(2)}}}
*{{{ColPos}}}
**コントロールの左上隅から指定された列の左上隅までの距離を示す値をtwip 単位で返します。
>{{{myColPos = MSFlexGrid1.ColPos(2)}}}
*{{{ColPosition()}}}
**列の位置を設定します。列を特定の位置に移動できます
>{{{MSFlexGrid1.ColPosition(3) = 5}}}
*{{{FillStyle}}}
**コントロールのセルの書式設定をするプロパティの 1 つが変更されたとき、その変更を選択されたすべてのセルに適用するかどうかを指定する値を設定します。値の取得も可能です。
>{{{MSFlexGrid1.FillStyle = flexFillRepeat}}}
*{{{FormatString}}}
**列の幅、配置、固定型の行のテキスト、および固定型の列のテキストを設定します。
>{{{MSHFlexGrid.FormatString = s$}}}
*{{{LeftCol}}}
**コントロールの左端に表示する非固定型の列を設定・取得します。(列をスクロールする時に一番左端に表示したい列番号)
>{{{MSFlexGrid1.LeftCol = 5 ’スクロール時の先頭列}}}
*{{{Picture}}}
**Pictureコントロール等へMSFlexGrid1のスナップショットを送ります
>{{{Set Picture1.Picture = MSFlexGrid1.Picture}}}
*{{{Redraw}}}
**コントロールで変更が行われた後、自動的に再描画するかどうかを指定する値を設定します。
>{{{MSFlexGrid1.Redraw = True}}}
*{{{RowIsVisible}}}
**指定の行が現在画面に表示されているかどうかを返します
>{{{myRowIsVisible = MSFlexGrid1.RowIsVisible(3)}}}
*{{{RowPos}}}
**コントロールの左上隅から指定の行の左上隅までの距離をtwip 単位で返します。
>{{{myRowPos = MSFlexGrid1.RowPos(5)}}}
*{{{RowPosition}}}
**行の位置を設定します。行を特定の位置に移動できます
>{{{MSFlexGrid1.RowPosition(3) = 5}}}
*{{{Sort}}}
**選択された基準に従って選択行を並べ替える値を設定します。
>{{{MSFlexGrid1.Col = &quot;[ソート対象列]&quot;<BR>MSFlexGrid1.Sort = flexSortGenericAscending}}}
*{{{Text}}}
**セルのテキスト内容を設定・取得します
>{{{MSFlexGrid1.Text = "あいう"}}}
*{{{TextArray}}}
**関数を定義することにより、cellindex の計算方法を示します。
>{{{MSFlexGrid1.TextArray(faIndex(i, 1)) = &quot;詳しくはヘルプ参照&quot;}}}
*{{{TextMatrix}}}
**任意のセルのテキストを設定します。値の取得も可能です
>{{{MSFlexGrid1.TextMatrix(5, 4) = &quot;1234&quot;}}}
*{{{TopRow}}}
**コントロールの先頭に表示される非固定型の行を設定・取得します。(行をスクロールする時に一番上に表示したい行番号)
>{{{MSFlexGrid1.TopRow = 7 ’スクロール時の先頭行}}}
!!その他のプロパテイ
*{{{DataSource}}}
**連結するデータ ソースを設定・取得します。
>{{{Set Text1.DataSource = ADODC1}}}
*{{{PictureType}}}
**Picture プロパティによって生成されるピクチャの種類(カラーか白黒かを)を設定します。
>{{{MSFlexGrid1.PictureType = flexPictureColor}}}
*{{{Version}}}
**MSFlexGridコントロールのバージョン番号を返します
>{{{Debug.Print MSFlexGrid1.Version}}}
[[tags|TagCloud]][[SiteMap]]<<popup Link [[<<forEachTiddler where 'tiddler.tags.contains("Link") && !tiddler.tags.contains("excludeTagger")' sortBy 'tiddler.title' write '"*[["+tiddler.title+"|"+tiddler.title+"\]\]\n"'$))]]>><<search>>[[]]
@@color(#aaa):TW core ver.<<version>>@@/%
<script label="R">
   if (!window.story) window.story=window;
  location.reload()
</script>%/
<<tiddler LoadScripts>> 
<<search>>[[tags|TagCloud]]<<popup cs [[<<forEachTiddler where 'tiddler.tags.contains("cs") && !tiddler.tags.contains("excludeTagger")' sortBy 'tiddler.title' write '"*[["+tiddler.title+"|"+tiddler.title+"\]\]\n"'$))]]>><<popup TW [[<<forEachTiddler where 'tiddler.tags.contains("TiddlyWiki") && !tiddler.tags.contains("excludeTagger")' sortBy 'tiddler.title' write '"*[["+tiddler.title+"|"+tiddler.title+"\]\]\n"'$))]]>>[[Prg|プログラミング]]<<popup memo [[<<forEachTiddler where 'tiddler.tags.contains("memo") && !tiddler.tags.contains("excludeTagger")' sortBy 'tiddler.title' write '"*[["+tiddler.title+"|"+tiddler.title+"\]\]\n"'$))]]>>[[SiteMap]]<<popup Link [[<<forEachTiddler where 'tiddler.tags.contains("Link") && !tiddler.tags.contains("excludeTagger")' sortBy 'tiddler.title' write '"*[["+tiddler.title+"|"+tiddler.title+"\]\]\n"'$))]]>>
@@color(#aaa):TW core ver.<<version>>@@/%
<script label="R">
   if (!window.story) window.story=window;
  location.reload()
</script>%/
<<tiddler LoadScripts>> 
<!--{{{-->
<!-- shinobi ct2 -->
<script type="text/javascript" src="http://ct2.tsuchigumo.com/sc/1156396"></script>
<noscript><a href="http://ct2.tsuchigumo.com/gg/1156396" target="_blank">
<img src="http://ct2.tsuchigumo.com/ll/1156396" border="0" alt="カウンター" /></a><br />
<span id="NINCT1SPAN1156396" style="font-size:9px">[PR] <a href="http://ess.rental-rental.net" target="_blank">ウイルス対策</a></span></noscript>
<!-- /shinobi ct2 -->
<!--shinobi1-->
<script type="text/javascript" src="http://x7.kutinawa.com/ufo/098802002"></script>
<noscript><a href="http://x7.kutinawa.com/bin/gg?098802002" target="_blank">
<img src="http://x7.kutinawa.com/bin/ll?098802002" border="0"></a><br>
<span style="font-size:9px"><img style="margin:0;vertical-align:text-bottom;" src="http://img.shinobi.jp/tadaima/fj.gif" width="19" height="11"> <a href="http://monthly_hukuoka.rentalurl.net" target="_blank">マンスリーマンション 福岡</a></span></noscript>
<!--shinobi2-->
<script src="http://www4.atpages.jp/rane/clz_other/coolyze.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
Coolyze();
// -->
</script>
<noscript>
<img width=1 height=1 src="http://www4.atpages.jp/rane/clz_other/acc2.php?mode=rec&url=noscript">
</noscript>

<!--}}}-->
<!--{{{-->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-4071080-7']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<!--}}}-->

<!--{{{-->

<!--}}}-->
/***
''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.9|
|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.11.15 - 2.4.9 in adjustNestedSlider(), don't make adjustments if panel is marked as 'undocked' (CSS class).  In onClickNestedSlider(), SHIFT-CLICK docks panel (see [[MoveablePanelPlugin]])
|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: 9, date: new Date(2008,11,15)};

// 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 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.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";

	// if SHIFT-CLICK, dock panel first (see [[MoveablePanelPlugin]])
	if (e.shiftKey && config.macros.moveablePanel) config.macros.moveablePanel.dock(theSlider,e);

	// 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")
				{ try{ ctrls[c].focus(); } catch(err){;} break; }
		}
	}
	var cookie=theTarget.sliderCookie;
	if (cookie && cookie.length) {
		config.options[cookie]=!isOpen;
		if (config.options[cookie]!=theTarget.defOpen) window.saveOptionCookie(cookie);
		else window.removeCookie(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})
		if (!hasClass(all[i],"floatingPanel")&&!hasClass(all[i],"sliderPanel")) all[i].style.display="none";
	}
	return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
	if (hasClass(panel,"floatingPanel") && !hasClass(panel,"undocked")) {
		// see [[MoveablePanelPlugin]] for use of 'undocked'
		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);
		}
	};
}
//}}}
/***
|Name|NestedSlidersPluginInfo|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.9|
|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|documentation|
|Requires||
|Overrides||
|Description|documentation for NestedSlidersPlugin|
This plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content.
!!!!!Usage
<<<
Use {{{+++}}} and {{{===}}} to delimit the slider content.  You can also 'nest' these sliders as deep as you like (see complex nesting example below), so that expandable 'tree-like' hierarchical displays can be created.  This is most useful when converting existing in-line text content to create in-line annotations, footnotes, context-sensitive help, or other subordinate information displays.

Additional optional syntax elements let you specify
*default to open
*cookiename
*heading level
*floater (with optional CSS width value)
*transient display (clicking elsewhere closes panel)
*open on hover (without needing to click)
*custom class/label/tooltip/accesskey
*alternate label/tooltip (displayed when panel is open)
*panelID (for later use with {{{<<DOM>>}}} macro.  See [[DOMTweaksPlugin]])
*automatic blockquote style on panel
*deferred rendering of panel content
The complete syntax, using all options, is:
//{{{
++++(cookiename)!!!!!^width^*@{{class{[label=key|tooltip][altlabel|alttooltip]}}}#panelID:>...
content goes here
===
//}}}
where:
* ''"""+++""" (or """++++""") and """==="""''<br>marks the start and end of the slider definition, respectively.  When the extra {{{+}}} is used, the slider will be open when initially displayed.
* ''"""(cookiename)"""''<br>saves the slider opened/closed state, and restores this state whenever the slider is re-rendered.
* ''"""! through !!!!!"""''<br>displays the slider label using a formatted headline (Hn) style instead of a button/link style
* ''"""^width^ (or just ^)"""''<br>makes the slider 'float' on top of other content rather than shifting that content downward.  'width' must be a valid CSS value (e.g., "30em", "180px", "50%", etc.).  If omitted, the default width is "auto" (i.e., fit to content)
* ''"""*"""''<br>denotes "transient display": when a click occurs elsewhere in the document, the slider/floating panel will be automatically closed.  This is useful for creating 'pulldown menus' that automatically go away after they are used.  //Note: using SHIFT-click on a slider label will open/close that slider without triggering the automatic closing of any transient slider panels that are currently displayed, permitting ''temporary'' display of several transient panels at once.//
* ''"""@"""''<br>denotes "open on hover": the slider/floating panel will be automatically opened as soon as the mouse moves over the slider label, without requiring a click.
* ''"""{{class{[label=key|tooltip][altlabel|alttooltip]}}}"""''<br>uses label/tooltip/accesskey.  """{{class{...}}}""", """=key""", """|tooltip""" and """[altlabel|alttooltip]""" are optional.  'class' is any valid CSS class name, used to style the slider label text.  'key' must be a ''single letter only''.  altlabel/alttooltip specify alternative label/tooltip for use when slider/floating panel is displayed.  //Note: you can use HTML syntax within the label text to include HTML entities (e.g., {{{&raquo;}}} (&raquo;) or {{{&#x25ba;}}} (&#x25ba;), or even embedded images (e.g., {{{<img src="images/eric3.gif">}}}).//
* ''"""#panelID:"""''<br>defines a unique DOM element ID that is assigned to the panel element used to display the slider content.  This ID can then be used later to reposition the panel using the {{{<<DOM move id>>}}} macro (see [[DOMTweaksPlugin]]), or to access/modify the panel element through use of {{{document.getElementById(...)}}}) javascript code in a plugin or inline script.
* ''""">"""''<br>automatically adds blockquote formatting to slider content
* ''"""..."""''<br>defers rendering of closed sliders until the first time they are opened.  //Note: deferred rendering may produce unexpected results in some cases.  Use with care.//

//Note: to make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the {{{+++}}} 'start slider' or preceding the {{{===}}} 'end slider' sequence are automatically supressed so that excess whitespace is eliminated from the output.//
<<<
!!!!!Examples
<<<
simple in-line slider: 
{{{
+++
   content
===
}}}
+++
   content
===
----
use a custom label and tooltip: 
{{{
+++[label|tooltip]
   content
===
}}}
+++[label|tooltip]
   content
===
----
content automatically blockquoted: 
{{{
+++>
   content
===
}}}
+++>
   content
===
----
all options (except cookie) //(default open, heading, sized floater, transient, open on hover, class, label/tooltip/key, blockquoted, deferred)//
{{{
++++!!!^30em^*@{{big{[label=Z|click or press Alt-Z to open]}}}>...
   content
===
}}}
++++!!!^30em^*@{{big{[label=Z|click or press Alt-Z to open]}}}>...
   content
===
----
complex nesting example:
{{{
+++[get info...=I|click for information or press Alt-I]
	put some general information here,
	plus a floating panel with more specific info:
	+++^10em^[view details...|click for details]
		put some detail here, which could in turn contain a transient panel,
		perhaps with a +++^25em^*[glossary definition]explaining technical terms===
	===
===
}}}
+++[get info...=I|click for information or press Alt-I]
	put some general information here,
	plus a floating panel with more specific info:
	+++^10em^[view details...|click for details]
		put some detail here, which could in turn contain a transient panel,
		perhaps with a +++^25em^*[glossary definition]explaining technical terms===
	===
===
----
embedded image as slider button
{{{
+++[<img src=images/eric3.gif>|click me!]>
	{{big{OUCH!}}}
===
}}}
+++[<img src=images/eric3.gif>|click me!]>
	{{big{OUCH!}}}
===
<<<
!!!!!Revisions
<<<
2008.11.15 - 2.4.9 in adjustNestedSlider(), don't make adjustments if panel is marked as 'undocked' (CSS class).  In onClickNestedSlider(), SHIFT-CLICK docks panel (see [[MoveablePanelPlugin]])
2008.11.13 - 2.4.8 in document.onclick(), if transient panel is not a sliderPanel or floatingPanel, hide it via CSS
2008.10.05 - 2.4.7 in onClickNestedSlider(), added try/catch around focus() call to prevent IE error if input field being focused on is currently not visible.
2008.09.07 - 2.4.6 added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.06.07 - 2.4.5 in 'onmouseover' handler for 'open on hover' slider buttons, use call() method when invoking document.onclick function (avoids error in IE)
2008.06.07 - 2.4.4 changed default for chkFloatingSlidersAnimate to FALSE to avoid clipping problem on some browsers (IE).  Updated Morpher hijack (again) to adjust regular sliderPanel styles as well as floatingPanel styles.
2008.05.07 - 2.4.3 updated Morpher hijack to adjust floatingPanel styles after animation without affecting other animated elements (i.e. popups).  Also, updated adjustSliderPos() to account for scrollwidth and use core findWindowWidth().
2008.04.02 - 2.4.2 in onClickNestedSlider, handle clicks on elements contained //within// slider buttons (e.g., when using HTML to display an image as a slider button).
2008.04.01 - 2.4.1 open on hover also triggers document.onclick to close other transient sliders
2008.04.01 - 2.4.0 re-introduced 'open on hover' feature using "@" symbol
2008.03.26 - 2.3.5 in document.onclick(), if click is in popup, don't dismiss transient panel (if any)
2008.01.08 - [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.28 - 2.3.4 added hijack for Animator.prototype.startAnimating().  Previously, the plugin code simply set the overflow to "visible" after animation.  This code tweak corrects handling of elements that were styled with overflow=hidden/auto/scroll before animation by saving the overflow style and then restoring it after animation has completed.
2007.12.17 - 2.3.3 use hasClass() instead of direct comparison to test for "floatingPanel" class.  Allows floating panels to have additional classes assigned to them (i.e., by AnimationEffectsPlugin).
2007.11.14 - 2.3.2 in onClickNestedSlider(), prevent SHIFT-click events from opening a new, empty browser window by setting "cancelBubble=true" and calling "stopPropagation()".  Note: SHIFT-click is still processed as a normal click (i.e., it toggles the slider panel display).  Also, using SHIFT-click will prevent 'transient' sliders from being automatically closed when another slider is opened, allowing you to *temporarily* display several transient sliders at once.
2007.07.26 - 2.3.1 in document.onclick(), propagate return value from hijacked core click handler to consume OR bubble up click as needed.  Fixes "IE click disease", whereby nearly every mouse click causes a page transition.
2007.07.20 - 2.3.0 added syntax for setting panel ID (#panelID:).  This allows individual slider panels to be repositioned within tiddler content simply by giving them a unique ID and then moving them to the desired location using the {{{<<DOM move id>>}}} macro.
2007.07.19 - 2.2.0 added syntax for alttext and alttip (button label and tooltip to be displayed when panel is open)
2007.07.14 - 2.1.2 corrected use of 'transient' attribute in IE to prevent (non-recursive) infinite loop
2007.07.12 - 2.1.0 replaced use of "*" for 'open/close on rollover' (which didn't work too well).  "*" now indicates 'transient' panels that are automatically closed if a click occurs somewhere else in the document.  This permits use of nested sliders to create nested "pulldown menus" that automatically disappear after interaction with them has been completed.  Also, in onClickNestedSlider(), use "theTarget.sliderCookie", instead of "this.sliderCookie" to correct cookie state tracking when automatically dismissing transient panels.
2007.06.10 - 2.0.5 add check to ensure that window.adjustSliderPanel() is defined before calling it (prevents error on shutdown when mouse event handlers are still defined)
2007.05.31 - 2.0.4 add handling to invoke adjustSliderPanel() for onmouseover events on slider button and panel.  This allows the panel position to be re-synced when the button position shifts due to changes in unrelated content above it on the page.  (thanks to Harsha for bug report)
2007.03.30 - 2.0.3 added chkFloatingSlidersAnimate (default to FALSE), so that slider animation can be disabled independent of the overall document animation setting (avoids strange rendering and focus problems in floating panels)
2007.03.01 - 2.0.2 for TW2.2+, hijack Morpher.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends
2007.03.01 - 2.0.1 in hijack for Slider.prototype.stop, use apply() to pass params to core function
2006.07.28 - 2.0.0 added custom class syntax around label/tip/key syntax: {{{{{classname{[label=key|tip]}}}}}}
2006.07.25 - 1.9.3 when parsing slider, save default open/closed state in button element, then in onClickNestedSlider(), if slider state matches saved default, instead of saving cookie, delete it.  Significantly reduces the 'cookie overhead' when default slider states are used.
2006.06.29 - 1.9.2 in onClickNestedSlider(), when setting focus to first control, skip over type="hidden"
2006.06.22 - 1.9.1 added panel.defaultPanelWidth to save requested panel width, even after resizing has changed the style value
2006.05.11 - 1.9.0 added optional '^width^' syntax for floating sliders and '=key' syntax for setting an access key on a slider label
2006.05.09 - 1.8.0 in onClickNestedSlider(), when showing panel, set focus to first child input/textarea/select element
2006.04.24 - 1.7.8 in adjustSliderPos(), if floating panel is contained inside another floating panel, subtract offset of containing panel to find correct position
2006.02.16 - 1.7.7 corrected deferred rendering to account for use-case where show/hide state is tracked in a cookie
2006.02.15 - 1.7.6 in adjustSliderPos(), ensure that floating panel is positioned completely within the browser window (i.e., does not go beyond the right edge of the browser window)
2006.02.04 - 1.7.5 add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals
2006.01.18 - 1.7.4 only define adjustSliderPos() function if it has not already been provided by another plugin.  This lets other plugins 'hijack' the function even when they are loaded first.
2006.01.16 - 1.7.3 added adjustSliderPos(place,btn,panel,panelClass) function to permit specialized logic for placement of floating panels.  While it provides improved placement for many uses of floating panels, it exhibits a relative offset positioning error when used within *nested* floating panels.  Short-term workaround is to only adjust the position for 'top-level' floaters.
2006.01.16 - 1.7.2 added button property to slider panel elements so that slider panel can tell which button it belongs to.  Also, re-activated and corrected animation handling so that nested sliders aren't clipped by hijacking Slider.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends
2006.01.14 - 1.7.1 added optional "^" syntax for floating panels.  Defines new CSS class, ".floatingPanel", as an alternative for standard in-line ".sliderPanel" styles.
2006.01.14 - 1.7.0 added optional "*" syntax for rollover handling to show/hide slider without requiring a click (Based on a suggestion by tw4efl)
2006.01.03 - 1.6.2 When using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element.  (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)
2005.12.15 - 1.6.1 added optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders
removed checkbox option for 'global' application of lazy sliders
2005.11.25 - 1.6.0 added optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)
2005.11.21 - 1.5.1 revised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability.  Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.
2005.11.20 - 1.5.0 added (cookiename) syntax for optional tracking and restoring of slider open/close state
2005.11.11 - 1.4.0 added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style
2005.11.07 - 1.3.0 removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other formatting extensions) and simplified/improved regular expressions to trim multiple excess newlines
2005.11.05 - 1.2.1 changed name to NestedSlidersPlugin
2005.11.04 - 1.2.0 added alternative character-mode syntax {{{(((}}} and {{{)))}}}
tweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax
2005.11.03 - 1.1.1 fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used.  code cleanup, added documentation
2005.11.03 - 1.1.0 changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}.  changed name to EasySlidersPlugin
2005.11.03 - 1.0.0 initial public release
<<<
/%
|Name|OpenTaggedTiddlers|
|Source|http://www.TiddlyTools.com/#OpenTaggedTiddlers|
|Version|1.2.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.3|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|open multiple tagged tiddlers with a single click|

Usage: <<tiddler OpenTaggedTiddlers with: "label" "tagToMatch" "sortBy" "reverse" "close">>

if MatchTagsPlugin is installed, "tagToMatch" can be a boolean tag expression
"sortBy" is an optional tiddler fieldname, and defaults to "title" (use "modified" or "created" for dates)
"reverse" is an optional KEYWORD, and reverses the order of display of the matched tiddler (i.e., descending vs. ascending)
"close" is an optional KEYWORD, that closes all open tiddlers before opening the tagged tiddlers

Note: use "" as placeholders when omitting optional keywords

%/<script label="$1">
	var list=[];
	var match="$2";
	var sortBy="$3"; if ((sortBy=="$"+"3")||(sortBy=="")) sortBy="title";
	var filter="[tag[%0]][sort[%1]]".format([match,sortBy]);
	var tids=store.filterTiddlers(filter);
	if ("$4"=="reverse") tids=tids.reverse();
	for (var t=0;t<tids.length;t++) list.push(tids[t].title);
	if ("$5"=="close") story.closeAllTiddlers();
	var here=story.findContainingTiddler(place);
	story.displayTiddlers(here,list);
	if (here && list.length) { // scroll to top of newly displayed tiddlers
		var cmd='window.scrollTo(0,'+(here.offsetTop+here.offsetHeight)+')';
		var delay=config.options.chkAnimate?config.animDuration+100:0;
		setTimeout(cmd,delay);
	}
	return false;
</script>
<<showtoc>>

!Plugin Information
|Name|OpenTaggedTiddlers|
|Source|http://www.TiddlyTools.com/#OpenTaggedTiddlers|
|Version|1.2.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.3|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides||
|Description|open multiple tagged tiddlers with a single click|
!Document(japanese)
「クリックしたら指定したタグのTiddlerを全て表示する」ボタンを生成します
記法:{{{<<tiddler OpenTaggedTiddlers with: "label" "tagToMatch" "sortBy" "reverse" "close">>}}}
以下に各パラメータの解説を行います
(使わないのであれば{{{""}}}と記述すると、デフォルトで動作します)
*{{{tagToMatch}}}:タグを指定します
[[MatchTagsPlugin|http://www.tiddlytools.com/#MatchTagsPlugin]]がインストールされている場合、
ANDやORなどで表示するTiddlerの組み合わせを行えます
*{{{sortBy}}}:開く順番を定義します
|!title|タイトル順(デフォルト)|
|!modified|更新日時順|
|!created|作成日時順|
*{{{reverse}}}: 逆順にする場合はこのパラメータを書き込みます。
*{{{close}}}:このパラメータを記述した場合、今開いているすべてのTiddlerを閉じてから、処理が実行されます
!Example
/*{{{*/
<<tiddler OpenTaggedTiddlers with: "クリックするとMainPageタグの記事を表示します" "MainPage" "created" "" "">>
/*}}}*/
実行結果はこちら
><<tiddler OpenTaggedTiddlers with: "クリックするとMainPageタグの記事を表示します" "MainPage" "created" "" "">>
<!--- 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='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></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>
***/
!初心者向け入門記事
*http://www.tohoho-web.com/wwwperl1.htm
*http://homepage2.nifty.com/sak/w_sak3/doc/sysbrd/sak3doc.htm#pe_k
!メモ欄
|モジュールのインストール|http://x68000.q-e-d.net/~68user/net/ext-module.html|
|utf-8の取扱い|http://osksn2.hep.sci.osaka-u.ac.jp/~taku/osx/perl/perl_utf.html|
<<googlesearch "perl Spreadsheet">>
!~SpreadSheet::~WriteExcel
|本家|http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.04/lib/Spreadsheet/WriteExcel.pm|
|和訳Doc|http://homepage3.nifty.com/hippo2000/perltips/Spreadsheet/WriteExcel.htm|
!!サンプル(~WriteExcel)
*http://www.drk7.jp/MT/archives/001195.html
*http://www.randynetwork.com/blog/167
*http://hippo2000.atnifty.com/cgi-bin/DyFK/dyfk.pl?cmd=disp&page=Spreadsheet%3A%3AWriteExcel%A4%C7%C6%FC%CB%DC%B8%EC%A4%F2%B0%B7%A4%A6
*http://www.drk7.jp/MT/archives/000565.html
*http://pmakino.jp/tdiary/20070828.html#p01
!リンク
|その他、類似モジュール|http://pmakino.jp/tdiary/20070120.html|
!!Plugin Tips
Plugin と Macro の簡単な使い方です。

こんなことやりたい、ということにマッチしたら使ってみてください。
詳しい内容についてはそれぞれのマニュアルを参照してください。

随時更新していきます。
/***
|''Name:''|~PopupMacro|
|''Version:''|1.0.0 (2006-05-09)|
|''Source:''|http://tw.lewcid.org/#PopupMacro|
|''Author:''|Saq Imtiaz|
|''Description:''|Create popups with custom content|
|''Documentation:''|[[PopupMacro Documentation|PopupMacroDocs]]|
|''~Requires:''|TW Version 2.0.8 or better|
***/
// /%
{{{
config.macros.popup = {};
config.macros.popup.arrow = (document.all?"▼":"▾");
config.macros.popup.handler = function(place,macroName,params,wikifier,paramString,theTiddler) {

        if (!params[0] || !params[1]) 
             {createTiddlyError(place,'missing macro parameters','missing label or content parameter');
              return false;};
   
        var label = params[0];
        var source = (params[1]).replace(/\$\)\)/g,">>"); 
        var nestedId = params[2]? params[2]: 'nestedpopup';        

	var onclick = function(event) {
	        if(!event){var event = window.event;}
                var theTarget = resolveTarget(event);
                var nested = (!isNested(theTarget));
               
                if ((Popup.stack.length > 1)&&(nested==true)) {Popup.removeFrom(1);}
                else if(Popup.stack.length > 0 && nested==false) {Popup.removeFrom(0);};
                
                var theId = (nested==false)? "popup" : nestedId; 
	        var popup = createTiddlyElement(document.body,"ol",theId,"popup",null);
	        Popup.stack.push({root: button, popup: popup});

                wikify(source,popup);
		Popup.show(popup,true);
	        event.cancelBubble = true;
		if (event.stopPropagation) event.stopPropagation();
		return false;
	}
	var button = createTiddlyButton(place, label+this.arrow,label, onclick, null);
};

window.isNested = function(e) {
        while (e != null) {
                var contentWrapper = document.getElementById("contentWrapper");
                if (contentWrapper == e) return true;
                e = e.parentNode;
                }
        return false;
};

setStylesheet(
".popup, .popup a, .popup a:visited {color: #fff;}\n"+
".popup  a:hover {background: #014; color: #fff; border: none;}\n"+
".popup li , .popup ul, .popup ol {list-style:none !important; margin-left:0.3em !important; margin-right:0.3em; font-size:100%; padding-top:0.5px !important; padding:0px !important;}\n"+
"#nestedpopup {background:#2E5ADF; border: 1px solid #0331BF; margin-left:1em; }\n"+
"",
"CustomPopupStyles");

config.shadowTiddlers.PopupMacroDocs="The documentation is available [[here.|http://tw.lewcid.org/#PopupMacroDocs]]";
}}}
//%/


!総合
*[[JM Project (Japanese)|http://www.linux.or.jp/JM/]]
*[[MSDN ライブラリ|http://msdn2.microsoft.com/ja-jp/library/default.aspx]]
*[[WisdomSoft - ホーム|http://www.wisdomsoft.jp/]]
*[[Boost翻訳Prj|http://boost.cppll.jp/]]
*[[The Code Project - Free Source Code and Tutorials|http://www.codeproject.com/]]
!FAQ・forum
*[[TeamKURENAI|http://hp.vector.co.jp/authors/VA007941/program/idx.html]]
*[[ら ら ら のプログラマーズラウンジ|http://rararahp.cool.ne.jp/]]
*[[Belution.com|http://www.belution.com/worldwide/ja/]]
*[[わんくま|http://www.wankuma.com/]]

!C・C++
+++[TIPS]
|TIPS総合|[[猫でもわかるプログラミング|http://www.kumei.ne.jp/c_lang/]]|
|TIPS|[[青島のしま~Blue Islands~ : C++ Tips|http://www.takebay.net/%7Edaigo-ao/paddlewiki.pl/title_43A1DCA1DC2054697073.html]]|
|TIPS|[[初心者のためのポイント学習C言語|http://www9.plala.or.jp/sgwr-t/]]|
|TIPS|[[C言語で始めるWindowsプログラミング|http://web.kyoto-inet.or.jp/people/ysskondo/index.html]]|
===
+++[C++0x]
*[[C++0x 仕様の日本語翻訳|http://d.hatena.ne.jp/faith_and_brave/20081226/1230276546]]
*[[C++0x拡張まとめ|http://d.hatena.ne.jp/faith_and_brave/20071022/1193052163]]
===
+++[API]
|API|[[API関数リスト|http://yokohama.cool.ne.jp/chokuto/urawaza/api/]]|
|API FTP|[[プログラム学習室|http://www11.plala.or.jp/studyhall/]]|
|API (wininet)|[[VC++の使い方 [VC++の使い方]|http://www.nitoyon.com/vc/]]|
|API (wininet)|[[Wininet Programing|http://www.geocities.jp/wininet_dll_jp/]]|
|API MFC|[[Bravo!!|http://homepage2.nifty.com/DSS/index.htm]]|
|API MFC|[[GoldFish|http://athomejp.com/goldfish/]]|
|API |[[MASAPICO's PAGE|http://nienie.com/%7Emasapico/]]|
|API|[[プログラムメモ|http://hp.vector.co.jp/authors/VA014436/prg_memo/index.html]]|
|API C Cpp|[[Programing Place|http://www.geocities.jp/ky_webid/index.html]]|
===
+++[ATL WTL MFC]
|ATL WTL MFC|[[The ~So-Software Studio|http://home.att.ne.jp/banana/akatsuki/top/main.html]]|
|MFC|[[Studio moto001|http://www2.sanmedia.or.jp/moto001/]]|
|MFC|[[椎森ソフト工房|http://www.h6.dion.ne.jp/%7Eshiimori/index.html]]|
|MFC|[[VC++,MFCでのプログラミングでのTips CRIMSON Systems|http://www.crimson-systems.com/tips/index.html]]|
|MFC|(でプロパティシート)[[EZ-NET 研究室: プロパティシート・ダイアログを作ってみる|http://program.station.ez-net.jp/special/vc/GUI/PropertySheet.asp]]|
|MFC C/C++|[[プログラミング色々|http://7ujm.net/index.html]]|
|MFC|[[Programmer's Road|http://ag5.net/%7eprgroad/index.html]]|
===
+++[C++]
|C++|[[陽気なる逃亡者たるプログラマ|http://kara.ifdef.jp/]]|
|C++|[[pAGE tITLE = 0x045A205C|http://qwerty.s2.xrea.com/FrontPage.xhtml]]|
===
+++[Others]
|~VC2005サンプル|[[温納豆 - ~Win32API|http://www.geocities.co.jp/egggarden/win32api/index.htm]]|
||[[自由研究  kei@sodan|http://funini.com/kei/]]|
|自作クラス|[[Welcome to macrobilis|http://www.geocities.co.jp/SiliconValley-PaloAlto/5610/index.html]]|
===
!Spec
明確なソースがないものは?をつけています。ソース探し中
!!Radeon HD 4000
*RV770はRV670よりもかなり速そう
|!モデル名|!搭載チップ|!コアclook|!メモリ|!TDP|!GFLOPS|
|4870X2|RV770X2|1050/1800|1GB(GDDR5)256bit|250W|2000?|
|4870|RV770|1050|512MB(GDDR5)256-bit|150W|1008|
|4850|RV770|850|512MB(GDDR5)256-bit|120W|816|
|4830|RV770||512MB(GDDR5)256-bit|110W||
|4670|RV740|1000|512MB(GDDR5)256-bit|100W|480|
|4650|RV740|800|256MB(GDDR4)256-bit|80W|384|
|4550|RV710|600|800MHz(128bit)|20W||
|4350|RV710|600|600MHz(128bit)|20W||
!!Radeon HD 3000
|!モデル名|!搭載チップ|!プロセス|!コアclook|!メモリ容量・インターフェイス|!TDP|!GFLOPS|
|3870X2|RV670X2|55nm(TSMC)|775|1024(GDDR4)256bit|210?|1000?|
|3870|RV670|55nm(TSMC)|775|512(GDDR4)256bit|105|500?|
|3850X2|RV670X2|55nm(TSMC)|670|512(GDDR3)256bit|180?|800?|
|3850|RV670|55nm(TSMC)|670|256/512(GDDR3)256bit|95|400?|
|3650|RV635|55nm(TSMC)|725|256(GDDR3)128bit|75|350くらい?|
!!X1600
|!モデル名|!搭載チップ|!プロセス(nm)|!コア|!メモリ容量・インターフェイス|!TDP|
|X1650Pro|RV535|80nm(TSMC)|590|256(GDDR3)128bit||
|X1650Pro|RV530|90nm(TSMC)|590|256(GDDR3)128bit||

!Link
*http://www.4gamer.net/games/071/G007192/20080929028/
*under construction
/***
|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;			
	}
};
//}}}
/***
| 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]] と組み合わせると大きなエリアで入力、編集が可能になったりする。
/***
| 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;
		}
	}

});

//}}}
/***
|Name|SearchOptionsPlugin|
|Source|http://www.TiddlyTools.com/#SearchOptionsPlugin|
|Documentation|http://www.TiddlyTools.com/#SearchOptionsPluginInfo|
|Version|3.0.2|
|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|Story.prototype.search, TiddlyWiki.prototype.search, config.macros.search.onKeyPress|
|Options|##Configuration|
|Description|extend core search function with additional user-configurable options|
Adds extra options to core search function including selecting which data items to search, enabling/disabling incremental key-by-key searches, and generating a ''list of matching tiddlers'' instead of immediately displaying all matches.  This plugin also adds syntax for rendering 'search links' within tiddler content to embed one-click searches using pre-defined 'hard-coded' search terms.
!!!!!Documentation
>see [[SearchOptionsPluginInfo]]
!!!!!Configuration
<<<
Search in:
<<option chkSearchTitles>> titles <<option chkSearchText>> text <<option chkSearchTags>> tags <<option chkSearchFields>> fields <<option chkSearchShadows>> shadows
<<option chkSearchList>> Show list of matches
<<option chkSearchListTiddler>> Write list to [[SearchResults]] tiddler
<<option chkSearchTitlesFirst>> Show title matches first
<<option chkSearchByDate>> Sort matching tiddlers by modification date (most recent first)
<<option chkIncrementalSearch>> Incremental key-by-key search: {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters,  {{threechar{<<option txtIncrementalSearchDelay>>}}} msec delay
<<option chkSearchExcludeTags>> Exclude tiddlers tagged with:
{{editor{<<option txtSearchExcludeTags>>}}}
<<<
!!!!!Revisions
<<<
2009.01.05 [3.0.2] in formatSearchResults_list(), set/clear 'highlightHack' via HTML links so that search term will be highlighted when displaying tiddlers.
|please see [[SearchOptionsPluginInfo]] for additional revision details|
2005.10.18 [1.0.0] Initial Release
<<<
!!!!!Code
***/
//{{{
version.extensions.SearchOptionsPlugin= {major: 3, minor: 0, revision: 2, date: new Date(2009,1,5)};

var co=config.options; // abbrev
if (co.chkSearchTitles===undefined) co.chkSearchTitles=true;
if (co.chkSearchText===undefined) co.chkSearchText=true;
if (co.chkSearchTags===undefined) co.chkSearchTags=true;
if (co.chkSearchFields===undefined) co.chkSearchFields=true;
if (co.chkSearchTitlesFirst===undefined) co.chkSearchTitlesFirst=true;
if (co.chkSearchList===undefined) co.chkSearchList=true;
if (co.chkSearchListTiddler===undefined) co.chkSearchListTiddler=false;
if (co.chkSearchByDate===undefined) co.chkSearchByDate=false;
if (co.chkIncrementalSearch===undefined) co.chkIncrementalSearch=true;
if (co.chkSearchShadows===undefined) co.chkSearchShadows=true;
if (co.txtIncrementalSearchDelay===undefined) co.txtIncrementalSearchDelay=500;
if (co.txtIncrementalSearchMin===undefined) co.txtIncrementalSearchMin=3;
if (co.chkSearchExcludeTags===undefined) co.chkSearchExcludeTags=true;
if (co.txtSearchExcludeTags===undefined) co.txtSearchExcludeTags="excludeSearch";
if (config.macros.search.reportTitle==undefined)
	config.macros.search.reportTitle="SearchResults"; // note: not a cookie!
config.macros.search.label+="\xa0"; // a little bit of space just because it looks better
//}}}
// // searchLink: {{{[search[text to find]] OR [search[text to display|text to find]]}}}
//{{{
config.formatters.push( {
	name: "searchLink",
	match: "\\[search\\[",
	lookaheadRegExp: /\[search\[(.*?)(?:\|(.*?))?\]\]/mg,
	prompt: "search for: '%0'",
	handler: function(w)
	{
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			var label=lookaheadMatch[1];
			var text=lookaheadMatch[2]||label;
			var prompt=this.prompt.format([text]);
			var btn=createTiddlyButton(w.output,label,prompt,
				function(){story.search(this.getAttribute("searchText"))},"searchLink");
			btn.setAttribute("searchText",text);
			w.nextMatch = this.lookaheadRegExp.lastIndex;
		}
	}
});
//}}}
// // incremental search uses option settings instead of hard-coded delay and minimum input values
//{{{
var fn=config.macros.search.onKeyPress;
fn=fn.toString().replace(/500/g, "config.options.txtIncrementalSearchDelay||500");
fn=fn.toString().replace(/> 2/g, ">=(config.options.txtIncrementalSearchMin||3)");
eval("config.macros.search.onKeyPress="+fn);
//}}}
// // REPLACE story.search() for option to "show search results in a list"
//{{{
Story.prototype.search = function(text,useCaseSensitive,useRegExp)
{
	var co=config.options; // abbrev
	highlightHack = new RegExp(useRegExp ? text : text.escapeRegExp(),useCaseSensitive ? "mg" : "img");
	var matches = store.search(highlightHack,co.chkSearchByDate?"modified":"title","");
	if (co.chkSearchByDate) matches=matches.reverse(); // most recent first
	var q = useRegExp ? "/" : "'";
	clearMessage();
	if (!matches.length) {
		if (co.chkSearchListTiddler) discardSearchResults();
		displayMessage(config.macros.search.failureMsg.format([q+text+q]));
	} else {
		if (co.chkSearchList||co.chkSearchListTiddler) 
			reportSearchResults(text,matches);
		else {
			var titles = []; for(var t=0; t<matches.length; t++) titles.push(matches[t].title);
			this.closeAllTiddlers(); story.displayTiddlers(null,titles);
			displayMessage(config.macros.search.successMsg.format([matches.length, q+text+q]));
		}
	}
	highlightHack = null;
}
//}}}
// // REPLACE store.search() for enhanced searching/sorting options
//{{{
TiddlyWiki.prototype.search = function(searchRegExp,sortField,excludeTag)
{
	var co=config.options; // abbrev
	var tids = this.reverseLookup("tags",excludeTag,false,sortField);

	// eliminate tiddlers tagged with excluded tags
	if (co.chkSearchExcludeTags&&co.txtSearchExcludeTags.length) {
		var ex=co.txtSearchExcludeTags.readBracketedList();
		var temp=[]; for(var t=tids.length-1; t>=0; t--)
			if (!tids[t].tags.containsAny(ex)) temp.push(tids[t]);
		tids=temp;
	}

	// scan for matching titles first...
	var results = [];
	if (co.chkSearchTitles) {
		for(var t=0; t<tids.length; t++)
			if(tids[t].title.search(searchRegExp)!=-1)
				results.push(tids[t]);
		if (co.chkSearchShadows)
			for (var t in config.shadowTiddlers)
				if ((t.search(searchRegExp)!=-1) && !store.tiddlerExists(t))
					results.push((new Tiddler()).assign(t,config.shadowTiddlers[t]));
	}
	// then scan for matching text, tags, or field data
	for(var t=0; t<tids.length; t++) {
		if (co.chkSearchText && tids[t].text.search(searchRegExp)!=-1)
			results.pushUnique(tids[t]);
		if (co.chkSearchTags && tids[t].tags.join(" ").search(searchRegExp)!=-1)
			results.pushUnique(tids[t]);
		if (co.chkSearchFields && store.forEachField!=undefined)
			store.forEachField(tids[t],
				function(tid,field,val) {
					if (val.search(searchRegExp)!=-1) results.pushUnique(tids[t]);
				},
				true); // extended fields only
	}
	// then check for matching text in shadows
	if (co.chkSearchShadows)
		for (var t in config.shadowTiddlers)
			if ((config.shadowTiddlers[t].search(searchRegExp)!=-1) && !store.tiddlerExists(t))
				results.pushUnique((new Tiddler()).assign(t,config.shadowTiddlers[t]));

	// if not 'titles first', or sorting by modification date,
	// re-sort results to so titles, text, tag and field matches are mixed together
	if(!sortField) sortField = "title";
	var bySortField=function (a,b) {if(a[sortField] == b[sortField]) return(0); else return (a[sortField] < b[sortField]) ? -1 : +1; }
	if (!co.chkSearchTitlesFirst || co.chkSearchByDate) results.sort(bySortField);

	return results;
}
//}}}
// // HIJACK core {{{<<search>>}}} macro to add "report" and "simple inline" output
//{{{
config.macros.search.SOP_handler=config.macros.search.handler;
config.macros.search.handler = function(place,macroName,params)
{
	// if "report", use SearchOptionsPlugin report generator for inline output
	if (params[1]&&params[1].substr(0,6)=="report") {
		var keyword=params[0];
		var options=params[1].split("=")[1]; // split "report=option+option+..."
		var heading=params[2]?params[2].unescapeLineBreaks():"";
		var matches=store.search(new RegExp(keyword.escapeRegExp(),"img"),"title","excludeSearch");
		if (matches.length) wikify(heading+window.formatSearchResults(keyword,matches,options),place);
	} else if (params[1]) {
		var keyword=params[0];
		var heading=params[1]?params[1].unescapeLineBreaks():"";
		var seperator=params[2]?params[2].unescapeLineBreaks():", ";
		var matches=store.search(new RegExp(keyword.escapeRegExp(),"img"),"title","excludeSearch");
		if (matches.length) {
			var out=[];
			for (var m=0; m<matches.length; m++) out.push("[["+matches[m].title+"]]");
			wikify(heading+out.join(seperator),place);
		}
	} else
		config.macros.search.SOP_handler.apply(this,arguments);
};
//}}}
// // SearchResults panel handling
//{{{
setStylesheet(".searchResults { padding:1em 1em 0 1em; }","searchResults"); // matches std tiddler padding

config.macros.search.createPanel=function(text,matches,body) {

	function getByClass(e,c) { var d=e.getElementsByTagName("div");
		for (var i=0;i<d.length;i++) if (hasClass(d[i],c)) return d[i]; }
	var panel=createTiddlyElement(null,"div","searchPanel","searchPanel");
	this.renderPanel(panel,text,matches,body);
	var oldpanel=document.getElementById("searchPanel");
	if (!oldpanel) { // insert new panel just above tiddlers
		var da=document.getElementById("displayArea");
		da.insertBefore(panel,da.firstChild);
	} else { // if panel exists
		var oldwrap=getByClass(oldpanel,"searchResults");
		var newwrap=getByClass(panel,"searchResults");
		// if no prior content, just insert new content
		if (!oldwrap) oldpanel.insertBefore(newwrap,null);
		else {	// swap search results content but leave containing panel intact
			oldwrap.style.display='block'; // unfold wrapper if needed
			var i=oldwrap.getElementsByTagName("input")[0]; // get input field
			if (i) { var pos=this.getCursorPos(i); i.onblur=null; } // get cursor pos, ignore blur
			oldpanel.replaceChild(newwrap,oldwrap);
			panel=oldpanel; // use existing panel
		} 
	}
	this.showPanel(true,pos);
	return panel;
}

config.macros.search.renderPanel=function(panel,text,matches,body) {

	var wrap=createTiddlyElement(panel,"div",null,"searchResults");
	wrap.onmouseover = function(e){ addClass(this,"selected"); }
	wrap.onmouseout = function(e){ removeClass(this,"selected"); }
	// create toolbar: "open all", "fold/unfold", "close"
	var tb=createTiddlyElement(wrap,"div",null,"toolbar");
	var b=createTiddlyButton(tb, "open all", "open all matching tiddlers", function() {
		story.displayTiddlers(null,this.getAttribute("list").readBracketedList()); return false; },"button");
	var list=""; for(var t=0;t<matches.length;t++) list+='[['+matches[t].title+']] ';
	b.setAttribute("list",list);
	var b=createTiddlyButton(tb, "fold", "toggle display of search results", function() {
		config.macros.search.foldPanel(this); return false; },"button");
	var b=createTiddlyButton(tb, "close", "dismiss search results",	function() {
		config.macros.search.showPanel(false); return false; },"button");
	createTiddlyText(createTiddlyElement(wrap,"div",null,"title"),"Search for: "+text); // title
	wikify(body,createTiddlyElement(wrap,"div",null,"viewer")); // report
	return panel;
}

config.macros.search.showPanel=function(show,pos) {
	var panel=document.getElementById("searchPanel");
	var i=panel.getElementsByTagName("input")[0];
	i.onfocus=show?function(){config.macros.search.stayFocused(true);}:null;
	i.onblur=show?function(){config.macros.search.stayFocused(false);}:null;
	if (show && panel.style.display=="block") { // if shown, grab focus, restore cursor
		if (i&&this.stayFocused()) { i.focus(); this.setCursorPos(i,pos); }
		return;
	}
	if(!config.options.chkAnimate) {
		panel.style.display=show?"block":"none";
		if (!show) { removeChildren(panel); config.macros.search.stayFocused(false); }
	} else {
		var s=new Slider(panel,show,false,show?"none":"children");
		s.callback=function(e,p){e.style.overflow="visible";}
		anim.startAnimating(s);
	}
	return panel;
}

config.macros.search.foldPanel=function(button) {
	var d=document.getElementById("searchPanel").getElementsByTagName("div");
	for (var i=0;i<d.length;i++) if (hasClass(d[i],"viewer")) var v=d[i]; if (!v) return;
	var show=v.style.display=="none";
	if(!config.options.chkAnimate)
		v.style.display=show?"block":"none";
	else {
		var s=new Slider(v,show,false,"none");
		s.callback=function(e,p){e.style.overflow="visible";}
		anim.startAnimating(s);
	}
	button.innerHTML=show?"fold":"unfold";
	return false;
}

config.macros.search.stayFocused=function(keep) { // TRUE/FALSE=set value, no args=get value
	if (keep===undefined) return this.keepReportInFocus;
	this.keepReportInFocus=keep;
	return keep
}	

config.macros.search.getCursorPos=function(i) {
	var s=0; var e=0; if (!i) return { start:s, end:e };
	try {
		if (i.setSelectionRange) // FF
			{ s=i.selectionStart; e=i.selectionEnd; }
		if (document.selection && document.selection.createRange) { // IE
			var r=document.selection.createRange().duplicate();
			var len=r.text.length; s=0-r.moveStart('character',-100000); e=s+len;
		}
	}catch(e){};
	return { start:s, end:e };
}
config.macros.search.setCursorPos=function(i,pos) {
	if (!i||!pos) return; var s=pos.start; var e=pos.end;
	if (i.setSelectionRange) //FF
		i.setSelectionRange(s,e);
	if (i.createTextRange) // IE
		{ var r=i.createTextRange(); r.collapse(true); r.moveStart("character",s); r.select(); }
}
//}}}
// // SearchResults report generation
// note: these functions are defined globally, so they can be more easily redefined to customize report formats//
//{{{
if (!window.reportSearchResults) window.reportSearchResults=function(text,matches)
{
	var cms=config.macros.search; // abbrev
	var body=window.formatSearchResults(text,matches);
	if (!config.options.chkSearchListTiddler) // show #searchResults panel
		window.scrollTo(0,ensureVisible(cms.createPanel(text,matches,body)));
	else { // write [[SearchResults]] tiddler
		var title=cms.reportTitle;
		var who=config.options.txtUserName;
		var when=new Date();
		var tags="excludeLists excludeSearch temporary";
		var tid=store.getTiddler(title); if (!tid) tid=new Tiddler();
		tid.set(title,body,who,when,tags);
		store.addTiddler(tid);
		story.closeTiddler(title);
		story.displayTiddler(null,title);
	}
}

if (!window.formatSearchResults) window.formatSearchResults=function(text,matches,opt)
{
	var body='';
	var title=config.macros.search.reportTitle
	var q = config.options.chkRegExpSearch ? "/" : "'";
	if (!opt) var opt="all";
	var parts=opt.split("+");
	for (var i=0; i<parts.length; i++) { var p=parts[i].toLowerCase();
		if (p=="again"||p=="all")   body+=window.formatSearchResults_again(text,matches);
		if (p=="summary"||p=="all") body+=window.formatSearchResults_summary(text,matches);
		if (p=="list"||p=="all")    body+=window.formatSearchResults_list(text,matches);
		if (p=="buttons"||p=="all") body+=window.formatSearchResults_buttons(text,matches);
	}
	return body;
}

if (!window.formatSearchResults_again) window.formatSearchResults_again=function(text,matches)
{
	var title=config.macros.search.reportTitle
	var body='';
	// search again
	body+='{{span{<<search "'+text.replace(/"/g,'&#x22;')+'">> /%\n';
	body+='%/<html><input type="button" value="search again"';
	body+=' onclick="var t=this.parentNode.parentNode.getElementsByTagName(\'input\')[0];';
	body+=' config.macros.search.doSearch(t); return false;">';
	body+=' <a href="javascript:;" onclick="';
	body+=' var e=this.parentNode.nextSibling;';
	body+=' var show=e.style.display!=\'block\';';
	body+=' if(!config.options.chkAnimate) e.style.display=show?\'block\':\'none\';';
	body+=' else anim.startAnimating(new Slider(e,show,false,\'none\'));';
	body+=' return false;">options...</a>';
	body+='</html>@@display:none;border-left:1px dotted;margin-left:1em;padding:0;padding-left:.5em;font-size:90%;/%\n';
	body+='	%/<<option chkSearchTitles>>titles /%\n';
	body+='	%/<<option chkSearchText>>text /%\n';
	body+='	%/<<option chkSearchTags>>tags /%\n';
	body+='	%/<<option chkSearchFields>>fields /%\n';
	body+='	%/<<option chkSearchShadows>>shadows\n';
	body+='	<<option chkCaseSensitiveSearch>>case-sensitive /%\n';
	body+='	%/<<option chkRegExpSearch>>text patterns /%\n';
	body+='	%/<<option chkSearchByDate>>sorted by date\n';
	body+='	<<option chkIncrementalSearch>>incremental key-by-key search: /%\n';
	body+='	%/{{twochar{<<option txtIncrementalSearchMin>>}}} or more characters, /%\n';
	body+='	%/{{threechar{<<option txtIncrementalSearchDelay>>}}} msec delay\n';
	body+='	<<option chkSearchExcludeTags>>exclude tiddlers tagged with:\n';
	body+='	{{editor{<<option txtSearchExcludeTags>>}}}/%\n';
	body+='%/@@}}}\n\n';
	return body;
}

if (!window.formatSearchResults_summary) window.formatSearchResults_summary=function(text,matches)
{
	// summary: nn tiddlers found matching '...', options used
	var body='';
	var co=config.options; // abbrev
	var title=config.macros.search.reportTitle
	var q = co.chkRegExpSearch ? "/" : "'";
	body+="''"+config.macros.search.successMsg.format([matches.length,q+"{{{"+text+"}}}"+q])+"''\n";
	var opts=[];
	if (co.chkSearchTitles) opts.push("titles");
	if (co.chkSearchText) opts.push("text");
	if (co.chkSearchTags) opts.push("tags");
	if (co.chkSearchFields) opts.push("fields");
	if (co.chkSearchShadows) opts.push("shadows");
	body+="~~&nbsp; searched in "+opts.join(" + ")+"~~\n";
	body+=(co.chkCaseSensitiveSearch||co.chkRegExpSearch?"^^&nbsp; using ":"")
		+(co.chkCaseSensitiveSearch?"case-sensitive ":"")
		+(co.chkRegExpSearch?"pattern ":"")
		+(co.chkCaseSensitiveSearch||co.chkRegExpSearch?"matching^^\n":"");
	return body;
}

if (!window.formatSearchResults_list) window.formatSearchResults_list=function(text,matches)
{
	// bullet list of links to matching tiddlers
	var body='';
	var pattern=co.chkRegExpSearch?text:text.escapeRegExp();
	var sensitive=co.chkCaseSensitiveSearch?"mg":"img";
	var link='{{tiddlyLinkExisting{<html><nowiki><a href="javascript:;" onclick="'
		+'highlightHack=new RegExp(\x27'+pattern+'\x27,\x27'+sensitive+'\x27);'
		+'story.displayTiddler(null,\x27%0\x27);'
		+'highlightHack = null; return false;'
		+'" title="%1">%0</a></html>}}}';
	for(var t=0;t<matches.length;t++) {
		var date=config.options.chkSearchByDate?(matches[t].modified.formatString('YYYY.0MM.0DD 0hh:0mm')+" "):"";
		var tid=store.getTiddler(matches[t].title); if (tid) var tip=tid.getSubtitle();
		body+="* "+date+link.format([matches[t].title,tip||''])+'\n';
	}
	return body;
}

if (!window.formatSearchResults_buttons) window.formatSearchResults_buttons=function(text,matches)
{
	// embed buttons only if writing SearchResults to tiddler
	if (!config.options.chkSearchListTiddler) return "";
	// "open all" button
	var title=config.macros.search.reportTitle;
	var body="";
	body+="@@diplay:block;<html><input type=\"button\" href=\"javascript:;\" "
		+"onclick=\"story.displayTiddlers(null,[";
	for(var t=0;t<matches.length;t++)
		body+="'"+matches[t].title.replace(/\'/mg,"\\'")+"'"+((t<matches.length-1)?", ":"");
	body+="],1);\" accesskey=\"O\" value=\"open all matching tiddlers\"></html> ";
	// "discard SearchResults" button
	body+="<html><input type=\"button\" href=\"javascript:;\" "
		+"onclick=\"discardSearchResults()\" value=\"discard "+title+"\"></html>";
	body+="@@\n";
	return body;
}

if (!window.discardSearchResults) window.discardSearchResults=function()
{
	// remove the tiddler
	story.closeTiddler(config.macros.search.reportTitle);
	store.deleteTiddler(config.macros.search.reportTitle);
	store.notify(config.macros.search.reportTitle,true);
}
//}}}
/***
|Name|SearchOptionsPluginInfo|
|Source|http://www.TiddlyTools.com/#SearchOptionsPlugin|
|Documentation|http://www.TiddlyTools.com/#SearchOptionsPluginInfo|
|Version|3.0.2|
|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|documentation|
|Requires||
|Overrides||
|Description|Documentation for SearchOptionsPlugin|
Extend core search function with additional user-configurable options including selecting which data items to search, enabling/disabling incremental key-by-key searches, and generating a ''list of matching tiddler'' instead of immediately displaying all matches.  This plugin also adds syntax for rendering 'search links' within tiddler content to embed one-click searches using pre-defined 'hard-coded' search terms.
!!!!!Search link Syntax
<<<
To insert a 'search link' into tiddler content, you can write:
{{{
[search[text to find]]
}}}
or
{{{
[search[text to display|text to find]]
}}}
Clicking on the resulting search link will trigger the search functionality, just as if the specified 'text to find' had been entered into the standard search input field usually displayed in the document sidebar.
<<<
!!!!!Inline output: search macro syntax
<<<
Alternatively, to embed search results lists directly into your tiddler content, you can use:
{{{
<<search "text" report>> (report is a literal keyword)
<<search "text" "heading" "separator">> (simple inline generator)
}}}
<<<
!!!!!Inline output examples:
<<<
*+++*[&lt;&lt;search "wood"&gt;&gt;]>...
<<search "wood">>
===

*+++*[&lt;&lt;search "wood" "/%%/"&gt;&gt;]>...
<<search "wood" "/%%/">>
===

*+++*[&lt;&lt;search "wood" "See also: "&gt;&gt;]>...
<<search "wood" "See also: ">>
===

*+++*[&lt;&lt;search "wood" "See also:\n*" "\n*"&gt;&gt;]>...
<<search "wood" "See also:\n*" "\n*">>
===

*+++*[&lt;&lt;search "wood" report=list "See also:"&gt;&gt;]>...
<<search "wood" report=list "See Also:" >>
===

*+++*[&lt;&lt;search "wood" report&gt;&gt;]>...
<<search "wood" report>>
===

*+++*[&lt;&lt;search "wood" report=&gt;&gt;]>...
<<search "wood" report=>>
===

*+++*[&lt;&lt;search "wood" report=all&gt;&gt;]>...
<<search "wood" report=all>>
===

*+++*[&lt;&lt;search "wood" report=summary+buttons+again+list&gt;&gt;]>...
<<search "wood" report=summary+buttons+again+list>>
===

*+++*[&lt;&lt;search "wood" report=summary+again&gt;&gt;]>...
<<search "wood" report=summary+again>>
===

*+++*[&lt;&lt;search "wood" report=summary&gt;&gt;]>...
<<search "wood" report=summary>>
===

<<<
!!!!!Configuration
<<<
Search in:
<<option chkSearchTitles>> titles <<option chkSearchText>> text <<option chkSearchTags>> tags <<option chkSearchFields>> fields <<option chkSearchShadows>> shadows
{{{<<option chkSearchTitles>> <<option chkSearchText>> <<option chkSearchTags>>}}}
{{{<<option chkSearchFields>> <<option chkSearchShadows>>}}}
<<option chkSearchList>> Show list of matches {{{(<<option chkSearchList>>)}}}
<<option chkSearchListTiddler>> Write list to [[SearchResults]] tiddler {{{(<<option chkSearchListTiddler>>)}}}
<<option chkSearchTitlesFirst>> Show title matches first {{{(<<option chkSearchTitlesFirst>>)}}}
<<option chkSearchByDate>> Sort matching tiddlers by date {{{(<<option chkSearchByDate>>)}}}
<<option chkIncrementalSearch>> Incremental key-by-key search: {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters,  {{threechar{<<option txtIncrementalSearchDelay>>}}} msec delay
{{{<<option chkSearchIncremental>> <<option txtSearchIncrementalMin>> <<option txtSearchIncrementalDelay>>}}}
<<option chkSearchExcludeTags>> Exclude tiddlers tagged with: {{{<<option chkSearchExcludeTags>>}}}
{{editor{<<option txtSearchExcludeTags>>}}}{{{<<option txtSearchExcludeTags>>}}}
<<<
!!!!!Revisions
<<<
2009.01.05 [3.0.2] in formatSearchResults_list(), set/clear 'highlightHack' via HTML links so that search term will be highlighted when displaying tiddlers.
2008.10.14 [3.0.1] changed panel class from "tiddler" to "searchPanel" and added style definition for "searchPanel".  Fixes ticket #771 (in IE, links from search results were reporting errors due to "fake" tiddler class wrapper)
2008.10.02 [3.0.0] added optional list of tags to use for excluding tiddler from searches (default="excludeLists").
2008.09.24 [2.9.9] performance improvment to reportSearchResults(): when rendering a real SearchResults tiddler, store.notify() isn't needed since the results tiddler is always explicitly closed and redrawn each time.
2008.09.20 [2.9.8] corrected createPanel() and renderPanel() so toolbar will be correctly shown/hidden on mouseover/mouseout.
2008.09.19 [2.9.7] fixes to panel handling for IE, Safari, and others.  Changed panel id to #searchPanel and added .searchResults CSS class wrapper around panel content.  Fixed fold/unfold handling.
2008.09.18 [2.9.6] refactored panel handling code, added 'fold/unfold' panel toolbar command, added dynamic 'title' (shows search term), added txtIncrementalSearchMin option
2008.09.17 [2.9.5] added focus and cursor handling for 'search again' field in #searchResults DIV report so that an incremental key-by-key search doesn't interfere with continuous typing into the field.
2008.09.17 [2.9.4] fix 'flicker' when updating #searchResults DIV by wikify()ing to an 'offscreen' DIV and then using replaceChild() instead of using removeChildren() followed by wikify()
2008.09.16 [2.9.3] changed report layout, added "search again" and collapsible 'options' section with incremental search checkbox and "txtIncrementalSearchDelay" timer tweak to onKeyPress()
2008.08.25 [2.9.2] added animation to search results DIV.  Also, the #searchResults DOM element is only auto-created if it does not exist ... and when closed, the DIV is simply hidden rather than removed.  This allows custom placement of search results report in the PageTemplate definition.
2008.08.23 [2.9.1] story column search results uses {{{<<moveablePanel>>}}}
2008.08.22 [2.9.0] default is now to show search results at top of story column, similar to FND's SimpleSearchPlugin display, with an option to generate SearchResults tiddler as before.  Also changed 'chkSearchIncremental' to 'chkIncrementalSearch' to match core option variable
2008.08.12 [2.8.2] change default for chkSearchByDate back to FALSE, and adjusted "list" and "again" output formats (minor tweaks requested by PhilWhitehouse for use on TiddlyWiki.com)
2008.08.11 [2.8.1] changed defaults for chkSearchTitlesFirst, chkSearchList and chkSearchShadows to TRUE to enable enhanced search results output as soon as plugin is installed.
2008.06.21 [2.8.0] added extended syntax for {{{<<search "text" report heading>> and <<search "text" "heading" "seperator">>}}}
2008.05.03 [2.7.1] in searchLink formatter handler(), use separate setAttribute() call instead of passing attribs to createTiddlyButton().  Avoids conflict with errant code in TiddlerNotesPlugin (v2.1 26/10/07)
2008.04.29 [2.7.0] added searchLink formatter (syntax: {{{[search[text]]}}} or {{{[search[display|text]]}}})
2008.04.08 [2.6.2] don't automatically add options to AdvancedOptions shadow tiddler
2007.02.17 [2.6.1] added redefinition of config.macros.search.onKeyPress() to restore check to bypass key-by-key searching (i.e., when chkSearchIncremental==false), which had been unintentionally removed with v2.6.0
2007.02.13 [2.6.0] remove redefinition of config.macros.search.handler since core now includes handling for ENTER key.
2007.02.08 [2.5.1] include 'temporary' tag when creating SearchResults (for use with TemporaryTiddlersPlugin)
2007.01.29 [2.5.0] added support for "sort results by date".  Default is to sort alphabetically (standard).  When sorted by dates, most recent changes are shown first
2006.10.10 [2.4.0] added support for "search in tiddler data" (tiddler.fields)  Default is to search extended data.
2006.04.06 [2.3.0] added support for "search in shadow tiddlers".  Default is *not* to search in the shadows (i.e. standard TW behavior).  Note: if a shadow tiddler has a 'real' counterpart, only the real tiddler is searched, since the shadow is inaccessible for viewing/editing.
2006.02.03 [2.2.1] rewrite timeout clearing code and blank search text handling to match 2.0.4 core release changes.  note that core no longer permits "blank=all" searches, so neither does this plugin.  To search for all, use "." with text patterns enabled.
2006.02.02 [2.2.0] in search.handler(), KeyHandler() function clears 'left over' timeout when search input is < 3 chars.  Prevents searching on shorter text when shortened by rapid backspaces (<500msec)
2006.02.01 [2.1.9] in Story.prototype.search(), correct inverted logic for using/not using regular expressions when searching
also, blank search text now presents "No search text.  Continue anyway?" confirm() message box, so search on blank can still be processed if desired by user.
2006.02.01 [2.1.8] in doSearch(), added alert/return if search text is blank
2006.01.20 [2.1.7] fixed setting of config.macros.search.reportTitle so that Tweaks can override it.
2006.01.19 [2.1.6] improved SearchResults formatting, added a "search again" form to the report (based on a suggestion from MorrisGray)
define results report title using config.macros.search.reportTitle instead of hard-coding the tiddler title
2006.01.18 [2.1.5] Created separate functions for reportSearchResults(text,matches) and discardSearchResults(), so that other developers can create alternative report generators.
2006.01.17 [2.1.4] Use regExp.search() instead of regExp.test() to scan for matches.  Correctd the problem where only half the matching tiddlers (the odd-numbered ones) were being reported.
2006.01.15 [2.1.3] Added information (date/time, username, search options used) to SearchResults output
2006.01.10 [2.1.2] use displayTiddlers() to render matched tiddlers.  This lets you display multiple matching tiddlers, even if SinglePageModePlugin is enabled.
2006.01.08 [2.1.1] corrected invalid variable reference, "txt.value" to "text" in story.search()
2006.01.08 [2.1.0] re-write to match new store.search(), store.search.handler() and story.search() functions.
2005.12.30 [2.0.0] Upgraded to TW2.0.  When rendering SearchResults tiddler, closeTiddler() first to ensure display is refreshed.
2005.12.26 [1.4.0] added option to search for matching text in tiddler tags
2005.12.21 [1.3.7] use \\ to 'escape' single quotes in tiddler titles when generating "Open all matching tiddlers" link.  Also, added access key: "O", to trigger "open all" link.  Based on a suggestion by UdoBorkowski.
2005.12.18 [1.3.6] call displayMessage() AFTER showing matching tiddlers so message is not cleared too soon
2005.12.17 [1.3.5] if no matches found, just display message and delete any existing SearchResults tiddler.
2005.12.17 [1.3.4] use {/%%/{/%%/{  and }/%%/}/%%/} to 'escape' display text in SearchResults tiddler to ensure that formatting contained in search string is not rendered.  Based on a suggestion by UdoBorkowski.
2005.12.14 [1.3.3] tag SearchResults tiddler with 'excludeSearch' so it won't list itself in subsequent searches. Based on a suggestion by UdoBorkowski.
2005.12.14 [1.3.2] added "open all matching tiddlers..." link to search results output. Based on a suggestion by UdoBorkowski.
2005.12.10 [1.3.1] added "discard search results" link to end of search list tiddler output for quick self-removal of 'SearchResults' tiddler.
2005.12.01 [1.3.0] added chkSearchIncremental to enable/disable 'incremental' searching (i.e., search after each keystroke) (default is ENABLED).
added handling for Enter key so it can be used to start a search. Based on a suggestion by LyallPearce
2005.11.25 [1.2.1] renamed from SearchTitleOrTextPlugin to SearchOptionsPlugin
2005.11.25 [1.2.0] added chkSearchList option.  Based on a suggestion by RodneyGomes
2005.10.19 [1.1.0] added chkSearchTitlesFirst option.  Based on a suggestion by ChristianHauck
2005.10.18 [1.0.0] Initial Release.  Based on a suggestion by LyallPearce.
<<<
//{{{
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}}}";
//}}}
{{button{goto}}}
<<gotoTiddler width:6.5em>><<search>><<closeAll>><<permaview>><<newTiddler>><<tiddler TspotSidebar>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
<part calendar hidden>
{{viewer{<<calendar thismonth>>}}}
</part>
<html></html>
<<tabs txtMainTab "更新" "タイムライン" TabTimeline "すべて" "すべて" A-Z "タグ" "タグ" TabTags "他" "他リスト" TabMore>>
/***
|Name|SimpleCommentsPlugin|
|Source|[[FND's DevPad|http://devpad.tiddlyspot.com/#SimpleCommentsPlugin]]|
|Version|0.7|
|Author|FND|
|License|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires|N/A|
|Overrides|N/A|
|Description|add comments to a tiddler|
!Usage
Add {{{<<addComment>>}}} to the desired tiddler(s).
Alternatively, add the following to the tiddler toolbar (usually in ViewTemplate, {{{<div class='toolbar' macro='...'>}}}): {{{addComment}}} (currently untested)

''N.B.:'' For now, TiddlyWiki needs to be saved manually after adding a comment, thus making this plugin rather unsuitable for read-only TiddlyWikis.
!Changelog
!!v0.5 (2007-05-08)
* initial release
!!v0.6 (2007-05-10)
* moved required styles into a shadow tiddler
!!v0.7 (2007-05-14)
* complete rewrite from DOM-based to string-based processing
!Issues / To Do
* proper creation of command buttons
* global option and/or macro parameter for reverseOrder
* revise CSS properties
* review code (esp. section marked with DEBUG)
* some functions/routines might be redundant (i.e. already present in the TiddlyWiki core, e.g. {{{trim()}}}, {{{IsoTimestamp()}}} & {{{zeroPad()}}}?)
!Code
***/
//{{{
/*
** Styles (can be customized in the StyleSheetSimpleComments shadow tiddler)
*/

config.shadowTiddlers.StyleSheetSimpleComments = "/*{{{*/\n"
	+ ".comments {\n\tmargin-top: 2em;\n\tpadding: 1em 4px 4px;\n\tborder-top: 2px ridge #AAA;\n\tbackground-color: #F8F8F8;\n}\n\n"
	+ ".comments .comment {\n\tmargin: 0.5em 1em;\n\tpadding: 4px;\n\tborder: 1px solid #AAA;\n\tbackground-color: #FFF;\n}\n\n"
	+ ".comments .comment h1,\n.comments .comment h2 {\n\tmargin: 0 0 0.2em;\n\tpadding: 0;\n\tborder-bottom: 1px solid #AAA;\n\tbackground-color: transparent;\n}\n\n"
	+ ".comments .comment h1 {\n\tfloat: right;\n}\n\n"
	+ ".comments .comment p {\n\tmargin: 0 0 0.2em;\n}\n"
	+ "/*}}}*/";
store.addNotification("StyleSheetSimpleComments", refreshStyles);

/*
** Command Buttons
*/

/* Macro Button */
// adapted from Jack's DoBackupMacro (http://groups.google.com/group/TiddlyWiki/browse_thread/thread/5f1123d08bdadeac/86245d5e4bbe846c)
config.macros.addComment = { label: "Add comment", prompt: "Add a new comment" }; // DEBUG: prompt not needed!?
config.macros.addComment.handler = function(place) {
	if(!readOnly) {
		createTiddlyButton(place, this.label, this.prompt, function() {
				addTiddlerComment(this);
				return false; // DEBUG: ?
			}, null, null, this.accessKey
		); // DEBUG - to do: look up createTiddlyButton()'s parameters
	}
}

/* Toolbar Button */
config.commands.addComment = { text: "Add comment", tooltip: "Add a comment" }
config.commands.addComment.handler = function() {
	addTiddlerComment(this); // DEBUG: does that work?
}

/*
** Script
*/

// adapted from Eric Shulman's CommentScript (http://www.tiddlytools.com/#CommentScript)
addTiddlerComment = function(place) {
	// select current tiddler
	var here = story.findContainingTiddler(place);
	if (!here) {
		alert("error: no tiddler specified");
		return;
	}
	var title = here.getAttribute("tiddler");
	var tiddler = store.getTiddler(title);
	// retrieve tiddler sections
	var tiddlerContentsPre = tiddler.text + "\n";
	var tiddlerComments = "";
	var tiddlerContentsPost = "";
	var RegEx = /^([\S\s]*)\{\{comments\{((?:\{\{comment\{[^}]*\}\}\}|\s+)*)\}\}\}([\S\s]*)$/i; // RegEx provided by Andreas "Qtax" Zetterlund (www.qtax.se)
	var tiddlerContents = RegEx.exec(tiddler.text);
	if (tiddlerContents != null) {
		tiddlerContentsPre = tiddlerContents[1];
		tiddlerComments += lTrim(tiddlerContents[2]); // assuming there is only a single comments section per tiddler
		tiddlerContentsPost = tiddlerContents[3];
	}
	// append comment
	var reverseOrder = false; // DEBUG: global option!?
	if (reverseOrder) {
		tiddlerComments = newComment() + "\n" + tiddlerComments;
	} else {
		tiddlerComments += newComment() + "\n";
	}
	tiddlerComments = "{{comments{\n" + tiddlerComments + "}}}";
	// re-create tiddler contents
	tiddlerContents = tiddlerContentsPre + tiddlerComments + tiddlerContentsPost;
	// store new tiddler contents
	store.saveTiddler(tiddler.title, tiddler.title, tiddlerContents, tiddler.modifier, tiddler.modified, tiddler.tags); // DEBUG: look up saveTiddler()'s parameters
	story.refreshTiddler(title, 1, true); // DEBUG: look up refreshTiddler()'s parameters
	// DEBUG: save file automatically? (could also be uploaded if the respective plugin is installed)
}

function newComment() {
	// get comment
	var comment = getComment();
	// create comment
	if (comment != null) {
		// get username
		getUserName();
		// get timestamp
		var now = new Date();
		var timestamp = IsoTimestamp(now, true); // use UTC -- DEBUG: use toLocaleString()?; make UTC a macro parameter
		// add timestamp and username
		comment = "{{comment{\n"
			+ "!" + timestamp + "\n"
			+ "!!" + config.options.txtUserName + "\n"
			+ comment + "\n"
			+ "}}}";
	}
	return comment;
}

function getComment() { // DEBUG: use temporary textarea instead of dialog box?
	var comment = prompt("Please enter your comment (wiki markup is allowed).", "");
	comment = trim(comment);
	if (comment == "") { // disallow empty comments
		getComment();
	}
	return comment;
}

function getUserName() {
	if (config.options.txtUserName == "" || config.options.txtUserName == null) { // does not accept "Cancel"!
		config.options.txtUserName = prompt("Please enter your username.", config.options.txtUserName);
		config.options.txtUserName = trim(config.options.txtUserName);
		getUserName(); // check for empty username
	}
}

function IsoTimestamp(date, UTC) {
	var date = new Date(date)
	if (UTC == true) {
		date = date.getUTCFullYear() + "-"
			+ zeroPad(date.getUTCMonth() + 1, 2) + "-"
			+ zeroPad(date.getUTCDate(), 2) + " "
			+ zeroPad(date.getUTCHours(), 2) + ":"
			+ zeroPad(date.getUTCMinutes(), 2)
			+ " UTC";
	} else {				
		date = date.getFullYear() + "-"
			+ zeroPad(date.getMonth() + 1, 2) + "-"
			+ zeroPad(date.getDate(), 2) + " "
			+ zeroPad(date.getHours(), 2) + ":"
			+ zeroPad(date.getMinutes(), 2);
	}
	return date;
}

function zeroPad(number, digits) {
	var s = String(number);
	while (s.length < digits)
		s = '0' + s;
	return s;
}

// remove leading whitespaces
function lTrim(str) {
	var RE = /^\s*((\S+\s*)*)$/;
	return str.replace(RE, "$1");
}

// remove trailing whitespaces
function rTrim(str) {
	var RE = /^((\s*\S+)*)\s*$/;
	return str.replace(RE, "$1");
}

// remove leading and trailing whitespaces
function trim(str) {
	return lTrim(rTrim(str));
}
//}}}
|!Counter Strike & TiddlyWiki|!Programing|!memo & Link|
|<<siteMap cs>><<siteMap TiddlyWiki>>|<<siteMap Programing>>|<<siteMap memo>><<tiddler リンク総合>>|
/***
| Name:|SiteMapMacro|
| Author:|Simon Baird|
| Location:|http://simonbaird.com/mptw/#SiteMapMacro|
| Version:|1.0.3, 15-Mar-06|

!!Examples
See SiteMap and SliderSiteMap for example usage.

!!Parameters
* Name of tiddler to start at
* Max depth (a number) 
* Format (eg, nested, see formats below)
* Don't show root flag (anything other than null turns it on)
* Tags - a string containing a bracketed list of tags that we are interested in

!!History
* 1.0.3 (15-Mar-06)
** added tag filtering
* 1.0.2 (15-Mar-06)
** Added json format and dontshowroot option
* 1.0.1 (9-Mar-06)
** Added selectable formats and fixed nested slider format
* 1.0.0 (8-Mar-06)
** first release

***/
//{{{

version.extensions.SiteMapMacro = {
	major: 1,
	minor: 0,
	revision: 3,
	date: new Date(2006,3,15),
	source: "http://simonbaird.com/mptw/#SiteMapMacro"
};

config.macros.siteMap = {

	formats: {
		bullets: {
			formatString: "%0[[%1]]\n%2",
			indentString: "*"
		},

		// put this in your StyleSheet to make it look good.
		// .sliderPanel { margin-left: 2em; }

		sliders: {
			formatString: "[[%1]]+++\n%2===\n\n",
			formatStringLeaf: "[[%1]]\n"
		},

		openSliders: {
			formatString: "[[%1]]++++\n%2===\n\n",
			formatStringLeaf: "[[%1]]\n"
		},

		popups: {
			formatString: "[[%1]]+++^\n%2===\n\n",
			formatStringLeaf: "[[%1]]\n"
		},

		// these don't work too well
		openPopups: {
			formatString: "[[%1]]++++^\n%2===\n\n",
			formatStringLeaf: "[[%1]]\n"
		},
		
		// this is a little nuts but it works
		json: {
			formatString: '\n%0{"%1":[%2\n%0]}',
			formatStringLeaf: '\n%0"%1"',
			indentString: "  ",
			separatorString: ","
		}


	},

	defaultFormat: "bullets",

	treeTraverse: function(title,depth,maxdepth,format,dontshowroot,tags,excludetags) {

		var tiddler = store.getTiddler(title);
		var tagging = store.getTaggedTiddlers(title);

		if (dontshowroot)
			depth = 0;

		var indent = "";
		if (this.formats[format].indentString)
			for (var j=0;j<depth;j++)
				indent += this.formats[format].indentString;

		var childOutput = "";
		if (!maxdepth || depth < parseInt(maxdepth)) 
			for (var i=0;i<tagging.length;i++)
				if (tagging[i].title != title) {
					if (this.formats[format].separatorString && i != 0)
						childOutput += this.formats[format].separatorString;
					childOutput += this.treeTraverse(tagging[i].title,depth+1,maxdepth,format,null,tags,excludetags);
				}

		if (childOutput == "" && (
				(tags && tags != "" && !tiddler.tags.containsAll(tags.readBracketedList())) ||
				(excludetags && excludetags != "" && tiddler.tags.containsAny(excludetags.readBracketedList()))
				)
			) {
			// so prune it cos it doesn't have the right tags and neither do any of it's children
			return "";
		}

		if (dontshowroot)
			return childOutput;

		if (this.formats[format].formatStringLeaf && childOutput == "") {
			// required for nestedSliders
			return this.formats[format].formatStringLeaf.format([indent,title,childOutput]);
		}

		return this.formats[format].formatString.format([indent,title,childOutput]);
	},

	handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		wikify(this.treeTraverse(
			params[0] && params[0] != '.' ? params[0] : tiddler.title, 1, 
			params[1] && params[1] != '.' ? params[1] : null, // maxdepth
			params[2] && params[2] != '.' ? params[2] : this.defaultFormat, // format
			params[3] && params[3] != '.' ? params[3] : null, // dontshowroot
			params[4] && params[4] != '.' ? params[4] : null, // tags
			params[5] && params[5] != '.' ? params[5] : null // excludetags
			),place);
	}

}

//}}}
rane's notebook (cs and programing and others)
[[Junkster Wiki|FrontPage]]
http://tw.kuraku.net/tw.html
/***
!Information
|''Name:''|SmileViewerPlugin|
|''Source:''|http://rane.tiddlyspot.com/#SmileViewerPlugin|
|''Version:''|0.2|
|''Author:''|rane|
|''License:''|unknown|
|''~CoreVersion:''|2.4.1|
!Usage
{{{
<<smviewer sm*****>>
<<smviewer mylist *****>>
}}}
View [[SmileViewerSample]]
!History
|!Date|!Ver|!Info|
|2008 10 07|0.3|ちょっと修正|
|2008 08 22|0.2|マイリスト対応:暫定|
|2008 08 20|0.1|暫定版公開|
!todo
*user対応
!できたらいいな
*そのまま再生できるやつを取り込む
!Script
***/
//{{{
config.macros.smviewer = {};
config.macros.smviewer.handler = function(place,macroName,params,wikifier,paramString,tiddler){
var smvalue = params[1]?params[1]:params[0]?params[0]:"";
var prm1 = params[0]?params[0]:"";
var smtext = "";
smtext += "<html>";
smtext += prm1=="mylist"?'<iframe width="100%" height="100" src="http://www.nicovideo.jp/thumb_mylist/' + smvalue + '" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"></iframe>':'<iframe width="312" height="176" src="http://ext.nicovideo.jp/thumb/' + smvalue + '" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"><a href="http://www.nicovideo.jp/watch/' + smvalue + '"></a></iframe>';
smtext += "</html>\n";
var g = createTiddlyElement(place,"span");
g.innerHTML = smtext;
}
//}}}
!マイリスト
{{{
<<smviewer mylist 6287994>>
}}}
<<smviewer mylist 6287994>>
!動画表示
{{{
<<smviewer sm3187959>>
}}}
<<smviewer sm3187959>>
改行を挟まない場合、横に並びます。
<<smviewer sm2461066>><<smviewer sm3032439>><<smviewer sm75649>><<smviewer sm2498271>><<smviewer sm2622092>><<smviewer sm240696>><<smviewer sm2276651>><<smviewer sm2461066>>
/***
!!SpecialMark

特殊なマーク (KuRaKu)
{{{
[+] Dagger
[*] Comment
[>] Arrow
[s] Star (added masuda)
}}}

[+] Dagger
[*] Comment
[>] Arrow
[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: "\\[[\\+\\*\\>s]\\]",
  lookahead: "\\[([\\+\\*\\>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) {
      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 == "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);
	}
};


}
//}}}
[[StyleSheetSyntaxHighlighter]]
<!--- The default TW colours with modified layout. Ideas shamesslessly taken from (and suggested by) Simon Baird, Clint Checketts and Christine Hodges --->

/*{{{*/
.headerForeground { display: none;}
#sidebar {width: 170px; }
#sidebarTabs .tabContents {width: 158px; }
#displayArea {background: #fff;margin: 1em 15.7em 0em 1em;}
#topMenu { background: transparent; padding: 6px;margin-left: -5px; border-bottom: solid 3px #0457ce;}
#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 8px 15px;
}
#topMenu a:hover {
	color: #fff;
	background: #18f;
}
#topMenu br {display: none; padding-right: 1em;}
#topMenu span .tiddlyLinkNonExisting {font-style:normal;}
.toolbar{border-bottom:1px solid #111;}
.toolbar span{color:#333; background:transparent;border-bottom:1px solid #111;}

/*}}}*/
/*{{{*/
@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]];}

/*}}}*/
/***
StyleSheet for ~SyntaxHighlighter
***/

/*{{{*/
.dp-highlighter
{
	font-family: "Consolas", "Courier New", Courier, mono, serif;
	font-size: 12px;
	background-color: #E7E5DC;
	width: 99%;
	overflow: auto;
	margin: 18px 0 18px 0 !important;
	padding-top: 1px; /* adds a little border on top when controls are hidden */
}

/* clear styles */
.dp-highlighter ol,
.dp-highlighter ol li,
.dp-highlighter ol li span 
{
	margin: 0;
	padding: 0;
	border: none;
}

.dp-highlighter a,
.dp-highlighter a:hover
{
	background: none;
	border: none;
	padding: 0;
	margin: 0;
}

.dp-highlighter .bar
{
	padding-left: 45px;
}

.dp-highlighter.collapsed .bar,
.dp-highlighter.nogutter .bar
{
	padding-left: 0px;
}

.dp-highlighter ol
{
	list-style: decimal; /* for ie */
	background-color: #fff;
	margin: 0px 0px 1px 45px !important; /* 1px bottom margin seems to fix occasional Firefox scrolling */
	padding: 0px;
	color: #5C5C5C;
}

.dp-highlighter.nogutter ol,
.dp-highlighter.nogutter ol li
{
	list-style: none !important;
	margin-left: 0px !important;
}

.dp-highlighter ol li,
.dp-highlighter .columns div
{
	list-style: decimal-leading-zero; /* better look for others, override cascade from OL */
	list-style-position: outside !important;
	border-left: 3px solid #6CE26C;
	background-color: #F8F8F8;
	color: #5C5C5C;
	padding: 0 3px 0 10px !important;
	margin: 0 !important;
	line-height: 14px;
}

.dp-highlighter.nogutter ol li,
.dp-highlighter.nogutter .columns div
{
	border: 0;
}

.dp-highlighter .columns
{
	background-color: #F8F8F8;
	color: gray;
	overflow: hidden;
	width: 100%;
}

.dp-highlighter .columns div
{
	padding-bottom: 5px;
}

.dp-highlighter ol li.alt
{
	background-color: #FFF;
	color: inherit;
}

.dp-highlighter ol li span
{
	color: black;
	background-color: inherit;
}

/* Adjust some properties when collapsed */

.dp-highlighter.collapsed ol
{
	margin: 0px;
}

.dp-highlighter.collapsed ol li
{
	display: none;
}

/* Additional modifications when in print-view */

.dp-highlighter.printing
{
	border: none;
}

.dp-highlighter.printing .tools
{
	display: none !important;
}

.dp-highlighter.printing li
{
	display: list-item !important;
}

/* Styles for the tools */

.dp-highlighter .tools
{
	padding: 3px 8px 3px 10px;
	font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif;
	color: silver;
	background-color: #f8f8f8;
	padding-bottom: 10px;
	border-left: 3px solid #6CE26C;
}

.dp-highlighter.nogutter .tools
{
	border-left: 0;
}

.dp-highlighter.collapsed .tools
{
	border-bottom: 0;
}

.dp-highlighter .tools a
{
	font-size: 9px;
	color: #a0a0a0;
	background-color: inherit;
	text-decoration: none;
	margin-right: 10px;
}

.dp-highlighter .tools a:hover
{
	color: red;
	background-color: inherit;
	text-decoration: underline;
}

/* About dialog styles */

.dp-about { background-color: #fff; color: #333; margin: 0px; padding: 0px; }
.dp-about table { width: 100%; height: 100%; font-size: 11px; font-family: Tahoma, Verdana, Arial, sans-serif !important; }
.dp-about td { padding: 10px; vertical-align: top; }
.dp-about .copy { border-bottom: 1px solid #ACA899; height: 95%; }
.dp-about .title { color: red; background-color: inherit; font-weight: bold; }
.dp-about .para { margin: 0 0 4px 0; }
.dp-about .footer { background-color: #ECEADB; color: #333; border-top: 1px solid #fff; text-align: right; }
.dp-about .close { font-size: 11px; font-family: Tahoma, Verdana, Arial, sans-serif !important; background-color: #ECEADB; color: #333; width: 60px; height: 22px; }

/* Language specific styles */

.dp-highlighter .comment, .dp-highlighter .comments { color: #008200; background-color: inherit; }
.dp-highlighter .string { color: blue; background-color: inherit; }
.dp-highlighter .keyword { color: #069; font-weight: bold; background-color: inherit; }
.dp-highlighter .preprocessor { color: gray; background-color: inherit; }

/*}}}*/
!これってなに?
狐さん専用の、CSSを上書きしてしまう拡張です。
!導入方法
[[Stylish|http://userstyles.org/stylish/]]を狐さんにインストール
右下にメモ帳みたいなアイコンができるので左クリックし、いちばん上の
「スタイルの管理(M)」をクリックし、「書く(W)」を押して上の1行部分にタイトル名(任意)をかき、下の部分にスクリプトを書く。
保存ボタンを押すと、完了
投稿フォームを削除し、縦をつめる。
完全にROM専用
|08/08/08|新規作成|
!Script
{{{
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("www.2chan.net"),
domain("may.2chan.net"), domain("zip.2chan.net") {

body{background:#FFF!important}
tr,td{background:#EEE!important}
body form hr{display:none!important}
body center form table{display:none!important}

}
}}}
<<showtoc>>
!更新履歴
|2008/7/9 01:03|一部コミュニティでボタンがおかしいのを修正|
|2008/7/8|リリース|
!Title
{{{
2column Mixi
}}}
!Script
{{{
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("mixi.jp") {

/* 全体を中央揃え */
body { margin:0 auto !important }
body { width:750px !important }

/* ロゴ非表示 */
h1 { display:none }

/* 広告バナー非表示 */
div.adBanner { display:none !important }

/* 右カラム非表示 */
#bodySub { display:none }

/* ヘッダの背景を透過色に */
/*#headerArea { background:transparent !important }*/

/* ヘッダエリアの幅調整 */
#headerArea { width:750px !important }

/* ヘッダの高さを自動に */
#headerArea { height:auto !important }

/* 本文エリアの幅調整 */
#bodyArea { width:850px !important }

/* グローバルナビゲーションの幅調整 */
#globalNavigation { width:850px !important }

/* グローバルナビゲーションのmikly・動画・フォトボタン非表示 */
#globalNavigation ul.contentsNavigation li.mikly,
#globalNavigation ul.contentsNavigation li.movie,
#globalNavigation ul.contentsNavigation li.photo,
#globalNavigation ul.contentsNavigation li.promqueen { display:none !important }
/* ヘルプ・ログアウトボタン非表示(disabled) */
/* #globalNavigation ul.utilityNavigation li.help { display:none } */

/* ローカルナビゲーションの幅調整 */
#localNavigation { width:750px !important }

/* ローカルナビゲーションのレビュー・ミュージックボタン非表示 */
#headerArea div.personalNavigation01 ul.personalNaviHome li.review  { display:none !important }
#headerArea div.personalNavigation01 ul.personalNaviHome li.music  { display:none !important }
/* ローカルナビゲーションのプルダウンボタン非表示 */
/*
#diaryPullDownButton { display:none !important }
#videoPullDownButton { display:none !important }
#photoPullDownButton { display:none !important }
*/

/* ローカルナビゲーションの別アカウント表示時の、レビュー・ミュージックボタン非表示 */
#headerArea div.personalNavigation01 ul.personalNaviFriend li.photo  { display:none !important }
#headerArea div.personalNavigation01 ul.personalNaviFriend li.video  { display:none !important }
#headerArea div.personalNavigation01 ul.personalNaviFriend li.music  { display:none !important }

/* コミュニティ表示時、トピックとイベントを非表示 */
#headerArea div.personalNavigation01 ul.personalNaviCommunity li.subNavi  { display:none !important }
#headerArea div.personalNavigation01 ul.personalNaviCommunity li.event  { display:none !important }
#topicPullDownButton  { display:none !important }
#eventPullDownButton  { display:none !important }
#topic  { display:none !important }
#event  { display:none !important }
/* フッター幅調整 */
#footerArea { width:850px !important }

/* フッターナビゲーションマージン調整 */
#footerArea ul.footerNavigation01 li { margin:0 2px !important }

/* 検索フォーム非表示 */
div.searchForm01{ display:none }

/* 「最新情報」ヘッダの非表示 */
#mymixiUpdate div.heading01 { display:none }

/* お気に入りのいらなそうな箇所をけす */
#bodyArea.bodyMainArea.pageTitle homeTitle004{
display:none!important
}

}

/* コミュニティページ専用スタイル */
@-moz-document url-prefix("http://mixi.jp/view_community.pl") {

/* 入退会ボタンを表示 */
#localNavigation li.music  { display:inline !important }
}
}}}
!なにこれ?
エコーをシンプルにします。つってもいじりすぎてただ殺風景になっただけだが
!導入
[[Stylish]]を見て下さい
!で、中身
{{{
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document url-prefix("http://mixi.jp/recent_echo.pl"),
url-prefix("http://mixi.jp/list_echo.pl?"),
url("http://mixi.jp/res_echo.pl")
{
/* いらなそうなものをかたっぱしから非表示にしちゃう。エコー専用だ! */

div.personalNavigation01 { display:none !important }
/* ホームに戻りたいって人は↑を消して下さいな */
div.headerNavigationBottom{display:none!important;}
div.headerNavigationRight{ display:none !important }

div.bottomContents { display:none !important }
div.echoQuestionnaire{ display:none !important }
#footerArea{ display:none !important }

/*背景変更*/
div.echoArchives{
/* ヘッダの背景を透過色に */
background:transparent !important;

}
div.archiveList tr.even{
background:#FFF!important
}

/*テキストブラウズっぽくする。会社でmixi用?*/
/*div.archiveList table img { display:none !important }*/
}
}}}
<<showtoc>>
!インストールとかめんどくさい人
このTWから[[StyleSheetSyntaxHighlighter]]と[[SyntaxHighlighterPlugin]]をインポートして、[[StyleSheet]]を編集してください
編集方法はページ下部にあります
!詳細なインストール方法
!!ダウンロード
こちらのページから{{{syntaxhighlighterplugin.zip}}}をダウンロードします↓
>[[Code Syntax Highlighter Plugin for TiddlyWiki|http://www.coolcode.cn/show-310-1.html]]
!!プラグインのインストール
{{{shPlugin.js}}}をメモ帳などで開き、内容をコピーして新規Tiddlerに貼り付けます
Tiddler名は[[SyntaxHighlighterPlugin]]にして、タグには{{{systemConfig}}}をいれておきましょう
!!専用スタイルシートのインストール
{{{SyntaxHighlighter.css}}}をメモ帳などで開き、内容をコピーして新規Tiddlerに貼り付けます
名前は任意で構いませんが次の工程で利用しますので、わかりやすいものにしましょう
当TW では[[StyleSheetSyntaxHighlighter]]としています
!専用スタイルシートの適用
[[StyleSheet]]を開き、先頭行に
{{{
[[StyleSheetSyntaxHighlighter]]
}}}
と入力します(上記工程で設定したTiddler名称です)
!完了
F5を押してTWをリフレッシュしましょう!
/***
!Metadata:
|''Name:''|SyntaxHighlighterPlugin|
|''Description:''|Code Syntax Highlighter Plugin for TiddlyWiki.|
|''Version:''|1.1.2|
|''Date:''|Oct 15, 2008|
|''Source:''|http://www.coolcode.cn/show-310-1.html|
|''Author:''|Ma Bingyao (andot (at) ujn (dot) edu (dot) cn)|
|''License:''|[[GNU Lesser General Public License|http://www.gnu.org/licenses/lgpl.txt]]|
|''~CoreVersion:''|2.4.1|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0; Safari; Opera; Chrome; etc.|

!Syntax:
{{{
<code options>
codes
</code>
}}}

!Examples:
{{{
<code java>
public class HelloWorld {
    public static void main(String args[]) {
        System.out.println("HelloWorld!");
    }
}
</code>
}}}

!Revision History:
|''Version''|''Date''|''Note''|
|1.1.2|Oct 15, 2008|Optimize Highlight|
|1.0.0|Oct 13, 2008|Initial release|

!Code section:
***/
//{{{
var dp={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:"<html><head><title>About...</title></head><body class=\"dp-about\"><table cellspacing=\"0\"><tr><td class=\"copy\"><p class=\"title\">dp.SyntaxHighlighter</div><div class=\"para\">Version: {V}</p><p><a href=\"http://www.dreamprojections.com/syntaxhighlighter/?ref=about\" target=\"_blank\">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class=\"footer\"><input type=\"button\" class=\"close\" value=\"OK\" onClick=\"window.close()\"/></td></tr></table></body></html>"},ClipboardSwf:null,Version:"1.5.1"}};dp.SyntaxHighlighter=dp.sh;dp.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function($){return $.collapse},func:function($,_){$.parentNode.removeChild($);_.div.className=_.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function($,_){var A=dp.sh.Utils.FixForBlogger(_.originalCode).replace(/</g,"&lt;"),B=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");B.document.write("<textarea style=\"width:99%;height:99%\">"+A+"</textarea>");B.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||dp.sh.ClipboardSwf!=null},func:function($,A){var B=dp.sh.Utils.FixForBlogger(A.originalCode).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");if(window.clipboardData)window.clipboardData.setData("text",B);else if(dp.sh.ClipboardSwf!=null){var _=A.flashCopier;if(_==null){_=document.createElement("div");A.flashCopier=_;A.div.appendChild(_)}_.innerHTML="<embed src=\""+dp.sh.ClipboardSwf+"\" FlashVars=\"clipboard="+encodeURIComponent(B)+"\" width=\"0\" height=\"0\" type=\"application/x-shockwave-flash\"></embed>"}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function($,B){var _=document.createElement("IFRAME"),A=null;_.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;";document.body.appendChild(_);A=_.contentWindow.document;dp.sh.Utils.CopyStyles(A,window.document);A.write("<div class=\""+B.div.className.replace("collapsed","")+" printing\">"+B.div.innerHTML+"</div>");A.close();_.contentWindow.focus();_.contentWindow.print();alert("Printing...");document.body.removeChild(_)}},About:{label:"?",func:function(_){var A=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),$=A.document;dp.sh.Utils.CopyStyles($,window.document);$.write(dp.sh.Strings.AboutDialog.replace("{V}",dp.sh.Version));$.close();A.focus()}}};dp.sh.Toolbar.Create=function(B){var A=document.createElement("DIV");A.className="tools";for(var _ in dp.sh.Toolbar.Commands){var $=dp.sh.Toolbar.Commands[_];if($.check!=null&&!$.check(B))continue;A.innerHTML+="<a href=\"#\" onclick=\"dp.sh.Toolbar.Command('"+_+"',this);return false;\">"+$.label+"</a>"}return A};dp.sh.Toolbar.Command=function(_,$){var A=$;while(A!=null&&A.className.indexOf("dp-highlighter")==-1)A=A.parentNode;if(A!=null)dp.sh.Toolbar.Commands[_].func($,A.highlighter)};dp.sh.Utils.CopyStyles=function(A,_){var $=_.getElementsByTagName("link");for(var B=0;B<$.length;B++)if($[B].rel.toLowerCase()=="stylesheet")A.write("<link type=\"text/css\" rel=\"stylesheet\" href=\""+$[B].href+"\"></link>")};dp.sh.Utils.FixForBlogger=function($){return(dp.sh.isBloggerMode==true)?$.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,"\n"):$};dp.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp("\"(?:\\.|(\\\\\\\")|[^\\\"\"\\n])*\"","g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")};dp.sh.Match=function(_,$,A){this.value=_;this.index=$;this.length=_.length;this.css=A};dp.sh.Highlighter=function(){this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true};dp.sh.Highlighter.SortCallback=function($,_){if($.index<_.index)return-1;else if($.index>_.index)return 1;else if($.length<_.length)return-1;else if($.length>_.length)return 1;return 0};dp.sh.Highlighter.prototype.CreateElement=function(_){var $=document.createElement(_);$.highlighter=this;return $};dp.sh.Highlighter.prototype.GetMatches=function(_,B){var $=0,A=null;while((A=_.exec(this.code))!=null)this.matches[this.matches.length]=new dp.sh.Match(A[0],A.index,B)};dp.sh.Highlighter.prototype.AddBit=function($,A){if($==null||$.length==0)return;var C=this.CreateElement("SPAN");$=$.replace(/ /g,"&nbsp;");$=$.replace(/</g,"&lt;");$=$.replace(/\n/gm,"&nbsp;<br>");if(A!=null){if((/br/gi).test($)){var _=$.split("&nbsp;<br>");for(var B=0;B<_.length;B++){C=this.CreateElement("SPAN");C.className=A;C.innerHTML=_[B];this.div.appendChild(C);if(B+1<_.length)this.div.appendChild(this.CreateElement("BR"))}}else{C.className=A;C.innerHTML=$;this.div.appendChild(C)}}else{C.innerHTML=$;this.div.appendChild(C)}};dp.sh.Highlighter.prototype.IsInside=function(_){if(_==null||_.length==0)return false;for(var A=0;A<this.matches.length;A++){var $=this.matches[A];if($==null)continue;if((_.index>$.index)&&(_.index<$.index+$.length))return true}return false};dp.sh.Highlighter.prototype.ProcessRegexList=function(){for(var $=0;$<this.regexList.length;$++)this.GetMatches(this.regexList[$].regex,this.regexList[$].css)};dp.sh.Highlighter.prototype.ProcessSmartTabs=function(E){var B=E.split("\n"),$="",D=4,A="\t";function _(A,E,_){var B=A.substr(0,E),C=A.substr(E+1,A.length),$="";for(var D=0;D<_;D++)$+=" ";return B+$+C}function C(B,C){if(B.indexOf(A)==-1)return B;var D=0;while((D=B.indexOf(A))!=-1){var $=C-D%C;B=_(B,D,$)}return B}for(var F=0;F<B.length;F++)$+=C(B[F],D)+"\n";return $};dp.sh.Highlighter.prototype.SwitchToList=function(){var C=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n"),B=C.split("\n");if(this.addControls==true)this.bar.appendChild(dp.sh.Toolbar.Create(this));if(this.showColumns){var A=this.CreateElement("div"),_=this.CreateElement("div"),E=10,G=1;while(G<=150)if(G%E==0){A.innerHTML+=G;G+=(G+"").length}else{A.innerHTML+="&middot;";G++}_.className="columns";_.appendChild(A);this.bar.appendChild(_)}for(var G=0,D=this.firstLine;G<B.length-1;G++,D++){var $=this.CreateElement("LI"),F=this.CreateElement("SPAN");$.className=(G%2==0)?"alt":"";F.innerHTML=B[G]+"&nbsp;";$.appendChild(F);this.ol.appendChild($)}this.div.innerHTML=""};dp.sh.Highlighter.prototype.Highlight=function(C){function A($){return $.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}function $($){return $.replace(/\n*$/,"").replace(/^\n*/,"")}function _(B){var E=dp.sh.Utils.FixForBlogger(B).split("\n"),C=new Array(),D=new RegExp("^\\s*","g"),$=1000;for(var F=0;F<E.length&&$>0;F++){if(A(E[F]).length==0)continue;var _=D.exec(E[F]);if(_!=null&&_.length>0)$=Math.min(_[0].length,$)}if($>0)for(F=0;F<E.length;F++)E[F]=E[F].substr($);return E.join("\n")}function D(A,$,_){return A.substr($,_-$)}var F=0;if(C==null)C="";this.originalCode=C;this.code=$(_(C));this.div=this.CreateElement("DIV");this.bar=this.CreateElement("DIV");this.ol=this.CreateElement("OL");this.matches=new Array();this.div.className="dp-highlighter";this.div.highlighter=this;this.bar.className="bar";this.ol.start=this.firstLine;if(this.CssClass!=null)this.ol.className=this.CssClass;if(this.collapse)this.div.className+=" collapsed";if(this.noGutter)this.div.className+=" nogutter";if(this.tabsToSpaces==true)this.code=this.ProcessSmartTabs(this.code);this.ProcessRegexList();if(this.matches.length==0){this.AddBit(this.code,null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol);return}this.matches=this.matches.sort(dp.sh.Highlighter.SortCallback);for(var E=0;E<this.matches.length;E++)if(this.IsInside(this.matches[E]))this.matches[E]=null;for(E=0;E<this.matches.length;E++){var B=this.matches[E];if(B==null||B.length==0)continue;this.AddBit(D(this.code,F,B.index),null);this.AddBit(B.value,B.css);F=B.index+B.length}this.AddBit(this.code.substr(F),null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol)};dp.sh.Highlighter.prototype.GetKeywords=function($){return"\\b"+$.replace(/ /g,"\\b|\\b")+"\\b"};dp.sh.BloggerMode=function(){dp.sh.isBloggerMode=true};dp.sh.HighlightAll=function(N,B,K,I,O,E){function A(){var $=arguments;for(var _=0;_<$.length;_++){if($[_]==null)continue;if(typeof($[_])=="string"&&$[_]!="")return $[_]+"";if(typeof($[_])=="object"&&$[_].value!="")return $[_].value+""}return null}function J($,_){for(var A=0;A<_.length;A++)if(_[A]==$)return true;return false}function L(A,B,C){var _=new RegExp("^"+A+"\\[(\\w+)\\]$","gi"),$=null;for(var D=0;D<B.length;D++)if(($=_.exec(B[D]))!=null)return $[1];return C}function C(B,A,_){var $=document.getElementsByTagName(_);for(var C=0;C<$.length;C++)if($[C].getAttribute("name")==A)B.push($[C])}var T=[],P=null,M={},$="innerHTML";C(T,N,"pre");C(T,N,"textarea");if(T.length==0)return;for(var R in dp.sh.Brushes){var F=dp.sh.Brushes[R].Aliases;if(F==null)continue;for(var G=0;G<F.length;G++)M[F[G]]=R}for(G=0;G<T.length;G++){var _=T[G],U=A(_.attributes["class"],_.className,_.attributes["language"],_.language),Q="";if(U==null)continue;U=U.split(":");Q=U[0].toLowerCase();if(M[Q]==null)continue;P=new dp.sh.Brushes[M[Q]]();_.style.display="none";P.noGutter=(B==null)?J("nogutter",U):!B;P.addControls=(K==null)?!J("nocontrols",U):K;P.collapse=(I==null)?J("collapse",U):I;P.showColumns=(E==null)?J("showcolumns",U):E;var D=document.getElementsByTagName("head")[0];if(P.Style&&D){var S=document.createElement("style");S.setAttribute("type","text/css");if(S.styleSheet)S.styleSheet.cssText=P.Style;else{var H=document.createTextNode(P.Style);S.appendChild(H)}D.appendChild(S)}P.firstLine=(O==null)?parseInt(L("firstline",U,1)):O;P.Highlight(_[$]);P.source=_;_.parentNode.insertBefore(P.div,_)}};version.extensions.InlineJavascriptPlugin={major:1,minor:1,revision:2,date:new Date(2008,10,15)};dp.sh.ClipboardSwf="clipboard.swf";dp.sh.Highlight=function(_,Q,B,J,H,M,D){function A(){var $=arguments;for(var _=0;_<$.length;_++){if($[_]==null)continue;if(typeof($[_])=="string"&&$[_]!="")return $[_]+"";if(typeof($[_])=="object"&&$[_].value!="")return $[_].value+""}return null}function I($,_){for(var A=0;A<_.length;A++)if(_[A]==$)return true;return false}function K(A,B,C){var _=new RegExp("^"+A+"\\[(\\w+)\\]$","gi"),$=null;for(var D=0;D<B.length;D++)if(($=_.exec(B[D]))!=null)return $[1];return C}var N=null,$="innerHTML";if(this.registered==undefined){var L={};for(var O in dp.sh.Brushes){var E=dp.sh.Brushes[O].Aliases;if(E==null)continue;for(var F=0;F<E.length;F++)L[E[F]]=O}this.registered=L}Q=Q.split(":");language=Q[0].toLowerCase();if(this.registered[language]==null)return;N=new dp.sh.Brushes[this.registered[language]]();_.style.display="none";N.noGutter=(B==null)?I("nogutter",Q):!B;N.addControls=(J==null)?!I("nocontrols",Q):J;N.collapse=(H==null)?I("collapse",Q):H;N.showColumns=(D==null)?I("showcolumns",Q):D;var C=document.getElementsByTagName("head")[0],P=document.getElementById(N.CssClass);if(N.Style&&C&&!P){P=document.createElement("style");P.setAttribute("id",N.CssClass);P.setAttribute("type","text/css");if(P.styleSheet)P.styleSheet.cssText=N.Style;else{var G=document.createTextNode(N.Style);P.appendChild(G)}C.appendChild(P)}N.firstLine=(M==null)?parseInt(K("firstline",Q,1)):M;N.Highlight(_[$]);N.source=_;_.parentNode.insertBefore(N.div,_)};config.formatters.push({name:"SyntaxHighlighter",match:"^<code[\\s]+[^>]+>\\n",element:"pre",handler:function(_){this.lookaheadRegExp=/<code[\s]+([^>]+)>\n((?:^[^\n]*\n)+?)(^<\/code>$\n?)/mg;this.lookaheadRegExp.lastIndex=_.matchStart;var $=this.lookaheadRegExp.exec(_.source);if($&&$.index==_.matchStart){var C=$[1],B=$[2];if(config.browser.isIE)B=B.replace(/\n/g,"\r");var A=createTiddlyElement(_.output,this.element,null,null,B);dp.sh.Highlight(A,C);_.nextMatch=$.index+$[0].length}}});config.formatterHelpers.enclosedTextHelper=function(_){this.lookaheadRegExp.lastIndex=_.matchStart;var $=this.lookaheadRegExp.exec(_.source);if($&&$.index==_.matchStart){var B=$[1];if(config.browser.isIE)B=B.replace(/\n/g,"\r");var A=createTiddlyElement(_.output,this.element,null,null,B);switch(_.matchText){case"/*{{{*/\n":dp.sh.Highlight(A,"css");break;case"//{{{\n":dp.sh.Highlight(A,"js");break;case"<!--{{{-->\n":dp.sh.Highlight(A,"xml");break}_.nextMatch=$.index+$[0].length}};dp.sh.Brushes.AS3=function(){var _="class interface package",$="Array Boolean Date decodeURI decodeURIComponent encodeURI encodeURIComponent escape "+"int isFinite isNaN isXMLName Number Object parseFloat parseInt "+"String trace uint unescape XML XMLList "+"Infinity -Infinity NaN undefined "+"as delete instanceof is new typeof "+"break case catch continue default do each else finally for if in "+"label return super switch throw try while with "+"dynamic final internal native override private protected public static "+"...rest const extends function get implements namespace set "+"import include use "+"AS3 flash_proxy object_proxy "+"false null this true "+"void Null";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"blockcomment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"definition"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp("var","gm"),css:"variable"}];this.CssClass="dp-as";this.Style=".dp-as .comment { color: #009900; font-style: italic; }"+".dp-as .blockcomment { color: #3f5fbf; }"+".dp-as .string { color: #990000; }"+".dp-as .preprocessor { color: #0033ff; }"+".dp-as .definition { color: #9900cc; font-weight: bold; }"+".dp-as .keyword { color: #0033ff; }"+".dp-as .variable { color: #6699cc; font-weight: bold; }"};dp.sh.Brushes.AS3.prototype=new dp.sh.Highlighter();dp.sh.Brushes.AS3.Aliases=["as","actionscript","ActionScript","as3","AS3"];dp.sh.Brushes.Bash=function(){var _="alias bg bind break builtin cd command compgen complete continue "+"declare dirs disown echo enable eval exec exit export fc fg "+"getopts hash help history jobs kill let local logout popd printf "+"pushd pwd read readonly return set shift shopt source "+"suspend test times trap type typeset ulimit umask unalias unset wait",$="case do done elif else esac fi for function if in select then "+"time until while";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("[()[\\]{}]","g"),css:"delim"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp("\\w+=","g"),css:"vars"},{regex:new RegExp("\\s-\\w+","g"),css:"flag"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"builtin"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-bash";this.Style=".dp-bash .builtin {color: maroon; font-weight: bold;}"+".dp-bash .comment {color: gray;}"+".dp-bash .delim {font-weight: bold;}"+".dp-bash .flag {color: green;}"+".dp-bash .string {color: red;}"+".dp-bash .vars {color: blue;}"};dp.sh.Brushes.Bash.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Bash.Aliases=["bash","sh"];dp.sh.Brushes.Batch=function(){var _="APPEND ATTRIB CD CHDIR CHKDSK CHOICE CLS COPY DEL ERASE DELTREE "+"DIR EXIT FC COMP FDISK FIND FORMAT FSUTIL HELP JOIN "+"LABEL LOADFIX MK MKDIR MEM MEMMAKER MORE MOVE MSD PCPARK "+"PRINT RD RMDIR REN SCANDISK SHARE SORT SUBST SYS "+"TIME DATE TREE TRUENAME TYPE UNDELETE VER XCOPY",$="DO ELSE FOR IN CALL CHOICE GOTO SHIFT PAUSE ERRORLEVEL "+"IF NOT EXIST LFNFOR START SETLOCAL ENDLOCAL ECHO SET";this.regexList=[{regex:new RegExp("REM.*$","gm"),css:"comment"},{regex:new RegExp("::.*$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("[()[\\]{}]","g"),css:"delim"},{regex:new RegExp("%\\w+%","g"),css:"vars"},{regex:new RegExp("%%\\w+","g"),css:"vars"},{regex:new RegExp("\\w+=","g"),css:"vars"},{regex:new RegExp("@\\w+","g"),css:"keyword"},{regex:new RegExp(":\\w+","g"),css:"keyword"},{regex:new RegExp("\\s/\\w+","g"),css:"flag"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"builtin"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-batch";this.Style=".dp-batch .builtin {color: maroon; font-weight: bold;}"+".dp-batch .comment {color: gray;}"+".dp-batch .delim {font-weight: bold;}"+".dp-batch .flag {color: green;}"+".dp-batch .string {color: red;}"+".dp-batch .vars {color: blue;font-weight: bold;}"};dp.sh.Brushes.Batch.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Batch.Aliases=["batch","dos"];dp.sh.Brushes.ColdFusion=function(){this.CssClass="dp-coldfusion";this.Style=".dp-coldfusion { font: 13px \"Courier New\", Courier, monospace; }"+".dp-coldfusion .tag, .dp-coldfusion .tag-name { color: #990033; }"+".dp-coldfusion .attribute { color: #990033; }"+".dp-coldfusion .attribute-value { color: #0000FF; }"+".dp-coldfusion .cfcomments { background-color: #FFFF99; color: #000000; }"+".dp-coldfusion .cfscriptcomments { color: #999999; }"+".dp-coldfusion .keywords { color: #0000FF; }"+".dp-coldfusion .mgkeywords { color: #CC9900; }"+".dp-coldfusion .numbers { color: #ff0000; }"+".dp-coldfusion .strings { color: green; }";this.mgKeywords="setvalue getvalue addresult viewcollection viewstate";this.keywords="var eq neq gt gte lt lte not and or true false "+"abs acos addsoaprequestheader addsoapresponseheader "+"arrayappend arrayavg arrayclear arraydeleteat arrayinsertat "+"arrayisempty arraylen arraymax arraymin arraynew "+"arrayprepend arrayresize arrayset arraysort arraysum "+"arrayswap arraytolist asc asin atn binarydecode binaryencode "+"bitand bitmaskclear bitmaskread bitmaskset bitnot bitor bitshln "+"bitshrn bitxor ceiling charsetdecode charsetencode chr cjustify "+"compare comparenocase cos createdate createdatetime createobject "+"createobject createobject createobject createobject createodbcdate "+"createodbcdatetime createodbctime createtime createtimespan "+"createuuid dateadd datecompare dateconvert datediff dateformat "+"datepart day dayofweek dayofweekasstring dayofyear daysinmonth "+"daysinyear de decimalformat decrementvalue decrypt decryptbinary "+"deleteclientvariable directoryexists dollarformat duplicate encrypt "+"encryptbinary evaluate exp expandpath fileexists find findnocase "+"findoneof firstdayofmonth fix formatbasen generatesecretkey "+"getauthuser getbasetagdata getbasetaglist getbasetemplatepath "+"getclientvariableslist getcontextroot getcurrenttemplatepath "+"getdirectoryfrompath getencoding getexception getfilefrompath "+"getfunctionlist getgatewayhelper gethttprequestdata gethttptimestring "+"getk2serverdoccount getk2serverdoccountlimit getlocale "+"getlocaledisplayname getlocalhostip getmetadata getmetricdata "+"getpagecontext getprofilesections getprofilestring getsoaprequest "+"getsoaprequestheader getsoapresponse getsoapresponseheader "+"gettempdirectory gettempfile gettemplatepath gettickcount "+"gettimezoneinfo gettoken hash hour htmlcodeformat htmleditformat "+"iif incrementvalue inputbasen insert int isarray isbinary isboolean "+"iscustomfunction isdate isdebugmode isdefined isk2serverabroker "+"isk2serverdoccountexceeded isk2serveronline isleapyear islocalhost "+"isnumeric isnumericdate isobject isquery issimplevalue issoaprequest "+"isstruct isuserinrole isvalid isvalid isvalid iswddx isxml "+"isxmlattribute isxmldoc isxmlelem isxmlnode isxmlroot javacast "+"jsstringformat lcase left len listappend listchangedelims listcontains "+"listcontainsnocase listdeleteat listfind listfindnocase listfirst "+"listgetat listinsertat listlast listlen listprepend listqualify "+"listrest listsetat listsort listtoarray listvaluecount "+"listvaluecountnocase ljustify log log10 lscurrencyformat lsdateformat "+"lseurocurrencyformat lsiscurrency lsisdate lsisnumeric lsnumberformat "+"lsparsecurrency lsparsedatetime lsparseeurocurrency lsparsenumber "+"lstimeformat ltrim max mid min minute month monthasstring now "+"numberformat paragraphformat parameterexists parsedatetime pi "+"preservesinglequotes quarter queryaddcolumn queryaddrow querynew "+"querysetcell quotedvaluelist rand randomize randrange refind "+"refindnocase releasecomobject removechars repeatstring replace "+"replacelist replacenocase rereplace rereplacenocase reverse right "+"rjustify round rtrim second sendgatewaymessage setencoding "+"setlocale setprofilestring setvariable sgn sin spanexcluding "+"spanincluding sqr stripcr structappend structclear structcopy "+"structcount structdelete structfind structfindkey structfindvalue "+"structget structinsert structisempty structkeyarray structkeyexists "+"structkeylist structnew structsort structupdate tan timeformat "+"tobase64 tobinary toscript tostring trim ucase urldecode urlencodedformat "+"urlsessionformat val valuelist week wrap writeoutput xmlchildpos "+"xmlelemnew xmlformat xmlgetnodetype xmlnew xmlparse xmlsearch xmltransform "+"xmlvalidate year yesnoformat";this.stringMatches=new Array();this.attributeMatches=new Array()};dp.sh.Brushes.ColdFusion.prototype=new dp.sh.Highlighter();dp.sh.Brushes.ColdFusion.Aliases=["coldfusion","cf"];dp.sh.Brushes.ColdFusion.prototype.ProcessRegexList=function(){function B(_,$){_[_.length]=$}function A(A,$){for(var _=0;_<A.length;_++)if(A[_]==$)return _;return-1}var _=null,$=null;this.GetMatches(new RegExp("\\b(\\d+)","gm"),"numbers");this.GetMatches(new RegExp(this.GetKeywords(this.mgKeywords),"igm"),"mgkeywords");this.GetMatches(dp.sh.RegexLib.SingleLineCComments,"cfscriptcomments");this.GetMatches(dp.sh.RegexLib.MultiLineCComments,"cfscriptcomments");this.GetMatches(new RegExp("(&lt;|<)!---[\\s\\S]*?---(&gt;|>)","gm"),"cfcomments");$=new RegExp("(cfset\\s*)?([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?')*","gm");while((_=$.exec(this.code))!=null){if(_[1]!=undefined&&_[1]!="")continue;if(_[3]!=undefined&&_[3]!=""&&_[3]!="\"\""&&_[3]!="''"){B(this.matches,new dp.sh.Match(_[2],_.index,"attribute"));B(this.matches,new dp.sh.Match(_[3],_.index+_[0].indexOf(_[3]),"attribute-value"));B(this.stringMatches,_[3]);B(this.attributeMatches,_[2])}}this.GetMatches(new RegExp("(&lt;|<)/*\\?*(?!\\!)|/*\\?*(&gt;|>)","gm"),"tag");$=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");while((_=$.exec(this.code))!=null)B(this.matches,new dp.sh.Match(_[1],_.index+_[0].indexOf(_[1]),"tag-name"));$=new RegExp(this.GetKeywords(this.keywords),"igm");while((_=$.exec(this.code))!=null)if(A(this.attributeMatches,_[0])==-1)B(this.matches,new dp.sh.Match(_[0],_.index,"keywords"));$=new RegExp("cfset\\s*.*(\".*?\"|'.*?')","gm");while((_=$.exec(this.code))!=null)if(_[1]!=undefined&&_[1]!=""){B(this.matches,new dp.sh.Match(_[1],_.index+_[0].indexOf(_[1]),"strings"));B(this.stringMatches,_[1])}while((_=dp.sh.RegexLib.DoubleQuotedString.exec(this.code))!=null)if(A(this.stringMatches,_[0])==-1)B(this.matches,new dp.sh.Match(_[0],_.index,"strings"));while((_=dp.sh.RegexLib.SingleQuotedString.exec(this.code))!=null)if(A(this.stringMatches,_[0])==-1)B(this.matches,new dp.sh.Match(_[0],_.index,"strings"))};dp.sh.Brushes.Cpp=function(){var _="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR "+"DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH "+"HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP "+"HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY "+"HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT "+"HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE "+"LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF "+"LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR "+"LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR "+"PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT "+"PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 "+"POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR "+"PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 "+"PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT "+"SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG "+"ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM "+"char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t "+"clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS "+"FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t "+"__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t "+"jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler "+"sig_atomic_t size_t _stat __stat64 _stati64 terminate_function "+"time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf "+"va_list wchar_t wctrans_t wctype_t wint_t signed",$="break case catch class const __finally __exception __try "+"const_cast continue private public protected __declspec "+"default delete deprecated dllexport dllimport do dynamic_cast "+"else enum explicit extern if for friend goto inline "+"mutable naked namespace new noinline noreturn nothrow "+"register reinterpret_cast return selectany "+"sizeof static static_cast struct switch template this "+"thread throw true false try typedef typeid typename union "+"using uuid virtual void volatile whcar_t while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^ *#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-cpp";this.Style=".dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }"};dp.sh.Brushes.Cpp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Cpp.Aliases=["cpp","c","c++"];dp.sh.Brushes.CSharp=function(){var $="abstract as base bool break byte case catch char checked class const "+"continue decimal default delegate do double else enum event explicit "+"extern false finally fixed float for foreach get goto if implicit in int "+"interface internal is lock long namespace new null object operator out "+"override params private protected public readonly ref return sbyte sealed set "+"short sizeof stackalloc static string struct switch this throw true try "+"typeof uint ulong unchecked unsafe ushort using virtual void while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c";this.Style=".dp-c .vars { color: #d00; }"};dp.sh.Brushes.CSharp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSharp.Aliases=["c#","c-sharp","csharp"];dp.sh.Brushes.CSS=function(){var _="ascent azimuth background-attachment background-color background-image background-position "+"background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top "+"border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color "+"border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width "+"border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color "+"content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display "+"elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font "+"height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top "+"margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans "+"outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page "+"page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position "+"quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress "+"table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em "+"vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",$="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder "+"both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed "+"continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double "+"embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia "+"gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic "+"justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha "+"lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower "+"navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset "+"outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side "+"rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow "+"small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize "+"table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal "+"text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin "+"upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",A="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif";this.regexList=[{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\#[a-zA-Z0-9]{3,6}","g"),css:"value"},{regex:new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)","g"),css:"value"},{regex:new RegExp("!important","g"),css:"important"},{regex:new RegExp(this.GetKeywordsCSS(_),"gm"),css:"keyword"},{regex:new RegExp(this.GetValuesCSS($),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(A),"g"),css:"value"}];this.CssClass="dp-css";this.Style=".dp-css .value { color: black; }"+".dp-css .important { color: red; }"};dp.sh.Highlighter.prototype.GetKeywordsCSS=function($){return"\\b([a-z_]|)"+$.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"};dp.sh.Highlighter.prototype.GetValuesCSS=function($){return"\\b"+$.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"};dp.sh.Brushes.CSS.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSS.Aliases=["css"];dp.sh.Brushes.Delphi=function(){var $="abs addr and ansichar ansistring array as asm begin boolean byte cardinal "+"case char class comp const constructor currency destructor div do double "+"downto else end except exports extended false file finalization finally "+"for function goto if implementation in inherited int64 initialization "+"integer interface is label library longint longword mod nil not object "+"of on or packed pansichar pansistring pchar pcurrency pdatetime pextended "+"pint64 pointer private procedure program property pshortstring pstring "+"pvariant pwidechar pwidestring protected public published raise real real48 "+"record repeat set shl shortint shortstring shr single smallint string then "+"threadvar to true try type unit until uses val var varirnt while widechar "+"widestring with word write writeln xor";this.regexList=[{regex:new RegExp("\\(\\*[\\s\\S]*?\\*\\)","gm"),css:"comment"},{regex:new RegExp("{(?!\\$)[\\s\\S]*?}","gm"),css:"comment"},{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\{\\$[a-zA-Z]+ .+\\}","g"),css:"directive"},{regex:new RegExp("\\b[\\d\\.]+\\b","g"),css:"number"},{regex:new RegExp("\\$[a-zA-Z0-9]+\\b","g"),css:"number"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-delphi";this.Style=".dp-delphi .number { color: blue; }"+".dp-delphi .directive { color: #008284; }"+".dp-delphi .vars { color: #000; }"};dp.sh.Brushes.Delphi.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Delphi.Aliases=["delphi","pascal"];dp.sh.Brushes.Java=function(){var $="abstract assert boolean break byte case catch char class const "+"continue default do double else enum extends "+"false final finally float for goto if implements import "+"instanceof int interface long native new null "+"package private protected public return "+"short static strictfp super switch synchronized this throw throws true "+"transient try void volatile while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"number"},{regex:new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b","g"),css:"annotation"},{regex:new RegExp("\\@interface\\b","g"),css:"keyword"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-j";this.Style=".dp-j .annotation { color: #646464; }"+".dp-j .number { color: #C00000; }"};dp.sh.Brushes.Java.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Java.Aliases=["java"];dp.sh.Brushes.JScript=function(){var $="abstract boolean break byte case catch char class const continue debugger "+"default delete do double else enum export extends false final finally float "+"for function goto if implements import in instanceof int interface long native "+"new null package private protected public return short static super switch "+"synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c"};dp.sh.Brushes.JScript.prototype=new dp.sh.Highlighter();dp.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];dp.sh.Brushes.Lua=function(){var $="break do end else elseif function if local nil not or repeat return and then until while this",_="math\\.\\w+ string\\.\\w+ os\\.\\w+ debug\\.\\w+ io\\.\\w+ error fopen dofile coroutine\\.\\w+ arg getmetatable ipairs loadfile loadlib loadstring longjmp print rawget rawset seek setmetatable assert tonumber tostring";this.regexList=[{regex:new RegExp("--\\[\\[[\\s\\S]*\\]\\]--","gm"),css:"comment"},{regex:new RegExp("--[^\\[]{2}.*$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"func"},];this.CssClass="dp-lua"};dp.sh.Brushes.Lua.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Lua.Aliases=["lua"];dp.sh.Brushes.Mxml=function(){this.CssClass="dp-mxml";this.Style=".dp-mxml .cdata { color: #000000; }"+".dp-mxml .tag { color : #0000ff; }"+".dp-mxml .tag-name { color: #0000ff; }"+".dp-mxml .script { color: green; }"+".dp-mxml .metadata { color: green; }"+".dp-mxml .attribute { color: #000000; }"+".dp-mxml .attribute-value { color: #990000; }"+".dp-mxml .trace { color: #cc6666; }"+".dp-mxml .var { color: #6699cc; }"+".dp-mxml .comment { color: #009900; }"+".dp-mxml .string { color: #990000; }"+".dp-mxml .keyword { color: blue; }"};dp.sh.Brushes.Mxml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Mxml.Aliases=["mxml"];dp.sh.Brushes.Mxml.prototype.ProcessRegexList=function(){function H(_,$){_[_.length]=$}function B(B,_){var A=0,$=false;for(A=0;A<B.length;A++)if(_.index>B[A].firstIndex&&_.index<B[A].lastIndex)$=true;return $}var $=0,F=null,D=null,A=null,C="",E=new Array(),_="abstract boolean break byte case catch char class const continue debugger "+"default delete do double else enum export extends false final finally float "+"for function goto if implements import in instanceof int interface long native "+"new null package private protected public return short static super switch "+"synchronized this throw throws transient true try typeof var void volatile while with",G=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords("trace"),"gm"),css:"trace"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"keyword"}];A=new RegExp("&lt;\\!\\[CDATA\\[(.|\\s)*?\\]\\]&gt;","gm");while((F=A.exec(this.code))!=null){C=F[0].substr(0,12);H(this.matches,new dp.sh.Match(C,F.index,"cdata"));C=F[0].substr(12,F[0].length-12-6);for(var I=0;I<G.length;I++)while((D=G[I].regex.exec(C))!=null)H(this.matches,new dp.sh.Match(D[0],F.index+12+D.index,G[I].css));C=F[0].substr(F[0].length-6,6);H(this.matches,new dp.sh.Match(C,F.index+F[0].length-6,"cdata"));E.push({firstIndex:F.index,lastIndex:F.index+F[0].length-1})}this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)","gm"),"comments");A=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");while((F=A.exec(this.code))!=null){if(F[1]==null)continue;if(B(E,F))continue;H(this.matches,new dp.sh.Match(F[1],F.index,"attribute"));if(F[2]!=undefined)H(this.matches,new dp.sh.Match(F[2],F.index+F[0].indexOf(F[2]),"attribute-value"))}A=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");while((F=A.exec(this.code))!=null){if(B(E,F))continue;C=F[0].substr(4,F[0].length-4);switch(C){case"mx:Script":case"/mx:Script":H(this.matches,new dp.sh.Match(F[0]+"&gt;",F.index,"script"));break;case"mx:Metadata":case"/mx:Metadata":H(this.matches,new dp.sh.Match(F[0]+"&gt;",F.index,"metadata"));break;default:H(this.matches,new dp.sh.Match(F[0],F.index,"tag-name"));break}}A=new RegExp("\\?&gt;|&gt;|/&gt;","gm");while((F=A.exec(this.code))!=null){if(B(E,F))continue;H(this.matches,new dp.sh.Match(F[0],F.index,"tag"))}};dp.sh.Brushes.Perl=function(){var _="abs accept alarm atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir connect cos crypt dbmclose dbmopen defined delete dump each endgrent endhostent endnetent endprotoent endpwent endservent eof exec exists exp fcntl fileno flock fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt glob gmtime grep hex import index int ioctl join keys kill lc lcfirst length link listen localtime lock log lstat m map mkdir msgctl msgget msgrcv msgsnd no oct open opendir ord pack pipe pop pos print printf prototype push q qq quotemeta qw qx rand read readdir readline readlink readpipe recv ref rename reset reverse rewinddir rindex rmdir scalar seek seekdir semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unlink unpack unshift untie utime values vec waitpid wantarray warn write qr",$="s select goto die do package redo require return continue for foreach last next wait while use if else elsif eval exit unless switch case",A="my our local";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("(\\$|@|%)\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(A),"gm"),css:"declarations"}];this.CssClass="dp-perl"};dp.sh.Brushes.Perl.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Perl.Aliases=["perl"];dp.sh.Brushes.Php=function(){var _="abs acos acosh addcslashes addslashes "+"array_change_key_case array_chunk array_combine array_count_values array_diff "+"array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill "+"array_filter array_flip array_intersect array_intersect_assoc array_intersect_key "+"array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map "+"array_merge array_merge_recursive array_multisort array_pad array_pop array_product "+"array_push array_rand array_reduce array_reverse array_search array_shift "+"array_slice array_splice array_sum array_udiff array_udiff_assoc "+"array_udiff_uassoc array_uintersect array_uintersect_assoc "+"array_uintersect_uassoc array_unique array_unshift array_values array_walk "+"array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert "+"basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress "+"bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir "+"checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists "+"closedir closelog copy cos cosh count count_chars date decbin dechex decoct "+"deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log "+"error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded "+"feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents "+"fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype "+"floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf "+"fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname "+"gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt "+"getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext "+"gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set "+"interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double "+"is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long "+"is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault "+"is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br "+"parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir "+"round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split "+"str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes "+"stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk "+"strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime "+"strtoupper strtr strval substr substr_compare",$="and or xor __FILE__ __LINE__ array as break case "+"cfunction class const continue declare default die do else "+"elseif empty enddeclare endfor endforeach endif endswitch endwhile "+"extends for foreach function include include_once global if "+"new old_function return static switch use require require_once "+"var while __FUNCTION__ __CLASS__ "+"__METHOD__ abstract interface public implements extends private protected throw";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c"};dp.sh.Brushes.Php.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Php.Aliases=["php"];dp.sh.Brushes.Python=function(){var $="and assert break class continue def del elif else "+"except exec finally for from global if import in is "+"lambda not or pass print raise return try yield while",_="None True False self cls class_";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:new RegExp("^\\s*@\\w+","gm"),css:"decorator"},{regex:new RegExp("(['\"]{3})([^\\1])*?\\1","gm"),css:"comment"},{regex:new RegExp("\"(?!\")(?:\\.|\\\\\\\"|[^\\\"\"\\n\\r])*\"","gm"),css:"string"},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'","gm"),css:"string"},{regex:new RegExp("\\b\\d+\\.?\\w*","g"),css:"number"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"special"}];this.CssClass="dp-py";this.Style=".dp-py .builtins { color: #ff1493; }"+".dp-py .magicmethods { color: #808080; }"+".dp-py .exceptions { color: brown; }"+".dp-py .types { color: brown; font-style: italic; }"+".dp-py .commonlibs { color: #8A2BE2; font-style: italic; }"};dp.sh.Brushes.Python.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Python.Aliases=["py","python"];dp.sh.Brushes.Ruby=function(){var $="alias and BEGIN begin break case class def define_method defined do each else elsif "+"END end ensure false for if in module new next nil not or raise redo rescue retry return "+"self super then throw true undef unless until when while yield",_="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload "+"Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol "+"ThreadGroup Thread Time TrueClass";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(":[a-z][A-Za-z0-9_]*","g"),css:"symbol"},{regex:new RegExp("(\\$|@@|@)\\w+","g"),css:"variable"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"builtin"}];this.CssClass="dp-rb";this.Style=".dp-rb .symbol { color: #a70; }"+".dp-rb .variable { color: #a70; font-weight: bold; }"};dp.sh.Brushes.Ruby.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Ruby.Aliases=["ruby","rails","ror"];dp.sh.Brushes.Sql=function(){var _="abs avg case cast coalesce convert count current_timestamp "+"current_user day isnull left lower month nullif replace right "+"session_user space substring sum system_user upper user year",$="absolute action add after alter as asc at authorization begin bigint "+"binary bit by cascade char character check checkpoint close collate "+"column commit committed connect connection constraint contains continue "+"create cube current current_date current_time cursor database date "+"deallocate dec decimal declare default delete desc distinct double drop "+"dynamic else end end-exec escape except exec execute false fetch first "+"float for force foreign forward free from full function global goto grant "+"group grouping having hour ignore index inner insensitive insert instead "+"int integer intersect into is isolation key last level load local max min "+"minute modify move name national nchar next no numeric of off on only "+"open option order out output partial password precision prepare primary "+"prior privileges procedure public read real references relative repeatable "+"restrict return returns revoke rollback rollup rows rule schema scroll "+"second section select sequence serializable set size smallint static "+"statistics table temp temporary then time timestamp to top transaction "+"translation trigger true truncate uncommitted union unique update values "+"varchar varying view when where with work",A="all and any between cross in join like not null or outer some";this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(A),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords($),"gmi"),css:"keyword"}];this.CssClass="dp-sql";this.Style=".dp-sql .func { color: #ff1493; }"+".dp-sql .op { color: #808080; }"};dp.sh.Brushes.Sql.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Sql.Aliases=["sql"];dp.sh.Brushes.Vb=function(){var $="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto "+"Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate "+"CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType "+"Date Decimal Declare Default Delegate Dim DirectCast Do Double Each "+"Else ElseIf End Enum Erase Error Event Exit False Finally For Friend "+"Function Get GetType GoSub GoTo Handles If Implements Imports In "+"Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module "+"MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing "+"NotInheritable NotOverridable Object On Option Optional Or OrElse "+"Overloads Overridable Overrides ParamArray Preserve Private Property "+"Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume "+"Return Select Set Shadows Shared Short Single Static Step Stop String "+"Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until "+"Variant When While With WithEvents WriteOnly Xor";this.regexList=[{regex:new RegExp("'.*$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-vb"};dp.sh.Brushes.Vb.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Vb.Aliases=["vb","vb.net"];dp.sh.Brushes.Xml=function(){this.CssClass="dp-xml";this.Style=".dp-xml .cdata { color: #ff1493; }"+".dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }"+".dp-xml .attribute { color: red; }"+".dp-xml .attribute-value { color: blue; }"};dp.sh.Brushes.Xml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"];dp.sh.Brushes.Xml.prototype.ProcessRegexList=function(){function B(_,$){_[_.length]=$}var $=0,A=null,_=null;this.GetMatches(new RegExp("(&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](&gt;|>)","gm"),"cdata");this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)","gm"),"comments");_=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");while((A=_.exec(this.code))!=null){if(A[1]==null)continue;B(this.matches,new dp.sh.Match(A[1],A.index,"attribute"));if(A[2]!=undefined)B(this.matches,new dp.sh.Match(A[2],A.index+A[0].indexOf(A[2]),"attribute-value"))}this.GetMatches(new RegExp("(&lt;|<)/*\\?*(?!\\!)|/*\\?*(&gt;|>)","gm"),"tag");_=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");while((A=_.exec(this.code))!=null)B(this.matches,new dp.sh.Match(A[1],A.index+A[0].indexOf(A[1]),"tag-name"))}
//}}}
TCHARの処理について、メモしておく。
防災ってUNICODEを全く考えてないんだよね
下記、コピペ。あとでdraftする
<<showtoc>>
!文字または文字列の表し方
{{{
TCHAR chara;
chara = 'a';
}}}
上のコードは間違いです。なぜでしょうか。
char型で在れば問題ないのですが、ここではTCHAR型を宣言しているため、'a'がchar型だと認識されてしまうのです。
そのため、TCHAR型の文字を表すには、_TマクロまたはTEXTマクロを使用します。
{{{
TCHAR chara;
chara = _T('a');
// あるいは
chara = TEXT('a');
}}}
文字列の場合でも同じく、_T("PAKEN")、TEXT("PAKEN")、と記述してください。
(ちなみに、WCHAR型の場合は頭にLをつけ、L'a'、L"PAKEN"、などと表します)

!謎のデータ型LPCTSTR
さて、char、WCHAR、TCHARの違いがわかったところで、一気に文字列を表すデータ型を見てみましょう。
{{{
LPSTR = char*
LPCSTR = const char*
LPWSTR = WCHAR*
LPCWSTR = const WCHAR*
LPTSTR = TCHAR*
LPCTSTR = const TCHAR*
}}}
お分かりですね。
LPCTSTRはTCHAR型の文字列なわけです。
今までchar型の文字列をLPCTSTRに強引にキャストして使っていた人もいたのではないでしょうか?
コンパイラの設定でUNICODEを使用しないようにすれば、TCHAR型はchar型に変換されるので、使うことが出来ます。
しかし、UNICODEを使用する設定にしていた人は、TCHAR型がWCHAR型に変換されるため、エラーが発生するはずです。

このような間違いを防ぐためにも、最初からchar型ではなくTCHAR型を使うことが推奨されているのです。

!注意点
{{{
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nShowCmd);
}}}
見慣れたWinMain関数ですね。ですが、ここには問題点が一つあります。
お分かりですね。第3引数にchar型の文字列であるLPSTRが使われています。
ちゃんとTCHAR型のLPTSTRにしてあげなくてはなりません。
そのためには、WinMainの頭に_tをつけてあげます。なお、tchar.hをインクルードします
{{{
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPTSTR lpCmdLine, int nShowCmd);
}}}
これで問題ないですね。

ほとんど全てのWin32APIは、LPCTSTRまたはLPTSTRを使用しているので、私たちは気にする必要がありません。
ですが、このままだとstrcpyやfopenなど、C言語標準ライブラリ関数が使えなくなります。
でもご安心を。ちゃんとtchar.hにTCHAR型用に定義されています。

!!tchar.hに定義されている例
|strcpy()|→|_tcscpy()|
|fopen()|→|_tfopen()|
|atoi()|→|_ttoi()|
|sprintf()|→|_stprintf()|

何を使用すればよいのかわからなくなったら、tchar.h内を検索してみましょう。
TCHAR型を使用した代わりの関数が見つかります。
<<showtoc>>
!TiddlersBarとdisplaydiary
TiddlersBarPluginを導入する場合、FrontPageに{{{<<displaydiary 5>>}}}が入ってると(数字は5じゃなくても)更新時にFxがハングアップする模様
機能が競合してるのかな?
*回避策その1:MainMenuに書く
>表示されるけど最初に開いた時にFrontPageが開かないのでNG
*回避策その2:Under Construction
*妥協案:~ViewDiaryというTiddlerをつくり、中に{{{<<displaydiary 5>>}}}を書く<<br>>sliderで書いたりすると呼び出されるので意味がない。tab表示ならなんとかなるかな<<br>>たとえばこんな感じで書く
{{{
<<tabs txtMainTab "だみー" "だみー" DummyTiddler "日記" "日記を表示する" ViewDiary>>
}}}
こうなる↓
<<tabs txtMainTab "だみー" "だみー" DummyTiddler "日記" "日記を表示する" ViewDiary>>
最初にだみーが表示されているのでdisplaydiaryが呼び出されないし、ある程度邪魔にならない大きさかなあ?
DummyTiddlerのところに最初に表示させたいTiddlerを書いておくと全然邪魔とは思えないかも?
!TW + Google Chrome
[[ここにまとめた|http://www4.atpages.jp/~rane/nucleus/index.php?itemid=33&catid=3]]
TiddlyWikiが動作する無料ホームページスペースを探してみる
最新版が動作するスペースはtspot以外はないかも知れん
でもtspotはTWに画像を埋め込まないと画像が表示できないし、画像を埋め込んだtiddlerが過分に肥えていくのはアップロードやダウンロードの時にも手間になるし避けたい。
で、無料HPスペースに頼ってみようというわけだ
!確認項目
バージョン違いで動作確認
*2.4.1
*2.3.0
*2.1.3
*2.0.1
もちろん目標は最新版が動作するWebスペースを探すこと
2.3以降はbackstageが入っていることから動かなくなるサイトが増える
2.1以前をまとめて旧版と呼ぶこととする
!確認済み:最新版動作
*[[tiddlyspot|http://tiddlyspot.com/]]
!確認済み:旧版TW動作
*[[atpages|http://atpages.jp/]]:cz.2ch public server HP
*[[yahoo geocities|http://geocities.yahoo.co.jp/]]:[[GTDのHP|http://www.geocities.jp/wikistyle/gtd/]]
!未確認
*[[tok2|http://tok2.com/]](バナーをどうやって埋め込むんだろう。ダメな予感)
*[[fc2|http://fc2.com/]](バナーが埋め込み式だろうから無理な予感)
*http://www.430.jp/rak/
*http://www.ninja.co.jp/hp/
*http://hp.netcom.ne.jp/
*http://wing2.jp/
*http://free-p.ddo.jp/
*http://www.k-rent.net/
*http://jmj.at/
*http://hp.shard.jp/
*http://www.webdeki.com/
*http://umbrellasrv.ath.cx/
<<timeline modified>>
<<tagCloud>>
/***
|Name|TagCloudPlugin|
|Source|http://www.TiddlyTools.com/#TagCloudPlugin|
|Version|1.5.0|
|Author|Eric Shulman|
|Original Author|Clint Checketts|
|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|present a 'cloud' of tags using proportional font display|
!Usage
<<<
show all tags/links in the document, excluding the indicated tags or tiddler titles
{{{
<<tagCloud limit:N tag tag tag...>>
<<linkCloud limit:N title title title...>>
}}}
show only tags/links listed within {{{TiddlerName}}} (using a space-separated, bracketed list)
{{{
<<tagCloud limit:N +TiddlerName>>
<<linkCloud limit:N +TiddlerName>>
}}}
show only tags that are themselves tagged with the indicated tag value (i.e., ~TagglyTagging usage)
{{{
<<tagCloud limit:N =tagvalue>>
}}}
For all cases, you can specify an //optional// ''limit:...'' parameter to restrict the cloud display to only show the top N most popular tags/links.
<<<
!Examples
<<<
//show all tags excluding<<tag systemConfig>>, <<tag excludeMissing>> and <<tag script>>//
{{{<<tagCloud systemConfig excludeMissing script>>}}}
{{groupbox{<<tagCloud systemConfig excludeMissing script>>}}}
//show top 10 tags excluding<<tag systemConfig>>, <<tag excludeMissing>> and <<tag script>>//
{{{<<tagCloud limit:10 systemConfig excludeMissing script>>}}}
{{groupbox{<<tagCloud limit:10 systemConfig excludeMissing script>>}}}
//show tags listed in// [[FavoriteTags]]
{{{<<tagCloud +FavoriteTags>>}}}
{{groupbox{<<tagCloud +FavoriteTags>>}}}
//show tags tagged with 'package'//
{{{<<tagCloud =package>>}}}
{{groupbox{<<tagCloud =package>>}}}
//show top 20 most linked tiddlers//
{{{<<linkCloud limit:20>>}}}
{{groupbox{<<linkCloud limit:20>>}}}
<<<
!Revisions
<<<
2009.02.05 [1.5.0] re-written to support {{{<<linkCloud>>}}} as well as {{{<<tagCloud>>}}} macros
2008.12.16 [1.4.2] corrected group calculation to prevent 'group=0' error
2008.12.16 [1.4.1] revised tag filtering so excluded tags don't affect calculations
2008.12.15 [1.4.0] added {{{limit:...}}} parameter to restrict the number of tags displayed to the top N most popular
2008.11.15 [1.3.0] added {{{+TiddlerName}}} parameter to include only tags that are listed in the indicated tiddler
2008.09.05 [1.2.0] added '=tagname' parameter to include only tags that are themselves tagged with the specified value (i.e., ~TagglyTagging usage)
2008.07.03 [1.1.0] added 'segments' property to macro object.  Extensive code cleanup
<<<
!Code
***/
//{{{
version.extensions.TagCloudPlugin= {major: 1, minor: 5 , revision: 0, date: new Date(2009,2,5)};
//Originally created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman
//Currently maintained and enhanced by Eric Shulman
//}}}
//{{{
config.shadowTiddlers.TagCloud='<<tagCloud>>';
config.shadowTiddlers.LinkCloud='<<linkCloud>>';
config.shadowTiddlers.StyleSheetTagCloud='\
	.tagCloud span {line-height: 3.5em; margin:3px;}\
	.tagCloud .tiddlyLinkExisting { font-weight:normal; }\
	.tagCloud1{font-size: 80%;}\n	.tagCloud2{font-size: 100%;}\n	.tagCloud3{font-size: 120%;}\
	.tagCloud4{font-size: 150%;}\n	.tagCloud5{font-size: 180%;}\n	.tagCloud6{font-size: 200%;}\
	.tagCloud7{font-size: 220%;}\n	.tagCloud8{font-size: 240%;}\n	.tagCloud9{font-size: 260%;}';
setStylesheet(store.getTiddlerText('StyleSheetTagCloud'),'tagCloudsStyles');
//}}}
//{{{
config.macros.tagCloud = {
	tooltip: "%1 tiddlers tagged with '%0'",
	groups: 9,
	handler: function(place,macroName,params) {
		// unpack params
		var inc=[]; var ex=[]; var limit=0;
		if (params[0]&&params[0].substr(0,6).toLowerCase()=='limit:')
			limit=parseInt(params.shift().substr(6));
		if (params.length) {
			if (params[0].substr(0,1)=='+') { // get tag list from tiddler
				var inc=store.getTiddlerText(params[0].substr(1),'').readBracketedList();
			} else if (params[0].substr(0,1)=='=') { // get tag list using tagged tags
				var tagged=store.getTaggedTiddlers(params[0].substr(1));
				for (var t=0; t<tagged.length; t++) inc.push(tagged[t].title);
			} else ex=params; // exclude params
		}
		// get all items, include/exclude specific items
		var items=[];
		var linkCloud=macroName=='linkCloud';
		var list=linkCloud?store.getTiddlers('title','excludeLists'):store.getTags();
		for (var t=0; t<list.length; t++) {
			var title=linkCloud?list[t].title:list[t][0];
			var count=linkCloud?store.getReferringTiddlers(title).length:list[t][1];
			if ((!inc.length||inc.contains(title))&&(!ex.length||!ex.contains(title)))
				items.push({ title:title, count:count });
		}
		if(!items.length) return;
		// sort by decending count, limit results (optional)
		items=items.sort(function(a,b){return(a.count==b.count)?0:(a.count>b.count?-1:1);});
		while (limit && items.length>limit) items.pop();
		// find min/max and group size
		var most=items[0].count;
		var least=items[items.length-1].count;
		var groupSize=(most-least+1)/this.groups;
		// sort by title and draw the cloud of items
		items=items.sort(function(a,b){return(a.title==b.title)?0:(a.title>b.title?1:-1);});
		var cloudWrapper = createTiddlyElement(place,'div',null,'tagCloud',null);
		for (var t=0; t<items.length; t++) {
			cloudWrapper.appendChild(document.createTextNode(' '));
			var group=Math.ceil((items[t].count-least)/groupSize)||1;
			var className='tagCloudtag tagCloud'+group;
			var tip=config.macros[macroName].tooltip.format([items[t].title,items[t].count]);
			if (linkCloud) {
				var btn=createTiddlyButton(cloudWrapper,items[t].title,tip,
					function(ev) { var e=ev||window.event;
						var popup = Popup.create(this);
						var title = this.getAttribute('tiddler');
						var count = this.getAttribute('count');
						var tiddler = store.fetchTiddler(title);
						popup.setAttribute('tiddler',title);
						createTiddlyLink(popup,title,true);
						createTiddlyText(popup,config.macros.linkCloud.label.format([count]));
						createTiddlyElement(popup,'hr');
						config.commands.references.handlePopup(popup,title);
						Popup.show();
						e.cancelBubble=true; if(e.stopPropagation) e.stopPropagation();
						return false;
					}, className);
				btn.setAttribute('tiddler',items[t].title);
				btn.setAttribute('count',items[t].count);
				btn.title=tip;
			} else {
				var btn=createTiddlyButton(cloudWrapper,items[t].title,tip,onClickTag,className);
				btn.setAttribute('tag',items[t].title);
			}
		}
	}
};
config.macros.linkCloud = {
	tooltip: "%1 tiddlers contain links to '%0'",
	label: " (%0 links): ",
	groups: 9,
	handler: config.macros.tagCloud.handler
};
//}}}
/***
|''Name:''|~TaggerPlugin|
|''Version:''|1.0.1 (2006-06-01)|
|''Source:''|http://tw.lewcid.org//#TaggerPlugin|
|''Author:''|SaqImtiaz|
|''Description:''|Provides a drop down listing current tiddler tags, and allowing toggling of tags.|
|''Documentation:''|[[TaggerPluginDocumentation]]|
|''Source Code:''|[[TaggerPluginSource]]|
|''~TiddlyWiki:''|Version 2.0.8 or better|
***/
// /%
config.tagger={defaults:{label:"Tags: ",tooltip:"Manage tiddler tags",taglist:"true",excludeTags:"",notags:"tiddler has no tags",aretags:"current tiddler tags:",toggletext:"add tags:"}};config.macros.tagger={};config.macros.tagger.arrow=(document.all?"▼":"?");config.macros.tagger.handler=function(_1,_2,_3,_4,_5,_6){var _7=config.tagger.defaults;var _8=_5.parseParams("tagman",null,true);var _9=((_8[0].label)&&(_8[0].label[0])!=".")?_8[0].label[0]+this.arrow:_7.label+this.arrow;var _a=((_8[0].tooltip)&&(_8[0].tooltip[0])!=".")?_8[0].tooltip[0]:_7.tooltip;var _b=((_8[0].taglist)&&(_8[0].taglist[0])!=".")?_8[0].taglist[0]:_7.taglist;var _c=((_8[0].exclude)&&(_8[0].exclude[0])!=".")?(_8[0].exclude[0]).readBracketedList():_7.excludeTags.readBracketedList();if((_8[0].source)&&(_8[0].source[0])!="."){var _d=_8[0].source[0];}if(_d&&!store.getTiddler(_d)){return false;}var _e=function(e){if(!e){var e=window.event;}var _11=Popup.create(this);var _12=store.getTags();var _13=new Array();for(var i=0;i<_12.length;i++){_13.push(_12[i][0]);}if(_d){var _15=store.getTiddler(_d);_13=_15.tags.sort();}var _16=_6.tags.sort();var _17=function(_18,_19,_1a){var sp=createTiddlyElement(createTiddlyElement(_11,"li"),"span",null,"tagger");var _1c=createTiddlyButton(sp,_18,_1a+" '"+_19+"'",taggerOnToggle,"button","toggleButton");_1c.setAttribute("tiddler",_6.title);_1c.setAttribute("tag",_19);insertSpacer(sp);if(window.createTagButton_orig_mptw){createTagButton_orig_mptw(sp,_19)}else{createTagButton(sp,_19);}};createTiddlyElement(_11,"li",null,"listTitle",(_6.tags.length==0?_7.notags:_7.aretags));for(var t=0;t<_16.length;t++){_17("[x]",_16[t],"remove tag ");}createTiddlyElement(createTiddlyElement(_11,"li"),"hr");if(_b!="false"){createTiddlyElement(_11,"li",null,"listTitle",_7.toggletext);for(var i=0;i<_13.length;i++){if(!_6.tags.contains(_13[i])&&!_c.contains(_13[i])){_17("[ ]",_13[i],"add tag ");}}createTiddlyElement(createTiddlyElement(_11,"li"),"hr");}var _1f=createTiddlyButton(createTiddlyElement(_11,"li"),("Create new tag"),null,taggerOnToggle);_1f.setAttribute("tiddler",_6.title);if(_d){_1f.setAttribute("source",_d);}Popup.show(_11,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};createTiddlyButton(_1,_9,_a,_e,"button","taggerDrpBtn");};window.taggerOnToggle=function(e){var tag=this.getAttribute("tag");var _22=this.getAttribute("tiddler");var _23=store.getTiddler(_22);if(!tag){var _24=prompt("Enter new tag:","");if(_24!=""&&_24!=null){var tag=_24;if(this.getAttribute("source")){var _26=store.getTiddler(this.getAttribute("source"));_26.tags.pushUnique(_24);}}else{return false;}}if(!_23||!_23.tags){store.saveTiddler(_22,_22,"",config.options.txtUserName,new Date(),tag);}else{if(_23.tags.find(tag)==null){_23.tags.push(tag);}else{if(!_24){_23.tags.splice(_23.tags.find(tag),1);}}store.saveTiddler(_23.title,_23.title,_23.text,_23.modifier,_23.modified,_23.tags);}story.refreshTiddler(_22,null,true);if(config.options.chkAutoSave){saveChanges();}return false;};setStylesheet(".tagger a.button {font-weight: bold;display:inline; padding:0px;}\n"+".tagger #toggleButton {padding-left:2px; padding-right:2px; margin-right:1px; font-size:110%;}\n"+"#nestedtagger {background:#2E5ADF; border: 1px solid #0331BF;}\n"+".popup .listTitle {color:#000;}\n"+"","TaggerStyles");window.lewcidTiddlerSwapTag=function(_27,_28,_29){for(var i=0;i<_27.tags.length;i++){if(_27.tags[i]==_28){_27.tags[i]=_29;return true;}}return false;};window.lewcidRenameTag=function(e){var tag=this.getAttribute("tag");var _2d=prompt("Rename tag '"+tag+"' to:",tag);if((_2d==tag)||(_2d==null)){return false;}if(store.tiddlerExists(_2d)){if(confirm(config.messages.overwriteWarning.format([_2d.toString()]))){story.closeTiddler(_2d,false,false);}else{return null;}}tagged=store.getTaggedTiddlers(tag);if(tagged.length!=0){for(var j=0;j<tagged.length;j++){lewcidTiddlerSwapTag(tagged[j],tag,_2d);}}if(store.tiddlerExists(tag)){store.saveTiddler(tag,_2d);}if(document.getElementById("tiddler"+tag)){var _2f=document.getElementById(story.idPrefix+tag);var _30=story.positionTiddler(_2f);var _31=document.getElementById(story.container);story.closeTiddler(tag,false,false);story.createTiddler(_31,_30,_2d,null);story.saveTiddler(_2d);}if(config.options.chkAutoSave){saveChanges();}return false;};window.onClickTag=function(e){if(!e){var e=window.event;}var _34=resolveTarget(e);var _35=(!isNested(_34));if((Popup.stack.length>1)&&(_35==true)){Popup.removeFrom(1);}else{if(Popup.stack.length>0&&_35==false){Popup.removeFrom(0);}}var _36=(_35==false)?"popup":"nestedtagger";var _37=createTiddlyElement(document.body,"ol",_36,"popup",null);Popup.stack.push({root:this,popup:_37});var tag=this.getAttribute("tag");var _39=this.getAttribute("tiddler");if(_37&&tag){var _3a=store.getTaggedTiddlers(tag);var _3b=[];var li,r;for(r=0;r<_3a.length;r++){if(_3a[r].title!=_39){_3b.push(_3a[r].title);}}var _3d=config.views.wikified.tag;if(_3b.length>0){var _3e=createTiddlyButton(createTiddlyElement(_37,"li"),_3d.openAllText.format([tag]),_3d.openAllTooltip,onClickTagOpenAll);_3e.setAttribute("tag",tag);createTiddlyElement(createTiddlyElement(_37,"li"),"hr");for(r=0;r<_3b.length;r++){createTiddlyLink(createTiddlyElement(_37,"li"),_3b[r],true);}}else{createTiddlyText(createTiddlyElement(_37,"li",null,"disabled"),_3d.popupNone.format([tag]));}createTiddlyElement(createTiddlyElement(_37,"li"),"hr");var h=createTiddlyLink(createTiddlyElement(_37,"li"),tag,false);createTiddlyText(h,_3d.openTag.format([tag]));createTiddlyElement(createTiddlyElement(_37,"li"),"hr");var _40=createTiddlyButton(createTiddlyElement(_37,"li"),("Rename tag '"+tag+"'"),null,lewcidRenameTag);_40.setAttribute("tag",tag);}Popup.show(_37,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};if(!window.isNested){window.isNested=function(e){while(e!=null){var _42=document.getElementById("contentWrapper");if(_42==e){return true;}e=e.parentNode;}return false;};}config.shadowTiddlers.TaggerPluginDocumentation="The documentation is available [[here.|http://tw.lewcid.org/#TaggerPluginDocumentation]]";config.shadowTiddlers.TaggerPluginSource="The uncompressed source code is available [[here.|http://tw.lewcid.org/#TaggerPluginSource]]";
// %/
/***
|''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">>
<<tiddlerTweaker>>
/***
|Name|TiddlerTweakerPlugin|
|Source|http://www.TiddlyTools.com/#TiddlerTweakerPlugin|
|Version|2.4.1|
|Author|Eric Shulman|
|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|select multiple tiddlers and modify author, created, modified and/or tag values|
~TiddlerTweaker is a tool for TiddlyWiki authors.  It allows you to select multiple tiddlers from a listbox, either by direct interaction or automatically matching specific criteria.  You can then 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 simultantously 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:
* Inasmuch as TiddlerTweaker is a 'power user' tool that can perform 'batch' functions (operating on 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 "shoot yourself in the foot".
* By design, TiddlerTweaker does NOT update the 'modified' date of tiddlers simply by making changes to the tiddler's values.  A tiddler's dates are ONLY updated when the corresponding 'created' and/or 'modified' checkboxes are selected and you enter new values for those dates.  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.
* Because you may be changing the values on many tiddlers simultaneously, selecting and updating all tiddlers in a document operation may take a while and your browser might warn about an "unresponsive script"... you should give it a whole bunch of time to 'continue'... it should complete the processing... eventually.
<<<
!!!!!Revisions
<<<
2009.03.30 [2.4.1] in setTiddlers(), add brackets around tag value is 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: 1, date: new Date(2009,6,22)};

// shadow tiddler
config.shadowTiddlers.TiddlerTweaker="<<tiddlerTweaker>>";

/// 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 (config.options.txtTweakerSortBy==undefined) config.options.txtTweakerSortBy="modified";

// 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 = {
	html: '<form style="display:inline"><!--\
		--><table style="padding:0;margin:0;border:0;width:100%"><tr valign="top" style="padding:0;margin:0;border:0"><!--\
		--><td style="text-align:center;white-space:nowrap;width:99%;padding:0;margin:0;border:0"><!--\
			--><font size=-2><div style="text-align:left;"><span style="float:right"><!--\
			-->&nbsp; <a href="javascript:;" \
				title="select all tiddlers"\
				onclick="\
				var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
				for (var t=0; t<f.list.options.length; t++)\
					if (f.list.options[t].value.length) f.list.options[t].selected=true;\
				config.macros.tiddlerTweaker.selecttiddlers(f.list);\
				return false">all</a><!--\
			-->&nbsp; <a href="javascript:;" \
				title="select tiddlers that are new/changed since the last file save"\
				onclick="\
				var lastmod=new Date(document.lastModified);\
				var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
				for (var t=0; t<f.list.options.length; t++) {\
					var tid=store.getTiddler(f.list.options[t].value);\
					f.list.options[t].selected=tid&&tid.modified>lastmod;\
				}\
				config.macros.tiddlerTweaker.selecttiddlers(f.list);\
				return false">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)\');\
				if (!t||!t.length) return false;\
				var tags=t.readBracketedList();\
				var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
				for (var t=0; t<f.list.options.length; t++) {\
					f.list.options[t].selected=false;\
					var tid=store.getTiddler(f.list.options[t].value);\
					if (tid&&tid.tags.containsAny(tags)) f.list.options[t].selected=true;\
				}\
				config.macros.tiddlerTweaker.selecttiddlers(f.list);\
				return false">tags</a><!--\
			-->&nbsp; <a href="javascript:;" \
				title="select tiddlers whose titles include matching text"\
				onclick="\
				var txt=prompt(\'Enter a title (or portion of a title) to match\');\
				if (!txt||!txt.length) return false;\
				var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
				for (var t=0; t<f.list.options.length; t++) {\
					f.list.options[t].selected=f.list.options[t].value.indexOf(txt)!=-1;\
				}\
				config.macros.tiddlerTweaker.selecttiddlers(f.list);\
				return false">titles</a><!--\
			-->&nbsp; <a href="javascript:;" \
				title="select tiddlers containing matching text"\
				onclick="\
				var txt=prompt(\'Enter tiddler text (content) to match\');\
				if (!txt||!txt.length) return false;\
				var f=this; while (f&&f.nodeName.toLowerCase()!=\'form\')f=f.parentNode;\
				for (var t=0; t<f.list.options.length; t++) {\
					var tt=store.getTiddlerText(f.list.options[t].value,\'\');\
					f.list.options[t].selected=(tt.indexOf(txt)!=-1);\
				}\
				config.macros.tiddlerTweaker.selecttiddlers(f.list);\
				return false">text</a> &nbsp;<!--\
			--></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.selecttiddlers(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="white-space:nowrap;padding:0;margin:0;border:0;width:1%"><!--\
			--><div style="text-align:left"><font size=-2>&nbsp;modify values</font></div><!--\
			--><table border=0 style="width:100%;padding:0;margin:0;border:0;"><tr style="padding:0;border:0;"><!--\
			--><td style="padding:1px;border:0;white-space:nowrap"><!--\
				--><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;border:0;white-space:nowrap"><!--\
				--><input type=text name=title size=35 style="width:98%" disabled><!--\
			--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
				--><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;border:0;white-space:nowrap"><!--\
				--><input type=text name=creator size=35 style="width:98%" disabled><!--\
			--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
				--><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;border:0;white-space:nowrap"><!--\
				--><input type=text name=who size=35 style="width:98%" disabled><!--\
			--></td></tr><tr style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
				--><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;border:0;white-space:nowrap"><!--\
				--><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 style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
				--><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;border:0;white-space:nowrap"><!--\
				--><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 style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
				--><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;border:0;white-space:nowrap"><!--\
				--><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 style="padding:0;border:0;"><td style="padding:1px;border:0;white-space:nowrap"><!--\
				--><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;border:0;white-space:nowrap"><!--\
				--><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:32%" value="display tiddlers" \
				onclick="config.macros.tiddlerTweaker.displaytiddlers(this)"><!--\
			--> <input type=button name=del disabled style="width:32%" value="delete tiddlers" \
				onclick="config.macros.tiddlerTweaker.deltiddlers(this)"><!--\
			--> <input type=button name=set disabled style="width:32%" value="update tiddlers" \
				onclick="config.macros.tiddlerTweaker.settiddlers(this)"></nobr><!--\
			--></div><!--\
		--></td></tr></table><!--\
		--></form><span style="display:none"><!--content replaced by tiddler "stats"--></span>\
	',
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var span=createTiddlyElement(place,"span");
		span.innerHTML=this.html;
		this.init(span.firstChild,config.options.txtTweakerSortBy);
	},
	init: function(f,sortby) { // initialize form controls
		if (!f) return; // form might not be rendered yet...
		while (f.list.options[0]) f.list.options[0]=null; // empty current list content
		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.display.disabled=true;
		f.settitle.disabled=false;
		config.options.txtTweakerSortBy=sortby; // remember current setting
		f.sortby.value=sortby; // sync droplist selection with current setting
		if (sortby!="modified") // non-default preference... save cookie
			saveOptionCookie("txtTweakerSortBy");
		else removeCookie("txtTweakerSortBy"); // default preference... clear cookie
	},
	selecttiddlers: function(here) { // enable/disable tweaker fields based on number of items selected
		// count how many tiddlers are 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.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 tweaker edit 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.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();
	},
	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) text=text.replace(new RegExp(f.pattern.value,'mg'),f.replacement.value);
			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) {
		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)
	},
	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"))
				if (!confirm("'"+tid.title+"' is tagged with 'systemConfig'.\n\nRemoving this tiddler may cause unexpected results.  Are you sure?"))
					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";
	}
};
//}}}
/***

|Name|TiddlerWithEditPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#TiddlerWithEditPlugin|
|Version|0.2|
|Requires|~TW2.x|
!Description:
Adds 'doubleclick to edit source' capabilites to the core {{{<<tiddler>>}}} macro.

!Notes:
*because of the rewrite, only clicking on actual embedded text opens the source tiddler for editing. Clicking on any white space opens the containing tiddler for editing.

!History
*29-04-06, version 0.2, rewritten after input from Udo.
*28-04-06, version 0.1, working.

!Code
***/
//{{{
config.macros.tiddler.onTiddlerMacroDblClick = function(e){
        if (!e) var e = window.event;
        var theTarget = resolveTarget(e);
        var title= this.getAttribute("source");
        if ((version.extensions.PartTiddlerPlugin)&&(title.indexOf("/")!=-1))
                 {if (!oldFetchTiddler.call(this, [title]))
                              {title=title.slice(0,title.lastIndexOf("/"))}}   
        story.displayTiddler(theTarget,title,2,false,null)
        e.cancelBubble = true;
        if (e.stopPropagation) e.stopPropagation();
        return false;
        }

var oldTiddlerHandler=config.macros.tiddler.handler;
config.macros.tiddler.handler = function(place,macroName,params){
        oldTiddlerHandler.apply(this,arguments);
        place.lastChild.setAttribute("source",params[0]);
        place.lastChild.ondblclick = this.onTiddlerMacroDblClick;
}
//}}}
/***
|''Name:''|TiddlersBarPlugin|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.5|
|''Date:''|Jan 18,2008|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demos
On [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], open several tiddlers to use the tabs bar.
!Installation
#import this tiddler from [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] (tagged as systemConfig)
#save and reload
#''if you're using a custom [[PageTemplate]]'', add {{{<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>}}} before {{{<div id='tiddlerDisplay'></div>}}}
#optionally, adjust StyleSheetTiddlersBar
!Tips
*Doubleclick on the tiddlers bar (where there is no tab) create a new tiddler.
*Tabs include a button to close {{{x}}} or save {{{!}}} their tiddler.
*By default, click on the current tab close all others tiddlers.
!Configuration options 
<<option chkDisableTabsBar>> Disable the tabs bar (to print, by example).
<<option chkHideTabsBarWhenSingleTab >> Automatically hide the tabs bar when only one tiddler is displayed. 
<<option txtSelectedTiddlerTabButton>> ''selected'' tab command button.
<<option txtPreviousTabKey>> previous tab access key.
<<option txtNextTabKey>> next tab access key.
!Code
***/
//{{{
config.options.chkDisableTabsBar = config.options.chkDisableTabsBar ? config.options.chkDisableTabsBar : false;
config.options.chkHideTabsBarWhenSingleTab  = config.options.chkHideTabsBarWhenSingleTab  ? config.options.chkHideTabsBarWhenSingleTab  : false;
config.options.txtSelectedTiddlerTabButton = config.options.txtSelectedTiddlerTabButton ? config.options.txtSelectedTiddlerTabButton : "closeOthers";
config.options.txtPreviousTabKey = config.options.txtPreviousTabKey ? config.options.txtPreviousTabKey : "";
config.options.txtNextTabKey = config.options.txtNextTabKey ? config.options.txtNextTabKey : "";
config.macros.tiddlersBar = {
	tooltip : "see ",
	tooltipClose : "click here to close this tab",
	tooltipSave : "click here to save this tab",
	promptRename : "Enter tiddler new name",
	currentTiddler : "",
	previousState : false,
	previousKey : config.options.txtPreviousTabKey,
	nextKey : config.options.txtNextTabKey,	
	tabsAnimationSource : null, //use document.getElementById("tiddlerDisplay") if you need animation on tab switching.
	handler: function(place,macroName,params) {
		var previous = null;
		if (config.macros.tiddlersBar.isShown())
			story.forEachTiddler(function(title,e){
				if (title==config.macros.tiddlersBar.currentTiddler){
					var d = createTiddlyElement(null,"span",null,"tab tabSelected");
					config.macros.tiddlersBar.createActiveTabButton(d,title);
					if (previous && config.macros.tiddlersBar.previousKey) previous.setAttribute("accessKey",config.macros.tiddlersBar.nextKey);
					previous = "active";
				}
				else {
					var d = createTiddlyElement(place,"span",null,"tab tabUnselected");
					var btn = createTiddlyButton(d,title,config.macros.tiddlersBar.tooltip + title,config.macros.tiddlersBar.onSelectTab);
					btn.setAttribute("tiddler", title);
					if (previous=="active" && config.macros.tiddlersBar.nextKey) btn.setAttribute("accessKey",config.macros.tiddlersBar.previousKey);
					previous=btn;
				}
				var isDirty =story.isDirty(title);
				var c = createTiddlyButton(d,isDirty ?"!":"x",isDirty?config.macros.tiddlersBar.tooltipSave:config.macros.tiddlersBar.tooltipClose, isDirty ? config.macros.tiddlersBar.onTabSave : config.macros.tiddlersBar.onTabClose,"tabButton");
				c.setAttribute("tiddler", title);
				if (place.childNodes) {
					place.insertBefore(document.createTextNode(" "),place.firstChild); // to allow break line here when many tiddlers are open
					place.insertBefore(d,place.firstChild); 
				}
				else place.appendChild(d);
			})
	}, 
	refresh: function(place,params){
		removeChildren(place);
		config.macros.tiddlersBar.handler(place,"tiddlersBar",params);
		if (config.macros.tiddlersBar.previousState!=config.macros.tiddlersBar.isShown()) {
			story.refreshAllTiddlers();
			if (config.macros.tiddlersBar.previousState) story.forEachTiddler(function(t,e){e.style.display="";});
			config.macros.tiddlersBar.previousState = !config.macros.tiddlersBar.previousState;
		}
	},
	isShown : function(){
		if (config.options.chkDisableTabsBar) return false;
		if (!config.options.chkHideTabsBarWhenSingleTab) return true;
		var cpt=0;
		story.forEachTiddler(function(){cpt++});
		return (cpt>1);
	},
	selectNextTab : function(){  //used when the current tab is closed (to select another tab)
		var previous="";
		story.forEachTiddler(function(title){
			if (!config.macros.tiddlersBar.currentTiddler) {
				story.displayTiddler(null,title);
				return;
			}
			if (title==config.macros.tiddlersBar.currentTiddler) {
				if (previous) {
					story.displayTiddler(null,previous);
					return;
				}
				else config.macros.tiddlersBar.currentTiddler=""; 	// so next tab will be selected
			}
			else previous=title;
			});		
	},
	onSelectTab : function(e){
		var t = this.getAttribute("tiddler");
		if (t) story.displayTiddler(null,t);
		return false;
	},
	onTabClose : function(e){
		var t = this.getAttribute("tiddler");
		if (t) {
			if(story.hasChanges(t) && !readOnly) {
				if(!confirm(config.commands.cancelTiddler.warning.format([t])))
				return false;
			}
			story.closeTiddler(t);
		}
		return false;
	},
	onTabSave : function(e) {
		var t = this.getAttribute("tiddler");
		if (!e) e=window.event;
		if (t) config.commands.saveTiddler.handler(e,null,t);
		return false;
	},
	onSelectedTabButtonClick : function(event,src,title) {
		var t = this.getAttribute("tiddler");
		if (!event) event=window.event;
		if (t && config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton])
			config.commands[config.options.txtSelectedTiddlerTabButton].handler(event, src, t);
		return false;
	},
	onTiddlersBarAction: function(event) {
		var source = event.target ? event.target.id : event.srcElement.id; // FF uses target and IE uses srcElement;
		if (source=="tiddlersBar") story.displayTiddler(null,'New Tiddler',DEFAULT_EDIT_TEMPLATE,false,null,null);
	},
	createActiveTabButton : function(place,title) {
		if (config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton]) {
			var btn = createTiddlyButton(place, title, config.commands[config.options.txtSelectedTiddlerTabButton].tooltip ,config.macros.tiddlersBar.onSelectedTabButtonClick);
			btn.setAttribute("tiddler", title);
		}
		else
			createTiddlyText(place,title);
	}
}

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

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

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

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

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

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

config.refreshers.none = function(){return true;}
config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>");

//}}}
http://www.tiddlywiki.com
<<showtoc>>
!Official sites
*[[Tiddlywiki.com|http://www.tiddlywiki.com/]]
*[[TW.org|http://www.tiddlywiki.org/wiki/Main_Page]]
!Development
*''[[TiddyWiki - Trac|http://trac.tiddlywiki.org/]]''
*''[[Google Group: TiddlyWikiDev|http://groups.google.com/group/TiddlyWikiDev]]''
!Tools
*[[TiddlySnip|http://tiddlysnip.com/]](Firefox拡張)
!plugins and Extensions
*[[TiddlyWiki 日本語化プラグイン配布サイト|http://ogoshi.tiddlyspot.com/]]
*''[[TiddlyTools "Small Tools for Big Ideas!" - ELS Design Studios Intuitive Interfaces for Intelligent*Interactions™|http://www.tiddlytools.com/]]''
*''[[abegoExtensions - UdoBorkowski's Extensions for TiddlyWiki|http://tiddlywiki.abego-software.de/]]''
*''[[TiddlyWiki Style - Tips, Macros and FAQ|http://www.geocities.jp/wikistyle/]]''
*[[Lewcid TW|http://tw.lewcid.org/]]
**~HoverMenu,~TiddlerNotesなど
*[[RemainderMacros|http://remindermacros.tiddlyspot.com/]]
*[[TiddlyWiki Plugins Library|http://plugins.tiddlywiki.org/]]
*[[FND'S devpad|http://devpad.tiddlyspot.com/]]
!Themes
*''[[TiddlyThemes - Home|http://tiddlythemes.com/#Home]]''
!Howto
!!Japanese sites
*[[「TiddlyWiki」記事検索|http://hirashi.mydns.jp/best/m/blog/TiddlyWiki/]]
*''[[MemoWiki - メモ用Wiki by TiddlyWiki|http://flow.dip.jp/mt/archives/u/twmemo.html]]''
*''[[素敵なTiddlyWiki  - カスタマイズノート 第2版|http://www.potto.client.jp/]]''
*''[[PamGau::TiddlySpot - ここでもTiddlyWiki|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/]]''
*[[TiddlyWiki Lab.|http://d.hatena.ne.jp/aramakie/]]
!!English sites
*''[[TiddlyWiki in Action - A showcase of TiddlyWikis used creatively around the world|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]]
*''[[TiddlyDoc|http://doc.tiddlywiki.org/]]''
*''[[Google Group: TiddlyWiki|http://groups.google.com/group/TiddlyWiki]]''
*''[[BidiXTW|http://tiddlywiki.bidix.info/]]''
*[[TW help|http://twhelp.tiddlyspot.com/]](ヘルプサイト。要求に合うプラグインを検索してくれる)
!TW clone
*''[[Lewcid TW - a repository of my extensions for TW|http://tw.lewcid.org/]]''
*''[[MonkeyPirateTiddlyWiki - tiddlywiki turbo-boosted. by simon baird|http://mptw.tiddlyspot.com/]]''
*[[GTDstyle Wiki|http://www.geocities.jp/wikistyle/gtd/]]
*[[Chinese TiddlyWiki|http://sourceforge.net/projects/ptw/]]
!文字装飾
{{{
''太字''
}}}
''太字''
{{{
--取消線--
}}}
--取消線--
{{{
__下線__
}}}
__下線__
{{{
//斜体//
}}}
//斜体//
{{{
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を使う上で、お勧めの外部ツールなどについて、書く所です
!Firefox拡張
*[[TiddlySnip|http://tiddlysnip.com/]]
文字を選択して右クリックすることで、その文字列をtitleにしたtiddlerを作成することができます。
インストール後に、自分のTiddlyWikiを拡張の設定で登録しましょう

!Firefox設定(user.js)
(via:[[笹岡如月 Sasaoka-Kisaragi: FirefoxでTiddlywiki|http://kaguya-project.seesaa.net/article/35858629.html]])
*何ができるの?<<br>>⇒TiddlyWikiを編集したりしているときに出るダイアログを表示させなくできます。編集は、自己責任でお願いしますね
このフォルダ↓(****は各自でバラバラです。)
{{{%APPDATA%\mozilla\firefox\profile\*****.default}}}
にuser.jsが入っていますので、メモ帳などで開いて末尾に、下記を追加します(ない人は、作成すること)
/*{{{*/
user_pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
user_pref("capability.principal.codebase.p0.id", "file:///C:/tiddlywiki.html");
user_pref("capability.principal.codebase.p0.subjectName", "");
/*}}}*/
{{{file:///C:/tiddlywiki.html}}}の所を自分のTiddlyWikiが保存されているパスに置き換えましょう
<<showtoc>>
!2.4.1
URL:http://trac.tiddlywiki.org/wiki/History#Release2.4.1
#機能追加
*add paramifier "recent:N" to show N most recently modified tiddlers on startup
**アドレス部に{{{#recent:N}}}を付加することで、更新されたTiddlerを表示する機能。です
記入例:
{{{
http://rane.tiddlyspot.com/#recent:5
}}}
[[こうなります|http://rane.tiddlyspot.com/#recent:5]]
!2.4.0
URL:http://trac.tiddlywiki.org/wiki/History#Release2.4.0
TWコアのアップデート機能が追加された
それ以外はユーザビリティやバグフィックスがメイン
!!New Features 
* Significantly easier saving on Safari and Opera because the TiddlySaver Java applet is now signed through a trusted certificate provider
* Automated core code upgrades from TiddlyWiki.com via the backstage area (ticket #554)
* Friendlier toolbar customisation (ticket #488) 
!!Usability 
* Enhanced date formatting to accommodate time zones (ticket #460)
* Improved handlign of permalinks/views of non-existent tiddlers over HTTP/read-only (ticket #541)
* Fixed problem with TiddlySaver.jar being loaded even when document is loaded over HTTP(S) (ticket #542)
* Added ALT attribute for images (ticket #388)
* Minor improvements to Import Tiddlers wizard (ticket #485)
* Enhanced ImportTiddlers to automatically select the default adaptor (ticket #478)
* Enhanced {{{<<saveChanges>>}}} macro to take optional custom label and tooltip (ticket #497)
* Extend the {{{<<tag>>}}} macro to optionally accept label and tooltip (ticket #468)
* Renamed 'file' adaptor to 'TiddlyWiki' (ticket #476)
* Enhanced 'close' command to warn before closing a dirty tiddler (ticket #477)
* Enhanced tag chooser to allow selection of multiple tags by control-clicking on them (ticket #426)
* Improved safe mode to protect shadow tiddlers (ticket #40)
* Enhanced gradient macro (ticket #466)
* Added option to specify initial focus field for tiddler editor (ticket #470) 
!!Hackability 
* Enhanced <<view>> macro to be more extensible (ticket #456)
* Added support for nested popups (ticket #354)
* Enhanced <<message>> macro to be able to access members of the 'window' global variable (ticket #455)
* Added default CSS classes for search button and input elements (ticket #445)
* Added "tabsetWrapper" CSS class to wrapper for tab macro (ticket #437)
* Removed non-ASCII characters from Lingo.js so that it can be used via a <script> tag (ticket #572)
* Refactored the TW copyright notice as a META tag (ticket #530)
* Enhanced wikifyStatic() to make the tiddler parameter be optional (ticket #531)
* Moved crypto functions back into the core (ticket #545)
* Enhanced save mechanism to permit alternative methods of obtaining the original file content (ticket #533)
* Fixed problem with nocache mechanism in doHttp() (ticket #536, also fixed #513)
* Minor improvements required to allow saving from templates (ticket #528)
* Added support for "doNotSave" tiddlers (aka "temporary tiddlers") (ticket #313)
* Added marker for cook in post-script area (ticket #487)
* Improved encapsulation of story member variables (ticket #481)
* Improved encapsulation of story idPrefix (ticket #475)
* Minor performance improvements to SHA-1 hash function (ticket #479)
* Added config.locale W3C language specifier (ticket #592)
* Moved default plugins out of the core (ticket #571) 
!2.3.0
URL:http://trac.tiddlywiki.org/wiki/History#Release2.3.0
!2.2.0
URL:http://trac.tiddlywiki.org/wiki/ReleaseNoteTwoPointTwo
一番大きいのはバックステージ機能かな
/%
|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;
			});
		}
	}
});

//}}}

| tiddlyspot password:|<<option pasUploadPassword>>|
| site management:|<<upload http://rane.tiddlyspot.com/store.cgi index.html . .  rane>>//(requires tiddlyspot password)//<br>[[control panel|http://rane.tiddlyspot.com/controlpanel]], [[download (go offline)|http://rane.tiddlyspot.com/download]]|
| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[announcements|http://announce.tiddlyspot.com/]], [[blog|http://tiddlyspot.com/blog/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|
<<upload http://rane.tiddlyspot.com/store.cgi index.html . .  rane>><html><a href='http://rane.tiddlyspot.com/download' class='button'>download</a></html>
/%
|Name|TwitterTabs|
|Source|http://www.TiddlyTools.com/#TwitterTabs|
|Version|1.0.1|
|Author|Eric Shulman|
|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|display a tabset with current Twitter feeds|
%/<<tiddler HideTiddlerBackground>><<tiddler HideTiddlerTags>>/%

- - - - - TAB DEFINITIONS - - - - -
%/<<tabs txtTwitterTabs
	'rane_hs'		'tweets from rane_hs'		[[TwitterTabs##rane_hs]]
	'cnet_japan'	'tweets from cnet_japan'	[[TwitterTabs##cnet_japan]]
	'tiddlytools'	'show tweets from @tiddlytools'	[[TwitterTabs##tiddlytools]]
	'jermolene'	'show tweets from @jermolene'	[[TwitterTabs##jermolene]]
	'find...'	'find tweets containing...'	[[TwitterTabs##search]]
	'from...'	'show tweets from...'		[[TwitterTabs##user]]
>>/%
!tiddlytools
<<tiddler [[TwitterTabs##showUserResults]] with: tiddlytools>>
!jermolene
<<tiddler [[TwitterTabs##showUserResults]] with: jermolene>>
!search
<<tiddler [[TwitterTabs##showSearchForm]] with: {{config.options.txtTweetSearch||'TiddlyWiki'}}>>
!user
<<tiddler [[TwitterTabs##showUserForm]] with: {{config.options.txtTweetUser||'TiddlyWiki'}}>>
!rane_hs
<<tiddler [[TwitterTabs##showUserResults]] with: rane_hs>>
!cnet_japan
<<tiddler [[TwitterTabs##showUserResults]] with: cnet_japan>>
!end

- - - - - TAB CONTENT FORMATTING - - - - -
!showSearchForm
{{small smallform{
search for tweets containing: <<option {{config.options.txtTweetSearch='$1';'txtTweetSearch'}}>><html>
<hide linebreaks><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);
"></html>@@display:block;white-space:normal;<<tiddler [[TwitterTabs##showSearchResults]]
	with: {{config.options.txtTweetSearch}}>>@@}}}
!end

!showSearchResults
{{toolbar{<script label="refresh">
	var target=place.parentNode.parentNode;
	var out='\<\<tiddler [[TwitterTabs##showSearchResults]] with: [[$1]]\>\>';
	removeChildren(target); wikify(out,target);
</script>}}}~~__[[Recent tweets about: "$1"|http://search.twitter.com/search?q=$1]]__~~
<hr>@@display:block;height:20em;overflow:auto;<script>window.twitterPlace=place;</script><script src="http://search.twitter.com/search.json?q=$1&rpp=25&callback=twitterCallback"></script>@@@@display:block;text-align:right;^^scroll for more...^^@@
!end

!showUserForm
{{small smallform{
show tweets from: <<option {{config.options.txtTweetUser='$1';'txtTweetUser'}}>><html>
<hide linebreaks><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);
"></html>@@display:block;white-space:normal;<<tiddler [[TwitterTabs##showUserResults]]
	with: {{config.options.txtTweetUser}}>>@@}}}
!end

!showUserResults
{{toolbar{<script label="refresh">
	var target=place.parentNode.parentNode;
	var out='\<\<tiddler [[TwitterTabs##showUserResults]] with: [[$1]]\>\>';
	removeChildren(target); wikify(out,target);
</script>}}}~~__[[Recent tweets from $1|http://twitter.com/$1]]__~~
<hr>@@display:block;height:20em;overflow:auto;<script>window.twitterPlace=place;</script><script src="http://twitter.com/statuses/user_timeline/$1.json?callback=twitterCallback"></script>@@@@display:block;text-align:right;^^scroll for more...^^@@
!end

- - - - - TWEET ITEM FORMAT - - - - -
| where: %0=image, %1=name, %2=text, %3=timestamp
| note: "(48px+,48px+)" syntax requires [[ImageSizePlugin]]

!itemFormat
{{small{
[<img(48px+,48px+)[%0]][[%1|http://twitter.com/%1]]: %2
{{fine{
%3}}} {{clear{
}}}
}}}
!end

- - - - - CALLBACK RENDERING FUNCTION - - - - -
%/<script>
window.twitterCallback=function(data){ // data object returned from twitter.com
	var fmt=store.getTiddlerText('TwitterTabs##itemFormat');
	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);
	}
}
</script>
|!2011-01-21|Core ver2.6.1 -> 2.6.2|
|!2010-09-10|Core ver2.6.0 -> 2.6.1|
|!2010-03-19|Core ver2.5.3 -> 2.6.0|
|!2009-nn-nn|Core ver2.5.2 -> 2.5.3|
|!2009-06-25|Core ver2.5.0 -> 2.5.2|
|~|それに伴い、ViewTemplateを更新|
|~|さらに、JapaneseTranslationPluginに手動でパッチをあてる|
|!2009-04-28|TwitterTabsを追加|
|!2009-03-11|Core ver を2.5.0に更新|
+++[古い更新履歴を表示]
|!2009-01-29|[[TiddlyWiki@Firefox]]を追加。TWの編集時に各種ダイアログを出さないようにする方法などです|
|!2009-01-27|[[TiddlerTweakerPlugin]]が更新していたのでフォロー。[[九楽氏|kuraku]]が用いていた[[バックステージ改造|BackstageTweaks]]も修正しました|
|!2009-01-20|[[OpenTaggedTiddlers]]スクリプトを追加。使用方法は[[こちら|OpenTaggedTiddlersUsage]]を参照|
|!2009-01-13|[[hp iPaq hx4700]]更新。~WM6.1やVGAキーボードのリンクを追加<<br>>[[Firefoxリンク]]大幅?更新|
|!2009-01-09|Core Ver を2.4.2にアップグレードしました。その他変更点はなし|
|!2009-01-08|[[TiddlyWiki Link]]に[[「TiddlyWiki」記事検索|http://hirashi.mydns.jp/best/m/blog/TiddlyWiki/]]を追加。日本語Blogを検索するサービスです|
|!2009-01-05|[[自作]]を作成。自分の作ったパソコンについての備忘録的なtiddlerです。これからちょっとずつ充実させていきます|
|!2008-12-19|[[SyntaxHighlighterPlugin]]導入。[[導入方法をまとめてあります|SyntaxHighlighter:How to install]]|
|!2008-12-12|[[FrontPage]]に[[FriendFeed|http://friendfeed.com/rane]]を追加|
|!2008-12-11|[[DragScrollPlugin]]を導入。Shiftを押しながらドラッグスクロールが可能です|
|!2008-12-10|[[FrontPage]]をメンテ。~XFireを追加|
|!2008-12-09|[[TiddlyWiki Link]]に[[FND'S devpad|http://devpad.tiddlyspot.com/]]追加|
|!2008-12-08|[[GoogleGadgetPlugin]]導入<<br>>[[TiddlyWiki Link]]に[[TiddlyWiki Lab.|http://d.hatena.ne.jp/aramakie/]]を追加|
|!2008-12-05|Operaなどから見ると[[CodeFormatterPluginHLDS]]がエラーを吐くのを修正、できたか?|
|!2008-12-03|[[TiddlyWiki Link]]2件追加<<br>>**[[TiddlyWiki Plugins Library|http://plugins.tiddlywiki.org/]]<<br>>**[[Chinese TiddlyWiki|http://sourceforge.net/projects/ptw/]]<<br>>*[[cz.2ch public server]]マップサイクル修正|
|!2008-11-25|[[NestedSlidersPlugin]]更新(VerUp)|
|!2008-11-04|[[cz.2ch public server]]マップサイクル修正|
|!2008-10-31|[[TiddlyWiki Link]]に[[FND's DevPad|http://devpad.tiddlyspot.com/]]追加|
===
Type the text for 'upload'
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 25/06/2009 10:40:05 | HSeki | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 20/08/2009 15:39:38 | HSeki | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 03/09/2009 10:36:48 | HSeki | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 01/12/2009 17:44:17 | 氏名 | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 19/03/2010 16:35:22 | 氏名 | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 10/09/2010 15:54:58 | 氏名 | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 11/11/2010 16:35:20 | 氏名 | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 11/11/2010 16:37:01 | rane | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 21/01/2011 10:19:08 | rane | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.html]] | . |
| 08/02/2011 10:28:36 | rane | [[rane.html|file:///C:/work/seki/_priv/rane.html]] | [[store.cgi|http://rane.tiddlyspot.com/store.cgi]] | . | [[index.html | http://rane.tiddlyspot.com/index.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"
	});
*/
//}}}

/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.0|
|''Date:''|May 5, 2007|
|''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 (#3125)|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
	major: 4, minor: 1, revision: 0,
	date: new Date("May 5, 2007"),
	source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	coreVersion: '2.2.0 (#3125)'
};

//
// 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
		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}
				
			]);
	},
	refreshOptions: function(listWrapper) {
		var uploadOpts = [
			"txtUploadUserName",
			"pasUploadPassword",
			"txtUploadStoreUrl",
			"txtUploadDir",
			"txtUploadFilename",
			"txtUploadBackupDir",
			"chkUploadLog",
			"txtUploadLogMaxLine",
			]
		var opts = [];
		for(i=0; i<uploadOpts.length; i++) {
			var opt = {};
			opts.push()
			opt.option = "";
			n = uploadOpts[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 = 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,null,null,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 = Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
		bidix.upload.httpUpload(rssUploadParams,convertUnicodeToUTF8(generateRss()),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 == httpStatus.NotFound)
			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; 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');


/* don't want this for tiddlyspot sites

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

*/


//}}}


<<showtoc>>
!VSのバージョンについて
|!Ver|!開発環境名|!コンパイラ|!備考|
|~VS6|Visual Studio 6.0|unknown|現在使用中|
|~VS7|Visual Studio.NET|.net framework 1.1|C#誕生|
|~VS8|Visual Studio 2005|.net framework 2.0|~OpenMP対応|
|~VS9|Visual Studio 2008|.net framework 3.5||
!VC2005の機能
 ■■機能比較■■
*E = Microsoft Visual C++ Express Edition
*S = Visual Studio 2005 Standard
*P = Visual Studio 2005 Professional
*T = Visual Studio 2005 Team System(全て有りなので略)

|!E|!S|!P|!コンパイラ|
|○|○|○|32ビットx86コンパイラ|
|×|○|○|64ビットx64コンパイラおよびクロスコンパイラ|
|×|×|×|64ビットItaniumコンパイラおよびクロスコンパイラ|
|!E|!S|!P|!ライブラリおよびヘッダー|
|※|○|○|Win32 SDK(※コアのみ)|
|○|○|○|CRTライブラリ|
|×|○|○|CRTデバッグライブラリ|
|×|○|○|CRTソースコード|
|○|○|○|STL|
|×|○|○|ATL|
|×|○|○|ATLServer|
|×|○|○|MFC|
|○|○|○|.NET Frameworkクラスライブラリ|
|×|○|○|C++サポートライブラリ|
|×|○|○|OpenMP|
|!E|!S|!P|!統合開発環境|
|○|○|○|グラフィカル統合開発環境|
|!E|!S|!P|!ツール|
|○|○|○|インクリメンタル リンカ (Link.exe)|
|○|○|○|Program Maintenance Utility (Nmake.exe)|
|○|○|○|Lib ジェネレータ (Lib.exe)|
|○|○|○|Windows リソース コンパイラ (Rc.exe)|
|○|○|○|Windows Resource to Object Converter (CvtRes.exe)|
|×|×|○|Native Web Service Proxy Generator (SProxy.exe)|
|×|○|○|Browse Information Maintenance Utility (BscMake.exe)|
|×|○|○|C++ Name Undecorator (Undname.exe)|
|×|×|○|ClStencil.exe|
|×|○|○|COFF/PE Dumper (Dumpbin.exe)|
|×|○|○|COFF/PE Editor (Editbin.exe)|
|×|×|○|MASM (Ml.exe)|
|×|×|○|Visual C++ Web 配置ツール (VCDeploy.exe)|
|×|○|○|Spy++|
|×|○|○|ErrLook|
|×|○|○|AtlTrace|
|×|○|○|Devenv.com|
|○|○|○|推論規則|
|○|○|○|コマンド ライン ツール (Vcbuild.exe)|
|×|×|○|POGO|
|!E|!S|!P|!デバッグ機能|
|○|○|○|ネイティブ デバッグ|
|○|○|○|マネージ デバッグ|
|×|×|○|リモート デバッグ|
|×|×|○|[SQL デバッグ]|
|!E|!S|!P|!デザイナおよびエディタ|
|○|○|○|CSS スタイル デザイナ/エディタ|
|○|○|○|HTML デザイナ/エディタ|
|○|○|○|XML エディタ|
|○|○|○|ソース コード エディタ|
|○|○|○|Windows フォーム デザイナ|
|×|○|○|データ デザイナ|
|×|○|○|リソース エディタ|
|!E|!S|!P|!データ機能|
|×|○|○|データ デザイナ|
|○|○|○|データ オブジェクト|
|※|○|○|Web サービス(※Web サービスのみ使用可能)|
|×|×|○|サーバー エクスプローラ|
|!E|!S|!P|!オートメーションおよび機能拡張|
|○|○|○|機能拡張オブジェクト モデル|
|○|○|○|コード モデル|
|○|○|○|プロジェクト モデル|
|×|○|○|リソース エディタ モデル|
|○|○|○|ウィザード モデル|
|○|○|○|デバッガ オブジェクト モデル|
!OpenMPとは
簡単にデュアルコアCPUでの演算を可能にする方式?
*方法
**C言語の文法中の、高速処理を行わせたい個所に下記を含める
{{{
#pragma omp parallel for reduction(+:s)
}}}
*[[ソース|http://anoda.cocolog-nifty.com/mad/2007/10/openmp_3fcf.html]]
*仕様(和訳)
**http://phase.hpcc.jp/Omni/openmp-tutorial/index.htm
<!--{{{-->
<!--<div class='title' macro='view title'></span>-->
</div><div class='tiddlerbody'>
<div class='tagging' macro='dropTagging'></div>
<div class='toolbar'><span style="padding-right:2.45em;" macro='tagger'></span><span macro='toolbar fullscreen +editTiddler refresh  -closeTiddler ! > deleteTiddler permalink references newHere closeOthers ! <'></span></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<div style="text-align:right;" class='subtitle'> by <span macro='view modifier link'></span>, <span macro='view modified date [[YYYY年0MM月0DD日]]'></span> (作成日 <span macro='view created date [[YYYY年0MM月0DD日]]'></span>) <span macro="navitiddler -1"></span> <span macro="navitiddler +1"></span></div>
</div>
<!--}}}-->
<<showtoc>>
!Spec
!!WILLCOM WS-011SH 「advanced [es]」
|OS|Windows Mobile(R) 6 Classic 日本語版|
|CPU|Marvell(R) PXA270 プロセッサ 520MHz|
|MEM|SDRAM 128MB(ワークエリア)|
|DISPLAY|ワイドVGA(800×480ドット) 3型 65,536色|
!!zaurus SL-C1000
|OS|Lineo uLinux|
|CPU|PXA270 416MHz|
|MEM|RAM 64MB|
|DISPLAY|640×480ドット 65,536色 透過型システム液晶 3.7型|
!!WILLCOM WS020SH 「WILLCOM 03」
|OS|Windows Mobile(R) 6.1 Classic 日本語版|
|CPU|Marvell(R) PXA270 プロセッサ 520MHz|
|MEM|SDRAM 128MB(ワークエリア)|
|DISPLAY|ワイドVGA(800×480ドット) 3型 65,536色|
!!WILLCOM WS016SH 「WILLCOM D4」
|OS|Windows Vista|
|CPU|Atom Z520(動作クロック1.33GHz)|
|MEM|DDR2-533/1Gバイト(固定)|
|DISPLAY|Intel GMA 500/ 5インチワイド(1024×600) |
!So-net
*[[Link|http://www.so-net.ne.jp/ap/airh.html]]
!!Access Points
|>|!AIR-EDGE用アクセスポイント|!電話番号|
|つなぎ放題〔4x〕|4xパケット方式 |0570-570-704##64|
|つなぎ放題|1xパケット方式 |0570-570-676##61|
|~|2xパケット方式|0570-570-676##64|
|ネット25|4xパケット方式|0570-570-564##64|
|~|フレックスチェンジ方式|0570-570-564##7|
|パケコミネット|4xパケット方式|0570-570-704##64|
|~|1xパケット方式|0570-570-676##61|
|データ定額|4xパケット方式|0570-570-704##64|
!!how to connect
|!接続先|AIR-EDGEアクセスポイント|
|!接続用ID|ユーザ名]@[サブドメイン].so-net.ne.jp<<br>>例) taro@aa2.so-net.ne.jp<<br>>※電子メールアドレスと同じ形式になります。|
|!パスワード|パスワードはSo-netにご登録いただいているものです。|
!Link
ぶっこぬき
!~VC6 Virtual Keys
|!define|!code|!info|
|~VK_LBUTTON|0x01||
|~VK_RBUTTON|0x02||
|~VK_CANCEL|0x03||
|~VK_MBUTTON|0x04||
|~VK_BACK|0x08||
|~VK_TAB|0x09|TAB|
|~VK_CLEAR|0x0C||
|~VK_RETURN|0x0D|Enter|
|~VK_SHIFT|0x10||
|~VK_CONTROL|0x11||
|~VK_MENU|0x12||
|~VK_PAUSE|0x13||
|~VK_CAPITAL|0x14||
|~VK_KANA|0x15||
|~VK_HANGEUL|0x15||
|~VK_HANGUL|0x15||
|~VK_JUNJA|0x17||
|~VK_FINAL|0x18||
|~VK_HANJA|0x19||
|~VK_KANJI|0x19||
|~VK_ESCAPE|0x1B||
|~VK_CONVERT|0x1C||
|~VK_NONCONVERT|0x1D||
|~VK_ACCEPT|0x1E||
|~VK_MODECHANGE|0x1F||
|~VK_SPACE|0x20||
|~VK_PRIOR|0x21||
|~VK_NEXT|0x22||
|~VK_END|0x23||
|~VK_HOME|0x24||
|~VK_LEFT|0x25||
|~VK_UP|0x26||
|~VK_RIGHT|0x27||
|~VK_DOWN|0x28||
|~VK_SELECT|0x29||
|~VK_PRINT|0x2A||
|~VK_EXECUTE|0x2B||
|~VK_SNAPSHOT|0x2C||
|~VK_INSERT|0x2D||
|~VK_DELETE|0x2E||
|~VK_HELP|0x2F||
|~VK_LWIN|0x5B||
|~VK_RWIN|0x5C||
|~VK_APPS|0x5D||
|~VK_NUMPAD0|0x60||
|~VK_NUMPAD1|0x61||
|~VK_NUMPAD2|0x62||
|~VK_NUMPAD3|0x63||
|~VK_NUMPAD4|0x64||
|~VK_NUMPAD5|0x65||
|~VK_NUMPAD6|0x66||
|~VK_NUMPAD7|0x67||
|~VK_NUMPAD8|0x68||
|~VK_NUMPAD9|0x69||
|~VK_MULTIPLY|0x6A||
|~VK_ADD|0x6B||
|~VK_SEPARATOR|0x6C||
|~VK_SUBTRACT|0x6D||
|~VK_DECIMAL|0x6E||
|~VK_DIVIDE|0x6F||
|~VK_F1|0x70||
|~VK_F2|0x71||
|~VK_F3|0x72||
|~VK_F4|0x73||
|~VK_F5|0x74||
|~VK_F6|0x75||
|~VK_F7|0x76||
|~VK_F8|0x77||
|~VK_F9|0x78||
|~VK_F10|0x79||
|~VK_F11|0x7A||
|~VK_F12|0x7B||
|~VK_F13|0x7C||
|~VK_F14|0x7D||
|~VK_F15|0x7E||
|~VK_F16|0x7F||
|~VK_F17|0x80||
|~VK_F18|0x81||
|~VK_F19|0x82||
|~VK_F20|0x83||
|~VK_F21|0x84||
|~VK_F22|0x85||
|~VK_F23|0x86||
|~VK_F24|0x87||
|~VK_NUMLOCK|0x90||
|~VK_SCROLL|0x91||
|~VK_LSHIFT|0xA0||
|~VK_RSHIFT|0xA1||
|~VK_LCONTROL|0xA2||
|~VK_RCONTROL|0xA3||
|~VK_LMENU|0xA4||
|~VK_RMENU|0xA5||
|~VK_ATTN|0xF6||
|~VK_CRSEL|0xF7||
|~VK_EXSEL|0xF8||
|~VK_EREOF|0xF9||
|~VK_PLAY|0xFA||
|~VK_ZOOM|0xFB||
|~VK_NONAME|0xFC||
|~VK_PA1|0xFD||
|~VK_OEM_CLEAR|0xFE||
!Useful links
* [[4096 Color Wheel|http://ficml.awardspace.com/jemimap/style/color/wheel.html]] - hover over a wheel to view colors and click to choose a web-smart color
* [[Color Names|http://coloria.net/bonus/colornames.htm]] - c o l o r a t u r e
!RGB hexadecimal 216-color "Web safe" palette
Source: Paul Petterson, revised by Eric Shulman
|bgcolor(#FFF):FFF |bgcolor(#CCC):CCC |bgcolor(#999):999 |bgcolor(#666):@@color(white):666@@ |bgcolor(#333):@@color(white):333@@ |bgcolor(#000):@@color(white):000@@ |bgcolor(#FC0):~FC0 |bgcolor(#F90):F90 |bgcolor(#F60):@@color(white):F60@@ |bgcolor(#F30):@@color(white):F30@@ |>|>|>|>|>| |
|bgcolor(#9C0):9C0 |>|>|>| |bgcolor(#C90):C90 |bgcolor(#FC3):~FC3 |bgcolor(#FC6):~FC6 |bgcolor(#F96):F96 |bgcolor(#F63):@@color(white):F63@@ |bgcolor(#C30):@@color(white):C30@@ |>|>|>| |bgcolor(#C03):@@color(white):C03@@ |
|bgcolor(#CF0):~CF0 |bgcolor(#CF3):~CF3 |bgcolor(#330):@@color(white):330@@ |bgcolor(#660):@@color(white):660@@ |bgcolor(#990):990 |bgcolor(#CC0):~CC0 |bgcolor(#FF0):~FF0 |bgcolor(#C93):C93 |bgcolor(#C63):@@color(white):C63@@ |bgcolor(#300):@@color(white):300@@ |bgcolor(#600):@@color(white):600@@ |bgcolor(#900):@@color(white):900@@ |bgcolor(#C00):@@color(white):C00@@ |bgcolor(#F00):@@color(white):F00@@ |bgcolor(#F36):@@color(white):F36@@ |bgcolor(#F03):@@color(white):F03@@ |
|bgcolor(#9F0):9F0 |bgcolor(#CF6):~CF6 |bgcolor(#9C3):9C3 |bgcolor(#663):@@color(white):663@@ |bgcolor(#993):993 |bgcolor(#CC3):~CC3 |bgcolor(#FF3):~FF3 |bgcolor(#960):@@color(white):960@@ |bgcolor(#930):@@color(white):930@@ |bgcolor(#633):@@color(white):633@@ |bgcolor(#933):@@color(white):933@@ |bgcolor(#C33):@@color(white):C33@@ |bgcolor(#F33):@@color(white):F33@@ |bgcolor(#C36):@@color(white):C36@@ |bgcolor(#F69):@@color(white):F69@@ |bgcolor(#F06):@@color(white):F06@@ |
|bgcolor(#6F0):6F0 |bgcolor(#9F6):9F6 |bgcolor(#6C3):6C3 |bgcolor(#690):690 |bgcolor(#996):996 |bgcolor(#CC6):~CC6 |bgcolor(#FF6):~FF6 |bgcolor(#963):@@color(white):963@@ |bgcolor(#630):@@color(white):630@@ |bgcolor(#966):@@color(white):966@@ |bgcolor(#C66):@@color(white):C66@@ |bgcolor(#F66):@@color(white):F66@@ |bgcolor(#903):@@color(white):903@@ |bgcolor(#C39):@@color(white):C39@@ |bgcolor(#F6C):@@color(white):~F6C@@ |bgcolor(#F09):@@color(white):F09@@ |
|bgcolor(#3F0):3F0 |bgcolor(#6F3):6F3 |bgcolor(#390):390 |bgcolor(#6C0):6C0 |bgcolor(#9F3):9F3 |bgcolor(#CC9):~CC9 |bgcolor(#FF9):~FF9 |bgcolor(#C96):C96 |bgcolor(#C60):@@color(white):C60@@ |bgcolor(#C99):C99 |bgcolor(#F99):F99 |bgcolor(#F39):@@color(white):F39@@ |bgcolor(#C06):@@color(white):C06@@ |bgcolor(#906):@@color(white):906@@ |bgcolor(#F3C):@@color(white):~F3C@@ |bgcolor(#F0C):@@color(white):~F0C@@ |
|bgcolor(#0C0):0C0 |bgcolor(#3C0):3C0 |bgcolor(#360):@@color(white):360@@ |bgcolor(#693):693 |bgcolor(#9C6):9C6 |bgcolor(#CF9):~CF9 |bgcolor(#FFC):FFC |bgcolor(#FC9):~FC9 |bgcolor(#F93):F93 |bgcolor(#FCC):FCC |bgcolor(#F9C):~F9C |bgcolor(#C69):@@color(white):C69@@ |bgcolor(#936):@@color(white):936@@ |bgcolor(#603):@@color(white):603@@ |bgcolor(#C09):@@color(white):C09@@ |bgcolor(#303):@@color(white):303@@ |
|bgcolor(#3C3):3C3 |bgcolor(#6C6):6C6 |bgcolor(#0F0):0F0 |bgcolor(#3F3):3F3 |bgcolor(#6F6):6F6 |bgcolor(#9F9):9F9 |bgcolor(#CFC):CFC |>|>| |bgcolor(#C9C):~C9C |bgcolor(#969):@@color(white):969@@ |bgcolor(#939):@@color(white):939@@ |bgcolor(#909):@@color(white):909@@ |bgcolor(#636):@@color(white):636@@ |bgcolor(#606):@@color(white):606@@ |
|bgcolor(#060):@@color(white):060@@ |bgcolor(#363):@@color(white):363@@ |bgcolor(#090):090 |bgcolor(#393):393 |bgcolor(#696):696 |bgcolor(#9C9):9C9 |>|>| |bgcolor(#FCF):FCF |bgcolor(#F9F):~F9F |bgcolor(#F6F):@@color(white):~F6F@@ |bgcolor(#F3F):@@color(white):~F3F@@ |bgcolor(#F0F):@@color(white):~F0F@@ |bgcolor(#C6C):@@color(white):~C6C@@ |bgcolor(#C3C):@@color(white):~C3C@@ |
|bgcolor(#030):@@color(white):030@@ |bgcolor(#0C3):0C3 |bgcolor(#063):@@color(white):063@@ |bgcolor(#396):396 |bgcolor(#6C9):6C9 |bgcolor(#9FC):9FC |bgcolor(#CFF):CFF |bgcolor(#39F):39F |bgcolor(#9CF):9CF |bgcolor(#CCF):CCF |bgcolor(#C9F):~C9F |bgcolor(#96C):@@color(white):96C@@ |bgcolor(#639):@@color(white):639@@ |bgcolor(#306):@@color(white):306@@ |bgcolor(#90C):@@color(white):90C@@ |bgcolor(#C0C):@@color(white):~C0C@@ |
|bgcolor(#0F3):0F3 |bgcolor(#3F6):3F6 |bgcolor(#093):093 |bgcolor(#0C6):0C6 |bgcolor(#3F9):3F9 |bgcolor(#9FF):9FF |bgcolor(#9CC):9CC |bgcolor(#06C):@@color(white):06C@@ |bgcolor(#69C):69C |bgcolor(#99F):99F |bgcolor(#99C):99C |bgcolor(#93F):@@color(white):93F@@ |bgcolor(#60C):@@color(white):60C@@ |bgcolor(#609):@@color(white):609@@ |bgcolor(#C3F):@@color(white):~C3F@@ |bgcolor(#C0F):@@color(white):~C0F@@ |
|bgcolor(#0F6):0F6 |bgcolor(#6F9):6F9 |bgcolor(#3C6):3C6 |bgcolor(#096):096 |bgcolor(#6FF):6FF |bgcolor(#6CC):6CC |bgcolor(#699):699 |bgcolor(#036):@@color(white):036@@ |bgcolor(#369):@@color(white):369@@ |bgcolor(#66F):@@color(white):66F@@ |bgcolor(#66C):@@color(white):66C@@ |bgcolor(#669):@@color(white):669@@ |bgcolor(#309):@@color(white):309@@ |bgcolor(#93C):@@color(white):93C@@ |bgcolor(#C6F):@@color(white):~C6F@@ |bgcolor(#90F):@@color(white):90F@@ |
|bgcolor(#0F9):0F9 |bgcolor(#6FC):6FC |bgcolor(#3C9):3C9 |bgcolor(#3FF):3FF |bgcolor(#3CC):3CC |bgcolor(#399):399 |bgcolor(#366):@@color(white):366@@ |bgcolor(#069):@@color(white):069@@ |bgcolor(#039):@@color(white):039@@ |bgcolor(#33F):@@color(white):33F@@ |bgcolor(#33C):@@color(white):33C@@ |bgcolor(#339):@@color(white):339@@ |bgcolor(#336):@@color(white):336@@ |bgcolor(#63C):@@color(white):63C@@ |bgcolor(#96F):@@color(white):96F@@ |bgcolor(#60F):@@color(white):60F@@ |
|bgcolor(#0FC):0FC |bgcolor(#3FC):3FC |bgcolor(#0FF):0FF |bgcolor(#0CC):0CC |bgcolor(#099):099 |bgcolor(#066):@@color(white):066@@ |bgcolor(#033):@@color(white):033@@ |bgcolor(#39C):39C |bgcolor(#36C):@@color(white):36C@@ |bgcolor(#00F):@@color(white):00F@@ |bgcolor(#00C):@@color(white):00C@@ |bgcolor(#009):@@color(white):009@@ |bgcolor(#006):@@color(white):006@@ |bgcolor(#003):@@color(white):003@@ |bgcolor(#63F):@@color(white):63F@@ |bgcolor(#30F):@@color(white):30F@@ |
|bgcolor(#0C9):0C9 |>|>|>| |bgcolor(#09C):09C |bgcolor(#3CF):3CF |bgcolor(#6CF):6CF |bgcolor(#69F):69F |bgcolor(#36F):@@color(white):36F@@ |bgcolor(#03C):@@color(white):03C@@ |>|>|>| |bgcolor(#30C):@@color(white):30C@@ |
|>|>|>|>|>| |bgcolor(#0CF):0CF |bgcolor(#09F):09F |bgcolor(#06F):@@color(white):06F@@ |bgcolor(#03F):@@color(white):03F@@ |>|>|>|>|>| |
!Info
*[[鯖HP|http://www4.atpages.jp/rane/]]
*[[画像BBS|http://www4.atpages.jp/rane/joyful/joyful.cgi]]
*[[BBS|http://www2.atchs.jp/cz2chserv/]]
!!メイン鯖(常時運用パブリックサーバー)
<<tiddler mainServerImg>>
!!サブ鯖(DMサーバーだったり、メンバー専用練習サーバーだったり)
<<tiddler subServerImg>>
!マップサイクル
+++^[クリックで展開]
!!定番マップ
*de_inferno
*de_inferno_cz
*de_dust2
*de_dust2_cz
*de_train
*de_nuke
!!追加マップ
|>|>|>|>|>|!現状|
|de_sunny|de_contra|de_dust2dust|fy_marioland||
|>|>|>|>|>|!候補(Official)|
|cs_office_cz|de_piranesi_cz|de_chateau|de_vertigo|de_survivor|de_sienna_cz|
|>|>|>|>|>|!候補(Custom)|
|de_sunny|de_contra|de_tuscan|de_blue||
|>|>|>|>|>|!候補(neta)|
|fy_marioland|fy_skill_k2|deagle_aztec3|||
|>|>|>|>|>|!未チェック・動作確認予定|
||||||
|>|>|>|>|>|!クビ|
|>|T有利|cs_millitia_cz|cs_italy_cz|||
|>|CT有利|de_cbble_cz|de_aztec_cz|de_dust_cz|de_aztec_mini|
|>|他鯖とのVer不整合|de_forge||||
|>|BOT不具合|cpl系|||
|>|なぜか鯖がおちる|awp_winter|||
|>|spawn kill|awp_dust|awp_city|||
===
!Link
+++^[クリックで展開]
<<tiddler "CS Link">>
===
!HLDSについて
<<tagging hlds>>
!その他
*[[カスタムマップのOverView作成方法]]
<<showtoc>>
!サーバプログラムをインストールする。
まずは[[What is Steam|http://www.steampowered.com/v/index.php?area=about&l=japanese]]の右下の方にある[[Linux HLDS アップデートツール|http://storefront.steampowered.com/download/hldsupdatetool.bin]]をダウンロード。
そのファイルを下記方法で展開
{{{
$ chmod 755 hldsupdatetool.bin
$ ./hldsupdatetool.bin
}}}
 ~EULAが出るので同意できるならyesとタイプする~

*readme.txt
*steam
というファイルが作成されます。
この2ファイルをsteamをインストールするフォルダに移動し、実行
{{{
$ ./steam
}}}
→steamクライアントのアップデートが実行される

hldsディレクトリを作成し、czeroに必要なファイルをダウンロードする
{{{
$ mkdir hlds
$ ./steam -command update -game czero -dir ./hlds
}}}
これでインストールは完了。

!いろいろ設定
*hlds/czero/server.cfg
*hlds/czero/mapcycle.txt
*hlds/czero/motd.txt
をいじる。いじり方は[[CS Link]]や、[[hldsの設定ファイルについて]]を参照

必要なフォルダ・ファイルをあらかじめ生成しておく
{{{
$ cd hlds
$ mkdir -p platform/SAVE
$ mkdir cstrike/SAVE
$ mkdir czero/SAVE
$ mkdir valve/SAVE
$ touch czero/language.cfg
}}}

!サーバ起動

ここまででとりあえず設定は完了。起動してみる。
{{{
$ ./hlds_run -game czero +maxplayers 16 +map de_dust2_cz

(中略)

Adding master server *****
Connection to Steam servers successful.
}}}
と出れば成功

maxplayersもmapも後から変えられるので、とりあえずの値で大丈夫
server.cfgをサーバ起動中に変えた場合、サーバ立ち上げたコンソールで「reload」と打ってやればリロードする。

!Link
[[CS Link]]
<<showtoc>>
!インストール:STEAMを使う場合
!!インストール
Steamをインストールし、「Tools」から、「Dedicated Server」をインストール
ぶっちゃけこれだけでOK
dedicated serverがゲームリスト(Tools)に追加され、実行できるようになる
!!起動
#dedicated serverを実行する。
#「Start server」をクリック
#右上の「X」を押して、終了
→dedicated serverフォルダなど、最低限必要なファイルが生成されます。
dedicated serverフォルダ(以下HLDSフォルダ)とは
{{{
スチームのフォルダ\SteamApps\アカウント\dedicated server
}}}
のことです

botprifile.dbなど、鯖内の詳細な設定ファイルが欲しい人は、下を見てアップデートツールをインストールしましょう
それ以外の普通に鯖運用する人であれば、次の項目へ行ってOKです
!インストール:STEAMを使わない場合
hldsupdatetool.exeを使ってhldsを自分の好きなフォルダにインストールできます。
なお、コマンドプロンプトでの操作が主になりますので、スペースが入らないパスにインストールしたほうがいいです。
HLDSフォルダの例:
{{{
c:\hoge\hlserver\
}}}
このフォルダを作っておくといいでしょう
!!アップデートツールをインストールする
[[What is Steam|http://www.steampowered.com/v/index.php?area=about&l=japanese]]の右下の方にある[[Windows HLDS アップデートツール|http://storefront.steampowered.com/download/hldsupdatetool.exe]]をデスクトップとかにダウンロード。
そのファイルをそのまま実行すると、hldsupdatetuool.exeを解凍します。
同じファイル名が解凍されるので、今の同じフォルダに解凍するように指定したらエラーになりますので注意してください。

で、解凍してできたhldsupdawtetool.exeをHLDSフォルダに置きます
!!cz関連のファイルをダウンロードします
{{{
HLDSフォルダ>HldsUpdateTool.exe -command update -game czero -dir . -username **** -password **** -remember_password
}}}
{{{****}}}のところには自分のアカウントとユーザ名を入れて下さい
ちなみに次回以降は、
{{{
HLDSフォルダ>HldsUpdateTool.exe -command update -game czero -dir .
}}}
だけでおk
!!起動
{{{
HLDSフォルダ>hlds.exe -game czero +maxplayers 16 +map de_dust2_cz -port 27015
}}}
で、いちいちコマンドプロンプトで実行するのはめんどい!という人はbatファイルを作りましょう
内容例は下記
{{{
@echo off
cd HLDSフォルダ
hlds -console -game czero +maxplayers 16 +map de_dust2_cz -port 27001
}}}
!!なんかpingが高いんだけど
よくわかりませんが、非STEAMのhldsはpingが高い場合があります。
私の環境ではLANでつないでいるのにpingが16くらいありました
その場合は別アカウントでSTEAMを起動しましょう(捨て垢でOK)
そうするとなぜかHLDSのpingが下がります
!いろいろ設定
*HLDSフォルダ/czero/server.cfg
*HLDSフォルダ/czero/mapcycle.txt
*HLDSフォルダ/czero/motd.txt
をいじる。いじり方は[[CS Link]]や、[[hldsの設定ファイルについて]]を参照

!サーバ起動
上記を参照してください(環境ごとに違うので注意)
詳しいオプションを調べたければ、[[ここ|http://halflife.luina.net/win_cui_server_run.html]]を見て下さい
とりあえず「start server」をクリックして、コンソールをにらむ
{{{
(中略)

Adding master server *****
Connection to Steam servers successful.
}}}
と出れば成功

maxplayersもmapも後から変えられるので、とりあえずの値で大丈夫
server.cfgをサーバ起動中に変えた場合、コンソールで「reload」と打ってやればリロードする。
<<showtoc>>
全て一例ですので「この設定は何?」とか「ここの設定変じゃね?」とかあったら教えて下さいな
!mapcycle.txt
マップ名を改行をはさんで入力する
amxx導入環境下では意味がないので注意
{{{
de_dust2_cz
de_inferno
de_train
de_nuke
}}}
!motd.txt
motdはhtmlなので、拡張子をhtmlにして専用エディタでいじるとよい
javaとかflashはだめっぽいけどふつーなhtmlだったら大丈夫
編集後、拡張子をtxtにすると完了
{{{
<html><body>
hi :D
<a href="http://www.google.com">server HP</a>
</body></html>
}}}
!server.cfg
鯖cfgをぶっこぬき
<HLDS>
//ログがうざいのでここで一旦切る
log off

hostname "cz.2ch public server"
sv_password ""

sv_downloadurl "**************"
sv_allowdownload 0

//lan
sv_lan 0

//ff
mp_friendlyfire 1
mp_friendly_grenade_damage 1
mp_tkpunish 0
mp_autokick 0

//team
mp_limitteams 2
mp_autoteambalance 1
mp_forcechasecam 0
mp_startmoney 800
mp_playerid 1

//vote
mp_mapvoteratio 0.6

//other
pausable 0
sv_maxspeed 320
mp_flashlight 1
mp_maxrounds 15
mp_forcechasecam 0
allow_spectators 1
decalfrequency 60
sv_aim 0
sv_cheats 0
sv_gravity 800
sv_timeout 35
mp_winlimit 0
fps_max 100
sv_region 4
sv_airaccelerate 10
sv_airmove 1
mp_forcecamera 0

//time
mp_roundtime 2
mp_c4timer 35
mp_freezetime 5

//connection
sv_maxrate 25000
sv_minrate 4000

//voice chat
sv_voiceenable 1
sv_alltalk 1
sv_voicecodec voice_speex
sv_voicequality 4

mapchangecfgfile "server.cfg"	//マップチェンジ毎に読み込むファイル
mp_chattime 0		//
pausable 0			//一時停止許可

//てすと的に設置
sv_clienttrace 1.0
edgefriction 2
host_framerate 0 
mp_autocrosshair 0
mp_consistency 1
mp_fadetoblack 0
mp_falldamage 0
sv_maxunlag 0.0022
sv_maxupdaterate 101
sys_ticrate 2000

//hltv
sv_proxies 1

//exec
exec bot.cfg
exec banned.cfg

log on
</HLDS>
!bot.cfg
上でexecしていなければ作らなくてもいいし書かなくてもいい
<HLDS>
echo "Loading Bot Configuration Settings..."
bot_chatter normal
bot_defer_to_human 1
bot_difficulty 2
bot_join_after_player 1
bot_prefix "[2ch]"
bot_all_weapons
bot_allow_shield 0
bot_allow_grenades 0
bot_allow_machine_guns 1
bot_allow_pistols 1
bot_allow_rifles 1
bot_allow_shotguns 1
bot_allow_snipers 1
bot_allow_sub_machine_guns 1
bot_auto_follow 1
bot_eco_limit "2000"
bot_allow_rogues 1
bot_quota_mode "normal"
bot_auto_vacate 1
bot_quota 5
</HLDS>
いれたソフトとか、導入とかのまとめ
読み返す用だったり
<<showtoc>>
!Customize
!!買ったハード
*microSD 2G+SD変換ケーブル
*CFのGPS
!!あると便利そうなものorやっておくと便利そうなこと
*SDHC⇒CF変換コネクタ
*メモリ64MB⇒128MB改造(海外に送らないとダメみたい)
*iPaq Thumb keyboardほしい(今売ってない)
!!入れたソフト
*システム関連
**[[ozVGA|http://www11.atwiki.jp/axim/pages/19.html#id_fb9fcd9c]]
*today
**devstate(~RealVGA環境でボケるので、消した。)
**[[tdLaunch|http://www.pocketpcfreewares.com/en/index.php?soft=176]]
**[[todaysinfo|http://www.pocketpcfreewares.com/en/index.php?soft=35]]
**todayagenda
*その他
**Opera 9.5
**~GSfinder
**exPanda
**jot
**nPop
**pRSSreader
**TCPMP
**[[VGA large keyboard|http://d.hatena.ne.jp/KOTETU/00000102]]
*てきとーにゲームとか。
!Link
*[[まとめサイト|http://www5.atwiki.jp/hx4700/]]
*[[Blog検索|http://www6.atwiki.jp/hoshiba/pages/54.html]]
*[[axim@wiki|http://www11.atwiki.jp/axim/]]
*[[仕様|http://h50146.www5.hp.com/products/handhelds/pocketpc/old/ipaq/hx4700/spec.html]]
*[[同梱ソフト|http://h50146.www5.hp.com/products/handhelds/pocketpc/old/ipaq/hx4700/applications.html]]
*[[有料ソフト|http://www.shareedge.com/modules/iPaq/index.php?model=501]]
*[[Soft @ CE fan|http://soft.wince.ne.jp/soft/]]
*[[Soft @ 窓の杜|http://www.forest.impress.co.jp/article/index_winmob.html]]
*[[PocketPCfreeware|http://www.pocketpcfreewares.com/en/index.php]]
*[[2ch Thread|http://pc11.2ch.net/test/read.cgi/mobile/1212334340/]]
!Tuning
*[[軽量化|http://www5.atwiki.jp/hx4700/pages/26.html]](まとめの軽量化のが見やすいかも)
**hp公式Windows Mobile 5が必要なため、現在では実行不可能
!Windows Mobile 6.0
HP iPAQ hx4700 Windows Mobile 6化
!!必要なもの
*[[Windows Mobile 6.0 Release3|http://rapidshare.com/files/63684562/wwe_wm6_4700_070_fix3.rar]]
**基本的に英語版です。
*[[Windows Mobile 6.0 Release4|http://rapidshare.com/files/68396806/WM6_4700_0_7_0_RELEASE4.rar]]
**同様に英語版です。なので、ある程度(←コレ重要)日本語化するパッチが必要です。
*[[Windows Mobile 6.1 kozhura Edition|http://rapidshare.com/files/121490953/CEOS_WM6.1_R5_kozhura_Edition_.rar.html]]
**最新版WM
*[[LetsJapanNo6.cab|http://hn801.hkes.com/Data/Localize/LetsJapanNo6.zip]]
**これが無いと、日本語が表示できません。
*[[IME_31J_F.cab|http://hn801.hkes.com/Data/SIP/IME_31J_F.zip]]
**これが無いと、日本語入力できません。
*[[Enable_IME_2.cab|http://hn801.hkes.com/Data/SIP/Enable_IME_2.zip]]
**上記のIME_31J_F.cabは、実はhTcZ専用なのです。それをhx4700に対応させるために、これが必要です。
*[[bootloader.exe|http://www.freetrafficsite.com/BootLoader.exe]]
**Windows Mobile 6.0 Release 3.0のインストールに必要。
!!Tips
*ブートローダーモードで起動するには?
** 「連絡先(左上)」と「iTask(右下)」を押しながら、リセットする。
*クリーンリセットするには?
**クリーンリセット(「連絡先(左上)」と「メール(右上)」を押しながらリセット)する。<<br>>その後、本当にデータを消すか英語で聞いてくるので、消す。(「予定表(左下)」を押す。)
!!手順:OSのインストール
#タスクマネージャで、「wcescomm.exe」を強制終了する。
#Windows Mobile 6.0 Release 3.0を解凍する。
#解凍してできたwwe_wm6_4700_070_fix3.nbfとbootloader.exeを同じフォルダに置く。
#ブートローダーモードで起動したPDAをPCとUSB接続する。
#bootloader.exeを実行する。<<br>>自動的にWindows Mobile 6.0 Release 3.0をインストールしてくれる
#クリーンリセット⇒接続
#Windows Mobile 6.0 Release 4.0を解凍する。
#Windows Mobile 6.0 Release4のbootloader.exeを実行する。<<br>>自動的にWindows Mobile 6.0 Release 4.0をインストールしてくれる
#クリーンリセット
#Windows Mobile 6.0の世界へようこそ!!
!!手順:日本語化
#{{{LetsJapanNo6.cab}}}をインストール。
#画面の指示に従い、再起動する。
#{{{IME_31J_F.cab}}}をインストール。
#画面の指示を無視して、再起動しない。(コレ重要)
#{{{Enable_IME_2.cab}}}をインストール。
#ここまでインストールしてから再起動。
#これで、最小インストールが終了しました。
これでできない場合、3⇒4を6の後にもう一回やってみるといいかも
自作プラグインを公開されているTiddlyWikiユーザーです
*[[KuRaKu TiddlyWiki|http://tw.kuraku.net/tw.html]]
Type the text for 'macro'
[img[http://module.game-monitor.com/120.75.245.28:27015/image/default/blue2.png]]
Type the text for 'plugin'
Web page admin
!Contact
*Mail : rane-hs [at] gmail.com
!More information
*[[My Blog|http://d.hatena.ne.jp/rane-hs/]]
*[[My PukiWiki|http://www4.atpages.jp/~rane/pukiwiki/]]

[img[http://module.game-monitor.com/120.75.245.28:27016/image/default/blue2.png]]
{{{
config.options.chkAnimate=false;
config.options.chkHttpReadOnly=true;
config.options.chkForceMinorUpdate=false;
config.options.txtMaxEditRows="30"; 
config.options.txtBackupFolder="backup";
config.options.txtSelectedTiddlerTabButton='closeTiddler';

config.commands.closeTiddler.text = "X"; // default is "close"
config.messages.messageClose.text = "X"; // default is "close"
config.views.wikified.defaultText = ""; // default is "The tiddler '%0' doesn't yet exist. Double-click to create it"
config.views.editor.defaultText = "";   // don't need message when creating a new tiddler 

config.options.chkDeleteListDisplayInOptions=true;
//config.displayStartupTime=true;

}}}
<<showtoc>>
!Special thanks
*shinichi_watanabe
私が提供した情報を元に実践・まとめをしてくださいました。感謝感激
!方法
#developer(開発者)モードで起動(詳細は下記)
#オーバービューを作りたいカスタムマップをロード
#dev_overview 1で上空視点に移動
#適度な大きさになるように視点位置を調整
#確定したらcondumpで、overview description fileに記述するための指定用の数値を書き出す
#dev_overview 2、hud_draw 0で撮影に不要な画面表示を消去
#スナップショットを撮影しoverview用の画像を作成(*.bmp)
#condumpで作成された数値をもとに、overview description file(*.txt)を作成
#overview description fileとoverview用の画像の名前をカスタムマップと同じにしてoverviewフォルダにぶっこむ
#完成!
!注意
!!画像について
スナップショットした画像そのままだとゲームで読み込めません。
画像編集系ソフトでbmpファイルの色数を256色以下にしてください。
!!開発者モードで起動する方法
コマンドラインオプションは
{{{
"Steamが入っているフォルダ\Steam.exe" -applaunch 10 -dev -win 1024
}}}
です。
1.6ではなくCZで作業する場合は「{{{-applaunch 10}}}」を「{{{-applaunch 80}}}」にしてください
!Link
*[[OverView作成方法(CSCE)|http://www.c-sec.net/tips_12.htm]]
*[[議論用スレッド|http://www2.atchs.jp/test/read.cgi/cz2chserv/6/l10]]
!Main
<<tagging Programing>>
!メモ・小技など
+++[クリックで展開]
<<tagging Prog_memo>>
===
!MFC専用
<<tagging Prog_MFC>>
!Link
*[[VS2008Exp|http://www.microsoft.com/japan/msdn/vstudio/express/default.aspx]]
*[[VS2008SP1Beta|http://www.microsoft.com/japan/msdn/vstudio/downloads/sp/vs2008/sp1/beta/?rss_fdn=MSDNTopNewInfo]]
<<tagging Programing_Link>>
<<showtoc>>
!Timer中にダイアログオープンしたらTimerはどうなるの?
MFCにて~SetTimer実行後の~OnTimerの動き方は
*モーダルダイアログ:~DoModal()の時点で親ウィンドウの処理が止まるため、タイマーも止まる
*モードレスダイアログ:タイマーは止まらない
<<showtoc>>
*[[MFC編はこちら|プログラミング小技MFC]]
!libのインクルードをソース単位で行う
/*{{{*/
#pragma comment(lib, "winmm.lib")
/*}}}*/
winmm.libの中身をlib/~DataAccessDll.libとかにして使うとよい
!Warningを無視
/*{{{*/
#pragma warning( disable : 4786 )
/*}}}*/
C4786のWarningはvector<string>などの変数を作ると出てしまうものなので、邪魔ならば明示的に無視してやろうというもの
!2次元Vector
/*{{{*/
std::vector< std::vector<CString> >	datExcel;
std::vector<CString>	LineBuf;
CString		cstr_buf;
//リサイズ(5X10)
datExcel.resize( 5, std::vector<CString>(10));
/*}}}*/
※1行目の<>内の半角スペースは必須!
!fstreamでファイルの一部を編集したい場合
/*{{{*/
ofstream	fs;
fs.open("test.txt", ios::in);
if (fs.is_open() == false)
	return -3;
try {
	fs.seekp(1, ios::beg);
	out_c = CStr::itos(now_status).at(0); 
	fs.put(out_c);
}catch (...) {
	fs.close();
	return -4;
}
fs.close();	// ファイルクローズ
/*}}}*/
ofstreamで、「ios::in」オプションを付けて開く
!VCで入力候補機能がおかしい時
Ctrl+Spaceの入力補完に正しい単語が出ない時は、プロジェクトフォルダのncbファイルを削除してからワークスペースを開きなおすとよい
念のため、既存ncbファイルはバックアップしておこう!
!ファイルの存在をチェックする
[[CreateFile|http://yokohama.cool.ne.jp/chokuto/urawaza/api/CreateFile.html]]を使う
{{{
CString		csPath("チェックするファイルのパス");
OFSTRUCT	ob;
ob.cBytes = sizeof(OFSTRUCT);
if(INVALID_HANDLE_VALUE == CreateFile(csPath.GetBuffer(0), 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL))
	//ファイルがないときの処理
else{
	//ファイルが存在したときの処理
}
}}}
!COleDateTimeからtime_tへの変換
非MFCだとこんなかんじ?未デバッグ
{{{
COleDateTime	timeNow = COleDateTime::GetCurrentTime();
SYSTEMTIME	stimNow;
timeNow.GetAsSystemTime(stimNow);
FILETIME	ftNow;
// SYSTEMTIME -> FILETIME
::SystemTimeToFileTime(&stimNow, &ftNow);
// FILETIME -> time_t
LONGLONG	ll;
ll = ((LONGLONG)ft.dwHighDateTime << 32) + ft.dwLowDateTime;
time_t		timetNow = time_t((ll - 116444736000000000) / 10000000);
}
}}}
<<showtoc>>
!MFCでのファイルドロップ処理
 http://www.h6.dion.ne.jp/~shiimori/mfc/mfc02.htm
~ClassViewからの処理で、Ondropfilesを追加する方法。メッセージフィルタを変えるのを忘れやすいので注意
{{{
void CXXXDlg::OnDropFiles(HDROP hDropInfo) 
{
	// TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
	char	DragFileName[_MAX_PATH];
	CPoint	DragPoint;

	::DragQueryPoint(hDropInfo, &DragPoint); 
	int		FileCount = 0;
	if(::DragQueryFile(hDropInfo, FileCount++, DragFileName, 256)){
		AfxMessageBox(DragFileName);
	}
//	CDialog::OnDropFiles(hDropInfo);
}
}}}
!MFCアプリでのEscやEnterによる終了を阻止する
{{{PreTranslateMessage}}}をオーバーライドし、中に
/*{{{*/
BOOL CXXXDialog::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: この位置に固有の処理を追加するか、または基本クラスを呼び出してください
	if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN)
		return TRUE;	
	if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ESCAPE)
		return TRUE;	
	return CDialog::PreTranslateMessage(pMsg);
}
/*}}}*/
!CStringの変換
!!charへの変換
/*{{{*/
CString cstr("Soccer is best!");
char cBuf[_MAX_PATH];
sprintf(cBuf, "%s", cstr.GetBuffer(0));
/*}}}*/
!!bstrへの変換
/*{{{*/
CString str("Soccer is best!");   //CAtlString?
BSTR bstr = str.AllocSysString();
/*}}}*/
!チェック付きメニューの項目捜査(MFC)
~OnCommandをオーバーロードして中に記述
/*{{{*/
static CMenu *cMenu = GetMenu();
MENUITEMINFO mi;
mi.cbSize = sizeof(MENUITEMINFO);
mi.fMask = MIIM_STATE;

if(autosend_flg){
	autosend_flg = false;
	mi.fState = MFS_UNCHECKED;
	//チェック解除時の処理をここに記述
}else{
	autosend_flg = true;
	mi.fState = MFS_CHECKED;
	//チェック時の処理をここに記述
}
SetMenuItemInfo(cMenu->GetSafeHmenu(), IDM_AUTOSEND, FALSE, &mi);
/*}}}*/
~IDM_AUTOSENDはメニューのID番号
autosend_flgはチェック状態保管用変数
!ダイアログが表示されてから、処理を実行させる
0.該当ダイアログのヘッダファイルに変数と関数を作っておく
{{{
BOOL m_bFirst;  //最初しか実行しないようにフラグ管理する
void OnStart();  //最初に実行される処理
}}}
1.~OnInitDialogで、
{{{
EnableWindow(FALSE);
m_bFirst = TRUE;
}}}
2.~OnPaintで
{{{
if (m_bFirst){
    m_bFirst = FALSE;
    PostMessage(WM_COMMAND, MAKEWPARAM(ID_START, 0), NULL);
}
}}}
3.~OnCommandにて
{{{
if(lParam == 0){
	if(wParam == ID_START){
		OnStart();
	}
}	
}}}
4.~OnStartで
{{{
EnableWindow(TRUE);
//ここに処理を記述
}}}
!COleDateTimeからtime_tへの変換@MFC
ちょっとややこしいね。逆だと一発なのに
{{{
COleDateTime	timeNow = COleDateTime::GetCurrentTime();
SYSTEMTIME	stimNow;
timeNow.GetAsSystemTime(stimNow);
CTime		ctNow(stimNow);
time_t		timetNow = ctNow.GetTime();
}}}
!CStatic + BN_CLICKED
CStaticで作ったコントロールは標準でBN_CLICKEDをPostしません。
コントロールのプロパティから、「通知」にチェックをいれてやると大丈夫です
!ラジオボタン操作
グループボックスで囲まれたラジオボタンが2つあるとする。
タブオーダーを変更し、プロパティの「グループ」をチェックする
|!コントロール|!タブオーダー|!グループ|
|ラジオ1|任意の番号|あり|
|ラジオ2|ラジオ1の番号+1|なし|
|グループボックス|ラジオ1の番号+2|あり|
タブオーダー+グループチェックにより、グループ指定の範囲を決定する。
で、Class Wizardのメンバ変数でラジオ1のint変数を追加
*{{{UpdateData(FALSE)}}}で、メンバ変数の内容をコントロールに反映させる
*{{{UpdateData()}}}で、コントロールの内容から、メンバ変数を更新する
<<showtoc>>
!Cの場合
0.スレッド処理用に構造体を作る
<C++>
typedef struct{
	HANDLE hThread;	//スレッドハンドル
	HANDLE hExit;		//終了イベントハンドル
}sample_prm_t;
</C++>
1.スレッド処理関数を作る
<C++>
void WINAPI sb_sampleThread(LPVOID param)
{
	sample_prm_t *prm = (sample_prm_t *)param;
	BOOL loopFlag = 1;
	while ( loopFlag ){
		/* 終了イベントチェック */
		if ( WaitForSingleObject(prm->hExit,	/* 終了イベントのハンドル */
				1000		// 待ち時間(ミリ秒)  0のときは待ちなし
						// INFINITEのときは終了イベントがシグナル状態になるまで待つ */
			 ) == WAIT_OBJECT_0 ){
			/* 終了イベントがシグナル状態になったのでwhile(1){}を抜ける */
			break;
		}
	}
}
</C++>
2.スレッドを呼び出す処理を作る
<C++>
HANDLE sb_createSampleThread(HANDLE hExit, sample_prm_t *wp)
{
	DWORD		threadID;
	sample_prm_t	*wp;
	wp = &m_parameter;
	wp->hExit = hExit;
	/* スレッド作成 */
	wp->hThread = (HANDLE)_beginthreadex(
			NULL,
			0,
			(void *)sb_recvlogThread,
			(LPVOID)wwp,
			CREATE_SUSPENDED,
			&threadID);
	if ( wp->hThread == NULL ){
		free(wp);
		return (NULL);
	}
	return(wp->hThread);
}
</C++>
3.スレッドを呼び出す
<C++>
sample_prm_t m_parameter;
HANDLE hExit;
HANDLE hThreadBuf;
/* 終了イベント作成 */
hExit = CreateEvent(NULL,		/* セキュリティ属性  NULLでデフォルト */
			TRUE,		/* 手動リセット */
			FALSE,		/* 非シグナル状態 */
			NULL);		/* イベントオブジェクト名 */
if ( hExit == NULL ){
	//終了イベントに失敗したのでスレッドを走らせないように処理を記述すること
}
/* スレッド作成 */
hThreadBuf = sb_createSampleThread(hExit, &m_parameter);
if (hThreadBuf == NULL ){
	//スレッド作成に失敗
}
/* スレッド起動 */
ResumeThread(hThreadBuf);
/* スレッド終了待ち */
if ( WaitForMultipleObjects(1, &hThreadBuf, TRUE, 6000) == WAIT_TIMEOUT ){
	/* スレッド停止 */
	if ( WaitForSingleObject(hThreadBuf, 0) != WAIT_OBJECT_0 ){
		TerminateThread(hThreadBuf, 1);
	}
}
if ( hThreadBuf ){
	/* スレッドが起動していたら停止 */
	if ( WaitForSingleObject(hThreadBuf, 0) != WAIT_OBJECT_0 ){
		TerminateThread(hThreadBuf, 1);
	}
	CloseHandle(hThreadBuf);
	hThreadBuf = NULL;
}
if ( hExit ){
	CloseHandle(hExit);
	hExit = NULL;
}
</C++>
!C++の場合
ほとんどCの場合と同じだが、Win32APIが使えるならこんなのもいいかな
<C++>
HANDLE sb_CreateThread(sample_prm_t *pt, void *fn)
{
	DWORD  threadID;
	HANDLE hThread;

	/* スレッド作成 */
	hThread = CreateThread(
			NULL,               //スレッドのセキュリティ属性(NULL:デフォルト)
			0,                  //初期スレッド スタック サイズ(0:デフォルト)
			(LPTHREAD_START_ROUTINE)fn,//スレッド関数のアドレス
			(LPVOID)pt,         //新しいスレッドのための引数
			CREATE_SUSPENDED,   //作成後停止している
			&threadID);         //スレッドID
	if ( hThread == NULL ){
		return NULL;
	}

	return hThread;
}
</C++>
で、呼び出しはこうなる
<C++>
~~中略~~
hThreadBuf = sb_CreateThread(&m_parameter, sb_SampleThread);
~~中略~~
</C++>
!MFCの場合
1.~CWinThreadの派生クラスを作る
2.派生クラスにてRunをオーバーライドする
3.Run内に処理を書く
例
<C++>
int CXXXThread::Run{
	while(1){
		Sleep(500);		//スリープしないとたいへんなことになるからね
		if(/*終了条件*/)break;
	}
	return CWinThread::Run();
}

</C++>
4.これで処理部は完成。あとは呼び出す方法
 ~CWinThreadはコンストラクタがprotectedなので、普通に宣言しても生成されない
 よって~RUNTIME_CLASS()を使ってインスタンス化する
<C++>
	CRuntimeClass *pRuntime = RUNTIME_CLASS(CXXXThread);
	CXXXThread *pThread = (CXXXThread*)pRuntime->CreateObject();
	pThread->CreateThread(0, 0, NULL);
</C++>
5.これで起動は完了、で終了時はスレッドの終了と破棄を行う
<C++>
	//スレッド終了
	pThread->SuspendThread();
	pThread->Delete();
</C++>
<<forEachTiddler 
 where 'tiddler.title!="リンク総合"'
 sortBy 'tiddler.title'
 write '(index==0?"":"")
 +(index>0?(tiddler.tags.contains("Link")?"+++^["+ tiddler.title + "]\n<<tiddler \"" + tiddler.title + "\">" + ">\n===\n\n" :"")
 +"":"")'
>>
<<showtoc>>
!メイン
|!CPU|Core 2 Duo E6850|
|!マザー|Abit iX38 Quad GT|
|!VGA|Radeon HD 3850 x 2(Crossfire)|
|!メモリ|sanmax DDR2-1066 1GBx4(PC6400で稼働中。定格で動かす方法がわからんってどういうことさ)|
|!電源|Abee 750W|
|!ケース|Coolermaster 型番なんだっけ|
|!HDD|WD 1TB x 2|
|!液晶|[[H243Hbmid|http://www.sofmap.com/product_detail/exec/_/sku=11107598/-/gid=PM01100300/-/eVar3=VCSP]]|
|!mouse|Logitec MX518@500Hz|
|!keyboard|majestouch N-key rollover tenkeyless|
!サブ:
!自作キューブ
|!CPU|[[AthlonX2 5050e(45W)|http://www.coneco.net/PriceList/1081107029/order/MONEY/]]|
|!マザー|[[MSI K9A2GM-F V2|http://www.coneco.net/PriceList/1080305090/order/MONEY/]]|
|!VGA|{{{AMD 780G(Onboard)=RadeonHD3200}}}|
|!メモリ|[[GEIL PC6400 2Gx2|http://www.coneco.net/list_catemaker/01503050/R2VJTA==.html]]|
|!電源|[[Antec EARTHPOWER430|http://www.coneco.net/PriceList/1061121077/order/MONEY/]]|
|!ケース|[[UFO Cube-CL|http://www.coneco.net/PriceList/1070920046/order/MONEY/]]|
|!HDD+HDDファン|流用 WD 320G|
|>|!備考|
|>|電源が下部にあり、空気の流れが悪い。なのでHDDを冷却する機構を作る必要がある<<br>>CPUファンは高さ・横幅に余裕がないので注意。今回は[[SHURIKEN|http://www.coneco.net/PriceList.asp?COM_ID=1080112001]]を使う事にした。<<br>>このマザーに12cmファンをつける場合、横のケースファンに当たる可能性がある。測ってはいないが1.5cmほどしか余裕がない|

!Realtek HDオーディオドライバのインストールエラーについて
{{{0xE0000227}}}などと出てインストールできず、デバイスマネージャでは不明なデバイスかなんかが出てオーディオドライバーがない状態の、対策
簡単に概要を説明すると、マイクロソフト提供のHDオーディオ用ドライバが悪さをしていますよ、ということ
!!1.コントロールパネル→プログラムの追加と削除より 下記2点のプログラムが入っていれば削除
*{{{High Definition Audio Driver Package KB888111}}}
*{{{Realtek High Definition Audio Driver}}}
!!2.「システムの管理」を開き、該当ドライバを削除
*システムの管理:マイコンピュータを右クリック⇒「管理」
*デバイスマネージャ→システムデバイス→{{{Microsoft UAA Bus Driver for High Definition Audio}}}を右クリックして、無効にする。
!!3.再起動後、「システムの管理」をまた開き、先ほどのドライバを削除
*{{{Microsoft UAA Bus Driver for High Definition Audio}}}を削除する。
!!4.オーディオ用ドライバインストーラをダウンロードし、インストール
*[[RealtekのHP|http://www.realtek.com.tw/]]からDLしたものを用いる、または付属CDのドライバでも可能
!!5.再起動
完了です