Eric Schulman has written many plugins. The MiniBrowser allows one to call up a browser window within a tiddler. However, it is an //inline script// tiddler which needs the [[TiddlyTools|www.tiddlytools.com]] InlineJavaScriptPlugin. The latter plugin allows one to essentially use embedded Java in TiddlyWiki.\n\nAfter getting the MiniBrowser at http://www.tiddlytools.com/#MiniBrowser and the InlineJavaScriptPlugin at http://www.tiddlytools.com/#InlineJavascriptPlugin, you will need to save your changesand refresh your browser. \n\nA stripped down version of this is the MiniHTMLWindow.
Here are some notes on TiddlyWiki showing how to use it, how others have added to it, and some of the tricks I have used to create my own pages. The key is that one can access chunks of the "Style Sheet", make changes locally and upload them to a server. Copying others, I have created tiddlers which help to access some of the important bits. //The site is still in progress.//
[[Horizontal Menus]]\n[[Embedding HTML]] \n*useful to [[Display Documents]] but only in IE\n*and does not [[Display PDF]] in tiddler\n[[Sliders and Drop Down Lists]]\n[[Macros]]\n[[Tags]]\n[[Configuration]] - A set of tiddlers for accessing system configurations\n[[Test Forms]]\n[[Slides]]\n[[Show This Month]]\n\n!!Displaying Mathematical Content\n\n*[[Bob McElrath's jsMath plugin|http://bob.mcelrath.org/tiddlyjsmath-2.0.3.htm]] \n*[[Peter Jipsen's ASciencePad|http://math.chapman.edu/~jipsen/asciencepad/asciencepad.html]].\n*[[TiddlyMath|http://math.chapman.edu/~jipsen/tiddly/tiddlymath.html#]]\n*[[Dr. Michael Freeze's Calculus II page|http://people.uncw.edu/freezem/math162summer06/mat162summer06.html]] \n\n!![[Plug-ins]] - 3rd Party tools for added functionality\n*[[A Mini Browser]]\n*[[Breadcrumbs]]\n*[[Playing Media]]\n*[[Importing Tiddlers]]\n* Input Forms\n\n!!Imported Tiddlers and Plugins\n#[[InstallingPlugins]] - Jeremy Ruston\n#[[PluginDirectory]] - Jeremy Ruston\n#[[Internal Macros]] - Julian Knight\n#[[Tiddler JavaScript Reference]] - Julian Knight\n#[[TiddlerListMacro]] - Julian Knight\n#[[TiddlerListMacroExtendedInfo]] - Julian Knight\n#[[CalendarPlugin]] - Steve Rumbsby\n#[[ImportTiddlersPlugin]] - Eric Schulman\n#[[MiniBrowser]] - Eric Shulman\n#[[CollapseTiddlersPlugin]] - Eric Shulman\n#[[InlineJavascriptPlugin]] - Eric Shulman\n#[[NestedSlidersPlugin]] - Eric Shulman\n#[[TiddlerWithParamsPlugin]] - Eric Shulman\n#[[BreadcrumbsPlugin]] - Allen Hecht, \n#[[ColorChart]] - Paul Petterson, Eric Shulman\n#[[TableOfContentsPlugin]] - Eric Schulman\n#[[DisplayAllTiddlers]] - Eric Schulman\n\n!!TiddlyWiki Variations
To make quoted bits of text stand out, you can use BlockQuotes within your [[tiddler]]s, like this:\n\nJeremyRuston said:\n<<<\nA TiddlyWiki is like a blog because it's divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole.\n<<<\n\nLike BulletPoints and NumberedBulletPoints, you can have multiple levels of BlockQuotes. Just [[edit]] this tiddler to see how it's done.\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
You can dispay boxed text, like code samples or verbatim content by inserting text in a triplet of braces but with no spaces between them\n{ { { \ntext \n}}}\n\nThen you get \n\n{{{\ntext\n}}}\n\nIf you do this in one line, then you get {{{text}}}.
There is a plugin at http://www.tiddlytools.com/#BreadcrumbsPlugin for displaying breadcrumbs. However, I have not tried it yet.
/***\n|''Name:''|BreadcrumbsPlugin|\n|''Description:''||\n|''Version:''|1.4.0|\n|''Date:''|Aug 02, 2006|\n|''Source:''|http://sourceforge.net/project/showfiles.php?group_id=150646|\n|''Author:''|Alan Hecht (with 2.0 update from 'jack' and revisions by Bram Chen)|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License]]|\n|''~CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|\n\n!Revision History:\n__TiddlyTools variant:__\n1.4.0.1(TT) 2006.08.04 - change spaces to tabs\n1.4.0.0(TT) 2006.08.04 - modified from 1.4.0 distro:\n<<<\nin refreshCrumbs(), set {{{display:none/block}}} instead of {{{visibility:hidden/visible}}}\nin restartHome(), check for valid crumbArea before setting style\ngeneral code cleanup/reformat using tabs to indent\n<<<\n|''Version''|''Date''|''Note''|\n|1.4.0|Aug 02, 2006|Fixed bug, the redefined onClickTiddlerLink_orig_breadCrumbs works incorrectly on IE|\n|1.3.0|Jul 20, 2006|Runs compatibly with TW 2.1.0 (rev #403+)|\n|1.2.0|Feb 07, 2006|change global array breadCrumbs to config.breadCrumbs by Eric's suggestion|\n|1.1.0|Feb 04, 2006|JSLint checked|\n|1.0.0|Feb 01, 2006|TW2 ready and code Cleaned-up|\n\n!Code section:\n***/\n//{{{\nversion.extensions.breadCrumbs = {major: 1, minor: 4, revision: 0, date: new Date("Aug 02, 2006")};\nconfig.breadCrumbs = [];\n\nwindow.onClickTiddlerLink_orig_breadCrumbs = window.onClickTiddlerLink;\nwindow.onClickTiddlerLink = function(e){\n if (!e) var e = window.event;\n window.onClickTiddlerLink_orig_breadCrumbs(e);\n addCrumb(e);\n return false;\n}\n\nfunction addCrumb(e){\n if (!e) var e = window.event;\n var thisCrumb = "[[" + resolveTarget(e).getAttribute("tiddlyLink") + "]]";\n var ind = config.breadCrumbs.find(thisCrumb);\n if(ind === null)\n config.breadCrumbs.push(thisCrumb);\n else\n config.breadCrumbs.length = ind++;\n refreshCrumbs();\n return false;\n}\n\nfunction refreshCrumbs(){\n var crumbArea = document.getElementById("breadCrumbs");\n if (!crumbArea) {\n var crumbArea = document.createElement("div");\n crumbArea.id = "breadCrumbs";\n crumbArea.style.display= "none"; // ELS changed from: crumbArea.style.visibility= "hidden";\n var targetArea = document.getElementById("tiddlerDisplay");\n targetArea.parentNode.insertBefore(crumbArea,targetArea);\n }\n crumbArea.style.display = "block"; // ELS changed from: crumbArea.style.visibility = "visible";\n removeChildren(crumbArea);\n createTiddlyButton(crumbArea,"Home",null,restartHome);\n wikify(" | " + config.breadCrumbs.join(' > '),crumbArea) // ELS: changed || to |\n}\n\nfunction restartHome(){\n story.closeAllTiddlers();\n restart();\n config.breadCrumbs = [];\n var crumbArea = document.getElementById("breadCrumbs");\n if (crumbArea) // ELS: added check to make sure crumbArea exists\n crumbArea.style.display = "none"; // ELS changed from: crumbArea.style.visibility = "hidden";\n}\n//}}}
!!Bullets\nBullets can be created by typing\n\n{{{\n* Bullet 1\n** Sub bullet 1\n** Sub bullet 2\n*** Subsub bullet\n* Bullet 2\n** Sub bullet 1\n** Sub bullet 2\n}}}\n\nto get\n\n* Bullet 1\n** Sub bullet 1\n** Sub bullet 2\n*** Subsub bullet\n* Bullet 2\n** Sub bullet 1\n** Sub bullet 2\n\n!!Lists\nLists can be created by typing\n\n{{{\n# List 1\n## Sublist 1\n## Sublist 2\n### Subsublist\n#### Deeper\n##### Even deeper\n# List 2\n## Sublist 1\n## Sublist 2\n}}}\nto get\n\n# List 1\n## Sublist 1\n## Sublist 2\n### Subsublist\n#### Deeper\n##### Even deeper\n# List 2\n## Sublist 1\n## Sublist 2
/***\n''Name:'' Calendar plugin\n''Author:'' SteveRumsby\n\n// // updated by Jeremy Sheeley to add cacheing for reminders\n// // see http://www.geocities.com/allredfaq/reminderMacros.html\n// // ''Changes by ELS 2006.08.23:''\n// // added handling for weeknumbers (code supplied by Martin Budden. see "wn**" comment marks)\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\n!!!!!Configuration:\n<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//\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//{{{\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;\nif(config.options.chkDisplayWeekNumbers == undefined)//wn**\n config.options.chkDisplayWeekNumbers = false;\nif(config.options.chkDisplayWeekNumbers)\n config.options.txtCalFirstDay = 0;\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// ELS 2006.05.29: add journalDateFmt handling//\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 \n // get format for journal link by reading from SideBarOptions (ELS 5/29/06 - based on suggestion by Martin Budden)\n var text = store.getTiddlerText("SideBarOptions");\n this.journalDateFmt = "DD-MMM-YYYY";\n var re = new RegExp("<<(?:newJournal)([^>]*)>>","mg"); var fm = re.exec(text);\n if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }\n\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 yearHeader.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?22:19);//wn**\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 month.setAttribute("colSpan", config.options.chkDisplayWeekNumbers?6:5);//wn**\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 month.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?8:7);//wn**\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 if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, "td");//wn**\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 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 if (config.options.chkDisplayWeekNumbers){\n if (first<=max) {\n var ww = new Date(year,mon,first);\n createTiddlyElement(row, "td", null, null, "w"+ww.getWeek());//wn**\n }\n else createTiddlyElement(row, "td", null, null, null);//wn**\n }\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",config.macros.calendar.journalDateFmt,true, isaWeekend); // ELS 5/29/06 - use journalDateFmt \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 { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }", "calendarStyles");\n//}}}\n
One of the first things you might want to do is to change the header color. Before you can change the color, you need to go to the PageTemplate and change the first line \n{{{\n<div class='header' macro='gradient vert #18f #04b'>\n}}}\nto\n{{{\n<div class='header'>\n}}}\n\nYou can change the colors in the StyleSheetColors tiddler. However, doing this could cause you to loose the default colors. Of course, you can go to an empty TiddlyWiki and copy the code there and paste it into your StyleSheetColors tiddler. A way around this is to use the StyleSheet tiddler to make your changes while keeping the StyleSheetColors in tact. \n\nNote some of the defaults in the empty TiddlyWiki:\n\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\nAn example of how to change some of the colors is in the code\n{{{\n/* Added Color Style*/\n.header {background: #006666;}\n.title {color: #006666;}\n.subtitle {color: #006666;}\n.toolbar {color: #006666;}\n}}}\n\nYou can play with different colors using the [[Color Tweaker|http://lewcid.googlepages.com/colortweaker.html]]. You can also get color codes at the site [[4096 Color Wheel|http://ficml.awardspace.com/jemimap/style/color/wheel.html]]. Also, you can use the ColorChart from TiddlyTools.
To design your TiddlyWiki you need to start with a clean copy of TiddlyWiki. You can get this at [[tiddlywiki.com|http://www.tiddlywiki.com]] under [[Download Software|http://www.tiddlywiki.com/#DownloadSoftware]]. \n\nTiddlyWiki was designed to be edited and saved locally to your machine and then uploaded to your webserver. Also, you should use a recent version of [[Firefox|http://www.mozilla.com/firefox/]] for the best results. As you edit make sure you have closed all tiddlers and then click on save changes on the right side of your wiki (unless you have moved it to the right). The default is to save backups in your folder. These are useful in case you need to go back to a previous edit after messing up what you are creating.
/***\n!! CollapseTiddlersPlugin\n^^Author: Bradley Meck^^\n^^Source: http://gensoft.revhost.net/Collapse.html^^\n\n|ELS 2/24/2006: added fallback to "CollapsedTemplate if "WebCollapsedTemplate" is not found |\n|ELS 2/6/2006: added check for 'readOnly' flag to use alternative "WebCollapsedTemplate" |\n\n***/\n\nconfig.commands.collapseTiddler = {\ntext: "fold",\ntooltip: "Collapse this tiddler",\nhandler: function(event,src,title)\n{\nvar e = story.findContainingTiddler(src);\nif(e.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE]){\nvar t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";\nif (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }\nif(e.getAttribute("template") != t ){\ne.setAttribute("oldTemplate",e.getAttribute("template"));\nstory.displayTiddler(null,title,t);\n}\n}\n}\n}\n\nconfig.commands.expandTiddler = {\ntext: "unfold",\ntooltip: "Expand this tiddler",\nhandler: function(event,src,title)\n{\nvar e = story.findContainingTiddler(src);\nstory.displayTiddler(null,title,e.getAttribute("oldTemplate"));\n}\n}\n\nconfig.macros.collapseAll = {\nhandler: function(place,macroName,params,wikifier,paramString,tiddler){\ncreateTiddlyButton(place,"Collapse All","",function(){\nstory.forEachTiddler(function(title,tiddler){\nif(tiddler.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE])\nvar t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";\nif (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }\nstory.displayTiddler(null,title,t);\n})})\n}\n}\n\nconfig.macros.expandAll = {\nhandler: function(place,macroName,params,wikifier,paramString,tiddler){\ncreateTiddlyButton(place,"Expand All","",function(){\nstory.forEachTiddler(function(title,tiddler){\nvar t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";\nif (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }\nif(tiddler.getAttribute("template") == t) story.displayTiddler(null,title,tiddler.getAttribute("oldTemplate"));\n})})\n}\n}\n\nconfig.commands.collapseOthers = {\ntext: "focus",\ntooltip: "Expand this tiddler and collapse all others",\nhandler: function(event,src,title)\n{\nvar e = story.findContainingTiddler(src);\nstory.forEachTiddler(function(title,tiddler){\nif(tiddler.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE]){\nvar t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";\nif (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }\nif (e==tiddler) t=e.getAttribute("oldTemplate");\n//////////\n// ELS 2006.02.22 - removed this line. if t==null, then the *current* view template, not the default "ViewTemplate", will be used.\n// if (!t||!t.length) t=!readOnly?"ViewTemplate":"WebViewTemplate";\n//////////\nstory.displayTiddler(null,title,t);\n}\n})\n}\n}
/%RGB hexadecimal 216-color "Web safe" palette %/\nSource: Paul Petterson, revised by Eric Shulman\n{{menubox{\n|bgcolor(#FFF):FFF |bgcolor(#CCC):CCC |bgcolor(#999):999 |bgcolor(#666):@@color(white):666@@ |bgcolor(#333):@@color(white):333@@ |bgcolor(#000):@@color(white):000@@ |bgcolor(#FC0):~FC0 |bgcolor(#F90):F90 |bgcolor(#F60):@@color(white):F60@@ |bgcolor(#F30):@@color(white):F30@@ |>|>|>|>|>| |\n|bgcolor(#9C0):9C0 |>|>|>| |bgcolor(#C90):C90 |bgcolor(#FC3):~FC3 |bgcolor(#FC6):~FC6 |bgcolor(#F96):F96 |bgcolor(#F63):@@color(white):F63@@ |bgcolor(#C30):@@color(white):C30@@ |>|>|>| |bgcolor(#C03):@@color(white):C03@@ |\n|bgcolor(#CF0):~CF0 |bgcolor(#CF3):~CF3 |bgcolor(#330):@@color(white):330@@ |bgcolor(#660):@@color(white):660@@ |bgcolor(#990):990 |bgcolor(#CC0):~CC0 |bgcolor(#FF0):~FF0 |bgcolor(#C93):C93 |bgcolor(#C63):@@color(white):C63@@ |bgcolor(#300):@@color(white):300@@ |bgcolor(#600):@@color(white):600@@ |bgcolor(#900):@@color(white):900@@ |bgcolor(#C00):@@color(white):C00@@ |bgcolor(#F00):@@color(white):F00@@ |bgcolor(#F36):@@color(white):F36@@ |bgcolor(#F03):@@color(white):F03@@ |\n|bgcolor(#9F0):9F0 |bgcolor(#CF6):~CF6 |bgcolor(#9C3):9C3 |bgcolor(#663):@@color(white):663@@ |bgcolor(#993):993 |bgcolor(#CC3):~CC3 |bgcolor(#FF3):~FF3 |bgcolor(#960):@@color(white):960@@ |bgcolor(#930):@@color(white):930@@ |bgcolor(#633):@@color(white):633@@ |bgcolor(#933):@@color(white):933@@ |bgcolor(#C33):@@color(white):C33@@ |bgcolor(#F33):@@color(white):F33@@ |bgcolor(#C36):@@color(white):C36@@ |bgcolor(#F69):@@color(white):F69@@ |bgcolor(#F06):@@color(white):F06@@ |\n|bgcolor(#6F0):6F0 |bgcolor(#9F6):9F6 |bgcolor(#6C3):6C3 |bgcolor(#690):690 |bgcolor(#996):996 |bgcolor(#CC6):~CC6 |bgcolor(#FF6):~FF6 |bgcolor(#963):@@color(white):963@@ |bgcolor(#630):@@color(white):630@@ |bgcolor(#966):@@color(white):966@@ |bgcolor(#C66):@@color(white):C66@@ |bgcolor(#F66):@@color(white):F66@@ |bgcolor(#903):@@color(white):903@@ |bgcolor(#C39):@@color(white):C39@@ |bgcolor(#F6C):@@color(white):~F6C@@ |bgcolor(#F09):@@color(white):F09@@ |\n|bgcolor(#3F0):3F0 |bgcolor(#6F3):6F3 |bgcolor(#390):390 |bgcolor(#6C0):6C0 |bgcolor(#9F3):9F3 |bgcolor(#CC9):~CC9 |bgcolor(#FF9):~FF9 |bgcolor(#C96):C96 |bgcolor(#C60):@@color(white):C60@@ |bgcolor(#C99):C99 |bgcolor(#F99):F99 |bgcolor(#F39):@@color(white):F39@@ |bgcolor(#C06):@@color(white):C06@@ |bgcolor(#906):@@color(white):906@@ |bgcolor(#F3C):@@color(white):~F3C@@ |bgcolor(#F0C):@@color(white):~F0C@@ |\n|bgcolor(#0C0):0C0 |bgcolor(#3C0):3C0 |bgcolor(#360):@@color(white):360@@ |bgcolor(#693):693 |bgcolor(#9C6):9C6 |bgcolor(#CF9):~CF9 |bgcolor(#FFC):FFC |bgcolor(#FC9):~FC9 |bgcolor(#F93):F93 |bgcolor(#FCC):FCC |bgcolor(#F9C):~F9C |bgcolor(#C69):@@color(white):C69@@ |bgcolor(#936):@@color(white):936@@ |bgcolor(#603):@@color(white):603@@ |bgcolor(#C09):@@color(white):C09@@ |bgcolor(#303):@@color(white):303@@ |\n|bgcolor(#3C3):3C3 |bgcolor(#6C6):6C6 |bgcolor(#0F0):0F0 |bgcolor(#3F3):3F3 |bgcolor(#6F6):6F6 |bgcolor(#9F9):9F9 |bgcolor(#CFC):CFC |>|>| |bgcolor(#C9C):~C9C |bgcolor(#969):@@color(white):969@@ |bgcolor(#939):@@color(white):939@@ |bgcolor(#909):@@color(white):909@@ |bgcolor(#636):@@color(white):636@@ |bgcolor(#606):@@color(white):606@@ |\n|bgcolor(#060):@@color(white):060@@ |bgcolor(#363):@@color(white):363@@ |bgcolor(#090):090 |bgcolor(#393):393 |bgcolor(#696):696 |bgcolor(#9C9):9C9 |>|>| |bgcolor(#FCF):FCF |bgcolor(#F9F):~F9F |bgcolor(#F6F):@@color(white):~F6F@@ |bgcolor(#F3F):@@color(white):~F3F@@ |bgcolor(#F0F):@@color(white):~F0F@@ |bgcolor(#C6C):@@color(white):~C6C@@ |bgcolor(#C3C):@@color(white):~C3C@@ |\n|bgcolor(#030):@@color(white):030@@ |bgcolor(#0C3):0C3 |bgcolor(#063):@@color(white):063@@ |bgcolor(#396):396 |bgcolor(#6C9):6C9 |bgcolor(#9FC):9FC |bgcolor(#CFF):CFF |bgcolor(#39F):39F |bgcolor(#9CF):9CF |bgcolor(#CCF):CCF |bgcolor(#C9F):~C9F |bgcolor(#96C):@@color(white):96C@@ |bgcolor(#639):@@color(white):639@@ |bgcolor(#306):@@color(white):306@@ |bgcolor(#90C):@@color(white):90C@@ |bgcolor(#C0C):@@color(white):~C0C@@ |\n|bgcolor(#0F3):0F3 |bgcolor(#3F6):3F6 |bgcolor(#093):093 |bgcolor(#0C6):0C6 |bgcolor(#3F9):3F9 |bgcolor(#9FF):9FF |bgcolor(#9CC):9CC |bgcolor(#06C):@@color(white):06C@@ |bgcolor(#69C):69C |bgcolor(#99F):99F |bgcolor(#99C):99C |bgcolor(#93F):@@color(white):93F@@ |bgcolor(#60C):@@color(white):60C@@ |bgcolor(#609):@@color(white):609@@ |bgcolor(#C3F):@@color(white):~C3F@@ |bgcolor(#C0F):@@color(white):~C0F@@ |\n|bgcolor(#0F6):0F6 |bgcolor(#6F9):6F9 |bgcolor(#3C6):3C6 |bgcolor(#096):096 |bgcolor(#6FF):6FF |bgcolor(#6CC):6CC |bgcolor(#699):699 |bgcolor(#036):@@color(white):036@@ |bgcolor(#369):@@color(white):369@@ |bgcolor(#66F):@@color(white):66F@@ |bgcolor(#66C):@@color(white):66C@@ |bgcolor(#669):@@color(white):669@@ |bgcolor(#309):@@color(white):309@@ |bgcolor(#93C):@@color(white):93C@@ |bgcolor(#C6F):@@color(white):~C6F@@ |bgcolor(#90F):@@color(white):90F@@ |\n|bgcolor(#0F9):0F9 |bgcolor(#6FC):6FC |bgcolor(#3C9):3C9 |bgcolor(#3FF):3FF |bgcolor(#3CC):3CC |bgcolor(#399):399 |bgcolor(#366):@@color(white):366@@ |bgcolor(#069):@@color(white):069@@ |bgcolor(#039):@@color(white):039@@ |bgcolor(#33F):@@color(white):33F@@ |bgcolor(#33C):@@color(white):33C@@ |bgcolor(#339):@@color(white):339@@ |bgcolor(#336):@@color(white):336@@ |bgcolor(#63C):@@color(white):63C@@ |bgcolor(#96F):@@color(white):96F@@ |bgcolor(#60F):@@color(white):60F@@ |\n|bgcolor(#0FC):0FC |bgcolor(#3FC):3FC |bgcolor(#0FF):0FF |bgcolor(#0CC):0CC |bgcolor(#099):099 |bgcolor(#066):@@color(white):066@@ |bgcolor(#033):@@color(white):033@@ |bgcolor(#39C):39C |bgcolor(#36C):@@color(white):36C@@ |bgcolor(#00F):@@color(white):00F@@ |bgcolor(#00C):@@color(white):00C@@ |bgcolor(#009):@@color(white):009@@ |bgcolor(#006):@@color(white):006@@ |bgcolor(#003):@@color(white):003@@ |bgcolor(#63F):@@color(white):63F@@ |bgcolor(#30F):@@color(white):30F@@ |\n|bgcolor(#0C9):0C9 |>|>|>| |bgcolor(#09C):09C |bgcolor(#3CF):3CF |bgcolor(#6CF):6CF |bgcolor(#69F):69F |bgcolor(#36F):@@color(white):36F@@ |bgcolor(#03C):@@color(white):03C@@ |>|>|>| |bgcolor(#30C):@@color(white):30C@@ |\n|>|>|>|>|>| |bgcolor(#0CF):0CF |bgcolor(#09F):09F |bgcolor(#06F):@@color(white):06F@@ |bgcolor(#03F):@@color(white):03F@@ |>|>|>|>|>| |\n<script>place.lastChild.style.width="95%"</script>}}}
<<tabs tabsClass\nLayout "Layout Templates" SystemLayout\nSystem "System Tiddlers" SystemTiddlers\nStyle "StyleSheets" StyleSheets\n"Side Bar" "Side Bar Elements" SystemSideBars\nOptions "Personal Preferences" SystemOptions\nShadows "Hidden System Pages" ShadowPages\n>>\n\nThis page is a slightly modied version of [[Jack Parke's configuration|http://jackparke.googlepages.com/jtw.html#Config]]. Another one is at [[Julian Knight's site|http://knighjm.googlepages.com/knightnet-default-tw.html#Configuration]]. You can view the code. You will need to create several new tiddlers and add the corresponding code: SystemLayout, SystemTiddlers, StyleSheets, SystemSideBars, SystemOptions, ShadowPages. While this is not necessary for everyone, it helps in more advanced work, especially since the side bars have been removed.
<html><hide linebreaks>\n<form method=post target=email action="/cgi-bin/mailtext.cgi" style="display:inline">\n<input type=hidden name=to value="hermanr@uncw.edu">\n<input type=hidden name=subject value="WikiNotes feedback">\n<input type=hidden name=prefix value="#IP">\n<input type=hidden name=url value="javascript:window.close();">\n<input type=text name=from style="width:49%" value="your name" onfocus="this.select()"><!--\n--><input type=text name=reply style="width:49%" value="your email address" onfocus="this.select()"><br>\n<font size=-2>Your message:</font><br>\n<textarea rows=7 cols=50 name=text style="width:98%" onfocus="this.select()"></textarea><br>\n<font size=-2>Enter your information, then press </font><input type=submit value="send"></form></html>\n<<tiddler HideTiddlerTags>>
You may want to have particular tiddlers appear when first entering your page. These can be specified by entering the tiddler(s) in DefaultTiddlers. View DefaultTiddlers in this Wiki to see an example of this.\n\n
[[About]]
<html><iframe src="http://people.uncw.edu/hermanr/phy311/ReviewI.doc" style="width:100%;height:800px"></iframe></html>
<html><iframe src="http://people.uncw.edu/hermanr/phy311/ReviewI.pdf" style="width:100%;height:800px"></iframe></html>
<script label="display all tiddlers">\n var tiddlers=store.getTiddlers('title');\n var titles=[];\n for (var t=0;t<tiddlers.length; t++)\n titles.push(tiddlers[t].title);\n story.closeAllTiddlers();\n story.displayTiddlers(null,titles);\n return false;\n</script>
The Timeline and list of Tiddlers is useful for the developer, but often is not of much use for users of the content. Also, you might want to move things like the search window to the left side to free up space for viewing the content. \n\nYou can hide some of these items by entering in the StyleSheet the following:\n\n{{{\n#sidebar{display:none;}\n}}}\n\nBut you lose the ability to call up Tiddlers, saving your work, or searching. You can either add them to the MainMenu with the code below or see Clint's Tips posted after I wrote this at [[Clint Checketts Pages|http://clintstips.tiddlyspot.com/index.html#theme:Dianes]] .\n\nThese can be recovered by adding them to the MainMenu:\n\n{{{\n-----------------------\n{{small{\n<<search>>\n<<closeAll>>\n<<permaview>>\n<<newTiddler>>\n<<saveChanges>>}}}\n}}} \n}}}\nHowever, you do not recover the tiddler space. You need to further add to the StyleSheet the line\n\n{{{\n#displayArea {margin: 1em 1em 0em 14em;}\n}}}\n\nFinally, you can add at theend of the MainMenu some credit lines.\n{{{\n-----------------------\n{{smaller{[[Site created and maintained by\n Dr. R. Herman.|http://people.uncw.edu/herman]]}}}\n}}}\n\nHere we have defined the macros\n{{{\n.smaller { font-size:80%; } \n.small { font-size:90%; }\n}}}\n\nwhich can be added to the StyleSheet.\n\nNote: You can access the removed side bar tabs by calling up the tiddler SideBarTabs.
!!Quick Editing Instructions\n# [[Formatting Content]]\n# [[Headings]]\n# [[Bullets and Lists]]\n# [[Images]]\n# [[Hyperlinks]]\n# [[Tables]]\n# [[Boxed Text]]\n\n!!Imported Tiddlers on Editing\n#[[BlockQuotes]] - Jeremy Ruston\n#[[EmbeddedImages]] - Jeremy Ruston\n#[[ExtendedFormatting]] - Jeremy Ruston\n#[[HtmlEntities]] - Jeremy Ruston\n#[[SubHeadings]] - Jeremy Ruston\n#[[InlineHTML]] - Jeremy Ruston\n#[[TiddlyWiki Markup]] - Julian Knight
{{{\n[img[title|filename]]\n[img[filename]]\n[img[title|filename][link]]\n[img[filename][link]]\n}}}\nImages can be included by their filename or full URL. It's good practice to include a title to be shown as a tooltip, and when the image isn't available. An image can also link to another tiddler or or a URL\n[img[Romanesque broccoli|fractalveg.jpg][http://www.flickr.com/photos/jermy/10134618/]]\n{{{\n[img[Fractal vegetable|fractalveg.jpg]]\n[img[This is shown as a tooltip|http://example.com/image.jpg]]\n[img[http://example.com/image.jpg]]\n[img[http://example.com/image.jpg][ExampleDotCom]]\n}}}\nThe tooltip is optional.\n\n[<img[Forest|forest.jpg][http://www.flickr.com/photos/jermy/8749660/]][>img[Field|field.jpg][http://www.flickr.com/photos/jermy/8749285/]]You can also float images to the left or right: the forest is left aligned with {{{[<img[}}}, and the field is right aligned with {{{[>img[}}}.\n@@clear(left):clear(right):display(block):You can use CSS to clear the floats@@\n{{{\n[<img[A woody bit of Hampstead Heath|forest.jpg]]\n[>img[A field near Milton Keynes|field.jpg]]\n}}}
One can embed HTML in a tiddler. In particular, you can embed a web page by typing\n\n{{{\n<html><iframe src="http://www.uncw.edu" style="width:100%;height:500px"></iframe></html>\n}}}\n\nThis will give you the view \n\n<html><iframe src="http://www.uncw.edu" style="width:100%;height:500px"></iframe></html>\n\n//Thanks to Eric Schulman for pointing this out.//
Like most wikis, TiddlyWiki supports a range of simplified character formatting:\n| !To get | !Type this |h\n| ''Bold'' | {{{''Bold''}}} |\n| ==Strikethrough== | {{{==Strikethrough==}}} |\n| __Underline__ | {{{__Underline__}}} (that's two underline characters) |\n| //Italic// | {{{//Italic//}}} |\n| Superscript: 2^^3^^=8 | {{{2^^3^^=8}}} |\n| Subscript: a~~ij~~ = -a~~ji~~ | {{{a~~ij~~ = -a~~ji~~}}} |\n| @@highlight@@ | {{{@@highlight@@}}} |\n<<<\nThe highlight can also accept CSS syntax to directly style the text:\n@@color:green;green coloured@@\n@@background-color:#ff0000;color:#ffffff;red coloured@@\n@@text-shadow:black 3px 3px 8px;font-size:18pt;display:block;margin:1em 1em 1em 1em;border:1px solid black;Access any CSS style@@\n<<<\n\n//For backwards compatibility, the following highlight syntax is also accepted://\n{{{\n@@bgcolor(#ff0000):color(#ffffff):red coloured@@\n}}}\n@@bgcolor(#ff0000):color(#ffffff):red coloured@@
# Get a [[Clean Copy]] of TiddlyWiki\n# Create [[Site Title]] and [[Site Subtitle]]\n# Add to [[Main Menu]]\n# Set up [[Default Tiddlers]]\n# [[Change Colors]]\n# [[Make Header IE Friendly]]\n# Rearrange [[Displayed Items]] for a Two Column Format\n# [[Format Tiddlers]]\n
There are many ways to change the display of your tiddlers. Julian Knight has provided some code to compress the header and tiddler titles. Also, he places borders around the tiddlers. However, the colored background border does not appear correctly in IE and causes the bottoms of tiddlers to disappear. [[Julian Knight's StyleSheet|http://knighjm.googlepages.com/knightnet-default-tw.html#StyleSheet]] \n\nAlso, the displayed items in the subtitles and toolbars of the tiddlers do not display the same in IE as they do in Firefox. Here is some code to remedy the problems and clean up the titles and toolbars:\n\n{{{\n/* Modied Style from Julian Knight JK Version: 2006-04-20 (Simplified) */\n\nbody {position:static;}\n.tagClear {margin-top:1em;clear:both;}\n\nhr {height:0px;border:0;border-top:1px solid silver;}\nh1,h2,h3,h4,h5 {color:#014;background:transparent;border-bottom:1px solid #ddd;padding-left:0;}\n\n.headerShadow {padding:.5em 0em .5em 1em;}\n.headerForeground {padding:.5em 0em .5em 1em;}\n\n#displayArea { /* The bit that contains all tiddlers */\n padding-top:.1em;padding-bottom:.1em;\n margin-top:0;margin-right:15.5em;margin-bottom:0;margin-left:12.5em;-moz-border-radius:1em;}\n\n.tiddler {-moz-border-radius:1em;border-top:1px solid #ccc;border-left:1px solid #ccc;\n border-bottom:3px solid #ccc;border-right:3px solid #ccc;margin:0.5em;background:#fff;padding:0.5em;}\n\n.subtitle { /* Tiddler subtitle */\n font-size:0.9em;text-align:right;}\n\n.viewer pre {padding: 0;margin-left: 0;}\n.viewer hr {border: solid 1px silver;}\n\n.toolbar {visibility:visible;}\n\n.selected .toolbar {visibility:visible;color:#00f;}\n\n.toolbar .button { color:#dee; }\n.selected .toolbar .button { color:#014;}\n\n.tagging, .tagged, .selected .tagging, .selected .tagged {\n font-size:75%; padding:0.3em; background-color:#eee;border-top:1px solid #ccc; border-left:1px solid #ccc;\n border-bottom:3px solid #ccc; border-right:3px solid #ccc;max-width:45%;-moz-border-radius:1em;}\n\n.noBorder,.noBorder td,.noBorder th,.noBorder tr{border:0 !important}\n.evenRow{} .oddRow{}\n}}}\n\nEach tiddler is formatted according to the ViewTemplate. The default code is\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'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (created <span macro='view created date [[DD MMM YYYY]]'></span>)</div>\n<div class='tagging' macro='tagging'></div>\n<div class='tagged' macro='tags'></div>\n<div class='viewer' macro='view text wikified'></div>\n<div class='tagClear'></div>\n}}}\n\nJulian Knight provides some formatting in his [[View Template|http://knighjm.googlepages.com/knightnet-default-tw.html#ViewTemplate]] But his formatting requires some macros for tagging. Deleting the two macros leaves the following code to replace the ViewTemplate code:\n\n{{{\n<div>\n <span class='title' style='float:left;' macro='view title'></span>\n <span style='float:right;' class='subtitle'>\n <span macro='view modifier link'></span>, \n <span macro='view modified date [[DD MMM YYYY]]'></span> \n (created <span macro='view created date [[DD MMM YYYY]]'></span>)\n </span>\n <span class='toolbar' style='clear:right;margin-top:1px;float:right;'\n macro='toolbar -closeTiddler +editTiddler deleteTiddler closeOthers permalink references jump'>\n </span>\n <div class='tagClear'></div>\n</div>\n<hr>\n<div class='tagClear viewer' macro='view text wikified'></div>\n}}}\n\nThis removes the tags and compresses the toolbar. You can further clean up the tiddler by deleting some of the content:\n\n{{{\n<div>\n <span class='title' style='float:left;' macro='view title'></span>\n <span class='toolbar' style='clear:right;margin-top:1px;float:right;'\n macro='toolbar -closeTiddler +editTiddler deleteTiddler closeOthers jump'>\n </span>\n <div class='tagClear'></div>\n</div>\n<hr>\n<div class='tagClear viewer' macro='view text wikified'></div>\n}}}
At http://www.tiddlywiki.com one can find simple formatting:\n\n| !To get | !Type this |h\n| ''Bold'' | {{{''Bold''}}} |\n| ==Strikethrough== | {{{==Strikethrough==}}} |\n| __Underline__ | {{{__Underline__}}} (that's two underline characters) |\n| //Italic// | {{{//Italic//}}} |\n| Superscript: 2^^3^^=8 | {{{2^^3^^=8}}} |\n| Subscript: a~~ij~~ = -a~~ji~~ | {{{a~~ij~~ = -a~~ji~~}}} |\n| @@highlight@@ | {{{@@highlight@@}}} |\n\nThe tiddler [[TiddlyWiki Markup]], displaying more extensive formatting, was compiled by [[Julian Knight|http://knighjm.googlepages.com/knightnet-default-tw.html]].\n\n
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:\n* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)\n* MainMenu: The menu (usually on the left)\n* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened\nYou'll also need to enter your username for signing your edits: <<option txtUserName>>
One can add headings to the tiddlers. Inserting the text\n\n{{{\n!Heading 1\nHere is some text\n!!Heading 2\nHere is some text\n!!!Heading 3\nHere is some text\n!!!!Heading 4\nHere is some text\n}}}\n\nproduces\n\n!Heading 1\nHere is some text\n!!Heading 2\nHere is some text\n!!!Heading 3\nHere is some text\n!!!!Heading 4\nHere is some text
You can create horizontal menus. First add the line \n{{{\n<span id='topMenu' refresh='content' tiddler='TopMenu'></span> \n}}}\nto the PageTemplate before the MainMenu line. This will place a tiddler link TopMenu. Edit this with the tiddlers you want displayed.\n\nAnother method is shown at Simon Baird's [MonkeyPirateTiddlyWiki|http://mptw.tiddlyspot.com/]. This is shown in HorizontalMainMenuStyles.
/***\nTo use, add {{{[[HorizontalMainMenuStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. \n***/\n/*{{{*/\n\n#topMenu br {display:none; }\n#topMenu { background: #069; }\n#topMenu { padding:2px; }\n#topMenu .button, #topMenu .tiddlyLink {\n margin-left:0.5em; margin-right:0.5em;\n padding-left:3px; padding-right:3px;\n color:white; font-size:115%;\n}\n#topMenu .button:hover, #topMenu .tiddlyLink:hover { background:#17a;}\n\n#displayArea { margin: 1em 15.7em 0em 1em; } /* so we use the freed up space */\n\n/* just in case want some QuickOpenTags in your topMenu */\n#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }\n#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }\n#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }\n\n@media print { #topMenu {display: none ! important;} }\n\n/*}}}*/
Entities in HTML documents allow characters to be entered that can't easily be typed on an ordinary keyboard. They take the form of an ampersand (&), an identifying string, and a terminating semi-colon (;). There's a complete reference [[here|http://www.htmlhelp.com/reference/html40/entities/]]; some of the more common and useful ones are shown below. Also see [[Paul's Notepad|http://thepettersons.org/PaulsNotepad.html#GreekHtmlEntities%20HtmlEntitiesList%20LatinHtmlEntities%20MathHtmlEntities]] for a more complete list.\n\n|>|>|>|>|>|>| !HTML Entities |\n| &nbsp; | | no-break space | | &apos; | ' | single quote, apostrophe |\n| &ndash; | – | en dash |~| &quot; | " | quotation mark |\n| &mdash; | — | em dash |~| &prime; | ′ | prime; minutes; feet |\n| &hellip; | … | horizontal ellipsis |~| &Prime; | ″ | double prime; seconds; inches |\n| &copy; | © | Copyright symbol |~| &lsquo; | ‘ | left single quote |\n| &reg; | ® | Registered symbol |~| &rsquo; | ’ | right single quote |\n| &trade; | ™ | Trademark symbol |~| &ldquo; | “ | left double quote |\n| &dagger; | † | dagger |~| &rdquo; | ” | right double quote |\n| &Dagger; | ‡ | double dagger |~| &laquo; | « | left angle quote |\n| &para; | ¶ | paragraph sign |~| &raquo; | » | right angle quote |\n| &sect; | § | section sign |~| &times; | × | multiplication symbol |\n| &uarr; | ↑ | up arrow |~| &darr; | ↓ | down arrow |\n| &larr; | ← | left arrow |~| &rarr; | → | right arrow |\n| &lArr; | ⇐ | double left arrow |~| &rArr; | ⇒ | double right arrow |\n| &harr; | ↔ | left right arrow |~| &hArr; | ⇔ | double left right arrow |\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 | &_grave; | À | à | È | è | Ì | ì | Ò | ò | Ù | ù | | | | | | |\n| acute accent | &_acute; | Á | á | É | é | Í | í | Ó | ó | Ú | ú | | | Ý | ý | | |\n| circumflex accent | &_circ; | Â | â | Ê | ê | Î | î | Ô | ô | Û | û | | | | | | |\n| umlaut mark | &_uml; | Ä | ä | Ë | ë | Ï | ï | Ö | ö | Ü | ü | | | Ÿ | ÿ | | |\n| tilde | &_tilde; | Ã | ã | | | | | Õ | õ | | | Ñ | ñ | | | | |\n| ring | &_ring; | Å | å | | | | | | | | | | | | | |\n| slash | &_slash; | | | | | | | Ø | ø | | | | | | | |\n| cedilla | &_cedil; | | | | | | | | | | | | | | | Ç | ç |
Hyperlinks to web pages are easy to do. Just type the full web address: http://people.uncw.edu/hermanr/ \n\nYou can link to other Tiddlers. If the tiddler is a WikiWord, then it is automatically hot. WikiWords are a string of words with no spaces and the first letter of each word captitalized. Example: TiddlyWiki.You can make a word a non-Wiki Word by putting a tilde (~) in front: ~Editor-in-Chief.\n\nYou can link to tiddlers that are not WikiWords by placing double brackets [[ ]] around them. You can call up tiddlers in other TiddlyWikis by clicking on the tiddler's peralink or by displaying just one tiddler in the TiddlyWiki and clicking on the side permaview link. Then copy the URL in the browser display.\n
You can display images by using the following code\n{{{\n[img[Text tag|image link]]\n}}}\n\nYou can resize images by defining a wrapper in the StyleSheet: \n{{{\n#contentWrapper .wrappingClass img {width: 100%} \n}}}\nand wrapping the image tag in the tiddler using\n{{{\n{{wrappingClass{[img[Text tag|image.jpg]]}}}\n}}}\n
/***\n''Import Tiddlers Plugin for TiddlyWiki version 1.2.x, 2.0 and 2.1beta''\n^^author: Eric Shulman - ELS Design Studios\nsource: http://www.TiddlyTools.com/#ImportTiddlersPlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nWhen many people share and edit copies of the same TiddlyWiki document, the ability to quickly collect all these changes back into a single, updated document that can then be redistributed to the entire group is very important. It can also be very extremely helpful when moving your own tiddlers from document to document (e.g., when upgrading to the latest version of TiddlyWiki, or 'pre-loading' your favorite stylesheets into a new 'empty' TiddlyWiki document.)\n\nThis plugin lets you selectively combine tiddlers from any two TiddlyWiki documents. An interactive control panel lets you pick a document to import from, and then select which tiddlers to import, with prompting for skip, rename, merge or replace actions when importing tiddlers that match existing titles. Automatically add tags to imported tiddlers so they are easy to find later on. Generates a detailed report of import 'history' in ImportedTiddlers.\n!!!!!Interactive interface\n<<<\n{{{<<importTiddlers>>}}}\ncreates "import tiddlers" link. click to show/hide import control panel\n\n{{{<<importTiddlers inline>>}}}\ncreates import control panel directly in tiddler content\n\n<<importTiddlers inline>>\n\nPress ''[browse]'' to select a TiddlyWiki document file to import. You can also type in the path/filename or a remote document URL (starting with http://)and press ''[open]''. //Note: There may be some delay to permit the browser time to access and load the document before updating the listbox with the titles of all tiddlers that are available to be imported.//\n\nSelect one or more titles from the listbox (hold CTRL or SHIFT while clicking to add/remove the highlight from individual list items). You can press ''[select all]'' to quickly highlight all tiddler titles in the list. Use the ''[-]'', ''[+]'', or ''[=]'' links to adjust the listbox size so you can view more (or less) tiddler titles at one time. When you have chosen the tiddlers you want to import and entered any extra tags, press ''[import]'' to begin copying them to the current TiddlyWiki document.\n\n''select: all, new, changes, or differences''\n\nYou can click on ''all'', ''new'', ''changes'', or ''differences'' to automatically select a subset of tiddlers from the list. This makes it very quick and easy to find and import just the updated tiddlers you are interested in:\n>''"all"'' selects ALL tiddlers from the import source document, even if they have not been changed.\n>''"new"'' selects only tiddlers that are found in the import source document, but do not yet exist in the destination document\n>''"changes"'' selects only tiddlers that exist in both documents but that are newer in the source document\n>''"differences"'' selects all new and existing tiddlers that are different from the destination document (even if destination tiddler is newer)\n\n''Import Tagging:''\n\nTiddlers that have been imported can be automatically tagged, so they will be easier to find later on, after they have been added to your document. New tags are entered into the "add tags" input field, and then //added// to the existing tags for each tiddler as it is imported.\n\n''Skip, Rename, Merge, or Replace:''\n\nWhen importing a tiddler whose title is identical to one that already exists, the import process pauses and the tiddler title is displayed in an input field, along with four push buttons: ''[skip]'', ''[rename]'', ''[merge]'' and ''[replace]''.\n\nTo bypass importing this tiddler, press ''[skip]''. To import the tiddler with a different name (so that both the tiddlers will exist when the import is done), enter a new title in the input field and then press ''[rename]''. Press ''[merge]'' to combine the content from both tiddlers into a single tiddler. Press ''[replace]'' to overwrite the existing tiddler with the imported one, discarding the previous tiddler content.\n\n//Note: if both the title ''and'' modification date/////time match, the imported tiddler is assumed to be identical to the existing one, and will be automatically skipped (i.e., not imported) without asking.//\n\n''Import Report History''\n\nWhen tiddlers are imported, a report is generated into ImportedTiddlers, indicating when the latest import was performed, the number of tiddlers successfully imported, from what location, and by whom. It also includes a list with the title, date and author of each tiddler that was imported.\n\nWhen the import process is completed, the ImportedTiddlers report is automatically displayed for your review. If more tiddlers are subsequently imported, a new report is //added// to ImportedTiddlers, above the previous report (i.e., at the top of the tiddler), so that a reverse-chronological history of imports is maintained.\n\nIf a cumulative record is not desired, the ImportedTiddlers report may be deleted at any time. A new ImportedTiddlers report will be created the next time tiddlers are imported.\n\nNote: You can prevent the ImportedTiddlers report from being generated for any given import activity by clearing the "create a report" checkbox before beginning the import processing.\n\n<<<\n!!!!!non-interactive 'load tiddlers' macro\n<<<\nUseful for automated installation/update of plugins and other tiddler content.\n\n{{{<<loadTiddlers "label:load tiddlers from %0" http://www.tiddlytools.com/example.html confirm>>}}}\n<<loadTiddlers "label:load tiddlers from %0" http://www.tiddlytools.com/example.html confirm>>\n\nSyntax:\n{{{<<loadTiddlers label:text prompt:text filter source quiet confirm>>}}}\n\n''label:text'' and ''prompt:text''\n>defines link text and tooltip (prompt) that can be clicked to trigger the load tiddler processing. If a label is NOT provided, then no link is created and loadTiddlers() is executed whenever the containing tiddler is rendered.\n''filter'' (optional) determines which tiddlers will be automatically selected for importing. Use one of the following keywords:\n>''"all"'' retrieves ALL tiddlers from the import source document, even if they have not been changed.\n>''"new"'' retrieves only tiddlers that are found in the import source document, but do not yet exist in the destination document\n>''"changes"'' retrieves only tiddlers that exist in both documents for which the import source tiddler is newer than the existing tiddler\n>''"updates"'' retrieves both ''new'' and ''changed'' tiddlers (this is the default action when none is specified)\n>''"tiddler:~TiddlerName"'' retrieves only the specific tiddler named in the parameter.\n>''"tag:text"'' retrieves only the tiddlers tagged with the indicated text.\n''source'' (required) is the location of the imported document. It can be either a local document path/filename in whatever format your system requires, or a remote web location (starting with "http://" or "https://")\n>use the keyword ''ask'' to prompt for a source location whenever the macro is invoked\n''"quiet"'' (optional)\n>supresses all status message during the import processing (e.g., "opening local file...", "found NN tiddlers..." etc). Note that if ANY tiddlers are actualy imported, a final information message will still be displayed (along with the ImportedTiddlers report), even when 'quiet' is specified. This ensures that changes to your document cannot occur without any visible indication at all.\n''"confirm"'' (optional)\n>adds interactive confirmation. A browser message box (OK/Cancel) is displayed for each tiddler that will be imported, so that you can manually bypass any tiddlers that you do not want to import.\n<<<\n!!!!!Installation\n<<<\ncopy/paste the following tiddlers into your document:\n''ImportTiddlersPlugin'' (tagged with <<tag systemConfig>>)\n\ncreate/edit ''SideBarOptions'': (sidebar menu items) \n^^Add "< < ImportTiddlers > >" macro^^\n\n''Quick Installation Tip #1:''\nIf you are using an unmodified version of TiddlyWiki (core release version <<version>>), you can get a new, empty TiddlyWiki with the Import Tiddlers plugin pre-installed (''[[download from here|TW+ImportExport.html]]''), and then simply import all your content from your old document into this new, empty document.\n<<<\n!!!!!Revision History\n<<<\n''2006.08.16 [3.0.6]'' Use higher-level store.saveTiddler() instead of store.addTiddler() to avoid conflicts with ZW and other adaptations that hijack low-level tiddler handling. Also, in CreateImportPanel(), no longer register notify to "refresh listbox after every tiddler change" (left over from old 'auto-filtered' list handling). Thanks to Bob McElrath for report/solution.\n''2006.07.29 [3.0.5]'' added noChangeMsg to loadTiddlers processing. if not 'quiet' mode, reports skipped tiddlers.\n''2006.04.18 [3.0.4]'' in loadTiddlers.handler, fixed parsing of "prompt:" param. Also, corrected parameters mismatch in loadTiddlers() callback function definition (order of params was wrong, resulting in filters NOT being applied)\n''2006.04.12 [3.0.3]'' moved many display messages to macro properties for easier L10N translations via 'lingo' definitions.\n''2006.04.12 [3.0.2]'' additional refactoring of 'core candidate' code. Proposed API now defines "loadRemoteFile()" for XMLHttpRequest processing with built in fallback for handling local filesystem access, and readTiddlersFromHTML() to process the resulting source HTML content.\n''2006.04.04 [3.0.1]'' in refreshImportList(), when using [by tags], tiddlers without tags are now included in a new "untagged" psuedo-tag list section\n''2006.04.04 [3.0.0]'' Separate non-interactive {{{<<importTiddlers...>>}}} macro functionality for incorporation into TW2.1 core and renamed as {{{<<loadTiddlers>>}}} macro. New parameters for loadTiddlers: ''label:text'' and ''prompt:text'' for link creation, ''ask'' for filename/URL, ''tag:text'' for filtering, "confirm" for accept/reject of individual inbound tiddlers. Also, ImportedTiddlers report generator output has been simplified and "importReplace/importPublic" tags and associated "force" param (which were rarely, if ever, used) has been dropped.\n''2006.03.30 [2.9.1]'' when extracting store area from remote URL, look for "</body>" instead of "</body>\sn</html>" so it will match even if the "\sn" is absent from the source.\n''2006.03.30 [2.9.0]'' added optional 'force' macro param. When present, autoImportTiddlers() bypasses the checks for importPublic and importReplace. Based on a request from Tom Otvos.\n''2006.03.28 [2.8.1]'' in loadImportFile(), added checks to see if 'netscape' and 'x.overrideMimeType()' are defined (IE does *not* define these values, so we bypass this code)\nAlso, when extracting store area from remote URL, explicitly look for "</body>\sn</html>" to exclude any extra content that may have been added to the end of the file by hosting environments such as GeoCities. Thanks to Tom Otvos for finding these bugs and suggesting some fixes.\n''2006.02.21 [2.8.0]'' added support for "tiddler:TiddlerName" filtering parameter in auto-import processing\n''2006.02.21 [2.7.1]'' Clean up layout problems with IE. (Use tables for alignment instead of SPANs styled with float:left and float:right)\n''2006.02.21 [2.7.0]'' Added "local file" and "web server" radio buttons for selecting dynamic import source controls in ImportPanel. Default file control is replaced with URL text input field when "web server" is selected. Default remote document URL is defined in SiteURL tiddler. Also, added option for prepending SiteProxy URL as prefix to remote URL to mask cross-domain document access (requires compatible server-side script)\n''2006.02.17 [2.6.0]'' Removed "differences only" listbox display mode, replaced with selection filter 'presets': all/new/changes/differences. Also fixed initialization handling for "add new tags" so that checkbox state is correctly tracked when panel is first displayed.\n''2006.02.16 [2.5.4]'' added checkbox options to control "import remote tags" and "keep existing tags" behavior, in addition to existing "add new tags" functionality.\n''2006.02.14 [2.5.3]'' FF1501 corrected unintended global 't' (loop index) in importReport() and autoImportTiddlers()\n''2006.02.10 [2.5.2]'' corrected unintended global variable in importReport().\n''2006.02.05 [2.5.1]'' moved globals from window.* to config.macros.importTiddlers.* to avoid FireFox 1.5.0.1 crash bug when referencing globals\n''2006.01.18 [2.5.0]'' added checkbox for "create a report". Default is to create/update the ImportedTiddlers report. Clear the checkbox to skip this step.\n''2006.01.15 [2.4.1]'' added "importPublic" tag and inverted default so that auto sharing is NOT done unless tagged with importPublic\n''2006.01.15 [2.4.0]'' Added support for tagging individual tiddlers with importSkip, importReplace, and/or importPrivate to control which tiddlers can be overwritten or shared with others when using auto-import macro syntax. Defaults are to SKIP overwriting existing tiddlers with imported tiddlers, and ALLOW your tiddlers to be auto-imported by others.\n''2006.01.15 [2.3.2]'' Added "ask" parameter to confirm each tiddler before importing (for use with auto-importing)\n''2006.01.15 [2.3.1]'' Strip TW core scripts from import source content and load just the storeArea into the hidden IFRAME. Makes loading more efficient by reducing the document size and by preventing the import document from executing its TW initialization (including plugins). Seems to resolve the "Found 0 tiddlers" problem. Also, when importing local documents, use convertUTF8ToUnicode() to convert the file contents so support international characters sets.\n''2006.01.12 [2.3.0]'' Reorganized code to use callback function for loading import files to support event-driven I/O via an ASYNCHRONOUS XMLHttpRequest. Let's processing continue while waiting for remote hosts to respond to URL requests. Added non-interactive 'batch' macro mode, using parameters to specify which tiddlers to import, and from what document source. Improved error messages and diagnostics, plus an optional 'quiet' switch for batch mode to eliminate //most// feedback.\n''2006.01.11 [2.2.0]'' Added "[by tags]" to list of tiddlers, based on code submitted by BradleyMeck\n''2006.01.09 [2.1.1]'' When a URL is typed in, and then the "open" button is pressed, it generates both an onChange event for the file input and a click event for open button. This results in multiple XMLHttpRequest()'s which seem to jam things up quite a bit. I removed the onChange handling for file input field. To open a file (local or URL), you must now explicitly press the "open" button in the control panel.\n''2006.01.08 [2.1.0]'' IMPORT FROM ANYWHERE!!! re-write getImportedTiddlers() logic to either read a local file (using local I/O), OR... read a remote file, using a combination of XML and an iframe to permit cross-domain reading of DOM elements. Adapted from example code and techniques courtesy of Jonny LeRoy.\n''2006.01.06 [2.0.2]'' When refreshing list contents, fixed check for tiddlerExists() when "show differences only" is selected, so that imported tiddlers that don't exist in the current file will be recognized as differences and included in the list.\n''2006.01.04 [2.0.1]'' When "show differences only" is NOT checked, import all tiddlers that have been selected even when they have a matching title and date.\n''2005.12.27 [2.0.0]'' Update for TW2.0\nDefer initial panel creation and only register a notification function when panel first is created\n''2005.12.22 [1.3.1]'' tweak formatting in importReport() and add 'discard report' link to output\n''2005.12.03 [1.3.0]'' Dynamically create/remove importPanel as needed to ensure only one instance of interface elements exists, even if there are multiple instances of macro embedding. Also, dynamically create/recreate importFrame each time an external TW document is loaded for importation (reduces DOM overhead and ensures a 'fresh' frame for each document)\n''2005.11.29 [1.2.1]'' fixed formatting of 'detail info' in importReport()\n''2005.11.11 [1.2.0]'' added 'inline' param to embed controls in a tiddler\n''2005.11.09 [1.1.0]'' only load HTML and CSS the first time the macro handler is called. Allows for redundant placement of the macro without creating multiple instances of controls with the same ID's.\n''2005.10.25 [1.0.5]'' fixed typo in importReport() that prevented reports from being generated\n''2005.10.09 [1.0.4]'' combined documentation with plugin code instead of using separate tiddlers\n''2005.08.05 [1.0.3]'' moved CSS and HTML definitions into plugin code 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// // ''MACRO DEFINITION''\n//{{{\n// Version\nversion.extensions.importTiddlers = {major: 3, minor: 0, revision: 6, date: new Date(2006,8,16)};\n\n// IE needs explicit global scoping for functions/vars called from browser events\nwindow.onClickImportButton=onClickImportButton;\nwindow.refreshImportList=refreshImportList;\n\n// default cookie/option values\nif (!config.options.chkImportReport) config.options.chkImportReport=true;\n\nconfig.macros.importTiddlers = { };\nconfig.macros.importTiddlers = {\n label: "import tiddlers",\n prompt: "Copy tiddlers from another document",\n foundMsg: "Found %0 tiddlers in %1",\n countMsg: "%0 tiddlers selected for import",\n importedMsg: "Imported %0 of %1 tiddlers from %2",\n src: "", // path/filename or URL of document to import (retrieved from SiteUrl tiddler)\n proxy: "", // URL for remote proxy script (retrieved from SiteProxy tiddler)\n useProxy: false, // use specific proxy script in front of remote URL\n inbound: null, // hash-indexed array of tiddlers from other document\n newTags: "", // text of tags added to imported tiddlers\n addTags: true, // add new tags to imported tiddlers\n listsize: 8, // # of lines to show in imported tiddler list\n importTags: true, // include tags from remote source document when importing a tiddler\n keepTags: true, // retain existing tags when replacing a tiddler\n index: 0, // current processing index in import list\n sort: "" // sort order for imported tiddler listbox\n};\n\nconfig.macros.importTiddlers.handler = function(place,macroName,params) {\n if (!config.macros.loadTiddlers.handler)\n { alert("importTiddlers error: this plugin requires LoadTiddlersPlugin or TiddlyWiki 2.1+"); return; }\n if (!params[0]) // LINK TO FLOATING PANEL\n createTiddlyButton(place,this.label,this.prompt,onClickImportMenu);\n else if (params[0]=="inline") {// // INLINE TIDDLER CONTENT\n createImportPanel(place);\n document.getElementById("importPanel").style.position="static";\n document.getElementById("importPanel").style.display="block";\n }\n else config.macros.loadTiddlers.handler(place,macroName,params); // FALLBACK: PASS TO LOADTIDDLERS\n}\n//}}}\n\n// // ''INTERFACE DEFINITION''\n\n// // Handle link click to create/show/hide control panel\n//{{{\nfunction onClickImportMenu(e)\n{\n if (!e) var e = window.event;\n var parent=resolveTarget(e).parentNode;\n var panel = document.getElementById("importPanel");\n if (panel==undefined || panel.parentNode!=parent)\n panel=createImportPanel(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\n// // Create control panel: HTML, CSS\n//{{{\nfunction createImportPanel(place) {\n var panel=document.getElementById("importPanel");\n if (panel) { panel.parentNode.removeChild(panel); }\n setStylesheet(config.macros.importTiddlers.css,"importTiddlers");\n panel=createTiddlyElement(place,"span","importPanel",null,null)\n panel.innerHTML=config.macros.importTiddlers.html;\n refreshImportList();\n var siteURL=store.getTiddlerText("SiteUrl"); if (!siteURL) siteURL="";\n document.getElementById("importSourceURL").value=siteURL;\n config.macros.importTiddlers.src=siteURL;\n var siteProxy=store.getTiddlerText("SiteProxy"); if (!siteProxy) siteProxy="SiteProxy";\n document.getElementById("importSiteProxy").value=siteProxy;\n config.macros.importTiddlers.proxy=siteProxy;\n return panel;\n}\n//}}}\n\n// // CSS\n//{{{\nconfig.macros.importTiddlers.css = '\s\n#importPanel {\s\n display: none; position:absolute; z-index:11; width:35em; right:105%; top:3em;\s\n background-color: #eee; color:#000; 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; -moz-border-radius:1em;\s\n}\s\n#importPanel a, #importPanel td a { color:#009; display:inline; margin:0px; padding:1px; }\s\n#importPanel table { width:100%; border:0px; padding:0px; margin:0px; font-size:8pt; line-height:110%; background:transparent; }\s\n#importPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }\s\n#importPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }\s\n#importPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}\s\n#importPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\s\n#importPanel .box { border:1px solid black; padding:3px; margin-bottom:5px; background:#f8f8f8; -moz-border-radius:5px;}\s\n#importPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }\s\n#importPanel .rad { width:auto; }\s\n#importPanel .chk { width:auto; margin:1px;border:0; }\s\n#importPanel .btn { width:auto; }\s\n#importPanel .btn1 { width:98%; }\s\n#importPanel .btn2 { width:48%; }\s\n#importPanel .btn3 { width:32%; }\s\n#importPanel .btn4 { width:24%; }\s\n#importPanel .btn5 { width:19%; }\s\n#importPanel .importButton { padding: 0em; margin: 0px; font-size:8pt; }\s\n#importPanel .importListButton { padding:0em 0.25em 0em 0.25em; color: #000000; display:inline }\s\n#importCollisionPanel { display:none; margin:0.5em 0em 0em 0em; }\s\n';\n//}}}\n\n// // HTML \n//{{{\nconfig.macros.importTiddlers.html = '\s\n<!-- source and report -->\s\n<table><tr><td align=left>\s\n import from\s\n <input type="radio" class="rad" name="importFrom" value="file" CHECKED\s\n onClick="document.getElementById(\s'importLocalPanel\s').style.display=this.checked?\s'block\s':\s'none\s';\s\n document.getElementById(\s'importHTTPPanel\s').style.display=!this.checked?\s'block\s':\s'none\s'"> local file\s\n <input type="radio" class="rad" name="importFrom" value="http"\s\n onClick="document.getElementById(\s'importLocalPanel\s').style.display=!this.checked?\s'block\s':\s'none\s';\s\n document.getElementById(\s'importHTTPPanel\s').style.display=this.checked?\s'block\s':\s'none\s'"> web server\s\n</td><td align=right>\s\n <input type=checkbox class="chk" id="chkImportReport" checked\s\n onClick="config.options[\s'chkImportReport\s']=this.checked;"> create a report\s\n</td></tr></table>\s\n<!-- import from local file -->\s\n<div id="importLocalPanel" style="display:block;margin-bottom:5px;margin-top:5px;padding-top:3px;border-top:1px solid #999">\s\nlocal document path/filename:<br>\s\n<input type="file" id="fileImportSource" size=57 style="width:100%"\s\n onKeyUp="config.macros.importTiddlers.src=this.value"\s\n onChange="config.macros.importTiddlers.src=this.value;">\s\n</div><!--panel-->\s\n\s\n<!-- import from http server -->\s\n<div id="importHTTPPanel" style="display:none;margin-bottom:5px;margin-top:5px;padding-top:3px;border-top:1px solid #999">\s\n<table><tr><td align=left>\s\n remote document URL:<br>\s\n</td><td align=right>\s\n <input type="checkbox" class="chk" id="importUseProxy"\s\n onClick="config.macros.importTiddlers.useProxy=this.checked;\s\n document.getElementById(\s'importSiteProxy\s').style.display=this.checked?\s'block\s':\s'none\s'"> use a proxy script\s\n</td></tr></table>\s\n<input type="text" id="importSiteProxy" style="display:none;margin-bottom:1px" onfocus="this.select()" value="SiteProxy"\s\n onKeyUp="config.macros.importTiddlers.proxy=this.value"\s\n onChange="config.macros.importTiddlers.proxy=this.value;">\s\n<input type="text" id="importSourceURL" onfocus="this.select()" value="SiteUrl"\s\n onKeyUp="config.macros.importTiddlers.src=this.value"\s\n onChange="config.macros.importTiddlers.src=this.value;">\s\n</div><!--panel-->\s\n\s\n<table><tr><td align=left>\s\n select:\s\n <a href="JavaScript:;" id="importSelectAll"\s\n onclick="onClickImportButton(this)" title="select all tiddlers">\s\n all </a>\s\n <a href="JavaScript:;" id="importSelectNew"\s\n onclick="onClickImportButton(this)" title="select tiddlers not already in destination document">\s\n added </a> \s\n <a href="JavaScript:;" id="importSelectChanges"\s\n onclick="onClickImportButton(this)" title="select tiddlers that have been updated in source document">\s\n changes </a> \s\n <a href="JavaScript:;" id="importSelectDifferences"\s\n onclick="onClickImportButton(this)" title="select tiddlers that have been added or are different from existing tiddlers">\s\n differences </a> \s\n <a href="JavaScript:;" id="importToggleFilter"\s\n onclick="onClickImportButton(this)" title="show/hide selection filter">\s\n filter </a> \s\n</td><td align=right>\s\n <a href="JavaScript:;" id="importListSmaller"\s\n onclick="onClickImportButton(this)" title="reduce list size">\s\n – </a>\s\n <a href="JavaScript:;" id="importListLarger"\s\n onclick="onClickImportButton(this)" title="increase list size">\s\n + </a>\s\n <a href="JavaScript:;" id="importListMaximize"\s\n onclick="onClickImportButton(this)" title="maximize/restore list size">\s\n = </a>\s\n</td></tr></table>\s\n<select id="importList" size=8 multiple\s\n onchange="setTimeout(\s'refreshImportList(\s'+this.selectedIndex+\s')\s',1)">\s\n <!-- NOTE: delay refresh so list is updated AFTER onchange event is handled -->\s\n</select>\s\n<input type=checkbox class="chk" id="chkAddTags" checked\s\n onClick="config.macros.importTiddlers.addTags=this.checked;">add new tags \s\n<input type=checkbox class="chk" id="chkImportTags" checked\s\n onClick="config.macros.importTiddlers.importTags=this.checked;">import source tags \s\n<input type=checkbox class="chk" id="chkKeepTags" checked\s\n onClick="config.macros.importTiddlers.keepTags=this.checked;">keep existing tags<br>\s\n<input type=text id="txtNewTags" size=15 onKeyUp="config.macros.importTiddlers.newTags=this.value" autocomplete=off>\s\n<div align=center>\s\n <input type=button id="importOpen" class="importButton" style="width:32%" value="open"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importStart" class="importButton" style="width:32%" value="import"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importClose" class="importButton" style="width:32%" value="close"\s\n onclick="onClickImportButton(this)">\s\n</div>\s\n<div id="importCollisionPanel">\s\n tiddler already exists:\s\n <input type=text id="importNewTitle" size=15 autocomplete=off">\s\n <div align=center>\s\n <input type=button id="importSkip" class="importButton" style="width:23%" value="skip"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importRename" class="importButton" style="width:23%" value="rename"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importMerge" class="importButton" style="width:23%" value="merge"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importReplace" class="importButton" style="width:23%" value="replace"\s\n onclick="onClickImportButton(this)">\s\n </div>\s\n</div>\s\n';\n//}}}\n\n// // Control interactions\n//{{{\nfunction onClickImportButton(which)\n{\n // DEBUG alert(which.id);\n var theList = document.getElementById('importList');\n if (!theList) return;\n var thePanel = document.getElementById('importPanel');\n var theCollisionPanel = document.getElementById('importCollisionPanel');\n var theNewTitle = document.getElementById('importNewTitle');\n var count=0;\n switch (which.id)\n {\n case 'fileImportSource':\n case 'importOpen': // load import source into hidden frame\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.inbound=null; // clear the imported tiddler buffer\n refreshImportList(); // reset/resize the listbox\n if (config.macros.importTiddlers.src=="") break;\n // Load document into hidden iframe so we can read it's DOM and fill the list\n loadRemoteFile(config.macros.importTiddlers.src, function(src,txt) {\n var tiddlers = readTiddlersFromHTML(txt);\n var count=tiddlers?tiddlers.length:0;\n displayMessage(config.macros.importTiddlers.foundMsg.format([count,src]));\n config.macros.importTiddlers.inbound=tiddlers;\n window.refreshImportList(0);\n });\n break;\n case 'importSelectAll': // select all tiddler list items (i.e., not headings)\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n if (theList.options[t].value=="") continue;\n theList.options[t].selected=true;\n count++;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectNew': // select tiddlers not in current document\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value=="") continue;\n theList.options[t].selected=!store.tiddlerExists(theList.options[t].value);\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectChanges': // select tiddlers that are updated from existing tiddlers\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value==""||!store.tiddlerExists(theList.options[t].value)) continue;\n for (var i=0; i<config.macros.importTiddlers.inbound.length; i++) // find matching inbound tiddler\n { var inbound=config.macros.importTiddlers.inbound[i]; if (inbound.title==theList.options[t].value) break; }\n theList.options[t].selected=(inbound.modified-store.getTiddler(theList.options[t].value).modified>0); // updated tiddler\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectDifferences': // select tiddlers that are new or different from existing tiddlers\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value=="") continue;\n if (!store.tiddlerExists(theList.options[t].value)) { theList.options[t].selected=true; count++; continue; }\n for (var i=0; i<config.macros.importTiddlers.inbound.length; i++) // find matching inbound tiddler\n { var inbound=config.macros.importTiddlers.inbound[i]; if (inbound.title==theList.options[t].value) break; }\n theList.options[t].selected=(inbound.modified-store.getTiddler(theList.options[t].value).modified!=0); // changed tiddler\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importToggleFilter': // show/hide filter\n case 'importFilter': // apply filter\n alert("coming soon!");\n break;\n case 'importStart': // initiate the import processing\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.index=0;\n config.macros.importTiddlers.index=importTiddlers(0);\n importStopped();\n break;\n case 'importClose': // unload imported tiddlers or hide the import control panel\n // if imported tiddlers not loaded, close the import control panel\n if (!config.macros.importTiddlers.inbound) { thePanel.style.display='none'; break; }\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.inbound=null; // clear the imported tiddler buffer\n refreshImportList(); // reset/resize the listbox\n break;\n case 'importSkip': // don't import the tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n theImported.status='skipped after asking'; // mark item as skipped\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index+1); // resume with NEXT item\n importStopped();\n break;\n case 'importRename': // change name of imported tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n theImported.status = 'renamed from '+theImported.title; // mark item as renamed\n theImported.set(theNewTitle.value,null,null,null,null); // change the tiddler title\n theItem.value = theNewTitle.value; // change the listbox item text\n theItem.text = theNewTitle.value; // change the listbox item text\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with THIS item\n importStopped();\n break;\n case 'importMerge': // join existing and imported tiddler content\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(theItem.value);\n var theText = theExisting.text+'\sn----\sn^^merged from: ';\n theText +='[['+config.macros.importTiddlers.src+'#'+theItem.value+'|'+config.macros.importTiddlers.src+'#'+theItem.value+']]^^\sn';\n theText +='^^'+theImported.modified.toLocaleString()+' by '+theImported.modifier+'^^\sn'+theImported.text;\n var theDate = new Date();\n var theTags = theExisting.getTags()+' '+theImported.getTags();\n theImported.set(null,theText,null,theDate,theTags);\n theImported.status = 'merged with '+theExisting.title; // mark item as merged\n theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");\n theImported.status += ' by '+theExisting.modifier;\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with this item\n importStopped();\n break;\n case 'importReplace': // substitute imported tiddler for existing tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(theItem.value);\n theImported.status = 'replaces '+theExisting.title; // mark item for replace\n theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");\n theImported.status += ' by '+theExisting.modifier;\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with THIS item\n importStopped();\n break;\n case 'importListSmaller': // decrease current listbox size, minimum=5\n if (theList.options.length==1) break;\n theList.size-=(theList.size>5)?1:0;\n config.macros.importTiddlers.listsize=theList.size;\n break;\n case 'importListLarger': // increase current listbox size, maximum=number of items in list\n if (theList.options.length==1) break;\n theList.size+=(theList.size<theList.options.length)?1:0;\n config.macros.importTiddlers.listsize=theList.size;\n break;\n case 'importListMaximize': // toggle listbox size between current and maximum\n if (theList.options.length==1) break;\n theList.size=(theList.size==theList.options.length)?config.macros.importTiddlers.listsize:theList.options.length;\n break;\n }\n}\n//}}}\n\n// // refresh listbox\n//{{{\nfunction refreshImportList(selectedIndex)\n{\n var theList = document.getElementById("importList");\n if (!theList) return;\n // if nothing to show, reset list content and size\n if (!config.macros.importTiddlers.inbound) \n {\n while (theList.length > 0) { theList.options[0] = null; }\n theList.options[0]=new Option('please open a document...',"",false,false);\n theList.size=config.macros.importTiddlers.listsize;\n return;\n }\n // get the sort order\n if (!selectedIndex) selectedIndex=0;\n if (selectedIndex==0) config.macros.importTiddlers.sort='title'; // heading\n if (selectedIndex==1) config.macros.importTiddlers.sort='title';\n if (selectedIndex==2) config.macros.importTiddlers.sort='modified';\n if (selectedIndex==3) config.macros.importTiddlers.sort='tags';\n if (selectedIndex>3) {\n // display selected tiddler count\n for (var t=0,count=0; t < theList.options.length; t++) count+=(theList.options[t].selected&&theList.options[t].value!="")?1:0;\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n return; // no refresh needed\n }\n\n // get the alphasorted list of tiddlers (optionally, filter out unchanged tiddlers)\n var tiddlers=config.macros.importTiddlers.inbound;\n tiddlers.sort(function (a,b) {if(a['title'] == b['title']) return(0); else return (a['title'] < b['title']) ? -1 : +1; });\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n // add heading and control items to list\n var i=0;\n var indent=String.fromCharCode(160)+String.fromCharCode(160);\n theList.options[i++]=new Option(tiddlers.length+' tiddler'+((tiddlers.length!=1)?'s are':' is')+' in the document',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="title" )?">":indent)+' [by title]',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="modified")?">":indent)+' [by date]',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="tags")?">":indent)+' [by tags]',"",false,false);\n // output the tiddler list\n switch(config.macros.importTiddlers.sort)\n {\n case "title":\n for(var t = 0; t < tiddlers.length; t++)\n theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);\n break;\n case "modified":\n // sort descending for newest date first\n tiddlers.sort(function (a,b) {if(a['modified'] == b['modified']) return(0); else return (a['modified'] > b['modified']) ? -1 : +1; });\n var lastSection = "";\n for(var t = 0; t < tiddlers.length; t++) {\n var tiddler = tiddlers[t];\n var theSection = tiddler.modified.toLocaleDateString();\n if (theSection != lastSection) {\n theList.options[i++] = new Option(theSection,"",false,false);\n lastSection = theSection;\n }\n theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);\n }\n break;\n case "tags":\n var theTitles = {}; // all tiddler titles, hash indexed by tag value\n var theTags = new Array();\n for(var t=0; t<tiddlers.length; t++) {\n var title=tiddlers[t].title;\n var tags=tiddlers[t].tags;\n if (!tags || !tags.length) {\n if (theTitles["untagged"]==undefined) { theTags.push("untagged"); theTitles["untagged"]=new Array(); }\n theTitles["untagged"].push(title);\n }\n else for(var s=0; s<tags.length; s++) {\n if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }\n theTitles[tags[s]].push(title);\n }\n }\n theTags.sort();\n for(var tagindex=0; tagindex<theTags.length; tagindex++) {\n var theTag=theTags[tagindex];\n theList.options[i++]=new Option(theTag,"",false,false);\n for(var t=0; t<theTitles[theTag].length; t++)\n theList.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);\n }\n break;\n }\n theList.selectedIndex=selectedIndex; // select current control item\n if (theList.size<config.macros.importTiddlers.listsize) theList.size=config.macros.importTiddlers.listsize;\n if (theList.size>theList.options.length) theList.size=theList.options.length;\n}\n//}}}\n\n// // re-entrant processing for handling import with interactive collision prompting\n//{{{\nfunction importTiddlers(startIndex)\n{\n if (!config.macros.importTiddlers.inbound) return -1;\n\n var theList = document.getElementById('importList');\n if (!theList) return;\n var t;\n // if starting new import, reset import status flags\n if (startIndex==0)\n for (var t=0;t<config.macros.importTiddlers.inbound.length;t++)\n config.macros.importTiddlers.inbound[t].status="";\n for (var i=startIndex; i<theList.options.length; i++)\n {\n // if list item is not selected or is a heading (i.e., has no value), skip it\n if ((!theList.options[i].selected) || ((t=theList.options[i].value)==""))\n continue;\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==t) break;\n var inbound = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(inbound.title);\n // avoid redundant import for tiddlers that are listed multiple times (when 'by tags')\n if (inbound.status=="added")\n continue;\n // don't import the "ImportedTiddlers" history from the other document...\n if (inbound.title=='ImportedTiddlers')\n continue;\n // if tiddler exists and import not marked for replace or merge, stop importing\n if (theExisting && (inbound.status.substr(0,7)!="replace") && (inbound.status.substr(0,5)!="merge"))\n return i;\n // assemble tags (remote + existing + added)\n var newTags = "";\n if (config.macros.importTiddlers.importTags)\n newTags+=inbound.getTags() // import remote tags\n if (config.macros.importTiddlers.keepTags && theExisting)\n newTags+=" "+theExisting.getTags(); // keep existing tags\n if (config.macros.importTiddlers.addTags && config.macros.importTiddlers.newTags.trim().length)\n newTags+=" "+config.macros.importTiddlers.newTags; // add new tags\n inbound.set(null,null,null,null,newTags.trim());\n // set the status to 'added' (if not already set by the 'ask the user' UI)\n inbound.status=(inbound.status=="")?'added':inbound.status;\n // do the import!\n // OLD: store.addTiddler(in); store.setDirty(true);\n store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, inbound.tags);\n store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value\n }\n return(-1); // signals that we really finished the entire list\n}\n//}}}\n\n//{{{\nfunction importStopped()\n{\n var theList = document.getElementById('importList');\n var theNewTitle = document.getElementById('importNewTitle');\n if (!theList) return;\n if (config.macros.importTiddlers.index==-1)\n importReport(); // import finished... generate the report\n else\n {\n // DEBUG alert('import stopped at: '+config.macros.importTiddlers.index);\n // import collision... show the collision panel and set the title edit field\n document.getElementById('importCollisionPanel').style.display='block';\n theNewTitle.value=theList.options[config.macros.importTiddlers.index].value;\n }\n}\n//}}}\n\n// // ''REPORT GENERATOR''\n//{{{\nfunction importReport(quiet)\n{\n if (!config.macros.importTiddlers.inbound) return;\n // DEBUG alert('importReport: start');\n\n // if import was not completed, the collision panel will still be open... close it now.\n var panel=document.getElementById('importCollisionPanel'); if (panel) panel.style.display='none';\n\n // get the alphasorted list of tiddlers\n var tiddlers = config.macros.importTiddlers.inbound;\n // gather the statistics\n var count=0;\n for (var t=0; t<tiddlers.length; t++)\n if (tiddlers[t].status && tiddlers[t].status.trim().length && tiddlers[t].status.substr(0,7)!="skipped") count++;\n\n // generate a report\n if (count && config.options.chkImportReport) {\n // get/create the report tiddler\n var theReport = store.getTiddler('ImportedTiddlers');\n if (!theReport) { theReport= new Tiddler(); theReport.title = 'ImportedTiddlers'; theReport.text = ""; }\n // format the report content\n var now = new Date();\n var newText = "On "+now.toLocaleString()+", "+config.options.txtUserName\n newText +=" imported "+count+" tiddler"+(count==1?"":"s")+" from\sn[["+config.macros.importTiddlers.src+"|"+config.macros.importTiddlers.src+"]]:\sn";\n if (config.macros.importTiddlers.addTags && config.macros.importTiddlers.newTags.trim().length)\n newText += "imported tiddlers were tagged with: \s""+config.macros.importTiddlers.newTags+"\s"\sn";\n newText += "<<<\sn";\n for (var t=0; t<tiddlers.length; t++) if (tiddlers[t].status) newText += "#[["+tiddlers[t].title+"]] - "+tiddlers[t].status+"\sn";\n newText += "<<<\sn";\n newText += "<html><input type=\s"button\s" href=\s"javascript:;\s" ";\n newText += "onclick=\s"story.closeTiddler('"+theReport.title+"'); store.deleteTiddler('"+theReport.title+"');\s" ";\n newText += "value=\s"discard report\s"></html>";\n // update the ImportedTiddlers content and show the tiddler\n theReport.text = newText+((theReport.text!="")?'\sn----\sn':"")+theReport.text;\n theReport.modifier = config.options.txtUserName;\n theReport.modified = new Date();\n // OLD: store.addTiddler(theReport);\n store.saveTiddler(theReport.title, theReport.title, theReport.text, theReport.modifier, theReport.modified, theReport.tags);\n if (!quiet) { story.displayTiddler(null,theReport.title,1,null,null,false); story.refreshTiddler(theReport.title,1,true); }\n }\n\n // reset status flags\n for (var t=0; t<config.macros.importTiddlers.inbound.length; t++) config.macros.importTiddlers.inbound[t].status="";\n\n // refresh display if tiddlers have been loaded\n if (count) { store.setDirty(true); store.notifyAll(); }\n\n // always show final message when tiddlers were actually loaded\n if (count) displayMessage(config.macros.importTiddlers.importedMsg.format([count,tiddlers.length,config.macros.importTiddlers.src]));\n}\n//}}}\n\n/***\n!!!!!TW 2.1beta Core Code Candidate\n//The following section is a preliminary 'code candidate' for incorporation of non-interactive 'load tiddlers' functionality into TW2.1beta. //\n***/\n//{{{\n// default cookie/option values\nif (!config.options.chkImportReport) config.options.chkImportReport=true;\n\nconfig.macros.loadTiddlers = {\n label: "",\n prompt: "add/update tiddlers from '%0'",\n askMsg: "Please enter a local path/filename or a remote URL",\n openMsg: "Opening %0",\n openErrMsg: "Could not open %0 - error=%1",\n readMsg: "Read %0 bytes from %1",\n foundMsg: "Found %0 tiddlers in %1",\n nochangeMsg: "'%0' is up-to-date... skipped.",\n loadedMsg: "Loaded %0 of %1 tiddlers from %2"\n};\n\nconfig.macros.loadTiddlers.handler = function(place,macroName,params) {\n var label=(params[0] && params[0].substr(0,6)=='label:')?params.shift().substr(6):this.label;\n var prompt=(params[0] && params[0].substr(0,7)=='prompt:')?params.shift().substr(7):this.prompt;\n var filter="updates";\n if (params[0] && (params[0]=='all' || params[0]=='new' || params[0]=='changes' || params[0]=='updates'\n || params[0].substr(0,8)=='tiddler:' || params[0].substr(0,4)=='tag:'))\n filter=params.shift();\n var src=params.shift(); if (!src || !src.length) return; // filename is required\n var quiet=(params[0]=="quiet"); if (quiet) params.shift();\n var ask=(params[0]=="confirm"); if (ask) params.shift();\n var force=(params[0]=="force"); if (force) params.shift();\n if (label.trim().length) {\n // link triggers load tiddlers from another file/URL and then applies filtering rules to add/replace tiddlers in the store\n createTiddlyButton(place,label.format([src]),prompt.format([src]), function() {\n if (src=="ask") src=prompt(config.macros.loadTiddlers.askMsg);\n loadRemoteFile(src,loadTiddlers,quiet,ask,filter,force);\n })\n }\n else {\n // load tiddlers from another file/URL and then apply filtering rules to add/replace tiddlers in the store\n if (src=="ask") src=prompt(config.macros.loadTiddlers.askMsg);\n loadRemoteFile(src,loadTiddlers,quiet,ask,filter,force);\n }\n}\n\nfunction loadTiddlers(src,html,quiet,ask,filter,force)\n{\n var tiddlers = readTiddlersFromHTML(html);\n var count=tiddlers?tiddlers.length:0;\n if (!quiet) displayMessage(config.macros.loadTiddlers.foundMsg.format([count,src]));\n var count=0;\n if (tiddlers) for (var t=0;t<tiddlers.length;t++) {\n var inbound = tiddlers[t];\n var theExisting = store.getTiddler(inbound.title);\n if (inbound.title=='ImportedTiddlers')\n continue; // skip "ImportedTiddlers" history from the other document...\n\n // apply the all/new/changes/updates filter (if any)\n if (filter && filter!="all") {\n if ((filter=="new") && theExisting) // skip existing tiddlers\n continue;\n if ((filter=="changes") && !theExisting) // skip new tiddlers\n continue;\n if ((filter.substr(0,4)=="tag:") && inbound.tags.find(filter.substr(4))==null) // must match specific tag value\n continue;\n if ((filter.substr(0,8)=="tiddler:") && inbound.title!=filter.substr(8)) // must match specific tiddler name\n continue;\n if (!force && store.tiddlerExists(inbound.title) && ((theExisting.modified.getTime()-inbound.modified.getTime())>=0))\n { if (!quiet) displayMessage(config.macros.loadTiddlers.nochangeMsg.format([inbound.title])); continue; }\n }\n // get confirmation if required\n if (ask && !confirm((theExisting?"Update":"Add")+" tiddler '"+inbound.title+"'\snfrom "+src))\n { tiddlers[t].status="skipped - cancelled by user"; continue; }\n // DO IT!\n // OLD: store.addTiddler(in);\n store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, inbound.tags);\n store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value\n tiddlers[t].status=theExisting?"updated":"added"\n count++;\n }\n if (count) {\n // refresh display\n store.setDirty(true);\n store.notifyAll();\n // generate a report\n if (config.options.chkImportReport) {\n // get/create the report tiddler\n var theReport = store.getTiddler('ImportedTiddlers');\n if (!theReport) { theReport= new Tiddler(); theReport.title = 'ImportedTiddlers'; theReport.text = ""; }\n // format the report content\n var now = new Date();\n var newText = "On "+now.toLocaleString()+", "+config.options.txtUserName+" loaded "+count+" tiddlers from\sn[["+src+"|"+src+"]]:\sn";\n newText += "<<<\sn";\n for (var t=0; t<tiddlers.length; t++) if (tiddlers[t].status) newText += "#[["+tiddlers[t].title+"]] - "+tiddlers[t].status+"\sn";\n newText += "<<<\sn";\n newText += "<html><input type=\s"button\s" href=\s"javascript:;\s" ";\n newText += "onclick=\s"story.closeTiddler('"+theReport.title+"'); store.deleteTiddler('"+theReport.title+"');\s" ";\n newText += "value=\s"discard report\s"></html>";\n // update the ImportedTiddlers content and show the tiddler\n theReport.text = newText+((theReport.text!="")?'\sn----\sn':"")+theReport.text;\n theReport.modifier = config.options.txtUserName;\n theReport.modified = new Date();\n // OLD: store.addTiddler(theReport);\n store.saveTiddler(theReport.title, theReport.title, theReport.text, theReport.modifier, theReport.modified, theReport.tags);\n if (!quiet) { story.displayTiddler(null,theReport.title,1,null,null,false); story.refreshTiddler(theReport.title,1,true); }\n }\n }\n // always show final message when tiddlers were actually loaded\n if (!quiet||count) displayMessage(config.macros.loadTiddlers.loadedMsg.format([count,tiddlers.length,src]));\n}\n\nfunction loadRemoteFile(src,callback,quiet,ask,filter,force) {\n if (src==undefined || !src.length) return null; // filename is required\n if (!quiet) clearMessage();\n if (!quiet) displayMessage(config.macros.loadTiddlers.openMsg.format([src]));\n if (src.substr(0,4)!="http" && src.substr(0,4)!="file") { // if not a URL, fallback to read from local filesystem\n var txt=loadFile(src);\n if ((txt==null)||(txt==false)) // file didn't load\n { if (!quiet) displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,"(unknown)"])); }\n else {\n if (!quiet) displayMessage(config.macros.loadTiddlers.readMsg.format([txt.length,src]));\n if (callback) callback(src,convertUTF8ToUnicode(txt),quiet,ask,filter,force);\n }\n }\n else {\n var x; // get an request object\n try {x = new XMLHttpRequest()} // moz\n catch(e) {\n try {x = new ActiveXObject("Msxml2.XMLHTTP")} // IE 6\n catch (e) {\n try {x = new ActiveXObject("Microsoft.XMLHTTP")} // IE 5\n catch (e) { return }\n }\n }\n // setup callback function to handle server response(s)\n x.onreadystatechange = function() {\n if (x.readyState == 4) {\n if (x.status==0 || x.status == 200) {\n if (!quiet) displayMessage(config.macros.loadTiddlers.readMsg.format([x.responseText.length,src]));\n if (callback) callback(src,x.responseText,quiet,ask,filter,force);\n }\n else {\n if (!quiet) displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,x.status]));\n }\n }\n }\n // get privileges to read another document's DOM via http:// or file:// (moz-only)\n if (typeof(netscape)!="undefined") {\n try { netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); }\n catch (e) { if (!quiet) displayMessage(e.description?e.description:e.toString()); }\n }\n // send the HTTP request\n try {\n var url=src+(src.indexOf('?')<0?'?':'&')+'nocache='+Math.random();\n x.open("GET",src,true);\n if (x.overrideMimeType) x.overrideMimeType('text/html');\n x.send(null);\n }\n catch (e) {\n if (!quiet) {\n displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,"(unknown)"]));\n displayMessage(e.description?e.description:e.toString());\n }\n }\n }\n}\n\nfunction readTiddlersFromHTML(html)\n{\n // extract store area from html \n var start=html.indexOf('<div id="storeArea">');\n var end=html.indexOf('</body>',start);\n var sa="<html><body>"+html.substring(start,end)+"</body></html>";\n\n // load html into iframe document\n var f=document.getElementById("loaderFrame"); if (f) document.body.removeChild(f);\n f=document.createElement("iframe"); f.id="loaderFrame";\n f.style.width="0px"; f.style.height="0px"; f.style.border="0px";\n document.body.appendChild(f);\n var d=f.document;\n if (f.contentDocument) d=f.contentDocument; // For NS6\n else if (f.contentWindow) d=f.contentWindow.document; // For IE5.5 and IE6\n d.open(); d.writeln(sa); d.close();\n\n // read tiddler DIVs from storeArea DOM element \n var sa = d.getElementById("storeArea");\n if (!sa) return null;\n sa.normalize();\n var nodes = sa.childNodes;\n if (!nodes || !nodes.length) return null;\n var tiddlers = [];\n for(var t = 0; t < nodes.length; t++) {\n var title = null;\n if(nodes[t].getAttribute)\n title = nodes[t].getAttribute("tiddler");\n if(!title && nodes[t].id && (nodes[t].id.substr(0,5) == "store"))\n title = nodes[t].id.substr(5);\n if(title && title != "")\n tiddlers.push((new Tiddler()).loadFromDiv(nodes[t],title));\n }\n return tiddlers;\n}\n//}}}
On Saturday, September 16, 2006 12:38:35 PM, Russ Herman imported 1 tiddler from\n[[http://www.tiddlytools.com|http://www.tiddlytools.com]]:\n<<<\n#[[ColorChart]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Saturday, September 16, 2006 12:36:25 PM, Russ Herman imported 3 tiddlers from\n[[http://www.tiddlytools.com|http://www.tiddlytools.com]]:\n<<<\n#[[BreadcrumbsPlugin]] - added\n#[[DisplayAllTiddlers]] - added\n#[[TableOfContentsPlugin]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Wednesday, September 13, 2006 7:34:13 AM, Russ Herman imported 3 tiddlers from\n[[http://people.uncw.edu/hermanr/wikilist.htm|http://people.uncw.edu/hermanr/wikilist.htm]]:\n<<<\n#[[NestedSlidersPlugin]] - added\n#[[SliderFrame]] - added\n#[[TiddlerWithParamsPlugin]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 11:32:26 AM, Russ Herman imported 1 tiddler from\n[[http://mptw.tiddlyspot.com|http://mptw.tiddlyspot.com]]:\n<<<\n#[[HorizontalMainMenuStyles]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 10:54:28 AM, Russ Herman imported 1 tiddler from\n[[http://www.tiddlytools.com|http://www.tiddlytools.com]]:\n<<<\n#[[InlineJavascriptPlugin]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 7:12:13 AM, Russ Herman imported 1 tiddler from\n[[http://www.tiddlytools.com/|http://www.tiddlytools.com/]]:\n<<<\n#[[MiniBrowser]] - replaces MiniBrowser - 9/10/2006 07:11:33 by Russ Herman\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 7:01:59 AM, Russ Herman imported 3 tiddlers from\n[[http://www.tiddlytools.com/|http://www.tiddlytools.com/]]:\n<<<\n#[[CalendarPlugin]] - added\n#[[CollapseTiddlersPlugin]] - added\n#[[MiniBrowser]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 5:44:30 AM, Russ Herman imported 5 tiddlers from\n[[http://knighjm.googlepages.com/knightnet-default-tw.html|http://knighjm.googlepages.com/knightnet-default-tw.html]]:\n<<<\n#[[Internal Macros]] - added\n#[[Tiddler JavaScript Reference]] - added\n#[[TiddlerListMacro]] - added\n#[[TiddlerListMacroExtendedInfo]] - added\n#[[TiddlyWiki Markup]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 5:25:56 AM, Russ Herman imported 1 tiddler from\n[[http://www.tiddlywiki.com/|http://www.tiddlywiki.com/]]:\n<<<\n#[[InlineHTML]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 5:24:24 AM, Russ Herman imported 7 tiddlers from\n[[http://www.tiddlywiki.com/|http://www.tiddlywiki.com/]]:\n<<<\n#[[BlockQuotes]] - added\n#[[EmbeddedImages]] - added\n#[[ExtendedFormatting]] - added\n#[[HtmlEntities]] - added\n#[[InstallingPlugins]] - added\n#[[PluginDirectory]] - added\n#[[SubHeadings]] - added\n#[[WikiWord]] - skipped after asking\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>
Eric Shulman has developed a variety of tools/plugins at http://www.tiddlytools.com/. One of these is a tool to import tiddlers from other sites. The steps for using this plugin are embedded in the plugin:\n\n<<<\ncopy/paste the following tiddlers into your document:\n''ImportTiddlersPlugin'' (tagged with <<tag systemConfig>>)\n\ncreate/edit ''SideBarOptions'': (sidebar menu items) \n^^Add "< < ImportTiddlers > >" macro^^\n\n''Quick Installation Tip #1:''\nIf you are using an unmodified version of TiddlyWiki (core release version <<version>>), you can get a new, empty TiddlyWiki with the Import Tiddlers plugin pre-installed (''[[download from here|TW+ImportExport.html]]''), and then simply import all your content from your old document into this new, empty document.\n<<<\n\n* Note: You need to save changes and reload for this plugin to take effect.\n\nThen place the following code into your TiddlyWiki, such as a blank Tiddler:\n{{{\n<<importTiddlers inline>>\n}}}\n\nYou will get the following:\n\n<<importTiddlers inline>>\n\nInstructions for using this tool can be found in the plugin ImportTiddlersPlugin. Having successfully imported tiddlers a report is generated in ImportedTiddlers.
TiddlyWiki lets you write ordinary HTML by enclosing it in {{{<html>}}} and {{{</html>}}}:\n\n<html>\n<a href="javascript:;" onclick="onClickTiddlerLink(event);" tiddlyLink="TiddlyWiki" style="background-color: yellow;">Link to wikiwords from HTML</a>\n</html>\n\nThe source for the above is:\n\n{{{\n<html>\n<div style="background-color: yellow;">\n<a href="javascript:;" onclick="onClickTiddlerLink(event);" tiddlyLink="Macros">Link to wikiwords from HTML</a>\n</div>\n</html>\n}}}\n\nHTML can enable some exotic new features (like [[embedding GMail and Outlook|http://groups.google.com/group/TiddlyWiki/browse_thread/thread/d363303aff5868d0/056269d8409d121f?lnk=st&q=embedding+gmail&rnum=1#056269d8409d121f]] in a TiddlyWiki). But, care needs to be taken with including things like JavaScript code. For example, this Flickr badge doesn't work in any of the browsers I've tried:\n\n<html>\n<!-- Start of Flickr Badge -->\n<style type="text/css">\n#flickr_badge_source_txt {padding:0; font: 11px Arial, Helvetica, Sans serif; color:#666666;}\n#flickr_badge_icon {display:block !important; margin:0 !important; border: 1px solid rgb(0, 0, 0) !important;}\n#flickr_icon_td {padding:0 5px 0 0 !important;}\n.flickr_badge_image {text-align:center !important;}\n.flickr_badge_image img {border: 1px solid black !important;}\n#flickr_www {display:block; padding:0 10px 0 10px !important; font: 11px Arial, Helvetica, Sans serif !important; color:#3993ff !important;}\n#flickr_badge_uber_wrapper a:hover,\n#flickr_badge_uber_wrapper a:link,\n#flickr_badge_uber_wrapper a:active,\n#flickr_badge_uber_wrapper a:visited {text-decoration:none !important; background:inherit !important;color:#3993ff;}\n#flickr_badge_wrapper {}\n#flickr_badge_source {padding:0 !important; font: 11px Arial, Helvetica, Sans serif !important; color:#666666 !important;}\n</style>\n<table id="flickr_badge_uber_wrapper" cellpadding="0" cellspacing="10" border="0"><tr><td><a href="http://www.flickr.com" id="flickr_www">www.<strong style="color:#3993ff">flick<span style="color:#ff1c92">r</span></strong>.com</a><table cellpadding="0" cellspacing="10" border="0" id="flickr_badge_wrapper">\n<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=5&display=latest&size=t&layout=v&source=user&user=35468148136%40N01"></script>\n</table>\n</td></tr></table>\n<!-- End of Flickr Badge -->\n</html>
/***\n''InlineJavascriptPlugin for ~TiddlyWiki version 1.2.x and 2.0''\n^^author: Eric Shulman - ELS Design Studios\nsource: http://www.TiddlyTools.com/#InlineJavascriptPlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nInsert Javascript executable code directly into your tiddler content. Lets you ''call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.\n!!!!!Usage\n<<<\nWhen installed, this plugin adds new wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be treated as embedded javascript and executed each time the tiddler is rendered.\n\n''Deferred execution from an 'onClick' link''\nBy including a label="..." parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered.\n\n''External script source files:''\nYou can also load javascript from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}). This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins. The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.\n\n''Display script source in tiddler output''\nBy including the keyword parameter "show", in the initial {{{<script>}}} marker, the plugin will include the script source code in the output that it displays in the tiddler.\n\n''Defining javascript functions and libraries:''\nAlthough the external javascript file is loaded while the tiddler content is being rendered, any functions it defines will not be available for use until //after// the rendering has been completed. Thus, you cannot load a library and //immediately// use it's functions within the same tiddler. However, once that tiddler has been loaded, the library functions can be freely used in any tiddler (even the one in which it was initially loaded).\n\nTo ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that will be rendered as soon as your TiddlyWiki document is opened. For example, you could put your {{{<script src="..."></script>}}} syntax into a tiddler called LoadScripts, and then add {{{<<tiddler LoadScripts>>}}} in your MainMenu tiddler.\n\nSince the MainMenu is always rendered immediately upon opening your document, the library will always be loaded before any other tiddlers that rely upon the functions it defines. Loading an external javascript library does not produce any direct output in the tiddler, so these definitions should have no impact on the appearance of your MainMenu.\n\n''Creating dynamic tiddler content''\nAn important difference between this implementation of embedded scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document:\n* In a typical web document, you use the document.write() function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.\n* However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and completely replaces the entire ~TiddlyWiki document in your browser window.\n* To allow these scripts to work unmodified, the plugin automatically converts all occurences of document.write() so that the output is inserted into the tiddler content instead of replacing the entire ~TiddlyWiki document.\n\nIf your script does not use document.write() to create dynamically embedded content within a tiddler, your javascript can, as an alternative, explicitly return a text value that the plugin can then pass through the wikify() rendering engine to insert into the tiddler display. For example, using {{{return "thistext"}}} will produce the same output as {{{document.write("thistext")}}}.\n\n//Note: your script code is automatically 'wrapped' inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler. To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.//\n\n''Accessing the ~TiddlyWiki DOM''\nThe plugin provides one pre-defined variable, 'place', that is passed in to your javascript code so that it can have direct access to the containing DOM element into which the tiddler output is currently being rendered.\n\nAccess to this DOM element allows you to create scripts that can:\n* vary their actions based upon the specific location in which they are embedded\n* access 'tiddler-relative' information (use findContainingTiddler(place))\n* perform direct DOM manipulations (when returning wikified text is not enough)\n<<<\n!!!!!Examples\n<<<\nan "alert" message box:\n><script show>\n alert('InlineJavascriptPlugin: this is a demonstration message');\n</script>\ndynamic output:\n><script show>\n return (new Date()).toString();\n</script>\nwikified dynamic output:\n><script show>\n return "link to current user: [["+config.options.txtUserName+"]]";\n</script>\ndynamic output using 'place' to get size information for current tiddler:\n><script show>\n if (!window.story) window.story=window;\n var title=story.findContainingTiddler(place).id.substr(7);\n return title+" is using "+store.getTiddlerText(title).length+" bytes";\n</script>\ncreating an 'onclick' button/link that runs a script:\n><script label="click here" show>\n if (!window.story) window.story=window;\n alert("Hello World!\snlinktext='"+place.firstChild.data+"'\sntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");\n</script>\nloading a script from a source url:\n>http://www.TiddlyTools.com/demo.js contains:\n>>{{{function demo() { alert('this output is from demo(), defined in demo.js') } }}}\n>>{{{alert('InlineJavascriptPlugin: demo.js has been loaded'); }}}\n><script src="demo.js" show>\n return "loading demo.js..."\n</script>\n><script label="click to execute demo() function" show>\n demo()\n</script>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''InlineJavascriptPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.06.01 [1.5.1]'' when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly\n''2006.04.19 [1.5.0]'' added 'show' parameter to force display of javascript source code in tiddler output\n''2006.01.05 [1.4.0]'' added support 'onclick' scripts. When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked. 'place' value is set to match the clicked button/link element.\n''2005.12.13 [1.3.1]'' when catching eval error in IE, e.description contains the error text, instead of e.toString(). Fixed error reporting so IE shows the correct response text. Based on a suggestion by UdoBorkowski\n''2005.11.09 [1.3.0]'' for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content. Based on a suggestion by BradleyMeck\n''2005.11.08 [1.2.0]'' handle loading of javascript from an external URL via src="..." syntax\n''2005.11.08 [1.1.0]'' pass 'place' param into scripts to provide direct DOM access \n''2005.11.08 [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//{{{\nversion.extensions.inlineJavascript= {major: 1, minor: 5, revision: 1, date: new Date(2006,6,1)};\n\nconfig.formatters.push( {\n name: "inlineJavascript",\n match: "\s\s<script",\n lookahead: "\s\s<script(?: src=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?(?: label=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?( show)?\s\s>((?:.|\s\sn)*?)\s\s</script\s\s>",\n\n 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) {\n if (lookaheadMatch[1]) { // load a script library\n // make script tag, set src, add to body to execute, then remove for cleanup\n var script = document.createElement("script"); script.src = lookaheadMatch[1];\n document.body.appendChild(script); document.body.removeChild(script);\n }\n if (lookaheadMatch[4]) { // there is script code\n if (lookaheadMatch[3]) // show inline script code in tiddler output\n wikify("{{{\sn"+lookaheadMatch[0]+"\sn}}}\sn",w.output);\n if (lookaheadMatch[2]) { // create a link to an 'onclick' script\n // add a link, define click handler, save code in link (pass 'place'), set link attributes\n var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",lookaheadMatch[2]);\n link.onclick=function(){try{return(eval(this.code))}catch(e){alert(e.description?e.description:e.toString())}}\n link.code="function _out(place){"+lookaheadMatch[4]+"};_out(this);"\n link.setAttribute("href","javascript:;"); link.setAttribute("title",""); link.style.cursor="pointer";\n }\n else { // run inline script code\n var code="function _out(place){"+lookaheadMatch[4]+"};_out(w.output);"\n code=code.replace(/document.write\s(/gi,'place.innerHTML+=(');\n try { var out = eval(code); } catch(e) { out = e.description?e.description:e.toString(); }\n if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);\n }\n }\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n} )\n//}}}\n
[[Plugins]] are just tiddlers containing JavaScript code that is tagged with <<tag systemConfig>> (see [[TiddlyWiki/Dev]] for information on writing your own plugins). TiddlyWiki executes any [[Plugins]] as it loads; they can add [[Macros]] or otherwise extend and enhance the base code.\n\nThe recommended way to install a plugin into your own copy of TiddlyWiki is to take it direct from the plugin author's site (see [[Plugins]] for a list of some of the main ones):\n# If you haven't already done so, follow the instructions in DownloadSoftware to make your own local copy of TiddlyWiki\n# Let's assume that you wish to download EricShulman's ImportTiddlersPlugin\n# Open a new browser window and navigate to http://www.tiddlytools.com/#ImportTiddlersPlugin\n# Double click the tiddler, or click the {{{source}}} button (on other sites it will sometimes be a {{{view}}} or {{{edit}}} button)\n# The entire text of the tiddler should be selected; if not select it manually with Control-A or Command-A\n# Copy the entire text of the tiddler to the clipboard\n# Open your TiddlyWiki file in a new browser window\n# Click {{{new tiddler}}} to create a new blank tiddler\n## Paste the contents of the clipboard into it's body\n## Set the title to {{{ImportTiddlersPlugin}}}\n## Add the tag {{{systemConfig}}}\n# Click {{{done}}} on the tiddler\n# SaveChanges\n# Reload your TiddlyWiki in the browser\nThe plugin should now be available for use.
Macros let you write tiddlers containing more exotic objects than just text. See also [[TiddlyWiki Markup]]. Here are the built-in macros:\n\n|!Macro|!Description|!Syntax|\n|allTags|List all the tags used in the current TiddlyWiki file<<br>>Each entry is a button that pops up the list of tiddlers for that tag<<br>><<slider sliderID [[Internal Macros/tags]] 'Click to show example output'>>|{{{<<allTags>>}}}|\n|br|Force a line break|{{{<<br>>}}}|\n|closeAll|Displays a button to close all displayed Tiddlers<<br>><<closeAll>>|{{{<<closeAll>>}}}|\n|gradient|<<gradient [horiz|vert] #bbbbbb #eeeeee #ffffff>>Produces a horizontal or vertical background gradient fill>><<br>>There can be 2 or more colours in the format: #rrggbb (hex), or RGB(r,g,b) (CSS)<<br>>Other CSS formatting can also be added, e.g. {{{<<gradient vert #000000 #660000 #aa2222>>color:#ffffff;font-size:12pt;Darkness>>}}}|{{{<<gradient [horiz|vert] #bbbbbb #eeeeee #ffffff>>Some text here>>}}}|\n|list all|List all Tiddlers in a Tiddler|{{{<<list all>>}}}|\n|list missing|List all missing tiddlers|{{{<<list missing>>}}}|\n|list orphans|List all orphaned tiddlers|{{{<<list orphans>>}}}|\n|newJournal|Displays a button to create new date & Time stamped Tiddler (Date/time format optional)<<br>><<newJournal "DD MMM YYYY, hh:mm">> <<br>>You can also add optional tag names after the date format: <<newJournal "DD MMM YYYY, hh:mm" tag1 TagTwo>> |{{{<<newJournal [DateFormatString]>>}}} <<br>> {{{<<newJournal "DD MMM YYYY, hh:mm" tag1 TagTwo>>}}} |\n|newTiddler|Displays a button to create new Tiddler<<br>><<newTiddler>>|{{{<<newTiddler>>}}}|\n|permaview|Displays a button to change the URL link for all open Tiddlers - or the containing tiddler if used in the command bar (See the ViewTemplate)<<br>><<permaview>>|{{{<<permaview>>}}}|\n|saveChanges |Button to save all TiddlyWiki changes (or the current tiddler if used in the command bar (see EditTemplate)<<br>><<saveChanges>>|{{{<<saveChanges>>}}}|\n|search|Display a Search box<<br>><<search>>|{{{<<search>>}}}|\n|slider|Display a Slider (a collapsable display of another tiddler)<<br>>See the allTags entry for an example. Note: Put quotes around the label if needing spaces<<br>>where: ''ID''=cookie name to be used to save the state of the slider, ''Tiddler''=name of the tiddler to include in the slider, ''Label''=label text of the slider button, ''tooltip''=text of the buttons tooltip|{{{<<slider ID Tiddler [Label] [toolTip]>>}}}|\n|sparkline|Produces a sparkline graphic<<br>>e.g. <<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>>|{{{<<sparkline num1 num2 ... numN>>}}}|\n|tabs|Display Tabbed content (contents of tab provided by another tiddler)|{{{<<tabs indentifier tabLabel tabName Tiddler>>}}}|\n|tag|Display a Tag ~PopUp<<br>><<tag _Config>>|{{{<<tag tagName>>}}}|\n|tagChooser|Used in EditTemplate to add tags to the tags field. Doesn't actually add anything unless in edit mode (though it does show the list)<<br>><<tagChooser>>|{{{<<tagChooser>>}}}|\n|tagging|<<tiddler [[Internal Macros/tagging]]>>|{{{<<tagging [TiddlerTitle]>>}}}|\n|tiddler|Display contents of another tiddler inline|{{{<<tiddler Tiddler>>}}}|\n|timeline|Display a timeline list of tiddlers<<br>>where the sortfield is the sort order ("modified" or "created") and maxentries is the maximum number of entries|{{{<<timeline [sortfield] [maxentries]>>}}}|\n|today|Display Today's Date<<br>>e.g. <<today>>|{{{<<today [DateFormatString]>>}}}|\n|version|Display TiddlyWiki's version<<br>>e.g. <<version>>|{{{<<version>>}}}|\n\n!DateFormatString\nSeveral Macros including the today macro take a DateFormatString as an optional argument. This string can be a combination of ordinary text, with some special characters that get substituted by parts of the date:\n* DDD - day of week in full (eg, "Monday")\n* DD - day of month, 0DD - adds a leading zero\n* MMM - month in full (eg, "July")\n* MM - month number, 0MM - adds leading zero\n* YYYY - full year, YY - two digit year\n* hh - hours\n* mm - minutes\n* ss - seconds\n!Notes\nIf you need to supply a parameter that should be evaluated (e.g. a JavaScript variable), enclose the parameter in {{{{{}}} and {{{}}}}} rather than quotes. Note however, that the scope used in the evaluation is {{{global}}} rather than {{{local}}}. In other words, the evaluation is done ''before'' the parameter is passed to the macro/plugin so it cannot access any of the variables or functions defined within the macro/plugin.\n!Commands supported by the toolbar macro\n{{{\nconfig.commands = {\n closeTiddler: {text: "close", tooltip: "Close this tiddler"},\n closeOthers: {text: "close others", tooltip: "Close all other tiddlers"},\n editTiddler: {text: "edit", tooltip: "Edit this tiddler", readOnlyText: "view", readOnlyTooltip: "View the source of this tiddler"},\n saveTiddler: {text: "done", tooltip: "Save changes to this tiddler", readOnlyText: "done", readOnlyTooltip: "View this tiddler normally"},\n cancelTiddler: {text: "cancel", tooltip: "Undo changes to this tiddler", hideReadOnly: true},\n deleteTiddler: {text: "delete", tooltip: "Delete this tiddler", warning: "Are you sure you want to delete '%0'?", hideReadOnly: true},\n permalink: {text: "permalink", tooltip: "Permalink for this tiddler"},\n references: {text: "references", tooltip: "Show tiddlers that link to this one", popupNone: "No references"},\n jump: {text: "jump", tooltip: "Jump to another open tiddler"}\n };\n}}}\n(Julian Knight, 2006-04-06)\n<part tagging hidden>\nProduces a list (NB: <ul> ''not'' a popup) of links to tiddlers that carry the specified tag. If no tag is specified, it looks for tiddlers tagged with the name of the current tiddler.\nIn HTML, the list is formatted like so:\n{{{\n<ul>\n<li class="listTitle">List title label</li>\n<li><a class="tiddlyLink ..." href="javascript:;" onclick="..."\n refresh="link" tiddlyLink="ExampleOne">ExampleOne</a></li>\n</ul>\n}}}\n</part>\n<part tags hidden>\n<<allTags>>\n</part>
*TiddlyWiki Site by Jeremy Ruston http://www.tiddlywiki.com/ \n*TiddlyTools by Eric Schulman http://www.tiddlytools.com\n*MonkeyPirateTiddlyWiki by Simon Baird http://mptw.tiddlyspot.com/\n*Julian Knight's Site http://knighjm.googlepages.com/knightnet-default-tw.html\n*Google Groups - TiddlyWiki Forum http://groups.google.com/group/TiddlyWiki\n*Bob McElrath's jsMath plugin http://bob.mcelrath.org/tiddlyjsmath-2.0.3.html for adding mathematics formatting, based on LaTeX and needs downloads from the jsMath site http://www.math.union.edu/~dpvc/jsMath/ \n*Dr. Michael Freeze's Calculus II page http://people.uncw.edu/freezem/math162summer06/mat162summer06.html uses Peter Jipsen's ASciencePad to display mathematical content. It depends on MathML and SVG.\n
Selecting MainMenu will bring up a window in which you can enter the menu item that appear on the left side of the page. Type in some items. If you place double brackets around an item, you will cause the items to be activated. If the corresponding tiddlers do not exist, then simply clicking on your entries will bring up the tiddler and you can insert your content at that time. For example, entering\n{{{\n[[item1]]\n[[item 2]]\n}}}\n\nwill produce\n\n[[item1]]\n[[item 2]]\n\nIf you type a wiki word, like WikiWord, then it will immediately be hot and you do not need the brackets.
[[About]]\n[[First Steps]]\n[[Editing Content]]\n[[Advanced]]\n[[Links]]\n-----------------------\n{{small{\n<<search>>\n<<closeAll>>\n<<permaview>>\n<<newTiddler>>\n<<saveChanges>>}}}\n-----------------------\n{{smaller{[[Site created and maintained by\n Dr. R. Herman.|http://people.uncw.edu/herman]]}}}
Microsoft Internet Explorer does not alwaysdisplay, or print, the same as Firefoxes browser. The first thing you will notice in IE is that the header is not easy to read or print. (Check it out in IE with the Print Preview.) The header is made up of two copies, one stagered from the other. You can eliminate this by doing the following: Open up the StyleSheet. Enter the following line:\n\n{{{\n.headerShadow { visibility: hidden; } \n}}}\n\nNow check reload your saved file in IE. The header should be clean.\n\nThere are other problems with IE which we will note when they come up.
<html><form target="browser_$1" style="margin:0;padding:0"\n onsubmit="this.action=this.url.value; this.form.done.disabled=false" style="margin:0;padding:0"><nobr><!--\n--><input type="button" value="<" title="back" style="font-size:8pt;width:3%"\n onclick="try{window.frames['browser_$1'].history.go(-1)}catch(e){window.history.go(-1)}" ><!--\n--><input type="button" value=">" title="forward" style="font-size:8pt;width:3%"\n onclick="try{window.frames['browser_$1'].history.go(+1)}catch(e){window.history.go(+1)}"><!--\n--><input type="button" value="+" title="refresh"style="font-size:8pt;width:3%"\n onclick="window.frames['browser_$1'].location.reload()"><!--\n--><input type="button" value="x" title="stop"style="font-size:8pt;width:3%"\n onclick="window.stop()"><!--\n--><select name="bookmarks" id="browser_bookmarks_$1" size="1" style="font-size:8pt;width:21%"\n onchange="var f=document.getElementById('browser_$1'); if (!this.value.length) return window.miniBrowserResetSize(); else window.miniBrowserSetSize(this.form); this.form.url.value=this.value; this.form.action=this.value; this.form.submit(); this.form.done.disabled=false">\n<option value="">bookmarks...</option>\n</select><!--\n--><input type="button" value="add" title="add this URL to the MiniBrowser bookmarks" style="font-size:8pt;width:5%"\n onclick="window.miniBrowserAddBookmark(this.form.url);"><!--\n--><input type="button" value="del" title="remove this URL from the MiniBrowser bookmarks" style="font-size:8pt;width:5%"\n onclick="window.miniBrowserDeleteBookmark(this.form.bookmarks);"><!--\n--><input type="button" value="edit" title="edit the MiniBrowser bookmarks list definition" style="font-size:8pt;width:5%"\n onclick="story.displayTiddler(null,'MiniBrowserList',2)"><!--\n--><input type="text" name="url" size="60" value="" style="font-size:8pt;width:35%"\n onfocus="this.select();" onkeyup="var k=event.keyCode; if (k==13|k==10) this.form.go.click();"><!--\n--><input type="button" name="go" value="go" title="view this URL" style="font-size:8pt;width:4%"\n onclick="if(!this.form.url.value.length) return; window.miniBrowserSetSize(this.form); this.form.action=this.form.url.value; this.form.submit(); this.form.done.disabled=false"><!--\n--><input type="button" value="open" title="open this URL in a separate window" style="font-size:8pt;width:6%"\n onclick="if(this.form.url.value.length) window.open(this.form.url.value)"><!--\n--><input type="button" value="done" name="done" title="stop viewing this URL" disabled style="font-size:8pt;width:6%"\n onclick="this.form.url.value=''; this.form.bookmarks.selectedIndex=0; window.miniBrowserResetSize(); this.disabled=true;">\n<iframe name="browser_$1" id="browser_$1" style="width:100%;height:1em;display:none;background:#fff;border:1px solid"></iframe><div id="browser_resize_$1" style="text-align:center;marginTop:2px;display:none;font-size:8pt"><!--\n--> size: <input type="text" name="w" size="3" value="100%" style="font-size:8pt;"\n onfocus="this.select()"><!--\n-->x<input type="text" name="h" size="3" value="400" style="font-size:8pt;"\n onfocus="this.select()"><!--\n--> <input type="button" value="set" style="font-size:8pt;"\n onclick="var w=this.form.w.value.trim(); if (!w||!w.length) w='100%'; var h=this.form.h.value.trim(); if (!h||!h.length) h='400'; if (!w.replace(/[0-9]*/,'').length) w+='px'; if (!h.replace(/[0-9]*/,'').length) h+='px'; var f=document.getElementById('browser_$1'); f.style.width=w; f.style.height=h;"><!--\n--><input type="button" value="reset" style="font-size:8pt;"\n onclick="var w='100%'; var h='400'; var f=document.getElementById('browser_$1'); f.style.width=w; f.style.height=h+'px'; this.form.w.value=w; this.form.h.value=h;"><!--\n--><input type="button" value="fit" title="resize to fit containing window" style="font-size:8pt;"\n onclick="window.miniBrowserFitSize(this)"><!--\n--></div></nobr></form></html><script>\n\n // load bookmarks droplist from HR-separated "MiniBrowserList" tiddler contents\n var here=document.getElementById("browser_bookmarks_$1");\n while (here.length) here.options[0]=null; // remove current list items\n here.options[here.length]=new Option("bookmarks...","",true,true);\n var list=store.getTiddlerText("MiniBrowserList");\n if (list && list.trim().length) {\n var parts=list.split("\sn----\sn");\n for (var p=0; p<parts.length; p++) {\n var lines=parts[p].split("\sn");\n var label=lines.shift(); // 1st line=display text\n var value=lines.shift(); // 2nd line=item value\n var indent=value&&value.length?"\sxa0\sxa0":"";\n here.options[here.length]=new Option(indent+label,value,false,false);\n }\n }\n\nwindow.miniBrowserSetSize = function(form) {\n var f=document.getElementById('browser_$1');\n var w=form.w.value.trim(); if (!w||!w.length) w='100%'; if (!w.replace(/[0-9]*/,'').length) w+='px'; \n var h=form.h.value.trim(); if (!h||!h.length) h='400'; if (!h.replace(/[0-9]*/,'').length) h+='px';\n f.style.width=w; f.style.height=h; f.style.display="block";\n document.getElementById('browser_resize_$1').style.display="block";\n return false;\n}\n\nwindow.miniBrowserResetSize = function() {\n var f=document.getElementById('browser_$1');\n if (f.src.length) f.src="";\n f.style.width='100%'; f.style.height='1em'; f.style.display="none";\n document.getElementById('browser_resize_$1').style.display="none";\n return false;\n}\nwindow.miniBrowserFitSize = function(place) {\n var trim=88; // fudge factor for controls + padding + borders. ADJUST TO FIT LAYOUT\n var t=story.findContainingTiddler(place);\n if (!t) { t=place; while (t && t.className!='floatingPanel') t=t.parentNode; } if (!t) return;\n var w="100%"; // horizontal stretching via CSS works, but vertical stretching doesn't... so:\n var h=(t.offsetHeight-trim); // workaround: get containing panel/tiddler height and subtract "trim" height\n place.form.w.value=w; place.form.h.value=h; // update width/height input fields\n var f=document.getElementById('browser_$1');\n f.style.width=w; f.style.height=h+"px";\n}\n\nwindow.miniBrowserAddBookmark = function(place) {\n var v=place.value; if (!v.length) return;\n var d=prompt("Please enter a description for\sn"+place.value); if (!d || !d.length) return;\n var t = store.getTiddler("MiniBrowserList"); t.set(null,"%0\sn%1\sn----\sn%2".format([d,v,t.text]));\n var here=story.findContainingTiddler(place);\n if (here) story.refreshTiddler(here.getAttribute("tiddler"),1,true);\n story.refreshTiddler("MiniBrowserList",1,true);\n story.refreshTiddler("MiniBrowser",1,true);\n store.setDirty(true);\n}\n\nwindow.miniBrowserDeleteBookmark = function(place) {\n var v=place.value; if (!v.length) return;\n var d=place.options[place.selectedIndex].text; if (!d.length) return;\n var t = store.getTiddler("MiniBrowserList");\n if (!confirm("Are you sure you want to remove this MiniBrowser bookmark?\sn\sn"+d+"\sn"+v)) return;\n var pat='%0\sn%1\sn----\sn'.format([d.replace(/\sxa0/g,''),v]); var re=new RegExp(pat,"i");\n t.set(null,t.text.replace(re,""));\n var here=story.findContainingTiddler(place);\n if (here) story.refreshTiddler(here.getAttribute("tiddler"),1,true);\n story.refreshTiddler("MiniBrowserList",1,true);\n story.refreshTiddler("MiniBrowser",1,true);\n store.setDirty(true);\n}\n</script><<tiddler HideTiddlerTags>>
<html><form target="browser_$1" style="margin:0;padding:0"\n onsubmit="this.action=this.url.value; this.form.done.disabled=false" style="margin:0;padding:0"><nobr><!--\n--><input type="button" value="Refresh" title="refresh"style="font-size:8pt;width:6%"\n onclick="window.frames['browser_$1'].location.reload()"><!--\n--><input type="button" value="Stop" title="stop"style="font-size:8pt;width:6%"\n onclick="window.stop()"><!--\n--><select name="bookmarks" id="browser_bookmarks_$1" size="1" style="font-size:8pt;width:0%"\n onchange="var f=document.getElementById('browser_$1'); if (!this.value.length) return window.miniBrowserResetSize(); else window.miniBrowserSetSize(this.form); this.form.url.value=this.value; this.form.action=this.value; this.form.submit(); this.form.done.disabled=false">\n</select><!--\n--><input type="text" name="url" size="60" value="" style="font-size:8pt;width:45%"\n onfocus="this.select();" onkeyup="var k=event.keyCode; if (k==13|k==10) this.form.go.click();"><!--\n---><input type="button" name="go" value="go" title="view this URL" style="font-size:8pt;width:4%"\n onclick="if(!this.form.url.value.length) return; window.miniBrowserSetSize(this.form); this.form.action=this.form.url.value; this.form.submit(); this.form.done.disabled=false"><!--\n--><input type="button" value="done" name="done" title="stop viewing this URL" disabled style="font-size:8pt;width:6%"\n onclick="this.form.url.value=''; this.form.bookmarks.selectedIndex=0; window.miniBrowserResetSize(); this.disabled=true;">\n\n<iframe name="browser_$1" id="browser_$1" style="width:100%;height:1em;display:none;background:#fff;border:1px solid"></iframe><div id="browser_resize_$1" style="text-align:center;marginTop:2px;display:none;font-size:8pt"><!--\n--> size: <input type="text" name="w" size="3" value="100%" style="font-size:8pt;"\n onfocus="this.select()"><!--\n-->x<input type="text" name="h" size="3" value="400" style="font-size:8pt;"\n onfocus="this.select()"><!--\n--> <input type="button" value="set" style="font-size:8pt;"\n onclick="var w=this.form.w.value.trim(); if (!w||!w.length) w='100%'; var h=this.form.h.value.trim(); if (!h||!h.length) h='400'; if (!w.replace(/[0-9]*/,'').length) w+='px'; if (!h.replace(/[0-9]*/,'').length) h+='px'; var f=document.getElementById('browser_$1'); f.style.width=w; f.style.height=h;"><!--\n--><input type="button" value="reset" style="font-size:8pt;"\n onclick="var w='100%'; var h='400'; var f=document.getElementById('browser_$1'); f.style.width=w; f.style.height=h+'px'; this.form.w.value=w; this.form.h.value=h;"><!--\n--><input type="button" value="fit" title="resize to fit containing window" style="font-size:8pt;"\n onclick="window.miniBrowserFitSize(this)"><!--\n--></div></nobr></form></html><script>\n\n // load bookmarks droplist from HR-separated "MiniBrowserList" tiddler contents\n var here=document.getElementById("browser_bookmarks_$1");\n while (here.length) here.options[0]=null; // remove current list items\n here.options[here.length]=new Option("bookmarks...","",false,false);\n var list=store.getTiddlerText("MiniBrowserList");\n if (list && list.trim().length) {\n var parts=list.split("\sn----\sn");\n for (var p=0; p<parts.length; p++) {\n var lines=parts[p].split("\sn");\n var label=lines.shift(); // 1st line=display text\n var value=lines.shift(); // 2nd line=item value\n var indent=value&&value.length?"\sxa0\sxa0":"";\n here.options[here.length]=new Option(indent+label,value,true,true);\n }\n }\n\nwindow.miniBrowserSetSize = function(form) {\n var f=document.getElementById('browser_$1');\n var w=form.w.value.trim(); if (!w||!w.length) w='100%'; if (!w.replace(/[0-9]*/,'').length) w+='px'; \n var h=form.h.value.trim(); if (!h||!h.length) h='400'; if (!h.replace(/[0-9]*/,'').length) h+='px';\n f.style.width=w; f.style.height=h; f.style.display="block";\n document.getElementById('browser_resize_$1').style.display="block";\n return false;\n}\n\nwindow.miniBrowserResetSize = function() {\n var f=document.getElementById('browser_$1');\n if (f.src.length) f.src="";\n f.style.width='100%'; f.style.height='1em'; f.style.display="none";\n document.getElementById('browser_resize_$1').style.display="none";\n return false;\n}\nwindow.miniBrowserFitSize = function(place) {\n var trim=88; // fudge factor for controls + padding + borders. ADJUST TO FIT LAYOUT\n var t=story.findContainingTiddler(place);\n if (!t) { t=place; while (t && t.className!='floatingPanel') t=t.parentNode; } if (!t) return;\n var w="100%"; // horizontal stretching via CSS works, but vertical stretching doesn't... so:\n var h=(t.offsetHeight-trim); // workaround: get containing panel/tiddler height and subtract "trim" height\n place.form.w.value=w; place.form.h.value=h; // update width/height input fields\n var f=document.getElementById('browser_$1');\n f.style.width=w; f.style.height=h+"px";\n}\n</script><<tiddler HideTiddlerTags>>
/***\n|''Name:''|NestedSlidersPlugin|\n|''Source:''|http://www.TiddlyTools.com/#NestedSlidersPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nQuickly make any tiddler content into an expandable 'slider' panel, without needing to create a separate tiddler to contain the slider content. Optional syntax allows ''default to open'', ''custom button label/tooltip'' and ''automatic blockquote formatting.''\n\nYou can also 'nest' these sliders as deep as you like (see complex nesting example below), so that expandable 'tree-like' hierarchical displays can be created. This is most useful when converting existing in-line text content to create in-line annotations, footnotes, context-sensitive help, or other subordinate information displays.\n\nFor more details, please click on a section headline below:\n++++!!!!![Configuration]>\nDebugging messages for 'lazy sliders' deferred rendering:\n<<option chkDebugLazySliderDefer>> show debugging alert when deferring slider rendering\n<<option chkDebugLazySliderRender>> show debugging alert when deferred slider is actually rendered\n===\n++++!!!!![Usage]>\nWhen installed, this plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content. Use {{{+++}}} and {{{===}}} to delimit the slider content. Additional optional syntax elements let you specify\n*default to open\n*cookiename\n*heading level\n*floater (with optional CSS width value)\n*mouse auto rollover\n*custom class/label/tooltip/accesskey\n*automatic blockquote\n*deferred rendering\nThe complete syntax, using all options, is:\n//{{{\n++++(cookiename)!!!!!^width^*{{class{[label=key|tooltip]}}}>...\ncontent goes here\n===\n//}}}\nwhere:\n* {{{+++}}} (or {{{++++}}}) and {{{===}}}^^\nmarks the start and end of the slider definition, respectively. When the extra {{{+}}} is used, the slider will be open when initially displayed.^^\n* {{{(cookiename)}}}^^\nsaves the slider opened/closed state, and restores this state whenever the slider is re-rendered.^^\n* {{{!}}} through {{{!!!!!}}}^^\ndisplays the slider label using a formatted headline (Hn) style instead of a button/link style^^\n* {{{^width^}}} (or just {{{^}}})^^\nmakes the slider 'float' on top of other content rather than shifting that content downward. 'width' must be a valid CSS value (e.g., "30em", "180px", "50%", etc.). If omitted, the default width is "auto" (i.e., fit to content)^^\n* {{{*}}}^^\nautomatically opens/closes slider on "rollover" as well as when clicked^^\n* {{{{{class{[label=key|tooltip]}}}}}}^^\nuses custom label/tooltip/accesskey. {{{{{class{...}}}}}}, {{{=key}}} and {{{|tooltip}}} are optional. 'class' is any valid CSS class name, used to style the slider label text. 'key' must be a ''single letter only''. Default labels/tootips are: ">" (more) and "<" (less), with no default access key assignment.^^\n* {{{">"}}} //(without the quotes)//^^\nautomatically adds blockquote formatting to slider content^^\n* {{{"..."}}} //(without the quotes)//^^\ndefers rendering of closed sliders until the first time they are opened. //Note: deferred rendering may produce unexpected results in some cases. Use with care.//^^\n\n//Note: to make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the {{{+++}}} 'start slider' or preceding the {{{===}}} 'end slider' sequence are automatically supressed so that excess whitespace is eliminated from the output.//\n===\n++++!!!!![Examples]>\nsimple in-line slider: \n{{{\n+++\n content\n===\n}}}\n+++\n content\n===\n----\nuse a custom label and tooltip: \n{{{\n+++[label|tooltip]\n content\n===\n}}}\n+++[label|tooltip]\n content\n===\n----\ncontent automatically blockquoted: \n{{{\n+++>\n content\n===\n}}}\n+++>\n content\n===\n----\nall options combined //(default open, cookie, heading, sized floater, rollover, class, label/tooltip/key, blockquoted, deferred)//\n{{{\n++++(testcookie)!!!^30em^*{{big{[label=Z|click or press Alt-Z to open]}}}>...\n content\n===\n}}}\n++++(testcookie)!!!^30em^*{{big{[label=Z|click or press Alt-Z to open]}}}>...\n content\n===\n----\ncomplex nesting example:\n{{{\n+++^[get info...=I|click for information or press Alt-I]\n put some general information here, plus a floating slider with more specific info:\n +++^10em^[view details...|click for details]\n put some detail here, which could include a rollover with a +++^25em^*[glossary definition]explaining technical terms===\n ===\n===\n}}}\n+++^[get info...=I|click for information or press Alt-I]\n put some general information here, plus a floating slider with more specific info:\n +++^10em^[view details...|click for details]\n put some detail here, which could include a rollover with a +++^25em^*[glossary definition]explaining technical terms===\n ===\n===\n===\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''NestedSlidersPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.07.28 - 2.0.0'' added custom class syntax around label/tip/key syntax: {{{{{classname{[label=key|tip]}}}}}}\n''2006.07.25 - 1.9.3'' when parsing slider, save default open/closed state in button element, then in onClickNestedSlider(), if slider state matches saved default, instead of saving cookie, delete it. Significantly reduces the 'cookie overhead' when default slider states are used.\n''2006.06.29 - 1.9.2'' in onClickNestedSlider(), when setting focus to first control, skip over type="hidden"\n''2006.06.22 - 1.9.1'' added panel.defaultPanelWidth to save requested panel width, even after resizing has changed the style value\n''2006.05.11 - 1.9.0'' added optional '^width^' syntax for floating sliders and '=key' syntax for setting an access key on a slider label\n''2006.05.09 - 1.8.0'' in onClickNestedSlider(), when showing panel, set focus to first child input/textarea/select element\n''2006.04.24 - 1.7.8'' in adjustSliderPos(), if floating panel is contained inside another floating panel, subtract offset of containing panel to find correct position\n''2006.02.16 - 1.7.7'' corrected deferred rendering to account for use-case where show/hide state is tracked in a cookie\n''2006.02.15 - 1.7.6'' in adjustSliderPos(), ensure that floating panel is positioned completely within the browser window (i.e., does not go beyond the right edge of the browser window)\n''2006.02.04 - 1.7.5'' add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals\n''2006.01.18 - 1.7.4'' only define adjustSliderPos() function if it has not already been provided by another plugin. This lets other plugins 'hijack' the function even when they are loaded first.\n''2006.01.16 - 1.7.3'' added adjustSliderPos(place,btn,panel,panelClass) function to permit specialized logic for placement of floating panels. While it provides improved placement for many uses of floating panels, it exhibits a relative offset positioning error when used within *nested* floating panels. Short-term workaround is to only adjust the position for 'top-level' floaters.\n''2006.01.16 - 1.7.2'' added button property to slider panel elements so that slider panel can tell which button it belongs to. Also, re-activated and corrected animation handling so that nested sliders aren't clipped by hijacking Slider.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends\n''2006.01.14 - 1.7.1'' added optional "^" syntax for floating panels. Defines new CSS class, ".floatingPanel", as an alternative for standard in-line ".sliderPanel" styles.\n''2006.01.14 - 1.7.0'' added optional "*" syntax for rollover handling to show/hide slider without requiring a click (Based on a suggestion by tw4efl)\n''2006.01.03 - 1.6.2'' When using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element. (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)\n''2005.12.15 - 1.6.1'' added optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders\nremoved checkbox option for 'global' application of lazy sliders\n''2005.11.25 - 1.6.0'' added optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)\n''2005.11.21 - 1.5.1'' revised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability. Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.\n''2005.11.20 - 1.5.0'' added (cookiename) syntax for optional tracking and restoring of slider open/close state\n''2005.11.11 - 1.4.0'' added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style\n''2005.11.07 - 1.3.0'' removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other\nformatting extensions) and simplified/improved regular expressions to trim multiple excess newlines\n''2005.11.05 - 1.2.1'' changed name to NestedSlidersPlugin\nmore documentation\n''2005.11.04 - 1.2.0'' added alternative character-mode syntax {{{(((}}} and {{{)))}}}\ntweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax\n''2005.11.03 - 1.1.1'' fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used\ncode cleanup, added documentation\n''2005.11.03 - 1.1.0'' changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}\nchanged name to EasySlidersPlugin\n''2005.11.03 - 1.0.0'' initial public release\n<<<\n!!!!!Credits\n<<<\nThis feature was implemented by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]] with initial research and suggestions from RodneyGomes, GeoffSlocock, and PaulPetterson.\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.nestedSliders = {major: 2, minor: 0, revision: 0, date: new Date(2006,7,28)};\n//}}}\n\n//{{{\n// options for deferred rendering of sliders that are not initially displayed\nif (config.options.chkDebugLazySliderDefer==undefined) config.options.chkDebugLazySliderDefer=false;\nif (config.options.chkDebugLazySliderRender==undefined) config.options.chkDebugLazySliderRender=false;\n\n// default styles for 'floating' class\nsetStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \s\n background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");\n//}}}\n\n//{{{\nconfig.formatters.push( {\n name: "nestedSliders",\n match: "\s\sn?\s\s+{3}",\n terminator: "\s\ss*\s\s={3}\s\sn?",\n lookahead: "\s\sn?\s\s+{3}(\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\s{\s\s{([\s\sw]+[\s\ss\s\sw]*)\s\s{)?(\s\s[[^\s\s]]*\s\s])?(?:\s\s}{3})?(\s\s>)?(\s\s.\s\s.\s\s.)?\s\ss*",\n handler: function(w)\n {\n // defopen=lookaheadMatch[1]\n // cookiename=lookaheadMatch[2]\n // header=lookaheadMatch[3]\n // panelwidth=lookaheadMatch[4]\n // rollover=lookaheadMatch[5]\n // class=lookaheadMatch[6]\n // label=lookaheadMatch[7]\n // blockquote=lookaheadMatch[8]\n // deferred=lookaheadMatch[9]\n\n 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)\n {\n // location for rendering button and panel\n var place=w.output;\n\n // default to closed, no cookie, no accesskey\n var show="none"; var title=">"; var tooltip="show"; var cookie=""; var key="";\n\n // extra "+", default to open\n if (lookaheadMatch[1])\n { show="block"; title="<"; tooltip="hide"; }\n\n // cookie, use saved open/closed state\n if (lookaheadMatch[2]) {\n cookie=lookaheadMatch[2].trim().slice(1,-1);\n cookie="chkSlider"+cookie;\n if (config.options[cookie]==undefined)\n { config.options[cookie] = (show=="block") }\n if (config.options[cookie])\n { show="block"; title="<"; tooltip="hide"; }\n else\n { show="none"; title=">"; tooltip="show"; }\n }\n\n // parse custom label/tooltip/accesskey: [label=X|tooltip]\n if (lookaheadMatch[7]) {\n title = lookaheadMatch[7].trim().slice(1,-1);\n var pos=title.indexOf("|");\n if (pos!=-1) { tooltip = title.substr(pos+1,title.length); title=title.substr(0,pos); }\n if (title.substr(title.length-2,1)=="=") { key=title.substr(title.length-1,1); title=title.slice(0,-2); }\n if (pos==-1) tooltip += " "+title; // default tooltip: "show/hide <title>"\n }\n\n // create the button\n if (lookaheadMatch[3]) { // use "Hn" header format instead of button/link\n var lvl=(lookaheadMatch[3].length>6)?6:lookaheadMatch[3].length;\n var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,lookaheadMatch[6],title);\n btn.onclick=onClickNestedSlider;\n btn.setAttribute("href","javascript:;");\n btn.setAttribute("title",tooltip);\n }\n else\n var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,lookaheadMatch[6]);\n\n // set extra button attributes\n btn.sliderCookie = cookie; // save the cookiename (if any) in the button object\n btn.defOpen=lookaheadMatch[1]!=null; // save default open/closed state (boolean)\n btn.keyparam=key; // save the access key letter ("" if none)\n if (key.length) {\n btn.setAttribute("accessKey",key); // init access key\n btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus\n }\n\n // "non-click" MouseOver open/close slider\n if (lookaheadMatch[5]) btn.onmouseover=onClickNestedSlider;\n\n // create slider panel\n var panelClass=lookaheadMatch[4]?"floatingPanel":"sliderPanel";\n var panel=createTiddlyElement(place,"div",null,panelClass,null);\n panel.button = btn; // so the slider panel know which button it belongs to\n panel.defaultPanelWidth=(lookaheadMatch[4] && lookaheadMatch[4].length>2)?lookaheadMatch[4].slice(1,-1):""; // save requested panel size\n btn.sliderPanel=panel;\n panel.style.display = show;\n panel.style.width=panel.defaultPanelWidth;\n\n // render slider (or defer until shown) \n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n if ((show=="block")||!lookaheadMatch[9]) {\n // render now if panel is supposed to be shown or NOT deferred rendering\n w.subWikify(lookaheadMatch[8]?createTiddlyElement(panel,"blockquote"):panel,this.terminator);\n // align slider/floater position with button\n adjustSliderPos(place,btn,panel,panelClass);\n }\n else {\n var src = w.source.substr(w.nextMatch);\n var endpos=findMatchingDelimiter(src,"+++","===");\n panel.setAttribute("raw",src.substr(0,endpos));\n panel.setAttribute("blockquote",lookaheadMatch[8]?"true":"false");\n panel.setAttribute("rendered","false");\n w.nextMatch += endpos+3;\n if (w.source.substr(w.nextMatch,1)=="\sn") w.nextMatch++;\n if (config.options.chkDebugLazySliderDefer) alert("deferred '"+title+"':\sn\sn"+panel.getAttribute("raw"));\n }\n }\n }\n }\n)\n\n// TBD: ignore 'quoted' delimiters (e.g., "{{{+++foo===}}}" isn't really a slider)\nfunction findMatchingDelimiter(src,starttext,endtext) {\n var startpos = 0;\n var endpos = src.indexOf(endtext);\n // check for nested delimiters\n while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {\n // count number of nested 'starts'\n var startcount=0;\n var temp = src.substring(startpos,endpos-1);\n var pos=temp.indexOf(starttext);\n while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }\n // set up to check for additional 'starts' after adjusting endpos\n startpos=endpos+endtext.length;\n // find endpos for corresponding number of matching 'ends'\n while (startcount && endpos!=-1) {\n endpos = src.indexOf(endtext,endpos+endtext.length);\n startcount--;\n }\n }\n return (endpos==-1)?src.length:endpos;\n}\n//}}}\n\n//{{{\nwindow.onClickNestedSlider=function(e)\n{\n if (!e) var e = window.event;\n var theTarget = resolveTarget(e);\n var theLabel = theTarget.firstChild.data;\n var theSlider = theTarget.sliderPanel\n var isOpen = theSlider.style.display!="none";\n // if using default button labels, toggle labels\n if (theLabel==">") theTarget.firstChild.data = "<";\n else if (theLabel=="<") theTarget.firstChild.data = ">";\n // if using default tooltips, toggle tooltips\n if (theTarget.getAttribute("title")=="show")\n theTarget.setAttribute("title","hide");\n else if (theTarget.getAttribute("title")=="hide")\n theTarget.setAttribute("title","show");\n if (theTarget.getAttribute("title")=="show "+theLabel)\n theTarget.setAttribute("title","hide "+theLabel);\n else if (theTarget.getAttribute("title")=="hide "+theLabel)\n theTarget.setAttribute("title","show "+theLabel);\n // deferred rendering (if needed)\n if (theSlider.getAttribute("rendered")=="false") {\n if (config.options.chkDebugLazySliderRender)\n alert("rendering '"+theLabel+"':\sn\sn"+theSlider.getAttribute("raw"));\n var place=theSlider;\n if (theSlider.getAttribute("blockquote")=="true")\n place=createTiddlyElement(place,"blockquote");\n wikify(theSlider.getAttribute("raw"),place);\n theSlider.setAttribute("rendered","true");\n }\n // show/hide the slider\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));\n else\n theSlider.style.display = isOpen ? "none" : "block";\n // reset to default width (might have been changed via plugin code)\n theSlider.style.width=theSlider.defaultPanelWidth;\n // align slider/floater position with target button\n if (!isOpen) adjustSliderPos(theSlider.parentNode,theTarget,theSlider,theSlider.className);\n // if showing panel, set focus to first 'focus-able' element in panel\n if (theSlider.style.display!="none") {\n var ctrls=theSlider.getElementsByTagName("*");\n for (var c=0; c<ctrls.length; c++) {\n var t=ctrls[c].tagName.toLowerCase();\n if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")\n { ctrls[c].focus(); break; }\n }\n }\n if (this.sliderCookie && this.sliderCookie.length) {\n config.options[this.sliderCookie]=!isOpen;\n if (config.options[this.sliderCookie]!=this.defOpen)\n saveOptionCookie(this.sliderCookie);\n else { // remove cookie if slider is in default display state\n var ex=new Date(); ex.setTime(ex.getTime()-1000);\n document.cookie = this.sliderCookie+"=novalue; path=/; expires="+ex.toGMTString();\n }\n }\n return false;\n}\n\n// hijack animation handler 'stop' handler so overflow is visible after animation has completed\nSlider.prototype.coreStop = Slider.prototype.stop;\nSlider.prototype.stop = function() { this.coreStop(); this.element.style.overflow = "visible"; }\n\n// adjust panel position based on button position\nif (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel,panelClass) {\n if (panelClass=="floatingPanel") {\n var left=0;\n var top=btn.offsetHeight; \n if (place.style.position!="relative") {\n var left=findPosX(btn);\n var top=findPosY(btn)+btn.offsetHeight;\n var p=place; while (p && p.className!='floatingPanel') p=p.parentNode;\n if (p) { left-=findPosX(p); top-=findPosY(p); }\n }\n if (left+panel.offsetWidth > getWindowWidth()) left=getWindowWidth()-panel.offsetWidth-10;\n panel.style.left=left+"px"; panel.style.top=top+"px";\n }\n}\n\nfunction getWindowWidth() {\n if(document.width!=undefined)\n return document.width; // moz (FF)\n if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )\n return document.documentElement.clientWidth; // IE6\n if(document.body && ( document.body.clientWidth || document.body.clientHeight ) )\n return document.body.clientWidth; // IE4\n if(window.innerWidth!=undefined)\n return window.innerWidth; // IE - general\n return 0; // unknown\n}\n//}}}
<div class='header'>\n<div class='headerShadow'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> \n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div class='headerForeground'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> \n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n<span id='topMenu' refresh='content' tiddler='TopMenu'></span> \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>
There is a plugin for playing media at http://www.tiddlytools.com/#PlayerPlugin. I have not tried this yet.
The [[Community]] is experimenting with using the [[del.icio.us|http://del.icio.us/]] bookmarking service as a PluginDirectory. The idea is to use the tag "TiddlyWikiPlugin" to identify the URL of a TiddlyWiki plugin. The del.icio.us fields should be set as follows:\n\n|!Field |!Example |\n|url |http://authorsite.com/#ThePlugin |\n|title |ThePluginTitle |\n|notes |Brief description/review of plugin |\n|tags |TiddlyWikiPlugin <AuthorName> |\n\nThe beauty of this approach is that it aggregates together multiple comments about a single plugin. For example, this is the del.icio.us [[page about UdoBorkowski's YourSearch plugin|http://del.icio.us/url/8085cbf3bbeda20f39a04a2969616afd]]. You can also browse the tag directly to see recently added plugins: http://del.icio.us/tag/TiddlyWikiPlugin\n\nBidiX has also created a special del.icio.us account that he's using to compile a master list of plugins tagged with TiddlyWikiHackers.
<<list shadowed>>
<<calendar thismonth>>\n\nThis was created using the CalendarPlugin.
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options ยป' 'Change TiddlyWiki advanced options'>>< < ImportTiddlers > >
Slick on SiteSubtitle and change the default text.
One of the first things you want to do is change the site title. In the empty TiddlyWiki you will see GettingStarted. In here you click on SiteTitle and SiteSubtitle. Edit these and close them. You will see the changes take place immediately. Then click on ''save changes'' and refresh your page. The browser bar will show the new page name.\n\n
a collection of notes for using TiddlyWiki
Russ Herman's ~WikiNotes
http://people.uncw.edu/hermanr/wikilist.htm
/%\n\nusage: <<tiddler SliderFrame with: label url width height panelid>>\n\nrequires:\nInlineJavascriptPlugin\nTiddlerWithParamsPlugin\nNestedSlidersPlugin\n\n%/+++[$1]...{{menubox{{{toolbar{<script label="back">\n window.history.go(-1);\n</script><script>\n place.lastChild.className="button";\n place.lastChild.title="go back one page";\n</script><script label="forward">\n window.history.go(+1);\n</script><script>\n place.lastChild.className="button";\n place.lastChild.title="go forward one page";\n</script><script label="reload">\n var f=place.parentNode.nextSibling.nextSibling.nextSibling.firstChild;\n f.src="$2";\n</script><script>\n place.lastChild.className="button";\n place.lastChild.title="reload $2";\n</script><script label="width">\n var f=place.parentNode.nextSibling.nextSibling.nextSibling.firstChild;\n var w=prompt("Enter a new frame width (use CSS dimensions: ### plus 'px', 'em', 'cm', 'in', or '%')","$3");\n if (!w||!w.length) return; if (!w.replace(/[0-9]*/,'').length) w+="px";\n f.style.width=w;\n</script><script>\n place.lastChild.className="button";\n place.lastChild.title="set frame width (use CSS dimensions: ### plus 'px', 'em', 'cm', 'in', or '%')";\n</script><script label="height">\n var f=place.parentNode.nextSibling.nextSibling.nextSibling.firstChild;\n var h=prompt("Enter a new frame height (use CSS dimensions: ### plus 'px', 'em', 'cm', 'in')","$4");\n if (!h||!h.length) return; if (!h.replace(/[0-9]*/,'').length) h+="px";\n f.style.height=h;\n</script><script>\n place.lastChild.className="button";\n place.lastChild.title="set frame height (use CSS dimensions: ### plus 'px', 'em', 'cm', 'in')";\n</script>/%<script label="new window">\n window.open("$2")\n</script><script>\n place.lastChild.className="button";\n place.lastChild.title="open $2 in a new tab/window";\n</script>%/<script label="close">\n var button=place.parentNode.parentNode.parentNode.button; \n window.onClickNestedSlider({target:button});\n</script><script>\n place.lastChild.className="button";\n place.lastChild.title="close slider";\n</script>}}}{{small{$2}}}\n<html><iframe src="$2" width="$3" height="$4" width="100%" style="background:#fff;margin-top:2px"></iframe></html>}}}===\n<script>\n if ("$5"!="$"+"5") place.lastChild.id="$5";\n place.lastChild.style.clear="both";\n place.lastChild.button.style.whiteSpace="nowrap";\n// place.lastChild.button.style.fontWeight="bold";\n</script>
<<tiddler SliderFrame with: TiddlyWiki http://www.tiddlywiki.com 100% 400>> <<tiddler SliderFrame with: UNCW http://www.uncw.edu 100% 400>> <<tiddler SliderFrame with: Image http://people.uncw.edu/hermanr/images/sunrise.jpg 100% 400>>
/***\n''Place your custom CSS here''\n***/\n\n/* Modied Style from Julian Knight JK Version: 2006-04-20 (Simplified) */\n\n/*{{{*/\nbody {position:static;}\n.tagClear {margin-top:1em;clear:both;}\n\nhr {height:0px;border:0;border-top:1px solid silver;}\nh1,h2,h3,h4,h5 {color:#014;background:transparent;border-bottom:1px solid #ddd;padding-left:0;}\n\n.headerShadow {padding:.5em 0em .5em 1em;}\n.headerForeground {padding:.5em 0em .5em 1em;}\n\n#displayArea { /* The bit that contains all tiddlers */\n padding-top:.1em;padding-bottom:.1em;\n margin-top:0;margin-right:15.5em;margin-bottom:0;margin-left:12.5em;-moz-border-radius:1em;}\n\n.tiddler {-moz-border-radius:1em;border-top:1px solid #ccc;border-left:1px solid #ccc;\n border-bottom:3px solid #ccc;border-right:3px solid #ccc;margin:0.5em;background:#fff;padding:0.5em;}\n\n.subtitle { /* Tiddler subtitle */\n font-size:0.9em;text-align:right;}\n\n.viewer pre {padding: 0;margin-left: 0;}\n.viewer hr {border: solid 1px silver;}\n\n.toolbar {visibility:visible;}\n\n.selected .toolbar {visibility:visible;color:#00f;}\n\n.toolbar .button { color:#dee; }\n.selected .toolbar .button { color:#014;}\n\n.tagging, .tagged, .selected .tagging, .selected .tagged {\n font-size:75%; padding:0.3em; background-color:#eee;border-top:1px solid #ccc; border-left:1px solid #ccc;\n border-bottom:3px solid #ccc; border-right:3px solid #ccc;max-width:45%;-moz-border-radius:1em;}\n\n.noBorder,.noBorder td,.noBorder th,.noBorder tr{border:0 !important}\n.evenRow{} .oddRow{}\n/*}}}*/\n\n/* Styles described in this TiddlyWiki */\n\n/*{{{*/\n.headerShadow { visibility: hidden; } \n#sidebar{display:none;}\n#displayArea {margin: 1em 1em 0em 14em;}\n.smaller { font-size:80%; } \n.small { font-size:90%; }\n/*}}}*/\n\n.header {background: #9900cc;}\n.title {color: #9900cc;}\n.subtitle {color: #9900cc;}\n.toolbar {color: #9900cc;}\n
/***\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-color: #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: #04b;\n}\n\n.headerShadow {\n color: #000;\n}\n\n.headerShadow a {\n font-weight: normal;\n color: #000;\n}\n\n.headerForeground {\n color: #fff;\n}\n\n.headerForeground a {\n font-weight: normal;\n color: #8cf;\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 #841;\n background: #db4;\n color: #014;\n}\n\n#messageArea .button {\n padding: 0.2em 0.2em 0.2em 0.2em;\n color: #014;\n background: #fff;\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: #db4;\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/*}}}*/
* StyleSheet\n* StyleSheetColors\n* StyleSheetLayout\n* StyleSheetPrint
!Header 1\n!!Header 2\n!!!Header 3\n!!!!Header 4\n!!!!!Header 5\n
|>|>|!PageTemplate|\n|>|>|[[SiteTitle]] - [[SiteSubtitle]]|\n|>|>|TopMenu|\n|[[MainMenu]]|[[DefaultTiddlers]]<<br>><<br>>[[ViewTemplate]]<<br>><<br>>[[EditTemplate]]|[[SideBarOptions]]|\n|~|~|[[OptionsPanel]]<<br>>AdvancedOptions|\n|~|~|SideBarTabs|\n|>|>|[[SiteUrl]]|
* AdvancedOptions\n* OptionsPanel
* SideBarOptions\n* SideBarTabs\n* TabAll\n* TabMore\n* TabMoreMissing\n* TabMoreOrphans\n* TabTags\n* TabTimeline
* DefaultTiddlers\n* MainMenu\n* SiteSubtitle\n* SiteTitle\n* SiteUrl
/***\n|''Name:''|TableOfContentsPlugin|\n|''Source:''|http://www.TiddlyTools.com/#TableOfContentsPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nWhen there are many tiddlers in a document, the standard 'tabbed list of tiddlers' in the right-hand sidebar can become very long, occupying a lot of page space and requiring a lot scrolling in order to locate and select a tiddler.\n\nThe TableOfContentsPlugin addresses this problem by replacing the standard tabbed list display with a single listbox/droplist control that uses a very small amount of page space, regardless of the number of tiddlers in the document.\n\n!!!!!Usage\n<<<\nTo view a tiddler, simply select (or double-click) its title from the listbox and it will automatically be displayed on the page. The listbox also includes special 'command' items that determine the order and type of tiddlers that are shown in the list:\n\n''[by title]'' displays all tiddlers in the document.\n''[by date/author/tags]'' displays indented sections, sorted accordingly, with headings (indicated by a '+') that can be expanded, one at a time, to view the list of tiddlers in that section.\n''[missing]'' displays tiddlers that have been referenced within the document but do not yet exist.\n''[orphans]'' displays tiddlers that do exist in the document but have not been referenced by a link from anywhere else within the document.\n''[system]'' displays special tiddlers that are used by TiddlyWiki to configure built-in features and add-on macros/extensions. The list includes all tiddlers tagged with <<tag systemTiddlers>> ("templates") or <<tag systemConfig>> (plug-in extensions), plus any 'shadow tiddlers' (built-in default systemTiddlers) that have not been over-ridden by custom tiddler definitions.\n\nThe current list ''display setting is indicated by an arrow (">")'' symbol to the left of command item. Selecting a command item causes the listbox to be reloaded with the appropriate contents and sort order.\n\nWhen you are viewing a list of tiddlers by date/author/tags, ''shift-clicking'' on a section heading or command item causes the listbox display to ''toggle between "show-one-section-at-a-time" and "expand-all-sections"'' display options, allowing you to quickly see all tiddler titles at once without having to view individual indented sections one at a time.\n\nThe ''size of the listbox can be adjusted'' so you can view more (or less) tiddler titles at one time. Select ''[-]'' to reduce the size by one line, ''[+]'' to increase the size by one line, or ''[=]'' to autosize the list to fit the current contents (toggles on/off). //Note: If the listbox is reduced to a single line, it displayed as a droplist instead of a fixed-sized listbox.// You can ''show/hide the entire listbox'' by selecting the "contents" label that appears above the listbox.\n<<<\n!!!!!Control Panel\n<<<\nBy default, tiddlers tagged with <<tag excludeLists>>, are omitted from the TableOfContents so that 'system' tiddlers (e.g. MainMenu, SiteTitle, StyleSheet, etc.) can be hidden, reducing "information overload" and making it easier to select relevant tiddlers when reading your document. However, when //editing// your document, including these hidden tiddlers in the list can be more helpful, so that changes to the menus, titles, styles, etc. can be more quickly accomplished.\n----\n''To include hidden tiddlers in the TableOfContents display, select the following option:''\n<<option chkTOCIncludeHidden>> include hidden tiddlers in TableOfContents(ignores <<tag excludeLists>> tag)\n^^note: this setting is ignored when ''<<option chkHttpReadOnly>> HideEditingFeatures when viewed over HTTP'' is enabled^^\n<<<\n!!!!!Parameters\n<<<\nThe macro accepts optional parameters to control various features and functions:\n* ''label:text''\nReplace the default text ("contents") that appears above the TableOfContents listbox. //Note: to include spaces in the label text, you must enclose the entire parameter in quotes// (e.g., {{{"label:my list of tiddlers"}}})\n* ''sort:fieldtype''\nSets the initial display order for items in the listbox. 'fieldtype' is one of the following pre-defined keywords: ''title'', ''modified'' //(date)//, ''modifier'' //(author)//, ''tags'', ''missing'', ''orphans'', or ''system''\n* ''date:format''\nControls the formatting of dates in TableOfContents display. 'format' is a text-substitution template containing one or more of the following special notations.\n** DDD - day of week in full (eg, "Monday")\n** DD - day of month, 0DD - adds leading zero\n** MMM - month in full (eg, "July")\n** MM - month number, 0MM - adds leading zero\n** YYYY - full year, YY - two digit year\n** hh - hours\n** mm - minutes\n** ss - seconds\n//Note: to include spaces in the formatting template, you must enclose the entire parameter in quotes// (e.g., {{{"date:DDD, DD/MM/YY"}}})\n* ''size:nnn''\nSets the initial number of lines to display in the listbox. If this parameter is omitted or "size:1" is specified, a single-line droplist is created. When a size > 1 is provided, a standard, fixed-size scrollable listbox is created. You can use "size:0" or "size:auto" to display a varible-height listbox that automatically adjusts to fit the current list contents without scrolling.\n* ''width:nnn[cm|px|em|%]''\nSets the width of the listbox control. Overrides the built-in CSS width declaration (=100%). Use standard CSS width units (cm=centimeters, px=pixels, em=M-space, %=proportional to containing area). You can also use a ".TOCList" custom CSS class definition to override the built-in CSS declarations for the listbox.\n* ''hidelist''\nHides the listbox when the TableOfContents is first displayed. Initially, only the listbox label and size controls will appear. Clicking on the listbox label text will alternately show/hide the listbox display. //Note: this setting does not affect the content of the listbox, only whether or not it is initially visible.//\n* ''prompt''\nSets the non-selectable prompt text that is displayed as the first line of the listbox //(note: this feature is not supported by the listbox control on all browsers)//. Let's you include a short text message (such as "select a tiddler"), even when displaying a compact single-line droplist.\n* ''padding:nnn[cm|px|em|%]''\nOverrides default listbox control padding. Sets the CSS padding style.\n* ''margin:nnn[cm|px|em|%]''\nOverrides default listbox control spacing. Sets the CSS margin style.\n* ''inline''\nNormally, the TableOfContents plugin is contained inside a {{{<div>}}} element. This setting causes the plugin to use a {{{<span>}}} instead, allowing for more flexible 'inline' placement when embedded within other content.\n<<<\n!!!!!Examples\n<<<\n<<tableOfContents "label:all tiddlers" sort:title width:40% size:1>>\n<<tableOfContents "label:by date" sort:modified size:1 width:40%>>\n<<tableOfContents "label:tagged tiddlers" sort:tags size:1 width:40%>>\n<<tableOfContents "label:system tiddlers" sort:system size:1 width:40%>>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''TableOfContentsPlugin'' (tagged with <<tag systemConfig>>)\n^^documentation and javascript for TableOfContents handling^^\n\ncreate/edit ''SideBarOptions'': (sidebar menu items) \n^^Add {{{<<tableOfContents>>}}} macro^^\n\n<<<\n!!!!!Revision History\n<<<\n''2006.05.21 [2.2.7]'' added onkeyup handling for enter key (=view selected tiddler, equivalent to double-click)\n''2006.02.14 [2.2.6]'' FF1501 fix: add 'var r' and 'var k' to unintended global variable declarations in refreshTOCList() and getTOCListFromButton(). Thanks for report from AndreasHoefler.\n''2006.02.04 [2.2.5]'' add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals\n''2005.12.21 [2.2.2]'' in onClickTOCList() and onDblClickTOCList(), prevent mouse events from 'bubbling' up to other handlers\n''2005.10.30 [2.2.1]'' in refreshTOCList(), fixed calculation of "showHidden" to check for 'readOnly' (i.e., "via HTTP") flag. Based on a report from LyallPearce\n''2005.10.30 [2.2.0]'' hide tiddlers tagged with 'excludeLists' (with option to override, i.e., "include hidden tiddlers")\n''2005.10.09 [2.1.0]'' combined documentation and code in a single tiddler\nadded click toggle for expand-all vs. show-one-branch\n''2005.08.07 [2.0.0]'' major re-write to not use static ID values for listbox controls, so that multiple macro instances can exist without corrupting each other or the DOM. Moved HTML and CSS definitions into plugin code instead of using separate tiddlers. Added macro parameters for label, sort, date, size, width, hidelist and showtabs\n''2005.08.03 [1.0.3]'' added "showtabs" optional parameter\n''2005.07.27 [1.0.2]'' core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet(). Added show/hide toggle (click on 'contents' link)\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//{{{\nversion.extensions.tableOfContents = {major: 2, minor: 2, revision: 7, date: new Date(2006,5,21)};\n//}}}\n\n// // 1.2.x compatibility\n//{{{\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//{{{\n// define defaults for cookie-based option values\nif (config.options.txtTOCSortBy==undefined) config.options.txtTOCSortBy="modified";\nif (config.options.txtTOCListSize==undefined) config.options.txtTOCListSize=19;\nif (config.options.chkTOCShow==undefined) config.options.chkTOCShow=true;\nif (config.options.chkTOCIncludeHidden==undefined) config.options.chkTOCIncludeHidden=false;\n\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkTOCIncludeHidden>> include hidden tiddlers in TableOfContents";\n\n// define macro "tableOfContents" to render controls\nconfig.macros.tableOfContents = { label: "contents" };\nconfig.macros.tableOfContents.cmdMax=7;\n\nconfig.macros.tableOfContents.css = '\s\n.TOC { padding:0.5em 1em 0.5em 1em; }\s\n.TOC a { padding:0em 0.25em 0em 0.25em; color:inherit; }\s\n.TOCList { width: 100%; font-size:8pt; margin:0em; }\s\n';\n\nconfig.macros.tableOfContents.html = '\s\n<div style="text-align:right">\s\n <span style="float:left">\s\n <a href="JavaScript:;" id="TOCMenu" style="padding: 0em;"\s\n onclick="onClickTOCMenu(this)" title="show/hide table of contents">%label%</a>\s\n </span>\s\n <a href="JavaScript:;" id="TOCSmaller" style="display:inline"\s\n onclick="resizeTOC(this)" title="reduce list size">–</a>\s\n <a href="JavaScript:;" id="TOCLarger"style="display:inline"\s\n onclick="resizeTOC(this)" title="increase list size">+</a>\s\n <a href="JavaScript:;" id="TOCMaximize"style="display:inline"\s\n onclick="resizeTOC(this)" title="maximize/restore list size">=</a>\s\n</div>\s\n';\n\nconfig.macros.tableOfContents.handler = function(place,macroName,params) { \n var parsedParams = new Array();\n parsedParams['label']=this.label;\n parsedParams['inline']=false;\n while (params.length>0) {\n if (params[0]=="label:none")\n parsedParams['label']="";\n else if (params[0].substr(0,6)=="label:")\n parsedParams['label']=params[0].substr(6);\n if (params[0].substr(0,7)=="prompt:")\n parsedParams['prompt']=params[0].substr(7);\n if (params[0].substr(0,8)=="padding:")\n parsedParams['padding']=params[0].substr(8);\n if (params[0].substr(0,7)=="margin:")\n parsedParams['margin']=params[0].substr(7);\n if (params[0].substr(0,5)=="sort:")\n parsedParams['sortby']=params[0].substr(5);\n if (params[0].substr(0,5)=="date:")\n parsedParams['date']=params[0].substr(5);\n if ((params[0]=="size:auto")||(params[0]=="size:0"))\n parsedParams['autosize']=true;\n else if (params[0] && (params[0].substr(0,5)=="size:"))\n parsedParams['requestedSize']=params[0].substr(5);\n if (params[0].substr(0,6)=="width:")\n parsedParams['width']=params[0].substr(6);\n if (params[0]=="hidelist")\n parsedParams['hidelist']=true;\n if (params[0]=="inline")\n parsedParams['inline']=true;\n params.shift(); \n }\n setStylesheet(config.macros.tableOfContents.css,"tableOfContents");\n var newTOC=createTiddlyElement(place,parsedParams['inline']?"span":"div",null,"TOC",null)\n if (parsedParams['margin']) { newTOC.style.margin=parsedParams['margin']; }\n if (parsedParams['padding']) { newTOC.style.padding=parsedParams['padding']; }\n if (parsedParams['label']!="") newTOC.innerHTML=config.macros.tableOfContents.html.replace(/%label%/,parsedParams['label']);\n var newTOCList=createTOCList(newTOC,parsedParams)\n refreshTOCList(newTOCList);\n store.addNotification(null,reloadTOCLists); // reload listbox after every tiddler change\n}\n\n// IE needs explicit global scoping for functions/vars called from browser events\nwindow.onChangeTOCList=onChangeTOCList;\nwindow.onClickTOCList=onClickTOCList;\nwindow.onDblClickTOCList=onDblClickTOCList;\nwindow.reloadTOCLists=reloadTOCLists;\nwindow.refreshTOCList=refreshTOCList;\nwindow.onClickTOCMenu=onClickTOCMenu;\nwindow.resizeTOC=resizeTOC;\n \nfunction createTOCList(place,params)\n{\n var theList = createTiddlyElement(place,"select",null,"TOCList",params['prompt'])\n theList.onchange=onChangeTOCList;\n theList.onclick=onClickTOCList;\n theList.ondblclick=onDblClickTOCList;\n theList.onkeyup=onKeyUpTOCList;\n theList.style.display=config.options.chkTOCShow ? "block" : "none" ;\n theList.sortBy=config.options.txtTOCSortBy;\n theList.dateFormat="DD MMM YYYY";\n theList.requestedSize=config.options.txtTOCListSize;\n theList.expandall=false;\n if (params['sortby'])\n { theList.sortBy=params['sortby']; theList.noSortCookie=true; }\n if (params['date'])\n { theList.dateFormat=params['date']; }\n if (params['autosize'])\n { theList.autosize=true; theList.noSizeCookie=true; }\n if (params['requestedSize'])\n { theList.requestedSize=params['requestedSize']; theList.noSizeCookie=true; }\n if (params['width'])\n { theList.style.width=params['width']; }\n if (params['hidelist'])\n { theList.style.display ="none" ; theList.noShowCookie=true; }\n if (params['expandall'])\n { theList.expandall=true; }\n return theList;\n}\n\nfunction onChangeTOCList()\n{\n var thisTiddler=this.options[this.selectedIndex].value;\n if ((this.size==1)&&(thisTiddler!='')) story.displayTiddler(null,thisTiddler,1);\n refreshTOCList(this);\n return false;\n}\n\nfunction onClickTOCList(e)\n{\n\n if (!e) var e = window.event;\n if (this.size==1)\n return; // don't toggle display for droplist\n if (e.shiftKey)\n { this.expandall=!this.expandall; refreshTOCList(this);}\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();\n return true;\n}\n\nfunction onDblClickTOCList(e)\n{\n if (!e) var e = window.event;\n var thisTiddler=this.options[this.selectedIndex].value;\n if (thisTiddler!='') story.displayTiddler(null,thisTiddler,1);\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();\n return false;\n}\n\nfunction onKeyUpTOCList(e)\n{\n if (!e) var e = window.event;\n if (e.keyCode!=13) return true;\n var thisTiddler=this.options[this.selectedIndex].value;\n if (thisTiddler!='') story.displayTiddler(null,thisTiddler,1);\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();\n return false;\n}\n\nfunction reloadTOCLists()\n{\n var all=document.all? document.all : document.getElementsByTagName("*");\n for (var i=0; i<all.length; i++)\n if (all[i].className=="TOCList")\n { all[i].selectedIndex=-1; refreshTOCList(all[i]); }\n}\n\nfunction refreshTOCList(theList)\n{\n // DEBUG var starttime=new Date();\n var selectedIndex = theList.selectedIndex;\n if (selectedIndex==-1) selectedIndex=0;\n var sortBy = theList.sortBy;\n var showHidden = config.options.chkTOCIncludeHidden\n && !(config.options.chkHttpReadOnly && readOnly);\n\n if (selectedIndex==0) sortBy=theList.sortBy; // "nnn tiddlers" heading\n if (selectedIndex==1) sortBy='title';\n if (selectedIndex==2) sortBy='modified';\n if (selectedIndex==3) sortBy='modifier';\n if (selectedIndex==4) sortBy='tags';\n if (selectedIndex==5) sortBy='missing';\n if (selectedIndex==6) sortBy='orphans';\n if (selectedIndex==7) sortBy='system';\n if (selectedIndex>config.macros.tableOfContents.cmdMax)\n {\n if (theList.options[theList.selectedIndex].value=='')\n expandTOC(theList);\n return;\n }\n theList.sortBy = sortBy;\n if (!theList.noSortCookie)\n { config.options.txtTOCSortBy=sortBy; saveOptionCookie("txtTOCSortBy"); }\n\n // get the list of tiddlers and filter out 'hidden' tiddlers (i.e., tagged with "excludeLists")\n var tiddlers = [];\n switch (sortBy) {\n case "missing":\n tiddlers = store.getMissingLinks();\n break;\n case "tags":\n tiddlers = store.getTags();\n break;\n case "orphans":\n var titles = store.getOrphans();\n for (var t = 0; t < titles.length; t++)\n if (showHidden || store.getTiddler(titles[t]).tags.find("excludeLists")==null)\n tiddlers.push(titles[t]);\n break;\n case "system":\n var temp = store.getTaggedTiddlers("systemTiddlers");\n for (var t = 0; t < temp.length; t++)\n if (showHidden || temp[t].tags.find("excludeLists")==null)\n tiddlers.pushUnique(temp[t].title,true);\n var temp = store.getTaggedTiddlers("systemConfig");\n for (var t = 0; t < temp.length; t++)\n if (showHidden || temp[t].tags.find("excludeLists")==null)\n tiddlers.pushUnique(temp[t].title,true);\n for (var t in config.shadowTiddlers) tiddlers.pushUnique(t,true);\n tiddlers.sort();\n break;\n default:\n var temp = store.getTiddlers(sortBy);\n for (var t = 0; t < temp.length; t++)\n if (showHidden || temp[t].tags.find("excludeLists")==null)\n tiddlers.push(temp[t]);\n }\n\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n theList.saved=null;\n\n // add heading and control items to list\n var i=0;\n var theHeading=tiddlers.length+' tiddlers:';\n if (sortBy=='missing') theHeading=tiddlers.length+' missing tiddlers:';\n if (sortBy=='orphans') theHeading=tiddlers.length+' orphaned tiddlers:';\n if (sortBy=='tags') theHeading=tiddlers.length+' tags:';\n if (sortBy=='system') theHeading=tiddlers.length+' system tiddlers:';\n var indent=String.fromCharCode(160)+String.fromCharCode(160);\n var sel=">";\n theList.options[i++]=new Option(theHeading,'',false,false);\n theList.options[i++]=new Option(((sortBy=="title")?sel:indent)+' [by title]','',false,false);\n theList.options[i++]=new Option(((sortBy=="modified")?sel:indent)+' [by date]','',false,false);\n theList.options[i++]=new Option(((sortBy=="modifier")?sel:indent)+' [by author]','',false,false);\n theList.options[i++]=new Option(((sortBy=="tags")?sel:indent)+' [by tags]','',false,false);\n theList.options[i++]=new Option(((sortBy=="missing")?sel:indent)+' [missing]','',false,false);\n theList.options[i++]=new Option(((sortBy=="orphans")?sel:indent)+' [orphans]','',false,false);\n theList.options[i++]=new Option(((sortBy=="system")?sel:indent)+' [system]','',false,false);\n // output the tiddler list\n switch(sortBy)\n {\n case "title":\n for (var t = 0; t < tiddlers.length; t++)\n theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);\n break;\n case "modified":\n // sort descending for newest date first\n tiddlers.sort(function (a,b) {if(a['modified'] == b['modified']) return(0); else return (a['modified'] > b['modified']) ? -1 : +1; });\n // continue with same logic as for 'modifier'...\n case "modifier":\n var lastSection = "";\n for (var t = 0; t < tiddlers.length; t++)\n {\n var tiddler = tiddlers[t];\n var theSection = "";\n if (sortBy=="modified") theSection = tiddler.modified.formatString(theList.dateFormat);\n if (sortBy=="modifier") theSection = tiddler.modifier;\n if (theSection != lastSection)\n {\n theList.options[i++] = new Option('+ '+theSection,"",false,false);\n lastSection = theSection;\n }\n theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);\n }\n expandTOC(theList);\n break;\n case "tags":\n // tagged tiddlers, by tag\n var tagcount=0;\n var lastTag = null;\n for (var t = 0; t < tiddlers.length; t++) // actually a list of tags, not tiddlers...\n {\n var theTag = tiddlers[t][0];\n var tagged = new Array();\n var temp = store.getTaggedTiddlers(theTag);\n for(var r=0; r<temp.length; r++)\n if (showHidden || temp[r].tags.find("excludeLists")==null)\n tagged.push(temp[r]);\n if (tagged.length)\n {\n tagcount++;\n theList.options[i++]= new\n Option('+ '+theTag+" ("+tagged.length+")","",false,false);\n for(var r=0; r<tagged.length; r++)\n theList.options[i++] = new\n Option(indent+indent+tagged[r].title,tagged[r].title,false,false);\n }\n }\n // count untagged tiddlers\n var temp = store.getTiddlers("title");\n var c=0; for (var r=0; r<temp.length;r++) if (!temp[r].tags.length) c++;\n // create 'pseudo-tag' listing untagged tiddlers (if any)\n if (c>0)\n {\n theList.options[i++] = new Option("+ untagged ("+c+")","",false,false);\n for (var r=0; r<temp.length;r++) if (!temp[r].tags.length)\n theList.options[i++] = new\n Option(indent+indent+temp[r].title,temp[r].title,false,false);\n }\n theList.options[0].text=tagcount+' tags:';\n expandTOC(theList);\n break;\n case "missing":\n case "orphans":\n case "system":\n for (var t = 0; t < tiddlers.length; t++)\n theList.options[i++] = new Option(tiddlers[t],tiddlers[t],false,false);\n break;\n }\n theList.selectedIndex=selectedIndex; // select current control item\n theList.size = (theList.autosize)?theList.options.length:theList.requestedSize;\n // DEBUG var endtime=new Date();\n // DEBUG alert("refreshTOC() elapsed time: "+(endtime-starttime)+" msec");\n}\n\n// show/hide branch of TOCList based on current selection\nfunction expandTOC(theList)\n{\n var selectedIndex = theList.selectedIndex;\n if (selectedIndex==-1) selectedIndex=0;\n var sortBy = theList.sortBy;\n\n // don't collapse/expand list for alpha-sorted "flatlist" TOC contents\n if ((sortBy=="title")||(sortBy=="missing")||(sortBy=="orphans")||(sortBy=="system"))\n return;\n // or list control items\n if ((selectedIndex>0)&&(selectedIndex<=config.macros.tableOfContents.cmdMax))\n return;\n\n var theText = theList.options[selectedIndex].text;\n var theValue = theList.options[selectedIndex].value;\n // save fully expanded list contents (if not already saved)\n if (!theList.saved)\n {\n theList.saved = new Array();\n for (var i=0; i < theList.length; i++)\n {\n opt = theList.options[i];\n theList.saved[i] = new Option(opt.text, opt.value, opt.defaultSelected, opt.selected);\n }\n }\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n\n // put back all items \n if (theList.expandall)\n {\n var i=0;\n for (var t=0; t<theList.saved.length; t++)\n {\n var opt=theList.saved[t];\n theList.options[i++] = new Option(opt.text,opt.value,opt.defaultSelected,opt.selected);\n if (opt.text==theText) selectedIndex=i-1;\n }\n theList.selectedIndex = selectedIndex;\n theList.size = (theList.autosize)?theList.options.length:theList.requestedSize;\n return;\n }\n\n // put back heading items until item text matches current selected heading\n var i=0;\n for (var t=0; t<theList.saved.length; t++)\n {\n var opt=theList.saved[t];\n if (opt.value=='')\n theList.options[i++] = new Option(opt.text,opt.value,opt.defaultSelected,opt.selected);\n if (opt.text==theText)\n break;\n }\n selectedIndex=i-1; // this is the NEW index of the current selected heading\n // put back items with value!='' until value==''\n for ( t++; t<theList.saved.length; t++)\n {\n var opt=theList.saved[t];\n if (opt.value!='')\n theList.options[i++] = new Option(opt.text,opt.value,opt.defaultSelected,opt.selected);\n if (opt.value=='')\n break;\n }\n // put back remaining items with value==''\n for ( ; t<theList.saved.length; t++)\n {\n var opt=theList.saved[t];\n if (opt.value=='')\n theList.options[i++] = new Option(opt.text,opt.value,opt.defaultSelected,opt.selected);\n }\n theList.selectedIndex = selectedIndex;\n theList.size = (theList.autosize)?theList.options.length:theList.requestedSize;\n}\n\n// these functions process clicks on the 'control links' that are displayed above the listbox\nfunction getTOCListFromButton(which)\n{\n var theList = null;\n switch (which.id)\n {\n case 'TOCMenu':\n var theSiblings = which.parentNode.parentNode.parentNode.childNodes;\n var thePlace=which.parentNode.parentNode.parentNode.parentNode.parentNode.id;\n break;\n case 'TOCSmaller':\n case 'TOCLarger':\n case 'TOCMaximize':\n var theSiblings = which.parentNode.parentNode.childNodes;\n var thePlace=which.parentNode.parentNode.parentNode.parentNode.id;\n break;\n }\n for (var k=0; k<theSiblings.length; k++)\n if (theSiblings[k].className=="TOCList") { theList=theSiblings[k]; break; }\n // DEBUG if (theList) alert('found '+theList.className+' for '+which.id+' button in '+thePlace);\n return theList;\n}\n\nfunction onClickTOCMenu(which)\n{\n var theList=getTOCListFromButton(which);\n if (!theList) return;\n var opening = theList.style.display=="none";\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(theList,opening,false,"none"));\n else\n theList.style.display = opening ? "block" : "none" ;\n if (!theList.noShowCookie)\n { config.options.chkTOCShow = opening; saveOptionCookie("chkTOCShow"); }\n return(false);\n}\n\nfunction resizeTOC(which)\n{\n var theList=getTOCListFromButton(which);\n if (!theList) return;\n\n var size = theList.size;\n if (theList.style.display=="none") // make sure list is visible\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(theList,true,false,"none"));\n else\n theList.style.display = "block" ;\n switch (which.id)\n {\n case 'TOCSmaller': // decrease current listbox size\n if (theList.autosize) { theList.autosize=false; size=config.options.txtTOCListSize; }\n if (size==1) break;\n size -= 1; // shrink by one line\n theList.requestedSize = theList.size = size;\n break;\n case 'TOCLarger': // increase current listbox size\n if (theList.autosize) { theList.autosize=false; size=config.options.txtTOCListSize; }\n if (size>=theList.options.length) break;\n size += 1; // grow by one line\n theList.requestedSize = theList.size = size;\n break;\n case 'TOCMaximize': // toggle autosize\n theList.autosize = (theList.size!=theList.options.length);\n theList.size = (theList.autosize)?theList.options.length:theList.requestedSize;\n break;\n }\n if (!theList.noSizeCookie && !theList.autosize)\n { config.options.txtTOCListSize=size; saveOptionCookie("txtTOCListSize"); }\n}\n//}}}\n
Tables are easily created using |.\nThe code\n{{{\n| text | text|\n| text | text|\n}}}\nto get\n| text | text|\n| text | text|\nYou can highlight the column labels by\n{{{\n|! text |! text|\n| text | text|\n}}}\nto get\n|! text |! text|\n| text | text|\nor both colums and rows using\n{{{\n|! text |! text|! text|\n|! text | text| text|\n|! text | text| text|\n}}}\nto get\n|! text |! text|! text|\n|! text | text| text|\n|! text | text| text|\nYou can also span rows and columns\n{{{\n|>| col | text|\n| row | text| text|\n|~| text| text|\n}}}\n|>| col | text|\n| row | text| text|\n|~| text| text|\n\nFinally, you can use tables to group images with captions.\n\n\n
!Functions\n* {{{wikify('text' + "\sn",place)}}} - Inserts formatted text to the tiddler. The \sn on the end will ensure that the next output starts on a new line\n* {{{var objDom = createTiddlyElement(place,"div",null,null,'html text')}}} - Creates a new Dom object at "place" in the tiddler. Returns a reference to that object which can be used for another call instead of "place", this would embed the 2nd object within the first (e.g. TR within TABLE).\n* {{{createTiddlyLink(place,tiddler[params[0]],true);}}}\n* {{{createTiddlyText( place, 'text' )}}}\n* {{{tiddlerExists(title)}}}\n!Objects\n* {{{store.getTiddler(tiddlerName)}}} - Returns a tiddler __object__ referenced by tiddler name\n* {{{store.getTiddlerText(tiddlerName)}}} - Return the __text__ of the named tiddler.\n* {{{store.getTaggedTiddlers(tiddlerName)}}} - Return __list__? of tiddlers with the named tag?\n* {{{[story.]findContainingTiddler(place)}}} - Returns a tiddler __object__ from the __outermost__ //current// tiddler (e.g. in a macro called from within a tiddler). To get the __innermost__ tiddler, use the callingTiddler parameter on the macro handler function (the last parameter, see below).\n* {{{config.macro....}}}\n* {{{store.getTags()}}}\n!Attributes\n* {{{objTiddler.getAttribute("tiddler")}}} - Returns the __text__ of the tiddler name\n* {{{objTiddler.created}}} - Returns a __date/time__ object containing the created date for the tiddler\n* {{{objTiddler.modified}}} - Returns a __date/time__ object containing the modified date for the tiddler\n* {{{objTiddler.tags}}} - Return an array of the tags for the tiddler\n!New Macro\nPut in a tiddler tagged with "systemConfig" then reload the TW.\n{{{\nversion.extensions.helloWorld = {major: 0, minor: 1, revision: 0,\n date: new Date(2006,3,5), source: "http://somewhere/#tiddlerName"};\n\nconfig.macros.helloWorld = {\n /* ... Define vars for the macro here ...*/\n text: "Hello"\n};\nconfig.macros.helloWorld.handler = function(place,macroName,params) {\n /* ... Do stuff here ... */\n /* NB: Here is the full list of parms for the function call:\n function(place,macroName,params,wikifier,paramString,callingTiddler) */\n}\n}}}\nThis would be called with {{{<<helloWorld param1 param2 ...>>}}}. "place" is a reference to the location of the macro call in the tiddler.\n!!Function Parameters\n{{{place}}} - the dom object from where the macro was called. This allows you to create a button or anything you want right where the {{{<<mymacro>>}}} was.\n{{{params}}} - an array of params passed to your macro when it was called. They can be single or double quoted or use double square brackets. {{{<<mymacro my "first macro" [[this fine morning]]}}} becomes:\nparams[0] = my\nparams[1] = first macro\nparams[2] = this fine morning\n{{{wikifier}}} - I'm not sure about this one. I guess it's a refrence the the wikifier that initiated this macro call. Maybe someone can clarify\n{{{paramString}}} - the unparsed parameters. From the previous example... {{{paramString = my "first macro" [[this fine morning]]}}}\n{{{tiddler}}} (or callingTiddler) = the tiddler __object__ that the macro was in when it was called. You can use tiddler.title to find it's name (the title attribute of the object). This variable is not supplied if the macro was called from a tiddler that isn't in the "story" column in the middle of the wiki. That is, if you macro was called from the main menu or sidebar, it doesnt get passed 'tiddler'. I'm not sure why. Also note that this is the innermost host tiddler. If the macro is called from a tiddler embeded in another tiddler using the <<tiddler>> macro, this returns the immediate host not the outer host (to find that, use {{{store.getTiddler(story.findContainingTiddler(place).getAttribute("tiddler"))}}}.\n!Tiddler Object\n* {{{tObj.text}}} - the content of the tiddler\n* {{{tObj.tags}}} - the tags of the tiddler\n!New Wikifier\nSee [[betterFormatterPlugin]] for example.\n!Examples\n{{{\n// Get the text for the outermost host tiddler\nvar tiddler=store.getTiddler(story.findContainingTiddler(place).getAttribute("tiddler"));\n// Get the last modified date of the innermost host tiddler\nvar out=tiddler.modified.formatString("MMM DDth YYYY");\n// If the host tiddler is not new, get the created date of the inermost host tiddler\nif (tiddler.modified.getDate()!=tiddler.created.getDate())\n out+=" (created "+tiddler.created.formatString("MMM DDth YYYY")+")";\n// Get the outermost host tiddlers title (if the macro is called from within a host tiddler)\nif(tiddler instanceof Tiddler)\n var currTitle = store.getTiddler(story.findContainingTiddler(place).getAttribute("tiddler")).title;\nelse\n var currTitle = '';\n}}}
/***\n|''Name:''|TiddlerListMacro|\n|''Version:''|2.0.10 (01-May-2006)|\n|''Source''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23TiddlerListMacro]])|\n|''Author:''|[[Jack]]|\n|''Type:''|Macro|\n|''Documentation:''|TiddlerListMacroDocumentation|\n!Usage\n{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}\nSee TiddlerListMacroDocumentation and TiddlerListMacroExamples\n!Code\n***/\n//{{{\nversion.extensions.tiddlerList = {major: 2, minor: 0, revision: 10, date: new Date("May 2, 2006")};\n// template = [header, item, seperator, group, footer]\nconfig.macros.tiddlerList={\n formats : {list:true, nlist:true, span:true, stack:true, csv:true, table:true},\n templates : {\n list : [ "%0\sn", "* %0\sn", "", "%group\sn", "%0\sn"],\n nlist : [ "%0", "# %0\sn", "", "%group\sn", "%0\sn"],\n span : [ "%0", "%0", " ", "%group", "%0"],\n stack : [ "%0", "%0", "\sn", "%group", "%0"],\n csv : [ "%0", "%0", ", ", "%0", "%0\sn"],\n table : ["|!%0|\sn", "|%0|\sn", "", "|%group|\sn", "|%0|\sn"]\n },\n dateFormat : "DD MMM YYYY"\n}\n\nif (!gCurrentTiddler)\n var gCurrentTiddler;\n\nconfig.macros.tiddlerList.handler = function(place,macroName,params,wikifier,paramString,tiddler)\n{\n // Some globals\n var count=0, groupCount=0, theGroup="", lastGroup="";\n var currentTiddler = tiddler;\n gCurrentTiddler = tiddler;\n var listWikiText="";\n var formats = this.formats;\n \n // SQL-Like parameters\n var parameters = paramString.parseParams("name",null,true);\n var pTags = parameters[0]["tags"]?parameters[0]["tags"][0].split(","):[];\n var pOrder = parameters[0]["order"]?parameters[0]["order"][0]:"title";\n var pTop = parameters[0]["top"]?parameters[0]["top"][0]:-1;\n var pText = parameters[0]["text"]?parameters[0]["text"][0]:"";\n var pTitle = parameters[0]["title"]?parameters[0]["title"][0]:"";\n var pSearch = parameters[0]["search"]?parameters[0]["search"][0]:"";\n var pFilter = parameters[0]["filter"]?parameters[0]["filter"][0]:"";\n var pHeader = parameters[0]["header"]?paramFormat(parameters[0]["header"][0]):"";\n var pFooter = parameters[0]["footer"]?paramFormat(parameters[0]["footer"][0]):"";\n var pGroup = parameters[0]["group"]?parameters[0]["group"][0]:"";\n var pDateFormat = parameters[0]["dateFormat"]?parameters[0]["dateFormat"][0]:this.dateFormat;\n var pCustomParameter = parameters[0]["customParameter"]?parameters[0]["customParameter"][0]:"";\n var pFormat = parameters[0]["format"]?parameters[0]["format"][0]:"list";\n pFormat = formats[pFormat]?pFormat:"list"\n \n // Seperator\n var pSeperator = parameters[0]["seperator"]?paramFormat(parameters[0]["seperator"][0]):this.templates[pFormat][2]\n\n // Template for group\n var pGroupTemplate = this.templates[pFormat][3];\n if (parameters[0]["groupTemplate"])\n pGroupTemplate = paramFormat(parameters[0]["groupTemplate"][0])\n pGroupTemplate = pGroupTemplate.replace("$))", ">>")\n \n // Template for group footer\n var pGroupFooterTemplate = "";\n if (parameters[0]["groupFooterTemplate"])\n pGroupFooterTemplate = paramFormat(parameters[0]["groupFooterTemplate"][0])\n pGroupFooterTemplate = pGroupFooterTemplate.replace("$))", ">>")\n \n // Template for item\n var pItemTemplate = this.templates[pFormat][1];\n if (parameters[0]["itemTemplate"])\n pItemTemplate = paramFormat(parameters[0]["itemTemplate"][0])\n pItemTemplate = pItemTemplate.replace("$))", ">>").replace("%link", "%0").replace("%item", "%1").replace("%abstract", "%2").replace("%text", "%3").replace("%created", "%4").replace("%modified", "%5").replace("%modifier", "%6").replace("%group", "%7").replace("%title", "%8").replace("%tags", "%9").replace("%nolink", "%10").replace("%custom", "%11")\n // Template for footer\n var pFooterTemplate = this.templates[pFormat][4].replace("%count", "%1")\n\n // Get all tiddlers\n var tiddlers = store.reverseLookup("tags","excludeLists",false);\n\n // Sorting\n if(!pOrder)\n pOrder = "title";\n if (pOrder.match(/^\s-/i)) {\n pOrder = pOrder.substr(1)\n var sortDesc = true;\n }\n if (sortDesc)\n tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] > b[pOrder]) ? -1 : +1; });\n else\n tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] < b[pOrder]) ? -1 : +1; });\n\n // Header\n if (pHeader)\n listWikiText += formatItem(this.templates[pFormat][0], [pHeader], pFormat)\n \n for(var t=0; t<tiddlers.length; t++) {\n tiddler = tiddlers[t];\n if (pTop==-1 || count<pTop) {\n if (pText=="" || tiddler.text.match(pText)) {\n if (pTitle=="" || tiddler.title.match(pTitle)) {\n if (pSearch=="" || (tiddler.title.match(pSearch) || tiddler.text.match(pSearch))) {\n if (pFilter=="" || eval(pFilter)) {\n if (pTags.length==0 || compareArrays(tiddler.tags, pTags, "all")) {\n count++;\n // Grouping\n if (pGroup) {\n theGroup = eval(pGroup);\n if(theGroup != lastGroup) {\n groupCount++;\n if (pGroupFooterTemplate && groupCount>1)\n listWikiText += pGroupFooterTemplate.replace("%group", theGroup)\n listWikiText += pGroupTemplate.replace("%group", theGroup)\n lastGroup = theGroup;\n }\n }\n // Seperators\n if (count>1) listWikiText += pSeperator;\n //Plaintext title\n var noLink = tiddler.title.match(config.textPrimitives.wikiLink)?"~" + tiddler.title:tiddler.title;\n // Custom parameter\n if (pCustomParameter)\n var custom="";\n try {\n custom = eval(pCustomParameter)\n } catch (e) {}\n // List individual tiddler\n listWikiText += formatItem(pItemTemplate,["[[" + tiddler.title + "]]",count,tiddler.text.substr(0,100),tiddler.text,tiddler.created.formatString(pDateFormat),tiddler.modified.formatString(pDateFormat),tiddler.modifier,theGroup,tiddler.title,tiddler.tags.join(" "),noLink,custom], pFormat)\n }\n }\n }\n }\n }\n }\n }\n \n // Last group footer\n if (pGroup && pGroupFooterTemplate && count>0)\n listWikiText += pGroupFooterTemplate.replace("%group", theGroup)\n\n // Footer\n if (pFooter) {\n pFooter = pFooter.replace("%count", count)\n listWikiText += formatItem(pFooterTemplate, [pFooter], pFormat)\n }\n \n // Render result\n if (!parameters[0]["debug"])\n wikify(listWikiText,place, null, currentTiddler)\n else\n place.innerHTML = "<textarea style=\s"width:100%;\s" rows=30>" + listWikiText + "</textarea>"\n \n \n // Local functions\n \n function paramFormat(param) {\n // Allow "\sn" in non evalled parameters\n return param.replace(/\s\sn/g, "\sn");\n }\n \n function formatItem(template, values, format) {\n // Fill template with values (depending on list format)\n if (format.match(/table/) && values[0].match(/\s|/))\n return ("%0\sn").format(values)\n else\n return template.format(values)\n }\n \n function compareArrays(array, values, logic) {\n // Compare items in array with AND("all") or OR("any") logic\n var matches=0;\n for(var v=0; v<values.length; v++)\n if(values[v].match(/^\s-/) && !array.contains(values[v].substr(1)))\n matches++;\n else if (array.contains(values[v]))\n matches++;\n return ((logic=="all" && matches==values.length) || (logic!="all" && matches>0))\n }\n \n}\n\nString.prototype.prettyTrim = function(len,prefix,postfix) {\n var result = this.trim().replace(/\sr\sn/g,' ').replace(/\sn/g,' ');\n if (!prefix) prefix = '';\n if (!postfix) postfix = '';\n if (result.length > len - 3)\n return prefix + result.substr(0,len) + '...' + postfix;\n else if (result.length > 0)\n return prefix + result + postfix;\n else\n return result;\n}\n\n//}}}
!Parameters\n|!Parameter|!Type|!Meaning|!Example|\n|top|Integer|Number of tiddlers to display|"10"|\n|tags|String|List tiddlers with matching tags (AND Logic). Leading - to exclude.|"~ToDo,Urgent,-Done"|\n|title|~RegEx|List tiddlers with matching title|"^[Pp]"|\n|text|~RegEx|List tiddlers with matching text|"Searchtext"|\n|search|~RegEx|List tiddlers with matching title OR text|"Problem"|\n|filter|~JavaScript|List tiddlers according to boolean expression)|"tiddler.title.length<4 && tiddler.tags.contains('Idea')"|\n|format|String (fixed list)|HTML formatting of list. list (ul, default), nlist (ol), span, stack (div), csv, table.|"list"|\n|order|String|Sort order of tiddlers. - is descending, + ascending|"-created"|\n|group|~JavaScript|Grouping field|tiddler.title.substr(0,2)|\n|header|String|Top caption (for table layout only), or text before the list|"Tiddlers beginning with T"|\n|footer|String|Bottom caption (for table layout only), or text after the list|"End of list"|\n|itemTemplate|~WikiTemplate|~WikiText with %placeholders|"%link\sn%abstract\sn%modified"|\n|groupTemplate|~WikiTemplate|~WikiText with %placeholders|"!!%group"|\n|dateFormat|String|Date formatting string when displaying dates|~YYYY-MM-DD|\n|seperator|String|Seperator text for span format|" - "|\n\n!Template Placeholders\nPlaceholder values for itemTemplate parameter\n|!Placeholder|!Field|\n|%item|List item number|\n|%link|Link to Tiddler|\n|%title|Tiddler Name|\n|%abstract|First 100 chars of tiddler text|\n|%text|All tiddler text|\n|%created|Creation date|\n|%modified|Modified date|\n|%modifier|Last modifier|\n|%group|Name of group field|\n|%count|Number of items listed (footer only)|\n\n!Style\nNo styles are pre-assigned to the lists. Use {{{@@}}} notation to define custom styles in the header, footer, groupTemplate and itemTemplate parameters.\n\n!More Examples\n{{{\n<<tiddlerList tags:{{gCurrentTiddler.title}} header:{{'All tiddlers tagged with ' + gCurrentTiddler.title}}>>\n\n<<tiddlerList top:0 header:{{(new Date(document.lastModified)).formatString('DD MMM YYYY')}}>>\n}}}
/***\n|''Name:''|TiddlerWithParamsPlugin|\n|''Version:''|1.0.1 (2006-03-22)|\n|''Source:''|http://tiddlywiki.abego-software.de/#TiddlerWithParamsPlugin|\n|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|\n|''Licence:''|[[BSD open source license]]|\n!Description\n\nThe TiddlerWithParamsPlugin extends the build-in {{{<<tiddler...>>}}} macro. It replaces placeholders ($1, $2, ...) in the given tiddler by values passed with the macro. Then it inserts the (replaced) text, just like the original {{{<<tiddler...>>}}} macro.\n\n''Syntax:'' \n|>|{{{<<}}}''tiddler '' //tiddlerName// [//className//] [''asText''] [''with:'' //arguments// ] [''prefix:'' //prefixString//] {{{>>}}}|\n|//tiddlerName//|The name of the tiddler to be included. The tiddler may contain placeholders ($1, $2, ... $9) that will be replaced with the values passed with the macro|\n|//className//|The (CSS) class to be used around the embedded tiddler|\n|''asText''|When defined the (replaced) content of the tiddler is inserted as pure text, i.e. it is not "wikified".|\n|//arguments//|up to 9 arguments may be passed to the macro, used as the values for the placeholders $1, $2, ... $9 in the referenced template|\n|//prefixString//|By default the placeholders $1, $2, $3,..., $9 are used. But you may change the "prefix" before the placeholder number ("$") to some other text through the "prefix:" option. This may be necessary when you are using the $n in the tiddler you are referencing (e.g. when you are using regular expressions).|\n|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. ~~|\n\n!Example\n\nThe following ''//ProjectTemplate//'' tiddler defines an "Overview" page for a project, that gives access to various "sub-tiddlers" used in the project, that follow a static naming schema (e.g. all Notes for any project are stored in a tiddler called "//projectName// Notes"). $1 holds the name of the Project (e.g. "ForEachTiddler"), $2 holds the type of the published component (e.g. "Plugin", "Macro", "Function").\n{{{\n![[$1Project]] Overview\n* [[$1$2]]\n* [[ToDo|$1 ToDos]]\n* [[Notes|$1 Notes]]\n* [[Examples|$1Examples]]\n* [[Tests|$1 Tests]]\n* [[Open Bugs/CRs|$1 Open Bugs and ChangeRequests]]\n}}}\n\nThis template is now used in the ''//ForEachTiddlerProject//'' tiddler:\n{{{\n<<tiddler ProjectTemplate with: ForEachTiddler Plugin>>\n}}}\n\nThis results in the following tiddler text for the ''//ForEachTiddlerProject//'' tiddler:\n{{{\n![[ForEachTiddlerProject]] Overview\n* [[ForEachTiddlerPlugin]]\n* [[ToDo|ForEachTiddler ToDos]]\n* [[Notes|ForEachTiddler Notes]]\n* [[Examples|ForEachTiddlerExamples]]\n* [[Tests|ForEachTiddler Tests]]\n* [[Open Bugs/CRs|ForEachTiddler Open Bugs and ChangeRequests]]\n}}}\n\n!Revision history\n* v1.0.0 (2006-01-20)\n** initial version\n* v1.0.1 (2006-03-22)\n** Added 'asText' option\n** Support Safari (Thanks to Elise Springer for reporting the problem)\n!Code\n***/\n//{{{\n//============================================================================\n// TiddlerWithParamsPlugin\n//============================================================================\n\n// Ensure that the Plugin is only installed once.\n//\nif (!version.extensions.TiddlerWithParamsPlugin) {\n\nversion.extensions.TiddlerWithParamsPlugin = {\n major: 1, minor: 0, revision: 1, \n date: new Date(2006,3,22), \n type: 'plugin',\n source: "http://tiddlywiki.abego-software.de/#TiddlerWithParamsPlugin"\n};\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nvar indexInArray = function(array, item) {\n for (var i = 0; i < array.length; i++) {\n if (array[i] == item) {\n return i;\n }\n }\n return -1;\n}\n\nvar myEscapeRegExp = function(s)\n{\n // The original escapeRegExp function does not work with Safari (2.0.3) \n // since the $& is not implemented.\nvar t = s.replace(/\s\s/g, "\s\s\s\s");\n t = t.replace(/\s^/g, "\s\s^");\n t = t.replace(/\s$/g, "\s\s$");\n t = t.replace(/\s*/g, "\s\s*");\n t = t.replace(/\s+/g, "\s\s+");\n t = t.replace(/\s?/g, "\s\s?");\n t = t.replace(/\s(/g, "\s\s(");\n t = t.replace(/\s)/g, "\s\s)");\n t = t.replace(/\s=/g, "\s\s=");\n t = t.replace(/\s!/g, "\s\s!");\n t = t.replace(/\s|/g, "\s\s|");\n t = t.replace(/\s,/g, "\s\s,");\n t = t.replace(/\s{/g, "\s\s{");\n t = t.replace(/\s}/g, "\s\s}");\n t = t.replace(/\s[/g, "\s\s[");\n t = t.replace(/\s]/g, "\s\s]");\n t = t.replace(/\s./g, "\s\s.");\n\n return t;\n}\n\n// ---------------------------------------------------------------------------\n// The (hijacked) tiddler Macro Handler \n// ---------------------------------------------------------------------------\n\nconfig.macros.tiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {\n \n var className = null;\n var argsStart = -1;\n var doWikify = true;\n\n var iParams = 1;\n if (params[iParams] != "asText" && params[iParams] != "with:") {\n className = params[iParams++];\n }\n if (params[iParams] == "asText") {\n iParams++;\n doWikify = false;\n }\n if (params[iParams] == "with:") {\n iParams++;\n argsStart = iParams;\n }\n \n var wrapper = createTiddlyElement(place,"span",null,className ? className : null,null);\n var text = store.getTiddlerText(params[0]);\n if(text) {\n // Check for recursion\n var tiddlerName = params[0];\n var stack = config.macros.tiddler.tiddlerStack;\n if (stack.find(tiddlerName) !== null) return;\n\n if (argsStart >= 0) {\n // The params between the "with:" and the "prefix:" (or the end) are the arguments,\n // The param behind the "prefix:" is the prefix before the placeholder numbers.\n var argsEnd = params.length;\n var prefix = "$";\n var prefixIndex = indexInArray(params, "prefix:");\n if (prefixIndex >= argsStart) {\n argsEnd = prefixIndex;\n if (prefixIndex < (params.length-1)) {\n prefix = params[prefixIndex+1];\n }\n }\n // to avoid any "special RE chars" problems with the prefix string escape all chars.\n prefix = myEscapeRegExp(prefix);\n \n var args = params.slice(argsStart, argsEnd);\n var n = Math.min(args.length, 9);\n for (var i = 0; i < n; i++) {\n var value = args[i];\n \n var placeholderRE = new RegExp(prefix+(i+1),"mg");\n text = text.replace(placeholderRE, value);\n }\n }\n stack.push(tiddlerName);\n try {\n if (doWikify) {\n wikify(text,wrapper,null,store.getTiddler(params[0]));\n } else {\n wrapper.appendChild(document.createTextNode(text));\n }\n } finally { \n stack.pop();\n }\n }\n}\nconfig.macros.tiddler.tiddlerStack = [];\n\n// End of "install only once"\n}\n\n//============================================================================\n// End of TiddlerWithParamsPlugin\n//============================================================================\n//}}}\n/***\n!Licence and Copyright\nCopyright (c) abego Software ~GmbH, 2006 ([[www.abego-software.de|http://www.abego-software.de]])\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or other\nmaterials provided with the distribution.\n\nNeither the name of abego Software nor the names of its contributors may be\nused to endorse or promote products derived from this software without specific\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT\nSHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\nANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGE.\n***/\n
TiddlyWiki was developed by Jeremy Ruston. The main site is at http://www.tiddlywiki.com/. There is a lot of information there, including links to a TiddlyWiki group for general discussion at http://groups-beta.google.com/group/TiddlyWiki.\n\nA TiddlyWiki contains chunks of information that can be brought up nonlinearly. These chunks are called tiddlers. Some tiddlers also store the code that controls the behavior and look and feel of the site. In the background are style sheets. A knowledge of style sheets is useful, but not entorely necessary to be able to produce content.
Here is a reference for the markup "language" used. See also [[Internal Macros]] (especially for the {{{<<br>>}}} macro that throws a new line).\n!Basic Formatting\n|!Format|!Markup|!Example|\n|Bold|{{{''Bold''}}} (2 single quotes)|''Bold''|\n|Highlight|{{{@@Highlight@@}}}|@@Highlight@@|\n|CSS Extended Highlights|{{{@@some css;Highlight@@}}}<<br>>For backwards compatibility, the following highlight syntax is also accepted:{{{@@bgcolor(#ff0000):color(#ffffff):red coloured@@}}}|@@background-color:#ff0000;color:#ffffff;red coloured@@<<br>><<slider AtEg ./atEg 'Extended example ...'>>|\n|Custom CSS Class|<html><code>{{wrappingClass{Text that is now accentuated}}}</code></html><<br>>By default, the text is placed in a <span>. To use a <div> instead, insert a line break before the text (after the single {)<<br>>In the CSS: {{{.wrappingClass {color: red;} }}}|Add .wrappingClass to StyleSheet|\n|Italic|{{{//Italic//}}}|//Italic//|\n|Monospaced text|<html><code>{{{ ... }}}</code></html>|{{{Monospaced text}}}|\n|Monospaced block multiline|Put <html><code>{{{</code></html> and <html><code>}}}</code></html> on their own lines|<html><pre>{{{<br/>Monospaced<br/>Multi-line<br/>Block<br/>}}}</pre></html>|\n|Strikethough|{{{==Strikethrough==}}}|==Strikethrough==|\n|Subscript|{{{~~Subscript~~}}}|Text~~Subscript~~|\n|Superscript|{{{^^Superscript^^}}}|Text^^Superscript^^|\n|Underlined|{{{__Underline__}}}(2 underscores)|__Underscored__|\n|Any HTML|{{{<html><span>any</span><br /><b>valid</b> <em>xhtml</em></html>}}}|<html><span>any</span><br /><b>valid</b> <em>xhtml</em></html>|\n!"Document" Structure\n|!Format|!Markup|!Example|\n|Headings|{{{!Heading 1}}}<<br>>{{{!!Heading 2}}}|<html><h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><h4>Heading 4</h4><h5>Heading 5</h5></html>|\n|Any HTML|{{{<html><p>any valid xhtml</p></html>}}}|<html><p>any valid xhtml</p></html>|\n|Block quotes|{{{>Blockquote}}}<<br>>Can be nested using multiple >|<html><blockquote>Blockquote<blockquote>Nested Blockquote</blockquote></blockquote></html>|\n|Blockquotes - Multiline|<html><tt><<<</tt><br/>multi-line<br/>blockquote<br/><tt><<<</tt></html> |<html><blockquote>multi-line<br/>blockquote</blockquote></html>|\n|Horizontal Rule|{{{----}}} (4 dashes on a line of their own)|<html><hr></html>|\n|Images|{{{[img[favicon.ico]]}}}<<br>>Note that image files are always external to the TW file|[img[http://www.tiddlywiki.com/favicon.ico]]|\n|Inline Comments|{{{/% .... %/}}}<<br>>Text between the markers will not be shown in view mode|Not shown: /% Not Shown %/|\n|Links|Any WikiWord (creates a link to a tiddler whether it exists or not).<<br>>Note that a WikiWord has to start with a capital letter and have a further mix of upper and lower case.|PageTemplate|\n|~|{{{[[Manual Link]]}}} (Especially for tiddlers with spaces in their titles)|[[Table of Contents]]|\n|~|{{{[[Pretty Link|Some Crafty Link]]}}}<<br>>Note: Makes an external link if the target does not yet exist (e.g. {{{[[Not Yet A Tiddler|NotYetATiddler]]}}})|[[Pretty Link|MainMenu]]<<br>>[[Not Yet A Tiddler|NotYetATiddler]]|\n|~|Automatic external link {{{http://www.knightnet.org.uk}}}|http://www.knightnet.org.uk|\n|~|Pretty external link<<br>>{{{[[My Home Page|http://www.knightnet.org.uk]]}}}|[[My Home Page|http://www.knightnet.org.uk]]|\n|~|OS Folder link<<br>>Windows Share: {{{file://///server/share}}}<<br>>Windows Local: {{{file:///c:/folder/file}}}<<br>>Un*x Local File: {{{file://folder/file}}}<<br>>Relative File: {{{folder/file}}}||\n|List - Bulleted|{{{* List entry}}}|<html><ul><li>Bullet List</li></ul></html>|\n|List - Numbered|{{{# List entry}}}|<html><ol><li>Numbered List</li></ol></html>|\n|List - Nested|Both list types can be nested by using multiple * or #<<br>>Note that * and # must be the first character of the line as with all block format markup.<<br>>{{{* 1st level}}}<<br>>{{{** 2nd level}}}|<<tiddler ./nestedListEg>>|\n|Tables| {{{|}}} |Column Seperator |\n|~| {{{!}}} |Header (Row or Column) |\n|~| {{{>}}} |Column Span |\n|~| {{{~}}} |Row Span |\n|~| {{{|Left |}}} |Left Align |\n|~| {{{| Right|}}} |Right Align|\n|~| {{{| Center |}}} |Center Align |\n|~| {{{|Caption|c}}} |Table Caption (Can be at top or bottom)|\n|~| {{{|Header|h}}} |Marks the row as being a header row (will be wrapped with a {{{<thead>}}} and so all entries are automatically formatted as per {{{|!}}} cells)|\n|~| {{{|Footer|f}}} |Marks the row as being a footer row (will be wrapped with a {{{<tfoot>}}}, no special formatting is pre-defined for this but can be added to your own CSS)|\n|~| {{{|CSSclass|k}}} |Applies a CSS class to the table to allow additional formatting (NB: only works if no whitespace after the k)|\n|~|>|Note that the additional CSS classes evenRow and oddRow are automatically applied to all rows of the table. But evenRow is applied to the "first" row as per JavaScript convention (it is the zero'th row which is strangely considered even!).|\n|~|>|To have a table with no borders at all. Use {{{|noBorder|k}}} with the CSS (in your StyleSheet tiddler):<<br>>{{{ .noBorder,.noBorder td,.noBorder th,.noBorder tr{border:0 !important} }}}|\n|Table Sample|<<tiddler ./tblMarkup>>|<<tiddler ./tblShow>>|\n!Notes\nYou can use the custom CSS formatter in combination with headers and lists to allow new lines within the entry. e.g.:\n{{{\n#{{block{\nBullet 1\nSome text in the same bullet\n(Note that "block" can be anything, it is the formatters CSS class name)\n }}}\n# Bullet 2 \n}}}\n#{{block{\nBullet 1\nSome text in the same bullet\n}}}\n# Bullet 2 \n\n(Julian Knight, 2006-05-11)\n<part atEg hidden>\n{{{\nThis is before the indented text\n@@display:block;margin-left:2em;This text will be indented...\n...and can even span across several lines...\n\n...or even include blank lines.\n@@This is after the indented text \n}}}\nThis is before the indented text\n@@display:block;margin-left:2em;This text will be indented...\n...and can even span across several lines...\n\n...or even include blank lines.\n@@This is after the indented text \n</part>\n<part tblMarkup hidden>\n{{{\n|table caption at top|c\n|header|header|h\n|text, more text, more text|text, more text, more text|\n|!heading|!heading|\n|>|colspan=2|\n|rowspan|left align |\n|~| center |\n|bgcolor(green):green| right|\n|footer|footer|f\n|table caption at bottom|c\n}}}\n</part>\n<part tblShow hidden>\n|table caption at top|c\n|header|header|h\n|text, more text, more text|text, more text, more text|\n|!heading|!heading|\n|>|colspan=2|\n|rowspan|left align |\n|~| center |\n|bgcolor(green):green| right|\n|footer|footer|f\n|table caption at bottom|c\n</part>\n<part nestedListEg hidden>\n* 1st Level\n** 2nd Level\n</part>
[[First Steps]] | [[Editing Content]] | [[Advanced]] | [[Links]]
<div>\n <span class='title' style='float:left;' macro='view title'></span>\n <span class='toolbar' style='clear:right;margin-top:1px;float:right;'\n macro='toolbar -closeTiddler +editTiddler deleteTiddler closeOthers jump'>\n </span>\n <div class='tagClear'></div>\n</div>\n<hr>\n<div class='tagClear viewer' macro='view text wikified'></div>
A WikiWord is a word built out of several words strung together with the first letters capitalized. In some cases such a combination of words is natural and you do not want it to be linked to a tiddler. In such cases you can escape the WikiWord mode with a tilde ({{{~}}}). For example, you may want to write Editor-in-Chief. Typing\n{{{\n~Editor-in-Chief\n}}}\nproduces ~Editor-in-Chief.