Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
Actions waiting for a certain event before they are actionable...
projects that may be undertaken in the future...
development related issues
company contact informations...
social contacts and organisations...
(information) technology related contacts...
Stuff I need to find (or research)...
|''URL:''|http://tiddlywiki.abego-software.de/|
|''Description:''|UdoBorkowski's Extensions for TiddlyWiki|
|''Author:''|UdoBorkowski|
/***
|''Name:''|AccordionMenuPlugin|
|''Description:''|Turn an unordered list into an accordion style menu|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#AccordionMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0|
|''Date:''|03/11/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|
((_@@color:red;modified version for tbGTD@@(''Note'': This version has been modified for tbGTD, i.e. doubleclick opening all categories.)))
!!Usage:
* put {{{<<accordion>>}}} on the line after your unordered list
!!Customizing:
* customize the css via the shadow tiddler [[StyleSheetAccordionMenu]]
* or give the list a custom class by passing the classes as parameters to the macro.
** Eg: {{{<<accordion ClassName1 ClassName2>>}}}
***/
//{{{
config.macros.accordion={
dblClick:true, //allows doubleclick to open all
dropchar:"", //" \u00BB",
handler:function(place,macroName,params,wikifier,paramString,tiddler){
list=findRelated(place.lastChild,"UL","tagName","previousSibling");
if(!list)return;
addClass(list,"accordion");
if(params.length)addClass(list,paramString);
this.fixLinks(list.childNodes);
},
fixLinks:function(els){
for(var i=0;i<els.length;i++){
if(els[i].tagName.toLowerCase()=="li"){
var link=findRelated(els[i].firstChild,"A","tagName","nextSibling");
if(!link){
var ih=els[i].firstChild.data;
els[i].removeChild(els[i].firstChild);
link=createTiddlyElement(null,"a",null,null,ih+this.dropchar,{href:"javascript:;"});
els[i].insertBefore(link,els[i].firstChild);
}
else{
link.firstChild.data=link.firstChild.data + this.dropchar;
removeClass(link,"tiddlyLinkNonExisting");
}
link.onclick=this.show;
addClass(link,'main');
if(this.dblClick)link.ondblclick=this.showall;
}
}
},
showall:function(e){
var i,u=this.parentNode.parentNode;
for(i=0;i<u.childNodes.length;i++)u.childNodes[i].setAttribute('class','accordion-active')
},
show:function(e){
var list=this.parentNode.parentNode;
var els=list.childNodes;
for(var i=0;i<els.length;i++){removeClass(els[i],"accordion-active");}
addClass(this.parentNode,"accordion-active");
}
}
config.shadowTiddlers["StyleSheetAccordionMenu"] =
"ul.accordion li ul {display:none;}\n"+
"ul.accordion li.accordion-active ul {display:block;}\n"+
store.addNotification("StyleSheetAccordionMenu",refreshStyles);
//}}}
When you click on the blue [[download|Download]] button, the website will detect your browser and operating system, and trigger a download for either an empty ~TiddlyWiki file or, if you're running [[Safari]] or [[Opera]], a zip file which also includes the TiddlySaver file. This is version <<version>> of ~TiddlyWiki ([[release notes|http://trac.tiddlywiki.org/wiki/History]]).
Advanced users may find these download options helpful (right click the link and select "Save as" to download):
*[[An empty TiddlyWiki file|http://www.tiddlywiki.com/empty.html]]
*[[A zip file containing an empty TiddlyWiki file plus a TiddlySaver file|http://www.tiddlywiki.com/empty.zip]]
*[[A copy of this website (TiddlyWiki.com) minus images|#]]
*[[The TiddlySaver.jar file on its own|http://www.tiddlywiki.com/TiddlySaver.jar]]
Finally, these links may be useful:
*[[Installation]] instructions for the main browsers
*A list of supported [[Browsers]]
Rename this tiddler to 'ColorPalette' to enable this color scheme
Background: #ffc
Foreground: #000
PrimaryPale: #fc8
PrimaryLight: #f81
PrimaryMid: #b40
PrimaryDark: #410
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #e88
TertiaryLight: #c66
TertiaryMid: #944
TertiaryDark: #633
This tiddler shows some more complex effects that can be obtained with cunning use of CSS. Not all of these will work properly on all browsers because of differences in CSS implementation, but they should fail gracefully.
You can have special formatting for a specific, named tiddler like this:
{{{
#tiddlerHelloThere .title {
background-color: #99aaee;
}
}}}
Or for the first displayed tiddler:
{{{
div.tiddler:first-child .title {
font-size: 28pt;
}
}}}
Or just for the first line of every tiddler:
{{{
.viewer:first-line {
background-color: #999999;
}
}}}
Or just for the first letter of every tiddler:
{{{
.viewer:first-letter {
float: left;
font-size: 28pt;
font-weight: bold;
}
}}}
Or just for tiddlers tagged with a particular tag (note that this won't work for tags that contain spaces):
{{{
div[tags~="welcome"].tiddler .viewer {
background-color: #ffccaa;
}
div[tags~="features"].tiddler .viewer {
background-color: #88aaff;
}
}}}
If you check this box in the InterfaceOptions, TiddlyWiki will automatically SaveChanges every time you edit a tiddler. In that way there's a lot less chance of you losing any information.
However, if you also have the SaveBackups checkbox ticked, you'll end up with a lot of archived files. You may prefer to select either one or the other.
One of the great strengths of TiddlyWiki is the way that its interface can be customised by editting various shadow tiddlers. However, a problem that has consistently emerged is the difficulty of reconciling the needs of authors, who need access to the full array of TiddlyWiki features, and the needs of ordinary readers, who generally benefit from seeing a restricted set of functionality more suited to their needs.
The new backstage area in release 2.2 offers a solution to this conundrum by providing a consistent way of accessing authoring functionality that is independent of the interface customisations (so, even if you blast away the contents of your PageTemplate, you can still access the backstage area).
The backstage area is only available when a TiddlyWiki is edittable - typically meaning that it's been opened off of a {{{file://}}} URL. It appears as an unobtrusive link in the topright corner of the page. Clicking it reveals the backstage toolbar consisting of commands like {{{saveChanges}}} and drop-down tasks like ImportTiddlers, SyncMacro, PluginManager and Tweak (which provides access to the new OptionsMacro).
|''URL:''|http://tiddlywiki.bidix.info/|
|''Description:''|Repository for BidiX's TiddlyWiki Extensions|
|''Author:''|BidiX|
To make quoted bits of text stand out, you can use BlockQuotes within your tiddlers, like this:
JeremyRuston said:
<<<
A TiddlyWiki is like a blog because it's divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole.
<<<
Like BulletPoints and NumberedBulletPoints, you can have multiple levels of BlockQuotes. Just edit this tiddler to see how it's done.
>level 1
>level 1
>>level 2
>>level 2
>>>level 3
>>>level 3
>>level 2
>level 1
|''URL:''|http://bob.mcelrath.org/plugins.html|
|''Description:''|Bob McElrath's Plugins|
|''Author:''|BobMcElrath|
Here is a table of PC / Mac / Linux browsers that work with ~TiddlyWiki:
|!Browser |!Version |!Allows changes to be saved locally?|
|InternetExplorer |6.0+ |Yes |
|FireFox |1.0+ |Yes |
|[[Safari]] |1.0+ |Yes, using TiddlySaver plugin|
|[[Opera]] |? |Yes, using TiddlySaver plugin|
|Netscape Navigator |7.0+ |Yes |
|[[Camino]] |1.0+ |Yes |
|Chrome |All |No |
|[[Wii]] |All |No |
Please [[let us know|http://groups.google.com/group/TiddlyWiki]] of any additions or corrections.
Creating BulletPoints is simple.
* Just add an asterisk
* at the beginning of a line.
** If you want to create sub-bullets
** start the line with two asterisks
*** And if you want yet another level
*** use three asterisks
* Edit this tiddler to see how it's done
* You can also do NumberedBulletPoints
/***
|Name|CalendarPlugin|
|Source|http://www.TiddlyTools.com/#CalendarPlugin|
|Version|1.5.0|
|Author|Eric Shulman|
|Original Author|SteveRumsby|
|License|unknown|
|~CoreVersion|2.1|
|Type|plugin|
|Description|display monthly and yearly calendars|
NOTE: For //enhanced// date popup display, optionally install [[DatePlugin]] and [[ReminderMacros]]
!!!Usage:
<<<
|{{{<<calendar>>}}}|full-year calendar for the current year|
|{{{<<calendar year>>}}}|full-year calendar for the specified year|
|{{{<<calendar year month>>}}}|one month calendar for the specified month and year|
|{{{<<calendar thismonth>>}}}|one month calendar for the current month|
|{{{<<calendar lastmonth>>}}}|one month calendar for last month|
|{{{<<calendar nextmonth>>}}}|one month calendar for next month|
|{{{<<calendar +n>>}}}<br>{{{<<calendar -n>>}}}|one month calendar for a month +/- 'n' months from now|
<<<
!!!Configuration:
<<<
|''First day of week:''<br>{{{config.options.txtCalFirstDay}}}|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|
|''First day of weekend:''<br>{{{config.options.txtCalStartOfWeekend}}}|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|
<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//
|''Week number display format:''<br>{{{config.options.txtWeekNumberDisplayFormat }}}|<<option txtWeekNumberDisplayFormat >>|
|''Week number link format:''<br>{{{config.options.txtWeekNumberLinkFormat }}}|<<option txtWeekNumberLinkFormat >>|
<<<
!!!Code
***/
//{{{
version.extensions.CalendarPlugin= { major: 1, minor: 5, revision: 0, date: new Date(2009,5,31)};
//}}}
//{{{
if(config.options.txtCalFirstDay == undefined)
config.options.txtCalFirstDay = 0;
if(config.options.txtCalStartOfWeekend == undefined)
config.options.txtCalStartOfWeekend = 5;
if(config.options.chkDisplayWeekNumbers == undefined)
config.options.chkDisplayWeekNumbers = false;
if(config.options.chkDisplayWeekNumbers)
config.options.txtCalFirstDay = 0;
if(config.options.txtWeekNumberDisplayFormat == undefined)
config.options.txtWeekNumberDisplayFormat = 'w0WW';
if(config.options.txtWeekNumberLinkFormat == undefined)
config.options.txtWeekNumberLinkFormat = 'YYYY-w0WW';
if(config.options.txtCalendarReminderTags == undefined)
config.options.txtCalendarReminderTags = 'reminder';
config.macros.calendar = {
monthnames:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
daynames:['M','T','W','T','F','S','S'],
todaybg:'#070',
weekendbg:'#333',
monthbg:'#111',
holidaybg:'#093',
journalDateFmt:'DD MMM YYYY',
monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],
holidays:[ ] // for customization see [[CalendarPluginConfig]]
};
//}}}
//{{{
function calendarIsHoliday(date)
{
var longHoliday = date.formatString('0DD/0MM/YYYY');
var shortHoliday = date.formatString('0DD/0MM');
for(var i = 0; i < config.macros.calendar.holidays.length; i++) {
if( config.macros.calendar.holidays[i]==longHoliday
|| config.macros.calendar.holidays[i]==shortHoliday)
return true;
}
return false;
}
//}}}
//{{{
config.macros.calendar.handler = function(place,macroName,params) {
var calendar = createTiddlyElement(place, 'table', null, 'calendar', null);
calendar.cellPadding="0";calendar.cellSpacing="0";
var tbody = createTiddlyElement(calendar, 'tbody');
var today = new Date();
var year = today.getYear();
if (year<1900) year+=1900;
// get journal format from SideBarOptions (ELS 5/29/06 - suggested by MartinBudden)
var text = store.getTiddlerText('SideBarOptions');
var re = new RegExp('<<(?:newJournal)([^>]*)>>','mg'); var fm = re.exec(text);
if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }
var month=-1;
if (params[0] == 'thismonth') {
var month=today.getMonth();
} else if (params[0] == 'lastmonth') {
var month = today.getMonth()-1; if (month==-1) { month=11; year--; }
} else if (params[0] == 'nextmonth') {
var month = today.getMonth()+1; if (month>11) { month=0; year++; }
} else if (params[0]&&'+-'.indexOf(params[0].substr(0,1))!=-1) {
var month = today.getMonth()+parseInt(params[0]);
if (month>11) { year+=Math.floor(month/12); month%=12; };
if (month<0) { year+=Math.floor(month/12); month=12+month%12; }
} else if (params[0]) {
year = params[0];
if(params[1]) month=parseInt(params[1])-1;
if (month>11) month=11; if (month<0) month=0;
}
if (month!=-1) {
cacheReminders(new Date(year, month, 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, month);
} else {
cacheReminders(new Date(year, 0, 1, 0, 0), 366);
createCalendarYear(tbody, year);
}
window.reminderCacheForCalendar = null;
}
//}}}
//{{{
// cache used to store reminders while the calendar is being rendered
// it will be renulled after the calendar is fully rendered.
window.reminderCacheForCalendar = null;
//}}}
//{{{
function cacheReminders(date, leadtime)
{
if (window.findTiddlersWithReminders == null) return;
window.reminderCacheForCalendar = {};
var leadtimeHash = [];
leadtimeHash [0] = 0;
leadtimeHash [1] = leadtime;
var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);
for(var i = 0; i < t.length; i++) {
//just tag it in the cache, so that when we're drawing days, we can bold this one.
window.reminderCacheForCalendar[t[i]['matchedDate']] = 'reminder:' + t[i]['params']['title'];
}
}
//}}}
//{{{
function createCalendarOneMonth(calendar, year, mon)
{
var row = createTiddlyElement(calendar, 'tr');
createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon]+' '+year, true, year, mon);
row = createTiddlyElement(calendar, 'tr');
createCalendarDayHeader(row, 1);
createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarMonth(calendar, year, mon)
{
var row = createTiddlyElement(calendar, 'tr');
createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon]+' '+ year, false, year, mon);
row = createTiddlyElement(calendar, 'tr');
createCalendarDayHeader(row, 1);
createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarYear(calendar, year)
{
var row;
row = createTiddlyElement(calendar, 'tr');
var back = createTiddlyElement(row, 'td');
var backHandler = function() {
removeChildren(calendar);
createCalendarYear(calendar, parseInt(year)-1);
return false; // consume click
};
createTiddlyButton(back, '<', 'Previous year', backHandler);
back.align = 'center';
var yearHeader = createTiddlyElement(row, 'td', null, 'calendarYear', year);
yearHeader.align = 'center';
yearHeader.setAttribute('colSpan',config.options.chkDisplayWeekNumbers?22:19);//wn**
var fwd = createTiddlyElement(row, 'td');
var fwdHandler = function() {
removeChildren(calendar);
createCalendarYear(calendar, parseInt(year)+1);
return false; // consume click
};
createTiddlyButton(fwd, '>', 'Next year', fwdHandler);
fwd.align = 'center';
createCalendarMonthRow(calendar, year, 0);
createCalendarMonthRow(calendar, year, 3);
createCalendarMonthRow(calendar, year, 6);
createCalendarMonthRow(calendar, year, 9);
}
//}}}
//{{{
function createCalendarMonthRow(cal, year, mon)
{
var row = createTiddlyElement(cal, 'tr');
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);
row = createTiddlyElement(cal, 'tr');
createCalendarDayHeader(row, 3);
createCalendarDayRows(cal, year, mon);
}
//}}}
//{{{
function createCalendarMonthHeader(cal, row, name, nav, year, mon)
{
var month;
if (nav) {
var back = createTiddlyElement(row, 'td');
back.align = 'center';
back.style.background = config.macros.calendar.monthbg;
var backMonHandler = function() {
var newyear = year;
var newmon = mon-1;
if(newmon == -1) { newmon = 11; newyear = newyear-1;}
removeChildren(cal);
cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, newmon);
return false; // consume click
};
createTiddlyButton(back, '<', 'Previous month', backMonHandler);
month = createTiddlyElement(row, 'td', null, 'calendarMonthname')
createTiddlyLink(month,name,true);
month.setAttribute('colSpan', config.options.chkDisplayWeekNumbers?6:5);//wn**
var fwd = createTiddlyElement(row, 'td');
fwd.align = 'center';
fwd.style.background = config.macros.calendar.monthbg;
var fwdMonHandler = function() {
var newyear = year;
var newmon = mon+1;
if(newmon == 12) { newmon = 0; newyear = newyear+1;}
removeChildren(cal);
cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, newmon);
return false; // consume click
};
createTiddlyButton(fwd, '>', 'Next month', fwdMonHandler);
} else {
month = createTiddlyElement(row, 'td', null, 'calendarMonthname', name)
month.setAttribute('colSpan',config.options.chkDisplayWeekNumbers?8:7);//wn**
}
month.align = 'center';
month.style.background = config.macros.calendar.monthbg;
}
//}}}
//{{{
function createCalendarDayHeader(row, num)
{
var cell;
for(var i = 0; i < num; i++) {
if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, 'td');//wn**
for(var j = 0; j < 7; j++) {
var d = j + (config.options.txtCalFirstDay - 0);
if(d > 6) d = d - 7;
cell = createTiddlyElement(row, 'td', null, null);
createTiddlyElement(cell,'span',null,'button',config.macros.calendar.daynames[d]);
if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))
cell.style.background = config.macros.calendar.weekendbg;
}
}
}
//}}}
//{{{
function createCalendarDays(row, col, first, max, year, mon) {
var i;
if (config.options.chkDisplayWeekNumbers){
if (first<=max) {
var ww = new Date(year,mon,first);
var td=createTiddlyElement(row, 'td');//wn**
var link=createTiddlyLink(td,ww.formatString(config.options.txtWeekNumberLinkFormat),false,"weekNo");
link.appendChild(document.createTextNode(
ww.formatString(config.options.txtWeekNumberDisplayFormat)));
}
else createTiddlyElement(row, 'td');//wn**
}
for(i = 0; i < col; i++)
createTiddlyElement(row, 'td');
var day = first;
for(i = col; i < 7; i++) {
var d = i + (config.options.txtCalFirstDay - 0);
if(d > 6) d = d - 7;
var daycell = createTiddlyElement(row, 'td');
var isaWeekend=((d==(config.options.txtCalStartOfWeekend-0)
|| d==(config.options.txtCalStartOfWeekend-0+1))?true:false);
if(day > 0 && day <= max) {
var celldate = new Date(year, mon, day);
// ELS 10/30/05 - use <<date>> macro's showDate() function to create popup
// ELS 05/29/06 - use journalDateFmt
if (window.showDate) showDate(daycell,celldate,'popup','DD',
config.macros.calendar.journalDateFmt,true, isaWeekend);
else {
if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;
var title = celldate.formatString(config.macros.calendar.journalDateFmt);
if(calendarIsHoliday(celldate))
daycell.style.background = config.macros.calendar.holidaybg;
var now=new Date();
if ((now-celldate>=0) && (now-celldate<86400000)) // is today?
daycell.style.background = config.macros.calendar.todaybg;
if(window.findTiddlersWithReminders == null) {
var link = createTiddlyLink(daycell, title, false);
link.appendChild(document.createTextNode(day));
} else
var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);
}
}
day++;
}
}
//}}}
//{{{
// Create a pop-up containing:
// * a link to a tiddler for this date
// * a 'new tiddler' link to add a reminder for this date
// * links to current reminders for this date
// NOTE: this code is only used if [[ReminderMacros]] is installed AND [[DatePlugin]] is //not// installed.
function onClickCalendarDate(ev) { ev=ev||window.event;
var d=new Date(this.getAttribute('title')); var date=d.formatString(config.macros.calendar.journalDateFmt);
var p=Popup.create(this); if (!p) return;
createTiddlyLink(createTiddlyElement(p,'li'),date,true);
var rem='\\n\\<\\<reminder day:%0 month:%1 year:%2 title: \\>\\>';
rem=rem.format([d.getDate(),d.getMonth()+1,d.getYear()+1900]);
var cmd="<<newTiddler label:[[new reminder...]] prompt:[[add a new reminder to '%0']]"
+" title:[[%0]] text:{{store.getTiddlerText('%0','')+'%1'}} tag:%2>>";
wikify(cmd.format([date,rem,config.options.txtCalendarReminderTags]),p);
createTiddlyElement(p,'hr');
var t=findTiddlersWithReminders(d,[0,31],null,1);
for(var i=0; i<t.length; i++) {
var link=createTiddlyLink(createTiddlyElement(p,'li'), t[i].tiddler, false);
link.appendChild(document.createTextNode(t[i]['params']['title']));
}
Popup.show(); ev.cancelBubble=true; if (ev.stopPropagation) ev.stopPropagation(); return false;
}
//}}}
//{{{
function calendarMaxDays(year, mon)
{
var max = config.macros.calendar.monthdays[mon];
if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) max++;
return max;
}
//}}}
//{{{
function createCalendarDayRows(cal, year, mon)
{
var row = createTiddlyElement(cal, 'tr');
var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first1 < 0) first1 = first1 + 7;
var day1 = -first1 + 1;
var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first2 < 0) first2 = first2 + 7;
var day2 = -first2 + 1;
var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first3 < 0) first3 = first3 + 7;
var day3 = -first3 + 1;
var max1 = calendarMaxDays(year, mon);
var max2 = calendarMaxDays(year, mon+1);
var max3 = calendarMaxDays(year, mon+2);
while(day1 <= max1 || day2 <= max2 || day3 <= max3) {
row = createTiddlyElement(cal, 'tr');
createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;
createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;
}
}
//}}}
//{{{
function createCalendarDayRowsSingle(cal, year, mon)
{
var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first1 < 0) first1 = first1+ 7;
var day1 = -first1 + 1;
var max1 = calendarMaxDays(year, mon);
while(day1 <= max1) {
row = createTiddlyElement(cal, 'tr');
createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
}
}
//}}}
//{{{
setStylesheet('.calendar, .calendar table, .calendar th, .calendar tr, .calendar td { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }', 'calendarStyles');
//}}}
The Mozilla-based [[Camino browser|http://www.caminobrowser.org/]] on Macintosh OS X works well with TiddlyWiki, including the ability to SaveChanges.
Abandons any pending edits to the current tiddler, and switches it the default view. It is used with the ToolbarMacro like this:
{{{
<<toolbar cancelTiddler>>
}}}
When you upload a TiddlyWiki to a web server, if doesn't load properly, it may be a CharacterEncoding issue.
TiddlyWiki uses Unicode ~UTF-8 encoding and won't load properly if your host is serving it as ~ISO-8859-1. You should be able to check this by loading another page on the server in FireFox and selecting 'Page Info' on the 'Tools' menu.
If this is the case, it should be reasonably easy to sort out. We recommend that you contact your server host and ask them to serve it in ~UTF-8 mode. If you are more technically hands-on, you may be able to [[solve the issue yourself|http://www.w3.org/International/questions/qa-htaccess-charset]].
/*{{{*/
span.chunkyButton {
display: block;
padding: 0;
margin: 0;
border: solid 2px [[ColorPalette::Foreground]];
}
span.chunkyButton a.button, span.chunkyButton a:active.button {
white-space: nowrap;
font-weight: bold;
font-size:1.8em;
color: [[ColorPalette::Background]];
background-color: [[ColorPalette::PrimaryMid]];
text-align: center;
padding: 1em 3em;
margin: 0;
border-style: none;
border-top: solid 1px [[ColorPalette::Background]];
display: block;
}
span.chunkyButton a.button:hover {
background-color: [[ColorPalette::PrimaryDark]];
border-style: none;
color: [[ColorPalette::Background]];
border-top: solid 1px [[ColorPalette::PrimaryPale]];
}
.downloadButton table,
.downloadButton table tr,
.downloadButton table td {
border-style:none;
vertical-align:bottom;
padding:0 0.5em 0 0;
margin:0 0 0.2em 0;
}
/*}}}*/
Closes all other open tiddlers, except for any that are being editted. It is used with the ToolbarMacro like this:
{{{
<<toolbar closeOthers>>
}}}
Closes the current tiddler, regardless of whether it is being editted. It is used with the ToolbarMacro like this:
{{{
<<toolbar closeTiddler>>
}}}
Background: #fff
Foreground: #000
PrimaryPale: #EEE
PrimaryLight: #777
PrimaryMid: #111
PrimaryDark: #000
SecondaryPale: #EEF
SecondaryLight: #CCF
SecondaryMid: #69C
SecondaryDark: #36C
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #333
Error: #f88
<<tiddler [[Help and Support]]>>
PageTemplate
|>|>|SiteTitle - SiteSubtitle|
|MainMenu|DefaultTiddlers<br><br><br><br>ViewTemplate<br><br>EditTemplate|SideBarOptions|
|~|~|OptionsPanel|
|~|~|AdvancedOptions|
|~|~|<<tiddler Configuration.SideBarTabs>>|
''StyleSheet:'' StyleSheetColors - StyleSheetLayout - StyleSheetPrint
SiteUrl
SideBarTabs
|[[Timeline|TabTimeline]]|[[All|TabAll]]|[[Tags|TabTags]]|>|>|[[More|TabMore]] |
|>|>||[[Missing|TabMoreMissing]]|[[Orphans|TabMoreOrphans]]|[[Shadowed|TabMoreShadowed]]|
@@margin-left:.5em;<<slider chkContents SideBarTabs "contents »" "show
lists of tiddlers contained in this document">>@@
~TiddlyWiki has an enthusiastic and friendly [[Community|Help and Support]] of people around the world helping to grow and improve it. But there's always more to do and we welcome any offers of assistance. There are many ways that you can help:
* Testing and [[reporting bugs|http://trac.tiddlywiki.org/wiki/ReportingBugs]] against the core code. Clear, easily reproducible bug reports are incredibly useful and really help the team improve the quality of ~TiddlyWiki
* [[Contributing code|http://trac.tiddlywiki.org/wiki/ContributingCode]]
* [[Making translations|http://trac.tiddlywiki.org/wiki/Translations]]
* Documentation needs planning, writing and editing, particularly user guide information at http://www.tiddlywiki.org
If you would like to make a financial contribution, ~TiddlyWiki is owned by the not-for-profit [[UnaMesa Foundation|http://www.unamesa.org/]] which welcomes donations.
You can wrap any text in an HTML {{{<span>}}} or {{{<div>}}} with a specified CSS class. This allows custom CSS styling in a nice, modular way. By placing a rule in your StyleSheet tiddler like {{{.wrappingClass{color: #666; background: #bbb} }}} you can markup a piece of text in the tiddler using this code:
{{{
{{wrappingClass{Text that is now accentuated}}}
}}}
{{wrappingClass{Text that is now accentuated}}}
By default, the text is placed in a {{{<span>}}}. To use a {{{<div>}}} instead, insert a line break before the text:
{{{
{{wrappingClass{
Text that is now accentuated}}}
}}}
{{wrappingClass{
Text that is now accentuated}}}
Sometimes it's necessary to include custom HTML markup in the {{{<head>}}} of a TiddlyWiki file - typically for compatibility with ad serving software, external libraries, or for custom meta tags. The CustomMarkup operation defines four shadow tiddlers whose contents are spliced into the saved HTML file. (If you do a view/source you'll see the markers referred to below).
|!Title |!Location |!Marker |
|MarkupPreHead |Start of the {{{<head>}}} section |{{{<!--PRE-HEAD-START-->}}} |
|MarkupPostHead |End of the {{{<head>}}} section |{{{<!--POST-HEAD-START-->}}} |
|MarkupPreBody |Start of the {{{<body>}}} section |{{{<!--PRE-BODY-START-->}}} |
|MarkupPostBody |End of the {{{<body>}}} section |{{{<!--POST-BODY-START-->}}} |
MarkupPreHead is the only one with shadow content: a link to the default location of the RSS feed.
Starting with this revision, you can skin TiddlyWiki with a special StyleSheet tiddler containing your own CSS style sheet declarations. Unlike hacking the HTML directly, the StyleSheet tiddler withstands upgrading to a new version of the TiddlyWiki code (see HowToUpgrade). You can also use the NestedStyleSheets feature to structure your CSS declarations.
The ExampleStyleSheet shows some of the basic options you can control (see AnotherExampleStyleSheet for more complex examples). SaveChanges and then click refresh in your browser to see StyleSheet changes. Any errors in your CSS syntax will be caught and displayed, but they shouldn't stop TiddlyWiki from working.
You can customise the appearance and behaviour of TiddlyWiki to almost any degree you want:
* Install [[Plugins]] to extend the core functionality (find them at [[TiddlyVault|http://tiddlyvault.tiddlyspot.com/]] or you can try [[writing or adapting your own|http://tiddlywiki.org/wiki/Plugin_Development]])
* Use the ColorPalette to change the basic colour scheme
* Use built in [[Formatting|ExtendedFormatting]] techniques
* Create a CustomStyleSheet for finer grained control over the appearance
* Customise the PageTemplate, ViewTemplate or EditTemplate to change the composition of the page and the layout of individual tiddlers
* Use off-the-shelf themes from [[TiddlyThemes|http://tiddlythemes.com/]]
* Visit the [[Configuration]] summary to see all the special configuration tiddlers
* Use TiddlyBookmarklets for low level hacking of TiddlyWiki documents
There are also a bunch of TiddlyWikiTools that you can use to enhance TiddlyWiki.
Several [[Macros]] including the TodayMacro take a DateFormatString as an optional argument. This string can be a combination of ordinary text, with some special characters that get substituted by parts of the date:
* {{{DDD}}} - day of week in full (eg, "Monday")
* {{{ddd}}} - short day of week (eg, "Mon")
* {{{DD}}} - day of month
* {{{0DD}}} - adds a leading zero
* {{{DDth}}} - adds a suffix
* {{{WW}}} - ISO-8601 week number of year
* {{{0WW}}} - adds a leading zero
* {{{MMM}}} - month in full (eg, "July")
* {{{mmm}}} - short month (eg, "Jul")
* {{{MM}}} - month number
* {{{0MM}}} - adds leading zero
* {{{YYYY}}} - full year
* {{{YY}}} - two digit year
* {{{wYYYY}}} - full year with respect to week number
* {{{wYY}}} two digit year with respect to week number
* {{{hh}}} - hours
* {{{0hh}}} - adds a leading zero
* {{{hh12}}} - hours in 12 hour clock
* {{{0hh12}}} - hours in 12 hour clock with leading zero
* {{{mm}}} - minutes
* {{{0mm}}} - minutes with leading zero
* {{{ss}}} - seconds
* {{{0ss}}} - seconds with leading zero
* {{{am}}} or {{{pm}}} - lower case AM/PM indicator
* {{{AM}}} or {{{PM}}} - upper case AM/PM indicator
/***
|Name|[[DatePlugin]]|
|Source|http://www.TiddlyTools.com/#DatePlugin|
|Documentation|http://www.TiddlyTools.com/#DatePluginInfo|
|Version|2.7.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|formatted dates plus popup menu with 'journal' link, changes and (optional) reminders|
This plugin provides a general approach to displaying formatted dates and/or links and popups that permit easy navigation and management of tiddlers based on their creation/modification dates.
!!!!!Documentation
>see [[DatePluginInfo]]
!!!!!Configuration
<<<
<<option chkDatePopupHideCreated>> omit 'created' section from date popups
<<option chkDatePopupHideChanged>> omit 'changed' section from date popups
<<option chkDatePopupHideTagged>> omit 'tagged' section from date popups
<<option chkDatePopupHideReminders>> omit 'reminders' section from date popups
<<option chkShowJulianDate>> display Julian day number (1-365) below current date
see [[DatePluginConfig]] for additional configuration settings, for use in calendar displays, including:
*date formats
*color-coded backgrounds
*annual fixed-date holidays
*weekends
<<<
!!!!!Code
***/
//{{{
version.extensions.DatePlugin= {major: 2, minor: 7, revision: 1, date: new Date(2009,5,31)};
config.macros.date = {
format: 'YYYY.0MM.0DD', // default date display format
linkformat: 'YYYY.0MM.0DD', // 'dated tiddler' link format
linkedbg: '#033',
todaybg: '#070',
weekendbg: '#333',
holidaybg: '#662',
createdbg: '#026',
modifiedsbg: '#406',
remindersbg: '#800',
weekend: [ 1,0,0,0,0,0,1 ], // [ day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6 ],
holidays: [ '01/01', '07/04', '07/24', '11/24' ]
// NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)
};
config.macros.date.handler = function(place,macroName,params)
{
// default: display current date
var now =new Date();
var date=now;
var mode='display';
if (params[0]&&['display','popup','link'].contains(params[0].toLowerCase()))
{ mode=params[0]; params.shift(); }
if (!params[0] || params[0]=='today')
{ params.shift(); }
else if (params[0]=='filedate')
{ date=new Date(document.lastModified); params.shift(); }
else if (params[0]=='tiddler')
{ date=store.getTiddler(story.findContainingTiddler(place).id.substr(7)).modified; params.shift(); }
else if (params[0].substr(0,8)=='tiddler:')
{ var t; if ((t=store.getTiddler(params[0].substr(8)))) date=t.modified; params.shift(); }
else {
var y = eval(params.shift().replace(/Y/ig,(now.getYear()<1900)?now.getYear()+1900:now.getYear()));
var m = eval(params.shift().replace(/M/ig,now.getMonth()+1));
var d = eval(params.shift().replace(/D/ig,now.getDate()+0));
date = new Date(y,m-1,d);
}
// date format with optional custom override
var format=this.format; if (params[0]) format=params.shift();
var linkformat=this.linkformat; if (params[0]) linkformat=params.shift();
showDate(place,date,mode,format,linkformat);
}
window.showDate=showDate;
function showDate(place,date,mode,format,linkformat,autostyle,weekend)
{
mode =mode||'display';
format =format||config.macros.date.format;
linkformat=linkformat||config.macros.date.linkformat;
// format the date output
var title=date.formatString(format);
var linkto=date.formatString(linkformat);
// just show the formatted output
if (mode=='display') { place.appendChild(document.createTextNode(title)); return; }
// link to a 'dated tiddler'
var link = createTiddlyLink(place, linkto, false);
link.appendChild(document.createTextNode(title));
link.title = linkto;
link.date = date;
link.format = format;
link.linkformat = linkformat;
// if using a popup menu, replace click handler for dated tiddler link
// with handler for popup and make link text non-italic (i.e., an 'existing link' look)
if (mode=='popup') {
link.onclick = onClickDatePopup;
link.style.fontStyle='normal';
}
// format the popup link to show what kind of info it contains (for use with calendar generators)
if (autostyle) setDateStyle(place,link,weekend);
}
//}}}
//{{{
// NOTE: This function provides default logic for setting the date style when displayed in a calendar
// To customize the date style logic, please see[[DatePluginConfig]]
function setDateStyle(place,link,weekend) {
// alias variable names for code readability
var date=link.date;
var fmt=link.linkformat;
var linkto=date.formatString(fmt);
var cmd=config.macros.date;
if ((weekend!==undefined?weekend:isWeekend(date))&&(cmd.weekendbg!=''))
{ place.style.background = cmd.weekendbg; }
if (hasModifieds(date)||hasCreateds(date)||hasTagged(date,fmt))
{ link.style.fontStyle='normal'; link.style.fontWeight='bold'; }
if (hasReminders(date))
{ link.style.textDecoration='underline'; }
if (isToday(date))
{ link.style.textDecoration = 'underline';}
if (isHoliday(date)&&(cmd.holidaybg!=''))
{ place.style.background = cmd.holidaybg; }
if (hasCreateds(date)&&(cmd.createdbg!=''))
{ place.style.background = cmd.createdbg; }
if (hasModifieds(date)&&(cmd.modifiedsbg!=''))
{ place.style.background = cmd.modifiedsbg; }
if ((hasTagged(date,fmt)||store.tiddlerExists(linkto))&&(cmd.linkedbg!=''))
{ place.style.background = cmd.linkedbg; }
if (hasReminders(date)&&(cmd.remindersbg!=''))
{ place.style.background = cmd.remindersbg; }
if (isToday(date)&&(cmd.todaybg!=''))
{ place.style.background = cmd.todaybg; }
if (config.options.chkShowJulianDate) { // optional display of Julian date numbers
var m=[0,31,59,90,120,151,181,212,243,273,304,334];
var d=date.getDate()+m[date.getMonth()];
var y=date.getFullYear();
if (date.getMonth()>1 && (y%4==0 && y%100!=0) || y%400==0)
d++; // after February in a leap year
wikify('@@font-size:80%;<br>'+d+'@@',place);
}
}
//}}}
//{{{
function isToday(date) // returns true if date is today
{ var now=new Date(); return ((now-date>=0) && (now-date<86400000)); }
function isWeekend(date) // returns true if date is a weekend
{ return (config.macros.date.weekend[date.getDay()]); }
function isHoliday(date) // returns true if date is a holiday
{
var longHoliday = date.formatString('0MM/0DD/YYYY');
var shortHoliday = date.formatString('0MM/0DD');
for(var i = 0; i < config.macros.date.holidays.length; i++) {
var holiday=config.macros.date.holidays[i];
if (holiday==longHoliday||holiday==shortHoliday) return true;
}
return false;
}
//}}}
//{{{
// Event handler for clicking on a day popup
function onClickDatePopup(e) { e=e||window.event;
var p=Popup.create(this); if (!p) return false;
// always show dated tiddler link (or just date, if readOnly) at the top...
if (!readOnly || store.tiddlerExists(this.date.formatString(this.linkformat)))
createTiddlyLink(createTiddlyElement(p,'li'),this.date.formatString(this.linkformat),true);
else
createTiddlyText(createTiddlyElement(p,'li'),this.date.formatString(this.linkformat));
if (!config.options.chkDatePopupHideCreated)
addCreatedsToPopup(p,this.date,this.format);
if (!config.options.chkDatePopupHideChanged)
addModifiedsToPopup(p,this.date,this.format);
if (!config.options.chkDatePopupHideTagged)
addTaggedToPopup(p,this.date,this.linkformat);
if (!config.options.chkDatePopupHideReminders)
addRemindersToPopup(p,this.date,this.linkformat);
Popup.show(); e.cancelBubble=true; if(e.stopPropagation)e.stopPropagation(); return false;
}
//}}}
//{{{
function indexCreateds() // build list of tiddlers, hash indexed by creation date
{
var createds= { };
var tiddlers = store.getTiddlers('title','excludeLists');
for (var t = 0; t < tiddlers.length; t++) {
var date = tiddlers[t].created.formatString('YYYY0MM0DD')
if (!createds[date])
createds[date]=new Array();
createds[date].push(tiddlers[t].title);
}
return createds;
}
function hasCreateds(date) // returns true if date has created tiddlers
{
if (!config.macros.date.createds) config.macros.date.createds=indexCreateds();
return (config.macros.date.createds[date.formatString('YYYY0MM0DD')]!=undefined);
}
function addCreatedsToPopup(p,when,format)
{
var force=(store.isDirty() && when.formatString('YYYY0MM0DD')==new Date().formatString('YYYY0MM0DD'));
if (force || !config.macros.date.createds) config.macros.date.createds=indexCreateds();
var indent=String.fromCharCode(160)+String.fromCharCode(160);
var createds = config.macros.date.createds[when.formatString('YYYY0MM0DD')];
if (createds) {
createds.sort();
var e=createTiddlyElement(p,'div',null,null,'created ('+createds.length+')');
for(var t=0; t<createds.length; t++) {
var link=createTiddlyLink(createTiddlyElement(p,'li'),createds[t],false);
link.appendChild(document.createTextNode(indent+createds[t]));
}
}
}
//}}}
//{{{
function indexModifieds() // build list of tiddlers, hash indexed by modification date
{
var modifieds= { };
var tiddlers = store.getTiddlers('title','excludeLists');
for (var t = 0; t < tiddlers.length; t++) {
var date = tiddlers[t].modified.formatString('YYYY0MM0DD')
if (!modifieds[date])
modifieds[date]=new Array();
modifieds[date].push(tiddlers[t].title);
}
return modifieds;
}
function hasModifieds(date) // returns true if date has modified tiddlers
{
if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();
return (config.macros.date.modifieds[date.formatString('YYYY0MM0DD')]!=undefined);
}
function addModifiedsToPopup(p,when,format)
{
var date=when.formatString('YYYY0MM0DD');
var force=(store.isDirty() && date==new Date().formatString('YYYY0MM0DD'));
if (force || !config.macros.date.modifieds) config.macros.date.modifieds=indexModifieds();
var indent=String.fromCharCode(160)+String.fromCharCode(160);
var mods = config.macros.date.modifieds[date];
if (mods) {
// if a tiddler was created on this date, don't list it in the 'changed' section
if (config.macros.date.createds && config.macros.date.createds[date]) {
var temp=[];
for(var t=0; t<mods.length; t++)
if (!config.macros.date.createds[date].contains(mods[t]))
temp.push(mods[t]);
mods=temp;
}
mods.sort();
var e=createTiddlyElement(p,'div',null,null,'changed ('+mods.length+')');
for(var t=0; t<mods.length; t++) {
var link=createTiddlyLink(createTiddlyElement(p,'li'),mods[t],false);
link.appendChild(document.createTextNode(indent+mods[t]));
}
}
}
//}}}
//{{{
function hasTagged(date,format) // returns true if date is tagging other tiddlers
{
return store.getTaggedTiddlers(date.formatString(format)).length>0;
}
function addTaggedToPopup(p,when,format)
{
var indent=String.fromCharCode(160)+String.fromCharCode(160);
var tagged=store.getTaggedTiddlers(when.formatString(format));
if (tagged.length) var e=createTiddlyElement(p,'div',null,null,'tagged ('+tagged.length+')');
for(var t=0; t<tagged.length; t++) {
var link=createTiddlyLink(createTiddlyElement(p,'li'),tagged[t].title,false);
link.appendChild(document.createTextNode(indent+tagged[t].title));
}
}
//}}}
//{{{
function indexReminders(date,leadtime) // build list of tiddlers with reminders, hash indexed by reminder date
{
var reminders = { };
if(window.findTiddlersWithReminders!=undefined) { // reminder plugin is installed
var t = findTiddlersWithReminders(date, [0,leadtime], null, null, 1);
for(var i=0; i<t.length; i++) reminders[t[i].matchedDate]=true;
}
return reminders;
}
function hasReminders(date) // returns true if date has reminders
{
if (window.reminderCacheForCalendar)
return window.reminderCacheForCalendar[date]; // use calendar cache
if (!config.macros.date.reminders)
config.macros.date.reminders = indexReminders(date,90); // create a 90-day leadtime reminder cache
return (config.macros.date.reminders[date]);
}
function addRemindersToPopup(p,when,format)
{
if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed
var indent = String.fromCharCode(160)+String.fromCharCode(160);
var reminders=findTiddlersWithReminders(when, [0,31],null,null,1);
createTiddlyElement(p,'div',null,null,'reminders ('+(reminders.length||'none')+')');
for(var t=0; t<reminders.length; t++) {
link = createTiddlyLink(createTiddlyElement(p,'li'),reminders[t].tiddler,false);
var diff=reminders[t].diff;
diff=(diff<1)?'Today':((diff==1)?'Tomorrow':diff+' days');
var txt=(reminders[t].params['title'])?reminders[t].params['title']:reminders[t].tiddler;
link.appendChild(document.createTextNode(indent+diff+' - '+txt));
}
if (readOnly) return; // readonly... omit 'new reminder...' command
var rem='\\<\\<reminder day:%0 month:%1 year:%2 title:"Enter a reminder title here"\\>\\>';
rem=rem.format([when.getDate(),when.getMonth()+1,when.getYear()+1900]);
var cmd="<<newTiddler label:[["+indent+"new reminder...]] prompt:[[add a reminder to '%0']]"
+" title:[[%0]] text:{{var t=store.getTiddlerText('%0','');t+(t.length?'\\n':'')+'%1'}} tag:%2>>";
wikify(cmd.format([when.formatString(format),rem,config.options.txtCalendarReminderTags||'']),
createTiddlyElement(p,'li'));
}
//}}}
WelcomeToTiddlyspot [[desk]]
Deletes the current tiddler. A confirmation dialogue is displayed unless disabled with the ConfirmBeforeDeleting checkbox in AdvancedOptions. It is used with the ToolbarMacro like this:
{{{
<<toolbar deleteTiddler>>
}}}
/***
|''Name:''|DeliciousTaggingPlugin|
|''Version:''|0.5|
|''Source''|http://tbGTD.tiddlyspot.com|
|''Author:''|[[TobiasBeer]]|
!Description
@@color:red;Mod of Jack's [[DeliciousTaggingPlugin|http://jackparke.googlepages.com/jtw.html]] to allow...
*custom tag-chosers
*tag-exclusion
@@
Allows easy tagging in the EditTemplate by showing all tags as a list of link-buttons.
Replace your the editorFooter div in your [[EditTemplate]] with the following:
{{{<div class='editorFooter' macro='deliciousTagging'></div>}}}
!Code
***/
//{{{
version.extensions.deliciousTagging={major: 0, minor: 1, revision: 0, date: new Date("June 11, 2007")};
config.macros.deliciousTagging={
catChose:"Tag this tiddler with '%0' its sub-tags or tiddlers tagging to them",
catList:'x-tagger config##Tags',
catsMore:['archive','reference'],
exclude:['noCloud','excludeLists'],
arrow:document.all?"▼":"▾",
handler:function(place,macroName,params,wikifier,paramString,tiddler){
if(tiddler instanceof Tiddler){
var b,c,g,t,tx,tg,tn,tgs,ex=[],x,xx=this.exclude,lng=config.views.editor.tagChooser;
for(tx=0;tx<xx.length;tx++){
x=store.getTaggedTiddlers(xx[tx]);
for(t=0;t<x.length;t++)ex.pushUnique(x[t].title);
}
g=store.getTiddlerText(this.catList);g=g?g.readBracketedList():[];
for(c=0;c<this.catsMore.length;c++)g.pushUnique(this.catsMore[c]);
for(c=0;c<g.length;c++){
if(!store.getTiddler(g[c]))continue;
b=createTiddlyButton(place,g[c]+this.arrow,this.catChose.format([g[c]]),this.clickCat);
b.setAttribute("tiddler",tiddler.title);b.setAttribute("tags",g[c]);
}
tgs=store.getTags();
for(t=0;t<tgs.length;t++){
tn=tgs[t][0];if(ex.contains(tn))continue;
tg=createTiddlyButton(place,tn,lng.tagTooltip.format([tn]),config.macros.tagChooser.onTagClick);
tg.setAttribute("tag",tn);tg.setAttribute("tiddler",tiddler.title);
place.appendChild(document.createTextNode(" "));
}
}
},
clickCat:function(e){
var b,pop,t,tg,ti,tgs=[],tgt,c,cx,lng=config.views.editor.tagChooser;
e=e||window.event;
pop=Popup.create(this);
t=this.getAttribute('tags');tgs.pushUnique('MAIN:'+t);
cx=store.getTaggedTiddlers(t);
for(c=0;c<cx.length;c++){
ti=cx[c].title;
tgs.pushUnique('GROUP:'+ti);
tgt=store.getTaggedTiddlers(ti);
for(t=0;t<tgt.length;t++)tgs.pushUnique(tgt[t].title);
}
for(t=0;t<tgs.length;t++){
tg=tgs[t];
if(tg.indexOf('MAIN:')==0)tg=ti=tg.substr(5);
else if(tg.indexOf('GROUP:')==0){tg=tg.substr(6);ti='\u00A0\u00A0'+tg;}
else ti='\u00A0\u00A0\u00A0\u00A0'+tg;
b=createTiddlyButton(createTiddlyElement(pop,"li"),ti,lng.tagTooltip.format([tg]),config.macros.tagChooser.onTagClick);
b.setAttribute("tiddler",this.getAttribute("tiddler"));b.setAttribute("tag",tg);
}
Popup.show();
e.cancelBubble = true;
if(e.stopPropagation) e.stopPropagation();
return false;
}
}
//}}}
TiddlyWiki is now owned by UnaMesa, a non-profit foundation. Part of it's purpose is to provide a means for people who enjoy using TiddlyWiki to usefully reward the members of the community who have helped to create it, and so we will be exploring ways of accepting and distributing donations. For the moment, we don't have a formal scheme, but would encourage people to donate directly to individuals where they can.
<<<
On a personal note (writes JeremyRuston), in the two years that I had a personal donation account before I took up a [[commercial position with BT|http://jermolene.wordpress.com/2007/05/29/i-for-one-welcome-my-new-bt-overlords/]], just under a 100 people donated a total of nearly £1500 via PayPal. Knowing how much effort it is to make such a payment, I'm truly grateful to everyone who took the trouble, many thanks. I used the money to buy camera equipment, a [[hobby|http://flickr.com/photos/jermy]] that I couldn't have pursued at the time otherwise.
<<<
{{downloadButton{
|<<download>>|
[[Advanced options >>|Advanced download options]]
/***
|''Name:''|DownloadTiddlyWikiPlugin|
|''Description:''|Download TiddlyWiki according to browser type|
|''Version:''|0.0.8|
|''Date:''|Aug 26, 2008|
|''Source:''|http://www.tiddlywiki.com/#DownloadTiddlyWikiPlugin|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.4.1|
***/
//{{{
if(!version.extensions.DownloadTiddlyWikiPlugin) {
version.extensions.DownloadTiddlyWikiPlugin = {installed:true};
config.macros.download = {};
merge(config.macros.download,{
label: "download",
prompt: "Download TiddlyWiki",
className: "chunkyButton"});
config.macros.download.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
var span = createTiddlyElement(place,"span",null,this.className);
createTiddlyButton(span,params[0]||this.label,params[1]||this.prompt,this.onClick);
};
config.macros.download.onClick = function(ev)
{
// display the tiddler containing the instructions
var e = ev || window.event;
var title = "Installation";
var url = config.browser.isSafari || config.browser.isOpera ? 'http://www.tiddlywiki.com/empty.zip' :'http://www.tiddlywiki.com/empty.download';
if(config.browser.isOpera || config.browser.isWindows) {
story.displayTiddler(target,title);
window.setTimeout(function() {document.location.href = url;},300);
} else {
// put an iframe in the target instructions tiddler to start the download
var html = '<html><iframe src="' + url + '" style="display:none"></html>';
var tiddler = store.getTiddler(title);
var oldText = tiddler.text;
tiddler.text = html + tiddler.text;
var target = resolveTarget(e);
story.closeTiddler(title,true);
story.displayTiddler(target,title);
tiddler.text = oldText;
}
return false;
};
} //# end of 'install only once'
//}}}
Try holding down the alt- or shift-key while clicking on a link to a tiddler, on the 'options' button or on the CloseButton for a tiddler. Kind of a respectful homage to Mac OS X, which does something similar for many of its system animations. (On browsers like InternetExplorer that use the shift key to open a new window, it's best to use the alt-key).
Switches the current tiddler to the current edit view. It is used with the ToolbarMacro like this:
{{{
<<toolbar editTiddler>>
}}}
~TiddlyWiki is made up of chunks of information called tiddlers. You're reading a tiddler called 'Editing' right now (a [[glossary of terms|http://www.tiddlywiki.org/wiki/TiddlyWiki_Glossary]] appears on ~TiddlyWiki.org, by the way!)
When you open an empty ~TiddlyWiki file for the first time, you'll be presented with a tiddler called "~GettingStarted". This contains links to tiddlers to help you define the main attributes of your ~TiddlyWiki; the Title, Sub-title and Main Navigation (see [[Configuration]]). Click on the links to access these tiddlers.
You will notice that each tiddler has a command menu in it's top right corner (close, edit, and so on). You can use this to send the tiddler into edit mode, or if you prefer you can simply double click the tiddler when it's in read mode. When you're finished, click on done.
If you'd like your tiddlers to be assigned to you, you can enter your name in the relevant field on the right hand side (the 'sidebar'). If you can't see this field, click on [[this link|InterfaceOptions]] to reveal it.
There are two ways to make links between tiddlers. If you're linking to a tiddler which already exists, put the tiddler name in double square brackets (Double click here, and you'll see double square brackets around the word [[example]]). You can use this technique to point to (and create) a new tiddler, or alternatively just write the tiddler name by joining words starting with capital letters, LikeThis. When you save the tiddler and click on the link, you can then add content to your new tiddler.
{{{
[img[title|filename]]
[img[filename]]
[img[title|filename][link]]
[img[filename][link]]
}}}
Images can be included by their filename or full URL. It's good practice to include a title to be shown as a tooltip, and when the image isn't available. An image can also link to another tiddler or or a URL
[img[Romanesque broccoli|fractalveg.jpg][http://www.flickr.com/photos/jermy/10134618/]]
{{{
[img[Fractal vegetable|fractalveg.jpg]]
[img[This is shown as a tooltip|http://example.com/image.jpg]]
[img[http://example.com/image.jpg]]
[img[http://example.com/image.jpg][ExampleDotCom]]
}}}
The tooltip is optional.
[<img[Forest|forest.jpg][http://www.flickr.com/photos/jermy/8749660/]][>img[Field|field.jpg][http://www.flickr.com/photos/jermy/8749285/]]You can also float images to the left or right: the forest is left aligned with {{{[<img[}}}, and the field is right aligned with {{{[>img[}}}.
@@clear(left):clear(right):display(block):You can use CSS to clear the floats@@
{{{
[<img[A woody bit of Hampstead Heath|forest.jpg]]
[>img[A field near Milton Keynes|field.jpg]]
}}}
There's now an option under InterfaceOptions to allow TiddlyWiki's animation effects to be turned off.
/***
|''Name:''|ExamplePlugin|
|''Description:''|To demonstrate how to write TiddlyWiki plugins|
|''Version:''|2.0.3|
|''Date:''|Sep 22, 2006|
|''Source:''|http://www.tiddlywiki.com/#ExamplePlugin|
|''Author:''|JeremyRuston (jeremy (at) osmosoft (dot) com)|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
***/
//{{{
// Uncomment the following line to see how the PluginManager deals with errors in plugins
// deliberateError();
// Log a message
pluginInfo.log.push("This is a test message from " + tiddler.title);
//}}}
#displayArea {background-color: #ffccff; }
#mainMenu {border: 1px solid #ffff88; }
#commandPanel {background-color: #008800; }
config.animFast = 0.12; // Speed for animations (lower == slower)
config.animSlow = 0.01; // Speed for EasterEgg animations
config.views.wikified.toolbarEdit.text = "Edit away, it won't get saved";
~TiddlyWiki is being used for all kinds of things:
* Many people are using the [[GTD ("Getting Things Done")|GTDTiddlyWiki]] ~TiddlyWiki variant for personal productivity
* There have been some interesting experiments in TiddlyWikiFiction
* Garrett Lisi has published his work on Deferential Geometry in a paper named [[An Exceptionally Simple Theory of Everything|http://deferentialgeometry.org]]
* Phil Hawksworth has used ~TiddlyWiki to create a flexible task management tool called [[TeamTasks|http://www.getteamtasks.com]]
* Paul Downey and Phil Hawksworth have created a note sharing tool called [[RippleRap|http://www.ripplerap.com]]
* An "electronic wallet" for storing passwords and other confidential information called [[TiddlyFolio|http://tiddlyfolio.tiddlyspot.com/]]
* [[Video tutorials interspersed with Q&A|http://files.unamesa.org/MORE/MORE.html]] by UnaMesa
* By teachers in Massachusetts to [[teach mathematics|http://luceatlux.net/mcasmath10/]]
* By schools in South Australia to [[distribute class materials to students|https://secure.ait.org/wiki/background.htm]]
* A [[music and culture site|http://udigrudi.net/]] (in Portugese)
* Jonny ~LeRoy has created a ~TiddlyWiki based on [[resizable windows|http://tiddlyhome.bidix.info/desk/]]
* Miguel Centellas has created an [[extensive guide to Bolivian politics|http://www.centellas.org/politics/politiddly.html]]
* BT is using a ~TiddlyWiki file for their [[Open source website|http://www.bt.com/opensource]]
* Elise Springer, a philospher at Wesleyan University in Connecticut, USA, is using ~TiddlyWiki for her [[homepage|http://espringer.web.wesleyan.edu/]] and for [[Reasoning Well|http://reasoningwell.tiddlyspot.com/]], a wiki for her Philosophy faculty
Also, see TiddlyWikiAdaptations
Like most wikis, ~TiddlyWiki supports a range of simplified character formatting. You can find a list on the [[TiddlyWiki.org website|http://tiddlywiki.org/wiki/TiddlyWiki_Markup]].
To see all the tiddlers on this website that concern formatting, click on the 'formatting' link in the box that appears to the right of this tiddler.
/***
|''Name:''|FE2|
|''Description:''|create, edit, view and delete commands in toolbar <<toolbar fields>>|
|''Version:''|1.0.2|
|''Date:''|Oct. 21,2009|
|''Source:''|http://tbGTD.tiddlyspot.com|
|''Author:''|Tobias Beer|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.5.3|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Note
This is a refactored version of [[FieldsEditorPlugin|http://visualtw.ouvaton.org/VisualTW.html#FieldsEditorPlugin]] by Pascal Collin
!Installation:
*import this tiddler, keep tagged as systemConfig, save and reload
!Code
***/
//{{{
//language settings for header, also see language options for macro.FE2 below!
config.commands.fields.lang={field:"field",actions:"actions",value:"value"};
config.commands.fields.handlePopup=function(popup,title){
addClass(popup,'FE2');
var tid=store.fetchTiddler(title);
if(!tid)return;
var t='[['+title+']]';
var fields={};
store.forEachField(tid,function(tid,field,v){fields[field]=v;},true);
var list=[];
for(var f in fields){
var e='[['+f+']]';
list.push({
field:f,
value:fields[f],
actions:"<<FE2 "+t+" rename "+e+">> <<FE2 "+t+" delete "+e+">> <<FE2 "+t+" edit "+e+">>"
});
}
list.sort(function(a,b){return a.field<b.field?-1:(a.field==b.field?0:+1);});
list.push({field:'',value:"",actions:"<<FE2 "+t+" create>>"});
var table=ListView.create(popup,list,{
columns:[
{name:'Field',field:'field',title:this.lang.field,type:'String'},
{name: 'Actions',field:'actions',title:this.lang.actions,type: 'WikiText'},
{name:'Value',field:'value',title:this.lang.value,type:'WikiText'}
],
rowClasses:[
{field:'actions'}
],
buttons:[ //can't use button for selected then delete, because click on checkbox will hide the popup
]
});
}
config.macros.FE2={
//language options
lang:{
'delete':'delete', //string since keyword!
rename:'<rename',
create:'Create a new field...',
edit:'edit>',
lineBreaks:"The field value contains linebreaks.\nEditing here will convert it to a single line!\nProceed?",
enterName:"Enter new field name...",
enterNewName:"Enter new name for '%1'...",
enterVal:"Enter field value for '%1'...",
enterNewVal:"Enter new value for '%1'..",
doDelete:"Delete field '%1' from tiddler '%2' ?",
existing:"This field already exists! "
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
if(!readOnly){
var tid=params[0];
var mode=params[1];
var field=params[2];
var btn=createTiddlyButton(place,this.lang[mode],this.lang[mode]+" "+field,this.clicked);
btn.setAttribute("tiddler",tid);
btn.setAttribute("field",field);
btn.setAttribute("mode",mode);
}
},
clicked:function(){
var lng=config.macros.FE2.lang;
var title=this.getAttribute("tiddler");
var field=this.getAttribute("field");
var mode=this.getAttribute("mode");
var tid=store.getTiddler(title);
if(!tid)return;
switch(mode){
case'create':
var first="";
do{
field=prompt(first+ lng.enterName,"");
first=lng.existing;
}while(store.getValue(tid,field));
if(field){
var v=prompt(lng.enterVal.replace(/%1/,field),"");
if(v)tid.fields[field]=v;else return;
}else return;
break;
case'delete':
if(confirm(lng.doDelete.replace(/%1/,field).replace(/%2/,title))){
delete tid.fields[field];
}else return;
break;
case'edit':
var v=tid.fields[field]||'';
if(!v.match(/\n/mg)||confirm(lng.lineBreaks)){
var v=prompt(lng.enterNewVal.replace(/%1/,field),v);
if(v||v=='')tid.fields[field]=v;else return;
}else return;
break;
case'rename':
var name=prompt(lng.enterNewName.replace(/%1/,field),field);
if(name){
tid.fields[name]=tid.fields[field];
delete tid.fields[field];
}else return;
break;
default:return;
}
store.saveTiddler(tid.title,tid.title,tid.text,tid.modifier,tid.modified,tid.tags,tid.fields);
story.refreshTiddler(title,null,true);
return false;
}
}
config.shadowTiddlers.StyleSheetFE2=
".FE2 td br{display:block;}\n"+
".FE2 td {font-size:12px;padding:1px 3px}\n"+
".FE2 .button {border:0;padding:0 0.2em;}\n"+
".FE2 .twtable,.FE2 .twtable thead, .FE2 .twtable tr{border:0}\n"+
".FE2 .twtable tr:hover{background:"+store.getTiddlerSlice('ColorPalette','TertiaryDark')+"}\n"+
".FE2 .twtable thead{font-size:13px;}";
store.addNotification("StyleSheetFE2",refreshStyles);
//}}}
The following features are included with the standard download of ~TiddlyWiki:
!Browsers
* You can ''view'' ~TiddlyWiki files on all major desktop browsers on Windows, Macintosh and Linux and many mobile browsers such as the Apple iPhone and the Nokia 770/N800
* You can ''save changes'' to local ~TiddlyWiki files with modern versions of FireFox, [[Opera]], InternetExplorer for Windows, [[Safari]], and [[Camino]] - click [[here|Browsers]] for browser version details
* Community member ~BidiX has created an adaptation of the ~TiddlyWiki user interface [[specially for the iPhone|http://www.apple.com/webapps/productivity/itwatiddlywikiforiphone.html]]
!Tools
* Fully configurable navigation, tagging and searching capability, all using javascript within ~TiddlyWiki itself
* ~TiddlyWiki contains a BackstageArea for handy access to management tools including [[importing|ImportTiddlers]] and [[synchronisation|http://www.tiddlywiki.org/wiki/Dev:Server_Adaptor_Mechanism]] of tiddlers with external files and servers. These tools can also be used to manage a wide range of [[Plugins]] which have been developed by the [[TiddlyWiki community|Help and Support]].
!Content
* Full text formatting including MonospacedText, ExtendedFormatting, NonWikiWordLinks, WikiWordEscape, PrettyLinks, SubHeadings, BulletPoints, NumberedBulletPoints, [[Tables]], BlockQuotes, HorizontalRules and the ability to use a CustomCssClass and InlineHTML
* EmbeddedImages
* [[Macros]] providing rich interactive features, including [[Gradients|GradientMacro]]
!Miscellaneous
* InterfaceOptions and AdvancedOptions, including the ability to GenerateAnRssFeed, SaveBackups and AutoSave
* KeyboardShortcuts so you can finish editing a tiddler with ~Control-Enter or abandon it with Escape
* Extensive StartupParameters to control the behaviour of ~TiddlyWiki through specially crafted ~URLs
* There are [[translations]] of ~TiddlyWiki available in many languages, including Chinese, French, German, Spanish and Portuguese
See also NewFeatures for version <<version>>.
If you've any comments, corrections or observations about TiddlyWiki, the best way to get our attention is to post to the [[Community]] groups -- or write a blog entry.
~TiddlyWiki works well in ~FireFox v1.0 and above. If you're experiencing problems, make sure you've followed the [[installation guidelines|Installation]].
When saving ~TiddlyWiki in ~FireFox for the first time, you can run into problems if you accidentally click 'Deny' on the dialog, and select //Remember this decision//.
To reverse the effects, first locate the file {{{prefs.js}}} in your ~FireFox profile directory:
* Under Windows you'll find it at something like {{{C:\Documents and Settings\Jeremy\Application Data\Mozilla\Firefox\Profiles\o3dhupu6.default\prefs.js}}}, where {{{Jeremy}}} is the name of your windows profile and {{{o3dhupu6}}} will be a similar string of gobbledegook.
* On the Mac it'll be at {{{~/Library/Application Support/Firefox/Profiles/o3dhupu6.default/prefs.js}}}
* On Linux you can find this file at {{{~/.mozilla/firefox/o3dhupu6.default/prefs.js}}}.
Open the file in a text editor and find the line {{{user_pref("capability.principal.codebase.p0.denied", "UniversalXPConnect");}}} and simply replace the word {{{denied}}} with {{{granted}}}.
//(Thanks to JonScully for figuring out this fix)//
Firefox users should be aware that GreaseMonkey can break TiddlyWiki. There's also a rather unpredictable FireFoxKeyboardIssue.
Under FireFox, TiddlyWiki can get into a state where it ignores the arrow keys on the keyboard but accepts ordinary alphanumeric input. The triggers for this behaviour are unclear, but it doesn't just affect TiddlyWiki. The solution appears to be to locate the file {{{compreg.dat}}} in your FireFox profile folder and rename it to {{{compreg.dat.old}}}.
Released in September 2004, the [[first version|firstversion.html]] was pretty basic, weighing in at 52KB.
Here's one way to get a Flickr badge in TiddlyWiki:
<html>
<a href="http://www.flickr.com" style="text-align:center;">www.<strong style="color:#3993ff">flick<span style="color:#ff1c92">r</span></strong>.com</a><br>
<iframe style="background-color:#ffffff; border-color:#ffffff; border:none;" width="113" height="151" frameborder="0" scrolling="no" src="http://www.flickr.com/apps/badge/badge_iframe.gne?zg_bg_color=ffffff&zg_person_id=35468148136%40N01" title="Flickr Badge"></iframe>
</html>
Here's the HTML code to insert in a tiddler:
{{{
<html>
<a href="http://www.flickr.com" style="text-align:center;">www.<strong style="color:#3993ff">flick<span style="color:#ff1c92">r</span></strong>.com</a><br>
<iframe style="background-color:#ffffff; border-color:#ffffff; border:none;" width="113" height="151" frameborder="0" scrolling="no" src="http://www.flickr.com/apps/badge/badge_iframe.gne?zg_bg_color=ffffff&zg_person_id=35468148136%40N01" title="Flickr Badge"></iframe>
</html>
}}}
You'll need to know your Flickr person ID, which should replace the value "35468148136%40N01" in the HTML. There's a useful [[Flickr idGettr|http://eightface.com/code/idgettr/]] to help with this.
~TiddlyWiki has long been used as a personal productivity tool, geared towards David Allen's [[Getting Things Done|http://en.wikipedia.org/wiki/Getting_Things_Done]] (GTD) methodology. ~TiddlyWiki lends itself to the GTD approach due to it's portability, ease of use, and ability to work without a web connection.
The [[original|http://shared.snapgrid.com/gtd_tiddlywiki.html]] adaptation is based on an obsolete, older version of ~TiddlyWiki; if you want to have the GTD look-and-feel but still be able to use the latest ~TiddlyWiki features, check out the following links:
*[[Tom Otvos' d-cubed adaptation|http://www.dcubed.ca/]]
*[[Simon Baird's Monkey GTD adaptation|http://www.tiddlywiki.org/wiki/MonkeyGTD]]
*[[Clint Checkett's GTDTiddlyWiki plus adaptation|http://www.checkettsweb.com/tw/gtd_tiddlywiki.htm]]
A new feature for the ThirdVersion of TiddlyWiki is the ability to generate an RssFeed of its content. You can flick it on with a new addition to the InterfaceOptions. If enabled, it automatically saves an RSS 2.0 format file with the last few changed tiddlers in it. It's given the same filename as the TiddlyWiki file but with the ".xml" extension. Like all TiddlyWiki features, it's experimental, and will probably be a bit temperamental in your feedreader until the bugs are ironed out.
Note that you must set the tiddler SiteUrl to be the URL where your TiddlyWiki will be published. (Don't put leading spaces or line breaks before or after the URL).
Once you've successfully [[installed|Installation]] ~TiddlyWiki, the following links will help you get up and running.
[[Editing]]
[[Saving|SaveChanges]]
[[SpecialTiddlers]]
[[Formatting|ExtendedFormatting]]
[[Searching|Search]]
[[Tagging|Tags]]
[[Customisation]]
[[Help and Support]]
|''URL:''|http://gimcrackd.com/etc/src/|
|''Description:''|Gimcrack'd: Code and Other Oddments|
|''Author:''|ChrisKlimas|
/***
|Name|GotoPlugin|
|Source|http://www.TiddlyTools.com/#GotoPlugin|
|Documentation|http://www.TiddlyTools.com/#GotoPluginInfo|
|Version|1.9.2|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|view any tiddler by entering it's title - displays list of possible matches|
''View a tiddler by typing its title and pressing //enter//.'' As you type, a list of possible matches is displayed. You can scroll-and-click (or use arrows+enter) to select/view a tiddler, or press escape to close the listbox to resume typing. When the listbox is not displayed, pressing //escape// clears the current input.
!!!Configuration
<<<
*Match titles only after {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters are entered.<br>Use down-arrow to start matching with shorter input. //Note: This option value is also set/used by [[SearchOptionsPlugin]]//.
*To set the maximum height of the listbox, you can create a tiddler tagged with <<tag systemConfig>>, containing:
//{{{
config.macros.gotoTiddler.listMaxSize=10; // change this number
//}}}
!!!Code
***/
//{{{
version.extensions.GotoPlugin= {major: 1, minor: 9, revision: 2, date: new Date(2009,5,22)};
// automatically tweak shadow SideBarOptions to add <<gotoTiddler>> macro above <<search>>
config.shadowTiddlers.SideBarOptions=config.shadowTiddlers.SideBarOptions.replace(/<<search>>/,"{{button{goto}}}\n<<gotoTiddler>><<search>>");
if (config.options.txtIncrementalSearchMin===undefined) config.options.txtIncrementalSearchMin=2;
config.macros.gotoTiddler= {
listMaxSize: 10,
listHeading: 'Found %0 matching title%1...',
searchItem: "Search for '%0'...",
handler:
function(place,macroName,params,wikifier,paramString,tiddler) {
var quiet =params.contains("quiet");
var showlist =params.contains("showlist");
var search =params.contains("search");
params = paramString.parseParams("anon",null,true,false,false);
var instyle =getParam(params,"inputstyle","");
var liststyle =getParam(params,"liststyle","");
var filter =getParam(params,"filter","");
var html=this.html;
var keyevent=window.event?"onkeydown":"onkeypress"; // IE event fixup for ESC handling
html=html.replace(/%keyevent%/g,keyevent);
html=html.replace(/%search%/g,search);
html=html.replace(/%quiet%/g,quiet);
html=html.replace(/%showlist%/g,showlist);
html=html.replace(/%display%/g,showlist?'block':'none');
html=html.replace(/%position%/g,showlist?'static':'absolute');
html=html.replace(/%instyle%/g,instyle);
html=html.replace(/%liststyle%/g,liststyle);
html=html.replace(/%filter%/g,filter);
//if (config.browser.isIE) html=this.IEtableFixup.format([html]);
var span=createTiddlyElement(place,'span');
span.innerHTML=html; var form=span.getElementsByTagName("form")[0];
if (showlist) this.fillList(form.list,'',filter,search,0);
},
html:
'<form onsubmit="return false" style="display:inline;margin:0;padding:0">\
<input name=gotoTiddler type=text value="search..." autocomplete="off" accesskey="G" style="%instyle%"\
title="ENTER=search | SHIFT+ENTER=open | DOWN=list"\
onfocus="this.select(); this.setAttribute(\'accesskey\',\'G\');"\
%keyevent%="return config.macros.gotoTiddler.inputEscKeyHandler(event,this,this.form.list,%search%,%showlist%);"\
onkeyup="return config.macros.gotoTiddler.inputKeyHandler(event,this,%quiet%,%search%,%showlist%);">\
<select name=list style="display:%display%;position:%position%;%liststyle%"\
onchange="if (!this.selectedIndex) this.selectedIndex=1;"\
onblur="this.style.display=%showlist%?\'block\':\'none\';"\
%keyevent%="return config.macros.gotoTiddler.selectKeyHandler(event,this,this.form.gotoTiddler,%showlist%);"\
onclick="return config.macros.gotoTiddler.processItem(this.value,this.form.gotoTiddler,this,%showlist%);">\
</select><input name="filter" type="hidden" value="%filter%">\
</form>',
IEtableFixup:
"<table style='width:100%;display:inline;padding:0;margin:0;border:0;'>\
<tr style='padding:0;margin:0;border:0;'><td style='padding:0;margin:0;border:0;'>\
%0</td></tr></table>",
getItems:
function(list,val,filter) {
if (!list.cache || !list.cache.length || val.length<=config.options.txtIncrementalSearchMin) {
// starting new search, fetch and cache list of tiddlers/shadows/tags
list.cache=new Array();
if (filter.length) {
var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
var tiddlers=store.sortTiddlers(fn.apply(store,[filter]),'title');
} else
var tiddlers=store.reverseLookup('tags','');
for(var t=0; t<tiddlers.length; t++) list.cache.push(tiddlers[t].title);
if (!filter.length) {
for (var t in config.shadowTiddlers) list.cache.pushUnique(t);
var tags=store.getTags();
for(var t=0; t<tags.length; t++) list.cache.pushUnique(tags[t][0]);
}
}
var found = [];
var match=val.toLowerCase();
for(var i=0; i<list.cache.length; i++)
if (list.cache[i].toLowerCase().indexOf(match)!=-1) found.push(list.cache[i]);
return found;
},
getItemSuffix:
function(t) {
if (store.tiddlerExists(t)) return ""; // tiddler
if (store.isShadowTiddler(t)) return " (shadow)"; // shadow
return " (tag)"; // tag
},
fillList:
function(list,val,filter,search,key) {
if (list.style.display=="none") return; // not visible... do nothing!
var indent='\xa0\xa0\xa0';
var found = this.getItems(list,val,filter); // find matching items...
found.sort(); // alpha by title
while (list.length > 0) list.options[0]=null; // clear list
var hdr=this.listHeading.format([found.length,found.length==1?"":"s"]);
list.options[0]=new Option(hdr,"",false,false);
for (var t=0; t<found.length; t++) list.options[list.length]=
new Option(indent+found[t]+this.getItemSuffix(found[t]),found[t],false,false);
if (search)
list.options[list.length]=new Option(this.searchItem.format([val]),"*",false,false);
list.size=(list.length<this.listMaxSize?list.length:this.listMaxSize); // resize list...
list.selectedIndex=key==38?list.length-1:key==40?1:0;
},
keyProcessed:
function(ev) { // utility function
ev.cancelBubble=true; // IE4+
try{event.keyCode=0;}catch(e){}; // IE5
if (window.event) ev.returnValue=false; // IE6
if (ev.preventDefault) ev.preventDefault(); // moz/opera/konqueror
if (ev.stopPropagation) ev.stopPropagation(); // all
return false;
},
inputEscKeyHandler:
function(event,here,list,search,showlist) {
if (event.keyCode==27) {
if (showlist) { // clear input, reset list
here.value=here.defaultValue;
this.fillList(list,'',here.form.filter.value,search,0);
}
else if (list.style.display=="none") // clear input
here.value=here.defaultValue;
else list.style.display="none"; // hide list
return this.keyProcessed(event);
}
return true; // key bubbles up
},
inputKeyHandler:
function(event,here,quiet,search,showlist) {
var key=event.keyCode;
var list=here.form.list;
var filter=here.form.filter;
// non-printing chars bubble up, except for a few:
if (key<48) switch(key) {
// backspace=8, enter=13, space=32, up=38, down=40, delete=46
case 8: case 13: case 32: case 38: case 40: case 46: break; default: return true;
}
// blank input... if down/enter... fall through (list all)... else, and hide or reset list
if (!here.value.length && !(key==40 || key==13)) {
if (showlist) this.fillList(here.form.list,'',here.form.filter.value,search,0);
else list.style.display="none";
return this.keyProcessed(event);
}
// hide list if quiet, or below input minimum (and not showlist)
list.style.display=(!showlist&&(quiet||here.value.length<config.options.txtIncrementalSearchMin))?'none':'block';
// non-blank input... enter=show/create tiddler, SHIFT-enter=search for text
if (key==13 && here.value.length) return this.processItem(event.shiftKey?here.value:'*',here,list,showlist);
// up or down key, or enter with blank input... shows and moves to list...
if (key==38 || key==40 || key==13) { list.style.display="block"; list.focus(); }
this.fillList(list,here.value,filter.value,search,key);
return true; // key bubbles up
},
selectKeyHandler:
function(event,list,editfield,showlist) {
if (event.keyCode==27) // escape... hide list, move to edit field
{ editfield.focus(); list.style.display=showlist?'block':'none'; return this.keyProcessed(event); }
if (event.keyCode==13 && list.value.length) // enter... view selected item
{ this.processItem(list.value,editfield,list,showlist); return this.keyProcessed(event); }
return true; // key bubbles up
},
processItem:
function(title,here,list,showlist) {
if (!title.length) return;
list.style.display=showlist?'block':'none';
if (title=="*") { story.search(here.value); return false; } // do full-text search
if (!showlist) here.value=title;
story.displayTiddler(null,title); // show selected tiddler
return false;
}
}
//}}}
<<gradient horiz #bbbbbb #eeeeee #ffffff>>The new GradientMacro allows simple horizontal and vertical coloured gradients. They are constructed from coloured HTML elements, and don't require any images to work.>>
The GradientMacro is an Extended Macro that processes the text after it up until the next '>>' sequence. It looks like this:
{{{
<<gradient vert #ffffff #ffdddd #ff8888>>gradient fill>>
}}}
The first parameter can be ''vert'' or ''horiz'' to indicate the direction of the gradient. The following parameters are two or more colours (CSS RGB(r,g,b) format is also acceptable). The GradientMacro constructs a smooth linear gradient between each of the colours in turn.
| <<gradient vert #ffffff #ffdddd #ff8888>>No images were harmed in the making of this gradient fill>> | <<gradient vert #ffffff #ddffdd #88ff88>>No images were harmed in the making of this gradient fill>> | <<gradient vert #ffffff #ddddff #8888ff>>No images were harmed in the making of this gradient fill>> |
Inline CSS definitions can be added to gradient fills like this:
<<gradient vert #000000 #660000 #aa2222>>color:#ffffff;font-size:12pt;Darkness>>
{{{
<<gradient vert #000000 #660000 #aa2222>>color:#ffffff;font-size:12pt;Darkness>>
}}}
You can make an abrupt transition in the gradient by using the "snap" prefix, like this:
{{{
<<gradient vert #000000 #999999 snap:#aa2222 #ff444>>color:#ffffff;font-size:24pt;padding:4pt;More darkness>>
}}}
<<gradient vert #000000 #999999 snap:#aa2222 #ff444>>color:#ffffff;font-size:24pt;padding:4pt;More darkness>>
Several popular GreaseMonkey scripts can cause some or all features of TiddlyWiki to stop working - the default Linkify script seems to be particularly troublesome. There doesn't seem to be a //solid// way to disable GreaseMonkey from within TiddlyWiki (which is technically entirely understandable but does lead to a fairly grim user experience).
TiddlyWiki makes a great GuerillaWiki in situations where it's not practical to use a traditional wiki.
For instance, in a corporate setting, persuading an over-worked IT department to install you a Wiki server for you isn't always going to be possible overnight. And your PC is locked down so you can't install a conventional Wiki yourself. But, equally, you can't go and use one of the public hosted Wiki services because your Information Security department would not allow all that corporate data to flow into an outside server.
TiddlyWiki slices through those barriers by being usable on virtually all PCs.
Welcome to TiddlyWiki!
~TiddlyWiki is a single html file which has all the characteristics of a [[wiki|WikiWikiWeb]] - including all of the content, the functionality (including editing, saving, tagging and searching) and the style sheet. Because it's a single file, it's very portable - you can email it, put it on a web server or share it via a [[USB stick|WikiOnAStick]].
''But it's not just a wiki!'' It has very powerful plugin capabilities, so it can also be used to build new tools. You have full control over how it looks and behaves. For example, ~TiddlyWiki is already being used as:
*A personal notebook
*A GTD ("Getting Things Done") productivity tool
*A collaboration tool
*For building websites (this site is a ~TiddlyWiki file!)
*For rapid prototyping
*...and much more!
You can import and export data to and from all sorts of places. Check out some of the [[Examples]] of ~TiddlyWiki in use, and the [[Features]] that are available.
You can see the web functionality of ~TiddlyWiki by clicking on some of the links on this website. Double click some of the text to see 'edit mode'. For the full range of functions, including editing and saving changes, download and install a copy of the basic version and then follow the guidelines in [[Getting Started|GettingStarted]]. Have fun!
<<tiddler Download>>
/***
|Name|HelloWorldMacro|
|Created by|SimonBaird|
|Location|http://simonbaird.com/mptw/#HelloWorldMacro|
|Version|1.1|
|Requires|~TW2.x|
!Description
It's a Hello World TiddlyWiki macros.
!History
* 11-Jan-06, version 1.1, updated for ~TW2.0
!Examples
|!Source|!Output|h
|{{{<<helloWorld dude>>}}}|<<helloWorld dude>>|
|{{{<<helloWorld 'to everyone'>>}}}|<<helloWorld 'to everyone'>>|
(You can use (single or double) quotes or double square brackets for params with spaces)
!Notes
This is intended to help you get started with customising your TW. To make the macro work you have to give this tiddler a tag of systemConfig then save and reload. To learn more about customising Tiddlywiki? Look at other people's plugins or... click View, Source in your browser and start reading. :)
!Code
***/
//{{{
config.macros.helloWorld = {};
config.macros.helloWorld.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
var who = params.length > 0 ? params[0] : "world";
wikify("Hello //" + who + "// from the '" + macroName + "' macro in tiddler [[" + tiddler.title + "]].", place);
}
//}}}
[>img[tiddlywiki.org logo|http://trac.tiddlywiki.org/chrome/site/tworg_logo_med.jpg][http://www.tiddlywiki.org]]~TiddlyWiki today is the result of the efforts of dozens of people around the world generously contributing their time and skill, and offering considerable help and support.
If you'd like help getting your ~TiddlyWiki project off the ground, perhaps the best place to start is the community wiki at http://www.tiddlywiki.org. It contains detailed project documentation, as well as the master copy of the ~TiddlyWiki source code, and a system for tracking bugs and enhancement requests. The community welcomes [[contributions|Contribute]].
!Discussion forums
Also, there are two Google Group discussion forums for discussions about ~TiddlyWiki, whether basic entry level questions or more complex challenges! They are the best places to ask questions about ~TiddlyWiki, and to connect with other enthusiasts:
* A ~TiddlyWiki group for general discussion, bug reports and announcements at http://groups.google.com/group/TiddlyWiki
* A ~TiddlyWikiDev group for discussion about ~TiddlyWiki development at http://groups.google.com/group/TiddlyWikiDev
!~Non-English resources
There are a number of resources for non-English language speakers:
* ~TiddlyWikiFR, in French, at http://groups.google.com/group/TiddlyWikiFR
* ~TiddlyWiki 華語支援論壇, in Chinese, at http://groups.google.com/group/TiddlyWiki-zh
* ~TiddlyWikiPT, in Brazilian Portuguese, at http://groups.google.com.br/group/tiddlywikipt
* A guide to [[TiddlyWiki in Japanese|http://www.geocities.jp/potto372/tiddlywiki/tiddlywikinote.html]]
!Tutorials and guides
The ~TiddlyWiki community have created several tutorials and guides. Here are some of the most popular ones:
* Dave Gifford's [[TiddlyWiki for the Rest of Us|http://www.giffmex.org/twfortherestofus.html]] and his [[slideshow introduction|http://www.giffmex.org/blog/?p=23]]
* Morris Gray's [[TW Help - TiddlyWiki help file for beginners|http://tiddlyspot.com/twhelp/]]
* Dmitri Popov's [[TiddlyWiki quick reference card|http://nothickmanuals.info/doku.php/cheatsheets]]
* Julie Starr's [[Tiddler Toddler|http://tiddlertoddler.tiddlyspot.com/]], documenting the learning curve from a beginner's perspective
* Screencasts from [[JimVentola|http://faculty.massasoit.mass.edu/jventola/videocasts/tidhelp2/tidhelp2.html]], [[LeonKilat|http://max.limpag.com/2006/09/07/using-a-tiddlywiki-a-video-guide/]] and [[Phil Whitehouse|http://www.youtube.com/watch?v=ezNScBd7_h4]]
!Developers
Michael Mahemoff has written a very helpful outline of the architecture of ~TiddlyWiki: [[Part 1|http://softwareas.com/tiddlywiki-internals-1-of-3-architectural-concepts]], [[Part 2|http://softwareas.com/tiddlywiki-internals-2-of-3-list-of-javascript-files]] and [[Part 3|http://softwareas.com/tiddlywiki-internals-3-of-3-key-javascript-classes-and-files]]
Many ~TiddlyWiki hackers hang out on the ~TiddlyWiki IRC room at irc://irc.freenode.net/TiddlyWiki
!Publications and articles
~TiddlyWiki has also appeared in a number of publications and articles:
* Pao-hsu Shih, a professor at Taipai University in Taiwan, has written an [[Introduction to TiddlyWiki|http://www.wunan.com.tw/bookdetail.asp?no=8852]] in Chinese
* Dmitri Popov discusses ~TiddlyWiki in [[Writer for Writers and Advanced Users|http://www.lulu.com/content/221513]]
* Jeremy Wagstaff's [[The Power of Tiddly|http://www.loosewireblog.com/2007/11/the-power-of-ti.html]]
!Licence
~TiddlyWiki is published under a BSD licence, and is owned by the not-for-profit [[UnaMesa Foundation|http://www.unamesa.org/]].
This is an advanced option that lets you choose whether editting features are shown when a TiddlyWiki file is viewed over {{{http:}}} (as opposed to {{{file:}}}).
To publish a TiddlyWiki with the editting features hidden you'll need to create a tiddler tagged with 'systemConfig' and include in it the line:
{{{
config.options.chkHttpReadOnly = true;
}}}
End users can then override the setting using the AdvancedOptions panel.
You can divide a tiddler into
----
sections by typing four dashes on a line by themselves
The core TiddlyWiki code is regularly updated with bug fixes and new features. If you're using an earlier revision of TiddlyWiki, you should consider upgrading to the latest version.
The steps you need to take depend on which version of TiddlyWiki you are upgrading from. From version 2.4.0 onwards, you can upgrade to the latest version using the 'Upgrade' tab in the BackstageArea, as described below. If you're using an earlier version of TiddlyWiki, you'll need to follow [[these instructions|HowToUpgradeOlderTiddlyWikis]] instead.
! Upgrading from ~TiddlyWiki 2.4.0+ to the most recent version
* Open the BackstageArea by clicking the 'backstage' button at the top right
* Click on the 'Upgrade' tab
* Click on the 'Upgrade' button, and follow the prompts
The steps you need to take depend on which version of TiddlyWiki you are upgrading from. From version 2.4.0 onwards, you can upgrade to the latest version using the 'Upgrade' tab in the BackstageArea, as described in HowToUpgrade. If you're using an earlier version of TiddlyWiki, you'll need to follow these instructions instead:
! Upgrading from TiddlyWiki earlier than version 2.4.0 to the latest version
* Download a fresh, empty version of TiddlyWiki by right-clicking on [[this link|http://www.tiddlywiki.com/empty.html]], selecting 'Save target' or 'Save link' and saving it in a convenient location as (say) "mynewtiddlywiki.html"
* Open the new TiddlyWiki file in your browser
* Choose ''import'' from the BackstageArea at the top of the window (you may need to click the 'backstage' button at the upper right to show the BackstageArea)
* Click the ''browse'' button and select your original TiddlyWiki file (say, "mytiddlywiki.html") from the file browser
* Click the ''open'' button on the import wizard; a list of all of your tiddlers is displayed
* Click on the top-left checkbox to select all the tiddlers in the list
* Scroll down to the bottom of the wizard and ensure that the checkbox labelled //Keep these tiddlers linked to this server...// is ''clear''
* Click the ''import'' button
The most likely cause of the upgrade process not working properly is that one of the [[Plugins]] you're using is not compatible with a change in the new release. If so, you can repeat the process omitting the troublesome plugins.
Entities in HTML documents allow characters to be entered that can't easily be typed on an ordinary keyboard. They take the form of an ampersand (&), an identifying string, and a terminating semi-colon (;). There's a complete reference [[here|http://www.htmlhelp.com/reference/html40/entities/]]; some of the more common and useful ones are shown below. Also see [[Paul's Notepad|http://thepettersons.org/PaulsNotepad.html#GreekHtmlEntities%20HtmlEntitiesList%20LatinHtmlEntities%20MathHtmlEntities]] for a more complete list.
|>|>|>|>|>|>| !HTML Entities |
| &nbsp; | | no-break space | | &apos; | ' | single quote, apostrophe |
| &ndash; | – | en dash |~| &quot; | " | quotation mark |
| &mdash; | — | em dash |~| &prime; | ′ | prime; minutes; feet |
| &hellip; | … | horizontal ellipsis |~| &Prime; | ″ | double prime; seconds; inches |
| &copy; | © | Copyright symbol |~| &lsquo; | ‘ | left single quote |
| &reg; | ® | Registered symbol |~| &rsquo; | ’ | right single quote |
| &trade; | ™ | Trademark symbol |~| &ldquo; | “ | left double quote |
| &dagger; | † | dagger |~| &rdquo; | ” | right double quote |
| &Dagger; | ‡ | double dagger |~| &laquo; | « | left angle quote |
| &para; | ¶ | paragraph sign |~| &raquo; | » | right angle quote |
| &sect; | § | section sign |~| &times; | × | multiplication symbol |
| &uarr; | ↑ | up arrow |~| &darr; | ↓ | down arrow |
| &larr; | ← | left arrow |~| &rarr; | → | right arrow |
| &lArr; | ⇐ | double left arrow |~| &rArr; | ⇒ | double right arrow |
| &harr; | ↔ | left right arrow |~| &hArr; | ⇔ | double left right arrow |
The table below shows how accented characters can be built up by subsituting a base character into the various accent entities in place of the underscore ('_'):
|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>| !Accented Characters |
| grave accent | &_grave; | À | à | È | è | Ì | ì | Ò | ò | Ù | ù | | | | | | |
| acute accent | &_acute; | Á | á | É | é | Í | í | Ó | ó | Ú | ú | | | Ý | ý | | |
| circumflex accent | &_circ; | Â | â | Ê | ê | Î | î | Ô | ô | Û | û | | | | | | |
| umlaut mark | &_uml; | Ä | ä | Ë | ë | Ï | ï | Ö | ö | Ü | ü | | | Ÿ | ÿ | | |
| tilde | &_tilde; | Ã | ã | | | | | Õ | õ | | | Ñ | ñ | | | | |
| ring | &_ring; | Å | å | | | | | | | | | | | | | |
| slash | &_slash; | | | | | | | Ø | ø | | | | | | | |
| cedilla | &_cedil; | | | | | | | | | | | | | | | Ç | ç |
To import tiddlers from another ~TiddlyWiki file, or from an external website, follow these instructions.
#If the tiddler is on an external site, first copy the URL of the site which includes the tiddler you'd like to download into your clipboard (eg http://www.tiddlytools.com)
#Open your local ~TiddlyWiki file from your computer.
#Click on the 'Backstage' link that you can see at the very top right hand side of the page.
#In the menu, click on 'Import'. You will then see a window that looks like this - and you can follow the guidance from there. Note that you may need to grant authorisation to your ~TiddlyWiki file to import tiddlers - this is fine and expected.
<<importTiddlers>>
//Note also that the popular [[Firebug|http://www.joehewitt.com/software/firebug/]] extension for Firefox interferes with ImportTiddlers if its "Show XMLHttpRequest" option is switched on//
On Freitag, 13. November 2009 19:07:08, Tobias imported 1 tiddler from
[[C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html|C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html]]:
<<<
#[[tbGTD help]] - added
<<<
----
On Freitag, 13. November 2009 19:05:51, Tobias imported 9 tiddlers from
[[C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html|C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html]]:
<<<
#[[DeliciousTagging]] - replaces DeliciousTagging - 11/9/2009 23:37:00 by Tobias
#[[StyleSheetShortcuts]] - replaces StyleSheetShortcuts - 11/9/2009 23:51:00 by Tobias
#[[TagCloud]] - replaces TagCloud - 11/9/2009 23:37:00 by Tobias
#[[TagCloudMacro]] - replaces TagCloudMacro - 11/7/2009 23:53:00 by Tobias
#[[TiddlersBarPlugin]] - replaces TiddlersBarPlugin - 11/10/2009 03:24:00 by Tobias
#[[help]] - replaces help - 11/10/2009 02:19:00 by Tobias
#[[tbGtdTheme]] - replaces tbGtdTheme - 11/9/2009 23:50:00 by Tobias
#[[x-plore]] - replaces x-plore - 11/9/2009 23:53:00 by Tobias
#[[x-tagger]] - replaces x-tagger - 11/7/2009 22:46:00 by Tobias
<<<
----
On Freitag, 13. November 2009 19:05:32, Tobias imported 1 tiddler from
[[C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html|C:\xTiddle\tiddlyspot\tbGTD\tbGTD.html]]:
<<<
#[[update]] - added
<<<
When you type more than three characters in the search box at the upper right, any matching tiddlers are automatically displayed with the text highlighted. There's a couple of minor issues: the highlights don't get removed when you clear the search, and occasionally, on some browsers, keystrokes get missed if you type quickly so you may need to click the 'search' button to manually trigger the search.
TiddlyWiki lets you write ordinary HTML by enclosing it in {{{<html>}}} and {{{</html>}}}:
<html>
<a href="javascript:;" onclick="onClickTiddlerLink(event);" tiddlyLink="TiddlyWiki" style="background-color: yellow;">Link to wikiwords from HTML</a>
</html>
The source for the above is:
{{{
<html>
<div style="background-color: yellow;">
<a href="javascript:;" onclick="onClickTiddlerLink(event);" tiddlyLink="Macros">Link to wikiwords from HTML</a>
</div>
</html>
}}}
HTML can enable some exotic new features (like [[embedding GMail and Outlook|http://groups.google.com/group/TiddlyWiki/browse_thread/thread/d363303aff5868d0/056269d8409d121f?lnk=st&q=embedding+gmail&rnum=1#056269d8409d121f]] in a TiddlyWiki). However it doesn't work for some JavaScript code libraries; see CustomMarkup for another way to include custom HTML in your TiddlyWiki.
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.5|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 5, date: new Date(2009,4,11)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
handler: function(w) {
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var src=lookaheadMatch[1];
var label=lookaheadMatch[2];
var tip=lookaheadMatch[3];
var key=lookaheadMatch[4];
var show=lookaheadMatch[5];
var code=lookaheadMatch[6];
if (src) { // external script library
var script = document.createElement("script"); script.src = src;
document.body.appendChild(script); document.body.removeChild(script);
}
if (code) { // inline code
if (show) // display source in tiddler
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (label) { // create 'onclick' command link
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
link.code="function _out(place,tiddler){"+fixup+"\n};_out(this,this.tiddler);"
link.tiddler=w.tiddler;
link.onclick=function(){
this.bufferedHTML="";
try{ var r=eval(this.code);
if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
if(this.bufferedHTML.length)
s.innerHTML=this.bufferedHTML;
if((typeof(r)==="string")&&r.length) {
wikify(r,s,null,this.tiddler);
return false;
} else return r!==undefined?r:false;
} catch(e){alert(e.description||e.toString());return false;}
};
link.setAttribute("title",tip||"");
var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
link.setAttribute("href",URIcode);
link.style.cursor="pointer";
if (key) link.accessKey=key.substr(0,1); // single character only
}
else { // run script immediately
var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
var c="function _out(place,tiddler){"+fixup+"\n};_out(w.output,w.tiddler);";
try { var out=eval(c); }
catch(e) { out=e.description?e.description:e.toString(); }
if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
}
}
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
} )
//}}}
// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
if(limit > 0) text = text.substr(0,limit);
var wikifier = new Wikifier(text,formatter,null,tiddler);
return wikifier.wikifyPlain();
}
//}}}
// // GLOBAL FUNCTION: $(...) -- 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=='undefined') { function $(id) { return document.getElementById(id.replace(/^#/,'')); } }
//}}}
The following installation guidelines have been created to cover the vast majority of browsers and operating systems.
If you are still having trouble installing ~TiddlyWiki after checking these guidelines, check the [[list of browsers|Browsers]] to make sure your browser and operating system are supported. And you can always [[turn to the community|Help and Support]] for help!
!Installation guidelines
[[Firefox on Mac OS X|Installation guidelines: Firefox on Mac OS X]]
[[Firefox on Windows Vista|Installation guidelines: Firefox on Windows Vista]]
[[Firefox on Windows XP|Installation guidelines: Firefox on Windows XP]]
[[Firefox on Ubuntu|Installation guidelines: Firefox on Ubuntu]]
[[Internet Explorer on Windows Vista|Installation guidelines: Internet Explorer on Windows Vista]]
[[Internet Explorer on Windows XP|Installation guidelines: Internet Explorer on Windows XP]]
[[Safari on Mac OS X|Installation guidelines: Safari on Mac OS X]]
[[Opera on Mac OS X|Installation guidelines: Opera on Mac OS X]]
Follow these easy steps to get started! Note that these guidelines are for Firefox v3.0.1 running on Mac OS X 10.5.4.
''If these guidelines aren't appropriate, check the [[other browser-specific guidelines|Installation]] to find some that are right for you.''
!Step 1 - Download file
You'll need to choose a name and location for your empty ~TiddlyWiki file - we recommend either your Desktop or Documents folder. Make sure you keep the .html file extension and leave the "Save As: Hypertext" default option as it is.
[img[images/step1mac.jpg]]
!Step 2 - Download complete
Empty ~TiddlyWiki files are very small, and download should be completed quickly. You can now either launch the file from the download pane (shown below, double click on the file name to launch), or open your finder to open the file from there.
[img[images/step2mac.jpg]]
!Step 3 - Open file
You'll be asked if you're sure you want to open the file - click "Open".
[img[images/step3mac.jpg]]
!Step 4 - Grant authority
When you try to save your changes for the first time, Firefox may ask you to grant access to the file system. You will need to 'Allow' this for ~TiddlyWiki changes to be saved, and we recommend you tick the 'Remember this decision' checkbox so this dialogue box doesn't appear each time.
[img[images/step4mac.jpg]]
!Step 5 - You're ready to start!
You're now ready to start playing with your ~TiddlyWiki file - be sure to check out the guidelines in [[Getting Started|GettingStarted]]!
Follow these easy steps to get started! Note that these guidelines are for Firefox v3.0.1 running on Ubuntu version 8.0.4 (Hardy Heron).
''If these guidelines aren't appropriate, check the [[other browser-specific guidelines|Installation]] to find some that are right for you.''
!Step 1 - Download file
You'll need to choose a name and location for your empty ~TiddlyWiki file - we recommend either your Desktop or Documents folder. Make sure you keep the file type as HTML Document.
[img[images/step1ubuntu.png]]
!Step 2 - Download complete
Empty ~TiddlyWiki files are very small, and download should be completed quickly. You can now either launch the file from the download pane (shown below, double click on the file name to launch), or open your finder to open the file from there.
[img[images/step2ubuntu.png]]
!Step 3 - Grant authority
When you try to save your changes for the first time, Firefox may ask you to grant access to the file system. You will need to 'Allow' this for ~TiddlyWiki changes to be saved, and we recommend you tick the 'Remember this decision' checkbox so this dialogue box doesn't appear each time.
[img[images/step3ubuntu.png]]
!Step 4 - You're ready to start!
You're now ready to start playing with your ~TiddlyWiki file - be sure to check out the guidelines in [[Getting Started|GettingStarted]]!
<<tiddler [[Installation guidelines: Firefox on Windows Vista]]>>
Follow these steps to get started! These guidelines are for Firefox 3.0.1 running on Microsoft Windows Vista 6.0.0. Hopefully they will be helpful for your setup too.
''If these guidelines aren't appropriate, check the [[other browser-specific guidelines|Installation]] to find some that are right for you.''
!Step 1 - Download file
You'll need to choose a name and location for your empty ~TiddlyWiki file - we recommend either your Desktop or Documents folder. Make sure you leave the "Save as type: HTML Document" default option as it is. Then click 'Save'.
[img[images/step1vistaff.jpg]]
!Step 2 - Open file
Click on the file name in the Download dialogue box. This will open your ~TiddlyWiki file, and you'll be able to start editing immediately - but you'll need to complete Step 3 below to save your changes.
[img[images/step2vistaff.jpg]]
!Step 3 - Enable advanced features
When you try to save changes for the first time, this dialogue box will appear. These features will enable the saving mechanism. Tick the 'Remember this decision' checkbox and then click on 'Allow'.
[img[images/step3vistaff.jpg]]
!Step 4 - You're ready to start!
You're now ready to start playing with your ~TiddlyWiki file - be sure to check out the guidelines in [[Getting Started|GettingStarted]]!
Follow these steps to get started! These guidelines are for Firefox 3.0.1 running on Microsoft Windows XP, Service Pack 3. Hopefully they will be helpful for your setup too.
''If these guidelines aren't appropriate, check the [[other browser-specific guidelines|Installation]] to find some that are right for you.''
!Step 1 - Download file
You'll need to choose a name and location for your empty ~TiddlyWiki file - we recommend either your Desktop or My Documents folder. Make sure you leave the "Save as type: Firefox Document" default option as it is. Then click 'Save'.
[img[images/step1xpff.jpg]]
!Step 2 - Open file
Double click on the file name in the Download dialogue box, shown below. This will open your ~TiddlyWiki file, and you'll be able to start editing immediately - but you'll need to complete Step 3 below to save your changes.
[img[images/step2xpff.jpg]]
!Step 3 - Enable advanced features
When you try to save changes for the first time, this dialogue box will appear. These features will enable the saving mechanism. Tick the 'Remember this decision' checkbox and then click on 'Allow'.
[img[images/step3xpff.jpg]]
!Step 4 - You're ready to start!
You're now ready to start playing with your ~TiddlyWiki file - be sure to check out the guidelines in [[Getting Started|GettingStarted]]!
<<tiddler [[Installation guidelines: Internet Explorer on Windows Vista]]>>
Follow these steps to get started! These guidelines are for Internet Explorer 7.0 running on Microsoft Windows Vista 6.0.0. Hopefully they will be helpful for your setup too.
''If these guidelines aren't appropriate, check the [[other browser-specific guidelines|Installation]] to find some that are right for you.''
!Step 1 - Download file
You'll need to choose a name and location for your empty ~TiddlyWiki file - we recommend either your Desktop or Documents folder. Make sure you leave the "Save as type: HTML Document" default option as it is. Then click 'Save'.
[img[images/step1vista.jpg]]
!Step 2 - Open folder
Once the download has been completed, ''don't open the file yet'' - a minor modification is required before ~TiddlyWiki will work! Click on 'Open Folder'.
[img[images/step2vista.jpg]]
!Step 3 - Modify properties
In the folder, right click on the file name and select 'Properties' from the bottom of the contextual menu.
[img[images/step3vista.jpg]]
!Step 4 - Unblock file
In order to allow saving, you need to Unblock the file. Select 'Unblock' near the bottom of the dialogue box, then click on 'OK'. If the Unblock button doesn't appear, then you don't need to worry about it - click on OK and proceed to step 5.
[img[images/step4vista.jpg]]
!Step 5 - Open file
Double click on the file name to open the file. Internet Explorer takes special care to block javascript from untrusted sources, so a screen will appear with a yellow bar at the top and a warning in red. Click on the yellow bar (this will make it turn blue, as shown below), and select 'Allow Blocked Content...'.
[img[images/step5vista.jpg]]
!Step 6 - Allow active content
~TiddlyWiki contains 'active content' that, for example, allows search and tagging to function. Approve this active content by clicking on 'Yes'.
[img[images/step6vista.jpg]]
!Step 7 - Enable saving mechanism
One final hurdle! When you save for the first time, you'll be prompted to allow the activity. Click on 'Yes'.
[img[images/step7vista.jpg]]
!Step 8 - You're ready to start!
You're now ready to start playing with your ~TiddlyWiki file - be sure to check out the guidelines in [[Getting Started|GettingStarted]]!
Follow these steps to get started! These guidelines are for Internet Explorer 7.0 running on Microsoft Windows XP, Service Pack 3. Hopefully they will be helpful for your setup too.
''If these guidelines aren't appropriate, check the [[other browser-specific guidelines|Installation]] to find some that are right for you.''
!Step 1 - Download file
You'll need to choose a name and location for your empty ~TiddlyWiki file - we recommend either your Desktop or My Documents folder. Make sure you leave the "Save as type: HTML Document" default option as it is. Then click 'Save'.
[img[images/step1xpie.jpg]]
!Step 2 - Open folder
Once the download has been completed, ''don't open the file yet'' - a minor modification is required before ~TiddlyWiki will work! ''Click on 'Open Folder'''.
[img[images/step2xpie.jpg]]
!Step 3 - Modify properties
In the folder, right click on the file name and select 'Properties' from the bottom of the contextual menu.
[img[images/step3xpie.jpg]]
!Step 4 - Unblock file
In order to allow saving, you need to Unblock the file. Select 'Unblock' near the bottom of the dialogue box, then click on 'OK'. If the Unblock button doesn't appear, then you don't need to worry about it - click on OK and proceed to step 5.
[img[images/step4xpie.jpg]]
!Step 5 - Open file
Now you've unblocked the file, you can double click on the file name to open the file. Internet Explorer takes special care to block javascript from untrusted sources, so a screen will appear with a yellow bar at the top and a warning in red. Click on the yellow bar (this will make it turn blue, as shown below), and select 'Allow Blocked Content...'.
[img[images/step5xpie.jpg]]
!Step 6 - Allow active content
~TiddlyWiki contains 'active content' that, for example, allows animations to function. Approve this active content by clicking on 'Yes'.
[img[images/step6xpie.jpg]]
!Step 7 - Enable saving mechanism
One final hurdle! When you save for the first time, you'll be prompted to allow the activity. Click on 'Yes'.
[img[images/step7xpie.jpg]]
!Step 8 - You're ready to start!
You're now ready to start playing with your ~TiddlyWiki file - be sure to check out the guidelines in [[Getting Started|GettingStarted]]!
Follow these easy steps to get started! Note that these guidelines are for Opera 9.5.1 running on Mac OS X 10.5.4, but will apply to several other configurations (including most other versions of [[Opera]])
''If these guidelines aren't appropriate, check the [[other browser-specific guidelines|Installation]] to find some that are right for you.''
!Step 1 - Download files
Download the zip file to a location of your choice.
[img[images/step1macopera.jpg]]
!Step 2 - Check files
Open the zip file, and then check in the resulting folder that you have automatically received two files:
*empty.html (this is your ~TiddlyWiki file)
*~TiddlySaver.jar (this is a java applet, which will make sure everything works in your chosen browser. Note a copy of this file ''must'' be kept in the same folder as any ~TiddlyWiki file you are using)
[img[images/step2macopera.jpg]]
You can download the TiddlySaver file on it's own from [[here|http://www.tiddlywiki.com/TiddlySaver.jar]] if you need it.
Open the empty.html file to get started.
!Step 3 - Trust applet
The ~TiddlySaver.jar applet has been signed by [[UnaMesa|http://www.unamesa.org]], who hold the rights to ~TiddlyWiki on behalf of the community. You can find out more about the applet itself [[here|TiddlySaver]], and you'll need to click on 'Trust' in order for the ~TiddlyWiki to work. If you've accidentally clicked on 'Don't Trust' previously, don't worry - just restart the browser and you should get asked again.
[img[images/step3macopera.jpg]]
!Step 4 - You're done!
Thanks to the applet, you now have the full functionality of ~TiddlyWiki at your disposal. Be sure to check out the guidelines in [[Getting Started|GettingStarted]]!
Follow these easy steps to get started! Note that these guidelines are for Safari 3.1.2 running on Mac OS X 10.5.4, but will apply to several other configurations (other versions of [[Safari]] and [[Opera]] too)
''If these guidelines aren't appropriate, check the [[other browser-specific guidelines|Installation]] to find some that are right for you.''
!Step 1 - Check downloaded files
After [[Download]], check first that you have automatically received a zip file containing two files (the contents of the zip file may have been extracted automatically - if not, open the zip file):
*empty.html (this is your ~TiddlyWiki file)
*~TiddlySaver.jar (this is a java applet, which will make sure everything works in your chosen browser. Note a copy of this file ''must'' be kept in the same folder as any ~TiddlyWiki file you are using)
[img[images/step1macsafari.jpg]]
You can download the ~TiddlySaver.jar file on it's own from [[here|http://www.tiddlywiki.com/TiddlySaver.jar]] if you need it.
Double click the empty.html file to get started.
!Step 2 - Open file
The system will check you're happy to open the ~TiddlyWiki file. Click on 'Open'.
[img[images/step2macsafari.jpg]]
!Step 3 - Trust applet
The ~TiddlySaver.jar applet has been signed by [[UnaMesa|http://www.unamesa.org]], who hold the rights to ~TiddlyWiki on behalf of the community. You can find out more about the applet itself [[here|TiddlySaver]], and you'll need to click on 'Trust' in order for the ~TiddlyWiki to work. If you've accidentally clicked on 'Don't Trust' previously, don't worry - just restart the browser and you should get asked again.
[img[images/step3macsafari.jpg]]
!Step 4 - You're done!
Thanks to the applet, you now have the full functionality of ~TiddlyWiki at your disposal. Be sure to check out the guidelines in [[Getting Started|GettingStarted]]!
[[Plugins]] are just tiddlers containing ~JavaScript code that is tagged with <<tag systemConfig>>. TiddlyWiki executes any [[Plugins]] as it loads; they can add [[Macros]] or otherwise extend and enhance the base code.
The recommended way to install a plugin into your own copy of TiddlyWiki is to use ImportTiddlers (there are instructions for ManuallyInstallIngPlugins when required).
InterfaceOptions are displayed when you click the 'options' button on the right in your TiddlyWiki file. They are saved in a cookie on your browser, making them sticky between visits:
<<<
<<tiddler OptionsPanel>>
<<<
* The user name for edits should be set //before// starting to edit things (ouch. another bug)
* SaveBackups gives the option of whether to generate backup files
* AutoSave gives the option of automatically saving every time a change is made
* RegExpSearch allows more complex search expressions
* CaseSensitiveSearch does as its name implies
TiddlyWiki works on InternetExplorer 6.x and above under Windows. It also allows you to SaveChanges, albeit there are some annoying XP ServicePack2Problems and VistaIssues to work around. If you're having problems, make sure you've followed the appropriate [[installation guidelines|Installation]].
Known problems with ~TiddlyWiki under InternetExplorer:
* [[Gradient|GradientMacro]] fills sometimes appear in the wrong place until you move the mouse over the tiddler
* Horizontal gradients don't work correctly
* Links to tiddlers with multiple consecutive spaces in their titles is broken
* Runs of spaces within tiddlers get conflated into a single space when you edit a tiddler. This is particularly annoying when using MonospacedText blocks
|''URL:''|http://jackparke.googlepages.com/jtw.html|
|''Description:''|Plugins, Macros and Hacks|
|''Author:''|JackParker|
Jeremy is the original creator of TiddlyWiki (nowadays, it's more of a [[group effort|Community]]). I work at [[BT|http://www.btplc.com/]] where I am Head of Open Source Innovation. I run the [[Osmosoft]] team, and generally try to help BT be better at understanding and participating in open source.
I can be reached at {{{jeremy (at) osmosoft (dot) com}}}, and I regularly read and reply to messages on the [[TiddlyWiki Google Groups|Community]]. I (occasionally) blog at http://jermolene.wordpress.com/ and you can also find me on [[Flickr|http://www.flickr.com/photos/jermy/]], [[del.icio.us|http://del.icio.us/jeremyruston]] and [[twitter|http://twitter.com/Jermolene]].
Offers a popup menu to jump directly to any of the currently open tiddlers. It is used with the ToolbarMacro like this:
{{{
<<toolbar jump>>
}}}
Access keys are shortcuts to common functions accessed by typing a letter with either the 'alt' (PC) or 'control' (Mac) key:
|!PC|!Mac|!Function|
|Alt-F|Ctrl-F|Search|
|Alt-J|Ctrl-J|NewJournal|
|Alt-N|Ctrl-N|NewTiddler|
|Alt-S|Ctrl-S|SaveChanges|
These access keys are provided by the associated internal [[Macros]] for the functions above. The macro needs to be used in an open tiddler (or the MainMenu or SideBar) in order for the access keys to work.
While editing a tiddler:
* ~Control-Enter or ~Control-Return accepts your changes and switches out of editing mode (use ~Shift-Control-Enter or ~Shift-Control-Return to stop the date and time being updated for MinorChanges)
* Escape abandons your changes and reverts the tiddler to its previous state
In the search box:
* Escape clears the search term
/***
|Name:|LessBackupsPlugin|
|Description:|Intelligently limit the number of backup files you create|
|Version:|3.0.1 ($Rev: 2320 $)|
|Date:|$Date: 2007-06-18 22:37:46 +1000 (Mon, 18 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
|Author:|Simon Baird|
|Email:|simon.baird@gmail.com|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second. So total number won't exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!Notes
Works in IE and Firefox only. Algorithm by Daniel Baird. IE specific code by by Saq Imtiaz.
***/
//{{{
var MINS = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS = 24 * HOURS;
if (!config.lessBackups) {
config.lessBackups = {
// comment out the ones you don't want or set config.lessBackups.modes in your 'tweaks' plugin
modes: [
["YYYY", 365*DAYS], // one per year for ever
["MMM", 31*DAYS], // one per month
//["ddd", 7*DAYS], // one per weekday
["d0DD", 1*DAYS], // one per day of month
//["h0hh", 24*HOURS], // one per hour
//["m0mm", 1*HOURS], // one per minute
//["s0ss", 1*MINS], // one per second
["latest",0] // always keep last version. (leave this).
]
};
}
window.getSpecialBackupPath = function(backupPath) {
var now = new Date();
var modes = config.lessBackups.modes;
for (var i=0;i<modes.length;i++) {
// the filename we will try
var specialBackupPath = backupPath.replace(/(\.)([0-9]+\.[0-9]+)(\.html)$/,
'$1'+now.formatString(modes[i][0]).toLowerCase()+'$3')
// open the file
try {
if (config.browser.isIE) {
var fsobject = new ActiveXObject("Scripting.FileSystemObject")
var fileExists = fsobject.FileExists(specialBackupPath);
if (fileExists) {
var fileObject = fsobject.GetFile(specialBackupPath);
var modDate = new Date(fileObject.DateLastModified).valueOf();
}
}
else {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(specialBackupPath);
var fileExists = file.exists();
if (fileExists) {
var modDate = file.lastModifiedTime;
}
}
}
catch(e) {
// give up
return backupPath;
}
// expiry is used to tell if it's an 'old' one. Eg, if the month is June and there is a
// June file on disk that's more than an month old then it must be stale so overwrite
// note that "latest" should be always written because the expiration period is zero (see above)
var expiry = new Date(modDate + modes[i][1]);
if (!fileExists || now > expiry)
return specialBackupPath;
}
}
// hijack the core function
window.getBackupPath_mptw_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
return getSpecialBackupPath(getBackupPath_mptw_orig(localPath));
}
//}}}
|''URL:''|http://tw.lewcid.org/|
|''Description:''|a repository of my extensions for TW|
|''Author:''|SaqImtiaz|
You've clicked on an example link! Click close to close this tiddler.
The format for PrettyLinks allows for links that open local or network folders. Depending on your browser and operating system, the folders are opened in Windows Explorer, the OS X Finder, or the browser itself.
Edit this tiddler to see [[this link to a Windows network share|file://///server/share/folder/path/name]], [[this link to a Windows drive-mapped folder|file:///c:/folder/path/name]] and [[this link to a Unix-style folder|file:///folder/path/name]].
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
major: 1, minor: 1, revision: 0,
date: new Date("mar 17, 2007"),
source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};
if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};
bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){
url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
}
return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
[[Macros]] let you write tiddlers containing more exotic objects than just text. Built-in macros include:
* NewJournalMacro and NewTiddlerMacro
* GradientMacro
* TabMacro
* TaggingMacro
* TodayMacro
* ToolbarMacro
Tag popup:
{{{
<<tag features>>
}}}
will result in <<tag features>>
Slider:
{{{
<<slider chkTestSlider OptionsPanel options "Change TiddlyWiki advanced options">>
}}}
Results in this button <<slider chkTestSlider OptionsPanel options "Change TiddlyWiki advanced options">>
The parameters are:
* cookie name to be used to save the state of the slider
* name of the tiddler to include in the slider
* title text of the slider
* tooltip text of the slider
<script>
var out='',s,t,tags=[],tids=[],ti,tgt;
tags=store.getTiddlerText('x-tagger config##Tags').readBracketedList();
for(t=0;t<tags.length;t++){
ti=tags[t];tgt=tids.contains(ti)?[]:store.getTaggedTiddlers(ti);
if(tgt.length==0)tags.splice(t,1);//takes out subitems of toplevel ones, e.g. $active projects
else for(var s=0;s<tgt.length;s++)tids.pushUnique(tgt[s].title);
}
for(t=0;t<tags.length;t++){
ti=tags[t];tids=store.getTaggedTiddlers(ti);
out+="*"+(tids[0]?' '+tids[0].title.substr(0,1)+' ':'')+ti+"\n";
for(s=0;s<tids.length;s++){
ti=tids[s].title;
out+="**<<newTiddler label:+ title:'new "+ti+"' prompt:'create a new "+ti+"' focus:title tag:'"+ti+"'>><<tag "+ti+">>\n";
}
}
return out;
</script><<accordion>>/%do all you want, but please be so kind as to leave the link to http://tbGTD.tiddlyspot.com in here%/
<html>
<a class="noCopy" href="javascript:story.displayTiddler(null,'tweet');" title="post on twitter" style="clear:both;display:block;width:46%;padding:0 2%;float:left;text-align:center;">tweet</a>
<a class="noCopy" href="http://tbgtd.tiddlyspot.com" title="go to the original tbGTD" style="display:block;width:46%;padding:0 2% 0 0;float:left;text-align:center;" target="_blank">tbGTD</a>
</html>
In some situations it can be useful to use the clipboard insead of InstallingPlugins using ImportTiddlers.
# Open a new browser window and navigate to the TiddlyWiki site containing the macro you want
# Double click the tiddler, or click the {{{source}}} button (on other sites it will sometimes be a {{{view}}} or {{{edit}}} button)
# The entire text of the tiddler should be selected; if not select it manually with Control-A or Command-A
# Copy the entire text of the tiddler to the clipboard
# Open your TiddlyWiki file in a new browser window
# Click {{{new tiddler}}} to create a new blank tiddler
## Paste the contents of the clipboard into it's body
## Set the title as appropriate
## Add the tag {{{systemConfig}}}
# Click {{{done}}} on the tiddler
# SaveChanges
# Reload your TiddlyWiki in the browser
The plugin should now be available for use.
<!--{{{-->
<style type="text/css">
#contentWrapper {display:none;}
#splashScreen {display:block;}
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}
h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
.tabSelected{color:[[ColorPalette::PrimaryDark]];
background:[[ColorPalette::TertiaryPale]];
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-top:1px solid [[ColorPalette::TertiaryLight]];
border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#s_sidebar {}
#s_sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#s_sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#s_sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#s_sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#s_sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#s_80ff80;}
.wizard .changedServer {background:#s_8080ff;}
.wizard .changedBoth {background:#s_ff8080;}
.wizard .notFound {background:#s_ffff80;}
.wizard .putToServer {background:#s_ff80ff;}
.wizard .gotFromServer {background:#s_80ffff;}
#s_messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#s_messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.tiddler .defaultCommand {font-weight:bold;}
.shadow .title {color:[[ColorPalette::TertiaryDark]];}
.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}
.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}
.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}
.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}
.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}
.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
.imageLink, #s_displayArea .imageLink {background:transparent;}
.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
#s_backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#s_backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#s_backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#s_backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#s_backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#s_backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#s_backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#s_backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity=60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#s_contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#s_mainMenu .tiddlyLinkExisting,
#s_mainMenu .tiddlyLinkNonExisting,
#s_sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#s_sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0px; top:0px;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#s_mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#s_sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#s_sidebarOptions {padding-top:0.3em;}
#s_sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#s_sidebarOptions input {margin:0.4em 0.5em;}
#s_sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#s_sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#s_sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#s_sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}
#s_messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#s_messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#s_contentWrapper {display:block;}
#s_splashScreen {display:none;}
#s_displayArea {margin:1em 17em 0 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}
.fieldsetFix {border:0; padding:0; margin:1px 0px;}
.sparkline {line-height:1em;}
.sparktick {outline:0;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #s_backstage {width:99%;}
* html #s_backstageArea {width:99%;}
#s_backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#s_backstageToolbar {position:relative;}
#s_backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#s_backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#s_backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#s_backstage {position:relative; width:100%; z-index:50;}
#s_backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#s_backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
#s_splashScreen {display:block;}
/***
This fixes a problem with the tabs slider
***/
/*{{{*/
#s_sidebarTabs .button {
margin:0em 0.2em;
padding:0.2em 0.3em;
display:block;
}
/*}}}*/
/***
This is a sample style definition to demonstrate CustomCssClass formatting
***/
/*{{{*/
.wrappingClass {color: #s_666; background: #s_bbb;}
[[ChunkyButtonStyle]]
/*}}}*/
#s_messageArea {display:none;}
</style>
<!--}}}-->
<!--{{{-->
<div id="splashScreen">
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class="siteTitle">TiddlyWiki</span>
<span class="siteSubtitle">a reusable non-linear personal web notebook</span>
</div>
<div class='headerForeground'>
<span class="siteTitle">TiddlyWiki</span>
<span class="siteSubtitle">a reusable non-linear personal web notebook</span>
</div>
</div>
<div id='s_mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='s_sidebar'>
<div id='s_sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='s_sidebarTabs' refresh='macro' force='true' macro='slider chkSideBarTabs SideBarTabs "index »" "display lists of tiddlers"'></div>
</div>
<div id='s_displayArea'>
<div id='s_messageArea'></div>
<div id="s_tiddlerDisplay"><div id="splashId_HelloThere" class="tiddler">
<div class="toolbar"><br></div>
<div class="title">HelloThere</div>
<div class="viewer">Welcome to TiddlyWiki!<br><br>TiddlyWiki is a single html file which has all the characteristics of a wiki - including all of the content, the functionality (including editing, saving, tagging and searching) and the style sheet. Because it's a single file, it's very portable - you can email it, put it on a web server or share it via a USB stick.<br><br><strong>But it's not just a wiki!</strong> It has very powerful plugin capabilities, so it can also be used to build new tools. You have full control over how it looks and behaves. For example, TiddlyWiki is already being used as:<br><ul><li>A personal notebook</li><li>A GTD ("Getting Things Done") productivity tool</li><li>A collaboration tool</li><li>For building websites (this site is a TiddlyWiki file!)</li><li>For rapid prototyping</li><li>...and much more!</li></ul>You can import and export data to and from all sorts of places. Check out some of the Examples of TiddlyWiki in use, and the Features that are available.<br><br>You can see the web functionality of TiddlyWiki by clicking on some of the links on this website. Double click some of the text to see 'edit mode'. For the full range of functions, including editing and saving changes, download and install a copy of the basic version and then follow the guidelines in Getting Started. Have fun!<br><br><span tiddler="Download" refresh="content"><div class="downloadButton"><table class="twtable"><tbody><tr class="evenRow"><td><span class="chunkyButton"><a class="button" title="Download TiddlyWiki" href="javascript:;">download</a></span></td></tr></tbody></table><br>Advanced options >></div></span></div>
<div class="tagClear"></div>
</div>
<div id="splashId_NewFeatures" class="tiddler">
<div class="toolbar"><br></div>
<div class="title">NewFeatures</div>
<div class="viewer">Release 2.5.3 is primarily a bugfix release, but also contains usability enhancements:<br><ul><li> Reverted changes to the file system code that were made in 2.5.2</li><li> Fixed problem with lack of confirmation prompt when cancelling editing on new and shadow tiddlers</li><li> Improved feedback on synchronization and dynamic loading of tiddlers</li></ul><br>For the full release notes see:<br><a target="_blank" title="External link to http://trac.tiddlywiki.org/wiki/History" href="http://trac.tiddlywiki.org/wiki/History" class="externalLink">http://trac.tiddlywiki.org/wiki/History</a><br></div>
<div class="tagClear"></div>
</div>
</div>
</div>
</div>
<!--}}}-->
<script type="text/javascript">
document.getElementById("splashScreen").style.display="none";
</script>
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' /><style type="text/css">body {background:black;}#contentWrapper {display:none;}</style><div id="SplashScreen" style="display: block; text-align: center; width: 500px; margin: 100px auto; padding: 20px 30px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#333;color:#FFF;border: 2px solid #ddd;-moz-border-radius:5px; -webkit-border-radius:5px;"><b>tbGTD</b> is loading<span style="text-decoration: blink;">...</span><br/><span style="font-size: 14px; color:#FDD;">requires javascript</span></div>
<!--}}}-->
|''URL:''|http://www.martinswiki.com/ |
|''Description:''|Martin Buddens's Plugins |
|''Author:''|MartinBudden |
//{{{
config.options.txtFadeTimer = 5000; // 5 seconds
window.displayMessage=function(text,linkText,fadeTimer) {
var e = getMessageDiv();
if(!e) {
alert(text);
return;
}
if(linkText) {
var link = createTiddlyElement(e,"a",null,null,text);
link.href = linkText;
link.target = "_blank";
} else {
e.appendChild(document.createTextNode(text));
}
if(config.options.txtFadeTimer > 0) {
setTimeout(clearMessage, config.options.txtFadeTimer);
}
}
//}}}
MicroContent being a fashionable word for self-contained fragments of content that are typically smaller than entire pages. Often MicroContent is presented via some kind of aggregation that reduces the perceptual shock and resource cost of context switching (eg Blogs aggregating several entries onto a page or Flickr presenting photos in an album). This TiddlyWiki aggregates MicroContent items that I call 'tiddlers' into pages that are loaded in one gulp and progressively displayed as the user clicks hypertext links to read them.
Sometimes it's useful to stop a minor change to a tiddler from causing it to rise to the top of the timeline. This can be done by pressing the Shift key while clicking the 'done' toolbar button, or with the ~Shift-Control-Enter key. This behaviour can be switched to become the default with one of the AdvancedOptions.
The 'Missing' option on the MoreTab shows you the names of tiddlers that you've referred to but not gone ahead to define. It can be useful during writing sessions to keep track of things you need to come back and fill out.
|''URL:''|http://mptw.tiddlyspot.com/|
|''Description:''|a tiddlywiki distribution and plugins|
|''Author:''|SimonBaird|
{{{Monospaced text}}} is supported - edit this tiddler to see the syntax.
You can also have monospaced blocks (useful for source code):
{{{
var posTop = findPosY(e);
var posBot = posTop + e.offsetHeight;
var winTop = findScrollY();
var winHeight = findWindowHeight();
var winBot = winTop + winHeight;
if(posTop < winTop)
return(posTop);
else if(posBot > winBot)
{
if(e.offsetHeight < winHeight)
return(posTop - (winHeight - e.offsetHeight));
else
return(posTop);
}
else
return(winTop);
}}}
The functions of 'Timeline' and 'All' tabs have been around since the FirstVersion of TiddlyWiki. The purpose of the 'More' tab is to bring together some other, more specialised lists of tiddlers that can be useful during writing sessions. Currently, it offers lists of OrphanTiddlers and MissingTiddlers.
Within a CustomStyleSheet, you can include the text of another tiddler by including it in double square brackets. For example, if the tiddler MyFavouriteColour contains {{{#ff763e}}}, and the StyleSheet tiddler contained:
{{{
#mainMenu {background-color:[[MyFavouriteColour]];}
}}}
Then, the effect is that each CSS declaration will be set to {{{background-color: #ff763e;}}}.
In practice, for small bits of text like a colour, it makes sense to use TiddlerSlicing format to reference a chunk of text within a tiddler. See ColorPalette and StyleSheetColors for an example.
Of course, you can use this mechanism to redirect any part of a stylesheet, not just colours. And you can nest references for more complex effects.
A PageTemplate, ViewTemplate or EditTemplate can include the text of another tiddler by including it in double square brackets. For example:
{{{
<div>
[[MyHeader]]
</div>
}}}
You can also use TiddlerSlicing format to include a smaller chunk of the text of a tiddler.
Release 2.5.3 is primarily a bugfix release, but also contains usability enhancements:
* Reverted changes to the file system code that were made in 2.5.2
* Fixed problem with lack of confirmation prompt when cancelling editing on new and shadow tiddlers
* Improved feedback on synchronization and dynamic loading of tiddlers
For the full release notes see:
http://trac.tiddlywiki.org/wiki/History
/***
|Name:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
newHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]] prompt:'Create a new tiddler tagging to this tiddler'>>",place,null,tiddler);
}
},
newJournalHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newJournal "+paramString+" label:'journal' tag:journal tag:[["+tiddler.title+"]] prompt:'Create a new journal entry tagging to this tiddler'>>",place,null,tiddler);
}
}
});
//}}}
The {{{<<newJournal>>}}} macro creates a new tiddler with it's title set to the current date, and the cursor in the body text area ready to type.
This macro is identical to the NewTiddlerMacro except that the "title" parameter is treated as a DateFormatString so that you can specify your own date format.
/***
|Name:|NewMeansNewPlugin|
|Description:|If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on|
|Version:|1.1 ($Rev: 2263 $)|
|Date:|$Date: 2007-06-13 04:22:32 +1000 (Wed, 13 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Note: I think this should be in the core
***/
//{{{
String.prototype.getNextFreeName = function() {
var numberRegExp = / \(([0-9]+)\)$/;
var match = numberRegExp.exec(this);
if (match) {
var num = parseInt(match[1]) + 1;
return this.replace(numberRegExp," ("+num+")");
}
else {
return this + " (1)";
}
}
config.macros.newTiddler.checkForUnsaved = function(newName) {
var r = false;
story.forEachTiddler(function(title,element) {
if (title == newName)
r = true;
});
return r;
}
config.macros.newTiddler.getName = function(newName) {
while (store.getTiddler(newName) || config.macros.newTiddler.checkForUnsaved(newName))
newName = newName.getNextFreeName();
return newName;
}
config.macros.newTiddler.onClickNewTiddler = function()
{
var title = this.getAttribute("newTitle");
if(this.getAttribute("isJournal") == "true") {
var now = new Date();
title = now.formatString(title.trim());
}
title = config.macros.newTiddler.getName(title); // <--- only changed bit
var params = this.getAttribute("params");
var tags = params ? params.split("|") : [];
var focus = this.getAttribute("newFocus");
var template = this.getAttribute("newTemplate");
var customFields = this.getAttribute("customFields");
story.displayTiddler(null,title,template,false,null,null);
var tiddlerElem = document.getElementById(story.idPrefix + title);
if(customFields)
story.addCustomFields(tiddlerElem,customFields);
var text = this.getAttribute("newText");
if(typeof text == "string")
story.getTiddlerField(title,"text").value = text.format([title]);
for(var t=0;t<tags.length;t++)
story.setTiddlerTag(title,tags[t],+1);
story.focusTiddler(title,focus);
return false;
};
//}}}
The {{{<<newTiddler>>}}} macro displays a button that can be clicked to create a new tiddler. By default, the new tiddler is opened in edit mode or you can specify a custom template.
The available parameters are:
|!Parameter |!Description |
|label |The text of the button |
|prompt |The tooltip for the button |
|accessKey |The access key to trigger the button (specify a single letter; different browsers require a different modifier key like Alt- or Control-) |
|focus |Which of the edittable fields to default the focus to (eg, "title", "text", "tags") |
|template |The template to use to display the new tiddler (defaults to EditTemplate) |
|text |The default text for the new tiddler |
|title |The default title for the new tiddler |
|tag |A single tag to be applied to the new tiddler (repeat this parameter to specify multiple tags) |
For example: <<newTiddler label:"try this" accessKey:1 focus:tags text:"hello there!" tag:greeting tag:"an example">> (can also be triggered with Alt-1)
{{{
<<newTiddler label:"try this" accessKey:1 focus:tags text:"hello there!" tag:greeting tag:"an example">>
}}}
You can only prime the initial values of fields that map to a text input box in the specified template (for instance, if you specify the standard ViewTemplate as the template you won't be able to prime any fields). For example, this doesn't work as you might expect:
{{{
<<newTiddler template:ViewTemplate text:"To be or not to be">>
}}}
<<newTiddler template:ViewTemplate text:"To be or not to be">>
To make a tiddler that doesn't have a WikiWord as its name, you can enclose the name in [[double square brackets]] - edit this tiddler to see an example. After saving the tiddler you can then click on the link to create the new tiddler. NonWikiWordLinks permits tiddlers to be created with names that are made from character sets that don't have upper and lower case.
We've recently had a spate of cases of Norton AntiVirus software incorrectly identifying TiddlyWiki files as carrying the [[W32.Feebs]] virus. If you've been affected, see [[this discussion|http://groups.google.com/group/TiddlyWiki/browse_frm/thread/f98da9a720d01ba5/87a96ed9899e05c9?hl=en]] about recovering your data.
It's easy to create NumberedBulletPoints.
# Use a single '#' at the start of each line
# and the tiddler will automatically
# start numbering your list.
## If you want a sub-list
## within any bullets
## add two '#'s at the start of the lines.
# When you go back to a single '#'
# the main numbered list will start up
# where it left off.
It's just as simple to do normal BulletPoints.
TiddlyWiki is published under a BSD OpenSourceLicense that gives you the freedom to use it pretty much however you want, including for commercial purposes, as long as you keep my copyright notice. (You can see the full license text by doing a 'view source' in your browser). If you do use TiddlyWiki I'd appreciate a link back to http://www.tiddlywiki.com.
~TiddlyWiki works with all recent versions of Opera, and can save changes using the TiddlySaver Java applet. If you're experiencing problems, make sure you've followed the appropriate [[installation guidelines|Installation]].
The 'Orphans' option on the MoreTab shows you the names of tiddlers that aren't linked to from any other tiddlers - in other words, tiddlers that there is no way for readers to find other than searching for them.
Osmosoft is a small team run by JeremyRuston within [[BT|http://www.btplc.com/]] that focuses on working with the wider community to improve TiddlyWiki and its related ecosystem. See http://www.osmosoft.com/ for more details.
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[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>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='macro' force='true' macro='slider chkSideBarTabs SideBarTabs "index »" "display lists of tiddlers"'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
The ParameterParser is used in several places in TiddlyWiki:
* to process the StartupParameters after the '#' in a TiddlyWiki URL
* to process the DefaultTiddlers list
* to process the parameters to [[Macros]]
* to process tag lists when editing a tiddler
It supports a list of parameters each of the form "name:value". For example:
{{{
name:John location:"Isle of Wight" [[dietary needs]]:none really:'yes, really'
}}}
Names and values that need to contain spaces may be quoted with single- or double-quotes or double-square brackets. The parser is generally tolerant of additional spaces.
When processing macro parameters, names and values may also be quoted with double-braces which causes them to be evaluated as a JavaScript expression. For example:
{{{
title:{{window.title}}
}}}
The ParameterParser will cope with either the name or the value being omitted, and will substitute a specified default. This is how the StartupParameters work; the default parameter name is specified as 'open'.
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
|''URL:''|http://bradleymeck.tiddlyspot.com/|
|''Description:''|Resources that are Ripe for the Picking|
|''Author:''|BradleyMeck|
|Standard Periodic Table (ref. Wikipedia)|c
|| !1 | !2 |!| !3 | !4 | !5 | !6 | !7 | !8 | !9 | !10 | !11 | !12 | !13 | !14 | !15 | !16 | !17 | !18 |
|!1|bgcolor(#a0ffa0): @@color(red):H@@ |>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>||bgcolor(#c0ffff): @@color(red):He@@ |
|!2|bgcolor(#ff6666): Li |bgcolor(#ffdead): Be |>|>|>|>|>|>|>|>|>|>||bgcolor(#cccc99): B |bgcolor(#a0ffa0): C |bgcolor(#a0ffa0): @@color(red):N@@ |bgcolor(#a0ffa0): @@color(red):O@@ |bgcolor(#ffff99): @@color(red):F@@ |bgcolor(#c0ffff): @@color(red):Ne@@ |
|!3|bgcolor(#ff6666): Na |bgcolor(#ffdead): Mg |>|>|>|>|>|>|>|>|>|>||bgcolor(#cccccc): Al |bgcolor(#cccc99): Si |bgcolor(#a0ffa0): P |bgcolor(#a0ffa0): S |bgcolor(#ffff99): @@color(red):Cl@@ |bgcolor(#c0ffff): @@color(red):Ar@@ |
|!4|bgcolor(#ff6666): K |bgcolor(#ffdead): Ca ||bgcolor(#ffc0c0): Sc |bgcolor(#ffc0c0): Ti |bgcolor(#ffc0c0): V |bgcolor(#ffc0c0): Cr |bgcolor(#ffc0c0): Mn |bgcolor(#ffc0c0): Fe |bgcolor(#ffc0c0): Co |bgcolor(#ffc0c0): Ni |bgcolor(#ffc0c0): Cu |bgcolor(#ffc0c0): Zn |bgcolor(#cccccc): Ga |bgcolor(#cccc99): Ge |bgcolor(#cccc99): As |bgcolor(#a0ffa0): Se |bgcolor(#ffff99): @@color(green):Br@@ |bgcolor(#c0ffff): @@color(red):Kr@@ |
|!5|bgcolor(#ff6666): Rb |bgcolor(#ffdead): Sr ||bgcolor(#ffc0c0): Y |bgcolor(#ffc0c0): Zr |bgcolor(#ffc0c0): Nb |bgcolor(#ffc0c0): Mo |bgcolor(#ffc0c0): Tc |bgcolor(#ffc0c0): Ru |bgcolor(#ffc0c0): Rh |bgcolor(#ffc0c0): Pd |bgcolor(#ffc0c0): Ag |bgcolor(#ffc0c0): Cd |bgcolor(#cccccc): In |bgcolor(#cccccc): Sn |bgcolor(#cccc99): Sb |bgcolor(#cccc99): Te |bgcolor(#ffff99): I |bgcolor(#c0ffff): @@color(red):Xe@@ |
|!6|bgcolor(#ff6666): Cs |bgcolor(#ffdead): Ba |bgcolor(#ffbfff):^^*1^^|bgcolor(#ffc0c0): Lu |bgcolor(#ffc0c0): Hf |bgcolor(#ffc0c0): Ta |bgcolor(#ffc0c0): W |bgcolor(#ffc0c0): Re |bgcolor(#ffc0c0): Os |bgcolor(#ffc0c0): Ir |bgcolor(#ffc0c0): Pt |bgcolor(#ffc0c0): Au |bgcolor(#ffc0c0): @@color(green):Hg@@ |bgcolor(#cccccc): Tl |bgcolor(#cccccc): Pb |bgcolor(#cccccc): Bi |bgcolor(#cccc99): Po |bgcolor(#ffff99): At |bgcolor(#c0ffff): @@color(red):Rn@@ |
|!7|bgcolor(#ff6666): Fr |bgcolor(#ffdead): Ra |bgcolor(#ff99cc):^^*2^^|bgcolor(#ffc0c0): Lr |bgcolor(#ffc0c0): Rf |bgcolor(#ffc0c0): Db |bgcolor(#ffc0c0): Sq |bgcolor(#ffc0c0): Bh |bgcolor(#ffc0c0): Hs |bgcolor(#ffc0c0): Mt |bgcolor(#ffc0c0): Ds |bgcolor(#ffc0c0): Rg |bgcolor(#ffc0c0): @@color(green):Uub@@ |bgcolor(#cccccc): Uut |bgcolor(#cccccc): Uuq |bgcolor(#cccccc): Uup |bgcolor(#cccccc): Uuh |bgcolor(#fcfecc): @@color(#cccccc):Uus@@ |bgcolor(#ecfefc): @@color(#cccccc):Uuo@@ |
| !Lanthanides^^*1^^|bgcolor(#ffbfff): La |bgcolor(#ffbfff): Ce |bgcolor(#ffbfff): Pr |bgcolor(#ffbfff): Nd |bgcolor(#ffbfff): Pm |bgcolor(#ffbfff): Sm |bgcolor(#ffbfff): Eu |bgcolor(#ffbfff): Gd |bgcolor(#ffbfff): Tb |bgcolor(#ffbfff): Dy |bgcolor(#ffbfff): Ho |bgcolor(#ffbfff): Er |bgcolor(#ffbfff): Tm |bgcolor(#ffbfff): Yb |
| !Actinides^^*2^^|bgcolor(#ff99cc): Ac |bgcolor(#ff99cc): Th |bgcolor(#ff99cc): Pa |bgcolor(#ff99cc): U |bgcolor(#ff99cc): Np |bgcolor(#ff99cc): Pu |bgcolor(#ff99cc): Am |bgcolor(#ff99cc): Cm |bgcolor(#ff99cc): Bk |bgcolor(#ff99cc): Cf |bgcolor(#ff99cc): Es |bgcolor(#ff99cc): Fm |bgcolor(#ff99cc): Md |bgcolor(#ff99cc): No |
*Chemical Series of the Periodic Table
**@@bgcolor(#ff6666): Alkali metals@@
**@@bgcolor(#ffdead): Alkaline earth metals@@
**@@bgcolor(#ffbfff): Lanthanides@@
**@@bgcolor(#ff99cc): Actinides@@
**@@bgcolor(#ffc0c0): Transition metals@@
**@@bgcolor(#cccccc): Poor metals@@
**@@bgcolor(#cccc99): Metalloids@@
**@@bgcolor(#a0ffa0): Nonmetals@@
**@@bgcolor(#ffff99): Halogens@@
**@@bgcolor(#c0ffff): Noble gases@@
*State at standard temperature and pressure
**those in @@color(red):red@@ are gases
**those in @@color(green):green@@ are liquids
**those in black are solids
I think this feature from the SecondVersion of TiddlyWiki is quite original. It's a button in the right-hand sidebar that sets the browser address bar to a URL embodying all the currently open tiddlers in the order that they are currently shown. To use it, arrange the open tiddlers that you want, click the permaview button, copy the URL from the browser address bar, and then paste it into an email, web page or whatever.
On some browsers, PermaView can be unreliable if any of the tiddler titles include characters that have special meanings in URLs (like "+" and "\") or are outside the basic ANSI character set.
Changes the browser address bar to a permalink to the current tiddler. It is used with the ToolbarMacro like this:
{{{
<<toolbar permalink>>
}}}
On some browsers, the PermalinkCommand can be unreliable if the tiddler title includes characters that have special meanings in URLs (like "+" and "\") or are outside the basic ANSI character set.
Sometimes text can inadvertently match TiddlyWiki formatting instructions - particularly program code, or text pasted from elsewhere. In these situations you can either use MonospacedText or you can accomplish the same thing without the monospaced effect like this:
{{{
This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>>
<nowiki>This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>></nowiki>
"""This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>>"""
}}}
Which displays as:
This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>>
<nowiki>This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>></nowiki>
"""This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>>"""
The [[Community]] is experimenting with using the [[del.icio.us|http://del.icio.us/]] bookmarking service as a PluginDirectory. The idea is to use the tag "TiddlyWikiPlugin" to identify the URL of a TiddlyWiki plugin. The del.icio.us fields should be set as follows:
|!Field |!Example |
|url |http://authorsite.com/#ThePlugin |
|title |ThePluginTitle |
|notes |Brief description/review of plugin |
|tags |TiddlyWikiPlugin <AuthorName> |
The beauty of this approach is that it aggregates together multiple comments about a single plugin. For example, this is the del.icio.us [[page about UdoBorkowski's YourSearch plugin|http://del.icio.us/url/8085cbf3bbeda20f39a04a2969616afd]]. You can also browse the tag directly to see recently added plugins: http://del.icio.us/tag/TiddlyWikiPlugin
BidiX has also created a special del.icio.us account (http://del.icio.us/TiddlyWikiPlugin) that he's using to compile a master list of plugins tagged with TiddlyWikiHackers.
It is recommended that [[Plugins]] start with some standard information in TiddlerSlicing format. For example, see the ExamplePlugin:
{{{
|''Name:''|ExamplePlugin|
|''Description:''|To demonstrate how to write TiddlyWiki plugins|
|''Version:''|2.0.2|
|''Date:''|Jul 12, 2006|
|''Source:''|http://www.tiddlywiki.com/#ExamplePlugin|
|''Author:''|JeremyRuston (jeremy (at) osmosoft (dot) com)|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
}}}
At the moment, only ~CoreVersion affects how [[Plugins]] are processed: if the ~CoreVersion is specified for a plugin, TiddlyWiki will only execute the plugin if the core code version matches or exceeds the version specified. For example, if you specify a ~CoreVersion of 2.2, version 2.1.x of TiddlyWiki will refuse to execute the plugin.
To indicate an error, plugins should just {{{throw}}} an exception. The text of the exception will be displayed in the PluginManager.
To make plugins, stylesheets and templates easier to read, you can use special alternative formatting for monospaced blocks.
In JavaScript code:
{{{
//{{{
var id = document.getElementById("mainMenu");
//}}}
}}}
In HTML templates:
{{{
<!--{{{-->
<div id="MainMenu">
</div>
<!--}}}-->
}}}
In CSS stylesheets
{{{
/*{{{*/
div {color: #ff0000;}
/*}}}*/
}}}
It will be displayed as:
//{{{
var id = document.getElementById("mainMenu");
//}}}
<!--{{{-->
<div id="MainMenu">
</div>
<!--}}}-->
/*{{{*/
div {color: #ff0000;}
/*}}}*/
~TiddlyWiki can be extended by installing plugins that implement a wide variety of features (including new [[Macros]], themes or tweaks). Plugins are simply tidders (written in javascript) which contain the additional functionality. So, to install a plugin, you need to import the relevant tiddler(s) into your ~TiddlyWiki file.
Community member Dave Gifford oversees an extensive catalogue of available plugins at [[TiddlyVault|http://tiddlyvault.tiddlyspot.com/]], and Eric Shulman maintains his own impressive collection of plugins at [[TiddlyTools|http://www.tiddlytools.com]].
When you've chosen the plugin you'd like to import, follow the directions in ImportTiddlers.
As with saving changes, this will only work when ~TiddlyWiki is opened on your local computer (as opposed to being viewed over the internet).
Finally, community member Chris Klimas has written some superb documentation on writing plugins and macros for ~TiddlyWiki, which can now be found on the [[Writing Macros|http://tiddlywiki.org/wiki/Dev:Macros]] and [[Core Code|http://tiddlywiki.org/wiki/Dev:Core_Code_Overview]] sections of the Community wiki.
/***
|''Name:''|~PopupMacro|
|''Author:''|Saq Imtiaz (mod Tobias Beer)|
|''Version:''|1.1 (2009-11-08)|
|''Description:''|Create popups with custom content|
|''Source:''|http://tbGTD.tiddlyspor.com/#PopupMacro|
|''Documentation:''|http://tw.lewcid.org/#PopupMacroDocs|
|''Requires:''|TW Version 2.0.8 or better|
@@((mod for tbGTD(^removed styles and code cleanup)))@@
!Code
***/
//{{{
config.macros.popup={
err1:'missing macro parameters',
err2:'missing label or content parameter',
arrow:document.all?"▼":"▾",
handler:function(place,macroName,params,wikifier,paramString,theTiddler){
var cls,id,lbl,src,click;
if(!params[0]||!params[1]){createTiddlyError(place,this.err1,this.err2);return false;}
lbl=params[0];
src=(params[1]).replace(/\$\)\)/g,">>");
id=params[2]?params[2]:'nestedpopup';
cls='popup'+(params[3]?' ' +params[3]:'');
click=function(e){
var btn,nest,p,tgt;
e=e||window.event;
tgt=resolveTarget(e);
nest=!isNested(tgt);
id=nest?id:'popup';
if(nest&&Popup.stack.length>1)Popup.removeFrom(1);
else if(!nest&&Popup.stack.length>0)Popup.removeFrom(0);
p=createTiddlyElement(document.body,"ol",id,cls,null);
Popup.stack.push({root:this,popup:p});
wikify(src,p);
Popup.show(p,true);e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();return false;
}
btn=createTiddlyButton(place,lbl+this.arrow,lbl,click,null);
}
}
window.isNested=function(el){
var c=document.getElementById("contentWrapper");
while(el!=null){if(el==c)return true;el=el.parentNode;}return false;
}
setStylesheet('#nestedpopup {margin-left:1em;}','PopupMacroStyles');
//}}}
/***
|Name:|PrettyDatesPlugin|
|Description:|Provides a new date format ('pppp') that displays times such as '2 days ago'|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#PrettyDatesPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Notes
* If you want to you can rename this plugin. :) Some suggestions: LastUpdatedPlugin, RelativeDatesPlugin, SmartDatesPlugin, SexyDatesPlugin.
* Inspired by http://ejohn.org/files/pretty.js
***/
//{{{
Date.prototype.prettyDate = function() {
var diff = (((new Date()).getTime() - this.getTime()) / 1000);
var day_diff = Math.floor(diff / 86400);
if (isNaN(day_diff)) return "";
else if (diff < 0) return "in the future";
else if (diff < 60) return "just now";
else if (diff < 120) return "1 minute ago";
else if (diff < 3600) return Math.floor(diff/60) + " minutes ago";
else if (diff < 7200) return "1 hour ago";
else if (diff < 86400) return Math.floor(diff/3600) + " hours ago";
else if (day_diff == 1) return "Yesterday";
else if (day_diff < 7) return day_diff + " days ago";
else if (day_diff < 14) return "a week ago";
else if (day_diff < 31) return Math.ceil(day_diff/7) + " weeks ago";
else if (day_diff < 62) return "a month ago";
else if (day_diff < 365) return "about " + Math.ceil(day_diff/31) + " months ago";
else if (day_diff < 730) return "a year ago";
else return Math.ceil(day_diff/365) + " years ago";
}
Date.prototype.formatString_orig_mptw = Date.prototype.formatString;
Date.prototype.formatString = function(template) {
return this.formatString_orig_mptw(template).replace(/pppp/,this.prettyDate());
}
// for MPTW. otherwise edit your ViewTemplate as required.
// config.mptwDateFormat = 'pppp (DD/MM/YY)';
config.mptwDateFormat = 'pppp';
//}}}
You can now link to [[external sites|http://www.osmosoft.com]] or [[ordinary tiddlers|TiddlyWiki]] with ordinary words, without the messiness of the full URL appearing. Edit this tiddler to see how.
You can also LinkToFolders.
|''URL:''|http://ptw.sourceforge.net/ptwe.html|
|''Description:''|BramChen's Extensions for TiddlyWiki|
|''Author:''|BramChen|
<script>if(!window.tbQA)window.tbQA={
bigSize:'300px',//height for bigger-size textarea
searchAll:true,//determines whether all tiddlers will be scanned to find unidentified tags in quick-add
lingo:{//translation
none:"Nothing to be added! Open quick-add help?",
empty:"No message, no nothing.",
noMatch:"No match found for '%0', neither in added nor in existing tiddlers!%1Try again...",
justAdded:"All those you just added are:%0. ",
notFound:"No %0tag found matching '%1' for '%2'! ",
noDefault:"No default %0-tag defined. ",
useShort:"Use any shortform of '%0'. ",
usePrefix:"Alternatively, use just the prefix '%0' for '%1'. ",
enterNew:"Enter another %0tag for '%1'...",
listPrefix:"|linkTable|k\n| type | tiddler | tags | action |h\n"
},
cfg:{
//---tbGTD quick-add configuration (stored as global object)---
//edit to suit your needs ...changes apply only after reload!
//all inspected prefixes (not allowed: 'fst','all'!)
p:['#','^','$','§','@','?','&','-'],
//definition arrays for those prefixes -> comma (!) separated strings
//'prefix':[0='master-tag', 1='default subtag, [2='arr of allowed subitems {...for multi-level-add}']],
'$':['project','$active',['$','§','#','?']], //only those with subitems are allowed as line-starters!
'#':['action','#next',['#','?']],
'^':['priority','^1.high'],
'§':['stage',,['#','?']],
'@':['context'],
'?':['contact'],
'&':['area'],
'-':['realm','-private-'] //-> mind the last comma on each line, but not on the last!
//---end of quick-add setup---
//better not edit below
},
init:function(){
var c,cat,def,pr,t,tag,tgt,tit;
c=this.cfg;c.fst=[];c.all=[];
//c=quickkad cfg, cat=category, def=definition, pr=prefix, t,tag=tag, tgt=tagged, tit=title
for(pr=0;pr<c.p.length;pr++){
cat=c.p[pr];def=c[cat];
if(def){
tag=def[0];
if(tag){
if(def[2])c.fst.pushUnique(cat);//arr with prefixes allowed to have subitems
c[cat]['tags']=[];//named arr for the following prefixed(!) subtags
tgt=store.getTaggedTiddlers(tag);
for(t=0;t<tgt.length;t++){
tit=tgt[t].title;
c[cat]['tags'].pushUnique(tit);//store subtag
c.all.pushUnique(tit);//all allowed
}
}
}
}
},
find:function(dt,pr,ti){//dt=tag from def, pr=prefix, ti=new title
var c=tbQA.cfg,ct,fo='',l=tbQA.lingo,t,nd;
//c=config, ct=check-tag, fo=return: found tag, l=lingo, t=ctrl var, nd=no default
while(fo==''&&dt){//while invalid and tag given
nd=false;
if(dt.length<=1){//only prefix
if(c[pr][1])fo=c[pr][1];//get default from cfg
else nd=true;
}else{//prefix+string
for(t=0;t<c[pr]['tags'].length;t++){
ct=c[pr]['tags'][t];//check tagged
if(ct.indexOf(dt)==0){fo=ct;break;}//starting characters match
}
}
//if not found, ask again
if(!fo)dt=prompt((nd?l.noDefault.format([c[pr][0]]):l.notFound.format([c[pr][0]+'-',dt,ti]))+
(c[pr][0]?l.useShort.format([c[pr]['tags']]):'')+
(c[pr][1]?l.usePrefix.format([pr,c[pr][1]]):'')+
l.enterNew.format([c[pr][0]+'-',ti]),pr).trim();
}
return fo;
}
};
tbQA.init();//get GTD tags
config.shadowTiddlers['Recent notes']='<<tiddlerList filter:"tiddler.tags.containsAny([\'quickadd\',\'note\'])" top:"5" order:"-created" dateFormat:"pppp" itemTemplate:"!@@background:#DDD;display:block;width:98%;padding:5px 1%;%link@@\\n<<tiddler scripts##deleteTiddler with: \'%title\' \'Recent notes\' norefresh$)) (%created) @@padding-left:2em;tags: %tags@@\\n\\n%text\\n">>';
</script><html><nowiki><form id="qNotes" style="width:100%;">
<table class='borderless' cellpadding='0' cellspacing='0' style='width:100%;'>
<tr><td style='width:75%;margin-left:-5px;'>
<input name='tags' type='text' title='add tags to this note (in addition, all tags will be tagged "note")' cols='60' style='width:29.5%;float:right;border:1px solid #CCC;'>
<input name='title' type='text' title='note title ...when blank this timestamp will be inserted: YYYY-0MM-0DD 0hh:0mm:0ss' cols='60' style='width:69.25%;float:right;border:1px solid #CCC;'>
</td><td rowspan='2' style='width:25%'>
<input type='button' class='button btn' value='list all notes' id='toggleNotesArchive' title="click to show or hide a list of all tiddlers tagged 'note'" onclick="
var show=value=='list all notes';
var el=document.getElementById('showNoteList');
show?wikify(store.getTiddlerText('QuickNotes##archive'),el):el.innerHTML='';
el.style.display=show?'block':'none';
this.value=show?'hide note-list':'list all notes';
return false;">
<input type='button' class='button btn' value='bigger size' id='toggleInputSize' title='click to toggle the size of the textarea' onclick="
var big=this.value=='bigger size';
this.value=(big?'normal':'bigger') + ' size';
this.form.note.style.height=(big?tbQA.bigSize:'120px');
return false;">
<input type='button' class='button btn' value='add reminder' title='add a reminder to the current note' onClick='
var d=new Date();
this.form.note.value=this.form.note.value+"\n"+"<<reminder year:%0 month:%1 day:%2 title:\"reminder title\">>".format(
[d.getFullYear(),
String.zeroPad(d.getMonth()+1,2),
String.zeroPad(d.getDate(),2)]);
this.form.note.focus();
return false;'>
<input type='button' class='button btn' value='quick-add help' title='show help for quick-add' onclick="story.displayTiddler(null,'quick-add help');">
<input type='button' name='save' class='button btn' value='add note (click)
quick-add (ctrl+click)' style='height:55px;' title='click to add note | ctr-click to quick-add projects, actions, etc...' onclick="
var arr,c,cs=0,cul,def,dt,ev,fi,fo,hr,ind,la=[],key,lash,l,len,lev,li,ll;
//arr= tmp array, c=quickadd cfg, cs=corrected shift, cul=curr line, dt=def tag, ev=event, fi=first char, fo=found, ind=indent ftc
//key=keycode, l=lingo, la=arr of last entries, lash=last shift value, len=arr length, lev=level, li=lines, ll=last line
var nu,ok,out,note,ntgs,pos,pr,sh,subs,t,tag,tgs=[],tid,tids=[],ti='',txt='',who,when,x;
//nu=new tid, ok=write tid. out=output, pr=prefix, pos=char position, ntgs=quickadd tags, sh=shift
//t/tag=tag, tid=added tiddler title , tids=tiddlers to be created, tgs=tags, txt=tid text
c=tbQA.cfg,l=tbQA.lingo;//get cfg, find & lingo
ev=event||window.event;
ok=function(ti){return !store.tiddlerExists(ti)||confirm(config.messages.overwriteWarning.format([ti]))};
who=config.options.txtUserName;
when=new Date();
tgs=this.form.tags.value.readBracketedList();
note=this.form.note.value;
if(note==''){alert(l.empty);return;}//no empty notes
if(ev.ctrlKey){//quickadd
tids['add']=[];//init arr for all added tids
tids['all']=store.getTiddlers('title');//&all existing ones too
li=note.split('\n');//split lines
while(true){
ll=li.length==0;
cul=li.shift();//get first line of rest
if(!ll){
sh=cul.match(/^(\.*)/)[0].length;//get shifted dots (.)
cs=Math.min(cs+1,sh);//correct -> max one deeper
subs=cs>0&&la[cs-1]?c[la[cs-1][1]][2]:[];//get allowed subitems for this level from cfg
fi=cul.substr(sh,1);//get first char
}
if(ll||cs==0&&c.fst.contains(fi)||(subs&&subs.contains(fi))){//valid definition prefix
if(ti&&ok(ti)){//if new title exists yet & confirm overwrite, create & remember new tiddler
tids['add'].pushUnique(ti);
tids.push([ti,lash,ntgs,pr]);
store.saveTiddler(ti,ti,txt,who,when,ntgs,{});
}if(ll)break;//no more lines -> we're done
cul=cul.substr(sh,cul.length);//get rest of line
pr=fi;
ti=txt='';//reset tid title & text
ntgs=tgs.slice();//reset tid tags to global tags
pos=cul.indexOf(' ');//split at first empty
if(pos<0)continue;//only prefix -> invalid
dt=cul.substr(0,pos);//get category tag
cul=cul.substr(pos+1,cul.length);//get rest
arr=cul.split('|');//split rest by divider
ti=arr[0].trim();//first part is new title
fo=tbQA.find(dt,pr,ti);//find this tag
if(fo)ntgs.push(fo);//found? -> add tag
def=arr[1]?arr[1].readBracketedList():[];//remaining GTD tags
while(def[0]){//loop 'em
dt=def.shift().trim();//get next
fi=dt.substr(0,1);
fi=c.p.contains(fi)?fi:'';
if(fi){
fo=tbQA.find(dt,fi,ti);//find
if(fo)ntgs.push(fo);//found? -> add tag
}else{
fo='';
while(!fo&&dt){
for(t=0;t<tids['add'].length;t++){
tid=tids['add'][t];
if(tid.indexOf(dt)==0){fo=tid;break;}
}
if(!fo&&tbQA.searchAll){
for(t=0;t<tids['all'].length;t++){
tid=tids['all'][t].title;
if(tid.indexOf(dt)==0){fo=tid;break;}
}
}
if(!fo)dt=prompt(l.noMatch.format([dt],(tids['add'].length==0?'':l.justAdded.format([tids['add']]))),dt);
else ntgs.push(fo);//found? -> add tag
}
}
}
if(cs>0&&store.getTiddler(la[cs-1][0]))ntgs.pushUnique(la[cs-1][0]);//subitem -> push parent tag
la[cs]=[ti,pr];//remember new subitem title & prefix
lash=cs;//store 'last shift' value
}else txt+=cul+'\n';//add to content
}
//quick-add summary
if(tids.length==0){
if(confirm(l.none))story.displayTiddler(null,'quick-add help');
}else{
txt=l.listPrefix;
for(t=0;t<tids.length;t++){//for all added
nu=tids[t];
tgs=nu[2].map(function(t){return '<<tag [['+t+']]>>'}).join(',');
txt+='|<<tag [['+c[nu[3]][0]+']]>>|padding-right:5px;padding-left:'+(nu[1]*20+5)+'px;<<tag [['+nu[0]+']]>>|'+tgs+
'|<<tiddler scripts##deleteTiddler with: [['+nu[0]+']] [[Recent notes]] norefresh >>|\n';
}
tit='quick-add '+when.formatString('YYYY-0MM-0DD 0hh:0mm');//timestamp as summary title
store.saveTiddler(tit,tit,txt,who,when,'quickadd',{});//save summary
}
}else{//regular note
tit=this.form.title.value||when.formatString('YYYY-0MM-0DD 0hh:0mm:0ss');//entered title or timestamp
tgs.push('note');//add 'note' tag
if(ok(tit))store.saveTiddler(tit,tit,note,who,when,tgs,{});//if ok -> save
}
this.form.note.focus();
story.refreshTiddler('Recent notes',null,true);
refreshDisplay();">
</td></tr><tr><td><textarea name='note' title='note text' rows='5' cols='60' style='height:120px;width:99%;float:right;border:1px solid #CCC;'></textarea></td><td>
</td></tr></table>
</form><div id="showNoteList" style="clear:both;width:98%;margin:2px 0 5px 0;padding:2px 1%;display:none;"></div><h1 style="padding-top:0;">Recent notes</h1></html><<tiddler 'Recent notes'>>/%
!archive
<<tiddlerList tags:"note" order:"-modified" dateFormat:"pppp" itemTemplate:"<<tiddler scripts##deleteTiddler with:'%title' 'Recent notes' norefresh $)): %link (%created) @@padding-left:2em;tags: %tags@@\n">>
!end%/<<tiddler {{
jQuery("#qNotes .button").css({'margin':'0','padding':'0','display':'block'});
jQuery("#qNotes .btn").css({'margin':'0 0 2px 0','clear':'both','z-index':'1','width':'98%','display':'block','float':'right'});
"";}}>>
/***
|Name:|QuickOpenTagPlugin|
|Description:|Changes tag links to make it easier to open tags as tiddlers|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
@@color:red; ((modified for tbGTD(^mod by Tobias Beer ...optionally does not show ~QuickOpenTag-button if there are no tagging tiddlers)))@@
***/
//{{{
config.quickOpenTag = {
hideIfNoneTagging:true,
dropdownChar: "\u25be", //(document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?
createTagButton: function(place,tag,excludeTiddler) {
// little hack so we can do this: <<tag PrettyTagName|RealTagName>>
var splitTag = tag.split("|");
var pretty = tag;
if (splitTag.length == 2) {
tag = splitTag[1];
pretty = splitTag[0];
}
var sp = createTiddlyElement(place,"span",null,"quickopentag");
createTiddlyText(createTiddlyLink(sp,tag,false),pretty);
if(config.quickOpenTag.hideIfNoneTagging&&store.getTaggedTiddlers(tag).length==0)return; //tbGTD
var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
config.views.wikified.tag.tooltip.format([tag]),onClickTag);
theTag.setAttribute("tag",tag);
if (excludeTiddler)
theTag.setAttribute("tiddler",excludeTiddler);
return(theTag);
},
miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {
var tid=params[0]?params[0]:tiddler;
if (!store.getValue(tid,'nominitag')&&store.getTaggedTiddlers(tid.title).length>0) {
var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
config.views.wikified.tag.tooltip.format([tid.title]),onClickTag);
theTag.setAttribute("tag",tid.title);
theTag.className = "miniTag";
}
},
allTagsHandler: function(place,macroName,params) {
var tags = store.getTags(params[0]);
var filter = params[1]; // new feature
var ul = createTiddlyElement(place,"ul");
if(tags.length == 0)
createTiddlyElement(ul,"li",null,"listTitle",this.noTags);
for(var t=0; t<tags.length; t++) {
var title = tags[t][0];
if (!filter || (title.match(new RegExp('^'+filter)))) {
var info = getTiddlyLinkInfo(title);
var theListItem =createTiddlyElement(ul,"li");
var theLink = createTiddlyLink(theListItem,tags[t][0],true);
var theCount = " (" + tags[t][1] + ")";
theLink.appendChild(document.createTextNode(theCount));
var theDropDownBtn = createTiddlyButton(theListItem," " +
config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
theDropDownBtn.setAttribute("tag",tags[t][0]);
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by QuickOpenTagPlugin */",
".tagglyTagged .quickopentag, .tagged .quickopentag {margin-right:1.2em; border:1px solid [[ColorPalette::TertiaryPale]]; padding:2px 0 2px 1px;}",
".quickopentag .tiddlyLink, .quickopentag a.button {padding:1px;margin:0;}",
".miniTag:hover {background:[[ColorPalette::SecondaryLight]]}",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink {border:0px solid [[ColorPalette::Foreground]];}",
"/*}}}*/",
""].join("\n"),
init: function() {
// we fully replace these builtins. can't hijack them easily
window.createTagButton = this.createTagButton;
config.macros.allTags.handler = this.allTagsHandler;
config.macros.miniTag = { handler: this.miniTagHandler };
config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;
store.addNotification("QuickOpenTagStyles",refreshStyles);
}
}
config.quickOpenTag.init();
//}}}
"~TiddlyWiki offers a glimpse of how things are changing in terms of how people think about software... a new beginning for simple software." -- //Jeremy Wagstaff, [[WSJ.com|http://groups.google.com/group/TiddlyWiki/browse_thread/thread/53c7b7686b9bb5c2/122f1b2146d2ba6d?q=wsj&rnum=1]]//
"The original ~TiddlyWiki by Jeremy Ruston is, without a doubt, one of the most amazing dynamic web apps I've ever seen (sorry Gmail.)" -- [[Lifehacker.com recommendation|http://www.lifehacker.com/software/productivity/getting-things-done-tiddlywiki-102953.php]]
"It's blowing my mind." -- //Evan Williams, founder of Blogger, Twitter and Odeo, [[EvHead|http://evhead.com/2005/05/tiddlywiki-reusable-non-linear.asp]]//
"What I love most about ~TiddlyWiki is that it is quite easy to use but incredibly flexible." -- //Ed Sim of Dawntreader Ventures, [[BeyondVC|http://www.beyondvc.com/2005/10/tiddlywiki.html]]//
"~TiddlyWiki is completely blowing my mind... Completely tripped out. Try it and you'll see what I mean." -- //Russell Beattie of Yahoo!, [[Russell Beattie's Notebook|http://www.russellbeattie.com/notebook/1008896.html]]//
"OK, this is the first wiki interface I’ve seen that has real potential. Dunno quite why exactly, but this blows my mind." -- //Jason Kottke, [[Kottke's Remaindered Links|http://www.kottke.org/remainder/04/09/6574.html]]//
|''URL:''|http://solo.dc3.com/tw/|
|''Description:''|Bob Denny's extensions to TiddlyWiki|
|''Author:''|BobDenny|
Since the FirstVersion of TiddlyWiki, the ReferencesButton has been implemented as a canned search for the name of the current tiddler. That approach was a bit disruptive because of the way that a search operation wipes the current reading state of the document.
The new implementation offers a popup menu of the names of all the referring tiddlers. It can be consulted without disturbing any tiddlers that are currently open.
Offers a popup menu displaying the tiddlers that link to the current one. It is used with the ToolbarMacro like this:
{{{
<<toolbar references>>
}}}
RegExpSearch uses JavaScript's [[RegExp syntax|http://www.programmershelp.co.uk/docs/javascript/regexp.html#1193188]] to allow flexible searches.
Release 2.4.3 of TiddlyWiki includes some minor enhancements and bug fixes. Here are some of the highlights; see the full change history [[at TiddlyWiki.org|http://trac.tiddlywiki.org/wiki/History]] for more details.
!!!Usability
* Date-format strings now support escaping of literal characters ([[ticket #623|http://trac.tiddlywiki.org/ticket/623]])
* PluginManager wizard now displays Description slices ([[ticket #739|http://trac.tiddlywiki.org/ticket/739]])
* Support for {{{<hr>}}} syntax in wiki markup ([[ticket #741|http://trac.tiddlywiki.org/ticket/741]])
* Filter expressions no longer omit non-existing tiddlers ([[ticket #768|http://trac.tiddlywiki.org/ticket/768]])
* Provided access to context variables {{{tiddler}}} and {{{place}}} for evaluated macro parameters ([[ticket #444|http://trac.tiddlywiki.org/ticket/444]])
!!!Hackability
* Extended invokeParamifier to process "option paramifiers" ([[ticket #823|http://trac.tiddlywiki.org/ticket/823]])
* Added support for TiddlyWikis with empty {{{noscript}}} tag ([[ticket #858|http://trac.tiddlywiki.org/ticket/858]])
* Added {{{removeCookie}}} function ([[ticket #757|http://trac.tiddlywiki.org/ticket/757]])
!!!Bug Fixes
* Improved detection of missing links ([[ticket #67|http://trac.tiddlywiki.org/ticket/67]])
* Fixed overlapping tiddlers in Firefox ([[ticket #320|http://trac.tiddlywiki.org/ticket/320]])
* TagChooser macro now supports //excludeLists// tag ([[ticket #515|http://trac.tiddlywiki.org/ticket/515]])
* RSS feed now uses proper locale value ([[ticket #591|http://trac.tiddlywiki.org/ticket/591]])
* Fixed importing under Windows Vista ([[ticket #635|http://trac.tiddlywiki.org/ticket/635]])
* Various minor fixes and enhancements
/***
|''Name:''|ReminderPlugin|
|''Version:''|2.3.11 (Oct 17, 2009)|
|''Source:''|http://remindermacros.tiddlyspot.com|
|''Author:''|Jeremy Sheeley(pop1280 [at] excite [dot] com) / Modded: Tobias Beer|
|''Licence:''|[[BSD open source license]]|
|''Macros:''|reminder, showreminders, displayTiddlersWithReminders, newReminder|
|''TiddlyWiki:''|2.0+|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|
@@color:red;massively modded for tbGTD! ...shrinked code| dateformat | list format + prefix@@
!Description
This plugin provides macros for tagging a date with a reminder. Use the {{{reminder}}} macro to do this.
The macros {{{showReminders}}} and {{{displayTiddlersWithReminder}}} search through all available tiddlers looking for upcoming reminders.
!Code
***/
//{{{
version.extensions.ReminderPlugin={major:2,minor:3,revision:11,date:new Date(209,10,17),source:"http://remindermacros.tiddlyspot.com/"};
//========== Configuration... modify this section to change the defaults for leadtime and display strings
config.macros["reminder"]={};
config.macros["newReminder"]={};
config.macros["showReminders"]={};
config.macros["displayTiddlersWithReminders"]={};
config.macros.reminders={
defaultLeadTime:[-365,6000],
defaultReminderMessagePrefix:"@@padding-right:5px;color:"+store.getTiddlerSlice('ColorPalette','SecondaryMid')+";''reminder:''@@",
defaultReminderMessage:"DATE ANNIVERSARY @@color:"+store.getTiddlerSlice('ColorPalette','TertiaryMid')+";(DIFF)@@@@padding:0 3px;TITLE@@",
defaultShowReminderMessagePrefix:"|noborder|k\n", //|__''when''__|__''what''__|__''tiddler''__|\n",
defaultShowReminderMessage:"|DATE ANNIVERSARY @@color:"+store.getTiddlerSlice('ColorPalette','TertiaryMid')+";(DIFF)@@|TITLE|<<tag TIDDLER>>|",
defaultAnniversaryMessage:"(DIFF)",
untitledReminder:"Untitled Reminder",
noReminderFound:"Overdue reminder? Couldn't find a match for 'TITLE' in the next LEADTIMEUPPER days.",
todayString:"Today",
tomorrowString:"Tomorrow",
ndaysString:"DIFF days",
dateFormat:"MMM. DD",
emtpyShowRemindersString:"no upcoming events",
txtRemindTip:"open a form to add a new reminder to this tiddler",
txtRemind:"remind",
txtTitle:"Please enter a title",
txtEachYear:"Every year",
txtEachMonth:"Every month",
txtEachDay:"Every day"
}
//========== Code... no need to edit below!
//holds the cache of reminders, so that we don't recompute the same reminder over again
var reminderCache={};
config.macros.showReminders.handler=function showReminders(place,macroName,params){
var lead=[0,14];
var now=new Date().getMidnight();
var r=getParamsForReminder(params);
var hasDate=r["year"]!=null||r["month"]!=null||r["day"]!=null||r["dayofweek"]!=null;
if(r["leadtime"]!=null){
lead=r["leadtime"];
//If they've entered a day, we need to make sure to find it
if(hasDate)r["leadtime"]=[-10000,10000];
}
var match=now;
if(hasDate){
var LBound=new Date().getMidnight().addDays(r["leadtime"][0]);
var UBound=new Date().getMidnight().addDays(r["leadtime"][1]);
match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
}
var arr=findTiddlersWithReminders(match,lead,r["tag"],r["limit"]);
var el=createTiddlyElement(place,"span",null,null,null);
var msg="";
c=config.macros.reminders;
if(arr.length==0)msg+=c.emtpyShowRemindersString;
else msg+=!r["format"]||r["format"]&&!r["formatprefix"]?c.defaultShowReminderMessagePrefix:r["formatprefix"]; //tbGTD
for(var x=0;x<arr.length;x++){
var t=arr[x];
if(r["format"]!=null)t["params"]["format"]=r["format"];
else arr[x]["params"]["format"]=c.defaultShowReminderMessage;
msg+=getReminderMessageForDisplay(t["diff"],t["params"],t["matchedDate"],t["tiddler"]);
msg+="\n";
}
wikify(msg,el,null,null);
};
config.macros.displayTiddlersWithReminders.handler=function displayTiddlersWithReminders(place,macroName,params){
var now=new Date().getMidnight();
var lead=[0,14];
var r=getParamsForReminder(params);
var hasDate=r["year"]!=null||r["month"]!=null||r["day"]!=null||r["dayofweek"]!=null;
if(r["leadtime"]!=null){
lead=r["leadtime"];
//If they've entered a day, make sure to find it
if(hasDate)r["leadtime"]=[-10000,10000];
}
var match=now;
if(hasDate){
var LBound=new Date().getMidnight().addDays(r["leadtime"][0]);
var UBound=new Date().getMidnight().addDays(r["leadtime"][1]);
match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
}
var arr=findTiddlersWithReminders(match,lead,r["tag"],r["limit"]);
for(var x=0;x<arr.length;x++)displayTiddler(null,arr[x]["tiddler"],0,null,false,false,false);
};
config.macros.reminder.handler=function reminder(place,macroName,params){
var set=config.macros.reminders;
var r=getParamsForReminder(params);
if(r["hidden"]!=null)return;
var lead=r["leadtime"];
var c=config.macros.reminders;
if(lead==null)lead=c.defaultLeadTime;
var LBound=new Date().getMidnight().addDays(lead[0]);
var UBound=new Date().getMidnight().addDays(lead[1]);
var match=findDateForReminder(r,new Date().getMidnight(),LBound,UBound);
var tid=story.findContainingTiddler(place);if(!tid)return;
var title=tid.getAttribute('tiddler');
if(match!=null){
var diff=match.getDifferenceInDays(new Date().getMidnight());
var el=createTiddlyElement(place,"span",null,set.txtRemind,null);
var msg=c.defaultReminderMessagePrefix+getReminderMessageForDisplay(diff,r,match,title);
wikify(msg,el,null,null);
}else createTiddlyElement(place,"span",null,"remind",c.noReminderFound.replace("TITLE",r["title"]).replace("LEADTIMEUPPER",lead[1]).replace("LEADTIMELOWER",lead[0]).replace("TIDDLERNAME",title).replace("TIDDLER","[["+title+"]]"));
}
config.macros.newReminder.handler=function newReminder(place,macroName,params){
var set=config.macros.reminders;
var today=new Date().getMidnight();
var out='<html><form id="addReminderForm"><select name="year"><option value="">'+set.txtEachYear+'</option>';
for(var i=0;i<5;i++)
out+='<option'+(i==0?' selected':'')+' value="'+(today.getFullYear()+i)+'">'+(today.getFullYear()+i)+'</option>';
out+='</select><select name="month"><option value="">'+set.txtEachMonth+'</option>';
for(i=0;i<12;i++)
out+='<option'+(i==today.getMonth()?' selected':'')+' value="'+(i+1)+'">'+config.messages.dates.months[i]+'</option>';
out+='</select><select name="day"><option value="">'+set.txtEachDay+'</option>';
for(i=1;i<32;i++)
out+='<option'+(i==today.getDate()?' selected':'')+' value="'+i+'">'+i+'</option>';
out+='</select><input type="text" size="25" name="title" value="'+set.txtTitle+'" onfocus="this.select();"><input type="button" value="ok" onclick="addReminderToTiddler(this.form)"></form></html>';
var panel=config.macros.slider.createSlider(place,null,set.txtRemind,set.txtRemindTip);
wikify(out,panel,null,store.getTiddler(params[1]));
}
// onclick: process input and insert reminder at 'marker'
window.addReminderToTiddler=function(form){
if(!store.getTiddler)store.getTiddler=function(title){return this.tiddlers[title];};
var title=story.findContainingTiddler(form).getAttribute('tiddler');
var tiddler=store.getTiddler(title);
var add='\n<<reminder ';
if(form.year.value!="")add+='year:'+form.year.value+' ';
if(form.month.value!="")add+='month:'+form.month.value+' ';
if(form.day.value!="")add+='day:'+form.day.value+' ';
add+='title:"'+form.title.value+'" ';
add+='>>';
tiddler.set(null,tiddler.text+add);
form.parentNode.parentNode.previousSibling.onclick(); //tbGTD: close form when done processing
story.refreshTiddler(title,1,true);
store.setDirty(true);
};
function hasTag(tags,filters){
//Make sure we respond well to empty tiddlerTaglists or tagFilterlists
if(filters.length==0||tags.length==0)return true;
var bHasTag=false;
var bNoPos=true;
for(var t3=0;t3<filters.length;t3++){
for(var t2=0;t2<tags.length;t2++){
if(filters[t3].length>1&&filters[t3].charAt(0)=='!'){
//If at any time a negative filter is matched, we return false
if(tags[t2]==filters[t3].substring(1))return false;
}else{
//We encountered the first positive filter
if(bNoPos)bNoPos=false;
//A positive filter is matched. As long as no negative filter is matched, hasTag will return true
if(tags[t2]==filters[t3])bHasTag=true;
}
}
}
return (bNoPos||bHasTag);
};
window.findTiddlersWithReminders=function findTiddlersWithReminders(base,lead,tags,limit){
var expr=new RegExp("<<(reminder)(.*)>>","mg");
var matches=store.search(expr,"title","");
var arr=[];
var arrTags=null;
//allows tags with spaces. thanks Robin Summerhill, 4-Oct-06.
if(tags!=null)arrTags=tags.readBracketedList();
for(var t=matches.length-1;t>=0;t--){
if(arrTags!=null&&!hasTag(matches[t].tags,arrTags))continue;
var targetText=matches[t].text;
do{
// Get the next formatting match
var match=expr.exec(targetText);
if(match&&match[1]!=null&&match[1].toLowerCase()=="reminder"){
//Find the matching date.
var params=match[2]!=null ? match[2].readMacroParams():{};
var r=getParamsForReminder(params);
if(limit!=null||r["leadtime"]==null){
if(lead==null)r["leadtime"]=lead;
else{
r["leadtime"]=[];
r["leadtime"][0]=lead[0];
r["leadtime"][1]=lead[1];
}
}
if(r["leadtime"]==null)r["leadtime"]=config.macros.reminders.defaultLeadTime;
var LBound=base.addDays(r["leadtime"][0]);
var UBound=base.addDays(r["leadtime"][1]);
var found=findDateForReminder(r,base,LBound,UBound);
while(found!=null){
var tmp={};
tmp["diff"]=found.getDifferenceInDays(base);
tmp["matchedDate"]=new Date(found.getFullYear(),found.getMonth(),found.getDate(),0,0);
tmp["params"]=cloneParams(r);
tmp["tiddler"]=matches[t].title;
tmp["tags"]=matches[t].tags;
arr.pushUnique(tmp);
if(r["recurdays"]!=null||(r["year"]==null)){
LBound=LBound.addDays(found.getDifferenceInDays(LBound)+ 1);
found=findDateForReminder(r,base,LBound,UBound);
}
else found=null;
}
}
}while(match);
}
//Sort the array by number of days remaining
if(arr.length>1)arr.sort(function(a,b){if(a["diff"]==b["diff"])return(0);else return a["diff"]<b["diff"]?-1:+1;});
return arr;
};
//Takes the reminder macro parameters and generates the string that is used for display ...not intended to be called by other plugins.
window.getReminderMessageForDisplay= function getReminderMessageForDisplay(diff,params,match,tid){
var c=config.macros.reminders;
var anniv="";
var reminderTitle=params["title"];
if(reminderTitle==null)reminderTitle=c.untitledReminder;
if(params["firstyear"]!=null)anniv=c.defaultAnniversaryMessage.replace("DIFF",(match.getFullYear()-params["firstyear"]));
var sDiff="";
if(diff==0)sDiff=c.todayString;
else if(diff==1)sDiff=c.tomorrowString;
else sDiff=c.ndaysString.replace("DIFF",diff);
msg=params["format"]!=null?params["format"]:c.defaultReminderMessage;
msg=msg.replace(/TIDDLER/g,"TIDELER"); //Avoid replacing DD in TIDDLER with the date
msg=match.formatStringDateOnly(msg);
msg=msg.replace(/TIDELER/g,"TIDDLER");
if(tid!=null){
msg=msg.replace(/TIDDLERNAME/g,tid);
msg=msg.replace(/TIDDLER/g,"[["+tid+"]]");
}
msg=msg.replace("DIFF",sDiff).replace("TITLE",reminderTitle).replace("DATE",match.formatString("mmm. 0DD")).replace("ANNIVERSARY",anniv);
return msg;
};
// Parse macro params into a hashtable. This handles the arguments for reminder, showReminders and displayTiddlersWithReminders
window.getParamsForReminder=function getParamsForReminder(params){
var r={};
var type="";
var num=0;
var title="";
for(var p=0;p<params.length;p++){
var split=params[p].split(":");
type=split[0].toLowerCase();
var value=split[1];
for(var i=2;i<split.length;i++)value+=":"+split[i];
if(type=="nolinks"||type=="limit"||type=="hidden")num=1;
else if(type=="leadtime"){
var leads=value.split("...");
if(leads.length==1){leads[1]=leads[0];leads[0]=0;}
leads[0]=parseInt(leads[0],10);
leads[1]=parseInt(leads[1],10);
num=leads;
}
else if(type=="offsetdayofweek"){
if(value.substr(0,1)=="-"){r["negativeOffsetDayOfWeek"]=1;value=value.substr(1);}
num=parseInt(value,10);
}
else if(type!="title"&&type!="tag"&&type!="format")num=parseInt(value,10);
else{
p++;
title=value;
while(title.substr(0,1)=='"'&&title.substr(title.length-1,1)!='"'&¶ms[p]!=undefined)title+= " "+params[p++];
//Trim off the leading and trailing quotes
if(title.substr(0,1)=="\""&&title.substr(title.length-1,1)== "\""){
title=title.substr(1,title.length-2);
p--;
}
num=title;
}
r[type]=num;
}
//date is synonymous with day
if(r["day"]==null)r["day"]=r["date"];
return r;
};
//Finds the date specified in the reminder params; returns null if no match found; not intended for use by other plugins
window.findDateForReminder= function findDateForReminder(r,base,LBound,UBound){
if(base==null)base=new Date().getMidnight();
var key=base.convertToYYYYMMDDHHMM();
for(var k in r)key+=","+k+"|"+r[k];
key+=","+LBound.convertToYYYYMMDDHHMM();
key+=","+UBound.convertToYYYYMMDDHHMM();
//If we don't find a match in this run, then cache that the reminder can't be matched
if(reminderCache[key]==null)reminderCache[key]=false;
//We've already tried this date and failed
else if(reminderCache[key]==false)return null;
else return reminderCache[key];
var bOffsetSpecified=
r["offsetyear"]!=null||
r["offsetmonth"]!=null||
r["offsetday"]!=null||
r["offsetdayofweek"]!=null||
r["recurdays"]!=null;
// If matching the base date for a dayofweek offset, look for the base date a little further back.
var tmp1LBound=LBound;
if(r["offsetdayofweek"]!=null)tmp1LBound=LBound.addDays(-6);
var match=base.findMatch(r,tmp1LBound,UBound);
if(match!=null){
var newMatch=match;
if(r["recurdays"]!=null)
while(newMatch.getTime()<LBound.getTime())newMatch=newMatch.addDays(r["recurdays"]);
else if(
r["offsetyear"]!=null||
r["offsetmonth"]!=null||
r["offsetday"]!=null||
r["offsetdayofweek"]!=null){
var tmp=cloneParams(r);
tmp["year"]=r["offsetyear"];
tmp["month"]=r["offsetmonth"];
tmp["day"]=r["offsetday"];
tmp["dayofweek"]=r["offsetdayofweek"];
var tmpL=LBound;
var tmpU=UBound;
if(tmp["offsetdayofweek"]!=null){
if(tmp["negativeOffsetDayOfWeek"]==1){
tmpL=match.addDays(-6);
tmpU=match;
}else{
tmpL=match;
tmpU=match.addDays(6);
}
}
newMatch=match.findMatch(tmp,tmpL,tmpU);
//The offset couldn't be matched. return null.
if(newMatch==null)return null;
}
if(newMatch.isBetween(LBound,UBound)){
reminderCache[key]=newMatch;
return newMatch;
}
}
return null;
};
//Does the same job as findDateForReminder, but doesn't deal with offsets or recurring reminders.
Date.prototype.findMatch=function findMatch(r,LBound,UBound){
var Y=(r["year"]!=null);
var M=(r["month"]!=null);
var D=(r["day"]!=null);
var W=(r["dayofweek"]!=null);
if(D&&M&&Y)return new Date(r["year"],r["month"]-1,r["day"],0,0);
if(D&&M&&!Y&&!W){
//Shortcut: first try this year... if too small, try next year
var tmp=new Date(this.getFullYear(),r["month"]-1,r["day"],0,0);
if(tmp.getTime()<LBound.getTime())tmp=new Date((this.getFullYear()+1),r["month"]-1,r["day"],0,0);
if(tmp.isBetween(LBound,UBound))return tmp;
else return null;
}
var newDate=LBound;
while(newDate.isBetween(LBound,UBound)){
var test=testDate(newDate,r,Y,M,D,W);
if(test!=null)return test;
newDate=newDate.addDays(1);
}
}
function cloneParams(p){var tmp={};for(var i in p)tmp[i]=p[i];return tmp;}
function testDate(str,d,Y,M,D,W){if((!Y&&d["year"]==str.getFullYear())&&(!M&&(d["month"]-1)==str.getMonth())&&(!D&&d["day"]==str.getDate())&&(!W&&d["dayofweek"]==str.getDay())) return str;}
//Returns true if the date is in between two given dates
Date.prototype.isBetween=function isBetween(lowerBound,upperBound){return(this.getTime()>=lowerBound.getTime()&&this.getTime()<=upperBound.getTime());}
//Return a new date, with the time set to midnight (0000)
Date.prototype.getMidnight=function getMidnight(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0);}
//Add the specified number of days to a date
Date.prototype.addDays=function addDays(numberOfDays){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+numberOfDays,0,0);}
//Return the number of days between two dates
Date.prototype.getDifferenceInDays=function getDifferenceInDays(d){
//ignores daylight savings
var tmp=this.addDays(0);
if(this.getTime()>d.getTime()){for(var i=0;tmp.getTime()>d.getTime();i++)tmp=tmp.addDays(-1);return i;}
else{for(var i=0;tmp.getTime()<d.getTime();i++)tmp=tmp.addDays(1);return i*-1;}
return 0;
}
//Substitute date components into a string
Date.prototype.formatStringDateOnly=function formatStringDateOnly(d){
d=d.replace("YYYY",this.getFullYear());
d=d.replace("YY",String.zeroPad(this.getFullYear()-2000,2));
d=d.replace("MMM",config.messages.dates.months[this.getMonth()]);
d=d.replace("0MM",String.zeroPad(this.getMonth()+1,2));
d=d.replace("MM",this.getMonth()+1);
d=d.replace("DDD",config.messages.dates.days[this.getDay()]);
d=d.replace("0DD",String.zeroPad(this.getDate(),2));
d=d.replace("DD",this.getDate());
return d;
};
//}}}
/***
|Name:|RenameTagsPlugin|
|Description:|Allows you to easily rename or delete tags across multiple tiddlers|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
Rename a tag and you will be prompted to rename it in all its tagged tiddlers.
***/
//{{{
config.renameTags = {
prompts: {
rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",
remove: "Remove the tag '%0' from %1 tidder%2?"
},
removeTag: function(tag,tiddlers) {
store.suspendNotifications();
for (var i=0;i<tiddlers.length;i++) {
store.setTiddlerTag(tiddlers[i].title,false,tag);
}
store.resumeNotifications();
store.notifyAll();
},
renameTag: function(oldTag,newTag,tiddlers) {
store.suspendNotifications();
for (var i=0;i<tiddlers.length;i++) {
store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old
store.setTiddlerTag(tiddlers[i].title,true,newTag); // add new
}
store.resumeNotifications();
store.notifyAll();
},
storeMethods: {
saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,
saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields) {
if (title != newTitle) {
var tagged = this.getTaggedTiddlers(title);
if (tagged.length > 0) {
// then we are renaming a tag
if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))
config.renameTags.renameTag(title,newTitle,tagged);
if (!this.tiddlerExists(title) && newBody == "")
// dont create unwanted tiddler
return null;
}
}
return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields);
},
removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,
removeTiddler: function(title) {
var tagged = this.getTaggedTiddlers(title);
if (tagged.length > 0)
if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))
config.renameTags.removeTag(title,tagged);
return this.removeTiddler_orig_renameTags(title);
}
},
init: function() {
merge(TiddlyWiki.prototype,this.storeMethods);
}
}
config.renameTags.init();
//}}}
TiddlyWiki's RSS feed is available [[here|http://www.tiddlywiki.com/index.xml]]. You can generate an RSS feed for your own TiddlyWiki using the GenerateAnRssFeed option.
Safari can SaveChanges using the TiddlySaver Java applet.
There are still some issues with Safari:
* Permalinks with Unicode characters in them (like [[this one|http://avm.free.fr/tidlipo.html#AdaptationFran%C3%A7aise]]) don't work properly
SafeMode can be selected by putting {{{#start:safe}}} (see StartupParameters) on the end of a TiddlyWiki URL. It stops TiddlyWiki from executing any [[Plugins]], modifying shadow tiddlers, or reading/writing cookies. It can be useful for tracking down problems caused by rogue [[Plugins]].
This is one of the InterfaceOptions you can use to customize TiddlyWiki. It determines whether TiddlyWiki creates a backup file each time you SaveChanges. I'd suggest keeping it switched on for safety!
If you've followed the appropriate [[Installation]] guidelines, then you can save your changes as you go along.
It's important to save changes using ~TiddlyWiki's built in saving functionality (rather than the browser's 'Save As' function - [[here's why|SaveUnpredictabilities]]). Your local version of ~TiddlyWiki will have a button on the right hand side that says 'save changes' - that's the button you'll need to use.
It's worthwhile configuring your backup settings. You can edit the AdvancedOptions to decide when backups are made and where they're saved.
If you're still experiencing problems, the following links will help:
*General guidance on FireFox, InternetExplorer, [[Opera]], [[Camino]] or [[Safari]]
* if you're using InternetExplorer on Windows you might run into XP ServicePack2Problems or VistaIssues
This causes a blank, template TiddlyWiki to be saved alongside your file when you SaveChanges. It's intended to help people who are distributing TiddlyWikiAdaptations, and isn't needed when you're an end-user of TiddlyWiki.
The template TiddlyWiki is called 'empty.html'.
Saves any pending edits to the current tiddler, and switches it to the default view. It is used with the ToolbarMacro like this:
{{{
<<toolbar saveTiddler>>
}}}
Several people have reported problems with reusing TiddlyWiki when they have used the File/Save command of their browser to save it. The issue is that some browsers (notably FireFox) don't save the text of the HTML file exactly as it appears on the server, but rather save a snapshot of the current state of the page. In the case of a highly dynamic page like TiddlyWiki, this leads to all sorts of peculiarness...
TiddlyWiki now displays a warning if it thinks that it has been saved wrongly.
The basic version of ~TiddlyWiki includes basic search functionality. Using this basic functionality, when a search term is entered, all tiddlers that contain this term are opened, with the search term highlighted wherever it appears.
However, using the [[plugin architecture|Plugins]] of ~TiddlyWiki, the [[community|Help and Support]] has written a number of search plugins which can be installed on your local ~TiddlyWiki files easily. The most popular search plugins are:
*Eric Shulman's ~SearchOptionsPlugin - a highly configurable plugin that produces a list of tiddler titles with options for advanced searches. Available at http://www.TiddlyTools.com/#SearchOptionsPlugin
*Udo Borkowski's ~YourSearchPlugin - opens the search results in a large iFrame in the same style as Google (result, then synopsis). Available at http://tiddlywiki.abego-software.de/
*Frederik Dohr's ~SimpleSearchPlugin (which this site is using) - copy and paste the code on [[this page|http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/SimpleSearchPlugin.js]] into a new tiddler, tag the tiddler with systemConfig, and save / re-open your ~TiddlyWiki.
You can find out more about the various search plugins on the [[Community Wiki|http://tiddlywiki.org/wiki/Enhanced_Search]].
Released in December 2004, the [[second version|secondversion.html]] of TiddlyWiki grew 50% over the FirstVersion to 76KB. It added IncrementalSearch, the ReferencesButton, the PermaLinkButton, PermaView, CloseAll, SmoothScrolling, an ImprovedSidebar, an animation for the CloseButton and a tiny EasterEgg in homage to Macintosh OS X. It also introduced a new SiteDesign.
One of the neatest features of TiddlyWiki is that it is entirely self-contained in a single HTML file - even including graphics like the GradientMacro. The file contains the actual hypertext document, and the ~JavaScript, ~CascadingStyleSheets and HTML necessary to both view and edit it. This means that it is trivial to host a TiddlyWiki on a website, or to distribute one by email. And anyone with a reasonably recent web browser will be able to read and edit it.
Out of the box, ~TiddlyWiki doesn't have a Server Side back end. In many applications that's a great strength because it means that you can work with ~TiddlyWiki without having to be connected to the Internet or, because it's SelfContained, installing any software.
In other applications, a ~ServerSide can be very useful, particularly if you want to edit a ~TiddlyWiki while it's online, or you need lots of people to be able to edit a ~TiddlyWiki at the same time. The development [[Community]] has come up with several ~ServerSide implementations that are suitable for a range of applications. The most popular and up-to-date ones that you can download and install on your own servers are:
* [[TiddlyWeb|http://www.tiddlywiki.org/wiki/TiddlyWeb]] in Python from Chris Dent
* [[Coral|https://coral.dev.java.net/]] in Java
* [[ccTiddly|http://cctiddly.sourceforge.net/]] from Matthew So (aka ~CoolCold)
* [[PrinceTiddlyWiki|http://ptw.sourceforge.net/]] from Bram Chen
* [[ZiddlyWiki|http://www.ziddlywiki.org/]] from Bob ~McElrath and Tim Morgan
* [[PhpTiddlyWiki|http://www.patrickcurry.com/tiddly/]] from Patrick Curry
[[TiddlySpot|http://tiddlyspot.com]] offers a fantastic, free hosted version of ~TiddlyWiki with some very cool features (although at present it does not support simultaneous editing by multiple users). It's based on ~BidiX's remarkable [[UploadPlugin|http://tiddlywiki.bidix.info/#HowToUpload]].
There are also some TiddlyWikiAdaptations that have taken some of the code and ideas from ~TiddlyWiki and diverged off to do their own thing.
Internet Explorer Windows XP ~SP2 seems to have a magical ability to keep track of html files that have been downloaded from the internet and saved on an NTFS drive. By storing additional data in an [[alternate data stream|http://www.microsoft.com/technet/sysinternals/FileAndDisk/Streams.mspx]], it manages to keep them in the 'Internet' zone regardless of attempts to rename or modify the file. But, in order to be able to SaveChanges, TiddlyWiki needs to run in the 'My Computer' zone.
The solution is to right-click on the TiddlyWiki html file and choose //Properties//. If the file is blocked, you'll see an 'Unblock' button on the resulting property sheet that removes the protection and allows the file to open in the 'My Computer' zone. Then open the file in Internet Explorer - it might put up its information bar asking you whether you want to run it. You need to 'Allow blocked content' to let TiddlyWiki do its stuff.
<<<
If you find yourself running into the information bar frequently, you can disable it by visiting the "Options" dialog and, on the "Advanced" tab make sure that "Allow active content to run in files on My Computer" is checked.
Alternatively, you can rename the file to {{{*.hta}}} which has the added bonus of automatically granting all necessary save permissions.
<<<
This is all a bit frustrating. An easy alternative is to use FireFox, which seems to do the trick on all platforms.
ShadowTiddlers are special tiddlers that have default values that take over if they are undefined or deleted. For example, PageTemplate and StyleSheetColors are both shadow tiddlers.
ShadowTiddlers make it harder to render a TiddlyWiki inoperative by accidentally deleting something important. You can see a list of shadow tiddlers in the Shadowed tab under the More tab in the right hand column. When you create a tiddler with the same title you override the underlying shadow tiddler.
----
<<list shadowed>>
{{black{
<<calendar thismonth>>
}}}
<<tabs txtMainTab tags "list of tags" TagCloud recent "list tiddlers by date" SideBarTabs##recent toc "browse tiddlers" SideBarTabs##all more "standard lists and more" TabMore>>/%
!recent
{{recent{<<timeline "modified" "17" "YYYY-0MM-0DD">>
----
@@padding-left:10px;[[::complete timeline::|timeline]]@@}}}
!all
<<tableOfContents "label:browse tiddlers..." sort:title width:100% size:20 date:YYYY-0MM-0DD>>
----
@@padding-left:10px;[[::alphabetical list::|TabAll]]@@
!end%/
/***
|''Name''|SimpleSearchPlugin|
|''Description''|displays search results as a simple list of matching tiddlers|
|''Authors''|FND|
|''Version''|0.4.1|
|''Status''|stable|
|''Source''|http://devpad.tiddlyspot.com/#SimpleSearchPlugin|
|''CodeRepository''|http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/SimpleSearchPlugin.js|
|''License''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Keywords''|search|
!Code
***/
//{{{
if(!version.extensions.SimpleSearchPlugin) { //# ensure that the plugin is only installed once
version.extensions.SimpleSearchPlugin = { installed: true };
if(!config.extensions) { config.extensions = {}; }
config.extensions.SimpleSearchPlugin = {
heading: "Search Results",
containerId: "searchResults",
btnCloseLabel: "close",
btnCloseTooltip: "dismiss search results",
btnCloseId: "search_close",
btnOpenLabel: "open all",
btnOpenTooltip: "open all search results",
btnOpenId: "search_open",
displayResults: function(matches, query) {
story.refreshAllTiddlers(true); // update highlighting within story tiddlers
var el = document.getElementById(this.containerId);
query = '"""' + query + '"""'; // prevent WikiLinks
if(el) {
removeChildren(el);
} else { //# fallback: use displayArea as parent
var container = document.getElementById("displayArea");
el = document.createElement("div");
el.id = this.containerId;
el = container.insertBefore(el, container.firstChild);
}
var msg = "!" + this.heading + "\n";
if(matches.length > 0) {
msg += "''" + config.macros.search.successMsg.format([matches.length.toString(), query]) + ":''\n";
this.results = [];
for(var i = 0 ; i < matches.length; i++) {
this.results.push(matches[i].title);
msg += "* [[" + matches[i].title + "]]\n";
}
} else {
msg += "''" + config.macros.search.failureMsg.format([query]) + "''"; // XXX: do not use bold here!?
}
createTiddlyButton(el, this.btnCloseLabel, this.btnCloseTooltip, config.extensions.SimpleSearchPlugin.closeResults, "button", this.btnCloseId);
if(matches.length > 0) { // XXX: redundant!?
createTiddlyButton(el, this.btnOpenLabel, this.btnOpenTooltip, config.extensions.SimpleSearchPlugin.openAll, "button", this.btnOpenId);
}
wikify(msg, el);
},
closeResults: function() {
var el = document.getElementById(config.extensions.SimpleSearchPlugin.containerId);
removeNode(el);
config.extensions.SimpleSearchPlugin.results = null;
highlightHack = null;
},
openAll: function(ev) {
story.displayTiddlers(null, config.extensions.SimpleSearchPlugin.results);
return false;
}
};
// override Story.search()
Story.prototype.search = function(text, useCaseSensitive, useRegExp) {
highlightHack = new RegExp(useRegExp ? text : text.escapeRegExp(), useCaseSensitive ? "mg" : "img");
var matches = store.search(highlightHack, null, "excludeSearch");
var q = useRegExp ? "/" : "'";
config.extensions.SimpleSearchPlugin.displayResults(matches, q + text + q);
};
// override TiddlyWiki.search() to sort by relevance
TiddlyWiki.prototype.search = function(searchRegExp, sortField, excludeTag, match) {
var candidates = this.reverseLookup("tags", excludeTag, !!match);
var primary = [];
var secondary = [];
var tertiary = [];
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].title.search(searchRegExp) != -1) {
primary.push(candidates[t]);
} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
secondary.push(candidates[t]);
} else if(candidates[t].text.search(searchRegExp) != -1) {
tertiary.push(candidates[t]);
}
}
var results = primary.concat(secondary).concat(tertiary);
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
};
} //# end of "install only once"
//}}}
/***
|''Name''|SimpleSearchPlugin|
|''Description''|displays search results as a simple list of matching tiddlers|
|''Authors''|FND|
|''Version''|0.4.1|
|''Status''|stable|
|''Source''|http://devpad.tiddlyspot.com/#SimpleSearchPlugin|
|''CodeRepository''|http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/SimpleSearchPlugin.js|
|''License''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Keywords''|search|
!Revision History
!!v0.2.0 (2008-08-18)
* initial release
!!v0.3.0 (2008-08-19)
* added Open All button (renders Classic Search option obsolete)
* sorting by relevance (title matches before content matches)
!!v0.4.0 (2008-08-26)
* added tag matching
!To Do
* tag matching optional
* animations for container creation and removal
* when clicking on search results, do not scroll to the respective tiddler (optional)
* use template for search results
!Code
***/
//{{{
if(!version.extensions.SimpleSearchPlugin) { //# ensure that the plugin is only installed once
version.extensions.SimpleSearchPlugin = { installed: true };
if(!config.extensions) { config.extensions = {}; }
config.extensions.SimpleSearchPlugin = {
heading: "Search Results",
containerId: "searchResults",
btnCloseLabel: "close",
btnCloseTooltip: "dismiss search results",
btnCloseId: "search_close",
btnOpenLabel: "Open all",
btnOpenTooltip: "open all search results",
btnOpenId: "search_open",
displayResults: function(matches, query) {
story.refreshAllTiddlers(true); // update highlighting within story tiddlers
var el = document.getElementById(this.containerId);
query = '"""' + query + '"""'; // prevent WikiLinks
if(el) {
removeChildren(el);
} else { //# fallback: use displayArea as parent
var container = document.getElementById("displayArea");
el = document.createElement("div");
el.id = this.containerId;
el = container.insertBefore(el, container.firstChild);
}
var msg = "!" + this.heading + "\n";
if(matches.length > 0) {
msg += "''" + config.macros.search.successMsg.format([matches.length.toString(), query]) + ":''\n";
this.results = [];
for(var i = 0 ; i < matches.length; i++) {
this.results.push(matches[i].title);
msg += "* [[" + matches[i].title + "]]\n";
}
} else {
msg += "''" + config.macros.search.failureMsg.format([query]) + "''"; // XXX: do not use bold here!?
}
createTiddlyButton(el, this.btnCloseLabel, this.btnCloseTooltip, config.extensions.SimpleSearchPlugin.closeResults, "button", this.btnCloseId);
wikify(msg, el);
if(matches.length > 0) { // XXX: redundant!?
createTiddlyButton(el, this.btnOpenLabel, this.btnOpenTooltip, config.extensions.SimpleSearchPlugin.openAll, "button", this.btnOpenId);
}
},
closeResults: function() {
var el = document.getElementById(config.extensions.SimpleSearchPlugin.containerId);
removeNode(el);
config.extensions.SimpleSearchPlugin.results = null;
highlightHack = null;
},
openAll: function(ev) {
story.displayTiddlers(null, config.extensions.SimpleSearchPlugin.results);
return false;
}
};
config.shadowTiddlers.StyleSheetSimpleSearch = "/*{{{*/\n" +
"#" + config.extensions.SimpleSearchPlugin.containerId + " {\n" +
"\toverflow: auto;\n" +
"\tpadding: 5px 1em 10px;\n" +
"\tbackground-color: [[ColorPalette::TertiaryPale]];\n" +
"}\n\n" +
"#" + config.extensions.SimpleSearchPlugin.containerId + " h1 {\n" +
"\tmargin-top: 0;\n" +
"\tborder: none;\n" +
"}\n\n" +
"#" + config.extensions.SimpleSearchPlugin.containerId + " ul {\n" +
"\tmargin: 0.5em;\n" +
"\tpadding-left: 1.5em;\n" +
"}\n\n" +
"#" + config.extensions.SimpleSearchPlugin.containerId + " .button {\n" +
"\tdisplay: block;\n" +
"\tborder-color: [[ColorPalette::TertiaryDark]];\n" +
"\tpadding: 5px;\n" +
"\tbackground-color: [[ColorPalette::TertiaryLight]];\n" +
"}\n\n" +
"#" + config.extensions.SimpleSearchPlugin.containerId + " .button:hover {\n" +
"\tborder-color: [[ColorPalette::SecondaryMid]];\n" +
"\tbackground-color: [[ColorPalette::SecondaryLight]];\n" +
"}\n\n" +
"#" + config.extensions.SimpleSearchPlugin.btnCloseId + " {\n" +
"\tfloat: right;\n" +
"\tmargin: -5px -1em 5px 5px;\n" +
"}\n\n" +
"#" + config.extensions.SimpleSearchPlugin.btnOpenId + " {\n" +
"\tfloat: left;\n" +
"\tmargin-top: 5px;\n" +
"}\n" +
"/*}}}*/";
store.addNotification("StyleSheetSimpleSearch", refreshStyles);
// override Story.search()
Story.prototype.search = function(text, useCaseSensitive, useRegExp) {
highlightHack = new RegExp(useRegExp ? text : text.escapeRegExp(), useCaseSensitive ? "mg" : "img");
var matches = store.search(highlightHack, null, "excludeSearch");
var q = useRegExp ? "/" : "'";
config.extensions.SimpleSearchPlugin.displayResults(matches, q + text + q);
};
// override TiddlyWiki.search() to sort by relevance
TiddlyWiki.prototype.search = function(searchRegExp, sortField, excludeTag, match) {
var candidates = this.reverseLookup("tags", excludeTag, !!match);
var primary = [];
var secondary = [];
var tertiary = [];
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].title.search(searchRegExp) != -1) {
primary.push(candidates[t]);
} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
secondary.push(candidates[t]);
} else if(candidates[t].text.search(searchRegExp) != -1) {
tertiary.push(candidates[t]);
}
}
var results = primary.concat(secondary).concat(tertiary);
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
};
} //# end of "install only once"
//}}}
|tblSITE|k
|width:200px;padding:0.5em;font-size:2em;SiteTitle|>|>|>|font-size:1.1em;padding-top:1em;SiteSubtitle @@padding-left:7%;[[topMenuL]]@@@@padding-left:15%;[[topMenuR]]@@|
|{{floatleft{@@padding-left:10px;font-size:0.9em;font-weight:bold;display:inline;<<tiddler topMenuL>>@@}}}{{floatright{@@text-align:right;font-size:0.9em;font-weight:bold;display:inline;<<tiddler topMenuR>>@@}}}|>|>|>|>|
|width:10%;padding:0;text-align:left; @@font-weight:bold;font-size:1.2em;padding-left:15px;[[MainMenu]]@@<br/>@@display:block;margin-top:10px;padding:0;<<tiddler MainMenu>>@@|>|>|border-bottom:1px solid #333;background:#444;color:#111;width:60%;height:15px;padding:2px 2px 0 2px;{{tblLAYOUTMID{@@background:#eee;[[TiddlersBar|TiddlersBarPlugin]]@@}}} |width:20%; <<tiddler SiteLayout##Sidebar>> |
|~|~|background:#EEE;color:#111;height:150px;text-align:center;padding-top:10px; {{tblLAYOUTMID{<<tiddler SiteLayout##Tiddlers>>}}}|>|~|
|>|>|>|>| |
/%
!Tiddlers
@@display:block;position:relative;left:-40%;top:0px;Tiddler viewer@@@@display:block;position:relative;right:-22%;top:-15px; [[x-tab]] / [[x-plore]] / [[x-tag|x-tagger]] / [[ToolbarCommands]]@@
@@font-size:1.5em;color:#999;displayArea / tiddlerDisplay@@
@@display:block;margin-top:15px;font-size:2em;[[tbGtdTheme]] / <<tag site>>@@
@@display:block;margin-top:5px;font-size:1em;[[StyleSheet]] / [[StyleSheetShortcuts]]@@
!Sidebar
@@display:block;width:100%;height:50px;padding-right:0%;padding-top:10px;[[SideBarOptions]]<br/>[[calendar]]@@@@display:block;margin-top:5px;width:100%;height:150px;SideBarTabs<br /><<tiddler SiteLayout##Tabs>>@@
!Tabs
@@display:block;text-align:left;font-size:0.9em;padding:5px;background:#555;height:100px;[[tags|TagCloud]]|[[recent|TabTimeline]]|[[toc|SideBarTabs]]|[[more|TabMore]]<br>[[tags|TabTags]]|[[plug|systemConfig]]|[[miss|TabMoreMissing]]|[[orph|TabMoreOrphans]]|[[shad|TabMoreShadowed]]|[[ex|excludeLists]]<br /><br />{{medium{[[TagCloud]]}}}@@
!End%/
<<tiddler {{
var s='.tblSITE, .tblSITE thead, .tblSITE tr, .tblSITE td{border:0;color:white;background:#333;}'+
'.tblSITE a,.tblSITE a.tiddlyLink, .tblSITE a.button{color:#EEE;border-color:transparent;font-weight:bold;padding:0 3px;font-style:normal;}'+
'.tblSITE a:hover,.tblSITE a.tiddlyLink:hover, .tblSITE a.button:hover{color:#39F;border-color:transparent;background:transparent;}'+
'.tblSITE{-moz-border-radius:5px; -webkit-border-radius:5px;}'+
'.tblSITE ul, .tblSITE li{list-style-type:none;}'+
'.tblLAYOUTMID a.tiddlyLink{color:#111;}';
setStylesheet(s,'StyleSheetSiteLayout');
'';}}>>
a tiddlywiki based system to ''Get Things Done''
[[tb|journal]][[GTD|desk]]
http://www.tiddlywiki.com/
TiddlyWiki defines a small number of SpecialTags that are used to indicate that tiddlers should be treated differently in some way:
* ''excludeSearch'': excludes a tiddler from search results
* ''excludeLists'': excludes a tiddler from the lists in the sidebar tabs
* ''systemConfig'': marks tiddlers that contain JavaScript that should be executed once TiddlyWiki has loaded
* ''excludeMissing'': excludes a tiddler from the processing that generates the MissingTiddlers list. Use it when you have a tiddler that contains links to missing tiddlers and you don't want those missing links to appear in the MissingTiddlers list
~TiddlyWiki uses several "special tiddlers" to perform a number of essential functions as follows:
*[[Configuration]] tiddlers configure the layout of the page, including the MainMenu, the SiteTitle, the SiteSubtitle and other features.
*A tiddler called DefaultTiddlers is used to list the tiddlers that are shown at startup.
*A tiddler called SaveChanges is automatically displayed if there's a problem with saving. Any of them can be edited with the changes taking effect immediately.
/***
|''Name:''|SplashScreenPlugin|
|''Description:''|Provides a splash screen that consists of the rendered default tiddlers|
|''Author:''|Martin Budden|
|''~CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/SplashScreenPlugin.js |
|''Version:''|0.1.5|
|''Date:''|April 17, 2008|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.4|
!!Description
Provides a splash screen that consists of the default tiddlers while TiddlyWiki is loading
!!Usage
!!TODO describe how to use the plugin - how a user should include it in their TiddlyWiki, parameters to the plugin etc
***/
//{{{
if(!version.extensions.SplashScreenPlugin) {
version.extensions.SplashScreenPlugin = {installed:true};
//config.macros.splashScreen = {};
//config.macros.splashScreen.init = function()
version.extensions.SplashScreenPlugin.setup = function()
{
if(store.tiddlerExists("MarkupPostHead"))
return;
var text = "<!--{{{-->\n";
text += "<style type=\"text/css\">\n";
text += "#contentWrapper {display:none;}\n";
text += "#splashScreen {display:block;}\n";
var sc = store.getTiddlerText("StyleSheetColors");
sc += "\n" + store.getTiddlerText("StyleSheetLayout") + "\n";
sc += "\n#splashScreen {display:block;}\n";
sc += "\n" + store.getTiddlerText("StyleSheet") + "\n";
sc = sc.replace(/#/mg,"#s_");
var slices = ["Background","Foreground",
"PrimaryPale","PrimaryLight","PrimaryMid","PrimaryDark",
"SecondaryPale","SecondaryLight","SecondaryMid","SecondaryDark",
"TertiaryPale","TertiaryLight","TertiaryMid","TertiaryDark",
"Error"];
for(var i in slices) {
s = store.getTiddlerSlice("ColorPalette",i);
sc = sc.replace("[[ColorPalette::"+i+"]]",s);
}
text += sc;
text += "#s_messageArea {display:none;}\n";
text += "\n</style>\n";
text += "<!--}}}-->\n";
var tiddler = store.createTiddler("MarkupPostHead");
tiddler.set(tiddler.title,text,config.options.txtUserName,null,"excludeLists excludeSearch");
var sitetitle = store.getTiddlerText("SiteTitle");
var sitesubtitle = store.getTiddlerText("SiteSubtitle");
var pt = store.getTiddlerText("PageTemplate");
pt = pt.replace(/<span class='siteTitle' refresh='content' tiddler='SiteTitle'><\/span>/mg,"<span class=\"siteTitle\">"+sitetitle+"</span>");
pt = pt.replace(/<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'><\/span>/mg,"<span class=\"siteSubtitle\">"+sitesubtitle+"</span>");
pt = pt.replace(/<!--\{\{\{-->/mg,"").replace(/<!--\}\}\}-->/mg,"");
pt = pt.replace(/<div id='/mg,"<div id='s_");
text = "";
var filter = store.getTiddlerText("SplashTiddlers") || store.getTiddlerText("DefaultTiddlers");
tiddlers = store.filterTiddlers(filter);
for(i=0;i<tiddlers.length;i++) {
tiddler = tiddlers[i];
var title = tiddler.title;
var tiddlerElem = createTiddlyElement(null,"div","tempId"+tiddler.title,"tiddler");
tiddlerElem.style.display = "none";
tiddlerElem.setAttribute("refresh","tiddler");
var template = story.chooseTemplateForTiddler(title);
var t = story.getTemplateForTiddler(title,template,tiddler);
t = t.replace(/<div class=['"]toolbar[^<]*<\/div>/mg,"<div class=\"toolbar\"><br /></div>");
t = t.replace(/<div class=['"]tagging['"][^>]*><\/div>\n/mg,"");
t = t.replace(/<div class=['"]tagged['"][^>]*><\/div>\n/mg,"");
tiddlerElem.innerHTML = t;
applyHtmlMacros(tiddlerElem,tiddler);
text += '<div id="splashId_' + tiddler.title + '" class="tiddler">\n';
t = tiddlerElem.innerHTML;
// remove all tiddler links
t = t.replace(/<a tiddlylink=[^>]*>([^<]*)<\/a>/mg,"$1");
t = t.replace(/<a tiddlyfields=[^>]*>([^<]*)<\/a>/mg,"$1");
text += t + '\n</div>\n';
}
text = text.replace(/<!--\{\{\{-->/mg,"").replace(/<!--\}\}\}-->/mg,"");
var splash = "<!--{{{-->\n\n";
splash += "<div id=\"splashScreen\">\n";
pt = pt.replace(/<div id='s_tiddlerDisplay'><\/div>/mg,"<div id=\"s_tiddlerDisplay\">"+text+"</div>");
splash += pt;
splash += "</div>\n";
splash += "<!--}}}-->\n\n";
splash += '<script type="text/javascript">\ndocument.getElementById("splashScreen").style.display="none";\n</script>\n';
tiddler = store.createTiddler("MarkupPreBody");
tiddler.set(tiddler.title,splash,config.options.txtUserName,null,"excludeLists excludeSearch");
store.setDirty(true);
};
version.extensions.SplashScreenPlugin.saveChanges = window.saveChanges;
window.saveChanges = function()
{
version.extensions.SplashScreenPlugin.setup();
version.extensions.SplashScreenPlugin.saveChanges();
}
} //# end of 'install only once'
//}}}
When it loads, TiddlyWiki looks for the names of tiddlers to open as a space-separated list after the # in the URL. If there are no tiddlers in the URL it instead loads the tiddlers named in DefaultTiddlers, one of the SpecialTiddlers.
TiddlyWiki obtains its StartupParameters from the //location// portion of it's URL (the bit after the '#'). At it's simplest, the StartupParameters can list the names of the tiddlers to be opened when the TiddlyWiki is opened:
{{{
http://www.tiddlywiki.com/#HelloThere JeremyRuston
}}}
In fact, that usage is equivalent to:
{{{
http://www.tiddlywiki.com/#open:HelloThere open:JeremyRuston
}}}
The complete list of commands is:
|!Command |!Description |!Example |
|open:title |Opens the tiddler with the specified title |http://www.tiddlywiki.com/#open:HelloThere |
|start:safe |Switches to SafeMode |http://www.tiddlywiki.com/#start:safe |
|search:text |Performs a search for the specified text |http://www.tiddlywiki.com/#search:jeremy |
|tag:text |Displays tiddlers tagged with the specified tag |http://www.tiddlywiki.com/#tag:news |
|newTiddler:title |Opens a new tiddler with the specified title in edit mode |http://www.tiddlywiki.com/#newTiddler:"This is a new tiddler" |
|newJournal:titleFormat |Opens a new tiddler with the specified DateFormatString |http://www.tiddlywiki.com/#newJournal:"YYYY MMM DD" |
See the details of the underlying ParameterParser for more details.
/***
|Name|StyleSheetShortcuts|
|Source|http://www.TiddlyTools.com/#StyleSheetShortcuts|
|Version||
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|CSS|
|Description|'convenience' classes for common formatting, alignment, boxes, tables, etc.|
These 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.
***/
/*{{{*/
/* text alignments */
.left
{ display:block;text-align:left; }
.center
{ display:block;text-align:center; }
.center table
{ margin:auto !important; }
.right
{ display:block;text-align:right; }
.justify
{ display:block;text-align:justify; }
.indent
{ display:block;margin:0;padding:0;border:0;margin-left:2em; }
.floatleft
{ float:left; }
.floatright
{ float:right; }
.valignTop, .valignTop table, .valignTop tbody, .valignTop th, .valignTop tr, .valignTop td
{ vertical-align:top; }
.valignBottom, .valignBottom table, .valignBottom tbody, .valignBottom th, .valignBottom tr, .valignBottom td
{ vertical-align:bottom; }
.clear
{ clear:both; }
.wrap
{ white-space:normal; }
.nowrap
{ white-space:nowrap; }
.hidden
{ display:none; }
.show
{ display:inline !important; }
.span
{ display:span; }
.block
{ display:block; }
.relative
{ position:relative; }
.absolute
{ position:absolute; }
/* font sizes */
.big
{ font-size:14pt;line-height:120% }
.medium
{ font-size:12pt;line-height:120% }
.normal
{ font-size:9pt;line-height:120% }
.small
{ font-size:8pt;line-height:120% }
.fine
{ font-size:7pt;line-height:120% }
.tiny
{ font-size:6pt;line-height:120% }
.larger
{ font-size:120%; }
.smaller
{ font-size:80%; }
/* font styles */
.bold
{ font-weight:bold; }
.italic
{ font-style:italic; }
.underline
{ text-decoration:underline; }
/* plain list items (no bullets or indent) */
.nobullets li { list-style-type: none; margin-left:-2em; }
/* multi-column tiddler content (not supported in Internet Explorer) */
.twocolumns { display:block;
-moz-column-count:2; -moz-column-gap:1em; -moz-column-width:50%; /* FireFox */
-webkit-column-count:2; -webkit-column-gap:1em; -webkit-column-width:50%; /* Safari */
column-count:2; column-gap:1em; column-width:50%; /* Opera */
}
.threecolumns { display:block;
-moz-column-count:3; -moz-column-gap:1em; -moz-column-width:33%; /* FireFox */
-webkit-column-count:3; -webkit-column-gap:1em; -webkit-column-width:33%; /* Safari */
column-count:3; column-gap:1em; column-width:33%; /* Opera */
}
.fourcolumns { display:block;
-moz-column-count:4; -moz-column-gap:1em; -moz-column-width:25%; /* FireFox */
-webkit-column-count:4; -webkit-column-gap:1em; -webkit-column-width:25%; /* Safari */
column-count:4; column-gap:1em; column-width:25%; /* Opera */
}
/* page breaks */
.breakbefore { page-break-before:always; }
.breakafter { page-break-before:always; }
/* show/hide browser-specific content for InternetExplorer vs. non-IE ("moz") browsers */
*[class="ieOnly"]
{ display:none; } /* hide in moz (uses CSS selector) */
* html .mozOnly, *:first-child+html .mozOnly
{ display: none; } /* hide in IE (uses IE6/IE7 CSS hacks) */
/* borderless tables */
.borderless, .borderless table, .borderless td, .borderless tr, .borderless th, .borderless tbody
{ border:0 !important; margin:0 !important; padding:0 !important; }
.widetable, .widetable table
{ width:100%; }
/* thumbnail images (fixed-sized scaled images) */
.thumbnail img { height:5em !important; }
/* stretchable images (auto-size to fit tiddler) */
.stretch img { width:95%; }
/* grouped content */
.outline
{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; }
.menubox
{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#fff; color:#000; }
.menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting
{ color:#009 !important; }
.groupbox
{ display:block; padding:1em; -moz-border-radius:1em;-webkit-border-radius:1em; border:1px solid; background:#ffe; color:#000; }
.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting
{ color:#009 !important; }
.groupbox code
{ color:#333 !important; }
.borderleft
{ margin:0;padding:0;border:0;margin-left:1em; border-left:1px dotted; padding-left:.5em; }
.borderright
{ margin:0;padding:0;border:0;margin-right:1em; border-right:1px dotted; padding-right:.5em; }
.borderbottom
{ margin:0;padding:1px 0;border:0;border-bottom:1px dotted; margin-bottom:1px; padding-bottom:1px; }
.bordertop
{ margin:0;padding:0;border:0;border-top:1px dotted; margin-top:1px; padding-top:1px; }
/* scrolled content */
.scrollbars { overflow:auto; }
.height10em { height:10em; }
.height15em { height:15em; }
.height20em { height:20em; }
.height25em { height:25em; }
.height30em { height:30em; }
.height35em { height:35em; }
.height40em { height:40em; }
/* compact form */
.smallform
{ white-space:nowrap; }
.smallform input, .smallform textarea, .smallform button, .smallform checkbox, .smallform radio, .smallform select
{ font-size:8pt; }
/* stretchable edit fields and textareas (auto-size to fit tiddler) */
.stretch input { width:99%; }
.stretch textarea { width:99%; }
/* compact input fields (limited to a few characters for entering percentages and other small values) */
.onechar input { width:1em; }
.twochar input { width:2em; }
.threechar input { width:3em; }
.fourchar input { width:4em; }
.fivechar input { width:5em; }
/* text colors */
.white { color:#fff !important }
.gray { color:#999 !important }
.black { color:#000 !important }
.red { color:#f66 !important }
.green { color:#0c0 !important }
.blue { color:#99f !important }
/* rollover highlighting */
.mouseover
{color:[[ColorPalette::TertiaryLight]] !important;}
.mouseover a
{color:[[ColorPalette::TertiaryLight]] !important;}
.selected .mouseover
{color:[[ColorPalette::Foreground]] !important;}
.selected .mouseover .button, .selected .mouseover a
{color:[[ColorPalette::PrimaryDark]] !important;}
/* rollover zoom text */
.zoomover
{ font-size:80% !important; }
.selected .zoomover
{ font-size:100% !important; }
.BG{color:[[ColorPalette::Background]];}
.FG{color:[[ColorPalette::Foreground]];}
.PP{color:[[ColorPalette::PrimaryPale]];}
.PL{color:[[ColorPalette::PrimaryLight]];}
.PM{color:[[ColorPalette::PrimaryMid]];}
.PD{color:[[ColorPalette::PrimaryDark]];}
.SP{color:[[ColorPalette::SecondaryPale]];}
.SL{color:[[ColorPalette::SecondaryLight]];}
.SM{color:[[ColorPalette::SecondaryMid]];}
.SD{color:[[ColorPalette::SecondaryDark]];}
.TP{color:[[ColorPalette::TertiaryPale]];}
.TL{color:[[ColorPalette::TertiaryLight]];}
.TM{color:[[ColorPalette::TertiaryMid]];}
.TD{color:[[ColorPalette::TertiaryDark]];}
.Err{color:[[ColorPalette::Error]];}
.bgBG{background-color:[[ColorPalette::Background]];}
.bgFG{background-color:[[ColorPalette::Foreground]];}
.bgPP{background-color:[[ColorPalette::PrimaryPale]];}
.bgPL{background-color:[[ColorPalette::PrimaryLight]];}
.bgPM{background-color:[[ColorPalette::PrimaryMid]];}
.bgPD{background-color:[[ColorPalette::PrimaryDark]];}
.bgSP{background-color:[[ColorPalette::SecondaryPale]];}
.bgSL{background-color:[[ColorPalette::SecondaryLight]];}
.bgSM{background-color:[[ColorPalette::SecondaryMid]];}
.bgSD{background-color:[[ColorPalette::SecondaryDark]];}
.bgTP{background-color:[[ColorPalette::TertiaryPale]];}
.bgTL{background-color:[[ColorPalette::TertiaryLight]];}
.bgTM{background-color:[[ColorPalette::TertiaryMid]];}
.bgTD{background-color:[[ColorPalette::TertiaryDark]];}
.bgErr{background-color:[[ColorPalette::Error]];}
/*}}}*/
!Header 1
!!Header 2
!!!Header 3
!!!!Header 4
!!!!!Header 5
This is an example of a tab:
<<tabs txtFavourite
One "First tab" HelloThere
Two "Second tab" ThankYou
>>
<<tabs txtMoreTab tags "all tags" TabTags plug "installed plugins" systemConfig miss "missing tiddlers" TabMoreMissing orph "orphaned tiddlers" TabMoreOrphans shad "shadowed tiddlers" TabMoreShadowed ex "tiddlers on excludeLists" excludeLists>>
<<list missing>>
----
[[::excludeMissing::|excludeMissing]]
{{sidebarTitle{[[all available tags:|TabTags]]}}}
{{sideBarTags{<<allTags>>}}}
/***
|Name|TableOfContentsPlugin|
|Source|http://www.TiddlyTools.com/#TableOfContentsPlugin|
|Documentation|http://www.TiddlyTools.com/#TableOfContentsPluginInfo|
|Version|2.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|replace the standard tabbed contents list with a scrolling listbox|
When there are many tiddlers in a document, the standard 'tabbed list of tiddlers' in the right-hand sidebar can become very long, occupying a lot of page space and requiring a lot scrolling in order to locate and select a tiddler. The TableOfContentsPlugin addresses this problem by replacing the standard tabbed list display with a single listbox/droplist control that uses a very small amount of page space, regardless of the number of tiddlers in the document.
!!!!!Documentation
>see [[TableOfContentsPluginInfo]]
!!!!!Configuration
<<option chkTOCShow>> display table of contents listbox
<<option chkTOCIncludeHidden>> include tiddlers tagged with <<tag excludeLists>> in listbox
listbox shows <<option txtTOCListSize>> lines, sorted by <<option txtTOCSortBy>>
<<<
!!!!!Code
***/
//{{{
version.extensions.TableOfContentsPlugin= {major: 2, minor: 4, revision: 3, date: new Date(2008,4,9)};
//}}}
// // 1.2.x compatibility
//{{{
if (!window.story) window.story=window;
if (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}
if (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}
if (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}
//}}}
//{{{
// define defaults for cookie-based option values
if (config.options.txtTOCSortBy==undefined) config.options.txtTOCSortBy="modified";
if (config.options.txtTOCListSize==undefined) config.options.txtTOCListSize=19;
if (config.options.chkTOCShow==undefined) config.options.chkTOCShow=true;
if (config.options.chkTOCIncludeHidden==undefined) config.options.chkTOCIncludeHidden=false;
// define macro "tableOfContents" to render controls
config.macros.tableOfContents = { label: "contents" };
config.macros.tableOfContents.cmdMax=8; // index of maximum command item
config.macros.tableOfContents.css = '\
.TOC { padding:0.5em 1em 0.5em 1em; }\
.TOC a { padding:0em 0.25em 0em 0.25em; color:inherit; }\
.TOCList { width: 100%; font-size:8pt; margin:0em; }\
';
config.macros.tableOfContents.html = '\
<div style="text-align:right">\
<span style="float:left">\
<a href="JavaScript:;" id="TOCMenu" style="padding: 0em;"\
onclick="onClickTOCMenu(this)" title="show/hide table of contents">%label%</a>\
</span>\
<a href="JavaScript:;" id="TOCSmaller" style="display:inline"\
onclick="resizeTOC(this)" title="reduce list size">–</a>\
<a href="JavaScript:;" id="TOCLarger"style="display:inline"\
onclick="resizeTOC(this)" title="increase list size">+</a>\
<a href="JavaScript:;" id="TOCMaximize"style="display:inline"\
onclick="resizeTOC(this)" title="maximize/restore list size">=</a>\
</div>\
';
config.macros.tableOfContents.handler = function(place,macroName,params) {
var parsedParams = new Array();
parsedParams['label']=this.label;
parsedParams['inline']=false;
while (params.length>0) {
if (params[0]=="label:none") parsedParams['label']="";
else if (params[0].substr(0,6)=="label:") parsedParams['label']=params[0].substr(6);
if (params[0].substr(0,7)=="prompt:") parsedParams['prompt']=params[0].substr(7);
if (params[0].substr(0,8)=="padding:")parsedParams['padding']=params[0].substr(8);
if (params[0].substr(0,7)=="margin:") parsedParams['margin']=params[0].substr(7);
if (params[0].substr(0,5)=="sort:") parsedParams['sortby']=params[0].substr(5);
if (params[0].substr(0,5)=="date:") parsedParams['date']=params[0].substr(5);
if ((params[0]=="size:auto")||(params[0]=="size:0")) parsedParams['autosize']=true;
else if (params[0] && (params[0].substr(0,5)=="size:")) parsedParams['requestedSize']=params[0].substr(5);
if (params[0].substr(0,6)=="width:") parsedParams['width']=params[0].substr(6);
if (params[0]=="hidelist") parsedParams['hidelist']=true;
if (params[0]=="inline") parsedParams['inline']=true;
if (params[0]=="-title") parsedParams['hide_title']=true;
if (params[0]=="-date") parsedParams['hide_date']=true;
if (params[0]=="-author") parsedParams['hide_author']=true;
if (params[0]=="-creator") parsedParams['hide_creator']=true;
if (params[0]=="-tags") parsedParams['hide_tags']=true;
if (params[0]=="-missing") parsedParams['hide_missing']=true;
if (params[0]=="-orphans") parsedParams['hide_orphans']=true;
if (params[0]=="-shadows") parsedParams['hide_shadows']=true;
params.shift();
}
setStylesheet(config.macros.tableOfContents.css,"tableOfContents");
var newTOC=createTiddlyElement(place,parsedParams['inline']?"span":"div",null,"TOC",null)
if (parsedParams['margin']) { newTOC.style.margin=parsedParams['margin']; }
if (parsedParams['padding']) { newTOC.style.padding=parsedParams['padding']; }
if (parsedParams['label']!="") newTOC.innerHTML=config.macros.tableOfContents.html.replace(/%label%/,parsedParams['label']);
var newTOCList=createTOCList(newTOC,parsedParams)
refreshTOCList(newTOCList);
store.addNotification(null,reloadTOCLists); // reload listbox after every tiddler change
}
// IE needs explicit global scoping for functions/vars called from browser events
window.onChangeTOCList=onChangeTOCList;
window.onClickTOCList=onClickTOCList;
window.onDblClickTOCList=onDblClickTOCList;
window.reloadTOCLists=reloadTOCLists;
window.refreshTOCList=refreshTOCList;
window.onClickTOCMenu=onClickTOCMenu;
window.resizeTOC=resizeTOC;
function createTOCList(place,params) {
var list = createTiddlyElement(place,"select",null,"TOCList",params['prompt'])
list.params=params;
list.onchange=onChangeTOCList;
list.onclick=onClickTOCList;
list.ondblclick=onDblClickTOCList;
list.onkeyup=onKeyUpTOCList;
list.style.display=config.options.chkTOCShow ? "block" : "none" ;
list.sortBy=config.options.txtTOCSortBy;
list.dateFormat="DD MMM YYYY";
list.requestedSize=config.options.txtTOCListSize;
list.expandall=false;
list.cmdMax=config.macros.tableOfContents.cmdMax;
if (params['hide_title']) list.cmdMax--;
if (params['hide_date']) list.cmdMax--;
if (params['hide_author']) list.cmdMax--;
if (params['hide_creator']) list.cmdMax--;
if (params['hide_tags']) list.cmdMax--;
if (params['hide_missing']) list.cmdMax--;
if (params['hide_orphans']) list.cmdMax--;
if (params['hide_shadows']) list.cmdMax--;
if (params['sortby']) { list.sortBy=params['sortby']; list.noSortCookie=true; }
if (params['date']) { list.dateFormat=params['date']; }
if (params['autosize']) { list.autosize=true; list.noSizeCookie=true; }
if (params['requestedSize']){ list.requestedSize=params['requestedSize']; list.noSizeCookie=true; }
if (params['width']) { list.style.width=params['width']; }
if (params['hidelist']) { list.style.display ="none" ; list.noShowCookie=true; }
if (params['expandall']) { list.expandall=true; }
return list;
}
function onChangeTOCList() {
var thisTiddler=this.options[this.selectedIndex].value;
if ((this.size==1)&&(thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
story.displayTiddler(null,thisTiddler,1);
refreshTOCList(this);
return false;
}
function onClickTOCList(e) {
if (!e) var e = window.event;
if (this.size==1) return; // don't toggle display for droplist
if (e.shiftKey) { this.expandall=!this.expandall; refreshTOCList(this);}
e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
return true;
}
function onDblClickTOCList(e) {
if (!e) var e = window.event;
var thisTiddler=this.options[this.selectedIndex].value;
if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
story.displayTiddler(null,thisTiddler,1);
e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
return false;
}
function onKeyUpTOCList(e) {
if (!e) var e = window.event;
if (e.keyCode!=13) return true;
var thisTiddler=this.options[this.selectedIndex].value;
if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))
story.displayTiddler(null,thisTiddler,1);
e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();
return false;
}
function reloadTOCLists() {
var all=document.all? document.all.tags("select") : document.getElementsByTagName("select");
for (var i=0; i<all.length; i++)
if (all[i].className=="TOCList")
{ all[i].selectedIndex=-1; refreshTOCList(all[i]); }
}
function refreshTOCList(list) {
var selectedIndex = list.selectedIndex;
if (selectedIndex==-1) selectedIndex=0;
var sortBy = list.sortBy;
var showHidden = config.options.chkTOCIncludeHidden && !(config.options.chkHttpReadOnly && readOnly);
if (selectedIndex==0) sortBy=list.sortBy; // "nnn tiddlers" heading - use previous sort order
else if (selectedIndex<=list.cmdMax)sortBy=list.value;
else { if (list.options[list.selectedIndex].value=='') expandTOC(list); return; }
list.sortBy = sortBy; // save current sort order
if (!list.noSortCookie) { config.options.txtTOCSortBy=sortBy; saveOptionCookie("txtTOCSortBy"); }
// get the list of tiddlers
var tiddlers = [];
switch (sortBy) {
case "missing": tiddlers=store.getMissingLinks(); break;
case "tags": tiddlers=store.getTags(); break;
case "orphans": tiddlers=store.getOrphans(); break;
case "shadows": for (var t in config.shadowTiddlers) tiddlers.push(t); tiddlers.sort(); break;
default: tiddlers=store.getTiddlers(sortBy=='creator'?'modifier':sortBy,showHidden?'':'excludeLists'); break;
}
// clear current listbox contents
while (list.length > 0) { list.options[0] = null; }
list.saved=null;
// add heading and control items to list
var i=0;
var theHeading=tiddlers.length+' tiddlers:';
if (sortBy=='missing') theHeading=tiddlers.length+' missing tiddlers:';
if (sortBy=='orphans') theHeading=tiddlers.length+' orphaned tiddlers:';
if (sortBy=='tags') theHeading=tiddlers.length+' tags:';
if (sortBy=='shadows') theHeading=tiddlers.length+' shadow tiddlers:';
var indent=String.fromCharCode(160)+String.fromCharCode(160);
var sel=">";
list.options[i++]=new Option(theHeading,'');
function headerOpt(txt,val) { return new Option(((sortBy==val)?sel:indent)+' ['+txt+']',val); }
if (!list.params['hide_title']) list.options[i++]=headerOpt('by title','title');
if (!list.params['hide_date']) list.options[i++]=headerOpt('by date','modified');
if (!list.params['hide_author']) list.options[i++]=headerOpt('by author','modifier');
if (!list.params['hide_creator']) list.options[i++]=headerOpt('by creator','creator');
if (!list.params['hide_tags']) list.options[i++]=headerOpt('by tags','tags');
if (!list.params['hide_missing']) list.options[i++]=headerOpt('missing','missing');
if (!list.params['hide_orphans']) list.options[i++]=headerOpt('orphans','orphans');
if (!list.params['hide_shadows']) list.options[i++]=headerOpt('shadows','shadows');
// output the tiddler list
switch(sortBy) {
case "title":
for (var t = 0; t < tiddlers.length; t++)
list.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title);
break;
case "modified":
case "modifier":
case "creator":
if (sortBy=="modified") tiddlers.reverse(); // show newest first
if (sortBy=="creator") { // sort by custom field with fallback value
tiddlers.sort(function (a,b) {
var v1=a.fields.creator||a.modifier;
var v2=b.fields.creator||b.modifier;
return (v1==v2)?0:(v1>v2?1:-1);
});
}
var lastSection = "";
for (var t = 0; t < tiddlers.length; t++){
var tiddler = tiddlers[t];
var theSection = "";
var m=tiddler.modified;
if (sortBy=="modified") theSection=m.getFullYear()+'.'+(m.getMonth()+1)+'.'+m.getDate();
if (sortBy=="modifier") theSection = tiddler.modifier;
if (sortBy=="creator") theSection=tiddler.fields['creator']||tiddler.modifier;
if (theSection != lastSection) {
lastSection = theSection;
if (sortBy=="modified") theSection = m.formatString(list.dateFormat);
list.options[i++] = new Option('+ '+theSection,"");
}
list.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title);
}
expandTOC(list);
break;
case "tags":
// tagged tiddlers, by tag
var tagcount=0;
var lastTag = null;
for (var t = 0; t < tiddlers.length; t++) { // actually a list of tags, not tiddlers...
var theTag = tiddlers[t][0]; var tid=store.getTiddler(theTag);
if (tid && tid.isTagged('excludeLists')) continue; // skip excluded tags
var temp = store.getTaggedTiddlers(theTag);
var tagged=[]; for (var q=0; q<temp.length; q++) // hide excluded tiddlers
if (!temp[q].isTagged('excludeLists')) tagged.push(temp[q]);
if (tagged.length) { tagcount++;
list.options[i++]=new Option('+ '+theTag+" ("+tagged.length+")","");
for(var r=0; r<tagged.length; r++)
list.options[i++]=
new Option(indent+indent+tagged[r].title,tagged[r].title);
}
}
// count untagged tiddlers
var temp = store.getTiddlers("title");
var c=0; for (var r=0; r<temp.length;r++) if (!temp[r].tags.length) c++;
// create 'pseudo-tag' listing untagged tiddlers (if any)
if (c>0) {
list.options[i++] = new Option("+ untagged ("+c+")","");
for (var r=0; r<temp.length;r++) if (!temp[r].tags.length)
list.options[i++] = new
Option(indent+indent+temp[r].title,temp[r].title);
}
list.options[0].text=tagcount+' tags:';
expandTOC(list);
break;
case "missing": case "orphans": case "shadows":
for (var t = 0; t < tiddlers.length; t++)
list.options[i++] = new Option(tiddlers[t],tiddlers[t]);
break;
}
list.selectedIndex=selectedIndex; // select current control item
list.size = (list.autosize)?list.options.length:list.requestedSize;
}
// show/hide branch of TOCList based on current selection
function expandTOC(list) {
var selectedIndex = list.selectedIndex;
if (selectedIndex==-1) selectedIndex=0;
var sortBy = list.sortBy;
// don't collapse/expand list for alpha-sorted "flatlist" TOC contents
// or list control items
if ((sortBy=="title")||(sortBy=="missing")||(sortBy=="orphans")||(sortBy=="shadows")) return;
if ((selectedIndex>0)&&(selectedIndex<=list.cmdMax)) return;
// get current selected text/value and cache the
// complete list. Then clear the current list contents
var theText = list.options[selectedIndex].text;
var theValue = list.options[selectedIndex].value;
if (!list.saved) {
list.saved=new Array();
for (var i=0;i<list.length;i++) list.saved[i]=list.options[i];
}
while (list.length > 0) { list.options[0] = null; }
// put back heading items until item text matches current selected heading
var i=0;
for (var t=0; t<list.saved.length; t++) {
var opt=list.saved[t];
if (list.expandall||(opt.value=='')||(i<=list.cmdMax)) list.options[i++] = opt;
if (opt.text==theText) break;
}
selectedIndex=i-1; // this is the NEW index of the current selected heading
// put back items with value!='' until value==''
for ( t++; t<list.saved.length; t++) {
var opt=list.saved[t];
if (list.expandall||opt.value!='') list.options[i++] = opt;
if (opt.value=='') break;
}
// put back remaining items with value==''
for ( ; t<list.saved.length; t++) {
var opt=list.saved[t];
if (list.expandall||opt.value=='') list.options[i++] = opt;
}
list.selectedIndex = selectedIndex;
list.size = (list.autosize)?list.options.length:list.requestedSize;
}
// these functions process clicks on the 'control links' that are displayed above the listbox
function getTOCListFromButton(which) {
var list = null;
switch (which.id) {
case 'TOCMenu':
var theSiblings = which.parentNode.parentNode.parentNode.childNodes;
var thePlace=which.parentNode.parentNode.parentNode.parentNode.parentNode.id;
break;
case 'TOCSmaller': case 'TOCLarger': case 'TOCMaximize':
var theSiblings = which.parentNode.parentNode.childNodes;
var thePlace=which.parentNode.parentNode.parentNode.parentNode.id;
break;
}
for (var k=0; k<theSiblings.length; k++)
if (theSiblings[k].className=="TOCList") { list=theSiblings[k]; break; }
return list;
}
function onClickTOCMenu(which) {
var list=getTOCListFromButton(which); if (!list) return;
var opening = list.style.display=="none";
if(config.options.chkAnimate) anim.startAnimating(new Slider(list,opening,false,"none"));
else list.style.display = opening ? "block" : "none" ;
if (!list.noShowCookie) { config.options.chkTOCShow = opening; saveOptionCookie("chkTOCShow"); }
return(false);
}
function resizeTOC(which) {
var list=getTOCListFromButton(which); if (!list) return;
var size = list.size;
if (list.style.display=="none") // make sure list is visible
if(config.options.chkAnimate) anim.startAnimating(new Slider(list,true,false,"none"));
else list.style.display = "block" ;
switch (which.id) {
case 'TOCSmaller': // decrease current listbox size
if (list.autosize) { list.autosize=false; size=config.options.txtTOCListSize; }
if (size==1) break;
size -= 1; // shrink by one line
list.requestedSize = list.size = size;
break;
case 'TOCLarger': // increase current listbox size
if (list.autosize) { list.autosize=false; size=config.options.txtTOCListSize; }
if (size>=list.options.length) break;
size += 1; // grow by one line
list.requestedSize = list.size = size;
break;
case 'TOCMaximize': // toggle autosize
list.autosize = (list.size!=list.options.length);
list.size = (list.autosize)?list.options.length:list.requestedSize;
break;
}
if (!list.noSizeCookie && !list.autosize)
{ config.options.txtTOCListSize=size; saveOptionCookie("txtTOCListSize"); }
}
//}}}
*sample:
|!th1111111111|!th2222222222|
|>| colspan |
| rowspan |left|
|~| right|
|bgcolor(#a0ffa0):colored| center |
|caption|c
*another sample: see PeriodicTable.
For advanced effects, you can control the CSS style of a table by adding a row like this:
{{{
|cssClass|k
}}}
<<tagCloud excludeLists noCloud>>
----
@@padding-left:10px;[[::list tiddlers by tags::|TiddlersByTags]]@@
/***
|''Plugin'' |TagCloudMacro |
|''Author'' |Clint Checketts |
|''Source URL'' |http://tiddlystyles.com |
!Usage
{{{<<tagCloud>>}}}
<<tagCloud>>
!Code
***/
//{{{
setStylesheet(".tagCloud span{height: 1.8em;margin: 3px;}.tagCloud1{font-size: 10px;}.tagCloud2{font-size:12px;}.tagCloud3{font-size: 14px;}.tagCloud4{font-size: 16px;font-weight: bold;}.tagCloud5{font-size: 20px;font-weight: bold;}","tagCloudsStyles");
version.extensions.tagCloud={major: 1, minor: 0 , revision: 0, date: new Date(2006,2,04)};
//Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman
config.macros.tagCloud={
noTags:"There are no tags.",
tooltip:"%1 tiddlers tagged with '%0'",
exclude:['excludeLists','noCloud'],
handler:function(place,macroName,params){
var el,max,p,segm,t,tg,tags,wrap;
wrap=createTiddlyElement(place,"div",null,"tagCloud",null);
tags=store.getTags();
for(t=0;t<tags.length;t++){
tiddler=store.fetchTiddler(tags[t][0]);
if(tiddler&&tiddler.tags.containsAny(this.exclude))tags[t][0]="";
for(p=0;p<params.length;p++)if(tags[t][0]==params[p])tags[t][0]="";
}
if(tags.length==0)createTiddlyElement(wrap,"span",null,null,this.noTags);
max=0;//Find max num of tags
for(var t=0;t<tags.length;t++)if(tags[t][0].length>0){if(tags[t][1]>max)max=tags[t][1];}
segm=max/4;//divide max into 4 tagCloud sizes
for(t=0;t<tags.length;t++)if(tags[t][0].length>0){
el=createTiddlyElement(wrap,"span",null,null,null);
wrap.appendChild(document.createTextNode(" "));
tg=createTiddlyButton(el,tags[t][0],this.tooltip.format(tags[t]),onClickTag,"tagCloudtag tagCloud"+(Math.round(tags[t][1]/segm)+1));
tg.setAttribute("tag",tags[t][0]);
tg.setAttribute("showOpenTag",true);
}
}
}
//}}}
The TaggingMacro produces a list of links to tiddlers that carry the specified tag. If no tag is specified, it looks for tiddlers tagged with the name of the current tiddler. It looks like this:
{{{
<<tagging>>
<<tagging TiddlerTitle>>
<<tagging sep:[[, ]]>>
}}}
In HTML, the list is formatted like so:
{{{
<ul>
<li class="listTitle">List title label</li>
<li><a class="tiddlyLink ..." href="javascript:;" onclick="..."
refresh="link" tiddlyLink="ExampleOne">ExampleOne</a></li>
</ul>
}}}
The optional {{{sep}}} parameter specifies a string of characters to be inserted as a separator between each {{{<li>}}} element. In conjunction with the CSS {{{ul li {display: none;} }}} this allows the tagging list to be formatted as a nicely formatted inline list.
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ~ViewTemplate|
|Version:|3.1 ($Rev: 4092 $)|
|Date:|$Date: 2008-03-24 12:32:33 +1000 (Mon, 24 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
config.taggly = {
// for translations
lingo: {
labels: {
asc: "\u2191", // down arrow
desc: "\u2193", // up arrow
title: "title",
modified: "modified",
created: "created",
show: "+",
hide: "-",
normal: "normal",
group: "group",
commas: "commas",
sitemap: "sitemap",
numCols: "cols\u00b1", // plus minus sign
label: "Tagged as '%0':",
excerpts: "excerpts",
descr: "descr",
slices: "slices",
contents: "contents",
sliders: "sliders",
noexcerpts: "title only"
},
tooltips: {
title: "Click to sort by title",
modified: "Click to sort by modified date",
created: "Click to sort by created date",
show: "Click to show tagging list",
hide: "Click to hide tagging list",
normal: "Click to show a normal ungrouped list",
group: "Click to show list grouped by tag",
sitemap: "Click to show a sitemap style list",
commas: "Click to show a comma separated list",
numCols: "Click to change number of columns",
excerpts: "Click to show excerpts",
descr: "Click to show the description slice",
slices: "Click to show all slices",
contents: "Click to show entire tiddler contents",
sliders: "Click to show tiddler contents in sliders",
noexcerpts: "Click to show entire title only"
}
},
config: {
showTaggingCounts: true,
listOpts: {
// the first one will be the default
sortBy: ["title","modified","created"],
sortOrder: ["asc","desc"],
hideState: ["show","hide"],
listMode: ["normal","group","sitemap","commas"],
numCols: ["1","2","3","4","5","6"],
excerpts: ["noexcerpts","excerpts","descr","slices","contents","sliders"]
},
valuePrefix: "taggly.",
excludeTags: ['excludeTagging'],
excerptSize: 50,
excerptMarker: "/%"+"%/"
},
getTagglyOpt: function(title,opt) {
var val = store.getValue(title,this.config.valuePrefix+opt);
return val ? val : this.config.listOpts[opt][0];
},
setTagglyOpt: function(title,opt,value) {
if (!store.tiddlerExists(title))
// create it silently
store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");
// if value is default then remove it to save space
return store.setValue(title,
this.config.valuePrefix+opt,
value == this.config.listOpts[opt][0] ? null : value);
},
getNextValue: function(title,opt) {
var current = this.getTagglyOpt(title,opt);
var pos = this.config.listOpts[opt].indexOf(current);
// a little usability enhancement. actually it doesn't work right for grouped or sitemap
var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);
var newPos = (pos + 1) % limit;
return this.config.listOpts[opt][newPos];
},
toggleTagglyOpt: function(title,opt) {
var newVal = this.getNextValue(title,opt);
this.setTagglyOpt(title,opt,newVal);
},
createListControl: function(place,title,type) {
var lingo = config.taggly.lingo;
var label;
var tooltip;
var onclick;
if ((type == "title" || type == "modified" || type == "created")) {
// "special" controls. a little tricky. derived from sortOrder and sortBy
label = lingo.labels[type];
tooltip = lingo.tooltips[type];
if (this.getTagglyOpt(title,"sortBy") == type) {
label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
onclick = function() {
config.taggly.toggleTagglyOpt(title,"sortOrder");
return false;
}
}
else {
onclick = function() {
config.taggly.setTagglyOpt(title,"sortBy",type);
config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
return false;
}
}
}
else {
// "regular" controls, nice and simple
label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
onclick = function() {
config.taggly.toggleTagglyOpt(title,type);
return false;
}
}
// hide button because commas don't have columns
if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
},
makeColumns: function(orig,numCols) {
var listSize = orig.length;
var colSize = listSize/numCols;
var remainder = listSize % numCols;
var upperColsize = colSize;
var lowerColsize = colSize;
if (colSize != Math.floor(colSize)) {
// it's not an exact fit so..
upperColsize = Math.floor(colSize) + 1;
lowerColsize = Math.floor(colSize);
}
var output = [];
var c = 0;
for (var j=0;j<numCols;j++) {
var singleCol = [];
var thisSize = j < remainder ? upperColsize : lowerColsize;
for (var i=0;i<thisSize;i++)
singleCol.push(orig[c++]);
output.push(singleCol);
}
return output;
},
drawTable: function(place,columns,theClass) {
var newTable = createTiddlyElement(place,"table",null,theClass);
var newTbody = createTiddlyElement(newTable,"tbody");
var newTr = createTiddlyElement(newTbody,"tr");
for (var j=0;j<columns.length;j++) {
var colOutput = "";
for (var i=0;i<columns[j].length;i++)
colOutput += columns[j][i];
var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
wikify(colOutput,newTd);
}
return newTable;
},
createTagglyList: function(place,title) {
switch(this.getTagglyOpt(title,"listMode")) {
case "group": return this.createTagglyListGrouped(place,title); break;
case "normal": return this.createTagglyListNormal(place,title,false); break;
case "commas": return this.createTagglyListNormal(place,title,true); break;
case "sitemap":return this.createTagglyListSiteMap(place,title); break;
}
},
getTaggingCount: function(title) {
// thanks to Doug Edmunds
if (this.config.showTaggingCounts) {
var tagCount = store.getTaggedTiddlers(title).length;
if (tagCount > 0)
return " ("+tagCount+")";
}
return "";
},
getExcerpt: function(inTiddlerTitle,title,indent) {
if (!indent)
indent = 1;
var displayMode = this.getTagglyOpt(inTiddlerTitle,"excerpts");
var t = store.getTiddler(title);
if (t && displayMode == "excerpts") {
var text = t.text.replace(/\n/," ");
var marker = text.indexOf(this.config.excerptMarker);
if (marker != -1) {
return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
}
else if (text.length < this.config.excerptSize) {
return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
}
else {
return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
}
}
else if (t && displayMode == "contents") {
return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
}
else if (t && displayMode == "sliders") {
return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
}
else if (t && displayMode == "descr") {
var descr = store.getTiddlerSlice(title,'Description');
return descr ? " {{excerpt{" + descr + "}}}" : "";
}
else if (t && displayMode == "slices") {
var result = "";
var slices = store.calcAllSlices(title);
for (var s in slices)
result += "|%0|<nowiki>%1</nowiki>|\n".format([s,slices[s]]);
return result ? "\n{{excerpt excerptIndent{\n" + result + "}}}" : "";
}
return "";
},
notHidden: function(t,inTiddler) {
if (typeof t == "string")
t = store.getTiddler(t);
return (!t || !t.tags.containsAny(this.config.excludeTags) ||
(inTiddler && this.config.excludeTags.contains(inTiddler)));
},
// this is for normal and commas mode
createTagglyListNormal: function(place,title,useCommas) {
var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));
if (this.getTagglyOpt(title,"sortOrder") == "desc")
list = list.reverse();
var output = [];
var first = true;
for (var i=0;i<list.length;i++) {
if (this.notHidden(list[i],title)) {
var countString = this.getTaggingCount(list[i].title);
var excerpt = this.getExcerpt(title,list[i].title);
if (useCommas)
output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
else
output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");
first = false;
}
}
return this.drawTable(place,
this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
useCommas ? "commas" : "normal");
},
// this is for the "grouped" mode
createTagglyListGrouped: function(place,title) {
var sortBy = this.getTagglyOpt(title,"sortBy");
var sortOrder = this.getTagglyOpt(title,"sortOrder");
var list = store.getTaggedTiddlers(title,sortBy);
if (sortOrder == "desc")
list = list.reverse();
var leftOvers = []
for (var i=0;i<list.length;i++)
leftOvers.push(list[i].title);
var allTagsHolder = {};
for (var i=0;i<list.length;i++) {
for (var j=0;j<list[i].tags.length;j++) {
if (list[i].tags[j] != title) { // not this tiddler
if (this.notHidden(list[i].tags[j],title)) {
if (!allTagsHolder[list[i].tags[j]])
allTagsHolder[list[i].tags[j]] = "";
if (this.notHidden(list[i],title)) {
allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";
leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers
}
}
}
}
}
var allTags = [];
for (var t in allTagsHolder)
allTags.push(t);
var sortHelper = function(a,b) {
if (a == b) return 0;
if (a < b) return -1;
return 1;
};
allTags.sort(function(a,b) {
var tidA = store.getTiddler(a);
var tidB = store.getTiddler(b);
if (sortBy == "title") return sortHelper(a,b);
else if (!tidA && !tidB) return 0;
else if (!tidA) return -1;
else if (!tidB) return +1;
else return sortHelper(tidA[sortBy],tidB[sortBy]);
});
var leftOverOutput = "";
for (var i=0;i<leftOvers.length;i++)
if (this.notHidden(leftOvers[i],title))
leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";
var output = [];
if (sortOrder == "desc")
allTags.reverse();
else if (leftOverOutput != "")
// leftovers first...
output.push(leftOverOutput);
for (var i=0;i<allTags.length;i++)
if (allTagsHolder[allTags[i]] != "")
output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);
if (sortOrder == "desc" && leftOverOutput != "")
// leftovers last...
output.push(leftOverOutput);
return this.drawTable(place,
this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
"grouped");
},
// used to build site map
treeTraverse: function(title,depth,sortBy,sortOrder) {
var list = store.getTaggedTiddlers(title,sortBy);
if (sortOrder == "desc")
list.reverse();
var indent = "";
for (var j=0;j<depth;j++)
indent += "*"
var childOutput = "";
for (var i=0;i<list.length;i++)
if (list[i].title != title)
if (this.notHidden(list[i].title,this.config.inTiddler))
childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);
if (depth == 0)
return childOutput;
else
return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title,depth) + "\n" + childOutput;
},
// this if for the site map mode
createTagglyListSiteMap: function(place,title) {
this.config.inTiddler = title; // nasty. should pass it in to traverse probably
var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));
return this.drawTable(place,
this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
"sitemap"
);
},
macros: {
tagglyTagging: {
handler: function (place,macroName,params,wikifier,paramString,tiddler) {
var refreshContainer = createTiddlyElement(place,"div");
// do some refresh magic to make it keep the list fresh - thanks Saq
refreshContainer.setAttribute("refresh","macro");
refreshContainer.setAttribute("macroName",macroName);
if (params[0])
refreshContainer.setAttribute("title",params[0]);
else {
refreshContainer.setAttribute("title",tiddler.title);
}
this.refresh(refreshContainer);
},
refresh: function(place) {
var title = place.getAttribute("title");
removeChildren(place);
addClass(place,"tagglyTagging");
if (store.getTaggedTiddlers(title).length > 0) {
var lingo = config.taggly.lingo;
config.taggly.createListControl(place,title,"hideState");
if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));
config.taggly.createListControl(place,title,"title");
config.taggly.createListControl(place,title,"modified");
config.taggly.createListControl(place,title,"created");
config.taggly.createListControl(place,title,"listMode");
config.taggly.createListControl(place,title,"excerpts");
config.taggly.createListControl(place,title,"numCols");
config.taggly.createTagglyList(place,title);
}
}
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
" margin-top:0px; padding-top:0.5em; padding-left:2em;",
" margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
" color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
" border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active {",
" border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
".excerptIndent { margin-left:4em; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
" margin-bottom:0.5em; }",
".tagglyTagging .indent1 { margin-left:3em; }",
".tagglyTagging .indent2 { margin-left:4em; }",
".tagglyTagging .indent3 { margin-left:5em; }",
".tagglyTagging .indent4 { margin-left:6em; }",
".tagglyTagging .indent5 { margin-left:7em; }",
".tagglyTagging .indent6 { margin-left:8em; }",
".tagglyTagging .indent7 { margin-left:9em; }",
".tagglyTagging .indent8 { margin-left:10em; }",
".tagglyTagging .indent9 { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
"/*}}}*/",
""].join("\n"),
init: function() {
merge(config.macros,this.macros);
config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
store.addNotification("TagglyTaggingStyles",refreshStyles);
}
};
config.taggly.init();
//}}}
/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin
// syntax adjusted to not clash with NestedSlidersPlugin
// added + syntax to start open instead of closed
***/
//{{{
config.formatters.unshift( {
name: "inlinesliders",
// match: "\\+\\+\\+\\+|\\<slider",
match: "\\<slider",
// lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
lookaheadRegExp: /(?:<slider)(\+?) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
handler: function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
var btn = createTiddlyButton(w.output,lookaheadMatch[2] + " "+"\u00BB",lookaheadMatch[2],this.onClickSlider,"button sliderButton");
var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
panel.style.display = (lookaheadMatch[1] == '+' ? "block" : "none");
wikify(lookaheadMatch[3],panel);
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
},
onClickSlider : function(e) {
if(!e) var e = window.event;
var n = this.nextSibling;
n.style.display = (n.style.display=="none") ? "block" : "none";
return false;
}
});
//}}}
You can categorise a tiddler by assigning it with one or more special keywords called tags.
Tiddlers which have been assigned tags can be accessed using the tagging menu that appears at the top right of each tiddler (when in read mode). For instance, this tiddler is tagged with "features", "terminology" and "gettingstarted". If you click on these tag names in the tagging menu, you get access to all the other tiddlers that have been given the same tag.
You can see a whole list of tags by looking in the [[SideBarTabs]], and selecting the Tags tab.
This site uses the standard convention that the names of tags start with a lower case letter, and tiddlers with an upper case letter, but this is not actually enforced.
Tags can be tiddlers themselves, with their own tags, so you can have hierarchies of tiddlers. This is a surprisingly useful and powerful technique has been dubbed ~TagglyTagging by the [[Community]].
This is the ThirdVersion of TiddlyWiki, released in April 2005. The SecondVersion was released in December 2004, and before that the FirstVersion in September 2004.
See the RevisionHistory for details of minor changes and bug-fixes since the ThirdVersion. See HowToUpgrade an earlier version of TiddlyWiki to the latest revision.
A 'tiddler' is the name given to a unit of MicroContent in TiddlyWiki.
Tiddlers are pervasive in TiddlyWiki. The MainMenu is defined by a tiddler, plugins are delivered in tiddlers, there are special StyleSheet tiddlers, and so on.
Other systems have analogous concepts with more prosaic names: like "items", "entries", "entities". Even though "tiddler" is undoubtedly a SillyName it at least has the virtue of being confusingly distinctive rather than confusingly generic.
To hide text within a tiddler so that it is not displayed you can wrap it in {{{/%}}} and {{{%/}}}. It can be a useful trick for hiding drafts or annotating complex markup. Edit this tiddler to see an example.
/%This text is not displayed
until you try to edit %/
/***
|''Name:''|TiddlerListMacro|
|''Version:''|2.3 (8-Jan-2008)|
|''Source''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23TiddlerListMacro]])|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
|''Documentation:''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacroDoc|
!Usage
{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}
See TiddlerListMacroDocumentation and TiddlerListMacroExamples
!Code
***/
//{{{
version.extensions.tiddlerList = {major: 2, minor: 3, revision: 0, date: new Date("Jan 08, 2008")};
// template = [header, item, separator, group, footer]
config.macros.tiddlerList={
formats : {list:true, nlist:true, span:true, stack:true, csv:true, table:true},
templates : {
list : [ "%0\n", "* %0\n", "", "%group\n", "%0\n"],
nlist : [ "%0", "# %0\n", "", "%group\n", "%0\n"],
span : [ "%0", "%0", " ", "%group", "%0"],
stack : [ "%0", "%0", "\n", "%group", "%0"],
csv : [ "%0", "%0", ", ", "%0", "%0\n"],
table : ["|!%0|\n", "|%0|\n", "", "|%group|\n", "|%0|\n"]
},
dateFormat : "DD MMM YYYY"
}
if (typeof gCurrentTiddler == 'undefined')
var gCurrentTiddler;
config.macros.tiddlerList.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
// Some globals
var count=0, groupCount=0, theGroup="", lastGroup="", firstInGroup = false;
var currentTiddler = tiddler;
gCurrentTiddler = tiddler;
var listWikiText="";
var formats = this.formats;
// SQL-Like parameters
var parameters = paramString.parseParams("name",null,true);
var pTags = parameters[0]["tags"]?parameters[0]["tags"][0].split(','):[];
var pOrder = parameters[0]["order"]?parameters[0]["order"][0]:"title";
var pTop = parameters[0]["top"]?parameters[0]["top"][0]:-1;
var pText = parameters[0]["text"]?parameters[0]["text"][0]:"";
var pTitle = parameters[0]["title"]?parameters[0]["title"][0]:"";
var pSearch = parameters[0]["search"]?parameters[0]["search"][0]:"";
var pFilter = parameters[0]["filter"]?parameters[0]["filter"][0]:"";
var pHeader = parameters[0]["header"]?paramFormat(parameters[0]["header"][0]):"";
var pFooter = parameters[0]["footer"]?paramFormat(parameters[0]["footer"][0]):"";
var pGroup = parameters[0]["group"]?parameters[0]["group"][0]:"";
var pDateFormat = parameters[0]["dateFormat"]?parameters[0]["dateFormat"][0]:this.dateFormat;
var pCustomParameter = parameters[0]["customParameter"]?parameters[0]["customParameter"][0]:"";
var pFormat = parameters[0]["format"]?parameters[0]["format"][0]:"list";
pFormat = formats[pFormat]?pFormat:"list"
// Separator
var pSeparator = parameters[0]["separator"]?paramFormat(parameters[0]["separator"][0]):(parameters[0]["seperator"]?paramFormat(parameters[0]["seperator"][0]):this.templates[pFormat][2])
// Template for group
var pGroupTemplate = this.templates[pFormat][3];
if (parameters[0]["groupTemplate"])
pGroupTemplate = paramFormat(parameters[0]["groupTemplate"][0])
pGroupTemplate = pGroupTemplate.replace(/\$\)\)/g, ">>")
// Template for group footer
var pGroupFooterTemplate = "";
if (parameters[0]["groupFooterTemplate"])
pGroupFooterTemplate = paramFormat(parameters[0]["groupFooterTemplate"][0]);
pGroupFooterTemplate = pGroupFooterTemplate.replace(/\$\)\)/g, ">>");
// Template for item
var pItemTemplate = this.templates[pFormat][1];
if (parameters[0]["itemTemplate"])
pItemTemplate = paramFormat(parameters[0]["itemTemplate"][0])
pItemTemplate = pItemTemplate.replace(/\$\)\)/g, ">>").replace(/%link/g, "%0").replace(/%item/g, "%1").replace(/%abstract/g, "%2").replace(/%text/g, "%3").replace(/%created/g, "%4").replace(/%modified/g, "%5").replace(/%modifier/g, "%6").replace(/%group/g, "%7").replace(/%title/g, "%8").replace(/%tags/g, "%9").replace(/%nolink/g, "%10").replace(/%custom/g, "%11")
// Template for footer
var pFooterTemplate = this.templates[pFormat][4].replace(/%count/g, "%1")
// Get all tiddlers
var tiddlers = store.reverseLookup("tags","",false);
// Sorting
if(!pOrder)
pOrder = "title";
if (pOrder.match(/^\-/i)) {
pOrder = pOrder.substr(1)
var sortDesc = true;
}
// Sorting on a standard field
if (pOrder.match(/(title)|(text)|(modifier)|(modified)|(created)|(tags)/))
if (sortDesc)
tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] > b[pOrder]) ? -1 : +1; });
else
tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] < b[pOrder]) ? -1 : +1; });
else
if (sortDesc)
tiddlers.sort(function (a,b) {if(a.fields[pOrder] == b.fields[pOrder]) return(0); else return (a.fields[pOrder] > b.fields[pOrder]) ? -1 : +1; });
else
tiddlers.sort(function (a,b) {if(a.fields[pOrder] == b.fields[pOrder]) return(0); else return (a.fields[pOrder] < b.fields[pOrder]) ? -1 : +1; });
// Header
if (pHeader)
listWikiText += formatItem(this.templates[pFormat][0], [pHeader], pFormat)
for(var t=0; t<tiddlers.length; t++) {
tiddler = tiddlers[t];
if (pText!="" && tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
if (pTop==-1 || count<pTop) {
if (pText=="" || tiddler.text.match(pText)) {
if (pTitle=="" || tiddler.title.match(pTitle)) {
if (pSearch=="" || (tiddler.title.match(pSearch) || tiddler.text.match(pSearch))) {
if (pFilter=="" || eval(pFilter)) {
if (pTags.length==0 || compareArrays(tiddler.tags, pTags, "all")) {
count++;
if (tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
// Grouping
if (pGroup) {
theGroup = eval(pGroup);
if(theGroup != lastGroup) {
groupCount++;firstInGroup = true;
if (pGroupFooterTemplate && groupCount>1)
listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
listWikiText += pGroupTemplate.replace("%group", theGroup)
lastGroup = theGroup;
} else
firstInGroup = false;
}
// Separators
if (count>1 && !firstInGroup) listWikiText += pSeparator;
//Plaintext title
var noLink = tiddler.title.match(config.textPrimitives.wikiLink)?"~" + tiddler.title:tiddler.title;
// Custom parameter
if (pCustomParameter)
var custom="";
try {
custom = eval(pCustomParameter)
} catch (e) {}
// List individual tiddler
var strItem = formatItem(pItemTemplate,["[[" + tiddler.title + "]]",count,tiddler.text.substr(0,300),tiddler.text,tiddler.created.formatString(pDateFormat),tiddler.modified.formatString(pDateFormat),tiddler.modifier,theGroup,tiddler.title,(tiddler.tags.length>0?"[["+tiddler.tags.join("]], [[")+"]]":""),noLink,custom], pFormat)
for (var fld in tiddler.fields) strItem = strItem.replace('%field.' + fld, tiddler.fields[fld]);
listWikiText += strItem
}
}
}
}
}
}
}
// Last group footer
if (pGroup && pGroupFooterTemplate && count>0)
listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
// Footer
if (pFooter) {
pFooter = pFooter.replace("%count", count)
listWikiText += formatItem(pFooterTemplate, [pFooter], pFormat)
}
// Render result
if (!parameters[0]["debug"])
wikify(listWikiText,place, null, currentTiddler)
else
place.innerHTML = "<textarea style=\"width:100%;\" rows=30>" + listWikiText + "</textarea>"
// Local functions
function paramFormat(param) {
// Allow "\n" in non evalled parameters
return param.replace(/\\n/g, "\n");
}
function formatItem(template, values, format) {
// Fill template with values (depending on list format)
if (format.match(/table/) && values[0].match(/\|/))
return ("%0\n").format(values)
else
return template.format(values)
}
function compareArrays(array, values, logic) {
// Compare items in array with AND("all") or OR("any") logic
var matches=0;
for(var v=0; v<values.length; v++)
if(values[v].replace(/^\s+|\s+$/g,"").match(/^\-/) && !array.contains(values[v].replace(/^\s+|\s+$/g,"").substr(1)))
matches++;
else if (array.contains(values[v]))
matches++;
return ((logic=="all" && matches==values.length) || (logic!="all" && matches>0))
}
}
String.prototype.prettyTrim = function(len,prefix,postfix) {
var result = this.trim().replace(/\r\n/g,' ').replace(/\n/g,' ');
if (!prefix) prefix = '';
if (!postfix) postfix = '';
if (result.length > len - 3)
return prefix + result.substr(0,len) + '...' + postfix;
else if (result.length > 0)
return prefix + result + postfix;
else
return result;
}
//}}}
TiddlerSlicing allows you to use special notation to pull out a chunk of specially marked text from within a tiddler. Each slice has a name and a value which can be specified anywhere within a tiddler in any of these formats:
{{{
theName: textSlice
|theName:| textSlice |
|theName| textSlice |
}}}
The name may contain any of the characters "a-ZA-Z_0-9", and may also be decorated with {{{''}}} or {{{//}}} markers for ''bold'' and //italic// formatting that are ignored. For example:
{{{
|''theName:''| textSlice |
}}}
Slices can be then be referenced by qualifying the parent tiddler name with the symbols "::" and the name of the slice. For example:
{{{
ColorPalette::PrimaryLight
}}}
TiddlerSlicing doesn't work eveywhere; at this point it is mainly intended to support the ColorPalette and similar usages.
Finally, here's an example of some more complex slice formatting:
{{{
version: 1.2.3.4
Author: Joe Brown
''Credits:'' ASmith BBrown CCalony
//~SeeAlso:// The rise and fall of the M-perium
|!Name|!Value|
|Name:|TextSlice Tester|
|URL:|http:\\sample.com\TestSliced |
|''Type:''| Plugin |
|//Source//| http:\\sample.com\TestSliced\src\text.js |
}}}
The slices defined in that example are:
|version|1.2.3.4|
|Author|Joe Brown|
|Credits|ASmith BBrown CCalony|
|~SeeAlso|The rise and fall of the M-perium|
|Name|TextSlice Tester|
|URL|http:\\sample.com\TestSliced|
|Type|Plugin|
|Source|http:\\sample.com\TestSliced\src\text.js|
/***
|''Name:''|TiddlersBarPlugin|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.5|
|''Date:''|Jan 18,2008|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demos
On [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], open several tiddlers to use the tabs bar.
!Installation
#import this tiddler from [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] (tagged as systemConfig)
#save and reload
#''if you're using a custom [[PageTemplate]]'', add {{{<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>}}} before {{{<div id='tiddlerDisplay'></div>}}}
#optionally, adjust StyleSheetTiddlersBar
!Tips
*Doubleclick on the tiddlers bar (where there is no tab) create a new tiddler.
*Tabs include a button to close {{{x}}} or save {{{!}}} their tiddler.
*By default, click on the current tab close all others tiddlers.
!Configuration options
<<option chkDisableTabsBar>> Disable the tabs bar (to print, by example).
<<option chkHideTabsBarWhenSingleTab >> Automatically hide the tabs bar when only one tiddler is displayed.
<<option txtSelectedTiddlerTabButton>> ''selected'' tab command button.
<<option txtPreviousTabKey>> previous tab access key.
<<option txtNextTabKey>> next tab access key.
!Code
***/
//{{{
config.options.chkDisableTabsBar = config.options.chkDisableTabsBar ? config.options.chkDisableTabsBar : false;
config.options.chkHideTabsBarWhenSingleTab = config.options.chkHideTabsBarWhenSingleTab ? config.options.chkHideTabsBarWhenSingleTab : false;
config.options.txtSelectedTiddlerTabButton = config.options.txtSelectedTiddlerTabButton ? config.options.txtSelectedTiddlerTabButton : "closeOthers";
config.options.txtPreviousTabKey = config.options.txtPreviousTabKey ? config.options.txtPreviousTabKey : "";
config.options.txtNextTabKey = config.options.txtNextTabKey ? config.options.txtNextTabKey : "";
config.macros.tiddlersBar = {
tooltip : "see ",
tooltipClose : "click here to close this tab",
tooltipSave : "click here to save this tab",
promptRename : "Enter tiddler new name",
currentTiddler : "",
previousState : false,
previousKey : config.options.txtPreviousTabKey,
nextKey : config.options.txtNextTabKey,
tabsAnimationSource : null, //use document.getElementById("tiddlerDisplay") if you need animation on tab switching.
handler: function(place,macroName,params) {
var previous = null;
if (config.macros.tiddlersBar.isShown())
story.forEachTiddler(function(title,e){
if (title==config.macros.tiddlersBar.currentTiddler){
var d = createTiddlyElement(null,"span",null,"tab tabSelected");
config.macros.tiddlersBar.createActiveTabButton(d,title);
if (previous && config.macros.tiddlersBar.previousKey) previous.setAttribute("accessKey",config.macros.tiddlersBar.nextKey);
previous = "active";
}
else {
var d = createTiddlyElement(place,"span",null,"tab tabUnselected");
var btn = createTiddlyButton(d,title,config.macros.tiddlersBar.tooltip + title,config.macros.tiddlersBar.onSelectTab);
btn.setAttribute("tiddler", title);
if (previous=="active" && config.macros.tiddlersBar.nextKey) btn.setAttribute("accessKey",config.macros.tiddlersBar.previousKey);
previous=btn;
}
var isDirty =story.isDirty(title);
var c = createTiddlyButton(d,isDirty ?"!":"x",isDirty?config.macros.tiddlersBar.tooltipSave:config.macros.tiddlersBar.tooltipClose, isDirty ? config.macros.tiddlersBar.onTabSave : config.macros.tiddlersBar.onTabClose,"tabButton");
c.setAttribute("tiddler", title);
if (place.childNodes) {
place.insertBefore(document.createTextNode(" "),place.firstChild); // to allow break line here when many tiddlers are open
place.insertBefore(d,place.firstChild);
}
else place.appendChild(d);
})
},
refresh: function(place,params){
removeChildren(place);
config.macros.tiddlersBar.handler(place,"tiddlersBar",params);
if (config.macros.tiddlersBar.previousState!=config.macros.tiddlersBar.isShown()) {
story.refreshAllTiddlers();
if (config.macros.tiddlersBar.previousState) story.forEachTiddler(function(t,e){e.style.display="";});
config.macros.tiddlersBar.previousState = !config.macros.tiddlersBar.previousState;
}
},
isShown : function(){
if (config.options.chkDisableTabsBar) return false;
if (!config.options.chkHideTabsBarWhenSingleTab) return true;
var cpt=0;
story.forEachTiddler(function(){cpt++});
return (cpt>1);
},
selectNextTab : function(){ //used when the current tab is closed (to select another tab)
var previous="";
story.forEachTiddler(function(title){
if (!config.macros.tiddlersBar.currentTiddler) {
story.displayTiddler(null,title);
return;
}
if (title==config.macros.tiddlersBar.currentTiddler) {
if (previous) {
story.displayTiddler(null,previous);
return;
}
else config.macros.tiddlersBar.currentTiddler=""; // so next tab will be selected
}
else previous=title;
});
},
onSelectTab : function(e){
var t = this.getAttribute("tiddler");
if (t) story.displayTiddler(null,t);
return false;
},
onTabClose : function(e){
var t = this.getAttribute("tiddler");
if (t) {
//tbGTD Why? if(story.hasChanges(t) && !readOnly) if(!confirm(config.commands.cancelTiddler.warning.format([t]))) return false;
story.closeTiddler(t);
}
return false;
},
onTabSave : function(e) {
var t = this.getAttribute("tiddler");
if (!e) e=window.event;
if (t) config.commands.saveTiddler.handler(e,null,t);
return false;
},
onSelectedTabButtonClick : function(event,src,title) {
var t = this.getAttribute("tiddler");
if (!event) event=window.event;
if (t && config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton])
config.commands[config.options.txtSelectedTiddlerTabButton].handler(event, src, t);
return false;
},
onTiddlersBarAction: function(event) {
var source = event.target ? event.target.id : event.srcElement.id; // FF uses target and IE uses srcElement;
if (source=="tiddlersBar") story.displayTiddler(null,'New Tiddler',DEFAULT_EDIT_TEMPLATE,false,null,null);
},
createActiveTabButton : function(place,title) {
if (config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton]) {
var btn = createTiddlyButton(place, title, config.commands[config.options.txtSelectedTiddlerTabButton].tooltip ,config.macros.tiddlersBar.onSelectedTabButtonClick);
btn.setAttribute("tiddler", title);
}
else
createTiddlyText(place,title);
}
}
story.coreCloseTiddler = story.coreCloseTiddler? story.coreCloseTiddler : story.closeTiddler;
story.coreDisplayTiddler = story.coreDisplayTiddler ? story.coreDisplayTiddler : story.displayTiddler;
story.closeTiddler = function(title,animate,unused) {
if (title==config.macros.tiddlersBar.currentTiddler)
config.macros.tiddlersBar.selectNextTab();
story.coreCloseTiddler(title,false,unused); //disable animation to get it closed before calling tiddlersBar.refresh
var e=document.getElementById("tiddlersBar");
if (e) config.macros.tiddlersBar.refresh(e,null);
}
story.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle){
story.coreDisplayTiddler(config.macros.tiddlersBar.tabsAnimationSource,tiddler,template,animate,unused,customFields,toggle);
var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler;
if (config.macros.tiddlersBar.isShown()) {
story.forEachTiddler(function(t,e){
if (t!=title) e.style.display="none";
else e.style.display="";
})
config.macros.tiddlersBar.currentTiddler=title;
}
var e=document.getElementById("tiddlersBar");
if (e){config.macros.tiddlersBar.refresh(e,null);}
if(config.options.chkSinglePagePermalink){
var sUrl=encodeURIComponent(String.encodeTiddlyLink(title));
window.location.hash = sUrl;
config.lastURL = window.location.hash;
document.title = wikifyPlain("SiteTitle") + " - " + title;
if(window.atREFRESH)window.atREFRESH();
}
}
var coreRefreshPageTemplate = coreRefreshPageTemplate ? coreRefreshPageTemplate : refreshPageTemplate;
refreshPageTemplate = function(title) {
coreRefreshPageTemplate(title);
if (config.macros.tiddlersBar) config.macros.tiddlersBar.refresh(document.getElementById("tiddlersBar"));
}
// tb: code cleanup and different highlight for selected tab
var barStyle
barStyle = "/*{{{*/\n"
+ ".tiddler {border: 3px solid [[ColorPalette::TertiaryPale]];border-left-width:2px;border-top-width:2px;clear:both;z-index:10;}\n"
+ "#tiddlersBar {z-index:0;}\n"
+ "#tiddlersBar .tab:hover {border-color:[[ColorPalette::SecondaryMid]];}\n"
+ "#tiddlersBar .tab {display:block;float:left;margin:3px 3px 0 0;padding: 2px 4px;}\n"
+ "#tiddlersBar .tabUnselected .tabButton, #tiddlersBar .tabSelected .tabButton {padding : 0 2px; margin: 0 0 0 2px;}\n"
+ "#tiddlersBar .tab {white-space:nowrap;border:0;border-top:2px solid [[ColorPalette::TertiaryMid]];border-bottom:2px solid [[ColorPalette::TertiaryPale]];margin-bottom:-2px;background:[[ColorPalette::TertiaryMid]];}\n"
+ "#tiddlersBar .button {border:0;color:[[ColorPalette::Foreground]];}\n"
+ "#tiddlersBar {padding:0 0 0 1%;marign:0;max-width:84%;}\n"
+ "#tiddlersBar .tabButton:hover, #tiddlersBar .button:hover, #tiddlersBar .tab:hover {color:[[ColorPalette::Background]];background:[[ColorPalette::SecondaryMid]]}\n"
+ "#tiddlersBar .tabSelected {background:[[ColorPalette::Background]];border:2px solid [[ColorPalette::TertiaryPale]];border-bottom:2px solid [[ColorPalette::Background]];margin-bottom:-2px;}\n"
+ "#tiddlersBar .tabSelected .button:hover{background:transparent;color:[[ColorPalette::Background]];}\n"
+ "#tiddlersBar .tabContents {border:1px [[ColorPalette::TertiaryMid]] solid;}\n"
+ "/*}}}*/";
config.shadowTiddlers.StyleSheetTiddlersBar = barStyle;
store.addNotification("StyleSheetTiddlersBar", refreshStyles);
config.refreshers.none = function(){return true;}
config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>");
//}}}
/%all tiddlers tagged with tags after 'with:' will be excluded %/<<tiddler scripts##tidsByTags with: tbGTD>>
[[manage the TagCloud...|TagCloud]]
[[Bookmarklets|http://en.wikipedia.org/wiki/Bookmarklet]] can be useful for TiddlyWiki hackers. They are browser bookmarks that contain embedded JavaScript that can reach into the currently loaded TiddlyWiki page to manipulate them and extract data.
Drag these links to your bookmark/favourites bar, or right click on them and choose "add to bookmarks" or "add to favourites":
* [[Scrub shadow tiddlers|javascript:(function(){if(window.version&&window.version.title=='TiddlyWiki'){for(var s in config.shadowTiddlers){store.removeTiddler(s);}refreshDisplay();}})()]] - deletes any overridden shadow tiddlers, reverting them to their default values. Handy when you’ve gone mad with PageTemplate customisations and your ~TiddlyWiki document won’t display properly
* [[Scrub tiddler fields|javascript:(function(){if(window.version&&window.version.title=='TiddlyWiki'){store.forEachTiddler(function(title,tiddler){tiddler.fields={};});refreshDisplay();}})()]] - all the extended fields from a ~TiddlyWiki document, including that pesky “changecount” field
* [[Rescue raw TiddlyWiki content|javascript:(function(){if(window.version&&window.version.title=='TiddlyWiki'){var w=window.open();w.document.open();w.document.write('<html><body><pre>');w.document.write(store.allTiddlersAsHtml().htmlEncode());w.document.write('</pre></body></html>');w.document.close();}})()]] - opens a new window containing the raw content of a ~TiddlyWiki. Handy when you’ve inadvertently been editing an online version of TiddlyWiki that isn’t letting you save changes in the usual way
Saq Imtiaz has a more extensive [[collection of bookmarklets|http://lewcid.org/tiddlywiki-bookmarklets/]] with better documentation.
If you're creating your own bookmarklets, this [[editor|http://subsimple.com/bookmarklets/jsbuilder.htm]] and these [[tips|http://subsimple.com/bookmarklets/tips.asp]] are useful resources.
The ~TiddlySaver Java applet allows ~TiddlyWiki to save changes in a local version (from a file:// URL) of Safari, Opera and other browsers. It is a small file named [["TiddlySaver.jar"|TiddlySaver.jar]] that must be placed in the same directory as your ~TiddlyWiki file. As of August 2008, when an empty ~TiddlyWiki file is downloaded using either Safari or Opera, it is bundled with a copy of the ~TiddlySaver.jar file in a zip file - both files must be in the same directory ''whenever the ~TiddlyWiki file is opened'' in order to work.
[["TiddlySaver.jar"|TiddlySaver.jar]] is signed by [[UnaMesa Association|UnaMesa]]. The [[UnaMesa Association|UnaMesa]] certificate is signed by the ''Thawte Code Signing CA'' intermediate certificate which is chained to the ''Thawte Premium Server CA'' root certificate. You need to trust this certificate Chain to be able to use the applet.
Note that there is currently [[a bug|http://trac.tiddlywiki.org/ticket/172]] that prevents ~TiddlySaver from working if you have specified a backup directory in AdvancedOptions and the directory doesn't exist.
Thanks to Andrew Gregory for the original TiddlySaver code, and ~BidiX for arranging all the certificate magic.
|''URL:''|http://tiddlystyles.com/|
|''URL:''|http://www.tiddlytools.com/|
|''Description:''|Small Tools for Big Ideas!|
|''Author:''|EricShulman|
The [[wiki|http://www.tiddlywiki.com]] that makes all this possible.
Before TiddlyWiki supported [[Plugins]], several independent developers created their own extended adaptations to support new features. These can be considered forks of the original core code, and won't necessarily be based on the latest version. For that reason, the trend more recently has been for developers to release new features as [[Plugins]] that can be readily mixed and matched and upgraded to the latest version.
Here's a list of known adaptations - note that many of these are quite old, and the links may be dead (all working as at 10 July 2008):
* Bram Chen's [[PrinceTiddlyWiki|http://ptw.sourceforge.net/]]
* Josh Goebel's [[ServerSideWiki|http://www.serversidewiki.com]]
* Masaki Yatsu's [[LesserWiki|http://lesserwiki.org/]]
* David Harper's [[BloTid|http://www.spacecoastweb.net/BloTid/Tiddly/]]
* Jacques Turbé's [[TidliPo|http://avm.free.fr/tidlipo.html]] (in French)
* Joe Raii's [[pytw|http://www.cs.utexas.edu/~joeraii/pytw/]] and [[Siglet|http://www.cs.utexas.edu/~joeraii/siglet/]]
* Jároli József's [[MagyarTiddlyWiki|http://innen.hu/MagyarTiddlyWiki]] (in Hungarian)
* Yoshimov's [[EncryptedTiddlyWiki|http://wiki.yoshimov.com/?page=EncryptedTiddlyWiki]] (in Japanese)
* Tim Morgan's [[ZiddlyWiki based on Zope|http://ziddlywiki.org/]]
* Steve Rumsby's [[YetAnotherTiddlyWikiAdaptation|http://www.rumsby.org/yatwa/]]
* Phono Hawk's [[PerlTiddlyWiki|http://ccm.sherry.jp/tiddly/]]
* Nathan Bower's [[GTDTiddlyWiki|http://shared.snapgrid.com/gtd_tiddlywiki.html]] (also see GTDTiddlyWiki)
* Dan Phiffer's [[TiddlyWikiRemote|http://phiffer.org/tiddly/]]
* Jonny ~LeRoy's [[TiddlyTagWiki|http://www.digitaldimsum.co.uk/tiddlywiki/]]
* Jody Foo's [[TagglyWiki|http://informationality.com/tagglywiki/tagglywiki.html]]
* Christian Hauck's [[CompleXimple InDeed|http://www.christianhauck.net/html/14300.html]]
* Alan Hecht's [[QwikiWeb|http://snipurl.com/qwikiweb]]
* Tim Cuthbertson and Matt Giuca's [[TiddlyWikiCSS|http://codestar.lidonet.net/misc/tiddlywikicss.html]] (and Peter Lazarev's [[further improvements|http://petka.webhop.net/#NiceTiddlyWiki]])
* Patrick Curry and Gabriel Jeffrey's [[PhpTiddlyWiki|http://www.patrickcurry.com/tiddly/]]
* Henrik Aasted Sorensen's [[server side adaptation|http://aasted.org/wiki]]
* [[KamiWiki|http://rakusai.org/kamiwiki/]]
* Kevem Buangga's [[TiddlyWikiClone|http://www.kevembuangga.com/hwk/hailiwiki.htm]]
* Andre Nho's [[StickWiki|http://stickwiki.sourceforge.net/]]
* [[MessageVault|http://www.kokogiak.com/gedankengang/2007/03/introducing-message-vault.html]], a personal password store built on some ~TiddlyWiki technology
There's also some TiddlyWikiTools that extend ~TiddlyWiki.
~TiddlyWiki has been used as the basis of a few experiments in hypertext fiction.
*"[[Bibliotheca Caelestis. Tiddlywikiroman|http://bc.etkbooks.com/opac/]]" from Hartmut Abendschein
*"[[Die, Vampire! Die!|http://www.davidvanwert.com/wiki/dievampiredie.html]]" from David Van Wert
*"[[Rose|http://www.emacswiki.org/alex/rose.html]]" from Alex Schroeder
*"[[Gimcrack'd|http://gimcrackd.com/]]" from Chris Klimas
*"[[Singularity!|http://www.accelerando.org/_static/toughguide.html]]" by Charles Stross
Isao Sonobe's [[TiddlyWikiPod|http://www8.ocn.ne.jp/~sonoisa/TiddlyWikiPod/index.html]] is a nifty utility for Mac OS X that copies the content of a ~TiddlyWiki to an iPod where it can be read, and links followed, using the touch wheel. Isao has also added the ability to link to songs from the ~TiddlyWiki text which enables some interesting applications. At the moment, the instructions apply to the older SecondVersion of ~TiddlyWiki.
Saq Imtiaz and Kalle Alm have just released a release candidate of [[TiddlySnip|http://tiddlysnip.com/]], a Firefox extension that lets you use your ~TiddlyWiki as a scrapbook. Simply select text, right click and choose "~TiddlySnip selection". Next time you open your ~TiddlyWiki file, your snippets will be there, already tagged and organised.
The first add-on tool for ~TiddlyWiki was Isao Sonobe's TiddlyWikiPod that let's you transfer the contents of a ~TiddlyWiki to an iPod (well, not an iPod shuffle).
Markus Koch has [[released a script|http://bloggern.de/cms/wiki.php]] that allows Postnuke to publish content in ~TiddlyWiki format (Postnuke is a popular full-blown open source content management system).
The 33ad blog features a neat tool by Jeremy Kelley to [[create a calendar in ~TiddlyWiki table format|http://33ad.org/tools/gtdtwcal.php]].
See TiddlyBookmarklets for some ideas about using bookmarklets to extend and hack ~TiddlyWiki.
/***
!!usage
In edit-mode, the following will be replaced when you save the tiddler
* {ts} or {t} -> timestamp
* {ds} or {d} -> datestamp
Configure ''timeFormat'' and ''dateFormat'' to your needs.
!all praises go to
[[InstantTimestampPlugin@MPTW|http://mptw.tiddlyspot.com/#InstantTimestampPlugin]]
!source
***/
//{{{
config.timeStampGTD={
timeFormat:'YYYY-0MM-0DD 0hh:0mm',
dateFormat:'YYYY-0MM-0DD',
excludeTags:['systemConfig'],
excludeTiddlers:[],
formats:[
[/\{ts?\}(?!\}\})/ig,"'{{ts{'+t.formatString(config.timeStampGTD.timeFormat)+'}}}'"],
[/\{ds?\}(?!\}\})/ig,"'{{ds{'+t.formatString(config.timeStampGTD.dateFormat)+'}}}'"]
]
}
TiddlyWiki.prototype.saveTiddler_tbGTD=TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler=function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created){
var t,f,i,c=config.timeStampGTD;
tags=tags?tags:[];tags=(typeof(tags)=="string")?tags.readBracketedList():tags;
if(!tags.containsAny(c.excludeTags)&&!c.excludeTiddlers.contains(newTitle)){
t=new Date();f=c.formats;
for(var i=0;i<f.length;i++)newBody=newBody.replace(f[i][0],eval(f[i][1]));
}
return this.saveTiddler_tbGTD.apply(this, arguments);
}
setStylesheet(".ts,.ds {font-weight:bold;color:#666;}","TimeStampStyles");
//}}}
The guy who took the time to design this nice TiddlyWiki flavour...
Is the same as ...[[Tobias]]
The {{{<<today>>}}} macro inserts the current date and time into a tiddler. It's updated each time the tiddler is redisplayed.
It can optionally take a DateFormatString to determine the way that the date is displayed:
{{{
<<today>>
<<today>>
}}}
Results in:
<<today>>
<<today>>
If your press the command key on the Mac or the control key on the PC while clicking on a link to a tiddler, the tiddler will be opened as usual if it isn't already open, but if //is// open, it will be closed. It makes a handy way to review links without having to move the mouse around to re-close tiddlers.
You can make this behaviour the default under AdvancedOptions (you can override back to the normal behaviour with the same command/control key).
/***
|''Name:''|ToggleSideBarTB|
|''Description''|allows to toggle left and right sidebar|
|''Version:''|1.0|
|''Type''|macro|
|''Author:''|[[TobiasBeer]]|
|''Info:''|http://tbgtd.tiddlyspot.com/#ToggleSideBarTB|
|''Source:''|http://tbgtd.tiddlyspot.com/#ToggleSideBarTB|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion''|2.xx|
!Code
***/
//{{{
config.macros.toggleSideBarTB={
settings:{
arr1:"►",arr2:"◄",
leftBarID:"mainMenu",leftBarLbl:"main menu",
leftBarHide:"margin-left:1em;",leftBarShow:"margin-left:10.1em;",
rightBarID:"sidebar",rightBarLbl:"sidebar",
rightBarHide:"margin-right:1em;",rightBarShow:"margin-right:17.1em;"
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
var l=params[0]&¶ms[0]=="left";
var h=params[1]&¶ms[1]=="hide";
var no=params[2]&¶ms[2]=="notip";
var s=this.settings;
var el=l?s.leftBarID:s.rightBarID;
var btnId="ToggleSideBar"+(l?"Left":"Right");
var arr=l?(h?s.arr1:s.arr2):(h?s.arr2:s.arr1);
var lbl=(no?'':"toggle "+(l?s.leftBarLbl:s.rightBarLbl));
var fct=function(){config.macros.toggleSideBarTB.toggle(btnId)};
document.getElementById(el).setAttribute("toggle",(h?"show":"hide"));
createTiddlyButton(place,arr,lbl,fct,"button HideSideBarButton",btnId);
},
toggle:function(btnId){
var btn=document.getElementById(btnId);
var l=btn.id=="ToggleSideBarLeft";
var s=config.macros.toggleSideBarTB.settings;
var bl=document.getElementById(s.leftBarID);
var br=document.getElementById(s.rightBarID);
var bar=(l?bl:br);
var hl=bl.getAttribute("toggle")=='show';if(l)hl=!hl;
var hr=br.getAttribute("toggle")=='show';if(!l)hr=!hr;
var h=(l?hl:hr);
setStylesheet("#contentWrapper #displayArea {"+
(hl?s.leftBarHide:s.leftBarShow)+
(hr?s.rightBarHide:s.rightBarShow)+
"}","ToggleSideBarStyles");
bar.style.display=h?"none":"block";
bar.setAttribute("toggle",(h?"show":"hide"));
arr1=l?s.arr2:s.arr1;arr2=l?s.arr1:s.arr2;
btn.innerHTML=h?arr2:arr1;
}
}
//}}}
/***
An under construction replacement for toggleTag
<<tTag mode:text text:D tag:Done>>
<<tTag mode:text text:N tag:Next>>
***/
//{{{
merge(config.macros,{
tTag: {
createIfRequired: true,
shortLabel: "[[%0]]",
longLabel: "[[%0]] [[%1]]",
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var parsedParams = paramString.parseParams("tags",null,true);
if (!tiddler)
tiddler = store.getTiddler(getParam(parsedParams,"title"));
var tag = getParam(parsedParams,"tag","checked");
var title = getParam(parsedParams,"title",tiddler.title);
var refreshAll = getParam(parsedParams,"refreshAll",false);
var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);
var label = getParam(parsedParams,"label",defaultLabel);
var theTiddler = title == tiddler.title ? tiddler : store.getTiddler(title);
var mode = getParam(parsedParams,"mode","checkbox");
var theClass = getParam(parsedParams,"class",tag+"Button");
var currentValue = theTiddler &&
(macroName == "tTag" ? theTiddler.isTagged(tag) : store.getValue(theTiddler,tag)=="true");
if (mode == "checkbox") {
// create the checkbox
var cb = createTiddlyCheckbox(place, label.format([tag,title]), currentValue, function(e) {
if (!store.tiddlerExists(title)) {
if (config.macros.tTag.createIfRequired) {
var content = store.getTiddlerText(title); // just in case it's a shadow
store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
}
else
return false;
}
//store.suspendNotifications();
if (macroName == "tTag")
store.setTiddlerTag(title,this.checked,tag);
else // it must be tField
store.setValue(title,tag,this.checked?"true":null);
if (refreshAll) {
story.forEachTiddler(function(title,element) {
if (element.getAttribute("dirty") != "true")
story.refreshTiddler(title,false,true);
});
}
//store.resumeNotifications();
return true;
});
}
else if (mode == "text") {
var text = getParam(parsedParams,"text","X");
var cl = createTiddlyButton(place, text, "Toggle "+text, function(e) {
if(!e) var e = window.event;
if (!store.tiddlerExists(title)) {
if (config.macros.tTag.createIfRequired) {
var content = store.getTiddlerText(title); // just in case it's a shadow
store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
}
else
return false;
}
//store.suspendNotifications();
var currentState = this.getAttribute("state")=="true";
var newState = !currentState;
store.setTiddlerTag(title,newState,tag);
if (macroName == "tTag")
store.setTiddlerTag(title,newState,tag);
else // it must be tField
store.setValue(title,tag,newState?"true":null);
// this is terrible please refactor
if (currentState) {
cl.setAttribute("state","false");
removeClass(cl,"on");
addClass(cl,"off");
}
else {
cl.setAttribute("state","true");
removeClass(cl,"off");
addClass(cl,"on");
}
//refreshDisplay();
if (refreshAll) {
story.forEachTiddler(function(title,element) {
if (element.getAttribute("dirty") != "true")
story.refreshTiddler(title,false,true);
});
}
//store.resumeNotifications();
e.cancelBubble = true;
if(e.stopPropagation) e.stopPropagation();
return false;
});
addClass(cl,theClass.replace(/ /g,''));
if (currentValue) {
cl.setAttribute("state","true");
removeClass(cl,"off");
addClass(cl,"on");
}
else {
cl.setAttribute("state","false");
removeClass(cl,"on");
addClass(cl,"off");
}
}
else if (mode == "popup") {
var cl = createTiddlyButton(place, "zzz", "Toggle "+text, function(e) {
// props to Saq
if(!e) var e = window.event;
var popup = Popup.create(this);
createTiddlyButton(createTiddlyElement(popup,"li"),"foo","bar",function(e) {
// under contruction
alert(this.getAttribute("tag"));
});
Popup.show(popup,false);
e.cancelBubble = true;
if(e.stopPropagation) e.stopPropagation();
return false ;
});
}
}
}
});
config.macros.tField = config.macros.tTag;
setStylesheet(["",
".button.off {border-style:none;background:#fff;color:#ccc;}",
".button.on {border-style:none;background:#ddd;color:#000;}",
// TODO move this css elsewhere
"#realmSelector .button.off {margin:0 0.5em;padding:0 1em;border:2px solid #aaa;background:#eee;color:#333;}", // actually reversed, ie off is "on"
"#realmSelector .button.on {margin:0 0.5em;padding:0 1em;border:2px solid #999;background:#999;color:#ccc;}", // actually reversed, ie off is "on"
""].join("\n"),"tTag");
//}}}
A row of ToolbarButtons appears to the right of a tiddler title when the mouse is hovered over it. The buttons are:
* ''close'' - close the current tiddler
* ''edit'' - edit the current tiddler
* ''permalink'' - puts a link direct to the current tiddler into the address bar
* ''references'' - displays all the tiddlers that link to the current tiddler
* ''done'' - save changes to a tiddler being editted
* ''cancel'' - cancel changes to a tiddler being editted
* ''delete'' - delete the current tiddler
|~ViewToolbar|refreshTiddler -closeTiddler +editTiddler deleteTiddler > syncing permalink fields <|
|~EditToolbar|-cancelTiddler +saveTiddler deleteTiddler|
The ToolbarMacro is used in the TiddlerTemplateMechanism to define the toolbar that appears when the mouse is hovered over a tiddler. It looks like this:
{{{
<<toolbar closeTiddler -editTiddler +jump>>
}}}
The arguments to the ToolbarMacro is a list of command names, as discussed in the CommandMechanism. The available commands are tagged <<tag commands>>.
You can precede a command name with a "+" to specify a default command that is automatically chosen when a tiddler is double-clicked, or the ctrl-Enter key combination pressed. Similarly, precede it with "-" to specify a command to be chosen when the Escape key is pressed.
/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{
// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'icehit3';
// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too
// disable autosave in d3
if (window.location.protocol != "file:")
config.options.chkGTDLazyAutoSave = false;
// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}
// create some shadow tiddler content
merge(config.shadowTiddlers,{
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n"),
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'WelcomeToTiddlyspot':[
"This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //What now?// @@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
"<<tiddler TspotControls>>",
"See also GettingStarted.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// @@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Help!// @@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n")
});
//}}}
[[UnaMesa|http://www.unamesa.org/]] is a non-profit organisation that owns and holds the IPR for TiddlyWiki in trust for the public.
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 16/06/2010 11:20:54 | YourName | [[/|http://icehit3.tiddlyspot.com/#WelcomeToTiddlyspot]] | [[store.cgi|http://icehit3.tiddlyspot.com/store.cgi]] | . | [[index.html | http://icehit3.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 3,
date: new Date("Feb 24, 2008"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
if (!params) params = {};
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
var rssString = generateRss();
// no UnicodeToUTF8 conversion needed when location is "file" !!!
if (document.location.toString().substr(0,4) != "file")
rssString = convertUnicodeToUTF8(rssString);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == 404)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
TiddlyWiki works fine under Internet Explorer on Windows Vista, although you may run into the blocking problem described in ServicePack2Problems.
Under Vista, TiddlyWiki will not save changes correctly if you are viewing the TiddlyWiki file in Vista's file preview pane.
|''URL:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal|
In late February 2007 an update to Norton's anti-virus software causes it to falsely identify TiddlyWiki files as containing the "W32.Feebs" virus. This is an incorrect report and should be ignored. See [[this discussion|http://groups.google.com/group/TiddlyWiki/browse_frm/thread/f98da9a720d01ba5/87a96ed9899e05c9?hl=en]] for more details.
TiddlyWiki seems to [[work fine on the Wii browser|http://blog.deuceofalltrades.com/2007/02/wii-browser-meets-microcontent.html]], at least for browsing -- it doesn't appear that you can save or upload changes.
Putting ~TiddlyWiki on a USB stick lets you carry around a self contained notebook that you can update wherever there's a computer, whether it's a Mac, Linux or a PC.
To be even more independent you can [[install FireFox on the drive|http://www.mozilla.org/support/firefox/tips#oth_usb]] as well!
A wiki (derived from the Hawaiian word for "fast") is a popular way of building collaborative websites. It's based on the two ideas of allowing users to easily edit any page and the use of special formatting to create links between pages. See Wikipedia for [[more details|http://en.wikipedia.org/wiki/Wiki]].
~TiddlyWiki is fundamentally different from a conventional Wiki because it is not based on separate, entire pages of content, but rather items of MicroContent referred to as [[Tiddlers|Tiddler]] that live together on the same page.
Out of the box, ~TiddlyWiki is also different because it doesn't support public editing - or indeed any persistent editing when viewed over the web. However, there are ServerSide editions, TiddlyWikiAdaptations and [[Plugins]] that provide these features in a wide range of different configurations.
A WikiWord is a word composed of a bunch of other words slammed together with each of their first letters capitalised. WikiWord notation in a conventional WikiWikiWeb is used to name individual pages while TiddlyWiki uses WikiWord titles for smaller chunks of MicroContent. Referring to a page with a WikiWord automatically creates a link to it. Clicking on a link jumps to that page or, if it doesn't exist, to an editor to create it. It's also easy to have NonWikiWordLinks, and there's a WikiWordEscape for situations where you don't want a WikiWord to be interpreted as a link.
Sometimes it's handy to be able to write WikiWords without them being recognised as links (for people's names, for instance). You can do this by preceding the WikiWord with a tilde ({{{~}}}). For example, ~JamesBond, ~JavaScript and ~TiddlyWiki
I'm hoping that after using TiddlyWiki for a while a new WritingStyle will emerge that is appropriate for this medium. Jakob Neilsen wrote an article about [[writing styles|http://www.useit.com/alertbox/980906.html]] for MicroContent back in 1998 that still seems surprisingly relevant.
All high priority items tag here...
All medium priority items tag here...
All low priority items tag here...
Actions reflect that which you want or need to do...
''New:'' <<newTiddler label:"#next" title:"new next action" prompt:"create a new next action" focus:title tag:#next>> <<newTiddler label:"#queued" title:"new queued action" prompt:"queue an new action" focus:title tag:#queued>> <<newTiddler label:"#waiting" title:"new waiting action" prompt:"create a new waiting action" focus:title tag:#waiting>><<newTiddler label:"#future" title:"new future action" prompt:"create a new future action" focus:title tag:#future>>
Use the archive to store information you no longer need for your daily work by assigning archive-tags to tiddlers. To avoid clutter and distraction, regularly import archived items into an extra tbGTD archive-document and afterwards delete them in your main document...
Areas are contextual categories for stuff...
//{{{
//utility functions for tbGTD
window.tbGTD={
//get type of GTD element 1=toplevel, 2=subcategory, 3=tagged, noGTD=null
type:function(title,list){
if(!title)return;
var l,s,t,cats,sub=[],ti,tgt;
if(!list)list='x-tagger';
l=store.getTiddlerText(list);if(!l)return;
cats=l.readBracketedList();
for(t=0;t<cats.length;t++){
ti=cats[t];if(title==ti)return 1;
tgt=store.getTaggedTiddlers(ti);
for(var s=0;s<tgt.length;s++){
ti=tgt[s].title;
if(title==ti)return 2;
sub.pushUnique(ti);}
}
for(t=0;t<sub.length;t++){
ti=sub[t];
tgt=store.getTaggedTiddlers(ti);
for(s=0;s<tgt.length;s++)if(title==tgt[s].title)return 3;
}
return null;
},
nu:function(tg,txt){
return '<<newTiddler label:"+" title:"new '+tg+'" prompt:"create new tiddler tagging to \''+tg+'\'" focus:title text:[['+txt+']] tag:[['+tg+']]>>';
}
}
//}}}
|widetable noborder|k
|padding:10px;<<tiddler SideBarOptions>>|vertical-align:top;padding:10px;<<showReminders leadtime:-14...7>> |
{{{-> }}}[[display calendar of the complete year|calendar year]]
{{black{<<calendar>>}}}{{tagClear{}}}
{{{-> }}}[[display calendar for this month|calendar]]
If you want to clean archived tiddlers <script label="click here!" title="click here to clean archived tiddlers.">
var t,tgt,ca,ar,clean=[];
ar=store.getTaggedTiddlers('archive');
for(ca=0;ca<ar.length;ca++){
tgt=store.getTaggedTiddlers(ar[ca].title);
for(t=0;t<tgt.length;t++)clean.pushUnique(tgt[t].title);
}
if(clean.length>0){
if(!confirm('Do you really want to delete '+clean.length+' archived items?\n'+clean))return;
for(t=0;t<clean.length;t++){
store.removeTiddler(clean[t]);
story.closeTiddler(clean[t],true);
}
}else alert('Nothing to be deleted.');
</script>
''Note'': You will be asked to confirm tiddlers to be deleted.
Tag project related contacts with contact-catogories...
<html><iframe src="http://goto.bplaced.net/x/tiddlyspot/tbgtd/" style="border:0"></iframe></html>
Contexts specify the type of activity you will do to complete an action...
{{desk{
|widetable|k
|width:50%;font-size:16px; <<newTiddler label:"+" title:"new next action" prompt:"create a new next action" focus:title tag:#next>>[[next|#next]] [[actions|action]]((*({{popBtn{<<tiddler action>>}}}))) |font-size:16px; <<newTiddler label:"+" title:"new reminder" prompt:"create a new reminder" focus:title tag:reminder text:{{var d=new Date();'<<reminder year:%0 month:%1 day:%2 title:"reminder title">\>'.format([d.getFullYear(),String.zeroPad(d.getMonth()+1,2),String.zeroPad(d.getMonth(),2)]);}}>>[[this weeks |calendar]][[reminders|reminder]]((*(<<tiddler reminder##info>>))) |h
|height:20px;background-color:#eee;{{deskNew{<<newTiddler label:"+" title:"queue new action" prompt:"create a new queued action" focus:title tag:#queued>><<tag #queued>><<rB queued>><<newTiddler label:"+" title:"new waiting action" prompt:"create a waiting action" focus:title tag:#waiting>><<tag #waiting>><<rB waiting>><<newTiddler label:"+" title:"new future action" prompt:"create a new future action" focus:title tag:#future>><<tag #future>><<rB future>><<tag #done>><<rB done>>}}}|padding-left:0.7em;{{block{<<showReminders leadtime:-3...7>>}}} |
|padding:1px;{{block{<<tiddlerList tags:"#next" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' '#next'$))|\n" header:"|noborder|k">>}}} |~|
|font-size:16px; <<newTiddler label:"+" title:"new active project" prompt:"create a new active project" focus:title tag:$active>>[[active|$active]] [[projects|project]]((*({{popBtn{<<tiddler project>>}}}))) |font-size:16px; <<newTiddler label:"+" title:"new starred tiddler" prompt:"create a new starred tiddler" focus:title tag:star>>[[starred tiddlers|star]]((*(<<tiddler star>>))) |h
|height:20px;background-color:#eee;{{deskNew{<<newTiddler label:"+" title:"new someday project" prompt:"create a new someday project" focus:title tag:$someday>><<tag $someday>><<rB someday>><<newTiddler label:"+" title:"new maybe project" prompt:"create a new maybe project" focus:title tag:$maybe>><<tag $maybe>><<rB maybe>><<tag $completed>><<rB completed>>}}}|padding:1px;{{block{<<tiddlerList tags:"star" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' 'star'$))|\n" header:"|noborder|k">>}}} |
|padding:1px;{{block{<<tiddlerList tags:"$active" order:"-modified" itemTemplate:"|<<tag [[%title]]$))|width:20px;<<tiddler scripts##miniTag with: %link '' '$active'$))|\n" header:"|noborder|k">>}}}|~|
<html><div style="width:80px;float:left;text-align:right;margin:0px 10px;">more views:</div></html>{{view{((_*(<<tiddler context>>)))<<tag context>><<rB contexts>>}}}{{view{((_*(<<tiddler contact>>)))<<tag contact>><<rB contacts>>}}}{{view{((_*(<<tiddler area>>)))<<tag area>><<rB areas>>}}}{{view{((_*(<<tiddler realm>>)))<<tag realm>><<rB realms>>}}}{{view{((_*(<<tiddler stage##info>>)))<<tag stage>><<rB stages>>}}}{{view{((_*(<<tiddler priority>>)))<<tag priority>><<rB priorities>>}}}{{view{<<popup 'more tools...' [[<<tiddler topMenuR##options$))]]>>}}}
!Latest articles
<<tiddlerList tags:"journal" top:"5" dateFormat:"mmm. 0DD" itemTemplate:"*[[%created - %title|%title]] \n" order:"-created">>
}}}
You just clicked on an example link, which was created by putting the word 'example' in double square brackets. You can now close this tiddler by clicking on the 'close' link above, and return to the guidelines.
{{sidebarTitle{[[tagged excludeList:|excludeLists]]}}}
<<list filter [tag[excludeLists]]>>
<<list filter [tag[excludeSearch]]>>
!!Links
{{{
WikiWord
~EscapedWikiWord
[[Wiki Word With Spaces]]
[[display text|WikiWord]]
http://www.externalLink.com
[[title|URL]]
[img[my.jpg][link]]
[>img[alias|path/my.jpg][link]]
to filesystem...
[[folder/file]] — relative path
file://///server/share — win share
file:///c:/folder/file — win local
file://folder/file — unix local
}}}
!!Basics
{{{
''bold''
//italic//
__underline__
--strikethrough--
~~subscript~~
^^superscript^^
@@highlight@@
{{{monospaced}}}
{{{
multiline code
}}}
}}}
!!Headings & lists
{{{
!h1
!!h2
!!!h3 ...
#ol1
##ol2
###ol3 ...
*ul1
**ul2
***ul3 ...
;definition title
:definition
nested example...
*bullet
*#number
*#;item
*#:definition
multiline styled contents...
#{{block{
!heading
still bullet1
}}}
#bullet2
}}}
!!Block quotes
{{{
>indent1
>>indent2
>>>indent3 ...
<<<
blockquoted
<<<
}}}
!!Dashes & rules
{{{
-- em dash
---- horizontal rule
}}}
!!Tables
{{{
|cssClass|k
|table caption|c
|heading|heading|h
|table|footer|f
|!heading|!heading|
|left-aligned | right-aligned|
| centered |background:blue;coloured|
|>|colspan|
|rowspan|with<br />linebreak|
|~|whatever|
|NoB|k
.NoB,.NoB th,.NoB thead,.NoB tbody,.NoB tr,.NoB td
{border:0 !important;} /*in StyleSheet*/
}}}
!!Escaping
{{{
"""escaped"""
/%hidden%/
/%
!section
hidden section content
!end%/
}}}
!!Markup & style
{{{
@@cssProperty:cssValue; text@@
{{{class{content styled via css class}}}
<html>valid xHTML markup</html>
linebreak: <br /> <br>
entities: & «
}}}
!!Macros
{{{
tid = [[TidName]] or TidName or 'tid name'
<<tiddler tid>>
<<tiddler 'tid##section'>>
<<tiddler 'tid::slice'>>
<<tabs id label tip tid ...>>
<<slider id tid label tip>>
<<today [format]>>
<<version>>
<<timeline [date][len][format]>>
<<list [all|missing|default|
orphans|shadowed|touched|
filter>>
<<allTags>>
<<tag name [label] [tip]>>
<<tags [tid]>>
<<tagging [tag]>>
<<newJournal [format]>>
<<newTiddler label:tidName
text:"text" tag:tag tag:tag
accessKey:key focus:field>>
<<saveChanges [label] [tip]>>
<<search [term]>>
<<closeAll>>
<<permaview>>
}}}
!!Startup paramifiers
{{{
#[open:]WikiWord
#[open:]WikiWord%20WikiWord…
#start:safe
#search:text
#tag:text
#newTiddler:WikiWord
#newJournal:format
}}}
!!Date formats
{{{
YYYY MMM DDD — year month day full
YY MM DD — 2 digit nums
0MM 0DD — leading zero
mmm ddd — short names
DDth — with suffix
WW — week num
wYY with week number
hh mm ss — hours min sec
0hh 0mm 0ss — leading zero
am AM or pm PM — indicator
hh12 — hours by 12
}}}
<script>
var c='$1',fl,gt,h,o='',t,ti,toc='\n!Table of contents',hx,x=place;
hx=[
['Introduction','intro'],
['TiddlyWiki','tw0',[
['General','tw'],
['Tiddler','tid'],
['Tags','tag'],
['Formating','fmt']]],
['GTD','gtd0',[
['Method','gtd'],
['Workflow','flow']]],
['tbGTD','tb0',[
['Geneneral','tbGTD'],
['Categories','cats'],
['Add stuff','add'],
['Stages','stages']]],
['How to','how',[
['Bookmarks','bmk'],
['Reminders','remind'],
['QuickNotes','qn'],
['MainMenu','menu'],
['x-tab','xtab'],
['x-plore','xplore'],
['x-tag','xtag'],
['tag-cloud','cloud'],
['tag-choser','deli'],
['sidebars','side']]],
['Broken?','brk'],
['Contact','mail']
];
gt=function(c){
var i,s,sc,sx,tx,tab=isNaN(c);//as tabs?
for(i=0;i<hx.length;i++){
sc=hx[i][1];
if(tab&&c==sc||!tab&&c==i){
sx=hx[i][2];if(tab&&!sx)break;
ti=hx[i][0];
o+=tab?'@@display:block;min-height:300px;<<tabs tabHelp'+sc:'\n!'+(i+1)+'. '+ti;
toc+="\n#''"+ti+"''";
if(sx){
for(s=0;s<sx.length;s++){
ti=sx[s][0];sc=sx[s][1];
o+=tab?" '"+ti+"' '' 'help##"+sc+"'":"\n!!"+(i+1)+'.'+String.fromCharCode(97+s)+' '+ti+"\n"+"<<tiddler help##"+sc+">>";
toc+="\n##"+ti;
}
if(tab)o+='>>@@';
}else o+="\n<<tiddler help##"+sc+">>";
}
}
}
switch(c){
case '$'+'1':o="{{vTabs help{<<tabs tabHelp";for(t=0;t<hx.length;t++){ti=hx[t][0];o+=" '"+ti+"' '' 'help##"+hx[t][1]+"'";}o+='>>}}}';break;
case 'all':o="{{tbHelp{TOCHELP";for(t=0;t<hx.length;t++)gt(t);o+="}}}";break;
default:gt(c);
}
if(c=='$'+'1'){
h=createTiddlyElement(x,'div',null,'tbHelp');
wikify(o,h);
o="<<slider chkLayout SiteLayout SiteLayout 'Toggles the SiteLayout. You can click on any of the links to get to the tiddler responsible for that content.'>> "+
"[[help printout|tbGTD help]]";
}
wikify((c=='all'?o.replace('TOCHELP',toc):o),x);
setStylesheet(
'.tbHelp{margin:10px 0;}'+
'.tbHelp table{border-width:1px;}'+
'.tbHelp .marked{background:#E6E6FF;}'+
'.tbHelp .tabContents{min-height:180px;}'+
'.helpInner{border:2px solid #CCC;background:#F6F6F6;display:block;padding:5px;}'+
'.vTabs .helpInner{border:0;overflow-y:scroll;}'+
'.vTabs .helpSM {height:200px;}'+
'.vTabs .helpBG {height:350px;}','GtdHelpStyles');
</script>@@display:block;height:1px;clear:both; @@/%
!tw0
<<tiddler help with: tw0>>
!gtd0
<<tiddler help with: gtd0>>
!tb0
<<tiddler help with: tb0>>
!how
<<tiddler help with: how>>
!intro
In the following sections you will be introduced to
*the inner workings of this document
*its elements
*how to use them
''Note'': Unless an external link -- an __underlined__ term indicates that there is a corresponding section in this [[help]] document.
This is an adaptation of __~TiddlyWiki__
*with a focus on __GTD__
*designed to help you manage your ideas and actions
*to relieve your brain from (stress related to) forgetfulness
*to aid documentation and knowledge management
@@color:#C33;''Note:'' Use this great document, but know that you do so at your own risk.@@
!tw
tbGTD is powered by [[TiddlyWiki]], which is...
*an amazing @@opensource@@ [[wiki|http://en.wikipedia.org/wiki/Wiki]] platform
*integrating all of @@content@@, @@layout@@, @@style@@ and @@javascript@@ into a @@single html file@@
*actively developped and supported by a vivacious community
Learn more at...
*the main site http://www.tiddlywiki.com
*the community wiki http://www.tiddlywiki.org
*the google user group http://groups.google.com/group/TiddlyWiki
!tid
A tiddler is the basic content element of a __[[TiddlyWiki]]__. with a few basic properties...
*a @@unique name@@
*@@text-content@@ given to it
*by an @@author@@
*@@created@@ at some date or @@modified@@ later
*@@__tags__@@, which are keywords linked to a tiddler and
*@@fields@@ providing basic information as well as extensibility
A tiddler is displayed in two basic modes...
*@@view-mode@@ displays the content, e.g. wiki-markup of the tiddler in the __TiddlyWiki__ @@displayArea@@
*@@edit-mode@@ displays editable fields to change the tiddlers contents
**you can easily access edit-mode by double clicking on a tiddlers display area
**use keyboard-shortcuts in edit-mode
***{{{ctrl-enter}}} saves the tiddler
***{{{escape}}} leaves edit-mode ...while not saving changes
A tiddler may be or contain...
*a content item composed of
**text __formating__ using wiki-markup, possibly with embedded contents, such as...
***images
***tables
***other tiddlers ...which is called a @@transclusion@@
*pure html content wrapped in an {{{<html></html>}}}-block, like...
**iframes ...an html-file or remote website embedded into it
**an {{{embed object}}}, sometimes called a @@widget@@ or @@gadget@@
*a plugin, macro, script or transclusion
**extending a basic __TiddlyWiki__ with more functionality
*[[css|http://en.wikipedia.org/wiki/Cascading_Style_Sheets]] design rules
**a StyleSheet defining how __TiddlyWiki__ looks
*a template ...or template-collection called a @@theme@@
**that determines the presentational @@structure@@ and @@layout@@ of your TiddlyWiki and its elements
*a shadow tiddler ...or system tiddler
**a tiddler with default content that can be overwritten but will be restored when you delete your custom content
!tag
Tags are a powerful concept to relate tiddlers to one another. In addition to ~WikiLinks -- links inside your TiddlyWiki -- they allow you to categorize tiddlers, but with the added benefit of updating upon name changes. Above all, a tag is a tiddler!
Use tags to establish...
*categories
*keywords
*relations
**between parent and child elements
*indicators or switches
**to change style or behaviour of tiddlers with a certain tag
In general, tag those tiddlers on which others depend...
*a sub-element with the corresponding higher-level element
*a task with the corresponding project or contact
In the toolbar {{button{x-tab}}}{{button{x-plore}}}&{{button{x-tag}}} provide tag-related features
*see __How to__
An important plugin integrated into this wiki is called [[TagglyTagging|TagglyTaggingPlugin]].
It is displayed at the bottom of a tiddler...
*showing you a configurable view of tiddlers tagging to the current one (if there are any)
*play with the options (!)
*[[go here|http://mptw.tiddlyspot.com]] to learn more about it
!fmt
The tiddler [[formating]] provides a reference for basic and advanced @@wiki-markup@@.
{{helpInner helpBG{<<tiddler formating>>}}}
!gtd
''GTD'' stands for @@Getting Things Done@@.
[[David Allen|http://en.wikipedia.org/wiki/David_Allen_%28author%29]] coined the term as a @@method@@ in his [[book|http://en.wikipedia.org/wiki/Getting_Things_Done]].
Central to its method is that you...
*collect
*process
*organize
*review
*do
...actions and ideas that occupy your brain capacity...
*whether you chose to or not
*which you may find worthy or in need of pursuing
!flow
|font-size:90%;incoming stuff...@@font-size:120%;margin-left:30%; ''inbox''@@ {{floatright{...What is it?}}}|>|>|>|h
| !Is it actionable? |>|>|>|
|>|>| ''yes'' |vertical-align:middle; ''no'' |
|>|>|>1 actions? -- new [[$active]] project (define success)|~|
|>|>|font-size:150%; !What is the next action? |<<tiddler help##noact>>|
| !do | !delegate | !defer |~|
|if <2 minutes|<<tiddler help##wait>>|<<tiddler help##defer>>|~|
|>|>| plan, do, review actions & projects |~|
!noact
#eliminate
**@@trash@@
#incubate
**task:@@[[#queued]], [[#future]]@@
**project:@@[[$someday]], [[$maybe]]@@
#[[reference]]
**set as tags
**tag with corresponding task, project, contact, etc.
!defer
#[[#next]]
**for me @@asap@@
#[[calendar]]
**@@specific@@ time & date
#set a [[reminder]]
!wait
*use [[#waiting]]
*tag with item (if exists)
!tbGTD
Why the name ''tbGTD''?
*Plain and simple, my initials following the you-know-what.
The original can be found at http://tbGTD.tiddlyspot.com...
*the tag <<tag site>> is a collection of tiddlers that manage the design of this tiddlywiki
*on the very bottom of this tiddler you find an illustrated layout of tbGTD
**in which you can click on most any links
***to open the tiddlers responsible for the respective content
!cats
Some tags begin or end with a special character in order to facilitate recognition:
<script>var c,f,i,l,n,o,t,x;
c=['!action','context','priority','!project','stage','contact','area','realm','!archive'];
o='| prefix | category | sub-categories |h\n';f='@@background:#fcc; %0@@';
for(x=0;x<c.length;x++){
i=c[x].substr(0,1)=='!'; n=i?c[x].substr(1):c[x];
t=store.getTaggedTiddlers(n);l=t.map(function(t){return '[['+t.title+']] '});
o+='| '+t[1].title.substr(0,1)+' |'+f.format(['((_*({{popBtn{<<tiddler "'+n+'">>}}})))[['+n+']]'])+' |'+(i?f.format([l]):l)+'|\n';
}return o;</script>
To assign a new item to a category, simply tag your tiddler with the corresponding category.
@@background:#fcc;padding:0 3px;These tiddlers@@ are essential and should only be modified if you know what you're doing:
*@@background:#fcc;[[desk]], [[journal]], [[calendar]], [[reminder]], [[reference]] and all tagged <<tag site>> or <<tag tbGTD>>@@
''Note:''
*type any of those prefixes in the searchbox, hit the down key and observe!
*you are not bound to using these categories
**delete or rename whatever category you don't like or need
**might require some tweaking of the [[desk]] or [[tagger|x-tagger]] or the [[MainMenu]]
!add
First, learn the basics of [[TiddlyWiki|http://tiddlywiki.com]].
You can add new items via...
*the {{button{+}}}buttons on the desk
*the {{button{new}}}popup in the [[top-left menu|topMenuL]]
*the MainMenu on the left hand side
*the {{button{new}}}button a tiddlers toolbar
Once you add a new tiddler, it is essential that you give it a meaningful tag...
*use the provided __categories__
To create a new [[next action|#next]], all it requires is a tiddler tagged [[#next]].
!stages
[[Stages|stage]] are a very powerful apporach for your project management and documentation, allowing you to...
*generate overviews of how much effort is going into which stages
*track project progress
''Tips'':
*adjust stages to suit your (different) project designs
**simply edit the corresponding stage-tiddlers or rename them
*consider using tbGTD template files for different project categories
*try to use stages with quick-add in [[QuickNotes]]!
Here is an overview of all <<tag stage>><<rB 'predefined stages...'>>
{{helpInner helpSM{<<tiddler stage>>}}}
!bmk
tbGTD is set-up such that the url always points to the current tiddler.
If you turned @@chkSinglePagePermalink@@ off...
*use the {{button{url}}}button on the toolbar of a tiddler
*you may need to click on the {{button{+}}}button
*then your browsers address bar shows a url pointing to the @@current tiddler@@
Retrieve a link to @@all displayed tiddlers@@ by clicking <<permaview>> under <<popup options [[<<tiddler topMenuR##options$))]]>>.
!remind
Add a reminder...
*by clicking on a date in the calendar
*using the {{button{remind}}}button in the tiddlers toolbar
*using [[QuickNotes]]
To delete or edit a reminder, edit the tiddler.
!qn
Use [[QuickNotes]] to quickly type away notes. It offers a powerful [[quick-add|quick-add help]] feature...
*allowing you to add even a complete project outline in one go
{{helpInner helpBG{<<tiddler 'quick-add help'>>}}}
!menu
The [[MainMenu]] on the left-hand side
*gives you quick access to all GTD categories
*allows to add new items
*indicates, which categories are actually used and let'S you open those subitems
The section @@Tags@@ in [[x-tagger config]] contains links to those tiddlers which are the categories used in the MainMenu as well as by [[x-tagger]] ...the {{button{x-tag}}}popup in the toolbar. Any tiddler tagging to these __categories__ will be displayed in either place.
''Note'':
*configure [[x-tagger]] using [[x-tagger config]]
**also accessible via {{button{edit categories...}}} under ''options'' in the {{button{x-tag}}}popup.
*change [[x-tagger config]] to your liking
**remove anything you don't want or need
*doubleclick on a tag-category in the MainMenu shows all categories
!cloud
To hide a __tag__ from the [[TagCloud]]...
*assign it the tag <<tag noCloud>>
*or use <<tag excludeLists>> to hide it from other lists too
You can also edit the macro call in [[TagCloud]] to exclude further tags, without using [[noCloud]].
!deli
To assign or remove a tag to a tiddler in edit-mode use...
*the default @@tag-choser@@ for any existing tag
*a GTD @@tag-choser@@ to quickly assign
**one of the main GTD __categories__
**its sub-tags
**any tiddlers tagging to the subtags
The tag-choser in edit-mode -- called [[DeliciousTagging]] -- by default ignores the same tags as does __~TagCloud__ ...see parameter @@exclude@@ in the sourcecode.
!side
There are two sidebars...
*@@left@@: MainMenu
*@@right@@: [[calendar|SideBarOptions]] and [[lists|SideBarTabs]]
To hide sidebars on startup...
*change the second parameter in {{{<<toggleSideBarTB left show>>}}} from {{{show}}} to {{{hide}}} in...
**[[topMenuL]] (@@left@@ sidebar)
**[[topMenuR]] (@@right@@ sidebar)
!xtab
Clicking on [[x-tab]] in the toolbar will open...
*an interface allowing you to see a crosstable of tagged items...
**providing you with @@presets@@ which you can delete, expand or edit
**preconfigured to @@detect@@ all GTD __categories__
**configurable to find what you're looking for the way you need it
Customize [[x-tab]]'s presets, tags and auto-detect in [[x-tab config]].
!xplore
Clicking on [[x-plore]] in the toolbar of the current tiddler
*opens a popup displaying the four most common tiddler relations
*in a treelike manner
Define elements to be excluded or truncated using the corresponding sections in [[x-plore]].
!xtag
The {{button{x-tag}}}popup allows you to easily assign tags to the current tiddler or remove them.
Customize [[x-tagger]] as described in __~MainMenu__ via [[x-tagger config]].
!brk
As tbGTD is based on __~TiddlyWiki__ it is facing the same browser restrictions that may come up.
It is highly recommended that you use Firefox!
Something looks weird or doesn't work in Internet Explorer, Safari, Opera, Chrome?
*I am trying my best to make tbGTD work correctly in other browsers
*if you come accross css bugs - rather than complain - try to suggest a fix
!mail
Need more help? Drop a line here...
*[[tiddlywiki discussion group on google|http://groups.google.com/group/tiddlywiki/browse_frm/thread/bd6a9784706784f6]]
*[[contact me here|contact me]] or on [[tbGTD.tiddlyspot.com|http://tbGTD.tiddlyspot.com/#%5B%5Bcontact%20me%5D%5D]]
!end%/
I just had to swap the prefixes of [[project]] and [[stage]]!
*from now on, the ''$dollar''-prefix will indicate a [[project category|project]] while the ''§paragraph''-prefix indicates a [[stage]]
*the symbology just makes 10 times more sense that way
*also, you're probably accustomed to the $ key ...therefore, it's good for starters, i.e. projects
I know that this somewhat breaks backwards-compatibility and I am sorry!
''Just say'': {{{Alright then. I'ts fine... nay bother.}}}
!So here's what I recommend you should do before updating ...after the release is outthere
Assign the new prefixes of [[project]]- and [[stage]]-categories for those categories in which you have items. That will take care of reassigning the new tagname in all tagging tiddlers. The MainMenu indicates which tag-categories have items. Finally, import your tiddlers into a blank tbGTD. Wasn't all that difficult, was it?
/***
|''Name:''|jQueryPopup|
|''Description:''|Inline annotations for tiddler text with a 'jQueryfied' popup|
|''Author:''|Tobias Beer (original AnnotationsPlugin by Saq Imtiaz)|
|''Source:''|http://tbGTD.tiddlyspot.com/#jQueryPopup|
|''Version:''|0.1|
|''Date:''|2009.10.19|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
|''incompatible with!!!''|AnnotationsPlugin|
((@@color:red;background:transparent;mod of ~AnnotationsPlugin@@(^strongly modded for tbGTD<br />*added delay<br />*wikified annotated & annotation<br />*used general tw Popup<br />*jQuery magic)))
!!Usage:
*{{{((text to annotate(annotation goes here)))}}}
* To include the text being annotated, in the popup as a title, put {{{^}}} as the first letter of the annotation text.
** {{{((text to annotate(^annotation goes here)))}}}
!!Examples:
Mouse over, the text below:
* ((_banana(the best fruit in the world)))
* ((_banana(^the best fruit in the world)))
***/
//{{{
config.extensions.anno={
show:function(id){
var el=document.getElementById(id);
el.timerA=false;
var wrap=document.getElementById('annowrap');
if (wrap==undefined)wrap=createTiddlyElement(document.body,"div","annowrap",null);
else wrap.innerHTML='';
wrap.style.display='none';
var stackPosition = Popup.find(el,"popup");
Popup.remove(stackPosition+1);
var popup = createTiddlyElement(wrap,"ol","popup","popup");
popup.stackPosition = stackPosition;
Popup.stack.push({root: el, popup: popup});
if(el.subject)wikify("!"+el.subject+"\n",popup);
wikify(el.anno,popup);
Popup.show();
popup.annoId=id;
popup.onmouseover=this.mouseover;
popup.onmouseout=this.mouseout;
jQuery(wrap).fadeIn('slow');
addClass(el,"annosubover");
el.wrap=wrap;
},
hide:function(id){var el=document.getElementById(id);if(el.keepAnno)return;else this.remove(id);
},
mouseover:function(e){
var el=document.getElementById(this.annoId);el.keepAnno=true;if(annoHideTimer)clearTimeout(annoHideTimer);
},
mouseout:function(e){
annoHideTimer=setTimeout("config.extensions.anno.remove("+this.annoId+")",200);
},
remove:function(id){
var el=document.getElementById(id);
Popup.remove();
removeNode(el.wrap);
el.wrap=null;
el.keepAnno=false;
removeClass(el,"annosubover");
}
}
config.formatters.unshift({
name:"annotations",
match:"\\(\\(",
lookaheadRegExp:/\(\((\_{0,2})(.*?)\((\^?)((?:.|\n)*?)\)\)\)/g,
handler:function(w){
this.lookaheadRegExp.lastIndex=w.matchStart;
var an=this.lookaheadRegExp.exec(w.source);
if(an&&an.index==w.matchStart){
var el=createTiddlyElement(w.output,"span",null,"annosub");
if (an[1]) el=createTiddlyElement(el,"span",null,null);
wikify('xxx'+an[2],el);
el.innerHTML=el.innerHTML.replace(/xxx/,'',1);
el.anno=an[4];
if(an[3])el.subject=an[2];
el.onmouseover=this.onmouseover;
el.onmouseout=this.onmouseout;
el.ondblclick=this.onmouseout;
w.nextMatch=an.index+an[0].length;
}
},
onmouseover:function(e){
if (!this.id) this.id=new Date().getTime()+Math.random();
if(this.timerA)return;
this.timerA=true;
annoTimer=setTimeout("config.extensions.anno.show("+this.id+")",300);
},
onmouseout:function(e){
this.timerA=false;
if(!this.wrap||this.keep)clearTimeout(annoTimer);
var id=this.id;
annoHideTimer=setTimeout("config.extensions.anno.hide("+this.id+")",200);
}
});
setStylesheet(".anno{position:absolute;padding:0.5em;max-width:15em;z-index:101;width:expression(document.body.clientWidth > (255/12) *parseInt(document.body.currentStyle.fontSize)?'15em':'auto' );}.anno h1, .anno h2{margin-top:0;}.annosubover{cursor:text;}","AnnotationStyles");
//}}}
<<newJournal "YYYY-0MM-0DD " label:"Write a new journal entry..." focus:title prompt:"Click to create a new journal entry!" tag:journal>>
<<tiddlerList tags:"journal" dateFormat:"mmm. 0DD" itemTemplate:"*%created - %0 \n" group:"tiddler.created.formatString('YYYY, MMM')" groupTemplate:"!!!%group \n" order:"-created">>
Tiddlers hidden from the [[TagCloud]]...
All [[quick notes|QuickNotes]] are tagging here...
@@display:block;margin:1em 1em 0 1em; [[SiteLayout]] <<saveChanges 'save'>><<tiddler TspotSidebar>><<slider chkTspotControls TspotControls "more tiddlyspot options »" "Show more tiddlyspot options">><<slider chkAdvOptionsPanel AdvancedOptions "advanced options »" "Show advanced options">>@@
|widetable|k
| option | description |h
| <<tiddler TspotOptions>>|options are saved as cookies in your browser|
| <<option txtUserName>>|username for signing your edits|
| <<option chkAnimate>>|enable animations|
| <<option chkAutoSave>>|autosave|
| <<option chkSaveBackups>>|save backups|
| <<option chkRegExpSearch>>|search regular expressions|
| <<option chkCaseSensitiveSearch>>|search case sensitive|
Assign priorities to differentiate importance...
Group [[actions|action]] into projects by assigning projects as tags to action-tiddlers. Assign project-tags to projects to indicating their status...
''New'': <<newTiddler label:"$active" title:"new active project" prompt:"create a new active project" focus:title tag:$active>><<newTiddler label:"$someday" title:"new someday project" prompt:"create a new someday project" focus:title tag:$someday>> <<newTiddler label:"$maybe" title:"new maybe project" prompt:"create a new maybe project" focus:title tag:$maybe>>
!QuickNotes has two modes of operation
#''simple note'' -- saves a new [[note]]-tiddler with the following properties:
**a ''title'' (optional) {{{...if none provided a timestamp will be inserted}}}
**some ''tags'' (optional) {{{...all notes will be tagged with 'note'}}}
**a ''note'' (required) {{{...the text body of your note}}}
#''quick-add'' -- allows you to add multiple new GTD items:
**invoked via ''ctrl-click'' on the ''save note''-button
**define items to be added with a simple, yet powerful syntax {{{...as described below}}}
!Using 'quick-add'
Using the default settings only [[projects|project]] and [[actions|action]] can be added via quick-add.
Here's a first example of the syntax for adding actions:
>#q call Maria|@c &fa {{{...creates the #queued action 'call Maria' tagged with context '@call' and area '&family'}}}
>!Notes {{{...this will be an actual heading of the content of the tiddler 'call Maria'}}}
>!!Things to talk about: {{{...a subheading}}}
>*foo {{{...you can even use lists}}}
>*http://bar.com {{{...could also be a WikiLink, like: [[bar]]}}}
>.#q remind her of Juans birthday|^1 {{{...creates a queued subaction tagging to 'call maria' with high priority }}}
''Note'': When using quick-add, a time-stamped summary will be created allowing you to check and quickly access all the tiddlers you just created.
!The syntax in detail
!!Basics
To create a default [[#next]] [[action]] or [[$active]] [[project]], just use the prefixes ''#'' or ''$'' by themselves followed by an empty space:
>''$'' my new active project
>''#'' my new next action
Append any unique starting letters of a category-tag to create something other than the defaults:
>''#q'' a queued action
>''$s'' a someday project
And, of course, preceded by an empty character follows the title:
>''# my new next action title''
To add any other GTD tags use the separator ' ''|'' ' followed by GTD tags using the same nomenclature as above, separated with empty spaces:
># read the js cookbook''|@r &t'' {{{...adds a next action called 'read the js cookbook' tagged @read and &tech}}}
''Note'': As for all tags following ' ''|'' ', you can in fact use the starting characters of any items already added, even existing tiddlers. If those contain empty spaces use square brackets, e.g. {{{[[a q]]}}} to refer to some added item called {{{'a queued item'}}} or in fact any existing tiddler that starts with {{{'a q'}}}. Note that items which you just added will be preferred over other existing tiddlers. For example...
># ''d''o this
># then that|''d'' {{{...refers to 'do this' and will therefore be given it as a tag}}}
!!Dependencies
Use nesting or tagging to create action dependencies whereas...
*items used as tags are depending on those tagging to them
*high level items depend on lower level items, like a project depends on the completion of its subactions
!!Subitems
By adding dots ( ''.'' ) to the beginning of a line, items become nested subitems, being tagged with the name of the item of the next higher level:
>$s a someday project
>''.''#f some future subaction {{{...will be tagged with 'a someday project'}}}
>''.''#f another future subaction|§6 {{{...regarding some experiments}}}
>''..''#f the future on level two {{{...sub to 'another future subaction'}}}
>''.''#d already done in advance for my someday project
>$ another next project
>''.''#action xyz {{{...you guessed it, its subitem}}}
Which items allow nesting is defined at the beginning of the sourcecode of QuickNotes. Here are the defaults:
>''$''projects may contain any of the following subitems
>>''.$''subproject
>>''.#''stage
>>''.#''action
>>''.?''contact
>''§''stages may contain... {{{...not recommended, stages should rather be tags of actions}}}
>>''.#''action
>>''.?''contact
>''#''actions may contain...
>>''.#''action
>>''.?''contact
!!More tagging
Entering tags into the tag input field of QuickNotes will also add these tags to __all__ tiddlers created via quick-add! For example, if you entered...
>{{{[[your project name in brackets]]}}}
...it will be set as a tag to all subactions, in addition to any further nesting.
''Note'': If you forget the square brackets in the example above, all items will get 5 more tags instead of the one you wanted! However, you could as well use single- or double-quotes.
!!New item with content
Every line that doesn't start with ''#'' or ''$'' will be used as the tiddler content of the item defined beforehand:
>$s my private someday project|-p {{{...is the definition line for 'my private someday project' tagged '-private-'}}}
>!Project Introduction {{{...here starts its content}}}
>*a list
>*in the project-tiddler text {{{...and here it ends}}}
>.#n my nested next science action|&sc {{{...another definition for an action tagged &science}}}
>See...http://w3.org {{{...and its content}}}
>*#with a pseudo-numbered-list {{{...can't use # directly as that is a 'definition prefix'!}}}
>*#list item number two {{{...ending here}}}
!Tips
Try not to confuse ''$ dollar'' (project) and ''§ paragraph'' (project stage).
[[quick-add|QuickNotes]] summaries...
Realms are the broadest context you can think of for your activities, assign them to projects...
Use this tag for information related to your actions, projects, contacts, etc...
!All reminders...
{{block{<<showReminders leadtime:-356...356>>}}}
@@color:#999;(only includes reminders +/- 1 year)@@/%
!info
Find more date and reminder related information via the [[calendar]] link in the [[left-topmenu|topMenuL]] or in the right [[sidebar|SideBarOptions]] ...or click on thse links.
!end%/
/%
!refreshBtn
<html><a class='refresh' title="redisplay the contents of $1" href="javascript:story.refreshTiddler('$1',null,true);return false;">refresh</a></html>
!refresh
<<tiddler scriptCollection##refreshBtn with: {{('$1'=='$'+'1')?tid=story.findContainingTiddler(place).getAttribute("tiddler"):'$1';}}>>
!tidsByTags
<script>
/***
|''Name:''|TiddlersByTags|
|''Description:''|Displays a table listing tiddlers by tags, excluding certain ones|
|''Author:''|Tobias Beer|
|''Source:''|http://tbGTD.tiddlyspot.com|
|''Version:''|1.1|
|''Date:''|2009.11.07|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Requires:''|InlineJavascriptPlugin|
***/
var ex=[],i,t,tx,xt='$1'.readBracketedList();
for(t=0;t<xt.length;t++){
tx=store.getTaggedTiddlers(xt[t]);
for(var i=0;i<tx.length;i++)ex.pushUnique(tx[i].title);
}
var out="|linkTable|k\n| tag | tiddlers |h\n";
var tags=store.getTags();
for (var tag=0;tag<tags.length;tag++) {
if (ex.contains(tags[tag][0])) continue;
var tids=store.getTaggedTiddlers(tags[tag][0]);
out+="| [["+tags[tag][0]+"]]|";
for (var t=0;t<tids.length;t++) out+="[["+tids[t].title+"]]";
out+="|\n";
}
return out;
</script>
!deleteTiddler
<script label="delete" title="click to delete $1">
var sTid='$1';
var update='$2';
var refresh='$3'!='norefresh';
if(sTid=="$"+"1"){
sTid=story.findContainingTiddler(place).getAttribute('tiddler');
if (sTid=="DeleteTiddler") return;
if (!confirm("Do you really want to delete "+sTid+"?")) return;
else refresh=false;
}
var oTid=store.getTiddler(sTid);
if (oTid==undefined){
alert("Unable to delete '$1'. Tiddler does not exist.");
return;
}
store.removeTiddler(sTid);
story.closeTiddler(sTid,true);
if (refresh) story.refreshTiddler(story.findContainingTiddler(place).getAttribute('tiddler'),null,true);
if (update!="$"+"2")story.refreshTiddler("$2",null,true);
refreshDisplay();
</script>
!miniTag
<script>
var click=function(e){
if(!e)var e=window.event;
var popup=Popup.create(this);
var tags=this.getAttribute('tags').readBracketedList();
for(var t=0; t<tags.length; t++) createTiddlyLink(createTiddlyElement(popup,"li"),tags[t],true);
Popup.show(popup,false);
e.cancelBubble=true;
if(e.stopPropagation)e.stopPropagation();
return false;
}
var title="$1"!='$'+'1'?'$1':story.findContainingTiddler(place).getAttribute('tiddler');
var tid=store.getTiddler(title);
if(tid){
var title=('$2'!='$'+'2'?'$2':'')+'\u25b6';
var exclude=('$3'!='$'+'3'?'$3':'').readBracketedList();
var tags=tid.tags;
out=[];
for(var t=0; t<tags.length; t++)if(!exclude.contains(tags[t])) out.push(tags[t]);
if (out.length>0){
addClass(place,'miniTags');
var btn=createTiddlyButton(place,title,'show tags for \''+tid.title+'\'',click);
btn.setAttribute('tags',(out.length>1?"[["+out.join(']][[')+']]':'[['+out+']]'));
}
}
</script>
!end%/
Tiddlers that relate to the design of this site...
!Think in project stages
<<tiddlerList tags:"stage" order:"title" header:'| stage | description |h' itemTemplate:"|text-align:left;!<<tag '%title'$))|<<tiddler '%title'$))|\n">>/%
!info
Use [[stages|stage]] to indicate which step in your project cycle an element relates to. See [[here|stage]] for an overview of all predefined stages and their meaning. Stages are most useful when you do specific kinds of projects on a regular basis. It is essential that stages reflect your own project flow. Therefore, do not hesitate to adjust them to suit your needs or make specific tbGTD templates for different kinds of projects.
!end%/
Tiddlers tagged with star ([[★|star]]) are currently of interest or high importance so you can retrieve them quickly. Use the star {{button{[[★|star]]}}} in the toolbar to mark a tiddler...
{{sidebarTitle{[[plugin manager:|PluginManager]]}}}
<<list filter [tag[systemConfig]]>>
disabled plugins:
<<list filter [tag[systemConfigDisable]]>>
All tiddlers powering this wiki...
<<tiddler help with: all>>
|''URL:''|http://tbGTD.tiddlyspot.com/|
|''Author:''|Tobias Beer|
|''Description:''|a tiddlywiki GTD system|
|Name|tbGtdTheme|
|Description|A theme based on ~MptwTheme ($Rev: 1829 $) with innumerable customizations |
|PageTemplate|##PageTemplate|
|ViewTemplate|##ViewTemplate|
|EditTemplate|##EditTemplate|
|StyleSheet|##StyleSheet|
!PageTemplate
<!--{{{-->
<div class="topMenu" id="topMenuR" refresh='content' tiddler='topMenuR'></div>
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<!-- horizontal MainMenu -->
<div class='topMenu' id="topMenu" macro='gradient vert [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::TertiaryDark]]'>
<span id="topMenuL" refresh='content' tiddler='topMenuL'></span>
</div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='mainMenu' refresh='content' force='true' tiddler='MainMenu'></div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
!ViewTemplate
<!--{{{-->
[[tbGtdTheme##Viewtemplatetoolbar]]
<div class="tagglyTagged" macro="tags"></div>
<div class='titleContainer'>
<span class='title' macro='view title'></span>
<span macro="miniTag"></span>
</div>
<div class='subtitle'>
(updated <span macro='view modified date {{config.options.txtPrettyDates?config.options.txtPrettyDates:"YYYY-0MM-0DD"}}'></span> by <span macro='view modifier link'></span>)
<!--
(<span macro='message views.wikified.createdPrompt'></span>
<span macro='view created date {{config.options.txtPrettyDates?config.options.txtPrettyDates:"YYYY-0MM-0DD"}}'></span>)
-->
</div>
<div class='viewer' macro='view text wikified'></div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<div class='toolbar toTop' style='line-height:100%;margin-top:.5em;'><a href="javascript:;"
onclick="window.scrollTo(0,ensureVisible(story.findContainingTiddler(this)));return false;"
onmouseover="this.title='scroll to top of '+story.findContainingTiddler(this).getAttribute('tiddler')">▲</a>
</div>
<!--}}}-->
!Viewtemplatetoolbar
<!--{{{-->
<div class='toolbar'>
<span macro="tiddler {{var v=store.getValue(tiddler,'need');v?v:'';}}"></span>
<span style="padding:1em;"></span>
<span macro="tTag tag:star mode:text text:★" style="padding-top:0.2em;"></span>
<span macro="xtab button defaults:true position:first" style="margin:0 0 0 10px;"></span>
<span macro="xplore button:true toolbar:true exclude:GET==x-plore##exclude truncate:GET==x-plore##truncate class:'borderless'"></span>
<span macro="xtagger source:'x-tagger config##Tags' exclude:'' label:'x-tag' tooltip:'Set GTD related tags' more:'x-tagger config##More'" style="margin-right:20px;"></span>
<span macro='newHere label:"new"'></span>
<span macro='toolbar [[ToolbarCommands::ViewToolbar]]'></span>
<span macro='newReminder' class='reminder'></span>
</div>
<!--}}}-->
!EditTemplate
<!--{{{-->
<div class="toolbar" macro="toolbar [[ToolbarCommands::EditToolbar]]"><span macro='popup [[info on formating]] [[<<tiddler formating$))]] "" helpPopup' style='margin-right:30px;'></span></div>
<div class="title" macro="view title"></div>
<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>
<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>
<div class='editorFooter' macro='deliciousTagging'><span class='tagChooser' title='set tiddler tags' macro='tagChooser'></span></div>
<div macro='annotations'></div>
<div class="editLabel">Content</div><div class="editor" macro="edit text"></div>
<!--}}}-->
!StyleSheet
/*{{{*/
body{background: [[ColorPalette::TertiaryDark]];}
#backstageButton a{color:[[ColorPalette::TertiaryLight]];padding-left:10em;}
#backstageButton a:hover{color:[[ColorPalette::Background]];background:transparent;}
#backstageToolbar{text-align:center;}
#messageArea{position:absolute;top:0.3em;left:38%;padding:0.7em 1%;width:25%;border:2px solid [[ColorPalette::TertiaryLight]];-moz-border-radius:3px; -webkit-border-radius:3px;background:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::TertiaryMid]];}
#messageArea .messageToolbar{display:block;float:right;padding:0.1em;text-align:right;width:30px;}
#messageArea a, #messageArea .button{background:transparent;text-decoration:none;color:[[ColorPalette::Background]];}
#messageArea a:hover{color:[[ColorPalette::Foreground]];}
.headerShadow{padding: 1em 1em 0;font-family: 'Baskerville, Verdana, Trebuchet MS' sans-serif;font-weight:bold;}
.headerShadow, .headerShadow .siteSubtitle, .headerShadow .tiddlyLink{color: [[ColorPalette::TertiaryPale]];}
.headerShadow .tiddlyLink:hover{color:[[ColorPalette::SecondaryMid]];}
.subtitle{padding:0px;margin:0px;padding-left:1em;font-size: 90%;color: [[ColorPalette::TertiaryMid]];}
.subtitle .tiddlyLink{color: [[ColorPalette::TertiaryMid]];}
.topMenu{background-color:transparent;color:[[ColorPalette::PrimaryPale]];}
.popup .popBtn .button, .topMenu .button, .topMenu .tiddlyLink{font-weight:bold;margin:0 0.5em;padding:3px 1px;color:[[ColorPalette::PrimaryPale]];background:transparent;font-size:115%;border:0 !important;}
.popup .popBtn .button{font-size:100%;margin:0 3px;}
.popup .popBtn .button:hover, .topMenu .button:hover, .topMenu .tiddlyLink:hover{color: [[ColorPalette::SecondaryMid]];background:transparent;}
#topMenu{width:100%;padding:0.3em 0;}
#topMenuL br, #topMenuR br{display:none;}
#topMenuL{float:left;margin-left:0.5em;height:25px;}
#topMenuR{display:block;position:absolute;right:0em;z-index:11;height:25px;color:[[ColorPalette::TertiaryMid]];min-width:10%;float:right;top:4.9em;}
#topMenuClear{clear:both;width:100%;height:1px;border:0px;margin:0px;padding:0px;}
#toggleLeftSideBar{position:absolute;top:5px;left:5px;z-index:999;left:40;color:[[ColorPalette::Background]];}
#toggleLeftSideBar a{color:[[ColorPalette::Background]];background:none;border:0;}
#toggleLeftSideBar a:hover{background:none;border:0;}
#mainMenu{padding:10px 0 0 0;margin-top:-10px; width:8.1em; background:[[ColorPalette::PrimaryMid]]; -moz-border-radius:5px; -webkit-border-radius:5px;border:0; border-right: 5px solid [[ColorPalette::PrimaryMid]]; border-bottom: 5px solid [[ColorPalette::PrimaryMid]];text-align:left;z-index:0;}
#mainMenu ul{list-style:none;padding:0;margin:0px;}
#mainMenu li{clear:both;}
#mainMenu a{padding-left:5%;width:95%;margin-top:-1px;border-bottom:1px solid [[ColorPalette::Foreground]];border-top:1px solid [[ColorPalette::Foreground]];color:[[ColorPalette::PrimaryPale]];display:block;}
#mainMenu a:hover{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::TertiaryDark]];}
#mainMenu ul ul{margin-bottom:30px;}
#mainMenu .accordion ul li .button, #mainMenu .accordion ul li .button:hover ,
#mainMenu .accordion ul li .quickopentag .button,
#mainMenu .accordion ul li .quickopentag .button:hover {border:0 none;float:left;padding:0 3%;text-align:center;width:10%;font-size:11px;}
.popup .quickopentag .button {border-color:transparent;}
#mainMenu .accordion ul li .quickopentag .tiddlyLink{border:0;float:left;padding:0 0 0 1%;width:67%;color:[[ColorPalette::SecondaryLight]];}
#mainMenu .accordion ul li .quickopentag .tiddlyLink:hover {text-decoration:underline;color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
#mainMenu .noCopy{color:[[ColorPalette::TertiaryDark]];border-top:none;}
#mainMenu .main{padding:1px 0 1px 5px;}
.xtagger .quickopentag .tiddlyLink:hover {text-decoration:underline;color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
.xtagger .quickopentag .tiddlyLink{font-size:110%;border:0;padding:0 0 0 1%;display:inline;color:[[ColorPalette::SecondaryLight]];}
#sidebar{margin:-10px 0 0 0;padding:14px 0 5px 0; background:[[ColorPalette::PrimaryMid]]; -moz-border-radius:5px; -webkit-border-radius:5px;border:0; border-left: 5px solid [[ColorPalette::PrimaryMid]]; border-bottom: 5px solid [[ColorPalette::PrimaryMid]];width:17.6em;right:0;}
#sidebarTabs{margin:1em 0 0 0.5em;}
#sidebar .button{border-style:none;padding:2px 8px 2px 2px;}
#sidebar .button:hover{color:[[ColorPalette::SecondaryMid]];}
#sidebar br{display:none;}
#sidebar hr{height:0;border:0;border-bottom:1px solid [[ColorPalette::Foreground]];}
#sidebar li a{display:block;}
#sidebar a{color:[[ColorPalette::TertiaryPale]];}
#sidebar .tiddlyLinkNonExisting{color:[[ColorPalette::TertiaryLight]];}
#sidebar .highlight, #sidebar .marked, #sidebar a:hover{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::Foreground]];}
#sidebar .tabset{margin-bottom:2px;padding:0.5em 0 0 0 !important}
#sidebar .tabset .tab {padding:3px;font-size:9px;font-weight:bold;height:16px;background-color:[[ColorPalette::Foreground]];color:[[ColorPalette::TertiaryLight]];display:inline;border:0;border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
#sidebar .tabset .tab:hover{background-color:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::Background]];}
#sidebar .tabset .tabSelected{color:[[ColorPalette::SecondaryMid]];background:[[ColorPalette::TertiaryDark]];}
#sidebar .tabContents{background-color:[[ColorPalette::PrimaryMid]];border:0;border-top:1px solid [[ColorPalette::TertiaryDark]];color:[[ColorPalette::Background]];}
#sidebar .tagCloudtag, #sidebar #TOCMenu{display:inline;}
#sidebar .tabContents .tabset, #sidebar .tabContents .tabContents{padding:0;margin-left:-0.5em;}
#sidebar .tabContents .tabContents {padding-top:5px;margin-left:0.2em;}
#sidebar .tabContents .sideBarTags ul .tiddlyLink{padding:1px 0;width:88%;float:right;}
#sidebar .tabContents .sideBarTags .button{width:8%;padding:1px 1%;text-align:center;float:left;}
#sidebar .sidebarTitle a{display:block;font-size:110%;border-bottom:1px solid [[ColorPalette::Foreground]];font-weight:normal;}
#sidebar .TOC{padding:0;}
#sidebar .TOCList{padding:0;margin-top:3px;display:block;}
#sidebar .TOCList, #sidebar .TOCList option{border:[[ColorPalette::PrimaryMid]];background:[[ColorPalette::PrimaryMid]];color:[[ColorPalette::Background]];}
#sidebar .TOCList option:hover{background:[[ColorPalette::Foreground]];color:[[ColorPalette::SecondaryMid]];}
#searchResults{padding:1em;border: 1px solid [[ColorPalette::TertiaryLight]];margin:0;right:0.5em;position:absolute;background:[[ColorPalette::Background]];min-width:30%;max-width:40%;z-index:1000;}
#searchResults ul{max-height:150px;overflow:auto;}
#searchResults h1{clear:both;}
#searchResults ul{margin: 0.5em;padding-left:1.5em;}
#searchResults li{list-style-type:circle;}
#search_open,
#search_close{display:block;float:right;padding:5px 10px;width:70px;margin:5px 10px 10px 0px;text-align:center;border: 1px solid [[ColorPalette::TertiaryLight]];}
#searchResults .tiddlyLink{display:block;}
#tiddlersBar{margin-top:0px;padding-top:0px;}
.toolbar{float:right;}^
.toolbar .tiddlyLinkExisting{font-weight:normal;}
.toolbar{visibility:hidden;}
.selected .toolbar{visibility:visible;}
#displayArea{margin: 0.5em 17.1em 0em 10.1em;}
.tiddler{background:[[ColorPalette::Background]];border:3px solid [[ColorPalette::Background]];-moz-border-radius:3px; -webkit-border-radius:3px;border-right: 2px [[ColorPalette::TertiaryMid]] solid;border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;margin-bottom: 1em;padding:1em 2em 2em 1.5em;}
.viewer{clear:both; POSITION: relative;color:[[ColorPalette::TertiaryDark]];padding-bottom:3px;}
.title, .titleContainer .miniTag{font-size: 250%;color: [[ColorPalette::PrimaryLight]];font-family: 'Baskerville, Verdana,Trebuchet MS' sans-serif;}
.editor textarea, .editor input{font-family: 'Consolas' monospace;background-color:[[ColorPalette::TertiaryPale]];}
.editorFooter{line-height:1.6em;}
.tagChooser{font-weight:bold;font-size:120%;}
h1,h2,h3,h4,h5,h6{background-color: transparent;color: [[ColorPalette::Foreground]];}
.toTop a:hover{background:transparent;}
#addReminderForm{clear:both;}
.clearDiv{clear:both; margin:0px; padding:0px; width:100%; height:1px;}
.toolbar a.on{color:orange;background-color:[[ColorPalette::Background]];}
#popup {padding:3px;}
.popup li,.popup ul,.popup ol,.popup span li,.popup span ul,.popup span ol {list-style:none !important;margin:0px !important;padding:0px !important;}
#popup tr.fieldTableRow td{padding:1px 3px 1px 3px;}
#popup div{color:[[ColorPalette::SecondaryMid]];text-decoration:underline;}
ol.popup{border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryMid]] [[ColorPalette::PrimaryDark]]; -moz-border-radius:3px; -webkit-border-radius:3px;}
.popup{background:[[ColorPalette::PrimaryMid]];}
.popup br{display:none;}
.popup ul li .button{padding:0.4em;display:block;}
.popup hr{padding:0;margin:0;border:0;}
.popup a, ol.popup li a, .popup ul li .button, .popup .menuH .button, .popup li a:visited{background:transparent;color:[[ColorPalette::TertiaryPale]];}
.popup a:hover, ol.popup li a:hover{background:[[ColorPalette::TertiaryDark]];color:[[ColorPalette::SecondaryMid]];}
.popup h1, .popup h2, .popup h3, .popup hr{border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.popup h1, .popup h2, .popup h3, .popup h4, .popup h5, .popup{background:[[ColorPalette::Foreground]];color:[[ColorPalette::Background]];}
.popup .menuH{display:block;margin:0.5em 0 0 3px;padding:0;font-size:1.4em;font-weight:bold;border-bottom:1px solid [[ColorPalette::TertiaryDark]];min-width:250px;}
.helpPopup{font-size:120%;font-family:overflow:none;overflow-y:scroll;height:400px;font-family:'Verdana,sans-serif';}
td, tr{vertical-align:top;}
.viewer table,table.twtable{margin:0;border-collapse:collapse;border:1px solid [[ColorPalette:TertiaryMid]];}
.viewer table, table.twtable, .viewer td, .viewer tr, .twtable td, .twtable tr,
.viewer th, .viewer thead td, .twtable th, .twtable thead td{border:1px solid [[ColorPalette:TertiaryMid]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td{font-weight:bold;}
.viewer th .tiddlyLink, .viewer th .tiddlyLinkExisting, .viewer th .externalLink,
.viewer thead .tiddlyLink, .viewer thead .tiddlyLinkExisting, .viewer thead .externalLink{color:[[ColorPalette::Foreground]];}
.viewer th .tiddlyLink:hover, .viewer th .tiddlyLinkExisting:hover, .viewer th .externalLink:hover,
.viewer thead .tiddlyLink:hover, .viewer thead .tiddlyLinkExisting:hover, .viewer thead .externalLink:hover{color:[[ColorPalette::Background]];}
.linkTable .quickopentag .tiddlyLinkExisting,.linkTable .quickopentag .externalLink{display:inline;}
.noborder, .noborder table, .noborder td, .noborder tr, .noborder th, .noborder tbody { border:0 !important;margin:0 !important;}
.noborder tbody td{padding:1px 4px 1px 2px;}
#sidebarOptions .black .calendar{text-align:center;margin:0 auto;}
.black{display:inline-block;color:[[ColorPalette::TertiaryMid]];}
.black table{border:0 !important;}
.viewer .black{border:10px solid [[ColorPalette::PrimaryMid]];-moz-border-radius:10px; -webkit-border-radius:10px;}
.black, .black table, .black th, .black tr, .black td{background:[[ColorPalette::PrimaryMid]];padding:0 !important;border:0;}
.black .calendar td{border:1px solid [[ColorPalette::PrimaryMid]] !important;border-collapse:collapse;}
.black .calendar .weekNo{font-style:normal;color:[[ColorPalette::TertiaryMid]];border-left:5px solid [[ColorPalette::PrimaryMid]];border-collapse:collapse;}
.black .calendar a,.black .calendar td .button{padding:2px 3px !important;margin:0;color:[[ColorPalette::TertiaryPale]];display:block;}
.black .calendar td .button{color:[[ColorPalette::TertiaryMid]];}
.black .tiddlyLinkNonExisting, .black .tiddlyLink, .black .button{background:transparent;border:transparent;fonts-style:normal;}
.black .calendarMonthname,
.black .calendarMonthname .tiddlyLink{color:[[ColorPalette::TertiaryMid]];font-style:normal;}
.black .calendarMonthname .tiddlyLink:hover, .black .tiddlyLink:hover, .black .button:hover{color:[[ColorPalette::SecondaryMid]];}
.black br{display:none;}
.viewer iframe{width:100%;height:450px;border:1px solid [[ColorPalette::TertiaryMid]];-moz-border-radius:3px; -webkit-border-radius:3px;}
.viewer .tiddlyLink, .viewer .tiddlyLinkExisting, .viewer .externalLink{border-bottom:1px solid transparent;border-top:1px solid transparent;color:[[ColorPalette::TertiaryDark]];}
.tiddlyLink:hover, .tiddlyLinkExisting:hover, .externalLink:hover{color:[[ColorPalette::SecondaryMid]];background:transparent;border-bottom-color:[[ColorPalette::SecondaryPale]];border-top-color:[[ColorPalette::SecondaryPale]];}
.block .tiddlyLink, .remind .tiddlyLink{padding: 0 3px;}
.block .tiddlyLink,
table.linkTable .tiddlyLinkExisting, table.linkTable .externalLink{display:block;padding-left:0.7em;}
table.linkTable .tiddlyLinkExisting{text-decoration:none;}
.block .tiddlyLink:hover,.remind .tiddlyLink:hover,
table.linkTable .tiddlyLinkExisting:hover, table.linkTable .externalLink:hover{}
.remind{padding:2px 5px;border:3px solid transparent;-moz-border-radius:3px; -webkit-border-radius:3px;}
.remind:hover{background:#f6f6f6;border-color:#f6f6f6;}
.vTabs .tabset {float:left;display:block;padding:0px;margin-top:5px;min-width:15%;}
.vTabs .tabset .tabset {margin-top:0px;}
.vTabs .tabset .tabSelected {color:[[ColorPalette::SecondaryDark]];background:[[ColorPalette::TertiatyMid]];font-weight:bold;text-decoration:underline;}
.vTabs .tabset .tab {display:block;text-align:right;padding:2px 5px; margin:0 1px 1px 0;background:transparent;border:0;color:[[ColorPalette::SecondaryMid]];}
.vTabs .tabset .tab:hover {background:[[ColorPalette::SecondaryMid]];color:[[ColorPalette::Background]];}
.vTabs .tabContents {margin-left:15%;max-width:85%;padding:0 10px 5px 10px;background:transparent;border:none;border-left:1px solid [[ColorPalette::TertiaryLight]];}
#annowrap {padding:0;margin:0;border:0;}
#annowrap .popup{display:block;min-width:100px;max-width:300px;font-size:100%;}
#annowrap .popup br {display:block !important;}
#annowrap .popup h1, .anno .popup h2{color:[[ColorPalette::TertiaryLight]];}
.annosub{cursor:pointer;padding:0px 1px 0px 3px;}
.annosub span{padding:0px 1px 0px 3px;}
.annosubover{color:[[ColorPalette::SecondaryDark]];cursor:pointer;}
.annosubover span{background-color:[[ColorPalette::SecondaryPale]];padding:0px 1px 0px 3px;}
.desk .annosub {color:[[ColorPalette::TertiaryDark]];}
.desk .view {display:block;float:left;padding:0 5px;}
.desk table .button{padding:1px 3px;border-color:transparent;font-weight:bold;}
.desk .block .noborder td{padding:0 1px 0 0;}
.desk .block .quickopentag .tiddlyLink{padding:1px 1%;width:92%;float:left;}
.desk .block .miniTags .button, .desk .block .quickopentag .button{width:4%;padding:1px 1%;text-align:center;float:left;font-size:14px;}
.desk .block .miniTags .button{width:96%;float:left;font-size:10px;}
.deskNew span{display:inline-block;width:75px;}
.miniTags .button{margin:0 2px;border:0;}
.topMenu .pL .button{padding-left:25px;}
.topMenu .pR .tiddlyLink{padding-right:25px;}
.viewer .marked {padding:0 2px;}
#tbHelp .tabContents{min-height:150px;}
@media print{
#topMenu, #topMenuR, #tiddlersBar{display: none ! important;}
.headerShadow{visibility: hidden ! important;}
.tiddler{border-style: none ! important;margin:0px ! important;padding:0px ! important;padding-bottom:2em ! important;}
.tagglyTagging .button, .tagglyTagging .hidebutton{display: none ! important;}
.tagglyTagged .quickopentag, .tagged .quickopentag{border-style: none ! important;}
.quickopentag a.button, .miniTag{display: none ! important;}
}
/* get user styles specified in StyleSheet */
[[StyleSheet]]
/*}}}*/
|linkTable|k
|width:400px; !by modified date |width:400px; !by date created |
|vertical-align:top;padding-left:20px;<<timeline "modified">>|vertical-align:top;padding-left:20px;<<timeline "created">>|
<<toggleSideBarTB left show>>|<<popup ★ [[<<tiddler topMenuL##star$))]]>>|[[desk|desk]]|<<popup journal [[<<tiddler topMenuL##journal$))]]>>|<<popup new [[<<tiddler topMenuL##new$))]]>>|<<popup next [[<<tiddler topMenuL##next$))]]>>|<<popup calendar [[<<tiddler topMenuL##calendar$))]]>>|{{pR{[[+|QuickNotes]]}}}/%
!star
{{menuH{list of starred tiddlers}}}
<<tiddlerList tags:"star" itemTemplate:"*%0 \n" -modified">>
!next
{{menuH{list of next actions}}}
<<tiddlerList tags:"#next" itemTemplate:"*%0 \n" -modified">>
!calendar
{{menuH{this month's [[calendar]] & list of [[reminders|reminder]]}}}
<<tiddler calendar>>
!journal
<<tiddlerList tags:"journal" top:"10" dateFormat:"ddd. 0DD" itemTemplate:"*[[%created - %title|%title]] \n" group:"tiddler.created.formatString('YYYY, MMM')" groupTemplate:"!!!%group \n" order:"-created">>
{{menuH{[[journal]] options}}}
*<<newJournal "YYYY-0MM-0DD" label:"write new article" focus:title prompt:"Write a new journal entry for today" tag:journal>>
*[[see all articles|journal]]
!new
{{menuH{add new content...}}}
*[[new quick note|QuickNotes]]
*<<newTiddler label:"new tiddler">>
*<<newTiddler label:"new next action" title:"new action" prompt:"create a new next action" focus:title tag:#next>>
*<<newTiddler label:"new active project" title:"new project" prompt:"create a new active project" focus:title tag:$active>>
*<<newJournal "YYYY-0MM-0DD" label:"new journal entry" focus:title prompt:"Write a new journal entry for today" tag:journal>>
*<<newTiddler label:"new reminder" title:"new reminder" prompt:"create a new reminder" focus:title tag:reminder text:{{store.getTiddlerText("templateNewReminder")}}>>
----
*<<newTiddler label:"new reference" title:"new reference" prompt:"create a new reference" focus:title tag:reference>>
*<<newTiddler label:"new action type" title:"#new action type" prompt:"create an action type" focus:title tag:action>>
*<<newTiddler label:"new project type" title:"$new project type" prompt:"create a new project type" focus:title tag:project>>
*<<newTiddler label:"new project stage" title:"§new project stage" prompt:"create a new project stage" focus:title tag:stage>>
*<<newTiddler label:"new contact group" title:"?new contact group" prompt:"create a new contact group" focus:title tag:contact>>
*<<newTiddler label:"new context" title:"@new context" prompt:"create a new context" focus:title tag:context>>
*<<newTiddler label:"new area" title:"&new area" prompt:"create a new area" focus:title tag:area>>
!end%/
{{pL{<<closeAll>><<rB x>>}}}[[help]]|<<popup options [[<<tiddler topMenuR##options$))]]>> <<gotoTiddler inputstyle:"display:inline;border:1px solid #ccc;padding:0px;width:150px;z-index:0;margin-left:5px;" liststyle:"display:block;position:absolute;right:2.5em;top:1.7em;z-index:10;border:1px solid #ccc;padding:0;width:auto;display:none;">><<toggleSideBarTB right show>>/%
!options
*<<permaview>>
*<<saveChanges save>>
----
*[[archive]]
*[[reference]]
*[[quick-notes|QuickNotes]]
*[[x-tab config]]
*[[x-tagger config]]
----
*[[more options...|options]]
!end%/
~TiddlyWiki has now been translated into over 20 languages - see the [[translation page at TiddlyWiki.org|http://trac.tiddlywiki.org/wiki/Translations]] for more details.
<html><iframe src="http://www.twittergadget.com/gadget.asp"></iframe></html>
/***
|''Name:''|x-plore|
|''Description''|Explore tiddler relations|
|''Version:''|0.1|
|''Type''|macro|
|''Author:''|[[TobiasBeer]]|
|''Source:''|http://tbGTD.tiddlyspot.com/#x-plore|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Note''|idea and parts of the code have their roots in [[RelatedTiddlersPlugin|http://tiddlytools.com/#RelatedTiddlersPlugin]]|
!important
<<tiddler 'under development'>>
!configuration
Use the following sections in [[x-plore]] to define elements...
*not to be explored via ''exclude''
*to be cut of via ''truncate''
!exclude
star
!truncate
excludeLists
systemConfig
TAG==site
!help
<<tiddler {{t='x-plore info';store.getTiddler(t)?t:'x-plore::helplink'}}>>/%
helplink:For more information see or import [[x-tab info]] from [[tbGTDServer]]...
%/
!source code
***/
//{{{
config.macros.xplore={
skipped:' ...',
lblBtn:'x-plore'+(document.all?"▼":"▾"),
topBtn:'Explore tiddler relations',
lblTagging:'!!tagged by',
lblTags:'!!tagging to',
lblRefs:'!!referenced by',
lblLinks:'!!linking to',
styles:
'#popup #xplore div {text-decoration:none;padding:7px;min-width:136px;_width:180px;}'+
'#popup #xplore div a {padding:2px;white-space:nowrap;font-weight:normal;display:block;}'+
'#popup #xplore blockquote {padding-left:3px;margin:0;}'+
'#popup #xplore blockquote blockquote {border-left:1px solid #333;margin:0 0 0 10px;}'+
'#popup #xplore blockquote a {_width:90%;}'+
'#popup #xplore h2 {border:0;margin-top:0.5em;}'+
'#popup #xplore td {border:1px solid transparent !important;padding: 0 5px 5px 5px !important;}'+
'#popup #xplore td:hover{border:1px solid #333 !important;}'+
'#popup #xplore div br {display:none;}',
handler:function(place,macroName,params,wikifier,paramString,tiddler){
var p,btn,cls,ex,fst,min,mode,tb,tid,tit,tree,trunc,r;
tid=story.findContainingTiddler(place);
tit=tid?tid.getAttribute('tiddler'):'';
p=paramString.parseParams(null,null,true);
btn=getParam(p,'button','')=='true';
tb=getParam(p,'toolbar','')=='true';
if(btn&&tit){
btn=createTiddlyButton(place,this.lblBtn,this.tipBtn,this.click,"button","xploreBtn");
btn.setAttribute('tiddler',tit);
btn.setAttribute('params',paramString);
if(tb)btn.setAttribute('toolbar',true);
return;
}
fst=getParam(p,'first',tit);
cls=getParam(p,'class','');
tree=getParam(p,'tree','true')=='true';
var getArr=function(prm){//retrieve array from tiddler text
var a=getParam(p,prm,'').readBracketedList(),f=a[0],i,i1,t,x,s=[];
if(f&&f.substr(0,5).toUpperCase()=='GET=='){
t=store.getTiddlerText(f.substr(5));
if(s){
a=t.readBracketedList();
for(i=0;i<a.length;i++){
f=a[i];
if(f&&f.substr(0,5).toUpperCase()=='TAG=='){
a.splice(i,1);
x=store.getTaggedTiddlers(f.substr(5));
for(i1=0;i1<x.length;i1++)s.pushUnique(x[i1].title);
}
}
for(i=0;i<s.length;i++)a.pushUnique(s[i]);
a.sort();
}
}return a;
}
ex=getArr('exclude');
trunc=getArr('truncate');
r=getParam(p,'root','')=='true';
min=getParam(p,'minimal','')=='true';
mode=getParam(p,'mode','');
if(mode!=''){
if(this['get'+mode]==undefined)mode='Tagging';
wikify(this['lbl'+mode]+'\n'+this.list(fst,tree,trunc,ex,this['get'+mode],r,min),place);
}else{
wikify('|'+cls+'|k\n|||||',place);
var tds=place.lastChild.getElementsByTagName('td');
wikify(this.lblTagging+'\n'+this.list(fst,tree,trunc,ex,this.getTagging,r,min),tds[0]);
wikify(this.lblTags+'\n'+this.list(fst,tree,trunc,ex,this.getTags,r,min),tds[1]);
wikify(this.lblRefs+'\n'+this.list(fst,tree,trunc,ex,this.getRefs,r,min),tds[2]);
wikify(this.lblLinks+'\n'+this.list(fst,tree,trunc,ex,this.getLinks,r,min),tds[3]);
}
},
list:function(first,asTree,trunc,ex,get,r,min){
//first: tree root tid, asTree: tree <> list, trunc: [[tids]] [[limiting]] the tree
//ex: exclude tagged tids, r: display root, min: true=min spanning tree <> false=multiple pathes for 'nodes'
//get: fct getXYZ(tiddlerObj){return arrayOfTiddlerTitles;}
// ...possibly one of getLinks, getRefs, getTags, getTagging (see below)
var out,tids=[],tree={text:''},indent='',paths=min?undefined:[];//init sublists []
tids=this.search(first,tids,tree,indent,trunc,ex,get,r,paths);//start recursion
setStylesheet(this.styles,'xploreStyles');
out= '{{xploreList{\n';
if(asTree)out+=tree.text;//when tree return tree
else if(tids.length>0)out+='[[' + tids.join(']][[')+']]';//when list, join as links
return out+'}}}';
},
search: function(tid,tids,tree,indent,trunc,ex,get,r,paths,p,fst){
//trunc, ex, get, r, paths: dito
//tid: start tid, tids: searched tids[], tree: output tree
//indent: curr indent lvl, paths: all found paths[],p: current path in paths
var t=store.getTiddler(tid);//root tid of branch
var ini=false;
var b=(paths!=undefined); //multiple paths
if(b&&p==undefined){//if so and sublist not paths
p=0;paths[p]=[];ini=true; //init pointer, sublist and store init
}
if(fst==undefined)fst=tid;//check & store fst
//return curr list, if missing, excluded via tag or already in (sub-)list
if(!t||tid==fst&&tids.length>0||t.tags.containsAny(ex)||b&&paths[p].contains(t)||!b&&tids.contains(tid))return tids;
//if not init of multiple paths or rootnode to be displayed... add to sublist
if(!ini||r){
if(b)paths[p].push(t);
tids.push(t.title); //add tiddler to results
var skip=trunc&&trunc.contains(tid); //skip when in truncated
tree.text+=indent+"[["+tid+(skip?this.skipped.format([tid]):"")+"|"+tid+"]]"+"\n";
if(skip)return tids; // branch is pruned... don't follow links
}
var links=get?get(t):this.getTagging(t);//get next level via get fct or links
//init subpaths by copying the current one
if(b)for(var i=1;i<links.length;i++)paths[p+i]=paths[p].slice(0);
for(var i=0; i<links.length; i++)//search subnodes
tids=this.search(links[i],tids,tree,indent+">",trunc,ex,get,r,paths,(p?p+i:p),fst);
return tids;//return list
},
getLinks:function(t){if(!t.linksUpdated)t.changed(); return t.links;},
getRefs:function(t){
var i,o=[],r=store.getReferringTiddlers(t.title);
for(i=0;i<r.length;i++)if(r[i].title!=t.title)o.push(r[i].title);
return o;
},
getTags:function(t){return t.tags;},
getTagging:function(t){
var o=[],l=store.getTaggedTiddlers(t.title);
for(var i=0;i<l.length;i++)if(l[i].title != t)o.push(l[i].title);
return o;
},
click:function(e){
e=e||window.event;
var p=Popup.create(this);
wikify('<<xplore first:\''+this.getAttribute('tiddler')+'\''+this.getAttribute("params")+' >>',createTiddlyElement(p,'span','xplore','xplore'));
Popup.show(p,false);
s=document.getElementById('sidebar');
if(this.getAttribute('toolbar')){p.style.left='';p.style.right=(20+(s?s.offsetWidth:0))+'px';}
e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation();
return false;
}
}
//}}}
/***
<<xtab defaults:true>>
|''Name''|x-tab|
|''Description''|a crosstable for tags|
|''Version''|1.0|
|''Type''|macro|
|''Author''|[[TobiasBeer]]|
|''Source''|http://tbGTD.tiddlyspot.com/#x-tab|
|''Documentation''|http://tbGTD.tiddlyspot.com/#%5B%5Bx-tab%20info%5D%5D|
|''License''|[[Creative Commons Attribution-Share Alike 3.0|http://creativecommons.org/licenses/by-sa/3.0/]]|
!Code
***/
//{{{
setStylesheet('.xtabBtn{cursor:pointer}'+
'.xtab{margin:5px 0 20px 0;background:#F6F6F6;padding:10px;border:5px solid #EEE;-moz-border-radius:5px;-webkit-border-radius:5px;}'+
'.xtabFrm td{vertical-align:bottom;height:30px;margin-right:10px !important;}'+
'.xtabFrm em{margin-left:10px;font-style:normal;color:#39C;font-weight:bold;font-size:90%;}'+
'.xtabFrm input{margin-left:10px;}.xtabFrm input,.xtabFrm span{cursor:pointer;}.xtabFrm .externalLink{margin-left:10px;}'+
'.xtabFrm select{padding-right:0 !important;width:210px;cursor:pointer;float:right;}'+
'.xtabFrm xtabToggle{display:inline-block;width:65px;text-align:center;cursor:pointer;margin-right:10px;}'+
'.xtabPrv{color:#888;margin:5px 0 10px 50px;display:block;}.xtabPrv span{color:#39C;}'+
'.xtabOut {max-width:100%;overflow-y:hidden;}'+
'.viewer .xtabOut .button{margin:0;}','StyleSheetGTDxLookup');
//}}}
//{{{
config.macros.xtab={
cfg:{
//defaults: 0=taglist, 1=presetlist, 2=autodetect-config, 3=preset
defaults:['x-tab config##Tags','x-tab config##Presets','x-tab config##Detect','xtab'],
dropClass:'button',
resultTabClass:'',
miniTag:'<<tiddler scripts##miniTag with: [[%0]]>>',
addNew:true,
headerRightFrom:10,
//preset identifiers
pRows:'rows',
pCols:'cols',
pSec:'snd',
pOps:'options',
pOpAL:'ALLTAGS!',
pOpSR:'1row',
pOpSC:'1col',
pOpTR:'transpose',
//language
info:'info',
btnShow:"x-tab",
btnHide:"hide x-tab",
btnTip:"toggle x-tab panel",
template:"preset template... ",
noTags:"No valid tags provided for x-tab. ",
nOkTags:"Invalid taglist for x-tab! '%0' could not be found.",
nOkPresets:"Invalid presets for x-tab! '%0' could not be found.",
nOkPreset:"Invalid x-tab preset! No option '%0' in dropdown '%1'. Check your custom fields or parameters.",
nOkRender:"Could not render x-tab into %0. No such dom-element!",
nOkDetect:"Invalid x-tab parameter '%0' for 'detect'!",
nOkField:"x-tab can't find field '%0' for tiddler '%1'.",
nDef:"undefined",
P:["preset:","select a preset","select preset..."],
R:["rows:","select a category tag for rows","select rows tag..."],
C:["columns:","select a category tag for columns","select columns tag..."],
S:["secondary:","select secondary for rows (first select a tag-category for rows)","select secondary..."],
TR:["transpose","click to swap rows and columns"],
SR:["1row","use the tag in 'rows' or 'secondary' directly instead of its subtags"],
SC:["1col","use the tag in 'columns' directly instead of its subtags"],
AL:["all tags","use all available tags for dropdowns"],
PT:["template","provides a template which you can use to add to your list of preset definitions"]
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
this.cfg.drop=document.all?"▼":"▾";
var el,id,ps=paramString,b=params[0];
id=new Date().getTime()+(''+Math.random()).substr(5);
if(b&&b.toUpperCase().indexOf('BUTTON')==0){//button must be first!
el=createTiddlyButton(place,this.cfg.btnShow+this.cfg.drop,this.cfg.btnTip,this.toggle,'button xtabBtn');
jQuery(el).attr({'tiddler':b.substr(7),'params':ps,'xtabid':id});//set tiddler for button@tiddler
}else this.create(id,ps,place);
},
toggle:function(e){
var c,f,h=false; //h=hide, f=form, x=macro
x=config.macros.xtab,c=x.cfg;
f=document.getElementById('xtab'+this.getAttribute('xtabid')||'');
if(f){//form exists -> toggle
h=f.style.display!='none';
f.style.display=h?'none':'block';
}else x.create(this);
this.innerHTML=(h?c.btnShow:c.btnHide)+c.drop;
return false;
},
update:function(id){
var a1,a2,al,by,c,chk,cols,d1,d2,el,f,hc,hd,hd2='',hr,nu,o,out='',pr,rows,sc,sr,snd,t,ti,t1,t2,tr,v,v1,v2,x=config.macros.xtab,c=x.cfg;
by=function(i){return document.getElementById(i);}
f=by('xtabFrm'+id);el=by('xtabOut'+id);pr=by('xtabPrv'+id);
removeChildren(el);removeChildren(pr);
sr=by('SR'+id).checked;
sc=by('SC'+id).checked;
tr=by('TR'+id).checked;
al=by('AL'+id).checked;
snd=by('snd'+id);
cols=by('cols'+id);
rows=by('rows'+id);
d1=snd.selectedIndex>0?snd:by('rows'+id);
d2=by('cols'+id);
if(tr){v=d1;d1=d2;d2=v;}
v1=d1.selectedIndex==0?null:d1.value;
v2=d2.selectedIndex==0?null:d2.value;
if(v1&&v2){
a1=sc&&tr?[store.getTiddler(v1)]:(sr&&!tr?[store.getTiddler(v1)]:store.getTaggedTiddlers(v1));
a2=sc&&!tr?[store.getTiddler(v2)]:(sr&&tr?[store.getTiddler(v2)]:store.getTaggedTiddlers(v2));
hc='\u25bc'+v1;if(sc&&tr||sr&&!tr)hc='';
hr=v2+'\u25b6';if(sr&&tr||sc&&!tr)hr='';
hd='"""'+(hc&&hr?hc+'/ '+hr:(hc?hc:hr))+'"""';
if(a2.length>=c.headerRightFrom){hr=hr?'\u25C0'+v2:'';hd2='"""'+(hc&&hr?hr+'/ '+hc:(hc?hc:hr))+'"""';}
out='|'+c.resultTabClass+'|k\n| '+hd;
for(t2=0;t2<a2.length;t2++){
ti=a2[t2].title;
nu=c.addNew?tbGTD.nu(ti):'';
out+=' | '+nu+'<<tag [['+ti+']]>>';
}out+=(hd2!=''?'|'+hd2:'')+' |h\n';
for(t1=0;t1<a1.length;t1++){
ti=a1[t1].title;
nu=c.addNew?tbGTD.nu(ti):'';
hd='<<tag [['+ti+']]>>';
out+='| !'+nu+hd;
for(t2=0;t2<a2.length;t2++){
out+='|'
tgt=store.getTaggedTiddlers(a1[t1].title);
for(t=0;t<tgt.length;t++){
if(tgt[t].tags.contains(a2[t2].title)){
ti=tgt[t].title;out+='@@margin:0;<<tag [['+ti+']]>>'+c.miniTag.format([ti])+'@@<br />';
}
}
}
out+=(hd2!=''?'|'+hd+' ':'')+'|\n';
}
//preset template
if(by('PT'+id).checked){
chk=function(s){return s.indexOf(' ')>=0?"'"+s+"'":s;};
o=sr||sc||tr;
o=o?c.pOps+':'+
(sr?c.pOpSR:'')+
(sc?(sr?'&':'')+c.pOpSC:'')+
(tr?(sr||sc?'&':'')+c.pOpTR:''):'';
v=snd.value;v=snd.selectedIndex==0?'':v;v1=rows.value;v2=cols.value;
wikify(c.template+'@@font-weight:bold;'+(al?c.pOpAL:'')+chk(v)+' '+chk(v1)+' by '+chk(v2)+'=='+
c.pRows+':'+chk(v1)+' ' + (v?c.pSec+':'+chk(v)+' ':'') + c.pCols+':'+chk(v2)+' '+chk(o)+'@@',pr);
}
}
//create output
wikify(out,el);
},
create:function(id,ps,el,setAll){
var a,all,at,c=this.cfg,cr,cs,d,dc,dt,f,fs,gd,i,p,pls,pos,pr,prs,rt,sp,src,t,ti,tid,tids=[],td,tds,tgs=[],tmp,tls,xel=false;
if(typeof(id)=='object'){
rt=id;
tmp=id.getAttribute('tiddler');
if(tmp=='')el=story.findContainingTiddler(id);//into this tid
else{
xel=tmp.toUpperCase().indexOf('ID==')==0;
el=xel?document.getElementById(tmp.substr(4)):story.getTiddler(el);//into id or named tiddler
}
if(!el)alert(c.nOkRender.format([tmp]));
else{
tid=el.getAttribute('tiddler');
if(!xel)el=jQuery('.viewer',el)[0];//if tid, render in viewer
//get attribs
ps=id.getAttribute('params');
id=id.getAttribute('xtabid');
}
}
if(!tid){tid=story.findContainingTiddler(el);if(tid)tid=tid.getAttribute('tiddler');}
p=ps.parseParams(null,null,true);//get params
def=getParam(p,'defaults','').toUpperCase()=='TRUE';
tls=getParam(p,'taglist');if(!tls&&def&&c.defaults[0])tls=c.defaults[0];
pls=getParam(p,'presets');if(!pls&&def&&c.defaults[1])pls=c.defaults[1];
dt=getParam(p,'detect','');if(!dt&&def&&c.defaults[2])dt=c.defaults[2];
pr=getParam(p,'preset','');if(!pr&&def&&c.defaults[3])pr=c.defaults[3];
pos=getParam(p,'position','').toUpperCase();
all=pr.toUpperCase().indexOf(c.pOpAL)==0;
if(all)pr=pr.substr(c.pOpAL.length);
a=setAll||!tls||all&&setAll==undefined;
if(a){//get tags
tgs=store.getTags();
}else{
//init taglist
if(tls){
tgs=store.getTiddlerText(tls);
if(!tgs)alert(c.nOkTags.format([tls]));
else tgs=tgs.readBracketedList();
}
if(tgs.length==0&&!a)alert(c.noTags);
}
//init presets
if(pls){
prs=store.getTiddlerText(pls);
if(!prs)alert(c.nOkTags.format([pls]));
else prs=prs.split('\n');
}
dc=c.dropClass;
cr=createTiddlyElement;
if(setAll==undefined){
sp=document.createElement('span');//render container
if(pos=='FIRST')el.insertBefore(sp,el.firstChild);
else if(!xel&&rt&&pos!='LAST')el.insertBefore(sp,rt.nextSibling);
else el.appendChild(sp);
}else sp=el;
el=cr(sp,'div','xtab'+id,'xtab');//div
f=cr(el,'form','xtabFrm'+id,'xtabFrm');//form
f.setAttribute('params',ps);
wikify('|borderless|k\n|||>|\n||||\n',f);
tds=f.lastChild.getElementsByTagName('td');
td=tds[1];this.nuSel(tds[0],'presets',prs,c.P,'P',dc);
cs=[['PT','tmpl'],['TR','trans'],['SR','oner'],['SC','onec'],['AL','allt',a]];
for(i=0;i<cs.length;i++)this.nuChk(td,cs[i][0]+id,cs[i][1],c[cs[i][0]],dc,cs[i][2]);
createExternalLink(td,store.getTiddlerSlice("x-tab","Documentation"),c.info);
this.nuSel(tds[2],'rows',tgs,c.R,a?'A':'R',dc,id);
this.nuSel(tds[3],'snd',[],c.S,'S',dc,id);
this.nuSel(tds[4],'cols',tgs,c.C,a?'A':'C',dc,id);
cr(el,'div','xtabPrv'+id,'xtabPrv');
cr(el,'div','xtabOut'+id,'xtabOut');
if(pr.indexOf(':')<=0){//preset from field(@tid)
at=pr.indexOf('@');
if(at>0){
ti=pr.substr(at+1);
tid=store.getTiddler(ti);
pr=pr.substr(0,at);
if(!tid)alert(c.nOkField.format([pr,ti]));
else tid=tid.title;
}
pr=store.getValue(tid,pr);
}
if(tid&&dt&&!pr)pr=this.detect(dt,tid);//Autodetect
this.setPreset(id,pr,setAll);
return id;
},
nuChk:function(el,cid,n,t,cl,c){
var bt,cb;
cb=createTiddlyElement(el,'input',cid,null,null,{'type':'checkbox','name':n,'value':t[0]});
cb.checked=c?c:false;
cb.onclick=this.check;
bt=createTiddlyElement(el,'span',null,cl+' xtabToggle',t[0],{'title':t[1],'toggle':cid});
bt.onclick=this.check;
return(cb);
},
check:function(e){
var c,el,f,id,ns,p,x=config.macros.xtab,ps;
c=document.getElementById(this.getAttribute('toggle'));
if(c)c.checked=!c.checked;
el=c?c:this;
id=el.getAttribute('id').substr(2);
if(el.name=='allt'){
c=el.checked;f=el.form;
el=f.parentNode;p=el.parentNode;
ps=f.getAttribute('params');
removeChildren(el);p.removeChild(el);
x.create(id,ps,p,c);
}else x.update(id);
},
nuSel:function(el,n,o,t,typ,c,id){
createTiddlyElement(el,'em',null,null,t[0]);
var s=createTiddlyElement(el,'select',n+id,c,null,{'name':n,'title':t[1]});
s.onchange=this.chgSel;
this.setOpt(s,o,null,typ,t[2]);
},
setOpt:function(el,o,val,typ,title){
if(val&&el.getAttribute('cat')==val)return;
var i,l,os;
l=o?o.length:0;
os=el.options;
el.disabled=l==0;
while(os.length>1)os[os.length-1]=null;
os[0]=new Option(title,null,false,false);
if(l){
for(i=0;i<l;i++){
var t=o[i];
switch(typ){
case 'P':t=t.split('==');n=t[0];v=t[1];break;
case 'A':n=v=t[0];break;
case 'S':t=t.title;
default:n=t;v=t;
}
os[os.length]=new Option(n,v,false,false);
}
}
},
chgSel:function(e){
var x=config.macros.xtab,id=this.form.getAttribute('id').substr(7);
switch(this.name){
case 'presets':if(this.selectedIndex>0)x.setPreset(id,this.value);break;
case 'rows':x.initSecondary(id);
default:x.update(id);
}
},
initSecondary:function(id){
var s,r,tgt,v;
r=document.getElementById('rows'+id);
v=r.value;
s=document.getElementById('snd'+id);
tgt=r.selectedIndex>0?store.getTaggedTiddlers(v):[];
this.setOpt(s,tgt,v,'S',this.cfg.S[2]);
s.setAttribute('cat',v?v:'');
},
setPreset:function(id,pr,setAll){
var chk,f,l,ls,o,p,x,c=this.cfg,u=c.nDef;
if(pr){
f=document.getElementById('xtabFrm'+id);
p=pr.parseParams(null,null,false);
ls=[
['rows',getParam(p,c.pRows,u),c.pRows],
['cols',getParam(p,c.pCols,u),c.pCols],
['snd',getParam(p,c.pSec),c.pSec]
];
document.getElementById('snd'+id).selectedIndex=0;
for(l=0;l<ls.length;l++){if(ls[l][1]&&!this.chkSel(id,ls[l],f))return false;}
o=getParam(p,c.pOps,'');
x=function(n,s){document.getElementById(n+id).checked=o.indexOf(s)>=0};
x('TR',c.pOpTR);x('SR',c.pOpSR);x('SC',c.pOpSC);if(setAll==undefined)x('AL',c.pOpAT);
}
this.update(id);
},
detect:function(t,tid){
var a,d,l,n,ot,tgs,c=this.cfg;
d=store.getTiddlerText(t);
f=[c.pRows+':[[%0]] '+c.pCols+':[[%1]]',
c.pRows+':[[%0]] '+c.pCols+':[[%1]] '+c.pSec+':[[%2]] '+c.pOps+':'+c.pOpTR+'&'+c.pOpSR,
c.pRows+':[[%0]] '+c.pCols+':[[%1]] '+c.pSec+':[[%2]] '+c.pOps+':'+c.pOpTR];
if(!d)alert(c.nOkDetect.format([t]));
else{
a=d.split('\n');
while(a.length>0){
l=a.shift().readBracketedList();n=l.length;
if(tid==l[0]){
switch(n){
case 3:return f[2].format([l[0],l[1],l[2]]);
case 2:
case 4:return f[0].format([l[0],l[1]]);
}
}else{
ot=store.getTiddler(tid);
if(ot.tags.contains(l[0])){
switch(n){
case 3:return f[2].format([l[0],l[1],tid]);
case 2:
case 4:return f[1].format([l[0],l[1],tid]);
}
}
}
}
}
},
chkSel:function(id,a,f){
var c='',o,s,t,v;
s=document.getElementById(a[0]+id);v=a[1];
if(s){
o=s.options;
for(t=1;t<o.length;t++){c=o[t].value;if(v==c){s.selectedIndex=t;break;}}
}
if(v!=c){alert(this.cfg.nOkPreset.format([v,a[2]]));return false;}
if(a[0]=='rows')this.initSecondary(id);//reset secondary
return true;
}
}
//}}}
!Tags
[[action]]
[[priority]]
[[context]]
[[project]]
[[stage]]
[[$active]]
[[area]]
[[realm]]
[[contact]]
[[journal]]
[[star]]
!Presets
starred actions==rows:action cols:star options:1col
starred projects==rows:project cols:star options:1col
starred contacts==rows:contact cols:star options:1col
action by priority==rows:action cols:priority
action by area==rows:action cols:area
context by action==rows:context cols:action
context by priority==rows:context cols:priority
context by area==rows:context cols:area
stages by action==rows:stage cols:action
stages by priority==rows:stage cols:priority
stages by context==rows:stage cols:context
active projects by action==rows:project snd:$active cols:action options:transpose
active projects by stage==rows:project snd:$active cols:stage options:transpose
active projects by context==rows:project snd:$active cols:context options:transpose
active projects by priority==rows:project snd:$active cols:priority options:transpose
someday projects by context==rows:project snd:$someday cols:context options:transpose
someday projects by priority==rows:project snd:$someday cols:priority options:transpose
projects by realm==rows:project cols:realm
contacts by priority==rows:contact cols:priority
contacts by action==rows:contact cols:action
contacts by priority==rows:contact cols:priority
contacts by context==rows:contact cols:context
contacts by area==rows:contact cols:area
!Detect
action context
context action
priority action
project action $active
stage action §0.kickoff transpose
area action
realm project
contact action
/***
|''Name:''|x-tagger|
|''Version:''|1.0 (2009-11-02)|
|''Source:''|http://tbGTD.tiddlyspot.com/#x-tagger|
|''Author:''|[[TobiasBeer]]|
|''Description:''|Provides a drop down listing current tags and others to be set.|
|''~TiddlyWiki:''|Version 2.5 or better|
***/
//{{{
setStylesheet(
".xtagger li{display:block;float:left;padding-bottom:10px !important;}"+
".xtagger li ol li{padding:0 5px 5px 5px !important;clear:both;min-width:120px;display:inline;border:1px solid transparent;}"+
".xtagger li ol li:hover{border:1px solid #333;}"+
".xtagger li ol li ol li{padding:1px 0 !important;}"+
".xtagger li ol li ol li:hover{border:1px solid transparent;}"+
".xtagger li a{display:inline;font-weight:bold;}.xtagger .tiddlyLink:hover{background:transparent;}"+
".xtagger .quickopentag {width:82%;display:inline-block;}"+
".xtagger .quickopentag .tiddlyLink {display:inline;}"+
".xtagger .quickopentag .button {display:inline;border:0;padding:0 3%;text-align:center;width:10%;font-size:11px;}"+
".xtagger a.button{padding:0;}"+
".xtagger a.toggleButton {display:inline;padding:0 2px;margin-right:1px; font-size:110%;}"+
".xtagger .title {font-weight:bold;font-size:150%;color:#CCC;}","StyleSheetxTagger");
//}}}
//{{{
config.macros.xtagger={
cfg:{
mode:1,// 0 -> ask for substitution, 1 -> substitute (silent), >1 -> always add (silent)
horizontal:false,//all in one row
sidebarOffset:20,//dist from sidebar
sideWidth:'180px',//width of sides
topMarginSides:'10px',
newAt:16,//new block each
archive:'archive',//archive tag
excludeTags:'',
list:'true',
arrow:document.all?"▼":"▾", //only the fat works in IE
label:'Tags: ', //language settings
options:'options',
more:'more...',
tooltip:'Manage tiddler tags',
notags:'no tags set...',
aretags:'current tags',
txtRemove: 'remove tag',
txtEdit:"edit categories...",
txtEditTip:"edit tiddler with GTD tag categories used by x-tagger",
txtNew:"add another tag",
txtAdd:"set tag ",
promptNew:"Enter new tag:",
modeAsk:"Do also you want to remove tag '%1' and other tags from category '%2'?\nCancel simply adds tag '%3'."
},
handler:function(place,macroName,params,wikifier,paramString,tiddler){
var c,click,ex,lbl,list,more,p,src,tip,x;
x=config.macros.xtagger;c=x.cfg;
p=paramString.parseParams('tagman',null,true);
lbl=getParam(p,"label",c.label)+c.arrow;
tip=getParam(p,"tooltip",c.tooltip);
list=getParam(p,"taglist",c.list);
ex=getParam(p,"exclude",c.excludeTags).readBracketedList();
src=getParam(p,"source");if(src&&!store.getTiddlerText(src))return false;
more=getParam(p,"more",'');
click=function(e){
e=e||window.event;
var ar,d1,d2,i,curr,nuBtns,nuLi,m,max=nu=c.newAt,pop,s,t,tags=[],tids,tgt;
pop=Popup.create(this);
addClass(pop,'xtagger');
if(src){//mod tb:different method for source tiddler
tids=store.getTiddlerText(src).readBracketedList();
for(t=0;t<tids.length;t++){
tgt=store.getTaggedTiddlers(tids[t]);
tags.push('TAG:'+tids[t]);
for(s=0;s<tgt.length;s++)tags.push(tgt[s].title);
}
}else tags=store.getTags();
curr=tiddler.tags.sort();
nuLi=function(p){return createTiddlyElement(createTiddlyElement(p,"li",null,null),"ol",null,null);}
nuBtns=function(where,text,tag,pref){
var s,t;
s=createTiddlyElement(createTiddlyElement(where,"li"),"span",null,null);
t=createTiddlyButton(s,text,pref+" '"+tag+"'",x.setTag,"button toggleButton", null);
t.setAttribute("tiddler",tiddler.title);
t.setAttribute("tag",tag);
t.setAttribute("source",src);
insertSpacer(s);
if(window.createTagButton_orig_mptw)createTagButton_orig_mptw(s,tag);
else createTagButton(s,tag);
}
d1=nuLi(pop);d2=nuLi(d1);if(c.topMarginSides)d1.style.marginTop=c.topMarginSides;
createTiddlyElement(d2,"li",null,"title",(tiddler.tags.length==0?c.notags:c.aretags));
for(t=0;t<curr.length;t++)nuBtns(d2,"[x]",curr[t],c.txtRemove);
if(c.sideWidth)jQuery('li',d1).css('min-width',c.sideWidth);
if(list!='false'){
for(i=0;i<tags.length;i++){
var ti=tags[i];nu++;
if(ti.indexOf('TAG:')==0){ti=ti.substr(4);
if(nu>max||c.horizontal){nu=0;d1=nuLi(pop);}d2=nuLi(d1);
createTiddlyLink(createTiddlyElement(d2,"li",null,null),ti,ti,'title');
}
else if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
}
}
//options
d1=nuLi(pop);d2=nuLi(d1);createTiddlyElement(d2,'li',null,'title',c.options);
if(c.topMarginSides)d1.style.marginTop=c.topMarginSides;
var newBtn=createTiddlyButton(createTiddlyElement(d2,"li"),(c.txtNew),null,x.setTag);
newBtn.setAttribute("tiddler",tiddler.title);
var edit=createTiddlyButton(createTiddlyElement(d2,"li"),c.txtEdit,c.txtEditTip,onClickTiddlerLink);
edit.setAttribute("tiddlyLink",src.split('##')[0]);
//archive
ti=c.archive;
if(ti){
d2=nuLi(d1);createTiddlyLink(createTiddlyElement(d2,"li",null,null),ti,ti,'title');
ar=store.getTaggedTiddlers(ti);
for(i=0;i<ar.length;i++){var ti=ar[i].title;
if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
}
}
//more
m=store.getTiddlerText(more).readBracketedList();
if(m.length>0){
d2=nuLi(d1);createTiddlyElement(d2,'li',null,'title',c.more);
for(i=0;i<m.length;i++){var ti=m[i];
if(!tiddler.tags.contains(ti)&&!ex.contains(ti))nuBtns(d2,"["+String.fromCharCode(160,160)+"]",ti,c.txtAdd);
}
}
if(c.sideWidth)jQuery('li',d1).css('min-width',c.sideWidth);
Popup.show(pop,false);
s=document.getElementById('sidebar');
pop.style.left='';pop.style.right=(c.sidebarOffset+(s?s.offsetWidth:0))+'px';
e.cancelBubble=true;
if(e.stopPropagation)e.stopPropagation();
return false;
}
createTiddlyButton(place,lbl,tip,click,"button","xtaggerDrop");
},
setTag:function(e){
var nu,r,s,src,t,tag,ti,tid,title,c=config.macros.xtagger.cfg;
title=this.getAttribute("tiddler");
src=this.getAttribute("source");
tag=this.getAttribute("tag");
tid=store.getTiddler(title);
if(!tag){nu=prompt(c.promptNew,"");if(!nu)return false;else tag=nu;}
if(!tid||!tid.tags)store.saveTiddler(title,title,'',config.options.txtUserName,new Date(),tag);
else{
if(!tid.tags.contains(tag)){
if(store.getTiddlerText(src)){
if(c.mode<2){
var cats=store.getTiddlerText(src).readBracketedList();
findTagged: for(t=0;t<cats.length;t++){
ti=cats[t];
var tgt=store.getTaggedTiddlers(ti);
for(s=0;s<tgt.length;s++){
if(tgt[s].title==tag){
for(r=0;r<tgt.length;r++){
if(tid.tags.contains(tgt[r].title)){
var ok;
if(c.mode==0&&!ok){
if(!confirm(c.modeAsk.replace(/%1/,tgt[r].title).replace(/%2/,ti).replace(/%3/,tag)))break findTagged;
ok=true;
}
store.setTiddlerTag(title,false,tgt[r].title);
}
}
break findTagged;
}
}
}
}
}
store.setTiddlerTag(title,true,tag);
}
else if(!nu)store.setTiddlerTag(title,false,tag);
story.saveTiddler(title);
}
}
}
window.onClickTag=function(e){
if(!e)var e=window.event;
var nested=true;
var tgt=resolveTarget(e);
var cw=document.getElementById("contentWrapper");
while(tgt!= null){if(cw==tgt)nested=false;tgt=tgt.parentNode;}
if((Popup.stack.length>1)&&nested)Popup.removeFrom(1);
else if(Popup.stack.length>0 && nested==false)Popup.removeFrom(0);
var theId=(nested==false)?"popup":"nestedtagger";
var pop=createTiddlyElement(document.body,"ol",theId,"popup",null);
Popup.stack.push({root:this,popup:pop});
var tag=this.getAttribute("tag");
var title=this.getAttribute("tiddler");
if(pop&&tag){
var tgt=store.getTaggedTiddlers(tag);
var titles=[];
for(var r=0;r<tgt.length;r++)if(tgt[r].title!=title)titles.push(tgt[r].title);
var lingo=config.views.wikified.tag;
if(titles.length>0){
var openAll=createTiddlyButton(createTiddlyElement(pop,"li"),lingo.openAllText.format([tag]),lingo.openAllTooltip,onClickTagOpenAll);
openAll.setAttribute("tag",tag);
createTiddlyElement(createTiddlyElement(pop,"li"),"hr");
for(r=0; r<titles.length; r++)createTiddlyLink(createTiddlyElement(pop,"li"),titles[r],true);
}else{createTiddlyText(createTiddlyElement(pop,"li",null,"disabled"),lingo.popupNone.format([tag]));}
if(this.getAttribute('showOpenTag')){
createTiddlyElement(createTiddlyElement(pop,"li"),"hr");
var h=createTiddlyLink(createTiddlyElement(pop,"li"),tag,false);
createTiddlyText(h,lingo.openTag.format([tag]));
}
}
Popup.show(pop,false);
e.cancelBubble=true;
if(e.stopPropagation)e.stopPropagation();
return(false);
}
//}}}
!Notes
These sections define the categories used by [[x-tagger]] and the MainMenu. If a lower item is directly tagging to an upper item it will be ignored by the MainMenu, e.g. [[$active]]. Tags under the section ''More'' will be shown in the corresponding section in tagger. For more configuration options, look at the beginning of [[x-taggers sourcecode|x-tagger]].
!Tags
[[action]]
[[priority]]
[[context]]
[[project]]
[[stage]]
[[$active]]
[[area]]
[[realm]]
[[contact]]
!More
[[help]]
[[journal]]
[[reference]]
[[systemConfig]]
[[systemConfigDisable]]
[[excludeLists]]
[[excludeMissing]]
[[excludeSearch]]
[[noCloud]]
//{{{
//shortcuts
var c=config;
var co=c.options;
var cc=c.commands;
var cm=c.macros;
var cv=c.views;
//adopted from mptwConfig
readOnly=false;
showBackstage=true;
cv.editor.tagChooser.text='tags...';
co.txtTheme='tbGtdTheme';
//no msg when no tiddler
cv.wikified.defaultText="";
//no text for a new tiddler
cv.editor.defaultText="";
//tab as tab when editing
co.chkInsertTabs=true;
//visitors can edit
co.chkHttpReadOnly=false;
co.chkSaveBackups=true;
//backups in this folder
co.txtBackupFolder='twbackup';
//autosave when local
co.chkAutoSave=(window.location.protocol=="file:");
co.chkHideTabsBarWhenSingleTab =true;
co.chkTOCIncludeHidden=true;
co.chkDisplayWeekNumbers=true;
co.txtPrettyDates='pppp';
co.chkAnimate=false;
co.chkSinglePagePermalink=true;
co.txtLastShared='tbGTD:::http://tbGTD.tiddlyspot.com';
merge(cm.toolbar,{moreLabel:'+',lessLabel:'-'});
merge(c.messages.backstage,{open:{text:''},close:{text:''}});
//see ViewTemplate
c.mptwDateFormat='YYYY-0MM-0DD';c.mptwJournalFormat='YYYY-0MM-0DD';
//language settings
c.glyphs.codes.star=["\u22C6","\u22C6"];
cc.syncing.text="sync";
cc.references.text="ref";
cc.permalink.text="url";
var show="Show an URL in the brower address bar that ";
cc.permalink.tooltip=show+"links to the currently displayed tiddler";
cm.permaview.prompt=show+"retrieves all the currently displayed tiddlers";
cm.permaview.label="permalink";
cm.list.missing.prompt="referenced without tiddler:\n";
cm.list.orphans.prompt="tiddlers without reference:\n";
cm.list.shadowed.prompt="default shadow tiddlers:\n";
cm.option.passwordCheckboxLabel="save on this computer";
//refresh command -> for toolbar (force=true)
cc.refreshTiddler={
text:'refresh',tooltip:'Refresh this tiddler',
handler:function(e,src,title){clearMessage();story.refreshTiddler(title,false,true);return false;}
}
//rename buttons
cm.rB={handler:function(place,macroName,params,wikifier,paramString,tiddler){
if(place.lastChild.tagName!="BR"){
var p1=params.shift().split("#");
var name=p1[0];
var id=p1[1];
var title=params[0];
el=place.lastChild;
if(el.tagName.toUpperCase()!="A")el=el.firstChild;
el.firstChild.data=name;
if(id)el.setAttribute('id',id);
if(title)el.title=title;
}
}}
//shortened splashscreen code
var tbRestart=window.restart;
window.restart = function(){
var splash=document.getElementById('SplashScreen');
if (splash) splash.style.display = "none";
document.getElementById('contentWrapper').style.display = "block";
tbRestart();
}
//fix ie styles
if(jQuery.browser.msie){setStylesheet('#topMenuR{top:4.55em !important;}','ieStyles');}
//DummyTiddlerHack
config.macros.dummy={handler:function(place,macroName,params,wikifier,paramString,tiddler){var t=params.shift();if(t)place.setAttribute('tiddler',t);}}
//}}}
Project kick-off notes link here...
Project definitions...
*goals and (measurable !) success criteria
*the system and it's environment boundaries and interfaces
Estimates regarding project requirements for...
*people
*time
*ressources
*finances
*opportunities, threats, strengths and weaknesses (swot)
Efforts to meet prerequisites, to aquire necessary data and information to get started...
The collection of design, development and improvement efforts which pave your path to success...
|borderless widetable|k
|''Validate'' design, data, processes, components and properties as to whether or not they meet requirements.| @@color:#39C;margin-left:10px;display:block;text-align:center;background:#eee;border-bottom:1px solid #39C;padding:3px;''Do the __right__ thing!''@@|
|''Verify'' efforts numerically and logically as to whether or not they actually do what they're designed for.| @@color:#39C;margin-left:10px;display:block;text-align:center;background:#eee;padding:3px;''Do the thing __right__!''@@|
Efforts made to check whether ideas for the desired system, improved or new, are are in fact working...
Experiment, calculate or simulate different, envisioned alternatives and scenarios...
*results and statistics...
*#gather
*#evaluate
*#compare
Analyse alternatives and __decide__ as to which ones are best suitable to meet projects goals...
The project roll-out and implementation depending on the carefully chosen path...
Assessment of how implementation meets the verified and validated model and, above all, project goals and requirements...