!!!!A Digital Corpus of Croatian Latin Writers\n\nCroatia has a rich and varied TraditionOfWritingInLatin. \n\nThe CroatiaeAuctoresLatini (CAuLa) digital collection aims to gather texts from this tradition in one easily accessible, usable, and searchable corpus. The CroatiaeAuctoresLatini project functions at two levels: at one level, we DigitizeAndEncode the texts; at another, we DesignAndBuild an interface to the CAuLa corpus. The interface should help scholars and readers both to better understand this facet of Croatian and European cultural heritage, and to explore and analyse it as they have not done before.\n\n\n
The CAuLa corpus intends to simplify and enhance access to materials which are often rare, precious, and fragile (manuscripts, early printed books). By providing digital versions of the documents, the CAuLa corpus will help preserve these materials for future use and research. \n\nGo from here to ProvideTools.\n
*Establish a frame for collecting research and material on Croatian neo-Latin writers. \n*Publish on the internet a corpus of some 2 million Latin words, by 130 Croatian authors writing in Latin from the Middle Ages onwards. \n*Prepare the corpus by digitizing some 15.000 pages of already published text (published in old, rare, or not easily accessible editions) and 1000 pages from manuscript. \n*Enhance this material by additional proofreading, metadata, and markup (following the non-proprietary TEI XML standard), and by other types of media. \n*Support and encourage new scholarship, both in-depth research (made possible by a computer-searchable corpus) and wide syntheses and interpretations (but relying on more precise, more explicit and controllable data, and therefore much more falsifiable). \n*Remind people of material dimension of these texts. \n*Open the collection to other kinds of research, to a community of researchers, both international and Croatian, from various disciplines (history, art history, anthropology, etc).\n\nGo from here to: \n*[[Digitizing textual heritage]]\n*[[Digitizing cultural heritage in Latin]]\n*[[Digitizing neo-Latin heritage]]\n
| source file|{{{D:\shtml\stiddlytools\sclock.swf}}}|\n| attached on|30 November 2006 by ELSDesignStudios|\n| description|flash-based analog clock|\n| embedded data|//none//|\n| local link|/%LOCAL_LINK%/[[clock.swf|clock.swf]]|\n| remote link|/%REMOTE_LINK%/[[http://www.TiddlyTools.com/clock.swf|http://www.TiddlyTools.com/clock.swf]]|\n\nUsage:\nexternal link:\n> {{{[[click to open|AnalogClock]]}}}\n> [[click to open|AnalogClock]]\nembedded player (requires http://www.TiddlyTools.com/#PlayerPlugin):\n> {{{<<player flash AnalogClock 400px 400px>>}}}\n> <<player flash AnalogClock 400px 400px>>
text/plain\n.txt .text .js .vbs .asp .cgi .pl\n----\ntext/html\n.htm .html .hta .htx .mht\n----\ntext/comma-separated-values\n.csv\n----\ntext/javascript\n.js\n----\ntext/css\n.css\n----\ntext/xml\n.xml .xsl .xslt\n----\nimage/gif\n.gif\n----\nimage/jpeg\n.jpg .jpe .jpeg\n----\nimage/png\n.png\n----\nimage/bmp\n.bmp\n----\nimage/tiff\n.tif .tiff\n----\naudio/basic\n.au .snd\n----\naudio/wav\n.wav\n----\naudio/x-pn-realaudio\n.ra .rm .ram\n----\naudio/x-midi\n.mid .midi\n----\naudio/mp3\n.mp3\n----\naudio/m3u\n.m3u\n----\nvideo/x-ms-asf\n.asf\n----\nvideo/avi\n.avi\n----\nvideo/mpeg\n.mpg .mpeg\n----\nvideo/quicktime\n.qt .mov .qtvr\n----\napplication/pdf\n.pdf\n----\napplication/rtf\n.rtf\n----\napplication/postscript\n.ai .eps .ps\n----\napplication/wordperfect\n.wpd\n----\napplication/mswrite\n.wri\n----\napplication/msexcel\n.xls .xls3 .xls4 .xls5 .xlw\n----\napplication/msword\n.doc\n----\napplication/mspowerpoint\n.ppt .pps\n----\napplication/x-director\n.swa\n----\napplication/x-shockwave-flash\n.swf\n----\napplication/x-zip-compressed\n.zip\n----\napplication/x-gzip\n.gz\n----\napplication/x-rar-compressed\n.rar\n----\napplication/octet-stream\n.com .exe .dll .ocx
/***\n|''Name:''|AttachFilePlugin|\n|''Source:''|http://www.TiddlyTools.com/#AttachFilePlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nStore or link binary files (such as jpg, gif, pdf or even mp3) within your TiddlyWiki document and then use them as images or links from within your tiddler content. Binary file content can be stored in three different locations:\n<<<\n#embedded in the attachment tiddler (encoded as base64)\n#on your filesystem (a 'local link' path/filename)\n#on a web server (a 'remote link' URL)\n<<<\nThe plugin creates an "attachment tiddler" for each file you attach. Regardless of where you store the binary content, your document can refer to the attachment tiddler rather than using a direct file or URL reference in your embedded image or external links, so that changing document locations will not require updating numerous tiddlers or copying files from one system to another.\n\n@@display:block;font-size:8pt;line-height:110%;Note: although you can edit an attachment tiddler, ''don't change any of the encoded content below the attachment header'', as it has been prepared for use in the rest of your document, and even changing a single character can make the attachment unusable. //If needed, you ''can'' edit the header information or even the MIME type declaration in the attachment data, but be very careful not to change any of the base64-encoded binary data.//@@\n!!!!!Inline interface (live)\n><<attach demoID>>\n!!!!!Usage\n<<<\nWhen you attach a file, a tiddler (tagged with<<tag attachment>>) is generated (using the source filename as the tiddler's title). The tiddler contains //''base64 text-encoded binary data''//, surrounded by {{{/%...%/}}} comment markers (so they are not visible when viewing the tiddler). The tiddler also includes summary details about the file: when it was attached, by whom, etc. and, if the attachment is an image file (jpg, gif, or png), the image is automatically displayed below the summary information.\n\nWith embedded data, your TW document can be completely self-contained...unfortunately, embedding just a few moderately-sized binary files using base64 text-encoding can dramatically increase the size of your document. To avoid this problem, you can create attachment tiddlers that define external local filesystem (file://) and/or remote web server (http://) 'reference' links, without embedding the binary data directly in the tiddler (i.e., uncheck "embed data" in the 'control panel').\n\nThese links provide an alternative source for the binary data: if embedded data is not found (or you are running on Internet Explorer, which does not currently support using embedded data), then the plugin tries the local filesystem reference. If a local file is not found, then the remote reference (if any) is used. This "fallback" approach also lets you 'virtualize' the external links in your document, so that you can access very large binary content such as PDFs, MP3's, and even *video* files, by using just a 'remote reference link' without embedding any data or downloading huge files to your hard disk.\n\nOf course, when you //do// download an attached file, the local copy will be used instead of accessing a remote server each time, thereby saving bandwidth and allowing you to 'go mobile' without having to edit any tiddlers to alter the link locations...\n\nLastly, though not completed (but nearly there), the plugin includes an integrated 'uploader' that will let you create a 'remote link' attachment tiddler AND transfer the local file to a remote server location in the same step!\n<<<\n!!!!!Syntax / Examples\n<<<\nTo embed attached files as images or link to them from other tiddlers, use the standard ~TiddlyWiki image syntax ({{{[img[tooltip|filename]]}}}), linked image syntax ({{{[img[tooltip|filename][tiddlername]]}}}) , or "external link" syntax ({{{[[text|URL]]}}}), replacing the filename or URL that is normally entered with the title of an attachment tiddler.\n\nembedded image data:\n>{{{[img[Meow|AttachFileSample]]}}}\n>[img[Meow|AttachFileSample]]\nembedded image data with link to larger remote image:\n>{{{[img[click for larger view|AttachFileSample][AttachFileSample2]]}}}\n>[img[click for larger view|AttachFileSample][AttachFileSample2]]\n'external' link to embedded image data:\n>{{{[[click to view attachment|AttachFileSample]]}}}\n>[[click to view attachment|AttachFileSample]]\n'external' link to remote image:\n>{{{[[click to view attachment|AttachFileSample2]]}}}\n>[[click to view attachment|AttachFileSample2]]\nregular ~TiddlyWiki links to attachment tiddlers:\n>{{{[[AttachFileSample]]}}} [[AttachFileSample]]\n>{{{[[AttachFileSample2]]}}} [[AttachFileSample2]]\n<<<\n!!!!!Defining MIME types and Server Scripts\n<<<\nWhen you select a source file, a ''[[MIME|http://en.wikipedia.org/wiki/MIME]]'' file type is automatically suggested, based on filename extension. The AttachFileMIMETypes tiddler defines the list of MIME types that will be recognized by the plugin. Each MIME type definition consists of exactly two lines of text: the official MIME type designator (e.g., "text/plain", "image/gif", etc.), and a space-separated list of file extensions associated with that type. List entries are separated by "----" (horizontal rules).\n\nTo upload files, a script must first be installed on a remote server so it can receive and store the files online. The AttachFileServerScripts tiddler defines the list of ''server scripts'' that will be available for you to select from when attaching and uploading a file. The list format is as described above for MIME types, except that the first line is simply the text that will appear in the ''server scripts'' droplist, while the second line is the fully-qualified URL for submitting files to that server (e.g., {{{http://www.xyz.com/path/to/cgi-bin/upload.cgi}}} or something similar).\n<<<\n!!!!!Known Limitations\n<<<\n* ''Internet Explorer does not support the use of //embedded// data for TW file attachments. However, you can still use the local/remote link definitions to create file attachments that are stored externally''\n## //while it is easy to read text files, reading binary files is not supported by IE's FileSystemObject (FSO) methods, and other file I/O techniques are subject to security barriers or require additional MS proprietary technologies (like ASP or VB) that make implementation more difficult.//\n## //IE does not support the data: URI scheme, and cannot render the embedded images or links. This would seem to be an insurmountable shortcoming in the browser. Let's hope it is added in the next version...//\n<<<\n!!!!!Installation\n<<<\nImport (or copy/paste) the following tiddlers into your document:\n* AttachFilePlugin (tagged with <<tag systemConfig>>)\n* AttachFilePluginFormatters ("distribution library") (tagged with <<tag systemConfig>>)\n* AttachFileSample and AttachFileSample2 //(sample attachment tiddler containing an image file)//\n* AttachFileMIMETypes //(defines known binary file types)//\n* AttachFileServerScripts //(remote upload server locations)//\n<<<\n!!!!!Revision History\n<<<\n''2006.11.30 [3.5.0]'' in getAttachment(), for local references, add check for file existence and fallback to remote URL if local file not found. Added fileExists() to encapsulate FF vs. IE local file test function (IE FSO object code is TBD).\n''2006.11.29 [3.4.8]'' in hijack for PrettyLink, 'simple bracketed link' opens tiddler instead of external link to attachment\n''2006.11.29 [3.4.7]'' in readFile(), added try..catch around initWithPath() to handle invalid/non-existent paths better.\n''2006.11.09 [3.4.6]'' REAL FIX for TWv2.1.3: incorporate new TW2.1.3 core "prettyLink" formatter regexp handling logic and check for version < 2.1.3 with fallback to old plugin code. Also, cleanup table layout in HTML (added "border:0" directly to table elements to override stylesheet)\n''2006.11.08 [3.4.5]'' TEMPORARY FIX for TWv2.1.3: disable hijack of wikiLink formatter due to changes in core wikiLink regexp definition. //Links to attachments are broken, but you can still use {{{[img[TiddlerName]]}}} to render attachments as images, as well as {{{background:url('[[TiddlerName]]')}}} in CSS declarations for background images.//\n''2006.09.10 [3.4.4]'' update formatters for 2.1 compatibility (use this.lookaheadRegExp instead of temp variable)\n''2006.07.24 [3.4.3]'' in prettyLink formatter, added check for isShadowTiddler() to fix problem where shadow links became external links.\n''2006.07.13 [3.4.2]'' in getAttachment(), fixed stripping of newlines so data: used in CSS will work\n''2006.05.21 [3.4.1]'' in getAttachment(), fixed substring() to extract data: URI (was losing last character, which broken rendering of SOME images)\n''2006.05.20 [3.4.0]'' hijack core getRecursiveTiddlerText() to support rendering attachments in stylesheets (e.g. {{{url([[AttachFileSample]])}}})\n''2006.05.20 [3.3.6]'' add "description" feature to easily include notes in attachment tiddler (you can always edit to add them later... but...)\n''2006.05.19 [3.3.5]'' add "attach as" feature to change default name for attachment tiddlers. Also, new optional param to specify tiddler name (disables editing)\n''2006.05.16 [3.3.0]'' completed XMLHttpRequest handling for GET or POST to configurable server scripts\n''2006.05.13 [3.2.0]'' added interface for ''upload'' feature. Major rewrite of code for clean object definitions. Major improvements in UI interaction and validation.\n''2006.05.09 [3.1.1]'' add wikifer support for using attachments in links from "linked image" syntax: {{{[img[tip|attachment1][attachment2]]}}}\n''2006.05.09 [3.1.0]'' lots of code changes: new options for attachments that use embedded data and/or links to external files (local or remote)\n''2006.05.03 [3.0.2]'' added {{{/%...%/}}} comments around attachment data to hide it when viewing attachment tiddler.\n''2006.02.05 [3.0.1]'' wrapped wikifier hijacks in initAttachmentFormatters() function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals\n''2005.12.27 [3.0.0]'' Update for TW2.0. Automatically add 'excludeMissing' tag to attachments\n''2005.12.16 [2.2.0]'' Dynamically create/remove attachPanel as needed to ensure only one instance of interface elements exists, even if there are multiple instances of macro embedding.\n''2005.11.20 [2.1.0]'' added wikifier handler extensions for "image" and "prettyLink" to render tiddler attachments\n''2005.11.09 [2.0.0]'' begin port from old ELS Design plugin/adaptation hybrid based on ~TW1.2.33\n''2005.08.05 [1.1.0]'' moved CSS and HTML definitions into plugin code tiddler instead of using separate tiddlers\n''2005.07.27 [1.0.2]'' core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet()\n''2005.07.23 [1.0.1]'' added parameter checks and corrected addNotification() usage\n''2005.07.20 [1.0.0]'' Initial Release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n// // version\n//{{{\nversion.extensions.attach = {major: 3, minor: 4, revision: 5, date: new Date(2006,11,8)};\n//}}}\nconfig.macros.attach = {\n// // configuration\n//{{{\n hideUpload: false,\n//}}}\n// // lingo\n//{{{\n label: "attach file",\n tooltip: "Attach a file to this document",\n linkTooltip: "Attachment: ",\n\n scriptList: "AttachFileServerScripts",\n typeList: "AttachFileMIMETypes",\n\n titlePrompt: " enter tiddler title...",\n MIMEPrompt: "<option value=''>select MIME type...</option><option value='editlist'>[edit list...]</option>",\n localPrompt: " enter local path/filename...",\n URLPrompt: " enter remote URL...",\n scriptPrompt: "<option value=''>select server script...</option><option value='editlist'>[edit list...]</option>",\n targetPrompt: " enter remote path/filename...",\n\n tiddlerErr: "Please enter a tiddler title",\n sourceErr: "Please enter a source path/filename",\n storageErr: "Please select a storage method: embedded, local or remote",\n MIMEErr: "Unrecognized file format. Please select a MIME type",\n localErr: "Please enter a local path/filename",\n URLErr: "Please enter a remote URL",\n scriptErr: "Please select a server script",\n targetErr: "Please enter a remote target path/filename",\n fileErr: "Invalid path/file or file not found",\n\n sourceReport: "| source file:|{{{%0}}}|\sn",\n nosourceReport: "| source file:|//none//|\sn",\n dateReport: "| attached on:|%0 by %1|\sn",\n notesReport: "| description:|%0|\sn",\n dataReport: "| embedded:|[[%0|%0]] - {{{type=%1, size=%2 bytes, encoded=%3 bytes}}}|\sn",\n nodataReport: "| embedded:|//none//|\sn",\n localReport: "| LocalFile:|/%LOCAL_LINK%/[[%0|%1]]|\sn",\n nolocalReport: "| LocalFile:|//none//|\sn",\n URLReport: "| RemoteLink:|/%REMOTE_LINK%/[[%0|%0]]|\sn",\n noURLReport: "| RemoteLink:|//none//|\sn",\n\n uploadReport: "upload\sn<<<\sn__server script__\sn''%0''\sn{{{%1}}}\sn__remote path/filename__\sn{{{%2}}}\sn__transfer log__\sn%3/%RESULT%/\sn<<<\sn",\n\n imageReport: "image\sn<<<\snusage: {{{[img[tooltip|%0]] or [img[tooltip|%0][link]]}}}\sn[img[tooltip|%0]]\sn<<<\sn",\n dataBlock: "\sn/% DO NOT EDIT BELOW THIS POINT\sn---BEGIN_DATA---\sn%0;base64,\sn%1\sn---END_DATA---\sn%/",\n//}}}\n// // macro definition\n//{{{\n handler:\n function(place,macroName,params) {\n if (params && !params[0]) { createTiddlyButton(place,this.label,this.tooltip,this.toggleAttachPanel); return; }\n var id=params.shift();\n this.createAttachPanel(place,id+"_attachPanel",params);\n document.getElementById(id+"_attachPanel").style.position="static";\n document.getElementById(id+"_attachPanel").style.display="block";\n },\n//}}}\n//{{{\n createAttachPanel:\n function(place,panel_id,params) {\n if (!panel_id || !panel_id.length) var panel_id="_attachPanel";\n // remove existing panel (if any)\n var panel=document.getElementById(panel_id); if (panel) panel.parentNode.removeChild(panel);\n // set styles for this panel\n setStylesheet(this.css,"attachPanel");\n // create new panel\n var title=""; if (params && params[0]) title=params.shift();\n var types=this.MIMEPrompt+this.formatListOptions(store.getTiddlerText(this.typeList)); // get MIME types\n var scripts=this.scriptPrompt+this.formatListOptions(store.getTiddlerText(this.scriptList)); // get server scripts\n panel=createTiddlyElement(place,"span",panel_id,"attachPanel",null);\n var html=this.html.replace(/%id%/g,panel_id);\n html=html.replace(/%title%/g,title);\n html=html.replace(/%disabled%/g,title.length?"disabled":"");\n html=html.replace(/%types%/g,types);\n html=html.replace(/%scripts%/g,scripts);\n panel.innerHTML=html;\n return panel;\n },\n//}}}\n//{{{\n toggleAttachPanel:\n function (e) {\n if (!e) var e = window.event;\n var parent=resolveTarget(e).parentNode;\n var panel = document.getElementById("_attachPanel");\n if (panel==undefined || panel.parentNode!=parent)\n panel=config.macros.attach.createAttachPanel(parent,"_attachPanel");\n var isOpen = panel.style.display=="block";\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));\n else\n panel.style.display = isOpen ? "none" : "block" ;\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return(false);\n },\n//}}}\n//{{{\n formatListOptions:\n function(text,getparams) {\n if (!text || !text.trim().length) return "";\n // get server script list content from tiddler\n var parts=text.split("\sn----\sn");\n var out="";\n this.scriptParams=["","",""]; // first 3 list items: blank, prompt, editlist\n for (var p=0; p<parts.length; p++) {\n var lines=parts[p].split("\sn");\n var label=lines.shift(); // 1st line=display text\n var URL=lines.shift(); // 2nd line=item value\n var params=lines.join("\sn").replace(/<<<\sn/g,"").replace(/\sn<<</g,""); // extra lines=script params inside blockquotes\n this.scriptParams.push(params?params:"");\n out +='<option value="%1">%0</option>'.format([label,URL]);\n }\n return out;\n },\n//}}}\n// // interface definition\n//{{{\n css:\n ".attachPanel { display: none; position:absolute; z-index:10; width:35em; right:105%; top:0em;\s\n background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\s\n border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\s\n padding: 0.5em; margin:0em; -moz-border-radius:1em; }\s\n .attachPanel form { display:inline;border:0;padding:0;margin:0; }\s\n .attachPanel select { width:99%;margin:0px;font-size:8pt;line-height:110%;}\s\n .attachPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\s\n .attachPanel textarea { width:98%;margin:0px;height:2em;font-size:8pt;line-height:110%}\s\n .attachPanel table { width:100%;border:0;margin:0;padding:0;color:inherit; }\s\n .attachPanel tbody, .attachPanel tr, .attachPanel td { border:0;margin:0;padding:0;color:#000; }\s\n .attachPanel .box { border:1px solid black; padding:.3em; margin:.3em 0px; background:#f8f8f8; -moz-border-radius:5px; }\s\n .attachPanel .chk { width:auto;border:0; }\s\n .attachPanel .btn { width:auto; }\s\n .attachPanel .btn2 { width:49%; }\s\n ",\n//}}}\n//{{{\n html:\n '<form>\s\n attach from source file <input type="file" name="source" size=56 onChange="config.macros.attach.onChangeSource(this)">\s\n <div class="box">\s\n <table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\s\n embed data <input type=checkbox class=chk name="useData"\s\n onclick="if (!this.form.MIMEType.value.length)\s\n this.form.MIMEType.selectedIndex=this.checked?1:0; ">&nbsp;\s\n </td><td style="border:0">\s\n <select size=1 name="MIMEType" \s\n onchange="this.title=this.value; if (this.value==\s'editlist\s')\s\n { this.selectedIndex=this.form.useData.checked?1:0; story.displayTiddler(null,config.macros.attach.typeList,2); return; }">\s\n <option value=""></option>\s\n %types%\s\n </select>\s\n </td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\s\n local link <input type=checkbox class=chk name="useLocal"\s\n onclick="this.form.local.value=this.form.local.defaultValue=this.checked?config.macros.attach.localPrompt:\s'\s';">&nbsp;\s\n </td><td style="border:0">\s\n <input type=text name="local" size=15 autocomplete=off value=""\s\n onchange="this.form.useLocal.checked=this.value.length" \s\n onkeyup="this.form.useLocal.checked=this.value.length" \s\n onfocus="if (!this.valuelength) this.value=config.macros.attach.localPrompt; this.select()">\s\n </td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\s\n remote link <input type=checkbox class=chk name="useURL"\s\n onclick="this.form.URL.value=this.form.URL.defaultValue=this.checked?config.macros.attach.URLPrompt:\s'\s';\s\n config.macros.attach.toggleUploadControls(\s'%id%\s',this.checked);">&nbsp;\s\n </td><td style="border:0">\s\n <input type=text name="URL" size=15 autocomplete=off value=""\s\n onfocus="if (!this.value.length) this.value=config.macros.attach.URLPrompt; this.select()"\s\n onchange="this.form.useURL.checked=this.value.length;\s\n config.macros.attach.toggleUploadControls(\s'%id%\s',this.value.length);"\s\n onkeyup="this.form.useURL.checked=this.value.length;\s\n config.macros.attach.toggleUploadControls(\s'%id%\s',this.value.length);">\s\n </td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\s\n <div id="%id%_upcheck" style="display:none">\s\n upload file <input type=checkbox class=chk name="upload"\s\n onclick="this.form.uploadScript.selectedIndex=this.checked?1:0;\s\n this.form.uploadScript.title=\s'\s';\s\n this.form.uploadTarget.disabled=!this.checked;\s\n this.form.uploadTarget.value=this.form.uploadTarget.defaultValue=this.checked?config.macros.attach.targetPrompt:\s'\s';\s">&nbsp;\s\n </div>\s\n </td><td style="border:0">\s\n <div id="%id%_uplist" style="display:none">\s\n <select size=1 name="uploadScript"\s\n onchange="this.title=this.value; if (this.value==\s'editlist\s')\s\n { this.selectedIndex=this.form.upload.checked?1:0; story.displayTiddler(null,config.macros.attach.scriptList,2); return; }\s\n this.form.upload.checked=this.value.length;\s\n if (!this.form.uploadTarget.value.length && this.value.length)\s\n this.form.uploadTarget.value=this.form.uploadTarget.defaultValue=config.macros.attach.targetPrompt;\s\n this.form.uploadTarget.disabled=!this.value.length;">\s\n <option value=""></option>\s\n %scripts%\s\n </select>\s\n </div>\s\n </td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\s\n <div id="%id%_saveas" style="display:none">save as&nbsp;</div>\s\n </td><td style="border:0">\s\n <input type=text name="uploadTarget" id="%id%_uptarget" size=15 autocomplete=off value="" disabled\s\n onfocus="if (!this.value.length) this.value=config.macros.attach.targetPrompt; this.select()" style="display:none">\s\n </td></tr></table>\s\n </div>\s\n <table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\s\n attach as&nbsp;\s\n </td><td style="border:0" colspan=2>\s\n <input type=text name="tiddlertitle" size=15 autocomplete=off value="%title%"\s\n onkeyup="if (!this.value.length) { this.value=config.macros.attach.titlePrompt; this.select(); }"\s\n onfocus="if (!this.value.length) this.value=config.macros.attach.titlePrompt; this.select()" %disabled%>\s\n </td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\s\n description&nbsp;\s\n </td><td style="border:0" colspan=2>\s\n <input type=text name="notes" size=15 autocomplete=off>\s\n </td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\s\n add tags&nbsp;\s\n </td><td style="border:0">\s\n <input type=text name="tags" size=15 autocomplete=off value="" onfocus="this.select()">\s\n </td><td style="width:40%;text-align:right;border:0">\s\n <input type=button class=btn2 value="attach"\s\n onclick="config.macros.attach.onClickAttach(this)"><!--\s\n --><input type=button class=btn2 value="close"\s\n onclick="var panel=document.getElementById(\s'%id%\s'); if (panel) panel.parentNode.removeChild(panel);">\s\n </td></tr></table>\s\n </form>',\n//}}}\n// // control processing\n//{{{\n onChangeSource:\n function(here) {\n var form=here.form;\n var list=form.MIMEType;\n var theFilename = form.source.value;\n var theExtension = theFilename.substr(theFilename.lastIndexOf('.')).toLowerCase();\n for (var i=0; i<list.options.length; i++)\n if (list.options[i].value.indexOf(theExtension)!=-1) {\n list.selectedIndex = i;\n form.useData.checked = true;\n form.useLocal.checked = true;\n form.local.value = theFilename;\n break;\n }\n theFilename=theFilename.replace(/\s\s/g,"/"); // fixup: change \s to /\n if (!form.tiddlertitle.disabled)\n form.tiddlertitle.value=theFilename.substr(theFilename.lastIndexOf('/')+1); // get tiddlername from filename\n },\n//}}}\n//{{{\n toggleUploadControls:\n function(id,show) {\n if (config.macros.attach.hideUpload) return;\n document.getElementById(id+'_upcheck').style.display\n =document.getElementById(id+'_uplist').style.display\n =document.getElementById(id+'_saveas').style.display\n =document.getElementById(id+'_uptarget').style.display\n =show?'block':'none';\n },\n//}}}\n//{{{\n onClickAttach:\n function (here) {\n clearMessage();\n // get input values\n var form=here.form;\n var theDate=(new Date()).formatString(config.macros.timeline.dateFormat);\n var theSource = form.source.value!=form.source.defaultValue?form.source.value:"";\n var theTitle=form.tiddlertitle.value;\n var theLocal = form.local.value!=form.local.defaultValue?form.local.value:"";\n var theURL = form.URL.value!=form.URL.defaultValue?form.URL.value:"";\n var theNotes = form.notes.value;\n var theTags = "attachment excludeMissing "+form.tags.value;\n var useData=form.useData.checked;\n var useLocal=form.useLocal.checked;\n var useURL=form.useURL.checked;\n var upload=form.upload.checked;\n var theMIMEType = form.MIMEType.value.length?form.MIMEType.options[form.MIMEType.selectedIndex].text:"";\n // validate checkboxes and get filename\n if (useData||upload) {\n if (theSource.length) { if (!theLocation) var theLocation=theSource; }\n else { alert(this.sourceErr); form.source.focus(); return false; }\n }\n if (useLocal) {\n if (theLocal.length) { if (!theLocation) var theLocation = theLocal; }\n else { alert(this.localErr); form.local.focus(); return false; }\n }\n if (useURL) {\n if (theURL.length) { if (!theLocation) var theLocation = theURL; }\n else { alert(this.URLErr); form.URL.focus(); return false; }\n }\n if (!(useData||useLocal||useURL))\n { form.useData.focus(); alert(this.storageErr); return false; }\n if (!theLocation)\n { form.source.focus(); alert(this.sourceErr); return false; }\n if (!theTitle || !theTitle.trim().length || theTitle==this.titlePrompt)\n { form.tiddlertitle.focus(); alert(this.tiddlerErr); return false; }\n if (upload) {\n var theScript = form.uploadScript.value!=form.uploadScript.defaultValue?form.uploadScript.value:"";\n if (!theScript.length) { alert(this.scriptErr); form.uploadScript.focus(); return false; }\n var theServer = form.uploadScript.options[form.uploadScript.selectedIndex].text;\n var theParams = this.scriptParams[form.uploadScript.selectedIndex];\n var theTarget = form.uploadTarget.value!=form.uploadTarget.defaultValue?form.uploadTarget.value:"";\n if (!theTarget.length) { alert(this.targetErr); form.uploadTarget.focus(); return false; }\n }\n // if not already selected, determine MIME type based on filename extension (if any)\n if (!theMIMEType.length && theLocation.lastIndexOf('.')!=-1) {\n var theExt = theLocation.substr(theLocation.lastIndexOf('.')).toLowerCase();\n var theList=form.MIMEType;\n for (var i=0; i<theList.options.length; i++)\n if (theList.options[i].value.indexOf(theExt)!=-1)\n { var theMIMEType=theList.options[i].text; theList.selectedIndex=i; break; }\n }\n // encode the data\n if (useData) {\n if (!theMIMEType.length) {\n alert(this.MIMEErr);\n form.MIMEType.selectedIndex=1; form.MIMEType.focus();\n return false;\n }\n var theData = this.readFile(theSource); if (!theData) { return false; }\n displayMessage('encoding '+theSource);\n var theEncoded = this.encodeBase64(theData);\n displayMessage('file size='+theData.length+' bytes, encoded size='+theEncoded.length+' bytes');\n }\n // upload the file\n if (upload) var uploadresult=this.uploadFile(theTitle,theSource,theMIMEType,theServer,theScript,theParams,theTarget);\n // generate tiddler and refresh\n var theText = "";\n theText +=theSource.length?this.sourceReport.format([theSource]):this.nosourceReport;\n theText +=this.dateReport.format([theDate,config.options.txtUserName]);\n theText +=theNotes.length?this.notesReport.format([theNotes]):"";\n theText +=useData?this.dataReport.format([theTitle,theMIMEType,theData.length,theEncoded.length]):this.nodataReport;\n theText +=useLocal?this.localReport.format([theLocal,'file:///'+theLocal.replace(/\s\s/g,"/")]):this.nolocalReport;\n theText +=useURL?this.URLReport.format([theURL]):this.noURLReport;\n theText +=(theMIMEType.substr(0,5)=="image")?this.imageReport.format([theTitle]):"";\n theText +=upload?uploadresult:"";\n theText +=useData?this.dataBlock.format([theMIMEType,theEncoded]):"";\n store.saveTiddler(theTitle,theTitle,theText,config.options.txtUserName,new Date(),theTags);\n document.getElementById("attachPanel").style.display="none";\n story.displayTiddler(null,theTitle);\n story.refreshTiddler(theTitle,null,true);\n displayMessage('attached "'+theTitle+'"');\n return true;\n },\n//}}}\n// // base64 conversion\n//{{{\n encodeBase64:\n function (theData) {\n if (!theData) return null;\n // encode as base64\n var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";\n var out = ""; //This is the output\n var chr1, chr2, chr3 = ""; //These are the 3 bytes to be encoded\n var enc1, enc2, enc3, enc4 = ""; //These are the 4 encoded bytes\n for (var count=0,i=0; i<theData.length; )\n {\n chr1 = theData.charCodeAt(i++); //Grab the first byte\n chr2 = theData.charCodeAt(i++); //Grab the second byte\n chr3 = theData.charCodeAt(i++); //Grab the third byte\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n if (isNaN(chr2))\n enc3 = enc4 = 64;\n else if (isNaN(chr3))\n enc4 = 64;\n out += keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);\n chr1 = chr2 = chr3 = "";\n enc1 = enc2 = enc3 = enc4 = "";\n count+=4; if (count>60) { out+='\sn'; count=0; } // add line break every 60 chars for readability\n }\n return out;\n },\n//}}}\n// // I/O functions\n//{{{\n readFile:\n function(filePath) {\n if(!window.Components) { return null; }\n try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }\n catch(e) { alert("access denied: "+filePath); return null; }\n var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\n try { file.initWithPath(filePath); } catch(e) { alert("cannot read file - invalid path: "+filePath); return null; }\n if (!file.exists()) { alert("cannot read file - not found: "+filePath); return null; }\n var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);\n inputStream.init(file, 0x01, 00004, null);\n var bInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);\n bInputStream.setInputStream(inputStream);\n return(bInputStream.readBytes(inputStream.available()));\n },\n//}}}\n//{{{\n writeFile:\n function(filepath,data) {\n // TBD: decode base64 and write data to specified local path/filename\n return(false);\n },\n//}}}\n//{{{\n uploadFile:\n function(title,source,MIMEType,server,URL,scriptparams,target) {\n displayMessage("begin upload: \s""+title+"\s"");\n if (URL==undefined || !URL.length)\n return this.uploadReport.format([server,URL,target,"error: missing script URL"]);\n var x; // XML object\n try {x = new XMLHttpRequest()}\n catch(e) {\n try {x = new ActiveXObject("Msxml2.XMLHTTP")}\n catch (e) {\n try {x = new ActiveXObject("Microsoft.XMLHTTP")}\n catch (e) { return this.uploadReport.format([server,URL,target,"error: could not create XMLHttpRequest object"]); }\n }\n }\n var starttime=new Date();\n x.onreadystatechange = function() {\n if (x.readyState == 4) {\n var endtime=new Date();\n var elapsed=(endtime-starttime+1)/1000;\n displayMessage("end upload: \s""+title+"\s" ("+elapsed+" seconds)");\n var response="\sn''"+endtime.formatString("DD MMM YYYY 0hh:0mm:0ss")+"'' - upload ended (elapsed="+elapsed+" seconds).\sn";\n; response+="status code="+x.status+"\snserver response:\sn{{{\sn"+x.responseText+"\sn}}}\sn";\n var tiddler=store.getTiddler(title);\n if (tiddler) {\n var marker="/%RESULT%/"; var pos=tiddler.text.indexOf(marker);\n if (pos!=-1) {\n tiddler.set(null,tiddler.text.substr(0,pos)+response+tiddler.text.substr(pos+marker.length));\n story.displayTiddler(null,title); story.refreshTiddler(title,null,true); store.setDirty(true);\n } \n }\n }\n }\n if ((document.location.protocol=="file:") && (typeof(netscape)!="undefined")) { // UniversalBrowserRead only works from a local file context\n try { netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead')}\n catch (e) { displayMessage(e.description?e.description:e.toString()); }\n }\n try {\n var data=this.readFile(source);\n if (!data) return this.uploadReport.format([server,URL,target,"could not read local source file"]);\n scriptparams=scriptparams.replace(/%TARGET%/g,target).replace(/%TYPE%/g,MIMEType).replace(/%SIZE%/g,data.length);\n if (scriptparams.indexOf("\sn")==-1) { // single-line params=GET\n x.open("GET",URL,true);\n scriptparams=scriptparams.replace(/%DATA%/g,encodeURIComponent(data));\n x.setRequestHeader('Content-type','application/x-www-form-urlencoded');\n }\n else { // multi-line params=POST\n x.open("POST",URL,true);\n var boundary="----------AttachFilePluginDataBoundary----------";\n scriptparams="\sn"+scriptparams.replace(/%BOUNDARY%/g,boundary).replace(/%DATA%/g,data)+"\sn";\n x.setRequestHeader('Content-Length',scriptparams.length);\n x.setRequestHeader('Content-Type','multipart/form-data; boundary='+boundary);\n }\n x.send(scriptparams);\n // DEBUG alert("params\sn-----\sn"+scriptparams+"\sn-----\sn"); // wffl DEBUG\n }\n catch (e) { displayMessage(e.description?e.description:e.toString()); }\n var response="''"+starttime.formatString("DD MMM YYYY 0hh:0mm:0ss")+"'' - upload started...";\n return this.uploadReport.format([server,URL,target,response]);\n }\n};\n//}}}\n\n/***\n!!!!!Formatters\n|NOTE: These functions are also defined separately in a small, "run-time library" plugin: AttachFilePluginFormatters, which provides "stand-alone" processing for //rendering// attachment tiddlers, but does not include the AttachTiddlers control panel and supporting functions. To reduce your document size, you can include AttachFilePluginFormatters ''instead of'' AttachFilePlugin when distributing documents that contain attachments, as long you don't intend to create any new attachment tiddlers to your document.|\n\n''Extends wikify() formatters to process attachment tiddler references''\n* embedded images: {{{[img[tooltip|image]]}}}\n* linked embedded images: {{{[img[tooltip|image][link]]}}}\n* external/"pretty" links: {{{[[label|link]]}}}\n\n***/\n//{{{\nif (config.macros.attach==undefined) config.macros.attach= { };\n//}}}\n//{{{\nif (config.macros.attach.isAttachment==undefined) config.macros.attach.isAttachment=function (title) {\n var tiddler = store.getTiddler(title);\n if (tiddler==undefined || tiddler.tags==undefined) return false;\n return (tiddler.tags.find("attachment")!=null);\n}\n//}}}\n\n//{{{\n// test for local file existence\n// Returns true/false without visible error display\n// Uses Components for FF and ActiveX FSO object for MSIE\nif (config.macros.attach.fileExists==undefined) config.macros.attach.fileExists=function(theFile) {\n var found=false;\n // DEBUG: alert('testing fileExists('+theFile+')...');\n if(window.Components) {\n try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }\n catch(e) { return false; } // security access denied\n var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\n try { file.initWithPath(theFile); }\n catch(e) { return false; } // invalid directory\n found = file.exists();\n }\n else { // use ActiveX FSO object for MSIE \n var fso = new ActiveXObject("Scripting.FileSystemObject");\n found = fso.FileExists(theFile)\n }\n // DEBUG: alert(theFile+" "+(found?"exists":"not found"));\n return found;\n}\n//}}}\n\n//{{{\nif (config.macros.attach.getAttachment==undefined) config.macros.attach.getAttachment=function(title) {\n\n // extract embedded data, local and remote links (if any)\n var startmarker="---BEGIN_DATA---\sn";\n var endmarker="\sn---END_DATA---";\n var pos=0; var endpos=0;\n var text = store.getTiddlerText(title);\n var embedded="";\n var locallink="";\n var remotelink="";\n\n // look for embedded data, convert to data: URI\n if ((pos=text.indexOf(startmarker))!=-1 && (endpos=text.indexOf(endmarker))!=-1)\n embedded="data:"+(text.substring(pos+startmarker.length,endpos)).replace(/\sn/g,'');\n if (embedded.length && !config.browser.isIE)\n return embedded; // use embedded data if any... except for IE, which doesn't support data URI\n\n // no embedded data... fallback to local/remote reference links...\n\n // look for 'attachment link markers'\n if ((pos=text.indexOf("/%LOCAL_LINK%/"))!=-1)\n locallink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));\n if ((pos=text.indexOf("/%REMOTE_LINK%/"))!=-1)\n remotelink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));\n\n // document is being served remotely... use remote URL (if any) (avoids security alert)\n if (remotelink.length && document.location.protocol!="file:")\n return remotelink; \n\n // local link only... return link without checking file existence (avoids security alert)\n if (locallink.length && !remotelink.length) \n return locallink; \n\n // local link, check for file exist... use local link if found\n if (locallink.length) { \n if (this.fileExists(getLocalPath(locallink))) return locallink;\n // maybe local link is relative... add path from current document and try again\n var pathPrefix=document.location.href; // get current document path and trim off filename\n var slashpos=pathPrefix.lastIndexOf("/"); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf("\s\s"); \n if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);\n if (this.fileExists(getLocalPath(pathPrefix+locallink))) return locallink;\n }\n\n // no embedded data, no local (or not found), fallback to remote URL (if any)\n if (remotelink.length) \n return remotelink;\n\n return ""; // attachment URL doesn't resolve\n}\n//}}}\n//{{{\nif (config.macros.attach.init_formatters==undefined) config.macros.attach.init_formatters=function() {\n if (this.initialized) return;\n // find the formatter for "image" and replace the handler\n for (var i=0; i<config.formatters.length && config.formatters[i].name!="image"; i++);\n if (i<config.formatters.length) config.formatters[i].handler=function(w) {\n if (!this.lookaheadRegExp) // fixup for TW2.0.x\n this.lookaheadRegExp = new RegExp(this.lookahead,"mg");\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) // Simple bracketted link\n {\n var e = w.output;\n if(lookaheadMatch[5])\n {\n var link = lookaheadMatch[5];\n // ELS -------------\n if (!config.formatterHelpers.isExternalLink) // fixup for TW2.0.x\n var external=!store.tiddlerExists(link)&&!store.isShadowTiddler(link);\n else\n var external=config.formatterHelpers.isExternalLink(link);\n if (external)\n {\n if (config.macros.attach.isAttachment(link))\n {\n e = createExternalLink(w.output,link);\n e.href=config.macros.attach.getAttachment(link);\n e.title = config.macros.attach.linkTooltip + link;\n }\n else\n e = createExternalLink(w.output,link);\n }\n else \n e = createTiddlyLink(w.output,link,false,null,w.isStatic);\n // ELS -------------\n addClass(e,"imageLink");\n }\n var img = createTiddlyElement(e,"img");\n if(lookaheadMatch[1])\n img.align = "left";\n else if(lookaheadMatch[2])\n img.align = "right";\n if(lookaheadMatch[3])\n img.title = lookaheadMatch[3];\n img.src = lookaheadMatch[4];\n // ELS -------------\n if (config.macros.attach.isAttachment(lookaheadMatch[4]))\n img.src=config.macros.attach.getAttachment(lookaheadMatch[4]);\n // ELS -------------\n w.nextMatch = this.lookaheadRegExp.lastIndex;\n }\n }\n//}}}\n//{{{\n // find the formatter for "prettyLink" and replace the handler\n for (var i=0; i<config.formatters.length && config.formatters[i].name!="prettyLink"; i++);\n if (i<config.formatters.length) {\n if (version.major>=2 && version.minor>=1 && version.revision>2) {\n config.formatters[i].handler=function(w) \n {\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source);\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n var e;\n var text = lookaheadMatch[1];\n if(lookaheadMatch[3])\n {\n // Pretty bracketted link\n var link = lookaheadMatch[3];\n if (config.macros.attach.isAttachment(link))\n {\n e = createExternalLink(w.output,link);\n e.href=config.macros.attach.getAttachment(link);\n e.title=config.macros.attach.linkTooltip+link;\n }\n else e = (!lookaheadMatch[2] && config.formatterHelpers.isExternalLink(link))\n ? createExternalLink(w.output,link)\n : createTiddlyLink(w.output,link,false,null,w.isStatic);\n }\n else\n {\n e = createTiddlyLink(w.output,text,false,null,w.isStatic);\n }\n createTiddlyText(e,text);\n w.nextMatch = this.lookaheadRegExp.lastIndex;\n }\n }\n } else { // FALLBACK for TW2.1.2 and earlier\n config.formatters[i].handler=function(w)\n {\n if (!this.lookaheadRegExp) // fixup for TW2.0.x\n this.lookaheadRegExp = new RegExp(this.lookahead,"mg");\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n var e;\n var text = lookaheadMatch[1];\n if (lookaheadMatch[2]) // Simple bracketted link\n {\n e = createTiddlyLink(w.output,text,false,null,w.isStatic);\n }\n else if(lookaheadMatch[3]) // Pretty bracketted link\n {\n var link = lookaheadMatch[4];\n // ELS -------------\n if (!config.formatterHelpers.isExternalLink) // fixup for TW2.0.x\n var external=!store.tiddlerExists(link)&&!store.isShadowTiddler(link);\n else\n var external=config.formatterHelpers.isExternalLink(link);\n if (external)\n {\n if (config.macros.attach.isAttachment(link))\n {\n e = createExternalLink(w.output,link);\n e.href=config.macros.attach.getAttachment(link);\n e.title = config.macros.attach.linkTooltip + link;\n }\n else\n e = createExternalLink(w.output,link);\n }\n else \n e = createTiddlyLink(w.output,link,false,null,w.isStatic);\n // ELS -------------\n }\n createTiddlyText(e,text);\n w.nextMatch = this.lookaheadRegExp.lastIndex;\n }\n }\n } // END FALLBACK\n } // if "prettyLink" formatter found\n this.initialized=true;\n}\n//}}}\n//{{{\nconfig.macros.attach.init_formatters(); // load time init\n//}}}\n//{{{\nif (TiddlyWiki.prototype.coreGetRecursiveTiddlerText==undefined) {\n TiddlyWiki.prototype.coreGetRecursiveTiddlerText = TiddlyWiki.prototype.getRecursiveTiddlerText;\n TiddlyWiki.prototype.getRecursiveTiddlerText = function(title,defaultText,depth) {\n return config.macros.attach.isAttachment(title)?\n config.macros.attach.getAttachment(title):this.coreGetRecursiveTiddlerText(title,defaultText,depth);\n }\n}\n//}}}
/***\n|''Name:''|AttachFilePluginFormatters|\n|''Source:''|http://www.TiddlyTools.com/#AttachFilePluginFormatters|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nYou can include this small //''run time library''// in your documents to render ''attachment tiddlers'' created by the AttachFilePlugin. Attachment tiddlers are tagged with<<tag attachment>>and contain binary file content (e.g., jpg, gif, pdf, mp3, etc.) that can be stored directly as base64 text-encoded data or loaded from external files stored on a local filesystem or remote web server.\n\nThis plugin extends the behavior of the following TiddlyWiki core "wikify()" formatters:\n* embedded images: {{{[img[tooltip|image]]}}}\n* linked embedded images: {{{[img[tooltip|image][link]]}}}\n* external/"pretty" links: {{{[[label|link]]}}}\n\n''Please refer to AttachFilePlugin (source: http://www.TiddlyTools.com/#AttachFilePlugin) for additional information.''\n!!!!!Revision History\n<<<\n''2006.11.30 [3.5.0.0]'' sync with AttachFilePlugin v3.5.0\n''2006.11.09 [3.4.6.0]'' sync with AttachFilePlugin v3.4.6 (real fix for TW2.1.3)\n''2006.11.08 [3.4.5.0]'' sync with AttachFilePlugin v3.4.5 (temporary fix for TW2.1.3)\n''2006.09.10 [3.4.4.0]'' sync with AttachFilePlugin v3.4.4\n''2006.07.24 [3.4.3.0]'' sync with AttachFilePlugin v3.4.3\n''2006.07.13 [3.4.2.0]'' sync with AttachFilePlugin v3.4.2\n''2006.06.15 [3.4.1.0]'' sync with AttachFilePlugin v3.4.1\n''2006.05.20 [3.4.0.0]'' sync with AttachFilePlugin v3.4.0\n''2006.05.13 [3.2.0.0]'' created from AttachFilePlugin v3.2.0\n<<<\n!!!!!Code\n***/\n//{{{\nif (config.macros.attach==undefined) config.macros.attach= { };\n//}}}\n//{{{\nif (config.macros.attach.isAttachment==undefined) config.macros.attach.isAttachment=function (title) {\n var tiddler = store.getTiddler(title);\n if (tiddler==undefined || tiddler.tags==undefined) return false;\n return (tiddler.tags.find("attachment")!=null);\n}\n//}}}\n\n//{{{\n// test for local file existence\n// Returns true/false without visible error display\n// Uses Components for FF and ActiveX FSO object for MSIE\nif (config.macros.attach.fileExists==undefined) config.macros.attach.fileExists=function(theFile) {\n var found=false;\n // DEBUG: alert('testing fileExists('+theFile+')...');\n if(window.Components) {\n try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }\n catch(e) { return false; } // security access denied\n var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\n try { file.initWithPath(theFile); }\n catch(e) { return false; } // invalid directory\n found = file.exists();\n }\n else { // use ActiveX FSO object for MSIE \n var fso = new ActiveXObject("Scripting.FileSystemObject");\n found = fso.FileExists(theFile)\n }\n // DEBUG: alert(theFile+" "+(found?"exists":"not found"));\n return found;\n}\n//}}}\n\n//{{{\nif (config.macros.attach.getAttachment==undefined) config.macros.attach.getAttachment=function(title) {\n\n // extract embedded data, local and remote links (if any)\n var startmarker="---BEGIN_DATA---\sn";\n var endmarker="\sn---END_DATA---";\n var pos=0; var endpos=0;\n var text = store.getTiddlerText(title);\n var embedded="";\n var locallink="";\n var remotelink="";\n\n // look for embedded data, convert to data: URI\n if ((pos=text.indexOf(startmarker))!=-1 && (endpos=text.indexOf(endmarker))!=-1)\n embedded="data:"+(text.substring(pos+startmarker.length,endpos)).replace(/\sn/g,'');\n if (embedded.length && !config.browser.isIE)\n return embedded; // use embedded data if any... except for IE, which doesn't support data URI\n\n // no embedded data... fallback to local/remote reference links...\n\n // look for 'attachment link markers'\n if ((pos=text.indexOf("/%LOCAL_LINK%/"))!=-1)\n locallink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));\n if ((pos=text.indexOf("/%REMOTE_LINK%/"))!=-1)\n remotelink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));\n\n // document is being served remotely... use remote URL (if any) (avoids security alert)\n if (remotelink.length && document.location.protocol!="file:")\n return remotelink; \n\n // local link only... return link without checking file existence (avoids security alert)\n if (locallink.length && !remotelink.length) \n return locallink; \n\n // local link, check for file exist... use local link if found\n if (locallink.length) { \n if (this.fileExists(getLocalPath(locallink))) return locallink;\n // maybe local link is relative... add path from current document and try again\n var pathPrefix=document.location.href; // get current document path and trim off filename\n var slashpos=pathPrefix.lastIndexOf("/"); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf("\s\s"); \n if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);\n if (this.fileExists(getLocalPath(pathPrefix+locallink))) return locallink;\n }\n\n // no embedded data, no local (or not found), fallback to remote URL (if any)\n if (remotelink.length) \n return remotelink;\n\n return ""; // attachment URL doesn't resolve\n}\n//}}}\n//{{{\nif (config.macros.attach.init_formatters==undefined) config.macros.attach.init_formatters=function() {\n if (this.initialized) return;\n // find the formatter for "image" and replace the handler\n for (var i=0; i<config.formatters.length && config.formatters[i].name!="image"; i++);\n if (i<config.formatters.length) config.formatters[i].handler=function(w) {\n if (!this.lookaheadRegExp) // fixup for TW2.0.x\n this.lookaheadRegExp = new RegExp(this.lookahead,"mg");\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) // Simple bracketted link\n {\n var e = w.output;\n if(lookaheadMatch[5])\n {\n var link = lookaheadMatch[5];\n // ELS -------------\n if (!config.formatterHelpers.isExternalLink) // fixup for TW2.0.x\n var external=!store.tiddlerExists(link)&&!store.isShadowTiddler(link);\n else\n var external=config.formatterHelpers.isExternalLink(link);\n if (external)\n {\n if (config.macros.attach.isAttachment(link))\n {\n e = createExternalLink(w.output,link);\n e.href=config.macros.attach.getAttachment(link);\n e.title = config.macros.attach.linkTooltip + link;\n }\n else\n e = createExternalLink(w.output,link);\n }\n else \n e = createTiddlyLink(w.output,link,false,null,w.isStatic);\n // ELS -------------\n addClass(e,"imageLink");\n }\n var img = createTiddlyElement(e,"img");\n if(lookaheadMatch[1])\n img.align = "left";\n else if(lookaheadMatch[2])\n img.align = "right";\n if(lookaheadMatch[3])\n img.title = lookaheadMatch[3];\n img.src = lookaheadMatch[4];\n // ELS -------------\n if (config.macros.attach.isAttachment(lookaheadMatch[4]))\n img.src=config.macros.attach.getAttachment(lookaheadMatch[4]);\n // ELS -------------\n w.nextMatch = this.lookaheadRegExp.lastIndex;\n }\n }\n//}}}\n//{{{\n // find the formatter for "prettyLink" and replace the handler\n for (var i=0; i<config.formatters.length && config.formatters[i].name!="prettyLink"; i++);\n if (i<config.formatters.length) {\n if (version.major>=2 && version.minor>=1 && version.revision>2) {\n config.formatters[i].handler=function(w) \n {\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source);\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n var e;\n var text = lookaheadMatch[1];\n if(lookaheadMatch[3])\n {\n // Pretty bracketted link\n var link = lookaheadMatch[3];\n if (config.macros.attach.isAttachment(link))\n {\n e = createExternalLink(w.output,link);\n e.href=config.macros.attach.getAttachment(link);\n e.title=config.macros.attach.linkTooltip+link;\n }\n else e = (!lookaheadMatch[2] && config.formatterHelpers.isExternalLink(link))\n ? createExternalLink(w.output,link)\n : createTiddlyLink(w.output,link,false,null,w.isStatic);\n }\n else\n {\n e = createTiddlyLink(w.output,text,false,null,w.isStatic);\n }\n createTiddlyText(e,text);\n w.nextMatch = this.lookaheadRegExp.lastIndex;\n }\n }\n } else { // FALLBACK for TW2.1.2 and earlier\n config.formatters[i].handler=function(w)\n {\n if (!this.lookaheadRegExp) // fixup for TW2.0.x\n this.lookaheadRegExp = new RegExp(this.lookahead,"mg");\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n var e;\n var text = lookaheadMatch[1];\n if (lookaheadMatch[2]) // Simple bracketted link\n {\n e = createTiddlyLink(w.output,text,false,null,w.isStatic);\n }\n else if(lookaheadMatch[3]) // Pretty bracketted link\n {\n var link = lookaheadMatch[4];\n // ELS -------------\n if (!config.formatterHelpers.isExternalLink) // fixup for TW2.0.x\n var external=!store.tiddlerExists(link)&&!store.isShadowTiddler(link);\n else\n var external=config.formatterHelpers.isExternalLink(link);\n if (external)\n {\n if (config.macros.attach.isAttachment(link))\n {\n e = createExternalLink(w.output,link);\n e.href=config.macros.attach.getAttachment(link);\n e.title = config.macros.attach.linkTooltip + link;\n }\n else\n e = createExternalLink(w.output,link);\n }\n else \n e = createTiddlyLink(w.output,link,false,null,w.isStatic);\n // ELS -------------\n }\n createTiddlyText(e,text);\n w.nextMatch = this.lookaheadRegExp.lastIndex;\n }\n }\n } // END FALLBACK\n } // if "prettyLink" formatter found\n this.initialized=true;\n}\n//}}}\n//{{{\nconfig.macros.attach.init_formatters(); // load time init\n//}}}\n//{{{\nif (TiddlyWiki.prototype.coreGetRecursiveTiddlerText==undefined) {\n TiddlyWiki.prototype.coreGetRecursiveTiddlerText = TiddlyWiki.prototype.getRecursiveTiddlerText;\n TiddlyWiki.prototype.getRecursiveTiddlerText = function(title,defaultText,depth) {\n return config.macros.attach.isAttachment(title)?\n config.macros.attach.getAttachment(title):this.coreGetRecursiveTiddlerText(title,defaultText,depth);\n }\n}\n//}}}
test store.php\nhttp://www.tiddlytools.com/store.php\n<<<\n--%BOUNDARY%\nContent-disposition: form-data;name="UploadPlugin";\n\nbackupDir=;user=;password=;uploaddir=upload;\n--%BOUNDARY%\nContent-disposition: form-data;name="userfile";filename="%TARGET%"\nContent-Type: %TYPE%\nContent-Length: %SIZE%\n\n%DATA%\n--%BOUNDARY%--\n<<<\n----\npublish for public web access\nhttp://www.tiddlytools.com/response.txt\n<<<\n?file=%TARGET%&data=%DATA%\n<<<\n----\npublish for password-protected web access\nhttp://www.tiddlytools.com/response.txt\n<<<\n?file=%TARGET%&data=%DATA%\n<<<\n----\nsend to WebTPS report server (encrypted)\nhttps://www.WebTPS.com/reports/upload.asp\n<<<\n?workgroup=Y2K&key=3141592653589&file=%TARGET%\n<<<\n----\nsend to my Flickr account\nhttp://www.flickr.com/\n<<<\n\n<<<
[[StyleSheetAdjustments]]\n[[BrightText]]\n/* ==== blackout ==== */\n/*{{{*/\nbody\n { background-color:#000; }\n.menubox\n { background-color:#111; }\n.viewer\n { background-color:#111; border: 1px solid #999; -moz-border-radius:1em; padding:1em; }\n.header\n { background-image: none; background-color:transparent; color:#ccf; border:0; }\n.floatingPanel, .attachPanel, #importPanel, #exportPanel,\n { background: #eee; background-image: url('[[TexturesParchmentGray]]');}\n.floatingPanel a, .attachPanel a, #messageArea a, #importPanel a, #exportPanel a, #sidebarTabs .tabContents a,\n.floatingPanel .button, .attachPanel .button, #messageArea .button, #importPanel .button, #exportPanel .button, #sidebarTabs .tabContents .button,\n.floatingPanel .tiddlyLinkExisting, .attachPanel .tiddlyLinkExisting, #messageArea .tiddlyLinkExisting, #importPanel .tiddlyLinkExisting, #exportPanel .tiddlyLinkExisting, #sidebarTabs .tabContents .tiddlyLinkExisting\n { color:#009; }\n.siteMenu .floatingPanel, #messageArea \n { background: #eee; }\n.tiddlyCard { background:#ffd; }\n\n.viewer h1,.viewer h2,.viewer h3,.viewer h4,.viewer h5 { background: #666; color:#fff; }\n#sidebarTabs .tabContents\n { background-color:#111; color:#fff; }\n#sidebarTabs .tabContents a, #sidebarTabs .tabContents .button, #sidebarTabs .tabContents .tiddlyLinkExisting\n { color:#99f; }\n/*}}}*/
/***\n|''Name:''|BreadcrumbsPlugin|\n|''Description:''||\n|''Version:''|1.4.0|\n|''Date:''|Aug 02, 2006|\n|''Source:''|http://sourceforge.net/project/showfiles.php?group_id=150646|\n|''Author:''|Alan Hecht (with 2.0 update from 'jack' and revisions by Bram Chen)|\n|''License:''|Creative Commons Attribution-ShareAlike 2.5 License<<br>>http://creativecommons.org/licenses/by-sa/2.5/|\n|''~CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.5+; InternetExplorer 6.0|\n\n!Revision History:\n__TiddlyTools variant:__\n1.4.0.1(TT) 2006.08.04 - change spaces to tabs\n1.4.0.0(TT) 2006.08.04 - modified from 1.4.0 distro:\n<<<\nin refreshCrumbs(), set {{{display:none/block}}} instead of {{{visibility:hidden/visible}}}\nin restartHome(), check for valid crumbArea before setting style\ngeneral code cleanup/reformat using tabs to indent\n<<<\n|''Version''|''Date''|''Note''|\n|1.4.0|Aug 02, 2006|Fixed bug, the redefined onClickTiddlerLink_orig_breadCrumbs works incorrectly on IE|\n|1.3.0|Jul 20, 2006|Runs compatibly with TW 2.1.0 (rev #403+)|\n|1.2.0|Feb 07, 2006|change global array breadCrumbs to config.breadCrumbs by Eric's suggestion|\n|1.1.0|Feb 04, 2006|JSLint checked|\n|1.0.0|Feb 01, 2006|TW2 ready and code Cleaned-up|\n\n!Code section:\n***/\n//{{{\nversion.extensions.breadCrumbs = {major: 1, minor: 4, revision: 0, date: new Date("Aug 02, 2006")};\nconfig.breadCrumbs = [];\n\nwindow.onClickTiddlerLink_orig_breadCrumbs = window.onClickTiddlerLink;\nwindow.onClickTiddlerLink = function(e){\n if (!e) var e = window.event;\n window.onClickTiddlerLink_orig_breadCrumbs(e);\n addCrumb(e);\n return false;\n}\n\nfunction addCrumb(e){\n if (!e) var e = window.event;\n var thisCrumb = "[[" + resolveTarget(e).getAttribute("tiddlyLink") + "]]";\n var ind = config.breadCrumbs.find(thisCrumb);\n if(ind === null)\n config.breadCrumbs.push(thisCrumb);\n else\n config.breadCrumbs.length = ind++;\n refreshCrumbs();\n return false;\n}\n\nfunction refreshCrumbs(){\n var crumbArea = document.getElementById("breadCrumbs");\n if (!crumbArea) {\n var crumbArea = document.createElement("div");\n crumbArea.id = "breadCrumbs";\n crumbArea.style.display= "none"; // ELS changed from: crumbArea.style.visibility= "hidden";\n var targetArea = document.getElementById("tiddlerDisplay");\n targetArea.parentNode.insertBefore(crumbArea,targetArea);\n }\n crumbArea.style.display = "block"; // ELS changed from: crumbArea.style.visibility = "visible";\n removeChildren(crumbArea);\n createTiddlyButton(crumbArea,"Home",null,restartHome);\n wikify(" | " + config.breadCrumbs.join(' > '),crumbArea) // ELS: changed || to |\n}\n\nfunction restartHome(){\n story.closeAllTiddlers();\n restart();\n config.breadCrumbs = [];\n var crumbArea = document.getElementById("breadCrumbs");\n if (crumbArea) // ELS: added check to make sure crumbArea exists\n crumbArea.style.display = "none"; // ELS changed from: crumbArea.style.visibility = "hidden";\n}\n//}}}
/* background images */\n/* colors and borders */\na { color:#ccf; }\na:hover { color:#fff; }\n\n#breadCrumbs { color:#ccc; }\n#breadCrumbs a { color:#ccf; }\n#titleLine { color: #fff; }\n#titleLine a { color: #009900; }\n.siteMenu { color: #fff; border:0; margin-bottom:.5em }\n.siteMenu a, .siteMenu .button, .siteMenu .tiddlyLink { color: #ccf; }\n.storyMenu { color: #fff; border:0; margin-bottom:.5em }\n.storyMenu a, .storyMenu .button, .storyMenu .tiddlyLink { color: #ccf; }\n/*\n#mainMenu { color: #fff; }\n#mainMenu .tiddlyLink { color: #def; }\n#mainMenu .tiddlyLink:hover { color: #fff; }\n#mainMenu .externalLink { color: #def; }\n#mainMenu .externalLink:hover { color: #fff; }\n#mainMenu .button, #mainMenu A { color: #def; }\n#mainMenu .button:hover, #mainMenu A:hover { color: #fff; }\n*/\n#messageArea { color: #006; }\n#messageArea a:link, #messageArea a:visited { color: #006; }\n#messageArea a:hover { color: #f00; }\n#messageArea a:active { color: #006; }\n#popup { color: #000; }\n#popup a { color: #006; }\n#popup a:hover { color: #006; }\n#popup hr { color: #666; }\n.tabContents { color: #000; }\n.tiddler .button { color: #ccf; }\n.tiddler .button:hover { color: #fff; }\n.tiddler .button:active { color: #fff; }\n.title { color: #def; }\n.subtitle { color: #89a; }\n.toolbar { color: #aaa; }\n.footer { color: #888; }\n.selectedTiddler .footer { color: #ddd; }\n.viewer { color: #fff; }\n.viewer a:link, .viewer a:visited { color: #ccf; }\n.viewer a:hover { color: #fff; }\n.viewer .button { color: #def; }\n.viewer .button:hover { color: #fff; }\n.viewer th { color: #fff; }\n.viewer td { color: #fff; }\n.viewer code { color: #ccc; }\n.viewer pre { color: #000; }\n.viewer hr { color: #666; }\n.viewer .highlight, .viewer .marked { color: #fff; }\n.viewer .tabSelected { background-color: #014; color:#fff; border-color:#999; border-width:2px; padding-bottom:2px !important; }\n.viewer .tabUnselected { background-color: #236; color:#999; border-color:#666}\n.viewer .tabContents { background-color: #014; color:#fff; border-color:#999; border-width:2px }\n.tagging a, .tagged a, .tagging .button, .tagged .button { color: #009; }\n.highlight, .marked { color: #fff; }\n.editor { color: #402C74; }\n.editorFooter { color: #aaa; }\n.editorFooter A { color: #930; }\n.editorFooter A:hover { color: #cf6; }\n.editorFooter A:active { color: #fff; }\n#licensePanel A { color: #66f; }\n#licensePanel A:hover { color: #fff; }\n#licensePanel A:active { color: #fff; }\n.errorNoSuchMacro { color: #ff0; }\n.zoomer { color: #fff; }\n\n.floatingPanel .button,\n.floatingPanel a:link,\n.floatingPanel a:visited,\n.viewer .floatingPanel .button,\n.viewer .floatingPanel a:link,\n.viewer .floatingPanel a:visited {\n color: #009 !important;\n}\n.floatingPanel a:hover,\n.viewer .floatingPanel a:hover {\n color: #fff !important;\n}\n/***\n----\n***/\n/*{{{*/\n.tiddlyCard\n { color:#000 !important; }\n.tiddlyCard a, .tiddlyCard .button, .tiddlyCard .tiddlyLinkExisting, .tiddlyCard .tiddlyLinkNonExisting\n { color:#009 !important; }\n.attachPanel a, #importPanel a, #exportpanel a,\n.attachPanel .button, #importPanel .button, #exportpanel .button,\n.attachPanel .tiddlyLinkExisting, #importPanel .tiddlyLinkExisting, #exportpanel .tiddlyLinkExisting,\n.attachPanel .tiddlyLinkNonExisting, #importPanel .tiddlyLinkNonExisting, #exportpanel .tiddlyLinkNonExisting,\n.tab .button, .tab A,\n.tab .tiddlyLinkExisting, .tab .tiddlyLinkNonExisting\n { color:#009 !important; }\n#sidebarOptions, #sidebarOptions .sliderPanel\n { color: #fff; }\n#sidebarOptions .button, #sidebarOptions A,\n#sidebarOptions .tiddlyLinkExisting, #sidebarOptions .tiddlyLinkNonExisting,\n#sidebarOptions .sliderPanel .button, #sidebarOptions .sliderPanel A,\n#sidebarOptions .sliderPanel .tiddlyLinkExisting, #sidebarOptions .sliderPanel .tiddlyLinkNonExisting\n { color: #def; }\n#sidebarTabs, #sidebarTabs .sliderPanel, #sidebarTabs .tabContents\n { color: #fff; }\n#sidebarTabs .tabContents *[class="TOCList"] /* MOZ ONLY */\n { color:#fff !important; }\n#sidebarTabs .button, /* #sidebarTabs A, */\n#sidebarTabs .tiddlyLinkExisting, #sidebarTabs .tiddlyLinkNonExisting\n { color: #def; }\n.menubox\n { color:#fff; }\n.menubox a, .menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting\n { color:#99f !important; }\n.groupbox, .groupbox table, .groupbox tbody, .groupbox tr, .groupbox td\n { color:#000; }\n.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting\n { color:#009 !important; }\n.floatingPanel, .floatingPanel table, .floatingPanel tbody, .floatingPanel tr, .floatingPanel td\n { color:#000; }\n/*}}}*/
CroatiaeAuctoresLatini is planned as a text corpus, a digital collection, and a research space. Its main subject are texts of Croatian authors writing in Latin from early Middle Ages to 19th century. \n\n
/***\n|''Name:''|CalendarPlugin|\n|''Source:''|http://www.TiddlyTools.com/#CalendarPlugin|\n|''Author:''|SteveRumsby|\n|''License:''|unknown|\n|''~CoreVersion:''|2.0.10|\n\n// // updated by Jeremy Sheeley to add cacheing for reminders\n// // see http://www.geocities.com/allredfaq/reminderMacros.html\n// // ''Changes by ELS 2006.08.23:''\n// // added handling for weeknumbers (code supplied by Martin Budden. see "wn**" comment marks)\n// // ''Changes by ELS 2005.10.30:''\n// // config.macros.calendar.handler()\n// // ^^use "tbody" element for IE compatibility^^\n// // ^^IE returns 2005 for current year, FF returns 105... fix year adjustment accordingly^^\n// // createCalendarDays()\n// // ^^use showDate() function (if defined) to render autostyled date with linked popup^^\n// // calendar stylesheet definition\n// // ^^use .calendar class-specific selectors, add text centering and margin settings^^\n\n\n!!!!!Configuration:\n<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//\n|''First day of week:''|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|\n|''First day of weekend:''|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|\n\n!!!!!Syntax:\n|{{{<<calendar>>}}}|Produce a full-year calendar for the current year|\n|{{{<<calendar year>>}}}|Produce a full-year calendar for the given year|\n|{{{<<calendar year month>>}}}|Produce a one-month calendar for the given month and year|\n|{{{<<calendar thismonth>>}}}|Produce a one-month calendar for the current month|\n|{{{<<calendar lastmonth>>}}}|Produce a one-month calendar for last month|\n|{{{<<calendar nextmonth>>}}}|Produce a one-month calendar for next month|\n\n***/\n// //Modify this section to change the text displayed for the month and day names, to a different language for example. You can also change the format of the tiddler names linked to from each date, and the colours used.\n\n//{{{\nconfig.macros.calendar = {};\n\nconfig.macros.calendar.monthnames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];\nconfig.macros.calendar.daynames = ["M", "T", "W", "T", "F", "S", "S"];\n\nconfig.macros.calendar.weekendbg = "#c0c0c0";\nconfig.macros.calendar.monthbg = "#e0e0e0";\nconfig.macros.calendar.holidaybg = "#ffc0c0";\n\n//}}}\n// //''Code section:''\n// (you should not need to alter anything below here)//\n//{{{\nif(config.options.txtCalFirstDay == undefined)\n config.options.txtCalFirstDay = 0;\nif(config.options.txtCalStartOfWeekend == undefined)\n config.options.txtCalStartOfWeekend = 5;\nif(config.options.chkDisplayWeekNumbers == undefined)//wn**\n config.options.chkDisplayWeekNumbers = false;\nif(config.options.chkDisplayWeekNumbers)\n config.options.txtCalFirstDay = 0;\n\nconfig.macros.calendar.tiddlerformat = "0DD/0MM/YYYY"; // This used to be changeable - for now, it isn't// <<smiley :-(>> \n\nversion.extensions.calendar = { major: 0, minor: 6, revision: 0, date: new Date(2006, 1, 22)};\nconfig.macros.calendar.monthdays = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nconfig.macros.calendar.holidays = [ ]; // Not sure this is required anymore - use reminders instead\n//}}}\n\n// //Is the given date a holiday?\n//{{{\nfunction calendarIsHoliday(date)\n{\n var longHoliday = date.formatString("0DD/0MM/YYYY");\n var shortHoliday = date.formatString("0DD/0MM");\n\n for(var i = 0; i < config.macros.calendar.holidays.length; i++) {\n if(config.macros.calendar.holidays[i] == longHoliday || config.macros.calendar.holidays[i] == shortHoliday) {\n return true;\n }\n }\n return false;\n}\n//}}}\n\n// //The main entry point - the macro handler.\n// //Decide what sort of calendar we are creating (month or year, and which month or year)\n// // Create the main calendar container and pass that to sub-ordinate functions to create the structure.\n// ELS 2005.10.30: added creation and use of "tbody" for IE compatibility and fixup for year >1900//\n// ELS 2005.10.30: fix year calculation for IE's getYear() function (which returns '2005' instead of '105')//\n// ELS 2006.05.29: add journalDateFmt handling//\n//{{{\nconfig.macros.calendar.handler = function(place,macroName,params)\n{\n var calendar = createTiddlyElement(place, "table", null, "calendar", null);\n var tbody = createTiddlyElement(calendar, "tbody", null, null, null);\n var today = new Date();\n var year = today.getYear();\n if (year<1900) year+=1900;\n \n // get format for journal link by reading from SideBarOptions (ELS 5/29/06 - based on suggestion by Martin Budden)\n var text = store.getTiddlerText("SideBarOptions");\n this.journalDateFmt = "DD-MMM-YYYY";\n var re = new RegExp("<<(?:newJournal)([^>]*)>>","mg"); var fm = re.exec(text);\n if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }\n\n if (params[0] == "thismonth")\n {\n cacheReminders(new Date(year, today.getMonth(), 1, 0, 0), 31);\n createCalendarOneMonth(tbody, year, today.getMonth());\n } \n else if (params[0] == "lastmonth") {\n var month = today.getMonth()-1; if (month==-1) { month=11; year--; }\n cacheReminders(new Date(year, month, 1, 0, 0), 31);\n createCalendarOneMonth(tbody, year, month);\n }\n else if (params[0] == "nextmonth") {\n var month = today.getMonth()+1; if (month>11) { month=0; year++; }\n cacheReminders(new Date(year, month, 1, 0, 0), 31);\n createCalendarOneMonth(tbody, year, month);\n }\n else {\n if (params[0]) year = params[0];\n if(params[1])\n {\n cacheReminders(new Date(year, params[1]-1, 1, 0, 0), 31);\n createCalendarOneMonth(tbody, year, params[1]-1);\n }\n else\n {\n cacheReminders(new Date(year, 0, 1, 0, 0), 366);\n createCalendarYear(tbody, year);\n }\n }\n window.reminderCacheForCalendar = null;\n}\n//}}}\n//{{{\n//This global variable is used to store reminders that have been cached\n//while the calendar is being rendered. It will be renulled after the calendar is fully rendered.\nwindow.reminderCacheForCalendar = null;\n//}}}\n//{{{\nfunction cacheReminders(date, leadtime)\n{\n if (window.findTiddlersWithReminders == null)\n return;\n window.reminderCacheForCalendar = {};\n var leadtimeHash = [];\n leadtimeHash [0] = 0;\n leadtimeHash [1] = leadtime;\n var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);\n for(var i = 0; i < t.length; i++) {\n //just tag it in the cache, so that when we're drawing days, we can bold this one.\n window.reminderCacheForCalendar[t[i]["matchedDate"]] = "reminder:" + t[i]["params"]["title"]; \n }\n}\n//}}}\n//{{{\nfunction createCalendarOneMonth(calendar, year, mon)\n{\n var row = createTiddlyElement(calendar, "tr", null, null, null);\n createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, true, year, mon);\n row = createTiddlyElement(calendar, "tr", null, null, null);\n createCalendarDayHeader(row, 1);\n createCalendarDayRowsSingle(calendar, year, mon);\n}\n//}}}\n\n//{{{\nfunction createCalendarMonth(calendar, year, mon)\n{\n var row = createTiddlyElement(calendar, "tr", null, null, null);\n createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, false, year, mon);\n row = createTiddlyElement(calendar, "tr", null, null, null);\n createCalendarDayHeader(row, 1);\n createCalendarDayRowsSingle(calendar, year, mon);\n}\n//}}}\n\n//{{{\nfunction createCalendarYear(calendar, year)\n{\n var row;\n row = createTiddlyElement(calendar, "tr", null, null, null);\n var back = createTiddlyElement(row, "td", null, null, null);\n var backHandler = function() {\n removeChildren(calendar);\n createCalendarYear(calendar, year-1);\n };\n createTiddlyButton(back, "<", "Previous year", backHandler);\n back.align = "center";\n\n var yearHeader = createTiddlyElement(row, "td", null, "calendarYear", year);\n yearHeader.align = "center";\n //yearHeader.setAttribute("colSpan", 19);\n yearHeader.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?22:19);//wn**\n\n var fwd = createTiddlyElement(row, "td", null, null, null);\n var fwdHandler = function() {\n removeChildren(calendar);\n createCalendarYear(calendar, year+1);\n };\n createTiddlyButton(fwd, ">", "Next year", fwdHandler);\n fwd.align = "center";\n\n createCalendarMonthRow(calendar, year, 0);\n createCalendarMonthRow(calendar, year, 3);\n createCalendarMonthRow(calendar, year, 6);\n createCalendarMonthRow(calendar, year, 9);\n}\n//}}}\n\n//{{{\nfunction createCalendarMonthRow(cal, year, mon)\n{\n var row = createTiddlyElement(cal, "tr", null, null, null);\n createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);\n createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);\n createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);\n row = createTiddlyElement(cal, "tr", null, null, null);\n createCalendarDayHeader(row, 3);\n createCalendarDayRows(cal, year, mon);\n}\n//}}}\n\n//{{{\nfunction createCalendarMonthHeader(cal, row, name, nav, year, mon)\n{\n var month;\n if(nav) {\n var back = createTiddlyElement(row, "td", null, null, null);\n back.align = "center";\n back.style.background = config.macros.calendar.monthbg;\n\n/*\n back.setAttribute("colSpan", 2);\n\n var backYearHandler = function() {\n var newyear = year-1;\n removeChildren(cal);\n cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);\n createCalendarOneMonth(cal, newyear, mon);\n };\n createTiddlyButton(back, "<<", "Previous year", backYearHandler);\n*/\n var backMonHandler = function() {\n var newyear = year;\n var newmon = mon-1;\n if(newmon == -1) { newmon = 11; newyear = newyear-1;}\n removeChildren(cal);\n cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);\n createCalendarOneMonth(cal, newyear, newmon);\n };\n createTiddlyButton(back, "<", "Previous month", backMonHandler);\n\n\n month = createTiddlyElement(row, "td", null, "calendarMonthname", name)\n// month.setAttribute("colSpan", 3);\n// month.setAttribute("colSpan", 5);\n month.setAttribute("colSpan", config.options.chkDisplayWeekNumbers?6:5);//wn**\n\n var fwd = createTiddlyElement(row, "td", null, null, null);\n fwd.align = "center";\n fwd.style.background = config.macros.calendar.monthbg; \n\n// fwd.setAttribute("colSpan", 2);\n var fwdMonHandler = function() {\n var newyear = year;\n var newmon = mon+1;\n if(newmon == 12) { newmon = 0; newyear = newyear+1;}\n removeChildren(cal);\n cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);\n createCalendarOneMonth(cal, newyear, newmon);\n };\n createTiddlyButton(fwd, ">", "Next month", fwdMonHandler);\n/*\n var fwdYear = createTiddlyElement(row, "td", null, null, null);\n var fwdYearHandler = function() {\n var newyear = year+1;\n removeChildren(cal);\n cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);\n createCalendarOneMonth(cal, newyear, mon);\n };\n createTiddlyButton(fwd, ">>", "Next year", fwdYearHandler);\n*/\n } else {\n month = createTiddlyElement(row, "td", null, "calendarMonthname", name)\n //month.setAttribute("colSpan", 7);\n month.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?8:7);//wn**\n }\n month.align = "center";\n month.style.background = config.macros.calendar.monthbg;\n}\n//}}}\n\n//{{{\nfunction createCalendarDayHeader(row, num)\n{\n var cell;\n for(var i = 0; i < num; i++) {\n if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, "td");//wn**\n for(var j = 0; j < 7; j++) {\n var d = j + (config.options.txtCalFirstDay - 0);\n if(d > 6) d = d - 7;\n cell = createTiddlyElement(row, "td", null, null, config.macros.calendar.daynames[d]);\n if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))\n cell.style.background = config.macros.calendar.weekendbg;\n }\n }\n}\n//}}}\n\n//{{{\nfunction createCalendarDays(row, col, first, max, year, mon)\n{\n var i;\n if (config.options.chkDisplayWeekNumbers){\n if (first<=max) {\n var ww = new Date(year,mon,first);\n createTiddlyElement(row, "td", null, null, "w"+ww.getWeek());//wn**\n }\n else createTiddlyElement(row, "td", null, null, null);//wn**\n }\n for(i = 0; i < col; i++) {\n createTiddlyElement(row, "td", null, null, null);\n }\n var day = first;\n for(i = col; i < 7; i++) {\n var d = i + (config.options.txtCalFirstDay - 0);\n if(d > 6) d = d - 7;\n var daycell = createTiddlyElement(row, "td", null, null, null);\n var isaWeekend = ((d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))? true:false);\n\n if(day > 0 && day <= max) {\n var celldate = new Date(year, mon, day);\n // ELS 2005.10.30: use <<date>> macro's showDate() function to create popup\n if (window.showDate) {\n showDate(daycell,celldate,"popup","DD",config.macros.calendar.journalDateFmt,true, isaWeekend); // ELS 5/29/06 - use journalDateFmt \n } else {\n if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;\n var title = celldate.formatString(config.macros.calendar.tiddlerformat);\n if(calendarIsHoliday(celldate)) {\n daycell.style.background = config.macros.calendar.holidaybg;\n }\n if(window.findTiddlersWithReminders == null) {\n var link = createTiddlyLink(daycell, title, false);\n link.appendChild(document.createTextNode(day));\n } else {\n var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);\n }\n }\n }\n day++;\n }\n}\n//}}}\n\n// //We've clicked on a day in a calendar - create a suitable pop-up of options.\n// //The pop-up should contain:\n// // * a link to create a new entry for that date\n// // * a link to create a new reminder for that date\n// // * an <hr>\n// // * the list of reminders for that date\n//{{{\nfunction onClickCalendarDate(e)\n{\n var button = this;\n var date = button.getAttribute("title");\n var dat = new Date(date.substr(6,4), date.substr(3,2)-1, date.substr(0, 2));\n\n date = dat.formatString(config.macros.calendar.tiddlerformat);\n var popup = createTiddlerPopup(this);\n popup.appendChild(document.createTextNode(date));\n var newReminder = function() {\n var t = store.getTiddlers(date);\n displayTiddler(null, date, 2, null, null, false, false);\n if(t) {\n document.getElementById("editorBody" + date).value += "\sn<<reminder day:" + dat.getDate() +\n " month:" + (dat.getMonth()+1) +\n " year:" + (dat.getYear()+1900) + " title: >>";\n } else {\n document.getElementById("editorBody" + date).value = "<<reminder day:" + dat.getDate() +\n " month:" + (dat.getMonth()+1) +\n " year:" + (dat.getYear()+1900) + " title: >>";\n }\n };\n var link = createTiddlyButton(popup, "New reminder", null, newReminder); \n popup.appendChild(document.createElement("hr"));\n\n var t = findTiddlersWithReminders(dat, [0,14], null, 1);\n for(var i = 0; i < t.length; i++) {\n link = createTiddlyLink(popup, t[i].tiddler, false);\n link.appendChild(document.createTextNode(t[i].tiddler));\n }\n}\n//}}}\n\n//{{{\nfunction calendarMaxDays(year, mon)\n{\n var max = config.macros.calendar.monthdays[mon];\n if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) {\n max++;\n }\n return max;\n}\n//}}}\n\n//{{{\nfunction createCalendarDayRows(cal, year, mon)\n{\n var row = createTiddlyElement(cal, "tr", null, null, null);\n\n var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);\n if(first1 < 0) first1 = first1 + 7;\n var day1 = -first1 + 1;\n var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);\n if(first2 < 0) first2 = first2 + 7;\n var day2 = -first2 + 1;\n var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);\n if(first3 < 0) first3 = first3 + 7;\n var day3 = -first3 + 1;\n\n var max1 = calendarMaxDays(year, mon);\n var max2 = calendarMaxDays(year, mon+1);\n var max3 = calendarMaxDays(year, mon+2);\n\n while(day1 <= max1 || day2 <= max2 || day3 <= max3) {\n row = createTiddlyElement(cal, "tr", null, null, null);\n createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;\n createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;\n createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;\n }\n}\n//}}}\n\n//{{{\nfunction createCalendarDayRowsSingle(cal, year, mon)\n{\n var row = createTiddlyElement(cal, "tr", null, null, null);\n\n var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);\n if(first1 < 0) first1 = first1+ 7;\n var day1 = -first1 + 1;\n var max1 = calendarMaxDays(year, mon);\n\n while(day1 <= max1) {\n row = createTiddlyElement(cal, "tr", null, null, null);\n createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;\n }\n}\n//}}}\n\n// //ELS 2005.10.30: added styles\n//{{{\nsetStylesheet(".calendar, .calendar table, .calendar th, .calendar tr, .calendar td { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }", "calendarStyles");\n//}}}\n
// // override cookie settings for CalendarPlugin:\n//{{{\nconfig.options.txtCalFirstDay=6;\nconfig.options.txtCalStartOfWeekend=5;\n//}}}
/***\n|''Name:''|CheckboxPlugin|\n|''Source:''|http://www.TiddlyTools.com/#CheckboxPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nAdd checkboxes to your tiddler content. Checkbox states can be preserved in the document by either automatically modifying the tiddler content or setting/removing tags on specified tiddlers, or they may be saved as local cookies by assigning an optional 'chkID' to the checkbox. Add custom javascript for programmatic initialization and onClick handling for any checkbox. Also provides access to checkbox DOM element data and tracks the checkbox state in TiddlyWiki's config.options[] internal data.\n\n!!!!!Usage\n<<<\nThe checkbox syntax, including all optional parameters, is contained inside a matched set of [ and ] brackets.\n{{{ [x=id(title|tag){init_script}{onclick_script}] }}}\n\nAn alternative syntax lets you place the optional parameters ''outside'' the [ and ] brackets, and is provided for backward-compatibility with existing content that may include checkbox definitions based on earlier releases of this plugin:\n{{{ [x]=id(title|tag){init_script}{onclick_script} }}}\n\n//{{{\n[ ]or[_] and [x]or[X]\n//}}}\nSimple checkboxes. The current unchecked/checked state is indicated by the character between the {{{[}}} and {{{]}}} brackets ("_" means unchecked, "X" means checked). When you click on a checkbox, the current state is retained by directly modifying the tiddler content to place the corresponding "_" or "X" character in between the brackets\n//{{{\n[x=id]\n//}}}\nAssign an optional ID to the checkbox so you can use {{{document.getElementByID("id")}}} to manipulate the checkbox DOM element, as well as tracking the current checkbox state in {{{config.options["id"]}}}. If the ID starts with "chk" the checkbox state will also be saved in a cookie, so it can be automatically restored whenever the checkbox is re-rendered (overrides any default {{{[x]}}} or {{{[_]}}} value). If a cookie value is kept, the "_" or "X" character in the tiddler content remains unchanged, and is only applied as the default when a cookie-based value is not currently defined.\n//{{{\n[x(title|tag)] or [x(title:tag)]\n//}}}\nInitializes and tracks the current checkbox state by setting or removing ("TogglyTagging") a particular tag value from a specified tiddler. If you omit the tiddler title (and the | or : separator), the specified tag is assigned to the current tiddler. If you omit the tag value, as in {{{(title|)}}}, the default tag, {{{checked}}}, is assumed. Omitting both the title and tag, {{{()}}}, tracks the checkbox state by setting the "checked" tag on the current tiddler. When tag tracking is used, the "_" or "X" character in the tiddler content remains unchanged, and is not used to set or track the checkbox state. If a tiddler title named in the tag does not exist, the checkbox state defaults to //unselected//. When the checkbox is subsequently changed to //selected//, it will automatically (and silently) create the missing tiddler and then add the tag to it. //''NOTE: beginning with version 2.1.2 of this plugin, the "|" separator is the preferred separator between the title and tag name, as it avoids syntactic ambiguity when ":" is used within tiddler titles or tag names.''//\n//{{{\n[x{javascript}{javascript}]\n//}}}\nYou can define optional javascript code segments to add custom initialization and/or 'onClick' handling to a checkbox. The current checkbox state (and it's other DOM attributes) can be set or read from within these code segments by reference to the default context-object, 'this'.\n\nThe first code segment will be executed when the checkbox is initially displayed, so that you can programmatically determine it's starting checked/unchecked state. The second code segment (if present) is executed whenever the checkbox is clicked, so that you can perform programmed responses or intercept and override the checkbox state based on complex logic using the TW core API or custom functions defined in plugins (e.g. testing a particular tiddler title to see if certain tags are set or setting some tags when the checkbox is clicked).\n\nNote: if you want to use the default checkbox initialization processing with a custom onclick function, use this syntax: {{{ [x=id{}{javascript}] }}} \n<<<\n!!!!!Configuration\n<<<\nNormally, when a checkbox state is changed, the affected tiddlers are automatically re-rendered, so that any checkbox-dependent dynamic content can be updated. There are three possible tiddlers to be re-rendered, depending upon where the checkbox is placed, and what kind of storage method it is using.\n*''container'': the tiddler in which the checkbox is displayed. (e.g., this tiddler)\n*''tagged'': the tiddler that is being tagged (e.g., "~MyTask" when tagging "~MyTask:done")\n*''tagging'': the "tag tiddler" (e.g., "~done" when tagging "~MyTask:done")\nYou can set the default refresh handling for all checkboxes in your document by using the following javascript syntax either in a systemConfig plugin, or as an inline script. (Substitute true/false values as desired):\n{{{config.checkbox.refresh = { tagged:true, tagging:true, container:true };}}}\n\nYou can also override these defaults for any given checkbox by using an initialization function to set one or more of the refresh options. For example:\n{{{[_{this.refresh.container=false}]}}}\n<<<\n!!!!!Examples\n<<<\n//{{{\n[X] label\n[_] label\n//}}}\n>checked and unchecked static default values\n>[X] label\n>[_] label\n//{{{\n[_=demo] label\n//}}}\n>document-based value (id='demo', no cookie)\n>[_=demo] label\n//{{{\n[_=chkDemo] label\n//}}}\n>cookie-based value (id='chkDemo')\n>[_=chkDemo] label\n//{{{\n[_(CheckboxPlugin|demotag)]\n[_(CheckboxPlugin|demotag){this.refresh.tagged=this.refresh.container=false}]\n//}}}\n>tag-based value (TogglyTagging)\n>[_(CheckboxPlugin|demotag)] toggle 'demotag' (and refresh tiddler display)\n>[_(CheckboxPlugin|demotag){this.refresh.tagged=this.refresh.container=false}] toggle 'demotag' (no refresh)\n>current tags: <script>return store.getTiddler(story.findContainingTiddler(place).id.substr(7)).tags.toString();</script>\n><script label="click to view current tags">alert(store.getTiddler(story.findContainingTiddler(place).id.substr(7)).tags.toString());return false</script>\n//{{{\n[X{this.checked=true}{alert(this.checked?"on":"off")}] message box with checkbox state\n//}}}\n>custom init and onClick functions\n>[X{this.checked=true}{alert(this.checked?"on":"off")}] message box with checkbox state\nRetrieving option values:\nconfig.options['demo']=<script>return config.options['demo']?"true":"false";</script>\nconfig.options['chkDemo']=<script>return config.options['chkDemo']?"true":"false";</script>\n\n!!!!!Installation\nimport (or copy/paste) the following tiddlers into your document:\n''CheckboxPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n2006.05.04 - 2.1.3 fix use of findContainingTiddler() to check for a non-null return value, so that checkboxes won't crash when used outside of tiddler display context (such as in header, sidebar or mainmenu)\n2006.03.11 - 2.1.2 added "|" as delimiter to tag-based storage syntax (e.g. "tiddler|tag") to avoid parsing ambiguity when tiddler titles or tag names contain ":". Using ":" as a delimiter is still supported but is deprecated in favor of the new "|" usage. Based on a problem reported by JeffMason.\n2006.02.25 - 2.1.0 added configuration options to enable/disable forced refresh of tiddlers when toggling tags\n2006.02.23 - 2.0.4 when toggling tags, force refresh of the tiddler containing the checkbox.\n2006.02.23 - 2.0.3 when toggling tags, force refresh of the 'tagged tiddler' so that tag-related tiddler content (such as "to-do" lists) can be re-rendered.\n2006.02.23 - 2.0.2 when using tag-based storage, allow use [[ and ]] to quote tiddler or tag names that contain spaces:\n{{{[x([[Tiddler with spaces]]:[[tag with spaces]])]}}}\n2006.01.10 - 2.0.1 when toggling tags, force refresh of the 'tagging tiddler'. For example, if you toggle the "systemConfig" tag on a plugin, the corresponding "systemConfig" TIDDLER will be automatically refreshed (if currently displayed), so that the 'tagged' list in that tiddler will remain up-to-date.\n2006.01.04 - 2.0.0 update for ~TW2.0\n2005.12.27 - 1.1.2 Fix lookAhead regExp handling for {{{[x=id]}}}, which had been including the "]" in the extracted ID. \nAdded check for "chk" prefix on ID before calling saveOptionCookie()\n2005.12.26 - 1.1.2 Corrected use of toUpperCase() in tiddler re-write code when comparing {{{[X]}}} in tiddler content with checkbox state. Fixes a problem where simple checkboxes could be set, but never cleared.\n2005.12.26 - 1.1.0 Revise syntax so all optional parameters are included INSIDE the [ and ] brackets. Backward compatibility with older syntax is supported, so content changes are not required when upgrading to the current version of this plugin. Based on a suggestion by GeoffSlocock\n2005.12.25 - 1.0.0 added support for tracking checkbox state using tags ("TogglyTagging")\nRevised version number for official post-beta release.\n2005.12.08 - 0.9.3 support separate 'init' and 'onclick' function definitions.\n2005.12.08 - 0.9.2 clean up lookahead pattern\n2005.12.07 - 0.9.1 only update tiddler source content if checkbox state is actually different. Eliminates unnecessary tiddler changes (and 'unsaved changes' warnings)\n2005.12.07 - 0.9.0 initial BETA release\n<<<\n!!!!!Credits\n<<<\nThis feature was created by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.CheckboxPlugin = {major: 2, minor: 1, revision:3 , date: new Date(2006,5,4)};\n//}}}\n\n// // 1.2.x compatibility\n//{{{\nif (!window.story) window.story=window;\nif (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}\nif (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}\nif (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}\n//}}}\n\n//{{{\nconfig.checkbox = { refresh: { tagged:true, tagging:true, container:true } };\nconfig.formatters.push( {\n name: "checkbox",\n match: "\s\s[[xX_ ][\s\s]\s\s=\s\s(\s\s{]",\n lookahead: "\s\s[([xX_ ])(\s\s])?(=[^\s\ss\s\s(\s\s]{]+)?(\s\s([^\s\s)]*\s\s))?({[^}]*})?({[^}]*})?(\s\s])?",\n handler: function(w)\n {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n // get params\n var checked=lookaheadMatch[1];\n var id=lookaheadMatch[3];\n var tag=lookaheadMatch[4];\n var fn_init=lookaheadMatch[5];\n var fn_click=lookaheadMatch[6];\n // create checkbox element\n var c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick=onClickCheckbox;\n c.srcpos=w.matchStart+1; // remember location of "X"\n c.container=story.findContainingTiddler(w.output); if (c.container) c.container=c.container.id.substr(7); // tiddler containing checkbox\n c.refresh = { };\n c.refresh.container=config.checkbox.refresh.container;\n c.refresh.tagged=config.checkbox.refresh.tagged;\n c.refresh.tagging=config.checkbox.refresh.tagging;\n w.output.appendChild(c);\n // set default state\n c.checked=(checked.toUpperCase()=="X");\n // get/set state by ID\n if (id) {\n c.id=id.substr(1); // trim off leading "="\n if (config.options[c.id]!=undefined)\n c.checked=config.options[c.id];\n else\n config.options[c.id]=c.checked;\n }\n // get/set state by tag\n if (tag) {\n c.tiddler=c.container;\n c.tag=tag.substr(1,tag.length-2).trim(); // trim off parentheses\n var pos=c.tag.indexOf("|"); if (pos==-1) var pos=c.tag.indexOf(":");\n if (pos==0) { c.tag=tag.substr(1); }\n if (pos>0) { c.tiddler=c.tag.substr(0,pos).replace(/\s[\s[/g,"").replace(/\s]\s]/g,""); c.tag=c.tag.substr(pos+1); }\n c.tag.replace(/\s[\s[/g,"").replace(/\s]\s]/g,"");\n if (!c.tag.length) c.tag="checked";\n var t=store.getTiddler(c.tiddler);\n c.checked = (t && t.tags)?(t.tags.find(c.tag)!=null):false;\n }\n if (fn_init) c.fn_init=fn_init.trim().substr(1,fn_init.length-2); // trim off surrounding { and } delimiters\n if (fn_click) c.fn_click=fn_click.trim().substr(1,fn_click.length-2);\n c.init=true; c.onclick(); c.init=false; // compute initial state and save in tiddler/config/cookie\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n }\n)\n//}}}\n\n//{{{\nfunction onClickCheckbox()\n{\n if (this.fn_init)\n // custom function hook to set initial state (run only once)\n { try { eval(this.fn_init); this.fn_init=null; } catch(e) { displayMessage("Checkbox init error: "+e.toString()); } }\n else if (this.fn_click)\n // custom function hook to override or react to changes in checkbox state\n { try { eval(this.fn_click) } catch(e) { displayMessage("Checkbox click error: "+e.toString()); } }\n if (this.id)\n // save state in config AND cookie (only when ID starts with 'chk')\n { config.options[this.id]=this.checked; if (this.id.substr(0,3)=="chk") saveOptionCookie(this.id); }\n if ((!this.id || this.id.substr(0,3)!="chk") && !this.tag) {\n // save state in tiddler content only if not using cookie or tag tracking\n var t=story.findContainingTiddler(this); if (t) {\n var t=store.getTiddler(t.id.substr(7));\n if (this.checked!=(t.text.substr(this.srcpos,1).toUpperCase()=="X")) { // if changed\n t.set(null,t.text.substr(0,this.srcpos)+(this.checked?"X":"_")+t.text.substr(this.srcpos+1),null,null,t.tags);\n store.setDirty(true);\n }\n }\n }\n if (this.tag) {\n var t=store.getTiddler(this.tiddler);\n if (!t) { t=(new Tiddler()); t.set(this.tiddler,"",config.options.txtUserName,(new Date()),null); store.addTiddler(t); } \n var tagged=(t.tags && t.tags.find(this.tag)!=null);\n if (this.checked && !tagged) { t.tags.push(this.tag); store.setDirty(true); }\n if (!this.checked && tagged) { t.tags.splice(t.tags.find(this.tag),1); store.setDirty(true); }\n // if tag state has been changed, force a display update\n if (this.checked!=tagged) {\n if (this.refresh.tagged) story.refreshTiddler(this.tiddler,null,true); // the TAGGED tiddler\n if (this.refresh.tagging) story.refreshTiddler(this.tag,null,true); // the TAGGING tiddler\n }\n }\n // refresh containing tiddler (but not during initial rendering, or we get an infinite loop!)\n if (!this.init && this.refresh.container && this.container!=this.tiddler)\n story.refreshTiddler(this.container,null,true); // the tiddler CONTAINING the checkbox\n return true;\n}\n//}}}
<script label="close">\n var panel=place;\n while (panel && panel.className!='sliderPanel' && panel.className!='floatingPanel')\n { panel=panel.parentNode; }\n if (!panel) { alert('not in a slider'); return false; }\n panel.style.display='none';\n var cookie=panel.button.sliderCookie;\n if (cookie && cookie.length) {\n config.options[cookie]=false;\n if (config.options[cookie]!=panel.button.defOpen)\n saveOptionCookie(cookie);\n else { // remove cookie if slider is in default display state\n var ex=new Date(); ex.setTime(ex.getTime()-1000);\n document.cookie = cookie+"=novalue; path=/; expires="+ex.toGMTString();\n }\n }\n return false;\n</script><script>\n place.lastChild.style.fontWeight="normal";\n if (story.findContainingTiddler(place))\n place.lastChild.className="toolbar button";\n else {\n var s=place.lastChild.style\n s.fontSize="90%"; s.float="right";\n }\n</script>
/***\n|''Name:''|CollapseTiddlersPlugin|\n|''Source:''|http://gensoft.revhost.net/Collapse.html|\n|''Author:''|Bradley Meck|\n|''License:''|unknown|\n|''~CoreVersion:''|2.0.10|\n\n|ELS 2/24/2006: added fallback to "CollapsedTemplate if "WebCollapsedTemplate" is not found |\n|ELS 2/6/2006: added check for 'readOnly' flag to use alternative "WebCollapsedTemplate" |\n\n***/\n\nconfig.commands.collapseTiddler = {\ntext: "fold",\ntooltip: "Collapse this tiddler",\nhandler: function(event,src,title)\n{\nvar e = story.findContainingTiddler(src);\nif(e.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE]){\nvar t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";\nif (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }\nif(e.getAttribute("template") != t ){\ne.setAttribute("oldTemplate",e.getAttribute("template"));\nstory.displayTiddler(null,title,t);\n}\n}\n}\n}\n\nconfig.commands.expandTiddler = {\ntext: "unfold",\ntooltip: "Expand this tiddler",\nhandler: function(event,src,title)\n{\nvar e = story.findContainingTiddler(src);\nstory.displayTiddler(null,title,e.getAttribute("oldTemplate"));\n}\n}\n\nconfig.macros.collapseAll = {\nhandler: function(place,macroName,params,wikifier,paramString,tiddler){\ncreateTiddlyButton(place,"Collapse All","",function(){\nstory.forEachTiddler(function(title,tiddler){\nif(tiddler.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE])\nvar t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";\nif (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }\nstory.displayTiddler(null,title,t);\n})})\n}\n}\n\nconfig.macros.expandAll = {\nhandler: function(place,macroName,params,wikifier,paramString,tiddler){\ncreateTiddlyButton(place,"Expand All","",function(){\nstory.forEachTiddler(function(title,tiddler){\nvar t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";\nif (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }\nif(tiddler.getAttribute("template") == t) story.displayTiddler(null,title,tiddler.getAttribute("oldTemplate"));\n})})\n}\n}\n\nconfig.commands.collapseOthers = {\ntext: "focus",\ntooltip: "Expand this tiddler and collapse all others",\nhandler: function(event,src,title)\n{\nvar e = story.findContainingTiddler(src);\nstory.forEachTiddler(function(title,tiddler){\nif(tiddler.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE]){\nvar t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";\nif (!store.tiddlerExists(t)) { alert("Can't find 'CollapsedTemplate'"); return; }\nif (e==tiddler) t=e.getAttribute("oldTemplate");\n//////////\n// ELS 2006.02.22 - removed this line. if t==null, then the *current* view template, not the default "ViewTemplate", will be used.\n// if (!t||!t.length) t=!readOnly?"ViewTemplate":"WebViewTemplate";\n//////////\nstory.displayTiddler(null,title,t);\n}\n})\n}\n}
<!--{{{-->\n<div class='toolbar' macro='toolbar expandTiddler +collapseOthers -closeTiddler closeOthers editTiddler sendTiddler permalink references jump'></div>\n<div class='title' macro='view title'></div>\n<!--}}}-->\n
// // add TiddlyTools 'brand' to shadow SiteTitle (default for TiddlyTools starter documents)\n//{{{\nconfig.shadowTiddlers.SiteTitle += " {{medium{with [[TiddlyTools |http://www.TiddlyTools.com]] extensions}}}\sn";\n//}}}\n\n// // add shadows for common TiddlyTools default tiddlers used in starter documents\n//{{{\nconfig.shadowTiddlers.Welcome = "[[Welcome]]";\nconfig.shadowTiddlers.About = "[[About]]";\nconfig.shadowTiddlers.Download = "[[Download]]";\nconfig.shadowTiddlers.Contact = "[[Contact]]";\n//}}}\n\n// // force no animation\n//{{{\nconfig.options.chkAnimate=false;\n//}}}\n\n// // re-label default text for some UI elements\n//{{{\nconfig.commands.permalink.text="link"; // shortened from "permalink" to save space :-)\n//}}}
Neven Jovanović\nOdsjek za klasičnu filologiju, Filozofski fakultet, Sveučilište u Zagrebu\nDepartment of Classical Philology, Faculty of Philosophy, University of Zagreb\n\nLučićeva 3\nHR-10000 Zagreb\nHrvatska / Croatia\n\nneven.jovanovic@ffzg.hr
/***\n|''Name:''|CopyTiddlerPlugin|\n|''Source:''|http://www.TiddlyTools.com/#CopyTiddlerPlugin|\n|''OriginalAuthor:''|TimMorgan|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nQuickly create a copy of any existing tiddler.\n!!!!!Usage\n<<<\nEdit an existing tiddler. Select the "copy" toolbar item. A new tiddler editor is opened with a title of "Copy of TiddlerName", and text/tags equal to the current values that are displayed in the existing tiddler editor (including any unsaved changes you may have made).\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''CopyTiddlerPlugin'' (tagged with <<tag systemConfig>>)\n\nIf you are using the default (shadow) EditTemplate, the plugin automatically updates the template to include the ''copyTiddler'' toolbar command. If you have created a custom EditTemplate tiddler, you will need to manually add the ''copyTiddler'' toolbar command to your existing template:\n{{{\n<!-- add 'copyTiddler' command to existing editor toolbar definition -->\n<div class='toolbar' macro='toolbar ... copyTiddler ... '>\n}}}\n<<<\n!!!!!Revisions\n<<<\n''2006.12.12 [2.0.0]'' completely rewritten so plugin just creates a new tiddler EDITOR with a copy of the current tiddler EDITOR contents, instead of creating the new tiddler in the STORE by copying the current tiddler values from the STORE.\n''2005.xx.xx [1.0.0]'' original version by Tim Morgan\n<<<\n!!!!!Credits\n>This feature was originally developed by Tim Morgan. Current version developed by EricShulman from [[ELS Design Studios|http://www.elsdesign.com]]\n!!!!!Code\n***/\n//{{{\nconfig.commands.copyTiddler = {\n text: 'copy',\n hideReadOnly: true,\n tooltip: 'Make a copy of this tiddler',\n handler: function(event,src,title) {\n var newTitle = 'Copy of ' + title;\n story.displayTiddler(null,newTitle,DEFAULT_EDIT_TEMPLATE);\n story.getTiddlerField(newTitle,"text").value=story.getTiddlerField(title,"text").value;\n story.getTiddlerField(newTitle,"tags").value=story.getTiddlerField(title,"tags").value;\n story.focusTiddler(newTitle,"title");\n return false;\n }\n};\n\n// automatically tweak shadow EditTemplate to add "copyTiddler" toolbar command (following "cancelTiddler")\nconfig.shadowTiddlers.EditTemplate=config.shadowTiddlers.EditTemplate.replace(/cancelTiddler/,"cancelTiddler copyTiddler");\n\n// backward-compatibility to support TW versions <2.1.0\nif (Story.prototype.getTiddlerField==undefined) {\n Story.prototype.getTiddlerField = function(title,field) {\n var tiddlerElem = document.getElementById(this.idPrefix + title);\n var e = null;\n if(tiddlerElem != null) {\n var children = tiddlerElem.getElementsByTagName("*");\n for (var t=0; t<children.length; t++) {\n var c = children[t];\n if(c.tagName.toLowerCase() == "input" || c.tagName.toLowerCase() == "textarea") {\n if(!e) e = c;\n if(c.getAttribute("edit") == field) e = c;\n }\n }\n }\n return e;\n }\n}\n//}}}
// // {{small{\n// // This tweak adds URL paramifier handlers for "hide:elementID" and "show:elementID". This is useful for forcing the display state of specific TW page elements, without requiring StyleSheet changes. For example, if your customized StyleSheet hides the sidebar (useful for 'read only' published documents), you can force it to display when you need to edit the document by adding {{{#show:sidebar}}} to the document URL. Alternatively, you might want to supress non-tiddler content when printing by hiding the sidebars and header (e.g., {{{#hide:mainMenu hide:sidebar hide:header}}})\n//{{{\nif (config.paramifiers) { // check for backward-compatibility\n config.paramifiers.hide = { onstart: function(id) { var e=document.getElementById(id); if (e) e.style.display="none"; } };\n config.paramifiers.show = { onstart: function(id) { var e=document.getElementById(id); if (e) e.style.display="block"; } };\n}\n//}}}\n\n// // This HIJACK tweak pre-processes source content to convert "backslash-newline" into {{{<<br>>>}}} before wikify(), so that literal newlines can be embedded in line-mode wiki syntax (e.g., tables, bullets, etc.). Based on a suggestion from Sitaram Chamarty.\n//{{{\nwindow.coreWikify = wikify;\nwindow.wikify = function(source,output,highlightRegExp,tiddler)\n{\n if (source) source=source.replace(/\s\s\sn\ss*/mg,"<<br>>");\n coreWikify(source,output,highlightRegExp,tiddler)\n}\n//}}}\n\n// // This tweak adds a check for any tiddlers that are being actively edited, so that accidental page transitions don't discard tiddler content that has been entered but not yet saved to the 'store' (i.e., by pressing 'done').\n//{{{\nconfig.messages.editing_confirmExit ="There are currently open tiddler editors that may contain unsaved changes.\snIf you continue you will lose those changes";\nfunction confirmExit()\n{\n hadConfirmExit = true;\n if(store && store.isDirty && store.isDirty())\n return config.messages.confirmExit;\n // added by ELS\n var editing=false;\n story.forEachTiddler(function(title,element) { if(element.getAttribute("dirty")=="true") editing=true; });\n if (editing) return config.messages.editing_confirmExit;\n}\n//}}}\n\n// // When a slider is opened/closed with animation enabled, the opacity/alphafilter styles are incrementally adjusted to create a "fade-in/fade-out" effect. However, this effect seems to render incredibly slowly on FireFox, and even slower when the background image is a complex JPG photo image, making animation impractical to use. This tweak provides an option to disable the opacity/alphafilter handling, while leaving the 'incremental height' animation intact. The resulting increase in performance makes it possible to leave the animation enabled so that you can benefit from the visual cues it provides.\n//{{{\nif (!config.options.chkEnableFade) config.options.chkEnableFade=false; // ELS: added conditional option for fade-in/fade-out\nSlider.prototype.tick = function()\n{\n this.progress += this.step;\n if(this.progress < 0 || this.progress > 1)\n {\n this.stop();\n return false;\n }\n else\n {\n var f = Animator.slowInSlowOut(this.progress);\n var h = this.realHeight * f;\n this.element.style.height = h + "px";\n if (config.options.chkEnableFade) // ELS: added conditional option for fade-in/fade-out\n {\n this.element.style.opacity = f;\n this.element.style.filter = "alpha(opacity:" + f * 100 +")";\n }\n return true;\n }\n}\n//}}}\n// // }}}
Research on the writings of Marko Marulić shows what amazing discoveries can still be made today concerning all aspects of life and work of a Croatian author. The [[Lexicon of Croatian Writers]] (Leksikon hrvatskih pisaca, Školska knjiga, 2000) demonstrates both part and role Croatian writers in Latin play in national cultural heritage and literary production. Still, texts of these writers &mdash; even when reliably edited and adequately published &mdash; remain too dispersed and not easily accessible; publishing is often left to (much appreciated) private and local initiatives (cf. again the example of Marko Marulić, whose Opera omnia, now in its is 15th volume, is being published by the Splitski književni krug &mdash; a citizen's organization based in Split, Croatia).
/***\n|''Name:''|DatePlugin|\n|''Source:''|http://www.TiddlyTools.com/#DatePlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nThere are quite a few calendar generators, reminders, to-do lists, 'dated tiddlers' journals, blog-makers and GTD-like schedule managers that have been built around TW. While they all have different purposes, and vary in format, interaction, and style, in one way or another each of these plugins displays and/or uses date-based information to make finding, accessing and managing relevant tiddlers easier. This plugin provides a general approach to embedding dates and date-based links/menus within tiddler content.\n\nThis plugin display formatted dates, for the specified year, month, day using number values or mathematical expressions such as (Y+1) or (D+30). Optionally, you can create a link from the formatted output to a 'dated tiddler' for quick blogging or create a popup menu that includes the dated tiddler link plus links to changes made on that date as well as links to any pending reminders for the coming 31 days (if the RemindersPlugin is installed). This plugin also provides a public API for easily incorporating formatted date output (with or without the links/popups) into other plugins, such as calendar generators, etc.\n!!!!!Usage\n<<<\nWhen installed, this plugin defines a macro: {{{<<date [mode] [date] [format] [linkformat]>>}}}. All of the macro parameters are optional and, in it's simplest form, {{{<<date>>}}}, it is equivalent to the ~TiddlyWiki core macro, {{{<<today>>}}}.\n\nHowever, where {{{<<today>>}}} simply inserts the current date/time in a predefined format (or custom format, using {{{<<today [format]>>}}}), the {{{<<date>>}}} macro's parameters take it much further than that:\n* [mode] is either ''display'', ''link'' or ''popup''. If omitted, it defaults to ''display''. This param let's you select between simply displaying a formatted date, or creating a link to a specific 'date titled' tiddler or a popup menu containing a dated tiddler link, plus links to changes and reminders.\n* [date] lets you enter ANY date (not just today) as ''year, month, and day values or simple mathematical expressions'' using pre-defined variables, Y, M, and D for the current year, month and day, repectively. You can display the modification date of the current tiddler by using the keyword: ''tiddler'' in place of the year, month and day parameters. Use ''tiddler://name-of-tiddler//'' to display the modification date of a specific tiddler. You can also use keywords ''today'' or ''filedate'' to refer to these //dynamically changing// date/time values. \n* [format] and [linkformat] uses standard ~TiddlyWiki date formatting syntax. The default is "YYYY.0MM.0DD"\n>^^''DDD'' - day of week in full (eg, "Monday"), ''DD'' - day of month, ''0DD'' - adds leading zero^^\n>^^''MMM'' - month in full (eg, "July"), ''MM'' - month number, ''0MM'' - adds leading zero^^\n>^^''YYYY'' - full year, ''YY'' - two digit year, ''hh'' - hours, ''mm'' - minutes, ''ss'' - seconds^^\n>^^//note: use of hh, mm or ss format codes is only supported with ''tiddler'', ''today'' or ''filedate'' values//^^\n* [linkformat] - specify an alternative date format so that the title of a 'dated tiddler' link can have a format that differs from the date's displayed format\n\nIn addition to the macro syntax, DatePlugin also provides a public javascript API so that other plugins that work with dates (such as calendar generators, etc.) can quickly incorporate date formatted links or popups into their output:\n\n''{{{showDate(place, date, mode, format, linkformat, autostyle, weekend)}}}'' \n\nNote that in addition to the parameters provided by the macro interface, the javascript API also supports two optional true/false parameters:\n* [autostyle] - when true, the font/background styles of formatted dates are automatically adjusted to show the date's status: 'today' is boxed, 'changes' are bold, 'reminders' are underlined, while weekends and holidays (as well as changes and reminders) can each have a different background color to make them more visibly distinct from each other.\n* [weekend] - true indicates a weekend, false indicates a weekday. When this parameter is omitted, the plugin uses internal defaults to automatically determine when a given date falls on a weekend.\n<<<\n!!!!!Examples\n<<<\nThe current date: <<date>>\nThe current time: <<date today "0hh:0mm:0ss">>\nToday's blog: <<date link today "DDD, MMM DDth, YYYY">>\nRecent blogs/changes/reminders: <<date popup Y M D-1 "yesterday">> <<date popup today "today">> <<date popup Y M D+1 "tomorrow">>\nThe first day of next month will be a <<date Y M+1 1 "DDD">>\nThis tiddler (DatePlugin) was last updated on: <<date tiddler "DDD, MMM DDth, YYYY">>\nThe SiteUrl was last updated on: <<date tiddler:SiteUrl "DDD, MMM DDth, YYYY">>\nThis document was last saved on <<date filedate "DDD, MMM DDth, YYYY at 0hh:0mm:0ss">>\n<<date 2006 07 24 "MMM DDth, YYYY">> will be a <<date 2006 07 24 "DDD">>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''DatePlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.05.09 [2.2.1]'' added "todaybg" handling to set background color of current date. Also, honor excludeLists tag when getting lists of tiddlers. Based on suggestions by Mark Hulme.\n''2006.05.05 [2.2.0]'' added "linkedbg" handling to set background color when a 'dated tiddler' exists. Based on a suggestion by Mark Hulme.\n''2006.03.08 [2.1.2]'' add 'override leadtime' flag param in call to findTiddlersWithReminders(), and add "Enter a title" default text to new reminder handler. Thanks to Jeremy Sheeley for these additional tweaks.\n''2006.03.06 [2.1.0]'' hasReminders() nows uses window.reminderCacheForCalendar[] when present. If calendar cache is not present, indexReminders() now uses findTiddlersWithReminders() with a 90-day look ahead to check for reminders. Also, switched default background colors for autostyled dates: reminders are now greenish ("c0ffee") and holidays are now reddish ("ffaace").\n''2006.02.14 [2.0.5]'' when readOnly is set (by TW core), omit "new reminders..." popup menu item and, if a "dated tiddler" does not already exist, display the date as simple text instead of a link.\n''2006.02.05 [2.0.4]'' added var to variables that were unintentionally global. Avoids FireFox 1.5.0.1 crash bug when referencing global variables\n''2006.01.18 [2.0.3]'' In 1.2.x the tiddler editor's text area control was given an element ID=("tiddlerBody"+title), so that it was easy to locate this field and programmatically modify its content. With the addition of configuration templates in 2.x, the textarea no longer has an ID assigned. To find this control we now look through all the child nodes of the tiddler editor to locate a "textarea" control where attribute("edit") equals "text", and then append the new reminder to the contents of that control.\n''2006.01.11 [2.0.2]'' correct 'weekend' override detection logic in showDate()\n''2006.01.10 [2.0.1]'' allow custom-defined weekend days (default defined in config.macros.date.weekend[] array)\nadded flag param to showDate() API to override internal weekend[] array\n''2005.12.27 [2.0.0]'' Update for TW2.0\nAdded parameter handling for 'linkformat'\n''2005.12.21 [1.2.2]'' FF's date.getYear() function returns 105 (for the current year, 2005). When calculating a date value from Y M and D expressions, the plugin adds 1900 to the returned year value get the current year number. But IE's date.getYear() already returns 2005. As a result, plugin calculated date values on IE were incorrect (e.g., 3905 instead of 2005). Adding +1900 is now conditional so the values will be correct on both browsers.\n''2005.11.07 [1.2.1]'' added support for "tiddler" dynamic date parameter\n''2005.11.06 [1.2.0]'' added support for "tiddler:title" dynamic date parameter\n''2005.11.03 [1.1.2]'' when a reminder doesn't have a specified title parameter, use the title of the tiddler that contains the reminder as "fallback" text in the popup menu. Based on a suggestion from BenjaminKudria.\n''2005.11.03 [1.1.1]'' Temporarily bypass hasReminders() logic to avoid excessive overhead from generating the indexReminders() cache. While reminders can still appear in the popup menu, they just won't be indicated by auto-styling the date number that is displayed. This single change saves approx. 60% overhead (5 second delay reduced to under 2 seconds).\n''2005.11.01 [1.1.0]'' corrected logic in hasModifieds() and hasReminders() so caching of indexed modifieds and reminders is done just once, as intended. This should hopefully speed up calendar generators and other plugins that render multiple dates...\n''2005.10.31 [1.0.1]'' documentation and code cleanup\n''2005.10.31 [1.0.0]'' initial public release\n''2005.10.30 [0.9.0]'' pre-release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.date = {major: 2, minor: 2, revision: 1, date: new Date(2006,5,9)};\n//}}}\n\n//{{{\nconfig.macros.date = {\n format: "YYYY.0MM.0DD", // default date display format\n linkformat: "YYYY.0MM.0DD", // 'dated tiddler' link format\n linkedbg: "#babb1e", // "babble"\n todaybg: "#ffab1e", // "fable"\n weekendbg: "#c0c0c0", // "cocoa"\n holidaybg: "#ffaace", // "face"\n modifiedsbg: "#bbeeff", // "beef"\n remindersbg: "#c0ffee", // "coffee"\n holidays: [ "01/01", "07/04", "07/24", "11/24" ], // NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)\n weekend: [ 1,0,0,0,0,0,1 ] // [ day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6 ]\n};\n//}}}\n\n//{{{\nconfig.macros.date.handler = function(place,macroName,params)\n{\n // do we want to see a link, a popup, or just a formatted date?\n var mode="display";\n if (params[0]=="display") { mode=params[0]; params.shift(); }\n if (params[0]=="popup") { mode=params[0]; params.shift(); }\n if (params[0]=="link") { mode=params[0]; params.shift(); }\n // get the date\n var now = new Date();\n var date = now;\n if (!params[0] || params[0]=="today")\n { params.shift(); }\n else if (params[0]=="filedate")\n { date=new Date(document.lastModified); params.shift(); }\n else if (params[0]=="tiddler")\n { date=store.getTiddler(story.findContainingTiddler(place).id.substr(7)).modified; params.shift(); }\n else if (params[0].substr(0,8)=="tiddler:")\n { var t; if ((t=store.getTiddler(params[0].substr(8)))) date=t.modified; params.shift(); }\n else {\n var y = eval(params.shift().replace(/Y/ig,(now.getYear()<1900)?now.getYear()+1900:now.getYear()));\n var m = eval(params.shift().replace(/M/ig,now.getMonth()+1));\n var d = eval(params.shift().replace(/D/ig,now.getDate()+0));\n date = new Date(y,m-1,d);\n }\n // date format with optional custom override\n var format=this.format; if (params[0]) format=params.shift();\n var linkformat=this.linkformat; if (params[0]) linkformat=params.shift();\n showDate(place,date,mode,format,linkformat);\n}\n//}}}\n\n//{{{\nwindow.showDate=showDate;\nfunction showDate(place,date,mode,format,linkformat,autostyle,weekend)\n{\n if (!mode) mode="display";\n if (!format) format=config.macros.date.format;\n if (!linkformat) linkformat=config.macros.date.linkformat;\n if (!autostyle) autostyle=false;\n\n // format the date output\n var title = date.formatString(format);\n var linkto = date.formatString(linkformat);\n\n // just show the formatted output\n if (mode=="display") { place.appendChild(document.createTextNode(title)); return; }\n\n // link to a 'dated tiddler'\n var link = createTiddlyLink(place, linkto, false);\n link.appendChild(document.createTextNode(title));\n link.title = linkto;\n link.date = date;\n link.format = format;\n link.linkformat = linkformat;\n\n // if using a popup menu, replace click handler for dated tiddler link\n // with handler for popup and make link text non-italic (i.e., an 'existing link' look)\n if (mode=="popup") {\n link.onclick = onClickDatePopup;\n link.style.fontStyle="normal";\n }\n\n // format the popup link to show what kind of info it contains (for use with calendar generators)\n if (!autostyle) return;\n if (hasModifieds(date))\n { link.style.fontStyle="normal"; link.style.fontWeight="bold"; }\n if (hasReminders(date))\n { link.style.textDecoration="underline"; }\n if(isToday(date))\n { link.style.border="1px solid black"; }\n\n if( (weekend!=undefined?weekend:isWeekend(date)) && (config.macros.date.weekendbg!="") )\n { place.style.background = config.macros.date.weekendbg; }\n if(isHoliday(date)&&(config.macros.date.holidaybg!=""))\n { place.style.background = config.macros.date.holidaybg; }\n if (hasModifieds(date)&&(config.macros.date.modifiedsbg!=""))\n { place.style.background = config.macros.date.modifiedsbg; }\n if (store.tiddlerExists(linkto)&&(config.macros.date.linkedbg!=""))\n { place.style.background = config.macros.date.linkedbg; }\n if (hasReminders(date)&&(config.macros.date.remindersbg!=""))\n { place.style.background = config.macros.date.remindersbg; }\n if(isToday(date)&&(config.macros.date.todaybg!=""))\n { place.style.background = config.macros.date.todaybg; }\n}\n//}}}\n\n//{{{\nfunction isToday(date) // returns true if date is today\n { var now=new Date(); return ((now-date>=0) && (now-date<86400000)); }\n\nfunction isWeekend(date) // returns true if date is a weekend\n { return (config.macros.date.weekend[date.getDay()]); }\n\nfunction isHoliday(date) // returns true if date is a holiday\n{\n var longHoliday = date.formatString("0MM/0DD/YYYY");\n var shortHoliday = date.formatString("0MM/0DD");\n for(var i = 0; i < config.macros.date.holidays.length; i++) {\n var holiday=config.macros.date.holidays[i];\n if (holiday==longHoliday||holiday==shortHoliday) return true;\n }\n return false;\n}\n//}}}\n\n//{{{\n// Event handler for clicking on a day popup\nfunction onClickDatePopup(e)\n{\n if (!e) var e = window.event;\n var theTarget = resolveTarget(e);\n var popup = createTiddlerPopup(this);\n if(popup) {\n // always show dated tiddler link (or just date, if readOnly) at the top...\n if (!readOnly || store.tiddlerExists(this.date.formatString(this.linkformat)))\n createTiddlyLink(popup,this.date.formatString(this.linkformat),true);\n else\n createTiddlyText(popup,this.date.formatString(this.linkformat));\n addModifiedsToPopup(popup,this.date,this.format);\n addRemindersToPopup(popup,this.date,this.linkformat);\n }\n scrollToTiddlerPopup(popup,false);\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return(false);\n}\n//}}}\n\n//{{{\nfunction indexModifieds() // build list of tiddlers, hash indexed by modification date\n{\n var modifieds= { };\n var tiddlers = store.getTiddlers("title","excludeLists");\n for (var t = 0; t < tiddlers.length; t++) {\n var date = tiddlers[t].modified.formatString("YYYY0MM0DD")\n if (!modifieds[date])\n modifieds[date]=new Array();\n modifieds[date].push(tiddlers[t].title);\n }\n return modifieds;\n}\nfunction hasModifieds(date) // returns true if date has modified tiddlers\n{\n if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();\n return (config.macros.date.modifieds[date.formatString("YYYY0MM0DD")]!=undefined);\n}\n\nfunction addModifiedsToPopup(popup,when,format)\n{\n if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();\n var indent=String.fromCharCode(160)+String.fromCharCode(160);\n var mods = config.macros.date.modifieds[when.formatString("YYYY0MM0DD")];\n if (mods) {\n mods.sort();\n var e=createTiddlyElement(popup,"div",null,null,"changes:");\n for(var t=0; t<mods.length; t++) {\n var link=createTiddlyLink(popup,mods[t],false);\n link.appendChild(document.createTextNode(indent+mods[t]));\n createTiddlyElement(popup,"br",null,null,null);\n }\n }\n}\n//}}}\n\n//{{{\nfunction indexReminders(date,leadtime) // build list of tiddlers with reminders, hash indexed by reminder date\n{\n var reminders = { };\n if(window.findTiddlersWithReminders!=undefined) { // reminder plugin is installed\n // DEBUG var starttime=new Date();\n var t = findTiddlersWithReminders(date, [0,leadtime], null, null, 1);\n for(var i=0; i<t.length; i++) reminders[t[i].matchedDate]=true;\n // DEBUG var out="Found "+t.length+" reminders in "+((new Date())-starttime+1)+"ms\sn";\n // DEBUG out+="startdate: "+date.toLocaleDateString()+"\sn"+"leadtime: "+leadtime+" days\sn\sn";\n // DEBUG for(var i=0; i<t.length; i++) { out+=t[i].matchedDate.toLocaleDateString()+" "+t[i].params.title+"\sn"; }\n // DEBUG alert(out);\n }\n return reminders;\n}\n\nfunction hasReminders(date) // returns true if date has reminders\n{\n if (window.reminderCacheForCalendar)\n return window.reminderCacheForCalendar[date]; // use calendar cache\n if (!config.macros.date.reminders)\n config.macros.date.reminders = indexReminders(date,90); // create a 90-day leadtime reminder cache\n return (config.macros.date.reminders[date]);\n}\n\nfunction addRemindersToPopup(popup,when,format)\n{\n if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed\n\n var indent = String.fromCharCode(160)+String.fromCharCode(160);\n var reminders=findTiddlersWithReminders(when, [0,31],null,null,1);\n var e=createTiddlyElement(popup,"div",null,null,"reminders:"+(!reminders.length?" none":""));\n for(var t=0; t<reminders.length; t++) {\n link = createTiddlyLink(popup,reminders[t].tiddler,false);\n var diff=reminders[t].diff;\n diff=(diff<1)?"Today":((diff==1)?"Tomorrow":diff+" days");\n var txt=(reminders[t].params["title"])?reminders[t].params["title"]:reminders[t].tiddler;\n link.appendChild(document.createTextNode(indent+diff+" - "+txt));\n createTiddlyElement(popup,"br",null,null,null);\n }\n if (readOnly) return; // omit "new reminder..." link\n var link = createTiddlyLink(popup,indent+"new reminder...",true); createTiddlyElement(popup,"br");\n var title = when.formatString(format);\n link.title="add a reminder to '"+title+"'";\n link.onclick = function() {\n // show tiddler editor\n story.displayTiddler(null, title, 2, null, null, false, false);\n // find body 'textarea'\n var c =document.getElementById("tiddler" + title).getElementsByTagName("*");\n for (var i=0; i<c.length; i++) if ((c[i].tagName.toLowerCase()=="textarea") && (c[i].getAttribute("edit")=="text")) break;\n // append reminder macro to tiddler content\n if (i<c.length) {\n if (store.tiddlerExists(title)) c[i].value+="\sn"; else c[i].value="";\n c[i].value += "<<reminder";\n c[i].value += " day:"+when.getDate();\n c[i].value += " month:"+(when.getMonth()+1);\n c[i].value += " year:"+when.getFullYear();\n c[i].value += ' title:"Enter a title" >>';\n }\n };\n}\n//}}}\n
// // date plugin calendar colors\n//{{{\nconfig.macros.date.holidays=[ "01/01", "07/04", "07/24", "11/24" ]; // NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)\nconfig.macros.date.weekend=[ 1,0,0,0,0,0,1 ]; // day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6\nconfig.macros.date.format="YYYY.0MM.0DD"; // default date display format\nconfig.macros.date.linkformat="YYYY.0MM.0DD"; // 'dated tiddler' link format\nconfig.macros.date.weekendbg="#c0c0c0";\nconfig.macros.date.holidaybg="#ffaace";\nconfig.macros.date.modifiedsbg="#bbeeff";\nconfig.macros.date.linkedbg="#babb1e";\nconfig.macros.date.remindersbg="#c0ffee";\n//}}}\n
[[Welcome]]\n
//(kliknite na pojedinu točku da saznate više)//\n\nAktivnosti:\n*[[Polazište]]\n*[[Računalni unos]] tekstova\n*[[Kodiranje]] tekstova\n*[[Izrada i objavljivanje]] CAuLa korpusa\n*[[Objavljivanje na internetu]]\n*[[Usavršavanje]] korisničkog sučelja korpusa\n*[[Usavršavanje tekstova]]\n*[[Širenje]] korpusa\n*[[Predstavljanje i evaluacija]]
The leading project here seems to be the [[Perseus Project|http://www.perseus.tufts.edu/]], "an evolving digital library, engineering interactions through time, space, and language", freely available, and comprising, among other material, classical Greek and Latin texts, both literary and non-literary (papyri and ostraka), as well as images (Greek vases) and secondary literature. The Perseus Project solved important problems with representing the ancient Greek writing system on the internet, with connecting texts and secondary literature, with presenting statistical data; it offers a stimulating workspace for research and teaching. It is also a good example of an ever-growing resource, extending now into literature which is not Greek or Latin.
Let us point towards a minimal and a maximal example. \n\nItalian corpus [[Poeti d'Italia in lingua latina|http://157.138.65.54:8080/poetiditalia/]] offers textual searches on some 200 Italian authors (and some Croatian, too) from the Middle and Early Modern ages, with minimal bio-bibliographical information, with no possibilty to add own materials, comments or translations, and with somewhat unfriendly way of defining subgroups of the corpus for searching purposes. \n\nOn the other hand, the German [[MATEO / CAMENA corpus|http://www.uni-mannheim.de/mateo/camenahtdocs/camena.html]] seems to be more a repository than a database, but a dynamical one. It grows steadily, improving the markup, adding metadata and images. Unfortunately, its search interface is also somewhat unyieldy.
Digital collections broaden the scope of research possible; a computer-searchable and manipulable text may open new ways of reading and study. Supported by fast networks, such collections become available globally &mdash; everywhere and all of the time &mdash;, not only to research institutions, but to schools, public libraries, private homes. A global information infrastructure may enhance our own cultural identity &mdash; and help us learn about completely different identities. But literary texts from the past require approaches different from those now common on the internet: we have yet to explore how a stimulating and useful workspace for prolonged and intensive textual study should look (and feel) like.
<script>\n if (!story.findContainingTiddler(place)) return;\n var t=story.findContainingTiddler(place); // get the tiddler element\n for (var i=0; i<t.childNodes.length; i++)\n if (hasClass(t.childNodes[i],"viewer")) t.ondblclick=null; // disable double-click\n</script>
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler copyTiddler deleteTiddler autosizeEditor'></div>\n<div class='title' macro='view title'></div>\n<div class='editor' macro='edit title'></div>\n<div class='editor' macro='edit text'></div>\n<div class='editor' macro='edit tags'></div>\n<div class='editorFooter'>\n<span macro='message views.editor.tagPrompt'></span>\n<span macro='tagChooser'></span>\n</div>\n<span macro='resizeEditor'></span>\n<span macro="setUserName"></span>
Croatia has a rich and varied TraditionOfWritingInLatin from Middle Ages until well into 19. century.\n\nThe CroatiaeAuctoresLatini (CAuLa) digital collection aims to gather texts from this tradition in one easily accessible, usable, and searchable corpus. \n\nThe corpus should help scholars and readers to explore, analyse, and understand this facet of Croatian and European cultural heritage.\n
/% usage:\n <<tiddler ExpandSlidersScript with: elementID expandlabel collapselabel>>\n\n%/<script label="expand">\n // if 'in a tiddler', expand all sliders... otherwise, expand based on passed in element ID\n var here=story.findContainingTiddler(place);\n if (!here) {\n if ("$1"=="$"+"1") { alert("ExpandSlidersScript: not in a tiddler, please use 'with: elementID' syntax"); return; }\n var here=document.getElementById("$1");\n if (!here) { alert("ExpandSlidersScript: unknown elementID: '$1'"); return; }\n }\n var expandlabel="expand"; if ("$2"!="$"+"2") var expandlabel="$2";\n var collapselabel="collapse"; if ("$3"!="$"+"3") var collapselabel="$3";\n var elems=here.getElementsByTagName("*");\n var state=(place.innerHTML.toLowerCase().indexOf("expand")!=-1)?"none":"block";\n for (var e=0; e<elems.length; e++) {\n var p=elems[e].sliderPanel;\n if (p && p.className=="sliderPanel") {\n if (p.style.display==state) window.onClickNestedSlider({target:elems[e]});\n }\n }\n place.innerHTML=state=="none"?collapselabel:expandlabel;\n return false;\n</script><script>\n place.lastChild.className="button";\n var expandlabel="expand"; if ("$2"!="$"+"2") var expandlabel="$2";\n var collapselabel="collapse"; if ("$3"!="$"+"3") var collapselabel="$3";\n if (place.lastChild.innerHTML.toLowerCase().indexOf("expand")==-1)\n place.lastChild.innerHTML=collapselabel;\n else\n place.lastChild.innerHTML=expandlabel;\n</script>
<<exportTiddlers inline>>
/***\n|''Name:''|ExportTiddlersPlugin|\n|''Source:''|http://www.TiddlyTools.com/#ExportTiddlersPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nWhen many people edit copies of the same TiddlyWiki document, the ability to easily copy and share these changes so they can then be redistributed to the entire group is very important. This ability is also very useful when moving your own tiddlers from document to document (e.g., when upgrading to the latest version of TiddlyWiki, or 'pre-loading' your favorite stylesheets into a new 'empty' TiddlyWiki document.)\n\nExportTiddlersPlugin let you ''select and extract tiddlers from your ~TiddlyWiki documents and save them to a local file'' or a remote server (requires installation of compatible server-side scripting, still under development...). An interactive control panel lets you specify a destination, and then select which tiddlers to export. A convenient 'selection filter' helps you pick desired tiddlers by specifying a combination of modification dates, tags, or tiddler text to be matched or excluded. ''Tiddler data can be output as ~TiddlyWiki "storeArea ~DIVs" that can be imported into another ~TiddlyWiki or as ~RSS-compatible XML that can be published for RSS syndication.''\n\n!!!!!Inline interface (live)\n<<<\n<<exportTiddlers inline>>\n<<<\n!!!!!Usage\n<<<\nOptional "special tiddlers" used by this plugin:\n* SiteUrl^^\nURL for official server-published version of document being viewed (used in XML export)\ndefault: //none//^^\n* SiteHost^^\nhost name/address for remote server (e.g., "www.server.com" or "192.168.1.27")\ndefault: //none//^^\n* SitePost^^\nremote path/filename for submitting changes (e.g., "/cgi-bin/submit.cgi")\ndefault: //none//^^\n* SiteParams^^\narguments (if any) for server-side receiving script\ndefault: //none//^^\n* SiteNotify^^\naddresses (if any) for sending automatic server-side email notices\ndefault: //none//^^\n* SiteID^^\nusername or other authorization identifier for login-controlled access to remote server\ndefault: current TiddlyWiki username (e.g., "YourName")^^\n* SiteDate^^\nstored date/time stamp for most recent published version of document\ndefault: current document.modified value (i.e., the 'file date')^^\n<<<\n!!!!!Example\n<<<\n<<exportTiddlers>>\n<<<\n!!!!!Installation\n<<<\nImport (or copy/paste) the following tiddlers into your document:\n''ExportTiddlersPlugin'' (tagged with <<tag systemConfig>>)\n\ncreate/edit ''SideBarOptions'': (sidebar menu items) \n^^Add {{{<<exportTiddlers>>}}} macro^^\n<<<\n!!!!!Revision History\n<<<\n''2006.11.08 [2.2.4]'' added promptForExportFilename() and replaced type="file" control with edit field + browse button ("...").\n''2006.10.12 [2.2.3]'' in exportDIVFooter(), write POST-BODY-START/END markers for compatibility with TW2.1 core file format. Based on report from Jose Gonzalez.\n''2006.05.11 [2.2.2]'' in createExportPanel, removed call to addNotification() to no longer auto-refresh the list every time a tiddler is changed. Instead, call refreshExportList(0) only when the panel is first rendered and each time it is made visible. Prevents unneeded feedback messages from being displayed and increases overall document performance, since the listbox is no longer being updated each time a tiddler is saved.\n''2006.05.02 [2.2.1]'' Use displayMessage() to show number of selected tiddlers instead of updating listbox 'header' item after each selection. Prevents awkward 'scroll-to-top' behavior that made multi-select via ctrl-click nearly impossible. Reported by Paul Reiber.\n''2006.04.29 [2.2.0]'' New features: "Notes" are free-form text that is inserted in the header of a TWDIV export file. When exporting to a server, the "notify" checkbox indicates that server-side script processing should send an email message when the export file is stored on the server. Comma-separated addresses may be typed in, or pre-defined in the SiteNotify tiddler.\n''2006.03.29 [2.1.3]'' added calls to convertUnicodeToUTF8() for generated output, so it better handles international characters.\n''2006.02.12 [2.1.2]'' added var to unintended global 'tags' in matchTags(). Avoids FF1501 bug when filtering by tags. (based on report by TedPavlic)\n''2006.02.04 [2.1.1]'' added var to variables that were unintentionally global. Avoids FireFox 1.5.0.1 crash bug when referencing global variables\n''2006.02.02 [2.1.0]'' Added support for output of complete TiddlyWiki documents. Let's you use ExportTiddlers to generate 'starter' documents from selected tiddlers.\n''2006.01.21 [2.0.1]'' Defer initial panel creation and only register a notification function when panel first is created\nin saveChanges 'hijack', create panel as needed. Note: if window.event is not available to identify the click location, the export panel is positioned relative to the 'tiddlerDisplay' element of the TW document.\n''2005.12.27 [2.0.0]'' Update for TW2.0\nDefer initial panel creation and only register a notification function when panel first is created\n''2005.12.24 [0.9.5]'' Minor adjustments to CSS to force correct link colors regardless of TW stylesheet selection\n''2005.12.16 [0.9.4]'' Dynamically create/remove exportPanel as needed to ensure only one instance of interface elements exists, even if there are multiple instances of macro embedding.\n''2005.11.15 [0.9.2]'' added non-Ajax post function to bypass javascript security restrictions on cross-domain I/O. Moved AJAX functions to separate tiddler (no longer needed here). Generalized HTTP server to support UnaWiki servers\n''2005.11.08 [0.9.1]'' moved HTML, CSS and control initialization into exportInit() function and call from macro handler instead of at load time. This allows exportPanel to be placed within the same containing element as the "export tiddlers" button, so that relative positioning can be achieved.\n''2005.10.28 [0.9.0]'' added 'select opened tiddlers' feature\nBased on a suggestion by Geoff Slocock\n''2005.10.24 [0.8.3]'' Corrected hijack of 'save changes' when using http:\n''2005.10.18 [0.8.2]'' added AJAX functions\n''2005.10.18 [0.8.1]'' Corrected timezone handling when filtering for date ranges.\nImproved error checking/reporting for invalid filter values and filters that don't match any tiddlers.\nExporting localfile-to-localfile is working for IE and FF\nExporting server-to-localfile works in IE (after ActiveX warnings), but has security issues in FF\nCross-domain exporting (localfile/server-to-server) is under development\nCookies to remember filter settings - coming soon\nMore style tweaks, minor text changes and some assorted layout cleanup.\n''2005.10.17 [0.8.0]'' First pre-release.\n''2005.10.16 [0.7.0]'' filter by tags\n''2005.10.15 [0.6.0]'' filter by title/text\n''2005.10.14 [0.5.0]'' export to local file (DIV or XML)\n''2005.10.14 [0.4.0]'' filter by start/end date\n''2005.10.13 [0.3.0]'' panel interaction\n''2005.10.11 [0.2.0]'' panel layout\n''2005.10.10 [0.1.0]'' code framework\n''2005.10.09 [0.0.0]''development started\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n// // version\n//{{{\nversion.extensions.exportTiddlers = {major: 2, minor: 2, revision: 4, date: new Date(2006,11,8)};\n//}}}\n\n// // macro handler\n//{{{\nconfig.macros.exportTiddlers = {\n label: "export tiddlers",\n prompt: "Copy selected tiddlers to an export document",\n newdefault: "export.html",\n datetimefmt: "0MM/0DD/YYYY 0hh:0mm:0ss" // for "filter date/time" edit fields\n};\n\nconfig.macros.exportTiddlers.handler = function(place,macroName,params) {\n if (params[0]!="inline")\n { createTiddlyButton(place,this.label,this.prompt,onClickExportMenu); return; }\n var panel=createExportPanel(place);\n panel.style.position="static";\n panel.style.display="block";\n}\n\nfunction createExportPanel(place) {\n var panel=document.getElementById("exportPanel");\n if (panel) { panel.parentNode.removeChild(panel); }\n setStylesheet(config.macros.exportTiddlers.css,"exportTiddlers");\n panel=createTiddlyElement(place,"span","exportPanel",null,null)\n panel.innerHTML=config.macros.exportTiddlers.html;\n exportShowPanel(document.location.protocol);\n exportInitFilter();\n refreshExportList(0);\n return panel;\n}\n\nfunction onClickExportMenu(e)\n{\n if (!e) var e = window.event;\n var parent=resolveTarget(e).parentNode;\n var panel = document.getElementById("exportPanel");\n if (panel==undefined || panel.parentNode!=parent)\n panel=createExportPanel(parent);\n var isOpen = panel.style.display=="block";\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));\n else\n panel.style.display = isOpen ? "none" : "block" ;\n if (panel.style.display!="none") refreshExportList(0); // update list when panel is made visible\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return(false);\n}\n//}}}\n\n// // Hijack saveChanges - diverts 'notFileUrlError' to display export control panel instead\n//{{{\nwindow.coreSaveChanges=window.saveChanges;\nwindow.saveChanges = function()\n{\n if (document.location.protocol=="file:") { coreSaveChanges(); return; }\n var e = window.event;\n var parent=e?resolveTarget(e).parentNode:document.body;\n var panel = document.getElementById("exportPanel");\n if (panel==undefined || panel.parentNode!=parent) panel=createExportPanel(parent);\n exportShowPanel(document.location.protocol);\n if (parent==document.body) { panel.style.left="30%"; panel.style.top="30%"; }\n panel.style.display = "block" ;\n}\n//}}}\n\n// // IE needs explicit scoping for functions called by browser events\n//{{{\nwindow.onClickExportMenu=onClickExportMenu;\nwindow.onClickExportButton=onClickExportButton;\nwindow.exportShowPanel=exportShowPanel;\nwindow.exportShowFilterFields=exportShowFilterFields;\nwindow.refreshExportList=refreshExportList;\n//}}}\n\n// // CSS for floating export control panel\n//{{{\nconfig.macros.exportTiddlers.css = '\s\n#exportPanel {\s\n display: none; position:absolute; z-index:12; width:35em; right:105%; top:6em;\s\n background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\s\n border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\s\n padding: 0.5em; margin:0em; -moz-border-radius:1em;\s\n}\s\n#exportPanel a, #exportPanel td a { color:#009; display:inline; margin:0px; padding:1px; }\s\n#exportPanel table { width:100%; border:0px; padding:0px; margin:0px; font-size:8pt; line-height:110%; background:transparent; }\s\n#exportPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }\s\n#exportPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }\s\n#exportPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}\s\n#exportPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%; }\s\n#exportPanel textarea { width:98%;padding:0px;margin:0px;overflow:auto;font-size:8pt; }\s\n#exportPanel .box { border:1px solid black; padding:3px; margin-bottom:5px; background:#f8f8f8; -moz-border-radius:5px; }\s\n#exportPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }\s\n#exportPanel .rad { width:auto;border:0 }\s\n#exportPanel .chk { width:auto;border:0 }\s\n#exportPanel .btn { width:auto; }\s\n#exportPanel .btn1 { width:98%; }\s\n#exportPanel .btn2 { width:48%; }\s\n#exportPanel .btn3 { width:32%; }\s\n#exportPanel .btn4 { width:24%; }\s\n#exportPanel .btn5 { width:19%; }\s\n';\n//}}}\n\n// // HTML for export control panel interface\n//{{{\nconfig.macros.exportTiddlers.html = '\s\n<!-- output target and format -->\s\n<table cellpadding="0" cellspacing="0"><tr><td width=50%>\s\n export to\s\n <select size=1 id="exportTo" onchange="exportShowPanel(this.value);">\s\n <option value="file:" SELECTED>this computer</option>\s\n <option value="http:">web server (http)</option>\s\n <option value="https:">secure web server (https)</option>\s\n <option value="ftp:">file server (ftp)</option>\s\n </select>\s\n</td><td width=50%>\s\n output format\s\n <select id="exportFormat" size=1>\s\n <option value="DIV">TiddlyWiki export file</option>\s\n <option value="TW">TiddlyWiki document</option>\s\n <option value="XML">RSS feed (XML)</option>\s\n </select>\s\n</td></tr></table>\s\n\s\n<!-- export to local file -->\s\n<div id="exportLocalPanel" style="margin-top:5px;">\s\nlocal path/filename<br>\s\n<input type="text" id="exportFilename" size=40 style="width:93%"><input \s\n type="button" id="exportBrowse" value="..." title="select or enter a local folder/file..." style="width:5%" \s\n onclick="this.previousSibling.value=window.promptForExportFilename(this);">\s\n<!--<input type="file" id="exportFilename" size=57 style="width:100%"><br>-->\s\n</div><!--panel-->\s\n\s\n<!-- export to http server -->\s\n<div id="exportHTTPPanel" style="display:none;margin-top:5px;">\s\n<table><tr><td align=left>\s\n server location, script, and parameters<br>\s\n</td><td align=right>\s\n <input type="checkbox" class="chk" id="exportNotify"\s\n onClick="document.getElementById(\s'exportSetNotifyPanel\s').style.display=this.checked?\s'block\s':\s'none\s'"> notify\s\n</td></tr></table>\s\n<input type="text" id="exportHTTPServerURL" onfocus="this.select()"><br>\s\n<div id="exportSetNotifyPanel" style="display:none">\s\n send email notices to<br>\s\n <input type="text" id="exportNotifyTo" onfocus="this.select()"><br>\s\n</div>\s\n</div><!--panel-->\s\n\s\n<!-- export to ftp server -->\s\n<div id="exportFTPPanel" style="display:none;margin-top:5px;">\s\n<table cellpadding="0" cellspacing="0" width="32%"><tr valign="top"><td>\s\n host server<br>\s\n <input type="text" id="exportFTPHost" onfocus="this.select()"><br>\s\n</td><td width="32%">\s\n username<br>\s\n <input type="text" id="exportFTPID" onfocus="this.select()"><br>\s\n</td><td width="32%">\s\n password<br>\s\n <input type="password" id="exportFTPPW" onfocus="this.select()"><br>\s\n</td></tr></table>\s\nFTP path/filename<br>\s\n<input type="text" id="exportFTPFilename" onfocus="this.select()"><br>\s\n</div><!--panel-->\s\n\s\n<!-- notes -->\s\nnotes<br>\s\n<textarea id="exportNotes" rows=3 cols=40 style="height:4em;margin-bottom:5px;" onfocus="this.select()"></textarea> \s\n\s\n<!-- list of tiddlers -->\s\n<table><tr align="left"><td>\s\n select:\s\n <a href="JavaScript:;" id="exportSelectAll"\s\n onclick="onClickExportButton(this)" title="select all tiddlers">\s\n &nbsp;all&nbsp;</a>\s\n <a href="JavaScript:;" id="exportSelectChanges"\s\n onclick="onClickExportButton(this)" title="select tiddlers changed since last save">\s\n &nbsp;changes&nbsp;</a> \s\n <a href="JavaScript:;" id="exportSelectOpened"\s\n onclick="onClickExportButton(this)" title="select tiddlers currently being displayed">\s\n &nbsp;opened&nbsp;</a> \s\n <a href="JavaScript:;" id="exportToggleFilter"\s\n onclick="onClickExportButton(this)" title="show/hide selection filter">\s\n &nbsp;filter&nbsp;</a> \s\n</td><td align="right">\s\n <a href="JavaScript:;" id="exportListSmaller"\s\n onclick="onClickExportButton(this)" title="reduce list size">\s\n &nbsp;&#150;&nbsp;</a>\s\n <a href="JavaScript:;" id="exportListLarger"\s\n onclick="onClickExportButton(this)" title="increase list size">\s\n &nbsp;+&nbsp;</a>\s\n</td></tr></table>\s\n<select id="exportList" multiple size="10" style="margin-bottom:5px;"\s\n onchange="refreshExportList(this.selectedIndex)">\s\n</select><br>\s\n</div><!--box-->\s\n\s\n<!-- selection filter -->\s\n<div id="exportFilterPanel" style="display:none">\s\n<table><tr align="left"><td>\s\n selection filter\s\n</td><td align="right">\s\n <a href="JavaScript:;" id="exportHideFilter"\s\n onclick="onClickExportButton(this)" title="hide selection filter">hide</a>\s\n</td></tr></table>\s\n<div class="box">\s\n<input type="checkbox" class="chk" id="exportFilterStart" value="1"\s\n onclick="exportShowFilterFields(this)"> starting date/time<br>\s\n<table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">\s\n <select size=1 id="exportFilterStartBy" onchange="exportShowFilterFields(this);">\s\n <option value="0">today</option>\s\n <option value="1">yesterday</option>\s\n <option value="7">a week ago</option>\s\n <option value="30">a month ago</option>\s\n <option value="site">SiteDate</option>\s\n <option value="file">file date</option>\s\n <option value="other">other (mm/dd/yyyy hh:mm)</option>\s\n </select>\s\n</td><td width="50%">\s\n <input type="text" id="exportStartDate" onfocus="this.select()"\s\n onchange="document.getElementById(\s'exportFilterStartBy\s').value=\s'other\s';">\s\n</td></tr></table>\s\n<input type="checkbox" class="chk" id="exportFilterEnd" value="1"\s\n onclick="exportShowFilterFields(this)"> ending date/time<br>\s\n<table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">\s\n <select size=1 id="exportFilterEndBy" onchange="exportShowFilterFields(this);">\s\n <option value="0">today</option>\s\n <option value="1">yesterday</option>\s\n <option value="7">a week ago</option>\s\n <option value="30">a month ago</option>\s\n <option value="site">SiteDate</option>\s\n <option value="file">file date</option>\s\n <option value="other">other (mm/dd/yyyy hh:mm)</option>\s\n </select>\s\n</td><td width="50%">\s\n <input type="text" id="exportEndDate" onfocus="this.select()"\s\n onchange="document.getElementById(\s'exportFilterEndBy\s').value=\s'other\s';">\s\n</td></tr></table>\s\n<input type="checkbox" class="chk" id=exportFilterTags value="1"\s\n onclick="exportShowFilterFields(this)"> match tags<br>\s\n<input type="text" id="exportTags" onfocus="this.select()">\s\n<input type="checkbox" class="chk" id=exportFilterText value="1"\s\n onclick="exportShowFilterFields(this)"> match titles/tiddler text<br>\s\n<input type="text" id="exportText" onfocus="this.select()">\s\n</div> <!--box-->\s\n</div> <!--panel-->\s\n\s\n<!-- action buttons -->\s\n<div style="text-align:center">\s\n<input type=button class="btn3" onclick="onClickExportButton(this)"\s\n id="exportFilter" value="apply filter">\s\n<input type=button class="btn3" onclick="onClickExportButton(this)"\s\n id="exportStart" value="export tiddlers">\s\n<input type=button class="btn3" onclick="onClickExportButton(this)"\s\n id="exportClose" value="close">\s\n</div><!--center-->\s\n';\n//}}}\n\n// // initialize interface\n// // exportShowPanel(which)\n//{{{\nfunction exportShowPanel(which) {\n var index=0; var panel='exportLocalPanel';\n switch (which) {\n case 'file:':\n case undefined:\n index=0; panel='exportLocalPanel'; break;\n case 'http:':\n index=1; panel='exportHTTPPanel'; break;\n case 'https:':\n index=2; panel='exportHTTPPanel'; break;\n case 'ftp:':\n index=3; panel='exportFTPPanel'; break;\n default:\n alert("Sorry, export to "+which+" is not yet available");\n break;\n }\n exportInitPanel(which);\n document.getElementById('exportTo').selectedIndex=index;\n document.getElementById('exportLocalPanel').style.display='none';\n document.getElementById('exportHTTPPanel').style.display='none';\n document.getElementById('exportFTPPanel').style.display='none';\n document.getElementById(panel).style.display='block';\n}\n//}}}\n\n// // exportInitPanel(which)\n//{{{\nfunction exportInitPanel(which) {\n switch (which) {\n case "file:": // LOCAL EXPORT PANEL: file/path:\n // ** no init - security issues in IE **\n break;\n case "http:": // WEB EXPORT PANEL\n case "https:": // SECURE WEB EXPORT PANEL\n // url\n if (store.tiddlerExists("unawiki_download")) {\n var theURL=store.getTiddlerText("unawiki_download");\n theURL=theURL.replace(/\s[\s[download\s|/,'').replace(/\s]\s]/,'');\n var title=(store.tiddlerExists("unawiki_host"))?"unawiki_host":"SiteHost";\n var theHost=store.getTiddlerText(title);\n if (!theHost || !theHost.length) theHost=document.location.host;\n if (!theHost || !theHost.length) theHost=title;\n }\n // server script/params\n var title=(store.tiddlerExists("unawiki_host"))?"unawiki_host":"SiteHost";\n var theHost=store.getTiddlerText(title);\n if (!theHost || !theHost.length) theHost=document.location.host;\n if (!theHost || !theHost.length) theHost=title;\n // get POST\n var title=(store.tiddlerExists("unawiki_post"))?"unawiki_post":"SitePost";\n var thePost=store.getTiddlerText(title);\n if (!thePost || !thePost.length) thePost="/"+title;\n // get PARAMS\n var title=(store.tiddlerExists("unawiki_params"))?"unawiki_params":"SiteParams";\n var theParams=store.getTiddlerText(title);\n if (!theParams|| !theParams.length) theParams=title;\n var serverURL = which+"//"+theHost+thePost+"?"+theParams;\n document.getElementById("exportHTTPServerURL").value=serverURL;\n // get NOTIFY\n var theAddresses=store.getTiddlerText("SiteNotify");\n if (!theAddresses|| !theAddresses.length) theAddresses="SiteNotify";\n document.getElementById("exportNotifyTo").value=theAddresses;\n break;\n case "ftp:": // FTP EXPORT PANEL\n // host\n var siteHost=store.getTiddlerText("SiteHost");\n if (!siteHost || !siteHost.length) siteHost=document.location.host;\n if (!siteHost || !siteHost.length) siteHost="SiteHost";\n document.getElementById("exportFTPHost").value=siteHost;\n // username\n var siteID=store.getTiddlerText("SiteID");\n if (!siteID || !siteID.length) siteID=config.options.txtUserName;\n document.getElementById("exportFTPID").value=siteID;\n // password\n document.getElementById("exportFTPPW").value="";\n // file/path\n document.getElementById("exportFTPFilename").value="";\n break;\n }\n}\n//}}}\n\n// // exportInitFilter()\n//{{{\nfunction exportInitFilter() {\n // start date\n document.getElementById("exportFilterStart").checked=false;\n document.getElementById("exportStartDate").value="";\n // end date\n document.getElementById("exportFilterEnd").checked=false;\n document.getElementById("exportEndDate").value="";\n // tags\n document.getElementById("exportFilterTags").checked=false;\n document.getElementById("exportTags").value="";\n // text\n document.getElementById("exportFilterText").checked=false;\n document.getElementById("exportText").value="";\n // show/hide filter input fields\n exportShowFilterFields();\n}\n//}}}\n\n// // exportShowFilterFields(which)\n//{{{\nfunction exportShowFilterFields(which) {\n var show;\n\n show=document.getElementById('exportFilterStart').checked;\n document.getElementById('exportFilterStartBy').style.display=show?"block":"none";\n document.getElementById('exportStartDate').style.display=show?"block":"none";\n var val=document.getElementById('exportFilterStartBy').value;\n document.getElementById('exportStartDate').value\n =getFilterDate(val,'exportStartDate').formatString(config.macros.exportTiddlers.datetimefmt);\n if (which && (which.id=='exportFilterStartBy') && (val=='other'))\n document.getElementById('exportStartDate').focus();\n\n show=document.getElementById('exportFilterEnd').checked;\n document.getElementById('exportFilterEndBy').style.display=show?"block":"none";\n document.getElementById('exportEndDate').style.display=show?"block":"none";\n var val=document.getElementById('exportFilterEndBy').value;\n document.getElementById('exportEndDate').value\n =getFilterDate(val,'exportEndDate').formatString(config.macros.exportTiddlers.datetimefmt);\n if (which && (which.id=='exportFilterEndBy') && (val=='other'))\n document.getElementById('exportEndDate').focus();\n\n show=document.getElementById('exportFilterTags').checked;\n document.getElementById('exportTags').style.display=show?"block":"none";\n\n show=document.getElementById('exportFilterText').checked;\n document.getElementById('exportText').style.display=show?"block":"none";\n}\n//}}}\n\n// // onClickExportButton(which): control interactions\n//{{{\nfunction onClickExportButton(which)\n{\n // DEBUG alert(which.id);\n var theList=document.getElementById('exportList'); if (!theList) return;\n var count = 0;\n var total = store.getTiddlers('title').length;\n switch (which.id)\n {\n case 'exportFilter':\n count=filterExportList();\n var panel=document.getElementById('exportFilterPanel');\n if (count==-1) { panel.style.display='block'; break; }\n document.getElementById("exportStart").disabled=(count==0);\n clearMessage(); displayMessage("filtered "+formatExportMessage(count,total));\n if (count==0) { alert("No tiddlers were selected"); panel.style.display='block'; }\n break;\n case 'exportStart':\n exportTiddlers();\n break;\n case 'exportHideFilter':\n case 'exportToggleFilter':\n var panel=document.getElementById('exportFilterPanel')\n panel.style.display=(panel.style.display=='block')?'none':'block';\n break;\n case 'exportSelectChanges':\n var lastmod=new Date(document.lastModified);\n for (var t = 0; t < theList.options.length; t++) {\n if (theList.options[t].value=="") continue;\n var tiddler=store.getTiddler(theList.options[t].value); if (!tiddler) continue;\n theList.options[t].selected=(tiddler.modified>lastmod);\n count += (tiddler.modified>lastmod)?1:0;\n }\n document.getElementById("exportStart").disabled=(count==0);\n clearMessage(); displayMessage(formatExportMessage(count,total));\n if (count==0) alert("There are no unsaved changes");\n break;\n case 'exportSelectAll':\n for (var t = 0; t < theList.options.length; t++) {\n if (theList.options[t].value=="") continue;\n theList.options[t].selected=true;\n count += 1;\n }\n document.getElementById("exportStart").disabled=(count==0);\n clearMessage(); displayMessage(formatExportMessage(count,count));\n break;\n case 'exportSelectOpened':\n for (var t = 0; t < theList.options.length; t++) theList.options[t].selected=false;\n var tiddlerDisplay = document.getElementById("tiddlerDisplay");\n for (var t=0;t<tiddlerDisplay.childNodes.length;t++) {\n var tiddler=tiddlerDisplay.childNodes[t].id.substr(7);\n for (var i = 0; i < theList.options.length; i++) {\n if (theList.options[i].value!=tiddler) continue;\n theList.options[i].selected=true; count++; break;\n }\n }\n document.getElementById("exportStart").disabled=(count==0);\n clearMessage(); displayMessage(formatExportMessage(count,total));\n if (count==0) alert("There are no tiddlers currently opened");\n break;\n case 'exportListSmaller': // decrease current listbox size\n var min=5;\n theList.size-=(theList.size>min)?1:0;\n break;\n case 'exportListLarger': // increase current listbox size\n var max=(theList.options.length>25)?theList.options.length:25;\n theList.size+=(theList.size<max)?1:0;\n break;\n case 'exportClose':\n document.getElementById('exportPanel').style.display='none';\n break;\n }\n}\n//}}}\n\n// // list display\n//{{{\nfunction formatExportMessage(count,total)\n{\n var txt=total+' tiddler'+((total!=1)?'s':'')+" - ";\n txt += (count==0)?"none":(count==total)?"all":count;\n txt += " selected for export";\n return txt;\n}\n\nfunction refreshExportList(selectedIndex)\n{\n var theList = document.getElementById("exportList");\n var sort;\n if (!theList) return;\n // get the sort order\n if (!selectedIndex) selectedIndex=0;\n if (selectedIndex==0) sort='modified';\n if (selectedIndex==1) sort='title';\n if (selectedIndex==2) sort='modified';\n if (selectedIndex==3) sort='modifier';\n\n // get the alphasorted list of tiddlers\n var tiddlers = store.getTiddlers('title');\n // unselect headings and count number of tiddlers actually selected\n var count=0;\n for (var i=0; i<theList.options.length; i++) {\n if (theList.options[i].value=="") theList.options[i].selected=false;\n count+=theList.options[i].selected?1:0;\n }\n // disable "export" button if no tiddlers selected\n document.getElementById("exportStart").disabled=(count==0);\n // update listbox heading to show selection count\n if (theList.options.length) { clearMessage(); displayMessage(formatExportMessage(count,tiddlers.length)); }\n\n // if a [command] item, reload list... otherwise, no further refresh needed\n if (selectedIndex>3) return;\n\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n // add heading and control items to list\n var i=0;\n var indent=String.fromCharCode(160)+String.fromCharCode(160);\n theList.options[i++]=\n new Option(tiddlers.length+" tiddlers in document", "",false,false);\n theList.options[i++]=\n new Option(((sort=="title" )?">":indent)+' [by title]', "",false,false);\n theList.options[i++]=\n new Option(((sort=="modified")?">":indent)+' [by date]', "",false,false);\n theList.options[i++]=\n new Option(((sort=="modifier")?">":indent)+' [by author]', "",false,false);\n // output the tiddler list\n switch(sort)\n {\n case "title":\n for(var t = 0; t < tiddlers.length; t++)\n theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);\n break;\n case "modifier":\n case "modified":\n var tiddlers = store.getTiddlers(sort);\n // sort descending for newest date first\n tiddlers.sort(function (a,b) {if(a[sort] == b[sort]) return(0); else return (a[sort] > b[sort]) ? -1 : +1; });\n var lastSection = "";\n for(var t = 0; t < tiddlers.length; t++)\n {\n var tiddler = tiddlers[t];\n var theSection = "";\n if (sort=="modified") theSection=tiddler.modified.toLocaleDateString();\n if (sort=="modifier") theSection=tiddler.modifier;\n if (theSection != lastSection)\n {\n theList.options[i++] = new Option(theSection,"",false,false);\n lastSection = theSection;\n }\n theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);\n }\n break;\n }\n theList.selectedIndex=selectedIndex; // select current control item\n}\n//}}}\n\n// // list filtering\n//{{{\nfunction getFilterDate(val,id)\n{\n var result=0;\n switch (val) {\n case 'site':\n var timestamp=store.getTiddlerText("SiteDate");\n if (!timestamp) timestamp=document.lastModified;\n result=new Date(timestamp);\n break;\n case 'file':\n result=new Date(document.lastModified);\n break;\n case 'other':\n result=new Date(document.getElementById(id).value);\n break;\n default: // today=0, yesterday=1, one week=7, two weeks=14, a month=31\n var now=new Date(); var tz=now.getTimezoneOffset()*60000; now-=tz;\n var oneday=86400000;\n if (id=='exportStartDate')\n result=new Date((Math.floor(now/oneday)-val)*oneday+tz);\n else\n result=new Date((Math.floor(now/oneday)-val+1)*oneday+tz-1);\n break;\n }\n // DEBUG alert('getFilterDate('+val+','+id+')=='+result+"\snnow="+now);\n return result;\n}\n\nfunction filterExportList()\n{\n var theList = document.getElementById("exportList"); if (!theList) return -1;\n\n var filterStart=document.getElementById("exportFilterStart").checked;\n var val=document.getElementById("exportFilterStartBy").value;\n var startDate=getFilterDate(val,'exportStartDate');\n\n var filterEnd=document.getElementById("exportFilterEnd").checked;\n var val=document.getElementById("exportFilterEndBy").value;\n var endDate=getFilterDate(val,'exportEndDate');\n\n var filterTags=document.getElementById("exportFilterTags").checked;\n var tags=document.getElementById("exportTags").value;\n\n var filterText=document.getElementById("exportFilterText").checked;\n var text=document.getElementById("exportText").value;\n\n if (!(filterStart||filterEnd||filterTags||filterText)) {\n alert("Please set the selection filter");\n document.getElementById('exportFilterPanel').style.display="block";\n return -1;\n }\n if (filterStart&&filterEnd&&(startDate>endDate)) {\n var msg="starting date/time:\sn"\n msg+=startDate.toLocaleString()+"\sn";\n msg+="is later than ending date/time:\sn"\n msg+=endDate.toLocaleString()\n alert(msg);\n return -1;\n }\n\n // scan list and select tiddlers that match all applicable criteria\n var total=0;\n var count=0;\n for (var i=0; i<theList.options.length; i++) {\n // get item, skip non-tiddler list items (section headings)\n var opt=theList.options[i]; if (opt.value=="") continue;\n // get tiddler, skip missing tiddlers (this should NOT happen)\n var tiddler=store.getTiddler(opt.value); if (!tiddler) continue; \n var sel=true;\n if ( (filterStart && tiddler.modified<startDate)\n || (filterEnd && tiddler.modified>endDate)\n || (filterTags && !matchTags(tiddler,tags))\n || (filterText && (tiddler.text.indexOf(text)==-1) && (tiddler.title.indexOf(text)==-1)))\n sel=false;\n opt.selected=sel;\n count+=sel?1:0;\n total++;\n }\n return count;\n}\n//}}}\n\n//{{{\nfunction matchTags(tiddler,cond)\n{\n if (!cond||!cond.trim().length) return false;\n\n // build a regex of all tags as a big-old regex that \n // OR's the tags together (tag1|tag2|tag3...) in length order\n var tgs = store.getTags();\n if ( tgs.length == 0 ) return results ;\n var tags = tgs.sort( function(a,b){return (a[0].length<b[0].length)-(a[0].length>b[0].length);});\n var exp = "(" + tags.join("|") + ")" ;\n exp = exp.replace( /(,[\sd]+)/g, "" ) ;\n var regex = new RegExp( exp, "ig" );\n\n // build a string such that an expression that looks like this: tag1 AND tag2 OR NOT tag3\n // turns into : /tag1/.test(...) && /tag2/.test(...) || ! /tag2/.test(...)\n cond = cond.replace( regex, "/$1\s\s|/.test(tiddlerTags)" );\n cond = cond.replace( /\ssand\ss/ig, " && " ) ;\n cond = cond.replace( /\ssor\ss/ig, " || " ) ;\n cond = cond.replace( /\ss?not\ss/ig, " ! " ) ;\n\n // if a boolean uses a tag that doesn't exist - it will get left alone \n // (we only turn existing tags into actual tests).\n // replace anything that wasn't found as a tag, AND, OR, or NOT with the string "false"\n // if the tag doesn't exist then /tag/.test(...) will always return false.\n cond = cond.replace( /(\ss|^)+[^\s/\s|&!][^\ss]*/g, "false" ) ;\n\n // make a string of the tags in the tiddler and eval the 'cond' string against that string \n // if it's TRUE then the tiddler qualifies!\n var tiddlerTags = (tiddler.tags?tiddler.tags.join("|"):"")+"|" ;\n try { if ( eval( cond ) ) return true; }\n catch( e ) { displayMessage("Error in tag filter '" + e + "'" ); }\n return false;\n}\n//}}}\n\n// // output data formatting\n// // exportHeader(format)\n//{{{\nfunction exportHeader(format)\n{\n switch (format) {\n case "TW": return exportTWHeader();\n case "DIV": return exportDIVHeader();\n case "XML": return exportXMLHeader();\n }\n}\n//}}}\n\n// // exportFooter(format)\n//{{{\nfunction exportFooter(format)\n{\n switch (format) {\n case "TW": return exportDIVFooter();\n case "DIV": return exportDIVFooter();\n case "XML": return exportXMLFooter();\n }\n}\n//}}}\n\n// // exportTWHeader()\n//{{{\nfunction exportTWHeader()\n{\n // Get the URL of the document\n var originalPath = document.location.href;\n // Check we were loaded from a file URL\n if(originalPath.substr(0,5) != "file:")\n { alert(config.messages.notFileUrlError); return; }\n // Remove any location part of the URL\n var hashPos = originalPath.indexOf("#"); if(hashPos != -1) 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 // Load the original file\n var original = loadFile(localPath);\n if(original == null)\n { alert(config.messages.cantSaveError); return; }\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 { alert(config.messages.invalidFileError.format([localPath])); return; }\n return original.substr(0,posOpeningDiv+startSaveArea.length)\n}\n//}}}\n\n// // exportDIVHeader()\n//{{{\nfunction exportDIVHeader()\n{\n var out=[];\n var now = new Date();\n var title = convertUnicodeToUTF8(wikifyPlain("SiteTitle").htmlEncode());\n var subtitle = convertUnicodeToUTF8(wikifyPlain("SiteSubtitle").htmlEncode());\n var user = convertUnicodeToUTF8(config.options.txtUserName.htmlEncode());\n var twver = version.major+"."+version.minor+"."+version.revision;\n var pver = version.extensions.exportTiddlers.major+"."\n +version.extensions.exportTiddlers.minor+"."+version.extensions.exportTiddlers.revision;\n out.push("<html><body>");\n out.push("<style type=\s"text/css\s">");\n out.push("#storeArea {display:block;margin:1em;}");\n out.push("#storeArea div");\n out.push("{padding:0.5em;margin:1em;border:2px solid black;height:10em;overflow:auto;}");\n out.push("#javascriptWarning");\n out.push("{width:100%;text-align:left;background-color:#eeeeee;padding:1em;}");\n out.push("</style>");\n out.push("<div id=\s"javascriptWarning\s">");\n out.push("TiddlyWiki export file<br>");\n out.push("Source: <b>"+convertUnicodeToUTF8(document.location.href)+"</b><br>");\n out.push("Title: <b>"+title+"</b><br>");\n out.push("Subtitle: <b>"+subtitle+"</b><br>");\n out.push("Created: <b>"+now.toLocaleString()+"</b> by <b>"+user+"</b><br>");\n out.push("TiddlyWiki "+twver+" / "+"ExportTiddlersPlugin "+pver+"<br>");\n out.push("Notes:<hr><pre>"+document.getElementById("exportNotes").value.replace(regexpNewLine,"<br>")+"</pre>");\n out.push("</div>");\n out.push("<div id=\s"storeArea\s">");\n return out;\n}\n//}}}\n\n// // exportDIVFooter()\n//{{{\nfunction exportDIVFooter()\n{\n var out=[];\n out.push("</div><!--POST-BODY-START-->\sn<!--POST-BODY-END--></body></html>");\n return out;\n}\n//}}}\n\n// // exportXMLHeader()\n//{{{\nfunction exportXMLHeader()\n{\n var out=[];\n var now = new Date();\n var u = store.getTiddlerText("SiteUrl",null);\n var title = convertUnicodeToUTF8(wikifyPlain("SiteTitle").htmlEncode());\n var subtitle = convertUnicodeToUTF8(wikifyPlain("SiteSubtitle").htmlEncode());\n var user = convertUnicodeToUTF8(config.options.txtUserName.htmlEncode());\n var twver = version.major+"."+version.minor+"."+version.revision;\n var pver = version.extensions.exportTiddlers.major+"."\n +version.extensions.exportTiddlers.minor+"."+version.extensions.exportTiddlers.revision;\n out.push("<" + "?xml version=\s"1.0\s"?" + ">");\n out.push("<rss version=\s"2.0\s">");\n out.push("<channel>");\n out.push("<title>" + title + "</title>");\n if(u) out.push("<link>" + convertUnicodeToUTF8(u.htmlEncode()) + "</link>");\n out.push("<description>" + subtitle + "</description>");\n out.push("<language>en-us</language>");\n out.push("<copyright>Copyright " + now.getFullYear() + " " + user + "</copyright>");\n out.push("<pubDate>" + now.toGMTString() + "</pubDate>");\n out.push("<lastBuildDate>" + now.toGMTString() + "</lastBuildDate>");\n out.push("<docs>http://blogs.law.harvard.edu/tech/rss</docs>");\n out.push("<generator>TiddlyWiki "+twver+" plus ExportTiddlersPlugin "+pver+"</generator>");\n return out;\n}\n//}}}\n\n// // exportXMLFooter()\n//{{{\nfunction exportXMLFooter()\n{\n var out=[];\n out.push("</channel></rss>");\n return out;\n}\n//}}}\n\n// // exportData()\n//{{{\nfunction exportData(theList,theFormat)\n{\n // scan export listbox and collect DIVs or XML for selected tiddler content\n var out=[];\n for (var i=0; i<theList.options.length; i++) {\n // get item, skip non-selected items and section headings\n var opt=theList.options[i]; if (!opt.selected||(opt.value=="")) continue;\n // get tiddler, skip missing tiddlers (this should NOT happen)\n var thisTiddler=store.getTiddler(opt.value); if (!thisTiddler) continue; \n if (theFormat=="TW") out.push(convertUnicodeToUTF8(thisTiddler.saveToDiv()));\n if (theFormat=="DIV") out.push(convertUnicodeToUTF8(thisTiddler.title+"\sn"+thisTiddler.saveToDiv()));\n if (theFormat=="XML") out.push(convertUnicodeToUTF8(thisTiddler.saveToRss()));\n }\n return out;\n}\n//}}}\n\n// // exportTiddlers(): output selected data to local or server\n//{{{\nfunction exportTiddlers()\n{\n var theList = document.getElementById("exportList"); if (!theList) return;\n\n // get the export settings\n var theProtocol = document.getElementById("exportTo").value;\n var theFormat = document.getElementById("exportFormat").value;\n\n // assemble output: header + tiddlers + footer\n var theData=exportData(theList,theFormat);\n var count=theData.length;\n var out=[]; var txt=out.concat(exportHeader(theFormat),theData,exportFooter(theFormat)).join("\sn");\n var msg="";\n switch (theProtocol) {\n case "file:":\n var theTarget = document.getElementById("exportFilename").value.trim();\n if (!theTarget.length) msg = "A local path/filename is required\sn";\n if (!msg && saveFile(theTarget,txt))\n msg=count+" tiddler"+((count!=1)?"s":"")+" exported to local file";\n else if (!msg)\n msg+="An error occurred while saving to "+theTarget;\n break;\n case "http:":\n case "https:":\n var theTarget = document.getElementById("exportHTTPServerURL").value.trim();\n if (!theTarget.length) msg = "A server URL is required\sn";\n if (document.getElementById('exportNotify').checked)\n theTarget+="&notify="+encodeURIComponent(document.getElementById('exportNotifyTo').value);\n if (document.getElementById('exportNotes').value.trim().length)\n theTarget+="&notes="+encodeURIComponent(document.getElementById('exportNotes').value);\n if (!msg && exportPost(theTarget+encodeURIComponent(txt)))\n msg=count+" tiddler"+((count!=1)?"s":"")+" exported to "+theProtocol+" server";\n else if (!msg)\n msg+="An error occurred while saving to "+theTarget;\n break;\n case "ftp:":\n default:\n msg="Sorry, export to "+theLocation+" is not yet available";\n break;\n }\n clearMessage(); displayMessage(msg,theTarget);\n}\n//}}}\n\n// // exportPost(url): cross-domain post uses hidden iframe to submit url and capture responses\n//{{{\nfunction exportPost(url)\n{\n var f=document.getElementById("exportFrame"); if (f) document.body.removeChild(f);\n f=document.createElement("iframe"); f.id="exportFrame";\n f.style.width="0px"; f.style.height="0px"; f.style.border="0px";\n document.body.appendChild(f);\n var d=f.document;\n if (f.contentDocument) d=f.contentDocument; // For NS6\n else if (f.contentWindow) d=f.contentWindow.document; // For IE5.5 and IE6\n d.location.replace(url);\n return true;\n}\n//}}}\n\n// // promptForFilename(msg,path,file) uses platform/browser specific functions to get local filespec\n//{{{\nfunction promptForExportFilename(here)\n{\n var msg=here.title; // use tooltip as dialog box message\n var path=getLocalPath(document.location.href);\n var slashpos=path.lastIndexOf("/"); if (slashpos==-1) slashpos=path.lastIndexOf("\s\s"); \n if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash\n var file=config.macros.exportTiddlers.newdefault;\n var result="";\n if(window.Components) { // moz\n try {\n netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');\n var nsIFilePicker = window.Components.interfaces.nsIFilePicker;\n var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);\n picker.init(window, msg, nsIFilePicker.modeSave);\n var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);\n thispath.initWithPath(path);\n picker.displayDirectory=thispath;\n picker.defaultExtension='html';\n picker.defaultString=file;\n picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);\n if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;\n }\n catch(e) { alert('error during local file access: '+e.toString()) }\n }\n else { // IE\n try { // XP only\n var s = new ActiveXObject('UserAccounts.CommonDialog');\n s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|';\n s.FilterIndex=3; // default to HTML files;\n s.InitialDir=path;\n s.FileName=file;\n if (s.showOpen()) var result=s.FileName;\n }\n catch(e) { var result=prompt(msg,path+file); } // fallback for non-XP IE\n }\n return result;\n}\n//}}}
__''Configure this [[TiddlyTools|http://www.TiddlyTools.com/]] 'starter' document:''__\nThese settings allow you to quickly configure various optional features, behaviors, and appearance of your document. Once you have set these options, you can apply further customizations by directly editing the relevant configuration tiddlers or by creating/importing tiddlers containing additional plugins, scripts, styles, templates, etc.\n++++!!!{{big{[1: username]}}}>\nYour current username is: <<option txtUserName>><script>\n place.lastChild.style.fontSize="8pt"; place.lastChild.style.width="20em";\n</script>\n* ''Your username is stored in your web browser as a //private// cookie'', and can only be accessed by this document. Note: all locally-stored TiddlyWiki documents (i.e., ''file:...'') are considered part of the same domain, and share a single set of cookie values.\n* ''Your username is recorded as the last modifier ("author") of any tiddlers you have changed'', and can be shown alongside the tiddler title and creation/modification dates that appear above each displayed tiddler.\n* To reduce 'information clutter', ''~TiddlyTools does //not// automatically display the modifier information.'' You can enable this feature by editing the ~TiddlyTools ViewTemplate to remove the ~HTML-style comments that surround the modifier display syntax:\n{{{\n<!--<span macro='view modifier link'></span>, -->\n}}}\n===\n+++!!!{{big{[2: menus]}}}>\nBy default, ''new ~TiddlyTools 'starter' documents include a complete set of ~TiddlyTools enhanced menus'', along with the necessary plugins/scripts/styles to support those features. These enhancements provide a wide range of extended editing and authoring features for you to use, "right out of the box". ''If you do not want or need all of these features, you can quickly select and install a simplified set of menu definitions'' from the choices below:\n\nselect a menu level:<<br>>{{medium{<<tiddler SwitchMenus>>}}}\n* ''Full'' - (default) includes all ~TiddlyTools enhanced menu features\n* ''Lite'' - minus: attach, export, single-page/open at top (options), calendar, listbox tab (contents), installed plugins summary (main menu), all extras (except for ~TagCloud).\n* ''Mini'' - same as ~TiddlyTools Lite menus, minus: download, contact, recent changes, tiddler groups, yesterday/today/tommorrow (recent), upload/save to web, toggle titles/menubar, create xml/rss file (saving), all extras (including ~TagCloud)\nWarning - Changing menus levels will overwrite the content of the following 'menu definition' tiddlers:\n>MainMenu, SideBarOptions, SideBarTabs, StoryMenu, SiteMenu, SiteMenuGoto, SiteMenuFile, SiteMenuOptions, SiteMenuExtras\nYou can edit these tiddlers at any time and customize them to suit your needs; however, ''any customizations or changes that have been made to these tiddlers will be discarded whenever you select a TiddlyTools menu level.''\n>hint:After you have selected an appropriate menu level, you can reduce your document size by removing the sets of tiddlers that define the different menu alternatives (i.e., all tiddlers tagged with <<tag full>>/<<tag lite>>/<<tag mini>>). This also 'locks in' your current menu level, so that you cannot switch menu levels for this document again. Of course, you can always edit the currently installed menu definition tiddlers in the normal ~TiddlyWiki manner, allowing you to make any modifications to the menus that you wish by using copy/paste, ImportTiddlersPlugin or simply typing additions and corrections directly into the tiddler content.\n===\n+++!!!{{big{[3: packages]}}}><<tiddler ImportPackages>>===\n+++!!!{{big{[4: configuration]}}}>\nSome tiddlers define settings or functions that control various ~TiddlyWiki behaviors. You can customize some of these core and plugin configuration options by editing the following tiddlers:\n* TiddlerGroupsList\n* AttachFileServerScripts\n* CalendarPluginConfig\n* DatePluginConfig\n* ConfigTweaks\n===\n+++!!!{{big{[5: content]}}}>\nTo begin entering and formatting your content, you'll probably want to create/modify the following tiddlers:\n* DefaultTiddlers\n* SiteTitle\n* SiteSubtitle\n* [[Welcome]]\n* [[About]]\n* [[Download]]\n* [[Contact]]\n* LegalStatements\n===
/***\n|''Name:''|GotoPlugin|\n|''Source:''|http://www.TiddlyTools.com/#GotoPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\n''View a tiddler by typing its title and pressing //enter//.'' Input just enough to uniquely match a single tiddler title and ''press //enter// to auto-complete the title for you!!'' If multiple titles match your input, a list is displayed. You can scroll-and-click (or use arrows+enter) to select/view a tiddler, or press //escape// to close the listbox to resume typing. When the listbox is ''//not//'' being displayed, press //escape// to clear the current text input and start over.\n\nNote: ''At any time, you can move the focus directly to the text input field by using the ~ALT-G keyboard shortcut.''\n!!!!!Example\n<<<\nsyntax: {{{<<goto quiet inputstyle liststyle>>}}}\nAll parameters are optional.\n* ''quiet'' prevents //automatic// display of the list as each character is typed. To view the list when ''quiet'', use //down// or //enter//.\n* ''inputstyle'' and ''liststyle'' are CSS declarations that modify the default input and listbox styles. Note: styles containing spaces must be surrounded by ({{{"..."}}} or {{{'...'}}}) or ({{{[[...]]}}}).\n{{{<<goto>>}}}\n<<goto>>\n{{{<<goto quiet>>}}}\n<<goto quiet>>\n{{{<<goto width:20em width:20em>>}}}\n<<goto width:20em width:20em>>\n<<<\n!!!!!Configuration\n<<<\nThe following ~TiddlyWiki search options (see AdvancedOptions) are applied when matching tiddler titles:\n><<option chkRegExpSearch>> use regular expressions (text patterns)\n><<option chkCaseSensitiveSearch>> use case sensitive matching\nYou can also create a tiddler tagged with <<tag systemConfig>> to control listing of tiddlers/shadows/tags, as well as the maximum height of the listbox. //The default values are shown below://\n//{{{\nconfig.macros.goto.includeTiddlers=true;\nconfig.macros.goto.includeShadows=true;\nconfig.macros.goto.includeTags=true;\nconfig.macros.goto.listMaxSize=10;\n//}}}\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''GotoPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revisions\n<<<\n''2006.05.10 [1.1.2]'' when filling listbox, set selection to 'heading' item... auto-select first tiddler title when down/enter moves focus into listbox\n''2006.05.08 [1.1.1]'' added accesskey ("G") to input field html (also set when field gets focus). Also, inputKeyHandler() skips non-printing/non-editing keys. \n''2006.05.08 [1.1.0]'' added heading to listbox for better feedback (also avoids problems with 1-line droplist)\n''2006.05.07 [1.0.0]'' list matches against tiddlers/shadows/tags. input field auto-completion... 1st enter=complete matching input (or show list)... 2nd enter=view tiddler. optional "quiet" param controls when listbox appears.\n''2006.05.06 [0.5.0]'' added handling for enter (13), escape(27), and down(40) keys. Change 'ondblclick' to 'onclick' for list handler to view tiddlers (suggested by Florian Cauvin - prevents unintended trigger of tiddler editor). shadow titles inserted into list instead of appended to the end.\n''2006.05.05 [0.0.0]'' started\n<<<\n!!!!!Credits\n>This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n!!!!!Code\n***/\n//{{{\nversion.extensions.goto= {major: 1, minor: 1, revision: 2, date: new Date(2006,5,10)};\nconfig.macros.goto= { \n handler:\n function(place,macroName,params) {\n var quiet=(params[0] && params[0]=="quiet"); if (quiet) params.shift();\n var instyle=params.shift(); if (!instyle) instyle="";\n var liststyle=params.shift(); if (!liststyle) liststyle="";\n createTiddlyElement(place,"span").innerHTML\n =this.html.replace(/%quiet%/,quiet).replace(/%instyle%/,instyle).replace(/%liststyle%/,liststyle);\n },\n\n html:\n '<form onsubmit="return false" style="display:inline;margin:0;padding:0">\s\n <input name=goto type=text autocomplete="off" accesskey="G" style="%instyle%"\s\n title="enter a tiddler title"\s\n onfocus="this.setAttribute(\s'accessKey\s',\s'G\s'); this.select();"\s\n onkeyup="return config.macros.goto.inputKeyHandler(event,this,this.form.list,%quiet%);">\s\n <select name=list style="%liststyle%;display:none;position:absolute"\s\n onchange="if (!this.selectedIndex) this.selectedIndex=1;"\s\n onblur="this.style.display=\s'none\s';"\s\n onkeyup="return config.macros.goto.selectKeyHandler(event,this,this.form.goto);"\s\n onclick="return config.macros.goto.openItem(this.value,this.form.goto,this);">\s\n </select>\s\n </form>',\n \n getItems:\n function() {\n var items=[];\n var tiddlers=store.reverseLookup("tags","excludeSearch",false,"title");\n if (this.includeTiddlers) for(var t=0; t<tiddlers.length; t++) items.push(tiddlers[t].title);\n if (this.includeShadows) for (var t in config.shadowTiddlers) items.pushUnique(t);\n if (this.includeTags) { var tags=store.getTags(); for(var t=0; t<tags.length; t++) items.pushUnique(tags[t][0]); }\n return items;\n },\n includeTiddlers: true, includeShadows: true, includeTags: true,\n\n getItemSuffix:\n function(t) {\n if (store.tiddlerExists(t)) return ""; // tiddler\n if (store.isShadowTiddler(t)) return " (shadow)"; // shadow\n return " (tag)"; // tag \n },\n\n openItem:\n function(title,here,list) {\n if (!title.length) return; here.value=title; list.style.display='none'; story.displayTiddler(null,title); return false;\n },\n\n inputKeyHandler:\n function(event,here,list,quiet) {\n var key=event.keyCode;\n // non-printing chars... bubble up, except: backspace=8, enter=13, escape=27, space=32, down=40, delete=46\n if (key<48) switch(key) { case 8: case 13: case 27: case 32: case 40: case 46: break; default: return true; }\n // escape... hide list (2nd esc=reset input)\n if (key==27) { if (list.style.display=="none") here.value=here.defaultValue; else list.style.display="none"; return false; }\n // blank input... if down/enter... fall through (list all)... else, hide list\n if (!here.value.length && !(key==40 || key==13)) { list.style.display="none"; return false; }\n // find matching items...\n var pattern=config.options.chkRegExpSearch?here.value:here.value.escapeRegExp();\n var re=new RegExp(pattern,config.options.chkCaseSensitiveSearch?"mg":"img");\n var found = []; var items=this.getItems(); for(var t=0; t<items.length; t++) if(items[t].search(re)!=-1) found.push(items[t]);\n // matched one item... enter... not *exact* match... autocomplete input field\n if (found.length==1 && quiet && key==13 && here.value!=found[0]) { list.style.display="none"; here.value=found[0]; return false; }\n // no match/exact match... enter... create/show it\n if (found.length<2 && key==13) return this.openItem(found.length?found[0]:here.value,here,list);\n // quiet/no match... hide list...\n list.style.display=(!quiet && found.length)?"block":"none";\n // no matches... key bubbles up\n if (!found.length) return true;\n // down/enter... show/move to list...\n if (key==40 || key==13) { list.style.display="block"; list.focus(); }\n // list is showing... fill list...\n if (list.style.display!="none") {\n while (list.length > 0) list.options[0]=null; // clear list...\n found.sort();\n list.options[0]=new Option(found.length==1?this.listMatchMsg:this.listHeading.format([found.length]),"",false,false);\n for (var t=0; t<found.length; t++) // fill list...\n list.options[t+1]=new Option(found[t]+this.getItemSuffix(found[t]),found[t],false,false);\n list.size=(found.length<this.listMaxSize?found.length:this.listMaxSize)+1; // resize list...\n list.selectedIndex=(key==40 || key==13)?1:0;\n }\n return true; // key bubbles up\n },\n listMaxSize: 10,\n listHeading: 'Found %0 matching titles:',\n listMatchMsg: 'Press enter to open tiddler...',\n\n selectKeyHandler:\n function(event,list,editfield) {\n if (event.keyCode==27) // escape... hide list, move to edit field\n { editfield.focus(); list.style.display="none"; return false; }\n if (event.keyCode==13 && list.value.length) // enter... view selected item\n { this.openItem(list.value,editfield,list); return false; }\n return true;\n }\n}\n//}}}
/***\n|''Name:''|HTMLFormattingPlugin|\n|''Source:''|http://www.TiddlyTools.com/#HTMLFormattingPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nThe shorthand Wiki-style formatting syntax of ~TiddlyWiki is very convenient and enables most content to be reasonably well presented. However, there are times when tried-and-true HTML formatting syntax allows more more precise control of the content display.\n\nWhen HTML formatting syntax is embedded within a tiddler (in between {{{<}}}{{{html>}}} and {{{<}}}{{{/html>}}} markers) TiddlyWiki passes this content to the browser for processing as 'native' HTML. However, TiddlyWiki does not also process the HTML source content for any embedded wiki-formatting syntax it may contain. This means that while you can use HTML formatted content, you cannot mix wiki-formatted content within the HTML formatting.\n!!!!!Usage\n<<<\nThe ~HTMLFormatting plugin allows you to freely ''mix wiki-style formatting syntax within HTML formatted content'' by extending the action of the standard TiddlyWiki formatting handler.\n\nWhen a tiddler is about to be displayed, ~TiddlyWiki looks for tiddler content contained within ''<{{{html}}}>'' and ''<{{{/html}}}>'' HTML tags. This content (if any) is passed directly to the browser's internal "rendering engine" to process as ~HTML-formatted content. Once the HTML formatting has been processed, all the pieces of text occuring in between the HTML formatting are then processed by the ~TiddlyWiki rendering engine, one piece at a time, so that normal wiki-style formatting can be applied to the individual text pieces.\n<<<\n!!!!!Line breaks\n<<<\nOne major difference between Wiki formatting and HTML formatting is how "line breaks" are processed. Wiki formatting treats all line breaks as literal content to be displayed //as-is//. However, because HTML normally ignores line breaks and actually processes them as simple "word separators" instead, many people who write HTML include extra line breaks in their documents, just to make the "source code" easier to read.\n\nEven though you can use HTML tags within your tiddler content, the default treatment for line breaks still follows the Wiki-style rule (i.e., all new lines are displayed as-is). When adding HTML content to a tiddler (especially if you cut-and-paste it from another web page), you should take care to avoid adding extra line breaks to the text.\n\nIf removing all the extra line breaks from your HTML content would be a big hassle, you can quickly //override the default Wiki-style line break rule// so that the line breaks use the standard HTML rules instead. Placing a ''<{{{hide linebreaks}}}>'' tag within the tiddler's HTML content changes all line breaks to spaces before rendering the content, so that the literal line breaks will be processed as simple word-breaks instead.\n\nNote: this does //not// alter the actual tiddler content that is stored in the document, just the manner in which it is displayed. Any line breaks contained in the tiddler will still be there when you edit its content. Also, to include a literal line break when the ''<{{{hide linebreaks}}}>'' tag is present, you will need to use a ''<{{{br}}}>'' or ''<{{{p}}}>'' HTML tag instead of simply typing a line break.\n<<<\n!!!!!How it works\n<<<\nThe TW core support for HTML does not let you put ANY wiki-style syntax (including TW macros) *inside* the {{{<html>...</html>}}} block. Everything between {{{<html>}}} and {{{</html>}}} is handed to the browser for processing and that is it. Fortunately, this plugin ADDS the ability to let you put wiki-syntax (including macros) inside the html. It does this by first giving the tiddler source content to the browser to process the HTML, and then handling any wiki-based syntax that remains afterward.\n\nHowever, not all wiki syntax can be safely passed through the browser's parser. Specifically, any TW macros inside the HTML will get 'eaten' by the browser since the macro brackets, {{{<<...>>}}} use the "<" and ">" that normally delimit the HTML/XML syntax recognized by the browser's parser.\n\nSimilarly, you can't use InlineJavascript within the HTML because the {{{<script>...</script>}}} syntax will also be consumed by the browser and there will be nothing left to process afterward. Note: unfortunately, even though the browser removes the {{{<script>...</script>}}} sequence, it doesn't actually execute the embedded javascript code that it removes, so any scripts contained inside of <html> blocks in TW are currently being ignored. :-(\n\nAs a work-around to allow TW *macros* (but not inline scripts) to exist inside of <html> formatted blocks of content, the plugin first converts the {{{<<}}} and {{{>>}}} into "%%(" and ")%%", making them "indigestible" so they can pass unchanged through the belly of the beast (the browser's HTML parser).\n\nAfter the browser has done its job, the wiki syntax sequences (including the "undigested" macros) are contained in #text nodes in the browser-generated DOM elements. The plugin then recursively locates and processes each #text node, converts the %%( and )%% back into {{{<<}}} and {{{>>}}}, passes the result to wikify() for further rendering of the wiki-formatted syntax into a containing SPAN that replaces the previous #text node. At the end of this process, none of the encoded %%( and )%% sequences remain in the rendered tiddler output.\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''HTMLFormattingPlugin'' (tagged with <<tag systemConfig>>)\n^^documentation and javascript for HTMLFormatting handling^^\n<<<\n!!!!!Revision History\n<<<\n''2006.09.10 [2.1.4]'' update formatter for 2.1 compatibility (use this.lookaheadRegExp instead of temp variable)\n''2006.05.28 [2.1.3]'' in wikifyTextNodes(), decode the *value* of TEXTAREA nodes, but don't wikify() its children. (thanks to "ayj" for bug report)\n''2006.02.19 [2.1.2]'' in wikifyTextNodes(), put SPAN element into tiddler DOM (replacing text node), BEFORE wikifying the text content. This ensures that the 'place' passed to any macros is correctly defined when the macro is evaluated, so that calls to story.findContainingTiddler(place) will work as expected. (Thanks for bug report from GeoffSlocock)\n''2006.02.05 [2.1.1]'' wrapped wikifier hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals\n''2005.12.01 [2.1.0]'' don't wikify #TEXT nodes inside SELECT and TEXTAREA elements\n''2005.11.06 [2.0.1]'' code cleanup\n''2005.10.31 [2.0.0]'' replaced hijack wikify() with hijack config.formatters["html"] and simplified recursive WikifyTextNodes() code\n''2005.10.09 [1.0.2]'' combined documentation and code into a single tiddler\n''2005.08.05 [1.0.1]'' moved HTML and CSS definitions into plugin code instead of using separate tiddlers\n''2005.07.26 [1.0.1]'' Re-released as a plugin. Added <{{{html}}}>...</{{{nohtml}}}> and <{{{hide newlines}}}> handling\n''2005.07.20 [1.0.0]'' Initial Release (as code adaptation)\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.HTMLFormatting = {major: 2, minor: 1, revision: 4, date: new Date(2006,9,10)};\n\n// find the formatter for HTML and replace the handler\ninitHTMLFormatter();\nfunction initHTMLFormatter()\n{\n for (var i=0; i<config.formatters.length && config.formatters[i].name!="html"; i++);\n if (i<config.formatters.length) config.formatters[i].handler=function(w) {\n if (!this.lookaheadRegExp) // fixup for TW2.0.x\n this.lookaheadRegExp = new RegExp(this.lookahead,"mg");\n this.lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = this.lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {\n var html=lookaheadMatch[1];\n // optionally suppress wiki-style literal handling of newlines\n // strip any carriage returns added by Internet Explorer's textarea edit field\n // encode newlines as \sn so Internet Explorer's HTML parser won't eat them\n // encode macro brackets (<< and >>) so HTML parser won't eat them\n if (html.indexOf('<hide linebreaks>')!=-1) html=html.replace(regexpNewLine,' ');\n html=html.replace(regexpCarriageReturn,'');\n html=html.replace(regexpNewLine,'\s\sn');\n html=html.replace(/<</g,'%%(').replace(/>>/g,')%%');\n // create span to hold HTML\n // parse HTML and normalize the results\n // walk node tree and call wikify() on each text node\n var e = createTiddlyElement(w.output,"span");\n e.innerHTML=html;\n e.normalize(); \n wikifyTextNodes(e);\n // advance to next parse position\n w.nextMatch = this.lookaheadRegExp.lastIndex;\n }\n }\n}\n\n// wikify text nodes remaining after HTML content is processed (pre-order recursion)\nfunction wikifyTextNodes(theNode)\n{\n // textarea node doesn't get wikified, just decoded... \n if (theNode.nodeName.toLowerCase()=='textarea')\n theNode.value=theNode.value.replace(/\s%%\s(/g,'<<').replace(/\s)\s%%/g,'>>').replace(regexpBackSlashEn,'\sn');\n else for (var i=0;i<theNode.childNodes.length;i++) {\n var theChild=theNode.childNodes.item(i);\n if (theChild.nodeName.toLowerCase()=='option') continue;\n if (theChild.nodeName.toLowerCase()=='select') continue;\n wikifyTextNodes(theChild);\n if (theChild.nodeName=='#text') {\n var txt=theChild.nodeValue;\n // decode macro brackets and newlines\n txt=txt.replace(/\s%%\s(/g,'<<').replace(/\s)\s%%/g,'>>').replace(regexpBackSlashEn,'\sn');\n // replace text node with wikified() span\n var newNode=createTiddlyElement(null,"span");\n theNode.replaceChild(newNode,theChild);\n wikify(txt,newNode);\n }\n }\n}\n//}}}
<script>\n var s=place.parentNode.style;\n s.backgroundImage="none";\n s.backgroundColor="transparent"\n s.borderColor="transparent";\n s.borderWidth=0;\n s.margin=0;\n s.padding=0;\n</script>
<script>\n // get the tiddler element\n var t=story.findContainingTiddler(place);\n if (t && t.id!="tiddlerHideTiddlerSubtitle") \n for (var i=0; i<t.childNodes.length; i++)\n if (hasClass(t.childNodes[i],"subtitle"))\n t.childNodes[i].style.display="none";\n</script>
<script>\n var t=story.findContainingTiddler(place);\n if (t && t.id!="tiddlerHideTiddlerTags")\n for (var i=0; i<t.childNodes.length; i++)\n if (hasClass(t.childNodes[i],"tagging")||hasClass(t.childNodes[i],"tagged"))\n t.childNodes[i].style.display="none";\n</script>
<script>\n // get the tiddler element\n var t=window.story.findContainingTiddler(place);\n if (t && t.id!="tiddlerHideTiddlerTitle") \n for (var i=0; i<t.childNodes.length; i++)\n if (hasClass(t.childNodes[i],"title")||hasClass(t.childNodes[i],"subtitle"))\n t.childNodes[i].style.display="none";\n</script>
<script>\n var t=story.findContainingTiddler(place);\n if (t && t.id!="tiddlerHideTiddlerToolbar")\n for (var i=0; i<t.childNodes.length; i++)\n if (hasClass(t.childNodes[i],"toolbar"))\n t.childNodes[i].style.display="none";\n</script>
Sve do polovice 19. stoljeća latinski je bio ravnopravan jezik hrvatske književnosti; bibliografski podaci pokazuju da su hrvatski autori do tog doba na latinskom tiskali više naslova nego na materinskome jeziku (odnos je 2:1 u korist latinskog).\n\nDigitalni korpus hrvatskih latinista (CAuLa) okuplja latinske tekstove ovoga zamašnog dijela hrvatske književnosti, da bi ih učinio slobodno dostupnima i računalno pretraživima. Korpus je ujedno i stjecište informacija o [[hrvatskim latinistima|HrvatskiLatinisti]] i [[hrvatskoj književnosti na latinskom|HrvatskiLatinizam]].\n\nUjedno, korpus je mjesto promišljanja i praktičnog istraživanja mogućih interakcija računarstva i humanističkih znanosti (osobito filologije).
!Popis autora u CAuLa korpusu\n* Marko Marulić\n* Antun Vrančić\n* Damjan Beneša\n* Jakov Bunić
!Mali kronološki pregled\n\n*[[Od stoljeća sedmog|OdStoljecaSedmog]]\n*[[Srednjovjekovlje]]\n*[[Humanizam]]\n*[[Sedamnaesto stoljeće|SedamnaestoStoljece]]\n*[[Osamnaesto stoljeće|OsamnaestoStoljece]]\n*[[Doba preporoda|DobaPreporoda]]\n*[[Dvadeseto stoljeće|DvadesetoStoljece]]\n\nPogledajte i [[mali žanrovski pregled|ZanroviHrvatskogLatinizma]].
You can import pre-bundled tiddler "packages" directly from http://www.TiddlyTools.com/\n\nPackages combine of one or more tiddlers containing plugins, macros, wiki-formatted content, stylesheets, templates, etc. to install a set of related features and functions. Each tiddler in a package is tagged with the same tag name to make it easy to quickly identify and import all of the desired tiddlers in the set.\n\n__Please select packages to import:__\n+++{{medium{[ThemePackage (all themes)]}}}>\n__Stylesheets and background image attachments for all themes, including:__\n[[Blackout]], [[Edge of Night]], [[KubrickStyleSheet]], [[Let's Get Tanked!]], [[Plain]], [[Textures]], [[TotallyTiddlers]], [[Woodshop]]\n//plus supporting CSS:// StyleSheetAdjustments and BrightText\n\nImport these tiddlers and then select a theme from the //options>themes// section in the right menu or sidebar.\n~~''source:'' http://www.TiddlyTools.com/#tag:ThemePackage~~\n +++{{big{[begin installation...]}}}...\n {{{<<loadTiddlers "tag:ThemePackage" "http://www.TiddlyTools.com/">>}}}\n <<loadTiddlers "tag:ThemePackage" "http://www.TiddlyTools.com/">>\n ===\n===\n\n+++{{medium{[MediaPackage]}}}>\n~MediaPackage combines several audio/video plugin tools to provide easy inclusion of streaming media in your document. PlayerPlugin lets you embed a Windows, Real, ~QuickTime or Flash player in a tiddler and matches known file extensions and/or specialized streaming-media transfer protocols (such as RTSP:) to automatically switch to the correct player type. DeliciousPlayTaggerPlugin adds a very compact streaming-mp3 player control preceding any .mp3 file links contained in tiddler content. MediaCenter combines ~PlayerPlugin and InlineJavascriptPlugin to provide a unified media viewing experience. You can define and select online media 'favorites' from a droplist or use media URLs from other sources (copy/paste).\n\nImport these tiddlers and then save-and-reload your document for the plugins to take effect.\n~~''source:'' http://www.TiddlyTools.com/#tag:MediaPackage~~\n +++{{big{[begin installation...]}}}...\n {{{<<loadTiddlers "tag:MediaPackage" "http://www.TiddlyTools.com/">>}}}\n <<loadTiddlers "tag:MediaPackage" "http://www.TiddlyTools.com/">>\n ===\n===\n\n+++{{medium{[TidIDEPackage]}}}>\nA full-featured tiddler editor plus key-by-key ''LIVE PREVIEW''!! Also provides diagnostic tools to help you debug your TiddlyWiki problems by letting you view current TiddlyWiki internal option values, messages, shadows, stylesheets, notify and macro functions or display the internal DOM (Document Object Model) tree structure for any specific part of the TiddlyWiki document.\n\nImport these tiddlers and then save-and-reload your document for the plugins to take effect.\n~~''source:'' http://www.TiddlyTools.com/#tag:TidIDEPackage~~\n +++{{big{[begin installation...]}}}...\n {{{<<loadTiddlers "tag:TidIDEPackage" "http://www.TiddlyTools.com/">>}}}\n <<loadTiddlers "tag:TidIDEPackage" "http://www.TiddlyTools.com/">>\n ===\n===\n\n+++{{medium{[TiddlyCardsPackage]}}}>\nTiddlyCards are like 3x5 cards with fill-in forms. TiddlyCards can display and store most of the usual HTML field control types, including: text fields, textareas (multi-line), listboxes / dropdown lists, checkboxes, and radio buttons. Each card is stored in a tiddler tagged with<<tag TiddlyCard>>, and contains two parts: an HTML form that contains the saved data values for that card, followed by an optional section of TiddlyWiki-formatted content for ''read-only'' display of card data values embedded within normal tiddler content. You can define and use multiple card types within the same document. When a card tiddler has been tagged with<<tag TiddlyCardsForm>>, it will be recognized as a ''"tear-off" form'' that can be used to create new cards. The values stored in this form definition are used as the default values when creating new cards of that type. \n\nImport these tiddlers and then save-and-reload your document for the plugins to take effect.\n~~''source:'' http://www.TiddlyTools.com/tiddlycards.html#tag:TiddlyCardsPackage~~\n +++{{big{[begin installation...]}}}...\n {{{<<loadTiddlers tag:TiddlyCardsPackage http://www.TiddlyTools.com/tiddlycards.html>>}}}\n <<loadTiddlers tag:TiddlyCardsPackage http://www.TiddlyTools.com/tiddlycards.html>>\n ===\n===
<<importTiddlers inline>>
/***\n|''Name:''|ImportTiddlersPlugin|\n|''Source:''|http://www.TiddlyTools.com/#ImportTiddlersPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nWhen many people share and edit copies of the same TiddlyWiki document, the ability to quickly collect all these changes back into a single, updated document that can then be redistributed to the entire group is very important. It can also be very extremely helpful when moving your own tiddlers from document to document (e.g., when upgrading to the latest version of TiddlyWiki, or 'pre-loading' your favorite stylesheets into a new 'empty' TiddlyWiki document.)\n\nThis plugin lets you selectively combine tiddlers from any two TiddlyWiki documents. An interactive control panel lets you pick a document to import from, and then select which tiddlers to import, with prompting for skip, rename, merge or replace actions when importing tiddlers that match existing titles. Automatically add tags to imported tiddlers so they are easy to find later on. Generates a detailed report of import 'history' in ImportedTiddlers.\n!!!!!Interactive interface\n<<<\n{{{<<importTiddlers>>}}} or {{{<<importTiddlers core>>}}}\ninvokes the built-in importTiddlers macro (TW2.1.x+). If installed in documents using TW2.0.x or earlier, fallback is to use 'link' display (see below)\n\n{{{<<importTiddlers link>>}}}\ncreates "import tiddlers" link that when clicked to show/hide import control panel\n\n{{{<<importTiddlers inline>>}}}\ncreates import control panel directly in tiddler content\n\n<<importTiddlers inline>>\n\nPress ''[browse]'' to select a TiddlyWiki document file to import. You can also type in the path/filename or a remote document URL (starting with http://)and press ''[open]''. //Note: There may be some delay to permit the browser time to access and load the document before updating the listbox with the titles of all tiddlers that are available to be imported.//\n\nSelect one or more titles from the listbox (hold CTRL or SHIFT while clicking to add/remove the highlight from individual list items). You can press ''[select all]'' to quickly highlight all tiddler titles in the list. Use the ''[-]'', ''[+]'', or ''[=]'' links to adjust the listbox size so you can view more (or less) tiddler titles at one time. When you have chosen the tiddlers you want to import and entered any extra tags, press ''[import]'' to begin copying them to the current TiddlyWiki document.\n\n''select: all, new, changes, or differences''\n\nYou can click on ''all'', ''new'', ''changes'', or ''differences'' to automatically select a subset of tiddlers from the list. This makes it very quick and easy to find and import just the updated tiddlers you are interested in:\n>''"all"'' selects ALL tiddlers from the import source document, even if they have not been changed.\n>''"new"'' selects only tiddlers that are found in the import source document, but do not yet exist in the destination document\n>''"changes"'' selects only tiddlers that exist in both documents but that are newer in the source document\n>''"differences"'' selects all new and existing tiddlers that are different from the destination document (even if destination tiddler is newer)\n\n''Import Tagging:''\n\nTiddlers that have been imported can be automatically tagged, so they will be easier to find later on, after they have been added to your document. New tags are entered into the "add tags" input field, and then //added// to the existing tags for each tiddler as it is imported.\n\n''Skip, Rename, Merge, or Replace:''\n\nWhen importing a tiddler whose title is identical to one that already exists, the import process pauses and the tiddler title is displayed in an input field, along with four push buttons: ''[skip]'', ''[rename]'', ''[merge]'' and ''[replace]''.\n\nTo bypass importing this tiddler, press ''[skip]''. To import the tiddler with a different name (so that both the tiddlers will exist when the import is done), enter a new title in the input field and then press ''[rename]''. Press ''[merge]'' to combine the content from both tiddlers into a single tiddler. Press ''[replace]'' to overwrite the existing tiddler with the imported one, discarding the previous tiddler content.\n\n//Note: if both the title ''and'' modification date/////time match, the imported tiddler is assumed to be identical to the existing one, and will be automatically skipped (i.e., not imported) without asking.//\n\n''Import Report History''\n\nWhen tiddlers are imported, a report is generated into ImportedTiddlers, indicating when the latest import was performed, the number of tiddlers successfully imported, from what location, and by whom. It also includes a list with the title, date and author of each tiddler that was imported.\n\nWhen the import process is completed, the ImportedTiddlers report is automatically displayed for your review. If more tiddlers are subsequently imported, a new report is //added// to ImportedTiddlers, above the previous report (i.e., at the top of the tiddler), so that a reverse-chronological history of imports is maintained.\n\nIf a cumulative record is not desired, the ImportedTiddlers report may be deleted at any time. A new ImportedTiddlers report will be created the next time tiddlers are imported.\n\nNote: You can prevent the ImportedTiddlers report from being generated for any given import activity by clearing the "create a report" checkbox before beginning the import processing.\n\n<<<\n!!!!!non-interactive 'load tiddlers' macro\n<<<\nUseful for automated installation/update of plugins and other tiddler content.\n\n{{{<<loadTiddlers "label:load tiddlers from %0" http://www.tiddlytools.com/example.html confirm>>}}}\n<<loadTiddlers "label:load tiddlers from %0" http://www.tiddlytools.com/example.html confirm>>\n\nSyntax:\n{{{<<loadTiddlers label:text prompt:text filter source quiet confirm>>}}}\n\n''label:text'' and ''prompt:text''\n>defines link text and tooltip (prompt) that can be clicked to trigger the load tiddler processing. If a label is NOT provided, then no link is created and loadTiddlers() is executed whenever the containing tiddler is rendered.\n''filter'' (optional) determines which tiddlers will be automatically selected for importing. Use one of the following keywords:\n>''"all"'' retrieves ALL tiddlers from the import source document, even if they have not been changed.\n>''"new"'' retrieves only tiddlers that are found in the import source document, but do not yet exist in the destination document\n>''"changes"'' retrieves only tiddlers that exist in both documents for which the import source tiddler is newer than the existing tiddler\n>''"updates"'' retrieves both ''new'' and ''changed'' tiddlers (this is the default action when none is specified)\n>''"tiddler:~TiddlerName"'' retrieves only the specific tiddler named in the parameter.\n>''"tag:text"'' retrieves only the tiddlers tagged with the indicated text.\n''source'' (required) is the location of the imported document. It can be either a local document path/filename in whatever format your system requires, or a remote web location (starting with "http://" or "https://")\n>use the keyword ''ask'' to prompt for a source location whenever the macro is invoked\n''"quiet"'' (optional)\n>supresses all status message during the import processing (e.g., "opening local file...", "found NN tiddlers..." etc). Note that if ANY tiddlers are actualy imported, a final information message will still be displayed (along with the ImportedTiddlers report), even when 'quiet' is specified. This ensures that changes to your document cannot occur without any visible indication at all.\n''"confirm"'' (optional)\n>adds interactive confirmation. A browser message box (OK/Cancel) is displayed for each tiddler that will be imported, so that you can manually bypass any tiddlers that you do not want to import.\n<<<\n!!!!!Installation\n<<<\ncopy/paste the following tiddlers into your document:\n''ImportTiddlersPlugin'' (tagged with <<tag systemConfig>>)\n\ncreate/edit ''SideBarOptions'': (sidebar menu items) \n^^Add "< < ImportTiddlers > >" macro^^\n\n''Quick Installation Tip #1:''\nIf you are using an unmodified version of TiddlyWiki (core release version <<version>>), you can get a new, empty TiddlyWiki with the Import Tiddlers plugin pre-installed (''[[download from here|TW+ImportExport.html]]''), and then simply import all your content from your old document into this new, empty document.\n<<<\n!!!!!Revision History\n<<<\n''2006.11.14 [3.1.2]'' fix macro handler parameter declaration (double-pasted param list corrupts IE)\n''2006.11.13 [3.1.1]'' use apply() method to invoke hijacked core handler\n''2006.11.13 [3.1.0]'' hijack TW2.1 built-in importTiddlers.handler() so it can co-exist with the plugin interface 'panel'. Use macro without params (or use 'core' keyword) to display built-in core interface. Use new "link" param to embed "import tiddlers" link that shows floating panel when clicked. Renamed a few plugin utility functions so they don't collide with core internal functions. More code restructuring to come.\n''2006.10.12 [3.0.8]'' in readTiddlersFromHTML(), fallback to find end of store area by matching "/body" when POST-BODY-START is not present (backward compatibility for older documents)\n''2006.09.10 [3.0.7]'' in readTiddlersFromHTML(), find end of store area by matching "POST-BODY-START" instead of "/body" \n''2006.08.16 [3.0.6]'' Use higher-level store.saveTiddler() instead of store.addTiddler() to avoid conflicts with ZW and other adaptations that hijack low-level tiddler handling. Also, in CreateImportPanel(), no longer register notify to "refresh listbox after every tiddler change" (left over from old 'auto-filtered' list handling). Thanks to Bob McElrath for report/solution.\n''2006.07.29 [3.0.5]'' added noChangeMsg to loadTiddlers processing. if not 'quiet' mode, reports skipped tiddlers.\n''2006.04.18 [3.0.4]'' in loadTiddlers.handler, fixed parsing of "prompt:" param. Also, corrected parameters mismatch in loadTiddlers() callback function definition (order of params was wrong, resulting in filters NOT being applied)\n''2006.04.12 [3.0.3]'' moved many display messages to macro properties for easier L10N translations via 'lingo' definitions.\n''2006.04.12 [3.0.2]'' additional refactoring of 'core candidate' code. Proposed API now defines "loadRemoteFile()" for XMLHttpRequest processing with built in fallback for handling local filesystem access, and readTiddlersFromHTML() to process the resulting source HTML content.\n''2006.04.04 [3.0.1]'' in refreshImportList(), when using [by tags], tiddlers without tags are now included in a new "untagged" psuedo-tag list section\n''2006.04.04 [3.0.0]'' Separate non-interactive {{{<<importTiddlers...>>}}} macro functionality for incorporation into TW2.1 core and renamed as {{{<<loadTiddlers>>}}} macro. New parameters for loadTiddlers: ''label:text'' and ''prompt:text'' for link creation, ''ask'' for filename/URL, ''tag:text'' for filtering, "confirm" for accept/reject of individual inbound tiddlers. Also, ImportedTiddlers report generator output has been simplified and "importReplace/importPublic" tags and associated "force" param (which were rarely, if ever, used) has been dropped.\n''2006.03.30 [2.9.1]'' when extracting store area from remote URL, look for "</body>" instead of "</body>\sn</html>" so it will match even if the "\sn" is absent from the source.\n''2006.03.30 [2.9.0]'' added optional 'force' macro param. When present, autoImportTiddlers() bypasses the checks for importPublic and importReplace. Based on a request from Tom Otvos.\n''2006.03.28 [2.8.1]'' in loadImportFile(), added checks to see if 'netscape' and 'x.overrideMimeType()' are defined (IE does *not* define these values, so we bypass this code)\nAlso, when extracting store area from remote URL, explicitly look for "</body>\sn</html>" to exclude any extra content that may have been added to the end of the file by hosting environments such as GeoCities. Thanks to Tom Otvos for finding these bugs and suggesting some fixes.\n''2006.02.21 [2.8.0]'' added support for "tiddler:TiddlerName" filtering parameter in auto-import processing\n''2006.02.21 [2.7.1]'' Clean up layout problems with IE. (Use tables for alignment instead of SPANs styled with float:left and float:right)\n''2006.02.21 [2.7.0]'' Added "local file" and "web server" radio buttons for selecting dynamic import source controls in ImportPanel. Default file control is replaced with URL text input field when "web server" is selected. Default remote document URL is defined in SiteURL tiddler. Also, added option for prepending SiteProxy URL as prefix to remote URL to mask cross-domain document access (requires compatible server-side script)\n''2006.02.17 [2.6.0]'' Removed "differences only" listbox display mode, replaced with selection filter 'presets': all/new/changes/differences. Also fixed initialization handling for "add new tags" so that checkbox state is correctly tracked when panel is first displayed.\n''2006.02.16 [2.5.4]'' added checkbox options to control "import remote tags" and "keep existing tags" behavior, in addition to existing "add new tags" functionality.\n''2006.02.14 [2.5.3]'' FF1501 corrected unintended global 't' (loop index) in importReport() and autoImportTiddlers()\n''2006.02.10 [2.5.2]'' corrected unintended global variable in importReport().\n''2006.02.05 [2.5.1]'' moved globals from window.* to config.macros.importTiddlers.* to avoid FireFox 1.5.0.1 crash bug when referencing globals\n''2006.01.18 [2.5.0]'' added checkbox for "create a report". Default is to create/update the ImportedTiddlers report. Clear the checkbox to skip this step.\n''2006.01.15 [2.4.1]'' added "importPublic" tag and inverted default so that auto sharing is NOT done unless tagged with importPublic\n''2006.01.15 [2.4.0]'' Added support for tagging individual tiddlers with importSkip, importReplace, and/or importPrivate to control which tiddlers can be overwritten or shared with others when using auto-import macro syntax. Defaults are to SKIP overwriting existing tiddlers with imported tiddlers, and ALLOW your tiddlers to be auto-imported by others.\n''2006.01.15 [2.3.2]'' Added "ask" parameter to confirm each tiddler before importing (for use with auto-importing)\n''2006.01.15 [2.3.1]'' Strip TW core scripts from import source content and load just the storeArea into the hidden IFRAME. Makes loading more efficient by reducing the document size and by preventing the import document from executing its TW initialization (including plugins). Seems to resolve the "Found 0 tiddlers" problem. Also, when importing local documents, use convertUTF8ToUnicode() to convert the file contents so support international characters sets.\n''2006.01.12 [2.3.0]'' Reorganized code to use callback function for loading import files to support event-driven I/O via an ASYNCHRONOUS XMLHttpRequest. Let's processing continue while waiting for remote hosts to respond to URL requests. Added non-interactive 'batch' macro mode, using parameters to specify which tiddlers to import, and from what document source. Improved error messages and diagnostics, plus an optional 'quiet' switch for batch mode to eliminate //most// feedback.\n''2006.01.11 [2.2.0]'' Added "[by tags]" to list of tiddlers, based on code submitted by BradleyMeck\n''2006.01.09 [2.1.1]'' When a URL is typed in, and then the "open" button is pressed, it generates both an onChange event for the file input and a click event for open button. This results in multiple XMLHttpRequest()'s which seem to jam things up quite a bit. I removed the onChange handling for file input field. To open a file (local or URL), you must now explicitly press the "open" button in the control panel.\n''2006.01.08 [2.1.0]'' IMPORT FROM ANYWHERE!!! re-write getImportedTiddlers() logic to either read a local file (using local I/O), OR... read a remote file, using a combination of XML and an iframe to permit cross-domain reading of DOM elements. Adapted from example code and techniques courtesy of Jonny LeRoy.\n''2006.01.06 [2.0.2]'' When refreshing list contents, fixed check for tiddlerExists() when "show differences only" is selected, so that imported tiddlers that don't exist in the current file will be recognized as differences and included in the list.\n''2006.01.04 [2.0.1]'' When "show differences only" is NOT checked, import all tiddlers that have been selected even when they have a matching title and date.\n''2005.12.27 [2.0.0]'' Update for TW2.0\nDefer initial panel creation and only register a notification function when panel first is created\n''2005.12.22 [1.3.1]'' tweak formatting in importReport() and add 'discard report' link to output\n''2005.12.03 [1.3.0]'' Dynamically create/remove importPanel as needed to ensure only one instance of interface elements exists, even if there are multiple instances of macro embedding. Also, dynamically create/recreate importFrame each time an external TW document is loaded for importation (reduces DOM overhead and ensures a 'fresh' frame for each document)\n''2005.11.29 [1.2.1]'' fixed formatting of 'detail info' in importReport()\n''2005.11.11 [1.2.0]'' added 'inline' param to embed controls in a tiddler\n''2005.11.09 [1.1.0]'' only load HTML and CSS the first time the macro handler is called. Allows for redundant placement of the macro without creating multiple instances of controls with the same ID's.\n''2005.10.25 [1.0.5]'' fixed typo in importReport() that prevented reports from being generated\n''2005.10.09 [1.0.4]'' combined documentation with plugin code instead of using separate tiddlers\n''2005.08.05 [1.0.3]'' moved CSS and HTML definitions into plugin code instead of using separate tiddlers\n''2005.07.27 [1.0.2]'' core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet()\n''2005.07.23 [1.0.1]'' added parameter checks and corrected addNotification() usage\n''2005.07.20 [1.0.0]'' Initial Release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n// // ''MACRO DEFINITION''\n//{{{\n// Version\nversion.extensions.importTiddlers = {major: 3, minor: 1, revision: 2, date: new Date(2006,11,14)};\n\n// IE needs explicit global scoping for functions/vars called from browser events\nwindow.onClickImportButton=onClickImportButton;\nwindow.refreshImportList=refreshImportList;\n\n// default cookie/option values\nif (!config.options.chkImportReport) config.options.chkImportReport=true;\n\n// fixups for TW2.0.x and earlier\nif (window.merge==undefined) window.merge=function(dst,src,preserveExisting)\n { for (p in src) if (!preserveExisting||dst[p]===undefined) dst[p]=src[p]; return dst; }\nif (config.macros.importTiddlers==undefined) config.macros.importTiddlers={ };\n\nmerge(config.macros.importTiddlers,{\n label: "import tiddlers",\n prompt: "Copy tiddlers from another document",\n foundMsg: "Found %0 tiddlers in %1",\n countMsg: "%0 tiddlers selected for import",\n importedMsg: "Imported %0 of %1 tiddlers from %2",\n src: "", // path/filename or URL of document to import (retrieved from SiteUrl tiddler)\n proxy: "", // URL for remote proxy script (retrieved from SiteProxy tiddler)\n useProxy: false, // use specific proxy script in front of remote URL\n inbound: null, // hash-indexed array of tiddlers from other document\n newTags: "", // text of tags added to imported tiddlers\n addTags: true, // add new tags to imported tiddlers\n listsize: 8, // # of lines to show in imported tiddler list\n importTags: true, // include tags from remote source document when importing a tiddler\n keepTags: true, // retain existing tags when replacing a tiddler\n index: 0, // current processing index in import list\n sort: "" // sort order for imported tiddler listbox\n});\n\nif (config.macros.importTiddlers.coreHandler==undefined)\n config.macros.importTiddlers.coreHandler=config.macros.importTiddlers.handler; // save built-in handler\n\nconfig.macros.importTiddlers.handler = function(place,macroName,params,wikifier,paramString,tiddler) {\n if (!params[0] || params[0].toLowerCase()=='core') { // default to built in\n if (config.macros.importTiddlers.coreHandler)\n config.macros.importTiddlers.coreHandler.apply(this,arguments);\n else \n createTiddlyButton(place,this.label,this.prompt,onClickImportMenu);\n }\n else if (params[0]=='link') // show link to floating panel\n createTiddlyButton(place,this.label,this.prompt,onClickImportMenu);\n else if (params[0]=='inline') {// show panel as INLINE tiddler content\n createImportPanel(place);\n document.getElementById("importPanel").style.position="static";\n document.getElementById("importPanel").style.display="block";\n }\n else config.macros.loadTiddlers.handler(place,macroName,params); // any other params: loadtiddlers\n}\n//}}}\n\n// // ''INTERFACE DEFINITION''\n// // Handle link click to create/show/hide control panel\n//{{{\nfunction onClickImportMenu(e)\n{\n if (!e) var e = window.event;\n var parent=resolveTarget(e).parentNode;\n var panel = document.getElementById("importPanel");\n if (panel==undefined || panel.parentNode!=parent)\n panel=createImportPanel(parent);\n var isOpen = panel.style.display=="block";\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));\n else\n panel.style.display = isOpen ? "none" : "block" ;\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return(false);\n}\n//}}}\n\n// // Create control panel: HTML, CSS\n//{{{\nfunction createImportPanel(place) {\n var panel=document.getElementById("importPanel");\n if (panel) { panel.parentNode.removeChild(panel); }\n setStylesheet(config.macros.importTiddlers.css,"importTiddlers");\n panel=createTiddlyElement(place,"span","importPanel",null,null)\n panel.innerHTML=config.macros.importTiddlers.html;\n refreshImportList();\n var siteURL=store.getTiddlerText("SiteUrl"); if (!siteURL) siteURL="";\n document.getElementById("importSourceURL").value=siteURL;\n config.macros.importTiddlers.src=siteURL;\n var siteProxy=store.getTiddlerText("SiteProxy"); if (!siteProxy) siteProxy="SiteProxy";\n document.getElementById("importSiteProxy").value=siteProxy;\n config.macros.importTiddlers.proxy=siteProxy;\n return panel;\n}\n//}}}\n\n// // CSS\n//{{{\nconfig.macros.importTiddlers.css = '\s\n#importPanel {\s\n display: none; position:absolute; z-index:11; width:35em; right:105%; top:3em;\s\n background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\s\n border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\s\n padding: 0.5em; margin:0em; -moz-border-radius:1em;\s\n}\s\n#importPanel a, #importPanel td a { color:#009; display:inline; margin:0px; padding:1px; }\s\n#importPanel table { width:100%; border:0px; padding:0px; margin:0px; font-size:8pt; line-height:110%; background:transparent; }\s\n#importPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }\s\n#importPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }\s\n#importPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}\s\n#importPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\s\n#importPanel .box { border:1px solid black; padding:3px; margin-bottom:5px; background:#f8f8f8; -moz-border-radius:5px;}\s\n#importPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }\s\n#importPanel .rad { width:auto; }\s\n#importPanel .chk { width:auto; margin:1px;border:0; }\s\n#importPanel .btn { width:auto; }\s\n#importPanel .btn1 { width:98%; }\s\n#importPanel .btn2 { width:48%; }\s\n#importPanel .btn3 { width:32%; }\s\n#importPanel .btn4 { width:24%; }\s\n#importPanel .btn5 { width:19%; }\s\n#importPanel .importButton { padding: 0em; margin: 0px; font-size:8pt; }\s\n#importPanel .importListButton { padding:0em 0.25em 0em 0.25em; color: #000000; display:inline }\s\n#importCollisionPanel { display:none; margin:0.5em 0em 0em 0em; }\s\n';\n//}}}\n\n// // HTML \n//{{{\nconfig.macros.importTiddlers.html = '\s\n<!-- source and report -->\s\n<table><tr><td align=left>\s\n import from\s\n <input type="radio" class="rad" name="importFrom" value="file" CHECKED\s\n onClick="document.getElementById(\s'importLocalPanel\s').style.display=this.checked?\s'block\s':\s'none\s';\s\n document.getElementById(\s'importHTTPPanel\s').style.display=!this.checked?\s'block\s':\s'none\s'"> local file\s\n <input type="radio" class="rad" name="importFrom" value="http"\s\n onClick="document.getElementById(\s'importLocalPanel\s').style.display=!this.checked?\s'block\s':\s'none\s';\s\n document.getElementById(\s'importHTTPPanel\s').style.display=this.checked?\s'block\s':\s'none\s'"> web server\s\n</td><td align=right>\s\n <input type=checkbox class="chk" id="chkImportReport" checked\s\n onClick="config.options[\s'chkImportReport\s']=this.checked;"> create a report\s\n</td></tr></table>\s\n<!-- import from local file -->\s\n<div id="importLocalPanel" style="display:block;margin-bottom:5px;margin-top:5px;padding-top:3px;border-top:1px solid #999">\s\nlocal document path/filename:<br>\s\n<input type="file" id="fileImportSource" size=57 style="width:100%"\s\n onKeyUp="config.macros.importTiddlers.src=this.value"\s\n onChange="config.macros.importTiddlers.src=this.value;">\s\n</div><!--panel-->\s\n\s\n<!-- import from http server -->\s\n<div id="importHTTPPanel" style="display:none;margin-bottom:5px;margin-top:5px;padding-top:3px;border-top:1px solid #999">\s\n<table><tr><td align=left>\s\n remote document URL:<br>\s\n</td><td align=right>\s\n <input type="checkbox" class="chk" id="importUseProxy"\s\n onClick="config.macros.importTiddlers.useProxy=this.checked;\s\n document.getElementById(\s'importSiteProxy\s').style.display=this.checked?\s'block\s':\s'none\s'"> use a proxy script\s\n</td></tr></table>\s\n<input type="text" id="importSiteProxy" style="display:none;margin-bottom:1px" onfocus="this.select()" value="SiteProxy"\s\n onKeyUp="config.macros.importTiddlers.proxy=this.value"\s\n onChange="config.macros.importTiddlers.proxy=this.value;">\s\n<input type="text" id="importSourceURL" onfocus="this.select()" value="SiteUrl"\s\n onKeyUp="config.macros.importTiddlers.src=this.value"\s\n onChange="config.macros.importTiddlers.src=this.value;">\s\n</div><!--panel-->\s\n\s\n<table><tr><td align=left>\s\n select:\s\n <a href="JavaScript:;" id="importSelectAll"\s\n onclick="onClickImportButton(this)" title="select all tiddlers">\s\n &nbsp;all&nbsp;</a>\s\n <a href="JavaScript:;" id="importSelectNew"\s\n onclick="onClickImportButton(this)" title="select tiddlers not already in destination document">\s\n &nbsp;added&nbsp;</a> \s\n <a href="JavaScript:;" id="importSelectChanges"\s\n onclick="onClickImportButton(this)" title="select tiddlers that have been updated in source document">\s\n &nbsp;changes&nbsp;</a> \s\n <a href="JavaScript:;" id="importSelectDifferences"\s\n onclick="onClickImportButton(this)" title="select tiddlers that have been added or are different from existing tiddlers">\s\n &nbsp;differences&nbsp;</a> \s\n <a href="JavaScript:;" id="importToggleFilter"\s\n onclick="onClickImportButton(this)" title="show/hide selection filter">\s\n &nbsp;filter&nbsp;</a> \s\n</td><td align=right>\s\n <a href="JavaScript:;" id="importListSmaller"\s\n onclick="onClickImportButton(this)" title="reduce list size">\s\n &nbsp;&#150;&nbsp;</a>\s\n <a href="JavaScript:;" id="importListLarger"\s\n onclick="onClickImportButton(this)" title="increase list size">\s\n &nbsp;+&nbsp;</a>\s\n <a href="JavaScript:;" id="importListMaximize"\s\n onclick="onClickImportButton(this)" title="maximize/restore list size">\s\n &nbsp;=&nbsp;</a>\s\n</td></tr></table>\s\n<select id="importList" size=8 multiple\s\n onchange="setTimeout(\s'refreshImportList(\s'+this.selectedIndex+\s')\s',1)">\s\n <!-- NOTE: delay refresh so list is updated AFTER onchange event is handled -->\s\n</select>\s\n<input type=checkbox class="chk" id="chkAddTags" checked\s\n onClick="config.macros.importTiddlers.addTags=this.checked;">add new tags &nbsp;\s\n<input type=checkbox class="chk" id="chkImportTags" checked\s\n onClick="config.macros.importTiddlers.importTags=this.checked;">import source tags &nbsp;\s\n<input type=checkbox class="chk" id="chkKeepTags" checked\s\n onClick="config.macros.importTiddlers.keepTags=this.checked;">keep existing tags<br>\s\n<input type=text id="txtNewTags" size=15 onKeyUp="config.macros.importTiddlers.newTags=this.value" autocomplete=off>\s\n<div align=center>\s\n <input type=button id="importOpen" class="importButton" style="width:32%" value="open"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importStart" class="importButton" style="width:32%" value="import"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importClose" class="importButton" style="width:32%" value="close"\s\n onclick="onClickImportButton(this)">\s\n</div>\s\n<div id="importCollisionPanel">\s\n tiddler already exists:\s\n <input type=text id="importNewTitle" size=15 autocomplete=off">\s\n <div align=center>\s\n <input type=button id="importSkip" class="importButton" style="width:23%" value="skip"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importRename" class="importButton" style="width:23%" value="rename"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importMerge" class="importButton" style="width:23%" value="merge"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importReplace" class="importButton" style="width:23%" value="replace"\s\n onclick="onClickImportButton(this)">\s\n </div>\s\n</div>\s\n';\n//}}}\n\n// // Control interactions\n//{{{\nfunction onClickImportButton(which)\n{\n // DEBUG alert(which.id);\n var theList = document.getElementById('importList');\n if (!theList) return;\n var thePanel = document.getElementById('importPanel');\n var theCollisionPanel = document.getElementById('importCollisionPanel');\n var theNewTitle = document.getElementById('importNewTitle');\n var count=0;\n switch (which.id)\n {\n case 'fileImportSource':\n case 'importOpen': // load import source into hidden frame\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.inbound=null; // clear the imported tiddler buffer\n refreshImportList(); // reset/resize the listbox\n if (config.macros.importTiddlers.src=="") break;\n // Load document into hidden iframe so we can read it's DOM and fill the list\n config.macros.importTiddlers.loadRemoteFile(config.macros.importTiddlers.src, function(src,txt) {\n var tiddlers = readTiddlersFromHTML(txt);\n var count=tiddlers?tiddlers.length:0;\n displayMessage(config.macros.importTiddlers.foundMsg.format([count,src]));\n config.macros.importTiddlers.inbound=tiddlers;\n window.refreshImportList(0);\n });\n break;\n case 'importSelectAll': // select all tiddler list items (i.e., not headings)\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n if (theList.options[t].value=="") continue;\n theList.options[t].selected=true;\n count++;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectNew': // select tiddlers not in current document\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value=="") continue;\n theList.options[t].selected=!store.tiddlerExists(theList.options[t].value);\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectChanges': // select tiddlers that are updated from existing tiddlers\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value==""||!store.tiddlerExists(theList.options[t].value)) continue;\n for (var i=0; i<config.macros.importTiddlers.inbound.length; i++) // find matching inbound tiddler\n { var inbound=config.macros.importTiddlers.inbound[i]; if (inbound.title==theList.options[t].value) break; }\n theList.options[t].selected=(inbound.modified-store.getTiddler(theList.options[t].value).modified>0); // updated tiddler\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectDifferences': // select tiddlers that are new or different from existing tiddlers\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value=="") continue;\n if (!store.tiddlerExists(theList.options[t].value)) { theList.options[t].selected=true; count++; continue; }\n for (var i=0; i<config.macros.importTiddlers.inbound.length; i++) // find matching inbound tiddler\n { var inbound=config.macros.importTiddlers.inbound[i]; if (inbound.title==theList.options[t].value) break; }\n theList.options[t].selected=(inbound.modified-store.getTiddler(theList.options[t].value).modified!=0); // changed tiddler\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importToggleFilter': // show/hide filter\n case 'importFilter': // apply filter\n alert("coming soon!");\n break;\n case 'importStart': // initiate the import processing\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.index=0;\n config.macros.importTiddlers.index=importTiddlers(0);\n importStopped();\n break;\n case 'importClose': // unload imported tiddlers or hide the import control panel\n // if imported tiddlers not loaded, close the import control panel\n if (!config.macros.importTiddlers.inbound) { thePanel.style.display='none'; break; }\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.inbound=null; // clear the imported tiddler buffer\n refreshImportList(); // reset/resize the listbox\n break;\n case 'importSkip': // don't import the tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n theImported.status='skipped after asking'; // mark item as skipped\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index+1); // resume with NEXT item\n importStopped();\n break;\n case 'importRename': // change name of imported tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n theImported.status = 'renamed from '+theImported.title; // mark item as renamed\n theImported.set(theNewTitle.value,null,null,null,null); // change the tiddler title\n theItem.value = theNewTitle.value; // change the listbox item text\n theItem.text = theNewTitle.value; // change the listbox item text\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with THIS item\n importStopped();\n break;\n case 'importMerge': // join existing and imported tiddler content\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(theItem.value);\n var theText = theExisting.text+'\sn----\sn^^merged from: ';\n theText +='[['+config.macros.importTiddlers.src+'#'+theItem.value+'|'+config.macros.importTiddlers.src+'#'+theItem.value+']]^^\sn';\n theText +='^^'+theImported.modified.toLocaleString()+' by '+theImported.modifier+'^^\sn'+theImported.text;\n var theDate = new Date();\n var theTags = theExisting.getTags()+' '+theImported.getTags();\n theImported.set(null,theText,null,theDate,theTags);\n theImported.status = 'merged with '+theExisting.title; // mark item as merged\n theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");\n theImported.status += ' by '+theExisting.modifier;\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with this item\n importStopped();\n break;\n case 'importReplace': // substitute imported tiddler for existing tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(theItem.value);\n theImported.status = 'replaces '+theExisting.title; // mark item for replace\n theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");\n theImported.status += ' by '+theExisting.modifier;\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with THIS item\n importStopped();\n break;\n case 'importListSmaller': // decrease current listbox size, minimum=5\n if (theList.options.length==1) break;\n theList.size-=(theList.size>5)?1:0;\n config.macros.importTiddlers.listsize=theList.size;\n break;\n case 'importListLarger': // increase current listbox size, maximum=number of items in list\n if (theList.options.length==1) break;\n theList.size+=(theList.size<theList.options.length)?1:0;\n config.macros.importTiddlers.listsize=theList.size;\n break;\n case 'importListMaximize': // toggle listbox size between current and maximum\n if (theList.options.length==1) break;\n theList.size=(theList.size==theList.options.length)?config.macros.importTiddlers.listsize:theList.options.length;\n break;\n }\n}\n//}}}\n\n// // refresh listbox\n//{{{\nfunction refreshImportList(selectedIndex)\n{\n var theList = document.getElementById("importList");\n if (!theList) return;\n // if nothing to show, reset list content and size\n if (!config.macros.importTiddlers.inbound) \n {\n while (theList.length > 0) { theList.options[0] = null; }\n theList.options[0]=new Option('please open a document...',"",false,false);\n theList.size=config.macros.importTiddlers.listsize;\n return;\n }\n // get the sort order\n if (!selectedIndex) selectedIndex=0;\n if (selectedIndex==0) config.macros.importTiddlers.sort='title'; // heading\n if (selectedIndex==1) config.macros.importTiddlers.sort='title';\n if (selectedIndex==2) config.macros.importTiddlers.sort='modified';\n if (selectedIndex==3) config.macros.importTiddlers.sort='tags';\n if (selectedIndex>3) {\n // display selected tiddler count\n for (var t=0,count=0; t < theList.options.length; t++) count+=(theList.options[t].selected&&theList.options[t].value!="")?1:0;\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n return; // no refresh needed\n }\n\n // get the alphasorted list of tiddlers (optionally, filter out unchanged tiddlers)\n var tiddlers=config.macros.importTiddlers.inbound;\n tiddlers.sort(function (a,b) {if(a['title'] == b['title']) return(0); else return (a['title'] < b['title']) ? -1 : +1; });\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n // add heading and control items to list\n var i=0;\n var indent=String.fromCharCode(160)+String.fromCharCode(160);\n theList.options[i++]=new Option(tiddlers.length+' tiddler'+((tiddlers.length!=1)?'s are':' is')+' in the document',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="title" )?">":indent)+' [by title]',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="modified")?">":indent)+' [by date]',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="tags")?">":indent)+' [by tags]',"",false,false);\n // output the tiddler list\n switch(config.macros.importTiddlers.sort)\n {\n case "title":\n for(var t = 0; t < tiddlers.length; t++)\n theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);\n break;\n case "modified":\n // sort descending for newest date first\n tiddlers.sort(function (a,b) {if(a['modified'] == b['modified']) return(0); else return (a['modified'] > b['modified']) ? -1 : +1; });\n var lastSection = "";\n for(var t = 0; t < tiddlers.length; t++) {\n var tiddler = tiddlers[t];\n var theSection = tiddler.modified.toLocaleDateString();\n if (theSection != lastSection) {\n theList.options[i++] = new Option(theSection,"",false,false);\n lastSection = theSection;\n }\n theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);\n }\n break;\n case "tags":\n var theTitles = {}; // all tiddler titles, hash indexed by tag value\n var theTags = new Array();\n for(var t=0; t<tiddlers.length; t++) {\n var title=tiddlers[t].title;\n var tags=tiddlers[t].tags;\n if (!tags || !tags.length) {\n if (theTitles["untagged"]==undefined) { theTags.push("untagged"); theTitles["untagged"]=new Array(); }\n theTitles["untagged"].push(title);\n }\n else for(var s=0; s<tags.length; s++) {\n if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }\n theTitles[tags[s]].push(title);\n }\n }\n theTags.sort();\n for(var tagindex=0; tagindex<theTags.length; tagindex++) {\n var theTag=theTags[tagindex];\n theList.options[i++]=new Option(theTag,"",false,false);\n for(var t=0; t<theTitles[theTag].length; t++)\n theList.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);\n }\n break;\n }\n theList.selectedIndex=selectedIndex; // select current control item\n if (theList.size<config.macros.importTiddlers.listsize) theList.size=config.macros.importTiddlers.listsize;\n if (theList.size>theList.options.length) theList.size=theList.options.length;\n}\n//}}}\n\n// // re-entrant processing for handling import with interactive collision prompting\n//{{{\nfunction importTiddlers(startIndex)\n{\n if (!config.macros.importTiddlers.inbound) return -1;\n\n var theList = document.getElementById('importList');\n if (!theList) return;\n var t;\n // if starting new import, reset import status flags\n if (startIndex==0)\n for (var t=0;t<config.macros.importTiddlers.inbound.length;t++)\n config.macros.importTiddlers.inbound[t].status="";\n for (var i=startIndex; i<theList.options.length; i++)\n {\n // if list item is not selected or is a heading (i.e., has no value), skip it\n if ((!theList.options[i].selected) || ((t=theList.options[i].value)==""))\n continue;\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==t) break;\n var inbound = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(inbound.title);\n // avoid redundant import for tiddlers that are listed multiple times (when 'by tags')\n if (inbound.status=="added")\n continue;\n // don't import the "ImportedTiddlers" history from the other document...\n if (inbound.title=='ImportedTiddlers')\n continue;\n // if tiddler exists and import not marked for replace or merge, stop importing\n if (theExisting && (inbound.status.substr(0,7)!="replace") && (inbound.status.substr(0,5)!="merge"))\n return i;\n // assemble tags (remote + existing + added)\n var newTags = "";\n if (config.macros.importTiddlers.importTags)\n newTags+=inbound.getTags() // import remote tags\n if (config.macros.importTiddlers.keepTags && theExisting)\n newTags+=" "+theExisting.getTags(); // keep existing tags\n if (config.macros.importTiddlers.addTags && config.macros.importTiddlers.newTags.trim().length)\n newTags+=" "+config.macros.importTiddlers.newTags; // add new tags\n inbound.set(null,null,null,null,newTags.trim());\n // set the status to 'added' (if not already set by the 'ask the user' UI)\n inbound.status=(inbound.status=="")?'added':inbound.status;\n // do the import!\n // OLD: store.addTiddler(in); store.setDirty(true);\n store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, inbound.tags);\n store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value\n }\n return(-1); // signals that we really finished the entire list\n}\n//}}}\n\n//{{{\nfunction importStopped()\n{\n var theList = document.getElementById('importList');\n var theNewTitle = document.getElementById('importNewTitle');\n if (!theList) return;\n if (config.macros.importTiddlers.index==-1)\n importReport(); // import finished... generate the report\n else\n {\n // DEBUG alert('import stopped at: '+config.macros.importTiddlers.index);\n // import collision... show the collision panel and set the title edit field\n document.getElementById('importCollisionPanel').style.display='block';\n theNewTitle.value=theList.options[config.macros.importTiddlers.index].value;\n }\n}\n//}}}\n\n// // ''REPORT GENERATOR''\n//{{{\nfunction importReport(quiet)\n{\n if (!config.macros.importTiddlers.inbound) return;\n // DEBUG alert('importReport: start');\n\n // if import was not completed, the collision panel will still be open... close it now.\n var panel=document.getElementById('importCollisionPanel'); if (panel) panel.style.display='none';\n\n // get the alphasorted list of tiddlers\n var tiddlers = config.macros.importTiddlers.inbound;\n // gather the statistics\n var count=0;\n for (var t=0; t<tiddlers.length; t++)\n if (tiddlers[t].status && tiddlers[t].status.trim().length && tiddlers[t].status.substr(0,7)!="skipped") count++;\n\n // generate a report\n if (count && config.options.chkImportReport) {\n // get/create the report tiddler\n var theReport = store.getTiddler('ImportedTiddlers');\n if (!theReport) { theReport= new Tiddler(); theReport.title = 'ImportedTiddlers'; theReport.text = ""; }\n // format the report content\n var now = new Date();\n var newText = "On "+now.toLocaleString()+", "+config.options.txtUserName\n newText +=" imported "+count+" tiddler"+(count==1?"":"s")+" from\sn[["+config.macros.importTiddlers.src+"|"+config.macros.importTiddlers.src+"]]:\sn";\n if (config.macros.importTiddlers.addTags && config.macros.importTiddlers.newTags.trim().length)\n newText += "imported tiddlers were tagged with: \s""+config.macros.importTiddlers.newTags+"\s"\sn";\n newText += "<<<\sn";\n for (var t=0; t<tiddlers.length; t++) if (tiddlers[t].status) newText += "#[["+tiddlers[t].title+"]] - "+tiddlers[t].status+"\sn";\n newText += "<<<\sn";\n// 20060918 ELS: DON'T ADD "discard" BUTTON TO REPORT\n// newText += "<html><input type=\s"button\s" href=\s"javascript:;\s" ";\n// newText += "onclick=\s"story.closeTiddler('"+theReport.title+"'); store.deleteTiddler('"+theReport.title+"');\s" ";\n// newText += "value=\s"discard report\s"></html>";\n // update the ImportedTiddlers content and show the tiddler\n theReport.text = newText+((theReport.text!="")?'\sn----\sn':"")+theReport.text;\n theReport.modifier = config.options.txtUserName;\n theReport.modified = new Date();\n // OLD: store.addTiddler(theReport);\n store.saveTiddler(theReport.title, theReport.title, theReport.text, theReport.modifier, theReport.modified, theReport.tags);\n if (!quiet) { story.displayTiddler(null,theReport.title,1,null,null,false); story.refreshTiddler(theReport.title,1,true); }\n }\n\n // reset status flags\n for (var t=0; t<config.macros.importTiddlers.inbound.length; t++) config.macros.importTiddlers.inbound[t].status="";\n\n // refresh display if tiddlers have been loaded\n if (count) { store.setDirty(true); store.notifyAll(); }\n\n // always show final message when tiddlers were actually loaded\n if (count) displayMessage(config.macros.importTiddlers.importedMsg.format([count,tiddlers.length,config.macros.importTiddlers.src]));\n}\n//}}}\n\n/***\n!!!!! non-interactive 'load tiddlers' macro\n***/\n//{{{\n// default cookie/option values\nif (!config.options.chkImportReport) config.options.chkImportReport=true;\n\nconfig.macros.loadTiddlers = {\n label: "",\n prompt: "add/update tiddlers from '%0'",\n askMsg: "Please enter a local path/filename or a remote URL",\n openMsg: "Opening %0",\n openErrMsg: "Could not open %0 - error=%1",\n readMsg: "Read %0 bytes from %1",\n foundMsg: "Found %0 tiddlers in %1",\n nochangeMsg: "'%0' is up-to-date... skipped.",\n loadedMsg: "Loaded %0 of %1 tiddlers from %2"\n};\n\nconfig.macros.loadTiddlers.handler = function(place,macroName,params) {\n var label=(params[0] && params[0].substr(0,6)=='label:')?params.shift().substr(6):this.label;\n var prompt=(params[0] && params[0].substr(0,7)=='prompt:')?params.shift().substr(7):this.prompt;\n var filter="updates";\n if (params[0] && (params[0]=='all' || params[0]=='new' || params[0]=='changes' || params[0]=='updates'\n || params[0].substr(0,8)=='tiddler:' || params[0].substr(0,4)=='tag:'))\n filter=params.shift();\n var src=params.shift(); if (!src || !src.length) return; // filename is required\n var quiet=(params[0]=="quiet"); if (quiet) params.shift();\n var ask=(params[0]=="confirm"); if (ask) params.shift();\n var force=(params[0]=="force"); if (force) params.shift();\n if (label.trim().length) {\n // link triggers load tiddlers from another file/URL and then applies filtering rules to add/replace tiddlers in the store\n createTiddlyButton(place,label.format([src]),prompt.format([src]), function() {\n if (src=="ask") src=prompt(config.macros.loadTiddlers.askMsg);\n config.macros.importTiddlers.loadRemoteFile(src,loadTiddlers,quiet,ask,filter,force);\n })\n }\n else {\n // load tiddlers from another file/URL and then apply filtering rules to add/replace tiddlers in the store\n if (src=="ask") src=prompt(config.macros.loadTiddlers.askMsg);\n config.macros.importTiddlers.loadRemoteFile(src,loadTiddlers,quiet,ask,filter,force);\n }\n}\n\nfunction loadTiddlers(src,html,quiet,ask,filter,force)\n{\n var tiddlers = readTiddlersFromHTML(html);\n var count=tiddlers?tiddlers.length:0;\n if (!quiet) displayMessage(config.macros.loadTiddlers.foundMsg.format([count,src]));\n var count=0;\n if (tiddlers) for (var t=0;t<tiddlers.length;t++) {\n var inbound = tiddlers[t];\n var theExisting = store.getTiddler(inbound.title);\n if (inbound.title=='ImportedTiddlers')\n continue; // skip "ImportedTiddlers" history from the other document...\n\n // apply the all/new/changes/updates filter (if any)\n if (filter && filter!="all") {\n if ((filter=="new") && theExisting) // skip existing tiddlers\n continue;\n if ((filter=="changes") && !theExisting) // skip new tiddlers\n continue;\n if ((filter.substr(0,4)=="tag:") && inbound.tags.find(filter.substr(4))==null) // must match specific tag value\n continue;\n if ((filter.substr(0,8)=="tiddler:") && inbound.title!=filter.substr(8)) // must match specific tiddler name\n continue;\n if (!force && store.tiddlerExists(inbound.title) && ((theExisting.modified.getTime()-inbound.modified.getTime())>=0))\n { if (!quiet) displayMessage(config.macros.loadTiddlers.nochangeMsg.format([inbound.title])); continue; }\n }\n // get confirmation if required\n if (ask && !confirm((theExisting?"Update":"Add")+" tiddler '"+inbound.title+"'\snfrom "+src))\n { tiddlers[t].status="skipped - cancelled by user"; continue; }\n // DO IT!\n // OLD: store.addTiddler(in);\n store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, inbound.tags);\n store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value\n tiddlers[t].status=theExisting?"updated":"added"\n count++;\n }\n if (count) {\n // refresh display\n store.setDirty(true);\n store.notifyAll();\n // generate a report\n if (config.options.chkImportReport) {\n // get/create the report tiddler\n var theReport = store.getTiddler('ImportedTiddlers');\n if (!theReport) { theReport= new Tiddler(); theReport.title = 'ImportedTiddlers'; theReport.text = ""; }\n // format the report content\n var now = new Date();\n var newText = "On "+now.toLocaleString()+", "+config.options.txtUserName+" loaded "+count+" tiddlers from\sn[["+src+"|"+src+"]]:\sn";\n newText += "<<<\sn";\n for (var t=0; t<tiddlers.length; t++) if (tiddlers[t].status) newText += "#[["+tiddlers[t].title+"]] - "+tiddlers[t].status+"\sn";\n newText += "<<<\sn";\n// 20060918 ELS: DON'T ADD "discard" BUTTON TO REPORT\n// newText += "<html><input type=\s"button\s" href=\s"javascript:;\s" ";\n// newText += "onclick=\s"story.closeTiddler('"+theReport.title+"'); store.deleteTiddler('"+theReport.title+"');\s" ";\n// newText += "value=\s"discard report\s"></html>";\n // update the ImportedTiddlers content and show the tiddler\n theReport.text = newText+((theReport.text!="")?'\sn----\sn':"")+theReport.text;\n theReport.modifier = config.options.txtUserName;\n theReport.modified = new Date();\n // OLD: store.addTiddler(theReport);\n store.saveTiddler(theReport.title, theReport.title, theReport.text, theReport.modifier, theReport.modified, theReport.tags);\n if (!quiet) { story.displayTiddler(null,theReport.title,1,null,null,false); story.refreshTiddler(theReport.title,1,true); }\n }\n }\n // always show final message when tiddlers were actually loaded\n if (!quiet||count) displayMessage(config.macros.loadTiddlers.loadedMsg.format([count,tiddlers.length,src]));\n}\n\n// replaces existing core function\n\nconfig.macros.importTiddlers.loadRemoteFile = function(src,callback,quiet,ask,filter,force) {\n if (src==undefined || !src.length) return null; // filename is required\n if (!quiet) clearMessage();\n if (!quiet) displayMessage(config.macros.loadTiddlers.openMsg.format([src]));\n if (src.substr(0,4)!="http" && src.substr(0,4)!="file") { // if not a URL, fallback to read from local filesystem\n var txt=loadFile(src);\n if ((txt==null)||(txt==false)) // file didn't load\n { if (!quiet) displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,"(unknown)"])); }\n else {\n if (!quiet) displayMessage(config.macros.loadTiddlers.readMsg.format([txt.length,src]));\n if (callback) callback(src,convertUTF8ToUnicode(txt),quiet,ask,filter,force);\n }\n }\n else {\n var x; // get an request object\n try {x = new XMLHttpRequest()} // moz\n catch(e) {\n try {x = new ActiveXObject("Msxml2.XMLHTTP")} // IE 6\n catch (e) {\n try {x = new ActiveXObject("Microsoft.XMLHTTP")} // IE 5\n catch (e) { return }\n }\n }\n // setup callback function to handle server response(s)\n x.onreadystatechange = function() {\n if (x.readyState == 4) {\n if (x.status==0 || x.status == 200) {\n if (!quiet) displayMessage(config.macros.loadTiddlers.readMsg.format([x.responseText.length,src]));\n if (callback) callback(src,x.responseText,quiet,ask,filter,force);\n }\n else {\n if (!quiet) displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,x.status]));\n }\n }\n }\n // get privileges to read another document's DOM via http:// or file:// (moz-only)\n if (typeof(netscape)!="undefined") {\n try { netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); }\n catch (e) { if (!quiet) displayMessage(e.description?e.description:e.toString()); }\n }\n // send the HTTP request\n try {\n var url=src+(src.indexOf('?')<0?'?':'&')+'nocache='+Math.random();\n x.open("GET",src,true);\n if (x.overrideMimeType) x.overrideMimeType('text/html');\n x.send(null);\n }\n catch (e) {\n if (!quiet) {\n displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,"(unknown)"]));\n displayMessage(e.description?e.description:e.toString());\n }\n }\n }\n}\n\nfunction readTiddlersFromHTML(html)\n{\n // extract store area from html \n var start=html.indexOf('<div id="storeArea">');\n var end=html.indexOf("<!--POST-BODY-START--"+">",start);\n if (end==-1) var end=html.indexOf("</body"+">",start); // backward-compatibility for older documents\n var sa="<html><body>"+html.substring(start,end)+"</body></html>";\n\n // load html into iframe document\n var f=document.getElementById("loaderFrame"); if (f) document.body.removeChild(f);\n f=document.createElement("iframe"); f.id="loaderFrame";\n f.style.width="0px"; f.style.height="0px"; f.style.border="0px";\n document.body.appendChild(f);\n var d=f.document;\n if (f.contentDocument) d=f.contentDocument; // For NS6\n else if (f.contentWindow) d=f.contentWindow.document; // For IE5.5 and IE6\n d.open(); d.writeln(sa); d.close();\n\n // read tiddler DIVs from storeArea DOM element \n var sa = d.getElementById("storeArea");\n if (!sa) return null;\n sa.normalize();\n var nodes = sa.childNodes;\n if (!nodes || !nodes.length) return null;\n var tiddlers = [];\n for(var t = 0; t < nodes.length; t++) {\n var title = null;\n if(nodes[t].getAttribute)\n title = nodes[t].getAttribute("tiddler");\n if(!title && nodes[t].id && (nodes[t].id.substr(0,5) == "store"))\n title = nodes[t].id.substr(5);\n if(title && title != "")\n tiddlers.push((new Tiddler()).loadFromDiv(nodes[t],title));\n }\n return tiddlers;\n}\n//}}}
/***\n|''Name:''|InlineJavascriptPlugin|\n|''Source:''|http://www.TiddlyTools.com/#InlineJavascriptPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nInsert Javascript executable code directly into your tiddler content. Lets you ''call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.\n!!!!!Usage\n<<<\nWhen installed, this plugin adds new wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be treated as embedded javascript and executed each time the tiddler is rendered.\n\n''Deferred execution from an 'onClick' link''\nBy including a label="..." parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered.\n\n''External script source files:''\nYou can also load javascript from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}). This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins. The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.\n\n''Display script source in tiddler output''\nBy including the keyword parameter "show", in the initial {{{<script>}}} marker, the plugin will include the script source code in the output that it displays in the tiddler.\n\n''Defining javascript functions and libraries:''\nAlthough the external javascript file is loaded while the tiddler content is being rendered, any functions it defines will not be available for use until //after// the rendering has been completed. Thus, you cannot load a library and //immediately// use it's functions within the same tiddler. However, once that tiddler has been loaded, the library functions can be freely used in any tiddler (even the one in which it was initially loaded).\n\nTo ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that will be rendered as soon as your TiddlyWiki document is opened. For example, you could put your {{{<script src="..."></script>}}} syntax into a tiddler called LoadScripts, and then add {{{<<tiddler LoadScripts>>}}} in your MainMenu tiddler.\n\nSince the MainMenu is always rendered immediately upon opening your document, the library will always be loaded before any other tiddlers that rely upon the functions it defines. Loading an external javascript library does not produce any direct output in the tiddler, so these definitions should have no impact on the appearance of your MainMenu.\n\n''Creating dynamic tiddler content''\nAn important difference between this implementation of embedded scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document:\n* In a typical web document, you use the document.write() function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.\n* However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and completely replaces the entire ~TiddlyWiki document in your browser window.\n* To allow these scripts to work unmodified, the plugin automatically converts all occurences of document.write() so that the output is inserted into the tiddler content instead of replacing the entire ~TiddlyWiki document.\n\nIf your script does not use document.write() to create dynamically embedded content within a tiddler, your javascript can, as an alternative, explicitly return a text value that the plugin can then pass through the wikify() rendering engine to insert into the tiddler display. For example, using {{{return "thistext"}}} will produce the same output as {{{document.write("thistext")}}}.\n\n//Note: your script code is automatically 'wrapped' inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler. To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.//\n\n''Accessing the ~TiddlyWiki DOM''\nThe plugin provides one pre-defined variable, 'place', that is passed in to your javascript code so that it can have direct access to the containing DOM element into which the tiddler output is currently being rendered.\n\nAccess to this DOM element allows you to create scripts that can:\n* vary their actions based upon the specific location in which they are embedded\n* access 'tiddler-relative' information (use findContainingTiddler(place))\n* perform direct DOM manipulations (when returning wikified text is not enough)\n<<<\n!!!!!Examples\n<<<\nan "alert" message box:\n><script show>\n alert('InlineJavascriptPlugin: this is a demonstration message');\n</script>\ndynamic output:\n><script show>\n return (new Date()).toString();\n</script>\nwikified dynamic output:\n><script show>\n return "link to current user: [["+config.options.txtUserName+"]]";\n</script>\ndynamic output using 'place' to get size information for current tiddler:\n><script show>\n if (!window.story) window.story=window;\n var title=story.findContainingTiddler(place).id.substr(7);\n return title+" is using "+store.getTiddlerText(title).length+" bytes";\n</script>\ncreating an 'onclick' button/link that runs a script:\n><script label="click here" show>\n if (!window.story) window.story=window;\n alert("Hello World!\snlinktext='"+place.firstChild.data+"'\sntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");\n</script>\nloading a script from a source url:\n>http://www.TiddlyTools.com/demo.js contains:\n>>{{{function demo() { alert('this output is from demo(), defined in demo.js') } }}}\n>>{{{alert('InlineJavascriptPlugin: demo.js has been loaded'); }}}\n><script src="demo.js" show>\n return "loading demo.js..."\n</script>\n><script label="click to execute demo() function" show>\n demo()\n</script>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''InlineJavascriptPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.10.16 [1.5.2]'' add newline before closing '}' in 'function out_' wrapper. Fixes error caused when last line of script is a comment.\n''2006.06.01 [1.5.1]'' when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly\n''2006.04.19 [1.5.0]'' added 'show' parameter to force display of javascript source code in tiddler output\n''2006.01.05 [1.4.0]'' added support 'onclick' scripts. When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked. 'place' value is set to match the clicked button/link element.\n''2005.12.13 [1.3.1]'' when catching eval error in IE, e.description contains the error text, instead of e.toString(). Fixed error reporting so IE shows the correct response text. Based on a suggestion by UdoBorkowski\n''2005.11.09 [1.3.0]'' for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content. Based on a suggestion by BradleyMeck\n''2005.11.08 [1.2.0]'' handle loading of javascript from an external URL via src="..." syntax\n''2005.11.08 [1.1.0]'' pass 'place' param into scripts to provide direct DOM access \n''2005.11.08 [1.0.0]'' initial release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.inlineJavascript= {major: 1, minor: 5, revision: 2, date: new Date(2006,10,16)};\n\nconfig.formatters.push( {\n name: "inlineJavascript",\n match: "\s\s<script",\n lookahead: "\s\s<script(?: src=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?(?: label=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?( show)?\s\s>((?:.|\s\sn)*?)\s\s</script\s\s>",\n\n handler: function(w) {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {\n if (lookaheadMatch[1]) { // load a script library\n // make script tag, set src, add to body to execute, then remove for cleanup\n var script = document.createElement("script"); script.src = lookaheadMatch[1];\n document.body.appendChild(script); document.body.removeChild(script);\n }\n if (lookaheadMatch[4]) { // there is script code\n if (lookaheadMatch[3]) // show inline script code in tiddler output\n wikify("{{{\sn"+lookaheadMatch[0]+"\sn}}}\sn",w.output);\n if (lookaheadMatch[2]) { // create a link to an 'onclick' script\n // add a link, define click handler, save code in link (pass 'place'), set link attributes\n var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",lookaheadMatch[2]);\n link.onclick=function(){try{return(eval(this.code))}catch(e){alert(e.description?e.description:e.toString())}}\n link.code="function _out(place){"+lookaheadMatch[4]+"\sn};_out(this);"\n link.setAttribute("href","javascript:;"); link.setAttribute("title",""); link.style.cursor="pointer";\n }\n else { // run inline script code\n var code="function _out(place){"+lookaheadMatch[4]+"\sn};_out(w.output);"\n code=code.replace(/document.write\s(/gi,'place.innerHTML+=(');\n try { var out = eval(code); } catch(e) { out = e.description?e.description:e.toString(); }\n if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);\n }\n }\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n} )\n//}}}\n
*Neven Jovanović, Zagreb\n*Bratislav Lučin, Split\n*Branko Jozić, Split\n*Nina Čengić, Zagreb\n*Ana Galjanić, Harvard / Zagreb
3. Izrada i objavljivanje računalno pretraživog korpusa, tj. baze podataka (s različitim mogućnostima pretraživanja, snimanja rezultata, kreiranja posebnih zbirki) Croatiae auctores Latini - CAuLa\n* Pošto se dosegne "kritična masa" (20 autora, barem 200.000 riječi; u drugoj godini projekta); traje paralelno s daljnjim unosom i označavanjem tekstova.\n* Korisničko sučelje baze podataka mora omogućiti sljedeće vrste pretraživanja: \n**a) po riječima (ili "stringovima"); \n**b) po autorima i naslovima; \n**c) po razdobljima (stoljećima); \n**d) po književnim vrstama (proza / poezija; ep, elegija, epigram itd; historiografija, govori, pisma, znanstvena djela itd); \n**e) po temama (teologija, povijest, prijateljska komunikacija, satira itd); \n**f) po imenima i ostalim referencijama (osobe, mjesta, ustanove, datumi)\n* Uključiti ''statističke podatke'' o čitavom korpusu.\n* U sljedećoj fazi (v. [[Usavršavanje]]) baza mora korisnicima maksimalno olakšati dugotrajan i intenzivan rad, dajući im mogućnosti:\n**da formiraju i bilježe vlastite zbirke tekstova u okviru baze, \n**da tekstovima dodaju vlastite oznake i bilješke (sukladno osobnim interesima i istraživanjima), \n**da, ako žele, imaju uvid u zbirke, oznake i bilješke drugih korisnika.\n
2. Označavanje (kodiranje) građe\n* Osnova projekta; traje tijekom čitavog projekta, prati unos tekstova.\n* Koristi se već postojeći, internacionalni TEI XML standard, otvoreni (nevlasnički) sustav označavanja elektronskih tekstova; ovaj standard jamči bazi postojanost, neovisnost o specifičnim računalnim programima, te, samim time, mogućnost razvoja i nadogradnje i na duži vremenski rok.\n* Redoslijed kodiranja:\n##"metapodaci" - bibliografski podaci o izvoru i provedenom kodiranju;\n##struktura teksta (knjige, dijelovi, poglavlja, stihovi, odjeljci);\n##tekstualne varijante (ako postoje; ovamo ulaze i priređivačke intervencije); \n##imena, tj. referencije svih vrsta.\n
Ante medium saeculum XIX. scriptores Croatici lingua Latina et Croatica paene ex aequo utebantur. Immo indagationes novae bibliographicae ostendunt viros doctos in his partibus plus libros Latinos quam Croaticos typis edidisse.\n\nCorpus scriptorum Croatiae Latinorum (CAuLa) textus Latinos Croatiae a Medio Aevo usque ad tempus novissimum scriptos colligit ut a quocumque legi et investigari possint. \n\nHic etiam nonnulla de [[auctoribus Croaticis|auctores]] qui Latine scripserant et de litteris Croatiae Latinis invenies. \n\nDum corpus hoc conteximus etiam de ratione litteras computatro indagandi cogitamus et colloquimur.
Leksikon hrvatskih pisaca, Školska knjiga, 2000
/%\n\nTIDDLER CONTENTS COPIED FROM: MainMenuFull\n\n%/{{menubox{{{fine{{{big{\n<script label="Intro">story.closeTiddler('Welcome');story.displayTiddler(null,'Welcome',1);return false;</script>\n[[Hrvatski]]\n[[English]]\n[[Latine]]\n[[Contact]]\n}}}@@display:block;{{normal{/%\n\nRECENT CHANGES: %/\n@@position:relative;+++^50em^[changes|recently changed tiddlers]...{{floatright{<<tiddler CloseSlider>> }}}changes\n----\n {{fine nowrap{//@@color:#999;as of <<date filedate "MMM DDth, YYYY 0hh:0mm:0ss">>@@//}}}\n {{small nowrap{<<tiddler ShowRecentChanges>>}}}===\n@@/%\n\nPLUGINS, STYLES, SCRIPTS, TEMPLATES, ATTACHMENTS: %/\n@@position:relative;+++^[plugins|installed plugins, scripts, macros, styles, templates, etc.]...{{floatright{<<tiddler CloseSlider>> }}}catalog\n----\n {{small nowrap{@@display:block;width:50em;<<tiddler ShowCatalog>>@@}}}<script>\n if ((version.major+version.minor/10)>=2.1)\n return "<html><hr></html>+++{{nowrap{[plugin manager...]}}}...{{borderleft{\sn@@display:block;height:20em;width:50em;overflow:auto;<<plugins>>@@@@display:block;text-align:right;^^scroll for more...^^@@}}}===";\n </script>===\n@@/%\n\nLEGAL STUFF: %/\n[[legal/pravno|LegalStatements]]<script>\n place.lastChild.className="button";\n</script>/%\n\nEXTRAS: %/\n\n}}}@@{{big{<script label="extras...">\n story.closeTiddler('SiteMenuExtras');story.displayTiddler(null,'SiteMenuExtras',1);return false;\n</script>}}}}}}}}}
{{menubox{{{fine{{{big{\n<script label="welcome">story.closeTiddler('Welcome');story.displayTiddler(null,'Welcome',1);return false;</script>\n[[about|About]]\n[[download|Download]]\n[[contact|Contact]]\n}}}@@display:block;{{normal{/%\n\nRECENT CHANGES: %/\n@@position:relative;+++^50em^[changes|recently changed tiddlers]...{{floatright{<<tiddler CloseSlider>> }}}changes\n----\n {{fine nowrap{//@@color:#999;as of <<date filedate "MMM DDth, YYYY 0hh:0mm:0ss">>@@//}}}\n {{small nowrap{<<tiddler ShowRecentChanges>>}}}===\n@@/%\n\nPLUGINS, STYLES, SCRIPTS, TEMPLATES, ATTACHMENTS: %/\n@@position:relative;+++^[plugins|installed plugins, scripts, macros, styles, templates, etc.]...{{floatright{<<tiddler CloseSlider>> }}}catalog\n----\n {{small nowrap{@@display:block;width:50em;<<tiddler ShowCatalog>>@@}}}<script>\n if ((version.major+version.minor/10)>=2.1)\n return "<html><hr></html>+++{{nowrap{[plugin manager...]}}}...{{borderleft{\sn@@display:block;height:20em;width:50em;overflow:auto;<<plugins>>@@@@display:block;text-align:right;^^scroll for more...^^@@}}}===";\n </script>===\n@@/%\n\nLEGAL STUFF: %/\n[[legal|LegalStatements]]<script>\n place.lastChild.className="button";\n</script>/%\n\nEXTRAS: %/\n\n}}}@@{{big{<script label="extras...">\n story.closeTiddler('SiteMenuExtras');story.displayTiddler(null,'SiteMenuExtras',1);return false;\n</script>}}}}}}}}}
{{menubox{{{fine{{{big{\n<script label="welcome">story.closeTiddler('Welcome');story.displayTiddler(null,'Welcome',1);return false;</script>\n[[about|About]]\n[[download|Download]]\n[[contact|Contact]]\n}}}@@display:block;{{normal{/%\n\nRECENT CHANGES: %/\n@@position:relative;+++^50em^[changes|recently changed tiddlers]...{{floatright{<<tiddler CloseSlider>> }}}changes\n----\n {{fine nowrap{//@@color:#999;as of <<date filedate "MMM DDth, YYYY 0hh:0mm:0ss">>@@//}}}\n {{small nowrap{<<tiddler ShowRecentChanges>>}}}===\n@@/%\n\nLEGAL STUFF: %/\n[[legal|LegalStatements]]<script>\n place.lastChild.className="button";\n</script>/%\n\nEXTRAS: %/\n\n}}}@@{{big{<script label="extras...">\n story.closeTiddler('SiteMenuExtras');story.displayTiddler(null,'SiteMenuExtras',1);return false;\n</script>}}}}}}}}}
{{menubox{{{fine{{{big{\n<script label="welcome">story.closeTiddler('Welcome');story.displayTiddler(null,'Welcome',1);return false;</script>\n[[about|About]]\n}}}@@display:block;{{normal{/%\n\nLEGAL STUFF: %/\n[[legal|LegalStatements]]<script>\n place.lastChild.className="button";\n</script>/%\n\nEXTRAS: %/\n\n}}}@@{{big{<script label="extras...">\n story.closeTiddler('SiteMenuExtras');story.displayTiddler(null,'SiteMenuExtras',1);return false;\n</script>}}}}}}}}}
<script>\n// tell InternetExplorer to use cached CSS background images (reduces server load)\n// based on a suggestion by Bob Denny posted to the TiddlyWikiDev GoogleGroups discussion:\n// http://groups.google.com/group/TiddlyWikiDev/msg/81797af532ed770f\ntry { document.execCommand("BackgroundImageCache", false, true); } catch(err) {;}\n</script>
/***\n|''Name:''|MoveablePanelPlugin|\n|''Source:''|http://www.TiddlyTools.com/#MoveablePanelPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nAdd move, size, max/restore mouse event handling and fold/unfold, hover/scroll, and close/dock toolbar command items to any floating panel or tiddler. (see NestedSlidersPlugin for floating panel syntax/usage).\n\n!!!!!Usage\n<<<\nsyntax: {{{<<moveablePanel>>}}}\n\nexample: //using NestedSlidersPlugin 'floating panel' syntax//\n//{{{\n+++^30em^[panel]<<moveablePanel>>this is a headline for the panel\n----\n this is a moveable floating panel\n with a few lines of text\n as an example for you to try...\n //note: this line is really long so you can see what happens to word wrapping when you re-size this panel//\n===\n//}}}\nTry it: +++^30em^[panel]<<moveablePanel>>this is a headline for the panel\n----\n this is a moveable floating panel\n with a few lines of text\n as an example for you to try...\n //note: this line is really long so you can see what happens to word wrapping when you re-size this panel//\n===\n\n\nWhen the mouse is just inside the edges of the tiddler/panel, the cursor will change to a "crossed-arrows" symbol, indicating that the panel is "moveable". Grab (click-hold) the panel anywhere in the edge area and then drag the mouse to reposition the panel.\n\nTo resize the panel, hold the ''shift'' key and then grab the panel: the cursor will change to a "double-arrow" symbol. Drag a side edge of the panel to stretch horizontally or vertically, or drag a corner of the panel to stretch in both dimensions at once.\n\nDouble-clicking anywhere in the edge area of a panel will 'maximize' it to fit the current browser window.\n\nWhen the mouse is anywhere over a panel (not just near the edge), a 'toolbar menu' appears in the ''upper right corner'', with the following command items:\n*fold/unfold: ''fold'' temporarily reduces the panel height to show just one line of text. ''unfold'' restores the panel height.\n*hover/scroll: when you scroll the browser window, the moveable panels scroll with it. ''hover'' lets you keep a panel in view, while the rest of the page content moves in the window. ''scroll'' restores the default scrolling behavior for the panel. //Note: Due to browser limitations, this feature is not currently available when using Internet Explorer (v6 or lower)... sorry.//\n*close: ''close'' hides a panel from the page display. If you have moved/resized a panel, closing it restores its default position and size.\n*dock: unlike a floating panel, a moveable //tiddler// does not "float" on the page until it has actually been moved from its default position. When moving a tiddler, the ''close'' command is replaced with ''dock'', which restores the tiddler to its default //non-floating// location on the page.\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''MoveablePanelPlugin'' (tagged with <<tag systemConfig>>)\nNote: for compatibility, please also install the current version of ''NestedSlidersPlugin''.\n<<<\n!!!!!Revision History\n<<<\n''2006.10.17 [1.3.4]'' when moving panel, adjust position for relative containing DIV\n''2006.05.25 [1.3.3]'' in closePanel(), use p.button.onclick() so that normal processing (updating slider button tooltip, access key, etc.) is performed\n''2006.05.11 [1.3.2]'' doc update\n''2006.05.11 [1.3.1]'' re-define all functions within moveablePanel object (eliminate global window.* function definitions (and some "leaky closures" in IE)\n''2006.05.11 [1.3.0]'' converted from inline javascript to true plugin\n''2006.05.09 [1.2.3]'' in closePanel(), set focus to sliderpanel button (if any)\n''2006.05.02 [1.2.2]'' in MoveOrSizePanel(), calculate adjustments for top and left when inside nested floating panels\n''2006.04.06 [1.2.1]'' in getPanel(), allow redefinition or bypass of "moveable" tag (changed from hard-coded "tearoff")\n''2006.03.29 [1.2.0]'' in getPanel(), require "tearoff" tag to enable floating tiddlers\n''2006.03.13 [1.1.0]'' added handling for floating tiddlers and conditional menu display\n''2006.03.06 [1.0.2]'' set move or resize cursor during mousetracking\n''2006.03.05 [1.0.1]'' use "window" vs "document.body" so mousetracking in FF doesn't drop the panel when moving too quickly\n''2006.03.04 [1.0.0]'' Initial public release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.moveablePanel= {major: 1, minor: 3, revision: 4, date: new Date(2006,10,17)};\n//}}}\n//{{{\nconfig.macros.moveablePanel= { \n handler:\n function(place,macroName,params) {\n var p=this.getPanel(place); if (!p) return;\n\n // remember original panel event handlers, size, location, border\n if (!p.saved) p.saved= {\n mouseover: p.onmouseover,\n mouseout: p.onmouseout,\n dblclick: p.ondblclick,\n top: p.style.top,\n left: p.style.left,\n width: p.style.width,\n height: p.style.height,\n position: p.style.position,\n border: p.style.border\n };\n\n // create control menu items\n var menupos=p.className=="floatingPanel"?"float:right;":"position:absolute;right:2em;top:3em;";\n var menustyle=p.className!="floatingPanel"?'style="border:1px solid #666;background:#ccc;color:#000;padding:0px .5em;"':"";\n var html='<div style="font-size:7pt;display:none;'+menupos+'">&nbsp;';\n if (p.className=="floatingPanel")\n html+='<a href="javascript:;" title="reduce panel size" '+menustyle\n +' onclick="return config.macros.moveablePanel.foldPanel(this,event)">fold</a>&nbsp; ';\n if (!config.browser.isIE)\n html+='<a href="javascript:;" title="keep panel in view when scrolling"'+menustyle\n +' onclick="return config.macros.moveablePanel.hoverPanel(this,event)">hover</a>&nbsp; ';\n if (p.className=="floatingPanel")\n html+='<a href="javascript:;" title="close panel and reset to default size and position"'+menustyle\n +' onclick="return config.macros.moveablePanel.closePanel(this,event)">close</a>';\n else\n html+='<a href="javascript:;" title="reset panel to default size and position"'+menustyle\n +' onclick="return config.macros.moveablePanel.closePanel(this,event)">dock</a>';\n html+='</div>';\n p.menudiv=createTiddlyElement(place,"span");\n p.menudiv.innerHTML=html;\n\n // init mouse handling and tooltip\n p.title="drag edge to move, shift key=stretch, double-click=max/restore";\n p.onmouseover=function(event) {\n if (this.className=="floatingPanel"||this.style.position=="absolute"||this.style.position=="fixed") {\n if (this.className!="floatingPanel") this.style.border="1px dotted #999"; // border around tiddler\n this.menudiv.firstChild.style.display="inline";\n }\n if (this.saved.mouseover) return this.saved.mouseover(event);\n };\n p.onmouseout=function(event) {\n this.menudiv.firstChild.style.display="none";\n if (this.className!="floatingPanel") this.style.border=this.saved.border;\n if (this.saved.mouseout) return this.saved.mouseout(event);\n };\n p.ondblclick=function(event) {\n if (!config.macros.moveablePanel.maximizePanel(this,event)) return false; // processed\n return this.saved.dblclick?this.saved.dblclick(event):true;\n };\n p.onmousemove=function(event) { return config.macros.moveablePanel.setCursorPanel(this,event); };\n p.onmousedown=function(event) { return config.macros.moveablePanel.moveOrSizePanel(this,event); };\n },\n\n getPanel:\n function(place) {\n var p=place; while (p && p.className!='floatingPanel') p=p.parentNode; if (p) return p; // floatingPanel\n p=story.findContainingTiddler(place); if (!p || !store.getTiddler(p.getAttribute("tiddler"))) return null; // not in a tiddler\n\n // moveable **tiddlers** in IE have LOTS of problems... DISABLED FOR NOW... but floating panels still work in IE\n if (config.browser.isIE) return null;\n\n // tiddlers tagged (e.g. with "moveable") to allow movement? use null or "" to bypass tag check\n var tag="moveable"; if (!tag || !tag.trim().length) return p;\n return (store.getTiddler(p.getAttribute("tiddler")).tags.find(tag)!=null)?p:null; // tiddler is tagged for moving\n },\n\n processed:\n function(event) {\n event.cancelBubble=true; if (event.stopPropagation) event.stopPropagation(); return false;\n },\n\n getClientWidth:\n function() {\n if(document.width!=undefined) return document.width;\n if(document.documentElement && document.documentElement.clientWidth) return document.documentElement.clientWidth;\n if(document.body && document.body.clientWidth) return document.body.clientWidth;\n if(window.innerWidth!=undefined) return window.innerWidth;\n return 100; // should never get here\n },\n\n closePanel:\n function(place,event) {\n if (!event) var event=window.event;\n var p=this.getPanel(place); if (!p) return true;\n if (p.hover) this.hoverPanel(p.hoverButton,event); \n if (p.folded) this.foldPanel(p.foldButton,event); \n p.maxed=false; \n p.style.top=p.saved.top;\n p.style.left=p.saved.left;\n p.style.width=p.saved.width;\n p.style.height=p.saved.height;\n p.style.position=p.saved.position;\n if (p.button) { p.button.focus(); onClickNestedSlider({target:p.button}); } // click on slider "button" (if any) to close the panel\n return this.processed(event);\n },\n\n foldPanel:\n function(place,event) {\n if (!event) var event=window.event;\n var p=this.getPanel(place); if (!p) return true;\n if (!p.foldButton) p.foldButton=place;\n if (p.folded) {\n p.style.height=p.folded_savedheight;\n p.style.overflow=p.folded_savedoverflow;\n } else {\n p.folded_savedheight=p.style.height; p.style.height="1em"; \n p.folded_savedoverflow=p.style.overflow; p.style.overflow="hidden";\n }\n p.folded=!p.folded;\n place.innerHTML=p.folded?"unfold":"fold";\n place.title=p.folded?"restore panel size":"reduce panel size";\n return this.processed(event);\n },\n\n hoverPanel:\n function(place,event) {\n if (config.browser.isIE) { return this.processed(event); } // 'fixed' position is not handled properly by IE :-(\n if (!event) var event=window.event;\n var p=this.getPanel(place); if (!p) return true;\n if (!p.hoverButton) p.hoverButton=place;\n if (p.hover)\n p.style.position=p.hover_savedposition;\n else\n { p.hover_savedposition=p.style.position; p.style.position="fixed"; }\n p.hover=!p.hover;\n place.innerHTML=p.hover?"scroll":"hover";\n place.title=p.hover?"make panel move with page when scrolling":"keep panel in view when scrolling page";\n return this.processed(event);\n },\n\n maximizePanel:\n function(place,event) {\n if (!event) var event=window.event;\n var p=this.getPanel(place); if (!p) return true;\n var left=findPosX(p); var top=findPosY(p);\n var width=p.offsetWidth; var height=p.offsetHeight;\n var x=!config.browser.isIE?event.pageX:event.clientX;\n var y=!config.browser.isIE?event.pageY:event.clientY;\n if (x<left||x>=left+width||y<top||y>=top+height) return true; // not inside panel, let mousedown bubble through\n var edgeWidth=10; var edgeHeight=10;\n var isTop=(y-top<edgeHeight);\n var isLeft=(x-left<edgeWidth);\n var isBottom=(top+height-y<edgeHeight);\n var isRight=(left+width-x<edgeWidth);\n if (!(isTop||isLeft||isBottom||isRight))\n return true; // not near an edge... let double click bubble through\n if (p.folded) this.foldPanel(p.foldButton,event); // unfold panel first (if needed)\n if (p.maxed) {\n p.style.top=p.max_savedtop;\n p.style.left=p.max_savedleft;\n p.style.width=p.max_savedwidth;\n p.style.height=p.max_savedheight;\n p.style.position=p.max_savedposition;\n } else {\n p.max_savedwidth=p.style.width;\n p.max_savedheight=p.style.height;\n p.max_savedtop=p.style.top;\n p.max_savedleft=p.style.left;\n p.max_savedposition=p.style.position;\n // IE gets the percentage stretch wrong if floating panel is inside a table\n p.style.width=config.browser.isIE?(getClientWidth()*0.95+"px"):"95%";\n p.style.height="95%";\n p.style.top=p.style.left='1em';\n p.style.position="absolute";\n }\n p.maxed=!p.maxed;\n return this.processed(event);\n },\n\n setCursorPanel:\n function(place,event) {\n if (!event) var event=window.event;\n var p=this.getPanel(place); if (!p) return true;\n var left=findPosX(p); var top=findPosY(p);\n var width=p.offsetWidth; var height=p.offsetHeight;\n var x=!config.browser.isIE?event.pageX:event.clientX;\n var y=!config.browser.isIE?event.pageY:event.clientY;\n if (x<left||x>=left+width||y<top||y>=top+height) return true; // not inside panel, let mousedown bubble through\n var edgeWidth=10; var edgeHeight=10;\n var isTop=(y-top<edgeHeight);\n var isLeft=(x-left<edgeWidth);\n var isBottom=(top+height-y<edgeHeight);\n var isRight=(left+width-x<edgeWidth);\n if (!(isTop||isLeft||isBottom||isRight))\n { p.style.cursor="auto"; if (!p.savedtitle) p.savedtitle=p.title; p.title=""; }\n else {\n p.style.cursor=!event.shiftKey?"move":((isTop?'n':(isBottom?'s':''))+(isLeft?'w':(isRight?'e':''))+'-resize');\n if (p.savedtitle) p.title=p.savedtitle;\n }\n return true; // let mouseover event bubble through\n },\n\n moveOrSizePanel:\n function(place,event) {\n if (!event) var event=window.event;\n var p=this.getPanel(place); if (!p) return true;\n var left=findPosX(p); var top=findPosY(p);\n var width=p.offsetWidth; var height=p.offsetHeight;\n var x=!config.browser.isIE?event.pageX:event.clientX;\n var y=!config.browser.isIE?event.pageY:event.clientY;\n if (x<left||x>=left+width||y<top||y>=top+height) return true; // not inside panel, let mousedown bubble through\n var edgeWidth=10; var edgeHeight=10;\n var isTop=(y-top<edgeHeight);\n var isLeft=(x-left<edgeWidth);\n var isBottom=(top+height-y<edgeHeight);\n var isRight=(left+width-x<edgeWidth);\n if (!(isTop||isLeft||isBottom||isRight)) return true; // not near an edge... let mousedown bubble through\n \n // when resizing, change cursor to show directional (NSEW) "drag arrows"\n var sizing=event.shiftKey; // remember this for use during mousemove tracking\n if (sizing) p.style.cursor=((isTop?'n':(isBottom?'s':''))+(isLeft?'w':(isRight?'e':''))+'-resize');\n \n var adjustLeft=0; var adjustTop=0;\n var pp=p.parentNode; while (pp && pp.style.position!='relative') pp=parent.parentNode;\n if (pp) { adjustLeft+=findPosX(pp); adjustTop+=findPosY(pp); }\n var pp=p.parentNode; while (pp && pp.className!="floatingPanel") pp=pp.parentNode;\n if (pp) { adjustLeft+=findPosX(pp); adjustTop+=findPosY(pp); }\n \n // start tracking mousemove events\n config.macros.moveablePanel.activepanel=p;\n var target=p; // if 'capture' handling not supported, track within panel only\n if (document.body.setCapture) { document.body.setCapture(); var target=document.body; } // IE\n if (window.captureEvents) { window.captureEvents(Event.MouseMove|Event.MouseUp,true); var target=window; } // moz\n if (target.onmousemove!=undefined) target.saved_mousemove=target.onmousemove;\n target.onmousemove=function(e){\n if (!e) var e=window.event;\n var p=config.macros.moveablePanel.activepanel;\n if (!p) { this.onmousemove=this.saved_mousemove?this.saved_mousemove:null; return; }\n \n // PROBLEM: p.offsetWidth and p.offsetHeight do not seem to account for padding or borders\n // WORKAROUND: subtract padding and border (in px) when calculating new panel width and height\n // TBD: get these values from p.style... convert to px as needed.\n var paddingWidth=10.6667; var paddingHeight=10.6667;\n var borderWidth=1; var borderHeight=1;\n var adjustWidth=-(paddingWidth*2+borderWidth*2);\n var adjustHeight=-(paddingHeight*2+borderHeight*2);\n \n if (p.style.position!="absolute") { // convert relative DIV to movable absolute DIV\n p.style.position="absolute";\n p.style.left=left+"px"; p.style.top=top+"px";\n p.style.width=(width+adjustWidth)+"px"; p.style.top=(height+adjustHeight)+"px";\n }\n var newX=!config.browser.isIE?e.pageX:e.clientX;\n var newY=!config.browser.isIE?e.pageY:e.clientY;\n if (sizing) { // resize panel\n // don't let panel get smaller than edge "grab" zones\n var minWidth=edgeWidth*2-adjustWidth;\n var minHeight=edgeHeight*2-adjustHeight;\n p.maxed=false; // make sure panel is not maximized\n if (p.folded) this.foldPanel(p.foldButton,e); // make sure panel is unfolded\n if (isBottom) var newHeight=height+newY-y+1;\n if (isTop) var newHeight=height-newY+y+1;\n if (isLeft) var newWidth=width-newX+x+1;\n if (isRight) var newWidth=width+newX-x+1;\n if (isLeft||isRight) p.style.width=(newWidth>minWidth?newWidth:minWidth)+adjustWidth+"px";\n if (isLeft) p.style.left=left-adjustLeft+newX-x+1+"px";\n if (isTop||isBottom) p.style.height=(newHeight>minHeight?newHeight:minHeight)+adjustHeight+"px";\n if (isTop) p.style.top=top-adjustTop+newY-y+1+"px";\n } else { // move panel\n p.style.top=top-adjustTop+newY-y+1+"px";\n p.style.left=left-adjustLeft+newX-x+1+"px";\n }\n var status=sizing?("size: "+p.style.width+","+p.style.height):("pos: "+p.style.left+","+p.style.top);\n window.status=status.replace(/(\s.[0-9]+)|px/g,""); // remove decimals and "px"\n return config.macros.moveablePanel.processed(e);\n };\n \n // stop tracking mousemove events\n if (target.onmouseup!=undefined) target.saved_mouseup=target.onmouseup;\n target.onmouseup=function(e){\n if (!e) var e=window.event;\n if (this.releaseCapture) this.releaseCapture(); // IE\n if (this.releaseEvents) this.releaseEvents(Event.MouseMove|Event.MouseUp); // moz\n this.onmousemove=this.saved_mousemove?this.saved_mousemove:null;\n this.onmouseup=this.saved_mouseup?this.saved_mouseup:null;\n config.macros.moveablePanel.activepanel=null;\n window.status="";\n return config.macros.moveablePanel.processed(e);\n };\n return this.processed(event); // mousedown handled\n }\n};\n//}}}
/***\n|''Name:''|NestedSlidersPlugin|\n|''Source:''|http://www.TiddlyTools.com/#NestedSlidersPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nQuickly make any tiddler content into an expandable 'slider' panel, without needing to create a separate tiddler to contain the slider content. Optional syntax allows ''default to open'', ''custom button label/tooltip'' and ''automatic blockquote formatting.''\n\nYou can also 'nest' these sliders as deep as you like (see complex nesting example below), so that expandable 'tree-like' hierarchical displays can be created. This is most useful when converting existing in-line text content to create in-line annotations, footnotes, context-sensitive help, or other subordinate information displays.\n\nFor more details, please click on a section headline below:\n++++!!!!![Configuration]>\nDebugging messages for 'lazy sliders' deferred rendering:\n<<option chkDebugLazySliderDefer>> show debugging alert when deferring slider rendering\n<<option chkDebugLazySliderRender>> show debugging alert when deferred slider is actually rendered\n===\n++++!!!!![Usage]>\nWhen installed, this plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content. Use {{{+++}}} and {{{===}}} to delimit the slider content. Additional optional syntax elements let you specify\n*default to open\n*cookiename\n*heading level\n*floater (with optional CSS width value)\n*mouse auto rollover\n*custom class/label/tooltip/accesskey\n*automatic blockquote\n*deferred rendering\nThe complete syntax, using all options, is:\n//{{{\n++++(cookiename)!!!!!^width^*{{class{[label=key|tooltip]}}}>...\ncontent goes here\n===\n//}}}\nwhere:\n* {{{+++}}} (or {{{++++}}}) and {{{===}}}^^\nmarks the start and end of the slider definition, respectively. When the extra {{{+}}} is used, the slider will be open when initially displayed.^^\n* {{{(cookiename)}}}^^\nsaves the slider opened/closed state, and restores this state whenever the slider is re-rendered.^^\n* {{{!}}} through {{{!!!!!}}}^^\ndisplays the slider label using a formatted headline (Hn) style instead of a button/link style^^\n* {{{^width^}}} (or just {{{^}}})^^\nmakes the slider 'float' on top of other content rather than shifting that content downward. 'width' must be a valid CSS value (e.g., "30em", "180px", "50%", etc.). If omitted, the default width is "auto" (i.e., fit to content)^^\n* {{{*}}}^^\nautomatically opens/closes slider on "rollover" as well as when clicked^^\n* {{{{{class{[label=key|tooltip]}}}}}}^^\nuses custom label/tooltip/accesskey. {{{{{class{...}}}}}}, {{{=key}}} and {{{|tooltip}}} are optional. 'class' is any valid CSS class name, used to style the slider label text. 'key' must be a ''single letter only''. Default labels/tootips are: ">" (more) and "<" (less), with no default access key assignment.^^\n* {{{">"}}} //(without the quotes)//^^\nautomatically adds blockquote formatting to slider content^^\n* {{{"..."}}} //(without the quotes)//^^\ndefers rendering of closed sliders until the first time they are opened. //Note: deferred rendering may produce unexpected results in some cases. Use with care.//^^\n\n//Note: to make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the {{{+++}}} 'start slider' or preceding the {{{===}}} 'end slider' sequence are automatically supressed so that excess whitespace is eliminated from the output.//\n===\n++++!!!!![Examples]>\nsimple in-line slider: \n{{{\n+++\n content\n===\n}}}\n+++\n content\n===\n----\nuse a custom label and tooltip: \n{{{\n+++[label|tooltip]\n content\n===\n}}}\n+++[label|tooltip]\n content\n===\n----\ncontent automatically blockquoted: \n{{{\n+++>\n content\n===\n}}}\n+++>\n content\n===\n----\nall options combined //(default open, cookie, heading, sized floater, rollover, class, label/tooltip/key, blockquoted, deferred)//\n{{{\n++++(testcookie)!!!^30em^*{{big{[label=Z|click or press Alt-Z to open]}}}>...\n content\n===\n}}}\n++++(testcookie)!!!^30em^*{{big{[label=Z|click or press Alt-Z to open]}}}>...\n content\n===\n----\ncomplex nesting example:\n{{{\n+++^[get info...=I|click for information or press Alt-I]\n put some general information here, plus a floating slider with more specific info:\n +++^10em^[view details...|click for details]\n put some detail here, which could include a rollover with a +++^25em^*[glossary definition]explaining technical terms===\n ===\n===\n}}}\n+++^[get info...=I|click for information or press Alt-I]\n put some general information here, plus a floating slider with more specific info:\n +++^10em^[view details...|click for details]\n put some detail here, which could include a rollover with a +++^25em^*[glossary definition]explaining technical terms===\n ===\n===\n===\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''NestedSlidersPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.07.28 - 2.0.0'' added custom class syntax around label/tip/key syntax: {{{{{classname{[label=key|tip]}}}}}}\n''2006.07.25 - 1.9.3'' when parsing slider, save default open/closed state in button element, then in onClickNestedSlider(), if slider state matches saved default, instead of saving cookie, delete it. Significantly reduces the 'cookie overhead' when default slider states are used.\n''2006.06.29 - 1.9.2'' in onClickNestedSlider(), when setting focus to first control, skip over type="hidden"\n''2006.06.22 - 1.9.1'' added panel.defaultPanelWidth to save requested panel width, even after resizing has changed the style value\n''2006.05.11 - 1.9.0'' added optional '^width^' syntax for floating sliders and '=key' syntax for setting an access key on a slider label\n''2006.05.09 - 1.8.0'' in onClickNestedSlider(), when showing panel, set focus to first child input/textarea/select element\n''2006.04.24 - 1.7.8'' in adjustSliderPos(), if floating panel is contained inside another floating panel, subtract offset of containing panel to find correct position\n''2006.02.16 - 1.7.7'' corrected deferred rendering to account for use-case where show/hide state is tracked in a cookie\n''2006.02.15 - 1.7.6'' in adjustSliderPos(), ensure that floating panel is positioned completely within the browser window (i.e., does not go beyond the right edge of the browser window)\n''2006.02.04 - 1.7.5'' add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals\n''2006.01.18 - 1.7.4'' only define adjustSliderPos() function if it has not already been provided by another plugin. This lets other plugins 'hijack' the function even when they are loaded first.\n''2006.01.16 - 1.7.3'' added adjustSliderPos(place,btn,panel,panelClass) function to permit specialized logic for placement of floating panels. While it provides improved placement for many uses of floating panels, it exhibits a relative offset positioning error when used within *nested* floating panels. Short-term workaround is to only adjust the position for 'top-level' floaters.\n''2006.01.16 - 1.7.2'' added button property to slider panel elements so that slider panel can tell which button it belongs to. Also, re-activated and corrected animation handling so that nested sliders aren't clipped by hijacking Slider.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends\n''2006.01.14 - 1.7.1'' added optional "^" syntax for floating panels. Defines new CSS class, ".floatingPanel", as an alternative for standard in-line ".sliderPanel" styles.\n''2006.01.14 - 1.7.0'' added optional "*" syntax for rollover handling to show/hide slider without requiring a click (Based on a suggestion by tw4efl)\n''2006.01.03 - 1.6.2'' When using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element. (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)\n''2005.12.15 - 1.6.1'' added optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders\nremoved checkbox option for 'global' application of lazy sliders\n''2005.11.25 - 1.6.0'' added optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)\n''2005.11.21 - 1.5.1'' revised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability. Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.\n''2005.11.20 - 1.5.0'' added (cookiename) syntax for optional tracking and restoring of slider open/close state\n''2005.11.11 - 1.4.0'' added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style\n''2005.11.07 - 1.3.0'' removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other\nformatting extensions) and simplified/improved regular expressions to trim multiple excess newlines\n''2005.11.05 - 1.2.1'' changed name to NestedSlidersPlugin\nmore documentation\n''2005.11.04 - 1.2.0'' added alternative character-mode syntax {{{(((}}} and {{{)))}}}\ntweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax\n''2005.11.03 - 1.1.1'' fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used\ncode cleanup, added documentation\n''2005.11.03 - 1.1.0'' changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}\nchanged name to EasySlidersPlugin\n''2005.11.03 - 1.0.0'' initial public release\n<<<\n!!!!!Credits\n<<<\nThis feature was implemented by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]] with initial research and suggestions from RodneyGomes, GeoffSlocock, and PaulPetterson.\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.nestedSliders = {major: 2, minor: 0, revision: 0, date: new Date(2006,7,28)};\n//}}}\n\n//{{{\n// options for deferred rendering of sliders that are not initially displayed\nif (config.options.chkDebugLazySliderDefer==undefined) config.options.chkDebugLazySliderDefer=false;\nif (config.options.chkDebugLazySliderRender==undefined) config.options.chkDebugLazySliderRender=false;\n\n// default styles for 'floating' class\nsetStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \s\n background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");\n//}}}\n\n//{{{\nconfig.formatters.push( {\n name: "nestedSliders",\n match: "\s\sn?\s\s+{3}",\n terminator: "\s\ss*\s\s={3}\s\sn?",\n lookahead: "\s\sn?\s\s+{3}(\s\s+)?(\s\s([^\s\s)]*\s\s))?(\s\s!*)?(\s\s^(?:[^\s\s^\s\s*\s\s[\s\s>]*\s\s^)?)?(\s\s*)?(?:\s\s{\s\s{([\s\sw]+[\s\ss\s\sw]*)\s\s{)?(\s\s[[^\s\s]]*\s\s])?(?:\s\s}{3})?(\s\s>)?(\s\s.\s\s.\s\s.)?\s\ss*",\n handler: function(w)\n {\n // defopen=lookaheadMatch[1]\n // cookiename=lookaheadMatch[2]\n // header=lookaheadMatch[3]\n // panelwidth=lookaheadMatch[4]\n // rollover=lookaheadMatch[5]\n // class=lookaheadMatch[6]\n // label=lookaheadMatch[7]\n // blockquote=lookaheadMatch[8]\n // deferred=lookaheadMatch[9]\n\n lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n // location for rendering button and panel\n var place=w.output;\n\n // default to closed, no cookie, no accesskey\n var show="none"; var title=">"; var tooltip="show"; var cookie=""; var key="";\n\n // extra "+", default to open\n if (lookaheadMatch[1])\n { show="block"; title="<"; tooltip="hide"; }\n\n // cookie, use saved open/closed state\n if (lookaheadMatch[2]) {\n cookie=lookaheadMatch[2].trim().slice(1,-1);\n cookie="chkSlider"+cookie;\n if (config.options[cookie]==undefined)\n { config.options[cookie] = (show=="block") }\n if (config.options[cookie])\n { show="block"; title="<"; tooltip="hide"; }\n else\n { show="none"; title=">"; tooltip="show"; }\n }\n\n // parse custom label/tooltip/accesskey: [label=X|tooltip]\n if (lookaheadMatch[7]) {\n title = lookaheadMatch[7].trim().slice(1,-1);\n var pos=title.indexOf("|");\n if (pos!=-1) { tooltip = title.substr(pos+1,title.length); title=title.substr(0,pos); }\n if (title.substr(title.length-2,1)=="=") { key=title.substr(title.length-1,1); title=title.slice(0,-2); }\n if (pos==-1) tooltip += " "+title; // default tooltip: "show/hide <title>"\n }\n\n // create the button\n if (lookaheadMatch[3]) { // use "Hn" header format instead of button/link\n var lvl=(lookaheadMatch[3].length>6)?6:lookaheadMatch[3].length;\n var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,lookaheadMatch[6],title);\n btn.onclick=onClickNestedSlider;\n btn.setAttribute("href","javascript:;");\n btn.setAttribute("title",tooltip);\n }\n else\n var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,lookaheadMatch[6]);\n\n // set extra button attributes\n btn.sliderCookie = cookie; // save the cookiename (if any) in the button object\n btn.defOpen=lookaheadMatch[1]!=null; // save default open/closed state (boolean)\n btn.keyparam=key; // save the access key letter ("" if none)\n if (key.length) {\n btn.setAttribute("accessKey",key); // init access key\n btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus\n }\n\n // "non-click" MouseOver open/close slider\n if (lookaheadMatch[5]) btn.onmouseover=onClickNestedSlider;\n\n // create slider panel\n var panelClass=lookaheadMatch[4]?"floatingPanel":"sliderPanel";\n var panel=createTiddlyElement(place,"div",null,panelClass,null);\n panel.button = btn; // so the slider panel know which button it belongs to\n panel.defaultPanelWidth=(lookaheadMatch[4] && lookaheadMatch[4].length>2)?lookaheadMatch[4].slice(1,-1):""; // save requested panel size\n btn.sliderPanel=panel;\n panel.style.display = show;\n panel.style.width=panel.defaultPanelWidth;\n\n // render slider (or defer until shown) \n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n if ((show=="block")||!lookaheadMatch[9]) {\n // render now if panel is supposed to be shown or NOT deferred rendering\n w.subWikify(lookaheadMatch[8]?createTiddlyElement(panel,"blockquote"):panel,this.terminator);\n // align slider/floater position with button\n adjustSliderPos(place,btn,panel,panelClass);\n }\n else {\n var src = w.source.substr(w.nextMatch);\n var endpos=findMatchingDelimiter(src,"+++","===");\n panel.setAttribute("raw",src.substr(0,endpos));\n panel.setAttribute("blockquote",lookaheadMatch[8]?"true":"false");\n panel.setAttribute("rendered","false");\n w.nextMatch += endpos+3;\n if (w.source.substr(w.nextMatch,1)=="\sn") w.nextMatch++;\n if (config.options.chkDebugLazySliderDefer) alert("deferred '"+title+"':\sn\sn"+panel.getAttribute("raw"));\n }\n }\n }\n }\n)\n\n// TBD: ignore 'quoted' delimiters (e.g., "{{{+++foo===}}}" isn't really a slider)\nfunction findMatchingDelimiter(src,starttext,endtext) {\n var startpos = 0;\n var endpos = src.indexOf(endtext);\n // check for nested delimiters\n while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {\n // count number of nested 'starts'\n var startcount=0;\n var temp = src.substring(startpos,endpos-1);\n var pos=temp.indexOf(starttext);\n while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }\n // set up to check for additional 'starts' after adjusting endpos\n startpos=endpos+endtext.length;\n // find endpos for corresponding number of matching 'ends'\n while (startcount && endpos!=-1) {\n endpos = src.indexOf(endtext,endpos+endtext.length);\n startcount--;\n }\n }\n return (endpos==-1)?src.length:endpos;\n}\n//}}}\n\n//{{{\nwindow.onClickNestedSlider=function(e)\n{\n if (!e) var e = window.event;\n var theTarget = resolveTarget(e);\n var theLabel = theTarget.firstChild.data;\n var theSlider = theTarget.sliderPanel\n var isOpen = theSlider.style.display!="none";\n // if using default button labels, toggle labels\n if (theLabel==">") theTarget.firstChild.data = "<";\n else if (theLabel=="<") theTarget.firstChild.data = ">";\n // if using default tooltips, toggle tooltips\n if (theTarget.getAttribute("title")=="show")\n theTarget.setAttribute("title","hide");\n else if (theTarget.getAttribute("title")=="hide")\n theTarget.setAttribute("title","show");\n if (theTarget.getAttribute("title")=="show "+theLabel)\n theTarget.setAttribute("title","hide "+theLabel);\n else if (theTarget.getAttribute("title")=="hide "+theLabel)\n theTarget.setAttribute("title","show "+theLabel);\n // deferred rendering (if needed)\n if (theSlider.getAttribute("rendered")=="false") {\n if (config.options.chkDebugLazySliderRender)\n alert("rendering '"+theLabel+"':\sn\sn"+theSlider.getAttribute("raw"));\n var place=theSlider;\n if (theSlider.getAttribute("blockquote")=="true")\n place=createTiddlyElement(place,"blockquote");\n wikify(theSlider.getAttribute("raw"),place);\n theSlider.setAttribute("rendered","true");\n }\n // show/hide the slider\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));\n else\n theSlider.style.display = isOpen ? "none" : "block";\n // reset to default width (might have been changed via plugin code)\n theSlider.style.width=theSlider.defaultPanelWidth;\n // align slider/floater position with target button\n if (!isOpen) adjustSliderPos(theSlider.parentNode,theTarget,theSlider,theSlider.className);\n // if showing panel, set focus to first 'focus-able' element in panel\n if (theSlider.style.display!="none") {\n var ctrls=theSlider.getElementsByTagName("*");\n for (var c=0; c<ctrls.length; c++) {\n var t=ctrls[c].tagName.toLowerCase();\n if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")\n { ctrls[c].focus(); break; }\n }\n }\n if (this.sliderCookie && this.sliderCookie.length) {\n config.options[this.sliderCookie]=!isOpen;\n if (config.options[this.sliderCookie]!=this.defOpen)\n saveOptionCookie(this.sliderCookie);\n else { // remove cookie if slider is in default display state\n var ex=new Date(); ex.setTime(ex.getTime()-1000);\n document.cookie = this.sliderCookie+"=novalue; path=/; expires="+ex.toGMTString();\n }\n }\n return false;\n}\n\n// hijack animation handler 'stop' handler so overflow is visible after animation has completed\nSlider.prototype.coreStop = Slider.prototype.stop;\nSlider.prototype.stop = function() { this.coreStop(); this.element.style.overflow = "visible"; }\n\n// adjust panel position based on button position\nif (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel,panelClass) {\n if (panelClass=="floatingPanel") {\n var left=0;\n var top=btn.offsetHeight; \n if (place.style.position!="relative") {\n var left=findPosX(btn);\n var top=findPosY(btn)+btn.offsetHeight;\n var p=place; while (p && p.className!='floatingPanel') p=p.parentNode;\n if (p) { left-=findPosX(p); top-=findPosY(p); }\n }\n if (left+panel.offsetWidth > getWindowWidth()) left=getWindowWidth()-panel.offsetWidth-10;\n panel.style.left=left+"px"; panel.style.top=top+"px";\n }\n}\n\nfunction getWindowWidth() {\n if(document.width!=undefined)\n return document.width; // moz (FF)\n if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )\n return document.documentElement.clientWidth; // IE6\n if(document.body && ( document.body.clientWidth || document.body.clientHeight ) )\n return document.body.clientWidth; // IE4\n if(window.innerWidth!=undefined)\n return window.innerWidth; // IE - general\n return 0; // unknown\n}\n//}}}
{{borderleft{\n{{fine{__select a document type__}}}\n<<newDocument "label:TiddlyWiki blank" ask NOTIDDLER>>\n&nbsp; <<newDocument "label:with Import/Export" ask importexport>>\n<<newDocument "label:TiddlyTools starter" ask includeNew>>\n&nbsp; <<newDocument "label:with Themes" ask includeNew ThemePackage>>\n&nbsp; <<newDocument "label:with MediaCenter" ask includeNew MediaPackage>>\n&nbsp; <<newDocument "label:with TidIDE" ask includeNew TidIDEPackage>>\n{{bordertop{\n@@display:block;<<newDocument "label:custom..." ask ask>> //(match tags)//@@}}}}}}
/***\n|''Name:''|NewDocumentPlugin|\n|''Source:''|http://www.TiddlyTools.com/#NewDocumentPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nQuickly create new TiddlyWiki documents from your existing document, with just one click! Use the {{{<<newDocument>>}}} macro to place a "new document" link into your sidebar/mainmenu/any tiddler (wherever you like). Select this command to automatically create a "new.html" document containing a specific set of tagged tiddlers. Optional parameters let you specify an alternate path/filename for the new file, or different tags to match. You can also indicate "ask" for either parameter, which will trigger a prompt for input when the command is selected.\n\n!!!!!Usage\n<<<\n{{{<<newDocument label:text filename tag tag tag...>>}}}\n{{{<<newDocument label:text filename all>>}}}\n{{{<<newDocument label:text filename snap ID>>}}}\n where:\n* ''label:text'' defines //optional// alternative link text (replaces default "new document" display)\n* ''filename'' is any local path-and-filename. If no parameters are provided, the default is to create the file "new.html" in the current directory. If a filename is provided without a path (i.e., there is no "/" in the input), then the current directory is also assumed. Otherwise, this parameter is expected to contain the complete path and filename needed to write the file to your local hard disk. If ''ask'' is used in place of the filename parameter then, when the command link is selected, a message box will be automatically displayed so you can select/enter the path and filename.\n* ''tag tag tag...'' is a list of one or more space-separated tags (use quotes or {{{[[]]}}} around tags that contain spaces). The new document will include all tiddlers that match at least one of the tags in the list. The default is to include tiddlers tagged with <<tag includeNew>>. The special value ''all'' may be used to match every tiddler (even those without tags). If ''ask'' is used in place of the tags then, when the command link is selected, a message box will be automatically displayed so you can enter the desired tags at that time.\n* When you use the keyword ''snap'' in place of the tags, you can generate a file containing the //rendered// CSS-and-HTML that is currently being displayed in browser. By default, the snapshop uses the 'contentWrapper' DOM element ID to automatically include all the TiddlyWiki elements, such as the sidebars and header, in addition to the center 'story' column containing the tiddler content.\n* You can limit the snapshot to capture only a portion of the rendered TiddlyWiki elements by specifiying an optional alternate DOM element ID, such as "displayArea" (the entire center 'story' column) or even just a single tiddler (e.g., "tidderMyTiddlerTitle", assuming that "MyTiddlerTitle" is currently displayed). Only the portions of the document that are contained //within// the specified DOM element will be transcribed to the resulting snapshot file. If ''ask'' is used in place of a DOM element ID, you will be prompted to enter the ID (default is "contentWrapper") when the snapshot is being taken. This allows you to easily enter the ID of any currently displayed tiddler to make quick snapshots of specific tiddlers.\n\nNote: as of version 1.4.0 of this plugin, support for selecting tiddlers by using tag *expressions* has been replaced with simpler, more efficient "containsAny()" logic. To create new ~TiddlyWiki documents that contain only those tiddlers selected with advanced AND/OR/NOT Boolean expressions, you can use the filtering features provided by the ExportTiddlersPlugin (see www.TiddlyTools.com/#ExportTiddlersPlugin).\n<<<\n!!!!!Examples:\n<<<\n{{{<<newDocument>>}}}\nequivalent to {{{<<newDocument new.htm includeNew systemTiddlers>>}}}\ncreates default "new.html" containing tiddlers tagged with either<<tag includeNew>>or<<tag systemTiddlers>>\ntry it: <<newDocument>>\n\n{{{<<newDocument empty.html systemTiddlers>>}}}\ncreates "empty.html" containing only tiddlers tagged with<<tag systemTiddlers>>\n//(reproduces old-style (pre 2.0.2) empty file)//\ntry it: <<newDocument empty.html systemTiddlers>>\n\n{{{<<newDocument "label:create Import/Export starter" ask importexport>>}}}\nsave importexport tiddlers to a new file, prompts for path/file\ntry it: <<newDocument "label:create Import/Export starter" ask importexport>>\n\n{{{<<newDocument ask ask>>}}}\nprompts for path/file, prompts for tags to match\ntry it: <<newDocument ask ask>>\n\n{{{<<newDocument ask all>>}}}\nsave all current TiddlyWiki contents to a new file, prompts for path/file\ntry it: <<newDocument ask all>>\n\n{{{<<newDocument ask snap>>}}}\ngenerates snapshot of currently displayed document, prompts for path/file\ntry it: <<newDocument ask snap>>\n\n{{{<<newDocument ask snap tiddlerNewDocumentPlugin>>}}}\ngenerates snapshot of this tiddler ONLY, prompts for path/file\ntry it: <<newDocument ask snap tiddlerNewDocumentPlugin>>\n\n<<<\n!!!!!Installation\n<<<\nImport (or copy/paste) the following tiddlers into your document:\n''NewDocumentPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.10.23 [1.5.1]'' in onClickNewDocument(), get saved parameter value for snapID instead of using default "contentWrapper" (oops!)\n''2006.10.18 [1.5.0]'' new optional param for 'snap'... specify alternative DOM element ID (default is still "contentWrapper"). Based on a suggestion from Xavier Verges.\n''2006.08.03 [1.4.3]'' in promptForFilename(), for IE (WinXP only), added handling for UserAccounts.CommonDialog\n''2006.07.29 [1.4.2]'' in onClickNewDocument(), okmsg display is now linked to newly created file\n''2006.07.24 [1.4.1]'' in promptForFilename(), check for nsIFilePicker.returnCancel to allow nsIFilePicker.returnOK **OR** nsIFilePicker.returnReplace to be processed.\n''2006.05.23 [1.4.0]'' due to very poor performance, support for tag *expressions* has been removed, in favor of a simpler "containsAny()" scan for tags.\n''2006.04.09 [1.3.6]'' in onClickNewDocument, added call to convertUnicodeToUTF8() to better handle international characters.\n''2006.03.15 [1.3.5]'' added nsIFilePicker() handler for selecting filename in moz-based browsers. IE and other non-moz browsers still use simple prompt() dialog\n''2006.03.15 [1.3.0]'' added "label:text" param for custom link text. added special "all" filter parameter for "save as..." handling (writes all tiddlers to output file)\n''2006.03.09 [1.2.0]'' added special "snap" filter parameter to generate and write "snapshot" files containing static HTML+CSS for currently rendered document.\n''2006.02.24 [1.1.2]'' Fix incompatiblity with TW 2.0.5 by removing custom definition of getLocalPath() (which is now part of TW core)\n''2006.02.03 [1.1.1]'' concatentate 'extra' params so that tag expressions don't have to be quoted. moved all text to 'formatted' string definitions for easier translation.\n''2006.02.03 [1.1.0]'' added support for tag EXPRESSIONS. plus improved documentation and code cleanup\n''2006.02.03 [1.0.0]'' Created.\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.newDocument = {major: 1, minor: 5, revision: 1, date: new Date(2006,10,23)};\n\nconfig.macros.newDocument = {\n newlabel: "new document",\n newprompt: "Create a new TiddlyWiki 'starter' document",\n newdefault: "new.html",\n allparam: "all",\n saveaslabel: "save as...",\n saveasprompt: "Save current TiddlyWiki to a different file",\n snapparam: "snap",\n snaplabel: "create a snapshot",\n snapprompt: "Create a 'snapshot' of the current TiddlyWiki display",\n snapdefault: "snapshot.html",\n snapID: "contentWrapper",\n snapIDprompt: "Please enter a DOM element ID for the desired content",\n snapIDerrmsg: "Unrecognized document element ID: '%0'",\n askparam: "ask",\n labelparam: "label:",\n fileprompt: "Please enter a filename",\n filter: "includeNew",\n filterprompt: "Match one or more tags:\sn(space-separated, use [[...]] around tags containing spaces)",\n filtererrmsg: "Error in tag filter '%0'",\n snapmsg: "Document snapshot written to %1",\n okmsg: "%0 tiddlers written to %1",\n failmsg: "An error occurred while creating %0"\n};\n\nconfig.macros.newDocument.handler = function(place,macroName,params) {\n\n var path=getLocalPath(document.location.href);\n var slashpos=path.lastIndexOf("/"); if (slashpos==-1) slashpos=path.lastIndexOf("\s\s"); \n if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash\n\n if (params[0] && params[0].substr(0,config.macros.newDocument.labelparam.length)==config.macros.newDocument.labelparam)\n var label=params.shift().substr(config.macros.newDocument.labelparam.length)\n var filename=params.shift(); if (!filename) filename=config.macros.newDocument.newdefault;\n if (params[0]==config.macros.newDocument.snapparam) {\n params.shift();\n if (!label) var label=config.macros.newDocument.snaplabel;\n var prompt=config.macros.newDocument.snapprompt;\n var defaultfile=config.macros.newDocument.snapdefault;\n var snapID=config.macros.newDocument.snapID;// default to "contentWrapper"\n if (params[0]) var snapID=params.shift(); // alternate DOM element for snapshot\n }\n if (params[0]==config.macros.newDocument.allparam) {\n if (!label) var label=config.macros.newDocument.saveaslabel;\n var prompt=config.macros.newDocument.saveasprompt;\n var defaultfile=getLocalPath(document.location.href);\n var slashpos=defaultfile.lastIndexOf("/"); if (slashpos==-1) slashpos=defaultfile.lastIndexOf("\s\s");\n if (slashpos!=-1) defaultfile=defaultfile.substr(slashpos+1); // get filename only\n }\n if (!prompt) var prompt=config.macros.newDocument.newprompt;\n if (!label) var label=config.macros.newDocument.newlabel;\n if (!defaultfile) var defaultfile=config.macros.newDocument.newdefault;\n\n var btn=createTiddlyButton(place,label,prompt,onClickNewDocument);\n btn.path=path;\n btn.file=filename;\n btn.defaultfile=defaultfile;\n btn.snapID=snapID; // NULL unless snapshot is being taken\n btn.filter=params.length?params:[config.macros.newDocument.filter]; \n}\n\n// IE needs explicit global scoping for functions called by browser events\nwindow.onClickNewDocument=function(e)\n{\n if (!e) var e = window.event; var btn=resolveTarget(e);\n\n // assemble document content, write file, report result\n var okmsg=config.macros.newDocument.okmsg;\n var failmsg=config.macros.newDocument.failmsg;\n var count=0;\n var out="";\n if (btn.snapID) { // HTML+CSS snapshot\n var snapID=btn.snapID;\n if (btn.snapID==config.macros.newDocument.askparam)\n snapID=prompt(config.macros.newDocument.snapIDprompt,config.macros.newDocument.snapID);\n if (!document.getElementById(snapID)) { // if specified element does not exist\n if (snapID) // ID=null if prompt was cancelled by user\n displayMessage(config.macros.newDocument.snapIDerrmsg.format([snapID]));\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); return(false);\n }\n var styles=document.getElementsByTagName("style");\n out+="<html>\sn<head>\sn<style>\sn";\n for(var i=0; i < styles.length; i++)\n out +="/* stylesheet from tiddler:"+styles[i].getAttribute("id")+" */\sn"+styles[i].innerHTML+"\sn\sn";\n out+="</style>\sn</head>\sn<body>\sn\sn"+document.getElementById(snapID).innerHTML+"\sn\sn</body>\sn</html>";\n okmsg=config.macros.newDocument.snapmsg;\n } else { // TW starter document\n // get the TiddlyWiki core code source\n var sourcefile=getLocalPath(document.location.href);\n var source=loadFile(sourcefile);\n if(source==null) { alert(config.messages.cantSaveError); return null; }\n var posOpeningDiv=source.indexOf(startSaveArea);\n var posClosingDiv=source.lastIndexOf(endSaveArea);\n if((posOpeningDiv==-1)||(posClosingDiv==-1)) { alert(config.messages.invalidFileError.format([sourcefile])); return; }\n // get the matching tiddler divs\n var match=btn.filter;\n if (match[0]==config.macros.newDocument.askparam) {\n var newfilt=prompt(config.macros.newDocument.filterprompt,config.macros.newDocument.filter);\n if (!newfilt) return; // cancelled by user\n match=newfilt.readMacroParams();\n }\n var storeAreaDivs=[];\n var tiddlers=store.getTiddlers('title');\n for (var i=0; i<tiddlers.length; i++)\n if (match[0]==config.macros.newDocument.allparam || (tiddlers[i].tags && tiddlers[i].tags.containsAny(match)) )\n storeAreaDivs.push(tiddlers[i].saveToDiv());\n out+=source.substr(0,posOpeningDiv+startSaveArea.length);\n out+=convertUnicodeToUTF8(storeAreaDivs.join("\sn"))+"\sn\st\st";\n out+=source.substr(posClosingDiv);\n count=storeAreaDivs.length;\n }\n // get output path/filename\n var filename=btn.file;\n if (filename==config.macros.newDocument.askparam)\n filename=promptForFilename(config.macros.newDocument.fileprompt,btn.path,btn.defaultfile);\n if (!filename) return; // cancelled by user\n // if specified file does not include a path, assemble fully qualified path and filename\n var slashpos=filename.lastIndexOf("/"); if (slashpos==-1) slashpos=filename.lastIndexOf("\s\s");\n if (slashpos==-1) filename=btn.path+filename;\n var ok=saveFile(filename,out);\n var msg=ok?okmsg.format([count,filename]):failmsg.format([filename]);\n var link=ok?"file:///"+filename.replace(regexpBackSlash,'/'):""; // change local path to link text\n clearMessage(); displayMessage(msg,link);\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); return(false);\n}\n//}}}\n\n//{{{\nfunction promptForFilename(msg,path,file)\n{\n if(window.Components) { // moz\n try {\n netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');\n var nsIFilePicker = window.Components.interfaces.nsIFilePicker;\n var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);\n picker.init(window, msg, nsIFilePicker.modeSave);\n var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);\n thispath.initWithPath(path);\n picker.displayDirectory=thispath;\n picker.defaultExtension='html';\n picker.defaultString=file;\n picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);\n if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;\n }\n catch(e) { alert('error during local file access: '+e.toString()) }\n }\n else { // IE\n try { // XP only\n var s = new ActiveXObject('UserAccounts.CommonDialog');\n s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|';\n s.FilterIndex=3; // default to HTML files;\n s.InitialDir=path;\n s.FileName=file;\n if (s.showOpen()) var result=s.FileName;\n }\n catch(e) { var result=prompt(msg,path+file); } // fallback for non-XP IE\n }\n return result;\n}\n//}}}
DigitalizacijaHrvatskihLatinista znanstveni je projekt koji se izvodi na Odsjeku za klasičnu filologiju Filozofskog fakulteta Sveučilišta u Zagrebu. Projekt je dio istraživačkog programa Mediaevalia et Neolatina Croatica.\n\nProjekt financira Ministarstvo znanosti, obrazovanja i sporta Republike Hrvatske.\n\nProjekt je počeo s radom 2007. godine.\n\nNa projektu rade NevenJovanović (voditelj) i [[suradnici|PopisSuradnika]].\n
4. Objavljivanje baze podataka na internetu\n* Čim bude dovršen prototip baze podataka i sučelja (krajem druge godine projekta).\n* Uključuje praćenje rada korisnika (U koje svrhe koriste bazu? Što pretražuju? Koliko se lako snalaze?) radi usavršavanja sučelja.\n* Baza je dinamična, tj. nova se građa uključuje kako bude dovršeno njezino digitaliziranje.\n
<div class='header'>\n<span id='siteTitle' class='siteTitle' refresh='content' tiddler='SiteTitle'></span>\n<span id='siteSubtitle' class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div id='siteMenu' class='siteMenu' refresh='content' tiddler='SiteMenu'></div>\n<div id='breadCrumbs' class='breadCrumbs'></div>\n<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>\n<div id='sidebar'>\n<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\n<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n<div id='displayArea'>\n<div id='messageArea'></div>\n<div id='storyMenu' class='storyMenu' refresh='content' force='true' tiddler='StoryMenu'></div>\n<div id='tiddlerDisplay'></div>\n</div>\n<span style='display:none' macro='tiddler SiteStartup'></span>
[[StyleSheetAdjustments]]\n/* ==== Plain ==== */\n.menubox { background-color:#fff; }\n
Digitalizacija hrvatskih latinista jest prevođenje njihovih tekstova u računalno čitljiv i mrežno dostupan format - bazu podataka, odnosno korpus Croatiae auctores Latini (CAuLa). \n\nIzrada i prostor CAuLa korpusa omogućit će prvenstveno ''objedinjavanje'' građe vezane uz [[hrvatske književnike koji su pisali na latinskom|HrvatskiLatinisti]].\n\nDigitalni će korpus olakšati i proširiti ''pristup'' toj građi. \n\nIstovremeno, povećat će mogućnost ''očuvanja i iskoristivosti'' građe &mdash; kako sada, tako i u budućnosti. \n\n
7. Predstavljanje i evaluacija rezultata\n* Tijekom čitavog projekta, a intenzivno u završnoj godini i nakon toga.\n* Upozoriti znanstvenu javnost (domaću i inozemnu) na postojanje baze.\n* Poticati korištenje baze i prikupljati podatke o korištenju.\n* Predstaviti podatke o korištenju baze u različitim fazama njezina razvoja.\n* Brižljivo dokumentirati postupke u svim fazama rada; učiniti dokumentaciju javno dostupnom.\n* Promišljati razlike ovakvog rada u odnosu na pripremu i objavljivanje građe tiskom, razlike ovakvih istraživanja u odnosu na istraživanja tiskom objavljene građe.
Private and local initiatives: cf. again the example of Marko Marulić, whose Opera omnia, now in its is 15th volume, is being published by the Splitski književni krug &mdash; legally, a citizen's organization based in Split, Croatia.
The workspace and forum eventually brought about by the CAuLa, made globally accessible, will provide tools and medium for further insights into this segment of Croatian and European literature, culture, and intelectual history. \n\nThe experience gained from building the CAuLA (amply documented and shared) will remain available to other digitized heritage collections &mdash; both Croatian and Latin, textual and otherwise.\n
<script label="randomize">\n var sheets=["Plain","Blackout","Edge of Night","Let's Get Tanked!","Textures","Woodshop"];\n var which=Math.floor(Math.random()*sheets.length);\n while (sheets[which]==config.options.txtStyleSheet)\n which=Math.floor(Math.random()*sheets.length);\n displayMessage("SelectRandomTheme: "+sheets[which]);\n config.macros.selectStylesheet.set(sheets[which],true);\n</script><script>\n place.lastChild.title="select a stylesheet at random...";\n</script>
1. Računalni unos tekstova i druge građe (OCR, skeniranje, prijepis, korekture)\n* Osnova projekta; traje tijekom čitavog projekta.\n* Unose se već objavljeni tekstovi, ali i oni nastali na drugim projektima programa, kao i oni koje prikupe, otkriju i prirede sami suradnici na projektu.\n* Svaki tekst mora, prije početka označavanja, radi provjere točnosti proći barem jednu korekturu koju izvode dvije osobe (jedna čita prijepis, druga kontrolira izvornik).\n* Ovo je ključna točka projekta; količina pribavljenog teksta ovisit će o raspoloživim financijskim sredstvima.\n
/***\n|''Name:''|RearrangeTiddlersPlugin|\n|''Source:''|http://www.TiddlyTools.com/#RearrangeTiddlersPlugin|\n|''Author:''|Joe Raii|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nadapted from: http://www.cs.utexas.edu/~joeraii/dragn/#Draggable\nchanges by ELS:\n* hijack refreshTiddler() instead of overridding createTiddler()\n* find title element by className instead of elementID\n* set cursor style via code instead of stylesheet\n* set tooltip help text\n* set tiddler "position:relative" when starting drag event, restore saved value when drag ends\n* update 2006.08.07: use getElementsByTagName("*") to find title element, even when it is 'buried' deep in tiddler DOM elements (due to custom template usage)\n\n***/\n//{{{\n\nStory.prototype.rearrangeTiddlersHijack_refreshTiddler = Story.prototype.refreshTiddler;\nStory.prototype.refreshTiddler = function(title,template,unused1,unused2,unused3,unused4,unused5)\n{\n this.rearrangeTiddlersHijack_refreshTiddler(title,template,unused1,unused2,unused3,unused4,unused5);\n var theTiddler = document.getElementById(this.idPrefix + title); if (!theTiddler) return;\n var theHandle;\n var children=theTiddler.getElementsByTagName("*");\n for (var i=0; i<children.length; i++) if (hasClass(children[i],"title")) { theHandle=children[i]; break; }\n if (!theHandle) return theTiddler;\n\n Drag.init(theHandle, theTiddler, 0, 0, null, null);\n theHandle.style.cursor="move";\n theHandle.title="drag title to re-arrange tiddlers"\n theTiddler.onDrag = function(x,y,myElem) {\n if (this.style.position!="relative")\n { this.savedstyle=this.style.position; this.style.position="relative"; }\n y = myElem.offsetTop;\n var next = myElem.nextSibling;\n var prev = myElem.previousSibling;\n if (next && y + myElem.offsetHeight > next.offsetTop + next.offsetHeight/2) { \n myElem.parentNode.removeChild(myElem);\n next.parentNode.insertBefore(myElem, next.nextSibling);//elems[pos+1]);\n myElem.style["top"] = -next.offsetHeight/2+"px";\n }\n if (prev && y < prev.offsetTop + prev.offsetHeight/2) { \n myElem.parentNode.removeChild(myElem);\n prev.parentNode.insertBefore(myElem, prev);\n myElem.style["top"] = prev.offsetHeight/2+"px";\n }\n };\n theTiddler.onDragEnd = function(x,y,myElem) {\n myElem.style["top"] = "0px";\n if (this.savedstyle!=undefined)\n this.style.position=this.savedstyle;\n }\n return theTiddler;\n}\n\n/**************************************************\n * dom-drag.js\n * 09.25.2001\n * www.youngpup.net\n **************************************************\n * 10.28.2001 - fixed minor bug where events\n * sometimes fired off the handle, not the root.\n **************************************************/\n\nvar Drag = {\n obj:null,\n\n init:\n function(o, oRoot, minX, maxX, minY, maxY) {\n o.onmousedown = Drag.start;\n o.root = oRoot && oRoot != null ? oRoot : o ;\n if (isNaN(parseInt(o.root.style.left))) o.root.style.left="0px";\n if (isNaN(parseInt(o.root.style.top))) o.root.style.top="0px";\n o.minX = typeof minX != 'undefined' ? minX : null;\n o.minY = typeof minY != 'undefined' ? minY : null;\n o.maxX = typeof maxX != 'undefined' ? maxX : null;\n o.maxY = typeof maxY != 'undefined' ? maxY : null;\n o.root.onDragStart = new Function();\n o.root.onDragEnd = new Function();\n o.root.onDrag = new Function();\n },\n\n start:\n function(e) {\n var o = Drag.obj = this;\n e = Drag.fixE(e);\n var y = parseInt(o.root.style.top);\n var x = parseInt(o.root.style.left);\n o.root.onDragStart(x, y, Drag.obj.root);\n o.lastMouseX = e.clientX;\n o.lastMouseY = e.clientY;\n if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;\n if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;\n if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;\n if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;\n document.onmousemove = Drag.drag;\n document.onmouseup = Drag.end;\n Drag.obj.root.style["z-index"] = "10";\n return false;\n },\n\n drag:\n function(e) {\n e = Drag.fixE(e);\n var o = Drag.obj;\n var ey = e.clientY;\n var ex = e.clientX;\n var y = parseInt(o.root.style.top);\n var x = parseInt(o.root.style.left);\n var nx, ny;\n if (o.minX != null) ex = Math.max(ex, o.minMouseX);\n if (o.maxX != null) ex = Math.min(ex, o.maxMouseX);\n if (o.minY != null) ey = Math.max(ey, o.minMouseY);\n if (o.maxY != null) ey = Math.min(ey, o.maxMouseY);\n nx = x + (ex - o.lastMouseX);\n ny = y + (ey - o.lastMouseY);\n Drag.obj.root.style["left"] = nx + "px";\n Drag.obj.root.style["top"] = ny + "px";\n Drag.obj.lastMouseX = ex;\n Drag.obj.lastMouseY = ey;\n Drag.obj.root.onDrag(nx, ny, Drag.obj.root);\n return false;\n },\n\n end:\n function() {\n document.onmousemove = null;\n document.onmouseup = null;\n Drag.obj.root.style["z-index"] = "0";\n Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style["left"]), parseInt(Drag.obj.root.style["top"]), Drag.obj.root);\n Drag.obj = null;\n },\n\n fixE:\n function(e) {\n if (typeof e == 'undefined') e = window.event;\n if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;\n if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;\n return e;\n }\n};\n//}}}\n
/%\n\nUsage: <<tiddler ScrollBox with: TiddlerName height>>\n\n%/@@display:block;height:$2;overflow:auto;<<tiddler $1>>@@@@display:block;text-align:right;^^scroll for more...^^@@
/***\n|''Name:''|SearchOptionsPlugin|\n|''Source:''|http://www.TiddlyTools.com/#SearchOptionsPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nThe TiddlyWiki search function normally looks in both tiddler titles and tiddler body content ('text'). However, narrowing the search so that it examines only titles or only text, or expanding the search to include text contained in tiddler tags can be very helpful, especially when searching on common words or phrases. In addition, it is often useful for the search results to show tiddlers with matching titles before tiddlers that contain matching text or tags.\n\n!!!!!Usage\n<<<\nThis plugin adds checkboxes (see below and in AdvancedOptions) to let you selectively configure the TiddlyWiki search function to just examine any combination of tiddler titles, text, or tags. It also provides an option to switch the search results order between 'titles mixed in' (default) and 'titles shown first', as well as an option display the search results as a list of links (in an auto-generated "SearchResults" tiddler), rather than actually displaying all matching tiddlers. You can also enable/disable the "incremental search" (key-by-key searching), so that a search is only initiated when you press the ENTER key or click on the "search:" prompt text.\n<<<\n!!!!!Configuration\n<<<\nIn additional to the checkboxes in AdvancedOptions, a self-contained control panel is included here for your convenience:\n<<option chkSearchTitles>> Search tiddler titles\n<<option chkSearchText>> Search tiddler text\n<<option chkSearchTags>> Search in tiddler tags\n<<option chkSearchFields>> Search in tiddler data fields\n<<option chkSearchShadows>> Search shadow tiddlers\n<<option chkSearchTitlesFirst>> Show title matches first\n<<option chkSearchList>> Show list of matching tiddlers\n<<option chkSearchIncremental>> Incremental searching\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''SearchOptionsPlugin'' (tagged with <<tag systemConfig>>)\n^^documentation and javascript for SearchOptionsPlugin handling^^\n\nWhen installed, this plugin automatically adds checkboxes in the AdvancedOptions shadow tiddler so you can enable/disable the extended search behavior. However, if you have customized your AdvancedOptions, you will need to manually add {{{<<option chkSearchTitles>>}}}, {{{<<option chkSearchText>>}}} and {{{<<option chkSearchTitlesFirst>>}}} (with suitable prompt text) to your customized tiddler.\n<<<\n!!!!!Revision History\n<<<\n''2006.10.10 [2.4.0]'' added support for "search in tiddler data" (tiddler.fields) Default is to search extended data.\n''2006.04.06 [2.3.0]'' added support for "search in shadow tiddlers". Default is *not* to search in the shadows (i.e.standard TW behavior). Note: if a shadow tiddler has a 'real' counterpart, only the real tiddler is searched, since the shadow is inaccessible for viewing/editing.\n''2006.02.03 [2.2.1]'' rewrite timeout clearing code and blank search text handling to match 2.0.4 core release changes. note that core no longer permits "blank=all" searches, so neither does this plugin. To search for all, use "." with text patterns enabled.\n''2006.02.02 [2.2.0]'' in search.handler(), KeyHandler() function clears 'left over' timeout when search input is < 3 chars. Prevents searching on shorter text when shortened by rapid backspaces (<500msec)\n''2006.02.01 [2.1.9]'' in Story.prototype.search(), correct inverted logic for using/not using regular expressions when searching\nalso, blank search text now presents "No search text. Continue anyway?" confirm() message box, so search on blank can still be processed if desired by user.\n''2006.02.01 [2.1.8]'' in doSearch(), added alert/return if search text is blank\n''2006.01.20 [2.1.7]'' fixed setting of config.macros.search.reportTitle so that Tweaks can override it.\n''2006.01.19 [2.1.6]'' improved SearchResults formatting, added a "search again" form to the report (based on a suggestion from MorrisGray)\ndefine results report title using config.macros.search.reportTitle instead of hard-coding the tiddler title\n''2006.01.18 [2.1.5]'' Created separate functions for reportSearchResults(text,matches) and discardSearchResults(), so that other developers can create alternative report generators.\n''2006.01.17 [2.1.4]'' Use regExp.search() instead of regExp.test() to scan for matches. Correctd the problem where only half the matching tiddlers (the odd-numbered ones) were being reported.\n''2006.01.15 [2.1.3]'' Added information (date/time, username, search options used) to SearchResults output\n''2006.01.10 [2.1.2]'' use displayTiddlers() to render matched tiddlers. This lets you display multiple matching tiddlers, even if SinglePageModePlugin is enabled.\n''2006.01.08 [2.1.1]'' corrected invalid variable reference, "txt.value" to "text" in story.search()\n''2006.01.08 [2.1.0]'' re-write to match new store.search(), store.search.handler() and story.search() functions.\n''2005.12.30 [2.0.0]'' Upgraded to TW2.0\nwhen rendering SearchResults tiddler, closeTiddler() first to ensure display is refreshed.\n''2005.12.26 [1.4.0]'' added option to search for matching text in tiddler tags\n''2005.12.21 [1.3.7]'' use \s\s to 'escape' single quotes in tiddler titles when generating "Open all matching tiddlers" link. Also, added access key: "O", to trigger "open all" link.\nBased on a suggestion by UdoBorkowski.\n''2005.12.18 [1.3.6]'' call displayMessage() AFTER showing matching tiddlers so message is not cleared too soon\n''2005.12.17 [1.3.5]'' if no matches found, just display message and delete any existing SearchResults tiddler.\n''2005.12.17 [1.3.4]'' use {/%%/{/%%/{ and }/%%/}/%%/} to 'escape' display text in SearchResults tiddler to ensure that formatting contained in search string is not rendered \nBased on a suggestion by UdoBorkowski.\n''2005.12.14 [1.3.3]'' tag SearchResults tiddler with 'excludeSearch' so it won't list itself in subsequent searches\nBased on a suggestion by UdoBorkowski.\n''2005.12.14 [1.3.2]'' added "open all matching tiddlers..." link to search results output.\nBased on a suggestion by UdoBorkowski.\n''2005.12.10 [1.3.1]'' added "discard search results" link to end of search list tiddler output for quick self-removal of 'SearchResults' tiddler.\n''2005.12.01 [1.3.0]'' added chkSearchIncremental to enable/disable 'incremental' searching (i.e., search after each keystroke) (default is ENABLED).\nadded handling for Enter key so it can be used to start a search.\nBased on a suggestion by LyallPearce\n''2005.11.25 [1.2.1]'' renamed from SearchTitleOrTextPlugin to SearchOptionsPlugin\n''2005.11.25 [1.2.0]'' added chkSearchList option\nBased on a suggestion by RodneyGomes\n''2005.10.19 [1.1.0]'' added chkSearchTitlesFirst option.\nBased on a suggestion by ChristianHauck\n''2005.10.18 [1.0.0]'' Initial Release\nBased on a suggestion by LyallPearce.\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.SearchTitleOrText = {major: 2, minor: 4, revision: 0, date: new Date(2006,10,12)};\n//}}}\n\n//{{{\nif (config.options.chkSearchTitles==undefined) config.options.chkSearchTitles=true;\nif (config.options.chkSearchText==undefined) config.options.chkSearchText=true;\nif (config.options.chkSearchTags==undefined) config.options.chkSearchTags=true;\nif (config.options.chkSearchFields==undefined) config.options.chkSearchFields=true;\nif (config.options.chkSearchTitlesFirst==undefined) config.options.chkSearchTitlesFirst=false;\nif (config.options.chkSearchList==undefined) config.options.chkSearchList=false;\nif (config.options.chkSearchIncremental==undefined) config.options.chkSearchIncremental=true;\nif (config.options.chkSearchShadows==undefined) config.options.chkSearchShadows=false;\n\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSearchTitles>> Search in tiddler titles";\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSearchText>> Search in tiddler text";\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSearchTags>> Search in tiddler tags";\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSearchFields>> Search in tiddler data fields";\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSearchShadows>> Search in shadow tiddlers";\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSearchTitlesFirst>> Search results show title matches first";\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSearchList>> Search results show list of matching tiddlers";\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSearchIncremental>> Incremental searching";\n//}}}\n\n//{{{\nif (config.macros.search.reportTitle==undefined)\n config.macros.search.reportTitle="SearchResults";\n//}}}\n\n//{{{\nconfig.macros.search.handler = function(place,macroName,params)\n{\n var lastSearchText = "";\n var searchTimeout = null;\n var doSearch = function(txt)\n {\n if (txt.value.length>0)\n {\n story.search(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);\n lastSearchText = txt.value;\n }\n };\n var clickHandler = function(e)\n {\n doSearch(this.nextSibling);\n return false;\n };\n var keyHandler = function(e)\n {\n if (!e) var e = window.event;\n switch(e.keyCode)\n {\n case 13: // ELS: handle enter key\n doSearch(this);\n break;\n case 27:\n this.value = "";\n clearMessage();\n break;\n }\n if (config.options.chkSearchIncremental)\n {\n if(this.value.length > 2)\n {\n if(this.value != lastSearchText)\n {\n if(searchTimeout) clearTimeout(searchTimeout);\n var txt = this;\n searchTimeout = setTimeout(function() {doSearch(txt);},500);\n }\n }\n else\n if(searchTimeout) clearTimeout(searchTimeout);\n }\n };\n var focusHandler = function(e)\n {\n this.select();\n };\n var btn = createTiddlyButton(place,this.label,this.prompt,clickHandler);\n var txt = createTiddlyElement(place,"input",null,null,null);\n if(params[0])\n txt.value = params[0];\n txt.onkeyup = keyHandler;\n txt.onfocus = focusHandler;\n txt.setAttribute("size",this.sizeTextbox);\n txt.setAttribute("accessKey",this.accessKey);\n txt.setAttribute("autocomplete","off");\n if(config.browser.isSafari)\n {\n txt.setAttribute("type","search");\n txt.setAttribute("results","5");\n }\n else\n txt.setAttribute("type","text");\n}\n//}}}\n\n//{{{\nStory.prototype.search = function(text,useCaseSensitive,useRegExp)\n{\n highlightHack = new RegExp(useRegExp ? text : text.escapeRegExp(),useCaseSensitive ? "mg" : "img");\n var matches = store.search(highlightHack,"title","excludeSearch");\n var q = useRegExp ? "/" : "'";\n clearMessage();\n if (!matches.length) {\n if (config.options.chkSearchList) discardSearchResults();\n displayMessage(config.macros.search.failureMsg.format([q+text+q]));\n } else {\n if (config.options.chkSearchList) \n reportSearchResults(text,matches);\n else {\n var titles = []; for(var t=0; t<matches.length; t++) titles.push(matches[t].title);\n this.closeAllTiddlers(); story.displayTiddlers(null,titles);\n displayMessage(config.macros.search.successMsg.format([matches.length, q+text+q]));\n }\n }\n highlightHack = null;\n}\n//}}}\n\n//{{{\nTiddlyWiki.prototype.search = function(searchRegExp,sortField,excludeTag)\n{\n var candidates = this.reverseLookup("tags",excludeTag,false,sortField);\n\n // scan for matching titles first...\n var results = [];\n if (config.options.chkSearchTitles) {\n for(var t=0; t<candidates.length; t++)\n if(candidates[t].title.search(searchRegExp)!=-1)\n results.push(candidates[t]);\n if (config.options.chkSearchShadows)\n for (var t in config.shadowTiddlers)\n if ((t.search(searchRegExp)!=-1) && !store.tiddlerExists(t))\n results.push((new Tiddler()).assign(t,config.shadowTiddlers[t]));\n }\n // then scan for matching text, tags, or field data\n for(var t=0; t<candidates.length; t++) {\n if (config.options.chkSearchText && candidates[t].text.search(searchRegExp)!=-1)\n results.pushUnique(candidates[t]);\n if (config.options.chkSearchTags && candidates[t].tags.join(" ").search(searchRegExp)!=-1)\n results.pushUnique(candidates[t]);\n if (config.options.chkSearchFields && store.forEachField!=undefined) // requires TW2.1 or above\n store.forEachField(candidates[t],\n function(tid,field,val) { if (val.search(searchRegExp)!=-1) results.pushUnique(candidates[t]); },\n true); // extended fields only\n }\n // then check for matching text in shadows\n if (config.options.chkSearchShadows)\n for (var t in config.shadowTiddlers)\n if ((config.shadowTiddlers[t].search(searchRegExp)!=-1) && !store.tiddlerExists(t))\n results.pushUnique((new Tiddler()).assign(t,config.shadowTiddlers[t]));\n\n // if not 'titles first', re-sort results to so titles, text, tag and field matches are mixed together\n if(!sortField) sortField = "title";\n var bySortField=function (a,b) {if(a[sortField] == b[sortField]) return(0); else return (a[sortField] < b[sortField]) ? -1 : +1; }\n if (!config.options.chkSearchTitlesFirst) results.sort(bySortField);\n\n return results;\n}\n//}}}\n\n// // ''REPORT GENERATOR''\n//{{{\nif (!window.reportSearchResults) window.reportSearchResults=function(text,matches)\n{\n var title=config.macros.search.reportTitle\n var q = config.options.chkRegExpSearch ? "/" : "'";\n var body="\sn";\n\n // summary: nn tiddlers found matching '...', options used\n body+="''"+config.macros.search.successMsg.format([matches.length,q+"{{{"+text+"}}}"+q])+"''\sn";\n body+="^^//searched in:// ";\n body+=(config.options.chkSearchTitles?"''titles'' ":"");\n body+=(config.options.chkSearchText?"''text'' ":"");\n body+=(config.options.chkSearchTags?"''tags'' ":"");\n body+=(config.options.chkSearchFields?"''fields'' ":"");\n body+=(config.options.chkSearchShadows?"''shadows'' ":"");\n if (config.options.chkCaseSensitiveSearch||config.options.chkRegExpSearch) {\n body+=" //with options:// ";\n body+=(config.options.chkCaseSensitiveSearch?"''case sensitive'' ":"");\n body+=(config.options.chkRegExpSearch?"''text patterns'' ":"");\n }\n body+="^^";\n\n // numbered list of links to matching tiddlers\n body+="\sn<<<";\n for(var t=0;t<matches.length;t++) body+="\sn# [["+matches[t].title+"]]";\n body+="\sn<<<\sn";\n\n // open all matches button\n body+="<html><input type=\s"button\s" href=\s"javascript:;\s" ";\n body+="onclick=\s"story.displayTiddlers(null,["\n for(var t=0;t<matches.length;t++)\n body+="'"+matches[t].title.replace(/\s'/mg,"\s\s'")+"'"+((t<matches.length-1)?", ":"");\n body+="],1);\s" ";\n body+="accesskey=\s"O\s" ";\n body+="value=\s"open all matching tiddlers\s"></html> ";\n\n // discard search results button\n body+="<html><input type=\s"button\s" href=\s"javascript:;\s" ";\n body+="onclick=\s"story.closeTiddler('"+title+"'); store.deleteTiddler('"+title+"'); store.notify('"+title+"',true);\s" ";\n body+="value=\s"discard "+title+"\s"></html>";\n\n // search again\n body+="\sn\sn----\sn";\n body+="<<search \s""+text+"\s">> ";\n body+="<<option chkSearchTitles>>titles ";\n body+="<<option chkSearchText>>text ";\n body+="<<option chkSearchTags>>tags";\n body+="<<option chkSearchFields>>fields";\n body+="<<option chkSearchShadows>>shadows";\n body+="<<option chkCaseSensitiveSearch>>case-sensitive ";\n body+="<<option chkRegExpSearch>>text patterns";\n\n // create/update the tiddler\n var tiddler=store.getTiddler(title); if (!tiddler) tiddler=new Tiddler();\n tiddler.set(title,body,config.options.txtUserName,(new Date()),"excludeLists excludeSearch");\n store.addTiddler(tiddler); story.closeTiddler(title);\n\n // use alternate "search again" label in <<search>> macro\n var oldprompt=config.macros.search.label;\n config.macros.search.label="search again";\n\n // render/refresh tiddler\n story.displayTiddler(null,title,1);\n store.notify(title,true);\n\n // restore standard search label\n config.macros.search.label=oldprompt;\n\n}\n\nif (!window.discardSearchResults) window.discardSearchResults=function()\n{\n // remove the tiddler\n story.closeTiddler(config.macros.search.reportTitle);\n store.deleteTiddler(config.macros.search.reportTitle);\n}\n//}}}
/***\n|''Name:''|SelectStylesheetPlugin|\n|''Source:''|http://www.TiddlyTools.com/#SelectStylesheetPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nSelect alternative TiddlyWiki CSS stylesheet 'themes' from a list of tiddlers tagged with "stylesheets".\n\n!!!!!Usage\n<<<\nThis plugin defines a macro that creates a stylesheet link or selection listbox/droplist that can be added to the content of any tiddler (such as the OptionsPanel or MainMenu tiddlers).\n\nFirst, create (or import) a custom style sheet tiddler (i.e, a tiddler containing CSS definitions) and tag it with <<tag stylesheets>> so it can be included in the selection list. Then, add the {{{<<selectStylesheet>>}}} macro to the desired tiddler to display the stylesheet list. (note: to create a link to apply a specific stylesheet, include the stylesheet tiddlername as a parameter. See below for more details).\n\nSelect your desired stylesheet from the droplist:\n** ''[system]'' uses the built-in CSS definitions\n** ''[default]'' uses "StyleSheet" tiddler (if present)\n** //tiddlername// uses any named stylesheet\nThe currently selected stylesheet is indicated by a '>' symbol.\n\n//Note: If a selected stylesheet tiddler no longer exists (i.e, the tiddler was deleted or renamed after it had been selected for use), the [default] CSS tiddler ("StyleSheet") will be used as a fallback. If this tiddler does not exist either, then the built-in CSS definitions are used.//\n<<<\n!!!!!Parameters\n<<<\nThe selectStylesheet macro accepts parameters to control various features and functions. //Note: while each parameter is optional and may be omitted from the macro, the parameters (when present) must appear in the order shown below.//\n* ''size:nnn''\nDetermines the number of lines to display in the stylesheet list. If this parameter is omitted or "size:1" is specified, a single-line droplist is created. When a size > 1 is provided, a standard, fixed-size scrollable listbox is created. You can use "size:0" or "size:auto" to display a varible-height listbox that automatically adjusts to fit the current list contents without scrolling.\n* ''width:nnn[cm|px|em|%]''\nControls the width of the stylesheet list. Overrides the built-in CSS width declaration (=100%). Use standard CSS width units (cm=centimeters, px=pixels, em=M-space, %=proportional to containing area). You can also use a ".selectStylesheet" custom CSS class definition to override the built-in CSS declarations for the stylesheet list.\n* ''label:text'' and ''prompt:text''\nwhen used in conjunction with a specific named stylesheet to create a stylesheet link (see //tiddlername// param, below), these two parameters define the link text the 'tooltip' text that appears near the mouse pointer when placed over the link, respectively.\n* ''//tiddlername//''\nIf you include a stylesheet //tiddlername// parameter in the macro (e.g., {{{<<selectStylesheet [[Woodshop]]>>}}} then a link will be created instead of a listbox/droplist. Selecting this link applies the specified stylesheet. You may use the special keywords ''[system]'' to use the built-in CSS definitions, or ''[none]'' to bypass all stylesheet tiddlers (sometimes useful during CSS debugging).\n\n<<<\n!!!!!Nested Stylesheets\n<<<\nThe CSS definitions for TiddlyWiki are fairly substantial, and stylesheet tiddlers can include hundreds of lines of CSS statements. Often, these stylesheets will use the exact same CSS for the bulk of their definitions plus several changes or additions to create a difference in appearance. This results in lots of duplicated CSS definitions that can become difficult to keep 'in sync' with each other.\n\nTo make this problem much easier to manage, you can move the common CSS definitions into separate stylesheet tiddlers. Then, embed {{{[[tiddlertitle]]}}} references in the original stylesheet tiddlers to re-combine the CSS definitions into a single stylesheet 'theme' to be applied.\n\nWith some clever division of CSS into separate tiddlers, you can quite easily construct dozens of stylesheet combinations. You can also mark the common CSS tiddlers with tags and use them as overlay stylesheets so you can mix-and-match their styles to create even more 'on-the-fly' stylesheet combinations.\n\nNote: Normally, when rendering tiddler content for display, the {{{[[tiddlertitle]]}}} syntax means "insert a link to this tiddler". However, when applying stylesheets, this syntax means "insert the content of this tiddler"\n<<<\n!!!!!Bypassing default shadow styles (for 'CSS gurus')\n<<<\nNormally, TiddlyWiki documents automatically use CSS definitions contained in ''shadow tiddlers:'' StyleSheetLayout, StyleSheetColors, and StyleSheetPrint. Custom stylesheet definitions are then ''overlayed'' on top of these default styles, allowing you to modify and extend the CSS definitions to suit your desired look-and-feel, by just adding a few lines of CSS, instead of directly modifying the shadow tiddlers (which, while it is allowed, is not recommended).\n\nPrior to version 4.3.0 (2006 August 27), the plugin behavior always bypassed the shadow stylesheets when applying a selected custom stylesheet. As a result, the custom stylesheet definitions had to contain this syntax: {{{[[StyleSheetLayout]] [[StyleSheetColors]] [[StyleSheetPrint]]}}} to make use of the default CSS definitions. Unfortunately, this made it awkward to import and use 'standard' StyleSheet tiddlers defined for use without the SelectStylesheetPlugin, as they didn't necessarily contain the needed references to the shadow defaults.\n\n''As of version 4.3.0, SelectStylesheetPlugin no longer bypasses the default shadow stylesheets, so that the {{{[[...]]}}} references to the shadows are not required to include the default styles.''\n\nHowever, if overriding a CSS definition in a custom StyleSheet is simply not sufficient for your needs, you can still ''completely bypass the built-in shadow styles'' by entering\n{{{\nconfig.options.chkBypassShadowStyles=true\n}}}\ninto a tiddler tagged with<<tag systemConfig>> (e.g., "ConfigTweaks"). This ''internal system value'' causes the plugin to revert to the pre-4.3.0 behavior so that it skips the shadow styles when applying a selected stylesheet. Note that this setting is not a user-level preference, so it is not presented as a checkbox option nor stored in a cookie, as it is intended to only be set by the //author// of the document.\n<<<\n!!!!!Changing templates or invoking custom javascript from a stylesheet\n<<<\nIn addition to CSS definitions, some TiddlyWiki look-and-feel designs also make adjustments to the TiddlyWiki document structure so that certain document features can be moved, hidden, or otherwise redefined. The default set of templates that control the document structure are called PageTemplate, ViewTemplate, and EditTemplate. To select an alternative set of templates, you can include the special psuedo-macro ''{{{<<template prefix>>}}}'' in your stylesheet. This adds the indicated prefix to the standard template names, and automatically switches to using those templates whenever the stylesheet is selected and applied.\n\nWhenever a document is being viewed in read-only mode (i.e., via http: protocol), an implied template prefix of "Web" is also used, and is inserted between any custom template prefix and the standard template name. For example, ''{{{<<template Custom>>}}}'' will use {{{CustomWebViewTemplate}}} when the document is in read-only mode. You can specify an alternative for this implied prefix by including a second prefix parameter in the pseudo-macro. For example, ''{{{<<template Custom ReadOnly>>}}}'' will use {{{CustomReadOnlyViewTemplate}}}. Note: if a template tiddler with the indicated combination of custom and read-only prefixes is not available, a suitable fallback template is chosen, first by omitting the custom prefix, then by omitting the read-only prefix, and finally by omitting both, and reverting to the appropriate default template.\n\nIn addition to selecting alternative templates, a stylesheet can also include the psuedo-macro ''{{{<<init tiddlertitle>>}}}'' to execute custom javascript that can access TiddlyWiki internal data and 'core' functions or perform direct manipulation of the currently-rendered DOM elements of the document. First, place the desired javascript code into one or more tiddlers (note: //although these tiddlers will contain javascript, ''do NOT tag them as 'systemConfig', since this will cause the javascript to be executed every time TW starts'', rather than only when a specific stylesheet has been selected//). Then, add the ''{{{<<init tiddlertitle>>}}}'' pseudo-macro to your stylesheet so the javascript will be executed when that specific stylesheet is selected and applied.\n\nOf course, when another stylesheet is subsequently selected, other custom javascript functions may be needed to reset whatever TW internal data changes or DOM manipulations were performed by any {{{<<init>>}}} scripts. You can define tiddlers containing these ''reset'' scripts by embedding ''{{{<<reset tiddlertitle>>}}}'' in your stylesheet definition. Unlike {{{<<init>>}}} scripts, any tiddlers declared in this way will NOT be executed when the stylesheet is applied, but will be remembered and automatically executed before applying another stylesheet.\n\nNote: These special-purpose psuedo-macros are only executed when the stylesheet containing them is actually in use. When these macros are rendered as part of the tiddler content (such as when //viewing// a stylesheet definition), the macros simply report their values without performing any actions.\n<<<\n!!!!!Examples\n<<<\nsingle auto-sized listbox\n{{{<<selectStylesheet size:auto width:60%>>}}}\n<<selectStylesheet size:auto width:60%>>\n\ndroplist for stylesheets\n{{{<<selectStylesheet size:1 width:30%>>}}}\n<<selectStylesheet size:1 width:30%>>\n\ninline links to set specific stylesheets\n{{{<<selectStylesheet Woodshop>> or <<selectStylesheet [[Edge of Night]]>> or <<selectStylesheet [default]>> or <<selectStylesheet [none]>> or <<selectStylesheet label:TiddlyWiki "prompt:The standard TW stylesheet" [system]>>\n}}}\n<<selectStylesheet Woodshop>> or <<selectStylesheet [[Edge of Night]]>> or <<selectStylesheet [default]>> or <<selectStylesheet [none]>> or <<selectStylesheet label:TiddlyWiki "prompt:The standard TW stylesheet" [system]>>\n\nstylesheet definitions (tagged with "stylesheets"):\n<<tag stylesheets>>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''SelectStylesheetPlugin'' (tagged with <<tag systemConfig>>)\n^^documentation and javascript for SelectStylesheethandling^^\n\ncreate/edit ''OptionsPanel'':\nAdd "{{{<<selectStylesheet [size:nnn|auto] [width:nnn[cm|px|em|%]>>}}}" macro.\n<<<\n!!!!!Revision History\n<<<\n''2006.11.14'' [4.3.5] in applyPageTemplate(), only force use of selectStylesheet alternative page template if explicit template parameter is NOT provided (i.e., allow other plugin code to pass a value for the template). Based on a request by Paulo Soares.\n''2006.11.12'' [4.3.4] in applyStylesheets(), moved invocation of 'reset' handlers so they occur BEFORE switching to another template. (thanks to UdoBorkowski for the bug report)\n''2006.11.11'' [4.3.3] in initSelectStylesheetNotification(), hijack previously registered notifications for refreshPageTemplate() in addition to refreshStyles(). This ensures that non-default PageTemplate is displayed when document is first loaded (thanks to AndresLister for bug report).\n''2006.11.11'' [4.3.2] in applyStylesheets(), use getRecursiveTiddlerText() instead of getTiddlerText() to retrieve system-default shadow stylesheet. (thanks to UdoBorkowski for the bug report)\n''2006.09.26'' [4.3.1] in applyStylesheets(), corrected setting of StyleSheetPrint. Restored "[none]" choice in listbox.\n''2006.08.27'' [4.3.0] in applyStylesheets(), changed default so that shadow stylesheets are automatically applied ALONG WITH the selected custom stylesheet. Use config.options.chkBypassShadowStyles=true to revert to the prior handling (i.e., skip the shadow stylesheets)\n''2006.08.26'' [4.2.7] in applyStylesheets(), added depth-limiting param to getRecursiveTiddlerText() to avoid inifinite recursion. Note: limits nesting of stylesheets to 10 levels (same as core).\n''2006.06.28 [4.2.6]'' added 'nocookie' param to set(), so "style:xyz" param can **temporarily** override stylesheet (by NOT overwriting the cookie value)\n''2006.05.18 [4.2.5]'' revert to 'onchange' handling, BUT... don't *reload* the list contents each time selection changes (just move the ">" indicator to the current item instead), AND... track onkeydown/up to avoid FF crash due to excess calls to set() when scrolling a listbox by holding down arrow keys.\n''2006.05.15 [4.2.4]'' switch from 'onchange' listbox handling to 'onclick' and 'onkeyup'. Avoids FF **CRASH** due to stylesheets being excessively refreshed *during* onchange due to keyboard event handling.\n''2006.04.21 [4.2.3]'' recognize "stylesheet" tag when building list of available stylesheets (in addition to plural, "stylesheets")\n''2006.04.05 [4.2.2]'' in applyStylesheet(), reverted change from 4.2.0: *don't* apply "StyleSheetColors" and "StyleSheetLayout" along with selected stylesheet, so custom stylesheet can completely bypass the default formatting. To include default formatting in a stylesheet, embed "[[StyleSheetColors]] [[StyleSheetLayout]]" \n''2006.03.30 [4.2.1]'' in applyStylesheet(), change calls from "window.eval()" to just "eval()" to avoid FF1501 'global variable crash' problem \n''2006.03.30 [4.2.0]'' remove [none] choice from listbox. Added handling for <<selectStylesheet sheetname>> to create a link that applies the specified sheet instead of presenting a listbox of available sheets. added "style:" paramifier. Apply "StyleSheetColors" and "StyleSheetLayout" along with selected stylesheet (i.e., overlay selected sheet on top of shadow styles instead of replacing default shadow styles). Based on suggestions from Clint Checketts.\n''2006.03.09 [4.1.4]'' in refreshSelectStylesheet(), make sure that tiddler named in stylesheet cookie value still exists before attempting to select it in the listbox.\n''2006.02.25 [4.1.3]'' Problem: the ">" indicator was not always being refreshed, due to event "timing" issues. refreshSelectStylesheet() deferred for 10msec so it will execute *after* onChangeSelectStylesheet event processing has completed.\n''2006.02.24 [4.1.2]'' Problem: {{{<<template>>}}} macro was not being processed in IE.\nCause: regexp processing creates browser-internal "private globals" used to keep track of the regexp parser's state, including the current 'scan' position within the source string. This lets you use search() and exec() inside loops to scan for successive pattern matches. In applyStyleSheet(), "theCSS.search(templateRegExp)" was called before "theCSS.exec(templateRegExp)". As a result, the regexp parser had already matched the {{{<<template>>}}} macro embedded in the CSS and thus did not actually process the macro and switch the templates.\nFix: use {{{indexOf("<<template")}}} instead of search(templateRegExp) to check for presence of template switching macro in CSS.\n''2006.02.23 [4.1.1]'' performance fixes: in switchTemplates(), added default init of 'altTemplate' value to prevent unneeded triggering of refreshPageTemplate() during TW load-time when using standard templates. Saves LOTS of startup time and avoids the dreaded "script is running slowly" FireFox warnings.\nAlso, the forEachTiddler() call to force a "refresh all tiddlers" (needed when view/edit templates are changed) was moved from applyPageTemplate() and is now called directly from switchTemplates(). This eliminates redundant re-rendering of tiddlers while the page template is being refreshed.\n''2006.02.21 [4.1.0]'' added {{{<<template>>}}} pseudo-macro with new switchTemplate() function. Allows stylsheets to switch page/view/edit templates by adding a prefix to standard template names. Detects readOnly mode and automatically adds "Web" to template name (e.g. "MyWebViewTemplate"). Defines "Web" shadow templates and "viewSource" toolbar command.\n''2006.02.21 [4.0.3]'' added real macro handlers for psuedo-macros "init", "reset" so they will display in the stylesheet tiddler without appearing as an error.\n''2006.01.20 [4.0.2]'' add 'var' to unintended global variable declarations and wrapped notification hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals\n''2006.01.20 [4.0.1]'' Added optional "init" keyword for {{{<<init tiddlertitle>>}}} psuedo-macro syntax (note: previous {{{<<tiddlertitle>>}}} syntax still permitted)\nRevised documentation to better describe use of init/reset for custom code invokation.\n''2005.11.05 [4.0.0]'' Entire plugin simplified in response to new "shadow stylesheet" architecture introduced in TW1.2.37. Concept of separate overlays has been removed. Stylesheet themes are assembled using [[tiddler]] 'nesting' syntax, and tagged as 'stylesheet'. A single listbox/droplist is provided to select themes.\n''2005.10.25 [3.1.0]'' added support for embedding {{{<<reset tiddlertitle>>}}} companion code (to declare 'DOM cleanup' routines invoked when a stylesheet is UNloaded)\n//Based on a request from ClintChecketts//\n''2005.10.09 [3.0.1]'' combined documentation and code in a single tiddler\n''2005.08.15 [3.0.0]'' Another major re-write. Replaced separate "selectOverlays" macro definition with 'overlays' parameter on 'selectStylesheet' macro. Added support for embedding {{{<<tiddlertitle>>}}} companion code. applyStylesheets() completely re-designed to address quirks with loading and combining multiple stylesheets using browser-specific native handling, as well as add support for executing companion code. Stylesheets+overlays+code are now handled in a platform-neutral manner that avoids differences between browser implementations and uses much less overhead in the DOM.\n''2005.08.07 [2.0.0]'' Major re-write to not use static ID values for listbox controls, so that multiple macro instances can exist without corrupting each other or the DOM. Moved HTML and CSS definitions into plugin code instead of using separate tiddlers. Added new features: support for multiple groups of overlay stylesheets with collapsible tree display. Added size and width params for listbox display.\n''2005.07.27 [1.0.3]'' core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet()\n''2005.07.25 [1.0.2]'' correct 'fallback' handling in selectStyleSheet()\n''2005.07.23 [1.0.1]'' added parameter checks and corrected addNotification() usage\n''2005.07.20 [1.0.0]'' Initial Release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]. Thanks to David Jaquith for testing and bug reports and SteveRumsby for feature suggestions.\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.selectStylesheet = {major: 4, minor: 3, revision: 5, date: new Date(2006,11,14)};\n\n// IE needs explicit global scoping for functions/vars called from browser events\nwindow.refreshSelectStylesheet=refreshSelectStylesheet;\nwindow.applyStylesheets=applyStylesheets;\n\nif (!config.options.txtStyleSheet) config.options.txtStyleSheet="StyleSheet";\n//}}}\n\n//{{{\n// define macro rendering handler\nconfig.macros.selectStylesheet = { };\nconfig.macros.selectStylesheet.reset = [];\nconfig.macros.selectStylesheet.handler = function(place,macroName,params) {\n setStylesheet(".selectStylesheet {width:100%;font-size:8pt;margin:0em}","selectStylesheetPlugin");\n var autosize=1;\n if (params[0] && (params[0]=="size:auto"))\n { autosize=0; params.shift(); }\n if (params[0] && (params[0].substr(0,5)=="size:"))\n autosize=(params.shift()).substr(5);\n if (params[0] && (params[0].substr(0,6)=="width:"))\n var width=(params.shift()).substr(6);\n if (params[0] && (params[0].substr(0,6)=="label:"))\n var label=(params.shift()).substr(6);\n if (params[0] && (params[0].substr(0,7)=="prompt:"))\n var prompt=(params.shift()).substr(7);\n if (params[0] && params[0].trim().length) // create a link that sets a specific stylesheet\n createTiddlyButton(place,label?label:params[0],prompt?prompt:params[0], function(){config.macros.selectStylesheet.set(params[0]); return false;});\n else { // create a select list of available stylesheets\n var theList=createTiddlyElement(place,"select",null,"selectStylesheet",null);\n theList.onkeydown=function() // track keystrokes for listbox only\n { if (this.size>1 && !this.keydown) { this.keydown=true; this.previousIndex=this.selectedIndex; } return true; };\n theList.onkeyup=function()\n { if (this.keydown) { this.keydown=false; if (this.selectedIndex!=this.previousIndex) config.macros.selectStylesheet.set(this.value); } return true; };\n theList.onchange=function()\n { if (!this.keydown) config.macros.selectStylesheet.set(this.value); return true; };\n theList.size=1;\n theList.autosize=autosize;\n if (width) theList.style.width=width;\n store.addNotification(null,refreshSelectStylesheet);\n refreshSelectStylesheet();\n }\n}\nconfig.macros.selectStylesheet.set = function(theSheet,nocookie) {\n if (!theSheet || !theSheet.trim().length) return;\n var allStyleLists=getElementsByClass("selectStylesheet");\n for (var k=0; k<allStyleLists.length; k++) {\n var theList=allStyleLists[k];\n for (var t=0; t<theList.options.length; t++) {\n if (theList.options[t].text.substr(0,1)==">")\n theList.options[t].text=String.fromCharCode(160)+String.fromCharCode(160)+theList.options[t].text.substr(1);\n if ((theList.options[t].value==theSheet) || (theSheet=="[default]" && theList.options[t].value=="StyleSheet"))\n { theList.options[t].text=">"+theList.options[t].text.substr(2); theList.selectedIndex=t; }\n }\n }\n config.options.txtStyleSheet=theSheet;\n if (!nocookie) saveOptionCookie("txtStyleSheet");\n applyStylesheets();\n return;\n}\nif (config.paramifiers) config.paramifiers.style = { onstart: function(theSheet) { config.macros.selectStylesheet.set(theSheet,true); } };\n\n// set to TRUE to enable debugging status messages when stylesheets are applied\nconfig.macros.selectStylesheet.verbose = false;\n\n// hijack existing notifications for refreshStyles() and refreshPageTemplate() handlers\ninitSelectStylesheetNotification();\nfunction initSelectStylesheetNotification() {\n for (var i=0; i<store.namedNotifications.length; i++) {\n if (store.namedNotifications[i].notify==window.refreshStyles)\n store.namedNotifications[i].notify=applyStylesheets;\n if (store.namedNotifications[i].notify==window.refreshPageTemplate)\n store.namedNotifications[i].notify=applyPageTemplate;\n }\n}\n\n// hijack refreshStyles() handler\nconfig.macros.selectStylesheet.coreRefreshStyles = window.refreshStyles;\nwindow.refreshStyles=applyStylesheets;\n\n// hijack refreshPageTemplate() handler\nconfig.macros.selectStylesheet.coreRefreshPageTemplate = window.refreshPageTemplate;\nwindow.refreshPageTemplate=applyPageTemplate;\n\nfunction getElementsByClass(classname)\n{\n var arr=new Array();\n var count=0;\n var all=document.all? document.all : document.getElementsByTagName("*");\n for (var i=0; i<all.length; i++)\n if (all[i].className==classname)\n arr[count++]=all[i];\n return arr;\n}\n\nfunction refreshSelectStylesheet()\n{\n var indent = String.fromCharCode(160)+String.fromCharCode(160)+String.fromCharCode(160);\n // for all instances of the selectStylesheet control\n var allStyleLists=getElementsByClass("selectStylesheet");\n for (var k=0; k<allStyleLists.length; k++) {\n var theList=allStyleLists[k];\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n theList.selectedIndex=-1;\n // fill the stylesheet list\n var count=0;\n // prompt text\n theList.options[count++] = new Option("select a stylesheet:","",false,false);\n // option: none (built-in hard-coded CSS only)\n theList.options[count++] = new Option(indent+"[none]","[none]",false,false);\n // option: default (built-in plus shadow stylesheets)\n theList.options[count++] = new Option(indent+"[system]","[system]",false,false);\n // option: StyleSheet tiddler, if present\n if (store.getTiddler("StyleSheet")!=undefined)\n theList.options[count++] = new Option(indent+"[default]","StyleSheet",false,false);\n // options: CSS tiddlers tagged with "stylesheets" or "stylesheet"\n var theSheets=store.getTaggedTiddlers("stylesheets").concat(store.getTaggedTiddlers("stylesheet"));\n for (var i=0; i<theSheets.length; i++) {\n var theTitle=theSheets[i].title;\n if (theTitle=="StyleSheet") continue;\n theList.options[count++] = new Option(indent+theTitle,theTitle,false,false);\n }\n // make sure the requested stylesheet exists, fallback if not...\n var theSheet=config.options.txtStyleSheet;\n if (theSheet!="[none]" && theSheet!="[system]" && !store.getTiddler(theSheet)) theSheet="StyleSheet";\n if (!store.getTiddler(theSheet)) theSheet="[system]";\n // set the listbox selection to current stylesheet\n theList.selectedIndex=0; // default to first item\n for (var t=0; t<theList.options.length; t++) \n if (theList.options[t].value==theSheet)\n { theList.selectedIndex=t; break; }\n theList.options[t].text=">"+theList.options[t].text.substr(2);\n // autosize as appropriate\n theList.size=(theList.autosize<1)?theList.options.length:theList.autosize;\n } // end of "for all instances"\n}\n//}}}\n\n//{{{\nconfig.macros.selectStylesheet.templates = { };\nfunction switchTemplates(which,readOnlyPrefix)\n{\n // remember original templates (init only)\n if (!config.macros.selectStylesheet.templates.originalpage)\n config.macros.selectStylesheet.templates.originalpage = "PageTemplate";\n if (!config.macros.selectStylesheet.templates.originalview)\n config.macros.selectStylesheet.templates.originalview = config.tiddlerTemplates[1];\n if (!config.macros.selectStylesheet.templates.originaledit)\n config.macros.selectStylesheet.templates.originaledit = config.tiddlerTemplates[2];\n if (!config.macros.selectStylesheet.altTemplate)\n config.macros.selectStylesheet.altTemplate="";\n\n // define shorthand variables just for code readability \n var page=config.macros.selectStylesheet.templates.originalpage;\n var view=config.macros.selectStylesheet.templates.originalview;\n var edit=config.macros.selectStylesheet.templates.originaledit;\n\n // get 'readOnly' mode... set by TW core, but not until after the plugin is loaded, so we need to do this here as well...\n var loc = document.location.href;\n if (readOnly==undefined)\n var readOnly = (loc.substr(0,4) == "http" || loc.substr(0,3) == "ftp") ? config.options.chkHttpReadOnly : false;\n\n // get prefix defaults\n if (!which) var which="";\n if (!readOnlyPrefix) var readOnlyPrefix = "Web";\n if (!readOnly) readOnlyPrefix="";\n var alt = which+readOnlyPrefix;\n\n var msg="current template prefix: '%0', requested template prefix '%1'";\n if (config.macros.selectStylesheet.verbose) alert(msg.format([config.macros.selectStylesheet.altTemplate,alt]));\n\n // only switch if really changing templates\n if (alt == config.macros.selectStylesheet.altTemplate) return;\n\n // remember which templates are being used\n config.macros.selectStylesheet.altTemplate = alt;\n\n // set page template, with fallbacks for missing combinations\n var pageTemplate=alt+page;\n if (!store.getTiddlerText(pageTemplate)) pageTemplate=which+page;\n if (!store.getTiddlerText(pageTemplate)) pageTemplate=readOnlyPrefix+page;\n if (!store.getTiddlerText(pageTemplate)) pageTemplate=page;\n config.macros.selectStylesheet.templates.currentpage = pageTemplate;\n\n // set view template, with fallbacks for missing combinations\n var viewTemplate=alt+view;\n if (!store.getTiddlerText(viewTemplate)) viewTemplate=which+view;\n if (!store.getTiddlerText(viewTemplate)) viewTemplate=readOnlyPrefix+view;\n if (!store.getTiddlerText(viewTemplate)) viewTemplate=view;\n config.tiddlerTemplates[1] = config.macros.selectStylesheet.templates.currentview = viewTemplate;\n\n // set edit template, with fallbacks for missing combinations\n var editTemplate=alt+edit;\n if (!store.getTiddlerText(editTemplate)) editTemplate=which+edit;\n if (!store.getTiddlerText(editTemplate)) editTemplate=readOnlyPrefix+edit;\n if (!store.getTiddlerText(editTemplate)) editTemplate=edit;\n config.tiddlerTemplates[2] = config.macros.selectStylesheet.templates.currentedit = editTemplate;\n\n var msg="switching to templates: %0, %1, %2";\n if (config.macros.selectStylesheet.verbose) alert(msg.format([pageTemplate,viewTemplate,editTemplate]));\n\n // apply page template\n window.applyPageTemplate();\n // apply view/edit templates\n story.forEachTiddler(function(title,element) { this.refreshTiddler(title,null,true);});\n\n}\n// Hijack refreshPageTemplate to force alternative template to be used (if any)\nfunction applyPageTemplate(template)\n{\n var cw=document.getElementById("contentWrapper");\n cw.style.display="none";\n if (!template) var template=config.macros.selectStylesheet.templates.currentpage;\n if (config.macros.selectStylesheet.verbose) alert("Apply PageTemplate: %0".format([template]));\n config.macros.selectStylesheet.coreRefreshPageTemplate(template);\n cw.style.display="block";\n}\n//}}}\n\n//{{{\nfunction applyStylesheets()\n{\n // define pattern to match executable <<tiddlername>> references embedded in CSS text\n var setTiddlerRegExp = new RegExp("(?:<<(?:init )([^>]+)>>)","mg");\n var resetTiddlerRegExp = new RegExp("(?:<<reset ([^>]+)>>)","mg");\n var templateRegExp = new RegExp("(?:<<template ([^\ss>]+)( [^>]+)?>>)","mg");\n\n // make sure the requested stylesheet exists, fallback if not...\n var theSheet=config.options.txtStyleSheet;\n switch (theSheet) {\n case "[none]":\n case "[system]":\n break;\n default:\n if (!store.getTiddler(theSheet)) theSheet="StyleSheet";\n if (!store.getTiddler(theSheet)) theSheet="[system]";\n break;\n }\n\n // When store.NotifyAll() is invoked, it can trigger multiple calls to applyStylesheets(),\n // even though only one is needed to set the styles and render things properly. The extra calls\n // add unnecessary processing overhead by performing multiple re-rendering of entire TW display,\n // often resulting in "slow script" warnings. To avoid this, we can track the last stylesheet that\n // was applied and only apply the current requested sheet if it is really a different sheet, OR\n // if the TW contents have actually changed (which might include changes to the current stylesheet)\n if (theSheet==config.macros.selectStylesheet.current && !store.dirty) return;\n config.macros.selectStylesheet.current=theSheet;\n\n // get the primary stylesheet CSS\n var msg="stylesheet: '%0'";\n if (config.macros.selectStylesheet.verbose) alert(msg.format([theSheet]));\n var theCSS = (theSheet.substr(0,1)=='[')?"":store.getRecursiveTiddlerText(theSheet,"",10);\n if (theSheet.substr(0,1)!='[') store.addNotification(theSheet,refreshStyles);\n\n // execute any saved stylesheet 'reset' code tiddlers\n while (config.macros.selectStylesheet.reset.length) {\n var tiddler=config.macros.selectStylesheet.reset.shift();\n var msg="stylesheet reset macro: '%0'";\n if (config.macros.selectStylesheet.verbose) alert(msg.format([tiddler]));\n var msg="error in '%0': %1";\n try { eval(store.getTiddlerText(tiddler)); }\n catch(e) { displayMessage(msg.format([tiddler,e.toString()])); }\n }\n\n // if <<template>> reference is not specified, reset to standard template\n if (theCSS.indexOf("<<template")==-1) switchTemplates();\n\n // execute any embedded <<template>> references\n do {\n var match = templateRegExp.exec(theCSS);\n if(match && match[1]) switchTemplates(match[1],match[2]);\n } while(match);\n // filter out embedded <<template>> references\n theCSS = theCSS.replace(templateRegExp,"");\n\n // save embedded <<reset tiddlername>> references\n do {\n var match = resetTiddlerRegExp.exec(theCSS);\n if(match && match[1])\n config.macros.selectStylesheet.reset.push(match[1]);\n } while(match);\n // filter out embedded <<reset tiddlername>> references\n theCSS = theCSS.replace(resetTiddlerRegExp,"");\n\n // execute any embedded <<init tiddlername>> references\n do {\n var match = setTiddlerRegExp.exec(theCSS);\n if(match && match[1]) {\n var msg="stylesheet macro: '%0'";\n if (config.macros.selectStylesheet.verbose) alert(msg.format([match[1]]));\n var msg="error in '%0': %1";\n try { eval(store.getTiddlerText(match[1])); }\n catch(e) { displayMessage(msg.format([match[1],e.toString()])); }\n }\n } while(match);\n // filter out embedded <<set tiddlername>> references\n theCSS = theCSS.replace(setTiddlerRegExp,"");\n\n // finally, apply the styles\n switch (theSheet) {\n case "[none]": // no styles\n setStylesheet("/*bypass*/","StyleSheetColors");\n setStylesheet("/*bypass*/","StyleSheetLayout");\n setStylesheet("/*bypass*/","StyleSheetPrint");\n setStylesheet("/*bypass*/","StyleSheet");\n break;\n case "[system]": // default styles only\ntheSheet,"",10\n setStylesheet(store.getRecursiveTiddlerText("StyleSheetLayout","",10),"StyleSheetLayout");\n setStylesheet(store.getRecursiveTiddlerText("StyleSheetColors","",10),"StyleSheetColors");\n setStylesheet(store.getRecursiveTiddlerText("StyleSheetPrint","",10),"StyleSheetPrint");\n setStylesheet("","StyleSheet");\n break;\n default: // alternative stylesheet *replaces* default styles\n if (config.options.chkBypassShadowStyles) { // NOTE: hard-coded value, not saved as cookie, adjust in "ConfigTweaks"\n // stylesheet *replaces* default styles\n setStylesheet("/* overridden by [["+theSheet+"]] */","StyleSheetLayout");\n setStylesheet("/* overridden by [["+theSheet+"]] */","StyleSheetColors");\n setStylesheet("/* overridden by [["+theSheet+"]] */","StyleSheetPrint");\n }\n else {\n // stylesheet *overlays* default styles\n setStylesheet(store.getRecursiveTiddlerText("StyleSheetLayout","",10),"StyleSheetLayout");\n setStylesheet(store.getRecursiveTiddlerText("StyleSheetColors","",10),"StyleSheetColors");\n setStylesheet(store.getRecursiveTiddlerText("StyleSheetPrint","",10),"StyleSheetPrint");\n }\n setStylesheet(theCSS,"StyleSheet");\n break;\n }\n}\n\nconfig.macros.init = { };\nconfig.macros.init.handler = function(place,macroName,params)\n { var out="init: [[%0]]"; wikify(out.format(params),place); }\nconfig.macros.reset = { };\nconfig.macros.reset.handler = function(place,macroName,params)\n { var out="reset: [[%0]]"; wikify(out.format(params),place); }\nconfig.macros.template = { };\nconfig.macros.template.handler = function(place,macroName,params)\n { var out="use template prefix: ''%0 %1''"; wikify(out.format(params),place); }\n\n//}}}
/***\n|''Name:''|SetUserNamePlugin|\n|''Source:''|http://www.TiddlyTools.com/#SetUserNamePlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nIf default username is used ("YourName"), display prompt box to get new username\n\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''SetUserNamePlugin'' (tagged with <<tag systemConfig>>)\n\nIf you are using the default (shadow) EditTemplate definition, it will be updated to invoke this macro, so that whenever a user attempts to edit/create a tiddler AND the username is "YourName", they will be automatically prompted to enter a new username. If you are using a customized EditTemplate, you will need to edit it yourself and add the following line:\n{{{\n<span macro='setUserName'></span>\n}}}\n<<<\n!!!!!Revision History\n<<<\n''2006.12.01 [1.0.0]'' initial release - converted from SetUserName inline script\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.setUserName= {major: 1, minor: 0, revision: 0, date: new Date(2006,12,1)};\n\nconfig.macros.setUserName = {\n handler: function(place,macroName,params) {\n // only prompt when needed\n if (readOnly || config.options.txtUserName!="YourName") return;\n // get new username\n var who=prompt("Please set your username",config.options.txtUserName);\n if (!who||!who.trim().length) return; // cancelled by user\n // set new username\n config.options.txtUserName=who;\n saveOptionCookie("txtUserName");\n // sync any option input fields that are showing username\n var nodes = document.getElementsByTagName("input");\n for(var t=0; t<nodes.length; t++) \n if(nodes[t].getAttribute("option")=="txtUserName") nodes[t].value=who;\n }\n}\n\n// add trigger to default shadow EditTemplate (custom templates: add this by hand)\nconfig.shadowTiddlers.EditTemplate+="<span macro='setUserName'></span>";\n//}}}
<script>\n\n var sliderWidth="auto"; // ADJUST AS DESIRED\n\n var here=story.findContainingTiddler(place);\n var tiddlers=store.getTiddlers("title","excludeLists");\n var basics=""; var editing=""; var authoring=""; var addons="";\n var others=""; var inlines=""; var attachments=""; var styles="";\n var item="[[%0]]\sn";\n var item="+++[%0]...<<tiddler ShowTiddlerClip with: [[%0]]>>===\sn\sn";\n for (var i=0; i<tiddlers.length; i++) {\n if (tiddlers[i].tags.contains("systemConfig")) {\n if (tiddlers[i].tags.contains("basic"))\n basics+=item.format([tiddlers[i].title])\n else if (tiddlers[i].tags.contains("editing"))\n editing+=item.format([tiddlers[i].title])\n else if (tiddlers[i].tags.contains("authoring"))\n authoring+=item.format([tiddlers[i].title])\n else if (tiddlers[i].tags.contains("addon"))\n addons+=item.format([tiddlers[i].title])\n else others+=item.format([tiddlers[i].title])\n }\n if (tiddlers[i].tags.contains("script"))\n inlines+=item.format([tiddlers[i].title])\n if (tiddlers[i].tags.containsAny(["stylesheets","stylesheet","template","css"]))\n styles+=item.format([tiddlers[i].title])\n if (tiddlers[i].tags.contains("attachment"))\n attachments+=item.format([tiddlers[i].title])\n }\n var pre="@@display:block;+++";\n var box="{{borderleft{\sn@@display:block;width:"+sliderWidth+";";\n var post="@@}}}===@@";\n var out="";\n if (basics.length) out+=pre+"[essentials]"+box+basics+post;\n if (editing.length) out+=pre+"[editing tools]"+box+editing+post;\n if (authoring.length) out+=pre+"[content extensions]"+box+authoring+post;\n if (addons.length) out+=pre+"[addon features]"+box+addons+post;\n if (others.length) out+=pre+"[other plugins]"+box+others+post;\n if (inlines.length) out+=pre+"[inline scripts]"+box+inlines+post;\n if (styles.length) out+=pre+"[themes/templates]"+box+styles+post;\n if (attachments.length) out+=pre+"[attachments]"+box+attachments+post;\n return out;\n</script>
{{smallform{<html><form style="display:inline;margin:0;padding:0"><select style="width:99%" name="list"\n onchange="this.form.val.value=this.value.length?config.options[this.value]:'';"><!--\n--></select>\n<input type="text" style="width:98%;margin:0;" name="val" title="enter an option value">\n<input type="button" style="width:33%;margin:0;" value="get" title="refresh list"\n onclick="window.setCookieEditorList(this.form.list);"><!--\n--><input type="button" style="width:33%;margin:0;" value="set" title="save cookie value"\n onclick="var opt=this.form.list.value; var v=this.form.val.value; config.options[opt]=opt.substr(0,3)=='txt'?v:(v.toLowerCase()=='true'); saveOptionCookie(opt);window.setCookieEditorList(this.form.list);"><!--\n--><input type="button" style="width:33%;margin:0;" value="del" title="remove cookie"\n onclick="var ex=new Date(); ex.setTime(ex.getTime()-1000); document.cookie=this.form.list.value+'=novalue; path=/; expires='+ex.toGMTString(); window.setCookieEditorList(this.form.list);"></form></html><script>\n window.setCookieEditorList = function(list) {\n var cookies = { };\n if (document.cookie != "") {\n var p = document.cookie.split("; ");\n for (var i=0; i < p.length; i++) {\n var pos=p[i].indexOf("=");\n if (pos==-1) cookies[p[i]]="";\n else cookies[p[i].substr(0,pos)]=unescape(p[i].slice(pos+1));\n }\n }\n var opt=new Array(); for (var i in config.options) if (cookies[i]) opt.push(i); opt.sort();\n var sel=list.selectedIndex;\n while (list.options.length > 1) { list.options[1]=null; } // clear list (except for header item)\n list.options[0]=new Option("There are "+opt.length+" cookies...","",false,false);\n if (!opt.length) { list.form.val.value=""; return; } // no cookies\n var c=1;\n for(var i=0; i<opt.length; i++) {\n var txt="";\n if (opt[i].substr(0,3)=="chk")\n txt+="["+(config.options[opt[i]]?"x":"_")+"] ";\n txt+=opt[i];\n list.options[c++]=new Option(txt,opt[i],false,false);\n }\n list.selectedIndex=sel>0?sel:0;\n list.form.val.value=sel>0?config.options[list.options[sel].value]:"";\n }\n window.setCookieEditorList(place.lastChild.firstChild.list); \n</script>}}}
{{smallform{<script>\n var tiddlers=store.getTiddlers('modified','excludeLists');\n var out='<html>';\n out+='<select size=1 style="width:93.5%" ';\n out+=' onchange="var target=this.parentNode.nextSibling; removeChildren(target); wikify(\s'<\s'+\s'<tiddler ShowTiddlerClip with: [[\s'+this.value+\s']]>\s'+\s'>\s',target); target.style.display=this.value.length?\s'block\s':\s'none\s'; this.nextSibling.disabled=!this.value.length;">';\n var limit=25; // set to tiddlers.length to list *all* tiddlers\n out+='<option value="">'+limit+' most recently changed tiddlers...</option>';\n for (var i=tiddlers.length-1; i>=tiddlers.length-limit; i--) { var t=tiddlers[i];\n out+='<option value="'+t.title+'">';\n out+=t.modified.formatString('YYYY.0MM.0DD 0hh:0mm')+' - '+t.title;\n out+='</option>\sn';\n }\n out+='</select>';\n out+='<input type="button" name="done" value="done" disabled title="hide article display" style="width:6%" ';\n out+=' onclick="removeChildren(this.parentNode.nextSibling); this.parentNode.nextSibling.style.display=\s'none\s'; this.previousSibling.selectedIndex=0; this.disabled=true;">';\n out+='</html>';\n out+='@@display:none;white-space:normal;@@'; // target div for displayof wikified content\n return out;\n</script>}}}
<script>\n var tid="$1";\n var clipsize=500; // # of chars to display from beginning of each tiddler\n var tiddler=store.getTiddler(tid); if (!tiddler) return "";\n var title=tiddler.title;\n var author=tiddler.modifier\n var size=tiddler.text.length;\n var mod=tiddler.modified.formatString("DDD, MMM DDth YYYY 0hh:0mm");\n var clip=tiddler.text.substr(0,clipsize);\n var edit='onclick="story.displayTiddler(null,\s''+title+'\s',2);return false;">'+(readOnly?'view':'edit')+' source...';\n var out="";\n out+='@@display:block;';\n out+='{{groupbox{@@display:block;overflow:hidden;width:auto;';\n out+='{{floatright{';\n out+='}}}[['+title+']] ('+size+' bytes) | '+'<html><a href="javascript:;" '+edit+'</a></html>\sn';\n out+='^^modified on '+mod+' by '+author+'^^\sn';\n out+='//{{fine{'+clip.length+' character source excerpt:}}}//\sn----\sn{{{\sn'+clip+'\sn}}}\sn';\n out+='@@}}}';\n out+='@@';\n return out;\n</script>
{{smallform{<script>\n\n // hijack store.setDirty() function (force display update after saving the file)\n if (TiddlyWiki.prototype.showUnsavedHijack_setDirty==undefined) {\n TiddlyWiki.prototype.showUnsavedHijack_setDirty=TiddlyWiki.prototype.setDirty;\n TiddlyWiki.prototype.setDirty = function(flag) {\n var refresh=this.isDirty() && !flag; // 'dirty' to 'clean', force a refresh...\n this.showUnsavedHijack_setDirty(flag); // but change the flag first.\n if (refresh) {\n config.options.lastSaved=new Date(); // remember save time\n refreshDisplay(); // finally, update the display\n }\n }\n }\n\n // get the tiddlers sorted by date - INCLUDE ALL TIDDLERS (even hidden ones!!)\n var tiddlers=store.getTiddlers("modified");\n\n // track date/time of last file save (initialize to last tiddler change)\n if (config.options.lastSaved==undefined)\n config.options.lastSaved=tiddlers[tiddlers.length-1].modified;\n\n // If no tiddlers have changed, DO NOTHING.\n if (tiddlers[tiddlers.length-1].modified<=config.options.lastSaved) return;\n\n // find the unsaved tiddlers\n var count=0; var list="";\n var item='<option value="%0">%1 - %0</option>';\n for (var i=tiddlers.length-1; i>=0; i--) {\n if (tiddlers[i].modified<=config.options.lastSaved) break;\n list+=item.format([tiddlers[i].title,\n tiddlers[i].modified.formatString('YYYY.0MM.0DD 0hh:0mm:0ss')]);\n count++;\n }\n // display the dropdown list wrapped in a slider\n var out='';\n var label='There %0 %1 unsaved tiddler%2...'.format([count==1?'is':'are',count,count==1?'':'s'])\n out+='+++(unsaved)['+label+'|show/hide a list of changed tiddlers]...';\n out+='<html><form style="display:inline">';\n out+='<select size="1" name="list" title="select a tiddler to view" ';\n out+=' onchange="var v=this.value; if (!v.length) return;';\n out+=' story.displayTiddler(null,v);';\n out+=' window.scrollTo(0,ensureVisible(document.getElementById(story.idPrefix+v)));">';\n out+=list;\n out+='</select>';\n out+='<input type="button" value="goto"';\n out+=' onclick="var v=this.form.list.value; if (!v.length) return; story.displayTiddler(null,v);';\n out+=' var t=document.getElementById(story.idPrefix+v); if (t) window.scrollTo(0,ensureVisible(t));">';\n out+='<input type="button" value="revert" title="import the last saved version of this tiddler"';\n out+=' onclick="var v=this.form.list.value; if (!v.length) return;';\n out+=' var t=\s'<\s'+\s'<loadTiddlers [[tiddler:\s'+v+\s']] \s'+document.location.href+\s' confirm force>\s'+\s'>\s';';\n out+=' var e=document.getElementById(\s'executeRevert\s'); if (e) e.parentNode.removeChild(e);';\n out+=' e=document.createElement(\s'span\s'); e.id=\s'executeRevert\s'; wikify(t,e);">';\n out+='</form></html>';\n if (!readOnly)\n out+='\sn{{small{<<saveChanges>> | <<newDocument ask all>> | <<upload>>}}}';\n out+='===';\n return out;\n</script>}}}
/%\n\nusage: <<tiddler ShowUserName>>\n\nDisplays current username, Click for prompt box to change name.\n\n%/<script label="username">\n var who=prompt("Please set your username",config.options.txtUserName);\n if (!who||!who.trim().length) return;\n config.options.txtUserName=who;\n saveOptionCookie("txtUserName");\n var tid=story.findContainingTiddler(place);\n if (tid) story.refreshTiddler(tid.getAttribute("tiddler"),null,true); // sync containing tiddler\n var nodes = document.getElementsByTagName("input");\n for(var t=0; t<nodes.length; t++) // sync any input fields that show username\n if(nodes[t].getAttribute("option")=="txtUserName") nodes[t].value=who;\n</script><script>\n place.lastChild.title="click to change your username";\n place.lastChild.innerHTML=config.options.txtUserName;\n</script>
/%\n\nTIDDLER CONTENTS COPIED FROM: SideBarOptionsFull\n\n%/{{fine{{{floatright{<<tiddler ExpandSlidersScript with: "sidebar" "expand" "collapse">>}}}}}}++++(goto)[goto]...{{borderleft{\n <<tiddler SiteMenuGoto>>}}}===\n++++(search)[search]...{{borderleft{\n <<tiddler SiteMenuSearch>>}}}===\n{{floatright{<<tiddler ToggleReadOnly>>}}}+++(file)[file]...{{borderleft{\n <<tiddler SiteMenuFile>>}}}===\n+++(edit)[edit]...{{borderleft{\n <<tiddler SiteMenuEdit>>}}}===\n+++(view)[view]...{{borderleft{\n <<tiddler SiteMenuView>>}}}===\n+++(options)[options]...{{borderleft{\n <<tiddler SiteMenuOptions>>}}}===\n+++(calendar)[calendar]...{{borderleft{\n {{groupbox{{{small{<<calendar thismonth>><script>\n place.lastChild.style.width="100%";\n </script>}}}}}}}}}===
{{fine{{{floatright{<<tiddler ExpandSlidersScript with: "sidebar" "expand" "collapse">>}}}}}}++++(goto)[goto]...{{borderleft{\n <<tiddler SiteMenuGoto>>}}}===\n++++(search)[search]...{{borderleft{\n <<tiddler SiteMenuSearch>>}}}===\n{{floatright{<<tiddler ToggleReadOnly>>}}}+++(file)[file]...{{borderleft{\n <<tiddler SiteMenuFile>>}}}===\n+++(edit)[edit]...{{borderleft{\n <<tiddler SiteMenuEdit>>}}}===\n+++(view)[view]...{{borderleft{\n <<tiddler SiteMenuView>>}}}===\n+++(options)[options]...{{borderleft{\n <<tiddler SiteMenuOptions>>}}}===\n+++(calendar)[calendar]...{{borderleft{\n {{groupbox{{{small{<<calendar thismonth>><script>\n place.lastChild.style.width="100%";\n </script>}}}}}}}}}===
{{fine{{{floatright{<<tiddler ExpandSlidersScript with: "sidebar" "expand" "collapse">>}}}}}}++++(goto)[goto]...{{borderleft{\n <<tiddler SiteMenuGoto>>}}}===\n++++(search)[search]...{{borderleft{\n <<tiddler SiteMenuSearch>>}}}===\n{{floatright{<<tiddler ToggleReadOnly>>}}}+++(file)[file]...{{borderleft{\n <<tiddler SiteMenuFile>>}}}===\n+++(edit)[edit]...{{borderleft{\n <<tiddler SiteMenuEdit>>}}}===\n+++(view)[view]...{{borderleft{\n <<tiddler SiteMenuView>>}}}===\n+++(options)[options]...{{borderleft{\n <<tiddler SiteMenuOptions>>}}}===
{{fine{{{floatright{<<tiddler ExpandSlidersScript with: "sidebar" "expand" "collapse">>}}}}}}++++(goto)[goto]...{{borderleft{\n <<tiddler SiteMenuGoto>>}}}===\n++++(search)[search]...{{borderleft{\n <<tiddler SiteMenuSearch>>}}}===\n{{floatright{<<tiddler ToggleReadOnly>>}}}+++(file)[file]...{{borderleft{\n <<tiddler SiteMenuFile>>}}}===\n+++(edit)[edit]...{{borderleft{\n <<tiddler SiteMenuEdit>>}}}===\n+++(view)[view]...{{borderleft{\n <<tiddler SiteMenuView>>}}}===\n+++(options)[options]...{{borderleft{\n <<tiddler SiteMenuOptions>>}}}===
/%\n\nTIDDLER CONTENTS COPIED FROM: SideBarTabsFull\n\n%/+++(contents)[contents]...\n <<tabs txtMainTab Listbox 'TableOfContentsPlugin enhanced listbox' SideBarTabsListbox Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>===\n<script>var s=place.lastChild.button.style; s.marginLeft=".3em"; s.display="block"; s.padding=".2em";</script>
+++(contents)[contents]...\n <<tabs txtMainTab Listbox 'TableOfContentsPlugin enhanced listbox' SideBarTabsListbox Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>===\n<script>var s=place.lastChild.button.style; s.marginLeft=".3em"; s.display="block"; s.padding=".2em";</script>
<<tableOfContents "label:select a tiddler" date:YYYY.0MM.0DD width:100% padding:0 margin:0>><script>place.id="TOCListbox";place.lastChild.lastChild.style.color="#000";</script>
+++(contents)[contents]...\n <<tabs txtMainTab Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>===\n<script>var s=place.lastChild.button.style; s.marginLeft=".3em"; s.display="block"; s.padding=".2em";</script>
+++(contents)[contents]...\n <<tabs txtMainTab Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>===\n<script>var s=place.lastChild.button.style; s.marginLeft=".3em"; s.display="block"; s.padding=".2em";</script>
/***\n|''Name:''|SinglePageModePlugin|\n|''Source:''|http://www.TiddlyTools.com/#SinglePageModePlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nNormally, as you click on the links in TiddlyWiki, more and more tiddlers are displayed on the page. The order of this tiddler display depends upon when and where you have clicked. Some people like this non-linear method of reading the document, while others have reported that when many tiddlers have been opened, it can get somewhat confusing.\n\n!!!!!Usage\n<<<\nSinglePageMode allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one item displayed at a time. When SinglePageMode is enabled, the title of the current tiddler is automatically displayed in the browser window's titlebar and the browser's location URL is updated with a 'permalink' for the current tiddler so that it is easier to create a browser 'bookmark' for the current tiddler.\n\nEven when SinglePageMode is disabled (i.e., displaying multiple tiddlers is permitted), you can reduce the potential for confusion by enable TopOfPageMode, which forces tiddlers to always open at the top of the page instead of being displayed following the tiddler containing the link that was clicked.\n<<<\n!!!!!Configuration\n<<<\nWhen installed, this plugin automatically adds checkboxes in the AdvancedOptions tiddler so you can enable/disable the plugin behavior. For convenience, these checkboxes are also included here:\n\n<<option chkSinglePageMode>> Display one tiddler at a time\n<<option chkTopOfPageMode>> Always open tiddlers at the top of the page\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''SinglePageModePlugin'' (tagged with <<tag systemConfig>>)\n^^documentation and javascript for SinglePageMode handling^^\n\nWhen installed, this plugin automatically adds checkboxes in the ''shadow'' AdvancedOptions tiddler so you can enable/disable this behavior. However, if you have customized your AdvancedOptions, you will need to ''manually add these checkboxes to your customized tiddler.''\n<<<\n!!!!!Revision History\n<<<\n''2006.07.04 [2.2.1]'' in hijack for displayTiddlers(), suspend TPM as well as SPM so that DefaultTiddlers displays in the correct order.\n''2006.06.01 [2.2.0]'' added chkTopOfPageMode (TPM) handling\n''2006.02.04 [2.1.1]'' moved global variable declarations to config.* to avoid FireFox 1.5.0.1 crash bug when assigning to globals\n''2005.12.27 [2.1.0]'' hijack displayTiddlers() so that SPM can be suspended during startup while displaying the DefaultTiddlers (or #hash list). Also, corrected initialization for undefined SPM flag to "false", so default behavior is to display multiple tiddlers\n''2005.12.27 [2.0.0]'' Update for TW2.0\n''2005.11.24 [1.1.2]'' When the back and forward buttons are used, the page now changes to match the URL. Based on code added by Clint Checketts\n''2005.10.14 [1.1.1]'' permalink creation now calls encodeTiddlyLink() to handle tiddler titles with spaces in them\n''2005.10.14 [1.1.0]'' added automatic setting of window title and location bar ('auto-permalink'). feature suggestion by David Dickens.\n''2005.10.09 [1.0.1]'' combined documentation and code in a single tiddler\n''2005.08.15 [1.0.0]'' Initial Release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].\nSupport for BACK/FORWARD buttons adapted from code developed by Clint Checketts\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.SinglePageMode= {major: 2, minor: 2, revision: 1, date: new Date(2006,7,3)};\n\nif (config.options.chkSinglePageMode==undefined) config.options.chkSinglePageMode=false;\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkSinglePageMode>> Display one tiddler at a time";\n\nif (config.options.chkTopOfPageMode==undefined) config.options.chkTopOfPageMode=false;\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkTopOfPageMode>> Always open tiddlers at the top of the page";\n\nconfig.SPMTimer = 0;\nconfig.lastURL = window.location.hash;\nfunction checkLastURL()\n{\n if (!config.options.chkSinglePageMode)\n { window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }\n if (config.lastURL == window.location.hash)\n return;\n var tiddlerName = convertUTF8ToUnicode(decodeURI(window.location.hash.substr(1)));\n tiddlerName=tiddlerName.replace(/\s[\s[/,"").replace(/\s]\s]/,""); // strip any [[ ]] bracketing\n if (tiddlerName.length) story.displayTiddler(null,tiddlerName,1,null,null);\n}\n\nif (Story.prototype.SPM_coreDisplayTiddler==undefined) Story.prototype.SPM_coreDisplayTiddler=Story.prototype.displayTiddler;\nStory.prototype.displayTiddler = function(srcElement,title,template,animate,slowly)\n{\n if (config.options.chkSinglePageMode) {\n window.location.hash = encodeURIComponent(String.encodeTiddlyLink(title));\n config.lastURL = window.location.hash;\n document.title = wikifyPlain("SiteTitle") + " - " + title;\n story.closeAllTiddlers();\n if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);\n }\n if (config.options.chkTopOfPageMode) { story.closeTiddler(title); window.scrollTo(0,0); srcElement=null; }\n this.SPM_coreDisplayTiddler(srcElement,title,template,animate,slowly)\n}\n\nif (Story.prototype.SPM_coreDisplayTiddlers==undefined) Story.prototype.SPM_coreDisplayTiddlers=Story.prototype.displayTiddlers;\nStory.prototype.displayTiddlers = function(srcElement,titles,template,unused1,unused2,animate,slowly)\n{\n // suspend single-page mode when displaying multiple tiddlers\n var saveSPM=config.options.chkSinglePageMode; config.options.chkSinglePageMode=false;\n var saveTPM=config.options.chkTopOfPageMode; config.options.chkTopOfPageMode=false;\n this.SPM_coreDisplayTiddlers(srcElement,titles,template,unused1,unused2,animate,slowly);\n config.options.chkSinglePageMode=saveSPM; config.options.chkTopOfPageMode=saveTPM;\n}\n//}}}
{{floatright{{{nowrap{+++^18em^[goto]...{{wrap{\n <<moveablePanel>>goto tiddler\n----\n <<tiddler SiteMenuGoto>>}}}===\n +++^18em^[search]...{{wrap{\n <<moveablePanel>>search\n----\n <<tiddler SiteMenuSearch>>}}}===\n | +++^18em^[file]...{{wrap{\n <<moveablePanel>>file: <<tiddler ToggleReadOnly>>\n----\n <<tiddler SiteMenuFile>>}}}===\n +++^16em^[edit]...{{wrap{\n <<moveablePanel>>edit\n----\n <<tiddler SiteMenuEdit>>}}}===\n +++^16em^[view]...{{wrap{\n <<moveablePanel>>view\n----\n <<tiddler SiteMenuView>>}}}===\n +++^18em^[options]...{{wrap{\n <<moveablePanel>>options\n----\n <<tiddler SiteMenuOptions>>}}}===\n | +++^18em^[calendar]...{{wrap{\n <<moveablePanel>>calendar\n----\n {{small{<<calendar thismonth>><script>place.lastChild.style.width="100%";</script>}}}===\n +++^18em^[contents]...{{wrap{\n <<moveablePanel>>contents\n----\n <<tabs txtMainTab Listbox 'TableOfContentsPlugin enhanced listbox' SideBarTabsListbox Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>}}}===\n}}}}}}{{nowrap{<script label="welcome">\n story.closeTiddler('Welcome');\n story.displayTiddler(null,'Welcome',1);\n return false;\n</script> +++^60%^[about]...{{wrap{\n <<moveablePanel>>About\n----\n <<tiddler About>>}}}===\n +++^60%^[download]...{{wrap{\n <<moveablePanel>>Download\n----\n <<tiddler Download>>}}}===\n +++^60%^[contact]...{{wrap{\n <<moveablePanel>>Contact\n----\n <<tiddler Contact>>}}}===\n | +++^52em^[changes|recently changed tiddlers]...{{wrap{\n <<moveablePanel>>[[changes|ShowRecentChanges]] /%\n %/{{fine{//@@color:#999;as of <<date filedate "MMM DDth, YYYY 0hh:0mm:0ss">>@@//}}}\n----\n <<tiddler ShowRecentChanges>>}}}===\n @@position:relative;+++^[plugins|installed plugins, scripts, macros, stylesheets, templates, etc.]...{{wrap{\n <<moveablePanel>>catalog\n----\n <<tiddler ShowCatalog>><script>\n if ((version.major+version.minor/10)>=2.1)\n return "<html><hr></html>+++{{nowrap{[plugin manager...]}}}...{{borderleft{\sn@@display:block;height:20em;width:50em;overflow:auto;<<plugins>>@@@@display:block;text-align:right;^^scroll for more...^^@@}}}===";\n </script>}}}===\n@@ +++^60%^[(c)|copyright, licensing and other legal notices]...{{wrap{\n <<moveablePanel>>LegalStatements\n----\n <<tiddler ScrollBox with: LegalStatements 30em>>}}}===<script>\n place.lastChild.button.innerHTML="&copy;"; // set here since can't use HTML in slider label definition\n </script> | +++(SiteMenu_extras)[extras...]{{wrap{<<tiddler SiteMenuExtras>>}}}===}}}
<script>\n if (readOnly) return "@@font-size:7pt;read-only: no functions available@@"\n var out="<<newTiddler>><<br>><<newJournal 'DD MMM YYYY'>>"\n if (config.macros.emptyTrash!=undefined) {\n out+= "{{bordertop{\sn";\n out+="{{floatright fine{[[view trash|"+config.macros.emptyTrash.tag+"]]}}}";\n out+="<<emptyTrash>>}}}"\n }\n return out;\n</script>
/%\n\nTIDDLER CONTENTS COPIED FROM: SiteMenuExtrasFull\n\n%/{{medium{\n+++^60%^[TagCloud|view all tags in this document]...\n <<moveablePanel>>~TagCloud\n----\n {{wrap{<<tagCloud demotag excludeMissing excludeLists excludeSearch>>}}}===\n&nbsp; @@position:relative;+++^[TagGrid|view all tags in this document]...\n <<moveablePanel>>~TagGrid\n----\n {{small{<<tagGrid +FavoriteTags +FavoriteTags eeeeff 3333ff colorAll sortrows sortcolumns>>}}}===\n@@&nbsp; +++^70%^[MiniBrowser|surf to other web site from inside TiddlyWiki]...\n <<moveablePanel>>MiniBrowser\n----\n <<tiddler MiniBrowser with: menubar>>===\n&nbsp; +++^640px^[MediaCenter|combined media player for windows, real, quicktime, and flash]...\n <<moveablePanel>>MediaCenter\n----\n <<tiddler MediaCenter with: menubar>>===\n&nbsp; +++(SiteMenuExtras_TidIDE)[TidIDE|TiddlyWiki Integrated Development Environment]...\n {{normal{<<tiddler TidIDEMenu>>}}}===<script>\n place.lastChild.id="extras_TidIDE";\n</script> &nbsp; +++(SiteMenuExtras_TiddlyCards)[TiddlyCards|embedded self-contained HTML forms]...\n {{fine{TiddlyCards has moved! Please visit the [[TiddlyCards Distribution Page|http://www.TiddlyTools.com/tiddlycards.html]] for more information}}}===<script>\n place.lastChild.id="extras_TiddlyCards";\n</script><script>\n place.insertBefore(document.getElementById("extras_TidIDE"),null);\n place.insertBefore(document.getElementById("extras_TiddlyCards"),null);\n</script><<tiddler HideTiddlerSubtitle>><<tiddler HideTiddlerTags>><<tiddler DoubleClickDisable>><script>\n var here=story.findContainingTiddler(place);\n if (here && here.getAttribute("tiddler")=="SiteMenuExtras")\n return '<<tiddler ReplaceTiddlerTitle with: "extras...">>';\n</script>}}}
{{medium{\n+++^60%^[TagCloud|view all tags in this document]...\n <<moveablePanel>>~TagCloud\n----\n {{wrap{<<tagCloud demotag excludeMissing excludeLists excludeSearch>>}}}===\n&nbsp; @@position:relative;+++^[TagGrid|view all tags in this document]...\n <<moveablePanel>>~TagGrid\n----\n {{small{<<tagGrid +FavoriteTags +FavoriteTags eeeeff 3333ff colorAll sortrows sortcolumns>>}}}===\n@@&nbsp; +++^70%^[MiniBrowser|surf to other web site from inside TiddlyWiki]...\n <<moveablePanel>>MiniBrowser\n----\n <<tiddler MiniBrowser with: menubar>>===\n&nbsp; +++^640px^[MediaCenter|combined media player for windows, real, quicktime, and flash]...\n <<moveablePanel>>MediaCenter\n----\n <<tiddler MediaCenter with: menubar>>===\n&nbsp; +++(SiteMenuExtras_TidIDE)[TidIDE|TiddlyWiki Integrated Development Environment]...\n {{normal{<<tiddler TidIDEMenu>>}}}===<script>\n place.lastChild.id="extras_TidIDE";\n</script> &nbsp; +++(SiteMenuExtras_TiddlyCards)[TiddlyCards|embedded self-contained HTML forms]...\n {{fine{TiddlyCards has moved! Please visit the [[TiddlyCards Distribution Page|http://www.TiddlyTools.com/tiddlycards.html]] for more information}}}===<script>\n place.lastChild.id="extras_TiddlyCards";\n</script><script>\n place.insertBefore(document.getElementById("extras_TidIDE"),null);\n place.insertBefore(document.getElementById("extras_TiddlyCards"),null);\n</script><<tiddler HideTiddlerSubtitle>><<tiddler HideTiddlerTags>><<tiddler DoubleClickDisable>><script>\n var here=story.findContainingTiddler(place);\n if (here && here.getAttribute("tiddler")=="SiteMenuExtras")\n return '<<tiddler ReplaceTiddlerTitle with: "extras...">>';\n</script>}}}
{{medium{+++^60%^[TagCloud|view all tags in this document]...\n <<moveablePanel>>~TagCloud\n----\n {{wrap{<<tagCloud demotag excludeMissing excludeLists excludeSearch>>}}}===\n}}}<<tiddler HideTiddlerSubtitle>><<tiddler HideTiddlerTags>><<tiddler DoubleClickDisable>><script>\n var here=story.findContainingTiddler(place);\n if (here && here.getAttribute("tiddler")=="SiteMenuExtras")\n return '<<tiddler ReplaceTiddlerTitle with: "extras...">>';\n</script>
/% note: only modify the lines in between BEGIN EDIT and END EDIT\n\nBEGIN EDIT %/\n<script label="replace this with your extra menu commands...">story.displayTiddler(null,"SiteMenuExtras",2);</script>\n/% END EDIT\n\n%/<<tiddler HideTiddlerSubtitle>><<tiddler HideTiddlerTags>><<tiddler DoubleClickDisable>><script>\n var here=story.findContainingTiddler(place);\n if (here && here.getAttribute("tiddler")=="SiteMenuExtras")\n return '<<tiddler ReplaceTiddlerTitle with: "extras...">>';\n</script>
/%\n\nTIDDLER CONTENTS COPIED FROM: SiteMenuFileFull\n\n%/@@display:block;{{borderbottom{\n<<saveChanges>>}}}@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n<<newDocument ask all>>}}}@@@@display:block;<<upload>> //(password req'd)//@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n[[download from web|Download]]}}}@@@@display:block;<<attach>>@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;<<importTiddlers link>>@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n<<exportTiddlers>>}}}@@+++(newdocument)[new document...]...<<tiddler NewDocumentList>>===
@@display:block;{{borderbottom{\n<<saveChanges>>}}}@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n<<newDocument ask all>>}}}@@@@display:block;<<upload>> //(password req'd)//@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n[[download from web|Download]]}}}@@@@display:block;<<attach>>@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;<<importTiddlers link>>@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n<<exportTiddlers>>}}}@@+++(newdocument)[new document...]...<<tiddler NewDocumentList>>===
@@display:block;{{borderbottom{\n<<saveChanges>>}}}@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n<<newDocument ask all>>}}}@@@@display:block;<<upload>> //(password req'd)//@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n[[download from web|Download]]}}}@@@@display:block;{{borderbottom{\n<<importTiddlers link>>}}}@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>+++(newdocument)[new document...]...<<tiddler NewDocumentList>>===
@@display:block;{{borderbottom{\n<<saveChanges>>}}}@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>@@display:block;{{borderbottom{\n<<newDocument ask all>>}}}@@@@display:block;{{borderbottom{\n<<importTiddlers link>>}}}@@<script>\n if(readOnly)place.lastChild.style.display="none";\n</script>+++(newdocument)[new document...]...<<tiddler NewDocumentList>>===
/%\n\nTIDDLER CONTENTS COPIED FROM: SiteMenuGotoFull\n\n%/{{right{{{floatleft{tiddler}}}+++(groups)[groups]...\n {{left smallform{<<tiddlerGroups>>}}}===<script>\n place.lastChild.id="SiteMenuGoto_groups"\n </script> | +++(recent)[recent]...\n {{center{{{small{<<date popup Y M D-1 "yesterday" "DDD MMM DDth YYYY">>/%\n %/ <<date popup today "today" "DDD MMM DDth YYYY">>/%\n %/ <<date popup Y M D+1 "tomorrow" "DDD MMM DDth YYYY">>}}}}}}===<script>\n place.lastChild.id="SiteMenuGoto_recent"\n </script>}}}<<goto width:98.5%;margin:0;font-size:8pt; width:85%;font-size:8pt;>><script>\n place.insertBefore(document.getElementById("SiteMenuGoto_groups"),null);\n place.insertBefore(document.getElementById("SiteMenuGoto_recent"),null);\n</script>
{{right{{{floatleft{tiddler}}}+++(groups)[groups]...\n {{left smallform{<<tiddlerGroups>>}}}===<script>\n place.lastChild.id="SiteMenuGoto_groups"\n </script> | +++(recent)[recent]...\n {{center{{{small{<<date popup Y M D-1 "yesterday" "DDD MMM DDth YYYY">>/%\n %/ <<date popup today "today" "DDD MMM DDth YYYY">>/%\n %/ <<date popup Y M D+1 "tomorrow" "DDD MMM DDth YYYY">>}}}}}}===<script>\n place.lastChild.id="SiteMenuGoto_recent"\n </script>}}}<<goto width:98.5%;margin:0;font-size:8pt; width:85%;font-size:8pt;>><script>\n place.insertBefore(document.getElementById("SiteMenuGoto_groups"),null);\n place.insertBefore(document.getElementById("SiteMenuGoto_recent"),null);\n</script>
{{right{{{floatleft{tiddler}}}+++(groups)[groups]...\n {{left smallform{<<tiddlerGroups>>}}}===<script>\n place.lastChild.id="SiteMenuGoto_groups"\n </script>}}}<<goto width:98.5%;margin:0;font-size:8pt; width:85%;font-size:8pt;>><script>\n place.insertBefore(document.getElementById("SiteMenuGoto_groups"),null);\n</script>
tiddler\n<<goto width:98.5%;margin:0;font-size:8pt; width:85%;font-size:8pt;>>
{{floatright{{{nowrap{+++^18em^[goto]...{{wrap{\n <<moveablePanel>>goto tiddler\n----\n <<tiddler SiteMenuGoto>>}}}===\n +++^18em^[search]...{{wrap{\n <<moveablePanel>>search\n----\n <<tiddler SiteMenuSearch>>}}}===\n | +++^18em^[file]...{{wrap{\n <<moveablePanel>>file: <<tiddler ToggleReadOnly>>\n----\n <<tiddler SiteMenuFile>>}}}===\n +++^16em^[edit]...{{wrap{\n <<moveablePanel>>edit\n----\n <<tiddler SiteMenuEdit>>}}}===\n +++^16em^[view]...{{wrap{\n <<moveablePanel>>view\n----\n <<tiddler SiteMenuView>>}}}===\n +++^18em^[options]...{{wrap{\n <<moveablePanel>>options\n----\n <<tiddler SiteMenuOptions>>}}}===\n | +++^18em^[contents]...{{wrap{\n <<moveablePanel>>contents\n----\n <<tabs txtMainTab Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>}}}===\n}}}}}}{{nowrap{<script label="welcome">\n story.closeTiddler('Welcome');\n story.displayTiddler(null,'Welcome',1);\n return false;\n</script> +++^60%^[about]...{{wrap{\n <<moveablePanel>>About\n----\n <<tiddler About>>}}}===\n +++^60%^[download]...{{wrap{\n <<moveablePanel>>Download\n----\n <<tiddler Download>>}}}===\n +++^60%^[contact]...{{wrap{\n <<moveablePanel>>Contact\n----\n <<tiddler Contact>>}}}===\n | +++^52em^[changes|recently changed tiddlers]...{{wrap{\n <<moveablePanel>>[[changes|ShowRecentChanges]] /%\n %/{{fine{//@@color:#999;as of <<date filedate "MMM DDth, YYYY 0hh:0mm:0ss">>@@//}}}\n----\n <<tiddler ShowRecentChanges>>}}}===\n +++^60%^[(c)|copyright, licensing and other legal notices]...{{wrap{\n <<moveablePanel>>[[legal|LegalStatements]]\n----\n <<tiddler ScrollBox with: LegalStatements 30em>>}}}===<script>\n place.lastChild.button.innerHTML="&copy;"; // set here since can't use HTML in slider label definition\n </script> | +++(SiteMenu_extras)[extras...]{{wrap{<<tiddler SiteMenuExtras>>}}}===}}}
{{floatright{{{nowrap{+++^18em^[goto]...{{wrap{\n <<moveablePanel>>goto tiddler\n----\n <<tiddler SiteMenuGoto>>}}}===\n +++^18em^[search]...{{wrap{\n <<moveablePanel>>search\n----\n <<tiddler SiteMenuSearch>>}}}===\n | +++^18em^[file]...{{wrap{\n <<moveablePanel>>file: <<tiddler ToggleReadOnly>>\n----\n <<tiddler SiteMenuFile>>}}}===\n +++^16em^[edit]...{{wrap{\n <<moveablePanel>>edit\n----\n <<tiddler SiteMenuEdit>>}}}===\n +++^16em^[view]...{{wrap{\n <<moveablePanel>>view\n----\n <<tiddler SiteMenuView>>}}}===\n +++^18em^[options]...{{wrap{\n <<moveablePanel>>options\n----\n <<tiddler SiteMenuOptions>>}}}===\n | +++^18em^[contents]...{{wrap{\n <<moveablePanel>>contents\n----\n <<tabs txtMainTab Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>}}}===\n}}}}}}{{nowrap{<script label="welcome">\n story.closeTiddler('Welcome');\n story.displayTiddler(null,'Welcome',1);\n return false;\n</script> +++^60%^[about]...{{wrap{\n <<moveablePanel>>About\n----\n <<tiddler About>>}}}===\n +++^60%^[(c)|copyright, licensing and other legal notices]...{{wrap{\n <<moveablePanel>>LegalStatements\n----\n <<tiddler ScrollBox with: LegalStatements 30em>>}}}===<script>\n place.lastChild.button.innerHTML="&copy;"; // set here since can't use HTML in slider label definition\n </script> | +++(SiteMenu_extras)[extras...]{{wrap{<<tiddler SiteMenuExtras>>}}}===}}}
/%\n\nTIDDLER CONTENTS COPIED FROM: SiteMenuOptionsFull\n\n%/@@display:block;{{floatright{<<tiddler RandomThemeChooser>>}}}++++(themes)[themes]\n <<selectStylesheet size:1 width:100%>>===\n@@@@display:block;+++(displayoptions)[display]\n {{borderleft{\n <<tiddler ToggleSiteTitles>>\n <<tiddler ToggleSiteMenu>>\n <<tiddler ToggleScrollingSidebars>>\n <<tiddler ToggleTopButton>>\n <<option chkSinglePageMode>> one tiddler at a time\n <<option chkTopOfPageMode>> open at top of page\n <<option chkAnimate>> animation <<option chkEnableFade>> fade-in/out}}}===\n@@@@display:block;+++(saving)[saving]\n {{borderleft{\n <<option chkAutoSave>> auto save\n <<option chkSaveBackups>> create backup file\n <<option chkGenerateAnRssFeed>> create .xml file}}}===\n@@@@display:block;+++(upload)[upload]\n {{borderleft{\n <<tiddler SiteMenuOptionsUpload>>}}}===\n@@@@display:block;+++[username]\n <<option txtUserName>><script>\n place.lastChild.setAttribute("autocomplete","off");\n var s=place.lastChild.style;s.width="98%";s.fontSize="8pt";\n </script>===\n@@@@display:block;+++(cookies)[cookies]\n <<tiddler ShowCookies>>===\n@@[[AdvancedOptions]]<script>\n place.lastChild.style.fontStyle="normal";\n place.lastChild.style.fontWeight="normal";\n place.lastChild.innerHTML="advanced options...";\n</script>
@@display:block;{{floatright{<<tiddler RandomThemeChooser>>}}}++++(themes)[themes]\n <<selectStylesheet size:1 width:100%>>===\n@@@@display:block;+++(displayoptions)[display]\n {{borderleft{\n <<tiddler ToggleSiteTitles>>\n <<tiddler ToggleSiteMenu>>\n <<tiddler ToggleScrollingSidebars>>\n <<tiddler ToggleTopButton>>\n <<option chkSinglePageMode>> one tiddler at a time\n <<option chkTopOfPageMode>> open at top of page\n <<option chkAnimate>> animation <<option chkEnableFade>> fade-in/out}}}===\n@@@@display:block;+++(saving)[saving]\n {{borderleft{\n <<option chkAutoSave>> auto save\n <<option chkSaveBackups>> create backup file\n <<option chkGenerateAnRssFeed>> create .xml file}}}===\n@@@@display:block;+++(upload)[upload]\n {{borderleft{\n <<tiddler SiteMenuOptionsUpload>>}}}===\n@@@@display:block;+++[username]\n <<option txtUserName>><script>\n place.lastChild.setAttribute("autocomplete","off");\n var s=place.lastChild.style;s.width="98%";s.fontSize="8pt";\n </script>===\n@@@@display:block;+++(cookies)[cookies]\n <<tiddler ShowCookies>>===\n@@[[AdvancedOptions]]<script>\n place.lastChild.style.fontStyle="normal";\n place.lastChild.style.fontWeight="normal";\n place.lastChild.innerHTML="advanced options...";\n</script>
@@display:block;{{floatright{<<tiddler RandomThemeChooser>>}}}++++(themes)[themes]\n <<selectStylesheet size:1 width:100%>>===\n@@@@display:block;+++(displayoptions)[display]\n {{borderleft{\n <<tiddler ToggleSiteTitles>>\n <<tiddler ToggleSiteMenu>>\n <<tiddler ToggleScrollingSidebars>>\n <<tiddler ToggleTopButton>>\n <<option chkAnimate>> animation <<option chkEnableFade>> fade-in/out}}}===\n@@@@display:block;+++(saving)[saving]\n {{borderleft{\n <<option chkAutoSave>> auto save\n <<option chkSaveBackups>> create backup file}}}===\n@@@@display:block;+++(upload)[upload]\n {{borderleft {\n <<tiddler SiteMenuOptionsUpload>>}}}===\n@@@@display:block;+++[username]\n <<option txtUserName>><script>\n place.lastChild.setAttribute("autocomplete","off");\n var s=place.lastChild.style;s.width="98%";s.fontSize="8pt";\n </script>===\n@@[[AdvancedOptions]]<script>\n place.lastChild.style.fontStyle="normal";\n place.lastChild.style.fontWeight="normal";\n place.lastChild.innerHTML="advanced options...";\n</script>
@@display:block;{{floatright{<<tiddler RandomThemeChooser>>}}}++++(themes)[themes]\n <<selectStylesheet size:1 width:100%>>===\n@@@@display:block;+++(displayoptions)[display]\n {{borderleft{\n <<tiddler ToggleScrollingSidebars>>\n <<tiddler ToggleTopButton>>\n <<option chkAnimate>> animation <<option chkEnableFade>> fade-in/out}}}===\n@@@@display:block;+++(saving)[saving]\n {{borderleft{\n <<option chkAutoSave>> auto save\n <<option chkSaveBackups>> create backup file}}}===\n@@@@display:block;+++[username]\n <<option txtUserName>><script>\n place.lastChild.setAttribute("autocomplete","off");\n var s=place.lastChild.style;s.width="98%";s.fontSize="8pt";\n </script>===\n@@[[AdvancedOptions]]<script>\n place.lastChild.style.fontStyle="normal";\n place.lastChild.style.fontWeight="normal";\n place.lastChild.innerHTML="advanced options...";\n</script>
@@display:block;+++[script URL]...\n<<option txtUploadStoreUrl>><script>\n place.lastChild.title="URL for server-side upload processing";\n place.lastChild.setAttribute("autocomplete","off")\n var s=place.lastChild.style;s.width="98%";s.fontSize="8pt";s.margin="0";\n</script>===\n@@@@display:block;+++[target path]...\n<<option txtUploadDir>><script>\n place.lastChild.title="target path (blank=same as script URL)";\n place.lastChild.setAttribute("autocomplete","off")\n var s=place.lastChild.style;s.width="98%";s.fontSize="8pt";s.margin="0";\n</script>===\n@@@@display:block;+++[target filename]...\n<<option txtUploadFilename>><script>\n place.lastChild.title="target filename (blank=use current filename)";\n place.lastChild.setAttribute("autocomplete","off")\n var s=place.lastChild.style;s.width="98%";s.fontSize="8pt";s.margin="0";\n</script>===\n@@@@display:block;+++[backup path]...\n<<option txtUploadBackupDir>><script>\n place.lastChild.title="backup path (blank=same as path)";\n place.lastChild.setAttribute("autocomplete","off")\n var s=place.lastChild.style;s.width="98%";s.fontSize="8pt";s.margin="0";\n</script>===@@
{{floatright{+++[options|advanced search options]\n {{borderbottom{\n @@display:block;<<option chkSearchTitles>> titles <<option chkSearchText>> text <<option chkSearchTags>> tags@@}}}<<option chkSearchTitlesFirst>> show titles first\n <<option chkSearchList>> list in SearchResults\n <<option chkRegExpSearch>> text patterns\n <<option chkCaseSensitiveSearch>> case sensitive\n <<option chkSearchIncremental>> key-by-key search\n <<option chkSearchShadows>> search in shadows\n <<option chkSearchFields>> search in data fields<script>\n place.style.padding=".5em";\n </script><script>\n place.id="sidebarSearchOptions" // so we can move this panel\n config.macros.search.label="find tiddlers";\n </script>===}}}<<search>><script>\n var s=place.lastChild.style;s.fontSize="8pt";s.width="98.5%"; // adjust search control style\n place.appendChild(document.getElementById("sidebarSearchOptions")); // move panel here\n</script>
{{borderbottom{\n@@display:block;<script label="refresh display">\n refreshDisplay()\n</script><script>\n place.lastChild.style.fontWeight="normal"\n place.lastChild.title="refresh current page display WITHOUT reloading page contents"\n</script>@@}}}<<permaview>>\n{{borderbottom{\n@@display:block;<<newDocument "label:snapshot" ask snap>>@@}}}<<closeAll>>\n
http://www.TiddlyTools.com/proxy.php?url=
This tiddler is included in the PageTemplate as a ''hidden SPAN''. You can use it include macros or inline scripts that are automatically invoked whenever the document is loaded.\n\n!!!!!initialize left/right sidebar displays\n<<<\nThe ToggleLeftSidebar and ToggleRightSidebar inline scripts set the visibility (//display:none// or //display:block//) of the MainMenu ('left sidebar', DOM ID=//mainMenu//) and SideBarOptions ('right sidebar', DOM ID=//sidebar//) displays. They also adjust the margins of the center column ('story', DOM ID=//displayArea//) accordingly, so that it uses the available space without overlapping the sidebars. The ToggleScrollingSidebars inline script sets 'position:fixed' for the sidebars, so that they remain fixed in place (aka, "hover") when the rest of the page content is scrolled.\n\ndisplayArea margins:\n<script>\n config.options.txtDisplayAreaRightMargin="18em";\n config.options.txtDisplayAreaLeftMargin="13em";\n</script>\nleft: <<option txtDisplayAreaLeftMargin>> right: <<option txtDisplayAreaRightMargin>>\n|{{{<<tiddler ToggleLeftSidebar>>}}} |<<tiddler ToggleLeftSidebar>> |\n|{{{<<tiddler ToggleRightSidebar>>}}} |<<tiddler ToggleRightSidebar>> |\n|{{{<<tiddler ToggleScrollingSidebars>>}}} |<<tiddler ToggleScrollingSidebars>> |\n<<<\n!!!!!initialize header display\n<<<\nThe ToggleSiteTitles inline script sets the visibility (//display:none// or //display:block//) of the SiteTitle/SiteSubtitle display area ('page titles', DOM ID=//header//)\n|{{{<<tiddler ToggleSiteTitles>>}}} |<<tiddler ToggleSiteTitles>> |\n<<<\n!!!!!"scroll to top" button\n<<<\nThe ToggleTopButton script creates a link that 'hovers' in the lower right corner of your browser window and, when clicked, causes the page to return to the top (assuming it has been scrolled down...). The script also provides an interface so you can enable/disable this feature:\n|{{{<<tiddler ToggleTopButton>>}}} |<<tiddler ToggleTopButton>> |\n<<<\n!!!!!toggle low-profile SiteMenu\n<<<\nThe ToggleSiteMenu inline script sets the visibility (//display:none// or //display:block//) of the SiteMenu display area ('menubar', DOM ID=//siteMenu//).\n|{{{<<tiddler ToggleSiteMenu>>}}} |<<tiddler ToggleSiteMenu>> |\n<<<\n
Corpus scriptorum Croaticorum digitale\nDigitalni korpus hrvatskih latinista\nA digital corpus of Croatian Latin writers
Croatiae auctores Latini\n
http://www.TiddlyTools.com/
/%\n\nTIDDLER CONTENTS COPIED FROM: StoryMenu\n\n%/{{center{{{fine{{{floatleft{<<tiddler ToggleLeftSidebar>>}}}{{floatright{<<tiddler ToggleRightSidebar>>}}}<<tiddler ShowUnsavedChanges>>}}}}}}\n
[[StyleSheetAdjustments]]\n\n/***\nChange this to set the default stylesheet:\n***/\n[[Edge of Night]]
[[StyleSheetPlugins]] /* include adjustments to plugin-supplied definitions */\n[[StyleSheetShortcuts]] /* include formatting "shortcut" definitions */\n\n/***\nThe following CSS declarations extend/enhance the TiddlyWiki default shadowed stylesheets.\n\nThese 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.\n\n/***\n!body /%==================================================%/\nIE needs explicit "position:static" declaration (fixes 'partial background display bug')\n***/\n/*{{{*/\nbody { font-family: Verdana,Arial,Helvetica; position:static; }\n/*}}}*/\n\n/***\n!common colors /%==================================================%/\n***/\n/*{{{*/\n/* these seem to have been omitted from the core defaults for link styles */\na { color:#014; }\na:hover { color:#f00; }\n/*}}}*/\n\n/***\n!header and titles /%==================================================%/\nIE needs explicit "position:static" declaration (fixes 'background display hides text bug')\n***/\n/*{{{*/\n.header\n { background:transparent; padding:.2em 1em; border-bottom:1px solid; position:static; }\n.headerShadow, .headerForeground\n { padding:.5em; }\n.header a, .header .button, .header .tiddlyLinkExisting, .header .tiddlyLinkNonExisting\n { font-weight: normal; font-style: normal; }\n.header .externalLink,\n.siteSubtitle a, .siteSubtitle .button, .siteSubtitle .tiddlyLinkExisting, .siteSubtitle .tiddlyLinkNonExisting\n { font-style:italic; text-decoration:none; }\n.header table\n { border-collapse: collapse !important; }\n\n/*}}}*/\n\n/***\n!displayArea /%==================================================%/\n***/\n/*{{{*/\n#displayArea\n { margin-top:0em; }\n/*}}}*/\n\n\n/***\n!popups /%==================================================%/\nwhite-space:nowrap prevents items from wrapping if popup is near right edge of window\nz-index:1000 makes sure popup is above EVERYTHING else\n***/\n/*{{{*/\n.popup\n { white-space: nowrap; z-index:1000; color: #000; background: #ffe; border: 1px solid #000;\n -moz-border-radius-topright: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; }\n.popup a, .popup .button, .popup .tiddlyLinkExisting, .popup .tiddlyLinkNonExisting\n { font-weight: normal; font-style: normal; }\n.popup hr\n { color: #000; background: #ddd; border: 0; }\n.popup li.disabled\n { color: #999; }\n.popup li a, .popup li a:visited\n { color: #300; }\n.popup li a:hover\n { background: #006; color: #fff;}\n/*}}}*/\n\n/***\n!messageArea /%==================================================%/\n***/\n/*{{{*/\n#messageArea\n { font-size:90%; -moz-border-radius:1em; background:#eee; }\n/*}}}*/\n\n/***\n!main menu (left sidebar) /%==================================================%/\n***/\n/*{{{*/\n#mainMenu\n { width:9em; text-align:left; margin:0; margin-top:.5em; margin-left:1.5em; padding:0; }\n*[id="mainMenu"] /* moz browsers only */\n { width:auto !important; } \n/*}}}*/\n\n/***\n!sidebar (right sidebar) /%==================================================%/\n***/\n/*{{{*/\n#sidebar\n { width:18em; margin-right:1em; }\n#sidebarTabs .tab\n { font-size:90%; -moz-border-radius-topleft:.5em; -moz-border-radius-topright:.5em; }\n#sidebarTabs .tabContents\n { background:transparent; border:1px solid #999; padding:.5em; height:auto; overflow:auto; width:92.5%; }\n#sidebarTabs .tabContents .tabContents\n { background:transparent; border:1px solid #999; padding:.5em; height:auto; }\n#sidebarOptions input[type="text"]\n { font-size:8pt; }\n}\n*/\n/*}}}*/\n\n/***\n!tabs /%==================================================%/\n***/\n/*{{{*/\n.tabset\n { padding: 0.2em 0 0 0; }\n.tab\n { padding:0 1px 0 1px; }\n.tabSelected\n { border: 1px solid; border-bottom: 0px !important; margin-bottom:-2px !important; }\n.tabUnselected\n { border: 1px solid #999; }\n.tabContents\n { border: 1px solid; -moz-border-radius:1em; padding: 1em; }\n/*}}}*/\n\n/***\n!tiddler display elements /%==================================================%/\n***/\n/*{{{*/\n.tiddler\n { padding: 0 1em 1em 1em; }\n.button, .button:hover, .button:active,\n.viewer .button, .viewer .button:hover, .viewer .button:active\n { background:transparent; border:0; }\n.toolbar\n { float:right; display:inline; padding-bottom:0; }\n.toolbar .button\n { border:1px solid #69c; background:transparent; margin:0px 1px; padding:0px .2em; -moz-border-radius:.5em; }\n.toolbar .button:hover\n { border:1px solid #69c; background:#006; color:#fff; }\n.tagging, .tagged\n { background-color: #ccc; border: 1px solid; }\n.selected .tagging, .selected .tagged\n { background-color:#eee; border: 1px solid #999; }\n.tagging, .tagged\n { -moz-border-radius:1em; }\n.subtitle\n { font-size:90%; }\n.editor input, .editor textarea\n { font-size: 8pt;}\n.title\n { font-size: 12pt; line-height:120%; }\n.viewer\n { font-size: 9pt; padding: 0.7em; text-align:justify; }\n.viewer pre, .viewer code, .viewer blockquote\n { font-size:8pt; text-align:left; }\n.viewer pre \n { background:#ffe; border:1px solid; }\n.viewer table, .viewer table tr, .viewer table td\n { border:1px solid; }\n.viewer hr {\n margin: 1px; padding:1px;\n border:0;\n border-top: solid 1px #666;\n color: #666;\n}\n.viewer blockquote {\n line-height: 1.5em;\n padding-left: 1em;\n margin-left: 1em;\n border-left: 1px dotted;\n}\n/*}}}*/\n
/***\nThe following CSS declarations modify default style classes defined by various plugins and scripts, and/or used in customized Page/View/Edit templates\n\nThese 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.\n\n/***\n!PageTemplate - siteMenu \n***/\n/*{{{*/\n.siteMenu\n { background:transparent; padding:1em; }\n.siteMenu a, .siteMenu .button, .siteMenu .tiddlyLinkExisting, .siteMenu .tiddlyLinkNonExisting\n { font-weight: normal; font-style: normal; }\n/*** LEAVE THESE OUT FOR NOW\n.siteMenu .button, .siteMenu a\n { border:1px solid transparent; background:transparent; margin:0px; padding:0px 1px; -moz-border-radius:.5em; }\n.siteMenu .button:hover, .siteMenu a:hover\n { border:1px solid #69c; background:#006; color:#fff; }\n***/\n/*}}}*/\n\n/***\n!PageTemplate - storyMenu \n***/\n/*{{{*/\n.storyMenu\n { display:block; margin:0em 1em 0em 1em; }\n.storyMenu a, .storyMenu .button, .storyMenu .tiddlyLinkExisting, .storyMenu .tiddlyLinkNonExisting\n { font-weight: normal; font-style: normal; text-decoration:none; }\n/*}}}*/\n\n/***\n!NestedSlidersPlugin \n***/\n/*{{{*/\n.floatingPanel\n { padding:1em; margin:0em; border:1px solid; -moz-border-radius:1em; font-size:8pt; text-align:left; }\n.floatingPanel hr\n { margin:2px 0 1px 0; padding:0; }\n#sidebarOptions .sliderPanel\n { margin:0; padding:0; font-size:1em; background:transparent; }\n#sidebarOptions .sliderPanel a\n { font-weight:normal; }\n#sidebarOptions .sliderPanel blockquote\n { margin:0;padding:0;margin-left:1em; border-left:1px dotted; padding-left:1em }\n/*}}}*/\n\n/***\n!CheckboxPlugin \n***/\n/*{{{*/\ninput[type="Checkbox"]\n { margin-top:2px;margin-bottom:2px; }\n/*}}}*/\n\n/***\n!BreadcrumbsPlugin \n***/\n/*{{{*/\n/* smaller size for bread crumbs (see BreadcrumbsPlugin) */\n#breadCrumbs\n { display:none; margin:0 1em; font-size:7pt; } /* display:block is set by plugin when crumbs are in use */\n/*}}}*/\n\n/***\n!TableOfContentsPlugin \n***/\n/*{{{*/\n#sidebarTabs .tabContents *[class="TOCList"] /* MOZ ONLY */\n { background-color: transparent; border-color:transparent !important; }\n/*}}}*/\n\n/***\n!AttachFilePlugin \n***/\n/*{{{*/\n#sidebar .attachPanel\n { right:115%; top:3em; text-align:left; }\n/*}}}*/\n\n/***\n!ImportTiddlersPlugin \n***/\n/*{{{*/\n#sidebar #importPanel\n { right:115%; top:6em; text-align:left; }\n/*}}}*/\n\n/***\n!ExportTiddlersPlugin \n***/\n/*{{{*/\n#sidebar #exportPanel\n { right:115%; top:9em; text-align:left; }\n/*}}}*/\n
/***\nThe following CSS declarations provide quick shortcuts for common formatting styles\n\nThese 'style tweaks' can be easily included in other stylesheet tiddler so they can share a baseline look-and-feel that can then be customized to create a wide variety of 'flavors'.\n\n***/\n/*{{{*/\n\n/* text alignments */\n.left\n { display:block;text-align:left; }\n.floatleft\n { float:left; }\n.right \n { display:block;text-align:right; }\n.floatright\n { float:right; }\n.center\n { display:block;text-align:center; }\n.wrap\n { white-space:normal }\n.nowrap\n { white-space:nowrap }\n\n/* font sizes */\n.big\n { font-size:14pt;line-height:120% }\n.medium\n { font-size:12pt;line-height:120% }\n.normal\n { font-size:9pt;line-height:120% }\n.small\n { font-size:8pt;line-height:120% }\n.fine\n { font-size:7pt;line-height:120% }\n.tiny\n { font-size:6pt;line-height:120% }\n.larger\n { font-size:120%; }\n.smaller\n { font-size:80%; }\n\n/* borderless tables */\n.borderless, .borderless table, .borderless td, .borderless tr, .borderless th, .borderless tbody\n { border:0 !important; margin:0 !important; padding:0 !important; }\n\n/* thumbnail images (fixed-sized scaled images) */\n.thumbnail img { height:5em !important; }\n\n/* grouped content */\n.outline\n { display:block; padding:1em; -moz-border-radius:1em; border:1px solid; }\n.menubox\n { display:block; padding:1em; -moz-border-radius:1em; border:1px solid; background:#fff; color:#000; }\n.menubox a, .menubox .button, .menubox .tiddlyLinkExisting, .menubox .tiddlyLinkNonExisting\n { color:#009 !important; }\n.groupbox\n { display:block; padding:1em; -moz-border-radius:1em; border:1px solid; background:#ffe; color:#000; }\n.groupbox a, .groupbox .button, .groupbox .tiddlyLinkExisting, .groupbox .tiddlyLinkNonExisting\n { color:#009 !important; }\n.indent\n { margin:0;padding:0;border:0;margin-left:.5em; }\n.borderleft\n { margin:0;padding:0;border:0;margin-left:1em; border-left:1px dotted; padding-left:.5em; }\n.borderright\n { margin:0;padding:0;border:0;margin-right:1em; border-right:1px dotted; padding-right:.5em; }\n.borderbottom\n { margin:0;padding:1px 0;border:0;border-bottom:1px dotted; margin-bottom:1px; padding-bottom:1px; }\n.bordertop\n { margin:0;padding:0;border:0;border-top:1px dotted; margin-top:1px; padding-top:1px; }\n\n/* compact form */\n.smallform\n { white-space:nowrap; }\n.smallform input, .smallform textarea, .smallform button, .smallform checkbox, .smallform radio, .smallform select\n { font-size:8pt; }\n/*}}}*/
<script label="full">\n window.switchMenus("Full",place,"TiddlyTools Full menus have been installed");\n</script> | <script label="lite">\n window.switchMenus("Lite",place,"TiddlyTools Lite menus have been installed");\n</script> | <script label="mini">\n window.switchMenus("Mini",place,"TiddlyTools Mini menus have been installed");\n</script><script>\n window.switchMenus = function(which,place,msg) {\n function rewriteMenu(which,id) {\n var tid=id+which;\n var text=store.getTiddlerText(tid);\n if (!text) return; // source tiddler does not exist for this ID\n var msg="/%\sn\snTIDDLER CONTENTS COPIED FROM: "+tid+"\sn\sn%/";\n if (store.tiddlerExists(id)) {\n displayMessage("replacing "+id);\n store.addTiddler(store.fetchTiddler(id).set(null,msg+text));\n store.notify(id,true);\n }\n }\n clearMessage(); \n rewriteMenu(which,"StoryMenu");\n rewriteMenu(which,"SiteMenuExtras");\n rewriteMenu(which,"SiteMenuGoto");\n rewriteMenu(which,"SiteMenuFile");\n rewriteMenu(which,"SiteMenuOptions");\n rewriteMenu(which,"SideBarTabs");\n rewriteMenu(which,"SideBarOptions");\n rewriteMenu(which,"MainMenu");\n rewriteMenu(which,"SiteMenu");\n store.setDirty(true);\n var here=story.findContainingTiddler(place);\n if (here) story.refreshTiddler(here.getAttribute("tiddler"),null,true);\n displayMessage(msg);\n }\n</script>
/***\n|''Name:''|TableOfContentsPlugin|\n|''Source:''|http://www.TiddlyTools.com/#TableOfContentsPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nWhen there are many tiddlers in a document, the standard 'tabbed list of tiddlers' in the right-hand sidebar can become very long, occupying a lot of page space and requiring a lot scrolling in order to locate and select a tiddler.\n\nThe TableOfContentsPlugin addresses this problem by replacing the standard tabbed list display with a single listbox/droplist control that uses a very small amount of page space, regardless of the number of tiddlers in the document.\n\n!!!!!Usage\n<<<\nTo view a tiddler, simply select (or double-click) its title from the listbox and it will automatically be displayed on the page. The listbox also includes special 'command' items that determine the order and type of tiddlers that are shown in the list:\n\n''[by title]'' displays all tiddlers in the document.\n''[by date/author/tags]'' displays indented sections, sorted accordingly, with headings (indicated by a '+') that can be expanded, one at a time, to view the list of tiddlers in that section.\n''[missing]'' displays tiddlers that have been referenced within the document but do not yet exist.\n''[orphans]'' displays tiddlers that do exist in the document but have not been referenced by a link from anywhere else within the document.\n''[system]'' displays special tiddlers that are used by TiddlyWiki to configure built-in features and add-on macros/extensions. The list includes all tiddlers tagged with <<tag systemTiddlers>> ("templates") or <<tag systemConfig>> (plug-in extensions), plus any 'shadow tiddlers' (built-in default systemTiddlers) that have not been over-ridden by custom tiddler definitions.\n\nThe current list ''display setting is indicated by an arrow (">")'' symbol to the left of command item. Selecting a command item causes the listbox to be reloaded with the appropriate contents and sort order.\n\nWhen you are viewing a list of tiddlers by date/author/tags, ''shift-clicking'' on a section heading or command item causes the listbox display to ''toggle between "show-one-section-at-a-time" and "expand-all-sections"'' display options, allowing you to quickly see all tiddler titles at once without having to view individual indented sections one at a time.\n\nThe ''size of the listbox can be adjusted'' so you can view more (or less) tiddler titles at one time. Select ''[-]'' to reduce the size by one line, ''[+]'' to increase the size by one line, or ''[=]'' to autosize the list to fit the current contents (toggles on/off). //Note: If the listbox is reduced to a single line, it displayed as a droplist instead of a fixed-sized listbox.// You can ''show/hide the entire listbox'' by selecting the "contents" label that appears above the listbox.\n<<<\n!!!!!Control Panel\n<<<\nBy default, tiddlers tagged with <<tag excludeLists>>, are omitted from the TableOfContents so that 'system' tiddlers (e.g. MainMenu, SiteTitle, StyleSheet, etc.) can be hidden, reducing "information overload" and making it easier to select relevant tiddlers when reading your document. However, when //editing// your document, including these hidden tiddlers in the list can be more helpful, so that changes to the menus, titles, styles, etc. can be more quickly accomplished.\n----\n''To include hidden tiddlers in the TableOfContents display, select the following option:''\n<<option chkTOCIncludeHidden>> include hidden tiddlers in TableOfContents(ignores <<tag excludeLists>> tag)\n^^note: this setting is ignored when ''<<option chkHttpReadOnly>> HideEditingFeatures when viewed over HTTP'' is enabled^^\n<<<\n!!!!!Parameters\n<<<\nThe macro accepts optional parameters to control various features and functions:\n* ''{{{label:text}}}''\nReplace the default text ("contents") that appears above the TableOfContents listbox. //Note: to include spaces in the label text, you must enclose the entire parameter in quotes// (e.g., {{{"label:my list of tiddlers"}}})\n* ''{{{sort:fieldtype}}}''\nSets the initial display order for items in the listbox. 'fieldtype' is one of the following pre-defined keywords: ''title'', ''modified'' //(date)//, ''modifier'' //(author)//, ''tags'', ''missing'', ''orphans'', or ''system''\n* ''{{{date:format}}}''\nControls the formatting of dates in TableOfContents display. 'format' is a text-substitution template containing one or more of the following special notations.\n** DDD - day of week in full (eg, "Monday")\n** DD - day of month, 0DD - adds leading zero, DDth adds suffix\n** MMM - month in full (eg, "July")\n** MM - month number, 0MM - adds leading zero\n** YYYY - full year, YY - two digit year\n** hh - hours, 0hh - adds leading zero\n** mm - minutes, 0mm - adds leading zero\n** ss - seconds, 0ss - adds leading zero\n//Note: to include spaces in the formatting template, you must enclose the entire parameter in quotes// (e.g., {{{"date:DDD, DD/MM/YY"}}})\n* ''{{{size:nnn}}}''\nSets the initial number of lines to display in the listbox. If this parameter is omitted or "size:1" is specified, a single-line droplist is created. When a size > 1 is provided, a standard, fixed-size scrollable listbox is created. You can use "size:0" or "size:auto" to display a varible-height listbox that automatically adjusts to fit the current list contents without scrolling.\n* ''{{{width:nnn[cm|px|em|%]}}}''\nSets the width of the listbox control. Overrides the built-in CSS width declaration (=100%). Use standard CSS width units (cm=centimeters, px=pixels, em=M-space, %=proportional to containing area). You can also use a ".TOCList" custom CSS class definition to override the built-in CSS declarations for the listbox.\n* ''{{{padding:nnn[cm|px|em|%]}}}''\nOverrides default listbox control padding. Sets the CSS padding style.\n* ''{{{margin:nnn[cm|px|em|%]}}}''\nOverrides default listbox control spacing. Sets the CSS margin style.\n* ''{{{prompt}}}''\nSets the non-selectable prompt text that is displayed as the first line of the listbox //(note: this feature is not supported by the listbox control on all browsers)//. Let's you include a short text message (such as "select a tiddler"), even when displaying a compact single-line droplist.\n* ''{{{inline}}}''\nNormally, the TableOfContents plugin is contained inside a {{{<div>}}} element. This setting causes the plugin to use a {{{<span>}}} instead, allowing for more flexible 'inline' placement when embedded within other content.\n* ''{{{hidelist}}}''\nHides the listbox when the TableOfContents is first displayed. Initially, only the listbox label and size controls will appear. Clicking on the listbox label text will alternately show/hide the listbox display. //Note: this setting does not affect the content of the listbox, only whether or not it is initially visible.//\n* ''{{{-title}}}''\nOmit "by title" command item and corresponding listbox content. \n* ''{{{-date}}}''\nOmit "by date" command item and corresponding listbox content. \n* ''{{{-author}}}''\nOmit "by author" command item and corresponding listbox content. \n* ''{{{-tags}}}''\nOmit "by tags" command item and corresponding listbox content. \n* ''{{{-missing}}}''\nOmit "missing" command item and corresponding listbox content. \n* ''{{{-orphans}}}''\nOmit "orphans" command item and corresponding listbox content. \n* ''{{{-system}}}''\nOmit "system" command item and corresponding listbox content. \n<<<\n!!!!!Examples\n<<<\n<<tableOfContents "label:all tiddlers" sort:title width:40% size:1>>\n<<tableOfContents "label:by date" sort:modified size:1 width:40%>>\n<<tableOfContents "label:tagged tiddlers" sort:tags size:1 width:40%>>\n<<tableOfContents "label:system tiddlers" sort:system size:1 width:40%>>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''TableOfContentsPlugin'' (tagged with <<tag systemConfig>>)\n^^documentation and javascript for TableOfContents handling^^\n\ncreate/edit ''SideBarOptions'': (sidebar menu items) \n^^Add {{{<<tableOfContents>>}}} macro^^\n\n<<<\n!!!!!Revision History\n<<<\n''2006.11.27 [2.3.0]'' added ability to omit sections from listbox via macro params (e.g., "-date -tags", etc.). Based on request from DavidWinfield.\n''2006.05.21 [2.2.7]'' added onkeyup handling for enter key (=view selected tiddler, equivalent to double-click)\n''2006.02.14 [2.2.6]'' FF1501 fix: add 'var r' and 'var k' to unintended global variable declarations in refreshTOCList() and getTOCListFromButton(). Thanks for report from AndreasHoefler.\n''2006.02.04 [2.2.5]'' add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals\n''2005.12.21 [2.2.2]'' in onClickTOCList() and onDblClickTOCList(), prevent mouse events from 'bubbling' up to other handlers\n''2005.10.30 [2.2.1]'' in refreshTOCList(), fixed calculation of "showHidden" to check for 'readOnly' (i.e., "via HTTP") flag. Based on a report from LyallPearce\n''2005.10.30 [2.2.0]'' hide tiddlers tagged with 'excludeLists' (with option to override, i.e., "include hidden tiddlers")\n''2005.10.09 [2.1.0]'' combined documentation and code in a single tiddler\nadded click toggle for expand-all vs. show-one-branch\n''2005.08.07 [2.0.0]'' major re-write to not use static ID values for listbox controls, so that multiple macro instances can exist without corrupting each other or the DOM. Moved HTML and CSS definitions into plugin code instead of using separate tiddlers. Added macro parameters for label, sort, date, size, width, hidelist and showtabs\n''2005.08.03 [1.0.3]'' added "showtabs" optional parameter\n''2005.07.27 [1.0.2]'' core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet(). Added show/hide toggle (click on 'contents' link)\n''2005.07.23 [1.0.1]'' added parameter checks and corrected addNotification() usage\n''2005.07.20 [1.0.0]'' Initial Release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.tableOfContents = {major: 2, minor: 3, revision: 0, date: new Date(2006,11,27)};\n//}}}\n\n// // 1.2.x compatibility\n//{{{\nif (!window.story) window.story=window;\nif (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}\nif (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}\nif (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}\n//}}}\n\n//{{{\n// define defaults for cookie-based option values\nif (config.options.txtTOCSortBy==undefined) config.options.txtTOCSortBy="modified";\nif (config.options.txtTOCListSize==undefined) config.options.txtTOCListSize=19;\nif (config.options.chkTOCShow==undefined) config.options.chkTOCShow=true;\nif (config.options.chkTOCIncludeHidden==undefined) config.options.chkTOCIncludeHidden=false;\n\nconfig.shadowTiddlers.AdvancedOptions += "\sn<<option chkTOCIncludeHidden>> include hidden tiddlers in TableOfContents";\n\n// define macro "tableOfContents" to render controls\nconfig.macros.tableOfContents = { label: "contents" };\nconfig.macros.tableOfContents.cmdMax=7; // index of maximum command item\n\nconfig.macros.tableOfContents.css = '\s\n.TOC { padding:0.5em 1em 0.5em 1em; }\s\n.TOC a { padding:0em 0.25em 0em 0.25em; color:inherit; }\s\n.TOCList { width: 100%; font-size:8pt; margin:0em; }\s\n';\n\nconfig.macros.tableOfContents.html = '\s\n<div style="text-align:right">\s\n <span style="float:left">\s\n <a href="JavaScript:;" id="TOCMenu" style="padding: 0em;"\s\n onclick="onClickTOCMenu(this)" title="show/hide table of contents">%label%</a>\s\n </span>\s\n <a href="JavaScript:;" id="TOCSmaller" style="display:inline"\s\n onclick="resizeTOC(this)" title="reduce list size">&#150;</a>\s\n <a href="JavaScript:;" id="TOCLarger"style="display:inline"\s\n onclick="resizeTOC(this)" title="increase list size">+</a>\s\n <a href="JavaScript:;" id="TOCMaximize"style="display:inline"\s\n onclick="resizeTOC(this)" title="maximize/restore list size">=</a>\s\n</div>\s\n';\n\nconfig.macros.tableOfContents.handler = function(place,macroName,params) { \n var parsedParams = new Array();\n parsedParams['label']=this.label;\n parsedParams['inline']=false;\n while (params.length>0) {\n if (params[0]=="label:none")\n parsedParams['label']="";\n else if (params[0].substr(0,6)=="label:")\n parsedParams['label']=params[0].substr(6);\n if (params[0].substr(0,7)=="prompt:")\n parsedParams['prompt']=params[0].substr(7);\n if (params[0].substr(0,8)=="padding:")\n parsedParams['padding']=params[0].substr(8);\n if (params[0].substr(0,7)=="margin:")\n parsedParams['margin']=params[0].substr(7);\n if (params[0].substr(0,5)=="sort:")\n parsedParams['sortby']=params[0].substr(5);\n if (params[0].substr(0,5)=="date:")\n parsedParams['date']=params[0].substr(5);\n if ((params[0]=="size:auto")||(params[0]=="size:0"))\n parsedParams['autosize']=true;\n else if (params[0] && (params[0].substr(0,5)=="size:"))\n parsedParams['requestedSize']=params[0].substr(5);\n if (params[0].substr(0,6)=="width:")\n parsedParams['width']=params[0].substr(6);\n if (params[0]=="hidelist")\n parsedParams['hidelist']=true;\n if (params[0]=="inline")\n parsedParams['inline']=true;\n if (params[0]=="-title")\n parsedParams['hide_title']=true;\n if (params[0]=="-date")\n parsedParams['hide_date']=true;\n if (params[0]=="-author")\n parsedParams['hide_author']=true;\n if (params[0]=="-tags")\n parsedParams['hide_tags']=true;\n if (params[0]=="-missing")\n parsedParams['hide_missing']=true;\n if (params[0]=="-orphans")\n parsedParams['hide_orphans']=true;\n if (params[0]=="-system")\n parsedParams['hide_system']=true;\n params.shift(); \n }\n setStylesheet(config.macros.tableOfContents.css,"tableOfContents");\n var newTOC=createTiddlyElement(place,parsedParams['inline']?"span":"div",null,"TOC",null)\n if (parsedParams['margin']) { newTOC.style.margin=parsedParams['margin']; }\n if (parsedParams['padding']) { newTOC.style.padding=parsedParams['padding']; }\n if (parsedParams['label']!="") newTOC.innerHTML=config.macros.tableOfContents.html.replace(/%label%/,parsedParams['label']);\n var newTOCList=createTOCList(newTOC,parsedParams)\n refreshTOCList(newTOCList);\n store.addNotification(null,reloadTOCLists); // reload listbox after every tiddler change\n}\n\n// IE needs explicit global scoping for functions/vars called from browser events\nwindow.onChangeTOCList=onChangeTOCList;\nwindow.onClickTOCList=onClickTOCList;\nwindow.onDblClickTOCList=onDblClickTOCList;\nwindow.reloadTOCLists=reloadTOCLists;\nwindow.refreshTOCList=refreshTOCList;\nwindow.onClickTOCMenu=onClickTOCMenu;\nwindow.resizeTOC=resizeTOC;\n \nfunction createTOCList(place,params)\n{\n var theList = createTiddlyElement(place,"select",null,"TOCList",params['prompt'])\n theList.params=params;\n theList.onchange=onChangeTOCList;\n theList.onclick=onClickTOCList;\n theList.ondblclick=onDblClickTOCList;\n theList.onkeyup=onKeyUpTOCList;\n theList.style.display=config.options.chkTOCShow ? "block" : "none" ;\n theList.sortBy=config.options.txtTOCSortBy;\n theList.dateFormat="DD MMM YYYY";\n theList.requestedSize=config.options.txtTOCListSize;\n theList.expandall=false;\n theList.cmdMax=config.macros.tableOfContents.cmdMax;\n if (params['hide_title']) theList.cmdMax--;\n if (params['hide_date']) theList.cmdMax--;\n if (params['hide_author']) theList.cmdMax--;\n if (params['hide_tags']) theList.cmdMax--;\n if (params['hide_missing']) theList.cmdMax--;\n if (params['hide_orphans']) theList.cmdMax--;\n if (params['hide_system']) theList.cmdMax--;\n if (params['sortby'])\n { theList.sortBy=params['sortby']; theList.noSortCookie=true; }\n if (params['date'])\n { theList.dateFormat=params['date']; }\n if (params['autosize'])\n { theList.autosize=true; theList.noSizeCookie=true; }\n if (params['requestedSize'])\n { theList.requestedSize=params['requestedSize']; theList.noSizeCookie=true; }\n if (params['width'])\n { theList.style.width=params['width']; }\n if (params['hidelist'])\n { theList.style.display ="none" ; theList.noShowCookie=true; }\n if (params['expandall'])\n { theList.expandall=true; }\n return theList;\n}\n\nfunction onChangeTOCList()\n{\n var thisTiddler=this.options[this.selectedIndex].value;\n if ((this.size==1)&&(thisTiddler!='')&&(this.selectedIndex>this.cmdMax))\n story.displayTiddler(null,thisTiddler,1);\n refreshTOCList(this);\n return false;\n}\n\nfunction onClickTOCList(e)\n{\n\n if (!e) var e = window.event;\n if (this.size==1)\n return; // don't toggle display for droplist\n if (e.shiftKey)\n { this.expandall=!this.expandall; refreshTOCList(this);}\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();\n return true;\n}\n\nfunction onDblClickTOCList(e)\n{\n if (!e) var e = window.event;\n var thisTiddler=this.options[this.selectedIndex].value;\n if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))\n story.displayTiddler(null,thisTiddler,1);\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();\n return false;\n}\n\nfunction onKeyUpTOCList(e)\n{\n if (!e) var e = window.event;\n if (e.keyCode!=13) return true;\n var thisTiddler=this.options[this.selectedIndex].value;\n if ((thisTiddler!='')&&(this.selectedIndex>this.cmdMax))\n story.displayTiddler(null,thisTiddler,1);\n e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation();\n return false;\n}\n\nfunction reloadTOCLists()\n{\n var all=document.all? document.all : document.getElementsByTagName("*");\n for (var i=0; i<all.length; i++)\n if (all[i].className=="TOCList")\n { all[i].selectedIndex=-1; refreshTOCList(all[i]); }\n}\n \nfunction refreshTOCList(theList)\n{\n // DEBUG var starttime=new Date();\n var selectedIndex = theList.selectedIndex;\n if (selectedIndex==-1) selectedIndex=0;\n var sortBy = theList.sortBy;\n var showHidden = config.options.chkTOCIncludeHidden\n && !(config.options.chkHttpReadOnly && readOnly);\n\n if (selectedIndex==0) sortBy=theList.sortBy; // "nnn tiddlers" heading\n else if (selectedIndex<=theList.cmdMax)\n sortBy=theList.value;\n else {\n if (theList.options[theList.selectedIndex].value=='') expandTOC(theList);\n return;\n }\n theList.sortBy = sortBy;\n if (!theList.noSortCookie)\n { config.options.txtTOCSortBy=sortBy; saveOptionCookie("txtTOCSortBy"); }\n\n // get the list of tiddlers and filter out 'hidden' tiddlers (i.e., tagged with "excludeLists")\n var tiddlers = [];\n switch (sortBy) {\n case "missing":\n tiddlers = store.getMissingLinks();\n break;\n case "tags":\n tiddlers = store.getTags();\n break;\n case "orphans":\n var titles = store.getOrphans();\n for (var t = 0; t < titles.length; t++)\n if (showHidden || store.getTiddler(titles[t]).tags.find("excludeLists")==null)\n tiddlers.push(titles[t]);\n break;\n case "system":\n var temp = store.getTaggedTiddlers("systemTiddlers");\n for (var t = 0; t < temp.length; t++)\n if (showHidden || temp[t].tags.find("excludeLists")==null)\n tiddlers.pushUnique(temp[t].title,true);\n var temp = store.getTaggedTiddlers("systemConfig");\n for (var t = 0; t < temp.length; t++)\n if (showHidden || temp[t].tags.find("excludeLists")==null)\n tiddlers.pushUnique(temp[t].title,true);\n for (var t in config.shadowTiddlers) tiddlers.pushUnique(t,true);\n tiddlers.sort();\n break;\n default:\n var temp = store.getTiddlers(sortBy);\n for (var t = 0; t < temp.length; t++)\n if (showHidden || temp[t].tags.find("excludeLists")==null)\n tiddlers.push(temp[t]);\n }\n\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n theList.saved=null;\n\n // add heading and control items to list\n var i=0;\n var theHeading=tiddlers.length+' tiddlers:';\n if (sortBy=='missing') theHeading=tiddlers.length+' missing tiddlers:';\n if (sortBy=='orphans') theHeading=tiddlers.length+' orphaned tiddlers:';\n if (sortBy=='tags') theHeading=tiddlers.length+' tags:';\n if (sortBy=='system') theHeading=tiddlers.length+' system tiddlers:';\n var indent=String.fromCharCode(160)+String.fromCharCode(160);\n var sel=">";\n theList.options[i++]=new Option(theHeading,'',false,false);\n if (!theList.params['hide_title']) \n theList.options[i++]=new Option(((sortBy=="title")?sel:indent)+' [by title]','title',false,false);\n if (!theList.params['hide_date']) \n theList.options[i++]=new Option(((sortBy=="modified")?sel:indent)+' [by date]','modified',false,false);\n if (!theList.params['hide_author']) \n theList.options[i++]=new Option(((sortBy=="modifier")?sel:indent)+' [by author]','modifier',false,false);\n if (!theList.params['hide_tags']) \n theList.options[i++]=new Option(((sortBy=="tags")?sel:indent)+' [by tags]','tags',false,false);\n if (!theList.params['hide_missing']) \n theList.options[i++]=new Option(((sortBy=="missing")?sel:indent)+' [missing]','missing',false,false);\n if (!theList.params['hide_orphans']) \n theList.options[i++]=new Option(((sortBy=="orphans")?sel:indent)+' [orphans]','orphans',false,false);\n if (!theList.params['hide_system']) \n theList.options[i++]=new Option(((sortBy=="system")?sel:indent)+' [system]','system',false,false);\n // output the tiddler list\n switch(sortBy)\n {\n case "title":\n for (var t = 0; t < tiddlers.length; t++)\n theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);\n break;\n case "modified":\n // sort descending for newest date first\n tiddlers.sort(function (a,b) {if(a['modified'] == b['modified']) return(0); else return (a['modified'] > b['modified']) ? -1 : +1; });\n // continue with same logic as for 'modifier'...\n case "modifier":\n var lastSection = "";\n for (var t = 0; t < tiddlers.length; t++)\n {\n var tiddler = tiddlers[t];\n var theSection = "";\n if (sortBy=="modified") theSection = tiddler.modified.formatString(theList.dateFormat);\n if (sortBy=="modifier") theSection = tiddler.modifier;\n if (theSection != lastSection)\n {\n theList.options[i++] = new Option('+ '+theSection,"",false,false);\n lastSection = theSection;\n }\n theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);\n }\n expandTOC(theList);\n break;\n case "tags":\n // tagged tiddlers, by tag\n var tagcount=0;\n var lastTag = null;\n for (var t = 0; t < tiddlers.length; t++) // actually a list of tags, not tiddlers...\n {\n var theTag = tiddlers[t][0];\n var tagged = new Array();\n var temp = store.getTaggedTiddlers(theTag);\n for(var r=0; r<temp.length; r++)\n if (showHidden || temp[r].tags.find("excludeLists")==null)\n tagged.push(temp[r]);\n if (tagged.length)\n {\n tagcount++;\n theList.options[i++]= new\n Option('+ '+theTag+" ("+tagged.length+")","",false,false);\n for(var r=0; r<tagged.length; r++)\n theList.options[i++] = new\n Option(indent+indent+tagged[r].title,tagged[r].title,false,false);\n }\n }\n // count untagged tiddlers\n var temp = store.getTiddlers("title");\n var c=0; for (var r=0; r<temp.length;r++) if (!temp[r].tags.length) c++;\n // create 'pseudo-tag' listing untagged tiddlers (if any)\n if (c>0)\n {\n theList.options[i++] = new Option("+ untagged ("+c+")","",false,false);\n for (var r=0; r<temp.length;r++) if (!temp[r].tags.length)\n theList.options[i++] = new\n Option(indent+indent+temp[r].title,temp[r].title,false,false);\n }\n theList.options[0].text=tagcount+' tags:';\n expandTOC(theList);\n break;\n case "missing":\n case "orphans":\n case "system":\n for (var t = 0; t < tiddlers.length; t++)\n theList.options[i++] = new Option(tiddlers[t],tiddlers[t],false,false);\n break;\n }\n theList.selectedIndex=selectedIndex; // select current control item\n theList.size = (theList.autosize)?theList.options.length:theList.requestedSize;\n // DEBUG var endtime=new Date();\n // DEBUG alert("refreshTOC() elapsed time: "+(endtime-starttime)+" msec");\n}\n\n// show/hide branch of TOCList based on current selection\nfunction expandTOC(theList)\n{\n var selectedIndex = theList.selectedIndex;\n if (selectedIndex==-1) selectedIndex=0;\n var sortBy = theList.sortBy;\n\n // don't collapse/expand list for alpha-sorted "flatlist" TOC contents\n if ((sortBy=="title")||(sortBy=="missing")||(sortBy=="orphans")||(sortBy=="system"))\n return;\n // or list control items\n if ((selectedIndex>0)&&(selectedIndex<=theList.cmdMax))\n return;\n\n var theText = theList.options[selectedIndex].text;\n var theValue = theList.options[selectedIndex].value;\n // save fully expanded list contents (if not already saved)\n if (!theList.saved)\n {\n theList.saved = new Array();\n for (var i=0; i < theList.length; i++)\n {\n opt = theList.options[i];\n theList.saved[i] = new Option(opt.text, opt.value, opt.defaultSelected, opt.selected);\n }\n }\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n\n // put back all items \n if (theList.expandall)\n {\n var i=0;\n for (var t=0; t<theList.saved.length; t++)\n {\n var opt=theList.saved[t];\n theList.options[i++] = new Option(opt.text,opt.value,opt.defaultSelected,opt.selected);\n if (opt.text==theText) selectedIndex=i-1;\n }\n theList.selectedIndex = selectedIndex;\n theList.size = (theList.autosize)?theList.options.length:theList.requestedSize;\n return;\n }\n\n // put back heading items until item text matches current selected heading\n var i=0;\n for (var t=0; t<theList.saved.length; t++)\n {\n var opt=theList.saved[t];\n if ((opt.value=='')||(i<=theList.cmdMax))\n theList.options[i++] = new Option(opt.text,opt.value,opt.defaultSelected,opt.selected);\n if (opt.text==theText)\n break;\n }\n selectedIndex=i-1; // this is the NEW index of the current selected heading\n // put back items with value!='' until value==''\n for ( t++; t<theList.saved.length; t++)\n {\n var opt=theList.saved[t];\n if (opt.value!='')\n theList.options[i++] = new Option(opt.text,opt.value,opt.defaultSelected,opt.selected);\n if (opt.value=='')\n break;\n }\n // put back remaining items with value==''\n for ( ; t<theList.saved.length; t++)\n {\n var opt=theList.saved[t];\n if (opt.value=='')\n theList.options[i++] = new Option(opt.text,opt.value,opt.defaultSelected,opt.selected);\n }\n theList.selectedIndex = selectedIndex;\n theList.size = (theList.autosize)?theList.options.length:theList.requestedSize;\n}\n\n// these functions process clicks on the 'control links' that are displayed above the listbox\nfunction getTOCListFromButton(which)\n{\n var theList = null;\n switch (which.id)\n {\n case 'TOCMenu':\n var theSiblings = which.parentNode.parentNode.parentNode.childNodes;\n var thePlace=which.parentNode.parentNode.parentNode.parentNode.parentNode.id;\n break;\n case 'TOCSmaller':\n case 'TOCLarger':\n case 'TOCMaximize':\n var theSiblings = which.parentNode.parentNode.childNodes;\n var thePlace=which.parentNode.parentNode.parentNode.parentNode.id;\n break;\n }\n for (var k=0; k<theSiblings.length; k++)\n if (theSiblings[k].className=="TOCList") { theList=theSiblings[k]; break; }\n // DEBUG if (theList) alert('found '+theList.className+' for '+which.id+' button in '+thePlace);\n return theList;\n}\n\nfunction onClickTOCMenu(which)\n{\n var theList=getTOCListFromButton(which);\n if (!theList) return;\n var opening = theList.style.display=="none";\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(theList,opening,false,"none"));\n else\n theList.style.display = opening ? "block" : "none" ;\n if (!theList.noShowCookie)\n { config.options.chkTOCShow = opening; saveOptionCookie("chkTOCShow"); }\n return(false);\n}\n\nfunction resizeTOC(which)\n{\n var theList=getTOCListFromButton(which);\n if (!theList) return;\n\n var size = theList.size;\n if (theList.style.display=="none") // make sure list is visible\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(theList,true,false,"none"));\n else\n theList.style.display = "block" ;\n switch (which.id)\n {\n case 'TOCSmaller': // decrease current listbox size\n if (theList.autosize) { theList.autosize=false; size=config.options.txtTOCListSize; }\n if (size==1) break;\n size -= 1; // shrink by one line\n theList.requestedSize = theList.size = size;\n break;\n case 'TOCLarger': // increase current listbox size\n if (theList.autosize) { theList.autosize=false; size=config.options.txtTOCListSize; }\n if (size>=theList.options.length) break;\n size += 1; // grow by one line\n theList.requestedSize = theList.size = size;\n break;\n case 'TOCMaximize': // toggle autosize\n theList.autosize = (theList.size!=theList.options.length);\n theList.size = (theList.autosize)?theList.options.length:theList.requestedSize;\n break;\n }\n if (!theList.noSizeCookie && !theList.autosize)\n { config.options.txtTOCListSize=size; saveOptionCookie("txtTOCListSize"); }\n}\n//}}}\n
/***\n|''Name:''|TagCloudPlugin|\n|''Source:''|http://www.TiddlyTools.com/#TagCloudPlugin|\n|''Author:''|Clint Checketts|\n|''License:''|unknown|\n|''~CoreVersion:''|2.0.10|\n\n!Usage\n<<tagCloud>>\n\n!Code\n***/\n//{{{\nversion.extensions.tagCloud = {major: 1, minor: 0 , revision: 0, date: new Date(2006,2,04)};\n//Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman\n\nconfig.macros.tagCloud = {\n noTags: "No tag cloud created because there are no tags.",\n tooltip: "%1 tiddlers tagged with '%0'"\n};\n\nconfig.macros.tagCloud.handler = function(place,macroName,params) {\n \nvar tagCloudWrapper = createTiddlyElement(place,"div",null,"tagCloud",null);\n\nvar tags = store.getTags();\nfor (var t=0; t<tags.length; t++) {\n for (var p=0;p<params.length; p++) if (tags[t][0] == params[p]) tags[t][0] = "";\n}\n\n if(tags.length == 0) \n createTiddlyElement(tagCloudWrapper,"span",null,null,this.noTags);\n //Findout the maximum number of tags\n var mostTags = 0;\n for (var t=0; t<tags.length; t++) if (tags[t][0].length > 0){\n if (tags[t][1] > mostTags) mostTags = tags[t][1];\n }\n //divide the mostTags into 4 segments for the 4 different tagCloud sizes\n var tagSegment = mostTags / 4;\n\n for (var t=0; t<tags.length; t++) if (tags[t][0].length > 0){\n var tagCloudElement = createTiddlyElement(tagCloudWrapper,"span",null,null,null);\n tagCloudWrapper.appendChild(document.createTextNode(" "));\n var theTag = createTiddlyButton(tagCloudElement,tags[t][0],this.tooltip.format(tags[t]),onClickTag,"tagCloudtag tagCloud" + (Math.round(tags[t][1]/tagSegment)+1));\n theTag.setAttribute("tag",tags[t][0]);\n }\n\n};\n\nsetStylesheet(".tagCloud span{height: 1.8em;margin: 3px;}.tagCloud1{font-size: 1.2em;}.tagCloud2{font-size: 1.4em;}.tagCloud3{font-size: 1.6em;}.tagCloud4{font-size: 1.8em;}.tagCloud5{font-size: 1.8em;font-weight: bold;}","tagCloudsStyles");\n//}}}
/***\n|''Name:''|TextAreaPlugin|\n|''Source:''|http://www.TiddlyTools.com/#TextAreaPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nAdds extra keyboard functions to the standard textarea control in the tiddler editor. ''Control-F'' and ''control-G'' will ''"Find text"'' and ''"find text aGain"'', respectively, allowing you to copy, find, paste, findagain, paste, etc to perform "search-and-replace" actions. The plugin also adds an ''autosize toolbar'' command and ''resizeEditor macro'' (to be placed in the EditTemplate) to permit on-the-fly adjustment of the tiddler editor text area height.\n\n* ''autosizeEditor'' - toggles the tiddler editor textarea height between fixed-height and "automatically fit the contents".\n* ''resizeEditor'' - adds 'grab handle' below textarea to stretch field height\n!!!!!Configuration\n<<<\nenable\n<<option chkTextAreaExtensions>> use control-f (find), control-g (find again) inside text area\n<<option chkDisableAutoSelect>> place cursor at start of textarea instead of pre-selecting content\n<<option chkResizeEditor>> modify shadow EditTemplate to add resizeable text area (and autosize command)\n> Note: if you are using the default (shadow) EditTemplate, the plugin automatically updates the template to include the ''autosizeEditor'' toolbar command and ''resizeEditor'' macro. If you have created a custom EditTemplate tiddler, you will need to manually add the ''autosizeEditor'' toolbar command and ''resizeEditor'' macro to your existing template:\n{{{\n<!-- add 'autosizeEditor' command to end of existing editor toolbar definition -->\n<div class='toolbar' macro='toolbar ... autosizeEditor'>\n}}}\nand\n{{{\n<!-- add span with 'resizeEditor' macro anywhere in the edit template -->\n<span macro='resizeEditor'></span>\n}}}\n<<<\n!!!!!Installation\n<<<\nImport (or copy/paste) the following tiddlers into your document:\n''TextAreaPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.11.16 [2.1.0]'' restored chkDisableAutoSelect (place cursor at start of textarea instead of pre-selecting content)\n''2006.11.16 [2.0.0]'' removed chkDisableEscapeKey (obsolete... use custom EditTemplate to change toolbar definition). Rewrote focusTiddler as a HIJACK instead of just overwriting core function (permits other plugins to also hijack function). Removed TAB character processing (now built-in as of TW2.1). Merged code from ResizeEditorPlugin:\n> ''2006.11.16 [1.3.x]'' merged with TextAreaPlugin\n> ''2006.11.02 [1.3.1]'' in DragMove() and DragStop(), check for undefined properties so IE doesn't report "Not Implemented" error when property is referenced without having been previously initialized.\n> ''2006.11.01 [1.3.0]'' added 'resizeEditor' MACRO for 'grab handle' stretch resizing (based on code from Jon Scully and Jason Johnston (jj@lojjic.net). \n> ''2006.11.01 [1.2.6]'' removed increaseEditor, decreaseEditor, and resizeEditor toolbar COMMAND definitions (resize by setting 'rows' property of textarea field conflicts with resize via style.height CSS attribute as set by autosize/drag).\n> ''2006.11.01 [1.2.5]'' fixed 'savedkeypress' handling (was writing to savedkeyup by mistake)\n> ''2006.10.28 [1.2.4]'' added '+' to 'saveTiddler' toolbar command (enables ctrl-enter keyhandling)\n> ''2006.10.18 [1.2.3]'' added decreaseEditor and increaseEditor commands\n> ''2006.10.18 [1.2.2]'' onkeypress handling to redirect PGUP/PGDN to window.scrollByPages() (works in FF, but not yet in IE)\n> ''2006.10.18 [1.2.1]'' fixed references to default string constants (oops!)\n> ''2006.10.18 [1.2.0]'' renamed 'resizeEditor' to 'autosizeEditor' and added new 'resizeEditor' toolbar command to prompt for # of rows to display\n> ''2006.10.02 [1.1.1]'' show checkbox in button label (when automatic resizing is enabled)\n> ''2006.10.01 [1.1.0]'' added 'onkeyup' automatic fit-to-contents handling\n> ''2006.09.30 [1.0.0]'' initial release\n''2006.08.01 [1.1.2]'' improved processed() utility function to handle IE5 and IE6, as well as calling preventDefault() for moz browsers. Thanks to Bradley Meck for research and code examples.\n''2006.07.09 [1.1.1]'' removed chkDisableAutoSelect\n''2006.02.14 [1.1.0]'' added option for chkDisableEscapeKey (default is standard action)\n''2006.01.22 [1.0.1]'' only add extra key processing for TEXTAREA elements (not other edit fields).\nadded option to enable/disable textarea keydown extensions (default is "standard keys" only)\n''2006.01.22 [1.0.0]'' Moved from temporary "System Tweaks" tiddler into 'real' TextAreaPlugin tiddler.\n<<<\n!!!!!Credits\n<<<\n>This feature was developed by EricShulman from [[ELS Design Studios|http://www.elsdesign.com]] with 'grab handle' stretch resizing adapted from TW code by Jon Scully and TextAreaResizer() by Jason Johnston (jj@lojjic.net).\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.textAreaPlugin= {major: 2, minor: 1, revision: 0, date: new Date(2006,12,10)};\n//}}}\n\n//{{{\nif (!config.options.chkTextAreaExtensions) config.options.chkTextAreaExtensions=true;\nif (!config.options.chkDisableAutoSelect) config.options.chkDisableAutoSelect=true;\nif (!config.options.chkResizeEditor) config.options.chkResizeEditor=true;\n\n// automatically tweak shadow EditTemplate to add "autosizeEditor" toolbar command\nif (config.options.chkResizeEditor)\n config.shadowTiddlers.EditTemplate=config.shadowTiddlers.EditTemplate.replace(/deleteTiddler/,"deleteTiddler autosizeEditor");\n// automatically tweak shadow EditTemplate to add "resizeEditor" macro\nif (config.options.chkResizeEditor)\n config.shadowTiddlers.EditTemplate+="<span macro='resizeEditor'></span>";\n\n// Put focus in a specified tiddler field\nStory.prototype.TextAreaExtensions_focusTiddler=Story.prototype.focusTiddler;\nStory.prototype.focusTiddler = function(title,field)\n{\n this.TextAreaExtensions_focusTiddler(title,field); // first call core\n var e = this.getTiddlerField(title,field);\n if (e && config.options.chkDisableAutoSelect) {\n if (e.setSelectionRange) // FF\n e.setSelectionRange(0,0);\n else if (e.createTextRange) // IE\n { var r=e.createTextRange(); r.collapse(true); r.select(); }\n }\n if (e && config.options.chkTextAreaExtensions) addKeyDownHandlers(e);\n}\n//}}}\n\n//{{{\nfunction addKeyDownHandlers(e)\n{\n // exit if not textarea or element doesn't allow selections\n if (e.tagName.toLowerCase()!="textarea" || !e.setSelectionRange) return;\n\n // utility function: exits keydown handler and prevents browser from processing the keystroke\n var processed=function(ev) {\n ev.cancelBubble=true; // IE4+\n try{event.keyCode=0;}catch(e){}; // IE5\n if (window.event) ev.returnValue=false; // IE6\n if (ev.preventDefault) ev.preventDefault(); // moz/opera/konqueror\n if (ev.stopPropagation) ev.stopPropagation(); // all\n return false;\n }\n // capture keydown in edit field\n e.saved_onkeydown=e.onkeydown; // save current keydown handler (if any)\n e.onkeydown=function(ev) { if (!ev) var ev=window.event;\n var key=ev.keyCode;\n if (!key) {\n var char=event.which?event.which:event.charCode;\n if (char==102) key=70;\n if (char==103) key=71;\n }\n // process CTRL-F (find matching text) or CTRL-G (find next match)\n if (ev.ctrlKey && (key==70||key==71)) {\n // if ctrl-f or no previous search, prompt for search text\n // defaults to previous text or current selection (if any)... if no search text, exit\n if (key==70||!e.find||!e.find.length)\n { var f=prompt("find:", e.find?e.find:e.value.substring(e.selectionStart,e.selectionEnd)); e.focus(); e.find=f?f:e.find; }\n if (!e.find||!e.find.length) return processed(ev);\n // do case-insensitive match with 'wraparound'... if not found, alert and exit \n var newstart=e.value.toLowerCase().indexOf(e.find.toLowerCase(),e.selectionStart+1);\n if (newstart==-1) newstart=e.value.toLowerCase().indexOf(e.find.toLowerCase());\n if (newstart==-1) { alert("'"+e.find+"' not found"); e.focus(); return processed(ev); }\n // set new selection, scroll it into view, and report line position in status bar\n e.setSelectionRange(newstart,newstart+e.find.length);\n var linecount=e.value.split('\sn').length;\n var thisline=e.value.substr(0,e.selectionStart).split('\sn').length;\n e.scrollTop=Math.floor((thisline-1-e.rows/2)*e.scrollHeight/linecount);\n window.status="line: "+thisline+"/"+linecount;\n return processed(ev);\n }\n if (e.saved_onkeydown) // call previous keydown handler (if any)\n e.saved_onkeydown(ev);\n }\n}\n//}}}\n\n// // 'autosize' toolbar command\n//{{{\nconfig.commands.autosizeEditor = {\n text: 'autosize',\n tooltip: 'adjust the editor height to fit the contents',\n text_alt: '<input type="checkbox" style="padding:0;margin:0;border:0;background:transparent;" checked>autosize',\n tooltip_alt: 'uncheck to reset the editor to the standard height',\n hideReadOnly: false,\n handler: function(event,src,title) {\n var here=story.findContainingTiddler(src); if (!here) return;\n var ta=here.getElementsByTagName('textarea'); if (!ta) return;\n for (i=0;i<ta.length;i++) { ta[i].button=src; if (!ta[i].maxed) this.start(ta[i]); else this.stop(ta[i],true); }\n return false;\n },\n start: function(e) {\n if (!e.savedkeyup) e.savedkeyup=e.onkeyup;\n if (!e.savedkeypress) e.savedkeypress=e.onkeypress;\n e.savedheight=e.style.height;\n e.style.height=e.scrollHeight-2+'px'; // NOTE "-2" adjustment... for scrollbar top+bottom border width???\n e.onkeypress=function(ev) {\n if (!ev) var ev=window.event; var e=resolveTarget(ev);\n if (ev.keyCode==33) { // PGUP\n if (window.scrollByPages) window.scrollByPages(-1);\n return false;\n }\n if (ev.keyCode==34) { // PGDN\n if (window.scrollByPages) window.scrollByPages(1);\n return false;\n }\n if (e.savedkeypress) e.savedkeypress();\n }\n e.onkeyup=function(ev) {\n if (!ev) var ev=window.event; var e=resolveTarget(ev);\n e.style.height=e.scrollHeight-2+'px';\n if (e.savedkeyup) e.savedkeyup();\n }\n e.button.innerHTML=config.commands.autosizeEditor.text_alt;\n e.button.title=config.commands.autosizeEditor.tooltip_alt;\n e.maxed=true;\n },\n stop: function(e,resetHeight) {\n if (resetHeight) e.style.height=e.savedheight;\n e.onkeyup=e.savedkeyup;\n e.onkeypress=e.savedkeypress;\n e.button.innerHTML=config.commands.autosizeEditor.text;\n e.button.title=config.commands.autosizeEditor.tooltip;\n e.maxed=false;\n }\n};\n//}}}\n\n// // grab-and-stretch handle for textareas\n//{{{\nconfig.macros.resizeEditor = {\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var here=story.findContainingTiddler(place); if (!here) return;\n var ta=here.getElementsByTagName('textarea'); if (!ta) return;\n for (i=0;i<ta.length;i++) new window.TextAreaResizer(ta[i]);\n }\n}\n\n// TextAreaResizer script by Jason Johnston (jj@lojjic.net)\n// Created August 2003. Use freely, but give me credit.\n// adds a handle below textareas that the user can drag with the mouse to resize the textarea.\n// MODIFIED by ELS for cross-browser (IE) compatibility, including:\n// fixups and adjustments to CSS styles,\n// use 'old style' assignment of mouse event handlers instead of using addEventListener(),\n// use window.event if event param is null,\n// use offsetHeight instead of getComputedStyle()\n// use explicit window.* global scope declaration for functions called from event handlers\n\nwindow.TextAreaResizer = function(elt) {\n this.element = elt;\n this.create();\n}\nwindow.TextAreaResizer.prototype = {\n create : function() {\n var elt = this.element;\n var thisRef = this;\n var h = this.handle = document.createElement("div");\n h.style.height = "3px"; // was 4px... looked too fat!\n h.style.overflow = "hidden"; // ELS: force IE to trim height to < 1em\n h.style.width=elt.offsetWidth+"px"; // ELS: match textarea width\n h.style.backgroundColor = "#999"; // ELS: standard mid-tone (dark) gray\n h.style.cursor = "s-resize";\n h.title = "Drag to resize text box";\n h.onmousedown=function(evt){thisRef.dragStart(evt)};\n elt.parentNode.insertBefore(h, elt.nextSibling);\n },\n dragStart : function(evt) {\n if (!evt) var evt=window.event;\n this.dragStop(evt); // ELS: stop any current drag processing first\n var thisRef = this;\n this.dragStartY = evt.clientY;\n this.dragStartH = this.element.offsetHeight;\n document.savedmousemove=document.onmousemove;\n document.onmousemove=this.dragMoveHdlr=function(evt){thisRef.dragMove(evt)};\n document.savedmouseup=document.onmouseup;\n document.onmouseup=this.dragStopHdlr=function(evt){thisRef.dragStop(evt)};\n },\n dragMove : function(evt) {\n if (!evt) var evt=window.event;\n // ELS: make sure height is at least 10px\n var h=this.dragStartH+evt.clientY-this.dragStartY;\n if (h<10) h=10; this.element.style.height=h+"px";\n // ELS: match textarea width (which can change due to document scrollbars)\n this.handle.style.width=this.element.offsetWidth+"px";\n // ELS: when manually resizing, disable autoresizing (without restoring saved height)\n if (this.element.maxed!=undefined && this.element.maxed)\n config.commands.autosizeEditor.stop(this.element,false);\n },\n dragStop : function(evt) {\n if (!evt) var evt=window.event;\n document.onmousemove=(document.savedmousemove!=undefined)?document.savedmousemove:null;\n document.onmousemove=(document.savedmouseup!=undefined)?document.savedmouseup:null;\n },\n destroy : function() {\n var elt = this.element;\n elt.parentNode.removeChild(this.handle);\n elt.style.height = "";\n }\n};\n//}}}
default tiddlers\n+DefaultTiddlers\n----\ncore tiddlers\n=core\n----\ndocument info\nWelcome About Download Contact LegalStatements ELSDesignStudios IntuitiveInterfaces\n----\nplugins\n=systemConfig\n----\nsamples\n=sample\n----\nTiddlyTools menu definitions\nSwitchMenus MainMenu MainMenuFull MainMenuMini MainMenuLite SideBarOptions SideBarOptionsFull SideBarOptionsLite SideBarOptionsMini SideBarTabs SideBarTabsFull SideBarTabsLite SideBarTabsMini StoryMenu SiteMenu SiteMenuFull SiteMenuLite SiteMenuMini SiteMenuGoto SiteMenuSearch SiteMenuFile SiteMenuEdit SiteMenuView SiteMenuOptions SiteMenuOptionsUpload SiteMenuExtras
/%\n\nusage: <<tiddler TiddlerGroupsNavbar with: groupname>>\n\nadd first/previous/next/last links to a tiddler in a specified group\n\n%/{{fine center smallform{{{floatleft{<<tiddlerGroups [[$1]] first "first">> &nbsp; <<tiddlerGroups [[$1]] previous "previous">>}}}{{floatright{ &nbsp; <<tiddlerGroups [[$1]] next "next">> &nbsp; <<tiddlerGroups [[$1]] last "last">>}}}group:$1\n}}}
/***\n|''Name:''|TiddlerGroupsPlugin|\n|''Source:''|http://www.TiddlyTools.com/#TiddlerGroupsPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nQuickly define and view a set of tiddlers by selecting a "tiddler group" from a droplist control... or, navigate between tiddlers in a group using a droplist with previous/next buttons... or, navigate a group of tiddlers using first/previous/here/next/last links\n\n!!!!!Usage\n<<<\n* {{{<<tiddlerGroups >>}}}\n** display droplist of all tiddler groups plus commands and display options\n* {{{<<tiddlerGroups groupname action>>}}}, where:\n** groupname indicates a specific group on which to operate. If groupname is omitted, the plugin automatically finds the first tiddler group that contains the current tiddler.\n** action is one of the following keywords:\n*** ''list'' displays a droplist of tiddlers for the indicated group, plus "arrow buttons" for previous/next 'guided tour' navigation.\n*** ''first'', ''next'', ''previous'', or ''last'' displays a link to the indicated tiddler within the group. The next/previous links are relative to the current tiddler.\n*** ''here'' displays the current tiddler name as a link that, when clicked refreshes (re-renders) that tiddler\n<<<\n!!!!!Configuration\n<<<\nThe default droplist display includes several commands to:\n* quickly ''add a group'' to the list (using the currently displayed tiddlers)\n* ''edit the list'' so you can manually add/remove/re-order the group definitions.\n* ''set DefaultTiddlers'' (using the currently displayed tiddlers)\nNote: these commands are automatically hidden when TW is operating in 'readOnly' mode (i.e., when viewed via http:)\n\nGroups are defined in [[TiddlerGroupsList]]. Each group definition is separated by a {{{----}}} (horizontal rule), and consists of two lines of text:\n* a description (for display in the droplist) and\n* a space-separated list of tiddler titles (use {{{[[...]]}}} around titles containing spaces).\n** If you place a "+" before a tiddler title, it is replaced with a list of tiddlers that are ''//linked//'' from that tiddler (using the same format as the standard DefaultTiddlers content).\n** When a parameter is preceded by an "=", it is replaced with a list of tiddlers that are tagged with that value.\n\nThe droplist shows all tiddler groups that are currently defined in the TiddlerGroupsList, followed by several viewing options:\n* ''fold grouped tiddlers'' - if a CollapsedTemplate tiddler is defined in the document, you can automatically fold the tiddlers as they are displayed to make it easier to locate desired content without excessive scrolling. This is especially useful if the group contains many tiddlers or tiddlers with lengthy content.\n* ''close other tiddlers'' - reduce information clutter by ensuring that only the tiddlers from the selected group are displayed.\n* ''open new window'' - view the grouped tiddlers in a separate copy of the current document (not including unsaved tiddler changes)\n<<<\n!!!!!Examples\n<<<\n{{{<<tiddlerGroups>>}}}\n<<tiddlerGroups>>\n\n{{{<<tiddlerGroups "plugins">>}}}\n<<tiddlerGroups "plugins">>\n\n{{{<<tiddlerGroups "document info">>}}}\n<<tiddlerGroups "document info">>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''TiddlerGroupsPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revisions\n<<<\n''2006.11.09 [2.1.0]'' use generated HTML instead of direct DOM calls to create 'guided tour' buttons/droplist (workaround for IE object creation errors)\n''2006.09.18 [2.0.0]'' added parameters: 'list' displays specified group "guided tour" droplist and buttons. first/prev/next/last display links to related tiddlers in the same group, 'here' display link to refresh current tiddler.\n''2006.09.12 [1.1.6]'' when adding to empty list, don't insert \sn----\sn before first group item\n''2006.08.23 [1.1.5]'' added "set default tiddlers" command\n''2006.08.22 [1.1.0]'' added expansion of "=Tag" references to auto-generate groups based on matching tags\n''2006.07.18 [1.0.0]'' fixed expansion of "+TiddlerName" references\n''2006.06.11 [0.9.5]'' cleanup options handling. added 'close others' option. added 'open new window' option. use cookies for tracking options\n''2006.06.09 [0.8.1]'' added 'fold group when viewed' toggle option\n''2006.06.09 [0.7.0]'' added notification for auto-refresh when list definitions are changed\n''2006.06.08 [0.5.0]'' converted to plugin/macro\n''2006.06.02 [0.0.0]'' started (as inline javascript)\n<<<\n!!!!!Credits\n>This feature was developed by EricShulman from [[ELS Design Studios|http://www.elsdesign.com]]\n!!!!!Code\n***/\n//{{{\nversion.extensions.tiddlerGroups= {major: 2, minor: 1, revision: 0, date: new Date(2006,11,9)};\nif (config.options.chkGroupFold==undefined) config.options.chkGroupFold=false;\nif (config.options.chkGroupClose==undefined) config.options.chkGroupClose=true;\nif (config.options.chkGroupOpen==undefined) config.options.chkGroupOpen=false;\nconfig.macros.tiddlerGroups= { \n\n groupsList: "TiddlerGroupsList",\n indent: "\sxa0\sxa0\sxa0\sxa0",\n selectprompt: "select a group to view",\n optionsprompt: "viewing options",\n foldcmd: "[%0] fold group",\n closecmd: "[%0] close others",\n opencmd: "[%0] new window",\n addcmd: "add a group...",\n addprompt: "Please enter a group name for these tiddlers:\sn%0",\n editcmd: "edit the list...",\n defcmd: "set default tiddlers...",\n defprompt: "DefaultTiddlers will be set to:\sn%0\sn\snIs it OK to proceed?",\n defmsg: "DefaultTiddlers has been updated",\n notingroupmsg: "'%0' is not in a tiddler group",\n groupnotfoundmsg: "'%0' is not a recognized tiddler group name",\n firstcmd: "first",\n nextcmd: "next",\n nextmsg: "display next tiddler",\n previouscmd: "previous",\n previousmsg: "display previous tiddler",\n lastcmd: "last",\n refreshmsg: "redisplay '%0'",\n handler:\n function(place,macroName,params) {\n if (!params[0]) { // show full group list with commands/options\n var s=createTiddlyElement(place,"select",null,"tiddlerGroupsList");\n s.size=1; s.onchange=this.onchange;\n setStylesheet(".tiddlerGroupsList { width:100%; }", "tiddlerGroupsListStyles");\n store.addNotification(this.groupsList,this.refresh); this.refresh();\n return;\n }\n var groupname="";\n var p=params.shift();\n if (p=='first'||p=='previous'||p=='here'||p=='next'||p=='last'||p=='list') {\n // find group from current tiddler name\n var here=story.findContainingTiddler(place); if (!here) return; // not in a tiddler\n groupname=this.findgroup(here.getAttribute("tiddler"));\n if (!groupname) return; // current tiddler is not in a group\n }\n else { groupname=p; p=params.shift(); } // user-specified group name\n\n // get grouped tiddlers\n var tids=this.getgroup(groupname); \n if (!tids) { displayMessage(this.groupnotfoundmsg.format([groupname])); return; }\n\n var i=0;\n switch (p) {\n case 'first':\n var here=story.findContainingTiddler(place); if (!here) return; // not in a tiddler\n i=0;\n break;\n case 'previous':\n var here=story.findContainingTiddler(place); if (!here) return; // not in a tiddler\n i=tids.find(here.getAttribute("tiddler"));\n if (i==null) { i=0; break; } // not in group, link to start of group\n i--; if (i<0) i=0;\n break;\n case 'here': // display a refresh link for current tiddler (even if not in a group)\n var here=story.findContainingTiddler(place); if (!here) return; // not in a tiddler\n var tid=here.getAttribute("tiddler"); var label=tid; if (params[0]) label=params.shift();\n createTiddlyButton(place,label,this.refreshmsg.format([tid]), function()\n { var here=story.findContainingTiddler(place); if (here) story.refreshTiddler(here.getAttribute("tiddler"),null,true); });\n return; \n case 'next':\n var here=story.findContainingTiddler(place); if (!here) return; // not in a tiddler\n i=tids.find(here.getAttribute("tiddler"));\n if (i==null) { i=0; break; } // not in group, link to start of group\n i++; if (i>tids.length-1) i=tids.length-1;\n break;\n case 'last':\n var here=story.findContainingTiddler(place); if (!here) return; // not in a tiddler\n i=tids.length-1;\n break;\n case 'list':\n default:\n var h="";\n h+='<form style="display:inline">';\n h+='<input type="button" value="<" style="width:1em" title="'+this.previousmsg+'"';\n h+=' onclick="var i=this.form.list.selectedIndex-1; if (i<1) i=1; this.form.list.selectedIndex=i; this.form.list.onchange();">';\n h+='<select size="1" name="list"';\n h+=' onchange="if (this.value)story.displayTiddler(this,this.value);">';\n h+='<option value="">'+groupname+'...</option>';\n var here=story.findContainingTiddler(place); var tid=here.getAttribute("tiddler");\n for (i=0; i<tids.length; i++) {\n h+='<option '+\n (tids[i]==tid?'selected':'')+\n 'value="'+tids[i]+'">\sxa0\sxa0'+tids[i]+'</option>';\n }\n h+='</select>';\n h+='<input type="button" value=">" style="width:1em" title="'+this.nextmsg+'"';\n h+=' onclick="var i=this.form.list.selectedIndex+1; if (i>this.form.list.options.length-1) i=this.form.list.options.length-1; this.form.list.selectedIndex=i; this.form.list.onchange();">';\n h+='</form>';\n createTiddlyElement(place,"span").innerHTML=h;\n return;\n }\n // override default labelling with specified text (if any)\n var label=tids[i]; if (params[0]) label=params.shift();\n var here=story.findContainingTiddler(place); if (here) var tid=here.getAttribute("tiddler");\n if (here && tid==tids[i]) { // self-referential links turn into 'refresh links'\n createTiddlyButton(place,label,this.refreshmsg.format([tid]), function() {\n var here=story.findContainingTiddler(place);\n if (here) story.refreshTiddler(here.getAttribute("tiddler"),null,true); });\n }\n else // create link\n createTiddlyLink(place,tids[i],true).innerHTML=label;\n },\n\n refresh:\n function() { // called directly, AND triggered by notification events\n var indent=config.macros.tiddlerGroups.indent;\n var all=document.all? document.all : document.getElementsByTagName("select");\n for (var i=0; i<all.length; i++) {\n if (all[i].className!="tiddlerGroupsList") continue;\n var here=all[i];\n while (here.length) here.options[0]=null; // remove current list items\n here.options[here.length]=new Option(config.macros.tiddlerGroups.selectprompt,"",true,true);\n var list=store.getTiddlerText(config.macros.tiddlerGroups.groupsList);\n if (list && list.trim().length) {\n var parts=list.split("\sn----\sn");\n for (var p=0; p<parts.length; p++) {\n var lines=parts[p].split("\sn");\n var label=lines.shift(); // 1st line=display text\n var value=lines.shift(); // 2nd line=item value\n here.options[here.length]=new Option(indent+label,value,false,false);\n }\n }\n here.options[here.length]=new Option(config.macros.tiddlerGroups.optionsprompt,"",false,false);\n if (!config.options.chkGroupOpen) {\n if (store.tiddlerExists("CollapsedTemplate")) {\n var msg=config.macros.tiddlerGroups.foldcmd.format([config.options.chkGroupFold?"x":"\sxa0\sxa0"]);\n here.options[here.length]=new Option(indent+msg,"_fold",false,false);\n }\n var msg=config.macros.tiddlerGroups.closecmd.format([config.options.chkGroupClose?"x":"\sxa0\sxa0"]);\n here.options[here.length]=new Option(indent+msg,"_close",false,false);\n }\n var msg=config.macros.tiddlerGroups.opencmd.format([config.options.chkGroupOpen?"x":"\sxa0\sxa0"]);\n here.options[here.length]=new Option(indent+msg,"_open",false,false);\n if (!readOnly) {\n here.options[here.length]=new Option(config.macros.tiddlerGroups.defcmd,"_setdef",false,false);\n here.options[here.length]=new Option(config.macros.tiddlerGroups.addcmd,"_add",false,false);\n here.options[here.length]=new Option(config.macros.tiddlerGroups.editcmd,"_edit",false,false);\n }\n }\n },\n\n expandlist:\n function(list) {\n var expandedlist=[];\n for (var i=0; i<list.length; i++)\n switch (list[i].substr(0,1)) {\n case '+': // get list from tiddler\n var sublist=store.getTiddlerText(list[i].substr(1)).readBracketedList();\n for (var j=0; j<sublist.length; j++)\n expandedlist.push(sublist[j]);\n break;\n case '=': // get tagged tiddlers\n var sublist=store.getTiddlers("title");\n for (var j=0; j<sublist.length; j++)\n if (sublist[j].tags.contains(list[i].substr(1)))\n expandedlist.push(sublist[j].title);\n break;\n default:\n expandedlist.push(list[i]);\n break;\n }\n return expandedlist;\n },\n\n findgroup:\n function(tid) {\n var text=store.getTiddlerText(config.macros.tiddlerGroups.groupsList);\n if (!text || !text.trim().length) return; // no group definitions\n var groups=text.split("\sn----\sn");\n for (var g=0; g<groups.length; g++) {\n var lines=groups[g].split("\sn");\n var label=lines.shift(); // 1st line=display text\n var value=lines.shift(); // 2nd line=item value\n if (this.expandlist(value.readBracketedList()).find(tid)!=null) break;\n }\n return (g==groups.length?null:label);\n },\n\n getgroup:\n function(groupname) {\n var text=store.getTiddlerText(config.macros.tiddlerGroups.groupsList);\n if (!text || !text.trim().length) return; // no group definitions\n var groups=text.split("\sn----\sn");\n for (var g=0; g<groups.length; g++) {\n var lines=groups[g].split("\sn");\n var label=lines.shift(); // 1st line=display text\n var value=lines.shift(); // 2nd line=item value\n if (label==groupname) break;\n }\n if (g==groups.length) return; // unknown group\n return this.expandlist(value.readBracketedList());\n },\n\n onchange:\n function() { // this == droplist control\n var v=this.value; if (!v.length) return;\n switch (v) {\n case '_fold':\n config.options.chkGroupFold=!config.options.chkGroupFold;\n saveOptionCookie('chkGroupFold'); config.macros.tiddlerGroups.refresh();\n break;\n case '_close':\n config.options.chkGroupClose=!config.options.chkGroupClose;\n saveOptionCookie('chkGroupClose'); config.macros.tiddlerGroups.refresh();\n break;\n case '_open':\n config.options.chkGroupOpen=!config.options.chkGroupOpen;\n saveOptionCookie('chkGroupOpen'); config.macros.tiddlerGroups.refresh();\n break;\n case '_add':\n var list=[]; story.forEachTiddler(function(title,element){list.push(String.encodeTiddlyLink(title))}); list=list.join(" ");\n var d=prompt(config.macros.tiddlerGroups.addprompt.format([list.readBracketedList().join(', ')]),'');\n if (!d || !d.trim().length) return;\n var t=store.getTiddler(config.macros.tiddlerGroups.groupsList);\n var newtext=t.text+(t.text.length?"\sn----\sn":"")+d+"\sn"+list;\n store.saveTiddler(t.title,t.title,newtext,config.options.txtUserName,new Date(),t.tags);\n story.refreshTiddler(config.macros.tiddlerGroups.groupsList,null,true);\n config.macros.tiddlerGroups.refresh(); this.value=list; // reload list and select newly added item\n break;\n case '_edit':\n story.displayTiddler(null,config.macros.tiddlerGroups.groupsList,2);\n break;\n case '_setdef':\n this.selectedIndex=0; // reset selection\n var list=[]; story.forEachTiddler(function(title,element){list.push(String.encodeTiddlyLink(title))}); list=list.join(" ");\n if (!confirm(config.macros.tiddlerGroups.defprompt.format([list.readBracketedList().join(', ')]))) return;\n var t=store.getTiddler("DefaultTiddlers");\n store.saveTiddler(t.title,t.title,list,config.options.txtUserName,new Date(),t.tags);\n story.refreshTiddler("DefaultTiddlers",null,true);\n clearMessage(); displayMessage(config.macros.tiddlerGroups.defmsg);\n break;\n default:\n var expandedlist=config.macros.tiddlerGroups.getgroup(this.options[this.selectedIndex].text.trim());\n if (!expandedlist) return; // group not found\n if (config.options.chkGroupOpen) {\n var list=[];\n for (var i=0; i<expandedlist.length; i++)\n list[i]=String.encodeTiddlyLink(expandedlist[i]);\n expandedlist=expandedlist.join(" ");\n var url=document.location.protocol+"//"+document.location.host+document.location.pathname+"#";\n url+=encodeURIComponent(list);\n window.open(url,"_blank");\n break;\n }\n if (config.options.chkGroupClose) story.closeAllTiddlers();\n var template=(config.options.chkGroupFold && store.tiddlerExists("CollapsedTemplate"))?"CollapsedTemplate":null;\n story.displayTiddlers(null,expandedlist,template);\n break;\n }\n }\n}\n//}}}
/***\nTiddler Admin Password Configuration...\n<<getTiddlerPassword>> /% tiddler cannot be viewed without current password %/\n***/\n//{{{\nconfig.macros.getTiddlerPassword.adminPass="admin";\n//}}}\n
/***\n|''Name:''|TiddlerPasswordPlugin|\n|''Source:''|http://www.TiddlyTools.com/#TiddlerPasswordPlugin|\n|''Author:''|Eric Shulman - ELS Design Studios|\n|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|\n|''~CoreVersion:''|2.0.10|\n\nThis plugin blocks viewing of specific tiddler content by prompting for a NON-SECURE, UNENCRYPTED password before the tiddler is displayed. If the correct password is not entered, the tiddler is automatically closed. The process does not prevent tiddler content from being viewed directly from the TiddlyWiki source file's storeArea, nor does it encrypt the tiddler content in any way. Because it is relatively simple to bypass and/or disable the password prompting process, this macro should be thought of as a "latch" rather than a "lock" on a given tiddler.\n!!!!!Usage\n<<<\n{{{<<getTiddlerPassword password>>}}} or {{{<<getTiddlerPassword>>}}} \n\nwhere "password" is the user-level password for the tiddler in which the macro occurs. If no password is provided, then only the admin-level password (see below) will be accepted.\n\nPlace the {{{<<getTiddlerPassword>>}}} macro at the beginning of your tiddler content. The macro prompts for a password until either A) the correct password is entered or B) the user presses the cancel button from the prompt box, in which case the tiddler is automatically closed so it cannot be viewed. If a valid password is input, it will be remembered only until the user closes the tiddler. Each time the tiddler is opened, the password must be re-entered.\n\nNotes:\n* You can also set a hard-coded admin password (see below) to define a "universal passkey" that will grant access to all tiddlers protected by this script, regardless of the individual password used on each protected tiddler.\n* If you embed one or more password-protected tiddlers within another tiddler (by using the {{{<<tiddler TiddlerName>>}}} macro) the user will be prompted to provide the appropriate password for the EACH protected tiddler contained in the tiddler being rendered.\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''TiddlerPasswordPlugin'' (tagged with <<tag systemConfig>>)\n\n''As soon as you have installed this plugin, you should change the default admin password in [[TiddlerPasswordConfig]].'' Note: the configuration tiddler is password-protected to prevent the admin password from being viewed (and/or modified) unless the current password is provided. By default, the admin password is set to "admin".\n<<<\n!!!!!Revision History\n<<<\n''2006.12.03 [1.0.1]'' handler() uses passed-in 'tiddler.title' (if any), so that title of included protected tiddlers can be correctly displayed (instead of showng title of containing tiddler)\n''2006.12.02 [1.0.0]'' initial release - converted from GetTiddlerPassword inline script\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.getTiddlerPassword= {major: 1, minor: 0, revision: 1, date: new Date(2006,12,3)};\n\nconfig.macros.getTiddlerPassword = {\n msg: "Please enter a password to view '%0'",\n defaultText: "enter password here",\n retryMsg: "'%0' is not the correct password for '%1'. Please try again:",\n cancelMsg: "Sorry, you cannot view '%0' without entering a valid password.",\n thanksMsg: "Thank you, your password has been accepted.",\n handler: function(place,macroName,params,wikifier,paramString,tiddler) {\n var here=story.findContainingTiddler(place); if (!here) return;\n var title=tiddler?tiddler.title:here.getAttribute("tiddler");\n var who=here.getAttribute("logID");\n var userPass=params[0]?params[0]:"";\n if (who==userPass||who==this.adminPass) return; // already 'logged in'?\n var who=prompt(this.msg.format([title]),this.defaultText); // ask for ID\n while (who && who!=userPass && who!=this.adminPass) // not correct ID?\n who=prompt(this.retryMsg.format([who,title]),this.defaultText); // ask again\n if (who==userPass||who==this.adminPass) // correct ID? mark tiddler logged in...\n { here.setAttribute("logID",who); alert(this.thanksMsg); }\n else // incorrect ID (e.g., entry cancelled by user)...\n { story.closeTiddler(here.getAttribute("tiddler")); alert(this.cancelMsg.format([title])); }\n }\n}\n// default admin password (may be overridden in TiddlerPasswordConfig)\nif (config.macros.getTiddlerPassword.adminPass==undefined)\n config.macros.getTiddlerPassword.adminPass="admin";\n//}}}
<script label="show/hide left sidebar">\n var show=document.getElementById('mainMenu').style.display=='none';\n if (!show) {\n document.getElementById('mainMenu').style.display='none';\n var margin='1em';\n }\n else {\n document.getElementById('mainMenu').style.display='block';\n var margin=config.options.txtDisplayAreaLeftMargin?config.options.txtDisplayAreaLeftMargin:"";\n }\n place.innerHTML=(show?"&lt;&lt;&lt;":"&gt;&gt;&gt;"); // SET LINK TEXT\n place.title=show?"hide sidebar":"show sidebar"; // SET TOOLTIP\n document.getElementById('displayArea').style.marginLeft=margin;\n config.options.chkShowLeftSidebar=show;\n saveOptionCookie('chkShowLeftSidebar');\n var sm=document.getElementById("storyMenu"); if (sm) config.refreshers.content(sm);\n return false;\n</script><script>\n if (config.options.chkShowLeftSidebar==undefined)\n config.options.chkShowLeftSidebar=true;\n if (!config.options.txtDisplayAreaLeftMargin||!config.options.txtDisplayAreaLeftMargin.length)\n config.options.txtDisplayAreaLeftMargin="12em";\n var show=config.options.chkShowLeftSidebar;\n document.getElementById('mainMenu').style.display=show?"block":"none";\n document.getElementById('displayArea').style.marginLeft=show?config.options.txtDisplayAreaLeftMargin:"1em";\n place.lastChild.innerHTML=(show?"&lt;&lt;&lt;":"&gt;&gt;&gt;"); // SET LINK TEXT\n place.lastChild.title=show?"hide sidebar":"show sidebar"; // SET TOOLTIP\n place.lastChild.style.fontWeight="normal";\n</script>
<<option chkHttpReadOnly>><script>\n var chk=place.lastChild;\n chk.style.margin=chk.style.padding="0";\n chk.id="ToggleReadOnly_checkbox";\n chk.title="enable/disable TiddlyWiki editing functions";\n chk.checked=readOnly;\n chk.coreOnChange=chk.onchange;\n chk.onchange=function() {\n if (this.coreOnChange) this.coreOnChange();\n readOnly=!readOnly;\n this.checked=readOnly;\n story.forEachTiddler(function(t,e){story.refreshTiddler(t,null,true)});\n refreshDisplay();\n };\n</script><script label="read-only">\n place.previousSibling.onchange();\n</script><script>\n var s=place.lastChild.style; s.display="inline"; s.fontWeight="normal";\n</script>
<script label="show/hide right sidebar">\n var show=document.getElementById('sidebar').style.display=='none';\n if (!show) {\n document.getElementById('sidebar').style.display='none';\n var margin='1em';\n }\n else {\n document.getElementById('sidebar').style.display='block';\n var margin=config.options.txtDisplayAreaRightMargin?config.options.txtDisplayAreaRightMargin:"";\n }\n place.innerHTML=(show?"&gt;&gt;&gt;":"&lt;&lt;&lt;"); // SET LINK TEXT\n place.title=show?"hide sidebar":"show sidebar"; // SET TOOLTIP\n document.getElementById('displayArea').style.marginRight=margin;\n config.options.chkShowRightSidebar=show;\n saveOptionCookie('chkShowRightSidebar');\n var sm=document.getElementById("storyMenu"); if (sm) config.refreshers.content(sm);\n return false;\n</script><script>\n if (config.options.chkShowRightSidebar==undefined)\n config.options.chkShowRightSidebar=true;\n if (!config.options.txtDisplayAreaRightMargin||!config.options.txtDisplayAreaRightMargin.length)\n config.options.txtDisplayAreaRightMargin="17em";\n var show=config.options.chkShowRightSidebar;\n document.getElementById('sidebar').style.display=show?"block":"none";\n document.getElementById('displayArea').style.marginRight=show?config.options.txtDisplayAreaRightMargin:"1em";\n place.lastChild.innerHTML=(show?"&gt;&gt;&gt;":"&lt;&lt;&lt;"); // SET LINK TEXT\n place.lastChild.title=show?"hide sidebar":"show sidebar"; // SET TOOLTIP\n place.lastChild.style.fontWeight="normal";\n</script>
<script>\n if (config.options.chkScrollSidebars==undefined)\n config.options.chkScrollSidebars=true;\n if (!config.options.txtOuterTabHeight||!config.options.txtOuterTabHeight.length)\n config.options.txtOuterTabHeight="25em";\n if (!config.options.txtInnerTabHeight||!config.options.txtInnerTabHeight.length)\n config.options.txtInnerTabHeight="21em";\n\n var scroll=config.options.chkScrollSidebars||config.browser.isIE?'':'fixed'; // IE doesn't do 'fixed' position\n document.getElementById('mainMenu').style.position=scroll;\n document.getElementById('sidebar').style.position=scroll;\n\n // "short sheet" the SideBarTabs when sidebars are hovering (to hopefully fit "above the fold")\n var outer=config.options.chkScrollSidebars||config.browser.isIE?"auto":config.options.txtOuterTabHeight;\n var inner=config.options.chkScrollSidebars||config.browser.isIE?"auto":config.options.txtInnerTabHeight;\n var css='#sidebarTabs .tabContents { height:'+outer+'; overflow:auto; width:92.5%; }';\n css+='#sidebarTabs .tabContents .tabContents { height:'+inner+' !important; }';\n setStylesheet(css,'shortSidebarTabs');\n\n window.ToggleScrollingSidebars_setscroll = function() {\n if (config.browser.isIE) return; // IE doesn't support 'fixed' position\n document.getElementById('mainMenu').style.position=!config.options.chkScrollSidebars?'fixed':'';\n document.getElementById('sidebar').style.position=!config.options.chkScrollSidebars?'fixed':'';\n var outerTabHeight=config.options.txtOuterTabHeight;\n if (config.options.chkScrollSidebars) outerTabHeight="auto";\n var innerTabHeight=config.options.txtInnerTabHeight;\n if (config.options.chkScrollSidebars) innerTabHeight="auto";\n var css='#sidebarTabs .tabContents { height:'+outerTabHeight+'; overflow:auto; width:92.5%; }';\n css+='#sidebarTabs .tabContents .tabContents { height:'+innerTabHeight+' !important; }';\n setStylesheet(css,'shortSidebarTabs');\n }\n\n</script><<option chkScrollSidebars>><script>\n place.lastChild.checked=config.options.chkScrollSidebars;\n place.lastChild.onchange=function() {\n config.options.chkScrollSidebars=this.checked;\n saveOptionCookie("chkScrollSidebars");\n window.ToggleScrollingSidebars_setscroll();\n };\n</script> sidebars scroll with page
<script>\n window.toggleSiteMenu=function() {\n var m=document.getElementById('siteMenu'); \n if (!m) return true; // no sitemenu element... let event bubble through...\n var show=m.style.display=="none";\n m.style.display=show?"block":"none";\n config.options.chkHideSiteMenu=!show; saveOptionCookie('chkHideSiteMenu');\n var nodes = document.getElementsByTagName("input");\n for(var t=0; t<nodes.length; t++)\n if (nodes[t].getAttribute("option")=="chkHideSiteMenu") nodes[t].checked=show;\n var doDblclick=config.options.chkHideSiteMenu&&!config.options.chkShowRightSidebar;\n document.ondblclick=doDblclick?window.toggleSiteMenu:null;\n window.status=document.body.title=doDblclick?"double-click page background to display menubar":"";\n return false;\n };\n if (config.options.chkHideSiteMenu==undefined) config.options.chkHideSiteMenu=false;\n var m=document.getElementById('siteMenu'); \n m.style.display=config.options.chkHideSiteMenu?"none":"block";\n var doDblclick=config.options.chkHideSiteMenu&&!config.options.chkShowRightSidebar;\n document.ondblclick=doDblclick?window.toggleSiteMenu:null;\n window.status=document.body.title=doDblclick?"double-click page background to display menubar":"";\n</script><<option chkHideSiteMenu>><script>\n place.lastChild.id="ToggleSiteMenu_checkbox"\n place.lastChild.checked=!config.options.chkHideSiteMenu;\n place.lastChild.coreOnChange=place.lastChild.onchange;\n place.lastChild.onchange=function() {\n if (this.coreOnChange) this.coreOnChange();\n window.toggleSiteMenu();\n if (config.options.chkHideSiteMenu&&!config.options.chkShowRightSidebar) { \n clearMessage(); displayMessage("double-click page background to redisplay menubar")\n setTimeout("clearMessage()",3000); // EPHEMERAL "REMINDER" MESSAGE\n }\n };\n</script> show site menubar
<script>\n var c=document.getElementById('contentWrapper'); \n if (config.options.chkHideSiteTitles==undefined) config.options.chkHideSiteTitles=false;\n for (var i=0; i<c.childNodes.length; i++) if (hasClass(c.childNodes[i],"header")) var h=c.childNodes[i];\n h.style.display=config.options.chkHideSiteTitles?"none":"block";\n</script><<option chkHideSiteTitles>><script>\n place.lastChild.checked=!config.options.chkHideSiteTitles;\n place.lastChild.onchange=function() {\n var c=document.getElementById('contentWrapper'); \n for (var i=0; i<c.childNodes.length; i++) if (hasClass(c.childNodes[i],"header")) var h=c.childNodes[i];\n config.options.chkHideSiteTitles=!this.checked;\n h.style.display=config.options.chkHideSiteTitles?"none":"block";\n saveOptionCookie("chkHideSiteTitles");\n };\n</script> show site titles
<script> \n window.showTopButton=function(show) {\n // remove existing "top" button (if any)\n var e=document.getElementById("scrollToTopButton"); if (e) e.parentNode.removeChild(e);\n if (config.browser.isIE) return; // IE doesn't do FIXED... do nothing.\n if (!show) return; // hiding button... we're done.\n // create a link that scrolls to the top of page\n e=createTiddlyElement(null,"A",null,null,"top");\n e.id="scrollToTopButton";\n e.title="scroll to top of page";\n e.onclick=function(){window.scrollTo(0,0)};\n // make it hover in the bottom right corner of the window\n var s=e.style;\n s.position="fixed";\n s.zIndex="1001"; // hopefully, this will be on top of ALL other elements!\n s.bottom=".5em";\n s.right=".5em";\n s.cursor="pointer";\n s.backgroundColor="#eee";\n s.color="#009";\n s.border="1px solid";\n s.padding="0 1em";\n s.MozBorderRadius="1em";\n s.fontSize="7pt";\n document.body.insertBefore(e,null);\n }\n if (config.options.chkShowTopButton==undefined) config.options.chkShowTopButton=true;\n window.showTopButton(config.options.chkShowTopButton);\n</script><<option chkShowTopButton>><script>\n place.lastChild.onchange=function() {\n window.showTopButton(this.checked);\n config.options.chkShowTopButton=this.checked;\n saveOptionCookie("chkShowTopButton");\n };\n</script> "scroll-to-top" button
<<emptyTrash>>
/***\n|''Name:''|TrashPlugin|\n|''Version:''|1.1.0 (Dec 12, 2006) |\n|''Source:''|http://ido-xp.tiddlyspot.com/#TrashPlugin|\n|''Author:''|Ido Magal (idoXatXidomagalXdotXcom)|\n|''Licence:''|[[BSD open source license]]|\n|''CoreVersion:''|2.1.0|\n|''Browser:''|??|\n\n!Description\nThis plugin provides trash bin functionality. Instead of being permanently removed, deleted tiddlers are tagged with "Trash." Empty the trash by clicking on the <<emptyTrash>> button in the [[Trash]] tiddler. Holding down CTRL while clicking on "delete" will bypass the trash.\n\n!Installation instructions\nCreate a new tiddler in your wiki and copy the contents of this tiddler into it. Name it the same and tag it with "systemConfig".\nSave and reload your wiki.\n\n!Uninstallation instructions\n1. Empty the [[Trash]] ( <<emptyTrash>> )\n2. Delete this tiddler.\n\n!Revision history\n* V1.1.0 (Dec 12, 2006) \n** added movedMsg (feedback when tiddler is tagged as Trash)\n** make sure tiddler actually exists before tagging it with "Trash"\n** fetch correct tiddler before checking for "systemConfig" tag\n* V1.0.3TT.1 (TiddlyTools variant) (Dec 11, 2006) \n** don't create Trash tiddler until needed\n** remove Trash tiddler when no trash remains\n** don't tag Trash tiddler with "TrashPlugin"\n** moved all user-visible strings to variables so they can be translated by 'lingo' plugins\n** use displayMessage() instead of alert()\n* v1.0.3 (Dec 11, 2006)\n** Fixed broken reference to core deleteTiddler.\n** Now storing reference to core deleteTiddler in emptyTrash macro.\n** Reduced deleteTiddler hijacking to only the handler.\n* v1.0.2 (Dec 11, 2006)\n** EmptyTrash now uses removeTiddler instead of deleteTiddler.\n** Supports trashing systemConfig tiddlers (adds systemConfigDisable tag).\n* v1.0.1 (Dec 10, 2006)\n** Replaced TW version with proper Core reference.\n** Now properly hijacking deleteTiddler command.\n* v1.0.0 (Dec 10, 2006)\n** First draft.\n\n!To Do\n* Make trash keep only n days worth of garbage.\n* Add undo.\n* rename deleted tiddlers?\n\n!Code\n***/\n//{{{\n\nconfig.macros.emptyTrash = \n{\n tag: "Trash",\n movedMsg: "'%0' has been tagged as '%1'",\n label: "empty trash",\n tooltip: "Delete items tagged as %0 that are older than %1 days old",\n emptyMsg: "The trash is empty.",\n noneToDeleteMsg: "There are no items in the trash older than %0 days.",\n confirmMsg: "The following tiddlers will be deleted:\sn\sn'%0'\sn\snIs it OK to proceed?",\n deletedMsg: "Deleted '%0'",\n\n handler: function ( place,macroName,params,wikifier,paramString,tiddler )\n {\n var namedParams = (paramString.parseParams(daysOld))[0];\n var daysOld = namedParams['daysOld'] ? namedParams['daysOld'][0] : 0; // default\n var buttonTitle = namedParams['title'] ? namedParams['title'][0] : this.label;\n createTiddlyButton ( place, buttonTitle, this.tooltip.format([ config.macros.emptyTrash.tag,daysOld ]),\n this.emptyTrash( daysOld ));\n },\n\n emptyTrash: function( daysOld )\n {\n return function()\n {\n var collected = [];\n var compareDate = new Date();\n compareDate.setDate( compareDate.getDate() - daysOld );\n store.forEachTiddler(function ( title,tiddler )\n {\n if ( tiddler.tags.contains( config.macros.emptyTrash.tag ) && tiddler.modified < compareDate )\n collected.push( title );\n });\n\n if ( collected.length == 0 )\n {\n if ( daysOld == 0 )\n displayMessage( config.macros.emptyTrash.emptyMsg );\n else\n displayMessage( config.macros.emptyTrash.emptyMsg.format( [daysOld] ) );\n }\n else {\n if ( confirm( config.macros.emptyTrash.confirmMsg.format( [collected.join( "', '" )] ) ) )\n {\n for ( var i=0;i<collected.length;i++ )\n {\n store.removeTiddler( collected[i] );\n displayMessage( config.macros.emptyTrash.deletedMsg.format( [collected[i]] ) );\n }\n }\n }\n // remove Trash tiddler if no trash remains\n if ( store.getTaggedTiddlers( config.macros.emptyTrash.tag ).length == 0 ) {\n story.closeTiddler( config.macros.emptyTrash.tag,true,false);\n store.removeTiddler( config.macros.emptyTrash.tag );\n }\n else\n story.refreshTiddler( config.macros.emptyTrash.tag,false,true );\n store.setDirty( true );\n }\n }\n}\n\n////////////////// hijack delete command\n\nconfig.macros.emptyTrash.orig_deleteTiddler_handler = config.commands.deleteTiddler.handler;\nconfig.commands.deleteTiddler.handler = function( event,src,title )\n {\n // if tiddler exists (i.e., not a NEW, unsaved tiddler in edit mode) and not bypassing Trash (holding CTRL key)\n if ( store.tiddlerExists( title ) && !event.ctrlKey )\n {\n // if Trash tiddler doesn't exist yet, create it now...\n if (!store.tiddlerExists( config.macros.emptyTrash.tag ))\n store.saveTiddler( config.macros.emptyTrash.tag,config.macros.emptyTrash.tag,\n "<<emptyTrash>>","TrashPlugin",new Date(),null );\n // set tags on tiddler\n store.setTiddlerTag( title,1,config.macros.emptyTrash.tag );\n store.setTiddlerTag( title,1,"excludeLists" );\n store.setTiddlerTag( title,1,"excludeMissing" );\n var tiddler=store.fetchTiddler(title);\n if (tiddler.tags.contains( "systemConfig" ))\n store.setTiddlerTag( title,1,"systemConfigDisable" );\n // close tiddler, autosave file (if set), and give user feedback\n story.closeTiddler( title,true,event.shiftKey || event.altKey );\n if( config.options.chkAutoSave )\n saveChanges();\n displayMessage(config.macros.emptyTrash.movedMsg.format( [ title,config.macros.emptyTrash.tag ] ));\n }\n else {\n config.macros.emptyTrash.orig_deleteTiddler_handler.apply( this, arguments );\n }\n story.refreshTiddler( config.macros.emptyTrash.tag,false,true );\n return false;\n };\n//}}}
/***\n<<tiddler UploadPluginDoc>>\n!Code\n***/\n//{{{\nversion.extensions.UploadPlugin = {\n major: 3, minor: 3, revision: 1, \n date: new Date(2006,3,30),\n type: 'macro',\n source: 'http://tiddlywiki.bidix.info/#UploadPlugin',\n docs: 'http://tiddlywiki.bidix.info/#UploadPluginDoc'\n};\n//}}}\n\n////+++!![config.lib.file]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.file) config.lib.file= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.file.dirname = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(0, lastpos);\n } else {\n return filePath.substring(0, filePath.lastIndexOf("\s\s"));\n }\n};\nconfig.lib.file.basename = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("#")) != -1) \n filePath = filePath.substring(0, lastpos);\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(lastpos + 1);\n } else\n return filePath.substring(filePath.lastIndexOf("\s\s")+1);\n};\nwindow.basename = function() {return "@@deprecated@@";};\n//}}}\n////===\n\n////+++!![config.lib.log]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.log) config.lib.log= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.Log = function(tiddlerTitle, logHeader) {\n if (version.major < 2)\n this.tiddler = store.tiddlers[tiddlerTitle];\n else\n this.tiddler = store.getTiddler(tiddlerTitle);\n if (!this.tiddler) {\n this.tiddler = new Tiddler();\n this.tiddler.title = tiddlerTitle;\n this.tiddler.text = "| !date | !user | !location |" + logHeader;\n this.tiddler.created = new Date();\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[tiddlerTitle] = this.tiddler;\n else\n store.addTiddler(this.tiddler);\n }\n return this;\n};\n\nconfig.lib.Log.prototype.newLine = function (line) {\n var now = new Date();\n var newText = "| ";\n newText += now.getDate()+"/"+(now.getMonth()+1)+"/"+now.getFullYear() + " ";\n newText += now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+" | ";\n newText += config.options.txtUserName + " | ";\n var location = document.location.toString();\n var filename = config.lib.file.basename(location);\n if (!filename) filename = '/';\n newText += "[["+filename+"|"+location + "]] |";\n this.tiddler.text = this.tiddler.text + "\sn" + newText;\n this.addToLine(line);\n};\n\nconfig.lib.Log.prototype.addToLine = function (text) {\n this.tiddler.text = this.tiddler.text + text;\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[this.tiddler.tittle] = this.tiddler;\n else {\n store.addTiddler(this.tiddler);\n story.refreshTiddler(this.tiddler.title);\n store.notify(this.tiddler.title, true);\n }\n if (version.major < 2)\n store.notifyAll(); \n};\n//}}}\n////===\n\n////+++!![config.lib.options]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.options) config.lib.options = {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\n\nconfig.lib.options.init = function (name, defaultValue) {\n if (!config.options[name]) {\n config.options[name] = defaultValue;\n saveOptionCookie(name);\n }\n};\n//}}}\n////===\n\n////+++!![PasswordTweak]\n\n//{{{\nversion.extensions.PasswordTweak = {\n major: 1, minor: 0, revision: 2, date: new Date(2006,3,11),\n type: 'tweak',\n source: 'http://tiddlywiki.bidix.info/#PasswordTweak'\n};\n//}}}\n/***\n!!config.macros.option\n***/\n//{{{\nconfig.macros.option.passwordCheckboxLabel = "Save this password on this computer";\nconfig.macros.option.passwordType = "password"; // password | text\n\nconfig.macros.option.onChangeOption = function(e)\n{\n var opt = this.getAttribute("option");\n var elementType,valueField;\n if(opt) {\n switch(opt.substr(0,3)) {\n case "txt":\n elementType = "input";\n valueField = "value";\n break;\n case "pas":\n elementType = "input";\n valueField = "value";\n break;\n case "chk":\n elementType = "input";\n valueField = "checked";\n break;\n }\n config.options[opt] = this[valueField];\n saveOptionCookie(opt);\n var nodes = document.getElementsByTagName(elementType);\n for(var t=0; t<nodes.length; t++) {\n var optNode = nodes[t].getAttribute("option");\n if (opt == optNode) \n nodes[t][valueField] = this[valueField];\n }\n }\n return(true);\n};\n\nconfig.macros.option.handler = function(place,macroName,params)\n{\n var opt = params[0];\n var size = 15;\n if (params[1])\n size = params[1];\n if(config.options[opt] === undefined) {\n return;}\n var c;\n switch(opt.substr(0,3)) {\n case "txt":\n c = document.createElement("input");\n c.onkeyup = this.onChangeOption;\n c.setAttribute ("option",opt);\n c.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\n break;\n case "pas":\n // input password\n c = document.createElement ("input");\n c.setAttribute("type",config.macros.option.passwordType);\n c.onkeyup = this.onChangeOption;\n c.setAttribute("option",opt);\n c.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\n // checkbox link with this password "save this password on this computer"\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option","chk"+opt);\n place.appendChild(c);\n c.checked = config.options["chk"+opt];\n // text savePasswordCheckboxLabel\n place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));\n break;\n case "chk":\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option",opt);\n place.appendChild(c);\n c.checked = config.options[opt];\n break;\n }\n};\n//}}}\n/***\n!! Option cookie stuff\n***/\n//{{{\nwindow.loadOptionsCookie_orig_PasswordTweak = window.loadOptionsCookie;\nwindow.loadOptionsCookie = function()\n{\n var cookies = document.cookie.split(";");\n for(var c=0; c<cookies.length; c++) {\n var p = cookies[c].indexOf("=");\n if(p != -1) {\n var name = cookies[c].substr(0,p).trim();\n var value = cookies[c].substr(p+1).trim();\n switch(name.substr(0,3)) {\n case "txt":\n config.options[name] = unescape(value);\n break;\n case "pas":\n config.options[name] = unescape(value);\n break;\n case "chk":\n config.options[name] = value == "true";\n break;\n }\n }\n }\n};\n\nwindow.saveOptionCookie_orig_PasswordTweak = window.saveOptionCookie;\nwindow.saveOptionCookie = function(name)\n{\n var c = name + "=";\n switch(name.substr(0,3)) {\n case "txt":\n c += escape(config.options[name].toString());\n break;\n case "chk":\n c += config.options[name] ? "true" : "false";\n // is there an option link with this chk ?\n if (config.options[name.substr(3)]) {\n saveOptionCookie(name.substr(3));\n }\n break;\n case "pas":\n if (config.options["chk"+name]) {\n c += escape(config.options[name].toString());\n } else {\n c += "";\n }\n break;\n }\n c += "; expires=Fri, 1 Jan 2038 12:00:00 UTC; path=/";\n document.cookie = c;\n};\n//}}}\n/***\n!! Initializations\n***/\n//{{{\n// define config.options.pasPassword\nif (!config.options.pasPassword) {\n config.options.pasPassword = 'defaultPassword';\n window.saveOptionCookie('pasPassword');\n}\n// since loadCookies is first called befor password definition\n// we need to reload cookies\nwindow.loadOptionsCookie();\n//}}}\n////===\n\n////+++!![config.macros.upload]\n\n//{{{\nconfig.macros.upload = {\n accessKey: "U",\n formName: "UploadPlugin",\n contentType: "text/html;charset=UTF-8",\n defaultStoreScript: "store.php"\n};\n\n// only this two configs need to be translated\nconfig.macros.upload.messages = {\n aboutToUpload: "About to upload TiddlyWiki to %0",\n errorDownloading: "Error downloading",\n errorUploadingContent: "Error uploading content",\n fileNotFound: "file to upload not found",\n fileNotUploaded: "File %0 NOT uploaded",\n mainFileUploaded: "Main TiddlyWiki file uploaded to %0",\n urlParamMissing: "url param missing",\n rssFileNotUploaded: "RssFile %0 NOT uploaded",\n rssFileUploaded: "Rss File uploaded to %0"\n};\n\nconfig.macros.upload.label = {\n promptOption: "Save and Upload this TiddlyWiki with UploadOptions",\n promptParamMacro: "Save and Upload this TiddlyWiki in %0",\n saveLabel: "save to web", \n saveToDisk: "save to disk",\n uploadLabel: "upload" \n};\n\nconfig.macros.upload.handler = function(place,macroName,params){\n // parameters initialization\n var storeUrl = params[0];\n var toFilename = params[1];\n var backupDir = params[2];\n var uploadDir = params[3];\n var username = params[4];\n var password; // for security reason no password as macro parameter\n var label;\n if (document.location.toString().substr(0,4) == "http")\n label = this.label.saveLabel;\n else\n label = this.label.uploadLabel;\n var prompt;\n if (storeUrl) {\n prompt = this.label.promptParamMacro.toString().format([this.dirname(storeUrl)]);\n }\n else {\n prompt = this.label.promptOption;\n }\n createTiddlyButton(place, label, prompt, \n function () {\n config.macros.upload.upload(storeUrl, toFilename, uploadDir, backupDir, username, password); \n return false;}, \n null, null, this.accessKey);\n};\nconfig.macros.upload.UploadLog = function() {\n return new config.lib.Log('UploadLog', " !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |" );\n};\nconfig.macros.upload.UploadLog.prototype = config.lib.Log.prototype;\nconfig.macros.upload.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {\n var line = " [[" + config.lib.file.basename(storeUrl) + "|" + storeUrl + "]] | ";\n line += uploadDir + " | " + toFilename + " | " + backupDir + " |";\n this.newLine(line);\n};\nconfig.macros.upload.UploadLog.prototype.endUpload = function() {\n this.addToLine(" Ok |");\n};\nconfig.macros.upload.basename = config.lib.file.basename;\nconfig.macros.upload.dirname = config.lib.file.dirname;\nconfig.macros.upload.upload = function(storeUrl, toFilename, uploadDir, backupDir, username, password)\n{\n // parameters initialization\n storeUrl = (storeUrl ? storeUrl : config.options.txtUploadStoreUrl);\n toFilename = (toFilename ? toFilename : config.options.txtUploadFilename);\n if (toFilename === '') {\n toFilename = config.lib.file.basename(document.location.toString());\n }\n backupDir = (backupDir ? backupDir : config.options.txtUploadBackupDir);\n uploadDir = (uploadDir ? uploadDir : config.options.txtUploadDir);\n username = (username ? username : config.options.txtUploadUserName);\n password = config.options.pasUploadPassword; // for security reason no password as macro parameter\n\n clearMessage();\n // only for forcing the message to display\n if (version.major < 2)\n store.notifyAll();\n if (!storeUrl) {\n alert(config.macros.upload.messages.urlParamMissing);\n return;\n }\n \n var log = new this.UploadLog();\n log.startUpload(storeUrl, toFilename, uploadDir, backupDir);\n if (document.location.toString().substr(0,5) == "file:") {\n saveChanges();\n }\n displayMessage(config.macros.upload.messages.aboutToUpload.format([this.dirname(storeUrl)]), this.dirname(storeUrl));\n this.uploadChanges(storeUrl, toFilename, uploadDir, backupDir, username, password);\n if(config.options.chkGenerateAnRssFeed) {\n //var rssContent = convertUnicodeToUTF8(generateRss());\n var rssContent = generateRss();\n var rssPath = toFilename.substr(0,toFilename.lastIndexOf(".")) + ".xml";\n this.uploadContent(rssContent, storeUrl, rssPath, uploadDir, '', username, password, \n function (responseText) {\n if (responseText.substring(0,1) != '0') {\n displayMessage(config.macros.upload.messages.rssFileNotUploaded.format([rssPath]));\n }\n else {\n if (uploadDir) {\n rssPath = uploadDir + "/" + config.macros.upload.basename(rssPath);\n } else {\n rssPath = config.macros.upload.basename(rssPath);\n }\n displayMessage(config.macros.upload.messages.rssFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+rssPath]), config.macros.upload.dirname(storeUrl)+"/"+rssPath);\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n });\n }\n return;\n};\n\nconfig.macros.upload.uploadChanges = function(storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var original;\n if (document.location.toString().substr(0,4) == "http") {\n original = this.download(storeUrl, toFilename, uploadDir, backupDir, username, password);\n return;\n }\n else {\n // standard way : Local file\n \n original = loadFile(getLocalPath(document.location.toString()));\n if(window.Components) {\n // it's a mozilla browser\n try {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]\n .createInstance(Components.interfaces.nsIScriptableUnicodeConverter);\n converter.charset = "UTF-8";\n original = converter.ConvertToUnicode(original);\n }\n catch(e) {\n }\n }\n }\n //DEBUG alert(original);\n this.uploadChangesFrom(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password);\n};\n\nconfig.macros.upload.uploadChangesFrom = function(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var startSaveArea = '<div id="' + 'storeArea">'; // Split up into two so that indexOf() of this source doesn't find it\n var endSaveArea = '</d' + 'iv>';\n // Locate the storeArea div's\n var posOpeningDiv = original.indexOf(startSaveArea);\n var posClosingDiv = original.lastIndexOf(endSaveArea);\n if((posOpeningDiv == -1) || (posClosingDiv == -1))\n {\n alert(config.messages.invalidFileError.format([document.location.toString()]));\n return;\n }\n var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + \n allTiddlersAsHtml() + "\sn\st\st" +\n original.substr(posClosingDiv);\n var newSiteTitle;\n if(version.major < 2){\n newSiteTitle = (getElementText("siteTitle") + " - " + getElementText("siteSubtitle")).htmlEncode();\n } else {\n newSiteTitle = (wikifyPlain ("SiteTitle") + " - " + wikifyPlain ("SiteSubtitle")).htmlEncode();\n }\n revised = revised.replace(new RegExp("<title>[^<]*</title>", "im"),"<title>"+ newSiteTitle +"</title>");\n var response = this.uploadContent(revised, storeUrl, toFilename, uploadDir, backupDir, \n username, password, function (responseText) {\n if (responseText.substring(0,1) != '0') {\n alert(responseText);\n displayMessage(config.macros.upload.messages.fileNotUploaded.format([getLocalPath(document.location.toString())]));\n }\n else {\n if (uploadDir !== '') {\n toFilename = uploadDir + "/" + config.macros.upload.basename(toFilename);\n } else {\n toFilename = config.macros.upload.basename(toFilename);\n }\n displayMessage(config.macros.upload.messages.mainFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+toFilename]), config.macros.upload.dirname(storeUrl)+"/"+toFilename);\n var log = new config.macros.upload.UploadLog();\n log.endUpload();\n store.setDirty(true); store.setDirty(false); // ELS - toggle to ensure notification event after upload\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n }\n );\n};\n\nconfig.macros.upload.uploadContent = function(content, storeUrl, toFilename, uploadDir, backupDir, \n username, password, callbackFn) {\n var boundary = "---------------------------"+"AaB03x"; \n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n if (window.netscape){\n try {\n if (document.location.toString().substr(0,4) != "http") {\n netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');}\n }\n catch (e) { }\n } \n //DEBUG alert("user["+config.options.txtUploadUserName+"] password[" + config.options.pasUploadPassword + "]");\n // compose headers data\n var sheader = "\sr\sn";\n sheader += "--" + boundary + "\sr\snContent-disposition: form-data;name=\s"";\n sheader += config.macros.upload.formName +"\s"\sr\sn\sr\sn";\n sheader += "backupDir="+backupDir\n +";user=" + username \n +";password=" + password\n +";uploaddir=" + uploadDir\n + ";;\sr\sn"; \n sheader += "\sr\sn" + "--" + boundary + "\sr\sn";\n sheader += "Content-disposition: form-data;name=\s"userfile\s";filename=\s""+toFilename+"\s"\sr\sn";\n sheader += "Content-Type: " + config.macros.upload.contentType + "\sr\sn";\n sheader += "Content-Length: " + content.length + "\sr\sn\sr\sn";\n // compose trailer data\n var strailer = new String();\n strailer = "\sr\sn--" + boundary + "--\sr\sn";\n var data;\n data = sheader + content + strailer;\n //request.open("POST", storeUrl, true, username, password);\n request.open("POST", storeUrl, true);\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if (request.status == 200)\n callbackFn(request.responseText);\n else\n alert(config.macros.upload.messages.errorUploadingContent);\n }\n };\n request.setRequestHeader("Content-Length",data.length);\n request.setRequestHeader("Content-Type","multipart/form-data; boundary="+boundary);\n request.send(data); \n};\n\n\nconfig.macros.upload.download = function(uploadUrl, uploadToFilename, uploadDir, uploadBackupDir, \n username, password) {\n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n try {\n if (uploadUrl.substr(0,4) == "http") {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n }\n else {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n }\n } catch (e) { }\n //request.open("GET", document.location.toString(), true, username, password);\n request.open("GET", document.location.toString(), true);\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if(request.status == 200) {\n config.macros.upload.uploadChangesFrom(request.responseText, uploadUrl, \n uploadToFilename, uploadDir, uploadBackupDir, username, password);\n }\n else\n alert(config.macros.upload.messages.errorDownloading.format(\n [document.location.toString()]));\n }\n };\n request.send(null);\n};\n\n//}}}\n////===\n\n////+++!![Initializations]\n\n//{{{\nconfig.lib.options.init('txtUploadStoreUrl','store.php');\nconfig.lib.options.init('txtUploadFilename','');\nconfig.lib.options.init('txtUploadDir','');\nconfig.lib.options.init('txtUploadBackupDir','');\nconfig.lib.options.init('txtUploadUserName',config.options.txtUserName);\nconfig.lib.options.init('pasUploadPassword','');\nconfig.shadowTiddlers.UploadPluginDoc = "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadPluginDoc ]]\sn"; \n\n\n//}}}\n////===\n\n////+++!![Core Hijacking]\n\n//{{{\nconfig.macros.saveChanges.label_orig_UploadPlugin = config.macros.saveChanges.label;\nconfig.macros.saveChanges.label = config.macros.upload.label.saveToDisk;\n//}}}\n////===
/***\n|''Name:''|UploadPlugin|\n|''Type:''|Plugin|\n|''Version:''|3.3.1 (30/03/2006)|\n|''Source:''|[[TiddlyWiki.BidiX.info/#UploadPlugin|http://tiddlywiki.BidiX.info/#UploadPlugin]]|\n|''Documentation:''|[[TiddlyWiki.BidiX.info/#UploadPluginDoc|http://tiddlywiki.BidiX.info/#UploadPluginDoc]]|\n|''Author:''|BidiX[at]BidiX.info |\n|''Required:''| TW 2.0.6 or better, PHP 4.4 (perhaps less but not working on 4.1.2) |\n\n!Description\nUploadPlugin, with [[store.php]], provides @@upload@@ and @@save to web@@ functions. See HowToUpload ([[HowToUpload|http://TiddlyWiki.bidix.info/#HowToUpload]]).\nUploadPlugin uses Username and Password from UploadOptions stored in cookies to authenticate itself to [[store.php]].\nFrench translation available as a separate tiddler UploadPluginMsgFR\n\n!!UploadPlugin\n*If the TiddlyWiki is viewed from @@local disk@@ :\n**{{{<<saveChanges>>}}} \n***display as ''save to disk''\n***work as usual\n**{{{<<upload>>}}}\n***display as ''upload''\n***after saving to disk, upload in the storeUrl directory.\n*If the TiddlyWiki is viewed from @@website@@ and is @@readOnly@@ (in core TiddlyWiki since 2.0.6) :\n**{{{<<saveChanges>>}}} \n***print nothing\n***has been disabled\n**{{{<<upload>>}}}\n***display as '''save to web''\n***save in the uploadDir directory.\n*If GenerateAnRssFeed in AdvancedOptions is set :\n**generate the content of the RSSFeed \n**upload the RssFile in uploadDir directory\n**Caution : use the SiteUrl tiddler to specify the right url of the TiddlyWiki in the generated RssFile\n*DisplayMessage\n*Log upload action in UploadLog\nhint : if UploadLog is the first tiddler in the Timeline Tab, no tiddler has been updated since last upload.\n\n!![[store.php]]\n*UserVariables to set :\n//{{{\n$AUTHENTICATE_USER = true; // true | false\n$USERS = array(\n 'UserName1'=>'Password1', \n 'UserName2'=>'Password2', \n 'UserName3'=>'Password3'); // set usernames and strong passwords\n$DEBUG = false; // true | false\n//}}}\n*method GET\n**display an information page\n*method POST\n**if $~AUTHENTICATE_USER is ''true''\n***presence and value of user and password are checked with $USER and $PASSWORD \n**if toFilename already exists and backDir parameter specified\n***rename toFilename to backupDir/toFilename.AAAAMMDD.HHSS.html\n**copy temporaryUploadedFile to toFilename\n** return status\n\n!Usage : \n{{{\n<<upload>>\n uses UploadOptions saved in cookies :\n txtUploadUserName: username\n pasUploadPassword : password\n txtUploadStoreUrl : store script\n txtUploadDir : relative path for upload directory\n txtUploadFilename : upload filename\n txtUploadBackupDir : relative path for backup directory\n\n<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>\n optional positional parameters can be passed to overwrite UploadOptions in this order. \n}}}\n\nInstall the {{{<<upload ... >>}}} macro in SideBarOptions just below {{{<<saveChanges>>}}} macro.\n\n\n!User manual\nSee HowToUpload\n\n!Installation :\n*Install the UploadPlugin as usual\n*Upload the [[store.php]] file on your php aware webserver in your TiddlyWiki directory\n*Protect your server against malicious upload. Two approaches :\n**set $~AUTHENTICATE_USER to true in the [[store.php]] script\n***configure $USER and $PASSWORD in the [[store.php]] script on your webserver\n***set UploadOptions in conformity with [[store.php]]\n**Use server protection :\n***for Apache web server ([[for detail see Apache documentation|http://httpd.apache.org/docs/1.3/howto/htaccess.html]]) : \n****configure and upload the [[.htaccess]] [[.passwd]]\n***for other web servers see the appropriate documentation\n*Configure an upload button, for example in the SideBarOptions\n!Suppported Browser\n*Firefox : tested Ok\n*Internet Explorer : tested Ok\n*Safari : reported ok on OS X\n*Others : Not tested, please report status.\n\n!Revision history\n*V 3.3.1 (30/03/2006)\n**bug in backup folder when uploading rssfile fixed\n*V 3.3.0 (12/03/2006)\n**Code refactoring\n**suppress saveChanges hijacking\n*V3.2.2 (25/02/2006)\n**Use PasswordTweak 1.0.1\n**uploaddir is a relative path\n**backupdir is a relative path\n+++[previous revisions]\n*V3.2.1 (13/02/2006)\n**name and password added to open.request (Thanks to TedPavlic)\n*V3.2.0 (14/02/2006)\n**Use PassworDTweak (http://tiddlyWiki.bidix.info/#PasswordTweak) for password\n*V3.1.0 (12/02/2006)\n**UploadOptions in Cookies\n**Username and password from UploadOptions pass to store.php script for authentification check\n*V3.0.3 (03/02/2006)\n**Firefox 1.5.0.1 crashes due to global var fixed\n*V3.0.2 (25-Jan-2006)\n**HTTPS compatible\n*V3.0.1 (18-Jan-2006)\n**UTF8toUnicode conversion problem in Firefox\n*V3.0.0 (15-Jan-2006)\n**Asynchronous upload\n**Synchronous upload before unload of the page\n**All strings extracted in macro config\n**Compatibility checked with TW 2.0.2 & TW 1.2.39 for both FF 1.5 and IE 6\n*V2.0.2 (8-Jan-2006)\n**conversion of SiteTitle and SiteSubtitle in web page Title\n*V2.0.1 (8-Jan-2006)\n**Compatibilty with TiddlyWiki 2.0.1\n*V2.0.0 (3-Jan-2006)\n**Save to web\n**Compatibilty with TiddlyWiki 1.2.39 and TiddlyWiki 2.0.0 Beta 6\n*v1.1.0 (27-Dec-2005)\n**Upload RSS File\n*v1.0.3 (26-Dec-2005)\n**UploadLog tiddler\n*v1.0.2 (24-Dec-2005)\n**Optional parameter toFilename\n**Optional parameter backupDir\n*v1.0.1 (23-Dec-2005)\n**reformatting code\n* v1.0.0 (17-Dec-2005)\n** first public working version\n===\n\n
// null logger : no more UploadLog and no upload logging\n// BidiX - 2006/11/8\n//{{{\nconfig.macros.upload.UploadLog = function() {return this;};\nconfig.macros.upload.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {};\nconfig.macros.upload.UploadLog.prototype.endUpload = function() {};\n//}}}\n
5. Usavršavanje korisničkog sučelja, podrška korisnicima, stvaranje istraživačke zajednice\n* Nakon objavljivanja prototipa baze; do završetka projekta i nakon njega.\n* Olakšati korištenje baze što je više moguće.\n* Prirediti i objaviti detaljne upute za korištenje baze.\n* Prihvaćati korisničke sugestije.\n* O objavljivanju baze obavijestiti domaće i inozemne znanstvene forume:\n**istraživača hrvatske književnosti i hrvatskog jezika;\n**istraživača novolatinskog jezika i književnosti;\n**humanističke informatike;\n**širu akademsku zajednicu.\n* Osigurati prostor i podršku za objavljivanje sekundarne literature proizašle iz istraživanja i korištenja baze.\n* Osigurati prostor za razmjenu iskustava vezanih uz korištenje baze.\n
6. Usavršavanje uključenih tekstova\n* Nakon objavljivanja prototipa baze; do završetka projekta i kasnije.\n* Ispravljati zapažene greške; proširivati metapodatke; dodavati daljnje tipove oznaka (usp. gore "redoslijed kodiranja").\n
<!--{{{-->\n<div class='toolbar' macro='toolbar collapseTiddler collapseOthers closeTiddler closeOthers +editTiddler sendTiddler permalink references jump'></div>\n<span class='title' macro='view title'></span>\n<span class='subtitle'><!--<span macro='view modifier link'></span>, --><span style='white-space:nowrap' macro='view modified date [[DDD, MMM DDth YYYY]]'></span><!-- (created <span macro='view created date [[DD MMM YYYY]]'></span>)--></span>\n<div class='tagging' macro='tagging'></div>\n<div class='tagged' macro='tags'></div>\n<div class='viewer' macro='view text wikified'></div>\n<div class='tagClear'></div>\n<!--}}}-->\n
*Croatiae auctores Latini in computatro: [[quid, cur, ubi, quomodo, quando?]]\n*DigitalizacijaHrvatskihLatinista: [[što, zašto, gdje, kako, kada?|OProjektu]]\n*A digital corpus of Croatian writers in Latin: [[What, why, where, how, when?]]\n\n\n
Auctores in CAuLa dividuntur, dignoscuntur et investigari possunt:\n\n*[[nominibus|nomina auctorum]]\n*locis natalibus\n*tempore\n*[[genere litterarum|genera]]\n
Genera litterarum:\n*Philosophia\n*Theologia\n*Doctrina socialis. Politia seu Ars politica\n*Oeconomia publica. Disciplina de re nummaria\n*Iurisprudentia. Iustitia. Administratio publica. Statistica\n*Paedagogia\n*Artes elegantiores:\n**Philologia. Litterarum historia\n**Litterae elegantiores: Oratores, epistolographi\n**Litterae elegantiores: Poetae\n*Historia\n*Geographia\n*Mathesis seu Ars mathematica\n*Historia naturalis\n*Medicina\n*Technologia\n*Artes et opificia (artes fabriles)\n*Oeconomia familiaris: agricultura, vinicultura etc.\n*Mercatura. Commeatus. Res maritimae\n*Res militares\n*Artes gymnasticae. Ludi corporibus exercitandis. Venatio. Piscatus. Alea etc.\n\n(cf. Jurić1971)
7. Širenje baze dodavanjem:\n*novih tekstova, \n*sekundarne bio-bibliografske i interpretativne građe, \n*slikovnog materijala (snimke rukopisa i starih tiskanih izdanja),\n*prijevoda\n\n* Nakon objavljivanja prototipa baze; do završetka projekta i nakon toga.\n* Tempo rada: dodavati tekstove oko 20-40 novih autora godišnje (broj progresivno raste).\n* Cilj: u 5 godina obuhvatiti oko 130 (ili više) hrvatskih latinista, uz barem 5 cjelovitih opusa, prvi od kojih je latinski opus Marka Marulića.\n* Objaviti u okviru baze leksikonske natuknice o autorima tekstova, povezujući bilješke sa samim tekstovima (putem hiperveza).\n* Objaviti nekoliko interpretacija pojedinih autora ili žanrova (osobito onih čije bi detaljno ilustriranje u tisku zauzelo previše prostora; takve je moguće povezati sa svim potvrdama koje postoje u bazi).\n* Posebno upozoriti na prezentiranu digitaliziranu baštinu koja je (iz ekonomskih razloga ili zbog konvencija) neobjavljiva tiskom (npr. Marulićeve marginalije u knjigama drugih autora, "paralelno kodirana" kritička izdanja), i problematizirati postupanje s takvom baštinom.\n* Objaviti barem jednu lingvističku studiju, kao put prema leksikografskom korištenju baze (ka rječniku hrvatskog latiniteta).\n* Odabir djela (osobito rukopisnih - posebno autografa -, te onih u rijetkim tiskanim izdanjima) popratiti snimkama izvorne građe.\n* Odabir djela (značajnih, ili uzornih) povezati s dobrim prijevodima na hrvatski - bilo već postojećima, ili novima; osobitu pažnju pokloniti samoprijevodima (isti autor piše isto djelo u dvije inačice, na dva jezika) i latinskim tekstovima koji su prijevod s hrvatskog (npr. Marulićeva "Regum Croatiae gesta", Ferićevi prijevodi narodnih pjesama, Vlaha Getaldića prepjev "Osmana").\n\n
DigitalizacijaHrvatskihLatinista znanstveni je projekt koji se izvodi na Odsjeku za klasičnu filologiju Filozofskog fakulteta Sveučilišta u Zagrebu. Projekt je dio istraživačkog programa Mediaevalia et Neolatina Croatica.\n\nProjekt financira Ministarstvo znanosti, obrazovanja i sporta Republike Hrvatske.\n\nProjekt je počeo s radom 2007. godine.\n\nGlavni je istraživač NevenJovanović.\n\nPopisSuradnika\n