|Created by|[[Clint Checketts]]| |Location|http://checkettsweb.com/styles/themes.htm#%5B%5BBroccoli%20Links%5D%5D| |Summary|Provides options to disable auto-linking of camel case words and lets pretty links point to tiddlers rather than external files| |Current version|1.0 (20-Oct-2005)| !Description This plugin changes the default behaviors of pretty links (links that display one text but link to a different tiddler like [[this|Welcome!]]). Pretty links that point to non-existent tiddlers are asumed to point to external files. This plugin allows you to disable that functionality, and instead point to the non-existent tiddler. This plugin also allows you to disable the auto wikification of camel case words (ThisIsACamelCaseWord). The name 'broccoli' was inspired by the Jeremy's [[photo|http://www.flickr.com/photos/jermy/10134618/]], and with a name like TiddlyWiki, extensions deserve silly names too (who names a broccoli Mervyn?). Allows simple switching of this functionality via the AdvancedOptions tiddler.
Type the text for '16 February 2007'
Type the text for '22 June 2008'
|Created by|SimonBaird| |Location|http://simonbaird.com/mptw/#CloseOthersButton| |Summary|Adds a button to close all other tiddlers except this one| |Current version|| !Description tba
Type the text for '30 June 2008'
//{{{ config.macros.getversion = {} config.macros.getversion.handler = function(place,macroName,params) { var versionData = version.extensions[params].major + "." + version.extensions[params].minor + "." + version.extensions[params].revision; createTiddlyElement(place,"span",null,null,versionData); } config.macros.getversiondate = {} config.macros.getversiondate.handler = function(place,macroName,params) { var versionDate = version.extensions[params[0]].date.formatString(params[1].trim()); createTiddlyElement(place,"span",null,null,versionDate); } //}}}
Experimental. This is for TW hackers developers to put info about their adaptations. See also PluginDirectory - SimonBaird
// // RSS Fix //{{{ // The body var tiddlers = store.getTiddlers("modified"); var n = 0; // Count of tiddlers included in RSS var t = tiddlers.length - 1; // Tiddler index while ((n < config.numRssItems) && (t >= 0)) { var tTags = tiddlers[t].getTags().toLowerCase(); // Grab this tiddler's tags and turn them to lowercase so that we can to a case-insensitive check // If this tiddler is flagged specifically for inclusion OR this tiddler // is not specifically flagged for exclusion (either by the "excludeLists" // or "excludeRSS" tag)... if ((tTags.indexOf("includerss") >= 0) || ((tTags.indexOf("excludelists") == -1) && (tTags.indexOf("excluderss") == -1))) { s.push(tiddlers[t].saveToRss(u)); // Generate the RSS entry for this tiddler n++; // Increment the count of tiddlers in the feed } t--; // Next tiddler... } //}}}
!Inspiration from Simon (standard disclaimer) TW frontend needs to have configurable ajax hooks for: * get a list of tiddler titles with timestamp * get tiddler contents * save tiddler contents When you load your TW it would: *run the list of tiddlers *compare with what you already have in your store *fetch any that are newer than what is in store When you save a tiddler: 1. save it in store 2. do the ajax save This way, the front end doesn't care what the back end is implemented in (python, ruby, php, java, who cares??) It's just an xmlhttprequest. People can build their fave back end, be it flat file or database. [[pyTW]] will become pyTWbackend. A little sysconfig plugin that defines the main url for the ajax requests and if you work offline, your TW does the sensible thing and works from its own store then syncs up next time it's online (so step 2 might include two way sync). That's the future of the serverside TW.
//{{{ // // __Macro for the toolbar button__ config.views.wikified.toolbarCollapse = {text: "collapse", tooltip: "Collapse this tiddler", toggleText: "expand", toggleTooltip: "Expand this tiddler"}; config.macros.toolbarCollapse = {}; config.macros.toolbarCollapse.handler = function(place,macroName,params) { lingo = config.views.wikified; createTiddlyButton(place,lingo.toolbarCollapse.text,lingo.toolbarCollapse.tooltip,onClickToolbarCollapse); } // //__Event handler on toolbar button press__ function onClickToolbarCollapse(e) { if (!e) var e = window.event; title = this.parentNode.id.substr(7); if(title) { var viewerStatus = document.getElementById("viewer" + title).style.display var displayStyle; var buttonText; var buttonTooltip; var lingo = config.views lingo = lingo.wikified; if(viewerStatus == "none") { displayStyle = "block"; buttonText = lingo.toolbarCollapse.text; buttonTooltip = lingo.toolbarCollapse.tooltip; } else { displayStyle = "none"; buttonText = lingo.toolbarCollapse.toggleText; buttonTooltip = lingo.toolbarCollapse.toggleTooltip; } document.getElementById("viewer" + title).style.display = displayStyle; document.getElementById("footer" + title).style.display = displayStyle; this.innerHTML = buttonText; this.title = buttonTooltip; } } //}}}
http://www.personal.psu.edu/staff/a/c/ach12/tiddlywiki/extensions.htm
/*** |Plugin Name|CSS Monospacing Wikifier| |Authors|Clint and Paul| |Version|1.0| |Date|November 1, 2005| !Description Currently the block javascript formatting don't work when using CSS: {{{ //{{{ //}}} }}} This plugin enables using: {{{ /*{{{*/ /*}}}*/ }}} to render a monospaced/code format that won't conflict with CSS. !Code ***/ //{{{ for( var i=0; i<config.formatters.length; i++ ) if ( config.formatters[i].name=='monospacedByLineForPlugin') break ; if ( i >= config.formatters.length ) { var e = "Can't find formatter for monospacedByLineForPlugin!" ; displayMessage( e ) ; throw( e ) ; } config.formatters.splice( i, 0, { name: "monospacedByLineForCSS", match: "/\\*[\\{]{3}\\*/", lookahead: "/\\*[\\{]{3}\\*/\\sn*((?:^[^\\sn]*\\sn)+?)(\\sn*/\\*[\\}]{3}\\*/\\sn)", handler: config.formatterHelpers.monospacedByLineHelper}); //}}}
|Created by|SimonBaird| |Location|http://simonbaird.com/mptw/#ApplyStylesMacro| |Summary|| |Current version|| |Description||
There's a map of TW users on [[Frappr|http://www.frappr.com/tiddlywiki]]
<<list withTag [[Paul Petterson]]>>
TiddlyWiki follows web standards and, when possible, separates a TW's content from its presentation. This means that you can alter colors, fonts, sizes, and positioning in a without having to touch any individual tiddlers. There are three ways you can alter TW's appearance: *Use an existing style *Tweak a StyleSheet tiddler *Overhaul the layout by rearranging
I'm a provider of plenty of hot air, and occasional plugins. Tiddly W;nks! http://danielbaird.com/tiddlywinks/
TiddlyWikiDev
http://www.cs.utexas.edu/~joeraii/datagarden
/*** |!Plugin Name|Definition List Formatter| |!Author|[[Ron Stewart|http://www.we3geeks.org]]| |!Version|1.0| |!Usage|?Definition Term<html><br /></html>+Definition<html><br /></html>+Definition<html><br /></html>| ***/ //{{{ config.formatters.push( { name: "definitionList", match: "^(?:(?:\\?+)|(?:\\++))", lookahead: "^(?:(\\?+)|(\\++))", terminator: "\\sn", outerElement: "dl", innerElement: "dt", handler: function (w) { var lookaheadRegExp = new RegExp(this.lookahead,"mg"); w.nextMatch = w.matchStart; var placeStack = [w.output]; var currType = null, newType; var currLevel = 0, newLevel; var t; do { lookaheadRegExp.lastIndex = w.nextMatch; var lookaheadMatch = lookaheadRegExp.exec(w.source); var matched = lookaheadMatch && lookaheadMatch.index == w.nextMatch; if(matched) { newType = "dl"; newLevel = lookaheadMatch[0].length; w.nextMatch += lookaheadMatch[0].length; if(newLevel > currLevel) { for(t=currLevel; t<newLevel; t++) placeStack.push(createTiddlyElement(placeStack[placeStack.length-1],newType)); } else if(newLevel < currLevel) { for(t=currLevel; t>newLevel; t--) placeStack.pop(); } else if(newLevel == currLevel && newType != currType) { placeStack.pop(); placeStack.push(createTiddlyElement(placeStack[placeStack.length-1],newType)); } currLevel = newLevel; currType = newType; var e = createTiddlyElement(placeStack[placeStack.length-1],lookaheadMatch[1] ? "dt" : "dd"); w.subWikify(e,this.terminator); } } while(matched); } } ); //}}}
http://www.legolas.org/gmwiki/dev/gmwikidev.html http://www.tiddlyforge.net/
<<toolbarEditHelp>>
// // found at http://my.opera.com/community/forums/topic.dml?id=91372&t=1129559012 // // Paste the following functions into the TW file, replacing the current functions (only in 1.2.35) Note the .java.policy file at the end of this post //{{{ function operaUrlToFilename(url) { var i = url.indexOf(':'); if (i > 0) url = url.substring(i - 1); return url; } function operaSaveFile(filePath, content) { try { var s = new java.io.PrintStream(new java.io.FileOutputStream(operaUrlToFilename(filePath))); s.print(content); s.close(); } catch(e) { if(opera) opera.postError(e); return null; } return true; } function operaLoadFile(filePath) { var content = []; try { var r = new java.io.BufferedReader(new java.io.FileReader(operaUrlToFilename(filePath))); var line; while ((line = r.readLine()) != null) content.push(new String(line)); r.close(); } catch(e) { if(opera) opera.postError(e); return null; } return content.join("\sn"); } //}}} // //Paste the folowing in a .java.policy file in ''C:\Documents and Settings\MyUserName'' Change MyUserName to match the logged in user. //{{{ grant codeBase "file:/c:/tiddlywiki-folder/tiddlywiki.html" { permission java.io.FilePermission "c:\\tiddlywiki-folder\\*", "read,write"; }; //}}}
// //''Name:'' FAQ List // //''Version:'' 0.1.2 - 19 Oct 2005 // //''Author:'' AlanHecht // //''Description:'' FAQ List lets you compile a list of Frequently Asked Questions and present them in a cascading style for the viewer. Each question is turned into a link that will toggle the view of the answer text. The list can be compiled either from all tiddlers containing a certain tag or from a single tiddler that contains all the needed questions and answers. // //''Syntax:'' <////< faqlist mode source sortBy hrSeparator >////> // // ''faqlist:'' the macro call (required) // // ''mode:'' either "byTag" or "byTitle" (required) // // ''source:'' the associated tag or tiddler title (required) // // ''sortBy:'' if byTag, sort can be "title," "modifier," "modified." If byTitle, sort can be "question" and will reorder the questions in alphabetical order. (this parameter is optional; use "null" if you don't want a sort order, but want to use "hr" as the last paramter) // // ''hrSeparator:'' if "hr" is included at the end of the call string, each question/answer set will be separated by a horizontal rule. // //Examples: (edit these two tiddlers to see the syntax used for each) // // • [[FAQ Method One]] // // • [[FAQ Method Two]] // //''Directions:'' <<tiddler StartupBehaviorDirections>> <<tiddler MacroDirections>> // //''Notes:'' If you choose to use byTitle mode where the entire set of questions/answers comes from a single tiddler, the syntax for the tiddler content is as follows: // // • Each question must be a single line (i.e. no hard returns) but can wrap as needed // // • The answer to a question begins on the next line after the question and can be as long as needed. It can also include hard returns as part of the answer text, but it cannot include empty lines (i.e. an empty line is the result of pressing enter twice). // // • Each question/answer set must be seperated by two hard returns (i.e. must have a single, blank line between them. // // Refer to [[FAQ Tiddler Sample]] for an example. // //''Known Issues:'' If a user clicks too quickly to toggle a FAQ entry on/off, they will go into tiddler edit mode. This should be corrected in the future by allowing web-hosted versions of the faq to disable double-clicking. // //''Revision History:'' // // v0.1.0 (01 August 2005): initial release // // v0.1.1 (04 August 2005): Fixed an endless loop bug (thanks to Kevin Kleinfelter). // // v0.1.2 (19 October 2005): Fixed TW compatibility .32 bugs (newline for block quote and e.preventDefault by Clint Checketts) // //''Code section:'' //{{{ version.extensions.faqlist = {major: 0, minor: 1, revision: 2, date: new Date("Aug 4, 2005")}; config.macros.faqlist = { bulletCollapse: ">", bulletExpand: "∨", expandButton: {title: "Expand All", tooltip: "Open all items for reading"}, collapseButton: {title: "Collapse All", tooltip: "Close all items"} }; config.macros.faqlist.handler = function(place,macroName,params) { lingo = config.macros.faqlist; var mode = params[0].toLowerCase(); var list = []; switch(mode) { case "bytag": var tagged = store.getTaggedTiddlers(params[1], params[2]); for(t=0; t<tagged.length; t++) { var title = tagged[t].title; list[t] = [title,store.getTiddlerText(title)]; } var subTitle = store.tiddlers[title].getSubtitle(); break; case "bytitle": var faqText = store.getTiddlerText(params[1]); var faqItems = faqText.split("\sn\sn"); if(params[2] == "question") faqItems.sort(); for(t=0; t<faqItems.length; t++) { list[t] = [faqItems[t].substring(0,faqItems[t].indexOf("\sn")),faqItems[t].substring(faqItems[t].indexOf("\sn")+1)]; } var subTitle = null; break; } var faqHeading = place.appendChild(document.createElement("span")); faqHeading.appendChild(createTiddlyButton(faqHeading,lingo.expandButton.title,lingo.expandButton.tooltip,faqExpandAll)); faqHeading.appendChild(createTiddlyButton(faqHeading,lingo.collapseButton.title,lingo.collapseButton.tooltip,faqCollapseAll)); faqHeading.appendChild(document.createElement("p")); var faqBody = place.appendChild(document.createElement("span")); for(var t=0; t<list.length; t++) { var title = list[t][0]; var content = "<<<\sn" + list[t][1] + "\sn<<<\sn"; var theClass = "tiddlyLinkExisting tiddlyLink"; var itemHeading = faqBody.appendChild(document.createElement("span")); itemHeading.appendChild(document.createTextNode(config.macros.faqlist.bulletCollapse + " ")); createTiddlyButton(itemHeading,title,subTitle,faqToggleThis,theClass); var itemBody = faqBody.appendChild(document.createElement("span")); itemBody.style.display = "none"; itemBody.className = "itemBody"; wikify(content,itemBody,null,null); faqBody.appendChild(itemBody); faqBody.appendChild(document.createElement("p")); if(params[3] == "hr") faqBody.appendChild(document.createElement("hr")); } } function faqToggleThis(e) { var content = this.parentNode.nextSibling; var shown = content.style.display; if(shown == "none") { content.style.display = "inline"; this.previousSibling.nodeValue = config.macros.faqlist.bulletExpand + " "; } else { content.style.display = "none"; this.previousSibling.nodeValue = config.macros.faqlist.bulletCollapse + " "; } e.preventDefault(); } function faqExpandAll() { for(t=0; t<this.parentNode.nextSibling.childNodes.length; t++) { item = this.parentNode.nextSibling.childNodes[t]; if(item.className == "itemBody") { item.style.display = "inline"; item.previousSibling.childNodes[0].nodeValue = config.macros.faqlist.bulletExpand + " "; } } } function faqCollapseAll() { for(t=0; t<this.parentNode.nextSibling.childNodes.length; t++) { item = this.parentNode.nextSibling.childNodes[t]; if(item.className == "itemBody") { item.style.display = "none"; item.previousSibling.childNodes[0].nodeValue = config.macros.faqlist.bulletCollapse + " "; } } } //}}}
It is there:
|Created by|Tiago Dionizio| |Location|http://mega.ist.utl.pt/~tngd/twiki/twiki.cgi/| |Summary|Server side TW powered by Tcl and Sqlite3| |Current version|0.6.1 on ''TW 1.2.35''| |Notes||
Welcome to the TiddlyWiki/Dev site for those interesting and developing TW. Getting started here can be rather troublesome until you become accustomed to it, but some ways to easily get things rolling is to check the [[NewbieHelp]].
<<tiddlerStats>> |''Name:''|TiddlerStatsPlugin| |''Version:''|0.8 | |''Source:''|http://thePettersons.org/PaulsNotepad.html#%5B%5BTiddlerStatsPlugin%5D%5D | |''Author:''|[[Paul Petterson]] | |''Type:''|Macro Extension | |''Requires:''|TiddlyWiki 1.2.32 or higher | !!Description Want to know how big your TW really is? Want to see how big your biggest tiddler is? TiddlerStats is the answer! Finds and displays the number of and size of all tiddlers, the biggest, smallest, and average size. Even draws up a sparkline with that info in it!
|Created by|Jeremy Ruston| |Location|http://www.tiddlywiki.com/| |Summary|Original TW powered by Javascript| |Current version|1.2.36| |Notes||
Welcome to [[TiddlyWiki/Dev]] here you will find information and resources on developing TiddlyWiki using the developer reference on this site.
/*** |''Name:''|TiddlyWikiDebugger | |''Version:''|1.0.1 | |''Source:''|http://thePettersons.org/tiddlywiki.html#TiddlyWikiDebugger (not online yet...) | |''Author:''|[[Paul Petterson]] | |''Type:''|Developer/Hacker Extension | |''Requires:''|TiddlyWiki 1.2.35 or higher | !Description The TWDebugger //hijacks// a function, replacing it with a custom function that traces it's arguments and return status. If multiple functions are traced, then a pseudo call stack is built showing what functions were called, in what order, and by what functions. You hijack functions, restore them (un-hijack?) and show the simulated call stacks all using ''macros''! @@color(red):This should only be used in controlled circumstances where it's important to see a simulated stack trace of the functions. Don't tag it with systemConfig unless you're going to use it, remember to use {{{<<stop>>}}} at the end of your tiddler, and if you hit an error that prevents {{{<<stop>>}}} from running, then put it in another tiddler to run it!.@@ The following Macros are used to control setting up the method tracing, and display the results of the traced execution. ''Usage:'' To use the TWDebugger you will typically setup a special testing tiddler for your experiments, in this tiddler you will set ''watches'' on a macro and a set of functions the macro will call. After the interesting functions have watches set on them, call the macro. Finally show the results and stop ''watching'' the methods. ''Example:'' Get a real detailed picture of how the list orphans macro works... !Step 1: Setup all the watches. {{{<<watchMacro list>>}}} {{{<<watchMethod config.macros.list.all handler>>}}} {{{<<watchMethod store reverseLookup>>}}} {{{<<watchMethod store getOrphans>>}}} {{{<<watchMethod store getReferringTiddlers>>}}} {{{<<watchMethod window createTiddlyLink>>}}} !Step 2. Run the macro {{{<<list orphans>>}}} !Step 3. Stop watching & Show the results {{{<<stop>>}}} {{{<<showStack>>}}} See TWDebuggerSample for an example of how this really looks. !The TiddlyWikiDebugger Macros !! Watch Macro The {{{watchMacro}}} hijacks a macro's handler method and traces when it is called including the parameters it is called with. Macros typically have no return value in tiddlywiki so don't expect to see much there... Call with only the name of the macro. ''Examples:'' * {{{<<watchMacro list>>}}} -- will display the parameters passed to the list macro. * {{{<<watchMacro tabs>>}}} ***/ //{{{ config.macros.watchMacro = { twd: new TWDebug() , handler: function(place,macroName,params) { if ( !params[0] ) throw ("must pass in name of macro to watch...") ; var o ; eval("o = config.macros." + params[0] ) ; this.twd.trace( o, "handler" ) ; }} //}}} /*** !! Watch Method The {{{watchMethod}}} macro hijacks a method and traces when it called, including what parameters it's called with, and traces when it returns, along with it's return value. Call with an object and a method name. ''Examples:'' * {{{<<watchMethod config.macros.list.all handler>>}}} - a macro, or sub-macro method handler * {{{<<watchMethod store getReferringTiddlers>>}}} - a method from the TiddlyWiki store * {{{<<watchMethod window createTiddlyLink>>}}} - a //global// method ***/ //{{{ config.macros.watchMethod = { twd: config.macros.watchMacro.twd, handler: function(place,macroName,params) { if ( !params[0] ) throw ("must pass in object & method to watch...") ; if ( !params[1] ) throw ("must pass in object & method to watch...") ; var o ; eval("o = " + params[0] ) ; this.twd.trace( o, params[1] ) ; }} //}}} /*** !! Show Stack The {{{showStack}}} macro dumps an emulated //call stack// like view of methods called and returned. If a method is called while another method is executing, the new method's call will be indented under the origional method's call. {{{showStack}}} also clears the log. THis is usefull when executing multiple macros, you can display the call stack right after each call, and the won't be all run together. ''Example:'' {{{<<showStack>>}}} ''Note:'' the showStack calls the ''wikify'' function, which in turn calls lots and lots of other methods. It is possible to get stuck in a loop here if you trace something like ''createTiddlyLink'' and one of the statements in the call-stack is a tiddly link. If you run into this, use the ''stop'' macro before calling ''showStack''. ***/ //{{{ config.macros.showStack = { twd: config.macros.watchMacro.twd, handler: function(place,macroName,params) { this.twd.log.paused = true ; wikify( this.twd.log.dump(), place ) ; this.twd.log.paused = false ; this.twd.log.reset() ; }} //}}} /*** !! Stop The {{{stop}}} macro stops all tracing, and restores all the methods, returning them to their origional methods. ***/ //{{{ config.macros.stop = { twd: config.macros.watchMacro.twd, handler: function(place,macroName,params) { this.twd.stop() ; }} //}}} /*** ---- ! Aspect & Object Code ***/ //{{{ // testing code function showVar( v ) { if ( ! v ) return "null" ; var tov = typeof( v ) ; var sret = "" ; var verbose = false ; switch( tov ) { case "number": case "boolean": sret = v ; break ; case "string": sret = "'" + v + "'" ; break ; case "function": sret = "function()" ; break ; case "object" : if ( v.join ) { // this is an array! sret = "[" ; for( var i=0; i<v.length; i++ ) sret += ((i==0)?"":", ") + showVar( v[i] ) ; sret += "]" ; } else { var sep = "" ; sret = "{" ; if ( verbose ) { for( var key in v ) { sret += sep + key + "(" + typeof( v[key] ) + "): " ;//+ showVar( v[i] ) ; sep = ", " ; } } else { if ( v.constructor == TiddlyWiki ) sret += "store" ; else if ( v.constructor == wikify ) sret += "wikify" ; else if ( v.constructor == Wikifier ) sret += "Wikifier" ; else if ( v.constructor == Tiddler ) sret += "Tiddler:'" + v.title + "'" ; else if ( v.constructor == Animator ) sret += "Animator" ; else if ( v.parentNode ) sret += "DOMObject" ; else sret += "?" ; } sret += "}" ; } break ; default: sret = "<b>typeof(" + tov + ")</b>" ; break ; } return sret ; } function showArgs( args ) { var sargs = ""; var sep = "" ; for( var i = 0; i<args.length ; i++ ) { sargs += sep + showVar( args[i] ) ; sep = ", " ; } return sargs ; } function Logger() { this.log = ['new Logger()'] ; this.depth = 1 ; this.starStr = "**********" ; this.paused = false ; this.stars = function() { return this.starStr.substr(0,(this.depth>10?10:this.depth)); } ; return this ; } Logger.prototype.logMsg = function( str ) { if ( this.paused ) return str ; this.log.push( this.stars() + " " + str ) ; return str ; } Logger.prototype.call = function( fn, args ) { if ( this.paused ) return args ; this.log.push( this.stars() + " Calling: " + fn + "( " + showArgs( args ) + " )" ) ; this.depth++ ; return args ; } Logger.prototype.ret = function( fn, results ) { if ( this.paused ) return results ; this.depth-- ; this.log.push( this.stars() + " Returning: " + fn + " = " + showVar( results )) ; return results ; } Logger.prototype.dump = function() { var s = this.log.join("\sn") ; return s ; } Logger.prototype.reset = function() { this.log = ['Logger reset'] ; this.depth = 1 ; } function TWDebug() { this.log = new Logger() ; this.methodStore = new Array() ; return this ; } TWDebug.prototype.storeMethod = function( obj, fn ) { this.methodStore.push( { object:obj, method:fn, ptr:obj[fn] } ) ; } // Trace method - replaces existing method with one that logs arguments, calls method, logs result TWDebug.prototype.trace = function( obj, fn ) { var log = this.log ; this.storeMethod( obj, fn ) ; var old = obj[fn] ; obj[fn] = function() { try { return log.ret( fn, old.apply( this, log.call( fn, arguments ))) ; } catch( e ) { log.logMsg( "Function: " + fn + " threw an exception: " + e.toString() ) ; throw( e ) ; } } this.writeLog( "Started tracing: " + fn ) ; } TWDebug.prototype.stop = function() { var m; while( (m = this.methodStore.pop()) != null ) { var obj = m.object ; var fn = m.method ; try { obj[fn] = m.ptr ; } catch(e) { this.writeLog( "error on stop: " + e.description ); } this.writeLog( "Stopped tracing: " + fn ) ; } } // Add additional information in the call stack history TWDebug.prototype.writeLog = function( str ) { if ( this && this.log ) this.log.logMsg( str ); } //}}}
/* Style by ''Clint Checketts'' (http://www.checkettsweb.com) Inspired by the GLP'd Darkfire Wordpress skin. {{{ */ body { background-color: #000; } #titleLine { color: #fff; background-color: #390108; border-bottom: 2px solid #ffbf00; } #titleLine a { color: #fff; } #titleLine a:hover { border-bottom: 1px dashed #fff; } #mainMenu {color: #fff;} #mainMenu .tiddlyLink {color: #ffbf00;} #mainMenu .tiddlyLink:hover { color: #ff7f00; border-bottom: #ff7f00 1px dashed; background: transparent; } #mainMenu .externalLink {color: #ffbf00; } #mainMenu .externalLink:hover { color: #ff7f00; border-bottom: #ff7f00 1px dashed; background: transparent; text-decoration: none; } #mainMenu .button {color: #ffbf00; } #mainMenu .button:hover { color: #ff7f00; border-bottom: #ff7f00 1px dashed; background: transparent; } #mainMenu h1{ font-size: 0.9em; } #sidebar {color: #fff; border: 2px solid #ffbf00; border-width: 0 0 2px 2px;} #sidebarOptions {background-color: #4c4c4c;} #sidebarOptions .button { color: #ffbf00; } #sidebarOptions .button:hover { color: #4c4c4c; background-color: #ffbf00; } #sidebarOptions .button:active {color: #ffbf00; background-color: transparent;} #sidebarOptions .sliderPanel {background-color: #333;} #sidebarOptions .sliderPanel a {color: #ffbf00;} #sidebarOptions .sliderPanel a:hover {color: #ff7f00; background-color: transparent;} #sidebarOptions .sliderPanel A:active {color: #ff7f00; background-color: transparent;} .sidebarSubHeading {color: #300; } #sidebarTabs {background-color: #4c4c4c;} #sidebarTabs .tabSelected { padding: 3px 3px; cursor: default; color: #ffbf00; background-color: #666; } #sidebarTabs .tabUnselected { color: #ffbf00; background-color: #5f5f5f; padding: 0 4px; } #sidebarTabs .tabUnselected:hover { background-color: #666; } #sidebarTabs .tabContents { background-color: #666; } .listTitle{color: #000;} #sidebarTabs .tabContents .tiddlyLink {color: #390108;} #sidebarTabs .tabContents .tiddlyLink:hover {background-color: transparent; color: #6F0106;} .listTitle{color: #FFF;} #sidebarTabs .tabContents .tiddlyLink, #sidebarTabs .tabContents .button {color: #ffbf00;} #sidebarTabs .tabContents .tiddlyLink:hover, #sidebarTabs .tabContents .button:hover {color: #ff7f00; background-color: transparent;} #sidebarTabs .tabContents .button {color: #390108;} #sidebarTabs .tabContents .button:hover { color: #6F0106; background-color: transparent;} #sidebarTabs .txtMoreTab .tabSelected {background-color: #4c4c4c;} #sidebarTabs .txtMoreTab .tabUnselected {background-color: #5f5f5f;} #sidebarTabs .txtMoreTab .tabUnselected:hover {background-color: #4c4c4c;} #sidebarTabs .txtMoreTab .tabContents {background-color: #4c4c4c;} #messageArea {background-color: #666; color: #fff; border: 2px solid #ffbf00;} #messageArea a:link, #messageArea a:visited {color: #ffbf00; text-decoration:none;} #messageArea a:hover {color: #ff7f00;} #messageArea a:active {color: #ff7f00;} #popup {color: #fff; background-color: #4c4c4c;} #popup a {color: #ffbf00; } #popup a:hover { background-color: transparent; color: #ff7f00;} #contentWrapper #popup hr {color: #ffbf00; background: #ffbf00;} .title{color: #fff;} .viewer h1,.viewer h2,.viewer h3,.viewer h4,.viewer h5 { color: #fff; background-color: transparent; border-bottom: 1px solid #333; } .viewer {color: #fff; } .viewer a:link, .body a:visited {color: #ffbf00;} .viewer a:hover {color: #ff7f00; background-color: transparent; border-bottom: 1px dashed #ff7f00;} .viewer .button {background-color: transparent; color: #ffbf00;} .viewer .button:hover {background-color: transparent; color: #ff7f00; border-bottom: 1px dashed #ff7f00;} .viewer .externalLink:hover{ text-decoration: none; } .viewer table{background: #666; color: #fff;} .viewer th {background-color: #996; color: #fff;} .viewer pre, .viewer code {color: #330; background-color: #FFC} .viewer hr {color: #666;} .tab.tabSelected, .tab.tabSelected:hover{color: #ffbf00; border: 0; background-color: #4c4c4c;cursor:default;} .tab.tabUnselected {background-color: #666;} .tab.tabUnselected:hover{color:#ffbf00; border: 0;background-color: #4c4c4c;} .tabContents {background-color: #4c4c4c;} .tabContents .tabContents{background: #666;} .tabContents .tabSelected{background: #666;} .tabContents .tabUnselected{background: #5f5f5f;} .tabContents .tab:hover{background: #666;} .tiddler .button {color: #4c4c4c;} .tiddler .button:hover { color: #ffbf00; background-color: #4c4c4c;} .tiddler .button:active {color: #ffbf00; background-color: #4c4c4c;} .toolbar {color: #4c4c4c; } .footer {color: #ddd; } .selectedTiddler .footer {color: #888; } .highlight, .marked {color: #000; background-color: #ffe72f;} .editor {color: #402C74; } .editorFooter {color: #aaa; } .editorFooter a {color: #930; } .editorFooter a:hover {color: #cf6; background-color: #930;} .editorFooter a:active {color: #fff; background-color: #c90;} .tab{ -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; } /*TagglyTaggin Additions (and TagCloud) */ .footer .tiddlyLink{ color: #666; } .tagged{ background: #4c4c4c; border-color: #ffbf00; } .tagged a.tiny{ border: 0; } #contentWrapper #displayArea .tagged a.tiny:hover{ border: 0; background: #666; color: #ffbf00; } .contentLabel,.tagsLabel,.titleLabel{ display: none; } .tagsBox{ font-size: .8em; color: #666; } .titleBox{ font-weight: bold; font-size: 2em; } .tagCloud{ font-size: 8px; } /* }}} */
|''Name:''|HtmlEntitiesWikifierPlugin| |''Version:''|1.2 | |''Source:''|http://thePettersons.org/PaulsNotepad.html#HtmlEntities | |''Author:''|[[Paul Petterson]] | |''Type:''|Wikifier Extension | |''Requires:''|TiddlyWiki 1.2.34 or higher | !!Description HtmlEntitiesWikifierPlugin extends the TiddlyWiki markup language to add support for special HTML named entities. This lets you add special characters like: (only without the {{{<html></html>}}} tagging) | {{{&larr;}}} | <html>&larr;</html> | | {{{&rarr;}}} | <html>&rarr;</html> | | {{{&pi;}}} | <html>&pi;</html> | | {{{&frac12;}}} | <html>&frac12;</html> | | {{{&thetasym;}}} | <html>&thetasym;</html> | A complete set of named entities is also available: * Greek Letters - http://thepettersons.org/PaulsNotepad.html#GreekHtmlEntities * Lattin Letters - http://thepettersons.org/PaulsNotepad.html#LatinHtmlEntities * Mathmatic Symbols - http://thepettersons.org/PaulsNotepad.html#MathHtmlEntities * Miscelanious Symbols - http://thepettersons.org/PaulsNotepad.html#MiscHtmlEntities
!Step 1: Setup all the watches. {{{<<watchMacro list>>}}} <<watchMacro list>> {{{<<watchMethod store reverseLookup>>}}} <<watchMethod store reverseLookup>> {{{<<watchMethod store getOrphans>>}}} <<watchMethod store getOrphans>> {{{<<watchMethod store getReferringTiddlers>>}}} <<watchMethod store getReferringTiddlers>> {{{<<watchMethod window createTiddlyLink>>}}} <<watchMethod window createTiddlyLink>> !Step 2. Run the macro {{{<<list orphans>>}}} <<list orphans>> !Step 3. Stop watching & Show the results {{{<<stop>>}}} <<stop>> {{{<<showStack>>}}} <<showStack>>
<<tabs txtMoreTab All "All tiddlers" TabMoreAll Missing "Missing tiddlers" TabMoreMissing Orphans "Orphaned tiddlers" TabMoreOrphans >>
The Layout css styles are loaded. If a tiddler exists with the name 'StyleSheetLayout' then those styles are used and the original shadowed tiddler's content is completely ignored. Next, the StyleSheetColors tiddler is loaded. If there is a tiddler with that name then it is used, otherwise the default shadowed tiddler is loaded. Finally, the StyleSheet tiddler is loaded and it will require oaveriding and CSS styles that were loaded earlier.
<<list all>>
(Eric Shulman writes) To install a plugin (macro or otherwise) you need to open the 'source' TW document and copy-and-paste the contents from the plugin tiddler in the 'source' document to a new tiddler that you create in your own TW document. Be sure to tag it with 'systemConfig' so it will be recognized as executable javascript code. Then save and re-load you TW document (so that the new plugins can take effect).
TiddlyWiki/Dev explains how to use the internals of TiddlyWiki. This draft site is a staging area where content can be edited and added upon before moving over to the official TiddlyWiki/Dev site.. ![[Tag Cloud|TagglyTagCloud Macro]] <<tagCloud>>[[essay|http://www.essay.com]]
|Created by|Dan Phiffer| |Location|http://phiffer.org/tiddly/| |Summary|'TW for your laptop' not sure what powers it| |Current version|0.1 Beta based on ''TW 1.2.5''| |Description||
version.extensions.listOpen = {major: 0, minor: 1, revision: 0}; config.macros.listOpen = { text: "Hello" }; config.macros.listOpen.handler = function(place,macroName,params) { var tiddlerDisplay = document.getElementById("tiddlerDisplay"); for(var t=0;t<tiddlerDisplay.childNodes.length;t++) { if( tiddlerDisplay.childNodes[t].id ) { var tiddlerName = tiddlerDisplay.childNodes[t].id.substr(7); createTiddlyLink(place,tiddlerName,true); createTiddlyElement(place,"br",null,null,""); //refreshEditor(tiddlerName); } } }
// //''Name:'' Todo macro // //''Version:'' 0.1 // //''Date:'' October 24, 2005 // //''Author:'' CeciliaCase // //''Contact:'' cecilia dot case at gmail // //Cribbed a good deal from the ReminderPlugin from JeremySheeley // //(Contact: pop1280 [at] excite [dot] com) // //''Example:'' // //<<todo priority:1 title:"Fix recursive error">> // //<<todo priority:0 title:"Read Brave New World again">> // //<<showTodo>> // //''Description:'' // //Produces a list of todo events. Using todo creates the inlineinformation. // //showTodo makes a list of all todo tags in order of priority, with // //finished tasks at the bottom. It is not as customizable (without more // //programming), but is fairly straightforward to figure out. config.macros.todo = {}; config.macros.showTodo = {}; config.macros.todo["untitledTodo"] = "Untitled Todo"; // //this creates a default template for display for both the inline and list config.macros.todo["defaultTodoMessage"] = "PRIO : TITLE"; config.macros.todo["defaultShowTodoMessage"] = "|PRIO|TITLE|TIDDLER|"; // //This handles the creation of the inline information config.macros.todo.handler = function(place,macroName,params) { // //Determines the title of the calling function var thisTitle = ""; thisTitle = findTiddlerTitle(place); var elem = createTiddlyElement(place,"span",null,null,null); // // Parse the parameters var foundParams = getParamsForTodo(params); // // Write it back to the same tiddler in a friendly format var display = getTodoMessageForDisplay(config.macros.todo["defaultTodoMessage"], foundParams, thisTitle); // //Actual write function wikify(display, elem, null, null); } // //This creates a list of all the todos in the wiki config.macros.showTodo.handler = function(place,macroName,params) { var elem = createTiddlyElement(place,"span",null,null,null); // // Search for the tiddlers with the macro in it var foundTiddlers = findTiddlersWithTodos(); var listTodos = ""; for (var j = 0; j < foundTiddlers.length; j++) { listTodos += getTodoMessageForDisplay(config.macros.todo["defaultShowTodoMessage"], foundTiddlers[j]["params"], foundTiddlers[j]["tiddler"]) + "\sn"; } // // Write it back to the parent tiddler in a friendly list wikify(listTodos, elem, null, null); } // // Search for the tiddlers with the macro in it // //ARGUMENTS: // //priority is a number. 0 will be blue and is a finished task, 1 is red, 2 is orange, // //3 and larger will be green. // //title is the main todo content findTiddlersWithTodos = function() { // //Search for tiddlers with the word todo in them var matches = store.search("todo",false,false,"title","excludeSearch"); // //search for the matching macro patturn var macroPattern = "<<([^>\\]+)(?:\\*)([^>]*)>>"; var macroRegExp = new RegExp(macroPattern,"mg"); var arr = []; for(var t=matches.length-1; t>=0; t--) { var targetText = matches[t].text; do { // Get the next formatting match var formatMatch = macroRegExp.exec(targetText); if(formatMatch && formatMatch[1] != null && formatMatch[1].toLowerCase() == "todo") { // //Read parameters into a hash var params = formatMatch[2].readMacroParams(); var paramHash = getParamsForTodo(params); var hash = {}; hash["params"] = paramHash; hash["tiddler"] = matches[t].title; arr.pushUnique(hash); } }while(formatMatch); } if(arr.length > 1) //Sort the array by priority arr.sort(function (a,b) { // //This and the next line set the 0 priorities down at the bottom of the list if(a["params"]["priority"] == 0) return(+1); else if(b["params"]["priority"] == 0) return(-1); // //Sort all others by numerical priority else if(a["params"]["priority"] == b["params"]["priority"]) return(0); else return (a["params"]["priority"] < b["params"]["priority"]) ? -1 : +1; }); return arr; } // //Set the display of the todo's. edit here if you want to change // //colors, change formatting style, or add priority levels that have // //recognized formatting types getTodoMessageForDisplay = function(format, params, tiddlerTitle) { var todoTitle = params["title"]; if (todoTitle == null) todoTitle = config.macros.todo["untitledTodo"]; var chngTemplate = ""; chngTemplate = format; if(params["priority"] == 0) chngTemplate = chngTemplate.replace("PRIO", "@@color(blue):Done@@"); else if(params["priority"] == 1) chngTemplate = chngTemplate.replace("PRIO", "@@color(red):Todo@@"); else if(params["priority"] == 2) chngTemplate = chngTemplate.replace("PRIO","@@color(orange):Todo@@"); else chngTemplate = chngTemplate.replace("PRIO","@@color(green):Todo@@"); chngTemplate = chngTemplate.replace("TITLE", params["title"]); if (tiddlerTitle != null) chngTemplate = chngTemplate.replace("TIDDLER", "[[" + tiddlerTitle + "]]"); return chngTemplate; } // Parse out the macro parameters into a hashtable. This // handles the arguments for todo and showTodo getParamsForTodo = function(params) { var foundParams = {}; var type = ""; var num = 0; var title = ""; var value = ""; for(var t=0; t<params.length; t++) { split = params[t].split(":"); type = split[0].toLowerCase(); var value = split[1]; for (i=2; i < split.length; i++) value += ":" + split[i]; if (type == "priority") { num = parseInt(value); } else if (type != "title") num = parseInt(value); else { title = value; while (title.substr(0,1) == '"' && title.substr(title.length - 1,1) != '"') title += " " + params[++t]; //Trim off the leading and trailing quotes if (title.substr(0,1) == "\"" && title.substr(title.length - 1,1)== "\"") title = title.substr(1, title.length - 2); num = title; } foundParams[type] = num; } return foundParams; } // Find the containing Tiddler's title function findTiddlerTitle(p) { while ( (!p.id || p.id.substr(0,6)!="viewer")&& p.parentNode ) p=p.parentNode; return (p.id?((p.id.substr(0,6)=="viewer")?p.id.substr(6):""):""); }
version.extensions.listTags = {major: 0, minor: 1, revision: 0}; config.macros.listTags = { text: "Hello" }; config.macros.listTags.handler = function(place,macroName,params) { var tagged = store.getTaggedTiddlers(params[0]); for(var r=0;r<tagged.length;r++) { if( tagged[r].title.toLowerCase() != params[0].toLowerCase() ) { createTiddlyLink(place,tagged[r].title,true); createTiddlyElement(place,"br",null,null,""); } } }
<<list missing>>
|''Name:''|ListWithTagPlugin | |''Version:''|1.0 | |''Source:''|http://thePettersons.org/PaulsNotepad.html#ListWithTagPlugin | |''Author:''|[[Paul Petterson]] | |''Type:''|List Macro Extension | |''Requires:''|TiddlyWiki 1.2.32 or higher | !!Description //My very first TW plugin!// Extends the TiddlyWiki ''list'' macro by adding the capability to list all tiddlers with a given tag. Lots of implementations of this particular kind of macro, this one is a tad bit different in that it extends the existing list macro instead of adding a who new macro. Example: {{{<<list withTag systemConfig>>}}} <<list withTag systemConfig>>
<<list orphans>>
|''Name:''|ListWithTagsPlugin | |''Version:''|1.0.1 | |''Source:''|http://thePettersons.org/tiddlywiki.html#ListWithTagsPlugin | |''Author:''|[[Paul Petterson]] | |''Type:''|List Macro Extension | |''Requires:''|TiddlyWiki 1.2.32 or higher | !!Description Extends the TiddlyWiki ''list'' macro by adding the capability to list tiddlers that have a tag, a set of tags, or a complex criteria of tags. You can use tags, AND, OR, NOT (or && for AND, || for OR, and ! for NOT) as well as paranthese when building your expression. ''Examples:'' * {{{<<list withTags Projects and Todo and not done>>}}} * {{{<<list withTags Tasks and (Urgent or Important)>>}}} !!Note: This plugin is under active development, and the latest version might not always be online. If you have a bug, send an email to the tiddlywiki group at google: TiddlyWiki@googlegroups.com
Plugins from MonkeyPirateTiddlyWiki
<<version>>
[[tagCloud Macro]] [[tagCloudTaggly Macro]] See also PluginDirectory
Type the text for 'WikifierFormatters'
!Introduction HelloThere TiddlyWiki !Overview InsideTiddlyWiki RoadMap !Hacking StyleSheets [[Macros]] [[Translations]] WikifierFormatters !Resources [[Community]] PluginDirectory AdaptationDirectory BasicSkills [[RSS|RssFeed]] © [[osmosoft|http://www.osmosoft.com]] 2005 <<newTiddler>> <<newJournal "DD MMM YYYY">> !Tag Cloud <<tagCloud systemTiddlers systemConfig>>
|Created by|[[Simon Baird]]| |Location|http://simonbaird.com/mptw/| | | | | | |
<<allTags>>
|Created by|Tim Morgan| |Location|http://www.ziddlywiki.com| |Summary|Server side TW powered by Zope| |Current version|Snapshot^^1^^ based on ''TW 1.2.36''| |Notes|^^1^^ Each snapshot is instantly compiled and named when downloaded, so nothing may have changed on the server, but the snapshot will have a slightly different name than another with the exact same contents.|
Type the text for 'New Tiddler'
<<timeline>>
|''Explanation of TiddlyWiki:''|The idea starts simply, a single file for an entire web site. TiddlyWiki (TW for short) is an extensible system for creating easy to edit web pages that are self contained on one file.| *[[TiddlyWiki]] |''[[Plugins and Macros]]:''|Macros and Plugins are the driving force for customizing your TW. These special tiddlers are tagged with systemConfig and give the TW they are in new features.| *[[Installing a Plugin]] *[[Plugins and Macros]] |''Editing and Hacking TW''|Many people have great ideas for new plugins and should not be afraid to come up front with them. Discuss topics on google groups or email site heads, often times we will make a note of the plugin and try to respond as soon as possible. Remember, we are developers but we don't know all the great ideas to be added to TW.| *[[TiddlyWikiDev on Google Groups|http://groups.google.com/group/TiddlyWikiDev]] *[[TiddlyWiki on Google Groups|http://groups.google.com/group/TiddlyWiki?lnk=li]]
|''Name:''|TableTagsPlugin | |''Version:''|1.0 | |''Source:''|http://thePettersons.org/PaulsNotepad.html#TableTagsPlugin | |''Author:''|[[Paul Petterson]] | |''Type:''|Macro Extension | |''Requires:''|TiddlyWiki 1.2.32 or higher | !Description //My Second Macro!// Lists all tiddlers with a given tag in a table format. Can specify the number of columns in the table. ''Example:'' <<tableTags systemConfig 4>>
|''Name:''|NewerTiddlerPlugin| |''Version:''|1.0.1 | |''Source:''|http://thePettersons.org/tiddlywiki.html#NewerTiddlerPlugin | |''Author:''|[[Paul Petterson]] | |''Type:''|Macro Extension | |''Requires:''|TiddlyWiki 1.2.33 or higher | !!Description Create a 'new tiddler' button with lots more options! Specify the text to show on the button, the name of the new tiddler (with date macro expansion), one or more tags for the new tiddlers, and what text if any to include in the new tiddler body, or the name of another tiddler to use as a template for the new tiddlers body! Uses a named parameter format, simalar to the reminder plugin. Also - if the tiddler already exists it won't replace any of it's existing data (like tags). ''Examples:'' * {{{<<newerTiddler button:"Inbox" name:"Inbox YYYY/MM/DD" tags:"Journal, inbox" text:"New stuff for today:">>}}} * {{{<<newerTiddler button:"@Action" name:"Action: what" tags:"@Action" text:"Add project and describe action">>}}} * {{{<<newerTiddler button:"New Project" name:"Project Name?" tags:"My Projects, My Inbox, Journal" template:"MyTemplate">>}}}
|Created by|ClintChecketts| |Location|Original- http://checkettsweb.com/styles/themes.htm#TagCloud| |~|Taggly Variation- http://checkettsweb.com/styles/themes.htm#TagglyTagCloud| |Summary|| |Version|| !Description
These interface options are saved in your browser username : <<option txtUserName>> password : <<option pasPassword>> <<option chkSaveBackups>> Save Backups <<option chkAutoSave>> Auto Save <<option chkGenerateAnRssFeed>> Generate an RSS Feed <<option chkRegExpSearch>> Reg Exp Search <<option chkCaseSensitiveSearch>> Case-sensitive Search <<option chkAnimate>> Enable Animations See AdvancedOptions
Paul Petterson TiddlyWiki Site: http://thepettersons.org/PaulsNotepad.html Contact me: paul.petterson at gmail dot com
|Created by|Phono Hawk| |Location|http://ccm.sherry.jp/tiddly/| |Summary|Server side TW powered by Perl and ~MySQL| |Current version|#9 based on ''TW 1.2.25''| |Notes||
!Example call: createTiddlyLink: createTiddlyLink(parentElement,tiddlerTitle,true); *''parent element'' needs to point to the containing element. *''tiddlerTitle'' is a string of the title of the tiddler being linked (like 'HelloThere') *''includeText'' is a boolean. True indicates that the tooltip will be generated. The tooltip will either tell that the tiddler doesn't exist, or if it exists, the person and time of the last modification. {{{ function createTiddlyLink(place,title,includeText) { var text = includeText ? title : null; var subTitle; var tiddler = store.tiddlers[title]; if(tiddler) subTitle = tiddler.getSubtitle(); else subTitle = config.messages.undefinedTiddlerToolTip.format([title]); var theClass = tiddler ? "tiddlyLinkExisting tiddlyLink" : "tiddlyLinkNonExisting tiddlyLink"; var btn = createTiddlyButton(place,text,subTitle,onClickTiddlerLink,theClass); btn.setAttribute("tiddlyLink",title); return(btn); } }}}
|Created by|Patrick Curry| |Location|http://www.patrickcurry.com/tiddly/| |Summary|Server side TW powered by PHP and ~MySQL| |Current version|0.3 Beta based on ''TW 1.2.7''| |Notes||
//{{{ version.extensions.tagCloud = {major: 1, minor: 0 , revision: 1, date: new Date(2005,8,16)}; //Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman config.macros.tagCloud = { noTags: "No tag cloud created because there are no tags.", tooltip: "%1 tiddlers tagged with '%0'" }; config.macros.tagCloud.handler = function(place,macroName,params) { var tagCloudWrapper = createTiddlyElement(place,"div",null,"tagCloud",null); var tags = store.getTags(); for (t=0; t<tags.length; t++) { for (p=0;p<params.length; p++) if (tags[t][0] == params[p]) tags[t][0] = ""; } if(tags.length == 0) createTiddlyElement(tagCloudWrapper,"span",null,null,this.noTags); //Findout the maximum number of tags var mostTags = 0; for (t=0; t<tags.length; t++) if (tags[t][0].length > 0){ if (tags[t][1] > mostTags) mostTags = tags[t][1]; } //divide the mostTags into 4 segments for the 4 different tagCloud sizes var tagSegment = mostTags / 4; for (t=0; t<tags.length; t++) if (tags[t][0].length > 0){ var tagCloudElement = createTiddlyElement(tagCloudWrapper,"span",null,null,null); tagCloudWrapper.appendChild(document.createTextNode(" ")); var theTag = createTiddlyLink(tagCloudElement,tags[t][0],true); theTag.className += " tagCloudtag tagCloud" + (Math.round(tags[t][1]/tagSegment)+1); // theTag.setAttribute("tag",tags[t][0]); } }; setStylesheet(".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"); //}}}
A directory of tools used by developers when creating plugins...
|Created by|Simon Baird| |Location|http://simonbaird.com/mptw/#TagglyTaggingBundle| ...
Experimental. This is for plugin developers put info about their plugins. See also AdaptationDirectory - SimonBaird
/*** ---- This is TagglyTagging, TagsBoxAtTop, NewHereButton and CommaSeparatedTags all in one tiddler for convenience. ---- ***/ /*** |''Name:''|TagglyTagging| |''Version:''|1.0.3 (11-Oct-2005)| |''Source:''|MonkeyPirateTiddlyWiki (http://homes.jcu.edu.au/~ccscb/mptw/#TagglyTaggingPlugin)| |''Author:''|SimonBaird| |''Type:''|Plugin| !Description See TagglyTagging and TagglyTaggingFAQ !Issues * Suffers from the same mouseover glitch in IE as the tiddler toolbar buttons. Makes it hard to get your sort controls visible in IE. You have to put the mouse over the "Tagged as" label. !Revision history * v1.0.0 (Jul-2005) ** first working version ** (probably a bunch of unrecorded changes between 1.0.0 and 1.0.1) * v1.0.1 (9-Oct-2005) ** added this doco ** add ability to change sort and format * v1.0.2 (10-Oct-2005) ** fixed missing tag count in tags tab (thanks [[Clint]] for this fix) * v1.0.3 (11-Oct-2005) ** fixed bug in part that interacts with [[Shorten Tab Links Plugin]]. (Thanks to [[Paul Petterson]] for locating this.) !Code ***/ //{{{ if (!config.plugins) config.plugins = []; config.plugins.TagglyTagging = { // edit this to your preference. name|date-asc|desc-bullets|commas defaultOptions: "name-asc-bullets", formats: { bullets: "*[[%0]]\sn", commas: "[[%0]], " }, tiddlerFields: { name: "title", date: "modified" } }; function TagglyOptions(optionsString) { var opts = optionsString.split("-"); this.sortField = opts[0]; this.sortOrder = opts[1]; this.listFormat = opts[2]; return this; } TagglyOptions.prototype.toggleListFormat = function() { return (this.listFormat == "bullets")?"commas":"bullets"; } TagglyOptions.prototype.optionsString = function() { return [this.sortField,this.sortOrder,this.listFormat].join("-"); } TagglyOptions.prototype.toggleSortOrder = function() { return (this.sortOrder == "asc")?"desc":"asc"; } TagglyOptions.prototype.formatString = function() { return config.plugins.TagglyTagging.formats[this.listFormat]; } TagglyOptions.prototype.tiddlerField = function() { return config.plugins.TagglyTagging.tiddlerFields[this.sortField]; } TagglyOptions.prototype.buttonLabels = function() { var upArrow = "↑"; var downArrow = "↓"; var result = { name: "name", date: "date", format: this.toggleListFormat() }; // asc means down the page hence arrows are reverse what you might first expect if (this.sortField == "name") result.name += (this.sortOrder == "desc")?upArrow:downArrow; else if (this.sortField == "date") result.date += (this.sortOrder == "desc")?upArrow:downArrow; return result; } // override function in prototype to allow asc or desc sorting store.reverseLookup_mptw_ascdesc = store.reverseLookup; store.reverseLookup = function(lookupField,lookupValue,lookupMatch,sortField,sortAscDesc) { var results = this.reverseLookup_mptw_ascdesc(lookupField,lookupValue,lookupMatch,sortField); if (sortAscDesc && sortAscDesc == "desc") results.reverse(); return results; } // This is a short function I will just replace it rather than try to hijack. hence may break in future TWs store.getTaggedTiddlers = function(tag,sortField,ascdesc) { return this.reverseLookup("tags",tag,true,sortField,ascdesc); } setStylesheet( ".tiny {color:#bbb; font-size:80%;padding:0px;margin:0px;margin-right:0.7em;}\sn"+ "a.tiny {color:#999!important; padding:2px; }\sn"+ "a.tiny:hover {background:#ddd!important; }\sn"+ ".hideTaggedControls {display:none;}\sn"+ ".showTaggedControls { }\sn"+ "","taggedControls"); function getTaggedTiddlersText(title,options) { var tags = store.getTaggedTiddlers(title,options.tiddlerField(),options.sortOrder) var str=""; for (i=0; i<tags.length; i++) str += options.formatString().format([tags[i].title]); return str; } function getTagglyOptionsString(theTiddler) { var element = document.getElementById("taggedOptions"+theTiddler); if (element) return element.firstChild.nodeValue; else return null; } function handleOptionClickAndRefresh(theTiddler,thingClicked) { // get the optionsString out of the taggedOptions invisible span var options = new TagglyOptions(getTagglyOptionsString(theTiddler)); if (thingClicked == "name" && options.sortField == "name") options.sortOrder = options.toggleSortOrder(); else if (thingClicked == "date" && options.sortField == "date") options.sortOrder = options.toggleSortOrder(); else if (thingClicked == "date" && options.sortField == "name") options.sortField = "date"; else if (thingClicked == "name" && options.sortField == "date") options.sortField = "name"; else if (thingClicked == "format") options.listFormat = options.toggleListFormat(); refreshTaggedList(theTiddler,options,true); } function onClickOptName(e) { if (!e) var e = window.event; var theTarget = resolveTarget(e); var theTiddler = findContainingTiddler(theTarget).id.substr(7); var state = handleOptionClickAndRefresh(theTiddler,"name"); return false; } function onClickOptDate(e) { if (!e) var e = window.event; var theTarget = resolveTarget(e); var theTiddler = findContainingTiddler(theTarget).id.substr(7); var state = handleOptionClickAndRefresh(theTiddler,"date"); return false; } function onClickOptFormat(e) { if (!e) var e = window.event; var theTarget = resolveTarget(e); var theTiddler = findContainingTiddler(theTarget).id.substr(7); var state = handleOptionClickAndRefresh(theTiddler,"format"); return false; } config.macros.taggedSortControls = {}; config.macros.taggedSortControls.handler = function(place,macroName,params) { var opts = new TagglyOptions(params[0]); var labels = opts.buttonLabels(); var b1 = createTiddlyButton(place,labels.name,"Click to sort",onClickOptName,"tiny"); var b2 = createTiddlyButton(place,labels.date,"Click sort",onClickOptDate,"tiny"); var b3 = createTiddlyButton(place,labels.format,"Click to change format",onClickOptFormat,"tiny"); } function onMouseOverTaggedContainer(e) { if (!e) var e = window.event; var tiddler = findContainingTiddler(resolveTarget(e)).id.substr(7); var foo = document.getElementById("taggedControls"+tiddler); if (foo) { foo.className = "showTaggedControls"; } } function onMouseOutTaggedContainer(e) { if (!e) var e = window.event; var tiddler = findContainingTiddler(resolveTarget(e)).id.substr(7); var foo = document.getElementById("taggedControls"+tiddler); if (foo) foo.className = "hideTaggedControls"; } // use this to (re)build the tagged list for a tiddler function refreshTaggedList(title,options,donthide) { if (!options) { // must be refreshing already on screen tiddler // so read existing options // not changing any of them var optStr = getTagglyOptionsString(title); if (optStr) options = new TagglyOptions(optStr); } if (!options) { // must be creating for the first time // so read default options options = new TagglyOptions(config.plugins.TagglyTagging.defaultOptions); } if (!donthide) donthide = false; // normally hide waiting for mouseover var theViewer = document.getElementById("viewer"+title); if (theViewer) { var theTagged = document.getElementById("tagged"+title); if (theTagged) theTagged.parentNode.removeChild(theTagged); var taggedText = getTaggedTiddlersText(title,options); if (taggedText != "") { var newTaggedList = createTiddlyElement(theViewer,"div","tagged" + title,"tagged",null); createTiddlyElement(newTaggedList,"span",null,"tiny","Tagged as "+title+":"); // will put the options string in this hidden span so we can read it later var newTaggedOptions = createTiddlyElement(newTaggedList, "span","taggedOptions" + title, "hideTaggedControls",options.optionsString()); var newTaggedControls = createTiddlyElement(newTaggedList, "span","taggedControls" + title, donthide?"showTaggedControls":"hideTaggedControls",null); wikify('<<taggedSortControls '+options.optionsString()+'>>', newTaggedControls); if (options.listFormat == "commas") taggedText = taggedText.replace(/^/,"\sn").replace(/, $/,"\sn"); wikify(taggedText, newTaggedList); newTaggedList.onmouseover = onMouseOverTaggedContainer; newTaggedList.onmouseout = onMouseOutTaggedContainer; } } } // I want to refresh the tagged list in other visible tiddlers // this is to refresh if we remove a tiddler window.deleteTiddler_orig_mptw_tagglytagging = window.deleteTiddler; window.deleteTiddler = function(title) { var oldtags = []; var tiddler = store.tiddlers[title]; if (tiddler) { var oldtags = tiddler.tags; } deleteTiddler_orig_mptw_tagglytagging(title); for (i=0; i<oldtags.length; i++) { refreshTaggedList(oldtags[i]); } } // this is if we edit a tiddler // refresh tags on screen window.saveTiddler_orig_mptw_tagglytagging = window.saveTiddler; window.saveTiddler = function(title) { var newTitle = document.getElementById("editorTitle"+title).value; var oldtags = []; var tiddler = store.tiddlers[title]; if (tiddler) { var oldtags = tiddler.tags; } saveTiddler_orig_mptw_tagglytagging(title); var newtags = store.tiddlers[newTitle].tags; for (i=0; i<newtags.length; i++) { refreshTaggedList(newtags[i]); } // will do lots twice. should do a unique on oldtags and newtags // probably its fast enough that we don't care for (i=0; i<oldtags.length; i++) { refreshTaggedList(oldtags[i]); } } //========================================================== window.createTiddlerViewer_orig_mptw_tagging = window.createTiddlerViewer; window.createTiddlerViewer = function(title,highlightText,highlightCaseSensitive) { createTiddlerViewer_orig_mptw_tagging(title,highlightText,highlightCaseSensitive); refreshTaggedList(title); } //========================================================== // only change in this is to put the footer above the title... // I know that's a bit strange but it's the easiest way to move the tag buttons window.createTiddlerSkeleton_orig_mptw_tagging = window.createTiddlerSkeleton; window.createTiddlerSkeleton = function(place,before,title) { var theTiddler = createTiddlerSkeleton_orig_mptw_tagging(place,before,title); theFooter = document.getElementById("footer"+title); theTitle = document.getElementById("title"+title); // want to put the footer up above the title theTiddler.childNodes[0].insertBefore(theFooter,theTitle); return(theTiddler); } //========================================================== // I want a TiddlyLink in place of a TagButton window.createTagButton = function(place,tag,excludeTiddler) { return createTiddlyLink(place,tag,tag); } //========================================================== // this is to make the Tags tab work the same. TiddlyLink instead of Tag button config.macros.allTags.handler = function(place,macroName,params) { var tags = store.getTags(); var theDateList = createTiddlyElement(place,"ul",null,null,null); if(tags.length == 0) { createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags); } // bad hack so the shorten tab links plugin shortens these a little shorter :) var adjustShorten = 2; if (config.mptw_shortnames) config.mptw_shortnames.trimAt -= adjustShorten; for (t=0; t<tags.length; t++) { var theListItem=createTiddlyElement(theDateList,"li",null,"listLink",null); // not sure why the following doesn't show the count var theTag = createTiddlyLink(theListItem,tags[t][0],tags[t][0] + "(" + tags[t][1] + ")"); // but this puts it in anyway (thanks Clint for this fix). theTag.appendChild(document.createTextNode(" ("+tags[t][1]+")")); theTag.setAttribute("tag",tags[t][0]); } // other part of bad hack if (config.mptw_shortnames) config.mptw_shortnames.trimAt += adjustShorten; } config.views.wikified.tag.labelNoTags = ""; config.views.wikified.tag.labelTags = ""; setStylesheet( ".tagged {background:#f8f8f8;margin-top:0.5em;border: solid #f0f0f0 3px; margin-bottom:0px;padding-bottom:0.5em;padding-left:0.5em;}\sn"+ ".tagged ul {padding-top:0px;margin-top:0px;margin-bottom:2px;list-style-type:square;margin-left:1.2em;padding-left:0;}\sn"+ ".footer a.tiddlyLink { padding-top:0px;margin-right:2em;}\sn"+ ".footer {margin-top:0px;padding-top:0px;}\sn"+ "",'tagglyTaggingStyles'); //}}} /*** |''Name:''|TagsBoxAtTop| |''Version:''|1.0.3 (11-Oct-2005)| |''Source:''|MonkeyPirateTiddlyWiki (http://homes.jcu.edu.au/~ccscb/mptw/#TagsBoxAtTop)| |''Author:''|SimonBaird| |''Type:''|Plugin| !Description This puts the tags box up under the title box when you edit a tiddler. Also adds some labels. This layout emulates the original TagglyWiki editing layout. !Revision History * 1.0.2 (09-Oct-2005) ** Added classes to title and tags box so they can be styled (as suggested by [[Clint]]) ** Added labels * 1.0.3 (11-Oct-2005) ** Added documentation !Code ***/ //{{{ window.createTiddlerEditor_mptw_tagstop = window.createTiddlerEditor; window.createTiddlerEditor = function(title) { createTiddlerEditor_mptw_tagstop(title); var theEditor = document.getElementById("editorWrapper"+title); var theTitleBox = document.getElementById("editorTitle"+title); var theTagsBox = document.getElementById("editorTags"+title); var theBodyBox = document.getElementById("editorBody"+title); var tagPrompt = document.getElementById("editorFooter"+title); // so we can style them if we like theTitleBox.className += " titleBox"; theTagsBox.className += " tagsBox"; // put tags box above body theEditor.insertBefore(theTagsBox,theBodyBox); // put "Type tags..." message above body too theEditor.insertBefore(theEditor.childNodes[3],theBodyBox); // add some labels var titleLabel = createTiddlyElement(theEditor,"span",null,"titleLabel","Title:"); var tagsLabel = createTiddlyElement(theEditor,"span",null,"tagsLabel","Tags:"); var contentLabel = createTiddlyElement(theEditor,"span",null,"contentLabel","Content:"); // put them in the right place theEditor.insertBefore(tagsLabel,theTagsBox); theEditor.insertBefore(titleLabel,theTitleBox); theEditor.insertBefore(contentLabel,theBodyBox); } //}}} /*** |''Name:''|NewHereButton| |''Version:''|1.0.1 (7-Oct-2005)| |''Source:''|MonkeyPirateTiddlyWiki (http://homes.jcu.edu.au/~ccscb/mptw/#NewHereButton)| |''Author:''|SimonBaird| |''Type:''|Plugin| |''Requires:''|No special requirements but works well with TagglyTagging| !Description Adds a toolbar button which lets you create a new tiddler with a pre-entered tag of the name of the tiddler where you clicked the button. (Not as confusing as it sounds!). !Revision history * v1.0.0 (Jul-2005) ** first version * v1.0.1 (7-Oct-2005) ** added some this doco ** fixed bug where it didn't add the necessary {{{[[}}} and {{{]]}}} when the current tiddler had a space in its title and you weren't using CommaSeparatedTags. Thanks Dan Knapp for this fix. !Code ***/ //{{{ window.onClickToolbarNewHere = function(e) { if (!e) var e = window.event; clearMessage(); if(this.parentNode.id) { displayTiddler(this.parentNode,"New Tiddler",2,null,null,false,false); tagBox = document.getElementById("editorTagsNew Tiddler"); var tagString = this.parentNode.id.substring(7); if (!window.commafyTags) // we aren't using comma separated tags plugin (commafyTags is a function) if(tagString.indexOf(" ") != -1) tagString = "[[" + tagString + "]]"; tagBox.value = tagString; } e.cancelBubble = true; // do I need this? if (e.stopPropagation) e.stopPropagation(); // do I need this? return false; } config.views.wikified.toolbarNewHere = { text: "new here", tooltip: "Create a new tiddler tagged as this tiddler" }; window.createTiddlerToolbar_mptw_newhere = window.createTiddlerToolbar; window.createTiddlerToolbar = function(title,isEditor) { // first create regular toolbar createTiddlerToolbar_mptw_newhere(title,isEditor); if(!isEditor) { // now add extra button var theToolbar = document.getElementById("toolbar" + title); var lingo = config.views.wikified; createTiddlyButton(theToolbar, lingo.toolbarNewHere.text, lingo.toolbarNewHere.tooltip, onClickToolbarNewHere); insertSpacer(theToolbar); // in case we wanna add any more buttons after this one } } //}}} /*** |''Name:''|CommaSeparatedTags| |''Version:''|1.0.1 (11-Oct-2005)| |''Source:''|MonkeyPirateTiddlyWiki (http://homes.jcu.edu.au/~ccscb/mptw/#CommaSeparatedTags)| |''Author:''|SimonBaird| |''Type:''|Plugin| !Description This plugin lets you use comma separated tags instead of using space separated tags with {{{[[}}} and {{{]]}}} for tags with spaces. Note that this doesn't change how the tags are stored so that it can be switched on and off without any harmful effects. !Examples With this plugin installed you enter this: {{{tag1, tag2, tag with a space, another one}}} instead of this: {{{tag1 tag2 [[tag with a space]] [[another one]]}}} !Revision history * v0.9.x (Jul-2005) * v1.0.1 (11-Oct-2005) ** added this doco !Code ***/ //{{{ config.views.editor.tagPrompt = "Type tags separated by commas above, or add existing"; function uncommafyTags(tagsString) { // converts from "foo,bar,baz qux" to "[[foo]] [[bar]] [[baz qux]]" var trimmed = tagsString.trim(); if (trimmed == "" || trimmed == null) { return ""; } else { if (trimmed.substring(trimmed.length-1) == ",") { // remove trailing comma to be nice trimmed = trimmed.substring(0,trimmed.length-1); } var tagsArray = trimmed.split(","); var result = ""; for (var i=0;i<tagsArray.length;i++) { // put square brackets on all of them because readBracketedList can handle it // don't want leading or trailing spaces result = result + (i==0?"":" ") + "[[" + tagsArray[i].trim() + "]]"; } return result; } } function commafyTags(tagsString) { var tagsArray = tagsString.readBracketedList(); return tagsArray.join(", "); } window.saveTiddler_orig_mptw_commatags = window.saveTiddler; window.saveTiddler = function(title) { // tweak the tags text in the tags input box after editing var tagsBox = document.getElementById("editorTags" + title); tagsBox.style.display = "none"; // otherwise you see it flash up briefly tagsBox.value = uncommafyTags(tagsBox.value); saveTiddler_orig_mptw_commatags(title); } window.createTiddlerEditor_orig_mptw_commatags = window.createTiddlerEditor; window.createTiddlerEditor = function(title) { // tweak the tags text in the tags input box before editing createTiddlerEditor_orig_mptw_commatags(title); var tagsBox = document.getElementById("editorTags" + title); tagsBox.value = commafyTags(tagsBox.value); } // Event handler for clicking on a tag in the 'add tag' popup window.onClickAddTagPopup = function(e) { // here we'll just replace the whole lot // hopefull this won't hurt too much during upgrades if (!e) var e = window.event; var theTarget = resolveTarget(e); var tiddler = this.getAttribute("tiddler"); var tag = this.getAttribute("tag"); var tagsBox = document.getElementById("editorTags" + tiddler); //// mod if(tagsBox) { if (tagsBox.value.trim() == "") { tagsBox.value = tag; } else { tagsBox.value += ", " + tag; } } //// end mod //// replaced bit /* if(tagsBox) tagsBox.value += " " + String.encodeTiddlyLink(tag); */ //// end replaced bit e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); return(false); } //}}}
(Eric Shulman writes) "plugins" are tiddlers containing javascript code which will be executed each time the TW document is loaded. To designate a tiddler as a plugin, you must tag with 'systemConfig'. This is what tells it that there is code in the tidder. "macros" are plugins that define TW functions, such as <html>&lt;&lt;version&gt;&gt;</html> and <html>&lt;&lt;today&gt;&gt;</html> that can be embedded in tiddler content. When the tiddler is "rendered" (displayed), the embedded macros are run and the results are inserted into the content, replacing the embedded macro syntax.
|Summary|This function grabs the current content of the tiddler (by its title) and saves it back to the tiddler store.| |Parameters|''title''- the tiddlers title<html><br /><br /></html>''minorUpdate''- boolean that denotes whether the modified date should be updated| |Returns|Nothing| |Calling Functions|<<TODO>>| |Usage Suggestions|<<TODO>>| |Possible Improvements|<<TODO>>| //{{{ function saveTiddler(title,minorUpdate) { var titleBox = document.getElementById("editorTitle" + title); var newTitle = titleBox.value; if(store.tiddlerExists(newTitle)) { if(newTitle != title && !confirm(config.messages.overwriteWarning.format([newTitle.toString()]))) { titleBox.focus(); titleBox.select(); return; } } var body = document.getElementById("editorBody" + title); var newBody = body.value; newBody = newBody.replace(/\r/mg,""); var newTags = document.getElementById("editorTags" + title).value; blurTiddler(title); if(config.options.chkForceMinorUpdate) minorUpdate = !minorUpdate; var newDate = new Date(); store.saveTiddler(title,newTitle,newBody,config.options.txtUserName,minorUpdate ? undefined : new Date(),newTags); displayTiddler(null,newTitle,1,null,null,null,false,false); // Close the old tiddler if this is a rename if(title != newTitle) { var oldTiddler = document.getElementById("tiddler" + title); var newTiddler = document.getElementById("tiddler" + newTitle); oldTiddler.parentNode.replaceChild(newTiddler,oldTiddler); } if(config.options.chkAutoSave) saveChanges(); } //}}}
As of [[Revision 1.2.36]] the popup (used for tags and references buttons) was restructured to use an ordered list. Its new structure is like so: *html **body ***ol.popup#popup ****li *****a.button ****li *****hr ****li *****a.tiddlyLink Two items of interest: #Now that the popup is taken completely out of its parent element (its new parent is the 'body' element) it won't be able to inherit styling or behave differently if it originated from the sidebar, toolbar, or other area. #The popup now has all the strengths of traditional lists and can be styled in many creative ways. Push it to its limits.
//Released on 18 October 2005// * Fixed [[Opera]] support for SaveChanges * Added a new [[Popup]] mechanism * Fixed CSS typo, thanks to purson * Fixed problem with sidebar tab width, thanks to PaulDickson and others * Fixed problem with WikiWord escape '~' * Replaced CSS color names with RGB values * Fixed problem with label text being cut off in sidebar tabs * Fixed problem with blank tiddlers appearing as though they didn't exist * Fixed problem with config.options.chkHttpReadOnly not being settable from systemConfig tiddlers * Changed tag list to sorted case-insensitively, pointed out by ClintChecketts * Fixed problem with images lacking a tooltip, thanks to BramChen * Optimised findContainingTiddler(), thanks to PaulPetterson Other fixes: *Tiddler titles are now trimmed of excess spaces Little bugs: *Tiddlers still don't ignore case when sorted alphabetically in the 'All' tab
When clicking 'save changes' an error message appears, the alert does not mean that the file did not save, this is based upon [[pyTW]] and automatically saves to the web. The 'save changes' button saves the files changes locally after copying it to your harddrive.
|Created by|SimonBaird| |Location|http://simonbaird.com/mptw/#TagglyTaggingPlugin| |Summary|Change tagging so that a tag is a tiddler| |Current version|1.0.4 (15-Oct-2005)| !Description For more info see [[TagglyTaggingFAQ|http://homes.jcu.edu.au/~ccscb/mptw/#TagglyTaggingFAQ]] and the [[TagglyTaggingTutorial|http://homes.jcu.edu.au/~ccscb/mptw/#TagglyTaggingTutorial]] !See Also TagglyTaggingBundle
|Created by|Josh Goebel| |Location|http://www.serversidewiki.com| |Summary|Closed source server side TW powered by Ruby on Rails and ~MySQL| |Current version|.999 Beta based on ''TW 1.2.32''| |Description||
!!Some kind of Header !Header? ''Bold'' ==Strike== __Underline__ //Italic// 2^^3^^=8 a~~ij~~ = -a~~ji~~ @@highlight@@ @@color(green):green colored@@ @@bgcolor(#ff0000):color(#ffffff):red colored@@ *Legende zum Vorlesungsverzeichnis **@@bgcolor(#a0ffa0):color(black): bedeutet hier@@ **@@bgcolor(#ffdead):color(black): etwas anderes@@ **@@bgcolor(#ffbfff):color(black): Lanthanides@@ **@@bgcolor(#ff99cc):color(black): Actinides@@ **@@bgcolor(#ffc0c0):color(black): Transition metals@@ **@@bgcolor(#cccccc):color(black): Poor metals@@ **@@bgcolor(#cccc99):color(black): Metalloids@@ **@@bgcolor(#a0ffa0):color(black): Nonmetals@@ **@@bgcolor(#ffff99):color(black): Halogens@@ **@@bgcolor(#c0ffff):color(black): Noble gases@@ *** @@color(#a0ffa0):TODO@@ *** @@color(#ffdead):IBM@@ *** @@color(#ffbfff):Research@@ *** @@color(#ff99cc):Japan@@ *** @@color(#ffc0c0):Culture@@
<<gradient vert #390108 #4c4c4c>><<search>><<closeAll>><<permaview>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel options 'Change TiddlyWiki advanced options'>>>>
Some thoughts on this by PaulPetterson Using timestamps to fetch changes can be buggy because of hard to find races, better yet to send a list of tiddlers each with it's own server assigned last saved timestamp, and a client assigned last updated timestamp, then let the server figure out what's changed or not. Save the stuff that the client has changed, and return the stuff that changed under the client. Do this all in a transaction to keep things consistent. I like to make little changes in an online TW that I don't want pushed to the server side, for example - if someone sends me a problem report with a link, I'll do little things like edit a tiddler in their env. to see the problem, or put in a <<version>> macro somewhere. None of this needs to be pushed to the server, and will probably be rejected anyway because I wouldn't have permissions to execute a save against their server side store. I recognize the possible difficulties of saving the entire store to the server, but don't really see a way to get rid of the needless server round-trips on non-necessary saves and/or the security configuration hassles of adding and removing people to your 'can actually save' list. Paul
The following tiddlers were created and started but they are stubs and need a bit more content. Please help fill them out.
|''Site''|[[MonkeyPirateTiddlyWiki|http://simonbaird.com/mptw/]]| |''About''|TiddlyWiki hacker since 13-May-2005 and plugin creator. See MonkeyPirateTiddlyWiki for more info| |''Email''|[[simon.baird@gmail.com|mailto:simon.baird@gmail.com]]| |''Home page''|http://simonbaird.com/| |''Location''|[[Townsville, Australia|http://maps.google.com/maps?q=townsville,+australia&t=k&hl=en]]| /% |''Photo''|[img[photo|http://simonbaird.com/images/photo.jpg]]| %/
simon.baird@gmail.com
|''Name:''|TheDumpPlugin | |''Version:''|1.0 | |''Source:''|http://thePettersons.org/PaulsNotepad.html#TheDumpPlugin | |''Author:''|[[Paul Petterson]] | |''Type:''|Macro Extension | |''Requires:''|TiddlyWiki 1.2.32 or higher | !!Description This macro dumps TiddlyWiki internals. Usefull for seeing just what those wacky shadow-tiddlers really are! Also handy for seeing what macros you really do have installed! Can dump just about anything... ''Examples:'' {{{<<dump config.shadowTiddlers>>}}} {{{<<dump config.macros.today>>}}}
a [[hackers]] guide to inside TiddlyWiki
|Created by|Joseph Reisinger| |Location|http://www.cs.utexas.edu/~joeraii/pytw/| |Summary|Python powered server side TW with no database required| |Current version|1.0.5 based on ''TW 1.2.36''^^1^^| |Notes|^^1^^ pyTW comes with 1.2.32 but has simple instructions to swap out the TW file for a more advanced one |
[[TiddlyWiki/Dev|TiddlyWikiDev]]- ([[drafts|TiddlyWikiDev]])
Type the text for 'TiddlerStats'
// //''Name:'' ToolbarCreation plugin // //''Author:'' Alan Hechts // //''Please note that I am posting this tiddler for demo purposes only. I haven't fully released the code as I'm awaiting some upcoming changes to ~TiddlyWiki.'' // //''This tiddler demonstrates how you can add, remove & rearrange toolbar buttons using a macro approach. This tiddler (the one you are reading now) is the only "required" addition to ~TiddlyWiki 1.2.28 to allow a customizable toolbar.'' // //''By replacing the createTiddlerToolbar function in the hard code and creating new macros that emulate each toolbar button, you can now add or rearrange both the editing and viewing toolbars. Folks, it's just a matter of time before you can have one toolbar set for editors and one for web viewers!'' // //''To create your own toolbars (you can even try it live on this website), simply edit the two new tiddlers, called EditorToolbar and ViewerToolbar (no special tags are necessary for either of these tiddlers). Then use the following macro references to add buttons in the order that you desire:'' // //''Viewing toolbar:'' <<toolbarClose>> <<toolbarEdit>> <<toolbarCollapse>> <<toolbarCloseOthers>> <<toolbarPermalink>> <<toolbarReferences>> // //''Editing Toolbar:'' <<toolbarDone>> <<toolbarCancel>> <<toolbarSpellCheck>> <<toolbarDuplicate>> <<toolbarDelete>> <<toolbarEditHelp>> // //''Note: these buttons will not work properly from within tiddlers, they will only work when displayed in the toolbar area.'' // // ''Code Section'' // //''Macro Declarations'' (some repeated from the original code) config.macros.toolbarClose = {}; config.macros.toolbarEdit = {}; config.macros.toolbarPermalink = {}; config.macros.toolbarReferences = {}; config.macros.toolbarDone = {}; config.macros.toolbarCancel = {}; config.macros.toolbarDelete = {}; // //''Steve's additions'' config.macros.toolbarEncrypt = {}; config.macros.toolbarDecrypt = {}; config.macros.toolbarEditDecrypt = {}; // //''Corresponding Macro functions'' config.macros.toolbarClose.handler = function(place) { lingo = config.views.wikified; createTiddlyButton(place,lingo.toolbarClose.text,lingo.toolbarClose.tooltip,onClickToolbarClose,null,null,"toolbarClose"); } config.macros.toolbarEdit.handler = function(place,macroName,params) { lingo = config.views.wikified; createTiddlyButton(place,lingo.toolbarEdit.text,lingo.toolbarEdit.tooltip,onClickToolbarEdit); } config.macros.toolbarPermalink.handler = function(place,macroName,params) { lingo = config.views.wikified; createTiddlyButton(place,lingo.toolbarPermalink.text,lingo.toolbarPermalink.tooltip,onClickToolbarPermaLink); } config.macros.toolbarReferences.handler = function(place,macroName,params) { lingo = config.views.wikified; createTiddlyButton(place,lingo.toolbarReferences.text,lingo.toolbarReferences.tooltip,onClickToolbarReferences); } config.macros.toolbarDone.handler = function(place,macroName,params) { lingo = config.views.editor; createTiddlyButton(place,lingo.toolbarDone.text,lingo.toolbarDone.tooltip,onClickToolbarSave); } config.macros.toolbarCancel.handler = function(place,macroName,params) { lingo = config.views.editor; createTiddlyButton(place,lingo.toolbarCancel.text,lingo.toolbarCancel.tooltip,onClickToolbarUndo); } config.macros.toolbarDelete.handler = function(place,macroName,params) { lingo = config.views.editor; createTiddlyButton(place,lingo.toolbarDelete.text,lingo.toolbarDelete.tooltip,onClickToolbarDelete); } // //(These shouldn't be here, but IE fails if they aren't there must be some kind of ordering problem) function onClickToolbarEncrypt(e) { if (!e) var e = window.event; if(encryptKey == "") encryptChangePassword(); var title = this.parentNode.id.substr(7); var newBody = document.getElementById("editorBody" + title).value; newBody = encryptContents(newBody); document.getElementById("editorBody" + title).value = newBody; } function onClickToolbarEditDecrypt(e) { if (!e) var e = window.event; if(encryptKey == "") encryptChangePassword(); var title = this.parentNode.id.substr(7); var newBody = document.getElementById("editorBody" + title).value; newBody = decryptContents(newBody); document.getElementById("editorBody" + title).value = newBody; } function onClickToolbarDecrypt(e) { if (!e) var e = window.event; if(encryptKey == "") encryptChangePassword(); var title = this.parentNode.id.substr(7); var theBody = document.getElementById("body" + title); var theViewer = document.getElementById("viewer" + title); if(theViewer) theViewer.parentNode.removeChild(theViewer); var theViewer = createTiddlyElement(theBody,"div","viewer" + title,"viewer",null); var newText = store.getTiddlerText(title); newText = decryptContents(newText); wikify(newText,theViewer,false,false); } config.macros.toolbarEncrypt.handler = function(place,macroName,params) { lingo = config.views.editor; createTiddlyButton(place,lingo.toolbarEncrypt.text,lingo.toolbarEncrypt.tooltip,onClickToolbarEncrypt); } config.macros.toolbarEditDecrypt.handler = function(place,macroName,params) { lingo = config.views.editor; createTiddlyButton(place,lingo.toolbarDecrypt.text,lingo.toolbarDecrypt.tooltip,onClickToolbarEditDecrypt); } config.macros.toolbarDecrypt.handler = function(place,macroName,params) { lingo = config.views.wikified; createTiddlyButton(place,lingo.toolbarDecrypt.text,lingo.toolbarDecrypt.tooltip,onClickToolbarDecrypt); } // //''Replaced TW functions'' window.createTiddlerToolbar = function createTiddlerToolbar(title,isEditor) { var theToolbar = document.getElementById("toolbar" + title); if(theToolbar) { removeChildren(theToolbar); if(isEditor) { // Editor toolbar wikify(store.getTiddlerText("EditorToolbar"),theToolbar,null,null); } else { // Viewer toolbar wikify(store.getTiddlerText("ViewerToolbar"),theToolbar,null,null); } } } // //''Shadowed tiddlers (in case they don't yet exist)'' config.shadowTiddlers.ViewerToolbar = "<<toolbarClose>> <<toolbarEdit>> <<toolbarCollapse>> <<toolbarCloseOthers>> <<toolbarPermalink>> <<toolbarReferences>>"; config.shadowTiddlers.EditorToolbar = "<<toolbarDone>> <<toolbarCancel>> <<toolbarSpellCheck>> <<toolbarDuplicate>> <<toolbarDelete>> <<toolbarEditHelp>>"; config.shadowTiddlers.EditingHelp = "Click on each topic below to see formatting instructions and examples:\sn<<listTags formatting title *>>"; // // Function to dynamically handle changes to the special toolbar tiddlers function refreshToolbars() { clearMessage(); var place = document.getElementById("tiddlerDisplay"); var tiddler = place.firstChild; var nextTiddler; while(tiddler) { nextTiddler = tiddler.nextSibling; if(tiddler.id) if(tiddler.id.substr(0,7) == "tiddler") { var title = tiddler.id.substr(7); createTiddlerToolbar(title,false) } tiddler = nextTiddler; } } // // Additional notifications for toolbar layout changes store.addNotification("ViewerToolbar",function(){refreshToolbars()}); store.addNotification("EditorToolbar",function(){refreshToolbars()});
Installed Plugins
//{{{ version.extensions.tagCloud = {major: 1, minor: 0 , revision: 1, date: new Date(2005,8,16)}; //Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman config.macros.tagCloud = { noTags: "No tag cloud created because there are no tags.", tooltip: "%1 tiddlers tagged with '%0'" }; config.macros.tagCloud.handler = function(place,macroName,params) { var tagCloudWrapper = createTiddlyElement(place,"div",null,"tagCloud",null); var tags = store.getTags(); for (t=0; t<tags.length; t++) { for (p=0;p<params.length; p++) if (tags[t][0] == params[p]) tags[t][0] = ""; } if(tags.length == 0) createTiddlyElement(tagCloudWrapper,"span",null,null,this.noTags); //Findout the maximum number of tags var mostTags = 0; for (t=0; t<tags.length; t++) if (tags[t][0].length > 0){ if (tags[t][1] > mostTags) mostTags = tags[t][1]; } //divide the mostTags into 4 segments for the 4 different tagCloud sizes var tagSegment = mostTags / 4; for (t=0; t<tags.length; t++) if (tags[t][0].length > 0){ var tagCloudElement = createTiddlyElement(tagCloudWrapper,"span",null,null,null); tagCloudWrapper.appendChild(document.createTextNode(" ")); var theTag = createTiddlyButton(tagCloudElement,tags[t][0],this.tooltip.format(tags[t]),onClickTag,"tagCloudtag tagCloud" + (Math.round(tags[t][1]/tagSegment)+1)); theTag.setAttribute("tag",tags[t][0]); } }; setStylesheet(".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"); //}}}
version.extensions.tagCloud = {major: 0, minor: 1, revision: 0, date: new Date(2005,7,31)}; config.macros.tagCloud = { noTags: "No tag cloud created because there are no tags." }; config.macros.tagCloud.handler = function(place,macroName,params) { var tagCloudWrapper = createTiddlyElement(place,"ul",null,"tagCloud",null); var tags = store.getTags(); if(tags.length == 0) createTiddlyElement(tagCloudWrapper,"li",null,null,this.noTags); //Findout the maximum number of tags var mostTags = 0; for (t=0; t<tags.length; t++) { if (tags[t][1] > mostTags) mostTags = tags[t][1]; } //divide the mostTags into 6 segments for the 6 different tagCloud sizes var tagSegment = mostTags / 4; for (t=0; t<tags.length; t++) { var tagCloudElement =createTiddlyElement(tagCloudWrapper,"li",null,null,null); var theTag = createTiddlyButton(tagCloudElement,tags[t][0],this.tooltip + tags[t][0],onClickTag,"tagCloud"+(Math.round(tags[t][1]/tagSegment)+1)); theTag.setAttribute("tag",tags[t][0]); } createTiddlyElement(place,"p",null,"clearer",null); };
//{{{ version.extensions.tagCloud = {major: 1, minor: 0 , revision: 1, date: new Date(2005,8,16)}; //Created by Clint Checketts, contributions by Jonny Leroy and Eric Shulman config.macros.tagCloud = { noTags: "No tag cloud created because there are no tags.", tooltip: "%1 tiddlers tagged with '%0'" }; config.macros.tagCloud.handler = function(place,macroName,params) { var tagCloudWrapper = createTiddlyElement(place,"div",null,"tagCloud",null); var tags = store.getTags(); for (t=0; t<tags.length; t++) { for (p=0;p<params.length; p++) if (tags[t][0] == params[p]) tags[t][0] = ""; } if(tags.length == 0) createTiddlyElement(tagCloudWrapper,"span",null,null,this.noTags); //Findout the maximum number of tags var mostTags = 0; for (t=0; t<tags.length; t++) if (tags[t][0].length > 0){ if (tags[t][1] > mostTags) mostTags = tags[t][1]; } //divide the mostTags into 4 segments for the 4 different tagCloud sizes var tagSegment = mostTags / 4; for (t=0; t<tags.length; t++) if (tags[t][0].length > 0){ var tagCloudElement = createTiddlyElement(tagCloudWrapper,"span",null,null,null); tagCloudWrapper.appendChild(document.createTextNode(" ")); var theTag = createTiddlyButton(tagCloudElement,tags[t][0],this.tooltip.format(tags[t]),onClickTag,"tagCloudtag tagCloud" + (Math.round(tags[t][1]/tagSegment)+1)); theTag.setAttribute("tag",tags[t][0]); } }; setStylesheet(".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"); //}}}