* Site opens as repository for me to put plugins I am developing for GmWiki, a wiki intended for ~GMs running D20 and other Role Playing Games\n* Initial Release of CslPlugin\n* Initial Release of OrderedListPlugin\n* Initial Release of ListReversePlugin\n* Initial Release of TiddlyLib\n* Initial Release of DiceRollerPlugin
* Renamed OrderedListPlugin to OrderedListMacro to better reflect purpose.\n* Renamed CslPlugin to CslMacro to better reflect purpose.\n* Renamed DiceRollerPlugin to DiceRollerMacro to better reflect purpose.\n
/***\n|''Name:''|CommentWikifierPlugin |\n|''Version:''|<<getversion commentswikifier >> |\n|''Date:''|<<getversiondate commentswikifier "DD MMM YYYY">> |\n|''Source:''|http://www.legolas.org/gmwiki/dev/gmwikidev.html#CommentWikifierPlugin |\n|''Author:''|[[DevonJones]] |\n|''Type:''|Wikifier Extension |\n|''License:''|BSD |\n|''Requires:''|TiddlyWiki 1.2.32 or higher (tested only on 1.2.36, but should work on 1.2.32)|\n!Description\nAdds support for Comments in the wikifier\n\n!Syntax\n{{{/% comments text %/}}}\n{{{\n/%\nmultiline\ncomment\n%/\n}}}\n\n!Sample Output\n/% comments text %/\n/%\nmultiline\ncomment\n%/\n\n!Known issues\n\n!Notes\n\n!Revision history\nv0.9.0 October 24th 2005 - initial release\n\n!Code\n***/\n\n//{{{\nversion.extensions.commentswikifier = { major: 0, minor: 9, revision: 1, date: new Date(2005, 10, 24) };\n\nconfig.formatters.push({\n name: "commentByBlock",\n match: "/%",\n lookahead: "/%((?:.|\s\sn)*?)%/",\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 w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n});\n//}}}\n
/***\n|''Name:''|CslMacro |\n|''Version:''|<<getversion csl>> |\n|''Date:''|<<getversiondate csl "DD MMM YYYY">> |\n|''Source:''|http://www.legolas.org/gmwiki/dev/gmwikidev.html#CslMacro |\n|''Author:''|[[DevonJones]] |\n|''Type:''|List Macro Extension |\n|''License:''|BSD |\n|''Requires:''|TiddlyWiki 1.2.32 or higher (tested only on 1.2.36, but should work on 1.2.32)|\n!Description\nUses the TiddlyWiki ''list'' macros to generate Comma Seperated Lists of tiddlers instead of html unordered lists.\n\n!Syntax\n* {{{<<csl all>>}}}\n* {{{<<csl orphans>>}}}\n\n!Sample Output\n''Example:'' lists all orphan tiddlers in reverse.\n{{{<<csl orphans>>}}}\n\n<<csl orphans>>\n\n!Known issues\n\n!Notes\n* Is known to work with my ListReversePlugin and Paul Petterson's ListWithTagsPlugin\n\n!Revision history\nv0.9.0 October 19th 2005 - initial release\nv0.9.1 October 20th 2005 - changed name to CslMacro to better reflect purpose.\n\n!Code\n***/\n//{{{\nversion.extensions.csl = { major: 0, minor: 9, revision: 1, date: new Date(2005, 09, 20) };\n\nconfig.macros.csl = {}\n\nconfig.macros.csl.handler = function(place, macroName, params) {\n var type = params[0] ? params[0] : "all";\n var list = config.macros["list"];\n\n /*if(list[type].prompt) {\n createTiddlyElement(place, "span", null, "listTitle", list[type].prompt);\n }*/\n var results;\n if(list[type].handler) {\n results = list[type].handler(params);\n }\n for(t = 0; t < results.length; t++) {\n if(typeof results[t] == "string") {\n createTiddlyLink(place,results[t],true);\n }\n else {\n createTiddlyLink(place, results[t].title, true);\n }\n if(t < results.length - 1) {\n var element = createTiddlyElement(place, "span", null, null, ", ");\n }\n }\n}\n\n//}}}
Name changed to CslMacro
GmWikiDev GmWikiPlugins [[20 October 2005]] [[19 October 2005]]
/***\n|''Name:''|DiceRollerMacro |\n|''Version:''|<<getversion roll>> |\n|''Date:''|<<getversiondate roll "DD MMM YYYY">> |\n|''Source:''|http://www.legolas.org/gmwiki/dev/gmwikidev.html#DiceRollerMacro |\n|''Author:''|[[DevonJones]] |\n|''Type:''|Macro |\n|''License:''|BSD |\n|''Requires:''|TiddlyWiki 1.2.32 or higher (tested only on 1.2.36, but should work on 1.2.32), TiddlyLib|\n!Description\nAllows the inline rolling of dice.\n\n!Syntax\n* {{{<<roll [Dice Expression] [Name]>>}}}\n* Dice Expression can be in 3 forms:\n** Die form: {{{<<roll 1d20>>}}} where the die can get fairly complicated 1d6, 3d4, 1d5+1d4-6, (1d6)d6+5, 3dF (Fudge dice), (1d6)dF all work\n** {{{<<roll +5>>}}} where the + or - is added to 1d20. Used for the D20 system\n** {{{<<roll DC20>>}}} where DC# is considered to be a Roll to target on 1d20. Returns how much it was made or missed by (-5 means it was missed by 5, +3 means it succeeded by 3)\n* Name is what is printed in the tiddler in place of the macro. Defaults to the Dice Expression.\n\n!Sample Output\n''Example:'' lists all orphan tiddlers in reverse.\n{{{<<roll 1d20>>}}}\n<<roll 1d20>>\n\n{{{<<roll 1dF >>}}}\n<<roll 1dF >>\n\n{{{<<roll (1d6)dF >>}}}\n<<roll (1d6)dF >>\n\n!Known issues\n\n!Notes\n\n!Revision history\nv0.9.0 October 19th 2005 - initial release\nv0.9.1 October 20th 2005 - changed name to DiceRollerMacro to better reflect purpose.\nv0.9.2 October 25th 2005 - Added Fudge dice.\n\n!Code\n***/\n//{{{\n\nversion.extensions.roll = { major: 0, minor: 9, revision: 2, date: new Date(2005, 09, 20) };\n\nconfig.macros.roll = {};\n\nconfig.macros.roll.onClick = function(e) {\n if (!e) {\n var e = window.event;\n }\n var button = this;\n var title = button.title;\n exp = title.substr(6);\n result = rollExpression(exp);\n \n var rollbox = button.parentNode.lastChild;\n rollbox.style.display = "inherit";\n rollbox.innerHTML = "<B>" + result + "</B>";\n e.returnValue = false;\n}\n\nconfig.macros.roll.handler = function(place, macroName, params) {\n // param 0: text button\n // param 1: tiddler name to display\n // param 2: initial display by default\n var dicestring = params[0];\n var title = params[1];\n var titleExists = params[1] != null;\n if(!titleExists) {\n title = dicestring;\n }\n \n var element = createTiddlyElement(place, "span", null, null, title);\n var btn = createLocalTiddlyButton(element, "*", "Roll: " + dicestring, this.onClick);\n var rollbox = createTiddlyElement(element, "span", null, "rollresult", null);\n rollbox.style.display = "none";\n rollbox.onclick = hideElementEvent;\n var parentTiddler = getParentTiddler(place);\n parentTiddler.ondblclick = onDblClickTiddlerOverride;\n}\n\nfunction rollExpression(exp) {\n testRe = /^[\s+-]/;\n testRe2 = /^DC/;\n total = 0;\n if(testRe.test(exp)) {\n total = rollCheckExpression(exp)\n }\n else if(testRe2.test(exp)) {\n total = rollDcExpression(exp)\n }\n else {\n total = rollDiceExpression(exp)\n }\n return total;\n}\n\nfunction rollDiceExpression(exp) {\n testRe = /\s(.*\s)/;\n testRe2 = /^\sd+$/;\n testRe3 = /^\sd*[dD][\sdfF]+$/;\n testRe4 = /^\sd*[dD][\sdfF]+[\s+-].*/;\n total = 0;\n if (testRe.test(exp)) {\n execRe = /\s((.*)\s)/;\n var ret = execRe.exec(exp);\n center = rollDiceExpression(ret[1]);\n replaceRe = /(\s(.*\s))/;\n total = rollDiceExpression(exp.replace(replaceRe, center));\n }\n else if (testRe2.test(exp)) {\n total = parseInt(exp);\n }\n else if (testRe3.test(exp)) {\n execRe = /(\sd*)[dD]([\sdfF]+)/;\n var ret = execRe.exec(exp);\n num = ret[1];\n die = ret[2];\n\n if(num == "") {\n num = 1;\n }\n if(die == "f" || die == "F") {\n total = rollDiceFudge(parseInt(num));\n }\n else {\n total = rollDice(parseInt(num), parseInt(die));\n }\n }\n else if (testRe4.test(exp)) {\n execRe = /(\sd*)[dD]([\sdfF]+)([\s+-])(.*)/;\n var ret = execRe.exec(exp);\n num = ret[1];\n die = ret[2];\n sign = ret[3];\n subexp = ret[4];\n\n if(num == "") {\n num = 1;\n }\n if(die == "f" || die == "F") {\n dieRoll = rollDiceFudge(parseInt(num));\n }\n else {\n dieRoll = rollDice(parseInt(num), parseInt(die));\n }\n dieRoll2 = rollDiceExpression(subexp);\n if (sign == "-") {\n total = dieRoll - dieRoll2;\n }\n else if (sign == "+") {\n total = dieRoll + dieRoll2;\n }\n }\n return total;\n}\n\nfunction rollDcExpression(exp) {\n return rollDcExpression(exp, 0);\n}\n\nfunction rollDcExpression(exp, plus) {\n total = 0;\n if(!plus) {\n plus = 0;\n }\n testRe = /[Dd][Cc]\sd+$/;\n if(testRe.test(exp)) {\n execRe = /[Dd][Cc](\sd+)$/;\n var ret = execRe.exec(exp);\n dc = parseInt(ret[1]);\n roll = rollDice(1,20);\n total = roll + plus - dc;\n }\n return total;\n}\n\nfunction rollCheckExpression(exp) {\n testRe = /^[\s+-]\sd+$/;\n if(testRe.test(exp)) {\n execRe = /^([\s+-])(\sd+)$/;\n var ret = execRe.exec(exp);\n sign = ret[1];\n num = parseInt(ret[2]);\n roll = rollDice(1,20);\n if (sign == "-") {\n total = roll - num;\n }\n else if (sign == "+") {\n total = roll + num;\n }\n }\n return total;\n}\n\nfunction rollDice(number, size) {\n total = 0;\n for(i = 0; i < number; i++) {\n roll = Math.floor((size) * Math.random()) + 1;\n total += roll;\n }\n return total;\n}\n\nfunction rollDiceFudge(number) {\n total = 0;\n for(i = 0; i < number; i++) {\n roll = Math.floor((3) * Math.random()) - 1;\n total += roll;\n }\n return total;\n}\n\n//}}}
Name changed to DiceRollerMacro
!General Formatting\n| {{{''Bold''}}} | ''Bold'' |\n| {{{==Strike==}}} | ==Strike== |\n| {{{__Underline__}}} | __Underline__ |\n| {{{//Italic//}}} | //Italic// |\n| {{{2^^3^^=8}}} | 2^^3^^=8 |\n| {{{a~~ij~~ = -a~~ji~~}}} | a~~ij~~ = -a~~ji~~ |\n| {{{@@highlight@@}}} | @@highlight@@ |\n| {{{@@color(green):green colored@@}}} | @@color(green):green colored@@ |\n| {{{@@bgcolor(#ff0000):color(#ffffff):red colored@@}}} | @@bgcolor(#ff0000):color(#ffffff):red colored@@ |\n| {{{ {{{Monospaced text}}} }}} | {{{Monospaced text}}} |\n| {{{WikiWordLink}}} | WikiWordLink |\n| {{{[[non wiki word link]]}}} | [[non wiki word link]] |\n| {{{[[aliased link|FormattingInstructions]]}}} | [[aliased link|FormattingInstructions]] |\n| {{{~WikiWord non-link}}} | ~WikiWord non-link |\n| {{{[[external link|http://www.osmosoft.com]]}}} | [[external link|http://www.osmosoft.com]] |\n| {{{}}} | |\n\n!Lists\n!!Unordered List\n{{{\n* Just add an asterisk\n* at the beginning of a line.\n** If you want to create sub-bullets\n** start the line with two asterisks\n*** And if you want yet another level\n*** use three asterisks\n* Edit this tiddler to see how it's done\n* You can also do NumberedBulletPoints\n}}}\n* Just add an asterisk\n* at the beginning of a line.\n** If you want to create sub-bullets\n** start the line with two asterisks\n*** And if you want yet another level\n*** use three asterisks\n* Edit this tiddler to see how it's done\n* You can also do NumberedBulletPoints\n\n!!Ordered List\n{{{\n# Use a single '#' at the start of each line\n# and the tiddler will automatically\n# start numbering your list.\n## If you want a sub-list\n## within any bullets\n## add two '#'s at the start of the lines.\n# When you go back to a single '#'\n# the main numbered list will start up\n# where it left off. \n}}}\n# Use a single '#' at the start of each line\n# and the tiddler will automatically\n# start numbering your list.\n## If you want a sub-list\n## within any bullets\n## add two '#'s at the start of the lines.\n# When you go back to a single '#'\n# the main numbered list will start up\n# where it left off. \n\n!!Block Quote\n{{{\n>level 1\n>level 1\n>>level 2\n>>level 2\n>>>level 3\n>>>level 3\n>>level 2\n>level 1\n}}}\n>level 1\n>level 1\n>>level 2\n>>level 2\n>>>level 3\n>>>level 3\n>>level 2\n>level 1\n\n{{{\nJeremyRuston said:\n<<<\nA TiddlyWiki is like a blog because it's divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole.\n<<<\n}}}\nJeremyRuston said:\n<<<\nA TiddlyWiki is like a blog because it's divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole.\n<<<\n\n!Tables\n{{{\n|!th1111111111|!th2222222222|\n|>| colspan |\n| rowspan |left|\n|~| right|\n|bgcolor(#a0ffa0):colored| center |\n|caption|c\n}}}\n|!th1111111111|!th2222222222|\n|>| colspan |\n| rowspan |left|\n|~| right|\n|bgcolor(#a0ffa0):colored| center |\n|caption|c\n\n!Headers\n{{{!Header 1}}}\n{{{!!Header 2}}}\n{{{!!!Header 3}}}\n{{{!!!!Header 4}}}\n{{{!!!!!Header 5}}}\n!Header 1\n!!Header 2\n!!!Header 3\n!!!!Header 4\n!!!!!Header 5\n\n!Monospaced Blocks\n{{{\nvar posTop = findPosY(e);\nvar posBot = posTop + e.offsetHeight;\nvar winTop = findScrollY();\nvar winHeight = findWindowHeight();\nvar winBot = winTop + winHeight;\nif(posTop < winTop)\nreturn(posTop);\nelse if(posBot > winBot)\n{\nif(e.offsetHeight < winHeight)\nreturn(posTop - (winHeight - e.offsetHeight));\nelse\nreturn(posTop);\n}\nelse\nreturn(winTop);\n}}}\n
GmWikiDev is the repository for plugins and macros created for GmWiki. GmWiki is a ~TiddlyWiki created to help ~GMs run Role Playing Games (With a concentration on games using the D20 system).
<<olist withTags GmWikiPlugin>>
/***\n|''Name:''|ListReversePlugin |\n|''Version:''|0.9.0 |\n|''Source:''|http://www.legolas.org/gmwiki/dev/gmwikidev.html#ListReversePlugin |\n|''Author:''|[[DevonJones]] |\n|''Type:''|List Macro Extension |\n|''License:''|BSD |\n|''Requires:''|TiddlyWiki 1.2.32 or higher (tested only on 1.2.36, but should work on 1.2.32)|\n!Description\nExtends the TiddlyWiki ''list'' macro by adding the capability to reverse the order of any other list macro.\n\n!Syntax\n* {{{<<list reverse all>>}}}\n* {{{<<list reverse orphans>>}}}\n\n!Sample Output\n''Example:'' lists all orphan tiddlers in reverse.\n{{{<<list reverse orphans>>}}}\n<<list reverse orphans>>\n\n!Known issues\n\n!Notes\n* Is known to work with my CslPlugin and Paul Petterson's ListWithTagsPlugin\n\n!Revision history\nv0.9.0 October 19th 2005 - initial release\n\n!Code\n***/\n//{{{\n\nconfig.macros.list.reverse = {}\n\nconfig.macros.list.reverse.handler = function(params) {\n var list = config.macros["list"];\n params.shift();\n var type = params[0] ? params[0] : "all";\n results = list[type].handler(params);\n results = results.sort( function(a,b) {\n if(a["title"] != null) {\n return ( a["title"] < b["title"] ) - (a["title"] > b["title"] )\n }\n else {\n return (a < b) - (a > b);\n }\n });\n return results;\n}\n\n//}}}
/***\n|''Name:''|ListWithTagsPlugin |\n|''Version:''|1.0.1 |\n|''Source:''|http://thePettersons.org/tiddlywiki.html#ListWithTagsPlugin |\n|''Author:''|[[Paul Petterson]] |\n|''Type:''|List Macro Extension |\n|''Requires:''|TiddlyWiki 1.2.32 or higher |\n!Description\nExtends 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.\n\n!Syntax\n* {{{<<list withTags Projects and Todo and not done>>}}}\n* {{{<<list withTags Tasks and (Urgent or Important)>>}}}\n\n!Sample Output\n''Example:'' lists all systemTiddlers that aren't also tagged with system (tests shorter/longer bug) and aren't also tagged with a big ugly non-existant tag. - so it should list systemTiddlers only!\n{{{<<list withTags systemTiddlers and not OIJDSFOIJSDFOIJSDFOIJSDF and not system>>}}}\n<<list withTags systemTiddlers and not OIJDSFOIJSDFOIJSDFOIJSDF and not system>>\n\n!Known issues\n\n!Notes\n\n!Revision history\nv0.7 first accidental public release (no comment block on that one)\nv0.7.5 fixed some bugs relating to non-existant tags throwing exceptions (simple comment block)\nv0.8 first public release (on purpose!)\nv1.0 October 11th, 2005 - Fixed all known bugs!\n<<<\n''Fixed:''\n* If a tag used in the expression doesn't exist (no tiddlers have that tag) then nothing will get listed.\n* If a tag //contains// another tag, then using the shorter tag will list results from the shorter and longer tags. For example if you have the tags ''test'' and ''testing'' and use ''test'' in an expression it will match tiddlers with both ''test'' and ''testing'' tags.\n* {{{<<list withTags not systemConfig>>}}} doesn't work but {{{<<list withTags !systemConfig>>}}} does.\n<<<\nv1.0.1 October 12th 2005 - fixed bugs with single char tags, and tags with symbols in them showing up as non-existant tags.\n\n!Code\n***/\n//{{{\nconfig.macros.list.withTags = {}\nconfig.macros.list.withTags.handler = function(params)\n{\n var results = [];\n if ( !params || !params[1] )\n return config.macros.list.all.handler(params);\n \n // build us a regex of all our 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 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 us string such that an expression that looks like this:\n // tag1 AND tag2 OR NOT tag3\n // turns into :\n // /tag1/.test(...) && /tag2/.test(...) || ! /tag2/.test(...)\n var cond = params.slice(1).join(" ");\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 // this way we shortcut the test - if the tag doesn't exist then /tag/.test(...) will always return false.\n\n // v1.0.1 bugfix - old regexp /[^\s/\s.\sw(]([\sw]+)/g was broken cause it only matched letters in WikiWords \n // they can have symbols too - not to mention single letter tags...\n cond = cond.replace( /(\ss|^)+[^\s/\s|&!\s(\s)][^\ss]*/g, "false" ) ;\n\n // look through the tiddlers, make a string of the tags in the tiddler\n // and eval the 'cond' string we made against that string - \n // if it's TRUE then the tiddler qualifies!\n \n for( var t in store.tiddlers ) {\n var tiddler = store.tiddlers[t];\n var tiddlerTags = (tiddler.tags?tiddler.tags.join("|"):"")+"|" ;\n try {\n if ( eval( cond ) ) results.push( tiddler );\n } catch( e ) {\n//displayMessage( "Exception = '" + e + "'" ) ;\n }\n }\n results.sort(function (a,b) {\n if(a["title"] == b["title"]) return(0); \n else return (a["title"] < b["title"]) ? -1 : +1; \n });\n return results;\n}\n//}}}
\nGmWikiDev\nGmWikiPlugins\n[[RSS|RssFeed]]\n\n© [[osmosoft|http://www.osmosoft.com]] 2005\n© [[Devon Jones|http://www.evilsoft.org]] 2005\n\n\n<<newTiddler>>\n<<newJournal "DD MMM YYYY">>
/***\n|''Name:''|OrderedListMacro |\n|''Version:''|<<getversion olist>> |\n|''Date:''|<<getversiondate olist "DD MMM YYYY">> |\n|''Source:''|http://www.legolas.org/gmwiki/dev/gmwikidev.html#OrderedListMacro |\n|''Author:''|[[DevonJones]] |\n|''Type:''|List Macro Extension |\n|''License:''|BSD |\n|''Requires:''|TiddlyWiki 1.2.32 or higher (tested only on 1.2.36, but should work on 1.2.32)|\n!Description\nUses the TiddlyWiki ''list'' macros to generate an Ordered (Numbered) List instead of an unordered list.\n\n!Syntax\n* {{{<<olist all>>}}}\n* {{{<<olist orphans>>}}}\n\n!Sample Output\n''Example:'' lists all orphan tiddlers in reverse.\n{{{<<olist orphans>>}}}\n\n<<olist orphans>>\n\n!Known issues\n\n!Notes\n* Is known to work with my ListReversePlugin and Paul Petterson's ListWithTagsPlugin\n\n!Revision history\nv0.9.0 October 19th 2005 - initial release\nv0.9.1 October 20th 2005 - changed name to OrderedListMacro to better reflect purpose.\n\n!Code\n***/\n//{{{\n\nversion.extensions.olist = { major: 0, minor: 9, revision: 1, date: new Date(2005, 09, 20) };\n\nconfig.macros.olist = {}\n\nconfig.macros.olist.handler = function(place,macroName,params) {\n var type = params[0] ? params[0] : "all";\n var list = config.macros["list"];\n var theList = document.createElement("ol");\n if(list[type].prompt) {\n createTiddlyElement(place, "span", null, "listTitle", list[type].prompt);\n }\n place.appendChild(theList);\n var results;\n if(list[type].handler) {\n results = list[type].handler(params);\n }\n for (t = 0; t < results.length; t++) {\n theListItem = document.createElement("li")\n theList.appendChild(theListItem);\n if(typeof results[t] == "string") {\n createTiddlyLink(theListItem, results[t], true);\n }\n else {\n createTiddlyLink(theListItem, results[t].title, true);\n }\n }\n}\n\n//}}}\n
Name changed to OrderedListMacro
Development site for GmWiki plugins
GmWikiDev
http://www.legolas.org/gmwiki/dev/gmwikidev.html
/***\n|''Name:''|TiddlyLib |\n|''Version:''|0.9.0 |\n|''Source:''|http://www.legolas.org/gmwiki/dev/gmwikidev.html#TiddlyLib |\n|''Author:''|[[DevonJones]] |\n|''Type:''|Library |\n|''License:''|BSD |\n|''Requires:''|TiddlyWiki 1.2.32 or higher (tested only on 1.2.36, but should work on 1.2.32)|\n!Description\nLibrary of useful TiddlyWiki functions\n\n!Syntax\n\n!Known issues\n\n!Notes\n\n!Revision history\nv0.9.0 October 19th 2005 - initial release\n\n!Documentation\n!!createLocalTiddlyButton\n''Description:''\nCreates a tiddly button, but with out the href of "#". Thus when you click on the button, it doesn't cause the browser to jump.\n\n''Arguments:''\n* theParent: \n* theText: \n* theTooltip: \n* theAction: \n* theClass: \n* theId: \n* theAccessKey: \n\n!!onDblClickTiddlerOverride\n''Description:''\nEvent handler that can be used to override a tiddler's onDblClick. Used to prevent entering edit mode if a user clicks to fast on a link or button.\n\n''Arguments:''\n* e: (Event) Event to handle\n\n!!getParentTiddler\n''Description:''\nReturns the DOMElement of the tiddler that //elem// is a child of\n\n''Arguments:''\n* elem: (DOMElement) Element to find parent of\n\n!!hideElementEvent\n''Description:''\nEvent that can be attached to a block level element. Firing this even hides the element\n\n''Arguments:''\n* e: (Event) Event to handle\n\n!!showElementEvent\n''Description:''\nEvent that can be attached to a block level element. Firing this even unhides the element\n\n''Arguments:''\n* e: (Event) Event to handle\n\n!Code\n***/\n//{{{\n\nfunction createLocalTiddlyButton(theParent,theText,theTooltip,theAction,theClass,theId,theAccessKey) {\n var theButton = document.createElement("a");\n theButton.className = "button";\n if(theAction) {\n theButton.onclick = theAction;\n }\n theButton.setAttribute("title",theTooltip);\n if(theText) {\n theButton.appendChild(document.createTextNode(theText));\n }\n if(theClass) {\n theButton.className = theClass;\n }\n if(theId) {\n theButton.id = theId;\n }\n if(theParent) {\n theParent.appendChild(theButton);\n }\n if(theAccessKey) {\n theButton.setAttribute("accessKey",theAccessKey);\n }\n return(theButton);\n}\n\n\nfunction onDblClickTiddlerOverride(e) {\n if (!e) {\n var e = window.event;\n }\n \n var theTarget = resolveTarget(e);\n if(!readOnly && theTarget && theTarget.nodeName.toLowerCase() != "input" && theTarget.nodeName.toLowerCase() != "textarea" && theTarget.nodeName.toLowerCase() != "a") {\n clearMessage();\n if(document.selection && document.selection.empty) {\n document.selection.empty();\n }\n var tiddler;\n if(this.id.substr(0,7) == "tiddler") {\n tiddler = this.id.substr(7);\n }\n if(tiddler) {\n displayTiddler(null,tiddler,2,null,null,false,false);\n }\n return true;\n }\n else {\n return false;\n }\n}\n\nfunction getParentTiddler(elem) {\n var testPlace = elem;\n while(testPlace.id.substr(0,7) != "tiddler") {\n testPlace = testPlace.parentNode;\n }\n return testPlace;\n}\n\nfunction hideElementEvent(e) {\n this.style.display = "none";\n}\n\nfunction showElementEvent(e) {\n this.style.display = "block";\n}\n\n\n//}}}
config.macros.getversion = {}\nconfig.macros.getversion.handler = function(place,macroName,params)\n{\nvar versionData = version.extensions[params].major + "." + version.extensions[params].minor + "." + version.extensions[params].revision;\ncreateTiddlyElement(place,"span",null,null,versionData);\n}\n\nconfig.macros.getversiondate = {}\nconfig.macros.getversiondate.handler = function(place,macroName,params)\n{\nvar versionDate = version.extensions[params[0]].date.formatString(params[1].trim());\ncreateTiddlyElement(place,"span",null,null,versionDate);\n}\n