Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2014 UnaMesa Association
<<tabs txtMagicToggle
Source "Source code of MagicToggle" [[AboutMagicToggleX##Source]]
Usage "Usage of MagicToggle" [[AboutMagicToggleX::Usage]]
Examples "Example of MagicToggle" [[AboutMagicToggleX##Examples]]
>>
/%
Usage: <<tiddler [[MagicToggleX##Usage]]>>
Examples: <<tiddler [[MagicToggleX##Examples]]>>
!Source
[[MagicToggleX]]
<<tiddler [[AboutMagicToggleX##Output]] with:{{
(function(){return store.getTiddlerText("MagicToggleX");})()
}}>>
!Examples
* Synatxes:
<<tiddler [[AboutMagicToggleX##Output]] with:{{
(function(){return store.getTiddlerText("MagicToggleX##Examples");})()
}}>>
* Samples
<<tiddler [[MagicToggleX##Examples]]>>
!Output
{{{
$1
}}}
!eof
%/
<<tabs txtMagicToggle
源碼 "Source code of MagicToggle" [[AboutMagicToggleX.zh-Hant##Source]]
使用方式 "Usage of MagicToggle" [[AboutMagicToggleX.zh-Hant::Usage]]
範例 "Example of MagicToggle" [[AboutMagicToggleX.zh-Hant##Examples]]
>>
/%
Usage: <<tiddler [[MagicToggleX##Usage.zh-Hant]]>>
Examples: <<tiddler [[MagicToggleX##Examples.zh-Hant]]>>
!Source
[[MagicToggleX]]
<<tiddler [[AboutMagicToggleX.zh-Hant##Output]] with:{{
(function(){return store.getTiddlerText("MagicToggleX");})()
}}>>
!Examples
* 語法:
<<tiddler [[AboutMagicToggleX.zh-Hant##Output]] with:{{
(function(){return store.getTiddlerText("MagicToggleX##Examples.zh-Hant");})()
}}>>
* 執行範例
<<tiddler [[MagicToggleX##Examples.zh-Hant]]>>
!Output
{{{
$1
}}}
!eof
%/
/*{{{*/
.accordionEffect2 .sliderButton {display:block; color:#fff; text-align:left; font-weight:bold; line-height:140%; border-top:solid 1px #bbb; border-left:solid 1px #bbb; border-right:solid 1px #888; border-bottom:solid 1px #888; background:#999; margin-left:-0.3em; padding:0 1px 1px 20px;}
.accordionEffect2 .sliderButton:hover {border-top:solid 1px #777; border-left:solid 1px #777; border-right:solid 1px #bbb; border-bottom:solid 1px #bbb; background:#888; padding:1px 0 0 21px;}
.accordionEffect2 .sliderPanel {z-index:200;}
/*}}}*/
/*{{{*/
/*Modified from AccordionEffect, CSS by oc ( http://b-oo-k.net/blog/ )*/
/*}}}*/
<html>
<script type="text/javascript" src="http://www.conduit.com/Api/ToolbarApi.aspx"></script>
<a id="hrefDownloadPage" href="http://$1.CommunityToolbars.com/exe">
<img id="miniBannerImage" style="border:0" src="http://translation.conduit.com/Resources/Images/TranslatedImages/a1cydijw.dtt633439433692656250.gif" alt=""/></a>
<script type="text/javascript">
</html>
/***
!Metadata:
|''Name:''|ArchivedTimeline|
|''Description:''|Timeline archived monthly.|
|''Version:''|0.7.1|
|''Date:''|Jan 25, 2009|
|''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.1|Jan 25, 2009|Corrected the link format of the list of tiddlers within achived timeline if the title of them included the character "''|''", reported by Eduard Wagner.|
|0.7.0|Jul 25, 2007|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:
***/
//{{{
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, archives, panel;
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) {
lastMonth = lastMonth || theMonth;
place.appendChild(document.createElement('hr'));
cookie = 'chktimeline'+(i++);
archives = this.formatString(this.monthFormat, lastMonth);
panel = config.macros.slider.createSlider(place,cookie,archives,this.tooltips + archives);
lastMonth = theMonth;
}
if(theDay != lastDay){
var ul = document.createElement("ul");
panel.appendChild(ul);
createTiddlyElement(ul,"li",null,"listTitle",tiddler[field].formatString(dateFormat));
lastDay = theDay;
}
createTiddlyElement(ul,"li",null,"listLink").appendChild(createTiddlyLink(place,tiddler.title,true));
}
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.zh-Hant
***/
//{{{
if (typeof config.macros.archivedTimeline != "undefined"){
merge(config.macros.archivedTimeline, {
tooltips: "歸檔順序: ",
orderBy: {modified: "修改日期", created: "建立日期"},
monthFormat: "YYYY年0MM月",
dateFormat: "YYYY年0MM月0DD日"
});
}
//}}}
!Decriptions of Params
|!Params |%0|%1|%2|%3|%4|%5|
|!Descriptions|title|url|selections|descriptions|rererence|tags|
!Lingos of command button
{{{
''text:'' Bookmarks
''tooltip:'' Bookmark this tiddlers to ...
''popupNone:'' There are no bookmark services
}}}
!List of Services
{{{
''Services:'' Del.icio.us,Digg,Google,Yahoo,Furl,HemiDemi,MyShare,Baidu,Youpus,Technorati
}}}
!Definition of Services
{{{
''HemiDemi:''<br/>[[HemiDemi|http://www.hemidemi.com/user_bookmark/new?title=%0&url=%1"es=%2&description=%3&via=%4&tag_string=%5]]
''MyShare:''<br/>[[MyShare|http://myshare.url.com.tw/index.php?func=newurl&from=mysharepop&url=%1&desc=%0&contents=%3]]
''Baidu:''<br/>[[Baidu|http://cang.baidu.com/do/add?iu=%1&it=%0&dc=%3]]
''Google:''<br/>[[Google|http://www.google.com/bookmarks/mark?op=add&title=%0&bkmk=%1&annotation=%3&labels=%5]]
''Yahoo:''<br/>[[Yahoo|http://tw.myweb2.search.yahoo.com/myresults/bookmarklet?t=%1&u=%0&d=%3&ei=UTF-8]]
''Del.icio.us:''<br/>[[Del.icio.us|http://del.icio.us/post?title=%0&url=%1¬es=%3&tags=%5]]
''Digg:''<br/>[[Digg|http://digg.com/submit?phase=2&url=%0&title=%1&bodytext=%3]]
''Technorati:''<br/>[[Technorati|http://technorati.com/faves?add=%1&title=%0]]
''Furl:''<br/>[[Furl|http://www.furl.net/storeIt.jsp?t=%0&u=%1&r=%4&c=%2&p=1]]
''Youpush:''<br/>[[Youpush|http://www.youpush.net/submit.php?url=%1]]
}}}
!參數說明
|!參數|%0|%1|%2|%3|%4|%5|
|!說明|標題|網址|selections|引述|rererence|標籤|
!介面與訊息
{{{
''text:'' 書籤
''tooltip:'' 新增書籤至所選之書籤服務
''popupNone:'' 無書籤服務書籤服務
}}}
!書籤服務定義
{{{
''Services:'' Del.icio.us,Digg,Google,Yahoo,Furl,HemiDemi,MyShare,PcHome,Baidu,Youpus,Technorati
}}}
!書籤服務網址
* Icon & Text
{{{
''HemiDemi:''<br/>[img[HemiDemi|images/bookmarks/hemidemi.jpg]] [[黑米書籤|http://www.hemidemi.com/user_bookmark/new?title=%0&url=%1"es=%2&description=%3&via=%4&tag_string=%5]]
''MyShare:''<br/>[img[MyShare|images/bookmarks/myshare.jpg]] [[智邦網路書籤|http://myshare.url.com.tw/index.php?func=newurl&from=mysharepop&url=%1&desc=%0&contents=%3]]
''PcHome:'' <br/>[img[PcHome|images/bookmarks/pchome.gif]] [[PcHome 網貼|http://search20.portal20.com.tw/x.jsp?f=1&t=%0&u=%1&n=%3&g=%5]]
''Baidu:''<br/>[img[Baidu|images/bookmarks/baidu.gif]] [[百度書籤|http://cang.baidu.com/do/add?iu=%1&it=%0&dc=%3]]
''Google:''<br/>[img[Google|images/bookmarks/google.jpg]] [[Google|http://www.google.com/bookmarks/mark?op=add&title=%0&bkmk=%1&annotation=%3&labels=%5]]
''Yahoo:''<br/>[img[Yahoo|images/bookmarks/yahoo.jpg]] [[雅虎奇摩|http://tw.myweb2.search.yahoo.com/myresults/bookmarklet?t=%1&u=%0&d=%3&ei=UTF-8]]
''Del.icio.us:''<br/>[img[Del.icio.us|images/bookmarks/delicious.jpg]] [[Del.icio.us|http://del.icio.us/post?title=%0&url=%1¬es=%3&tags=%5]]
''Digg:''<br/>[img[Digg|images/bookmarks/digg.jpg]] [[Digg|http://digg.com/submit?phase=2&url=%0&title=%1&bodytext=%3]]
''Technorati:''<br/>[img[Technorati|images/bookmarks/technorati.jpg]] [[Technorati|http://technorati.com/faves?add=%1&title=%0]]
''Furl:''<br/>[img[Furl|images/bookmarks/furl.jpg]] [[Furl|http://www.furl.net/storeIt.jsp?t=%0&u=%1&r=%4&c=%2&p=1]]
''Youpush:''<br/>[img[Youpush|images/bookmarks/yp.gif]] [[Youpush|http://www.youpush.net/submit.php?url=%1]]
}}}
/***
!Metadata:
|''Name:''|BookmarksCommand|
|''Description:''|Toolbar button for bookmarks services|
|''Version:''|1.1.2|
|''Date:''|May 20, 2008|
|''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]]|
|''~CoreVersion:''|2.4.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
!Usage:
*Manually add 'bookmarks' to parms of toolbar macro in ViewTemplate, if necessary..
*Add and/or modify the declarations of bookmark services predefined in 'BookmarkService.*'.
> add the name of services to 'Services' slice, each services seprated by a comma (,).
> add a slice named with sach service name, and the slice value is formed with the URLs of the services or.
!Revision History:
|''Version''|''Date''|''Note''|
|1.1.2|May 20, 2008|minor changes for TW 2.4.0|
|1.1.1|May 01, 2007|Improved RegExp of isPretyLink<br>Fixed query strings of Technorati<br>Added more default bookmarks services|
|1.1.0|Apr 22, 2007|Supported multi-lingo by using tiddler slice|
|1.0.1|Apr 20, 2007|Supported TiddlyWiki prety link markups and simple url form|
|1.0.0|Apr 19, 2007|Initial release|
!Code section:
***/
//{{{
if(!version.extensions.BookmarksCommand)
version.extensions.BookmarksCommand = {installed:true};
//#config.options.chkUsedSel = false;
config.commands.bookmarks = {
BookmarkServices: 'BookmarkServices',
bsDefs: "!Decriptions of Params\n|!Params |%0|%1|%2|%3|%4|%5|\n|!Descriptions|title|url|selections|descriptions|rererence|tags|\n!Lingos of command button\n{{{\n''text:'' Bookmarks\n''tooltip:'' Bookmark this tiddlers to ...\n''popupNone:'' There are no bookmark services\n}}}\n!List of Services\n{{{\n''Services:'' Del.icio.us,Digg,Google,Yahoo,Furl,HemiDemi,MyShare,Baidu,Youpus,Technorati\n}}}\n!Definition of Services\n{{{\n''HemiDemi:''<br/>[[HemiDemi|http://www.hemidemi.com/user_bookmark/new?title=%0&url=%1"es=%2&description=%3&via=%4&tag_string=%5]]\n''MyShare:''<br/>[[MyShare|http://myshare.url.com.tw/index.php?func=newurl&from=mysharepop&url=%1&desc=%0&contents=%3]]\n''Baidu:''<br/>[[Baidu|http://cang.baidu.com/do/add?iu=%1&it=%0&dc=%3]]\n''Google:''<br/>[[Google|http://www.google.com/bookmarks/mark?op=add&title=%0&bkmk=%1&annotation=%3&labels=%5]]\n''Yahoo:''<br/>[[Yahoo|http://tw.myweb2.search.yahoo.com/myresults/bookmarklet?t=%1&u=%0&d=%3&ei=UTF-8]]\n''Del.icio.us:''<br/>[[Del.icio.us|http://del.icio.us/post?title=%0&url=%1¬es=%3&tags=%5]]\n''Digg:''<br/>[[Digg|http://digg.com/submit?phase=2&url=%0&title=%1&bodytext=%3]]\n''Technorati:''<br/>[[Technorati|http://technorati.com/faves?add=%1&title=%0]]\n''Furl:''<br/>[[Furl|http://www.furl.net/storeIt.jsp?t=%0&u=%1&r=%4&c=%2&p=1]]\n''Youpush:''<br/>[[Youpush|http://www.youpush.net/submit.php?url=%1]]\n}}}",
text: "Bookmarks",
tooltip:"Bookmark this tiddler to ...",
popupNone: "There are no bookmark services",
type: 'popup',
replaceToolbar: function(text) {
if(text)
text = text.replace(/macro\=\'toolbar \[\[/g, 'macro\=\'toolbar bookmarks \[\[');
return text;
},
urlFormat: "<html><a href=\"%0\">%1</a><br/></html>",
imgFormat: "<img title=\"%1\" src=\"%0\"></img>",
isPretyLink: /\[[<>]?[Ii][Mm][Gg]\[|\[\[([^\]]+)\]\]/,
imgSuffix: "_IMG",
lingoNames: ['text', 'tooltip', 'popupNone']
};
config.commands.bookmarks.init = function(r) {
if (!config.options.txtLocale) {
config.options.txtLocale = config.locale ? config.locale : 'en';
}
var bs = this.BookmarkServices.replace(/\..*$/,'');
bs = bs + '.' + config.options.txtLocale;
if (!store.tiddlerExists(bs)){
var tiddler = store.createTiddler(bs);
store.setValue(tiddler,'text',this.bsDefs);
store.setValue(tiddler,'modifier','BookmarksCommand');
}
this.BookmarkServices = bs;
var lingo = store.getTiddlerSlices(this.BookmarkServices,this.lingoNames);
if (!lingo) return false;
for (i in lingo) {
this[i] = lingo[i];
}
this.addToolbar('ViewTemplate');
if(r) this.refreshUI(); // If BC works with other plugins, like as PopupTipsPlugin, to avoid refreshTiddler to be called multiple times.
};
config.commands.bookmarks.refreshUI = function() {
story.forEachTiddler(function(title){story.refreshTiddler(title,DEFAULT_VIEW_TEMPLATE,true);});
};
config.commands.bookmarks.addToolbar = function(v) {
if (store.tiddlerExists(v)){
var tiddler = store.getTiddler(v);
var text = tiddler.text;
store.setValue(tiddler,'text',this.replaceToolbar(text));
store.setValue(tiddler,'modifier','BookmarksCommand');
}
else {
if (store.isShadowTiddler(v))
config.shadowTiddlers[v] = this.replaceToolbar(config.shadowTiddlers[v]);
}
};
config.commands.bookmarks.handlePopup = function(popup,title)
{
var outputs={},imgSrc=null;
var s = store.getTiddlerSlice(this.BookmarkServices,'Services');
s=s?s.split(','):[];
var services = store.getTiddlerSlices(this.BookmarkServices,s);
for(var b in services) {
var sLists = config.commands.bookmarks.getLists(title);
outputs[b] = [null,null];
outputs[b][0] = services[b].format(sLists);
outputs[b][1] = store.getTiddlerSlice(this.BookmarkServices,b+this.imgSuffix);
}
var output='';
for(var b in outputs) {
output = outputs[b][0];
var match = this.isPretyLink.exec(output);
if (!match){
imgSrc = (typeof outputs[b][1] == 'undefined')?b:this.imgFormat.format([outputs[b][1],b]);
output = this.urlFormat.format([outputs[b][0],imgSrc]);
}
wikify(output,popup);
}
};
config.commands.bookmarks.getLists = function(title)
{
var t = encodeURIComponent(String.encodeTiddlyLink(title));
if(document.location.hash != t)
document.location.hash = t;
t = encodeURIComponent(document.title + ' -- ') + t;
var href = encodeURIComponent(document.location.href);
var isShadowed = store.isShadowTiddler(title) && !store.tiddlerExists(title)
var tiddler = store.getTiddler(title);
var sel = config.commands.bookmarks.getSel();
var desc = '';
if (tiddler && tiddler.isTagged('systemConfig')){
var isPlugin = true;
var p = getPluginInfo(tiddler);
desc = 'Author:' + p.Author + '-' + p.Description;
}
else
desc = isShadowed?config.shadowTiddlers[title]:tiddler.text
desc = config.options.chkUsedSel?sel:encodeURIComponent(desc);
var via = config.commands.bookmarks.getRef();
var tags = isShadowed?'':tiddler.tags.join(' ');
tags = encodeURIComponent('TiddlyWiki'+ (isPlugin?'Plugin ':' ') + tags);
return [t,href,sel,desc,via,tags];
};
config.commands.bookmarks.getSel = function(){
var sel = '';
if(window.getSelection) sel=window.getSelection();
if(document.getSelection) sel=document.getSelection();
if(document.selection) sel=document.selection.createRange().text;
return sel;
};
config.commands.bookmarks.getRef = function(){
var ref = '';
if(document.referrer) ref=document.referrer;
if(typeof(_ref)!='undefined') ref=_ref;
return ref;
};
//# If this plugin installed as js file, to ensure it would be started after TW core has been loaded.
var bsInterval = setInterval(function(){if(formatter) {clearInterval(bsInterval); config.commands.bookmarks.init(true);};},100);
//}}}
/***
!Metadata:
|''Name:''|Breadcrumbs2Plugin|
|''Description:''||
|''Version:''|1.5.0|
|''Date:''|May 29, 2008|
|''Source:''|http://sourceforge.net/project/showfiles.php?group_id=150646|
|''Author:''|Bram Chen (original: Alan Hecht)|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License]]|
|''~CoreVersion:''|2.4.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
!Revision History:
|''Version''|''Date''|''Note''|
|1.5.0|May 29, 2008|Runs compatibly with TW 2.4.0, using array method indexOf() instead of find() to seek breadcrumbs.<br>Fewer grobal variables and functions are used.|
|1.4.2|Feb 15, 2007|Runs compatibly with TW 2.2.0 (rev #1501+)|
|1.4.1|Aug 05, 2006|in restartHome(), check for valid crumbArea before setting style, by Eric|
|1.4.0|Aug 02, 2006|Fixed bug, the redefined onClickTiddlerLink_orig_breadCrumbs works incorrectly on IE|
|1.3.0|Jul 20, 2006|Runs compatibly with TW 2.1.0 (rev #403+)|
|1.2.0|Feb 07, 2006|change globle array breadCrumbs to config.breadCrumbs by Eric's suggestion|
|1.1.0|Feb 04, 2006|JSLint checked|
|1.0.0|Feb 01, 2006|TW2 ready and code Cleaned-up|
!Code section:
***/
//{{{
if(!version.extensions.breadCrumb2)
version.extensions.breadCrumb2 = {installed:true};
window.onClickTiddlerLink_orig_breadCrumbs = window.onClickTiddlerLink;
window.onClickTiddlerLink = function(e){
if (!e) {var e = window.event;}
window.onClickTiddlerLink_orig_breadCrumbs(e);
BreadCrumb.addCrumb(e);
return false;
};
var BreadCrumb = {
breadCrumbs: []
}
BreadCrumb.addCrumb = function(e){
if (!e) {var e = window.event;}
var thisCrumb = "[[" + resolveTarget(e).getAttribute("tiddlyLink") + "]]";
var ind = this.breadCrumbs.indexOf(thisCrumb);
if(ind == -1){
this.breadCrumbs.push(thisCrumb);
}
else{
this.breadCrumbs.length = ind++;
}
this.refreshCrumbs();
return false;
}
BreadCrumb.refreshCrumbs = function(){
var crumbArea = document.getElementById("breadCrumbs");
if (!crumbArea) {
crumbArea = document.createElement("div");
crumbArea.id = "breadCrumbs";
crumbArea.style.visibility = "hidden";
var targetArea = document.getElementById("tiddlerDisplay");
targetArea = targetArea || document.getElementById("storyDisplay");
targetArea.parentNode.insertBefore(crumbArea,targetArea);
}
crumbArea.style.visibility = "visible";
removeChildren(crumbArea);
createTiddlyButton(crumbArea,"Home",null,BreadCrumb.restartHome);
wikify(" || " + this.breadCrumbs.join(' > '),crumbArea);
}
BreadCrumb.restartHome = function(){
story.closeAllTiddlers();
restart();
this.breadCrumbs = [];
var crumbArea = document.getElementById("breadCrumbs");
if (crumbArea) // ELS: added check to make sure crumbArea exists
crumbArea.style.visibility = "hidden";
}
//}}}
/*{{{*/
table.calendarWrapper {border-collapse:collapse; border:2px solid #c6dbff;}
.calendarWrapper td {border-collapse:collapse; border:1px solid #c6dbff; text-align:center;margin:0; padding:0 0.05em;}
table.calendar {border-collapse:collapse; border:0;}
.calendar tbody, .calendar th, .calendar td, .calendar tr {width:1.5em;border:0; text-align:center; font-size:1em; padding:0 0.1em;}
.calendar th {color:#000; background-color:#c6dbff;}
#sidebarOptions .calendar td {font-size:0.96em; margin:0; padding:0;}
#sidebarTabs .calendar td, #mainMenu .calendar td {padding:0 0.25em;}.calendar .naviBar select {border:0;}
.calendar .today a {padding:0; border:1px solid blue;}
.calendar .weekend {color:#c6dbff;}
/*.calendar .hasChanged {font-family:bold; background-color:#fe8; color:darkblue;}*/
.calendar .hasChanged {text-decoration: underline;}
.calendar .holiday {font-weight:bold; font-size:1.06em; color:red;}
.datePopup {font-size:1.2em;background:black; z-index:99; filter:alpha(opacity=90);-moz-opacity:0.9;opacity: 0.9;}
.datePopup .button {color:lightgray;}
.datePopup .isCreated {color:orange;}
.datePopup .isExcluded {color:gray;}
/*}}}*/
<<tiddler [[CalendarToday##Output]] with: {{
(function(){
var _now=new Date(), _day = _now.getDay();
setStylesheet(store.getTiddlerText('CalendarToday##Style')+'.today .evenRow {background-color: '+(_day == 0 || _day == 6 ? 'red' : 'lightblue') + ';}' , 'today');
return _now.formatString(store.getTiddlerText('CalendarToday##Layout.'+config.locale));
})();
}}>>
/%
!Metadata:
|''Name:''|CalendarToday|
|''Version:''|1.0.2|
|''Date:''|May 29, 2008|
|''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]]|
|''~CoreVersion:''|2.4.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
!Usage
{{{
# Import or copy & paste this tiddler into your TiddlyWiki
# Use <<tiddler CalendarToday>> to get the calendar
}}}
!Style
/*{{{*/
.today table {font-size:1.2em; background-color:#fff; border:1px solid lightgray; border-top:5px solid blue; border-right:3px solid lightgray;}
.today tr, .today th, .today td {border:0px;}
.today .evenRow {font-size:0.7em; color:white;}
.today th {font-size:0.9em; background-color:#fff; color:blue;}
.today tr, .today td {margin:0; padding:0 0 0.2em 0;}
.today td a{font-size:1.5em; font-weight:bold; background-color:#fff; color:gold;}
/*}}}*/
!Layout.en
{{today{
|!mmm|!|!YYYY|
|>|>| [[DD|mmm 0DD, YYYY]] |
|>|>| DDD |
}}}
!Layout.zh-Hant
{{today{
|!YYYY年|!|!MMM|
|>|>| [[DD|YYYY年0MM月0DD日]] |
|>|>| 星期ddd |
}}}
!Output
$1
!Eof
%/
!DarkBlueColorPalette
{{{
Background: #012
Foreground: #9ab
PrimaryPale: #357
PrimaryLight: #745
PrimaryMid: #8ab
PrimaryDark: #678
SecondaryPale: #234
SecondaryLight: #345
SecondaryMid: #456
SecondaryDark: #68b
TertiaryPale: #012
TertiaryLight: #455
TertiaryMid: #468
TertiaryDark: #256
Error: red
HeaderPrimaryLight: #024
}}}
/***
! CovertUnicodeToUTF8 for Markup* chunks
***/
//{{{
function updateMarkupBlock(s,blockName,tiddlerName)
{
return s.replaceChunk(
"<!--%0-START-->".format([blockName]),
"<!--%0-END-->".format([blockName]),
"\n" + convertUnicodeToUTF8(store.getRecursiveTiddlerText(tiddlerName,"")) + "\n");
}
//}}}
!DarkBlueColorPalette
{{{
Background: #012
Foreground: #9ab
PrimaryPale: #357
PrimaryLight: #745
PrimaryMid: #8ab
PrimaryDark: #678
SecondaryPale: #234
SecondaryLight: #345
SecondaryMid: #456
SecondaryDark: #68b
TertiaryPale: #012
TertiaryLight: #455
TertiaryMid: #468
TertiaryDark: #256
Error: red
HeaderPrimaryLight: #024
}}}
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::HeaderPrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<span id='topMenu' refresh='content' tiddler='MainMenu'></span>
</div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<div id='siteFooter' refresh='content' tiddler='SiteFooter'></div>
<!--}}}-->
/***
|Name:|DarkBlue|
|Source:|http://ptw.sourceforge.net/|
|Autho:|Bram Chen|
|Version:|1.1.0|
|Date:|May 15, 2007|
|Requires:|DarkBlueColorPalette, DarkBluePageTemplate|
|CoreVersion:|2.0.0|
|License:|[[Creative Commons Attribution-ShareAlike 2.5 License]]|
!Colors
***/
/*{{{*/
body {background:gray;}
#contentWrapper{background:[[ColorPalette::Background]];}
#sidebar {background:[[ColorPalette::Background]]}
#displayArea {background:[[ColorPalette::Background]];}
#siteFooter {background:[[ColorPalette::SecondaryLight]];}
.tagClear{clear:none;}
/*}}}*/
/***
!Layouts
***/
/*{{{*/
#backstageButton {right: 8em;}
#contentWrapper { margin: 0 auto; width: 80%; padding:0;}
#sidebar {position:static; margin:1em .5em 0 0;float:right;}
#sidebarTabs .tabContents {width:95%;}
#displayArea{margin:1em 17em 1em 1em; text-align: left;}
.viewer, .editor {width:96%;}
.annotation {width:90%;}
#siteFooter {text-align:center; clear: both; padding: 2em; height: 3em;}
/*}}}*/
/***
!Topmenu
Modified form Saq Imtiaz's [[Monochrome|http://tiddlythemes.com/#Monochrome]]
***/
/*{{{*/
#topMenu br {display:none;}
#topMenu a, #topMenu .tiddlyLink, #topMenu .button {margin:0em; font-size:1.2em; color:[[ColorPalette::HeaderPrimaryLight]]; background:transparent; padding:0.5em 1em 0.5em 1em; border:none; border-right: 1px solid [[ColorPalette::SecondaryDark]];float:left;}
#topMenu {border-left: 1px solid [[ColorPalette::SecondaryDark]]; float:left;margin:0;}
#topMenu a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]];}
/*}}}*/
DateFormat: [[MMM 0DD YYYY am hh12:0mm]]
shortDateFormat: [[MMM 0DD YYYY]]
DateFormat: [[MMM 0DD YYYY am hh12:0mm]]
shortDateFormat: [[MMM 0DD YYYY]]
DateFormat: [[YYYY年0MM月0DD日 am hh12:0mm]]
shortDateFormat: [[YYYY年0MM月0DD日]]
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></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'></span></div>
<div class='tagClear'></div>
<!--}}}-->
|>|!<<tips Settings Locale>>|
|!<<tips Plugin Locale>> |<<tips PopupTipsPlugin Info>>|
|!<<tips Config Locale>> |<<tips TipsConfig Info>>.<<tips locale>>|
|!<<tips Definitions Locale>>|<<tips TipsDefs Info>>.<<tips locale>>|
|>|!<<tips 'Locale_driven' Locale>>|
|!<<tips Locale Locale>> |<<option txtLocale>> <<tiddler RefreshLocale>>|
|!<<tips Examples Locale>> |<<tips Using_Alias>>|
|~|<<tips Notation Locale>>: <<tips 1 Note>>|
|~|<<tips GettingStarted Info>>|
<<tips SimpleClock Alias>>
!Rss
*<<tips GoogleNews>>
!Atom
*<<tips TiddlyWikiGroup>>
*<<tips GentooBugzilla>>
[[vChartAddon]]
[[MagicToggleX|AboutMagicToggleX]]
[[Simple Clock|ExampleSimpleClock]]
[[PopupTips|ExamplePopupTips]]
[[TiddlyCalendar|TiddlyCalendar.en.html]]
[[圖表精靈|vChartAddon]]
[[顯示隱藏|AboutMagicToggleX.zh-Hant]]
[[簡易時鐘|ExampleSimpleClock]]
[[多用途提示|ExamplePopupTips]]
[[行事曆|TiddlyCalendar.en.html]]
plugins/NestedSlidersPlugin.js
plugins/SearchOptionsPlugin.js
plugins/SearchOptionsPlugin.zh-Hant.js
[[Plugins|Plugins]]
[[JS Files|ExtList]]
[[Scripts]]
[[Themes]]
[[套件|Plugins]]
[[JS 套件|ExtList]]
[[增益集|Scripts]]
[[樣式|Themes]]
<<rssfeed asHtml http://sourceforge.net/export/rss2_projfiles.php?group_id=150646>>
//{{{
TiddlyWiki.prototype.slicesRE = /(?:[\'\/]*~?([\.\w]+)[\'\/]*\:[\'\/]*\s*(.*?)\s*$)|(?:\|[\'\/]*~?([\.\w]+)\:?[\'\/]*\|\s*(.*?)\s*\|)/gm;
// @internal
TiddlyWiki.prototype.calcAllSlices = function(title)
{
var slices = {};
var text = this.getTiddlerText(title,"");
this.slicesRE.lastIndex = 0;
do {
var m = this.slicesRE.exec(text);
if(m) {
if(m[1])
slices[m[1]] = m[2];
else
slices[m[3]] = m[4];
}
} while(m);
return slices;
};
//}}}
<<rssfeed asHtml "http://bugs.gentoo.org/buglist.cgi?chfield=[Bug creation]&chfieldfrom=2008-11-26+22:18&chfieldto=2008-11-27+22:18&query_format=advanced&order=Last+Changed&remaction=&title=Bug List&ctype=atom">>
<<tips SelectLanguage Locale>>: <<tiddler RefreshLocale>>
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 的空白範本之前,請先修改以下預設文章:
* SiteTitle 及 SiteSubtitle:網站的標題和副標題,顯示於頁面上方<br />(在儲存變更後,將顯示於瀏覽器視窗的標題列)。
* MainMenu:主選單(通常在頁面左側)。
* DefaultTiddlers:內含一些文章的標題,可於載入TiddlyWiki 後的預設開啟。
請輸入您的大名,作為所建立/ 編輯的文章署名:<<option txtUserName>>
<html><a href="http://fusion.google.com/add?source=atgs&moduleurl=http%3A//ptw.sourceforge.net/ptwe-gadget.xml"><img src="http://gmodules.com/ig/images/plus_google.gif" border="0" alt="Add to Google"></a></html>
<html><a style="font-weight: bold; font-size:115%; " href="javascript:
story.closeAllTiddlers();
story.displayTiddlers(null,store.getTiddlerText('DefaultTiddlers').readBracketedList());">
$1</a></html>
/***
!Metadata:
|''Name:''|InstallTheme|
|''Description:''|Automatically install specified theme pack and backup the old|
|''Version:''|1.0.1|
|''Date:''|May 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 2.5 License]]|
|''~CoreVersion:''|2.2.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
!Usage:
|{{{<<installTheme themeName>>}}}|
!Revision History:
|''Version''|''Date''|''Note''|
|1.0.1|May 25, 2007|Removed tagging with themeName+title for StyleStyle, PageTemplate, ColorPalette|
|1.0.0|May 14, 2007|Initial release|
!Code section:
***/
//{{{
config.macros.installTheme = {
label: "Install Theme: ",
tooltip:"Automatically install specified theme pack.",
copyOf: "Copy of ",
themeName: "YourThemeName",
themeTitles: 'StyleSheet,PageTemplate,ColorPalette'
};
config.macros.installTheme.handler = function(place,macroName,params){
var themeName = params[0]?params[0]:this.themeName;
var titles = params[1]?params[1]:this.themeTitles;
var btn = createTiddlyButton(place,this.label+themeName,this.tooltip,this.doInstall,"installThemeBtn");
btn.setAttribute("titles",titles);
btn.setAttribute("themeName",themeName);
btn.setAttribute("copyOf",this.copyOf);
};
config.macros.installTheme.doInstall = function(e){
if(!e) var e = window.event;
var t = this.getAttribute("titles");
var titles = t.split(',');
var themeName = this.getAttribute("themeName");
var modifier = themeName +'InstallScript';
// var tag = themeName+'Theme';
var copyOf = this.getAttribute("copyOf");
store.suspendNotifications();
for (var i=0;i<titles.length; i++){
var title = titles[i];
var newTitle = copyOf+title;
var newTheme = themeName+title;
if (store.tiddlerExists(title)){
var copyTiddler = store.saveTiddler(title,newTitle);
var tiddler = store.getTiddler(title);
store.setValue(tiddler,'modifier',modifier);
};
//var text = config.shadowTiddlers[newTheme];
var text = '[['+newTheme+']]';
if (title=='ColorPalette'){
text = store.getTiddlerText(newTheme);
if(!text)
text = config.shadowTiddlers[title];
}
var tiddler = store.saveTiddler(title,title,text,modifier,new Date());
}
store.resumeNotifications();
refreshAll();
return false;
};
//}}}
<<installTheme DarkBlue>>
<<tag systemConfig>>
<<tag ExtList>>
<<tag DarkBlueTheme>>
<<slider2 accordionEffect2
systemConfig SystemConfig "Plugins loaded from tiddlers tagged with systemConfig"
ExtList ExtList "Plugins loaded from external js files"
DarkBlueTheme Themes ""
>>
/***
|''Name:''|LoadExtPlugin|
|''Description:''|LoadExtPlugin allows you to load external extensions from the file lists (named .js) within those tiddlers taged with "ExtList".|
|''Version:''|1.8.0|
|''Date:''|Apr 30, 2007|
|''Source:''|http://www.sourceforge.net/projects/ptw/|
|''Author:''|BramChen (bram.chen (at) gmail (dot) com)|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License]]|
|''CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
+++!^[Revision History:]
v1.8.0 (Apr 30 2007)
*config.macros.loadExt support to load singgle external script by using {{{<<loadExt '/pathto/scriptfile.js'>>}}}
*Ensure LoadExtPlugin loading itself and/or loadling scripts after core has been loaded with external core js and itself|
v1.7.2 (Sep 28 2006)
*Fixed bugs on IE
v1.7.1 (30 Aug 2006)
* Changed rule check of ExtList
v1.7.0 (20 Jul 2006)
* Runs compatibly with TW 2.1.0 (rev #403+)
v1.6.0 (13 Jul 2006)
* Fixed bugs in refreshCode and config.macros.loadExt.loadScripts on IE
* Runs compatibly with TW 2.1.0 (rev #359+)
v1.5.2 (21 Jun 2006)
* minor changes for XHTML compliant
v1.5.1 (26 Feb 2006)
* JSLint checked
v1.5.0 (02 Feb 2006)
* add new function config.macros.loadExt.LoadScripts(), keep all variables to be local, thanks Udo.
* Fixed several missing variable declarations
v1.4.0 (20 Jan 2006)
* refreshCode() improved.
v1.3.0 (14 Jan 2006)
* strip startup error massage for IE
v1.2.0 (13 Jan 2006)
* TiddlyWiki version 2.0.0 or above required.
* refreshCode() improved.
v1.1.0 (10 Jan 2006)
* To make the extensions list handling more robust, thanks Udo.
* Fix bugs for multi-tiddlers tagged with ExtList
v1.0.0 (07 Jan 2006)
* Combine the RefreshExt code and LoadExtPlugin, and also make TW 1.2 to be backward compatible, thanks Udo.
* Globle function refreshCode() added, and reserve the refreshExt macro.
* Fix a minor bug for variable "scriptfile".
v0.3.0 (29 Dec 2005)
* macro refreshExt modified to refresh formatter
v0.2.0 (24 Nov 2005)
* macro refreshExt modified for TW 1.2.39 beta 2 and above
v0.1.0 (25 Sep 2005)
* initial release
===
!''Code section:''
***/
//{{{
version.extensions.loadExt = {major: 1, minor: 8, revision: 0,
date: new Date("Apr 30, 2007"),
name: "LoadExtPlugin",
type: "Plugin",
author: "BramChen",
source: "http://sourceforge.net/project/showfiles.php?group_id=150646"
};
config.macros.loadExt = {};
config.macros.loadExt.handler = function(place,macroName,params){
if (params[0])
this.loadScriptFile(params[0]);
else
this.loadScripts();
};
config.macros.loadExt.loadScriptFile = function(scriptfile){
var scriptfile = scriptfile.trim();
if (scriptfile.length < 2 || scriptfile.substr(0,2) == "//" || scriptfile.indexOf(".js") == -1){
return;
}
// displayMessage("loaded: "+ scriptfile);
var n = document.createElement("script");
n.type = "text/javascript";
n.src = scriptfile;
document.getElementsByTagName("head")[0].appendChild(n);
};
config.macros.loadExt.loadScripts = function() {
var extTag = "ExtList";
var str = ""; var scripts = [];
var tiddlers = store.getTaggedTiddlers(extTag);
for(var s=0 ; s<tiddlers.length; s++){
str += store.getRecursiveTiddlerText(tiddlers[s].title)+"\n";
}
scripts = str.replace(/[;\r]/mg,"\n").split("\n");
for (var i=0; i<scripts.length-1; i++) {
this.loadScriptFile(scripts[i]);
}
if (config.browser.isIE){
setTimeout(function(){window.refreshCode();return false;},500);
// var lerInterval = setInterval(function(){if(formatter) {clearInterval(lerInterval); window.refreshCode();};},100);
}
else {
var theCodes = "//<![CDATA[\nwindow.refreshCode();//]]>";
n = document.createElement("script");
n.type = "text/javascript";
n.appendChild(document.createTextNode(theCodes));
document.getElementsByTagName("head")[0].appendChild(n);
this.refreshCodeInserted = true;
}
};
window.refreshCode = function (){
formatter = new Formatter(config.formatters);
story.forEachTiddler(function(title,e){story.refreshTiddler(title,DEFAULT_VIEW_TEMPLATE,true);});
refreshDisplay();
return false;
}
// setTimeout(function(){config.macros.loadExt.loadScripts();return false;},500);
loadextpluginInterval = setInterval(function(){
if(window.formatter) {
clearInterval(loadextpluginInterval);
if(!config.macros.loadExt.refreshCodeInserted)
config.macros.loadExt.loadScripts();
}
},100);
//}}}
/***
!Metadata:
|''Name:''|MagicToggle|
|''Description:''|Show/ Hide specific element, support multilingual, also it is easy to be extended and localized,, all changes of elements are affected on-fly|
|''Version:''|2.1|
|''Date:''|Nov 25, 2008|
|''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.2.0|
|''Browser:''|Firefox 1.5+|
!Usage
#Import [[MagicToggle]]
#Customization
## add/edit config tiddler with json format,<br /> examples: [[MagicToggleConfig.en]] and [[MagicToggleConfig.zh-Hant]] (for Traditional Chinese).
## add/edit customized elements and attributes to config tiddlers
#Syntax:
{{{
<<magicToggle "ElementIdentifier">>
}}}
!Examples
<<tiddler [[MagicToggle##ExampleOutput]] with:{{var r = '';
for (i in MagicToggle.attr) r += '\n*<'+'<'+'magicToggle ' + i + '>'+'>';
}}>>{{hello{
:Hello world!
}}}/%
!ExampleOutput
Syntax:
{{{
$1
}}}
Result:
$1
!End of Example%/
{{magicToggleAttr{
!Attr
//{{{
({
"header": {
"default": true,
"hide": {
"label": "Show Header",
"styles": ".header {display: none;} #displayArea {top: 1em;} #mainMenu {top:1em;} #sidebar {top: 1em;}"},
"show": {
"label": "Hide Header",
"styles": ".header {display: block;} #displayArea {top: clear;} #mainMenu {top:clear;} #sidebar {top: clear;}"}
},
"mainMenu": {
"default": true,
"hide": {
"label": "Show MainMenu",
"styles": "#mainMenu {display: none;} #displayArea {margin-left: 1em;}"},
"show": {
"label": "Hide MainMenu",
"styles": "#mainMenu {display: block;} #displayArea {margin-left: 14em;}"}
},
"sidebar": {
"default": true,
"hide": {
"label": "Show Sidebar",
"styles": "#sidebar {display: none;} #displayArea {margin-right: 1em;}"},
"show": {
"label": "Hide Sidebar",
"styles": "#sidebar {display: block;} #displayArea {margin-right: 17em;}"}
},
"sidebarTabs": {
"default": true,
"hide": {
"label": "Show SidebarTabs",
"styles": "#sidebarTabs {display: none;}"},
"show": {
"label": "Hide SidebarTabs",
"styles": "#sidebarTabs {display: block;}"}
},
"magicToggleAttr": {
"default": false,
"hide": {
"label": "Show Attributes",
"tooltip": "Show default attributes",
"styles": ".magicToggleAttr {display: none;}"},
"show": {
"label": "Hide Attributes",
"tooltip": "Hide default attributes",
"styles": ".magicToggleAttr {display: block;}"}
},
"hello": {// sample of customized element
"default": false,
"hide": {
"label": "+",
"tooltip": "Show hello",
"styles": ".hello {display: none;}"
},
"show": {
"label": "-",
"tooltip": "Hide hello",
"styles": ".hello {display: block;}"
}
}
})
//}}}
!End of default attributes
}}}
!Code
***/
//{{{
MagicToggle = {};
MagicToggle.config = "MagicToggleConfig.";
MagicToggle.getAttr = function(src){
try {
var r=eval(store.getTiddlerText(src));
}
catch(ex){
displayMessage(src + " must be structured with json format");
};
return r || {};
};
MagicToggle.attr = MagicToggle.getAttr("MagicToggle##Attr");
MagicToggle.setToggle = function(elmId,cookie){
var _tLocale=MagicToggle.getAttr(MagicToggle.config+config.locale);
if (config.options[cookie] === undefined){
if (_tLocale && _tLocale[elmId] && _tLocale[elmId]["default"] !== undefined)
config.options[cookie] = _tLocale[elmId]["default"];
else
config.options[cookie] = MagicToggle.attr[elmId]["default"];
}
var s = (config.options[cookie] ? "show" : "hide");
if (MagicToggle.attr[elmId] === undefined && _tLocale)
merge(MagicToggle.attr,_tLocale);
else {
if ( _tLocale && _tLocale[elmId] && _tLocale[elmId][s])
merge(MagicToggle.attr[elmId][s],_tLocale[elmId][s]);
}
setStylesheet(MagicToggle.attr[elmId][s]["styles"],("toggle"+elmId));
var label = MagicToggle.attr[elmId][s]["label"];
var tooltip = MagicToggle.attr[elmId][s]["tooltip"] || label;
return [label,tooltip];
};
config.macros.magicToggle = {
init: function(){
for (elmId in MagicToggle.attr){
MagicToggle.setToggle(elmId,"chkShow"+elmId);
}
}
};
config.macros.magicToggle.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
var elmId = params[0];
var cookie = "chkShow"+elmId;
var btnAttrs = MagicToggle.setToggle(elmId,cookie);
var onClick = function(ev){
var e = ev || window.event;
var btn = this;
config.options[cookie] = !config.options[cookie];
saveOptionCookie(cookie);
var btnAttrs = MagicToggle.setToggle(elmId,cookie);
btn.innerHTML = btnAttrs[0];
btn.setAttribute("title",btnAttrs[1]);
stopEvent(e);
return false;
};
var toggleBtn = createTiddlyButton(place,btnAttrs[0],btnAttrs[1],onClick,"button toggleButton");
};
//}}}
//{{{
({
"header": {
"default": true,
"hide": {
"label": "Show Header",
"styles": ".header {display: none;} #displayArea {top: 1em;} #mainMenu {top:1em;} #sidebar {top: 1em;}"},
"show": {
"label": "Hide Header",
"styles": ".header {display: block;} #displayArea {top: clear;} #mainMenu {top:clear;} #sidebar {top: clear;}"}
},
"mainMenu": {
"default": false,
"hide": {
"label": "Show MainMenu",
"styles": "#mainMenu {display: none;} #displayArea {margin-left: 1em;}"},
"show": {
"label": "Hide MainMenu",
"styles": "#mainMenu {display: block;} #displayArea {margin-left: 14em;}"}
},
"sidebar": {
"default": true,
"hide": {
"label": "Show Sidebar",
"styles": "#sidebar {display: none;} #displayArea {margin-right: 1em;}"},
"show": {
"label": "Hide Sidebar",
"styles": "#sidebar {display: block;} #displayArea {margin-right: 17em;}"}
},
"sidebarTabs": {
"default": true,
"hide": {
"label": "Show SidebarTabs",
"styles": "#sidebarTabs {display: none;}"},
"show": {
"label": "Hide SidebarTabs",
"styles": "#sidebarTabs {display: block;}"}
},
"magicToggleAttr": {// sample of customized element
"default": false,
"hide": {
"label": "Show Attributes",
"tooltip": "Show default attributes",
"styles": ".magicToggleAttr {display: none;}"},
"show": {
"label": "Hide Attributes",
"tooltip": "Hide default attributes",
"styles": ".magicToggleAttr {display: block;}"}
},
"hello": {
"default": false,
"hide": {
"label": "+",
"tooltip": "Show hello",
"styles": ".hello {display: none;}"},
"show": {
"label": "-",
"tooltip": "Hide hello",
"styles": ".hello {display: block;}"}
}
})
//}}}
/***
!Example
<<magicToggle hello>>
{{hello{
:Hello world!
}}}
***/
//{{{
({
"header": {
"hide": {"label": "顯示頁面標題"}, "show": {"label": "隱藏頁面標題"}
},
"mainMenu": {
"default": false,
"hide": {"label": "顯示主選單"}, "show": {"label": "隱藏主選單"}
},
"sidebar": {
"hide": {"label": "顯示右側"}, "show": {"label": "隱藏右側"}
},
"sidebarTabs": {
"hide": {"label": "顯示右側頁籤"}, "show": {"label": "隱藏右側頁籤"}
},
"magicToggleAttr": {// 自訂範例
"default": false,
"hide": {
"label": "顯示設定",
"tooltip": "顯示預設元素之屬性",
"styles": ".magicToggleAttr {display: none;}"},
"show": {
"label": "隱藏設定",
"tooltip": "隱藏預設元素之屬性",
"styles": ".magicToggleAttr {display: block;}"}
},
"hello": {
"default": false,
"hide": {
"label": "+",
"tooltip": "顯示問候",
"styles": ".hello {display: none;}"},
"show": {
"label": "-",
"tooltip": "隱藏問候",
"styles": ".hello {display: block;}"}
}
})
//}}}
/***
!自訂範例
<<magicToggle hello>>
{{hello{
:嗨,您好!
}}}
***/
<<tiddler _dummy with:{{
if (window._toggle === undefined) window._toggle = function(elmId,cookie){
var _t =window.eval(store.getTiddlerText("MagicToggleX##Elements.en"));
if (_t[elmId] === undefined) return [null,null];
var _tLocale=window.eval(store.getTiddlerText("MagicToggleX##Elements."+config.locale));
var cookie = "chkShow"+elmId;
if (config.options[cookie] === undefined){
if (_tLocale && _tLocale[elmId] && _tLocale[elmId]["default"] !== undefined)
config.options[cookie] = _tLocale[elmId]["default"];
else
config.options[cookie] = _t[elmId]["default"];
}
var s = (config.options[cookie] ? "show" : "hide");
if (_t[elmId] === undefined && _tLocale)
merge(_t,_tLocale);
else {
if ( _tLocale && _tLocale[elmId] && _tLocale[elmId][s])
merge(_t[elmId][s],_tLocale[elmId][s]);
}
setStylesheet(_t[elmId][s]['styles'],("toggle"+elmId));
var label = _t[elmId][s]["label"];
var tooltip = _t[elmId][s]["tooltip"] || label;
return [label,tooltip];
};
window._onClick = function(ev,elmId){
var ev = ev || window.event;
var btn = this;
var cookie = "chkShow"+elmId;
config.options[cookie] = !config.options[cookie];
saveOptionCookie(cookie);
var btnAttrs = window._toggle(elmId);
btn.innerHTML = btnAttrs[0];
btn.title = btnAttrs[1];
return false;
};
}}>><<tiddler [[MagicToggleX##Button]] with:{{'$1'}} {{window._toggle('$1')[0]}} {{window._toggle('$1')[1]}}>>/%
!Button
<html><a class="button" href="javascript:;" title='$3' onClick="window._onClick.call(this,null,'$1')">$2</a></html>
!Metadata:
|''Name:''|MagicToggleX|
|''Description:''|Show/ Hide specific element, No extra pulgin is required, fewer codes but more elements could be toggled, multilingual, also it is easy to be extended and localized|
|''Version:''|2.0|
|''Date:''|Jun 25, 2008|
|''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.2.0|
|''Browser:''|Firefox 1.5+|
!Usage
#Import MagicToggleX (or youcan choose importing and using the macro edtion [[MagicToggle]])
#Syntax:
{{{
<<tiddler [[MagicToggleX]] with: {{"ElementIdentifier"}}>>
}}}
!Examples
<<tiddler [[MagicToggleX]] with:{{"header"}}>>
<<tiddler [[MagicToggleX]] with:{{"mainMenu"}}>>
<<tiddler [[MagicToggleX]] with:{{"sidebar"}}>>
<<tiddler [[MagicToggleX]] with:{{"sidebarTabs"}}>>
!Usage.zh-Hant
#導入 MagicToggleX (或者也可選擇導入使用另一個巨集版本 [[MagicToggle]])
#語法:
{{{
<<tiddler [[MagicToggleX]] with:{{"ElementIdentifier"}}>>
}}}
!Examples.zh-Hant
<<tiddler [[MagicToggleX]] with:{{"header"}}>>
<<tiddler [[MagicToggleX]] with:{{"mainMenu"}}>>
<<tiddler [[MagicToggleX]] with:{{"sidebar"}}>>
<<tiddler [[MagicToggleX]] with:{{"sidebarTabs"}}>>
!Elements.en
({
"header": {
"default": true,
"hide": {
"label": "Show Header",
"styles": ".header {display: none;} #displayArea {top: 1em;} #mainMenu {top:1em;} #sidebar {top: 1em;}"},
"show": {
"label": "Hide Header",
"styles": ".header {display: block;} #displayArea {top: clear;} #mainMenu {top:clear;} #sidebar {top: clear;}"}
},
"mainMenu": {
"default": true,
"hide": {
"label": "Show MainMenu",
"styles": "#mainMenu {display: none;} #displayArea {margin-left: 1em;}"},
"show": {
"label": "Hide MainMenu",
"styles": "#mainMenu {display: block;} #displayArea {margin-left: 14em;}"}
},
"sidebar": {
"default": true,
"hide": {
"label": "Show Sidebar",
"styles": "#sidebar {display: none;} #displayArea {margin-right: 1em;}"},
"show": {
"label": "Hide Sidebar",
"styles": "#sidebar {display: block;} #displayArea {margin-right: 17em;}"}
},
"sidebarTabs": {
"default": true,
"hide": {
"label": "Show SidebarTabs",
"styles": "#sidebarTabs {display: none;}"},
"show": {
"label": "Hide SidebarTabs",
"styles": "#sidebarTabs {display: block;}"}
},
"magicToggleAttr": {// sample of customized element
"default": false,
"hide": {
"label": "Show Attributes",
"tooltip": "Show default attributes",
"styles": ".magicToggleAttr {display: none;}"},
"show": {
"label": "Hide Attributes",
"tooltip": "Hide default attributes",
"styles": ".magicToggleAttr {display: block;}"}
}
})
!Elements.zh-Hant
({
"header": {
"hide": {"label": "顯示頁面標題"},
"show": {"label": "隱藏頁面標題"}
},
"mainMenu": {
"hide": {"label": "顯示主選單"},
"show": {"label": "隱藏主選單"}
},
"sidebar": {
"hide": {"label": "顯示右側"},
"show": {"label": "隱藏右側"}
},
"sidebarTabs": {
"hide": {"label": "顯示右側頁籤"},
"show": {"label": "隱藏右側頁籤"}
}
})
!eof
%/
<<tips Home Alias>>
<<tips ExtensionLists Info Menu>>
<<tips Examples Info Menu>>
/***
!Metadata:
|''Name:''|ManageTiddlersPlugin|
|''Description:''|List tiddlers with specific tag and let you manage the multiple selected tiddlers.|
|''Version:''|1.0.1|
|''Date:''|Apr 15, 2018|
|''Source:''|http://www.sourceforge.net/projects/ptw/|
|''Author:''|BramChen (bram.chen (at) gmail (dot) com)|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
!Usage:
{{{
<<manageTiddlers
[tags:TagName]
[listOnly:yes|no]
[sortField:[+|-]TiddlerField]
>>
}}}
!Revision History:
|''Version''|''Date''|''Note''|
|1.0.1|Apr 15, 2018|Improved sortField|
|1.0.0|Nov 23, 2006|Initial release|
!Code section:
***/
//{{{
version.extensions.manageTiddlers = {major: 1, minor: 0, revision: 0,
date: new Date("Nov 23, 2006"),
name: "manageTiddlers",
type: "Plugin",
author: "BramChen",
source: "http://sourceforge.net/project/showfiles.php?group_id=150646"
};
config.options.txtManageTiddlersTag = "";
config.macros.manageTiddlers = {
confirmDeleteText: "確認是否刪除此文章:\n\n%0",
listViewTemplate: {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
{name: 'Title', field: 'title', tiddlerLink: 'title', title: "標題", type: 'TiddlerLink'},
{name: 'Author', field: 'modifier', title: '作者', type: 'String'},
// {name: 'Created', field: 'created', title: '建立日期', type: 'Date', dateFormat: 'YYYY年0MM月0DD日,0hh:0mm'},
{name: 'Snippet', field: 'text', title: '文章摘要', type: 'Snippet'},
{name: 'Modified', field: 'modified', title: '修改日期', type: 'Date', dateFormat: 'YYYY年0MM月0DD日,0hh:0mm'},
{name: 'Tags', field: 'tags', title: "標籤", type: 'Tags'}
],
rowClasses: [
],
actions: [
{caption: "執行選項....", name: ''},
{caption: "檢視文章", name: 'view'},
{caption: "編輯文章", name: 'edit'},
{caption: "刪除文章", name: 'delete'},
{caption: "QuickEdit", name: 'QuickEdit'}
]}
}
config.macros.manageTiddlers.handler = function(place,macroName,params,wikifier,paramString,tiddler){
var e = createTiddlyElement(place,"div");
e.setAttribute("refresh","macro");
e.setAttribute("macroName","manageTiddlers");
e.setAttribute("params",paramString);
this.refresh(e,paramString);
}
config.macros.manageTiddlers.refresh = function(place,params){
removeChildren(place);
params = params.parseParams("anon",null,true,false,true);
var tagged = (typeof params[0] == "undefined")?" ":params[0]["tags"];
var sortField = (params[0]["sortField"])?params[0]["sortField"].toString() : "title";
var tiddlers = (tagged == " ")?store.getNoTaggedTiddlers(sortField):store.getTaggedTiddlers(tagged,sortField);
ListView.create(place,tiddlers,config.macros.manageTiddlers.listViewTemplate,config.macros.manageTiddlers.onSelectCommand);
if ((params[0]["listOnly"]=="yes"))
place.getElementsByTagName("select")[0].style.display='none';
}
config.macros.manageTiddlers.onSelectCommand = function(listView,command,rowNames){
var lists = findRelated(listView,"manageTiddlers","className","parentNode");
switch(command)
{
case "view":
story.displayTiddlers(null,rowNames);
break;
case "edit":
story.displayTiddlers(null,rowNames,DEFAULT_EDIT_TEMPLATE);
break;
case "delete":
if(rowNames.length > 0 && confirm(config.macros.manageTiddlers.confirmDeleteText.format([rowNames.join(", ")])))
{
for(t=0; t<rowNames.length; t++)
{
store.removeTiddler(rowNames[t]);
story.closeTiddler(rowNames[t],true,false);
}
}
break;
case "quickEdit":
//Waiting ...
break;
}
}
// Add columnTypes, "Snipper", of ListView
ListView.columnTypes.Snippet = {
createHeader: function(place,columnTemplate,col)
{
createTiddlyText(place,columnTemplate.title);
},
createItem: function(place,listObject,field,columnTemplate,col,row)
{
var v = listObject[field];
if(v != undefined)
createTiddlyText(place,v.substr(0,40));
}
};
// Add a method getNoTaggedTiddlers to "TiddlyWiki"
TiddlyWiki.prototype.getNoTaggedTiddlers = function(sortField)
{
var results = [];
this.forEachTiddler(function (title,tiddler) {
if(tiddler.tags.length==0)
results.push(tiddler);
});
if(!sortField)
sortField = "title";
return this.sortTiddlers(results,sortField);
}
//}}}
<!--{{{-->
<meta name="Keywords" content="TiddlyWiki plugins wiki KM 維基 知識管理" />
<meta name="Description" content="TiddlyWiki plugins" />
<link rel='alternate' type='application/rss+xml' title='RSS' href='ptwe.xml' />
<!-- Syntax highlighter -->
<link rel="stylesheet" type="text/css" href="common/syntaxhighlighter/SyntaxHighlighter.css" />
<!-- Splash Screen -->
<div id="splashScreen" style="position:absolute; margin-top:10em; margin-left:18em; width:20em; padding-left:7em; line-height:5em; border:3px yellow; solid; color:blue; background:lightyellow;fona-size:3em;">
<img src="images/loading02.gif" style="vertical-align:middle;padding:6px"/>
Please wait for loading ...
</div>
<!-- Visifire -->
<script type="text/javascript" src="common/visifire/Visifire.js"></script>
<!--}}}-->
http://ptw.sf.net/VisifireChart.en.html
Type the text for 'New Tiddler'
/***
!Metadata:
|''Name:''|PopupTipsPlugin|
|''Description:''|Display tips and alias from a pre-defineded tiddler|
|''Version:''|1.0.5|
|''Date:''|May 20, 2008|
|''Source:''|http://sourceforge.net/project/showfiles.php?group_id=150646|
|''Author:''|Bram Chen|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License]]|
|''~CoreVersion:''|2.4.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
!Examples
|>|!<<tips Settings>>|
|!<<tips Plugin>> |<<tips PopupTipsPlugin Info>>|
|!<<tips Config>> |<<tips TipsConfig Info>>.<<tips locale>>|
|!<<tips Definitions>>|<<tips TipsDefs Info>>.<<tips locale>>|
|>|!<<tips 'Locale_driven' Alias>>|
|!<<tips Locale>> |<<option txtLocale>> <<tiddler RefreshLocale>>|
|!<<tips Examples>> |<<tips Using_Alias>>|
|~|<<tips Notation>>: <<tips 1 Note>>|
|~|<<tips GettingStarted Info>>|
!Revision History:
|''Version''|''Date''|''Note''|
|1.0.4|May 20, 2008|Clean up codes and minor changes for TW 2.4.0|
|1.0.4|Oct 29, 2007|Let popup offsets of 'Menu' to be different from others|
|1.0.3|May 15, 2007|Improved config.macros.tips.refreshLocale for refreshing backstage|
|1.0.2|Apr 20, 2007|<html>minor changes:<ol><li>change 'TipsLocale' to 'Locale'</li><li>change popup panel width '0.75em' to '0.5em', and left offset '4' to '8'</li></ol></html>|
|1.0.1|Mar 27, 2007|Fixed bug under IE|
|1.0.0|Mar 14, 2007|<html>Initial release:<ol><li>Modified from SaqImtiaz's InfoPlugin,<br/>merged macros def, info and note into one macro named tips.</li><li>Added features, drop-down menu and muti-definitions for locales</li></ol></html>|
!Code section:
***/
//{{{
if (!config.options.txtLocale) {
config.options.txtLocale = config.locale ? config.locale : 'en';
saveOptionCookie('txtLocale');
}
Popup.showTips = function(offset){
if(!offset) var offset = {x:0, y:0};
var curr = this.stack[this.stack.length-1];
var rootLeft = findPosX(curr.root);
var rootTop = findPosY(curr.root);
var rootHeight = curr.root.offsetHeight;
var popupLeft = rootLeft + offset.x;
var popupTop = rootTop + rootHeight + offset.y;
var winWidth = findWindowWidth();
var w=winWidth*0.5;
if(curr.popup.offsetWidth > w)
curr.popup.style.width = w + "px";
var popupWidth = curr.popup.offsetWidth;
if(popupLeft + popupWidth > winWidth){
popupLeft = rootLeft - popupWidth - offset.x;
popupLeft = popupLeft<0?0:popupLeft;
}
var winHeight = findWindowHeight();
var h = winHeight*0.5;
if(curr.popup.offsetHeight > h)
curr.popup.style.height = h + "px";
var popupHeight = curr.popup.offsetHeight;
if(popupTop + popupHeight > winHeight){
popupTop = rootTop - popupHeight - offset.y;
popupTop = popupTop<0?0:popupTop;
}
curr.popup.style.left = popupLeft + "px";
curr.popup.style.top = popupTop + "px";
curr.popup.style.visibility = "visible";
curr.popup.style.display = "block";
curr.popup.style.overflow = "auto";
addClass(curr.root,"highlight");
};
config.macros.tips = {
configTiddler: "TipsConfig.",
defTips: "TipsDefs",
defTypes: ["Info","Note","Menu"],
defFormats: {Info:'%0', Note:'{{help{^^%0^^}}}', Menu:'%0'},
defStyle: "TipsStyle"
};
config.macros.tips.refreshLocale = function(){
refreshPageTemplate('PageTemplate');
if(!readOnly){
removeChildren(document.getElementById("backstageButton"));
removeChildren(document.getElementById("backstageToolbar"));
backstage.init();
}
story.forEachTiddler(function(title,e){story.refreshTiddler(title,DEFAULT_VIEW_TEMPLATE,true);});
};
config.macros.tips.showTips = function(e){
if(!e) var e = window.event;
if(!this.tipsName) return false;
var popup = Popup.create(this,"span","popupTips");
// var popup = Popup.create(this,"span","tips"+this.tipsClass );
if(this.tips) wikify(this.tips,popup);
var offset = (this.tipsClass == "Menu")?{x:0,y:4}:{x:8,y:4};
Popup.showTips(offset);
e.cancelBubble = true;
if(e.stopPropagation) e.stopPropagation();
return false;
};
//config.macros.tips.removeTips = Popup.remove;
config.macros.tips.handler = function(place,macroName,params,wikifier,paramString,tiddler){
var configTiddler = this.configTiddler + (config.options.txtLocale?config.options.txtLocale:config.locale);
if (!store.tiddlerExists(configTiddler)) configTiddler = this.configTiddler+'en';
var tipsDefs = store.getTiddlerSlice(configTiddler,this.defTips);
tipsDefs = tipsDefs?tipsDefs:this.defTips;
var tipsStyle = store.getTiddlerSlice(configTiddler,this.defStyle);
tipsStyle = tipsStyle?tipsStyle:this.defStyle;
var tipsFormats = store.getTiddlerSlices(configTiddler,this.defTypes);
tipsFormats = tipsFormats?tipsFormats:this.defFormats;
var tipsName = params[0]?params[0]:null;
var tips = store.getTiddlerSlice(tipsDefs,tipsName);
if (!tips){
wikify(tipsName,place);
return false;
}
var theType = params[1]?params[1]:'Alias';
var tipsNameLocale = store.getTiddlerSlice(tipsDefs,tipsName + '_label');
var theClass = params[2]?params[2]:theType;
var wrapper = createTiddlyElement(place,"span",null,"tips"+theClass);
wrapper.tips = tips;
wrapper.tipsName = tipsNameLocale ? tipsNameLocale : tipsFormats[theType];
wrapper.tipsClass = theClass;
wrapper.onmouseover= this.showTips;
// wrapper.onmouseout= this.removeTips;
if (wrapper.tipsName){
wikify(wrapper.tipsName.format([tipsName]),wrapper);
} else{
var aliasWrapper = createTiddlyElement(wrapper,"span",null,null);
wikify(tips, aliasWrapper);
}
};
config.macros.refreshLocale = {
template: '[[%0.%1]]',
tiddlers: ['DateFormat']
};
config.macros.refreshLocale.onClickRefresh = function(e){
if (!e) var e = window.event;
var locale = this.value;
config.options.txtLocale = locale;
saveOptionCookie('txtLocale');
var locale_ui = 'locale.'+locale;
locale_ui = store.getTiddlerText(locale_ui);
if (locale_ui)
window.eval(locale_ui);
config.macros.refreshLocale.tiddler(locale);
config.macros.tips.refreshLocale();
return false;
}
config.macros.refreshLocale.tiddler = function(locale){
for (var i=0; i<this.tiddlers.length; i++){
t = this.tiddlers[i];
var text = store.getTiddlerText(t+'.'+locale);
if (text)
config.shadowTiddlers[t] = text;
}
};
config.macros.refreshLocale.handler = function(place,macroName,params,wikifier,paramString,tiddler){
var locales = config.shadowTiddlers["TipsLocales"];
if (locales) {
var options = [], n = 0, c = null;
for (var i=0; i<locales.length; i++){
var defTips = config.macros.tips.defTips + '.' + locales[i];
if (store.tiddlerExists(defTips) || store.isShadowTiddler(defTips)) {
var c = store.getTiddlerSlice(defTips,locales[i].replace("-","_") + '_label');
c = c ? c : locales[i];
options.push({caption:c, name: locales[i]});
}
}
var sel=createTiddlyDropDown(place,this.onClickRefresh,options,config.options.txtLocale);
} else {
config.macros.tips.refreshLocale();
}
};
config.shadowTiddlers[config.macros.tips.configTiddler+'en'] = "|{{bigblue{__Setting__}}}|c\n|!Name|!Tips|\n|TipsDefs:|TipsDefs.en|\n|TipsStyle:|TipsStyle|\n|Note:|{{help{^^%0^^}}}|\n|Info:|%0|\n";
config.shadowTiddlers[config.macros.tips.defTips+'.en'] = "{{{\nlocale: en\nPopupTipsPlugin: <<tiddler PopupTipsPlugin>>\nTipsConfig: <<tiddler TipsConfig.en>>\nTipsDefs: [[TipsDefs.en]] contains all of the tips definitions and it's specified in [[TipsConfig.en]].\nUsing_Alias: @@Alias@@:__Uses the tiddler slice form to define the tips__.\n1: {{bigblue{''Show a popup tips as mouse hovers.''}}}\nGettingStarted: <<tiddler GettingStarted>>\n}}}";
config.shadowTiddlers[config.macros.tips.defStyle] = '/*{{{*/\n.popupTips {position:absolute; visibility:hidden; padding:0.5em; border:2px solid [[ColorPalette::PrimaryPale]]; background:#cff; color:[[ColorPalette::Foreground]]; z-index:300; filter:alpha(opacity=90);-moz-opacity:0.9;opacity: 0.9;}\n\n.tipsNote {position:relative; border:none; background:[[ColorPalette::Background]]; color:[[ColorPalette::Error]]; cursor:help;}\n\n.tipsInfo {position:relative; background:#cff; color:[[ColorPalette::Foreground]];}\n\n.tipsMenu {position:relative; padding:0 0.1em 0 0.1em; border:1px solid [[ColorPalette::PrimaryPale]]; background:[[ColorPalette::PrimaryMid]];\n color:[[ColorPalette::Background]]; font-size: 1.2em;}\n.tipsMenu:hover {background:[[ColorPalette::PrimaryPale]]; color:[[ColorPalette::Background]]; font-weight: bold;}\n\n.bigblue {font-size: 1.2em;color:darkblue}\n.help {cursor:help;}\n/*}}}*/';
config.shadowTiddlers.StyleSheet += '\n[['+config.macros.tips.defStyle+']]';
config.shadowTiddlers["TipsLocales"] = ['en', 'zh-Hant', 'zh-Hans'];
config.shadowTiddlers["RefreshLocale"] = "<<refreshLocale>>";
//}}}
/***
!PopupTips and BookmarksCommand co-worked
***/
//{{{
if (config.commands.bookmarks) {
config.macros.tips.refreshLocale = function(){
config.commands.bookmarks.init();
refreshPageTemplate('PageTemplate');
if(!readOnly){
removeChildren(document.getElementById("backstageButton"));
removeChildren(document.getElementById("backstageToolbar"));
backstage.init();
}
story.forEachTiddler(function(title,e){story.refreshTiddler(title,DEFAULT_VIEW_TEMPLATE,true);});
}
};
//}}}
<<list filter [tag[scripts]]>>
/***
!Metadata:
|''Name:''|SimpleClockPlugin|
|''Description:''||
|''Version:''|1.0.0|
|''Date:''|Apr 16, 2007|
|''Source:''|http://sourceforge.net/project/showfiles.php?group_id=150646|
|''Author:''|BramChen (bram.chen (at) gmail (dot) com)|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License]]|
|''~CoreVersion:''|2.2.0|
|''Browser:''|Firefox 1.5+,IE6,Opera9|
!Usage:
{{{
<<simpleclock scFormat simpleClock>>
}}}
!Revision History:
|''Version''|''Date''|''Note''|
|1.0.0|Apr 16, 2007|Initial release|
!Code section:
***/
//{{{
version.extensions.simpleclock = {major: 1, minor: 0, revision: 0, date: new Date("Apr 16, 2007")};
if (typeof ptwAddons == "undefined") ptwAddons = {};
merge(ptwAddons, {
simpleClock:{
scFormat:"YYYY-0MM-0DD 0hh:0mm:0ss",
scName: "simpleClock",
scRefresh: function (wrapper,scFormat){
var now = new Date();
wrapper.innerHTML = now.formatString(scFormat);
return false;
}
}
});
config.macros.simpleclock = {};
config.macros.simpleclock.handler = function(place,macroName,params){
var scFormat = params[0]?params[0]:ptwAddons.simpleClock.scFormat;
var scName = params[1]?params[1]:ptwAddons.simpleClock.scName;
var wrapper = createTiddlyElement(place,'span',scName,scName);
var scInterval = setInterval(function(){ptwAddons.simpleClock.scRefresh(wrapper,scFormat);},1000);
}
//}}}
<<tips SiteFooter Alias>>
Designed by Bam Chen, powered by [[TiddlyWik|http://www.tiddlywiki.com]] <<version>><br>licensed under [[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]][img[Creative Commons Attribution-ShareAlike 3.0 License|http://i.creativecommons.org/l/by-sa/3.0/88x31.png][http://creativecommons.org/licenses/by-sa/3.0/]]
網站由 Bam Chen 設計,授權依循 [[姓名標示-相同方式分享 3.0|http://creativecommons.org/licenses/by-sa/3.0/deed.zh_TW]][img[Creative Commons Attribution-ShareAlike 3.0 License|http://i.creativecommons.org/l/by-sa/3.0/88x31.png][http://creativecommons.org/licenses/by-sa/3.0/]]<br>網頁引擎採用 [[TiddlyWik|http://www.tiddlywiki.com]] <<version>>
http://ptw.sourceforge.net/ptwe.html
/***
!Metadata:
|''Name:''|Slider2Plugin|
|''Description:''||
|''Version:''|1.5.2|
|''Date:''|Mar 27, 2007|
|''Source:''|http://www.sourceforge.net/projects/ptw/|
|''Author:''|BramChen (bram.chen (at) gmail (dot) com)|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
!Usage:
Manually add ''[[AccordionEffectStyle2]]'' or customized {{{[[YourSliderStyles]]}}} to StyleSheet if it's necessary.
{{{
<<slider2 sliderClass1
tiddlerTitle1 sliderTitle1 toolsip1
tiddlerTitle2 sliderTitle2 toolsip2
....>>
and/ or
<<slider2 sliderClass2
tiddlerTitle11 sliderTitle11 toolsip11
tiddlerTitle12 sliderTitle12 toolsip12
...
buttonClass:'buttonClassName'>>
}}}
*Parameters descriptions:
<<<
#''sliderClasses'' - the name of slider set and also the className of the set, it could be assigned different styles for each slider set.<br>The param ''buttonClass: //buttonClassName//'' need to be used together.
#''tiddlerTitles'' - the title of tiddler to include in the slider
#''sliderTitletitles ''- text of the slider
#''toolsips'' - tooltip text of the slider
#''buttonClass:''//'buttonClassName'// - a named param, default is //sliderButton// if it's omitted assigning a class name to slider button, for example, <br>as the first param is 'accordionEffect'<br>and 'the last param value is ''buttonClass:'''button'<br>then the original oc's AccordionEffectStyle is used.
<<<
!Revision History:
|''Version''|''Date''|''Note''|
|1.5.2|Mar 27, 2007|Fixed bugs under IE|
|1.5.1|Mar 24, 2007|Fixed bugs of customized buttonClass, and typos in AccordionEffectStyle2 and Usgaes section|
|1.5.0|Mar 22, 2007|<html><ol><li>Added feature: ''slider set'' (like 'tab' macro) by using the first param as grouping className but thus it's ''not compatible with previous verions''.</li><li>Included oc's ''AccordionEffect'' but a small bug fixed.</li><li>Added a extra named param: buttonClass</li></ol></html>|
|1.0.1|Mar 20, 2007|Added animation collapse suggested by oc|
|1.0.0|Mar 18, 2007|Initial release|
!Code section:
***/
//{{{
config.macros.slider2 = {
buttonClass: "sliderButton",
lastOpenedSlider: {},
expandTimeout: null
};
config.macros.slider2.onClickSlider = function(e){
if (!e) var e = window.event;
var n = this.nextSibling;
var isOpen = n.style.display != "none";
var nodes = this.parentNode.childNodes;
for(var i=0; i<nodes.length; i++){
if(nodes[i].title && nodes[i].title != this.title){
if(nodes[i].nextSibling.className = "sliderPanel"){
if(config.macros.slider2.lastOpenedSlider[this.parentNode.className] == nodes[i].title){
if(config.options.chkAnimate)
anim.startAnimating(new Slider(nodes[i].nextSibling,false,null,"none"));
else
nodes[i].nextSibling.style.display = "none";
}
}
}
}
if (config.options.chkAnimate){
if (config.macros.slider2.expandTimeout)
clearTimeout(config.macros.slider2.expandTimeout);
config.macros.slider2.expandTimeout = setTimeout(function(){anim.startAnimating(new Slider(n,!isOpen,null,"none"));},250);
// anim.startAnimating(new Slider(n,!isOpen,null,"none"));
}
else
n.style.display = isOpen ? "none" : "block";
config.macros.slider2.lastOpenedSlider[this.parentNode.className] = isOpen ? "" : this.title;
return false;
};
config.macros.slider2.createSlider = function(place,title,tooltip,buttonClass){
var btn = createTiddlyButton(place,title,tooltip,this.onClickSlider,buttonClass);
var panel = createTiddlyElement(place,"div",null,"sliderPanel",null);
panel.style.display = "none";
return panel;
};
config.macros.slider2.handler = function(place,macroName,params,wikifier,paramString,tiddler){
params = paramString.parseParams("anon",null,true,false,true);
var buttonClass = (typeof params[0]['buttonClass'] == 'undefined')? this.buttonClass : params[0]['buttonClass'];
if (params[1] && params[1].name == "anon"){
if (params[1].name.length < 4){
wikify('@@Slider2 params error!@@',place);
return false;
}
}
var p = params[0]['anon'];
var sliderset = createTiddlyElement(place,"div",null,p[0],null);
var numSliders = (params.length-1)/3-1;
for (var t=0;t<numSliders;t++){
var content = p[t*3+1];
var label = p[t*3+2];
var prompt = p[t*3+3];
var panel = this.createSlider(sliderset,label,prompt,buttonClass);
panel.setAttribute("refresh","content");
panel.setAttribute("tiddler",content);
panel.style.display = "none";
var text = store.getTiddlerText(content);
if(text)
wikify(text,panel,null,store.getTiddler(content));
}
};
config.shadowTiddlers["AccordionEffectStyle2"] = "/*{{{*/\n.accordionEffect2 .sliderButton {display:block; color:#fff; text-align:left; font-weight:bold; line-height:140%; border-top:solid 1px #bbb; border-left:solid 1px #bbb; border-right:solid 1px #888; border-bottom:solid 1px #888; background:#999; margin-left:-0.3em; padding:0 1px 1px 20px;}\n.accordionEffect2 .sliderButton:hover {border-top:solid 1px #777; border-left:solid 1px #777; border-right:solid 1px #bbb; border-bottom:solid 1px #bbb; background:#888; padding:1px 0 0 21px;}\n/*}}}*/\n/*{{{*/\n/*Modified from AccordionEffect, CSS by oc ( http://b-oo-k.net/blog/ )*/\n/*}}}*/";
config.shadowTiddlers["StyleSheet"] += "\n[[AccordionEffectStyle2]]";
//}}}
[[StyleSheetLocale]]
[[DarkBlueStyleSheet]]
[[TipsStyle]]
[[AccordionEffectStyle2]]
[[CalendarStyle]]
/*{{{*/
body {width:100%;} //fixed bug on Opera
#sidebarOptions {padding-top:1.3em;}
/*}}}*/
<<tCalendar lastModified>>
<<tiddler [[TiddlersBubble##Init]]>>
<<tiddler [[TiddlersBubble##generateDataString]]>>
<<tiddler [[vChartAddon##Render]] with:"TiddlersBubble.XML" "tiddlersBubble" "500" "300" "bubble.callback">>
/%
!Init
<<tiddler __dummy with:{{
//if (!TiddlerBubble) {
TiddlersBubble = function(chartXML, chartFmt, dataPointsFmt){
// parsms=[Width, Height,Theme,BorderBrush,TitleText,LegendEntryMargin,LabelMargin,DataSeriesLegendText]
this.params=[500, 300, "Theme3", "Gray", "Tiddlers Stats", 5, 5, "2008"];
this.callback=null;
this.dateFmt="YYYY-0MM-0DD";
this.chartXML = chartXML || "TiddlersBubble.XML";
this.chartFmt = chartFmt || "TiddlersBubble##ChartFmt";
this.dataPointsFmt = dataPointsFmt || "TiddlersBubble##DataPointsFmt";
this.tiddlers = null;
return this;
};
TiddlersBubble.prototype.hashTiddlers = function(){
var tiddlers = {};
store.forEachTiddler(function(title, tiddler){
var modified = tiddler.modified.convertToLocalYYYYMMDDHHMM().substr(0,8);
var created = tiddler.created.convertToLocalYYYYMMDDHHMM().substr(0,8);
var isNew = (tiddler.modified == tiddler.created);
var m = tiddler.modified.formatString("YYYY-0MM-0DD");
if (!tiddlers[m])
tiddlers[m]=[];
tiddlers[m].push({title:tiddler.title, modified:modified, tags:tiddler.tags, isNew:isNew});
});
return tiddlers;
};
//}
}}>>
!generateDataString
<<tiddler _dummy with:{{
var dataPoints = [];
window.bubble=new TiddlersBubble();
bubble.tiddlers = bubble.hashTiddlers();
bubble.callback=function(args){
var me=bubble;
var chart = args[0];
chart.Series[0].MouseLeftButtonDown= function(e){
var tiddlers=me.tiddlers[e.AxisXLabel], t=e.AxisXLabel+"\n-------------------------";
for(var i=0; i<tiddlers.length; i++)
t+="\n" + (tiddlers[i].isNew?"* ":" ") + tiddlers[i].title;
e.ToolTipText=t;
}
chart.Series[0].MouseLeave= function(e) {
e.ToolTipText="Modified: #YValue, Created: #ZValue " ;
}
};
for (var d in bubble.tiddlers){
var tiddlers = bubble.tiddlers[d];
var params = bubble.params;
for(var i =0,n=0; i<tiddlers.length; i++){
if (tiddlers[i].isNew) n++;
}
dataPoints.push(store.getTiddlerText(bubble.dataPointsFmt).format([d,tiddlers.length,n]));
}
dataPoints.sort(function(a,b) {return a > b ? -1 : (a == b ? 0 : +1);});
params.push(dataPoints.join("\n"));
config.shadowTiddlers[bubble.chartXML] = store.getTiddlerText(bubble.chartFmt).format(params);
}}>>
!ChartFmt
<!--{{{-->
<vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"
Width="%0" Height="%1" Theme="%2" BorderBrush="%3">
<vc:Chart.Background>
<LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1" >
<GradientStop Color="#000000" Offset="0"/>
<GradientStop Color="#5d5d5d" Offset="0.6"/>
<GradientStop Color="#ffffff" Offset="1"/>
</LinearGradientBrush>
</vc:Chart.Background>
<vc:Chart.Titles>
<vc:Title Text="%4" FontSize="18" FontColor="blue"/>
</vc:Chart.Titles>
<vc:Chart.Legends>
<vc:Legend EntryMargin="%5" LabelMargin="%6"/>
</vc:Chart.Legends>
<vc:Chart.AxesX>
<vc:Axis Title="Midified Date"/>
</vc:Chart.AxesX>
<vc:Chart.AxesY>
<vc:Axis Title="Numbers of Modified Tiddles"/>
</vc:Chart.AxesY>
<vc:Chart.Series>
<vc:DataSeries LegendText="%7" RenderAs="Bubble" ToolTipText="Modified: #YValue, Created: #ZValue" >
<vc:DataSeries.DataPoints>
%8
</vc:DataSeries.DataPoints>
</vc:DataSeries>
</vc:Chart.Series>
</vc:Chart>
<!--}}}-->
!DataPointsFmt
<vc:DataPoint AxisXLabel="%0" YValue="%1" ZValue="%2"/>
!end
%/
/***
!Metadata:
|''Name:''|TiddlyCalendar|
|''Description:''|Tiddlers Calendar and Date picker|
|''Version:''|1.0.0|
|''Date:''|Nov 21, 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]]|
|''~CoreVersion:''|2.2.3|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
|''Optional''|DatePlugin|
!Usage:
{{{<<tCalendar [year [month [count]]]>>}}}
{{{<<tCalendar [last [n] | next [n] {year(s) | month(s)}]>>}}}
eg,
{{{<<tCalendar>>}}},
{{{<<tCalendar 2007 10 3>>}}},
{{{<<tCalendar thisyear>>}}},
{{{<<tCalendar last year>>}}},
{{{<<tCalendar next 4 months>>}}}
{{{<<tCalendar lastModified>>}}}
!Revision History:
|''Version''|''Date''|''Note''|
|1.0.1|Dec 20, 2007|Added parameter 'lastModified' control for showing the month calendar including the last modified tiddler|
|1.0.0|Nov 21, 2007|Initial release|
!Code section:
***/
//{{{
version.extensions.tCalendar = {major: 1, minor: 0, revision: 0, date: new Date("Nov 21, 200")};
//# Calendar object
function Calendar()
{
this.styles = Calendar.styles;
this.callback = {
fn: null,
fnEnable: false,
option: null,
params: {date:null, title:null, celldate:null, cellClass:null, dateFmt:null}
};
return this;
};
Calendar.locale = 'en';
Calendar[Calendar.locale] = {
dates: {
days: ["Su", "M", "Tu", "W", "Th", "F", "Sa"],
yearFmt: "YYYY",
monthFmt: "mmm YYYY",
dateFmt: "MMM DD, YYYY",
longHolidayFmt: "0DD/0MM/YYYY",
shortHolidayFmt: "0DD/0MM",
startOfWeek: 0, /* 0,1*/
weekends: [true, false, false, false, false, false, true], /* Default: 0 (Sun) and 6 (Sa) are true*/
holidays: [] /* using short (or long) holidayFmt*/
}
};
Calendar.styles = '/*{{{*/'
+ '\ntable.calendarWrapper {border-collapse:collapse; border:2px solid #c6dbff;}'
+ '\n.calendarWrapper td {border-collapse:collapse; border:1px solid #c6dbff; text-align:center;margin:0; padding:0 0.05em;}'
/* + '\ntable.calendar {border-collapse:separate; border:1px solid #c6dbff;}'*/
+ '\ntable.calendar {border-collapse:collapse; border:0;}'
+ '\n.calendar tbody, .calendar th, .calendar td, .calendar tr {border:0; text-align:center; font-size:1em; padding:0 0.1em;}'
+ '\n.calendar th {color:#000; background-color:#c6dbff;}'
+ '\n#sidebarOptions .calendar td {font-size:0.96em; margin:0; padding:0;}'
+ '\n#sidebarTabs .calendar td, #mainMenu .calendar td {padding:0 0.25em;}'
+ '.calendar .naviBar select {border:0;}'
+ '\n.calendar .today a {padding:0; border:1px solid blue;}'
+ '\n.calendar .weekend {background-color:#deeeff;}'
+ '\n.calendar .hasChanged {font-family:bold; background-color:#fe8; color:darkblue;}'
+ '\n.calendar .holiday {font-weight:bold; font-size:1.06em; color:red;}'
+ '\n.datePopup {background:#efffff;}'
+ '\n.datePopup .isCreated {color:#df6300;}'
+ '\n.datePopup .isExcluded {filter:alpha(opacity=60); -moz-opacity:0.6; opacity:0.6;}'
/* + '.viewer .calendarOptios {display:block;}'*/
+ '\n/*}}}*/';
Calendar.prototype.getLocale = function()
{
var locale = config.options.txtLocale ? config.options.txtLocale : Calendar.locale;
return Calendar[locale] ? locale : 'en';
};
Calendar.prototype.show = function(place, year, month, count)
{
this.locale=this.getLocale();
var y, m = new Date().getMonth()+1, c = 1;
c = isNaN(count) ? (isNaN(year) && isNaN(month) ? c : (!isNaN(year) && isNaN(month) ? 12 : c)) : parseInt(count);
m = isNaN(month) ? (isNaN(year) ? m : (isNaN(month) ? 1 : parseInt(month))) : parseInt(month);
y = isNaN(year) ? new Date().getFullYear() : parseInt(year);
this.dateFmt = (this.callback.params.dateFmt) ? this.callback.params.dateFmt : Calendar[this.locale].dates.dateFmt;
for (var i=0; i<c; i++){
var firstDate = new Date(y,m-1+i,1);
if ((m+i)%12 == 1 || i==0){
var wrapper = createTiddlyElement(place,'table',null,'calendarWrapper');
var tbody = createTiddlyElement(wrapper,'tbody');
if (c > 1 && m==1 && c%12==0){
this.naviBar(wrapper,tbody,firstDate,true);
}
}
if (i%3 == 0)
var tr = createTiddlyElement(tbody,'tr',null,'monthRow');
var td = createTiddlyElement(tr,'td');
td.vAlign = "top";
this.selectMonth(td, firstDate);
}
if (c>3)
Calendar.dummyDateCell(tr,(3-c%3)%3,2);
};
Calendar.prototype.selectMonth = function(place, firstDate)
{
var year = firstDate.getFullYear();
var calElm = createTiddlyElement(place,'table',null,'calendar');
var monElm = createTiddlyElement(calElm,'tbody');
this.naviBar(place,monElm,firstDate);
if (store.isDirty() || !Calendar.tiddlers)
Calendar.hashTiddlers(firstDate);
this.showMonth(monElm, firstDate);
};
Calendar.prototype.naviBar = function(place,monElm,firstDate,isYearView)
{
var cal = this;
var monthHeader = createTiddlyElement(createTiddlyElement(monElm,'tr'),'td',null, 'naviBar', null, {colSpan:7});
var _selectMonthHandler = function(s,date,isYearView){
if (isYearView){
cal.show(s.parentNode,date.getFullYear(),1,12);
removeNode(s);
} else {
cal.selectMonth(s, date,cal.dateFmt);
removeNode(s.firstChild);
}
};
var onchange = function(ev){
var e = ev ? ev : window.event;
var date=null;
for (var i=0, options=this.options; i<this.options.length; i++){
if (options[i].selected)
date = new Date(options[i].value);
}
_selectMonthHandler.call(this,place,date,isYearView);
return false;
};
var year = firstDate.getFullYear();
var n = 3;
var y = isYearView ? year - n : year;
var m = isYearView ? 0 : new Date(firstDate).getMonth()- n;
var c = null;
var options = [];
var fmt = isYearView ? Calendar[this.locale].dates.yearFmt : Calendar[this.locale].dates.monthFmt;
for (var i=0; i<n*2+1; i++){
c= isYearView ? new Date(y+i,1,1) : new Date(y,m+i,1);
options.push({caption: c.formatString(fmt), name: c});
}
var sel=createTiddlyDropDown(monthHeader,onchange,options,n);
sel.selectedIndex = n;
};
Calendar.prototype.showMonth = function(monElm, firstDate)
{
var year = new Date(firstDate).getFullYear();
var month = new Date(firstDate).getMonth()+1;
var lastDate = new Date(year,month,0).getDate();
var nextFirstDay = new Date(year,month,1).getDay();
var offset = (7 + firstDate.getDay() - Calendar[this.locale].dates.startOfWeek)%7;
var dayHearder = createTiddlyElement(monElm,'tr');
for (var i=0, ii=0, text=null; i<7; i++){
ii = (Calendar[this.locale].dates.startOfWeek + i)%7;
text = Calendar[this.locale].dates.days[ii];
//# createTiddlyElement(theParent,theElement,theID,theClass,theText,attribs)
createTiddlyElement(dayHearder,'th',null,null,text);
}
var d=1, dayRow=null, celldate=null, isWeekend = false;
while (d<=lastDate){
dayRow = createTiddlyElement(monElm,'tr');
if (offset > 0)
Calendar.dummyDateCell(dayRow,offset,6);
for (var i=offset; i<7 && d <= lastDate; i++, d++){
celldate = new Date(year, month-1, d);
isWeekend = Calendar[this.locale].dates.weekends[(i + Calendar[this.locale].dates.startOfWeek)%7];
this.showDate(dayRow, d, celldate, isWeekend);
}
offset=0;
}
var n = 7 - (7 + nextFirstDay - Calendar[this.locale].dates.startOfWeek)%7;
if (n < 7)
Calendar.dummyDateCell(dayRow,n,6);
};
Calendar.prototype.showDate = function(dayRow, date, celldate, isWeekend)
{
var now = new Date();
var dateFmt = this.dateFmt;
var today = now.formatString(dateFmt);
var cellClass = 'dateCell';
var title = celldate.formatString(dateFmt);
var day = celldate.getDay();
var isToday = today == title;
var isHoliday = this.isHoliday(celldate);
if (isToday)
cellClass += ' today';
if (isWeekend)
cellClass += ' weekend';
if (isHoliday)
cellClass += ' holiday';
var dateCell=createTiddlyElement(dayRow,'td',null,cellClass);
var ymd = celldate.convertToLocalYYYYMMDDHHMM().substr(0,8);
var callback = this.callback;
var option = callback.option;
if (!option){
if (Calendar.tiddlers[ymd]){
cellClass += ' hasChanged';
option = 'popup';
} else {
option = 'displayTiddler';
}
}
var params = callback.params;
merge (params,{date:date, title:title, celldate:celldate, cellClass:cellClass, dateFmt:dateFmt});
if (callback.fn instanceof Function && callback.fnEnable){
callback.fn(dateCell, params);
} else
Calendar.optionHandler(dateCell, option, params, celldate);
};
Calendar.prototype.isHoliday = function(date)
{
return Calendar[this.locale].dates.holidays.containsAny([
date.formatString(Calendar[this.locale].dates.longHolidayFmt),
date.formatString(Calendar[this.locale].dates.shortHolidayFmt)]);
};
Calendar.dummyDateCell = function (srcElm,n,max)
{
for (var i=0; i< n && i<max; i++)
createTiddlyElement(srcElm,'td');
};
Calendar.hashTiddlers = function(date)
{
if (date)
var ymd = date.convertToLocalYYYYMMDDHHMM().substr(0,8);
var isChanged = false;
var tiddlers = {};
store.forEachTiddler(function(title, tiddler){
var modified = tiddler.modified.convertToLocalYYYYMMDDHHMM().substr(0,8);
var created = tiddler.created.convertToLocalYYYYMMDDHHMM().substr(0,8);
// if (modified.substr(0,6) == ymd.substr(0,6)){
// var dd = modified.substr(6,2);
var extraCellClass = '';
extraCellClass += (tiddler.modified == tiddler.created) ? ' isCreated' : '';
extraCellClass += tiddler.isTagged("excludeLists") ? ' isExcluded' : '';
if (!tiddlers[modified])
tiddlers[modified]=[];
tiddlers[modified].push({title:tiddler.title, modified:tiddler.modified, ymd:modified, extraCellClass:extraCellClass});
// }
});
this.tiddlers = tiddlers;
};
Calendar.optionHandler = function(srcElm,option,params,celldate)
{
var fn = Calendar.optionType[option];
var action = function(ev) {
var e = ev ? ev : window.event;
var fn = Calendar.optionType[option];
if (fn instanceof Function)
fn.call(this,e,srcElm,params);
return false;
};
//# createTiddlyButton(parent,text,tooltip,action,className,id,accessKey,attribs);
createTiddlyButton(srcElm, params.date, params.title, action, params.cellClass, null,null,params);
};
Calendar.optionType = {
displayTiddler: function(e) {
story.displayTiddler(null,this.title)
},
popup: function(e,daetCell) {
var celldate = new Date(this.getAttribute('celldate'));
Calendar.onClickDatePopup(e,daetCell,this.title,celldate);
},
pickDate: function(e) {
Calendar.pickDate.call(this,e);
}
};
Calendar.onClickDatePopup = function (ev,detaCell,title,celldate)
{
var e = ev ? ev : window.event;
if (store.isDirty())
Calendar.hashTiddlers(celldate);
var ymd = celldate.convertToLocalYYYYMMDDHHMM().substr(0,8);
var tiddlers = Calendar.tiddlers[ymd];
var popup = Popup.create(detaCell,null,'datePopup popup');
createTiddlyElement(popup,'br');
this.optionHandler(popup, "displayTiddler", {title:title, date:title});
if (tiddlers){
createTiddlyElement(popup,'hr');
for (var i=0; i<tiddlers.length; i++)
this.optionHandler(createTiddlyElement(popup,"li"), "displayTiddler",{date:tiddlers[i].title, title:tiddlers[i].title, cellClass:tiddlers[i].extraCellClass});
}
Popup.show();
e.cancelBubble = true;
if(e.stopPropagation) e.stopPropagation();
return false;
};
Calendar.pickDate = function(ev)
{
var e = ev ? ev : window.event;
var inputId = this.getAttribute('inputId');
if (inputId){
var input = document.getElementById(inputId);
if (input)
input.value = this.title;
}
return false;
};
//}}}
/***
!Initialize Calendar
***/
//{{{
config.shadowTiddlers.CalendarStyle = Calendar.styles;
config.notifyTiddlers.pushUnique({name: 'CalendarStyle', notify: refreshStyles});
var calendar = new Calendar(); /* Create global Calendar object */
var datepicker = new Calendar(); /*Create global Date picker */
//}}}
/***
!Macros
***/
//{{{
config.macros.tCalendar = {
init: function(){
var fnEnable = config.options.chkCalendarCallback == undefined ? false : config.options.chkCalendarCallback;
calendar.callback = {
fn: this.showDate,
fnEnable: (window.showDate instanceof Function && fnEnable),
option: null,
params: {date: null, dateFmt:null, celldate:null}
};
}
};
config.macros.tCalendar.handler = function(place,macroName,params)
{
this.init();
var mode = params[2] ? params[2] : (params[1] ? params[1] : params[0]);
var modeType = params[0];
var modeCount = isNaN(params[1]) ? 1 : parseInt(params[1]);
var now = new Date();
var y = now.getFullYear();
var m = now.getMonth()+1;
var c = isNaN(params[1]) ? 1 : parseInt(params[1]);
switch (mode) {
case 'month':
case 'months':
m = modeType == 'last' ? m - c : m + 1;
break;
case 'thisyear':
m = 1;
c = 12;
break;
case 'year':
case 'years':
y = modeType == 'last' ? y - c : y + 1;
m = 1;
c = 12 * c;
break;
case 'lastModified':
var lastModified = this.getlastModified();
y = lastModified.getFullYear();
m = lastModified.getMonth()+1;
c = 1;
break;
default:
y = params[0];
m = params[1];
c = params[2];
}
calendar.show(place,y,m,c);
};
config.macros.tCalendar.showDate = function(dateCell,params)
{
var isWeekend = (params.cellClass.indexOf('weekend') != -1);
//# For co-working with showDate() of DatePlugin
//# showDate(place,date,mode,format,linkformat,autostyle,weekend)
window.showDate(dateCell, params.celldate,'popup','DD',params.dateFmt,true,isWeekend);
};
config.macros.tCalendar.getlastModified = function()
{
var tiddlers = store.reverseLookup("tags","excludeLists",false,'modified');
return tiddlers[tiddlers.length-1].modified;
};
config.macros.datePicker = {
onClick: function(ev) {
var e = ev ? ev : window.event;
var inputId = this.getAttribute("inputId");
var dateFmt = this.getAttribute("dateFmt");
dateFmt = dateFmt == 'null' ? null : dateFmt; /* For Opera */
datepicker.callback = {
fn: null,
fnEnable: false,
option: 'pickDate',
params: {inputId:inputId, dateFmt:dateFmt}
};
var popup = Popup.create(this);
datepicker.show(popup);
Popup.show();
e.cancelBubble = true;
if(e.stopPropagation) e.stopPropagation();
return false;
}
};
config.macros.datePicker.handler = function(place,macroName,params)
{
if (!params) return;
var id = params[0];
var dateFmt = params[1] ? params[1] : null;
var pickParams = {inputId:id, dateFmt:dateFmt};
var inputElm = createTiddlyElement(place,'input',id);
var btn = createTiddlyButton(place, '?', 'Date Picker', this.onClick,'datepicker',null,null,pickParams);
};
//}}}
//{{{
Calendar.locale = 'zh-Hant';
Calendar[Calendar.locale] = {
dates: {
days: ["日", "一","二", "三", "四", "五", "六"],
yearFmt: "YYYY年",
monthFmt: "YYYY年0MM月",
dateFmt: "YYYY年0MM月0DD日",
longHolidayFmt: "YYYY年0MM月0DD日",
shortHolidayFmt: "0MM月0DD日",
startOfWeek: 0, /* 0 (日)、1(一)*/
weekends: [true, false, false, false, false, false, true], /* 預設: 0 (日) and 6 (六) true*/
holidays: ['01月01日']},
messages: {
optionLegend: "日曆選項:",
startOfWeek: "一週起始日:",
weekend: "週末:",
changed: "異動:"},
naviType: {
bwdYear: {label:"\u00ab", title:"往前一年"},
fwdYear: {label:"\u00bb", title:"往後一年"},
bwdMonth: {label: "\u2039", title:"往前一個月"},
fwdMonth: {label: "\u203a",title: "往後一個月"}}
};
var calendar = new Calendar();
var datepicker = new Calendar();
//}}}
|{{bigblue{__設定TipsPlugin__}}}|c
|!名稱|!提示內容|
|TipsDefs:|TipsDefs.zh-Hant|
|TipsStyle:|TipsStyle|
|Note:|{{help{^^註%0^^}}}|
|Info:|%0|
|Menu:|%0|
{{{
locale: en
PopupTipsPlugin: <<tiddler PopupTipsPlugin>>
TipsConfig: <<tiddler TipsConfig.en>>
TipsDefs: [[TipsDefs.en]] contains all of the tips definitions and it's specified in [[TipsConfig.en]].
Using_Alias: @@Alias@@:__Uses the tiddler slice form to define the tips__.
1: {{bigblue{''Show a popup tips as mouse hovers.''}}}
Settings: {{bigblue{__''Settings''__}}}
GettingStarted: <<tiddler GettingStarted.en>>
}}}
!Locale Strings
{{{
en_label: English
Locale_driven: {{bigblue{__''Locale Driven''__}}}
Home: <<tiddler Home with:Home>>
SelectLanguage: Select a language
SiteFooter: <<tiddler {{'SiteFooter.'+config.options.txtLocale}}>>
SimpleClock: <<simpleclock 'MMM 0DD YYYY am hh12:0mm:0ss'>>
GoogleNews: +++[Google News]<<rssfeed asHtml "http://news.google.com/news?ned=us&topic=w&output=rss">>===
TiddlyWikiGroup: +++[TiddlyWiki Group]<<rssfeed asHtml "http://groups.google.com/group/TiddlyWiki/feed/atom_v1_0_msgs.xml">>===
GentooBugzilla: +++[Gentoo Bugzilla]<<tiddler [[Gentoo Bugzilla]]>>===
}}}
!Menu Definitions
{{{
Descriptions_label: Descriptions
Descriptions: <<tiddler Demo>>
TipsConfigs_label: Config
TipsConfigs: [[English|TipsConfig.en]]<br>[[Trad. Chinese|TipsConfig.zh-Hant]]<br>[[Simp. Chinese|TipsConfig.zh-Hans]]
TipsDef_label: Definitions
TipsDef: [[English|TipsDefs.en]]<br>[[Trad. Chinese|TipsDefs.zh-Hant]]<br>[[Simp. Chinese|TipsDefs.zh-Hans]]
ExtensionLists: <<tiddler ExtensionLists.en>>
ExtensionLists_label: Extensions
Examples: <<tiddler Examples.en>>
Examples_label: Examples
Utilities: <<tiddler Utilities.en>>
Utilities_label: Utilities
}}}
!Tips Definitions
{{{
locale: zh-Hant
1: {{bigblue{''當滑鼠移至類似此標記處,可看見提示說明。''}}}
PopupTipsPlugin: <<tiddler PopupTipsPlugin>>
TipsDefs: 由自訂之 TipsConfig.zh-Hant,指定為 [[TipsDefs.zh-Hant]]。
TipsConfig: <<tiddler TipsConfig.zh-Hant>>
Using_Alias: @@別名@@: ''使用文章片段的格式,來定義提示文字。''
GettingStarted: <<tiddler GettingStarted.zh-Hant>>
GettingStarted_label: 使用說明
}}}
!Locale Strings
{{{
en_label: 英語
zh_Hant_label: 繁體中文
zh_Hans_label: 簡體中文
Home: <<tiddler Home with:首頁>>
Plugin: 套件
Settings: {{bigblue{__''相關設定''__}}}
Locale_driven: {{bigblue{__''語系驅動內容''__}}}
Config: 設定
Definitions: 定義
Locale: 語系
Notation: 註釋
Examples: 範例
SelectLanguage: 選擇語言
SiteFooter: <<tiddler {{'SiteFooter.'+config.options.txtLocale}}>>
SimpleClock: <<simpleclock 'YYYY年0MM月0DD日 am hh12:0mm:0ss'>>
GoogleNews: +++[Google 國際新聞]<<rssfeed asHtml "http://news.google.com.tw/?ned=tw&topic=w&output=rss">>===
TiddlyWikiGroup: +++[TiddlyWiki 華語支援論壇]<<rssfeed asHtml "http://groups.google.com/group/TiddlyWiki-zh/feed/atom_v1_0_msgs.xml">>===
GentooBugzilla: +++[Gentoo Bugzilla]<<tiddler [[Gentoo Bugzilla]]>>===
}}}
!Menu Definitions
{{{
Descriptions: <<tiddler Demo>>
Descriptions_label: 使用說明
TipsConfigs: [[英語設定|TipsConfig.en]]<br>[[繁體中文設定|TipsConfig.zh-Hant]]<br>[[簡體中文設定|TipsConfig.zh-Hans]]
TipsConfigs_label: 設定
TipsDef: [[英語定義|TipsDefs.en]]<br>[[繁體中文定義|TipsDefs.zh-Hant]]<br>[[簡體中文定義|TipsDefs.zh-Hans]]
TipsDef_label: 定義
ExtensionLists: <<tiddler ExtensionLists.zh-Hant>>]
ExtensionLists_label: 套件列表
Examples: <<tiddler Examples.zh-Hant>>
Examples_label: 範例
Utilities: <<tiddler Utilities.zh-Hant>>
Utilities_label: 輔助工具
}}}
/*{{{*/
#topMenu br {display:none;}
#topMenu a, #topMenu .tiddlyLink, #topMenu .button {margin:0em; font-size:1.2em; color:[[ColorPalette::HeaderPrimaryLight]]; background:transparent; padding:0.5em 1em 0.5em 1em; border:none; border-right: 1px solid [[ColorPalette::SecondaryDark]];float:left;}
#topMenu {border-left: 1px solid [[ColorPalette::SecondaryDark]]; float:left;margin:0;}
#topMenu a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryDark]];}
/*}}}*/
/*{{{*/
.popupTips {position:absolute; visibility:hidden; padding:0.5em; border:2px solid [[ColorPalette::PrimaryPale]]; background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Foreground]]; z-index:300; filter:alpha(opacity=90);-moz-opacity:0.9;opacity: 0.9;}
.tipsNote {position:relative; border:none; background:[[ColorPalette::Background]]; color:[[ColorPalette::Error]]; cursor:help;}
.tipsInfo {position:relative; background:#cff; color:[[ColorPalette::Foreground]];}
.tipsMenu {margin:0em; font-size:1.2em; color:[[ColorPalette::HeaderPrimaryLight]]; background:transparent; padding:0.5em 1em 0.5em 1em; border:none; border-right: 1px solid [[ColorPalette::SecondaryDark]];float:left;}
.tipsMenu {border-left: 1px solid [[ColorPalette::SecondaryDark]]; float:left;margin:0;}
.tipsMenu:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]];}
.bigblue {font-size: 1.2em;color:darkblue}
.help {cursor:help;}
/*}}}*/
Toolbar
----
[[TiddlyBar|http://TiddlyBar.CommunityToolbars.com/]]
[[PTWBar|http://PTW.CommunityToolbars.com/]]
瀏覽器工具列
----
[[TiddlyBarZh|http://TiddlyBarZh.CommunityToolbars.com/]]
[[PTWBar|http://PTW.CommunityToolbars.com/]]
<!--{{{-->
<div class='toolbar' macro='toolbar bookmarks closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DateFormat.en::DateFormat]]'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date [[DateFormat.en::shortDateFormat]]'></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 bookmarks closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DateFormat.zh-Hant::DateFormat]]'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date [[DateFormat.zh-Hant::shortDateFormat]]'></span>)</div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
/***
!Metadata:
|''Name:''|XMLReader|
|''Description:''||
|''Version:''|2.2.2|
|''Date:''|Jul 30, 2008|
|''Source:''|http://sourceforge.net/project/showfiles.php?group_id=150646|
|''Author:''|BramChen (bram.chen (at) gmail (dot) com)|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License]]|
|''~CoreVersion:''|2.2.0|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|
|''Required:''|[[NestedSlidersPlugin|http://www.tiddlytools.com/#NestedSlidersPlugin]] is required for using the parameter "asHtml".|
!Syntax:
{{{<<rssfeed withDesc|noDesc|asHtml rssfeed.xml|http://www.example.com/rssfeed.rdf>>}}}
!Revision History:
|''Version''|''Date''|''Note''|
|2.2.2|Jul 30, 2008|Fix bug for link format of title of tiddlers|
|2.2.1|May 29, 2008|Improve isCrossSite()|
|2.2.0|May 19, 2007|Atom feeds suppported|
|2.1.1|May 15, 2007|Fixed cache bug|
|2.1.0|May 10, 2007|Fixed bugs:<br>1.missing parameter 'responseText' of processResponse<br>2.Caches failed|
|2.0.0|Mar 08, 2007|Required TW 2.2.0+|
|1.5.0|Mar 04, 2007|Codes reworked, more easier reused|
|1.2.0|Jul 20, 2006|Runs compatibly with TW 2.1.0 (rev #403+)|
|1.1.0|Jul 10, 2006)|change xmlhttp.send(null)/send() to xmlhttp.send("") for more compatibility for some browsers|
|1.0.0|Mar 11, 2006|Initial release|
|~|~|This macro is reworked from RssNewsMacro, but it can be easy to extended to support different structure of xml document from rss feeds|
|~|~|You could uninstall the RssNewsMacro, but still use the original syntax,<br>{{{<<rssfeed withDesc|noDesc|asHtml "rssfeed.xml"|"http://www.example.com/rssfeed.rdf">>}}}|
!Code section:
***/
//{{{
version.extensions.xmlreader = {major: 2, minor: 2, revision: 2,
date: new Date("Jul 30, 2008"),
name: "XMLReader2",
type: "Macro",
author: "BramChen",
source: "http://sourceforge.net/project/showfiles.php?group_id=150646"
};
config.messages.XmlReader = {
fromCache: "^^(//from cache//)^^",
errorInDataRetriveing: "Problem retrieving XML data: %0",
invalidXML: "Invalid XML retrieved from: %0",
urlNotAccessible: "Access to %0 is not allowed,\nPlease check the setting of your browser:\n1.For Gecko based, you should set the 'signed.applets.codebase_principal_support' to be true, in about:config.\n2.For IE, you should add this web site to your trust list."
};
function XmlReader(place,withDesc,xmlURL) {
this.xmlhttp = null;
this.place = place;
this.xmlURL = xmlURL;
this.withDesc = withDesc;
this.itemStructure = {title:'Title',link:'Link',pubDate:'PubDate',description:'Desc'};
this.atomStructure = {title:'Title',id:'Link',updated:'Updated',summary:'Desc'};
// this.rsTemplate = function(){var t='';for (var i in itemStructure){t+='_'+itemStructure[i]}};
this.rsTemplate = '_pubDate\n**[[_title|_link]]_description';
this.items = {Elm: "%0Elm", Text: "_%0"};
this.keyItem = "item";
this.dateFormat = "DDD, DD MMM YYYY";
this.groupBy = null;
return this;
};
XmlReader.prototype.asyncGet = function(xmlURL,callback){
if(window.Components && window.netscape && window.netscape.security && this.isCrossSite(xmlURL)){
try {netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");}
catch (ex) {displayMessage(ex.description?ex.description:ex.toString());}
}
// return doHttp("GET",xmlURL,null,'text/xml',null,null,callback);
var r = httpReq("GET",xmlURL,callback,null,null,null,'text/xml');
return r = r || null;
};
XmlReader.prototype.genLists = function(xml){
var itemStructure;
if (xml.lastChild.nodeName == 'feed'){
this.keyItem = 'entry';
itemStructure = this.atomStructure;
}
else {
itemStructure = this.itemStructure;
}
var itemList = xml.getElementsByTagName(this.keyItem);
var items = this.items;
var rsLists='', rssItem; this.groupBy='';
for (var i=0; i<itemList.length; i++){
var itemElms=[],itemTexts=[];
var rsTemplate=this.rsTemplate;
for (var j in itemStructure){
var itemElm = items.Elm.format([j]);
var itemText = items.Text.format([j]);
itemElms[itemElm] = itemList[i].getElementsByTagName(j).item(0);
if(itemElms[itemElm]){
var theTitle = itemStructure[j];
var theText = (itemElms[itemElm].firstChild)?itemElms[itemElm].firstChild.nodeValue:'';
rsTemplate=this.convertTemplate(rsTemplate,j,theText);
}
else {
rsTemplate = rsTemplate.replace('_'+j, '');
}
}
rsLists += rsTemplate;
}
return rsLists;
};
XmlReader.prototype.convertTemplate = function(rsTemplate,j,theText){
switch (j){
case 'title':
rsTemplate = rsTemplate.replace(/_title/,theText.replace(/\[|\]/g,''));
break;
case 'id':
j = 'link';
case 'link' || 'id':
rsTemplate = rsTemplate.replace('_'+j, encodeURI(theText));
break;
case 'updated':
j = 'pubDate';
case 'pubDate':
theText = this.dateFormatString(this.dateFormat, theText);
if (this.groupBy == theText){
rsTemplate = rsTemplate.replace('_'+j, '');
}
else{
rsTemplate = rsTemplate.replace('_'+j, '\n* '+theText);
this.groupBy = theText;
}
break;
case 'summary':
j = 'description';
case 'description':
var regexpDesc = new RegExp("withDesc|asHtml","g");
if (regexpDesc.exec(this.withDesc) && theText){
var _description = theText.replace(/\n/g,' ');
_description =_description.replace(/<br \/>/ig,'\n');
if (version.extensions.nestedSliders){
_description = ((this.withDesc == "asHtml")?"<html>"+_description+"</html>":_description);
rsTemplate = rsTemplate.replace('_'+j,'+++[...]'+_description+'\n===\n');
}
else {
rsTemplate = rsTemplate.replace('_'+j,_description+'\n');
}
}
else {
rsTemplate = rsTemplate.replace('_'+j,'');
}
break;
}
return (rsTemplate);
};
XmlReader.prototype.dateFormatString = function(template, theDate){
theDate = theDate.replace(/-/g,'/').replace(/T.*UT|T.*Z/,'');
var dateString = new Date(theDate);
template = template.replace(/hh|mm|ss/g,'');
return dateString.formatString(template);
};
XmlReader.prototype.isCrossSite = function (url){
var result = false;
var curLoc = document.location;
if (url.indexOf(":") != -1 && curLoc.protocol.indexOf("http") != -1) {
var m = /(\w+):\/\/([^/:]+)(:\d*)?([^# ].*$)/.exec(url);
result = (curLoc.protocol == m[1] && curLoc.host == m[2] && curLoc.port == m[3]);
}
return (!result);
};
//}}}
/***
!Macro rssfeed
***/
//{{{
config.macros.rssfeed = {
cache: {},
dateFormat: "YYYY-0MM-0DD"
};
config.macros.rssfeed.handler = function(place,macroName,params){
var withDesc = params[0];
var xmlURL = params[1];
var rss = new XmlReader(place,withDesc,xmlURL);
rss.dateFormat = this.dateFormat;
var processResponse = function(status,params,responseText,xmlURL,x){
if (window.netscape){
if (rss.isCrossSite(xmlURL)){
try {netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");}
catch (e) { displayMessage(e.description?e.description:e.toString()); }
}
}
if (x && x.responseXML){
xmlURL = xmlURL.replace(/[\?|\&]nocache.*/,'').replace(/[^0-9a-zA-Z]/mg,"_");
config.macros.rssfeed.cache[xmlURL] = x;
wikify(rss.genLists(x.responseXML),place);
}
else {
wikify("<html>"+ x.responseText +"</html>", place);
displayMessage(config.messages.XmlReader.invalidXML.format([xmlURL]));
}
};
if (this.cache[xmlURL]) {
wikify(config.messages.XmlReader.fromCache,place);
var status = false;
var x=this.cache[xmlURL];
processResponse(status,null,x.responseText,xmlURL,x);
}
else {
rss.xmlhttp = rss.asyncGet(xmlURL, processResponse);
}
};
//}}}
//{{{
config.options.chkSearchList = true;
//}}}
//--
//-- Translateable strings
//--
// Strings in "double quotes" should be translated; strings in 'single quotes' should be left alone
merge(config.options,{
txtUserName: "YourName"});
merge(config.tasks,{
save: {text: "save", tooltip: "Save your changes to this TiddlyWiki"},
importTask: {text: "import", tooltip: "Import tiddlers and plugins from other TiddlyWiki files and servers", content: '<<importTiddlers>>'},
tweak: {text: "tweak", tooltip: "Tweak the appearance and behaviour of TiddlyWiki", content: '<<options>>'},
upgrade: {text: "upgrade", tooltip: "Upgrade TiddlyWiki core code", content: '<<upgrade>>'},
plugins: {text: "plugins", tooltip: "Manage installed plugins", content: '<<plugins>>'}
});
// Options that can be set in the options panel and/or cookies
merge(config.optionsDesc,{
txtUserName: "Username for signing your edits",
chkRegExpSearch: "Enable regular expressions for searches",
chkCaseSensitiveSearch: "Case-sensitive searching",
chkIncrementalSearch: "Incremental key-by-key searching",
chkAnimate: "Enable animations",
chkSaveBackups: "Keep backup file when saving changes",
chkAutoSave: "Automatically save changes",
chkGenerateAnRssFeed: "Generate an RSS feed when saving changes",
chkSaveEmptyTemplate: "Generate an empty template when saving changes",
chkOpenInNewWindow: "Open external links in a new window",
chkToggleLinks: "Clicking on links to open tiddlers causes them to close",
chkHttpReadOnly: "Hide editing features when viewed over HTTP",
chkForceMinorUpdate: "Don't update modifier username and date when editing tiddlers",
chkConfirmDelete: "Require confirmation before deleting tiddlers",
chkInsertTabs: "Use the tab key to insert tab characters instead of moving between fields",
txtBackupFolder: "Name of folder to use for backups",
txtMaxEditRows: "Maximum number of rows in edit boxes",
txtTheme: "Name of the theme to use",
txtFileSystemCharSet: "Default character set for saving changes (Firefox/Mozilla only)"});
merge(config.messages,{
customConfigError: "Problems were encountered loading plugins. See PluginManager for details",
pluginError: "Error: %0",
pluginDisabled: "Not executed because disabled via 'systemConfigDisable' tag",
pluginForced: "Executed because forced via 'systemConfigForce' tag",
pluginVersionError: "Not executed because this plugin needs a newer version of TiddlyWiki",
nothingSelected: "Nothing is selected. You must select one or more items first",
savedSnapshotError: "It appears that this TiddlyWiki has been incorrectly saved. Please see http://www.tiddlywiki.com/#Download for details",
subtitleUnknown: "(unknown)",
undefinedTiddlerToolTip: "The tiddler '%0' doesn't yet exist",
shadowedTiddlerToolTip: "The tiddler '%0' doesn't yet exist, but has a pre-defined shadow value",
tiddlerLinkTooltip: "%0 - %1, %2",
externalLinkTooltip: "External link to %0",
noTags: "There are no tagged tiddlers",
notFileUrlError: "You need to save this TiddlyWiki to a file before you can save changes",
cantSaveError: "It's not possible to save changes. Possible reasons include:\n- your browser doesn't support saving (Firefox, Internet Explorer, Safari and Opera all work if properly configured)\n- the pathname to your TiddlyWiki file contains illegal characters\n- the TiddlyWiki HTML file has been moved or renamed",
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to save backup file",
rssSaved: "RSS feed saved",
rssFailed: "Failed to save RSS feed file",
emptySaved: "Empty template saved",
emptyFailed: "Failed to save empty template file",
mainSaved: "Main TiddlyWiki file saved",
mainFailed: "Failed to save main TiddlyWiki file. Your changes have not been saved",
macroError: "Error in macro <<%0>>",
macroErrorDetails: "Error while executing macro <<%0>>:\n%1",
missingMacro: "No such macro",
overwriteWarning: "A tiddler named '%0' already exists. Choose OK to overwrite it",
unsavedChangesWarning: "WARNING! There are unsaved changes in TiddlyWiki\n\nChoose OK to save\nChoose CANCEL to discard",
confirmExit: "--------------------------------\n\nThere are unsaved changes in TiddlyWiki. If you continue you will lose those changes\n\n--------------------------------",
saveInstructions: "SaveChanges",
unsupportedTWFormat: "Unsupported TiddlyWiki format '%0'",
tiddlerSaveError: "Error when saving tiddler '%0'",
tiddlerLoadError: "Error when loading tiddler '%0'",
wrongSaveFormat: "Cannot save with storage format '%0'. Using standard format for save.",
invalidFieldName: "Invalid field name %0",
fieldCannotBeChanged: "Field '%0' cannot be changed",
loadingMissingTiddler: "Attempting to retrieve the tiddler '%0' from the '%1' server at:\n\n'%2' in the workspace '%3'",
upgradeDone: "The upgrade to version %0 is now complete\n\nClick 'OK' to reload the newly upgraded TiddlyWiki",
invalidCookie: "Invalid cookie '%0'"});
merge(config.messages.messageClose,{
text: "close",
tooltip: "close this message area"});
config.messages.backstage = {
open: {text: "backstage", tooltip: "Open the backstage area to perform authoring and editing tasks"},
close: {text: "close", tooltip: "Close the backstage area"},
prompt: "backstage: ",
decal: {
edit: {text: "edit", tooltip: "Edit the tiddler '%0'"}
}
};
config.messages.listView = {
tiddlerTooltip: "Click for the full text of this tiddler",
previewUnavailable: "(preview not available)"
};
config.messages.dates.months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November","December"];
config.messages.dates.days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
config.messages.dates.shortMonths = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
config.messages.dates.shortDays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
// suffixes for dates, eg "1st","2nd","3rd"..."30th","31st"
config.messages.dates.daySuffixes = ["st","nd","rd","th","th","th","th","th","th","th",
"th","th","th","th","th","th","th","th","th","th",
"st","nd","rd","th","th","th","th","th","th","th",
"st"];
config.messages.dates.am = "am";
config.messages.dates.pm = "pm";
merge(config.messages.tiddlerPopup,{
});
merge(config.views.wikified.tag,{
labelNoTags: "no tags",
labelTags: "tags: ",
openTag: "Open tag '%0'",
tooltip: "Show tiddlers tagged with '%0'",
openAllText: "Open all",
openAllTooltip: "Open all of these tiddlers",
popupNone: "No other tiddlers tagged with '%0'"});
merge(config.views.wikified,{
defaultText: "The tiddler '%0' doesn't yet exist. Double-click to create it",
defaultModifier: "(missing)",
shadowModifier: "(built-in shadow tiddler)",
dateFormat: "DD MMM YYYY",
createdPrompt: "created"});
merge(config.views.editor,{
tagPrompt: "Type tags separated with spaces, [[use double square brackets]] if necessary, or add existing",
defaultText: "Type the text for '%0'"});
merge(config.views.editor.tagChooser,{
text: "tags",
tooltip: "Choose existing tags to add to this tiddler",
popupNone: "There are no tags defined",
tagTooltip: "Add the tag '%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: "search",
prompt: "Search this TiddlyWiki",
placeholder: "",
accessKey: "F",
successMsg: "%0 tiddlers found matching %1",
failureMsg: "No tiddlers found matching %0"});
merge(config.macros.tagging,{
label: "tagging: ",
labelNotTag: "not tagging",
tooltip: "List of tiddlers tagged with '%0'"});
merge(config.macros.timeline,{
dateFormat: "DD MMM YYYY"});
merge(config.macros.allTags,{
tooltip: "Show tiddlers tagged with '%0'",
noTags: "There are no tagged tiddlers"});
config.macros.list.all.prompt = "All tiddlers in alphabetical order";
config.macros.list.missing.prompt = "Tiddlers that have links to them but are not defined";
config.macros.list.orphans.prompt = "Tiddlers that are not linked to from any other tiddlers";
config.macros.list.shadowed.prompt = "Tiddlers shadowed with default contents";
config.macros.list.touched.prompt = "Tiddlers that have been modified locally";
merge(config.macros.closeAll,{
label: "close all",
prompt: "Close all displayed tiddlers (except any that are being edited)"});
merge(config.macros.permaview,{
label: "permaview",
prompt: "Link to an URL that retrieves all the currently displayed tiddlers"});
merge(config.macros.saveChanges,{
label: "save changes",
prompt: "Save all tiddlers to create a new TiddlyWiki",
accessKey: "S"});
merge(config.macros.newTiddler,{
label: "new tiddler",
prompt: "Create a new tiddler",
title: "New Tiddler",
accessKey: "N"});
merge(config.macros.newJournal,{
label: "new journal",
prompt: "Create a new tiddler from the current date and time",
accessKey: "J"});
merge(config.macros.options,{
wizardTitle: "Tweak advanced options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='false' name='chkUnknown'>Show unknown options</input>",
unknownDescription: "//(unknown)//",
listViewTemplate: {
columns: [
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
});
merge(config.macros.plugins,{
wizardTitle: "Manage plugins",
step1Title: "Currently loaded plugins",
step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
skippedText: "(This plugin has not been executed because it was added since startup)",
noPluginText: "There are no plugins installed",
confirmDeleteText: "Are you sure you want to delete these plugins:\n\n%0",
removeLabel: "remove systemConfig tag",
removePrompt: "Remove systemConfig tag",
deleteLabel: "delete",
deletePrompt: "Delete these tiddlers forever",
listViewTemplate: {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
{name: 'Description', field: 'Description', title: "Description", type: 'String'},
{name: 'Version', field: 'Version', title: "Version", type: 'String'},
{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Size", type: 'Size'},
{name: 'Forced', field: 'forced', title: "Forced", tag: 'systemConfigForce', type: 'TagCheckbox'},
{name: 'Disabled', field: 'disabled', title: "Disabled", tag: 'systemConfigDisable', type: 'TagCheckbox'},
{name: 'Executed', field: 'executed', title: "Loaded", type: 'Boolean', trueText: "Yes", falseText: "No"},
{name: 'Startup Time', field: 'startupTime', title: "Startup Time", type: 'String'},
{name: 'Error', field: 'error', title: "Status", type: 'Boolean', trueText: "Error", falseText: "OK"},
{name: 'Log', field: 'log', title: "Log", type: 'StringList'}
],
rowClasses: [
{className: 'error', field: 'error'},
{className: 'warning', field: 'warning'}
]},
listViewTemplateReadOnly: {
columns: [
{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
{name: 'Description', field: 'Description', title: "Description", type: 'String'},
{name: 'Version', field: 'Version', title: "Version", type: 'String'},
{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Size", type: 'Size'},
{name: 'Executed', field: 'executed', title: "Loaded", type: 'Boolean', trueText: "Yes", falseText: "No"},
{name: 'Startup Time', field: 'startupTime', title: "Startup Time", type: 'String'},
{name: 'Error', field: 'error', title: "Status", type: 'Boolean', trueText: "Error", falseText: "OK"},
{name: 'Log', field: 'log', title: "Log", type: 'StringList'}
],
rowClasses: [
{className: 'error', field: 'error'},
{className: 'warning', field: 'warning'}
]}
});
merge(config.macros.toolbar,{
moreLabel: "more",
morePrompt: "Show additional commands",
lessLabel: "less",
lessPrompt: "Hide additional commands",
separator: "|"
});
merge(config.macros.refreshDisplay,{
label: "refresh",
prompt: "Redraw the entire TiddlyWiki display"
});
merge(config.macros.importTiddlers,{
readOnlyWarning: "You cannot import into a read-only TiddlyWiki file. Try opening it from a file:// URL",
wizardTitle: "Import tiddlers from another file or server",
step1Title: "Step 1: Locate the server or TiddlyWiki file",
step1Html: "Specify the type of the server: <select name='selTypes'><option value=''>Choose...</option></select><br>Enter the URL or pathname here: <input type='text' size=50 name='txtPath'><br>...or browse for a file: <input type='file' size=50 name='txtBrowse'><br><hr>...or select a pre-defined feed: <select name='selFeeds'><option value=''>Choose...</option></select>",
openLabel: "open",
openPrompt: "Open the connection to this file or server",
statusOpenHost: "Opening the host",
statusGetWorkspaceList: "Getting the list of available workspaces",
step2Title: "Step 2: Choose the workspace",
step2Html: "Enter a workspace name: <input type='text' size=50 name='txtWorkspace'><br>...or select a workspace: <select name='selWorkspace'><option value=''>Choose...</option></select>",
cancelLabel: "cancel",
cancelPrompt: "Cancel this import",
statusOpenWorkspace: "Opening the workspace",
statusGetTiddlerList: "Getting the list of available tiddlers",
errorGettingTiddlerList: "Error getting list of tiddlers, click Cancel to try again",
errorGettingTiddlerListHttp404: "Error retrieving tiddlers from url, please ensure the url exists. Click Cancel to try again.",
errorGettingTiddlerListHttp: "Error retrieving tiddlers from url, please ensure this url exists and is <a href='http://enable-cors.org/'>CORS</a> enabled",
errorGettingTiddlerListFile: "Error retrieving tiddlers from local file, please make sure the file is in the same directory as your TiddlyWiki. Click Cancel to try again.",
step3Title: "Step 3: Choose the tiddlers to import",
step3Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='true' name='chkSync'>Keep these tiddlers linked to this server so that you can synchronise subsequent changes</input><br><input type='checkbox' name='chkSave'>Save the details of this server in a 'systemServer' tiddler called:</input> <input type='text' size=25 name='txtSaveTiddler'>",
importLabel: "import",
importPrompt: "Import these tiddlers",
confirmOverwriteText: "Are you sure you want to overwrite these tiddlers:\n\n%0",
step4Title: "Step 4: Importing %0 tiddler(s)",
step4Html: "<input type='hidden' name='markReport'></input>", // DO NOT TRANSLATE
doneLabel: "done",
donePrompt: "Close this wizard",
statusDoingImport: "Importing tiddlers",
statusDoneImport: "All tiddlers imported",
systemServerNamePattern: "%2 on %1",
systemServerNamePatternNoWorkspace: "%1",
confirmOverwriteSaveTiddler: "The tiddler '%0' already exists. Click 'OK' to overwrite it with the details of this server, or 'Cancel' to leave it unchanged",
serverSaveTemplate: "|''Type:''|%0|\n|''URL:''|%1|\n|''Workspace:''|%2|\n\nThis tiddler was automatically created to record the details of this server",
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: "Size", type: 'Size'},
{name: 'Tags', field: 'tags', title: "Tags", type: 'Tags'}
],
rowClasses: [
]}
});
merge(config.macros.upgrade,{
wizardTitle: "Upgrade TiddlyWiki core code",
step1Title: "Update or repair this TiddlyWiki to the latest release",
step1Html: "You are about to upgrade to the latest release of the TiddlyWiki core code (from <a href='%0' class='externalLink' target='_blank'>%1</a>). Your content will be preserved across the upgrade.<br><br>Note that core upgrades have been known to interfere with older plugins. If you run into problems with the upgraded file, see <a href='http://www.tiddlywiki.org/wiki/CoreUpgrades' class='externalLink' target='_blank'>http://www.tiddlywiki.org/wiki/CoreUpgrades</a>",
errorCantUpgrade: "Unable to upgrade this TiddlyWiki. You can only perform upgrades on TiddlyWiki files stored locally",
errorNotSaved: "You must save changes before you can perform an upgrade",
step2Title: "Confirm the upgrade details",
step2Html_downgrade: "You are about to downgrade to TiddlyWiki version %0 from %1.<br><br>Downgrading to an earlier version of the core code is not recommended",
step2Html_restore: "This TiddlyWiki appears to be already using the latest version of the core code (%0).<br><br>You can continue to upgrade anyway to ensure that the core code hasn't been corrupted or damaged",
step2Html_upgrade: "You are about to upgrade to TiddlyWiki version %0 from %1",
upgradeLabel: "upgrade",
upgradePrompt: "Prepare for the upgrade process",
statusPreparingBackup: "Preparing backup",
statusSavingBackup: "Saving backup file",
errorSavingBackup: "There was a problem saving the backup file",
statusLoadingCore: "Loading core code",
errorLoadingCore: "Error loading the core code",
errorCoreFormat: "Error with the new core code",
statusSavingCore: "Saving the new core code",
statusReloadingCore: "Reloading the new core code",
startLabel: "start",
startPrompt: "Start the upgrade process",
cancelLabel: "cancel",
cancelPrompt: "Cancel the upgrade process",
step3Title: "Upgrade cancelled",
step3Html: "You have cancelled the upgrade process"
});
merge(config.macros.annotations,{
});
merge(config.commands.closeTiddler,{
text: "close",
tooltip: "Close this tiddler"});
merge(config.commands.closeOthers,{
text: "close others",
tooltip: "Close all other tiddlers"});
merge(config.commands.editTiddler,{
text: "edit",
tooltip: "Edit this tiddler",
readOnlyText: "view",
readOnlyTooltip: "View the source of this tiddler"});
merge(config.commands.saveTiddler,{
text: "done",
tooltip: "Save changes to this tiddler"});
merge(config.commands.cancelTiddler,{
text: "cancel",
tooltip: "Undo changes to this tiddler",
warning: "Are you sure you want to abandon your changes to '%0'?",
readOnlyText: "done",
readOnlyTooltip: "View this tiddler normally"});
merge(config.commands.deleteTiddler,{
text: "delete",
tooltip: "Delete this tiddler",
warning: "Are you sure you want to delete '%0'?"});
merge(config.commands.permalink,{
text: "permalink",
tooltip: "Permalink for this tiddler"});
merge(config.commands.references,{
text: "references",
tooltip: "Show tiddlers that link to this one",
popupNone: "No references"});
merge(config.commands.jump,{
text: "jump",
tooltip: "Jump to another open tiddler"});
merge(config.commands.fields,{
text: "fields",
tooltip: "Show the extended fields of this tiddler",
emptyText: "There are no extended fields for this tiddler",
listViewTemplate: {
columns: [
{name: 'Field', field: 'field', title: "Field", type: 'String'},
{name: 'Value', field: 'value', title: "Value", type: 'String'}
],
rowClasses: [
],
buttons: [
]}});
merge(config.shadowTiddlers,{
DefaultTiddlers: "[[GettingStarted]]",
MainMenu: "[[GettingStarted]]",
SiteTitle: "My TiddlyWiki",
SiteSubtitle: "a reusable non-linear personal web notebook",
SiteUrl: "",
SideBarOptions: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options \u00bb" "Change TiddlyWiki advanced options">>',
SideBarTabs: '<<tabs txtMainTab "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "Tags" "All tags" TabTags "More" "More lists" TabMore>>',
TabMore: '<<tabs txtMoreTab "Missing" "Missing tiddlers" TabMoreMissing "Orphans" "Orphaned tiddlers" TabMoreOrphans "Shadowed" "Shadowed tiddlers" TabMoreShadowed>>'
});
merge(config.annotations,{
AdvancedOptions: "This shadow tiddler provides access to several advanced options",
ColorPalette: "These values in this shadow tiddler determine the colour scheme of the ~TiddlyWiki user interface",
DefaultTiddlers: "The tiddlers listed in this shadow tiddler will be automatically displayed when ~TiddlyWiki starts up",
EditTemplate: "The HTML template in this shadow tiddler determines how tiddlers look while they are being edited",
GettingStarted: "This shadow tiddler provides basic usage instructions",
ImportTiddlers: "This shadow tiddler provides access to importing tiddlers",
MainMenu: "This shadow tiddler is used as the contents of the main menu in the left-hand column of the screen",
MarkupPreHead: "This tiddler is inserted at the top of the <head> section of the TiddlyWiki HTML file",
MarkupPostHead: "This tiddler is inserted at the bottom of the <head> section of the TiddlyWiki HTML file",
MarkupPreBody: "This tiddler is inserted at the top of the <body> section of the TiddlyWiki HTML file",
MarkupPostBody: "This tiddler is inserted at the end of the <body> section of the TiddlyWiki HTML file immediately after the script block",
OptionsPanel: "This shadow tiddler is used as the contents of the options panel slider in the right-hand sidebar",
PageTemplate: "The HTML template in this shadow tiddler determines the overall ~TiddlyWiki layout",
PluginManager: "This shadow tiddler provides access to the plugin manager",
SideBarOptions: "This shadow tiddler is used as the contents of the option panel in the right-hand sidebar",
SideBarTabs: "This shadow tiddler is used as the contents of the tabs panel in the right-hand sidebar",
SiteSubtitle: "This shadow tiddler is used as the second part of the page title",
SiteTitle: "This shadow tiddler is used as the first part of the page title",
SiteUrl: "This shadow tiddler should be set to the full target URL for publication",
StyleSheetColors: "This shadow tiddler contains CSS definitions related to the color of page elements. ''DO NOT EDIT THIS TIDDLER'', instead make your changes in the StyleSheet shadow tiddler",
StyleSheet: "This tiddler can contain custom CSS definitions",
StyleSheetLayout: "This shadow tiddler contains CSS definitions related to the layout of page elements. ''DO NOT EDIT THIS TIDDLER'', instead make your changes in the StyleSheet shadow tiddler",
StyleSheetLocale: "This shadow tiddler contains CSS definitions related to the translation locale",
StyleSheetPrint: "This shadow tiddler contains CSS definitions for printing",
SystemSettings: "This tiddler is used to store configuration options for this TiddlyWiki document",
TabAll: "This shadow tiddler contains the contents of the 'All' tab in the right-hand sidebar",
TabMore: "This shadow tiddler contains the contents of the 'More' tab in the right-hand sidebar",
TabMoreMissing: "This shadow tiddler contains the contents of the 'Missing' tab in the right-hand sidebar",
TabMoreOrphans: "This shadow tiddler contains the contents of the 'Orphans' tab in the right-hand sidebar",
TabMoreShadowed: "This shadow tiddler contains the contents of the 'Shadowed' tab in the right-hand sidebar",
TabTags: "This shadow tiddler contains the contents of the 'Tags' tab in the right-hand sidebar",
TabTimeline: "This shadow tiddler contains the contents of the 'Timeline' tab in the right-hand sidebar",
ToolbarCommands: "This shadow tiddler determines which commands are shown in tiddler toolbars",
ViewTemplate: "The HTML template in this shadow tiddler determines how tiddlers look"
});
/***
|''Name:''|zh-HantTranslationPlugin|
|''Description:''|Translation of TiddlyWiki into Traditional Chinese|
|''Source:''|http://tiddlywiki-zh.googlecode.com/svn/trunk/|
|''Subversion:''|http://svn.tiddlywiki.org/Trunk/association/locales/core/zh-Hant/locale.zh-Hant.js|
|''Author:''|BramChen (bram.chen (at) gmail (dot) com)|
|''Version:''|2.6.6|
|''Date:''|Oct 10, 2012|
|''Comments:''|Please make comments at http://groups.google.com/group/TiddlyWiki-zh/|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.4.1|
***/
//{{{
// --
// -- Translateable strings
// --
// Strings in "double quotes" should be translated; strings in 'single quotes' should be left alone
config.locale = 'zh-Hant'; // W3C language tag
config.options.txtFileSystemCharSet = 'BIG5';
if (config.options.txtUserName == 'YourName' || !config.options.txtUserName) // do not translate this line, but do translate the next line
merge(config.options,{txtUserName: "YourName"});
merge(config.tasks,{
save: {text: "儲存", tooltip: "儲存變更至此 TiddlyWiki", action: saveChanges},
importTask: {text: "導入", tooltip: "自其他檔案或伺服器導入文章或套件", content: '<<importTiddlers>>'},
tweak: {text: "選項", tooltip: "改變此 TiddlyWiki 的顯示與行為的設定", content: '<<options>>'},
upgrade: {text: "更新", tooltip: "更新 TiddlyWiki 核心程式", content: '<<upgrade>>'},
plugins: {text: "套件管理", tooltip: "管理已安裝的套件", content: '<<plugins>>'}
});
merge(config.optionsDesc,{
txtUserName: "編輯文章所使用之作者署名",
chkRegExpSearch: "啟用正規式搜尋",
chkCaseSensitiveSearch: "搜尋時,區分大小寫",
chkIncrementalSearch: "隨打即找搜尋",
chkAnimate: "使用動畫顯示",
chkSaveBackups: "儲存變更前,保留備份檔案",
chkAutoSave: "自動儲存變更",
chkGenerateAnRssFeed: "儲存變更時,也儲存 RSS feed",
chkSaveEmptyTemplate: "儲存變更時,也儲存空白範本",
chkOpenInNewWindow: "於新視窗開啟連結",
chkToggleLinks: "點擊已開啟文章連結時,將其關閉",
chkHttpReadOnly: "非本機瀏覽文件時,隱藏編輯功能",
chkForceMinorUpdate: "修改文章時,不變更作者名稱與日期時間",
chkConfirmDelete: "刪除文章前須確認",
chkInsertTabs: "使用 tab 鍵插入定位字元,而非跳至下一個欄位",
txtBackupFolder: "存放備份檔案的資料夾",
txtMaxEditRows: "編輯模式中顯示列數",
txtTheme: "使用的佈景名稱",
txtFileSystemCharSet: "指定儲存文件所在之檔案系統之字集 (僅適用於 Firefox/Mozilla only)"});
// Messages
merge(config.messages,{
customConfigError: "套件載入發生錯誤,詳細請參考 PluginManager",
pluginError: "發生錯誤: %0",
pluginDisabled: "未執行,因標籤設為 'systemConfigDisable'",
pluginForced: "已執行,因標籤設為 'systemConfigForce'",
pluginVersionError: "未執行,套件需較新版本的 TiddlyWiki",
nothingSelected: "尚未作任何選擇,至少需選擇一項",
savedSnapshotError: "此 TiddlyWiki 未正確存檔,詳見 http://www.tiddlywiki.com/#Download",
subtitleUnknown: "(未知)",
undefinedTiddlerToolTip: "'%0' 尚無內容",
shadowedTiddlerToolTip: "'%0' 尚無內容, 但已定義隱藏的預設值",
tiddlerLinkTooltip: "%0 - %1, %2",
externalLinkTooltip: "外部連結至 %0",
noTags: "未設定標籤的文章",
notFileUrlError: "須先將此 TiddlyWiki 存至檔案,才可儲存變更",
cantSaveError: "無法儲存變更。可能的原因有:\n- 你的瀏覽器不支援此儲存功能(Firefox, Internet Explorer, Safari and Opera 經適當設定後可儲存變更)\n- 也可能是你的 TiddlyWiki 檔名包含不合法的字元所致。\n- 或是 TiddlyWiki 文件被改名或搬移。",
invalidFileError: " '%0' 非有效之 TiddlyWiki 文件",
backupSaved: "已儲存備份",
backupFailed: "無法儲存備份",
rssSaved: "RSS feed 已儲存",
rssFailed: "無法儲存 RSS feed ",
emptySaved: "已儲存範本",
emptyFailed: "無法儲存範本",
mainSaved: "主要的TiddlyWiki已儲存",
mainFailed: "無法儲存主要 TiddlyWiki,所作的改變未儲存",
macroError: "巨集 <<%0>> 執行錯誤",
macroErrorDetails: "執行巨集 <<%0>> 時,發生錯誤 :\n%1",
missingMacro: "無此巨集",
overwriteWarning: "'%0' 已存在,[確定]覆寫之",
unsavedChangesWarning: "注意! 尚未儲存變更\n\n[確定]存檔,或[取消]放棄存檔?",
confirmExit: "--------------------------------\n\nTiddlyWiki 以更改內容尚未儲存,繼續的話將遺失這些更動\n\n--------------------------------",
saveInstructions: "SaveChanges",
unsupportedTWFormat: "未支援此 TiddlyWiki 格式:'%0'",
tiddlerSaveError: "儲存文章 '%0' 時,發生錯誤。",
tiddlerLoadError: "載入文章 '%0' 時,發生錯誤。",
wrongSaveFormat: "無法使用格式 '%0' 儲存,請使用標准格式存放",
invalidFieldName: "無效的欄位名稱:%0",
fieldCannotBeChanged: "無法變更欄位:'%0'",
loadingMissingTiddler: "正從伺服器 '%1' 的:\n\n工作區 '%3' 中的 '%2' 擷取文章 '%0'",
upgradeDone: "已更新至 %0 版\n\n點擊 '確定' 重新載入更新後的 TiddlyWiki",
invalidCookie: "無效的 cookie '%0'"});
merge(config.messages.messageClose,{
text: "關閉",
tooltip: "關閉此訊息"});
merge(config.messages,{
backstage: {
open: {text: "控制台", tooltip: "開啟控制台執行編寫工作"},
close: {text: "關閉", tooltip: "關閉控制台"},
prompt: "控制台:",
decal: {
edit: {text: "編輯", tooltip: "編輯 '%0'"}
}}});
merge(config.messages,{
listView: {
tiddlerTooltip: "檢視全文",
previewUnavailable: "(無法預覽)"}});
merge(config.messages,{
dates: {
months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
days: ["星期日", "星期一","星期二", "星期三", "星期四", "星期五", "星期六"],
shortMonths: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"],
shortDays: ["日", "一","二", "三", "四", "五", "六"],
daySuffixes: ["st","nd","rd","th","th","th","th","th","th","th",
"th","th","th","th","th","th","th","th","th","th",
"st","nd","rd","th","th","th","th","th","th","th",
"st"],
am: "上午",
pm: "下午"}});
merge(config.messages.tiddlerPopup,{
});
merge(config.views.wikified.tag,{
labelNoTags: "未設標籤",
labelTags: "標籤: ",
openTag: "開啟標籤 '%0'",
tooltip: "顯示標籤為 '%0' 的文章",
openAllText: "開啟以下所有文章",
openAllTooltip: "開啟以下所有文章",
popupNone: "僅此文標籤為 '%0'"});
merge(config.views.wikified,{
defaultText: "",
defaultModifier: "(未完成)",
shadowModifier: "(預設)",
dateFormat: "YYYY年0MM月0DD日",
createdPrompt: "建立於"});
merge(config.views.editor,{
tagPrompt: "設定標籤之間以空白區隔,[[標籤含空白時請使用雙中括弧]],或點選現有之標籤加入",
defaultText: ""});
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: "搜尋本 Wiki",
placeholder: "",
accessKey: "F",
successMsg: " %0 篇符合條件: %1",
failureMsg: " 無符合條件: %0"});
merge(config.macros.tagging,{
label: "引用標籤:",
labelNotTag: "無引用標籤",
tooltip: "列出標籤為 '%0' 的文章"});
merge(config.macros.timeline,{
dateFormat: "YYYY年0MM月0DD日"});
merge(config.macros.allTags,{
tooltip: "顯示文章- 標籤為'%0'",
noTags: "沒有標籤"});
config.macros.list.all.prompt = "依字母排序";
config.macros.list.missing.prompt = "被引用且內容空白的文章";
config.macros.list.orphans.prompt = "未被引用的文章";
config.macros.list.shadowed.prompt = "這些隱藏的文章已預設內容";
config.macros.list.touched.prompt = "自下載或新增後被修改過的文章";
merge(config.macros.closeAll,{
label: "全部關閉",
prompt: "關閉所有開啟中的 tiddler (編輯中除外)"});
merge(config.macros.permaview,{
label: "引用連結",
prompt: "可存取現有開啟之文章的連結位址"});
merge(config.macros.saveChanges,{
label: "儲存變更",
prompt: "儲存所有文章,產生新的版本",
accessKey: "S"});
merge(config.macros.newTiddler,{
label: "新增文章",
prompt: "新增 tiddler",
title: "新增文章",
accessKey: "N"});
merge(config.macros.newJournal,{
label: "新增日誌",
prompt: "新增 jounal",
accessKey: "J"});
merge(config.macros.options,{
wizardTitle: "增訂的進階選項",
step1Title: "增訂的選項儲存於瀏覽器的 cookies",
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: "永遠刪除所選套件",
listViewTemplate : {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
{name: 'Tiddler', field: 'tiddler', title: "套件", type: 'Tiddler'},
{name: 'Description', field: 'Description', title: "說明", type: 'String'},
{name: 'Version', field: 'Version', title: "版本", type: 'String'},
{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: "是", falseText: "否"},
{name: 'Startup Time', field: 'startupTime', title: "載入時間", type: 'String'},
{name: 'Error', field: 'error', title: "載入狀態", type: 'Boolean', trueText: "錯誤", falseText: "正常"},
{name: 'Log', field: 'log', title: "紀錄", type: 'StringList'}
],
rowClasses: [
{className: 'error', field: 'error'},
{className: 'warning', field: 'warning'}
]},
listViewTemplateReadOnly: {
columns: [
{name: 'Tiddler', field: 'tiddler', title: "套件", type: 'Tiddler'},
{name: 'Description', field: 'Description', title: "說明", type: 'String'},
{name: 'Version', field: 'Version', title: "版本", type: 'String'},
{name: 'Size', field: 'size', tiddlerLink: 'size', title: "大小", type: 'Size'},
{name: 'Executed', field: 'executed', title: "已載入", type: 'Boolean', trueText: "是", falseText: "否"},
{name: 'Startup Time', field: 'startupTime', title: "載入時間", type: 'String'},
{name: 'Error', field: 'error', title: "載入狀態", type: 'Boolean', trueText: "錯誤", falseText: "正常"},
{name: 'Log', field: 'log', title: "紀錄", type: 'StringList'}
],
rowClasses: [
{className: 'error', field: 'error'},
{className: 'warning', field: 'warning'}
]}
});
merge(config.macros.toolbar,{
moreLabel: "+",
morePrompt: "顯示更多工具列命令",
lessLabel: "-",
lessPrompt: "隱藏部份工具列命令",
separator: "|"
});
merge(config.macros.refreshDisplay,{
label: "刷新",
prompt: "刷新此 TiddlyWiki 顯示"
});
merge(config.macros.importTiddlers,{
readOnlyWarning: "TiddlyWiki 於唯讀模式下,不支援導入文章。請由本機(file://)開啟 TiddlyWiki 文件",
wizardTitle: "自其他檔案或伺服器導入文章",
step1Title: "步驟一:指定伺服器或來源文件",
step1Html: "指定伺服器類型:<select name='selTypes'><option value=''>選取...</option></select><br>請輸入網址或路徑:<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: "開啟檔案或",
statusOpenHost: "正與伺服器建立連線",
statusGetWorkspaceList: "正在取得可用之文章清單",
errorGettingTiddlerList: "取得文章清單時發生錯誤,請點選「取消」後重試。",
step2Title: "步驟二:選擇工作區",
step2Html: "輸入工作區名稱:<input type='text' size=50 name='txtWorkspace'><br>...或選擇工作區:<select name='selWorkspace'><option value=''>選取...</option></select>",
cancelLabel: "取消",
cancelPrompt: "取消本次導入動作",
statusOpenWorkspace: "正在開啟工作區",
statusGetTiddlerList: "正在取得可用之文章清單",
errorGettingTiddlerListHttp404: "讀取 tiddlers 發生錯誤,請確認來源網址。點擊[取消]重試。",
errorGettingTiddlerListHttp: "讀取 tiddlers 發生錯誤,請確認來源網址且已啟用<a href='http://enable-cors.org/'>CORS</a>",
errorGettingTiddlerListFile: "從本機檔案讀取 tiddlers 發生錯誤,請確認來源位於此 TiddlyWiki 文件相同的資料夾。點擊[取消]重試。",
step3Title: "步驟三:選擇欲導入之文章",
step3Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='true' name='chkSync'>保持這些文章與伺服器的連結,便於同步後續的變更。</input><br><input type='checkbox' name='chkSave'>儲存此伺服器的詳細資訊於標籤為 'systemServer' 的文章名為:</input> <input type='text' size=25 name='txtSaveTiddler'>",
importLabel: "導入",
importPrompt: "導入所選文章",
confirmOverwriteText: "確定要覆寫這些文章:\n\n%0",
step4Title: "步驟四:正在導入%0 篇文章",
step4Html: "<input type='hidden' name='markReport'></input>", // DO NOT TRANSLATE
doneLabel: "完成",
donePrompt: "關閉",
statusDoingImport: "正在導入文章 ...",
statusDoneImport: "所選文章已導入",
systemServerNamePattern: "%2 位於 %1",
systemServerNamePatternNoWorkspace: "%1",
confirmOverwriteSaveTiddler: "此 tiddler '%0' 已經存在。點擊「確定」以伺服器上料覆寫之,或「取消」不變更後離開",
serverSaveTemplate: "|''Type:''|%0|\n|''URL:''|%1|\n|''Workspace:''|%2|\n\n此文為自動產生紀錄伺服器之相關資訊。",
serverSaveModifier: "(系統)",
listViewTemplate: {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
{name: 'Tiddler', field: 'tiddler', title: "文章", 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: "j無法更新此 TiddlyWiki. 您只能自本機端的 TiddlyWiki 檔案執行更新程序",
errorNotSaved: "執行更新之前,請先儲存變更",
step2Title: "確認更新步驟",
step2Html_downgrade: "您的 TiddlyWiki 將自 %1 版降級至 %0版。<br><br>不建議降級至較舊的版本。",
step2Html_restore: "此 TiddlyWiki 核心已是最新版 (%0)。<br><br>您可以繼續更新作業以確認核心程式未曾毀損。",
step2Html_upgrade: "您的 TiddlyWiki 将自 %1 版更新至 %0 版",
upgradeLabel: "更新",
upgradePrompt: "準備更新作業",
statusPreparingBackup: "準備備份中",
statusSavingBackup: "備份檔案",
errorSavingBackup: "備份檔案時發生問題",
statusLoadingCore: "核心程式載入中",
errorLoadingCore: "載入核心程式時,發生錯誤",
errorCoreFormat: "新版核心程式發生錯誤",
statusSavingCore: "正在儲存新版核心程式",
statusReloadingCore: "新版核心程式載入中",
startLabel: "開始",
startPrompt: "開始更新作業",
cancelLabel: "取消",
cancelPrompt: "取消更新作業",
step3Title: "已取消更新作業",
step3Html: "您已取消更新作業"
});
merge(config.macros.annotations,{
});
merge(config.commands.closeTiddler,{
text: "關閉",
tooltip: "關閉本文"});
merge(config.commands.closeOthers,{
text: "關閉其他",
tooltip: "關閉其他文章"});
merge(config.commands.editTiddler,{
text: "編輯",
tooltip: "編輯本文",
readOnlyText: "檢視",
readOnlyTooltip: "檢視本文之原始內容"});
merge(config.commands.saveTiddler,{
text: "完成",
tooltip: "確定修改"});
merge(config.commands.cancelTiddler,{
text: "取消",
tooltip: "取消修改",
warning: "確定取消對 '%0' 的修改嗎?",
readOnlyText: "完成",
readOnlyTooltip: "返回正常顯示模式"});
merge(config.commands.deleteTiddler,{
text: "刪除",
tooltip: "刪除文章",
warning: "確定刪除 '%0'?"});
merge(config.commands.permalink,{
text: "引用連結",
tooltip: "本文引用連結"});
merge(config.commands.references,{
text: "引用",
tooltip: "引用本文的文章",
popupNone: "本文未被引用"});
merge(config.commands.jump,{
text: "捲頁",
tooltip: "捲頁至其他已開啟的文章"});
merge(config.commands.fields,{
text: "欄位",
tooltip: "顯示此文章的擴充資訊",
emptyText: "此文章沒有擴充欄位",
listViewTemplate: {
columns: [
{name: 'Field', field: 'field', title: "擴充欄位", type: 'String'},
{name: 'Value', field: 'value', title: "內容", type: 'String'}
],
rowClasses: [
],
buttons: [
]}});
merge(config.shadowTiddlers,{
DefaultTiddlers: "[[GettingStarted]]",
GettingStarted: "使用此 TiddlyWiki 的空白範本之前,請先修改以下預設文章:\n* SiteTitle 及 SiteSubtitle:網站的標題和副標題,顯示於頁面上方<br />(在儲存變更後,將顯示於瀏覽器視窗的標題列)。\n* MainMenu:主選單(通常在頁面左側)。\n* DefaultTiddlers:內含一些文章的標題,可於載入TiddlyWiki 後的預設開啟。\n請輸入您的大名,作為所建立/ 編輯的文章署名:<<option txtUserName>>",
MainMenu: "[[使用說明|GettingStarted]]\n\n\n版本:<<version>>",
OptionsPanel: "這些設定將暫存於瀏覽器\n請簽名<<option txtUserName>>\n (範例:WikiWord)\n\n <<option chkSaveBackups>> 儲存備份\n <<option chkAutoSave>> 自動儲存\n <<option chkRegExpSearch>> 正規式搜尋\n <<option chkCaseSensitiveSearch>> 區分大小寫搜尋\n <<option chkAnimate>> 使用動畫顯示\n----\n [[進階選項|AdvancedOptions]]",
SiteTitle: "我的 TiddlyWiki",
SiteSubtitle: "一個可重複使用的個人網頁式筆記本",
SiteUrl: '',
SideBarOptions: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "YYYY年0MM月0DD日" "日誌">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "偏好設定 \u00bb" "變更 TiddlyWiki 選項">>',
SideBarTabs: '<<tabs txtMainTab "最近更新" "依更新日期排序" TabTimeline "全部" "所有文章" TabAll "分類" "所有標籤" TabTags "更多" "其他" TabMore>>',
StyleSheet: '[[StyleSheetLocale]]',
TabMore: '<<tabs txtMoreTab "未完成" "內容空白的文章" TabMoreMissing "未引用" "未被引用的文章" TabMoreOrphans "預設文章" "已預設內容的隱藏文章" TabMoreShadowed>>'
});
merge(config.annotations,{
AdvancedOptions: "此預設文章可以存取一些進階選項。",
ColorPalette: "此預設文章裡的設定值,將決定 ~TiddlyWiki 使用者介面的配色。",
DefaultTiddlers: "當 ~TiddlyWiki 在瀏覽器中開啟時,此預設文章裡列出的文章,將被自動顯示。",
EditTemplate: "此預設文章裡的 HTML template 將決定文章進入編輯模式時的顯示版面。",
GettingStarted: "此預設文章提供基本的使用說明。",
ImportTiddlers: "此預設文章提供存取導入中的文章。",
MainMenu: "此預設文章的內容,為於螢幕左側主選單的內容",
MarkupPreHead: "此文章的內容將加至 TiddlyWiki 文件的 <head> 段落的起始",
MarkupPostHead: "此文章的內容將加至 TiddlyWiki 文件的 <head> 段落的最後",
MarkupPreBody: "此文章的內容將加至 TiddlyWiki 文件的 <body> 段落的起始",
MarkupPostBody: "此文章的內容將加至 TiddlyWiki 文件的 <body> 段落的最後,於 script 區塊之後",
OptionsPanel: "此預設文章的內容,為於螢幕右側副選單中的選項面板裡的內容",
PageTemplate: "此預設文章裡的 HTML template 決定的 ~TiddlyWiki 主要的版面配置",
PluginManager: "此預設文章提供存取套件管理員",
SideBarOptions: "此預設文章的內容,為於螢幕右側副選單中選項面板裡的內容",
SideBarTabs: "此預設文章的內容,為於螢幕右側副選單中的頁籤面板裡的內容",
SiteSubtitle: "此預設文章的內容為頁面的副標題",
SiteTitle: "此預設文章的內容為頁面的主標題",
SiteUrl: "此預設文章的內容須設定為文件發佈時的完整網址",
StyleSheetColors: "此預設文章內含的 CSS 規則,為相關的頁面元素的配色。''勿修改此文'',請於 StyleSheet 中作增修",
StyleSheet: "此預設文章內容可包含 CSS 規則",
StyleSheetLayout: "此預設文章內含的 CSS 規則,為相關的頁面元素的版面配置。''勿修改此文'',請於 StyleSheet 中作增修",
StyleSheetLocale: "此預設文章內含的 CSS 規則,可依翻譯語系做適當調整",
StyleSheetPrint: "此預設文章內含的 CSS 規則,用於列印時的樣式",
SystemSettings: "此預設文章用於儲存此 TiddlyWiki 文件的選項設定",
TabAll: "此預設文章的內容,為於螢幕右側副選單中的「全部」頁籤的內容",
TabMore: "此預設文章的內容,為於螢幕右側副選單中的「更多」頁籤的內容",
TabMoreMissing: "此預設文章的內容,為於螢幕右側副選單中的「未完成」頁籤的內容",
TabMoreOrphans: "此預設文章的內容,為於螢幕右側副選單中的「未引用」頁籤的內容",
TabMoreShadowed: "此預設文章的內容,為於螢幕右側副選單中的「預設文章」頁籤的內容",
TabTags: "此預設文章的內容,為於螢幕右側副選單中的「分類」頁籤的內容",
TabTimeline: "此預設文章的內容,為於螢幕右側副選單中的「最近更新」頁籤的內容",
ToolbarCommands: "此預設文章的內容,為顯示於文章工具列之命令",
ViewTemplate: "此預設文章裡的 HTML template 決定文章顯示的樣子"
});
//}}}
<<manageTiddlers tags:systemConfig listOnly:yes>>
<<tabs txtvChartAddon
"Usage" "usage of vChartAddon script" [[vChartAddon##Usage]]
"Examples" "examples of vChartAddon" [[vChartAddon##Examples]]
"Codes" "source scripts of vChartAddon" [[vChartAddon##ShowCodes]]
"About" "about Visifire" [[vChartAddon##About]]
>>
/%
!About
* Visifire
** ''web site:'' http://www.visifire.com/.
* vChartAddon
** A small charting addon of TiddlyWiki, using Visifire api and a few lines of scripts to render charts.
!Usage
* ''Installation:''
** Download and Install [[Microsoft Silverlight|http://silverlight.net/]]
** Download and Install [[Visifire|http://www.visifire.com/]]
*** Extract the archive and copy __Visifire.js__, __SL.Visifire.Charts.xap__ to the subfoler common/visifire/ of the folder where your TW located.
*** Add followed line to MarkupPreHead for including __Visifire.js__<br />
{{{
<script type="text/javascript" src="common/visifire/Visifire.js"></script>
}}}
** Import vChartAddon to your TW.
** Save and Reload your TW.
* ''Syntax:''
{{{
<<tiddler [[vChartAddon##Render]] with:"DATA" "ID" "WIDTH" "HEIGHT" "PRELOAD" "LOADED">>
}}}
** ''Description of parameters:''
*** ''required:''
**** __DATA__: a tiddler name, tiddler slice name or uri (assigned to an xml file).
**** __ID__: element id of chart, it must be unique.
*** ''optional:''
**** __WIDTH__, __HEIGHT__: size of chart.
**** __PRELOAD__: customized preLoad function of chart.
**** __LOADED__: customized loaded function of chart.
!Examples
* TiddlersBubble
<<list filter [tag[gallery]]>>
!!ShowCodes
<<tiddler [[vChartAddon##QuoteBlock]] with:{{store.getTiddlerText("vChartAddon##Render");}}>>
!Render
<html><div id="$2"></div></html>
<<tiddler __dummy with:{{
(function(){
window._vcWidth = parseInt('$3') || 500;
window._vcHeight = parseInt('$4') || 300;
var vChart = new Visifire("common/visifire/SL.Visifire.Charts.xap",_vcWidth,_vcHeight);
var _vcXmlString = store.getTiddlerText('$1');
if (_vcXmlString){
vChart.setDataXml(_vcXmlString);
}
else{
if (document.location.protocol.indexOf("http") == -1){
// displayMessage("Don't work on local TiddlyWiki!");
// return false;
}
vChart.setDataUri('$1');
}
vChart.preLoad=function(args){
var chart = args[0];
chart.Width = _vcWidth;
chart.Height =_vcHeight;
if (typeof $5 == "function")
$5(args);
}
if (typeof $6 == "function")
vChart.loaded=$6;
vChart.render("$2");
return true;
})();
}}>>
!QuoteBlock
{{{
$1
}}}
!end
%/