config.options.chkHttpReadOnly = false;\n
/***\n| Name:|CloseOnCancelPlugin|\n| Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|\n| Version:|6.9.3|\n| Date:|30-Sep-2006|\n| Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n***/\n//{{{\nmerge(config.commands.cancelTiddler,{\n\n handler_orig_closeUnsaved: config.commands.cancelTiddler.handler,\n\n handler: function(event,src,title) {\n this.handler_orig_closeUnsaved(event,src,title);\n if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))\n story.closeTiddler(title,true);\n return false;\n }\n\n});\n\n//}}}\n\n
Background: #fff\nForeground: #000\nPrimaryPale: #f86\nPrimaryLight: #b33\nPrimaryMid: #611\nPrimaryDark: #500\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #822\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n
//{{{\nconfig.options.chkHttpReadOnly = false; // means web visitors can experiment with your site by clicking edit\nconfig.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist\nconfig.views.editor.defaultText = ""; // don't need message when creating a new tiddler \n//}}}\n
The javascript analog clock. It's not flash.\nhttp://simonbaird.com/coolclock/\n\n[img[img|http://simonbaird.com/images/coolclock.gif]]
Welcome
[[MptwEditTemplate]]\n\n<div macro="showWhen tiddler.tags.contains('friend')">\n Favourite food: <span macro="edit favouriteFood"></span>\n</div>
Edit this tiddler to see what I'm on about..\n\n<<tiddler SiteTemplate2 with:\n 'E Springer'\n 'http://espringer.web.wesleyan.edu'\n 'E Springer'\n 'Philosophy, ethics'\n 'http://www.giffmex.org/twinactionimgs/espringer.GIF'\n 'my basic site, with a web of philosophical ideas'\n>>\n\n<<tiddler SiteTemplate with:\n 'E Springer'\n 'http://espringer.web.wesleyan.edu'\n 'E Springer'\n 'Philosophy, ethics'\n 'http://www.giffmex.org/twinactionimgs/espringer.GIF'\n 'my basic site, with a web of philosophical ideas'\n>>\n\n
/***\n|''Name:''|ForEachTiddlerPlugin|\n|''Version:''|1.0.5 (2006-02-05)|\n|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|\n|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|\n|''Licence:''|[[BSD open source license]]|\n|''Macros:''|[[ForEachTiddlerMacro]] v1.0.5|\n|''TiddlyWiki:''|1.2.38+, 2.0|\n|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|\n!Description\n\nCreate customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.\n\n''Syntax:'' \n|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|\n|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|\n|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|\n|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|\n|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|\n|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]] is used.|\n|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|\n|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|\n\nSee details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].\n\n!Revision history\n* v1.0.5\n** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.\n** Support Firefox 1.5.0.1\n** Internal\n*** Make "JSLint" conform\n*** "Only install once"\n* v1.0.4 (2006-01-06)\n** Support TiddlyWiki 2.0\n* v1.0.3 (2005-12-22)\n** Features: \n*** Write output to a file supports multi-byte environments (Thanks to Bram Chen) \n*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)\n** Enhancements:\n*** Improved error messages on InternetExplorer.\n* v1.0.2 (2005-12-10)\n** Features: \n*** context object also holds reference to store (TiddlyWiki)\n** Fixed Bugs: \n*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)\n* v1.0.1 (2005-12-08)\n** Features: \n*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".\n*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.\n*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).\n*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .\n*** Improved script evaluation (for where/sort clause and write scripts).\n* v1.0.0 (2005-11-20)\n** initial version\n\n!Code\n***/\n//{{{\n\n \n//============================================================================\n//============================================================================\n// ForEachTiddlerPlugin\n//============================================================================\n//============================================================================\n\n// Only install once\nif (!version.extensions.ForEachTiddlerPlugin) {\n\nversion.extensions.ForEachTiddlerPlugin = {major: 1, minor: 0, revision: 5, date: new Date(2006,2,5), source: "http://tiddlywiki.abego-software.de/#ForEachTiddlergPlugin"};\n\n// For backward compatibility with TW 1.2.x\n//\nif (!TiddlyWiki.prototype.forEachTiddler) {\n TiddlyWiki.prototype.forEachTiddler = function(callback) {\n for(var t in this.tiddlers) {\n callback.call(this,t,this.tiddlers[t]);\n }\n };\n}\n\n//============================================================================\n// forEachTiddler Macro\n//============================================================================\n\nversion.extensions.forEachTiddler = {major: 1, minor: 0, revision: 5, date: new Date(2006,2,5), provider: "http://tiddlywiki.abego-software.de"};\n\n// ---------------------------------------------------------------------------\n// Configurations and constants \n// ---------------------------------------------------------------------------\n\nconfig.macros.forEachTiddler = {\n // Standard Properties\n label: "forEachTiddler",\n prompt: "Perform actions on a (sorted) selection of tiddlers",\n\n // actions\n actions: {\n addToList: {},\n write: {}\n }\n};\n\n// ---------------------------------------------------------------------------\n// The forEachTiddler Macro Handler \n// ---------------------------------------------------------------------------\n\nconfig.macros.forEachTiddler.getContainingTiddler = function(e) {\n while(e && !hasClass(e,"tiddler"))\n e = e.parentNode;\n var title = e ? e.getAttribute("tiddler") : null; \n return title ? store.getTiddler(title) : null;\n};\n\nconfig.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {\n // config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);\n\n if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);\n // --- Parsing ------------------------------------------\n\n var i = 0; // index running over the params\n // Parse the "in" clause\n var tiddlyWikiPath = undefined;\n if ((i < params.length) && params[i] == "in") {\n i++;\n if (i >= params.length) {\n this.handleError(place, "TiddlyWiki path expected behind 'in'.");\n return;\n }\n tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");\n i++;\n }\n\n // Parse the where clause\n var whereClause ="true";\n if ((i < params.length) && params[i] == "where") {\n i++;\n whereClause = this.paramEncode((i < params.length) ? params[i] : "");\n i++;\n }\n\n // Parse the sort stuff\n var sortClause = null;\n var sortAscending = true; \n if ((i < params.length) && params[i] == "sortBy") {\n i++;\n if (i >= params.length) {\n this.handleError(place, "sortClause missing behind 'sortBy'.");\n return;\n }\n sortClause = this.paramEncode(params[i]);\n i++;\n\n if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {\n sortAscending = params[i] == "ascending";\n i++;\n }\n }\n\n // Parse the script\n var scriptText = null;\n if ((i < params.length) && params[i] == "script") {\n i++;\n scriptText = this.paramEncode((i < params.length) ? params[i] : "");\n i++;\n }\n\n // Parse the action. \n // When we are already at the end use the default action\n var actionName = "addToList";\n if (i < params.length) {\n if (!config.macros.forEachTiddler.actions[params[i]]) {\n this.handleError(place, "Unknown action '"+params[i]+"'.");\n return;\n } else {\n actionName = params[i]; \n i++;\n }\n } \n \n // Get the action parameter\n // (the parsing is done inside the individual action implementation.)\n var actionParameter = params.slice(i);\n\n\n // --- Processing ------------------------------------------\n try {\n this.performMacro({\n place: place, \n inTiddler: tiddler,\n whereClause: whereClause, \n sortClause: sortClause, \n sortAscending: sortAscending, \n actionName: actionName, \n actionParameter: actionParameter, \n scriptText: scriptText, \n tiddlyWikiPath: tiddlyWikiPath});\n\n } catch (e) {\n this.handleError(place, e);\n }\n};\n\n// Returns an object with properties "tiddlers" and "context".\n// tiddlers holds the (sorted) tiddlers selected by the parameter,\n// context the context of the execution of the macro.\n//\n// The action is not yet performed.\n//\n// @parameter see performMacro\n//\nconfig.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {\n\n var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);\n\n var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;\n context["tiddlyWiki"] = tiddlyWiki;\n \n // Get the tiddlers, as defined by the whereClause\n var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);\n context["tiddlers"] = tiddlers;\n\n // Sort the tiddlers, when sorting is required.\n if (parameter.sortClause) {\n this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);\n }\n\n return {tiddlers: tiddlers, context: context};\n};\n\n// Returns the (sorted) tiddlers selected by the parameter.\n//\n// The action is not yet performed.\n//\n// @parameter see performMacro\n//\nconfig.macros.forEachTiddler.getTiddlers = function(parameter) {\n return this.getTiddlersAndContext(parameter).tiddlers;\n};\n\n// Performs the macros with the given parameter.\n//\n// @param parameter holds the parameter of the macro as separate properties.\n// The following properties are supported:\n//\n// place\n// whereClause\n// sortClause\n// sortAscending\n// actionName\n// actionParameter\n// scriptText\n// tiddlyWikiPath\n//\n// All properties are optional. \n// For most actions the place property must be defined.\n//\nconfig.macros.forEachTiddler.performMacro = function(parameter) {\n var tiddlersAndContext = this.getTiddlersAndContext(parameter);\n\n // Perform the action\n var actionName = parameter.actionName ? parameter.actionName : "addToList";\n var action = config.macros.forEachTiddler.actions[actionName];\n if (!action) {\n this.handleError(parameter.place, "Unknown action '"+actionName+"'.");\n return;\n }\n\n var actionHandler = action.handler;\n actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);\n};\n\n// ---------------------------------------------------------------------------\n// The actions \n// ---------------------------------------------------------------------------\n\n// Internal.\n//\n// --- The addToList Action -----------------------------------------------\n//\nconfig.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {\n // Parse the parameter\n var p = 0;\n\n // Check for extra parameters\n if (parameter.length > p) {\n config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);\n return;\n }\n\n // Perform the action.\n var list = document.createElement("ul");\n place.appendChild(list);\n for (var i = 0; i < tiddlers.length; i++) {\n var tiddler = tiddlers[i];\n var listItem = document.createElement("li");\n list.appendChild(listItem);\n createTiddlyLink(listItem, tiddler.title, true);\n }\n};\n\n// Internal.\n//\n// --- The write Action ---------------------------------------------------\n//\nconfig.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {\n // Parse the parameter\n var p = 0;\n if (p >= parameter.length) {\n this.handleError(place, "Missing expression behind 'write'.");\n return;\n }\n\n var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);\n p++;\n\n // Parse the "toFile" option\n var filename = null;\n var lineSeparator = undefined;\n if ((p < parameter.length) && parameter[p] == "toFile") {\n p++;\n if (p >= parameter.length) {\n this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");\n return;\n }\n \n filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));\n p++;\n if ((p < parameter.length) && parameter[p] == "withLineSeparator") {\n p++;\n if (p >= parameter.length) {\n this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");\n return;\n }\n lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);\n p++;\n }\n }\n \n // Check for extra parameters\n if (parameter.length > p) {\n config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);\n return;\n }\n\n // Perform the action.\n var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);\n var count = tiddlers.length;\n var text = "";\n for (var i = 0; i < count; i++) {\n var tiddler = tiddlers[i];\n text += func(tiddler, context, count, i);\n }\n \n if (filename) {\n if (lineSeparator !== undefined) {\n lineSeparator = lineSeparator.replace(/\s\sn/mg, "\sn").replace(/\s\sr/mg, "\sr");\n text = text.replace(/\sn/mg,lineSeparator);\n }\n saveFile(filename, convertUnicodeToUTF8(text));\n } else {\n var wrapper = createTiddlyElement(place, "span");\n wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);\n }\n};\n\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\n// Internal.\n//\nconfig.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {\n return {\n place : placeParam, \n whereClause : whereClauseParam, \n sortClause : sortClauseParam, \n sortAscending : sortAscendingParam, \n script : scriptText,\n actionName : actionNameParam, \n actionParameter : actionParameterParam,\n tiddlyWikiPath : tiddlyWikiPathParam,\n inTiddler : inTiddlerParam\n };\n};\n\n// Internal.\n//\n// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of \n// the given path.\n//\nconfig.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {\n if (!idPrefix) {\n idPrefix = "store";\n }\n var lenPrefix = idPrefix.length;\n \n // Read the content of the given file\n var content = loadFile(this.getLocalPath(path));\n if(content === null) {\n throw "TiddlyWiki '"+path+"' not found.";\n }\n \n // Locate the storeArea div's\n var posOpeningDiv = content.indexOf(startSaveArea);\n var posClosingDiv = content.lastIndexOf(endSaveArea);\n if((posOpeningDiv == -1) || (posClosingDiv == -1)) {\n throw "File '"+path+"' is not a TiddlyWiki.";\n }\n var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);\n \n // Create a "div" element that contains the storage text\n var myStorageDiv = document.createElement("div");\n myStorageDiv.innerHTML = storageText;\n myStorageDiv.normalize();\n \n // Create all tiddlers in a new TiddlyWiki\n // (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)\n var tiddlyWiki = new TiddlyWiki();\n var store = myStorageDiv.childNodes;\n for(var t = 0; t < store.length; t++) {\n var e = store[t];\n var title = null;\n if(e.getAttribute)\n title = e.getAttribute("tiddler");\n if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)\n title = e.id.substr(lenPrefix);\n if(title && title !== "") {\n var tiddler = tiddlyWiki.createTiddler(title);\n tiddler.loadFromDiv(e,title);\n }\n }\n tiddlyWiki.dirty = false;\n\n return tiddlyWiki;\n};\n\n\n \n// Internal.\n//\n// Returns a function that has a function body returning the given javaScriptExpression.\n// The function has the parameters:\n// \n// (tiddler, context, count, index)\n//\nconfig.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {\n var script = context["script"];\n var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";\n var fullText = (script ? script+";" : "")+functionText+";theFunction;";\n return eval(fullText);\n};\n\n// Internal.\n//\nconfig.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {\n var result = [];\n var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);\n tiddlyWiki.forEachTiddler(function(title,tiddler) {\n if (func(tiddler, context, undefined, undefined)) {\n result.push(tiddler);\n }\n });\n return result;\n};\n\n// Internal.\n//\nconfig.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {\n var message = "Extra parameter behind '"+actionName+"':";\n for (var i = firstUnusedIndex; i < parameter.length; i++) {\n message += " "+parameter[i];\n }\n this.handleError(place, message);\n};\n\n// Internal.\n//\nconfig.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {\n var result = \n (tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) \n ? 0\n : (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)\n ? -1 \n : +1; \n return result;\n};\n\n// Internal.\n//\nconfig.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {\n var result = \n (tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) \n ? 0\n : (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)\n ? +1 \n : -1; \n return result;\n};\n\n// Internal.\n//\nconfig.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {\n // To avoid evaluating the sortClause whenever two items are compared \n // we pre-calculate the sortValue for every item in the array and store it in a \n // temporary property ("forEachTiddlerSortValue") of the tiddlers.\n var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);\n var count = tiddlers.length;\n var i;\n for (i = 0; i < count; i++) {\n var tiddler = tiddlers[i];\n tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);\n }\n\n // Do the sorting\n tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);\n\n // Delete the temporary property that holds the sortValue. \n for (i = 0; i < tiddlers.length; i++) {\n delete tiddlers[i].forEachTiddlerSortValue;\n }\n};\n\n\n// Internal.\n//\nconfig.macros.forEachTiddler.trace = function(message) {\n displayMessage(message);\n};\n\n// Internal.\n//\nconfig.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {\n var message ="<<"+macroName;\n for (var i = 0; i < params.length; i++) {\n message += " "+params[i];\n }\n message += ">>";\n displayMessage(message);\n};\n\n\n// Internal.\n//\n// Creates an element that holds an error message\n// \nconfig.macros.forEachTiddler.createErrorElement = function(place, exception) {\n var message = (exception.description) ? exception.description : exception.toString();\n return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);\n};\n\n// Internal.\n//\n// @param place [may be null]\n//\nconfig.macros.forEachTiddler.handleError = function(place, exception) {\n if (place) {\n this.createErrorElement(place, exception);\n } else {\n throw exception;\n }\n};\n\n// Internal.\n//\n// Encodes the given string.\n//\n// Replaces \n// "$))" to ">>"\n// "$)" to ">"\n//\nconfig.macros.forEachTiddler.paramEncode = function(s) {\n var reGTGT = new RegExp("\s\s$\s\s)\s\s)","mg");\n var reGT = new RegExp("\s\s$\s\s)","mg");\n return s.replace(reGTGT, ">>").replace(reGT, ">");\n};\n\n// Internal.\n//\n// Returns the given original path (that is a file path, starting with "file:")\n// as a path to a local file, in the systems native file format.\n//\n// Location information in the originalPath (i.e. the "#" and stuff following)\n// is stripped.\n// \nconfig.macros.forEachTiddler.getLocalPath = function(originalPath) {\n // Remove any location part of the URL\n var hashPos = originalPath.indexOf("#");\n if(hashPos != -1)\n originalPath = originalPath.substr(0,hashPos);\n // Convert to a native file format assuming\n // "file:///x:/path/path/path..." - pc local file --> "x:\spath\spath\spath..."\n // "file://///server/share/path/path/path..." - FireFox pc network file --> "\s\sserver\sshare\spath\spath\spath..."\n // "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."\n // "file://server/share/path/path/path..." - pc network file --> "\s\sserver\sshare\spath\spath\spath..."\n var localPath;\n if(originalPath.charAt(9) == ":") // pc local file\n localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\s\s");\n else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file\n localPath = "\s\s\s\s" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\s\s");\n else if(originalPath.indexOf("file:///") === 0) // mac/unix local file\n localPath = unescape(originalPath.substr(7));\n else if(originalPath.indexOf("file:/") === 0) // mac/unix local file\n localPath = unescape(originalPath.substr(5));\n else // pc network file\n localPath = "\s\s\s\s" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\s\s"); \n return localPath;\n};\n\n// ---------------------------------------------------------------------------\n// Stylesheet Extensions (may be overridden by local StyleSheet)\n// ---------------------------------------------------------------------------\n//\nsetStylesheet(\n ".forEachTiddlerError{color: #ffffff;background-color: #880000;}",\n "forEachTiddler");\n\n//============================================================================\n// End of forEachTiddler Macro\n//============================================================================\n\n\n//============================================================================\n// String.startsWith Function\n//============================================================================\n//\n// Returns true if the string starts with the given prefix, false otherwise.\n//\nversion.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};\n//\nString.prototype.startsWith = function(prefix) {\n var n = prefix.length;\n return (this.length >= n) && (this.slice(0, n) == prefix);\n};\n\n\n\n//============================================================================\n// String.endsWith Function\n//============================================================================\n//\n// Returns true if the string ends with the given suffix, false otherwise.\n//\nversion.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};\n//\nString.prototype.endsWith = function(suffix) {\n var n = suffix.length;\n return (this.length >= n) && (this.right(n) == suffix);\n};\n\n\n//============================================================================\n// String.contains Function\n//============================================================================\n//\n// Returns true when the string contains the given substring, false otherwise.\n//\nversion.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};\n//\nString.prototype.contains = function(substring) {\n return this.indexOf(substring) >= 0;\n};\n\n//============================================================================\n// Array.indexOf Function\n//============================================================================\n//\n// Returns the index of the first occurance of the given item in the array or \n// -1 when no such item exists.\n//\n// @param item [may be null]\n//\nversion.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};\n//\nArray.prototype.indexOf = function(item) {\n for (var i = 0; i < this.length; i++) {\n if (this[i] == item) {\n return i;\n }\n }\n return -1;\n};\n\n//============================================================================\n// Array.contains Function\n//============================================================================\n//\n// Returns true when the array contains the given item, otherwise false. \n//\n// @param item [may be null]\n//\nversion.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};\n//\nArray.prototype.contains = function(item) {\n return (this.indexOf(item) >= 0);\n};\n\n//============================================================================\n// Array.containsAny Function\n//============================================================================\n//\n// Returns true when the array contains at least one of the elements \n// of the item. Otherwise (or when items contains no elements) false is returned.\n//\nversion.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};\n//\nArray.prototype.containsAny = function(items) {\n for(var i = 0; i < items.length; i++) {\n if (this.contains(items[i])) {\n return true;\n }\n }\n return false;\n};\n\n\n//============================================================================\n// Array.containsAll Function\n//============================================================================\n//\n// Returns true when the array contains all the items, otherwise false.\n// \n// When items is null false is returned (even if the array contains a null).\n//\n// @param items [may be null] \n//\nversion.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};\n//\nArray.prototype.containsAll = function(items) {\n for(var i = 0; i < items.length; i++) {\n if (!this.contains(items[i])) {\n return false;\n }\n }\n return true;\n};\n\n\n} // of "install only once"\n\n// Used Globals (for JSLint) ==============\n// ... DOM\n/*global document */\n// ... TiddlyWiki Core\n/*global convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink, \n displayMessage, endSaveArea, hasClass, loadFile, saveFile, \n startSaveArea, store, wikify */\n//}}}\n\n\n/***\n!Licence and Copyright\nCopyright (c) abego Software ~GmbH, 2005 ([[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\n
asdfasdf
/***\n| Name:|HideWhenPlugin|\n| Description:|Allows conditional inclusion/exclusion in templates|\n| Version:|6.9.3|\n| Date:|30-Sep-2006|\n| Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\nFor use in ViewTemplate and EditTemplate. Eg\n{{{<div macro="showWhen tiddler.tags.contains('Task')">[[TaskToolbar]]</div>}}}\n{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}\n***/\n//{{{\nmerge(config.macros,{\n\n hideWhen: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n if (eval(paramString)) {\n removeChildren(place);\n place.parentNode.removeChild(place);\n }\n }},\n\n showWhen: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n config.macros.hideWhen.handler(place,macroName,params,wikifier,'!('+paramString+')',tiddler);\n }}\n\n});\n\n//}}}\n\n
/***\n|''Name:''|LegacyStrikeThroughPlugin|\n|''Description:''|Support for legacy (pre 2.1) strike through formatting|\n|''Version:''|1.0.1|\n|''Date:''|Jul 21, 2006|\n|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|\n|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|\n|''License:''|[[BSD open source license]]|\n|''CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|\n\n***/\n\n//{{{\n\n// Ensure that the LegacyStrikeThrough Plugin is only installed once.\nif(!version.extensions.LegacyStrikeThroughPlugin)\n {\n version.extensions.LegacyStrikeThroughPlugin = true;\n\nconfig.formatters.push(\n{\n name: "legacyStrikeByChar",\n match: "==",\n termRegExp: /(==)/mg,\n element: "strike",\n handler: config.formatterHelpers.createElementAndWikify\n});\n\n} // end of "install only once"\n//}}}\n
[[Welcome]] <<tag Projects>>
[img[logo|http://simonbaird.com/images/monkeygtd/revLogo2.gif]]\n* http://monkeygtd.tiddlyspot.com\n* http://monkeygtd.blogspot.com\n* http://mgtd-alpha.tiddlyspot.com\n(three urls? hmm this project needs a home page)
My ~TiddlyWiki distribution.\n[img[mptw|http://simonbaird.com/images/mptwlogosml.gif]]\nhttp://mptw.tiddlyspot.com/\n\n(This site is powered by MonkeyPirateTiddlyWiki).
[[MptwEditTemplate]]\n
ViewTemplate: MpViewTemplate\nEditTemplate: MpEditTemplate\nPageTemplate: MpPageTemplate\nStyleSheet: MpStyleSheet\n
[[MptwPageTemplate]]\n
[[MptwStyleSheet]]
[[MptwViewTemplate]]
/***\n| Name:|MptwLayoutPlugin|\n| Description:|A package containing templates and css for the MonkeyPirateTiddlyWiki layout|\n| Version:|6.1.2|\n| Date:|02-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#MptwLayoutPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n!Notes\nPresumes you have TagglyTaggingPlugin installed.\n***/\n//{{{\nconfig.shadowTiddlers.GettingStarted += "\sn\snSee also MonkeyPirateTiddlyWiki.";\n\n//}}}\n\n//{{{\nmerge(config.shadowTiddlers,{\n\nMonkeyPirateTiddlyWiki:[\n "[[MonkeyPirateTiddlyWiki|http://mptw.tiddlyspot.com]] is a distribution of [[TiddlyWiki|http://www.tiddlywiki.com/]] created by Simon Baird. See [[the web site|http://mptw.tiddlyspot.com/]] for more information.",\n "!!Upgrading ~MonkeyPirateTiddlyWiki",\n "This \s"empty\s" ~MonkeyPirateTiddlyWiki file comes pre-installed with the core ~MonkeyPirateTiddlyWiki plugins. You can upgrade these core plugins to the latest version by doing the following:",\n "# Click ImportTiddlers",\n "# Click \s"Choose...\s" and select \s"~MptwUpgradeURL\s"",\n "# Click \s"fetch\s"",\n "# Click the checkbox in the first column heading to select all tiddlers",\n "# Click \s"More actions...\s" and select \s"Import these tiddlers\s"",\n "# Click \s"OK\s" to confirm you want to overwrite the tiddlers",\n ""\n].join("\sn"),\n\nMptwStyleSheet:[\n "/*{{{*/",\n "/* a contrasting background so I can see where one tiddler ends and the other begins */",\n "body {",\n " background: [[ColorPalette::TertiaryLight]];",\n "}",\n "",\n "/* sexy colours and font for the header */",\n ".headerForeground {",\n " color: [[ColorPalette::PrimaryLight]];",\n "}",\n ".headerShadow {",\n " color: [[ColorPalette::PrimaryMid]];",\n "}",\n ".headerForeground, .headerShadow {",\n " padding: 1em 1em 0;",\n " font-family: 'Trebuchet MS' sans-serif;",\n " font-weight:bold;",\n "}",\n "",\n "/* make shadow go and down right instead of up and left */",\n ".headerShadow {",\n " left: 1px;",\n " top: 1px;",\n "}",\n "",\n "/* prefer monospace for editing */",\n ".editor textarea {",\n " font-family: 'Consolas' monospace;",\n "}",\n "",\n "/* sexy tiddler titles */",\n ".title {",\n " font-size: 250%;",\n " color: [[ColorPalette::PrimaryLight]];",\n " font-family: 'Trebuchet MS' sans-serif;",\n "}",\n "",\n "/* more subtle tiddler subtitle */",\n ".subtitle {",\n " padding:0px;",\n " margin:0px;",\n " padding-left:0.5em;",\n " font-size: 90%;",\n " color: [[ColorPalette::TertiaryMid]];",\n "}",\n ".subtitle .tiddlyLink {",\n " color: [[ColorPalette::TertiaryMid]];",\n "}",\n "",\n "/* a little bit of extra whitespace */",\n ".viewer {",\n " padding-bottom:3px;",\n "}",\n "",\n "/* don't want any background color for headings */",\n "h1,h2,h3,h4,h5,h6 {",\n " background: [[ColorPalette::Background]];",\n " color: [[ColorPalette::Foreground]];",\n "}",\n "",\n "/* give tiddlers 3d style border and explicit background */",\n ".tiddler {",\n " background: [[ColorPalette::Background]];",\n " border-right: 2px [[ColorPalette::TertiaryMid]] solid;",\n " border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;",\n " margin-bottom: 1em;",\n " padding-bottom: 2em;",\n "}",\n "",\n "/* make options slider look nicer */",\n "#sidebarOptions .sliderPanel {",\n " border:solid 1px [[ColorPalette::PrimaryLight]];",\n "}",\n "",\n "",\n "/* the borders look wrong with the body background */",\n "#sidebar .button {",\n " border-style: none;",\n "}",\n "",\n "/* displays the list of a tiddler's tags horizontally. used in ViewTemplate */",\n ".tagglyTagged li.listTitle {",\n " display:none",\n "}",\n ".tagglyTagged li {",\n " display: inline; font-size:90%;",\n "}",\n ".tagglyTagged ul {",\n " margin:0px; padding:0px;",\n "}",\n "",\n "/* horizontal main menu stuff */",\n "#displayArea {",\n " margin: 1em 15.7em 0em 1em; /* use the freed up space */",\n "}",\n "#topMenu br {",\n " display: none;",\n "}",\n "#topMenu {",\n " background: [[ColorPalette::PrimaryMid]];",\n " color:[[ColorPalette::PrimaryPale]];",\n "}",\n "#topMenu {",\n " padding:2px;",\n "}",\n "#topMenu .button, #topMenu .tiddlyLink, #topMenu a {",\n " margin-left: 0.5em;",\n " margin-right: 0.5em;",\n " padding-left: 3px;",\n " padding-right: 3px;",\n " color: [[ColorPalette::PrimaryPale]];",\n " font-size: 115%;",\n "}",\n "#topMenu .button:hover, #topMenu .tiddlyLink:hover {",\n " background: [[ColorPalette::PrimaryDark]];",\n "}",\n "@media print {",\n " #topMenu {",\n " display: none ! important;",\n " }",\n "}",\n "/*}}}*/",\n ""\n].join("\sn"),\n\nMptwViewTemplate:[\n "<!--{{{-->",\n "<div class='toolbar'>",\n " <!-- some custom contextual checkboxes -->",\n " <span style=\s"padding-right:2em;\s">",\n " <span macro=\s"showWhen tiddler.tags.contains('systemConfig')\s">",\n " <span macro=\s"toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'\s"></span>",\n " <!-- <span macro=\s"toggleTag systemConfigForce . '[[force|systemConfigForce]]'\s"></span> -->",\n " </span>",\n " <span macro=\s"showWhen config.macros.applyLayout && tiddler.tags.contains('layout')\s">",\n " <span macro=\s"applyLayout\s"></span>",\n " </span>",\n " </span>",\n " <!-- regular toolbar -->",\n " <span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler undoChanges permalink references jump newHere newJournalHere'></span>",\n "</div>",\n "<!-- regular tags macro but uses taggly css -->",\n "<div class=\s"tagglyTagged\s" macro=\s"tags\s"></div>",\n "<div>",\n " <span class='title' macro='view title'></span>",\n " <span macro=\s"miniTag\s"></span>",\n "</div>",\n "<div class='subtitle'>",\n " <span macro='view modifier link'></span>,",\n " <span macro='view modified date [[DD-mmm-YY]]'></span>",\n " (<span macro='message views.wikified.createdPrompt'></span>",\n " <span macro='view created date [[DD-mmm-YY]]'></span>)",\n "</div>",\n "<!-- using taggly versions of these two",\n "<div class='tagging' macro='tagging'></div>",\n "<div class='tagged' macro='tags'></div> -->",\n "<div macro=\s"hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')\s">",\n " <div class='viewer' macro='view text wikified'></div>",\n "</div>",\n "<div macro=\s"showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')\s">",\n " <div class='viewer'><pre macro='view text'></pre></div>",\n "</div>",\n "<div class=\s"tagglyTagging\s" macro=\s"tagglyTagging\s"></div>",\n "<div class='tagClear'></div>",\n "<!--}}}-->",\n ""\n].join("\sn"),\n\nMptwPageTemplate:[\n "<!--{{{-->",\n "<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>",\n " <div class='headerShadow'>",\n " <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;",\n " <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>",\n " </div>",\n " <div class='headerForeground'>",\n " <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;",\n " <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>",\n " </div>",\n "</div>",\n "<!-- horizontal MainMenu -->",\n "<div id='topMenu' refresh='content' tiddler='MainMenu'></div>",\n "<!-- original MainMenu menu -->",\n "<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->",\n "<div id='sidebar'>",\n " <div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>",\n " <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>",\n "</div>",\n "<div id='displayArea'>",\n " <div id='messageArea'></div>",\n " <div id='tiddlerDisplay'></div>",\n "</div>",\n "<!--}}}-->",\n ""\n].join("\sn"),\n\nMptwEditTemplate:[\n "<!--{{{-->",\n "<div class=\s"toolbar\s" macro=\s"toolbar +saveTiddler closeOthers cancelTiddler deleteTiddler\s"></div>",\n "<div class=\s"title\s" macro=\s"view title\s"></div>",\n "<div class=\s"editLabel\s">Title</div><div class=\s"editor\s" macro=\s"edit title\s"></div>",\n "<div class=\s"editLabel\s">Tags</div><div class=\s"editor\s" macro=\s"edit tags\s"></div>",\n "<div class=\s"editorFooter\s"><span macro=\s"message views.editor.tagPrompt\s"></span><span macro=\s"tagChooser\s"></span></div>",\n "<div class=\s"editor\s" macro=\s"edit text\s"></div>",\n "<!--}}}-->",\n ""\n].join("\sn")\n\n});\n//}}}\n
URL: http://mptw.tiddlyspot.com/upgrade.html\n
Background: #fff\nForeground: #000\nPrimaryPale: #f86\nPrimaryLight: #b33\nPrimaryMid: #611\nPrimaryDark: #500\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #822\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n
[[MptwEditTemplate]]\n\n<div macro="showWhen tiddler.tags.contains('friend')">\n Favourite food: <span macro="edit favouriteFood"></span>\n</div>
ViewTemplate: MyViewTemplate\nEditTemplate: MyEditTemplate\nPageTemplate: MyPageTemplate\nStyleSheet: MyStyleSheet\n
[[MptwPageTemplate]]\n
[[MptwStyleSheet]]\n.title { color:[[ColorPalette::SecondaryDark]]; }
<!--{{{-->\n<div class='toolbar'>\n <!-- some custom contextual checkboxes -->\n <span style="padding-right:2em;">\n\n <span macro="showWhen config.macros.setPalette && tiddler.tags.contains('palette')">\n <span macro="setPalette"></span>\n </span>\n <span macro="showWhen config.macros.applyLayout && tiddler.tags.contains('layout')">\n <span macro="applyLayout"></span>\n </span>\n\n <span macro="showWhen tiddler.tags.contains('systemConfig')">\n <span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>\n <!-- <span macro="toggleTag systemConfigForce . '[[force|systemConfigForce]]'"></span> -->\n </span>\n </span>\n <!-- regular toolbar -->\n <span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler undoChanges permalink newHere'></span> <!-- references jump newJournalHere -->\n</div>\n<!-- regular tags macro but uses taggly css -->\n<div class="tagglyTagged" macro="tags"></div>\n<div>\n <span class='title' macro='view title'></span>\n <span macro="miniTag"></span>\n</div>\n<div class='subtitle'>\n <span macro='view modifier link'></span>,\n <span macro='view modified date [[DD-mmm-YY]]'></span>\n (<span macro='message views.wikified.createdPrompt'></span>\n <span macro='view created date [[DD-mmm-YY]]'></span>)\n</div>\n<!-- using taggly versions of these two\n<div class='tagging' macro='tagging'></div>\n<div class='tagged' macro='tags'></div> -->\n\n<div macro="showWhen tiddler.tags.contains('friend')">\n Favourite food: <span macro="view favouriteFood"></span>\n</div>\n\n<div macro="showWhen tiddler.tags.contains('palette')" style="width:1%;float:right;padding-top:1em;"><div macro="viewPalette"></div></div>\n\n<div macro="hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer' macro='view text wikified'></div>\n</div>\n<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer'><pre macro='view text'></pre></div>\n</div>\n<div class="tagglyTagging" macro="tagglyTagging"></div>\n<div class='tagClear'></div>\n<!--}}}-->\n
/***\n| Name:|NewHerePlugin|\n| Description:|Creates the new here and new journal toolbar commands|\n| Version:|6.1.6|\n| Date:|06-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\nTo use edit your ViewTemplate and add newHere to the toolbar div, eg\n{{{<div class='toolbar' macro='toolbar ... newHere'></div>}}}\nNote: would be good if we could do this instead some day\n{{{<<newTiddler tag:{{tiddler.title}} label:'new here'>>}}}\n***/\n//{{{\nmerge(config.commands,{\n\n newHere: {\n text: 'new here',\n tooltip: 'Create a new tiddler tagged as this tiddler',\n hideReadOnly: true,\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var t=document.getElementById('tiddler'+title);\n story.displayTiddler(t,config.macros.newTiddler.title,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(config.macros.newTiddler.title, title, 0);\n story.focusTiddler(config.macros.newTiddler.title,"title"); // doesn't work??\n return false;\n }\n }\n },\n\n newJournalHere: {\n //text: 'new journal here', // too long\n text: 'new journal',\n hideReadOnly: true,\n dataFormat: 'DD MMM YYYY', // adjust to your preference\n //dataFormat: 'YYYY-0MM-0DD', \n tooltip: 'Create a new journal tiddler tagged as this tiddler',\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var now = new Date();\n var t=document.getElementById('tiddler'+title);\n var newtitle = now.formatString(this.dataFormat)\n story.displayTiddler(t,newtitle,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(newtitle, title, 0);\n story.focusTiddler(newtitle,"title");\n return false;\n }\n }\n }\n\n});\n//}}}\n
[[MptwPageTemplate]]\n
/***\n| Name:|QuickOpenTagPlugin|\n| Description:|Changes tag links to make it easier to open tags as tiddlers|\n| Version:|6.1.1|\n| Date:|01-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n***/\n//{{{\nconfig.quickOpenTag = {\n\n dropdownChar: (document.all ? "\su25bc" : "\su25be"), // the little one doesn't work in IE\n\n createTagButton: function(place,tag,excludeTiddler) {\n // little hack so we can to <<tag PrettyTagName|RealTagName>>\n var splitTag = tag.split("|");\n var pretty = tag;\n if (splitTag.length == 2) {\n tag = splitTag[1];\n pretty = splitTag[0];\n }\n \n var sp = createTiddlyElement(place,"span",null,"quickopentag");\n createTiddlyText(createTiddlyLink(sp,tag,false),pretty);\n \n var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,\n config.views.wikified.tag.tooltip.format([tag]),onClickTag);\n theTag.setAttribute("tag",tag);\n if (excludeTiddler)\n theTag.setAttribute("tiddler",excludeTiddler);\n return(theTag);\n },\n\n miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var tagged = store.getTaggedTiddlers(tiddler.title);\n if (tagged.length > 0) {\n var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,\n config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);\n theTag.setAttribute("tag",tiddler.title);\n theTag.className = "miniTag";\n }\n },\n\n allTagsHandler: function(place,macroName,params) {\n var tags = store.getTags();\n var theDateList = createTiddlyElement(place,"ul");\n if(tags.length == 0)\n createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);\n for (var t=0; t<tags.length; t++) {\n var theListItem = createTiddlyElement(theDateList,"li");\n var theLink = createTiddlyLink(theListItem,tags[t][0],true);\n var theCount = " (" + tags[t][1] + ")";\n theLink.appendChild(document.createTextNode(theCount));\n var theDropDownBtn = createTiddlyButton(theListItem," " +\n config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);\n theDropDownBtn.setAttribute("tag",tags[t][0]);\n }\n },\n\n // todo fix these up a bit\n styles: \n"/*{{{*/\sn"+\n"/* created by QuickOpenTagPlugin */\sn"+\n".tagglyTagged .quickopentag, .tagged .quickopentag \sn"+\n" { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }\sn"+\n".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }\sn"+\n".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}\sn"+\n"/* extra specificity to make it work right */\sn"+\n"#displayArea .viewer .quickopentag a.button, \sn"+\n"#displayArea .viewer .quickopentag a.tiddyLink, \sn"+\n"#mainMenu .quickopentag a.tiddyLink, \sn"+\n"#mainMenu .quickopentag a.tiddyLink \sn"+\n" { border:0px solid black; }\sn"+\n"#displayArea .viewer .quickopentag a.button, \sn"+\n"#mainMenu .quickopentag a.button \sn"+\n" { margin-left:0px; padding-left:2px; }\sn"+\n"#displayArea .viewer .quickopentag a.tiddlyLink, \sn"+\n"#mainMenu .quickopentag a.tiddlyLink \sn"+\n" { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }\sn"+\n"a.miniTag {font-size:150%;} \sn"+\n"#mainMenu .quickopentag a.button \sn"+\n" /* looks better in right justified main menus */\sn"+\n" { margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }\sn" + \n"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }\sn" +\n"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }\sn" +\n"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }\sn" +\n"/*}}}*/\sn"+\n "",\n\n init: function() {\n // we fully replace these builtins. can't hijack them easily\n window.createTagButton = this.createTagButton;\n config.macros.allTags.handler = this.allTagsHandler;\n config.macros.miniTag = { handler: this.miniTagHandler };\n config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;\n if (store)\n store.addNotification("QuickOpenTagStyles",refreshStyles);\n else\n config.notifyTiddlers.push({name:"QuickOpenTagStyles", notify: refreshStyles});\n }\n\n}\n\nconfig.quickOpenTag.init();\n\n//}}}\n
/***\n| Name:|RenameTagsPlugin|\n| Description:|Allows you to easily rename or delete tags across multiple tiddlers|\n| Version:|6.9.3|\n| Date:|30-Sep-2006|\n| Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\nRename a tag and you will be prompted to rename it in all its tagged tiddlers.\n***/\n//{{{\nconfig.renameTags = {\n\n prompts: {\n rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",\n remove: "Remove the tag '%0' from %1 tidder%2?"\n },\n\n removeTag: function(tag,tiddlers) {\n for (var i=0;i<tiddlers.length;i++) {\n store.setTiddlerTag(tiddlers[i].title,false,tag);\n }\n },\n\n renameTag: function(oldTag,newTag,tiddlers) {\n for (var i=0;i<tiddlers.length;i++) {\n store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old\n store.setTiddlerTag(tiddlers[i].title,true,newTag); // add new\n }\n },\n\n storeMethods: {\n\n saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,\n\n saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields) {\n if (title != newTitle) {\n var tagged = this.getTaggedTiddlers(title);\n if (tagged.length > 0) {\n // then we are renaming a tag\n if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))\n config.renameTags.renameTag(title,newTitle,tagged);\n\n if (!this.tiddlerExists(title) && newBody == "")\n // dont create unwanted tiddler\n return null;\n }\n }\n return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields);\n },\n\n removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,\n\n removeTiddler: function(title) {\n var tagged = this.getTaggedTiddlers(title);\n if (tagged.length > 0)\n if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))\n config.renameTags.removeTag(title,tagged);\n return this.removeTiddler_orig_renameTags(title);\n }\n\n },\n\n init: function() {\n merge(TiddlyWiki.prototype,this.storeMethods);\n }\n}\n\nconfig.renameTags.init();\n\n//}}}\n\n
simon baird's 'spot
|!Title / link|!Creator|!Subject matter|!Screenshot|!Description / notes|\n|[[$1|$2]]|$3|$4|[img[$5]]|$6|
{{niceTable{\n|!Title/link|@@font-weight:bold;font-size:150%;[[$1|$2]]@@|\n|!Creator|$3|\n|!Subject matter|$4|\n|!Description/notes|$6|\n|!Screenshot|[img[screenshot|$5]]|\n}}}
[[catenaries & dirigibles]]
Background: #fff\nForeground: #000\nPrimaryPale: #8cf\nPrimaryLight: #18f\nPrimaryMid: #04b\nPrimaryDark: #014\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #841\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n
[[MptwStyleSheet]]\n.title { color:[[ColorPalette::SecondaryDark]]; }\n\n.niceTable td, .niceTable th, .niceTable tr {\n border-style:none;\n}\n\n.niceTable td, .niceTable th {\n vertical-align:top;\n padding:0.5em;\n}\n\n.niceTable table {\n border:1px #aaa solid;\n background-color:#f8f8f8;\n}\n\n.niceTable td img {\n border:1px solid #555;\n text-align:center;\n margin:0 1em 1em 0;\n}\n\n.niceTable th {\n background-color:#f8f8f8;\n color:#555;\n font-size:90%;\n font-weight:bold;\n text-align:right;\n}
/***\n| Name:|TagglyTaggingPlugin|\n| Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|\n| Version:|6.1.5|\n| Date:|05-Oct-2006|\n| Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n!Notes\nSee http://mptw.tiddlyspot.com/#TagglyTagging\n***/\n//{{{\nconfig.taggly = {\n\n // for translations\n lingo: {\n labels: {\n asc: "\su2191", // down arrow\n desc: "\su2193", // up arrow\n title: "title",\n modified: "modified",\n created: "created",\n show: "+",\n hide: "-",\n normal: "normal",\n group: "group",\n commas: "commas",\n sitemap: "sitemap",\n numCols: "cols\su00b1", // plus minus sign\n label: "Tagged as '%0':"\n },\n\n tooltips: {\n title: "Click to sort by title",\n modified: "Click to sort by modified date",\n created: "Click to sort by created date",\n show: "Click to show tagging list",\n hide: "Click to hide tagging list",\n normal: "Click to show a normal ungrouped list",\n group: "Click to show list grouped by tag",\n sitemap: "Click to show a sitemap style list",\n commas: "Click to show a comma separated list",\n numCols: "Click to change number of columns"\n }\n },\n\n config: {\n showTaggingCounts: true,\n listOpts: {\n // the first one will be the default\n sortBy: ["title","modified","created"],\n sortOrder: ["asc","desc"],\n hideState: ["show","hide"],\n listMode: ["normal","group","sitemap","commas"],\n numCols: ["1","2","3","4","5","6"]\n },\n valuePrefix: "taggly."\n },\n\n getTagglyOpt: function(title,opt) {\n var val = store.getValue(title,this.config.valuePrefix+opt);\n return val ? val : this.config.listOpts[opt][0];\n },\n\n setTagglyOpt: function(title,opt,value) {\n if (!store.tiddlerExists(title))\n // create it silently\n store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),null);\n // if value is default then remove it to save space\n return store.setValue(title,\n this.config.valuePrefix+opt,\n value == this.config.listOpts[opt][0] ? null : value);\n },\n\n getNextValue: function(title,opt) {\n var current = this.getTagglyOpt(title,opt);\n var pos = this.config.listOpts[opt].indexOf(current);\n // a little usability enhancement. actually it doesn't work right for grouped or sitemap\n var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);\n var newPos = (pos + 1) % limit;\n return this.config.listOpts[opt][newPos];\n },\n\n toggleTagglyOpt: function(title,opt) {\n var newVal = this.getNextValue(title,opt);\n this.setTagglyOpt(title,opt,newVal);\n }, \n\n createListControl: function(place,title,type) {\n var lingo = config.taggly.lingo;\n var label;\n var tooltip;\n var onclick;\n\n if ((type == "title" || type == "modified" || type == "created")) {\n // "special" controls. a little tricky. derived from sortOrder and sortBy\n label = lingo.labels[type];\n tooltip = lingo.tooltips[type];\n\n if (this.getTagglyOpt(title,"sortBy") == type) {\n label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];\n onclick = function() {\n config.taggly.toggleTagglyOpt(title,"sortOrder");\n return false;\n }\n }\n else {\n onclick = function() {\n config.taggly.setTagglyOpt(title,"sortBy",type);\n config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);\n return false;\n }\n }\n }\n else {\n // "regular" controls, nice and simple\n label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];\n tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];\n onclick = function() {\n config.taggly.toggleTagglyOpt(title,type);\n return false;\n }\n }\n\n // hide button because commas don't have columns\n if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))\n createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");\n },\n\n makeColumns: function(orig,numCols) {\n var listSize = orig.length;\n var colSize = listSize/numCols;\n var remainder = listSize % numCols;\n\n var upperColsize = colSize;\n var lowerColsize = colSize;\n\n if (colSize != Math.floor(colSize)) {\n // it's not an exact fit so..\n upperColsize = Math.floor(colSize) + 1;\n lowerColsize = Math.floor(colSize);\n }\n\n var output = [];\n var c = 0;\n for (var j=0;j<numCols;j++) {\n var singleCol = [];\n var thisSize = j < remainder ? upperColsize : lowerColsize;\n for (var i=0;i<thisSize;i++) \n singleCol.push(orig[c++]);\n output.push(singleCol);\n }\n\n return output;\n },\n\n drawTable: function(place,columns,theClass) {\n var newTable = createTiddlyElement(place,"table",null,theClass);\n var newTbody = createTiddlyElement(newTable,"tbody");\n var newTr = createTiddlyElement(newTbody,"tr");\n for (var j=0;j<columns.length;j++) {\n var colOutput = "";\n for (var i=0;i<columns[j].length;i++) \n colOutput += columns[j][i];\n var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class\n wikify(colOutput,newTd);\n }\n return newTable;\n },\n\n createTagglyList: function(place,title) {\n switch(this.getTagglyOpt(title,"listMode")) {\n case "group": return this.createTagglyListGrouped(place,title); break;\n case "normal": return this.createTagglyListNormal(place,title,false); break;\n case "commas": return this.createTagglyListNormal(place,title,true); break;\n case "sitemap":return this.createTagglyListSiteMap(place,title); break;\n }\n },\n\n getTaggingCount: function(title) {\n // thanks to Doug Edmunds\n if (this.config.showTaggingCounts) {\n var tagCount = store.getTaggedTiddlers(title).length;\n if (tagCount > 0)\n return " ("+tagCount+")";\n }\n return "";\n },\n\n // this is for normal and commas mode\n createTagglyListNormal: function(place,title,useCommas) {\n\n var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));\n\n if (this.getTagglyOpt(title,"sortOrder") == "desc")\n list = list.reverse();\n\n var output = [];\n for (var i=0;i<list.length;i++) {\n var countString = this.getTaggingCount(list[i].title);\n if (useCommas)\n output.push((i > 0 ? ", " : "") + "[[" + list[i].title + "]]" + countString);\n else\n output.push("*[[" + list[i].title + "]]" + countString + "\sn");\n }\n\n return this.drawTable(place,\n this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),\n useCommas ? "commas" : "normal");\n },\n\n // this is for the "grouped" mode\n createTagglyListGrouped: function(place,title) {\n var sortBy = this.getTagglyOpt(title,"sortBy");\n var sortOrder = this.getTagglyOpt(title,"sortOrder");\n\n var list = store.getTaggedTiddlers(title,sortBy);\n\n if (sortOrder == "desc")\n list = list.reverse();\n\n var leftOvers = []\n for (var i=0;i<list.length;i++)\n leftOvers.push(list[i].title);\n\n var allTagsHolder = {};\n for (var i=0;i<list.length;i++) {\n for (var j=0;j<list[i].tags.length;j++) {\n\n if (list[i].tags[j] != title) { // not this tiddler\n\n if (!allTagsHolder[list[i].tags[j]])\n allTagsHolder[list[i].tags[j]] = "";\n\n allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"\n + this.getTaggingCount(list[i].title) + "\sn";\n leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers\n }\n }\n }\n\n var allTags = [];\n for (var t in allTagsHolder)\n allTags.push(t);\n\n var sortHelper = function(a,b) {\n if (a == b) return 0;\n if (a < b) return -1;\n return 1;\n };\n\n allTags.sort(function(a,b) {\n var tidA = store.getTiddler(a);\n var tidB = store.getTiddler(b);\n if (sortBy == "title") return sortHelper(a,b);\n else if (!tidA && !tidB) return 0;\n else if (!tidA) return -1;\n else if (!tidB) return +1;\n else return sortHelper(tidA[sortBy],tidB[sortBy]);\n });\n\n var leftOverOutput = "";\n for (var i=0;i<leftOvers.length;i++)\n leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + "\sn";\n\n var output = [];\n\n if (sortOrder == "desc")\n allTags.reverse();\n else if (leftOverOutput != "")\n // leftovers first...\n output.push(leftOverOutput);\n\n for (var i=0;i<allTags.length;i++)\n output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(leftOvers[i]) + "\sn" + allTagsHolder[allTags[i]]);\n\n if (sortOrder == "desc" && leftOverOutput != "")\n // leftovers last...\n output.push(leftOverOutput);\n\n return this.drawTable(place,\n this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),\n "grouped");\n\n },\n\n // used to build site map\n treeTraverse: function(title,depth,sortBy,sortOrder) {\n\n var list = store.getTaggedTiddlers(title,sortBy);\n if (sortOrder == "desc")\n list.reverse();\n\n var indent = "";\n for (var j=0;j<depth;j++)\n indent += "*"\n\n var childOutput = "";\n for (var i=0;i<list.length;i++)\n if (list[i].title != title)\n childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);\n\n if (depth == 0)\n return childOutput;\n else\n return indent + "[["+title+"]]" + this.getTaggingCount(title) + "\sn"+childOutput;\n },\n\n // this if for the site map mode\n createTagglyListSiteMap: function(place,title) {\n var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));\n return this.drawTable(place,\n this.makeColumns(output.split(/(?=^\s*\s[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic\n "sitemap"\n );\n },\n\n macros: {\n tagglyTagging: {\n handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n var refreshContainer = createTiddlyElement(place,"div");\n // do some refresh magic to make it keep the list fresh - thanks Saq\n refreshContainer.setAttribute("refresh","macro");\n refreshContainer.setAttribute("macroName",macroName);\n refreshContainer.setAttribute("title",tiddler.title);\n this.refresh(refreshContainer);\n },\n\n refresh: function(place) {\n var title = place.getAttribute("title");\n removeChildren(place);\n if (store.getTaggedTiddlers(title).length > 0) {\n var lingo = config.taggly.lingo;\n config.taggly.createListControl(place,title,"hideState");\n if (config.taggly.getTagglyOpt(title,"hideState") == "show") {\n createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));\n config.taggly.createListControl(place,title,"title");\n config.taggly.createListControl(place,title,"modified");\n config.taggly.createListControl(place,title,"created");\n config.taggly.createListControl(place,title,"listMode");\n config.taggly.createListControl(place,title,"numCols");\n config.taggly.createTagglyList(place,title);\n }\n }\n }\n }\n },\n\n // todo fix these up a bit\n styles: \n"/*{{{*/\sn"+\n"/* created by TagglyTaggingPlugin */\sn"+\n".tagglyTagging { padding-top:0.5em; }\sn"+\n".tagglyTagging li.listTitle { display:none; }\sn"+\n".tagglyTagging ul {\sn"+\n" margin-top:0px; padding-top:0.5em; padding-left:2em;\sn"+\n" margin-bottom:0px; padding-bottom:0px;\sn"+\n"}\sn"+\n".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\sn"+\n".tagglyTagging table { margin:0px; padding:0px; }\sn"+\n".tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\sn"+\n".tagglyTagging .button, .tagglyTagging .hidebutton {\sn"+\n" color:[[ColorPalette::TertiaryLight]]; font-size:90%;\sn"+\n" border:0px; padding-left:0.3em;padding-right:0.3em;\sn"+\n"}\sn"+\n".tagglyTagging .button:hover, .hidebutton:hover {\sn"+\n" background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];\sn"+\n"}\sn"+\n".selected .tagglyTagging .button {\sn"+\n" display:inline;\sn"+\n"}\sn"+\n".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }\sn"+\n".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }\sn"+\n".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }\sn"+\n".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\sn"+\n".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\sn"+\n".tagglyTagging ul ul li {margin-left:0.5em; }\sn"+\n".editLabel { font-size:90%; padding-top:0.5em; }\sn"+\n".tagglyTagging .commas { padding-left:1.8em; }\sn"+\n"/*}}}*/\sn"+\n "",\n\n init: function() {\n merge(config.macros,this.macros);\n config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;\n if (store)\n store.addNotification("TagglyTaggingStyles",refreshStyles);\n else\n config.notifyTiddlers.push({name:"TagglyTaggingStyles", notify: refreshStyles});\n }\n};\n\nconfig.taggly.init();\n\n//}}}\n\n
/***\nSave current layout: <<saveCurrentLayout>>\n***/\n\n//{{{\n\nconfig.stylr = {\n\n macros: {\n\n setPalette: {\n\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var paletteName = params[0] ? params[0] : tiddler.title;\n createTiddlyButton(place,"apply","Apply this palette",function(e) {\n config.stylr.updatePalette(tiddler.title);\n return false;\n });\n }\n },\n\n selectPalette: {\n\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n createTiddlyDropDown(place,config.stylr.onPaletteChange,this.getPalettes());\n },\n\n getPalettes: function() {\n var result = [\n {caption:"-select palette-", name:""},\n {caption:"(Default)", name:"(default)"}\n ];\n var tagged = store.getTaggedTiddlers("palette","title");\n for(var t=0; t<tagged.length; t++)\n result.push({caption:tagged[t].title, name:tagged[t].title});\n return result;\n }\n },\n\n applyLayout: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var title = params[0] ? params[0] : tiddler.title;\n \n createTiddlyButton(place,"apply","Activate the layout '"+title+"'",function(e) {\n var items = config.stylr.managedTiddlers;\n for (var i=0;i<items.length;i++) {\n var setTo = store.getTiddlerSlice(title,items[i]);\n if (setTo)\n config.stylr.applyStyleElement(items[i],setTo);\n }\n store.notifyAll();\n });\n }\n },\n\n saveCurrentLayout: {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n createTiddlyButton(place,"save current layout","Save tiddlers with the current layout",config.stylr.saveCurrentAs);\n }\n }\n },\n\n managedTiddlers: [\n "ViewTemplate",\n "EditTemplate",\n "PageTemplate",\n "StyleSheet"\n //"ColorPalette"\n ],\n\n onPaletteChange: function(e) {\n config.stylr.updatePalette(this.value);\n return true;\n },\n\n updatePalette: function(title) {\n if (title != "") {\n store.deleteTiddler("ColorPalette");\n if (title != "(default)")\n store.saveTiddler("ColorPalette","ColorPalette",store.getTiddlerText(title),\n config.options.txtUserName,undefined,"");\n this.refreshPalette();\n if(config.options.chkAutoSave)\n saveChanges(true);\n }\n },\n\n refreshPalette: function() {\n config.macros.refreshDisplay.onClick();\n },\n\n saveToShadow: function(which,target){\n config.shadowTiddlers[which] = "[["+target+"]]";\n },\n\n \n backupFormat: "%0 {Backup created by TiddlyStylr}",\n modifier: "TiddlyStylr",\n\n makeBackup: function(tiddler) {\n var t = store.resolveTiddler(tiddler);\n var backupTitle = this.backupFormat.format([t.title]);\n store.saveTiddler(backupTitle,backupTitle,t.text,t.modifier,t.modified,t.tags,t.fields);\n },\n\n saveWithNewContent: function(title,newContent,tags) {\n var t = store.fetchTiddler(title);\n if (t)\n store.saveTiddler(title,title,newContent,this.modifier,t.modified,t.tags,t.fields);\n else\n store.saveTiddler(title,title,newContent,this.modifier,null,tags);\n },\n\n save: function(which,content) {\n // because we are writing direct to a tiddler lets make a backup first\n if (store.tiddlerExists(which) && !store.tiddlerExists(this.backupFormat.format([which])) &&\n !store.fetchTiddler(which).modifier == config.stylr.modifier)\n this.makeBackup(which);\n this.saveWithNewContent(which,content);\n },\n\n copyTiddler: function(from,newTitle) {\n store.saveTiddler(newTitle,newTitle,store.getTiddlerText(from),this.modifier);\n },\n\n applyStyleElement: function(which,fromTiddler) {\n if (this.managedTiddlers.contains(which)) {\n // to prevent rogue updates...\n this.save(which,store.getTiddlerText(fromTiddler));\n }\n },\n\n promptForName: "Enter name for this style:",\n nameNotOkay: "%0 is not available. Please choose another name.",\n\n saveCurrentAs: function(e) {\n if (!e) var e = window.event;\n var theTarget = resolveTarget(e);\n\n var name = null;\n var nameOk = true;\n do {\n name = prompt(config.stylr.promptForName,"");\n nameOk = true;\n for (var i=0;i<config.stylr.managedTiddlers.length;i++) {\n var proposedName = name+config.stylr.managedTiddlers[i];\n if (store.tiddlerExists(proposedName) || store.isShadowTiddler(proposedName))\n nameOk = false;\n }\n if (!nameOk)\n alert(config.stylr.nameNotOkay.format([name]));\n } while (!name || !nameOk)\n\n var layoutContent = "";\n for (var i=0;i<config.stylr.managedTiddlers.length;i++) {\n var item = config.stylr.managedTiddlers[i];\n var newName = name+item;\n config.stylr.copyTiddler(config.stylr.managedTiddlers[i],newName);\n layoutContent += item + ": " + newName + "\sn";\n }\n config.stylr.saveWithNewContent(name+"Layout",layoutContent,"layout");\n story.displayTiddler(theTarget,name+"Layout");\n },\n\n init: function() {\n merge(config.macros,this.macros);\n }\n}\n\nconfig.stylr.init();\n\n//}}}\n\n
[img[tiddlyspot|http://tiddlyspot.com/_ts/images/banner-logo.png]]\nYour own wiki in seconds. Works offline.
/***\n| Name:|ToggleTagMacro|\n| Description:|Makes a checkbox which toggles a tag in a tiddler|\n| Version:|6.1.6|\n| Date:|06-Oct-2006|\n| Source:|http://tiddlyspot.com/mptw/#ToggleTagMacro|\n| Author:|SimonBaird|\n| License:|[[BSD open source license]]|\n| CoreVersion:|2.1|\n!Usage\n{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}\n* TagName - the tag to be toggled, default value "checked"\n* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler\n* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'\n(If a parameter is '.' then the default will be used)\n\nExamples:\n\n|Code|Description|Example|h\n|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|\n|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|\n|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|\n|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|\n|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|\n(Note if TiddlerName doesn't exist it will be silently created)\n\n!Known issues\n* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing. Should it stick the tag in the edit box?\n\n***/\n//{{{\n\nmerge(config.macros,{\n\n toggleTag: {\n\n doRefreshAll: true,\n createIfRequired: true,\n shortLabel: "[[%0]]",\n longLabel: "[[%0]] [[%1]]",\n\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var tag = (params[0] && params[0] != '.') ? params[0] : "checked";\n var title = (params[1] && params[1] != '.') ? params[1] : tiddler.title;\n var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);\n var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;\n var theTiddler = title == tiddler.title ? tiddler : store.getTiddler(title);\n var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {\n if (!theTiddler) {\n if (config.macros.toggleTag.createIfRequired)\n store.saveTiddler(title,title,"",config.options.txtUserName,new Date(),null);\n else\n return false;\n }\n //store.suspendNotifications(); \n store.setTiddlerTag(title,this.checked,tag);\n //refreshDisplay(); \n //store.resumeNotifications();\n return true;\n });\n }\n }\n});\n\n//}}}\n\n
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |\n| 7/10/2006 0:0:22 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 7/10/2006 0:3:0 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 7/10/2006 0:4:46 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 7/10/2006 0:5:51 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 7/10/2006 1:35:31 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 7/10/2006 1:37:24 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 7/10/2006 1:41:7 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 7/10/2006 1:44:12 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 7/10/2006 1:52:5 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 7/10/2006 1:55:43 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 10:10:16 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 10:10:49 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 10:11:15 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 10:11:59 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 10:12:25 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 10:13:7 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 11:51:32 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 11:51:54 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 11:54:1 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 11:54:34 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 12:5:0 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 12:17:39 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 12:18:0 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 12:19:14 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 12:21:13 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 12:22:39 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 12:24:50 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 12:27:53 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 12:28:28 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 12:29:16 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 16:46:21 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 16:48:30 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 16:53:50 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 16:54:49 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 16:56:9 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 16:56:51 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 17:0:0 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 17:0:38 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 18:14:37 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/10/2006 18:16:6 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 18:16:46 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 18:18:51 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 18:19:41 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/10/2006 18:19:50 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 10:25:51 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 10:52:54 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 16:38:41 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 16:39:36 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 16:42:27 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 16:45:34 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 16:47:34 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 16:48:2 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 16:50:36 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 10/10/2006 16:51:27 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 11/10/2006 11:41:43 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 12:43:28 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 12:45:26 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 12:48:47 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 12:58:21 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 12:59:41 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 13:0:17 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 13:0:46 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 13:1:48 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 13:4:25 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 14:18:42 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 14:19:34 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 14:20:52 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 14:21:34 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 14:22:13 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 14:32:46 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 14:33:38 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 14:33:52 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 14:34:45 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 14:41:42 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 14:42:4 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 14:42:50 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 17/10/2006 14:43:39 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 15:28:52 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 18:41:8 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 17/10/2006 18:42:37 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 8/11/2006 11:57:58 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 15/11/2006 10:58:21 | Simon | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/2/2007 15:15:34 | YourName | [[/|http://simon.tiddlyspot.com/#Example%20SiteTemplate2%20StyleSheet%20SiteTemplate]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 9/2/2007 15:18:15 | YourName | [[/|http://simon.tiddlyspot.com/#Example%20SiteTemplate2%20StyleSheet%20SiteTemplate]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/2/2007 15:27:39 | YourName | [[index.20070208.2119540000.html|http://simon.tiddlyspot.com/backup/index.20070208.2119540000.html]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 9/2/2007 15:29:40 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 27/4/2007 17:4:54 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 27/4/2007 17:31:34 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 27/4/2007 17:31:45 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 21/5/2007 11:18:13 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 21/5/2007 11:20:19 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 21/5/2007 11:21:36 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 21/5/2007 11:22:27 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 21/5/2007 11:26:28 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 21/5/2007 11:27:46 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 21/5/2007 11:29:24 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 23/11/2009 1:42:55 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |\n| 23/11/2009 1:43:13 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 25/11/2009 21:13:54 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 25/11/2009 21:14:14 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 5/1/2011 8:33:11 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 13/4/2011 20:6:47 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |\n| 1/7/2012 15:2:9 | YourName | [[/|http://simon.tiddlyspot.com/]] | [[store.cgi|http://simon.tiddlyspot.com/store.cgi]] | . | index.html | . |
/***\n<<tiddler UploadPluginDoc>>\n!Code\n***/\n//{{{\nversion.extensions.UploadPlugin = {\n major: 3, minor: 3, revision: 3, \n date: new Date(2006,6,30),\n type: 'macro',\n source: 'http://tiddlywiki.bidix.info/#UploadPlugin',\n docs: 'http://tiddlywiki.bidix.info/#UploadPluginDoc'\n};\n//}}}\n\n////+++!![config.lib.file]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.file) config.lib.file= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.file.dirname = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(0, lastpos);\n } else {\n return filePath.substring(0, filePath.lastIndexOf("\s\s"));\n }\n};\nconfig.lib.file.basename = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("#")) != -1) \n filePath = filePath.substring(0, lastpos);\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(lastpos + 1);\n } else\n return filePath.substring(filePath.lastIndexOf("\s\s")+1);\n};\nwindow.basename = function() {return "@@deprecated@@";};\n//}}}\n////===\n\n////+++!![config.lib.log]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.log) config.lib.log= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.Log = function(tiddlerTitle, logHeader) {\n if (version.major < 2)\n this.tiddler = store.tiddlers[tiddlerTitle];\n else\n this.tiddler = store.getTiddler(tiddlerTitle);\n if (!this.tiddler) {\n this.tiddler = new Tiddler();\n this.tiddler.title = tiddlerTitle;\n this.tiddler.text = "| !date | !user | !location |" + logHeader;\n this.tiddler.created = new Date();\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[tiddlerTitle] = this.tiddler;\n else\n store.addTiddler(this.tiddler);\n }\n return this;\n};\n\nconfig.lib.Log.prototype.newLine = function (line) {\n var now = new Date();\n var newText = "| ";\n newText += now.getDate()+"/"+(now.getMonth()+1)+"/"+now.getFullYear() + " ";\n newText += now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+" | ";\n newText += config.options.txtUserName + " | ";\n var location = document.location.toString();\n var filename = config.lib.file.basename(location);\n if (!filename) filename = '/';\n newText += "[["+filename+"|"+location + "]] |";\n this.tiddler.text = this.tiddler.text + "\sn" + newText;\n this.addToLine(line);\n};\n\nconfig.lib.Log.prototype.addToLine = function (text) {\n this.tiddler.text = this.tiddler.text + text;\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[this.tiddler.tittle] = this.tiddler;\n else {\n store.addTiddler(this.tiddler);\n story.refreshTiddler(this.tiddler.title);\n store.notify(this.tiddler.title, true);\n }\n if (version.major < 2)\n store.notifyAll(); \n};\n//}}}\n////===\n\n////+++!![config.lib.options]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.options) config.lib.options = {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\n\nconfig.lib.options.init = function (name, defaultValue) {\n if (!config.options[name]) {\n config.options[name] = defaultValue;\n saveOptionCookie(name);\n }\n};\n//}}}\n////===\n\n////+++!![PasswordTweak]\n\n//{{{\nversion.extensions.PasswordTweak = {\n major: 1, minor: 0, revision: 2, date: new Date(2006,3,11),\n type: 'tweak',\n source: 'http://tiddlywiki.bidix.info/#PasswordTweak'\n};\n//}}}\n/***\n!!config.macros.option\n***/\n//{{{\nconfig.macros.option.passwordCheckboxLabel = "Save this password on this computer";\nconfig.macros.option.passwordType = "password"; // password | text\n\nconfig.macros.option.onChangeOption = function(e)\n{\n var opt = this.getAttribute("option");\n var elementType,valueField;\n if(opt) {\n switch(opt.substr(0,3)) {\n case "txt":\n elementType = "input";\n valueField = "value";\n break;\n case "pas":\n elementType = "input";\n valueField = "value";\n break;\n case "chk":\n elementType = "input";\n valueField = "checked";\n break;\n }\n config.options[opt] = this[valueField];\n saveOptionCookie(opt);\n var nodes = document.getElementsByTagName(elementType);\n for(var t=0; t<nodes.length; t++) {\n var optNode = nodes[t].getAttribute("option");\n if (opt == optNode) \n nodes[t][valueField] = this[valueField];\n }\n }\n return(true);\n};\n\nconfig.macros.option.handler = function(place,macroName,params)\n{\n var opt = params[0];\n var size = 15;\n if (params[1])\n size = params[1];\n if(config.options[opt] === undefined) {\n return;}\n var c;\n switch(opt.substr(0,3)) {\n case "txt":\n c = document.createElement("input");\n c.onkeyup = this.onChangeOption;\n c.setAttribute ("option",opt);\n c.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\n break;\n case "pas":\n // input password\n c = document.createElement ("input");\n c.setAttribute("type",config.macros.option.passwordType);\n c.onkeyup = this.onChangeOption;\n c.setAttribute("option",opt);\n c.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\n // checkbox link with this password "save this password on this computer"\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option","chk"+opt);\n place.appendChild(c);\n c.checked = config.options["chk"+opt];\n // text savePasswordCheckboxLabel\n place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));\n break;\n case "chk":\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option",opt);\n place.appendChild(c);\n c.checked = config.options[opt];\n break;\n }\n};\n//}}}\n/***\n!! Option cookie stuff\n***/\n//{{{\nwindow.loadOptionsCookie_orig_PasswordTweak = window.loadOptionsCookie;\nwindow.loadOptionsCookie = function()\n{\n var cookies = document.cookie.split(";");\n for(var c=0; c<cookies.length; c++) {\n var p = cookies[c].indexOf("=");\n if(p != -1) {\n var name = cookies[c].substr(0,p).trim();\n var value = cookies[c].substr(p+1).trim();\n switch(name.substr(0,3)) {\n case "txt":\n config.options[name] = unescape(value);\n break;\n case "pas":\n config.options[name] = unescape(value);\n break;\n case "chk":\n config.options[name] = value == "true";\n break;\n }\n }\n }\n};\n\nwindow.saveOptionCookie_orig_PasswordTweak = window.saveOptionCookie;\nwindow.saveOptionCookie = function(name)\n{\n var c = name + "=";\n switch(name.substr(0,3)) {\n case "txt":\n c += escape(config.options[name].toString());\n break;\n case "chk":\n c += config.options[name] ? "true" : "false";\n // is there an option link with this chk ?\n if (config.options[name.substr(3)]) {\n saveOptionCookie(name.substr(3));\n }\n break;\n case "pas":\n if (config.options["chk"+name]) {\n c += escape(config.options[name].toString());\n } else {\n c += "";\n }\n break;\n }\n c += "; expires=Fri, 1 Jan 2038 12:00:00 UTC; path=/";\n document.cookie = c;\n};\n//}}}\n/***\n!! Initializations\n***/\n//{{{\n// define config.options.pasPassword\nif (!config.options.pasPassword) {\n config.options.pasPassword = 'defaultPassword';\n window.saveOptionCookie('pasPassword');\n}\n// since loadCookies is first called befor password definition\n// we need to reload cookies\nwindow.loadOptionsCookie();\n//}}}\n////===\n\n////+++!![config.macros.upload]\n\n//{{{\nconfig.macros.upload = {\n accessKey: "U",\n formName: "UploadPlugin",\n contentType: "text/html;charset=UTF-8",\n defaultStoreScript: "store.php"\n};\n\n// only this two configs need to be translated\nconfig.macros.upload.messages = {\n aboutToUpload: "About to upload TiddlyWiki to %0",\n errorDownloading: "Error downloading",\n errorUploadingContent: "Error uploading content",\n fileNotFound: "file to upload not found",\n fileNotUploaded: "File %0 NOT uploaded",\n mainFileUploaded: "Main TiddlyWiki file uploaded to %0",\n urlParamMissing: "url param missing",\n rssFileNotUploaded: "RssFile %0 NOT uploaded",\n rssFileUploaded: "Rss File uploaded to %0"\n};\n\nconfig.macros.upload.label = {\n promptOption: "Save and Upload this TiddlyWiki with UploadOptions",\n promptParamMacro: "Save and Upload this TiddlyWiki in %0",\n saveLabel: "save to web", \n saveToDisk: "save to disk",\n uploadLabel: "upload" \n};\n\nconfig.macros.upload.handler = function(place,macroName,params){\n // parameters initialization\n var storeUrl = params[0];\n var toFilename = params[1];\n var backupDir = params[2];\n var uploadDir = params[3];\n var username = params[4];\n var password; // for security reason no password as macro parameter\n var label;\n if (document.location.toString().substr(0,4) == "http")\n label = this.label.saveLabel;\n else\n label = this.label.uploadLabel;\n var prompt;\n if (storeUrl) {\n prompt = this.label.promptParamMacro.toString().format([this.dirname(storeUrl)]);\n }\n else {\n prompt = this.label.promptOption;\n }\n createTiddlyButton(place, label, prompt, \n function () {\n config.macros.upload.upload(storeUrl, toFilename, uploadDir, backupDir, username, password); \n return false;}, \n null, null, this.accessKey);\n};\nconfig.macros.upload.UploadLog = function() {\n return new config.lib.Log('UploadLog', " !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |" );\n};\nconfig.macros.upload.UploadLog.prototype = config.lib.Log.prototype;\nconfig.macros.upload.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {\n var line = " [[" + config.lib.file.basename(storeUrl) + "|" + storeUrl + "]] | ";\n line += uploadDir + " | " + toFilename + " | " + backupDir + " |";\n this.newLine(line);\n};\nconfig.macros.upload.UploadLog.prototype.endUpload = function() {\n this.addToLine(" Ok |");\n};\nconfig.macros.upload.basename = config.lib.file.basename;\nconfig.macros.upload.dirname = config.lib.file.dirname;\nconfig.macros.upload.upload = function(storeUrl, toFilename, uploadDir, backupDir, username, password)\n{\n // parameters initialization\n storeUrl = (storeUrl ? storeUrl : config.options.txtUploadStoreUrl);\n toFilename = (toFilename ? toFilename : config.options.txtUploadFilename);\n backupDir = (backupDir ? backupDir : config.options.txtUploadBackupDir);\n uploadDir = (uploadDir ? uploadDir : config.options.txtUploadDir);\n username = (username ? username : config.options.txtUploadUserName);\n password = config.options.pasUploadPassword; // for security reason no password as macro parameter\n if (storeUrl === '') {\n config.macros.upload.defaultStoreScript;\n }\n if (config.lib.file.dirname(storeUrl) === '') {\n storeUrl = config.lib.file.dirname(document.location.toString())+'/'+storeUrl;\n }\n if (toFilename === '') {\n toFilename = config.lib.file.basename(document.location.toString());\n }\n\n clearMessage();\n // only for forcing the message to display\n if (version.major < 2)\n store.notifyAll();\n if (!storeUrl) {\n alert(config.macros.upload.messages.urlParamMissing);\n return;\n }\n \n var log = new this.UploadLog();\n log.startUpload(storeUrl, toFilename, uploadDir, backupDir);\n if (document.location.toString().substr(0,5) == "file:") {\n saveChanges();\n }\n displayMessage(config.macros.upload.messages.aboutToUpload.format([this.dirname(storeUrl)]), this.dirname(storeUrl));\n this.uploadChanges(storeUrl, toFilename, uploadDir, backupDir, username, password);\n if(config.options.chkGenerateAnRssFeed) {\n //var rssContent = convertUnicodeToUTF8(generateRss());\n var rssContent = generateRss();\n var rssPath = toFilename.substr(0,toFilename.lastIndexOf(".")) + ".xml";\n this.uploadContent(rssContent, storeUrl, rssPath, uploadDir, '', username, password, \n function (responseText) {\n if (responseText.substring(0,1) != '0') {\n displayMessage(config.macros.upload.messages.rssFileNotUploaded.format([rssPath]));\n }\n else {\n if (uploadDir) {\n rssPath = uploadDir + "/" + config.macros.upload.basename(rssPath);\n } else {\n rssPath = config.macros.upload.basename(rssPath);\n }\n displayMessage(config.macros.upload.messages.rssFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+rssPath]), config.macros.upload.dirname(storeUrl)+"/"+rssPath);\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n });\n }\n return;\n};\n\nconfig.macros.upload.uploadChanges = function(storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var original;\n if (document.location.toString().substr(0,4) == "http") {\n original = this.download(storeUrl, toFilename, uploadDir, backupDir, username, password);\n return;\n }\n else {\n // standard way : Local file\n \n original = loadFile(getLocalPath(document.location.toString()));\n if(window.Components) {\n // it's a mozilla browser\n try {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]\n .createInstance(Components.interfaces.nsIScriptableUnicodeConverter);\n converter.charset = "UTF-8";\n original = converter.ConvertToUnicode(original);\n }\n catch(e) {\n }\n }\n }\n //DEBUG alert(original);\n this.uploadChangesFrom(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password);\n};\n\nconfig.macros.upload.uploadChangesFrom = function(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var startSaveArea = '<div id="' + 'storeArea">'; // Split up into two so that indexOf() of this source doesn't find it\n var endSaveArea = '</d' + 'iv>';\n // Locate the storeArea div's\n var posOpeningDiv = original.indexOf(startSaveArea);\n var posClosingDiv = original.lastIndexOf(endSaveArea);\n if((posOpeningDiv == -1) || (posClosingDiv == -1))\n {\n alert(config.messages.invalidFileError.format([document.location.toString()]));\n return;\n }\n var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + \n allTiddlersAsHtml() + "\sn\st\st" +\n original.substr(posClosingDiv);\n var newSiteTitle;\n if(version.major < 2){\n newSiteTitle = (getElementText("siteTitle") + " - " + getElementText("siteSubtitle")).htmlEncode();\n } else {\n newSiteTitle = (wikifyPlain ("SiteTitle") + " - " + wikifyPlain ("SiteSubtitle")).htmlEncode();\n }\n revised = revised.replace(new RegExp("<title>[^<]*</title>", "im"),"<title>"+ newSiteTitle +"</title>");\n var response = this.uploadContent(revised, storeUrl, toFilename, uploadDir, backupDir, \n username, password, function (responseText) {\n if (responseText.substring(0,1) != '0') {\n alert(responseText);\n displayMessage(config.macros.upload.messages.fileNotUploaded.format([getLocalPath(document.location.toString())]));\n }\n else {\n if (uploadDir !== '') {\n toFilename = uploadDir + "/" + config.macros.upload.basename(toFilename);\n } else {\n toFilename = config.macros.upload.basename(toFilename);\n }\n displayMessage(config.macros.upload.messages.mainFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+toFilename]), config.macros.upload.dirname(storeUrl)+"/"+toFilename);\n var log = new config.macros.upload.UploadLog();\n log.endUpload();\n store.setDirty(false);\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n }\n );\n};\n\nconfig.macros.upload.uploadContent = function(content, storeUrl, toFilename, uploadDir, backupDir, \n username, password, callbackFn) {\n var boundary = "---------------------------"+"AaB03x"; \n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n if (window.netscape){\n try {\n if (document.location.toString().substr(0,4) != "http") {\n netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');}\n }\n catch (e) { }\n } \n //DEBUG alert("user["+config.options.txtUploadUserName+"] password[" + config.options.pasUploadPassword + "]");\n // compose headers data\n var sheader = "";\n sheader += "--" + boundary + "\sr\snContent-disposition: form-data; name=\s"";\n sheader += config.macros.upload.formName +"\s"\sr\sn\sr\sn";\n sheader += "backupDir="+backupDir\n +";user=" + username \n +";password=" + password\n +";uploaddir=" + uploadDir\n + ";;\sr\sn"; \n sheader += "\sr\sn" + "--" + boundary + "\sr\sn";\n sheader += "Content-disposition: form-data; name=\s"userfile\s"; filename=\s""+toFilename+"\s"\sr\sn";\n sheader += "Content-Type: " + config.macros.upload.contentType + "\sr\sn";\n sheader += "Content-Length: " + content.length + "\sr\sn\sr\sn";\n // compose trailer data\n var strailer = new String();\n strailer = "\sr\sn--" + boundary + "--\sr\sn";\n var data;\n data = sheader + content + strailer;\n //request.open("POST", storeUrl, true, username, password);\n request.open("POST", storeUrl, true);\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if (request.status == 200)\n callbackFn(request.responseText);\n else\n alert(config.macros.upload.messages.errorUploadingContent);\n }\n };\n request.setRequestHeader("Content-Length",data.length);\n request.setRequestHeader("Content-Type","multipart/form-data; boundary="+boundary);\n request.send(data); \n};\n\n\nconfig.macros.upload.download = function(uploadUrl, uploadToFilename, uploadDir, uploadBackupDir, \n username, password) {\n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n try {\n if (uploadUrl.substr(0,4) == "http") {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n }\n else {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n }\n } catch (e) { }\n //request.open("GET", document.location.toString(), true, username, password);\n request.open("GET", document.location.toString(), true);\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if(request.status == 200) {\n config.macros.upload.uploadChangesFrom(request.responseText, uploadUrl, \n uploadToFilename, uploadDir, uploadBackupDir, username, password);\n }\n else\n alert(config.macros.upload.messages.errorDownloading.format(\n [document.location.toString()]));\n }\n };\n request.send(null);\n};\n\n//}}}\n////===\n\n////+++!![Initializations]\n\n//{{{\nconfig.lib.options.init('txtUploadStoreUrl','store.php');\nconfig.lib.options.init('txtUploadFilename','');\nconfig.lib.options.init('txtUploadDir','');\nconfig.lib.options.init('txtUploadBackupDir','');\nconfig.lib.options.init('txtUploadUserName',config.options.txtUserName);\nconfig.lib.options.init('pasUploadPassword','');\nconfig.shadowTiddlers.UploadPluginDoc = "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadPluginDoc ]]\sn"; \n\n\n//}}}\n////===\n\n////+++!![Core Hijacking]\n\n//{{{\nconfig.macros.saveChanges.label_orig_UploadPlugin = config.macros.saveChanges.label;\nconfig.macros.saveChanges.label = config.macros.upload.label.saveToDisk;\n\nconfig.macros.saveChanges.handler_orig_UploadPlugin = config.macros.saveChanges.handler;\n\nconfig.macros.saveChanges.handler = function(place)\n{\n if ((!readOnly) && (document.location.toString().substr(0,4) != "http"))\n createTiddlyButton(place,this.label,this.prompt,this.onClick,null,null,this.accessKey);\n}\n\n//}}}\n////===
/***\n| Name:|ViewPalettePlugin|\n| Description:|Defines the viewPalette macro for use in ViewTemplate|\n| Version:|2.0.0|\n| Date:|26-Sep-2006|\n| Source:|http://mptw.tiddlyspot.com/#ViewPalettePlugin|\n| Author:|Simon Baird <simon.baird@gmail.com>|\n| CoreVersion:|2.1.x|\n***/\n//{{{\nmerge(config.macros,{\n viewPalette: {\n title: 'Palette Preview',\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var title = params[0] ? params[0] : tiddler.title; \n var colors = store.calcAllSlices(title);\n var keys = [];\n for (c in colors) keys.push(c);\n var output = '';\n var prefix;\n var lastPrefix;\n output += ""+\n //'<h2>'+this.title+'</h2>'+\n '<table align="right" cellspacing="0" style="border-collapse:collapse;"><tr>'+\n '<td style="border:1px solid #555;font-size:50%;padding:0 2em;background:'+colors[keys[0]]+'">&nbsp;</td>'+\n '<td rowspan="'+keys.length+'">'+\n '<table cellspacing="0" style="border:1px solid #555;width:22em;background:%8;margin-left:2em;">'+\n '<tr><td colspan="2" style="font-size:120%;background:%0;width=200px;padding:1em;font-weight:bold;color:%1">'+\n 'TiddlyWiki'+\n '</td>'+\n '<td style="background:%0;font-size:90%;text-align:right;">'+\n '<span style="background:%4;margin-right:1em;padding:0 1em;">message</span>'+\n '</td>'+\n '</tr>'+\n '<tr>'+\n '<td rowspan="3" style="color:%0;vertical-align:top;padding:4px;">Hello<br/>Started<br/>Monkey</td>'+\n '<td style="padding:0.7em;color:%3;"><b style="color:%5;font-size:120%;">HelloThere</b><br/>'+\n 'Lorem ipsum <b style="color:%0">dolor</b> sit amet, consectetuer adipiscing elit. </td>'+\n '<td rowspan="3" style="vertical-align:top;font-size:80%;">search<br/>new tiddler<br/>options<br/>'+\n '<div style="background:%6;margin-top:0.5em;padding:2px;color:%7">'+\n '<span style="background:%7;color:%3;">Timeline</span>&nbsp;Tags</div>'+\n '<div style="background:%7;color:%0;padding:4px;">Ninja<br/>Dolphin<br/>FooBar<br/>BazQux</div>'+\n '</td>'+\n '</tr>'+\n '<tr>'+\n '<td style="padding:0.7em;color:%3;"><b style="color:%5;font-size:120%;">GettingStarted</b><br/>'+\n 'Proin vel felis vel ipsum <b style="color:%0">fermentum</b> eleifend. </td>'+\n '</tr>'+\n '<tr>'+\n '<td style="padding:0.7em;">'+\n '<span style="padding:0 2px;background:%9;color:3%;">error</span>'+\n '</td>'+\n '</tr>'+\n '</table>'+\n '</td>'+\n '</tr>';\n\n for (var i=1;i<keys.length;i++)\n output += '<tr><td style="border:1px solid #ccc;font-size:50%;padding:0 2em;background:'+colors[keys[i]]+'">&nbsp;</td></tr>';\n\n output+= '</table>';\n \n wikify("<html>"+output.format([\n colors.PrimaryMid, //0\n colors.PrimaryPale, //1\n colors.PrimaryDark, //2\n colors.Foreground, //3\n colors.SecondaryMid, //4\n colors.SecondaryDark, //5\n colors.TertiaryMid, //6\n colors.TertiaryPale, //7\n colors.Background, //8\n colors.Error, //9\n ''])+"</html>",place);\n }\n }\n});\n\nsetStylesheet(''+\n '.viewPalette div { text-align:right; vertical-align:top; float:left; padding:2px; width:80px; height:50px; }\sn'+\n '.viewPalette div span { padding:0 0.5em;background:white; border:1px solid black; font-size:80%; }\sn'+\n '',"showPaletteStyles");\n\n//}}}\n\n
<!--{{{-->\n<div class='toolbar'>\n <!-- some custom contextual checkboxes -->\n <span style="padding-right:2em;">\n\n <span macro="showWhen config.macros.setPalette && tiddler.tags.contains('palette')">\n <span macro="setPalette"></span>\n </span>\n <span macro="showWhen config.macros.applyLayout && tiddler.tags.contains('layout')">\n <span macro="applyLayout"></span>\n </span>\n\n <span macro="showWhen tiddler.tags.contains('systemConfig')">\n <span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>\n <!-- <span macro="toggleTag systemConfigForce . '[[force|systemConfigForce]]'"></span> -->\n </span>\n </span>\n <!-- regular toolbar -->\n <span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler undoChanges permalink newHere'></span> <!-- references jump newJournalHere -->\n</div>\n<!-- regular tags macro but uses taggly css -->\n<div class="tagglyTagged" macro="tags"></div>\n<div>\n <span class='title' macro='view title'></span>\n <span macro="miniTag"></span>\n</div>\n<div class='subtitle'>\n <span macro='view modifier link'></span>,\n <span macro='view modified date [[DD-mmm-YY]]'></span>\n (<span macro='message views.wikified.createdPrompt'></span>\n <span macro='view created date [[DD-mmm-YY]]'></span>)\n</div>\n<!-- using taggly versions of these two\n<div class='tagging' macro='tagging'></div>\n<div class='tagged' macro='tags'></div> -->\n\n<div macro="showWhen tiddler.tags.contains('friend')">\n Favourite food: <span macro="view favouriteFood"></span>\n</div>\n\n<div macro="showWhen tiddler.tags.contains('palette')" style="width:1%;float:right;padding-top:1em;"><div macro="viewPalette"></div></div>\n\n<div macro="hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer' macro='view text wikified'></div>\n</div>\n<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">\n <div class='viewer'><pre macro='view text'></pre></div>\n</div>\n<div class="tagglyTagging" macro="tagglyTagging"></div>\n<div class='tagClear'></div>\n<!--}}}-->\n
http://simonbaird.com/
Welcome to my tiddlyspot tiddlywiki. There's not a lot here but there's a little bit more about me at my [[my web site|Web site]]. \n\n[img[http://simonbaird.com/images/wild.jpg]]\n\ntest11
This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.\n\n@@font-weight:bold;font-size:1.3em;color:#444; //What now?// &nbsp;&nbsp;@@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://simon.tiddlyspot.com/controlpanel]] (your control panel username is //simon//).\n<<tiddler tiddlyspotControls>>\n@@font-weight:bold;font-size:1.3em;color:#444; //Working online// &nbsp;&nbsp;@@ You can edit this ~TiddlyWiki right now, and save your changes using the "save to web" button in the column on the right.\n\n@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// &nbsp;&nbsp;@@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click "upload" and your ~TiddlyWiki will be saved back to tiddlyspot.com.\n\n@@font-weight:bold;font-size:1.3em;color:#444; //Help!// &nbsp;&nbsp;@@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki Guides|http://tiddlywikiguides.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].\n\n@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// &nbsp;&nbsp;@@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions.
asdf
It's a [[Joanna Newsome thing|http://www.fromamouth.com/milkymoon/lyrics.htm#BridgesAndBalloons]].
| tiddlyspot password:|<<option pasUploadPassword>>|\n| site management:|<<upload http://simon.tiddlyspot.com/store.cgi index.html . . simon>>//(requires tiddlyspot password)//<<br>>[[control panel|http://simon.tiddlyspot.com/controlpanel]], [[download (go offline)|http://simon.tiddlyspot.com/download]]|\n| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[announcements|http://announce.tiddlyspot.com/]], [[blog|http://tiddlyspot.com/blog/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|