Please Wait
Requires Javascript.
zRenard Notes - for _FoX_
Use {{{[img[tootips|Diff.jpg]]}}} to display\n\n<<listTags attachment modified *>>
*Doc\n[[JSTL 1.1|http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html]]\n[[JSTL 1.1 API|http://java.sun.com/products/jsp/jstl/1.1/docs/api/index.html]]\n\n[[JDK 1.3.1 API|http://java.sun.com/j2se/1.3/docs/api/index.html]]\n[[JDK 1.4.2 API|http://java.sun.com/j2se/1.4.2/docs/api/index.html]]\n\n[[J2E 1.3 API|http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html]]\n[[J2E 1.4 API|http://java.sun.com/j2ee/1.4/docs/api/index.html]]\n\n[[Jakarta JSTL String|http://jakarta.apache.org/taglibs/doc/string-doc/index.html]]\n\n[[Apache Axis API|http://ws.apache.org/axis/java/apiDocs/index.html]]\n[[Apache Xerces|http://xerces.apache.org/xerces-j/apiDocs/index.html]]\n[[Apache Soap API|http://ws.apache.org/soap/docs/index.html]]\n\n[[Regexpr|http://www.zytrax.com/tech/web/regex.htm]]\n\n[[Iso Country|http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html ]]\n[[Iso Language|http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt]]\n[[Iso Currency|http://www.xe.com/iso4217.htm]]\n\n*Tiddly\n[[TiddlyWiki|http://tiddlywiki.com/]]\n[[TiddlyWikiGTD|http://shared.snapgrid.com/gtd_tiddlywiki.html]]\n\n*Infos\n[[zRenard|http://www.zrenard.com]]\n[[wiki|http://zrenard.pbwiki.com/]]\n[[GoogleNews|http://news.google.fr/]]\n**Airlines Business\nhttp://news.airwise.com/index.html\nhttp://www.eyefortravel.com/\nhttp://atwonline.com/news/index.html\nhttp://www.travelmole.com/index.php
/***\n''Name:'' Calendar plugin\n''Version:'' 0.6.0 - 2006, 1, 22\n''Author:'' SteveRumsby\n\n''Configuration:''\n\n|''First day of week:''|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|\n|''First day of weekend:''|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|\n\n''Syntax:'' \n|{{{<<calendar>>}}}|Produce a full-year calendar for the current year|\n|{{{<<calendar year>>}}}|Produce a full-year calendar for the given year|\n|{{{<<calendar year month>>}}}|Produce a one-month calendar for the given month and year|\n|{{{<<calendar thismonth>>}}}|Produce a one-month calendar for the current month|\n|{{{<<calendar lastmonth>>}}}|Produce a one-month calendar for last month|\n|{{{<<calendar nextmonth>>}}}|Produce a one-month calendar for next month|\n\n***/\n// //Modify this section to change the text displayed for the month and day names, to a different language for example. You can also change the format of the tiddler names linked to from each date, and the colours used.\n\n// // ''Changes by ELS 2005.10.30:''\n// // config.macros.calendar.handler()\n// // ^^use "tbody" element for IE compatibility^^\n// // ^^IE returns 2005 for current year, FF returns 105... fix year adjustment accordingly^^\n// // createCalendarDays()\n// // ^^use showDate() function (if defined) to render autostyled date with linked popup^^\n// // calendar stylesheet definition\n// // ^^use .calendar class-specific selectors, add text centering and margin settings^^\n\n//{{{\nconfig.macros.calendar = {};\n\nconfig.macros.calendar.monthnames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];\nconfig.macros.calendar.daynames = ["M", "T", "W", "T", "F", "S", "S"];\n\nconfig.macros.calendar.weekendbg = "#c0c0c0";\nconfig.macros.calendar.monthbg = "#e0e0e0";\nconfig.macros.calendar.holidaybg = "#ffc0c0";\n\n//}}}\n// //''Code section:''\n// (you should not need to alter anything below here)//\n//{{{\nif(config.options.txtCalFirstDay == undefined)\n config.options.txtCalFirstDay = 0;\nif(config.options.txtCalStartOfWeekend == undefined)\n config.options.txtCalStartOfWeekend = 5;\n\nconfig.macros.calendar.tiddlerformat = "0DD/0MM/YYYY"; // This used to be changeable - for now, it isn't// <<smiley :-(>> \n\nversion.extensions.calendar = { major: 0, minor: 6, revision: 0, date: new Date(2006, 1, 22)};\nconfig.macros.calendar.monthdays = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nconfig.macros.calendar.holidays = [ ]; // Not sure this is required anymore - use reminders instead\n//}}}\n\n// //Is the given date a holiday?\n//{{{\nfunction calendarIsHoliday(date)\n{\n var longHoliday = date.formatString("0DD/0MM/YYYY");\n var shortHoliday = date.formatString("0DD/0MM");\n\n for(var i = 0; i < config.macros.calendar.holidays.length; i++) {\n if(config.macros.calendar.holidays[i] == longHoliday || config.macros.calendar.holidays[i] == shortHoliday) {\n return true;\n }\n }\n return false;\n}\n//}}}\n\n// //The main entry point - the macro handler.\n// //Decide what sort of calendar we are creating (month or year, and which month or year)\n// // Create the main calendar container and pass that to sub-ordinate functions to create the structure.\n// ELS 2005.10.30: added creation and use of "tbody" for IE compatibility and fixup for year >1900//\n// ELS 2005.10.30: fix year calculation for IE's getYear() function (which returns '2005' instead of '105')//\n//{{{\nconfig.macros.calendar.handler = function(place,macroName,params)\n{\n var calendar = createTiddlyElement(place, "table", null, "calendar", null);\n var tbody = createTiddlyElement(calendar, "tbody", null, null, null);\n var today = new Date();\n var year = today.getYear();\n if (year<1900) year+=1900;\n if (params[0] == "thismonth")\n {\n cacheReminders(new Date(year, today.getMonth(), 1, 0, 0), 31);\n createCalendarOneMonth(tbody, year, today.getMonth());\n } \n else if (params[0] == "lastmonth") {\n var month = today.getMonth()-1; if (month==-1) { month=11; year--; }\n cacheReminders(new Date(year, month, 1, 0, 0), 31);\n createCalendarOneMonth(tbody, year, month);\n }\n else if (params[0] == "nextmonth") {\n var month = today.getMonth()+1; if (month>11) { month=0; year++; }\n cacheReminders(new Date(year, month, 1, 0, 0), 31);\n createCalendarOneMonth(tbody, year, month);\n }\n else {\n if (params[0]) year = params[0];\n if(params[1])\n {\n cacheReminders(new Date(year, params[1]-1, 1, 0, 0), 31);\n createCalendarOneMonth(tbody, year, params[1]-1);\n }\n else\n {\n cacheReminders(new Date(year, 0, 1, 0, 0), 366);\n createCalendarYear(tbody, year);\n }\n }\n window.reminderCacheForCalendar = null;\n}\n//}}}\n//{{{\n//This global variable is used to store reminders that have been cached\n//while the calendar is being rendered. It will be renulled after the calendar is fully rendered.\nwindow.reminderCacheForCalendar = null;\n//}}}\n//{{{\nfunction cacheReminders(date, leadtime)\n{\n if (window.findTiddlersWithReminders == null)\n return;\n window.reminderCacheForCalendar = {};\n var leadtimeHash = [];\n leadtimeHash [0] = 0;\n leadtimeHash [1] = leadtime;\n var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);\n for(var i = 0; i < t.length; i++) {\n //just tag it in the cache, so that when we're drawing days, we can bold this one.\n window.reminderCacheForCalendar[t[i]["matchedDate"]] = "reminder:" + t[i]["params"]["title"]; \n }\n}\n//}}}\n//{{{\nfunction createCalendarOneMonth(calendar, year, mon)\n{\n var row = createTiddlyElement(calendar, "tr", null, null, null);\n createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, true, year, mon);\n row = createTiddlyElement(calendar, "tr", null, null, null);\n createCalendarDayHeader(row, 1);\n createCalendarDayRowsSingle(calendar, year, mon);\n}\n//}}}\n\n//{{{\nfunction createCalendarMonth(calendar, year, mon)\n{\n var row = createTiddlyElement(calendar, "tr", null, null, null);\n createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, false, year, mon);\n row = createTiddlyElement(calendar, "tr", null, null, null);\n createCalendarDayHeader(row, 1);\n createCalendarDayRowsSingle(calendar, year, mon);\n}\n//}}}\n\n//{{{\nfunction createCalendarYear(calendar, year)\n{\n var row;\n row = createTiddlyElement(calendar, "tr", null, null, null);\n var back = createTiddlyElement(row, "td", null, null, null);\n var backHandler = function() {\n removeChildren(calendar);\n createCalendarYear(calendar, year-1);\n };\n createTiddlyButton(back, "<", "Previous year", backHandler);\n back.align = "center";\n\n var yearHeader = createTiddlyElement(row, "td", null, "calendarYear", year);\n yearHeader.align = "center";\n yearHeader.setAttribute("colSpan", 19);\n\n var fwd = createTiddlyElement(row, "td", null, null, null);\n var fwdHandler = function() {\n removeChildren(calendar);\n createCalendarYear(calendar, year+1);\n };\n createTiddlyButton(fwd, ">", "Next year", fwdHandler);\n fwd.align = "center";\n\n createCalendarMonthRow(calendar, year, 0);\n createCalendarMonthRow(calendar, year, 3);\n createCalendarMonthRow(calendar, year, 6);\n createCalendarMonthRow(calendar, year, 9);\n}\n//}}}\n\n//{{{\nfunction createCalendarMonthRow(cal, year, mon)\n{\n var row = createTiddlyElement(cal, "tr", null, null, null);\n createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);\n createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);\n createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);\n row = createTiddlyElement(cal, "tr", null, null, null);\n createCalendarDayHeader(row, 3);\n createCalendarDayRows(cal, year, mon);\n}\n//}}}\n\n//{{{\nfunction createCalendarMonthHeader(cal, row, name, nav, year, mon)\n{\n var month;\n if(nav) {\n var back = createTiddlyElement(row, "td", null, null, null);\n back.align = "center";\n back.style.background = config.macros.calendar.monthbg;\n\n/*\n back.setAttribute("colSpan", 2);\n\n var backYearHandler = function() {\n var newyear = year-1;\n removeChildren(cal);\n cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);\n createCalendarOneMonth(cal, newyear, mon);\n };\n createTiddlyButton(back, "<<", "Previous year", backYearHandler);\n*/\n var backMonHandler = function() {\n var newyear = year;\n var newmon = mon-1;\n if(newmon == -1) { newmon = 11; newyear = newyear-1;}\n removeChildren(cal);\n cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);\n createCalendarOneMonth(cal, newyear, newmon);\n };\n createTiddlyButton(back, "<", "Previous month", backMonHandler);\n\n\n month = createTiddlyElement(row, "td", null, "calendarMonthname", name)\n// month.setAttribute("colSpan", 3);\n month.setAttribute("colSpan", 5);\n\n var fwd = createTiddlyElement(row, "td", null, null, null);\n fwd.align = "center";\n fwd.style.background = config.macros.calendar.monthbg; \n\n// fwd.setAttribute("colSpan", 2);\n var fwdMonHandler = function() {\n var newyear = year;\n var newmon = mon+1;\n if(newmon == 12) { newmon = 0; newyear = newyear+1;}\n removeChildren(cal);\n cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);\n createCalendarOneMonth(cal, newyear, newmon);\n };\n createTiddlyButton(fwd, ">", "Next month", fwdMonHandler);\n/*\n var fwdYear = createTiddlyElement(row, "td", null, null, null);\n var fwdYearHandler = function() {\n var newyear = year+1;\n removeChildren(cal);\n cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);\n createCalendarOneMonth(cal, newyear, mon);\n };\n createTiddlyButton(fwd, ">>", "Next year", fwdYearHandler);\n*/\n } else {\n month = createTiddlyElement(row, "td", null, "calendarMonthname", name)\n month.setAttribute("colSpan", 7);\n }\n month.align = "center";\n month.style.background = config.macros.calendar.monthbg;\n}\n//}}}\n\n//{{{\nfunction createCalendarDayHeader(row, num)\n{\n var cell;\n for(var i = 0; i < num; i++) {\n for(var j = 0; j < 7; j++) {\n var d = j + (config.options.txtCalFirstDay - 0);\n if(d > 6) d = d - 7;\n cell = createTiddlyElement(row, "td", null, null, config.macros.calendar.daynames[d]);\n\n if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))\n cell.style.background = config.macros.calendar.weekendbg;\n }\n }\n}\n//}}}\n\n//{{{\nfunction createCalendarDays(row, col, first, max, year, mon)\n{\n var i;\n for(i = 0; i < col; i++) {\n createTiddlyElement(row, "td", null, null, null);\n }\n var day = first;\n for(i = col; i < 7; i++) {\n var d = i + (config.options.txtCalFirstDay - 0);\n if(d > 6) d = d - 7;\n var daycell = createTiddlyElement(row, "td", null, null, null);\n var isaWeekend = ((d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))? true:false);\n\n if(day > 0 && day <= max) {\n var celldate = new Date(year, mon, day);\n // ELS 2005.10.30: use <<date>> macro's showDate() function to create popup\n if (window.showDate) {\n showDate(daycell,celldate,"popup","DD","DD-MMM-YYYY",true, isaWeekend); \n } else {\n if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;\n var title = celldate.formatString(config.macros.calendar.tiddlerformat);\n if(calendarIsHoliday(celldate)) {\n daycell.style.background = config.macros.calendar.holidaybg;\n }\n if(window.findTiddlersWithReminders == null) {\n var link = createTiddlyLink(daycell, title, false);\n link.appendChild(document.createTextNode(day));\n } else {\n var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);\n }\n }\n }\n day++;\n }\n}\n//}}}\n\n// //We've clicked on a day in a calendar - create a suitable pop-up of options.\n// //The pop-up should contain:\n// // * a link to create a new entry for that date\n// // * a link to create a new reminder for that date\n// // * an <hr>\n// // * the list of reminders for that date\n//{{{\nfunction onClickCalendarDate(e)\n{\n var button = this;\n var date = button.getAttribute("title");\n var dat = new Date(date.substr(6,4), date.substr(3,2)-1, date.substr(0, 2));\n\n date = dat.formatString(config.macros.calendar.tiddlerformat);\n var popup = createTiddlerPopup(this);\n popup.appendChild(document.createTextNode(date));\n var newReminder = function() {\n var t = store.getTiddlers(date);\n displayTiddler(null, date, 2, null, null, false, false);\n if(t) {\n document.getElementById("editorBody" + date).value += "\sn<<reminder day:" + dat.getDate() +\n " month:" + (dat.getMonth()+1) +\n " year:" + (dat.getYear()+1900) + " title: >>";\n } else {\n document.getElementById("editorBody" + date).value = "<<reminder day:" + dat.getDate() +\n " month:" + (dat.getMonth()+1) +\n " year:" + (dat.getYear()+1900) + " title: >>";\n }\n };\n var link = createTiddlyButton(popup, "New reminder", null, newReminder); \n popup.appendChild(document.createElement("hr"));\n\n var t = findTiddlersWithReminders(dat, [0,14], null, 1);\n for(var i = 0; i < t.length; i++) {\n link = createTiddlyLink(popup, t[i].tiddler, false);\n link.appendChild(document.createTextNode(t[i].tiddler));\n }\n}\n//}}}\n\n//{{{\nfunction calendarMaxDays(year, mon)\n{\n var max = config.macros.calendar.monthdays[mon];\n if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) {\n max++;\n }\n return max;\n}\n//}}}\n\n//{{{\nfunction createCalendarDayRows(cal, year, mon)\n{\n var row = createTiddlyElement(cal, "tr", null, null, null);\n\n var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);\n if(first1 < 0) first1 = first1 + 7;\n var day1 = -first1 + 1;\n var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);\n if(first2 < 0) first2 = first2 + 7;\n var day2 = -first2 + 1;\n var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);\n if(first3 < 0) first3 = first3 + 7;\n var day3 = -first3 + 1;\n\n var max1 = calendarMaxDays(year, mon);\n var max2 = calendarMaxDays(year, mon+1);\n var max3 = calendarMaxDays(year, mon+2);\n\n while(day1 <= max1 || day2 <= max2 || day3 <= max3) {\n row = createTiddlyElement(cal, "tr", null, null, null);\n createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;\n createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;\n createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;\n }\n}\n//}}}\n\n//{{{\nfunction createCalendarDayRowsSingle(cal, year, mon)\n{\n var row = createTiddlyElement(cal, "tr", null, null, null);\n\n var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);\n if(first1 < 0) first1 = first1+ 7;\n var day1 = -first1 + 1;\n var max1 = calendarMaxDays(year, mon);\n\n while(day1 <= max1) {\n row = createTiddlyElement(cal, "tr", null, null, null);\n createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;\n }\n}\n//}}}\n\n// //ELS 2005.10.30: added styles\n//{{{\nsetStylesheet(".calendar, .calendar table, .calendar th, .calendar tr, .calendar td { font-size:10pt; text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }", "calendarStyles");\n//}}}\n
|bgcolor(#FFFFFF):FFF FFF |bgcolor(#CCCCCC):CCC CCC |bgcolor(#999999):999 999 |bgcolor(#666666):@@color(white):666 666@@ |bgcolor(#333333):@@color(white):333 333@@ |bgcolor(#000000):@@color(white):000 000@@ |bgcolor(#FFCC00):FFC C00 |bgcolor(#FF9900):~FF9 900 |bgcolor(#FF6600):@@color(white):~FF6 600@@ |bgcolor(#FF3300):@@color(white):~FF3 300@@ |>|>|>|>|>| |\n|bgcolor(#99CC00):99C C00 |>|>|>| |bgcolor(#CC9900):~CC9 900 |bgcolor(#FFCC33):FFC C33 |bgcolor(#FFCC66):FFC C66 |bgcolor(#FF9966):~FF9 966 |bgcolor(#FF6633):@@color(white):~FF6 633@@ |bgcolor(#CC3300):@@color(white):~CC3 300@@ |>|>|>| |bgcolor(#CC0033):@@color(white):~CC0 033@@ |\n|bgcolor(#CCFF00):CCF F00 |bgcolor(#CCFF33):CCF F33 |bgcolor(#333300):@@color(white):333 300@@ |bgcolor(#666600):@@color(white):666 600@@ |bgcolor(#999900):999 900 |bgcolor(#CCCC00):CCC C00 |bgcolor(#FFFF00):FFF F00 |bgcolor(#CC9933):~CC9 933 |bgcolor(#CC6633):@@color(white):~CC6 633@@ |bgcolor(#330000):@@color(white):330 000@@ |bgcolor(#660000):@@color(white):660 000@@ |bgcolor(#990000):@@color(white):990 000@@ |bgcolor(#CC0000):@@color(white):~CC0 000@@ |bgcolor(#FF0000):@@color(white):~FF0 000@@ |bgcolor(#FF3366):@@color(white):~FF3 366@@ |bgcolor(#FF0033):@@color(white):~FF0 033@@ |\n|bgcolor(#99FF00):99F F00 |bgcolor(#CCFF66):CCF F66 |bgcolor(#99CC33):99C C33 |bgcolor(#666633):@@color(white):666 633@@ |bgcolor(#999933):999 933 |bgcolor(#CCCC33):CCC C33 |bgcolor(#FFFF33):FFF F33 |bgcolor(#996600):@@color(white):996 600@@ |bgcolor(#993300):@@color(white):993 300@@ |bgcolor(#663333):@@color(white):663 333@@ |bgcolor(#993333):@@color(white):993 333@@ |bgcolor(#CC3333):@@color(white):~CC3 333@@ |bgcolor(#FF3333):@@color(white):~FF3 333@@ |bgcolor(#CC3366):@@color(white):~CC3 366@@ |bgcolor(#FF6699):@@color(white):~FF6 699@@ |bgcolor(#FF0066):@@color(white):~FF0 066@@ |\n|bgcolor(#66FF00):66F F00 |bgcolor(#99FF66):99F F66 |bgcolor(#66CC33):66C C33 |bgcolor(#669900):669 900 |bgcolor(#999966):999 966 |bgcolor(#CCCC66):CCC C66 |bgcolor(#FFFF66):FFF F66 |bgcolor(#996633):@@color(white):996 633@@ |bgcolor(#663300):@@color(white):663 300@@ |bgcolor(#996666):@@color(white):996 666@@ |bgcolor(#CC6666):@@color(white):~CC6 666@@ |bgcolor(#FF6666):@@color(white):~FF6 666@@ |bgcolor(#990033):@@color(white):990 033@@ |bgcolor(#CC3399):@@color(white):~CC3 399@@ |bgcolor(#FF66CC):@@color(white):~FF6 6CC@@ |bgcolor(#FF0099):@@color(white):~FF0 099@@ |\n|bgcolor(#33FF00):33F F00 |bgcolor(#66FF33):66F F33 |bgcolor(#339900):339 900 |bgcolor(#66CC00):66C C00 |bgcolor(#99FF33):99F F33 |bgcolor(#CCCC99):CCC C99 |bgcolor(#FFFF99):FFF F99 |bgcolor(#CC9966):~CC9 966 |bgcolor(#CC6600):@@color(white):~CC6 600@@ |bgcolor(#CC9999):~CC9 999 |bgcolor(#FF9999):~FF9 999 |bgcolor(#FF3399):@@color(white):~FF3 399@@ |bgcolor(#CC0066):@@color(white):~CC0 066@@ |bgcolor(#990066):@@color(white):990 066@@ |bgcolor(#FF33CC):@@color(white):~FF3 3CC@@ |bgcolor(#FF00CC):@@color(white):~FF0 0CC@@ |\n|bgcolor(#00CC00):00C C00 |bgcolor(#33CC00):33C C00 |bgcolor(#336600):@@color(white):336 600@@ |bgcolor(#669933):669 933 |bgcolor(#99CC66):99C C66 |bgcolor(#CCFF99):CCF F99 |bgcolor(#FFFFCC):FFF FCC |bgcolor(#FFCC99):FFC C99 |bgcolor(#FF9933):~FF9 933 |bgcolor(#FFCCCC):FFC CCC |bgcolor(#FF99CC):~FF9 9CC |bgcolor(#CC6699):@@color(white):~CC6 699@@ |bgcolor(#993366):@@color(white):993 366@@ |bgcolor(#660033):@@color(white):660 033@@ |bgcolor(#CC0099):@@color(white):~CC0 099@@ |bgcolor(#330033):@@color(white):330 033@@ |\n|bgcolor(#33CC33):33C C33 |bgcolor(#66CC66):66C C66 |bgcolor(#00FF00):00F F00 |bgcolor(#33FF33):33F F33 |bgcolor(#66FF66):66F F66 |bgcolor(#99FF99):99F F99 |bgcolor(#CCFFCC):CCF FCC |>|>| |bgcolor(#CC99CC):~CC9 9CC |bgcolor(#996699):@@color(white):996 699@@ |bgcolor(#993399):@@color(white):993 399@@ |bgcolor(#990099):@@color(white):990 099@@ |bgcolor(#663366):@@color(white):663 366@@ |bgcolor(#660066):@@color(white):660 066@@ |\n|bgcolor(#006600):@@color(white):006 600@@ |bgcolor(#336633):@@color(white):336 633@@ |bgcolor(#009900):009 900 |bgcolor(#339933):339 933 |bgcolor(#669966):669 966 |bgcolor(#99CC99):99C C99 |>|>| |bgcolor(#FFCCFF):FFC CFF |bgcolor(#FF99FF):~FF9 9FF |bgcolor(#FF66FF):@@color(white):~FF6 6FF@@ |bgcolor(#FF33FF):@@color(white):~FF3 3FF@@ |bgcolor(#FF00FF):@@color(white):~FF0 0FF@@ |bgcolor(#CC66CC):@@color(white):~CC6 6CC@@ |bgcolor(#CC33CC):@@color(white):~CC3 3CC@@ |\n|bgcolor(#003300):@@color(white):003 300@@ |bgcolor(#00CC33):00C C33 |bgcolor(#006633):@@color(white):006 633@@ |bgcolor(#339966):339 966 |bgcolor(#66CC99):66C C99 |bgcolor(#99FFCC):99F FCC |bgcolor(#CCFFFF):CCF FFF |bgcolor(#3399FF):339 9FF |bgcolor(#99CCFF):99C CFF |bgcolor(#CCCCFF):CCC CFF |bgcolor(#CC99FF):~CC9 9FF |bgcolor(#9966CC):@@color(white):996 6CC@@ |bgcolor(#663399):@@color(white):663 399@@ |bgcolor(#330066):@@color(white):330 066@@ |bgcolor(#9900CC):@@color(white):990 0CC@@ |bgcolor(#CC00CC):@@color(white):~CC0 0CC@@ |\n|bgcolor(#00FF33):00F F33 |bgcolor(#33FF66):33F F66 |bgcolor(#009933):009 933 |bgcolor(#00CC66):00C C66 |bgcolor(#33FF99):33F F99 |bgcolor(#99FFFF):99F FFF |bgcolor(#99CCCC):99C CCC |bgcolor(#0066CC):@@color(white):006 6CC@@ |bgcolor(#6699CC):669 9CC |bgcolor(#9999FF):999 9FF |bgcolor(#9999CC):999 9CC |bgcolor(#9933FF):@@color(white):993 3FF@@ |bgcolor(#6600CC):@@color(white):660 0CC@@ |bgcolor(#660099):@@color(white):660 099@@ |bgcolor(#CC33FF):@@color(white):~CC3 3FF@@ |bgcolor(#CC00FF):@@color(white):~CC0 0FF@@ |\n|bgcolor(#00FF66):00F F66 |bgcolor(#66FF99):66F F99 |bgcolor(#33CC66):33C C66 |bgcolor(#009966):009 966 |bgcolor(#66FFFF):66F FFF |bgcolor(#66CCCC):66C CCC |bgcolor(#669999):669 999 |bgcolor(#003366):@@color(white):003 366@@ |bgcolor(#336699):@@color(white):336 699@@ |bgcolor(#6666FF):@@color(white):666 6FF@@ |bgcolor(#6666CC):@@color(white):666 6CC@@ |bgcolor(#666699):@@color(white):666 699@@ |bgcolor(#330099):@@color(white):330 099@@ |bgcolor(#9933CC):@@color(white):993 3CC@@ |bgcolor(#CC66FF):@@color(white):~CC6 6FF@@ |bgcolor(#9900FF):@@color(white):990 0FF@@ |\n|bgcolor(#00FF99):00F F99 |bgcolor(#66FFCC):66F FCC |bgcolor(#33CC99):33C C99 |bgcolor(#33FFFF):33F FFF |bgcolor(#33CCCC):33C CCC |bgcolor(#339999):339 999 |bgcolor(#336666):@@color(white):336 666@@ |bgcolor(#006699):@@color(white):006 699@@ |bgcolor(#003399):@@color(white):003 399@@ |bgcolor(#3333FF):@@color(white):333 3FF@@ |bgcolor(#3333CC):@@color(white):333 3CC@@ |bgcolor(#333399):@@color(white):333 399@@ |bgcolor(#333366):@@color(white):333 366@@ |bgcolor(#6633CC):@@color(white):663 3CC@@ |bgcolor(#9966FF):@@color(white):996 6FF@@ |bgcolor(#6600FF):@@color(white):660 0FF@@ |\n|bgcolor(#00FFCC):00F FCC |bgcolor(#33FFCC):33F FCC |bgcolor(#00FFFF):00F FFF |bgcolor(#00CCCC):00C CCC |bgcolor(#009999):009 999 |bgcolor(#006666):@@color(white):006 666@@ |bgcolor(#003333):@@color(white):003 333@@ |bgcolor(#3399CC):339 9CC |bgcolor(#3366CC):@@color(white):336 6CC@@ |bgcolor(#0000FF):@@color(white):000 0FF@@ |bgcolor(#0000CC):@@color(white):000 0CC@@ |bgcolor(#000099):@@color(white):000 099@@ |bgcolor(#000066):@@color(white):000 066@@ |bgcolor(#000033):@@color(white):000 033@@ |bgcolor(#6633FF):@@color(white):663 3FF@@ |bgcolor(#3300FF):@@color(white):330 0FF@@ |\n|bgcolor(#00CC99):00C C99 |>|>|>| |bgcolor(#0099CC):009 9CC |bgcolor(#33CCFF):33C CFF |bgcolor(#66CCFF):66C CFF |bgcolor(#6699FF):669 9FF |bgcolor(#3366FF):@@color(white):336 6FF@@ |bgcolor(#0033CC):@@color(white):003 3CC@@ |>|>|>| |bgcolor(#3300CC):@@color(white):330 0CC@@ |\n|>|>|>|>|>| |bgcolor(#00CCFF):00C CFF |bgcolor(#0099FF):009 9FF |bgcolor(#0066FF):@@color(white):006 6FF@@ |bgcolor(#0033FF):@@color(white):003 3FF@@ |>|>|>|>|>| |
!!!General configuration tiddler\n*MainMenu : Left Menu\n*SiteTitle : Title\n*SiteSubtitle : Subtitle\n*DefaultTiddlers : Tiddle on main page\n*SideBarOptions\n*OptionsPanel\n*SideBarTabs\n*TabTimeline\n*TabMore\n*TabMoreAll\n*TabMoreMissing\n*TabMoreOrphans\n*TabTags\n*[[systemConfig]]\n*EditTemplate\n*ViewTemplate\n*PageTemplate\n*StyleSheetColors\n*StyleSheetLayout\n\n!!List of macro\n<<listTags systemConfig title *>>\n\n!!List of disabled macro\n<<listTags disable title *>>
/***\n''Date Plugin for TiddlyWiki version 2.x''\n^^author: Eric Shulman - ELS Design Studios\nsource: http://www.TiddlyTools.com/#DatePlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n^^last update: <<date tiddler "DDD, MMM DDth, YYYY hh:0mm:0ss">>^^\n\nThere are quite a few calendar generators, reminders, to-do lists, 'dated tiddlers' journals, blog-makers and GTD-like schedule managers that have been built around TW. While they all have different purposes, and vary in format, interaction, and style, in one way or another each of these plugins displays and/or uses date-based information to make finding, accessing and managing relevant tiddlers easier. This plugin provides a general approach to embedding dates and date-based links/menus within tiddler content.\n\nYou can ''specify a date using a combination of year, month, and day number values or mathematical expressions (such as "Y+1" or "D+30")'', and then just display it as formatted date text, or create a ''link to a 'dated tiddler''' for quick blogging, or create a ''popup menu'' containing the dated tiddler link plus links to ''tiddlers that were changed'' as well as any ''scheduled reminders'' for that date.\n!!!!!Usage\n<<<\nWhen installed, this plugin defines a macro: {{{<<date [mode] [date] [format] [linkformat]>>}}}. All of the macro parameters are optional and, in it's simplest form, {{{<<date>>}}}, it is equivalent to the ~TiddlyWiki core macro, {{{<<today>>}}}.\n\nHowever, where {{{<<today>>}}} simply inserts the current date/time in a predefined format (or custom format, using {{{<<today [format]>>}}}), the {{{<<date>>}}} macro's parameters take it much further than that:\n* [mode] is either ''display'', ''link'' or ''popup''. If omitted, it defaults to ''display''. This param let's you select between simply displaying a formatted date, or creating a link to a specific 'date titled' tiddler or a popup menu containing a dated tiddler link, plus links to changes and reminders.\n* [date] lets you enter ANY date (not just today) as ''year, month, and day values or simple mathematical expressions'' using pre-defined variables, Y, M, and D for the current year, month and day, repectively. You can display the modification date of the current tiddler by using the keyword: ''tiddler'' in place of the year, month and day parameters. Use ''tiddler://name-of-tiddler//'' to display the modification date of a specific tiddler. You can also use keywords ''today'' or ''filedate'' to refer to these //dynamically changing// date/time values. \n* [format] and [linkformat] uses standard ~TiddlyWiki date formatting syntax. The default is "YYYY.0MM.0DD"\n>^^''DDD'' - day of week in full (eg, "Monday"), ''DD'' - day of month, ''0DD'' - adds leading zero^^\n>^^''MMM'' - month in full (eg, "July"), ''MM'' - month number, ''0MM'' - adds leading zero^^\n>^^''YYYY'' - full year, ''YY'' - two digit year, ''hh'' - hours, ''mm'' - minutes, ''ss'' - seconds^^\n>^^//note: use of hh, mm or ss format codes is only supported with ''tiddler'', ''today'' or ''filedate'' values//^^\n* [linkformat] - specify an alternative date format so that the title of a 'dated tiddler' link can have a format that differs from the date's displayed format\n\nIn addition to the macro syntax, DatePlugin also provides a public javascript API so that other plugins that work with dates (such as calendar generators, etc.) can quickly incorporate date formatted links or popups into their output:\n\n''{{{showDate(place, date, mode, format, linkformat, autostyle, weekend)}}}'' \n\nNote that in addition to the parameters provided by the macro interface, the javascript API also supports two optional true/false parameters:\n* [autostyle] - when true, the font/background styles of formatted dates are automatically adjusted to show the date's status: 'today' is boxed, 'changes' are bold, 'reminders' are underlined, while weekends and holidays (as well as changes and reminders) can each have a different background color to make them more visibly distinct from each other.\n* [weekend] - true indicates a weekend, false indicates a weekday. When this parameter is omitted, the plugin uses internal defaults to automatically determine when a given date falls on a weekend.\n<<<\n!!!!!Examples\n<<<\nThe current date: <<date>>\nThe current time: <<date today "0hh:0mm:0ss">>\nToday's blog: <<date link today "DDD, MMM DDth, YYYY">>\nRecent blogs/changes/reminders: <<date popup Y M D-1 "yesterday">> <<date popup today "today">> <<date popup Y M D+1 "tomorrow">>\nThe first day of next month will be a <<date Y M+1 1 "DDD">>\nThis tiddler (DatePlugin) was last updated on: <<date tiddler "DDD, MMM DDth, YYYY">>\nThe SiteUrl was last updated on: <<date tiddler:SiteUrl "DDD, MMM DDth, YYYY">>\nThis document was last saved on <<date filedate "DDD, MMM DDth, YYYY at 0hh:0mm:0ss">>\n<<date 2006 07 24 "MMM DDth, YYYY">> will be a <<date 2006 07 24 "DDD">>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''DatePlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.02.14 [2.0.5]''\nwhen readOnly is set (by TW core), omit "new reminders..." popup menu item and, if a "dated tiddler" does not already exist, display the date as simple text instead of a link.\n''2006.02.05 [2.0.4]''\nadded var to variables that were unintentionally global. Avoids FireFox crash bug when referencing global variables\n''2006.01.18 [2.0.3]''\nIn 1.2.x the tiddler editor's text area control was given an element ID=("tiddlerBody"+title), so that it was easy to locate this field and programmatically modify its content. With the addition of configuration templates in 2.x, the textarea no longer has an ID assigned. To find this control we now look through all the child nodes of the tiddler editor to locate a "textarea" control where attribute("edit") equals "text", and then append the new reminder to the contents of that control.\n''2006.01.11 [2.0.2]''\ncorrect 'weekend' override detection logic in showDate()\n''2006.01.10 [2.0.1]''\nallow custom-defined weekend days (default defined in config.macros.date.weekend[] array)\nadded flag param to showDate() API to override internal weekend[] array\n''2005.12.27 [2.0.0]''\nUpdate for TW2.0\nAdded parameter handling for 'linkformat'\n''2005.12.21 [1.2.2]''\nFF's date.getYear() function returns 105 (for the current year, 2005). When calculating a date value from Y M and D expressions, the plugin adds 1900 to the returned year value get the current year number. But IE's date.getYear() already returns 2005. As a result, plugin calculated date values on IE were incorrect (e.g., 3905 instead of 2005). Adding +1900 is now conditional so the values will be correct on both browsers.\n''2005.11.07 [1.2.1]''\nadded support for "tiddler" dynamic date parameter\n''2005.11.06 [1.2.0]''\nadded support for "tiddler:title" dynamic date parameter\n''2005.11.03 [1.1.2]''\nwhen a reminder doesn't have a specified title parameter, use the title of the tiddler that contains the reminder as "fallback" text in the popup menu. Based on a suggestion from BenjaminKudria.\n''2005.11.03 [1.1.1]''\nTemporarily bypass hasReminders() logic to avoid excessive overhead from generating the indexReminders() cache. While reminders can still appear in the popup menu, they just won't be indicated by auto-styling the date number that is displayed. This single change saves approx. 60% overhead (5 second delay reduced to under 2 seconds).\n''2005.11.01 [1.1.0]''\ncorrected logic in hasModifieds() and hasReminders() so caching of indexed modifieds and reminders is done just once, as intended. This should hopefully speed up calendar generators and other plugins that render multiple dates...\n''2005.10.31 [1.0.1]''\ndocumentation and code cleanup\n''2005.10.31 [1.0.0]''\ninitial public release\n''2005.10.30 [0.9.0]''\npre-release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.date = {major: 2, minor: 0, revision: 5, date: new Date(2006,2,14)};\n//}}}\n\n//{{{\n// 1.2.x compatibility\nif (!window.story) window.story=window;\nif (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}\nif (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}\nif (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}\n//}}}\n\n//{{{\nconfig.macros.date = {\n format: "YYYY.0MM.0DD", // default date display format\n linkformat: "YYYY.0MM.0DD", // 'dated tiddler' link format\n weekendbg: "#c0c0c0", // "cocoa"\n holidaybg: "#c0ffee", // "coffee"\n modifiedsbg: "#bbeeff", // "beef"\n remindersbg: "#F3A946", // "face"\n holidays: [ "01/01", "05/01", "05/08", "07/14" ], \n 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 ]\n};\n//}}}\n\n//{{{\nconfig.macros.date.handler = function(place,macroName,params)\n{\n // do we want to see a link, a popup, or just a formatted date?\n var mode="display";\n if (params[0]=="display") { mode=params[0]; params.shift(); }\n if (params[0]=="popup") { mode=params[0]; params.shift(); }\n if (params[0]=="link") { mode=params[0]; params.shift(); }\n // get the date\n var now = new Date();\n var date = now;\n if (!params[0] || params[0]=="today")\n { params.shift(); }\n else if (params[0]=="filedate")\n { date=new Date(document.lastModified); params.shift(); }\n else if (params[0]=="tiddler")\n { date=store.getTiddler(story.findContainingTiddler(place).id.substr(7)).modified; params.shift(); }\n else if (params[0].substr(0,8)=="tiddler:")\n { var t; if ((t=store.getTiddler(params[0].substr(8)))) date=t.modified; params.shift(); }\n else {\n var y = eval(params.shift().replace(/Y/ig,(now.getYear()<1900)?now.getYear()+1900:now.getYear()));\n var m = eval(params.shift().replace(/M/ig,now.getMonth()+1));\n var d = eval(params.shift().replace(/D/ig,now.getDate()+0));\n date = new Date(y,m-1,d);\n }\n // date format with optional custom override\n var format=this.format; if (params[0]) format=params.shift();\n var linkformat=this.linkformat; if (params[0]) linkformat=params.shift();\n showDate(place,date,mode,format,linkformat);\n}\n//}}}\n\n//{{{\nwindow.showDate=showDate;\nfunction showDate(place,date,mode,format,linkformat,autostyle,weekend)\n{\n if (!mode) mode="display";\n if (!format) format=config.macros.date.format;\n if (!linkformat) linkformat=config.macros.date.linkformat;\n if (!autostyle) autostyle=false;\n\n // format the date output\n var title = date.formatString(format);\n var linkto = date.formatString(linkformat);\n\n // just show the formatted output\n if (mode=="display") { place.appendChild(document.createTextNode(title)); return; }\n\n // link to a 'dated tiddler'\n var link = createTiddlyLink(place, linkto, false);\n link.appendChild(document.createTextNode(title));\n link.title = linkto;\n link.date = date;\n link.format = format;\n link.linkformat = linkformat;\n\n // if using a popup menu, replace click handler for dated tiddler link\n // with handler for popup and make link text non-italic (i.e., an 'existing link' look)\n if (mode=="popup") {\n link.onclick = onClickDatePopup;\n link.style.fontStyle="normal";\n }\n\n // format the popup link to show what kind of info it contains (for use with calendar generators)\n if (!autostyle) return;\n if (hasModifieds(date))\n { link.style.fontStyle="normal"; link.style.fontWeight="bold"; }\n if (hasReminders(date))\n { link.style.textDecoration="underline"; }\n if(isToday(date))\n { link.style.border="1px solid black"; }\n\n if( (weekend!=undefined?weekend:isWeekend(date)) && (config.macros.date.weekendbg!="") )\n { place.style.background = config.macros.date.weekendbg; }\n if(isHoliday(date)&&(config.macros.date.holidaybg!=""))\n { place.style.background = config.macros.date.holidaybg; }\n if (hasModifieds(date)&&(config.macros.date.modifiedsbg!=""))\n { place.style.background = config.macros.date.modifiedsbg; }\n if (hasReminders(date)&&(config.macros.date.remindersbg!=""))\n { place.style.background = config.macros.date.remindersbg; }\n}\n//}}}\n\n//{{{\nfunction isToday(date) // returns true if date is today\n { var now=new Date(); return ((now-date>=0) && (now-date<86400000)); }\n\nfunction isWeekend(date) // returns true if date is a weekend\n { return (config.macros.date.weekend[date.getDay()]); }\n\nfunction isHoliday(date) // returns true if date is a holiday\n{\n var longHoliday = date.formatString("0MM/0DD/YYYY");\n var shortHoliday = date.formatString("0MM/0DD");\n for(var i = 0; i < config.macros.date.holidays.length; i++) {\n var holiday=config.macros.date.holidays[i];\n if (holiday==longHoliday||holiday==shortHoliday) return true;\n }\n return false;\n}\n//}}}\n\n//{{{\n// Event handler for clicking on a day popup\nfunction onClickDatePopup(e)\n{\n if (!e) var e = window.event;\n var theTarget = resolveTarget(e);\n var popup = createTiddlerPopup(this);\n if(popup) {\n // always show dated tiddler link (or just date, if readOnly) at the top...\n if (!readOnly || store.tiddlerExists(this.date.formatString(this.linkformat)))\n createTiddlyLink(popup,this.date.formatString(this.linkformat),true);\n else\n createTiddlyText(popup,this.date.formatString(this.linkformat));\n addModifiedsToPopup(popup,this.date,this.format);\n addRemindersToPopup(popup,this.date,this.linkformat);\n }\n scrollToTiddlerPopup(popup,false);\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return(false);\n}\n//}}}\n\n//{{{\nfunction indexModifieds() // build list of tiddlers, hash indexed by modification date\n{\n var modifieds= { };\n var tiddlers = store.getTiddlers("title");\n for (var t = 0; t < tiddlers.length; t++) {\n var date = tiddlers[t].modified.formatString("YYYY0MM0DD")\n if (!modifieds[date])\n modifieds[date]=new Array();\n modifieds[date].push(tiddlers[t].title);\n }\n return modifieds;\n}\nfunction hasModifieds(date) // returns true if date has modified tiddlers\n{\n if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();\n return (config.macros.date.modifieds[date.formatString("YYYY0MM0DD")]!=undefined);\n}\n\nfunction addModifiedsToPopup(popup,when,format)\n{\n if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();\n var indent=String.fromCharCode(160)+String.fromCharCode(160);\n var mods = config.macros.date.modifieds[when.formatString("YYYY0MM0DD")];\n if (mods) {\n mods.sort();\n var e=createTiddlyElement(popup,"div",null,null,"changes:");\n for(var t=0; t<mods.length; t++) {\n var link=createTiddlyLink(popup,mods[t],false);\n link.appendChild(document.createTextNode(indent+mods[t]));\n createTiddlyElement(popup,"br",null,null,null);\n }\n }\n}\n//}}}\n\n//{{{\nfunction indexReminders() // build list of tiddlers with reminders, hash indexed by reminder date\n{\n var reminders = { };\n\n if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed\n\n var matches = store.search("reminder",false,false,"title","excludeSearch");\n var macroPattern = "<<([^>\s\ss]+)(?:\s\ss*)([^>]*)>>";\n var macroRegExp = new RegExp(macroPattern,"mg");\n var arr = [];\n for(var t=matches.length-1; t>=0; t--)\n {\n var targetText = matches[t].text;\n do {\n // Get the next formatting match\n var formatMatch = macroRegExp.exec(targetText);\n if(formatMatch)\n {\n if (formatMatch[1] != null && formatMatch[1].toLowerCase() == "reminder")\n {\n //Find the matching date.\n var params = formatMatch[2].readMacroParams();\n var dateHash = getParamsForReminder(params);\n var date = findDateForReminder(dateHash);\n if (date != null)\n {\n var dateindex = date.formatString("YYYY0MM0DD")\n if (!reminders[dateindex])\n reminders[dateindex]=new Array();\n reminders[dateindex].pushUnique(t);\n }\n }\n }\n } while(formatMatch);\n }\n return reminders;\n}\n\nfunction hasReminders(date) // returns true if date has reminders\n{\n if (window.reminderCacheForCalendar != null)\n return window.reminderCacheForCalendar[date] != null;\n return false; // ELS 2005.11.03: BYPASS due to performance issues\n if (!config.macros.date.reminders) config.macros.date.reminders = indexReminders();\n return (config.macros.date.reminders[date.formatString("YYYY0MM0DD")]!=undefined);\n}\n\nfunction addRemindersToPopup(popup,when,format)\n{\n if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed\n\n var indent = String.fromCharCode(160)+String.fromCharCode(160);\n var reminders=findTiddlersWithReminders(when, [0,31],null,1);\n var e=createTiddlyElement(popup,"div",null,null,"reminders:"+(!reminders.length?" none":""));\n for(var t=0; t<reminders.length; t++) {\n link = createTiddlyLink(popup,reminders[t].tiddler,false);\n var diff=reminders[t].diff;\n diff=(!diff)?"Today":((diff==1)?"Tomorrow":diff+" days");\n var txt=(reminders[t].params["title"])?reminders[t].params["title"]:reminders[t].tiddler;\n link.appendChild(document.createTextNode(indent+diff+" - "+txt));\n createTiddlyElement(popup,"br",null,null,null);\n }\n if (readOnly) return; // omit "new reminder..." link\n var link = createTiddlyLink(popup,indent+"new reminder...",true); createTiddlyElement(popup,"br");\n var title = when.formatString(format);\n link.title="add a reminder to '"+title+"'";\n link.onclick = function() {\n // show tiddler editor\n story.displayTiddler(null, title, 2, null, null, false, false);\n // find body 'textarea'\n var c =document.getElementById("tiddler" + title).getElementsByTagName("*");\n for (var i=0; i<c.length; i++) if ((c[i].tagName.toLowerCase()=="textarea") && (c[i].getAttribute("edit")=="text")) break;\n // append reminder macro to tiddler content\n if (i<c.length) {\n if (store.tiddlerExists(title)) c[i].value+="\sn"; else c[i].value="";\n c[i].value += "<<reminder day:"+when.getDate()+" month:"+(when.getMonth()+1)+" year:"+(when.getFullYear())+' title:"Enter a title" >>';\n }\n };\n}\n//}}}\n
// use <<displayDefaultTiddlers 'Home Page'>>\n// <<displayDefaultTiddlers>>\n\nversion.extensions.displayDefaultTiddlers = {major: 0, minor: 1, revision: 0, date:new Date(2005,8,23)};\nconfig.macros.displayDefaultTiddlers = {label: "default tiddlers", prompt: "Display default tiddlers"};\n \nconfig.macros.displayDefaultTiddlers .handler = function(place,macroName,params) {\n var displayDefaultTiddlersFunc = function () {\n var start = store.getTiddlerText("DefaultTiddlers");\n story.closeAllTiddlers();\n story.displayTiddlers(null,start.readBracketedList());\n }\n if (params[0]==null) {\n createTiddlyButton(place,this.label,this.prompt,displayDefaultTiddlersFunc);\n } else {\n createTiddlyButton(place,params[0],this.prompt,displayDefaultTiddlersFunc);\n }\n }
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>\n<div class='title' macro='view title'></div>\n<div class='editor' macro='edit title'></div>\n<div class='editor' macro='edit text'></div>\n<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='tagChooser'></span>\n<span macro='view modifier'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span>\n<span macro='message views.editor.tagPrompt'></span></div>
version.extensions.favicon = {major: 0, minor: 1, revision: 0, date:\n"18 July 2005"};\nvar n = document.createElement("link");\nn.rel = "shortcut icon";\nn.href = "http://www.zrenard.com/favicon.ico";\ndocument.getElementsByTagName("head")[0].appendChild(n);
/***\n|FileDropPlugin|h\n|author : BradleyMeck|\n|version : 0.0.1|\n|date : Nov 07 2006|\n|usage : drag a file onto the TW to have it be made into a tiddler|\n|browser(s) supported : Mozilla|\n***/\n\n//{{{\nconfig.macros.fileDrop = {varsion : {major : 0, minor : 0, revision: 1}};\n\nconfig.macros.fileDrop.dragDropHandler = function(evt) {\n\n netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');\n // Load in the native DragService manager from the browser.\n var dragService = Components.classes["@mozilla.org/widget/dragservice;1"].getService(Components.interfaces.nsIDragService);\n\n // Load in the currently-executing Drag/drop session.\n var dragSession = dragService.getCurrentSession();\n\n // Create an instance of an nsITransferable object using reflection.\n var transferObject = Components.classes["@mozilla.org/widget/transferable;1"].createInstance();\n\n // Bind the object explicitly to the nsITransferable interface. We need to do this to ensure that\n // methods and properties are present and work as expected later on.\n transferObject = transferObject.QueryInterface(Components.interfaces.nsITransferable);\n\n // I've chosen to add only the x-moz-file MIME type. Any type can be added, and the data for that format\n // will be retrieved from the Drag/drop service.\n transferObject.addDataFlavor("application/x-moz-file");\n\n // Get the number of items currently being dropped in this drag/drop operation.\n var numItems = dragSession.numDropItems;\n for (var i = 0; i < numItems; i++)\n {\n // Get the data for the given drag item from the drag session into our prepared\n // Transfer object.\n dragSession.getData(transferObject, i);\n\n // We need to pass in Javascript 'Object's to any XPConnect method which\n // requires OUT parameters. The out value will then be saved as a new\n // property called Object.value.\n var dataObj = {};\n var dropSizeObj = {};\n\n // Get the Mozilla File data type from the ITransferable object.\n transferObject.getTransferData("application/x-moz-file", dataObj, dropSizeObj);\n\n // Cast the returned data object as an nsIFile so that we can retrieve it's filename\n var droppedFile = dataObj.value.QueryInterface(Components.interfaces.nsIFile);\n\n // Display all of the returned parameters with an Alert dialog.\n config.macros.fileDrop.dropped(droppedFile.path);\n }\n\n // Since the event is handled, prevent it from going to a higher-level event handler.\n evt.stopPropagation();\n evt.preventDefault();\n}\n\nif(!window.event)\n{\n // Register the event handler, and set the 'capture' flag to true so we get this event\n // before it bubbles up through the browser.\n window.addEventListener("dragdrop", config.macros.fileDrop.dragDropHandler , true);\n}\n\nconfig.macros.fileDrop.dropped = function(str) {\n if(confirm("You have dropped the file \s""+str+"\s" onto the page, it will be imported as a tiddler named \s""+str+"\s". Is that ok?")) {\n var theTitle=str;\n var theText = "";\n theText += 'attachment: '+'[['+theTitle+'|'+theTitle+']]'+'\sn';\n theText += '>attached on: '+(new Date()).formatString(config.macros.timeline.dateFormat)+' by '+config.options.txtUserName+'\sn';\n var theLocation = str.replace(/\s\s/g,"/");\n\nnetscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\n file.initWithPath(str);\n if (!file.exists())\n return(null);\n\n theText+='> true file size : ' + file.fileSize + '\sn';\n\n var theData = "";\n\n var inputStream2 = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);\n inputStream2.init(file, 0x01, 00004, null);\n var sis = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);\n sis.setInputStream( inputStream2);\n theData = sis.readBytes ( sis.available() );\n var theEncoded = encodeBase64(theData);\n var theTags = "attachment excludeMissing";\n var theExt = theLocation.substr(theLocation.lastIndexOf('.')+1).toLowerCase();\n for (var i=0; i<config.MIMETypes.length; i++)\n if (config.MIMETypes[i][0].indexOf(theExt)!=-1) { var theMIMEType=config.MIMETypes[i][1]; break; }\n theText += '>MIME type: '+theMIMEType+'\sn>original size:'+theData.length+' bytes\sn>encoded size: '+theEncoded.length+' bytes\sn';\n\n var theTarget="data:"+theMIMEType+';base64,\sn'+theEncoded.replace('\s\sn','');\n if (theMIMEType.substr(0,5)=="image") theText+='[img['+theTitle+'|'+theTitle+']]\sn';\n theText += '/%\snBINARY DATA - DO NOT EDIT BELOW THIS POINT\sn----\sn'+theMIMEType+';base64,\sn'+theEncoded+'\sn----\sn%/';\n\n if (theMIMEType == 'text/xml' || theMIMEType == 'text/plain') {\n if(confirm("Binary attachement. Is that ok?")) {\n store.saveTiddler(theTitle,theTitle,theText,config.options.txtUserName,new Date(),theTags);\n } else {\n store.saveTiddler(theTitle,theTitle,theData,config.options.txtUserName,new Date(),theTags);\n }\n} else {\n store.saveTiddler(theTitle,theTitle,theText,config.options.txtUserName,new Date(),theTags);\n}\n\n story.displayTiddler(null,theTitle);\n story.refreshTiddler(theTitle,null,true);\n clearMessage();\n displayMessage('Attached '+theTitle);\n }\n};\n//}}}
<html>\n<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>\n<iframe style="background-color:#ffffff; border-color:#ffffff; border:none;" width="113" height="151" frameborder="0" scrolling="no" src="http://www.flickr.com/apps/badge/badge_iframe.gne?zg_bg_color=ffffff&zg_person_id=16512503%40N00" title="Flickr Badge"></iframe>\n</html>
[[Google Calendar|http://www.google.com/calendar/]]\n\n<html><iframe src="http://www.google.com/calendar/" width="650" height="500" scrolling="yes"\nname="content"></iframe></html>
<<listTags help title *>>\n[[Image]]\n\n[[Configuration]]\n\n<<sparkline 163 218 231 236 232 266 176 249 289 1041 1835 2285 3098 2101 1755 3283 3353 3335 2898 2224 1404 1354 1825 1839 2142 1942 1784 1145 979 1328 1611>>
//Picto\nconfig.macros["picto"] = { text: "picto" };\nconfig.macros.picto.handler = function(place,macroName,params) {\n var pic= document.createElement("img");\n var data = params;\n if(data[0] == "warn")\npic.src='data:image/gif;base64,R0lGODlhEAAQAPcAAB0fVzgySX02Cn04C30/D39bQ311Xnd4eF9mlltlnFpnoHN7j3B9nnB7oIE9DoZHEotRGJBaHoNdPpZlJJptKZ92LqN7Jql5LqN9MpZ9YrWGGKaDNqSHN6qJOrCLOKqETqGFXaiKUq2RZ6eRe7WYdrebfrugaNycDs2fMcumNe22H/+zAv+2Bf+3CP+6Cv+/EcSdRcWvVNK+TsOxcf/BFf/EGP/IHv/BIv/IIP3KKP/QL/3TMO7LUfjWR/3ZQPrZTvrbXvrpT/bpV//lVvriYfnoZvLpdP/kd//odPrue//waoyQs5Wfqreghb6jh76vi7ysn7yxq8CjgsSwmMyzmMSzoca6r9bDrtXKvuXZr//qiv/1hv/6hvrymv/9lf/9l/jttP/2oP/9o9LIwNTOytjRyvHmy//+xf/+3/n25P7+6v///wAAARL2TBW1qAAABAAAARL2TBW1qAAAAgAAJgAAAAAAOQAAE////wAAAAAAJgAAAAAAAQAAJgAAAAEKlnWegRW1qBVmuMjQ1PQhIRR14AAAOBUAAAAAAAEPmwAAOgAABAAAExL2kHZ14AEhyQAAAAAAAAAAAgAAAQAAAAAAAAAAAMjQ1PQhIRR14AAAAAAAAOE6kAAAAAAAAQAAAgAAAAEhyfQgDvQx6QEhyfQgDvQx6YCAgBL2BOFy5AEhyQAAARL2UPQc8AEhyfQx5Pd5oABAAAoWHvQwmQoWHhL2UPQc8AEhyQCPChL2vOFxxgoAAMjQ1PQhIRR14AAADwAAAAAAAAAAAAABkAAAAAAAAGEATWwAcnQAZQAAdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAele/AYMLBL2wHPoNcjQ1PQhIRR14MjQ1BL2wHPoO8jQ1PQhIRR14AAAAQohyBL3iHIhMQYMLBL3EAAADxR14OGqiAAAAHWVyxW1qBVozBW1qAAAAAAQAAAAAUl2QRVoAQAABAAAAAEhyQAAAAAAAAAAAB0fVx0fVyH5BAEAAGsALAAAAAAQABAABwjAANcIHLhGihSCCBEaTMhwihkeUxgipBJmCAyJA52k8aKkBwmMWK6gYcIACYoxEkuoOdNAgRYcHxhWySLGy4IER2ycgJLQxBYlSg4kAEJjxQWETYz4WGoAQY8VLVSMGFgmxo4aOHBsWHJjRY0dHsgIFBFkhdkVGiy4qKHjR5EMa6zI2EHjhQsXAQAc2TGkCJcZUUII8bFDRw4cKZ4A+UEkSRcwEkB02IChAoUJESA8cCDAwYABBSRTtoxZM+fPoAMCADs='; else if(data[0] == "ok")\npic.src='data:image/gif;base64,R0lGODlhEAAQAPcAADlqNjtuODtwN0dvRE5tTUl2QUx2SzKCKDqKMDebKj2YMUGbNUmDREyVQ1COSViaU121UWWNZWmBaWmcZneQd3qWenqYemCiXWCoWGSwXGW/WmSoYGq3YGq5YHGob3G7a3+7eGnFXW3JYXHEZnTIaXnEcHDSZHnSbn/dc4CsfoHHeIDfdIPjdoXmeIXreIntfIvxfoGhgYiniJGykYrJgpTLjZjBk57HmJTTjI73gZDhhJDvg5D6g5j/iqvNpqrapL3YuqH/kbHjqsLkvs7pysz//+Tx4/n7+QAAABNVSBL2UOE6sBL2DAEkEPQ1qxL0aAAADwAAAAAAAAAAAAABkAAAAAAAAGEATWwAcnQAZQAAdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAP///xL1KHF87HF+3QAAARL2TBW1uAAABAAAARL2TBW1uAAAAgAAJgAAAAAAOQAAE////wAAAAAAJgAAAAAAAQAAJgAAAAEbsnWegRW1uBW+yMjQ1PQhIRR2CAAAOBUAAAAAAAEV/AAAOgAABAAAExL2kHZ14AEkEAAAAAAAAAAAAgAAAQAAAAAAAAAAAMjQ1PQhIRR2CAAAAAAAAOE6kAAAAAAAAQAAAgAAAAEkEPQgDvQx6QEkEPQgDvQx6YCAgBL2BOFy5AEkEAAAARL2UPQc8AEkEPQx5Pd5oABAAAoQ5PQwmQoQ5BL2UPQc8AEkEABCChL2vOFxxgoAAMjQ1PQhIRR2CAAADwAAAAAAAAAAAAABkAAAAAAAAGEATWwAcnQAZQAAdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAele/FcM3hL2wHPoNcjQ1PQhIRR2CMjQ1BL2wHPoO8jQ1PQhIRR2CAAAAQoeZhL3iHIhMVcM3hL3EAAADxR2COGqiAAAAHWVyxW1uBXA3BW1uAAAAAAQAAAAAUl2QRXAAQAABBL4RAEkEAAAAAAAAAAAADlqNjlqNiH5BAAAAAAALAAAAAAQABAABwjdAI8IFDjDw4YLE2IMXHhkxocdPGC8YEFig8KFKXQE6RGxBQoNJDJEGDhDI8ccE0M08HACgwWBH4Js5IFyhQIgRX50YNBwR4+TLliIaFCkSIkOFyp44EEThguPC3wUGdKhQwYDG3K4SAABxQoRCIqq6MAhA4ALLkyAKAJCxAIbRYiQ5YABwIQVLIgUvXGgKA0OdDEMkEHixAkhRYsaIYsBwwMJRx6QmIwjcQ3AjQUIjJGBxIgRJYwYCYzBAWSBETBU7eBBRWAHBBhaYICBbgbHAk4zPELBQIAABXQLDAgAOw==';\n if (!pic.src=="") place.appendChild(pic); else createTiddlyElement(place,"span",null,null, "no pics");\n}\n\n//Image\nconfig.macros["image"] = { text: "image" };\nconfig.macros.image.handler = function(place,macroName,params) {\nvar wrapper = createTiddlyElement(place,"span",null,params[1] ? params[1] : null,null);\n var text = store.getTiddlerText(params[0]);\n if(text)\n wikify(text,wrapper,null,null);\n}
// listtags tagname * or # or nothing\n// adding parameters to limit number of items (limit:number)\n// adding parameters to reverse order (reverse)\n\nversion.extensions.listTags = {major: 0, minor: 1, revision: 0};\nconfig.macros.listTags = { text: "" };\nconfig.macros.listTags.handler = function(place,macroName,params)\n{ var limit=0;\n for(var t=0; t<params.length; t++) {\n type = params[t].split(":")[0].toLowerCase();\n if (type == "limit")\n limit = parseInt(params[t].split(":")[1]);\n if (type == "reverse")\n reverse= true;\n else\n reverse = false;\n }\n var tagged = store.getTaggedTiddlers(params[0],params[1]); //Second parameter is field to sort by (eg, title, modified, modifier or text)\n\nvar string = "";\nif (limit==0) limit = tagged.length; else limit=(limit>tagged.length) ? tagged.length : limit;\n\n if (reverse==true) {\nfor(var r=tagged.length-1;r>=(tagged.length-limit)&&r>=0;r--) {\n if(params[2]) string = string + params[2] + " ";\n if(r>(tagged.length-limit)) {\n string = string + "[[" + tagged[r].title + "]]\sn";\n } else {\n string = string + "[[" + tagged[r].title + "]]";\n }\n}\n } else {\nfor(var r=0;r<limit;r++) {\n if(params[2]) string = string + params[2] + " ";\n if (r<limit-1) {\n string = string + "[[" + tagged[r].title + "]]\sn";\n } else {\n string = string + "[[" + tagged[r].title + "]]";\n }\n}\n }\n\nwikify(string, place, null, null);\n}
<<displayDefaultTiddlers 'Home Page'>>\n!![[Main|MainMenu]]\n[[Journal]]\n[[Notes|notes]]\n\n<<calendar thismonth>>\n\n!![[TagCloud]]\n<<tagCloud attachment systemTiddlers systemConfig macrotest TiddlerTemplates V2.0 excludeMissing>>\n!!Templates\n<<listTags TiddlerTemplates>>\n!!Tools\n[[Reminder]]\n[[Attachments]]\n[[Flickr]]\n[[Google Calendar]]\n!!Misc\n[[Contacts]]\nBookMarks\n[[Configuration]]\n[[Help]]
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'>\n\n<div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>Loading...</b><br/>Please Wait<br/><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
|!Subject |>| !name |\n|!Chairman |>|_FoX_ |\n|!Participant |>|- |\n|!Description | !Items | !Timming |\n|~|>|blah |\n|!Aim |>|blah |\n!Progress\nstuff\n!Actions\n| !Participant | !Action | !Status |\n|!_FoX_ |Minutes and finalization |bgcolor(#a0ffa0): Done |\n!Schedule\n<<newReminder>>
/***\n|''Name'' |TiddlerTemplatesMacros|\n|''Version'' |1.0|\n|''Source'' |http://www.kultofbubb.net/tiddlywiki/|\n|''Author'' |[[RichCarrillo|mailto://RichCarrillo@gmail.com]]|\n|''Type'' |Macros|\n|''Required'' |[[TiddlyWiki|http://www.tiddlywiki.com]] 2.0+|\n|''License'' ||\n|''Documentation''| TiddlerTemplatesMacrosDocumentation|\n\n!Code\n***/\n//{{{\n// Drop down indicator for pop-up menu buttons\nvar dropdownchar = (document.all?"▼":"▾") // the fat one is the only one that works in IE\n\nversion.extensions.TiddlerTemplatesMacros = {\n major: 0, minor: 9, revision: 0,\n date: new Date(2006, 2, 21), \n type: 'macro',\n source: "http://www.kultofbubb.net/tiddlywiki/index.html#TiddlerTemplatesMacros"\n};\n\n// shadow tiddler to provide basic syntax and link to full documentation\nconfig.shadowTiddlers.TiddlerTemplatesMacrosDocumentation = "[[Full Documentation|http://www.kultofbubb.net/tiddlywiki/index.html#TiddlerTemplatesMacrosDocumentation]]\sn"; \n\nconfig.macros.newFromTemplate = {}\nconfig.macros.newFromTemplatePopup = {}\nconfig.macros.newFromTemplateButton = {}\n\n// The tiddlerTemplatesMacros object just holds default settings, messages and common functions used by the other macros\nconfig.macros.tiddlerTemplatesMacros = {\n // messages\n label: "New...",\n tooltip: "Create a tiddler from a Template",\n titlePrefix: "New",\n errorNoTemplates: "No templates found! Add the tag '%0' to a tiddler you would like to use as a template",\n errorNoTemplateTiddler: "The template tiddler: '%0', could not be found.",\n errorMissingRequiredParam: "Missing a required parameter: %0 ",\n errorTiddlerAlreadyExists: "The tiddler: %0 already exists!",\n\n // default settings\n templateTag: "TiddlerTemplates",\n\n // common functions used by other macros\n myReadMacroParams: function(paramString){\n var regexpMacroParam = new\n RegExp("(?:\s\ss*)(?:(?:\s"((?:(?:\s\s\s\s\s")|[^\s"])*)\s")|(?:'((?:(?:\s\s\s\s\s')|[^'])*)')|(?:\s\s[\s\s[([^\s\s]]*)\s\s]\s\s])|([^\s"'\s\ss][^\s"'\s\ss]*))","mg");\n var params = [];\n do {\n var match = regexpMacroParam.exec(paramString);\n if(match){\n if(match[1]) // Double quoted\n params.push(match[1]);\n else if(match[2]) // Single quoted\n params.push(match[2]);\n else if(match[3]) // Double-square-bracket quoted\n params.push(match[3]);\n else if(match[4]) // Unquoted\n params.push(match[4]);\n }\n } while(match);\n return params;\n }, // closes myReadMacroParams function definition\n\n reparseParams: function( params ) {\n var s = params.join(" ");\n var re = /([^:\ss]*):["]([^"]*)["]/g ;\n var ret = new Array() ;\n var m ;\n while( (m = re.exec( s )) != null ) ret[ m[1] ] = m[2] ;\n return ret ;\n }, // closes reparseParams function definition\n\n getTiddlerEditField: function(title,field){\n var tiddler = document.getElementById(story.idPrefix + title);\n if(tiddler != null){\n var children = tiddler.getElementsByTagName("*")\n var e = null;\n for (var t=0; t<children.length; t++){\n var c = children[t];\n if(c.tagName.toLowerCase() == "input" || c.tagName.toLowerCase() == "textarea"){\n if(!e) {e = c;}\n if(c.getAttribute("edit") == field){e = c;}\n }\n }\n if(e){return e;}\n }\n }, // closes getTiddlerEditField function definition\n\n newFromTemplate: function(event){\n var title = this.getAttribute("templateTitle");\n if (this.getAttribute("tagToAdd")) {var tagToAdd = this.getAttribute("tagToAdd");}\n if (this.getAttribute("tagToStrip")) {var tagToStrip = this.getAttribute("tagToStrip");}\n\n // get the template and extract its info\n var template = store.getTiddler(title);\n var newTitle = config.macros.tiddlerTemplatesMacros.titlePrefix+template.title;\n var newText = template.text;\n var newTags = template.getTags();\n \n // if a tiddler by this name already exists, show an error message and quit\n if (store.getTiddler(newTitle)) {\ndisplayMessage(config.macros.tiddlerTemplatesMacros.errorTiddlerAlreadyExists.format([newTitle]));\n story.displayTiddler(null,newTitle,DEFAULT_VIEW_TEMPLATE);\n return;\n }\n // create new tiddler\n story.displayTiddler(null,newTitle,DEFAULT_EDIT_TEMPLATE);\n\n // grab the new Tiddlers text edit box\n var tiddlerTextArea = config.macros.tiddlerTemplatesMacros.getTiddlerEditField(newTitle,"text");\n var tiddlerTagArea = config.macros.tiddlerTemplatesMacros.getTiddlerEditField(newTitle,"tags");\n\n // Stuff template info into newly created tiddler\n tiddlerTextArea.value=newText;\n if (tagToAdd){newTags += " " + String.encodeTiddlyLink(tagToAdd);}\n tiddlerTagArea.value=newTags;\n if (tagToStrip) {story.setTiddlerTag(newTitle,tagToStrip,-1);}\n story.focusTiddler(newTitle,"title");\n return false; //why false?\n } // closes newFromTemplate function definition\n}; // closes tiddlerTemplateMacros object definition\n\nconfig.macros.newFromTemplatePopup.handler = function(place,macroName,params,wikifier,paramString,callingTiddler){\n var makeTemplateList = function(event) {\n if (!event) var event = window.event;\n var templateTag = this.getAttribute("templateTag");\n if (this.getAttribute("tagToAdd")){var tagToAdd = this.getAttribute("tagToAdd");}\n\n var templateList = store.getTaggedTiddlers(templateTag);\n var popup = Popup.create(templateButton);\n\n // pull the titles out of the tiddlers retured by getTaggedTiddlers\n var templateTitles = [];\n var li,r;\n for(r=0;r<templateList.length;r++)\n if(templateList[r].title != templateTitles){templateTitles.push(templateList[r].title);}\n\n // for each one of the titles create a new TiddlyButton in the popup\n for(r=0; r<templateTitles.length; r++){\n var templateListItem = createTiddlyButton(createTiddlyElement(popup,"li"),templateTitles[r],null,config.macros.tiddlerTemplatesMacros.newFromTemplate);\n templateListItem.setAttribute("templateTitle",templateTitles[r]);\n templateListItem.setAttribute("tagToStrip",templateTag);\n if (tagToAdd){templateListItem.setAttribute("tagToAdd",tagToAdd);}\n }\n\n Popup.show(popup,true);\n event.cancelBubble = true;\n if (event.stopPropagation) event.stopPropagation();\n return false; // why false?\n } // closes makeTemplateList function definition\n\n // process params\n var paramsToParse = params;\n var input = config.macros.tiddlerTemplatesMacros.reparseParams( paramsToParse ) ;\n var templateTag = input["templateTag"]?input["templateTag"].trim():config.macros.tiddlerTemplatesMacros.templateTag ;\n var label = input["label"]?input["label"].trim():config.macros.tiddlerTemplatesMacros.label ;\n label = label.replace(/<arrow>/g, dropdownchar) \n var tooltip = input["tooltip"]?input["tooltip"].trim():config.macros.tiddlerTemplatesMacros.tooltip ;\n\n // user can only use hereMode if callingTiddler was passed to the macro\n var hereMode; \n if (input["hereMode"] && callingTiddler) {hereMode = callingTiddler.title;}\n else {hereMode = null;}\n\n // error out if no tiddlers are tagged as templates\n var templateList = store.getTaggedTiddlers(templateTag);\n if(templateList == "") {\n createTiddlyError(place,config.messages.macroError.format([macroName]),config.macros.tiddlerTemplatesMacros.errorNoTemplates.format([templateTag]));\n return;\n }\n\n var templateButton = createTiddlyButton(place,label,tooltip,makeTemplateList);\n templateButton.setAttribute("templateTag",templateTag);\n if (hereMode){templateButton.setAttribute("tagToAdd",hereMode);}\n}; // closes newFromTemplatePopup handler definition\n\n\nconfig.macros.newFromTemplateButton.handler = function(place,macroName,params,wikifier,paramString,callingTiddler){\n\n // process params\n var paramsToParse = params;\n var input = config.macros.tiddlerTemplatesMacros.reparseParams( paramsToParse ) ;\n var templateTiddler = input["templateTiddler"]?input["templateTiddler"].trim():null ;\n var templateTag = input["templateTag"]?input["templateTag"].trim():null ;\n var label = input["label"]?input["label"].trim():config.macros.tiddlerTemplatesMacros.label ;\n var tooltip = input["tooltip"]?input["tooltip"].trim():config.macros.tiddlerTemplatesMacros.tooltip ;\n\n // user can only use hereMode if callingTiddler was passed to the macro\n var hereMode; \n if (input["hereMode"] && callingTiddler) {hereMode = callingTiddler.title;}\n else {hereMode = null;}\n\n // error out if template tiddler was not specified or if it does not exist\n if (templateTiddler == null){\n createTiddlyError(place,config.messages.macroError.format([macroName]),config.macros.tiddlerTemplatesMacros.errorMissingRequiredParam.format(["templateTiddler"]));\n return;\n } // ends if templateTiddler == null (not in params)\n\n var templateTiddlerObj = store.getTiddler(templateTiddler);\n if(templateTiddlerObj == null) {\n createTiddlyError(place,config.messages.macroError.format([macroName]),config.macros.tiddlerTemplatesMacros.errorNoTemplateTiddler.format([templateTiddler]));\n return;\n } // ends if templateTiddlerObj == null (not in store)\n\n var templateButton = createTiddlyButton(place,label,tooltip,config.macros.tiddlerTemplatesMacros.newFromTemplate);\n templateButton.setAttribute("templateTitle",templateTiddlerObj.title);\n if (hereMode){templateButton.setAttribute("tagToAdd",hereMode);}\n if (templateTag){templateButton.setAttribute("tagToStrip",templateTag);}\n}; // closes newFromTemplateButton handler definition\n\n// This macro only in here for backward compatibility. I'll problably drop it from the next release\nconfig.macros.newFromTemplate.handler = function(place,macroName,params,wikifier,paramString,callingTiddler){\n\n // juggle params around since this macro does NOT use named parameters and newFromTemplatePopup does\n if (params[0] != null) {paramString = 'templateTag:\s"'+paramString+'\s"';}\n var paramsToPass = paramString.readMacroParams();\n if (!readOnly) {\n config.macros.newFromTemplatePopup.handler(place,macroName,paramsToPass, wikifier,paramString, callingTiddler);\n}\n}; // closes newFromTemplate handler definition\n\n//}}}\n\n
<<option txtUserName>>\n<<option chkSaveBackups>> Save Backups\n<<option chkAutoSave>> Auto Save\n<<option chkGenerateAnRssFeed>> Generate An Rss Feed\n<<option chkRegExpSearch>> ~RegExp Search\n<<option chkCaseSensitiveSearch>> Case Sensitive Search\n<<option chkAnimate>> Enable Animations\n<<option chkOpenInNewWindow>> Open Links In New Window\n<<option chkSaveEmptyTemplate>> Save Empty Template\n<<option chkHttpReadOnly>> Hide Editing Features when viewed over HTTP\n<<option chkToggleLinks>> Clicking on links to tiddlers that are already open causes them to close\n<<option chkForceMinorUpdate>> Treat edits as Minor changes by preserving date and time\n<<option chkConfirmDelete>> Confirm Before Deleting\nMaximum number of lines in a tiddler edit box: <<option txtMaxEditRows>>\nFolder name for backup files: <<option txtBackupFolder>>
<div class='header'>\n<div class='headerShadow'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div class='headerForeground'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>\n<div id='sidebar'>\n<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\n<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n<div id='displayArea'>\n<div id='messageArea'></div>\n<div id='tiddlerDisplay'></div>\n</div>
/***\n|''Name:''|PhotoShowPlugin|\n|''Description:''|Photo gallery slide show|\n|''Version:''|1.0.1|\n|''Date:''|Jun 08, 2006|\n|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|\n|''Author:''|Paulo Soares (psoares (at) math (dot) ist (dot) utl (dot) pt)|\n|''License:''|[[BSD open source license]]|\n|''~CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|\n|''Requires:''|SlideShowPlugin|\n!Description\nThis plugin is a small companion to the SlideShowPlugin.\n\nThis plugin has been tested in Firefox, Internet Explorer, Safari, and Opera. Let us know if something seems broken.\n!Usage\nTo use this plugin you //must// be using TiddlyWiki 2.0.0. Install this tiddler and drop {{{<<photoShow directory/file-*.jpg a b>>}}} at the beginning of the tiddler. \nCheck this [[PhotoShowExample]].\n!Revision history\n1.0.1 - 08/06/2006 - made compatible with SlideShowPlugin 1.4.0\n1.0.0 - 04/01/2006 - initial release\n!Code\n***/\n//{{{\nconfig.macros.photoShow = {};\nconfig.macros.photoShow.handler= function(place,macroName,params,wikifier,paramString,tiddler) {\n if (params.length<3) return;\n title = tiddler.title;\n var url = params[0];\n var first = params[1];\n var last = params[2];\n var pos = url.indexOf('*');\n\n // Grab the 'viewer' element\n var tiddlerElements = document.getElementById("tiddler"+title).childNodes;\n var viewer;\n for (var i = 0; i < tiddlerElements.length; i++){\n if (tiddlerElements[i].className == "viewer"){\n viewer = tiddlerElements[i];\n break;\n }\n }\n\n var pictureHolder;\n var separator;\n for(i=first; i<=last; i++){\n separator=document.createElement('HR');\n separator.className="slideSeparator";\n viewer.appendChild(separator);\n pictureHolder = document.createElement('CENTER');\n pictureHolder.appendChild(document.createElement('IMG'));\n pictureHolder.lastChild.src = url.substring(0,pos)+i+url.substring(pos+1);\n viewer.appendChild(pictureHolder);\n }\n}\n//}}}
<<slideShow>>\n<<photoShow Wallpapers/*.jpg>>
[img[ProjectName|ProjectName.png]]\nhttp://www.project.com/\n\n!!Status\n\n| !Done |bgcolor(#a0ffa0): Done |\n| !In progress |bgcolor(#c0ffff): In progress |\n| !Planned |bgcolor(#ffdead): Scheduled from xx/xx/xx to xx/xx/xx |\n| !To do |bgcolor(#ff6666): @@color(white):No schedule@@ |\n\n!!Minutes\n<<listTags [[Project Name]]>>\n<<newFromTemplateButton templateTiddler:"MinutesTemplates" tooltip:"Create a new Minutes" label:"Create a new Minute" templateTag:"TiddlerTemplates">>\n\n!!Notes\n*None\n\n!!Reminder\n<<newReminder>>
<<calendar thismonth>><<calendar nextmonth>>\n\n!!Reminder\n<<listTags reminder title *>>\n\n!!Set Reminder\n<<newReminder>>\n<<reminder month:2 day:2 title:"Groundhog Day" >>
/***\n|''Name:''|ReminderPlugin|\n|''Version:''|2.3.8 (Mar 9, 2006)|\n|''Source:''|http://www.geocities.com/allredfaq/reminderMacros.html|\n|''Author:''|Jeremy Sheeley(pop1280 [at] excite [dot] com)|\n|''Licence:''|[[BSD open source license]]|\n|''Macros:''|reminder, showreminders, displayTiddlersWithReminders, newReminder|\n|''TiddlyWiki:''|2.0+|\n|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|\n\n!Description\nThis plugin provides macros for tagging a date with a reminder. Use the {{{reminder}}} macro to do this. The {{{showReminders}}} and {{{displayTiddlersWithReminder}}} macros automatically search through all available tiddlers looking for upcoming reminders.\n\n!Installation\n* Create a new tiddler in your tiddlywiki titled ReminderPlugin and give it the {{{systemConfig}}} tag. The tag is important because it tells TW that this is executable code.\n* Double click this tiddler, and copy all the text from the tiddler's body.\n* Paste the text into the body of the new tiddler in your TW.\n* Save and reload your TW.\n* You can copy some examples into your TW as well. See [[Simple examples]], [[Holidays]], [[showReminders]] and [[Personal Reminders]]\n\n!Syntax:\n|>|See [[ReminderSyntax]] and [[showRemindersSyntax]]|\n\n!Revision history\n* v2.3.8 (Mar 9, 2006)\n**Bug fix: A global variable had snuck in, which was killing FF\n**Feature: You can now use TIDDLER and TIDDLERNAME in a regular reminder format\n* v2.3.6 (Mar 1, 2006)\n**Bug fix: Reminders for today weren't being matched sometimes.\n**Feature: Solidified integration with DatePlugin and CalendarPlugin\n**Feature: Recurring reminders will now return multiple hits in showReminders and the calendar.\n**Feature: Added TIDDLERNAME to the replacements for showReminders format, for plugins that need the title without brackets.\n* v2.3.5 (Feb 8, 2006)\n**Bug fix: Sped up reminders lots. Added a caching mechanism for reminders that have already been matched.\n* v2.3.4 (Feb 7, 2006)\n**Bug fix: Cleaned up code to hopefully prevent the Firefox crash that was causing lots of plugins \nto crash Firefox. Thanks to http://www.jslint.com\n* v2.3.3 (Feb 2, 2006)\n**Feature: newReminder now has drop down lists instead of text boxes.\n**Bug fix: A trailing space in a title would trigger an infinite loop.\n**Bug fix: using tag:"birthday !reminder" would filter differently than tag:"!reminder birthday"\n* v2.3.2 (Jan 21, 2006)\n**Feature: newReminder macro, which will let you easily add a reminder to a tiddler. Thanks to Eric Shulman (http://www.elsdesign.com) for the code to do this.\n** Bug fix: offsetday was not working sometimes\n** Bug fix: when upgrading to 2.0, I included a bit to exclude tiddlers tagged with excludeSearch. I've reverted back to searching through all tiddlers\n* v2.3.1 (Jan 7, 2006)\n**Feature: 2.0 compatibility\n**Feature AlanH sent some code to make sure that showReminders prints a message if no reminders are found.\n* v2.3.0 (Jan 3, 2006)\n** Bug Fix: Using "Last Sunday (-0)" as a offsetdayofweek wasn't working.\n** Bug Fix: Daylight Savings time broke offset based reminders (for example year:2005 month:8 day:23 recurdays:7 would match Monday instead of Tuesday during DST.\n\n!Code\n***/\n//{{{\n\n//============================================================================\n//============================================================================\n// ReminderPlugin\n//============================================================================\n//============================================================================\n\nversion.extensions.ReminderPlugin = {major: 2, minor: 3, revision: 8, date: new Date(2006,3,9), source: "http://www.geocities.com/allredfaq/reminderMacros.html"};\n\n//============================================================================\n// Configuration\n// Modify this section to change the defaults for \n// leadtime and display strings\n//============================================================================\n\nconfig.macros.reminders = {};\nconfig.macros["reminder"] = {};\nconfig.macros["newReminder"] = {};\nconfig.macros["showReminders"] = {};\nconfig.macros["displayTiddlersWithReminders"] = {};\n\nconfig.macros.reminders["defaultLeadTime"] = [-6000,6000];\nconfig.macros.reminders["defaultReminderMessage"] = "DIFF: TITLE on DATE ANNIVERSARY";\nconfig.macros.reminders["defaultShowReminderMessage"] = "DIFF: TITLE on DATE ANNIVERSARY -- TIDDLER";\nconfig.macros.reminders["defaultAnniversaryMessage"] = "(DIFF)";\nconfig.macros.reminders["untitledReminder"] = "Untitled Reminder";\nconfig.macros.reminders["noReminderFound"] = "Couldn't find a match for TITLE in the next LEADTIMEUPPER days."\nconfig.macros.reminders["todayString"] = "Today";\nconfig.macros.reminders["tomorrowString"] = "Tomorrow";\nconfig.macros.reminders["ndaysString"] = "DIFF days";\nconfig.macros.reminders["emtpyShowRemindersString"] = "There are no upcoming events";\n\n\n//============================================================================\n// Code\n// You should not need to edit anything \n// below this. Make sure to edit this tiddler and copy \n// the code from the text box, to make sure that \n// tiddler rendering doesn't interfere with the copy \n// and paste.\n//============================================================================\n\n// This line is to preserve 1.2 compatibility\n if (!story) var story=window; \n//this object will hold the cache of reminders, so that we don't\n//recompute the same reminder over again.\nvar reminderCache = {};\n\nconfig.macros.showReminders.handler = function showReminders(place,macroName,params)\n{\n var now = new Date().getMidnight();\n var paramHash = {};\n var leadtime = [0,14];\n paramHash = getParamsForReminder(params);\n var bProvidedDate = (paramHash["year"] != null) || \n (paramHash["month"] != null) || \n (paramHash["day"] != null) || \n (paramHash["dayofweek"] != null);\n if (paramHash["leadtime"] != null)\n {\n leadtime = paramHash["leadtime"];\n if (bProvidedDate)\n {\n //If they've entered a day, we need to make \n //sure to find it. We'll reset the \n //leadtime a few lines down.\n paramHash["leadtime"] = [-10000, 10000];\n }\n }\n var matchedDate = now;\n if (bProvidedDate)\n {\n var leadTimeLowerBound = new Date().getMidnight().addDays(paramHash["leadtime"][0]);\n var leadTimeUpperBound = new Date().getMidnight().addDays(paramHash["leadtime"][1]);\n matchedDate = findDateForReminder(paramHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound); \n }\n\n var arr = findTiddlersWithReminders(matchedDate, leadtime, paramHash["tag"], paramHash["limit"]);\n var elem = createTiddlyElement(place,"span",null,null, null);\n var mess = "";\n if (arr.length == 0)\n {\n mess += config.macros.reminders.emtpyShowRemindersString; \n }\n for (var j = 0; j < arr.length; j++)\n {\n if (paramHash["format"] != null)\n {\n arr[j]["params"]["format"] = paramHash["format"];\n }\n else\n {\n arr[j]["params"]["format"] = config.macros.reminders["defaultShowReminderMessage"];\n }\n mess += getReminderMessageForDisplay(arr[j]["diff"], arr[j]["params"], arr[j]["matchedDate"], arr[j]["tiddler"]);\n mess += "\sn";\n }\n wikify(mess, elem, null, null);\n};\n\n\nconfig.macros.displayTiddlersWithReminders.handler = function displayTiddlersWithReminders(place,macroName,params)\n{\n var now = new Date().getMidnight();\n var paramHash = {};\n var leadtime = [0,14];\n paramHash = getParamsForReminder(params);\n var bProvidedDate = (paramHash["year"] != null) || \n (paramHash["month"] != null) || \n (paramHash["day"] != null) || \n (paramHash["dayofweek"] != null);\n if (paramHash["leadtime"] != null)\n {\n leadtime = paramHash["leadtime"];\n if (bProvidedDate)\n {\n //If they've entered a day, we need to make \n //sure to find it. We'll reset the leadtime \n //a few lines down.\n paramHash["leadtime"] = [-10000,10000];\n }\n }\n var matchedDate = now;\n if (bProvidedDate)\n {\n var leadTimeLowerBound = new Date().getMidnight().addDays(paramHash["leadtime"][0]);\n var leadTimeUpperBound = new Date().getMidnight().addDays(paramHash["leadtime"][1]);\n matchedDate = findDateForReminder(paramHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound); \n }\n var arr = findTiddlersWithReminders(matchedDate, leadtime, paramHash["tag"], paramHash["limit"]);\n for (var j = 0; j < arr.length; j++)\n {\n displayTiddler(null, arr[j]["tiddler"], 0, null, false, false, false);\n }\n};\n\nconfig.macros.reminder.handler = function reminder(place,macroName,params)\n{\n var dateHash = getParamsForReminder(params);\n if (dateHash["hidden"] != null)\n {\n return;\n }\n var leadTime = dateHash["leadtime"];\n if (leadTime == null)\n {\n leadTime = config.macros.reminders["defaultLeadTime"]; \n }\n var leadTimeLowerBound = new Date().getMidnight().addDays(leadTime[0]);\n var leadTimeUpperBound = new Date().getMidnight().addDays(leadTime[1]);\n var matchedDate = findDateForReminder(dateHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound);\n if (!window.story) \n {\n window.story=window; \n }\n if (!store.getTiddler) \n {\n store.getTiddler=function(title) {return this.tiddlers[title];};\n }\n var title = window.story.findContainingTiddler(place).id.substr(7);\n if (matchedDate != null)\n {\n var diff = matchedDate.getDifferenceInDays(new Date().getMidnight());\n var elem = createTiddlyElement(place,"span",null,null, null);\n var mess = getReminderMessageForDisplay(diff, dateHash, matchedDate, title);\n wikify(mess, elem, null, null);\n }\n else\n {\n createTiddlyElement(place,"span",null,null, config.macros.reminders["noReminderFound"].replace("TITLE", dateHash["title"]).replace("LEADTIMEUPPER", leadTime[1]).replace("LEADTIMELOWER", leadTime[0]).replace("TIDDLERNAME", title).replace("TIDDLER", "[[" + title + "]]") );\n }\n};\n\nconfig.macros.newReminder.handler = function newReminder(place,macroName,params)\n{\n var today=new Date().getMidnight();\n var formstring = '<html><form>Year: <select name="year"><option value="">Every year</option>';\n for (var i = 0; i < 5; i++)\n {\n formstring += '<option' + ((i == 0) ? ' selected' : '') + ' value="' + (today.getFullYear() +i) + '">' + (today.getFullYear() + i) + '</option>';\n }\n formstring += '</select>&nbsp;&nbsp;Month:<select name="month"><option value="">Every month</option>';\n for (i = 0; i < 12; i++)\n {\n formstring += '<option' + ((i == today.getMonth()) ? ' selected' : '') + ' value="' + (i+1) + '">' + config.messages.dates.months[i] + '</option>';\n }\n formstring += '</select>&nbsp;&nbsp;Day:<select name="day"><option value="">Every day</option>';\n for (i = 1; i < 32; i++)\n {\n formstring += '<option' + ((i == (today.getDate() )) ? ' selected' : '') + ' value="' + i + '">' + i + '</option>';\n }\n\nformstring += '</select>&nbsp;&nbsp;Reminder Title:<input type="text" size="40" name="title" value="please enter a title" onfocus="this.select();"><input type="button" value="ok" onclick="addReminderToTiddler(this.form)"></form></html>';\n\n var panel = config.macros.slider.createSlider(place,null,"New Reminder","Open a form to add a new reminder to this tiddler");\n wikify(formstring ,panel,null,store.getTiddler(params[1]));\n};\n\n// onclick: process input and insert reminder at 'marker'\nwindow.addReminderToTiddler = function(form) {\n if (!window.story) \n {\n window.story=window; \n }\n if (!store.getTiddler) \n {\n store.getTiddler=function(title) {return this.tiddlers[title];};\n }\n var title = window.story.findContainingTiddler(form).id.substr(7);\n var tiddler=store.getTiddler(title);\n var txt='\sn<<reminder ';\n if (form.year.value != "")\n txt += 'year:'+form.year.value + ' ';\n if (form.month.value != "")\n txt += 'month:'+form.month.value + ' ';\n if (form.day.value != "")\n txt += 'day:'+form.day.value + ' ';\n txt += 'title:"'+form.title.value+'" ';\n txt +='>>';\n tiddler.set(null,tiddler.text + txt);\n window.story.refreshTiddler(title,1,true);\n store.setDirty(true);\n};\n\nfunction hasTag(tiddlerTags, tagFilters)\n{\n //Make sure we respond well to empty tiddlerTaglists or tagFilterlists\n if (tagFilters.length==0 || tiddlerTags.length==0)\n {\n return true;\n }\n\n var bHasTag = false;\n \n /*bNoPos says: "'till now there has been no check using a positive filter"\n Imagine a filterlist consisting of 1 negative filter:\n If the filter isn't matched, we want hasTag to be true.\n Yet bHasTag is still false ('cause only positive filters cause bHasTag to change)\n \n If no positive filters are present bNoPos is true, and no negative filters are matched so we have not returned false\n Thus: hasTag returns true.\n \n If at any time a positive filter is encountered, we want at least one of the tags to match it, so we turn bNoPos to false, which\n means bHasTag must be true for hasTag to return true*/\n var bNoPos=true;\n \nfor (var t3 = 0; t3 < tagFilters.length; t3++)\n {\n for(var t2=0; t2<tiddlerTags.length; t2++)\n {\n if (tagFilters[t3].length > 1 && tagFilters[t3].charAt(0) == '!') \n {\n if (tiddlerTags[t2] == tagFilters[t3].substring(1))\n {\n //If at any time a negative filter is matched, we return false\n return false;\n }\n }\n else \n {\n if (bNoPos)\n {\n //We encountered the first positive filter\n bNoPos=false;\n }\n if (tiddlerTags[t2] == tagFilters[t3])\n {\n //A positive filter is matched. As long as no negative filter is matched, hasTag will return true\n bHasTag=true;\n }\n }\n }\n }\n return (bNoPos || bHasTag);\n};\n\n//This function searches all tiddlers for the reminder //macro. It is intended that other plugins (like //calendar) will use this function to query for \n//upcoming reminders.\n//The arguments to this function filter out reminders //based on when they will fire.\n//\n//ARGUMENTS:\n//baseDate is the date that is used as "now". \n//leadtime is a two element int array, with leadtime[0] \n// as the lower bound and leadtime[1] as the\n// upper bound. A reasonable default is [0,14]\n//tags is a space-separated list of tags to use to filter \n// tiddlers. If a tag name begins with an !, then \n// only tiddlers which do not have that tag will \n// be considered. For example "examples holidays" \n// will search for reminders in any tiddlers that \n// are tagged with examples or holidays and \n// "!examples !holidays" will search for reminders \n// in any tiddlers that are not tagged with \n// examples or holidays. Pass in null to search \n// all tiddlers.\n//limit. If limit is null, individual reminders can \n// override the leadtime specified earlier. \n// Pass in 1 in order to override that behavior.\n\nwindow.findTiddlersWithReminders = function findTiddlersWithReminders(baseDate, leadtime, tags, limit)\n{\n//function(searchRegExp,sortField,excludeTag)\n// var macroPattern = "<<([^>\s\s]+)(?:\s\s*)([^>]*)>>";\n var macroPattern = "<<(reminder)(.*)>>";\n var macroRegExp = new RegExp(macroPattern,"mg");\n var matches = store.search(macroRegExp,"title","");\n var arr = [];\n var tagsArray = null;\n if (tags != null)\n {\n tagsArray = tags.split(" ");\n }\n for(var t=matches.length-1; t>=0; t--)\n {\n if (tagsArray != null)\n {\n //If they specified tags to filter on, and this tiddler doesn't \n //match, skip it entirely.\n if ( ! hasTag(matches[t].tags, tagsArray))\n {\n continue;\n }\n }\n\n var targetText = matches[t].text;\n do {\n // Get the next formatting match\n var formatMatch = macroRegExp.exec(targetText);\n if(formatMatch && formatMatch[1] != null && formatMatch[1].toLowerCase() == "reminder")\n {\n //Find the matching date.\n \n var params = formatMatch[2] != null ? formatMatch[2].readMacroParams() : {};\n var dateHash = getParamsForReminder(params);\n if (limit != null || dateHash["leadtime"] == null)\n {\n if (leadtime == null)\n dateHash["leadtime"] = leadtime;\n else\n {\n dateHash["leadtime"] = [];\n dateHash["leadtime"][0] = leadtime[0];\n dateHash["leadtime"][1] = leadtime[1];\n }\n }\n if (dateHash["leadtime"] == null)\n dateHash["leadtime"] = config.macros.reminders["defaultLeadTime"]; \n var leadTimeLowerBound = baseDate.addDays(dateHash["leadtime"][0]);\n var leadTimeUpperBound = baseDate.addDays(dateHash["leadtime"][1]);\n var matchedDate = findDateForReminder(dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound);\n while (matchedDate != null)\n {\n var hash = {};\n hash["diff"] = matchedDate.getDifferenceInDays(baseDate);\n hash["matchedDate"] = new Date(matchedDate.getFullYear(), matchedDate.getMonth(), matchedDate.getDate(), 0, 0);\n hash["params"] = cloneParams(dateHash);\n hash["tiddler"] = matches[t].title;\n hash["tags"] = matches[t].tags;\n arr.pushUnique(hash);\n if (dateHash["recurdays"] != null || (dateHash["year"] == null))\n {\n leadTimeLowerBound = leadTimeLowerBound.addDays(matchedDate.getDifferenceInDays(leadTimeLowerBound)+ 1);\n matchedDate = findDateForReminder(dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound);\n }\n else matchedDate = null;\n }\n }\n }while(formatMatch);\n }\n if(arr.length > 1) //Sort the array by number of days remaining.\n {\n arr.sort(function (a,b) {if(a["diff"] == b["diff"]) {return(0);} else {return (a["diff"] < b["diff"]) ? -1 : +1; } });\n }\n return arr;\n};\n\n//This function takes the reminder macro parameters and\n//generates the string that is used for display.\n//This function is not intended to be called by \n//other plugins.\n window.getReminderMessageForDisplay= function getReminderMessageForDisplay(diff, params, matchedDate, tiddlerTitle)\n{\n var anniversaryString = "";\n var reminderTitle = params["title"];\n if (reminderTitle == null)\n {\n reminderTitle = config.macros.reminders["untitledReminder"];\n }\n if (params["firstyear"] != null)\n {\n anniversaryString = config.macros.reminders["defaultAnniversaryMessage"].replace("DIFF", (matchedDate.getFullYear() - params["firstyear"]));\n }\n var mess = "";\n var diffString = "";\n if (diff == 0)\n {\n diffString = config.macros.reminders["todayString"];\n }\n else if (diff == 1)\n {\n diffString = config.macros.reminders["tomorrowString"];\n }\n else\n {\n diffString = config.macros.reminders["ndaysString"].replace("DIFF", diff);\n }\n var format = config.macros.reminders["defaultReminderMessage"];\n if (params["format"] != null)\n {\n format = params["format"];\n }\n mess = format;\n//HACK! -- Avoid replacing DD in TIDDLER with the date\n mess = mess.replace(/TIDDLER/g, "TIDELER");\n mess = matchedDate.formatStringDateOnly(mess);\n mess = mess.replace(/TIDELER/g, "TIDDLER");\n if (tiddlerTitle != null)\n {\n mess = mess.replace(/TIDDLERNAME/g, tiddlerTitle);\n mess = mess.replace(/TIDDLER/g, "[[" + tiddlerTitle + "]]");\n }\n \n mess = mess.replace("DIFF", diffString).replace("TITLE", reminderTitle).replace("DATE", matchedDate.formatString("DDD MMM DD, YYYY")).replace("ANNIVERSARY", anniversaryString);\n return mess;\n};\n\n// Parse out the macro parameters into a hashtable. This\n// handles the arguments for reminder, showReminders and \n// displayTiddlersWithReminders.\nwindow.getParamsForReminder = function getParamsForReminder(params)\n{\n var dateHash = {};\n var type = "";\n var num = 0;\n var title = "";\n for(var t=0; t<params.length; t++)\n {\n var split = params[t].split(":");\n type = split[0].toLowerCase();\n var value = split[1];\n for (var i=2; i < split.length; i++)\n {\n value += ":" + split[i];\n }\n if (type == "nolinks" || type == "limit" || type == "hidden")\n {\n num = 1;\n }\n else if (type == "leadtime")\n {\n var leads = value.split("...");\n if (leads.length == 1)\n {\n leads[1]= leads[0];\n leads[0] = 0;\n }\n leads[0] = parseInt(leads[0], 10);\n leads[1] = parseInt(leads[1], 10);\n num = leads;\n }\n else if (type == "offsetdayofweek")\n {\n if (value.substr(0,1) == "-")\n {\n dateHash["negativeOffsetDayOfWeek"] = 1;\n value = value.substr(1);\n }\n num = parseInt(value, 10);\n }\n else if (type != "title" && type != "tag" && type != "format")\n {\n num = parseInt(value, 10);\n }\n else\n {\n title = value;\n t++;\n while (title.substr(0,1) == '"' && title.substr(title.length - 1,1) != '"' && params[t] != undefined)\n {\n title += " " + params[t++];\n }\n //Trim off the leading and trailing quotes\n if (title.substr(0,1) == "\s"" && title.substr(title.length - 1,1)== "\s"")\n {\n title = title.substr(1, title.length - 2);\n t--;\n }\n num = title;\n }\n dateHash[type] = num;\n }\n //date is synonymous with day\n if (dateHash["day"] == null)\n {\n dateHash["day"] = dateHash["date"];\n }\n return dateHash;\n};\n\n//This function finds the date specified in the reminder \n//parameters. It will return null if no match can be\n//found. This function is not intended to be used by\n//other plugins.\nwindow.findDateForReminder= function findDateForReminder( dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound)\n{\n if (baseDate == null)\n {\n baseDate = new Date().getMidnight();\n }\n var hashKey = baseDate.convertToYYYYMMDDHHMM();\n for (var k in dateHash)\n {\n hashKey += "," + k + "|" + dateHash[k];\n }\n hashKey += "," + leadTimeLowerBound.convertToYYYYMMDDHHMM();\n hashKey += "," + leadTimeUpperBound.convertToYYYYMMDDHHMM();\n if (reminderCache[hashKey] == null)\n {\n //If we don't find a match in this run, then we will\n //cache that the reminder can't be matched.\n reminderCache[hashKey] = false;\n }\n else if (reminderCache[hashKey] == false)\n {\n //We've already tried this date and failed\n return null;\n }\n else\n {\n return reminderCache[hashKey];\n }\n \n var bOffsetSpecified = dateHash["offsetyear"] != null || \n dateHash["offsetmonth"] != null || \n dateHash["offsetday"] != null || \n dateHash["offsetdayofweek"] != null || \n dateHash["recurdays"] != null;\n \n // If we are matching the base date for a dayofweek offset, look for the base date a \n //little further back.\n var tmp1leadTimeLowerBound = leadTimeLowerBound; \n if ( dateHash["offsetdayofweek"] != null)\n {\n tmp1leadTimeLowerBound = leadTimeLowerBound.addDays(-6); \n }\n var matchedDate = baseDate.findMatch(dateHash, tmp1leadTimeLowerBound, leadTimeUpperBound);\n if (matchedDate != null)\n {\n var newMatchedDate = matchedDate;\n if (dateHash["recurdays"] != null)\n {\n while (newMatchedDate.getTime() < leadTimeLowerBound.getTime())\n {\n newMatchedDate = newMatchedDate.addDays(dateHash["recurdays"]);\n }\n }\n else if (dateHash["offsetyear"] != null || \n dateHash["offsetmonth"] != null || \n dateHash["offsetday"] != null || \n dateHash["offsetdayofweek"] != null)\n {\n var tmpdateHash = cloneParams(dateHash);\n tmpdateHash["year"] = dateHash["offsetyear"];\n tmpdateHash["month"] = dateHash["offsetmonth"];\n tmpdateHash["day"] = dateHash["offsetday"];\n tmpdateHash["dayofweek"] = dateHash["offsetdayofweek"];\n var tmpleadTimeLowerBound = leadTimeLowerBound;\n var tmpleadTimeUpperBound = leadTimeUpperBound;\n if (tmpdateHash["offsetdayofweek"] != null)\n {\n if (tmpdateHash["negativeOffsetDayOfWeek"] == 1)\n {\n tmpleadTimeLowerBound = matchedDate.addDays(-6);\n tmpleadTimeUpperBound = matchedDate;\n\n }\n else\n {\n tmpleadTimeLowerBound = matchedDate;\n tmpleadTimeUpperBound = matchedDate.addDays(6);\n }\n\n }\n newMatchedDate = matchedDate.findMatch(tmpdateHash, tmpleadTimeLowerBound, tmpleadTimeUpperBound);\n //The offset couldn't be matched. return null.\n if (newMatchedDate == null)\n {\n return null;\n }\n }\n if (newMatchedDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))\n {\n reminderCache[hashKey] = newMatchedDate;\n return newMatchedDate;\n }\n }\n return null;\n};\n\n//This does much the same job as findDateForReminder, but\n//this one doesn't deal with offsets or recurring \n//reminders.\nDate.prototype.findMatch = function findMatch(dateHash, leadTimeLowerBound, leadTimeUpperBound)\n{\n\n var bSpecifiedYear = (dateHash["year"] != null);\n var bSpecifiedMonth = (dateHash["month"] != null);\n var bSpecifiedDay = (dateHash["day"] != null);\n var bSpecifiedDayOfWeek = (dateHash["dayofweek"] != null);\n if (bSpecifiedYear && bSpecifiedMonth && bSpecifiedDay)\n {\n return new Date(dateHash["year"], dateHash["month"]-1, dateHash["day"], 0, 0);\n }\n var bMatchedYear = !bSpecifiedYear;\n var bMatchedMonth = !bSpecifiedMonth;\n var bMatchedDay = !bSpecifiedDay;\n var bMatchedDayOfWeek = !bSpecifiedDayOfWeek;\n if (bSpecifiedDay && bSpecifiedMonth && !bSpecifiedYear && !bSpecifiedDayOfWeek)\n {\n\n //Shortcut -- First try this year. If it's too small, try next year.\n var tmpMidnight = this.getMidnight();\n var tmpDate = new Date(this.getFullYear(), dateHash["month"]-1, dateHash["day"], 0,0);\n if (tmpDate.getTime() < leadTimeLowerBound.getTime())\n {\n tmpDate = new Date((this.getFullYear() + 1), dateHash["month"]-1, dateHash["day"], 0,0);\n }\n if ( tmpDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))\n {\n return tmpDate;\n }\n else\n {\n return null;\n }\n }\n\n var newDate = leadTimeLowerBound; \n while (newDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))\n {\n var tmp = testDate(newDate, dateHash, bSpecifiedYear, bSpecifiedMonth, bSpecifiedDay, bSpecifiedDayOfWeek);\n if (tmp != null)\n return tmp;\n newDate = newDate.addDays(1);\n }\n};\n\nfunction testDate(testMe, dateHash, bSpecifiedYear, bSpecifiedMonth, bSpecifiedDay, bSpecifiedDayOfWeek)\n{\n var bMatchedYear = !bSpecifiedYear;\n var bMatchedMonth = !bSpecifiedMonth;\n var bMatchedDay = !bSpecifiedDay;\n var bMatchedDayOfWeek = !bSpecifiedDayOfWeek;\n if (bSpecifiedYear)\n {\n bMatchedYear = (dateHash["year"] == testMe.getFullYear());\n }\n if (bSpecifiedMonth)\n {\n bMatchedMonth = ((dateHash["month"] - 1) == testMe.getMonth() );\n }\n if (bSpecifiedDay)\n {\n bMatchedDay = (dateHash["day"] == testMe.getDate());\n }\n if (bSpecifiedDayOfWeek)\n {\n bMatchedDayOfWeek = (dateHash["dayofweek"] == testMe.getDay());\n }\n\n if (bMatchedYear && bMatchedMonth && bMatchedDay && bMatchedDayOfWeek)\n {\n return testMe;\n }\n};\n\n//Returns true if the date is in between two given dates\nDate.prototype.isBetween = function isBetween(lowerBound, upperBound)\n{\n return (this.getTime() >= lowerBound.getTime() && this.getTime() <= upperBound.getTime());\n}\n//Return a new date, with the time set to midnight (0000)\nDate.prototype.getMidnight = function getMidnight()\n{\n return new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0);\n};\n// Add the specified number of days to a date.\nDate.prototype.addDays = function addDays(numberOfDays)\n{\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + numberOfDays, 0, 0);\n};\n//Return the number of days between two dates.\nDate.prototype.getDifferenceInDays = function getDifferenceInDays(otherDate)\n{\n//I have to do it this way, because this way ignores daylight savings\n var tmpDate = this.addDays(0);\n if (this.getTime() > otherDate.getTime())\n {\n var i = 0;\n for (i = 0; tmpDate.getTime() > otherDate.getTime(); i++)\n {\n tmpDate = tmpDate.addDays(-1);\n }\n return i;\n }\n else\n {\n var i = 0;\n for (i = 0; tmpDate.getTime() < otherDate.getTime(); i++)\n {\n tmpDate = tmpDate.addDays(1);\n }\n return i * -1;\n }\n return 0;\n};\nfunction cloneParams(what) {\n var tmp = {};\n for (var i in what) {\n tmp[i] = what[i];\n }\n return tmp;\n}\n// Substitute date components into a string\nDate.prototype.formatStringDateOnly = function formatStringDateOnly(template)\n{\n template = template.replace("YYYY",this.getFullYear());\n template = template.replace("YY",String.zeroPad(this.getFullYear()-2000,2));\n template = template.replace("MMM",config.messages.dates.months[this.getMonth()]);\n template = template.replace("0MM",String.zeroPad(this.getMonth()+1,2));\n template = template.replace("MM",this.getMonth()+1);\n template = template.replace("DDD",config.messages.dates.days[this.getDay()]);\n template = template.replace("0DD",String.zeroPad(this.getDate(),2));\n template = template.replace("DD",this.getDate());\n return template;\n};\n\n//}}}
You can SaveChanges if you're using FireFox or InternetExplorer:\n# if you're using Windows XP you might run into ServicePack2Problems\n# right click on [[this link|empty.html]] and select 'Save link as...' or 'Save target as...'\n** do ''not'' try to use the File/Save command in your browser because of SaveUnpredictabilities.\n** choose where to save the file, and what to call it (but keep the .HTML extension)\n# open the newly downloaded file in your browser\n# click the 'options' button on the right to set your username\n# edit, create and delete the tiddlers you want\n** you can change the SpecialTiddlers to change the SiteTitle and MainMenu etc.\n# click the 'save changes' button on the right to save your changes\n# TiddlyWiki will make a backup copy of the existing file, and then replace it with the new version\n
<<newTiddler>><<newJournal "DD MMM YYYY" Journal>><<newFromTemplate>>\n----\n<<search>><<closeAll>><<permaview>><<saveChanges>><<upload>><<attach attachement>><<slider chkSliderOptionsPanel OptionsPanel options "Change TiddlyWiki advanced options">>
<<tabs txtMainTab\nTimeline Timeline TabTimeline\nMore "More lists" TabMore\n>>\n----\n[[TiddlyWiki|http://www.tiddlywiki.com]] <<version>>\n[[XML feed|index.xml]]
for _FoX_
zRenard Notes
<!--{{{-->\n<div id='displayArea'>\n<div id='tiddlerDisplay'></div>\n</div>\n<!--}}}-->
/***\n|''Name:''|SlideShowPlugin|\n|''Description:''|Creates a simple slide show type display|\n|''Version:''|1.5.1|\n|''Date:''|Nov 10, 2006|\n|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|\n|''Author:''|Paulo Soares (psoares (at) math (dot) ist (dot) utl (dot) pt) and [[Clint Checketts|http://www.checkettsweb.com]]|\n|''License:''|[[BSD open source license]]|\n|''~CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|\n<<tiddler SlideShowPluginDoc>>\n!Code\n***/\n//{{{\nconfig.macros.slideShow = {label: "slide show", maxTOCLength: 30};\nconfig.macros.slideShow.messages = {gotoLabel: "Go to slide:"};\nconfig.views.wikified.slideShow = {text: "slide show", tooltip: "Start slide show"};\nconfig.views.wikified.slideShow.quit = {text: "end", tooltip: "Quit the slide show"};\nconfig.views.wikified.slideShow.firstSlide = {text: "<<", tooltip: "first slide"};\nconfig.views.wikified.slideShow.previousSlide = {text: "<", tooltip: "previous slide"};\nconfig.views.wikified.slideShow.nextSlide = {text: ">", tooltip: "next slide"};\nconfig.views.wikified.slideShow.lastSlide = {text: ">>", tooltip: "last slide"};\nconfig.views.wikified.slideShow.resetClock = {text: " ", tooltip: "reset"};\n\nconfig.formatters.push( {\n name: "SlideSeparator",\n match: "^-s-+$\s\sn?",\n handler: function(w)\n {\n createTiddlyElement(w.output,"hr",null,'slideSeparator');\n }\n}\n)\n\nfunction changeStyleSheet(tiddlerName) {\n if (tiddlerName == null) tiddlerName = "StyleSheet";\n setStylesheet(store.getRecursiveTiddlerText("StyleSheetColors"),"StyleSheetColors");\n setStylesheet(store.getRecursiveTiddlerText("StyleSheetLayout"),"StyleSheetLayout");\n var theCSS = store.getRecursiveTiddlerText(tiddlerName,"");\n setStylesheet(theCSS,"StyleSheet");\n}\n\n//Excellent (and versatile) reparser created by Paul Petterson for parsing the paramString in a macro\nfunction reparse( params ) {\n var re = /([^:\ss]+)(?:\s:((?:\sd+)|(?:["'](?:[^"']+)["']))|\ss|$)/g;\n var ret = new Array() ;\n var m ;\n while( (m = re.exec( params )) != null ) ret[ m[1] ] = m[2]?m[2]:true ;\n return ret ;\n}\n\nfunction getElementsByClass(searchClass,node,tag) {\n var classElements = new Array();\n if ( node == null ) node = document;\n if ( tag == null ) tag = '*';\n var els = node.getElementsByTagName(tag);\n var elsLen = els.length;\n var pattern = new RegExp("(^|\s\ss)"+searchClass+"(\s\ss|$)");\n var j=0;\n for (var i = 0; i < elsLen; i++) {\n if ( pattern.test(els[i].className) ) {\n classElements[j] = els[i];\n j++;\n }\n }\n return classElements;\n}\n\n// 'keys' code adapted from S5 which in turn was adapted from MozPoint (http://mozpoint.mozdev.org/)\nfunction keys(key) {\n if (document.getElementById('contentWrapper').className == "slideShowMode"){\n if (!key) {\n key = event;\n key.which = key.keyCode;\n }\n switch (key.which) {\n case 32: // spacebar\n if(time>0){\n if(autoAdvance){\n clearInterval(autoAdvance);\n autoAdvance = null;\n } else {\n autoAdvance=setInterval("GoToSlide(1)", time);\n }\n }\n break;\n case 34: // page down\n case 39: // rightkey\n GoToSlide("n");\n break;\n case 40: // downkey\n GoToSlide(-1);\n break;\n case 33: // page up\n case 37: // leftkey\n GoToSlide("p");\n break;\n case 38: // upkey\n GoToSlide(1);\n break;\n case 36: // home\n GoToSlide("f");\n break;\n case 35: // end\n GoToSlide("l");\n break;\n case 27: // escape\n endSlideShow();\n break;\n }\n\n }\n return false;\n}\n\nfunction clicker(e) {\n if (!e) var e = window.event;\n var target = resolveTarget(e);\n //Whenever something is clicked that won't advance the slide make sure that the table of contents gets hidden\n if (target.getAttribute('href') != null || isParentOrSelf(target, 'toc') || isParentOrSelf(target,'embed') || isParentOrSelf(target,'object') || isParentOrSelf(target, 'pageFooter') || isParentOrSelf(target, 'navigator')){\n //Don't hide the TOC if the indexNumbers (which trigger the index) is clicked\n if(isParentOrSelf(target,'indexNumbers') || isParentOrSelf(target,'jumpInput')){\n return true;\n }\n showHideTOC('none');\n return true;\n }\n \n //Advance a slide if the TOC is visible otherwise make sure that the TOC gets hidden\n if ((!e.which && e.button == 1) || e.which == 1) {\n if (document.getElementById('toc').style.display != 'block'){\n GoToSlide("n");\n } else {\n showHideTOC('none');\n }\n }\n \n if ((!e.which && e.button == 2) || e.which == 3) {\n if (document.getElementById('toc').style.display != 'block'){\n GoToSlide("p");\n } else {\n showHideTOC('none');\n }\n return false;\n }\n}\n\nfunction isParentOrSelf(element, id) {\n if (element == null || element.nodeName=='BODY') return false;\n else if (element.id == id) return true;\n else return isParentOrSelf(element.parentNode, id);\n}\n\nGoToSlide=function(step) {\n var new_pos;\n var slideHolder = document.getElementById('slideContainer');\n //The parse float ensures that the attribute is returned as a number and not a string.\n var cur_pos = parseFloat(slideHolder.getAttribute('currentslide'));\n var numberSlides = parseFloat(slideHolder.getAttribute('numberSlides'));\n switch (step) {\n case "f":\n new_pos=0;\n break;\n case "l":\n new_pos=numberSlides-1;\n break;\n case "n":\n var numberOverlays = parseFloat(slideHolder.childNodes[cur_pos].getAttribute('numberOverlays'));\n var currentOverlay = parseFloat(slideHolder.getAttribute('currentOverlay'));\n if(numberOverlays==0 || currentOverlay==numberOverlays){\n new_pos=cur_pos+1;\n } else {\n var className="Overlay"+currentOverlay;\n var overlay=getElementsByClass(className,slideHolder.childNodes[cur_pos]);\n for(var i=0; i<overlay.length; i++) {overlay[i].className=className+' previousOverlay';}\n currentOverlay++;\n slideHolder.setAttribute('currentOverlay',currentOverlay);\n className="Overlay"+currentOverlay;\n overlay=getElementsByClass(className,slideHolder.childNodes[cur_pos]);\n for(i=0; i<overlay.length; i++) {overlay[i].className=className+' currentOverlay';}\n return false;\n }\n break;\n case "p":\n var numberOverlays = parseFloat(slideHolder.childNodes[cur_pos].getAttribute('numberOverlays'));\n var currentOverlay = parseFloat(slideHolder.getAttribute('currentOverlay'));\n if(numberOverlays==0 || currentOverlay==0){\n new_pos=cur_pos-1;\n } else {\n var className="Overlay"+currentOverlay;\n var overlays=getElementsByClass(className,slideHolder.childNodes[cur_pos]);\n for(var i=0; i<overlays.length; i++) {overlays[i].className=className+' nextOverlay';}\n currentOverlay--;\n className="Overlay"+currentOverlay;\n overlays=getElementsByClass(className,slideHolder.childNodes[cur_pos]);\n for(i=0; i<overlays.length; i++) {overlays[i].className=className+' currentOverlay';}\n slideHolder.setAttribute('currentOverlay',currentOverlay);\n return false;\n }\n break;\n default:\n new_pos=cur_pos+step;\n }\n\n if(slideShowCircularMode && new_pos == numberSlides) new_pos=0;\n if(slideShowCircularMode && new_pos<0) new_pos=(numberSlides - 1);\n if(step!=0 && new_pos>=0 && new_pos<numberSlides) {\n slideHolder.childNodes[cur_pos].style.display='none';\n slideHolder.childNodes[new_pos].style.display='block';\n slideHolder.setAttribute('currentslide',new_pos);\n var numberOverlays = parseFloat(slideHolder.childNodes[new_pos].getAttribute('numberOverlays'));\n if(step=="p"){\n var currentOverlay=numberOverlays;\n var state=' previousOverlay';\n } else {\n var currentOverlay=0;\n var state=' nextOverlay';\n }\n slideHolder.setAttribute('currentOverlay',currentOverlay);\n if(numberOverlays>0) {\n for(var i=1; i<=numberOverlays; i++){\n var className="Overlay"+i;\n var overlays=getElementsByClass(className,slideHolder.childNodes[new_pos]);\n for(var j=0; j<overlays.length; j++) {overlays[j].className=className+state;}\n }\n if(step=="p"){\n var className="Overlay"+numberOverlays;\n var overlays=getElementsByClass(className,slideHolder.childNodes[new_pos]);\n for(var j=0; j<overlays.length; j++) {overlays[j].className=className+' currentOverlay';}\n }\n }\n new_pos++;\n var indexNumbers = document.getElementById('indexNumbers');\n indexNumbers.firstChild.data = new_pos+'/'+numberSlides;\n if((new_pos==numberSlides) && !slideShowCircularMode && autoAdvance) clearInterval(autoAdvance);\n return true;\n }\n return false;\n}\n\nfunction tocShowSlide(e) {\n if (!e) var e = window.event;\n var target = resolveTarget(e);\n var slide = target.getAttribute('slideNumber');\n var cur_pos = document.getElementById('slideContainer').getAttribute('currentslide');\n var step = slide-cur_pos;\n if(step!=0) GoToSlide(step);\n showHideTOC('none');\n return;\n}\n\n//Toggle the display of the table of contents\nfunction showHideTOC(display){\n var toc = document.getElementById('toc');\n //Reset the input box\n document.getElementById('jumpInput').value = "";\n\n if (display == null || display.length == null){\n if (toc.style.display == 'none' || toc.style.display == ''){\n toc.style.display = 'block';\n document.getElementById('jumpInput').focus();\n } else {\n toc.style.display = 'none';\n }\n } else {\n toc.style.display = display;\n if (display == 'block')\n document.getElementById('jumpInput').focus();\n }\n}\n\nfunction makeSignature(title,params){\n var signature = title+store.getTiddler(title).modified;\n if(params['style']) signature += params['style'];\n if(params['repeat']) signature += "repeat";\n if(params['slidePause'] > 0) signature += params['slidePause'];\n if(params['autostart']) signature += "autostart";\n if(params['clock']) signature += params['clock'];\n if(params['noOverlays']) signature += "noOverlays";\n return signature;\n}\n\nfunction padZero(x){\n return (x>=10 || x<0 ? "" : "0")+x;\n}\n\nsetClock=function(){\n var actualTime = new Date();\n var newTime = actualTime.getTime() - clockStartTime;\n newTime = clockMultiplier*newTime+clockInterval+clockCorrection;\n actualTime.setTime(newTime);\n newTime = padZero(actualTime.getHours()) + ":" + padZero(actualTime.getMinutes())+ ":" + padZero(actualTime.getSeconds());\n var clock = document.getElementById('slideClock');\n clock.firstChild.nodeValue = newTime;\n}\n\nresetClock=function(){\n var time = new Date(0);\n if(clockStartTime>time){\n var startTime = new Date();\n clockStartTime=startTime.getTime();\n }\n}\n\nvar title;\nvar place;\nvar autoAdvance=null;\nvar autoStart=null;\nvar slideClock=null;\nvar noOverlays=false;\nvar time = 0;\nvar slideShowCircularMode;\nvar slideShowStyleSheet;\nvar slideShowParams;\nvar clockMultiplier;\nvar clockInterval;\nvar clockCorrection=0;\nvar clockStartTime;\nvar openTiddlers;\n\nconfig.macros.slideShow.handler = function(aPlace,macroName,params,wikifier,paramString,tiddler){\n if(tiddler instanceof Tiddler){\n var lingo = config.views.wikified.slideShow;\n var autostart = false;\n if (!e) var e = window.event;\n \n place = aPlace;\n title = tiddler.title;\n params = reparse(paramString);\n var onclick = function(){config.macros.slideShow.onClickSlideShow(params);};\n createTiddlyButton(aPlace,lingo.text,lingo.tooltip,onclick);\n \n var slideShowHolder = document.getElementById('slideShowWrapper');\n //If no show exist previously, create it\n if(params['autostart']){\n if(slideShowHolder != null){\n var signature = slideShowHolder.getAttribute('showSignature');\n if(signature.indexOf("autostart")==-1) autostart = true;\n } else {autostart = true;}\n if(autostart){\n slideShowParams = params;\n setTimeout(config.macros.slideShow.onClickSlideShow,100);\n }\n }\n }\n}\n\nvar disableFunction = function(e){return false;}\nvar enableFunction = function(e){}\n\nconfig.macros.slideShow.onClickSlideShow = function(newParams) {\n if(typeof(newParams)=="number") newParams=slideShowParams;\n openTiddlers = new Array;\n var viewer=document.getElementById('tiddlerDisplay');\n for(var i=0; i<viewer.childNodes.length; i++){\n var name = viewer.childNodes[i].getAttribute('tiddler');\n openTiddlers.push(name);\n }\n document.oncontextmenu = disableFunction;\n clockMultiplier = 1;\n clockInterval = 0;\n var startTime = new Date(0);\n slideShowCircularMode = false;\n time = 0;\n slideShowStyleSheet = null;\n if(newParams['style']){\n slideShowStyleSheet = eval(newParams['style']);\n } \n if(newParams['repeat']){\n slideShowCircularMode = true;\n }\n if(newParams['slidePause'] > 0){\n time = newParams['slidePause'];\n }\n if(newParams['clock']){\n clockCorrection=startTime.getTimezoneOffset()*60000;\n startTime = new Date();\n var clockType= eval(newParams['clock']);\n if(clockType != '+') {\n clockMultiplier = -1;\n clockInterval = -clockType*60000;\n }\n }\n clockStartTime=startTime.getTime();\n if(newParams['noOverlays']){\n noOverlays = true;\n }\n var contentWrapper = document.getElementById('contentWrapper');\n if (contentWrapper.className != "slideShowMode"){\n clearMessage();\n //Attach the key and mouse listeners\n document.onkeyup = keys;\n document.onmouseup = clicker;\n \n var slideShowHolder = document.getElementById('slideShowWrapper');\n story.refreshTiddler(title,"SlideShowViewTemplate",true);\n //If no show exist previously, create it\n if(slideShowHolder == null){\n createSlides(newParams);\n //If there was once waiting in the background and it matches the one we just started, resume it\n } else if (slideShowHolder.getAttribute('showSignature') == makeSignature(title,newParams)){\n \n //Remove dblClick on edit function\n var theTiddler = document.getElementById("tiddler"+title);\n theTiddler.ondblclick = function() {};\n\n // Grab the 'viewer' element and give it a signature so the show can be resumed if stopped\n var tiddlerElements = theTiddler.childNodes;\n var viewer;\n for (var i = 0; i < tiddlerElements.length; i++){\n if (tiddlerElements[i].className == "viewer") viewer = tiddlerElements[i];\n }\n theTiddler.insertBefore(slideShowHolder,viewer);\n theTiddler.removeChild(viewer);\n slideShowHolder.style.display = 'block';\n document.getElementById("pageFooter").className = "pageFooterOff";\n \n //If the show we started it totally new than the resumable one, create the new one and kill the resumable one\n } else {\n slideShowHolder.parentNode.removeChild(slideShowHolder);\n createSlides(newParams);\n }\n slideClock=setInterval("setClock()", 1000); \n if(time>0) autoAdvance=setInterval("GoToSlide(1)", time); \n story.closeAllTiddlers(title);\n toggleSlideStyles();\n } else {\n endSlideShow();\n }\n return ;\n \n}\n\nfunction endSlideShow(){\n //Set aside show so it can be resumed later\n var showHolder = document.getElementById('slideShowWrapper');\n showHolder.style.display = 'none';\n document.getElementById('contentWrapper').parentNode.appendChild(showHolder);\n document.oncontextmenu = enableFunction;\n if(autoAdvance) clearInterval(autoAdvance);\n if(slideClock) clearInterval(slideClock);\n story.refreshTiddler(title,null,true);\n story.closeAllTiddlers();\n toggleSlideStyles();\n story.displayTiddlers(null,openTiddlers,DEFAULT_VIEW_TEMPLATE);\n document.onmouseup = function(){};\n}\n\nfunction isInteger(s){\n var i;\n for (i = 0; i < s.length; i++){\n // Check that current character is number.\n var c = s.charAt(i);\n if (((c < "0") || (c > "9"))) return false;\n }\n // All characters are numbers.\n return true;\n}\n\nfunction jumpInputToSlide(e){\n if (!e) {\n e = window.event;\n e.which = e.keyCode;\n }\n if(e.which==13){\n var jumpInput= document.getElementById("jumpInput").value;\n if(isInteger(jumpInput)){\n var step=jumpInput-document.getElementById('slideContainer').getAttribute('currentslide')-1;\n if (GoToSlide(step)){\n showHideTOC('none'); \n }\n }\n }\n return;\n}\n\n//Used to shorten the TOC fields\nfunction abbreviateLabel(label){\n var maxTOCLength = config.macros.slideShow.maxTOCLength;\n if(label.length>maxTOCLength) {\n var temp = new Array();\n temp = label.split(' ');\n label = temp[0];\n for(var j=1; j<temp.length; j++){\n if((label.length+temp[j].length)<=maxTOCLength){\n label += " " + temp[j];\n } else {\n label += " ...";\n break;\n }\n }\n }\n return label;\n}\n\ncreateSlides = function(newParams){\n var lingo = config.views.wikified.slideShow;\n\n //Remove dblClick on edit function\n var theTiddler = document.getElementById("tiddler"+title);\n theTiddler.ondblclick = function() {};\n\n // Grab the 'viewer' element and give it a signature so the show can be resumed if stopped\n var tiddlerElements = theTiddler.childNodes;\n var viewer;\n for (var i = 0; i < tiddlerElements.length; i++){\n if (tiddlerElements[i].className == "viewer") viewer = tiddlerElements[i];\n }\n viewer.id = 'slideShowWrapper';\n viewer.setAttribute("showSignature",makeSignature(title,newParams));\n\n //Hide the text that comes before the first H1 element (I think I may put this into a cover page type thing)\n while(viewer.childNodes.length > 0 && viewer.firstChild.nodeName.toUpperCase() != "HR" && viewer.firstChild.className!="slideSeparator") {\n viewer.removeChild(viewer.firstChild);\n }\n \n //Cycle through the content and each time you hit an H1 begin a new slide div\n var slideNumber = 0;\n var slideHolder = document.createElement('DIV');\n slideHolder.id = "slideContainer";\n \n while(viewer.childNodes.length > 0){\n //Create a new slide a append it to the slide holder\n if (viewer.firstChild.nodeName.toUpperCase() == "HR" && viewer.firstChild.className=="slideSeparator"){\n slideNumber++;\n var slide = document.createElement('DIV');\n slide.id = "slideNumber"+slideNumber;\n slide.className = "slide";\n if (slideNumber > 1) {\n slideHolder.setAttribute('currentslide',0);\n slide.style.display='none';\n } else {\n slide.style.display='block';\n }\n slideHolder.appendChild(slide); \n viewer.removeChild(viewer.firstChild);\n } else {\n if(viewer.firstChild.nodeName=="SPAN" && viewer.firstChild.className=="" && viewer.firstChild.hasChildNodes()) {\n var anchor=viewer.firstChild.nextSibling;\n for (var ii=0;ii<viewer.firstChild.childNodes.length;ii++) {\n var clone=viewer.firstChild.childNodes[ii].cloneNode(true);\n viewer.insertBefore(clone,anchor);\n }\n viewer.removeChild(viewer.firstChild);\n } else {\n slide.appendChild(viewer.firstChild);\n }\n }\n }\n \n //Stick the slides back into the viewer\n viewer.appendChild(slideHolder);\n slideHolder.setAttribute('numberSlides',slideNumber);\n \n //Create the navigation bar\n var pagefooter = createTiddlyElement(viewer,"DIV","pageFooter","pageFooterOff");\n var navigator = createTiddlyElement(pagefooter,"SPAN","navigator");\n\n //Make it so that when the footer is hovered over the class will change to make it visible\n pagefooter.onmouseover = function () {pagefooter.className = "pageFooterOn"};\n pagefooter.onmouseout = function () {pagefooter.className = "pageFooterOff"};\n\n //Create the control button for the navigation \n var onClickQuit = function(){endSlideShow();};\n createTiddlyButton(navigator,lingo.quit.text,lingo.quit.tooltip,onClickQuit);\n createTiddlyButton(navigator,lingo.firstSlide.text,lingo.firstSlide.tooltip,first_slide);\n createTiddlyButton(navigator,lingo.previousSlide.text,lingo.previousSlide.tooltip,previous_slide);\n createTiddlyButton(navigator,lingo.nextSlide.text,lingo.nextSlide.tooltip,next_slide);\n createTiddlyButton(navigator,lingo.lastSlide.text,lingo.lastSlide.tooltip,last_slide); \n createTiddlyButton(navigator,lingo.resetClock.text,lingo.resetClock.tooltip,resetClock,"button","slideClock"); \n\n var indexNumbers = createTiddlyElement(pagefooter,"SPAN","indexNumbers","indexNumbers","1/"+slideNumber)\n indexNumbers.onclick = showHideTOC;\n var toc = createTiddlyElement(pagefooter,"UL","toc");\n var ovl=1;\n for (var i=0;i<slideHolder.childNodes.length;i++) {\n if(!noOverlays) {\n var ovl=1;\n while(1){\n var className="Overlay"+ovl;\n var overlays=getElementsByClass(className,slideHolder.childNodes[i]);\n if(overlays.length>0){\n for(var j=0; j<overlays.length; j++) {overlays[j].className+=' nextOverlay';}\n ovl++;\n } else {break;}\n }\n }\n slideHolder.childNodes[i].setAttribute("numberOverlays",ovl-1);\n slideHolder.setAttribute("currentOverlay",0);\n\n //Loop through each slide and check the header's content\n var tocLabel = null; \n for (var j=0;j<slideHolder.childNodes[i].childNodes.length;j++) {\n var node = slideHolder.childNodes[i].childNodes[j];\n if(node.nodeName=="H1" || node.nodeName=="H2" || node.nodeName=="H3" || node.nodeName=="H4") {\n var htstring = node.innerHTML;\n var stripped = htstring.replace(/(<([^>]+)>)/ig,"");\n tocLabel = abbreviateLabel(stripped);\n var tocLevel="tocLevel"+node.nodeName.charAt(1);\n var tocItem = createTiddlyElement(toc,"LI",null,tocLevel);\n var tocLink = createTiddlyElement(tocItem,"A",null,"tocItem",tocLabel);\n tocLink.setAttribute("slideNumber",i);\n tocLink.onclick=tocShowSlide;\n }\n }\n }\n \n\n //Input box to jump to s specific slide\n var tocItem = createTiddlyElement(toc,"LI",null,"tocJumpItem",config.macros.slideShow.messages.gotoLabel);\n var tocJumpInput = createTiddlyElement(tocItem,"INPUT","jumpInput");\n tocJumpInput.type="text";\n tocJumpInput.onkeyup=jumpInputToSlide;\n}\n\nvar next_slide= function(e){GoToSlide(1);}\nvar first_slide= function(e){GoToSlide("f");}\nvar previous_slide= function(e){GoToSlide(-1);}\nvar last_slide= function(e){GoToSlide("l");}\n\nfunction toggleSlideStyles(){\n var contentWrapper = document.getElementById('contentWrapper');\n if (contentWrapper.className == "slideShowMode"){\n contentWrapper.className = "";\n window.applyPageTemplate();\n if(slideShowStyleSheet) changeStyleSheet();\n } else{\n contentWrapper.className = "slideShowMode";\n window.applyPageTemplate("SlideShowPageTemplate");\n if(slideShowStyleSheet) changeStyleSheet(slideShowStyleSheet);\n }\n}\n\nsetStylesheet("/***\sn!Slide Mode Styles\sn***/\sn/*{{{*/\sn#contentWrapper.slideShowMode #slideContainer{\sn display: block;\sn}\sn\sn#contentWrapper.slideShowMode .Comment{\sn display: none;\sn}\sn\sn#contentWrapper.slideShowMode .nextOverlay{\sn visibility: hidden;\sn}\sn\sn#contentWrapper.slideShowMode .currentOverlay{\sn visibility: visible;\sn}\sn\sn#contentWrapper.slideShowMode .previousOverlay{\sn visibility: visible;\sn}\sn\sn#jump{\sn text-align: right;\sn}\sn\sn.pageFooterOff #navigator{\sn visibility: hidden;\sn}\sn\sn.pageFooterOn #navigator{\sn visibility: visible;\sn}\sn\sn#contentWrapper.slideShowMode #slideClock{\sn cursor: pointer; margin: 0 5px 0 5px; border: 1px solid #db4\sn}\sn\sn#contentWrapper.slideShowMode,\sn #contentWrapper.slideShowMode #displayArea{\sn width: 100%;\sn font-size: 1.5em;\sn margin: 0 !important;\sn padding: 0;\sn}\sn\sn#slideContainer{\sn display: none;\sn}\sn\sn.indexNumbers{\sn cursor: pointer;\sn}\sn\sn#navigator{\sn visibility: hidden;\sn bottom: 0;\sn}\sn\sn#toc{\sn display: none;\sn position: absolute;\sn font-size: .75em;\sn bottom: 2em;\sn right: 0;\sn background: #fff;\sn border: 1px solid #000;\sn text-align: left;\sn}\sn\snul#toc, #toc li{\sn margin: 0;\sn padding: 0;\sn list-style: none;\sn line-height: 1em;\sn}\sn\sn.tocJumpItem{\sn margin-right: 2em;\sn}\sn\sn.tocJumpItem input{\snmargin-right: 1em;\sn border: 0;\sn}\sn\sn#toc a,\sn#toc a.button{\sn display: block;\sn padding: .1em;\sn}\sn\sn#toc .tocLevel1{\snfont-size: .8em;\sn}\sn\sn#toc .tocLevel2{\sn margin-left: 1em;\sn font-size: .75em;\sn}\sn\sn#toc .tocLevel3{\sn margin-left: 2em;\snfont-size: .75em;\sn}\sn\sn#toc .tocLevel4{\sn margin-left: 3em;\snfont-size: .65em;\sn}\sn\sn#toc a{\sn cursor: pointer;\sn}\sn\snh1{\sn min-height: 1em;\sn}\sn\sn.slide h1{\sn min-height: 0;\sn}\sn\sn/* The '&gt;' selector is ignored by IE6 and earlier so the proper rules are given */\sn#pageFooter{\sn position: fixed;\sn bottom: 2px;\sn right: 2px;\sn width: 100%;\sn text-align: right;\sn}\sn\sn/* This is a hack to trick IE6 and earlier to put the navbar on the bottom of the page */\sn* html #pageFooter {\sn position: absolute;\sn width: 100%;\sn text-align: right;\sn right: auto; bottom: auto;\sn left: expression( ( -20 - pageFooter.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );\sn top: expression( ( -10 - pageFooter.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );\sn}\sn\sn\sn\sn/*}}}*/","slideShowStyles");\n//}}}
<!--{{{-->\n<div class='title' macro='view title'></div>\n<div class='viewer' macro='view text wikified'></div>\n<!--}}}-->
body {\n background: #fffaae;\n color: #000;\n}\n\n.tiddler {\n background: #fffaae;\n padding: 1em 1em 0.5em 1em;\n margin-bottom: 1em;\n border: none;\n}\n\n.viewer .button {\n background: #e4ff70;\n color: #000;\n border: none;\n}\n\n.viewer .button:hover {\n background: #228b22;\n color: #fffaae;\n}\n\n.title {\ntext-align: right;\nbackground: #e4ff70;\n -moz-border-radius: 0.5em;\npadding: 0.2em;\n}\n\n#jsMath_button {\ndisplay: none;\n}\n\n/* navigator always visible\n.pageFooterOff #navigator{\n visibility: visible;\n}*/\n\n/* remove clock \n.slideClock{\n display: none;\n}*/
/***\n\n''Inspired by [[TiddlyPom|http://www.warwick.ac.uk/~tuspam/tiddlypom.html]]''\n\n|Name|SplashScreenPlugin|\n|Created by|SaqImtiaz|\n|Location|http://lewcid.googlepages.com/lewcid.html#SplashScreenPlugin|\n|Version|0.2 |\n|Requires|~TW2.08+|\n!Description:\nProvides a simple splash screen that is visible while the TW is loading.\n\n!Installation\nCopy the source text of this tiddler to your TW in a new tiddler, tag it with systemConfig and save and reload. The SplashScreen will now be installed and will be visible the next time you reload your TW.\n\n!Customizing\nOnce the SplashScreen has been installed and you have reloaded your TW, the splash screen html will be present in the MarkupPreHead tiddler. You can edit it and customize to your needs.\n\n!History\n* 26-06-06 : version 0.2, first release\n\n!Code\n***/\n//{{{\nvar old_lewcid_splash_restart=restart;\n\nrestart = function()\n{ if (document.getElementById("SplashScreen"))\n document.getElementById("SplashScreen").style.display = "none";\n \n old_lewcid_splash_restart();\n \n if (splashScreenInstall)\n {if(config.options.chkAutoSave)\n {saveChanges();}\n displayMessage("TW SplashScreen has been installed, please save and refresh your TW.");\n }\n}\n\n\nvar oldText = store.getTiddlerText("MarkupPreHead");\nif (oldText.indexOf("SplashScreen")==-1)\n {var siteTitle = store.getTiddlerText("SiteTitle");\n var splasher='\sn\sn<div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';\n if (! store.tiddlerExists("MarkupPreHead"))\n {var myTiddler = store.createTiddler("MarkupPreHead");}\n else\n {var myTiddler = store.getTiddler("MarkupPreHead");}\n myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);\n store.setDirty(true);\n var splashScreenInstall = true;\n}\n//}}}
!! [img[warn]] Todo\n<<listTags todo modified * reverse>>\n\n!!Reminder for the month\n<<showReminders leadtime:100 format:"|DIFF|DATE|TITLE|TIDDLER|">>
| !Done |bgcolor(#a0ffa0): Done | {{{bgcolor(#a0ffa0): Done}}} |\n| !In progress |bgcolor(#c0ffff): In progress | {{{bgcolor(#c0ffff): In progress}}} |\n| !Planned |bgcolor(#ffdead): Scheduled from xx/xx/xx to xx/xx/xx | {{{bgcolor(#ffdead): Scheduled}}} |\n| !To do |bgcolor(#ff6666): @@color(white):No schedule@@ | {{{bgcolor(#ff6666): @@color(white):No schedule@@}}} |
/***\n!Colors Used\n*@@bgcolor(#8cf): #8cf - Background blue@@\n*@@bgcolor(#18f): #18f - Top blue@@\n*@@bgcolor(#04b): #04b - Mid blue@@\n*@@bgcolor(#014):color(#fff): #014 - Bottom blue@@\n*@@bgcolor(#ffc): #ffc - Bright yellow@@\n*@@bgcolor(#fe8): #fe8 - Highlight yellow@@\n*@@bgcolor(#db4): #db4 - Background yellow@@\n*@@bgcolor(#841): #841 - Border yellow@@\n*@@bgcolor(#703):color(#fff): #703 - Title red@@\n*@@bgcolor(#866): #866 - Subtitle grey@@\n!Generic Rules /%==============================================%/\n***/\n/*{{{*/\nbody {\n background: #fff;\n color: #000;\n}\n\na{\n color: #04b;\n}\n\na:hover{\n background: #04b;\n color: #fff;\n}\n\na img{\n border: 0;\n}\n\nh1,h2,h3,h4,h5 {\n color: #703;\n background: #8cf;\n}\n\n.button {\n color: #014;\n border: 1px solid #fff;\n}\n\n.button:hover {\n color: #014;\n background: #fe8;\n border: 1px solid #db4;\n}\n\n.button:active {\n color: #fff;\n background: #db4;\n border: 1px solid #841;\n}\n\n/*}}}*/\n/***\n!Header /%==================================================%/\n***/\n/*{{{*/\n.header {\n background: #FFF;\n}\n\n.headerShadow {\n color: #454545;\n}\n\n.headerShadow a {\n font-weight: normal;\n color: #454545;\n}\n\n.headerForeground {\n color: #0667AC;\n}\n\n.headerForeground a {\n font-weight: normal;\n color: #0667AC;\n}\n\n/*}}}*/\n/***\n!General tabs /%=================================================%/\n***/\n/*{{{*/\n\n.tabSelected{\n color: #014;\n background: #eee;\n border-left: 1px solid #ccc;\n border-top: 1px solid #ccc;\n border-right: 1px solid #ccc;\n}\n\n.tabUnselected {\n color: #fff;\n background: #999;\n}\n\n.tabContents {\n color: #014;\n background: #eee;\n border: 1px solid #ccc;\n}\n\n.tabContents .button {\n border: 0;}\n\n/*}}}*/\n/***\n!Sidebar options /%=================================================%/\n~TiddlyLinks and buttons are treated identically in the sidebar and slider panel\n***/\n/*{{{*/\n#sidebar {\n}\n\n#sidebarOptions input {\n border: 1px solid #04b;\n}\n\n#sidebarOptions .sliderPanel {\n background: #8cf;\n}\n\n#sidebarOptions .sliderPanel a {\n border: none;\n color: #04b;\n}\n\n#sidebarOptions .sliderPanel a:hover {\n color: #fff;\n background: #04b;\n}\n\n#sidebarOptions .sliderPanel a:active {\n color: #04b;\n background: #fff;\n}\n/*}}}*/\n/***\n!Message Area /%=================================================%/\n***/\n/*{{{*/\n#messageArea {\n border: 1px solid #000;\n background: #dedede;\n color: #014;\n}\n\n#messageArea .button {\n padding: 0.2em 0.2em 0.2em 0.2em;\n border: 1px solid #FFF;\n color: #000;\n background: #88CCFF;\n}\n#messageArea .button a {\n color: #000;\n}\n\n\n/*}}}*/\n/***\n!Popup /%=================================================%/\n***/\n/*{{{*/\n.popup {\n background: #18f;\n border: 1px solid #04b;\n}\n\n.popup hr {\n color: #014;\n background: #014;\n border-bottom: 1px;\n}\n\n.popup li.disabled {\n color: #04b;\n}\n\n.popup li a, .popup li a:visited {\n color: #eee;\n border: none;\n}\n\n.popup li a:hover {\n background: #014;\n color: #fff;\n border: none;\n}\n/*}}}*/\n/***\n!Tiddler Display /%=================================================%/\n***/\n/*{{{*/\n.tiddler .defaultCommand {\n font-weight: bold;\n}\n\n.shadow .title {\n color: #866;\n}\n\n.title {\n color: #703;\n}\n\n.subtitle {\n color: #866;\n}\n\n.toolbar {\n color: #04b;\n}\n\n.tagging, .tagged {\n border: 1px solid #eee;\n background-color: #eee;\n}\n\n.selected .tagging, .selected .tagged {\n background-color: #ddd;\n border: 1px solid #bbb;\n}\n\n.tagging .listTitle, .tagged .listTitle {\n color: #014;\n}\n\n.tagging .button, .tagged .button {\n border: none;\n}\n\n.footer {\n color: #ddd;\n}\n\n.selected .footer {\n color: #888;\n}\n\n.sparkline {\n background: #8cf;\n border: 0;\n}\n\n.sparktick {\n background: #014;\n}\n\n.errorButton {\n color: #ff0;\n background: #f00;\n}\n\n.cascade {\n background: #eef;\n color: #aac;\n border: 1px solid #aac;\n}\n\n.imageLink, #displayArea .imageLink {\n background: transparent;\n}\n\n/*}}}*/\n/***\n''The viewer is where the tiddler content is displayed'' /%------------------------------------------------%/\n***/\n/*{{{*/\n\n.viewer .listTitle {list-style-type: none; margin-left: -2em;}\n\n.viewer .button {\n border: 1px solid #db4;\n}\n\n.viewer blockquote {\n border-left: 3px solid #666;\n}\n\n.viewer table {\n border: 2px solid #333;\n}\n\n.viewer th, thead td {\n background: #996;\n border: 1px solid #666;\n color: #fff;\n}\n\n.viewer td, .viewer tr {\n border: 1px solid #666;\n}\n\n.viewer pre {\n border: 1px solid #fe8;\n background: #ffc;\n}\n\n.viewer code {\n color: #703;\n}\n\n.viewer hr {\n border: 0;\n border-top: dashed 1px #666;\n color: #666;\n}\n\n.highlight, .marked {\n background: #fe8;\n}\n/*}}}*/\n/***\n''The editor replaces the viewer in the tiddler'' /%------------------------------------------------%/\n***/\n/*{{{*/\n.editor input {\n border: 1px solid #04b;\n}\n\n.editor textarea {\n border: 1px solid #04b;\n width: 100%;\n}\n\n.editorFooter {\n color: #aaa;\n}\n\n/*}}}*/
/***\n!Sections in this Tiddler:\n*Generic rules\n**Links styles\n**Link Exceptions\n*Header\n*Main menu\n*Sidebar\n**Sidebar options\n**Sidebar tabs\n*Message area\n*Popup\n*Tabs\n*Tiddler display\n**Viewer\n**Editor\n*Misc. rules\n!Generic Rules /%==============================================%/\n***/\n/*{{{*/\nbody {\n font-size: .75em;\n font-family: arial,helvetica;\n position: relative;\n margin: 0;\n padding: 0;\n}\n\nh1,h2,h3,h4,h5 {\n font-weight: bold;\n text-decoration: none;\n padding-left: 0.4em;\n}\n\nh1 {font-size: 1.35em;}\nh2 {font-size: 1.25em;}\nh3 {font-size: 1.1em;}\nh4 {font-size: 1em;}\nh5 {font-size: .9em;}\n\nhr {\n height: 1px;\n}\n\na{\n text-decoration: none;\n}\n\nol { list-style-type: decimal }\nol ol { list-style-type: lower-alpha }\nol ol ol { list-style-type: lower-roman }\nol ol ol ol { list-style-type: decimal }\nol ol ol ol ol { list-style-type: lower-alpha }\nol ol ol ol ol ol { list-style-type: lower-roman }\nol ol ol ol ol ol ol { list-style-type: decimal }\n\n\ntable {\n border:2px solid #333; margin:5px;font-size:8pt;\nborder-collapse: collapse;\n margin: 0.8em 1.0em;\n}\ntable caption{\n border:1px solid;\n border-color:#ddd #999 #888 #ddd;\n background-color:#BDCFE7;\n font-weight:bold;\n text-align:center;\n color:#1861AD;\n padding:2px;\n padding-bottom:0px;\n font-size:8pt;\n}\ntable th {\n border:1px solid;\n border-color:#ddd #999 #888 #ddd;\n background-color:#ddd;\n font-weight:bold;\n text-align:center;\n color:#003;\n padding:2px;\n padding-bottom:0px;\n font-size:.9em;\n}\ntable td {\n border:1px solid;\n border-color:#fff #bbb #bbb #fff;\n background-color:#fff;\n padding:1px;\n font-size:.9em;\n}\n/*}}}*/\n/***\n''General Link Styles'' /%-----------------------------------------------------------------------------%/\n***/\n/*{{{*/\n.externalLink {\n text-decoration: underline;\n}\n\n.tiddlyLinkExisting {\n font-weight: bold;\n}\n\n.tiddlyLinkNonExisting {\n font-style: italic;\n}\n\n/* the 'a' is required for IE, otherwise it renders the whole tiddler a bold */\na.tiddlyLinkNonExisting.shadow {\n font-weight: bold;\n}\n/*}}}*/\n/***\n''Exceptions to common link styles'' /%------------------------------------------------------------------%/\n***/\n/*{{{*/\n\n#mainMenu .tiddlyLinkExisting, \n#mainMenu .tiddlyLinkNonExisting,\n#sidebarTabs .tiddlyLinkExisting,\n#sidebarTabs .tiddlyLinkNonExisting,\n#siteTitle .tiddlyLinkExisting,\n#siteTitle .tiddlyLinkNonExisting{\n font-weight: normal;\n font-style: normal;\n}\n\n/*}}}*/\n/***\n!Header /%==================================================%/\n***/\n/*{{{*/\n\n.header {\n position: relative;height:50px;\n}\n\n.header a:hover {\n background: transparent;\n}\n\n.headerShadow {\n position: relative;\n padding: 0em 0em 1em 1em;\n left: -1px;\n top: -1px;\n}\n\n.headerForeground {\n position: absolute;\n padding: 0em 0em 1em 1em;\n left: 0px;\n top: 0px;\n}\n\n.siteTitle {\n font-size: 3em;\n}\n\n.siteSubtitle {\n font-size: 1.2em;\n}\n\n/*}}}*/\n/***\n!Main menu /%==================================================%/\n***/\n/*{{{*/\n#mainMenu {\n position: absolute;\n left: 0;\n width: 10em;\n text-align: right;\n}\n\n/*}}}*/\n/***\n!Sidebar rules /%==================================================%/\n***/\n/*{{{*/\n#sidebar {\n position: absolute;\n right: 3px;\n width: 16em;\n font-size: .9em;\n}\n/*}}}*/\n/***\n''Sidebar options'' /%----------------------------------------------------------------------------------%/\n***/\n/*{{{*/\n#sidebarOptions {\n padding-top: 0.3em;\n}\n\n#sidebarOptions a {\n margin: 0em 0.2em;\n padding: 0.2em 0.3em;\n display: block;\n}\n\n#sidebarOptions input {\n margin: 0.4em 0.5em;\n}\n\n#sidebarOptions .sliderPanel {\n margin-left: 1em;\n padding: 0.5em;\n font-size: .85em;\n}\n\n#sidebarOptions .sliderPanel a {\n font-weight: bold;\n display: inline;\n padding: 0;\n}\n\n#sidebarOptions .sliderPanel input {\n margin: 0 0 .3em 0;\n}\n/*}}}*/\n/***\n''Sidebar tabs'' /%-------------------------------------------------------------------------------------%/\n***/\n/*{{{*/\n\n#sidebarTabs .tabContents {\n width: 15em;\n overflow: hidden;\n}\n\n/*}}}*/\n/***\n!Message area /%==================================================%/\n***/\n/*{{{*/\n#messageArea {\nposition:absolute; top:0; right:0; margin: 0.5em; padding: 0.5em;\n}\n\n*[id='messageArea'] {\nposition:fixed !important; z-index:99;}\n\n.messageToolbar {\ndisplay: block;\ntext-align: right;\n}\n\n#messageArea a{text-decoration: underline;}\n#messageArea .button a{text-decoration: none;}\n\n/*}}}*/\n/***\n!Popup /%==================================================%/\n***/\n/*{{{*/\n.popup {\n font-size: .9em;\n padding: 0.2em;\n list-style: none;\n margin: 0;\n}\n\n.popup hr {\n display: block;\n height: 1px;\n width: auto;\n padding: 0;\n margin: 0.2em 0em;\n}\n\n.popup li.disabled {\n padding: 0.2em;\n}\n\n.popup li a{\n display: block;\n padding: 0.2em;\n}\n/*}}}*/\n/***\n!Tabs /%==================================================%/\n***/\n/*{{{*/\n.tabset {\n padding: 1em 0em 0em 0.5em;\n}\n\n.tab {\n margin: 0em 0em 0em 0.25em;\n padding: 2px;\n}\n\n.tabContents {\n padding: 0.5em;\n}\n\n.tabContents ul, .tabContents ol {\n margin: 0;\n padding: 0;\n}\n\n.tabContents li {\n list-style: none;\n}\n\n.tabContents li.listLink {\n margin-left: .75em;\n}\n/*}}}*/\n/***\n!Tiddler display rules /%==================================================%/\n***/\n/*{{{*/\n#displayArea {\n margin: 1em 17em 0em 14em;\n}\n\n\n.toolbar {\n text-align: right;\n font-size: .9em;\n visibility: hidden;\n}\n\n.selected .toolbar {\n visibility: visible;\n}\n\n.tiddler {\n padding: 1em 1em 0em 1em;\n}\n\n.missing .viewer,.missing .title {\n font-style: italic;\n}\n\n.title {\n font-size: 1.6em;\n font-weight: bold;\n}\n\n.missing .subtitle {\n display: none;\n}\n\n.subtitle {\n font-size: 1.1em;\n}\n\n/* I'm not a fan of how button looks in tiddlers... */\n.tiddler .button {\n padding: 0.2em 0.4em;\n}\n\n.tagging {\nmargin: 0.5em 0.5em 0.5em 0;\nfloat: left;\ndisplay: none;\n}\n\n.isTag .tagging {\ndisplay: block;\n}\n\n.tagged {\nmargin: 0.5em;\nfloat: right;\n}\n\n.tagging, .tagged {\nfont-size: 0.9em;\npadding: 0.25em;\n}\n\n.tagging ul, .tagged ul {\nlist-style: none;margin: 0.25em;\npadding: 0;\n}\n\n.tagClear {\nclear: both;\n}\n\n.footer {\n font-size: .9em;\n}\n\n.footer li {\ndisplay: inline;\n}\n/***\n''The viewer is where the tiddler content is displayed'' /%------------------------------------------------%/\n***/\n/*{{{*/\n* html .viewer pre {\n width: 99%;\n padding: 0 0 1em 0;\n}\n\n.viewer {\n line-height: 1.4em;\n padding-top: 0.5em;\n}\n\n.viewer .button {\n margin: 0em 0.25em;\n padding: 0em 0.25em;\n}\n\n.viewer blockquote {\n line-height: 1.5em;\n padding-left: 0.8em;\n margin-left: 2.5em;\n}\n\n.viewer ul, .viewer ol{\n margin-left: 0.5em;\n padding-left: 1.5em;\n}\n\n.viewer table {\n border-collapse: collapse;\n margin: 0.8em 1.0em;\n}\n\n.viewer th, .viewer td, .viewer tr,.viewer caption{\n padding: 3px;\n}\n\n.viewer pre {\n padding: 0.5em;\n margin-left: 0.5em;\n font-size: 1.2em;\n line-height: 1.4em;\n overflow: auto;\n}\n\n.viewer code {\n font-size: 1.2em;\n line-height: 1.4em;\n}\n\n.viewer table {\n border:2px solid #333; margin:5px;font-size:9pt;\nborder-collapse: collapse;\n margin: 0.8em 1.0em;\n}\n.viewer table caption{\n border:1px solid;\n border-color:#ddd #999 #888 #ddd;\n background-color:#BDCFE7;\n font-weight:bold;\n text-align:center;\n color:#1861AD;\n padding:2px;\n padding-bottom:0px;\n font-size:8pt;\n}\n.viewer table th {\n border:1px solid;\n border-color:#ddd #999 #888 #ddd;\n background-color:#ddd;\n font-weight:bold;\n text-align:center;\n color:#003;\n padding:2px;\n padding-bottom:0px;\n font-size:.9em;\n}\n.viewer table td {\n border:1px solid;\n border-color:#fff #bbb #bbb #fff;\n background-color:#fff;\n padding:1px;\n font-size:.9em;\n}\n/*}}}*/\n/***\n''The editor replaces the viewer in the tiddler'' /%------------------------------------------------%/\n***/\n/*{{{*/\n.editor {\nfont-size: 1.1em;\n}\n\n.editor input, .editor textarea {\n display: block;\n width: 100%;\n font: inherit;\n}\n\n.editorFooter {\n padding: 0.25em 0em;\n font-size: .9em;\n}\n\n.editorFooter .button {\npadding-top: 0px; padding-bottom: 0px;}\n\n.fieldsetFix {border: 0;\npadding: 0;\nmargin: 1px 0px 1px 0px;\n}\n/*}}}*/\n/***\n!Misc rules /%==================================================%/\n***/\n/*{{{*/\n.sparkline {\n line-height: 1em;\n}\n\n.sparktick {\n outline: 0;\n}\n\n.zoomer {\n font-size: 1.1em;\n position: absolute;\n padding: 1em;\n}\n\n.cascade {\n font-size: 1.1em;\n position: absolute;\n overflow: hidden;\n}\n/*}}}*/\n/***\n!Print /%==================================================%/\n***/\n/*{{{*/\n@media print {\n.header {display: none ! important;}\n.toolbar {display: none ! important;}\n.tagged {display: none ! important;}\n.tagging {display: none ! important; } \n} \n/*}}}*/\n
@media print {\n#mainMenu, #sidebar, #messageArea ,.header,.toolbar {display: none ! important;}\n#displayArea {margin: 1em 1em 0em 1em;}\nnoscript {display:none;}\n}
<<tabs txtMoreTab\nTags "All tags" TabTags\nAll "All tiddlers" TabMoreAll\nMissing "Missing tiddlers" TabMoreMissing\nOrphans "Orphaned tiddlers" TabMoreOrphans\n>>
<<list all>>
<<list missing>>
<<list orphans>>
<<timeline field:modified limit:40>>
!Partial\n<<tagCloud attachment systemTiddlers systemConfig macrotest TiddlerTemplates V2.0 excludeMissing>>\n\n!Full\n<<tagCloud>>\n
version.extensions.tagCloud = {major: 1, minor: 0 , revision: 0, date: new Date(2006,2,04)};\n//Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman\n\nconfig.macros.tagCloud = {\n noTags: "No tag cloud created because there are no tags.",\n tooltip: "%1 tiddlers tagged with '%0'"\n};\n\nconfig.macros.tagCloud.handler = function(place,macroName,params) {\n \nvar tagCloudWrapper = createTiddlyElement(place,"div",null,"tagCloud",null);\n\nvar tags = store.getTags();\nfor (var t=0; t<tags.length; t++) {\n for (var p=0;p<params.length; p++) if (tags[t][0] == params[p]) tags[t][0] = "";\n}\n\n if(tags.length == 0) \n createTiddlyElement(tagCloudWrapper,"span",null,null,this.noTags);\n //Findout the maximum number of tags\n var mostTags = 0;\n for (var t=0; t<tags.length; t++) if (tags[t][0].length > 0){\n if (tags[t][1] > mostTags) mostTags = tags[t][1];\n }\n //divide the mostTags into 4 segments for the 4 different tagCloud sizes\n var tagSegment = mostTags / 4;\n\n for (var t=0; t<tags.length; t++) if (tags[t][0].length > 0){\n var tagCloudElement = createTiddlyElement(tagCloudWrapper,"span",null,null,null);\n tagCloudWrapper.appendChild(document.createTextNode(" "));\n var theTag = createTiddlyButton(tagCloudElement,tags[t][0],this.tooltip.format(tags[t]),onClickTag,"tagCloudtag tagCloud" + (Math.round(tags[t][1]/tagSegment)+1));\n theTag.setAttribute("tag",tags[t][0]);\n }\n\n};\n\nsetStylesheet(".tagCloud span{height: 1.8em;margin: 3px;}.tagCloud1{font-size: 1.2em;}.tagCloud2{font-size: 1.4em;}.tagCloud3{font-size: 1.6em;}.tagCloud4{font-size: 1.8em;}.tagCloud5{font-size: 1.8em;font-weight: bold;}","tagCloudsStyles");
<<slideShow>> - A simple slide show that keeps the TW style \n<<slideShow style:'SlideStyleSheet' clock:'+'>> - A themed slide show with a clock showing the presentation elapsed time\n<<slideShow repeat clock:'-20'>> - A looping slide show with a 20 minutes countdown clock\n<<slideShow slidePause:1000>> - A timed slideshow that runs once\n<<slideShow slidePause:1000 repeat>> - A timed looping slideshow\n-s-\nsecond slide\n-s-\nfirst slide
version.extensions.timeline = {major: 1, minor: 0 , revision: 1, date:\nnew Date(2006,1,9)};\n\nconfig.macros.timeline.handler = function(place,macroName,params)\n{\n var field = "modified";\n var limit = 0;\n\nfor(var t=0; t<params.length; t++) {\n type = params[t].split(":")[0].toLowerCase();\n if (type == "limit")\n limit = parseInt(params[t].split(":")[1]);\n if (type == "field")\n field = params[t].split(":")[1];\n }\n\n var tiddlers = store.reverseLookup("tags","excludeMissing",false,field);\n var lastDay = "";\n if (limit==0) { limit = tiddlers.length; }\n for (t=tiddlers.length-1; t>=(tiddlers.length-1-(limit-1)); t--)\n {\n var tiddler = tiddlers[t];\n var theDay = tiddler.modified.convertToYYYYMMDDHHMM().substr(0,8);\n if(theDay != lastDay)\n {\n var theDateList = document.createElement("ul");\n place.appendChild(theDateList);\n createTiddlyElement(theDateList,"li",null,"listTitle",tiddler.modified.formatString(this.dateFormat));\n lastDay = theDay;\n }\n var theDateListItem = createTiddlyElement(theDateList,"li",null,"listLink",null);\n theDateListItem.appendChild(createTiddlyLink(place,tiddler.title,true));\n }\n}
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |\n
!Options used by UploadPlugin\nUsername: <<option txtUploadUserName>>\nPassword: <<option pasUploadPassword>>\n\nUrl of the [[store.php]] script^^(1)^^: <<option txtUploadStoreUrl 50>>\nRelative Directory to store the file^^(2)^^: <<option txtUploadDir 50>>\nFilename of the uploaded file^^(3)^^: <<option txtUploadFilename 40>>\nDirectory to backup file on webserver^^(4)^^: <<option txtUploadBackupDir>>\n\n^^(1)^^Mandatory either in UploadOptions or in MacroParameter\n^^(2)^^If empty stores in the [[store.php]] directory\n^^(3)^^If empty takes the actual filename\n^^(4)^^If empty existing the file with same name on webserver will be overwriten\n\n!Upload\n{{{<<upload [[UploadStoreUrl]}}}^^(1)^^{{{ [UploadFilename] [UploadBackupDir]]>>}}}\n\n<<upload>>
/***\n<<tiddler UploadPluginDoc>>\n!Code\n***/\n//{{{\nversion.extensions.UploadPlugin = {\n major: 3, minor: 3, revision: 1, \n date: new Date(2006,3,30),\n type: 'macro',\n source: 'http://tiddlywiki.bidix.info/#UploadPlugin',\n docs: 'http://tiddlywiki.bidix.info/#UploadPluginDoc'\n};\n//}}}\n\n////+++!![config.lib.file]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.file) config.lib.file= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.file.dirname = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(0, lastpos);\n } else {\n return filePath.substring(0, filePath.lastIndexOf("\s\s"));\n }\n};\nconfig.lib.file.basename = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("#")) != -1) \n filePath = filePath.substring(0, lastpos);\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(lastpos + 1);\n } else\n return filePath.substring(filePath.lastIndexOf("\s\s")+1);\n};\nwindow.basename = function() {return "@@deprecated@@";};\n//}}}\n////===\n\n////+++!![config.lib.log]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.log) config.lib.log= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.Log = function(tiddlerTitle, logHeader) {\n if (version.major < 2)\n this.tiddler = store.tiddlers[tiddlerTitle];\n else\n this.tiddler = store.getTiddler(tiddlerTitle);\n if (!this.tiddler) {\n this.tiddler = new Tiddler();\n this.tiddler.title = tiddlerTitle;\n this.tiddler.text = "| !date | !user | !location |" + logHeader;\n this.tiddler.created = new Date();\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[tiddlerTitle] = this.tiddler;\n else\n store.addTiddler(this.tiddler);\n }\n return this;\n};\n\nconfig.lib.Log.prototype.newLine = function (line) {\n var now = new Date();\n var newText = "| ";\n newText += now.getDate()+"/"+(now.getMonth()+1)+"/"+now.getFullYear() + " ";\n newText += now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+" | ";\n newText += config.options.txtUserName + " | ";\n var location = document.location.toString();\n var filename = config.lib.file.basename(location);\n if (!filename) filename = '/';\n newText += "[["+filename+"|"+location + "]] |";\n this.tiddler.text = this.tiddler.text + "\sn" + newText;\n this.addToLine(line);\n};\n\nconfig.lib.Log.prototype.addToLine = function (text) {\n this.tiddler.text = this.tiddler.text + text;\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[this.tiddler.tittle] = this.tiddler;\n else {\n store.addTiddler(this.tiddler);\n story.refreshTiddler(this.tiddler.title);\n store.notify(this.tiddler.title, true);\n }\n if (version.major < 2)\n store.notifyAll(); \n};\n//}}}\n////===\n\n////+++!![config.lib.options]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.options) config.lib.options = {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\n\nconfig.lib.options.init = function (name, defaultValue) {\n if (!config.options[name]) {\n config.options[name] = defaultValue;\n saveOptionCookie(name);\n }\n};\n//}}}\n////===\n\n////+++!![PasswordTweak]\n\n//{{{\nversion.extensions.PasswordTweak = {\n major: 1, minor: 0, revision: 2, date: new Date(2006,3,11),\n type: 'tweak',\n source: 'http://tiddlywiki.bidix.info/#PasswordTweak'\n};\n//}}}\n/***\n!!config.macros.option\n***/\n//{{{\nconfig.macros.option.passwordCheckboxLabel = "Save this password on this computer";\nconfig.macros.option.passwordType = "password"; // password | text\n\nconfig.macros.option.onChangeOption = function(e)\n{\n var opt = this.getAttribute("option");\n var elementType,valueField;\n if(opt) {\n switch(opt.substr(0,3)) {\n case "txt":\n elementType = "input";\n valueField = "value";\n break;\n case "pas":\n elementType = "input";\n valueField = "value";\n break;\n case "chk":\n elementType = "input";\n valueField = "checked";\n break;\n }\n config.options[opt] = this[valueField];\n saveOptionCookie(opt);\n var nodes = document.getElementsByTagName(elementType);\n for(var t=0; t<nodes.length; t++) {\n var optNode = nodes[t].getAttribute("option");\n if (opt == optNode) \n nodes[t][valueField] = this[valueField];\n }\n }\n return(true);\n};\n\nconfig.macros.option.handler = function(place,macroName,params)\n{\n var opt = params[0];\n var size = 15;\n if (params[1])\n size = params[1];\n if(config.options[opt] === undefined) {\n return;}\n var c;\n switch(opt.substr(0,3)) {\n case "txt":\n c = document.createElement("input");\n c.onkeyup = this.onChangeOption;\n c.setAttribute ("option",opt);\n c.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\n break;\n case "pas":\n // input password\n c = document.createElement ("input");\n c.setAttribute("type",config.macros.option.passwordType);\n c.onkeyup = this.onChangeOption;\n c.setAttribute("option",opt);\n c.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\n // checkbox link with this password "save this password on this computer"\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option","chk"+opt);\n place.appendChild(c);\n c.checked = config.options["chk"+opt];\n // text savePasswordCheckboxLabel\n place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));\n break;\n case "chk":\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option",opt);\n place.appendChild(c);\n c.checked = config.options[opt];\n break;\n }\n};\n//}}}\n/***\n!! Option cookie stuff\n***/\n//{{{\nwindow.loadOptionsCookie_orig_PasswordTweak = window.loadOptionsCookie;\nwindow.loadOptionsCookie = function()\n{\n var cookies = document.cookie.split(";");\n for(var c=0; c<cookies.length; c++) {\n var p = cookies[c].indexOf("=");\n if(p != -1) {\n var name = cookies[c].substr(0,p).trim();\n var value = cookies[c].substr(p+1).trim();\n switch(name.substr(0,3)) {\n case "txt":\n config.options[name] = unescape(value);\n break;\n case "pas":\n config.options[name] = unescape(value);\n break;\n case "chk":\n config.options[name] = value == "true";\n break;\n }\n }\n }\n};\n\nwindow.saveOptionCookie_orig_PasswordTweak = window.saveOptionCookie;\nwindow.saveOptionCookie = function(name)\n{\n var c = name + "=";\n switch(name.substr(0,3)) {\n case "txt":\n c += escape(config.options[name].toString());\n break;\n case "chk":\n c += config.options[name] ? "true" : "false";\n // is there an option link with this chk ?\n if (config.options[name.substr(3)]) {\n saveOptionCookie(name.substr(3));\n }\n break;\n case "pas":\n if (config.options["chk"+name]) {\n c += escape(config.options[name].toString());\n } else {\n c += "";\n }\n break;\n }\n c += "; expires=Fri, 1 Jan 2038 12:00:00 UTC; path=/";\n document.cookie = c;\n};\n//}}}\n/***\n!! Initializations\n***/\n//{{{\n// define config.options.pasPassword\nif (!config.options.pasPassword) {\n config.options.pasPassword = 'defaultPassword';\n window.saveOptionCookie('pasPassword');\n}\n// since loadCookies is first called befor password definition\n// we need to reload cookies\nwindow.loadOptionsCookie();\n//}}}\n////===\n\n////+++!![config.macros.upload]\n\n//{{{\nconfig.macros.upload = {\n accessKey: "U",\n formName: "UploadPlugin",\n contentType: "text/html;charset=UTF-8",\n defaultStoreScript: "store.php"\n};\n\n// only this two configs need to be translated\nconfig.macros.upload.messages = {\n aboutToUpload: "About to upload TiddlyWiki to %0",\n errorDownloading: "Error downloading",\n errorUploadingContent: "Error uploading content",\n fileNotFound: "file to upload not found",\n fileNotUploaded: "File %0 NOT uploaded",\n mainFileUploaded: "Main TiddlyWiki file uploaded to %0",\n urlParamMissing: "url param missing",\n rssFileNotUploaded: "RssFile %0 NOT uploaded",\n rssFileUploaded: "Rss File uploaded to %0"\n};\n\nconfig.macros.upload.label = {\n promptOption: "Save and Upload this TiddlyWiki with UploadOptions",\n promptParamMacro: "Save and Upload this TiddlyWiki in %0",\n saveLabel: "save to web", \n saveToDisk: "save to disk",\n uploadLabel: "upload" \n};\n\nconfig.macros.upload.handler = function(place,macroName,params){\n // parameters initialization\n var storeUrl = params[0];\n var toFilename = params[1];\n var backupDir = params[2];\n var uploadDir = params[3];\n var username = params[4];\n var password; // for security reason no password as macro parameter\n var label;\n if (document.location.toString().substr(0,4) == "http")\n label = this.label.saveLabel;\n else\n label = this.label.uploadLabel;\n var prompt;\n if (storeUrl) {\n prompt = this.label.promptParamMacro.toString().format([this.dirname(storeUrl)]);\n }\n else {\n prompt = this.label.promptOption;\n }\n createTiddlyButton(place, label, prompt, \n function () {\n config.macros.upload.upload(storeUrl, toFilename, uploadDir, backupDir, username, password); \n return false;}, \n null, null, this.accessKey);\n};\nconfig.macros.upload.UploadLog = function() {\n return new config.lib.Log('UploadLog', " !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |" );\n};\nconfig.macros.upload.UploadLog.prototype = config.lib.Log.prototype;\nconfig.macros.upload.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {\n var line = " [[" + config.lib.file.basename(storeUrl) + "|" + storeUrl + "]] | ";\n line += uploadDir + " | " + toFilename + " | " + backupDir + " |";\n this.newLine(line);\n};\nconfig.macros.upload.UploadLog.prototype.endUpload = function() {\n this.addToLine(" Ok |");\n};\nconfig.macros.upload.basename = config.lib.file.basename;\nconfig.macros.upload.dirname = config.lib.file.dirname;\nconfig.macros.upload.upload = function(storeUrl, toFilename, uploadDir, backupDir, username, password)\n{\n // parameters initialization\n storeUrl = (storeUrl ? storeUrl : config.options.txtUploadStoreUrl);\n toFilename = (toFilename ? toFilename : config.options.txtUploadFilename);\n if (toFilename === '') {\n toFilename = config.lib.file.basename(document.location.toString());\n }\n backupDir = (backupDir ? backupDir : config.options.txtUploadBackupDir);\n uploadDir = (uploadDir ? uploadDir : config.options.txtUploadDir);\n username = (username ? username : config.options.txtUploadUserName);\n password = config.options.pasUploadPassword; // for security reason no password as macro parameter\n\n clearMessage();\n // only for forcing the message to display\n if (version.major < 2)\n store.notifyAll();\n if (!storeUrl) {\n alert(config.macros.upload.messages.urlParamMissing);\n return;\n }\n \n var log = new this.UploadLog();\n log.startUpload(storeUrl, toFilename, uploadDir, backupDir);\n if (document.location.toString().substr(0,5) == "file:") {\n saveChanges();\n }\n displayMessage(config.macros.upload.messages.aboutToUpload.format([this.dirname(storeUrl)]), this.dirname(storeUrl));\n this.uploadChanges(storeUrl, toFilename, uploadDir, backupDir, username, password);\n if(config.options.chkGenerateAnRssFeed) {\n //var rssContent = convertUnicodeToUTF8(generateRss());\n var rssContent = generateRss();\n var rssPath = toFilename.substr(0,toFilename.lastIndexOf(".")) + ".xml";\n this.uploadContent(rssContent, storeUrl, rssPath, uploadDir, '', username, password, \n function (responseText) {\n if (responseText.substring(0,1) != '0') {\n displayMessage(config.macros.upload.messages.rssFileNotUploaded.format([rssPath]));\n }\n else {\n if (uploadDir) {\n rssPath = uploadDir + "/" + config.macros.upload.basename(rssPath);\n } else {\n rssPath = config.macros.upload.basename(rssPath);\n }\n displayMessage(config.macros.upload.messages.rssFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+rssPath]), config.macros.upload.dirname(storeUrl)+"/"+rssPath);\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n });\n }\n return;\n};\n\nconfig.macros.upload.uploadChanges = function(storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var original;\n if (document.location.toString().substr(0,4) == "http") {\n original = this.download(storeUrl, toFilename, uploadDir, backupDir, username, password);\n return;\n }\n else {\n // standard way : Local file\n \n original = loadFile(getLocalPath(document.location.toString()));\n if(window.Components) {\n // it's a mozilla browser\n try {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]\n .createInstance(Components.interfaces.nsIScriptableUnicodeConverter);\n converter.charset = "UTF-8";\n original = converter.ConvertToUnicode(original);\n }\n catch(e) {\n }\n }\n }\n //DEBUG alert(original);\n this.uploadChangesFrom(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password);\n};\n\nconfig.macros.upload.uploadChangesFrom = function(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var startSaveArea = '<div id="' + 'storeArea">'; // Split up into two so that indexOf() of this source doesn't find it\n var endSaveArea = '</d' + 'iv>';\n // Locate the storeArea div's\n var posOpeningDiv = original.indexOf(startSaveArea);\n var posClosingDiv = original.lastIndexOf(endSaveArea);\n if((posOpeningDiv == -1) || (posClosingDiv == -1))\n {\n alert(config.messages.invalidFileError.format([document.location.toString()]));\n return;\n }\n var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + \n allTiddlersAsHtml() + "\sn\st\st" +\n original.substr(posClosingDiv);\n var newSiteTitle;\n if(version.major < 2){\n newSiteTitle = (getElementText("siteTitle") + " - " + getElementText("siteSubtitle")).htmlEncode();\n } else {\n newSiteTitle = (wikifyPlain ("SiteTitle") + " - " + wikifyPlain ("SiteSubtitle")).htmlEncode();\n }\n revised = revised.replace(new RegExp("<title>[^<]*</title>", "im"),"<title>"+ newSiteTitle +"</title>");\n var response = this.uploadContent(revised, storeUrl, toFilename, uploadDir, backupDir, \n username, password, function (responseText) {\n if (responseText.substring(0,1) != '0') {\n alert(responseText);\n displayMessage(config.macros.upload.messages.fileNotUploaded.format([getLocalPath(document.location.toString())]));\n }\n else {\n if (uploadDir !== '') {\n toFilename = uploadDir + "/" + config.macros.upload.basename(toFilename);\n } else {\n toFilename = config.macros.upload.basename(toFilename);\n }\n displayMessage(config.macros.upload.messages.mainFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+toFilename]), config.macros.upload.dirname(storeUrl)+"/"+toFilename);\n var log = new config.macros.upload.UploadLog();\n log.endUpload();\n store.setDirty(false);\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n }\n );\n};\n\nconfig.macros.upload.uploadContent = function(content, storeUrl, toFilename, uploadDir, backupDir, \n username, password, callbackFn) {\n var boundary = "---------------------------"+"AaB03x"; \n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n if (window.netscape){\n try {\n if (document.location.toString().substr(0,4) != "http") {\n netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');}\n }\n catch (e) { }\n } \n //DEBUG alert("user["+config.options.txtUploadUserName+"] password[" + config.options.pasUploadPassword + "]");\n // compose headers data\n var sheader = "\sr\sn";\n sheader += "--" + boundary + "\sr\snContent-disposition: form-data;name=\s"";\n sheader += config.macros.upload.formName +"\s"\sr\sn\sr\sn";\n sheader += "backupDir="+backupDir\n +";user=" + username \n +";password=" + password\n +";uploaddir=" + uploadDir\n + ";;\sr\sn"; \n sheader += "\sr\sn" + "--" + boundary + "\sr\sn";\n sheader += "Content-disposition: form-data;name=\s"userfile\s";filename=\s""+toFilename+"\s"\sr\sn";\n sheader += "Content-Type: " + config.macros.upload.contentType + "\sr\sn";\n sheader += "Content-Length: " + content.length + "\sr\sn\sr\sn";\n // compose trailer data\n var strailer = new String();\n strailer = "\sr\sn--" + boundary + "--\sr\sn";\n var data;\n data = sheader + content + strailer;\n //request.open("POST", storeUrl, true, username, password);\n request.open("POST", storeUrl, true);\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if (request.status == 200)\n callbackFn(request.responseText);\n else\n alert(config.macros.upload.messages.errorUploadingContent);\n }\n };\n request.setRequestHeader("Content-Length",data.length);\n request.setRequestHeader("Content-Type","multipart/form-data; boundary="+boundary);\n request.send(data); \n};\n\n\nconfig.macros.upload.download = function(uploadUrl, uploadToFilename, uploadDir, uploadBackupDir, \n username, password) {\n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n try {\n if (uploadUrl.substr(0,4) == "http") {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n }\n else {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n }\n } catch (e) { }\n //request.open("GET", document.location.toString(), true, username, password);\n request.open("GET", document.location.toString(), true);\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if(request.status == 200) {\n config.macros.upload.uploadChangesFrom(request.responseText, uploadUrl, \n uploadToFilename, uploadDir, uploadBackupDir, username, password);\n }\n else\n alert(config.macros.upload.messages.errorDownloading.format(\n [document.location.toString()]));\n }\n };\n request.send(null);\n};\n\n//}}}\n////===\n\n////+++!![Initializations]\n\n//{{{\nconfig.lib.options.init('txtUploadStoreUrl','store.php');\nconfig.lib.options.init('txtUploadFilename','');\nconfig.lib.options.init('txtUploadDir','');\nconfig.lib.options.init('txtUploadBackupDir','');\nconfig.lib.options.init('txtUploadUserName',config.options.txtUserName);\nconfig.lib.options.init('pasUploadPassword','');\nconfig.shadowTiddlers.UploadPluginDoc = "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadPluginDoc ]]\sn"; \n\n\n//}}}\n////===\n\n////+++!![Core Hijacking]\n\n//{{{\nconfig.macros.saveChanges.label_orig_UploadPlugin = config.macros.saveChanges.label;\nconfig.macros.saveChanges.label = config.macros.upload.label.saveToDisk;\n//}}}\n////===
/***\n|''Name:''|UploadPlugin|\n|''Type:''|Plugin|\n|''Version:''|3.3.1 (30/03/2006)|\n|''Source:''|[[TiddlyWiki.BidiX.info/#UploadPlugin|http://tiddlywiki.BidiX.info/#UploadPlugin]]|\n|''Documentation:''|[[TiddlyWiki.BidiX.info/#UploadPluginDoc|http://tiddlywiki.BidiX.info/#UploadPluginDoc]]|\n|''Author:''|BidiX[at]BidiX.info |\n|''Required:''| TW 2.0.6 or better, PHP 4.4 (perhaps less but not working on 4.1.2) |\n\n!Description\nUploadPlugin, with [[store.php]], provides @@upload@@ and @@save to web@@ functions. See HowToUpload ([[HowToUpload|http://TiddlyWiki.bidix.info/#HowToUpload]]).\nUploadPlugin uses Username and Password from UploadOptions stored in cookies to authenticate itself to [[store.php]].\nFrench translation available as a separate tiddler UploadPluginMsgFR\n\n!!UploadPlugin\n*If the TiddlyWiki is viewed from @@local disk@@ :\n**{{{<<saveChanges>>}}} \n***display as ''save to disk''\n***work as usual\n**{{{<<upload>>}}}\n***display as ''upload''\n***after saving to disk, upload in the storeUrl directory.\n*If the TiddlyWiki is viewed from @@website@@ and is @@readOnly@@ (in core TiddlyWiki since 2.0.6) :\n**{{{<<saveChanges>>}}} \n***print nothing\n***has been disabled\n**{{{<<upload>>}}}\n***display as '''save to web''\n***save in the uploadDir directory.\n*If GenerateAnRssFeed in AdvancedOptions is set :\n**generate the content of the RSSFeed \n**upload the RssFile in uploadDir directory\n**Caution : use the SiteUrl tiddler to specify the right url of the TiddlyWiki in the generated RssFile\n*DisplayMessage\n*Log upload action in UploadLog\nhint : if UploadLog is the first tiddler in the Timeline Tab, no tiddler has been updated since last upload.\n\n!![[store.php]]\n*UserVariables to set :\n//{{{\n$AUTHENTICATE_USER = true; // true | false\n$USERS = array(\n 'UserName1'=>'Password1', \n 'UserName2'=>'Password2', \n 'UserName3'=>'Password3'); // set usernames and strong passwords\n$DEBUG = false; // true | false\n//}}}\n*method GET\n**display an information page\n*method POST\n**if $~AUTHENTICATE_USER is ''true''\n***presence and value of user and password are checked with $USER and $PASSWORD \n**if toFilename already exists and backDir parameter specified\n***rename toFilename to backupDir/toFilename.AAAAMMDD.HHSS.html\n**copy temporaryUploadedFile to toFilename\n** return status\n\n!Usage : \n{{{\n<<upload>>\n uses UploadOptions saved in cookies :\n txtUploadUserName: username\n pasUploadPassword : password\n txtUploadStoreUrl : store script\n txtUploadDir : relative path for upload directory\n txtUploadFilename : upload filename\n txtUploadBackupDir : relative path for backup directory\n\n<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>\n optional positional parameters can be passed to overwrite UploadOptions in this order. \n}}}\n\nInstall the {{{<<upload ... >>}}} macro in SideBarOptions just below {{{<<saveChanges>>}}} macro.\n\n\n!User manual\nSee HowToUpload\n\n!Installation :\n*Install the UploadPlugin as usual\n*Upload the [[store.php]] file on your php aware webserver in your TiddlyWiki directory\n*Protect your server against malicious upload. Two approaches :\n**set $~AUTHENTICATE_USER to true in the [[store.php]] script\n***configure $USER and $PASSWORD in the [[store.php]] script on your webserver\n***set UploadOptions in conformity with [[store.php]]\n**Use server protection :\n***for Apache web server ([[for detail see Apache documentation|http://httpd.apache.org/docs/1.3/howto/htaccess.html]]) : \n****configure and upload the [[.htaccess]] [[.passwd]]\n***for other web servers see the appropriate documentation\n*Configure an upload button, for example in the SideBarOptions\n!Suppported Browser\n*Firefox : tested Ok\n*Internet Explorer : tested Ok\n*Safari : reported ok on OS X\n*Others : Not tested, please report status.\n\n!Revision history\n*V 3.3.1 (30/03/2006)\n**bug in backup folder when uploading rssfile fixed\n*V 3.3.0 (12/03/2006)\n**Code refactoring\n**suppress saveChanges hijacking\n*V3.2.2 (25/02/2006)\n**Use PasswordTweak 1.0.1\n**uploaddir is a relative path\n**backupdir is a relative path\n+++[previous revisions]\n*V3.2.1 (13/02/2006)\n**name and password added to open.request (Thanks to TedPavlic)\n*V3.2.0 (14/02/2006)\n**Use PassworDTweak (http://tiddlyWiki.bidix.info/#PasswordTweak) for password\n*V3.1.0 (12/02/2006)\n**UploadOptions in Cookies\n**Username and password from UploadOptions pass to store.php script for authentification check\n*V3.0.3 (03/02/2006)\n**Firefox crashes due to global var fixed\n*V3.0.2 (25-Jan-2006)\n**HTTPS compatible\n*V3.0.1 (18-Jan-2006)\n**UTF8toUnicode conversion problem in Firefox\n*V3.0.0 (15-Jan-2006)\n**Asynchronous upload\n**Synchronous upload before unload of the page\n**All strings extracted in macro config\n**Compatibility checked with TW 2.0.2 & TW 1.2.39 for both FF 1.5 and IE 6\n*V2.0.2 (8-Jan-2006)\n**conversion of SiteTitle and SiteSubtitle in web page Title\n*V2.0.1 (8-Jan-2006)\n**Compatibilty with TiddlyWiki 2.0.1\n*V2.0.0 (3-Jan-2006)\n**Save to web\n**Compatibilty with TiddlyWiki 1.2.39 and TiddlyWiki 2.0.0 Beta 6\n*v1.1.0 (27-Dec-2005)\n**Upload RSS File\n*v1.0.3 (26-Dec-2005)\n**UploadLog tiddler\n*v1.0.2 (24-Dec-2005)\n**Optional parameter toFilename\n**Optional parameter backupDir\n*v1.0.1 (23-Dec-2005)\n**reformatting code\n* v1.0.0 (17-Dec-2005)\n** first public working version\n===\n\n
<div class='toolbar' macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'></div>\n<div class='title' macro='view title'></div>\n<div class='subtitle'></div>\n<div class='tagged' macro='tags'></div>\n<div class='tagging'macro='tagging'></div>\n<div class='viewer' macro='view text wikified'></div>\n<div class='footer'><span macro='view modifier'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (created <span macro='view created date [[DD MMM YYYY]]'></span>)</div>
~TiddlyWiki uses Wiki style markup, a way of lightly "tagging" plain text so it can be transformed into HTML. Edit this Tiddler to see samples.\n\n! Header Samples\n!Header 1\n!!Header 2\n!!!Header 3\n!!!!Header 4\n!!!!!Header 5\n\n! Unordered Lists:\n* Lists are where it's at\n* Just use an asterisk and you're set\n** To nest lists just add more asterisks...\n***...like this\n* The circle makes a great bullet because once you've printed a list you can mark off completed items\n* You can also nest mixed list types\n## Like this\n\n! Ordered Lists\n# Ordered lists are pretty neat too\n# If you're handy with HTML and CSS you could customize the [[numbering scheme|http://www.w3schools.com/css/pr_list-style-type.asp]]\n## To nest, just add more octothorpes (pound signs)...\n### Like this\n* You can also\n** Mix list types\n*** like this\n# Pretty neat don't you think?\n\n! Tiddler links\nTo create a Tiddler link, just use mixed-case WikiWord, or use [[brackets]] for NonWikiWordLinks.\n\nNote that existing Tiddlers are in bold and empty Tiddlers are in italics. See CreatingTiddlers for details.\n\n! External Links\nYou can link to [[external sites (google)|http://www.google.com/]] with brackets or without will just type the url link http://www.google.com/ .You can also Link to folders on your machine or network shares.\n\n! Images\nEdit this tiddler to see how it's done.\n[img[http://zrenard.com/zrenard.png]]\n\n! Sparkline\n<<sparkline 163 218 231 236 232 266 176 249 289 1041 1835 2285 3098 2101 1755 3283 3353 3335 2898 2224 1404 1354 1825 1839 2142 1942 1784 1145 979 1328 1611 49 289 1041 1835 2285 3098 2101 1755 3283 3353 3335 2898 2224 1404 1354 1825 1839 2142 1942 1784 1145 979 1328 1611 49 289 1041 1835 2285 3098 2101 1755 3283 3353 3335 2898 2224 1404 1354 1825 1839 2142 1942 1784 1145 979 1328 1611 49 289 1041 1835 2285 3098 2101 1755 3283 3353 3335 2898 2224 1404 1354 1825 1839 2142 1942 1784 1145 979 1328 1611>>\n\n!Checkbox\n{{{\n[x] checked\n[ ] unchecked\n}}}\n[x] checked\n[ ] unchecked\n\n!Tables\nYou can create a table by enclosing text in sets of vertical bars (||, or shift-backslash on your keyboard). \n|!Headings: add an exclamation point (!) right after the vertical bar.|!Heading2|!Heading3|\n|Row 1, Column 1|Row 1, Column 2|Row 1, Column 3|\n|>|>|Have one row span multiple columns by using a >|\n|Have one column span multiple rows by using a ~|>| Use a space to right-align text in a cell|\n|~|>| Enclose text in a cell with spaces to center it |\n|>|>|bgcolor(#6699CC):Add color to a cell using bgcolor(yourcolorhere):|\n|Add a caption by ending the table with a vertical bar followed by a c|c\n\nFor a complex table example, see PeriodicTable.\n\n! Horizontal Rules\nYou can divide a tiddler into\n----\nsections by typing four dashes on a line by themselves.\n\n! Blockquotes\n<<<\nThis is how you do an extended, wrapped blockquote so you don't have to put angle quotes on every line.\n<<<\n>level 1\n>level 1\n>>level 2\n>>level 2\n>>>level 3\n>>>level 3\n>>level 2\n>level 1\n\n! Other Formatting\n{{{''Bold''}}} : ''Bold''\n{{{==Strike==}}} : ==Strike==\n{{{__Underline__}}} : __Underline__\n{{{//Italic//}}} : //Italic//\nSuperscript: {{{2^^3^^=8}}} : 2^^3^^=8\nSubscript: {{{a~~ij~~ = -a~~ji~~}}} : a~~ij~~ = -a~~ji~~\n{{{@@highlight@@}}} : @@highlight@@\n{{{@@color(green):green colored@@}}} : @@color(green):green colored@@\n{{{@@bgcolor(#ff0000): bg red colored@@}}} : @@bgcolor(#ff0000): bg red colored@@\n{{{@@bgcolor(#ff0000):color(#ffffff):red colored@@}}} : @@bgcolor(#ff0000):color(#ffffff):red colored@@ Hex colors\n\n!Link to folder\nThe 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.\n\nEdit 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]].\n\n!{{{Monospaced text}}} is now supported, thanks to [[AlecThomas|http://www.swapoff.org/]]. Edit this tiddler to see the syntax.\n\nYou can also have monospaced blocks (useful for source code):\n\n{{{\nvar posTop = findPosY(e);\nvar posBot = posTop + e.offsetHeight;\nvar winTop = findScrollY();\nvar winHeight = findWindowHeight();\nvar winBot = winTop + winHeight;\nif(posTop < winTop)\n return(posTop);\nelse if(posBot > winBot)\n {\n if(e.offsetHeight < winHeight)\n return(posTop - (winHeight - e.offsetHeight));\n else\n return(posTop);\n }\nelse\n return(winTop);\n}}}\n\nHere's a formatting variation for monospaced blocks. To use it, copy it into the StyleSheet tiddler, SaveChanges and refresh in your browser.\n\n{{{\n.viewer pre {\n border: 1px solid #660000;\n padding: 0.5em 0.5em 0.5em 0.5em;\n background: #eeeeaa;\n color: #660000;\n}\n}}}\n\nEntities 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:\n|>|>|>|>|>|>| !HTML Entities |\n| &amp;nbsp; | &nbsp; | no-break space | &nbsp;&nbsp; | &amp;apos; | &apos; | single quote, apostrophe |\n| &amp;ndash; | &ndash; | en dash |~| &amp;quot; | &quot; | quotation mark |\n| &amp;mdash; | &mdash; | em dash |~| &amp;prime; | &prime; | prime; minutes; feet |\n| &amp;hellip; | &hellip; | horizontal ellipsis |~| &amp;Prime; | &Prime; | double prime; seconds; inches |\n| &amp;copy; | &copy; | Copyright symbol |~| &amp;lsquo; | &lsquo; | left single quote |\n| &amp;reg; | &reg; | Registered symbol |~| &amp;rsquo; | &rsquo; | right single quote |\n| &amp;trade; | &trade; | Trademark symbol |~| &amp;ldquo; | &ldquo; | left double quote |\n| &amp;dagger; | &dagger; | dagger |~| &amp;rdquo; | &rdquo; | right double quote |\n| &amp;Dagger; | &Dagger; | double dagger |~| &amp;laquo; | &laquo; | left angle quote |\n| &amp;ccedil; | &ccedil; | //fa&ccedil;ade// |~| &amp;raquo; | &raquo; | right angle quote |\n| &amp;eacute; | &eacute; | //resum&eacute;// ; //fianc&eacute;// |~| &amp;times; | &times; | multiplication symbol |\n| &amp;deg; | &deg; | degrees symbol |~| &amp;divide; | &divide; | division symbol |\n\nThe 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 ('_'):\n\n|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>| !Accented Characters |\n| grave accent | &amp;_grave; | &Agrave; | &agrave; | &Egrave; | &egrave; | &Igrave; | &igrave; | &Ograve; | &ograve; | &Ugrave; | &ugrave; | &nbsp; | &nbsp; | &nbsp; | &nbsp; |\n| acute accent | &amp;_acute; | &Aacute; | &aacute; | &Eacute; | &eacute; | &Iacute; | &iacute; | &Oacute; | &oacute; | &Uacute; | &uacute; | &nbsp; | &nbsp; | &Yacute; | &yacute; |\n| circumflex accent | &amp;_circ; | &Acirc; | &acirc; | &Ecirc; | &ecirc; | &Icirc; | &icirc; | &Ocirc; | &ocirc; | &Ucirc; | &ucirc; | &nbsp; | &nbsp; | &nbsp; | &nbsp; |\n| umlaut mark | &amp;_uml; | &Auml; | &auml; | &Euml; | &euml; | &Iuml; | &iuml; | &Ouml; | &ouml; | &Uuml; | &uuml; | &nbsp; | &nbsp; | &Yuml; | &yuml; |\n| tilde | &amp;_tilde; | &Atilde; | &atilde; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &Otilde; | &otilde; | &nbsp; | &nbsp; | &Ntilde; | &ntilde; | &nbsp; | &nbsp; |\n| ring | &amp;_ring; | &Aring; | &aring; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; |\n| slash | &amp;_slash; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &Oslash; | &oslash; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; |
/***\n''Attach File Plugin for TiddlyWiki version 2.x''\n^^author: Eric Shulman - ELS Design Studios\nsource: http://www.TiddlyTools.com/#AttachFilePlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nStore binary files (such as jpg, gif, pdf or even mp3) directly in your TiddlyWiki document and then use them as images or 'external' links in your tiddler content. \n!!!!!Inline interface (live)\n<<<\n<<attach inline>>\n<<<\n!!!!!Usage\n<<<\nWhen you attach a file, a tiddler (tagged with<<tag attachment>>) is generated, using the source filename as the tiddler's title. The tiddler contains //''base64 text-encoded binary data''//, surrounded by {{{/%...%/}}} comment markers (so they are not visible when viewing the tiddler). The tiddler also includes summary details about the file: when it was attached, by whom, etc. and, if the attachment is an image file (jpg, gif, or png), the image is automatically displayed below the summary information.\n\nIn addition to direct data storage, you can also define external 'reference' links within the attachment tiddler, so that the binary data files can be kept on either local (file://) or remote (http://) storage. The reference links provide an alternative, two-step 'fallback' source for the binary data, retrieving it from the local filesystem or, if not found there, from a remote link to a URL published somewhere on the Internet.\n\nStoring just a few moderately-sized binary files using base64 text-encoding can dramatically increase the size of your document. Unless a completely self-contained, stand-alone document is required, you can bypass this problem by using reference links (local and/or remote) without encoding the binary data directly in the tiddler (i.e., uncheck "embed data" in the attach file 'control panel')\n\nNote: although you can edit an attachment tiddler, ''don't change any of the encoded content below the attachment header'', as it has been prepared for use in the rest of your document, and even changing a single character can make the attachment unusable. //If needed, you ''can'' edit the header information or even the MIME type declaration in the attachment data, but be very careful not to change any of the base64-encoded binary data.//\n<<<\n!!!!!Syntax / Examples\n<<<\nTo embed attached files as images or link to them from other tiddlers, use the standard ~TiddlyWiki image syntax ({{{[img[tooltip|filename]]}}}), linked image syntax ({{{[img[tooltip|filename][tiddlername]]}}}) , or "external link" syntax ({{{[[text|URL]]}}}), replacing the filename or URL that is normally entered with the title of an attachment tiddler.\n\nembedded image data:\n>{{{[img[Meow|AttachFileSample]]}}}\n>[img[Meow|AttachFileSample]]\nembedded image data with link to larger remote image:\n>{{{[img[click for larger view|AttachFileSample][AttachFileSample2]]}}}\n>[img[click for larger view|AttachFileSample][AttachFileSample2]]\n'external' link to embedded image data:\n>{{{[[click to view attachment|AttachFileSample]]}}}\n>[[click to view attachment|AttachFileSample]]\n'external' link to remote image:\n>{{{[[click to view attachment|AttachFileSample2]]}}}\n>[[click to view attachment|AttachFileSample2]]\nregular ~TiddlyWiki links to attachment tiddlers:\n>{{{[[AttachFileSample]]}}} [[AttachFileSample]]\n>{{{[[AttachFileSample2]]}}} [[AttachFileSample2]]\n<<<\n!!!!!Known Limitations\n<<<\n* ''Internet Explorer does not support the use of //embedded// data for TW file attachments. However, you can still use the local/remote link definitions to create file attachments that are stored externally''\n## //while it is easy to read text files, reading binary files is not supported by IE's FileSystemObject (FSO) methods, and other file I/O techniques are subject to security barriers or require additional MS proprietary technologies (like ASP or VB) that make implementation more difficult.//\n## //IE does not support the data: URI scheme, and cannot render the embedded images or links. This would seem to be an insurmountable shortcoming in the browser. Let's hope it is added in the next version...//\n<<<\n!!!!!MIME Types\n<<<\nThe following ''[[MIME|http://en.wikipedia.org/wiki/MIME]]'' file types are automatically suggested (based on filename extension) when using the [[Attach File|AttachFileHelp]] plug-in:\n|>|!text|\n|^^TXT TEXT JS VBS ASP CGI PL^^|text/plain|\n|^^HTM HTML HTA HTX MHT^^|text/html|\n|^^CSV^^|text/comma-separated-values|\n|^^JS^^|text/javascript|\n|^^CSS^^|text/css|\n|^^XML XSL XSLT^^|text/xml|\n|>|!images|\n|^^GIF^^|image/gif|\n|^^JPG JPE JPEG^^|image/jpeg|\n|^^PNG^^|image/png|\n|^^BMP^^|image/bmp|\n|^^TIF TIFF^^|image/tiff|\n|>|!sounds|\n|^^AU SND^^|audio/basic|\n|^^WAV^^|audio/wav|\n|^^RA RM RAM^^|audio/x-pn-realaudio|\n|^^MID MIDI^^|audio/x-midi|\n|^^MP3^^|audio/mp3|\n|^^M3U^^|audio/m3u|\n|>|!video|\n|^^ASF^^|video/x-ms-asf|\n|^^AVI^^|video/avi|\n|^^MPG MPEG^^|video/mpeg|\n|^^QT MOV QTVR^^|video/quicktime|\n|>|!formatted documents|\n|^^PDF^^|application/pdf|\n|^^RTF^^|application/rtf|\n|^^AI EPS PS^^|application/postscript|\n|^^WPD^^|application/wordperfect|\n|^^WRI^^|application/mswrite|\n|^^XLS XLS3 XLS4 XLS5 XLW^^|application/msexcel|\n|^^DOC^^|application/msword|\n|^^PPT PPS^^|application/mspowerpoint|\n|^^SWA^^|application/x-director|\n|^^SWF^^|application/x-shockwave-flash|\n|>|!compressed storage/download|\n|^^ZIP^^|application/x-zip-compressed|\n|^^GZ^^|application/x-gzip|\n|^^RAR^^|application/x-rar-compressed|\n|>|!programs|\n|^^COM EXE DLL OCX^^|application/octet-stream|\n<<<\n!!!!!Installation\n<<<\nImport (or copy/paste) the following tiddlers into your document:\n''AttachFilePlugin'' (tagged with <<tag systemConfig>>)\n''AttachFileSample'' //(sample attachment tiddler containing an image file)//\n\ncreate/edit ''SideBarOptions'': (sidebar menu items) \n^^Add {{{<<attach>>}}} macro^^\n<<<\n!!!!!Revision History\n<<<\n\n''2006.05.09 [3.1.1]'' add wikifer support for using attachments in links from "linked image" syntax: {{{[img[tip|attachment1][attachment2]]\n''2006.05.09 [3.1.0]'' lots of code changes: new options for attachments that use embedded data and/or links to external files (local or remote)\n''2006.05.03 [3.0.2]'' added {{{/%...%/}}} comments around attachment data to hide it when viewing attachment tiddler. Based on a suggestion by Russ Lipton.\n''2006.02.05 [3.0.1]'' wrapped wikifier hijacks in initAttachmentFormatters() function to eliminate globals and avoid FireFox crash bug when referencing globals\n''2005.12.27 [3.0.0]'' Update for TW2.0. Automatically add 'excludeMissing' tag to attachments\n''2005.12.16 [2.2.0]'' Dynamically create/remove attachPanel as needed to ensure only one instance of interface elements exists, even if there are multiple instances of macro embedding.\n''2005.11.20 [2.1.0]'' added wikifier handler extensions for "image" and "prettyLink" to render tiddler attachments\n''2005.11.09 [2.0.0]'' begin port from old ELS Design plugin/adaptation hybrid based on ~TW1.2.33\n''2005.08.05 [1.1.0]'' moved CSS and HTML definitions into plugin code tiddler instead of using separate tiddlers\n''2005.07.27 [1.0.2]'' core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet()\n''2005.07.23 [1.0.1]'' added parameter checks and corrected addNotification() usage\n''2005.07.20 [1.0.0]'' Initial Release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n// // version\n//{{{\nversion.extensions.attach = {major: 3, minor: 1, revision: 1, date: new Date(2006,5,9)};\n//}}}\n// // messages and macro definition\n//{{{\nconfig.messages.attachmentLinkTooltip="Attachment: ";\nconfig.macros.attach = { label: "attach file", prompt: "Attach a file to this document" };\nconfig.macros.attach.handler = function(place,macroName,params) {\n if (!readOnly) {\n if (params[0]!="inline")\n { createTiddlyButton(place,this.label,this.prompt,onClickAttachMenu); return; }\n createAttachPanel(place);\n document.getElementById("attachPanel").style.position="static";\n document.getElementById("attachPanel").style.display="block";\n }\n}\n\nfunction createAttachPanel(place) {\n var panel=document.getElementById("attachPanel");\n if (panel) { panel.parentNode.removeChild(panel); }\n setStylesheet(config.macros.attach.css,"attachFile");\n panel=createTiddlyElement(place,"span","attachPanel",null,null)\n panel.innerHTML=config.macros.attach.html;\n var theList = document.getElementById("attachMIMEType");\n for (var i=0;i<config.MIMETypes.length; i++)\n theList.options[i] = new Option(config.MIMETypes[i][1],config.MIMETypes[i][1],false,false);\n return panel;\n}\n\nfunction onClickAttachMenu(e)\n{\n if (!e) var e = window.event;\n var parent=resolveTarget(e).parentNode;\n var panel = document.getElementById("attachPanel");\n if (panel==undefined || panel.parentNode!=parent)\n panel=createAttachPanel(parent);\n var isOpen = panel.style.display=="block";\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));\n else\n panel.style.display = isOpen ? "none" : "block" ;\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return(false);\n}\n//}}}\n// // CSS for attach file control panel\n//{{{\nconfig.macros.attach.css = '\s\n#attachPanel {\s\n display: none; position:absolute; z-index:10; width:35em; right:105%; top:0em;\s\n background-color: #eeeeee; color:#000000; font-size: 8pt; line-height:110%;\s\n border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\s\n padding: 0.5em; margin:0em;\s\n -moz-border-radius:1em;\s\n}\s\n#attachPanel form { display:inline;border:0;padding:0;margin:0; }\s\n#attachPanel select { width:100%;margin:0px;font-size:8pt;line-height:110%;}\s\n#attachPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\s\n#attachPanel table { width:100%;border:0;margin:0;margin-top:2px;padding:0;color:inherit; }\s\n#attachPanel tbody, #attachPanel tr, #attachPanel td { border:0;margin:0;padding:0;color:inherit; }\s\n#attachPanel .chk { width:auto;border:0; }\s\n#attachPanel .btn { width:auto; }\s\n#attachPanel .btn2 { width:49%; }\s\n';\n//}}}\n// // HTML for attach file control panel\n//{{{\nconfig.macros.attach.html = '\s\n <form>\s\n attach from source file <input type="file" id="attachSource" name="attachSource" size=56 onChange="onChangeAttachSource()">\s\n <table><tr><td style="text-align:right">\s\n embed&nbsp;data&nbsp;<input type=checkbox class=chk id="attachUseData" name="attachUseData">\s\n </td><td style="width:75%">\s\n <select size=1 id="attachMIMEType" name="attachMIMEType"\s\n onchange="this.form.attachUseData.checked=this.value.length"></select>\s\n </td></tr><tr><td style="text-align:right">\s\n local&nbsp;link&nbsp;<input type=checkbox class=chk id="attachUseLocal" name="attachUseLocal">\s\n </td><td>\s\n <input type=text id="attachLocal" name="attachLocal" size=15 autocomplete=off value=""\s\n onkeyup="this.form.attachUseLocal.checked=this.value.length" \s\n onfocus="this.select()">\s\n </td></tr><tr><td style="text-align:right">\s\n remote&nbsp;link&nbsp;<input type=checkbox class=chk id="attachUseURL" name="attachUseURL">\s\n </td><td>\s\n <input type=text id="attachURL" name="attachURL" size=15 autocomplete=off value=""\s\n onkeyup="this.form.attachUseURL.checked=this.value.length"\s\n onfocus="this.select()">\s\n </td></tr></table>\s\n <table><tr><td width=1%>\s\n add&nbsp;tags&nbsp;\s\n </td><td>\s\n <input type=text id="attachTags" name="attachTags" size=15 autocomplete=off value="" onfocus="this.select()">\s\n </td><td style="width:40%;text-align:right">\s\n <input type=button class=btn2 value="ok" onclick="onClickAttachOK()"><!--\s\n --><input type=button class=btn2 value="close" onclick="document.getElementById(\s'attachPanel\s').style.display=\s'none\s';">\s\n </td></tr></table>\s\n </form>\s\n';\n//}}}\n// // wikifiers for rendering attachments as images or links\n//{{{\ninitAttachmentFormatters();\nfunction initAttachmentFormatters() {\n // find the formatter for "image" and replace the handler\n for (var i=0; i<config.formatters.length && config.formatters[i].name!="image"; i++);\n if (i<config.formatters.length) config.formatters[i].handler=function(w) {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source);\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) // Simple bracketted link\n {\n var e = w.output;\n if(lookaheadMatch[5])\n {\n if(store.tiddlerExists(lookaheadMatch[5]))\n // ELS: ADDED\n if (isAttachment(lookaheadMatch[5]))\n {\n e = createExternalLink(w.output,lookaheadMatch[5]);\n e.href=getAttachment(lookaheadMatch[5]);\n e.title = config.messages.attachmentLinkTooltip + lookaheadMatch[5];\n }\n else\n // ELS: END\n e = createTiddlyLink(w.output,lookaheadMatch[5],false);\n else\n e = createExternalLink(w.output,lookaheadMatch[5]);\n }\n var img = createTiddlyElement(e,"img");\n if(lookaheadMatch[1])\n img.align = "left";\n else if(lookaheadMatch[2])\n img.align = "right";\n if(lookaheadMatch[3])\n img.title = lookaheadMatch[3];\n img.src = lookaheadMatch[4];\n // ELS: ADDED\n if (isAttachment(lookaheadMatch[4])) img.src=getAttachment(lookaheadMatch[4]);\n // ELS: END\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n\n // find the formatter for "prettyLink" and replace the handler\n for (var i=0; i<config.formatters.length && config.formatters[i].name!="prettyLink"; i++);\n if (i<config.formatters.length) config.formatters[i].handler=function(w) {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[2])\n { // Simple bracketted link\n var link = createTiddlyLink(w.output,lookaheadMatch[1],false);\n w.outputText(link,w.nextMatch,w.nextMatch + lookaheadMatch[1].length);\n w.nextMatch += lookaheadMatch[1].length + 2;\n }\n else if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[3])\n { // Pretty bracketted link\n var e;\n if(store.tiddlerExists(lookaheadMatch[4]))\n // ELS: ADDED\n if (isAttachment(lookaheadMatch[4]))\n {\n e = createExternalLink(w.output,lookaheadMatch[4]);\n e.href=getAttachment(lookaheadMatch[4]);\n e.title = config.messages.attachmentLinkTooltip + lookaheadMatch[4];\n }\n else\n // ELS: END\n e = createTiddlyLink(w.output,lookaheadMatch[4],false);\n else\n e = createExternalLink(w.output,lookaheadMatch[4]);\n w.outputText(e,w.nextMatch,w.nextMatch + lookaheadMatch[1].length);\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n}\n//}}}\n// // Utility API\n//{{{\nfunction isAttachment(title)\n{\n var tiddler = store.getTiddler(title);\n if (tiddler==undefined || tiddler.tags==undefined) return false;\n return (tiddler.tags.find("attachment")!=null);\n}\n\nfunction getAttachment(title)\n{\n var text = store.getTiddlerText(title);\n var result=""; var pos=0;\n // remove header and embedded newlines from attachment text\n var data=text.split('\sn----\sn');\n if (!config.browser.isIE && data[1] && data[1].length) // NOTE: IE does not support the "data:" URI scheme\n result="data:"+data[1].replace(/\s\sn/,'');\n else if ((pos=text.indexOf("local link: "))!=-1) // fallback to local link\n result=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));\n else if ((pos=text.indexOf("remote link: "))!=-1) // fallback to remote URL\n result= text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));\n return result;\n}\n//}}}\n// // explict global scoping for IE\n//{{{\n// for functions/vars called from browser events\nwindow.onChangeAttachSource=onChangeAttachSource;\nwindow.onClickAttachOK=onClickAttachOK;\nwindow.isAttachment=isAttachment;\nwindow.getAttachment=getAttachment;\n//}}}\n// // MIME Types\n//{{{\nconfig.MIMETypes = [\n ["","MIME type..."],\n [" txt text js vbs asp cgi pl ","text/plain"],\n [" htm html hta htx mht ","text/html"],\n [" csv ","text/comma-separated-values"],\n [" js ","text/javascript"],\n [" css ","text/css"],\n [" xml xsl xslt ","text/xml"],\n [" gif ","image/gif"],\n [" jpg jpe jpeg ","image/jpeg"],\n [" png ","image/png"],\n [" bmp ","image/bmp"],\n [" tif tiff ","image/tiff"],\n [" au snd ","audio/basic"],\n [" wav ","audio/wav"],\n [" ra rm ram ","audio/x-pn-realaudio"],\n [" mid midi ","audio/x-midi"],\n [" mp3 ","audio/mp3"],\n [" m3u ","audio/m3u"],\n [" asf ","video/x-ms-asf"],\n [" avi ","video/avi"],\n [" mpg mpeg ","video/mpeg"],\n [" qt mov qtvr ","video/quicktime"],\n [" pdf ","application/pdf"],\n [" rtf ","application/rtf"],\n [" ai eps ps ","application/postscript"],\n [" wpd ","application/wordperfect"],\n [" wri ","application/mswrite"],\n [" xls xls3 xls4 xls5 xlw ","application/msexcel"],\n [" doc ","application/msword"],\n [" ppt pps ","application/mspowerpoint"],\n [" swa ","application/x-director"],\n [" swf ","application/x-shockwave-flash"],\n [" zip ","application/x-zip-compressed"],\n [" gz ","application/x-gzip"],\n [" rar ","application/x-rar-compressed"],\n [" com exe dll ocx ","application/octet-stream"]];\n//}}}\n// // control panel interaction\n//{{{\nfunction onChangeAttachSource()\n{\n var theFilename = document.getElementById("attachSource").value;\n var theExtension = theFilename.substr(theFilename.lastIndexOf('.')+1).toLowerCase();\n for (var i=0; i<config.MIMETypes.length; i++)\n if (config.MIMETypes[i][0].indexOf(theExtension)!=-1) {\n document.getElementById("attachMIMEType").value = config.MIMETypes[i][1];\n document.getElementById("attachMIMEType").selectedIndex = i;\n document.getElementById("attachUseData").checked = true;\n document.getElementById("attachLocal").value = theFilename;\n document.getElementById("attachUseLocal").checked = true;\n break;\n }\n}\n\nfunction onClickAttachOK()\n{\n var theSource = document.getElementById("attachSource").value;\n var theLocal = document.getElementById("attachLocal").value;\n var theURL = document.getElementById("attachURL").value;\n var theTags = "attachment excludeMissing "+document.getElementById("attachTags").value;\n var useData=document.getElementById("attachUseData").checked;\n var useLocal=document.getElementById("attachUseLocal").checked;\n var useURL=document.getElementById("attachUseURL").checked;\n if (useData && theSource.length)\n var theLocation=theSource.replace(/\s\s/g,"/");\n else if (useLocal && theLocal.length)\n var theLocation = theLocal.replace(/\s\s/g,"/");\n else if (useURL && theURL.length)\n var theLocation = theURL;\n else { alert("Please enter a source file or link location"); return false; }\n var theTitle=theLocation.substr(theLocation.lastIndexOf('/')+1); // get filename from location\n var theText = "";\n theText += 'attachment: '+(useData?'[['+theTitle+'|'+theTitle+']]':"''"+theTitle+"''"+' - //external link(s) only (no embedded data)//')+'\sn';\n if (useLocal) theText += 'local link: [['+theLocal+'|file:///'+theLocal.replace(/\s\s/g,"/")+']]\sn';\n if (useURL) theText += 'remote link: [['+theURL+'|'+theURL+']]\sn';\n theText += '>source: '+theSource+'\sn';\n theText += '>attached on: '+(new Date()).formatString(config.macros.timeline.dateFormat)+' by '+config.options.txtUserName+'\sn';\n if (useData) {\n var theMIMEType = document.getElementById("attachMIMEType").value;\n if (theMIMEType=="") {\n alert("Unknown file format. Please select a MIME type from the list");\n document.getElementById("attachMIMEType").focus();\n return false;\n }\n var theData = readAttachmentFile(theSource); if (!theData) return false;\n var theEncoded = encodeBase64(theData);\n theText += '>MIME type: '+theMIMEType+'\sn>original size: '+theData.length+' bytes\sn>encoded size: '+theEncoded.length+' bytes\sn';\n }\n else {\n // determine MIME type based on filename\n var theExt = theLocation.substr(theLocation.lastIndexOf('.')+1).toLowerCase();\n for (var i=0; i<config.MIMETypes.length; i++)\n if (config.MIMETypes[i][0].indexOf(theExt)!=-1) { var theMIMEType=config.MIMETypes[i][1]; break; }\n }\n var theTarget=theURL;\n if (useLocal) theTarget="file:///"+theLocal;\n if (useData) theTarget="data:"+theMIMEType+';base64,\sn'+theEncoded.replace('\s\sn','');\n if (theMIMEType.substr(0,5)=="image") theText+='[img['+theTitle+'|'+theTitle+']]\sn';\n if (useData) theText += '/%\snBINARY DATA - DO NOT EDIT BELOW THIS POINT\sn----\sn'+theMIMEType+';base64,\sn'+theEncoded+'\sn----\sn%/';\n store.saveTiddler(theTitle,theTitle,theText,config.options.txtUserName,new Date(),theTags);\n document.getElementById("attachPanel").style.display="none";\n story.displayTiddler(null,theTitle);\n story.refreshTiddler(theTitle,null,true);\n clearMessage(); displayMessage('Attached '+theTitle);\n return true;\n}\n//}}}\n// // Binary File I/O\n//{{{\nfunction readAttachmentFile(filePath)\n{\n if(!window.Components) {\n alert("Sorry, this browser does not support embedded data.\snPlease use a local link and/or remote link instead.");\n return(null);\n }\n try {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\n file.initWithPath(filePath);\n if (!file.exists()) { clearMessage(); displayMessage("File not found: "+filePath); return(null); }\n var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);\n inputStream.init(file, 0x01, 00004, null);\n var bInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);\n bInputStream.setInputStream(inputStream);\n return(bInputStream.readBytes(inputStream.available()));\n }\n catch(e) { alert("An error occured while attempting to attach\sn"+filePath+"\sn\sn" + e); }\n return(null);\n}\nfunction writeAttachmentFile(filepath,data)\n{\n alert("TBD: write binary data to specified file");\n return(false);\n}\n//}}}\n// // Binary to text encoding\n//{{{\nfunction encodeBase64(theData)\n{\n if (!theData) return null;\n // encode as base64\n var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";\n var out = ""; //This is the output\n var chr1, chr2, chr3 = ""; //These are the 3 bytes to be encoded\n var enc1, enc2, enc3, enc4 = ""; //These are the 4 encoded bytes\n for (var count=0,i=0; i<theData.length; )\n {\n chr1 = theData.charCodeAt(i++); //Grab the first byte\n chr2 = theData.charCodeAt(i++); //Grab the second byte\n chr3 = theData.charCodeAt(i++); //Grab the third byte\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n if (isNaN(chr2))\n enc3 = enc4 = 64;\n else if (isNaN(chr3))\n enc4 = 64;\n out += keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);\n chr1 = chr2 = chr3 = "";\n enc1 = enc2 = enc3 = enc4 = "";\n count+=4; if (count>60) { out+='\sn'; count=0; } // add line break every 60 chars for readability\n }\n return out;\n}\n//}}}
New comer Notes\n*NewcomerNotes-Denis\n*NewcomerNotes-Olivier\n\n!Misc notes\n<<listTags Notes title *>>
<?php\n/***\n! User settings\nEdit these lines according to your need\n***/\n//{{{\n$AUTHENTICATE_USER = true; // true | false\n$USERS = array(\n 'UserName1'=>'Password1', \n 'UserName2'=>'Password2', \n 'UserName3'=>'Password3'); // set usernames and strong passwords\n$DEBUG = false; // true | false\n//}}}\n/***\n!Code\nNo change needed under\n***/\n//{{{\n\n/***\n * store.php - upload a file in this directory\n * version :1.4.1 - 15/03/2006 - BidiX@BidiX.info\n * \n * see : \n * http://tiddlywiki.bidi.info/#UploadPlugin for usage\n * http://www.php.net/manual/en/features.file-upload.php \n * for détails on uploading files\n * usage : \n * POST \n * UploadPlugin[backupDir=<backupdir>;user=<user>;password=<password>;uploadir=<uploaddir>]\n * userfile <file>\n * GET\n *\n * Revision history\n * v 1.4.1 - 15/03/2006\n * add chmo 0664 on the uploadedFile\n * v 1.4 - 23/02/2006 :\n * add uploaddir option : a path for the uploaded file relative to the current directory\n * backupdir is a relative path\n * make recusively directories if necessary for backupDir and uploadDir\n * v 1.3 - 17/02/2006 :\n * presence and value of user are checked with $USERS Array (thanks to PauloSoares)\n * v 1.2 - 12/02/2006 : \n * POST \n * UploadPlugin[backupDir=<backupdir>;user=<user>;password=<password>;]\n * userfile <file>\n * if $AUTHENTICATE_USER\n * presence and value of user and password are checked with \n * $USER and $PASSWORD\n * v 1.1 - 23/12/2005 : \n * POST UploadPlugin[backupDir=<backupdir>] userfile <file>\n * v 1.0 - 12/12/2005 : \n * POST userfile <file>\n *\n * Copyright (c) BidiX@BidiX.info 2005-2006\n ***/\n//}}}\n\n//{{{\n\nif ($_SERVER['REQUEST_METHOD'] == 'GET') {\n /*\n * GET Request\n */\n ?>\n <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n <html>\n <head>\n <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >\n <title>BidiX.info - TiddlyWiki UploadPlugin - Store script</title>\n </head>\n <body>\n <p>\n <p>store.php V 1.4\n <p>BidiX@BidiX.info\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p align="center">This page is designed to upload a <a href="http://www.tiddlywiki.com/">TiddlyWiki<a>.</p>\n <p align="center">for details see : <a href="http://TiddlyWiki.bidix.info/#HowToUpload">TiddlyWiki.bidix.info/#HowToUpload<a>.</p> \n </body>\n </html>\n <?php\n}\nelse {\n /*\n * POST Request\n */\n \n // Recursive mkdir\n function mkdirs($dir) {\n if( is_null($dir) || $dir === "" ){\n return false;\n }\n if( is_dir($dir) || $dir === "/" ){\n return true;\n }\n if( mkdirs(dirname($dir)) ){\n return mkdir($dir);\n }\n return false;\n }\n \n // var definitions\n $uploadDir = './';\n $uploadDirError = false;\n $backupError = false;\n $optionStr = $_POST['UploadPlugin'];\n $optionArr=explode(';',$optionStr);\n $options = array();\n $backupFilename = '';\n $filename = $_FILES['userfile']['name'];\n \n // get options\n foreach($optionArr as $o) {\n list($key, $value) = split('=', $o);\n $options[$key] = $value;\n }\n \n // authenticate User\n if ((!$AUTHENTICATE_USER) \n || (($options['user']) && ($options['password']) && ($USERS[$options['user']] == $options['password']))) {\n // make uploadDir\n if ($options['uploaddir']) {\n if (! is_dir($options['uploaddir'])) {\n mkdirs($options['uploaddir']);\n }\n if (! is_dir($options['uploaddir'])) {\n $uploadDirError = "uploadDir mkdir error";\n }\n $uploadDir = $uploadDir . $options['uploaddir'];\n if ($uploadDir{strlen($uploadDir)-1} != '/') {\n $uploadDir = $uploadDir . '/';\n }\n }\n if (!$uploadDirError) {\n // backup existing file\n if (file_exists($uploadDir . $_FILES['userfile']['name']) && ($options['backupDir'])) {\n if (! is_dir($options['backupDir'])) {\n mkdirs($options['backupDir']);\n if (! is_dir($options['backupDir'])) {\n $backupError = "backup mkdir error";\n }\n }\n $backupFilename = $options['backupDir'].'/'.substr($filename, 0, strpos($filename, '.'))\n .date('.Ymd.His').substr($filename,strpos($filename,'.'));\n $filename = $uploadDir . $_FILES['userfile']['name'];\n rename($filename, $backupFilename) or ($backupError = "rename error");\n }\n // move uploaded file to to uploadDir\n if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadDir . $_FILES['userfile']['name'])) {\n chmod($uploadDir . $_FILES['userfile']['name'], 0644);\n if (!$backupError) {\n if($DEBUG) {\n echo "debug mode \sn\sn";\n }\n echo "0 - File successfully loaded in " .$uploadDir . $_FILES['userfile']['name']. "\sn";\n if ($backupFilename)\n echo "backupFile=$backupFilename;\sn";\n } else {\n echo "BackupError : $backupError - File successfully loaded in " .$uploadDir . $_FILES['userfile']['name']. "\sn";\n }\n } \n else {\n echo "Error : " . $_FILES['error']." - File NOT uploaded !\sn";\n }\n }\n else {\n echo "UploadDirError : $uploadDirError - File NOT uploaded !\sn";\n }\n }\n else {\n echo "Error : UserName or Password do not match \sn";\n echo "UserName : [".$options['user']. "] Password : [". $options['password'] . "]\sn";\n }\n if ($DEBUG) {\n echo ("\snHere is some debugging info : \sn");\n echo("\s$filename : $filename \sn");\n echo("\s$backupFilename : $backupFilename \sn");\n print ("\s$_FILES : \sn");\n print_r($_FILES);\n print ("\s$options : \sn");\n print_r($options);\n }\n}\n//}}}\n?>
config.animFast = 0.20;\nconfig.animSlow = 0.05;\nconfig.options.txtUserName = "_FoX_";
attachment: [[warn|warn]]\n>attached on: 31 December 2006 by _FoX_\n> true file size : 995\n>MIME type: image/gif\n>original size:995 bytes\n>encoded size: 1348 bytes\n[img[warn|warn]]\n/%\nBINARY DATA - DO NOT EDIT BELOW THIS POINT\n----\nimage/gif;base64,\nR0lGODlhEAAQAPcAAB0fVzgySX02Cn04C30/D39bQ311Xnd4eF9mlltlnFpnoHN7\nj3B9nnB7oIE9DoZHEotRGJBaHoNdPpZlJJptKZ92LqN7Jql5LqN9MpZ9YrWGGKaD\nNqSHN6qJOrCLOKqETqGFXaiKUq2RZ6eRe7WYdrebfrugaNycDs2fMcumNe22H/+z\nAv+2Bf+3CP+6Cv+/EcSdRcWvVNK+TsOxcf/BFf/EGP/IHv/BIv/IIP3KKP/QL/3T\nMO7LUfjWR/3ZQPrZTvrbXvrpT/bpV//lVvriYfnoZvLpdP/kd//odPrue//waoyQ\ns5Wfqreghb6jh76vi7ysn7yxq8CjgsSwmMyzmMSzoca6r9bDrtXKvuXZr//qiv/1\nhv/6hvrymv/9lf/9l/jttP/2oP/9o9LIwNTOytjRyvHmy//+xf/+3/n25P7+6v//\n/wAAARL2TBW1qAAABAAAARL2TBW1qAAAAgAAJgAAAAAAOQAAE////wAAAAAAJgAA\nAAAAAQAAJgAAAAEKlnWegRW1qBVmuMjQ1PQhIRR14AAAOBUAAAAAAAEPmwAAOgAA\nBAAAExL2kHZ14AEhyQAAAAAAAAAAAgAAAQAAAAAAAAAAAMjQ1PQhIRR14AAAAAAA\nAOE6kAAAAAAAAQAAAgAAAAEhyfQgDvQx6QEhyfQgDvQx6YCAgBL2BOFy5AEhyQAA\nARL2UPQc8AEhyfQx5Pd5oABAAAoWHvQwmQoWHhL2UPQc8AEhyQCPChL2vOFxxgoA\nAMjQ1PQhIRR14AAADwAAAAAAAAAAAAABkAAAAAAAAGEATWwAcnQAZQAAdAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAele/AYMLBL2wHPo\nNcjQ1PQhIRR14MjQ1BL2wHPoO8jQ1PQhIRR14AAAAQohyBL3iHIhMQYMLBL3EAAA\nDxR14OGqiAAAAHWVyxW1qBVozBW1qAAAAAAQAAAAAUl2QRVoAQAABAAAAAEhyQAA\nAAAAAAAAAB0fVx0fVyH5BAEAAGsALAAAAAAQABAABwjAANcIHLhGihSCCBEaTMhw\nihkeUxgipBJmCAyJA52k8aKkBwmMWK6gYcIACYoxEkuoOdNAgRYcHxhWySLGy4IE\nR2ycgJLQxBYlSg4kAEJjxQWETYz4WGoAQY8VLVSMGFgmxo4aOHBsWHJjRY0dHsgI\nFBFkhdkVGiy4qKHjR5EMa6zI2EHjhQsXAQAc2TGkCJcZUUII8bFDRw4cKZ4A+UEk\nSRcwEkB02IChAoUJESA8cCDAwYABBSRTtoxZM+fPoAMCADs=\n----\n%/