Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
Welcome to Kodeexii.Net. I recently chanced upon an interesting piece of software called TiddlyWiki from [[Scott Hanselman's web site|http://hanselman.com]]. I figured, maybe I could use TiddlyWiki to manage my website's main page. So, allow me some time to fiddle around with this thing. This front page will certainly look similar to the default TiddlyWiki layout at first. This is until I have mastered how to modify things. Oh well...
So, in the meantime, if you're here for my [[Technology, Sports and Whatever blog|http://kodeexii.net/blog]] or [[PicasaWeb Photo Album|http://picasaweb.google.com/kodeexii]] just follow the respective links provided and enjoy your time here.
My blog is currently powered by [[Wordpress]]. If this is what you're actually looking for, then head on over [[here|http://kodeexii.net/blog]]. I've also got entries posted at my [[Blogger]] site. I will one day port those over into my [[Wordpress]] installation.
If you're here in search of my collection of Photos, then move your mouse over to:
*My Album: [[The Galleries|http://picasaweb.google.com/kodeexii]]
These photo galleries were created using [[Google's Picasa|http://picasa.google.com/index.html]]
Oh yeah, if you would like to learn more about TiddlyWiki, there's a tutorial over at TiddlyWikiTutorial.
[>img[images/phins.logo.80x90.gif]]The Dolphins helped create history today. They helped the Patriots become the first team in the NFL to reach 15-0. Yes, the Phins lost again today. They lost to perhaps the best performing team in the NFL this season.
The Patriots also broke another record in the game. The long held record of 1984 Dolphins. The Patriots have scored 71TDs this season. The 1984 Dolphins held it at 70 TDs. Patriots' QB, T.Brady is also now tied with the Dan Marino(Phins 1984) for NFL's 2nd best all time in total TD for a season at 48 TDs.
The Dolphins could not continue their winning form (of just one match). They were playing second fiddle through out the entire match. The Patriots, true to their current form, scored in their first drive in the first quarter. They scored three more TDs in the second quarter. The Phins' only TD came late in the third quarter. Quarterback C.Lemmon connected with G.Camarillo for their sole TD of the match.
[img[images/nfl.phins.patriots.400x73.jpg]]
Well, I think it's somewhat expected I guess. This loss, I mean. We've got the worst performing team (1-13) playing against perhaps the best performing team (15-0). I'd say the Phins are lucky they were not totally trashed by the Patriots. The fourth quarter was pretty drag. Should the Patriots had gone out with all guns blazing through the entire match, I'd say the scoreline would be very different. The Patriots probably put their foot off the pedal in the second half of the game. They were leading by 4 TDs then.
By the time the Dolphins managed to get their TD, the match winner was already decided. It was already very late in the 3rd quarter. By the way the Phins were playing, scoring 3 more TD in the 4th would truly require a miracle of epic proportion. Here's a look at the Phins' sole TD.
[img[images/nfl.phins.patriots.phinstd.jpg]]
Here's how the AFC East stands as of today
|!Team|!W|!L|!T|!Win %|
|New England|14|0|0|1.000|
|bgcolor(#a0ffa0):Buffalo|bgcolor(#a0ffa0):7|bgcolor(#a0ffa0):8|bgcolor(#a0ffa0):0|bgcolor(#a0ffa0):.467|
|New York Jets|3|11|0|.214|
|bgcolor(#a0ffa0):Miami|bgcolor(#a0ffa0):1|bgcolor(#a0ffa0):13|bgcolor(#a0ffa0):0|bgcolor(#a0ffa0):.071|
For more [[official news and highlights of the match|http://www.nfl.com/gamecenter?season=2007&week=REG16&game_id=29428]], head on over to the Official NFL site. [[Official NFL news of the Dolphins|http://www.nfl.com/teams/profile?team=MIA]] are also available at the NFL's team profiles. Images in this post is taken from the [[NFL's Official Site|http://www.nfl.com/]].
Yet another Kemaman trip with a beach photo album in PicasaWeb. It's the Aidiladha holiday plus weekend. Since it's a somewhat long weekend (Thursday - Sunday), we (the entire family - me, parents, and sis) decided to take a trip to the east coast and pay our youngest a visit.
[>img[images/kemaman.200712.269x178.jpg]]Sis started the trip first, as we had to make a stop over at Mak Teh's house in Wardieburn. We ended up leaving Klang Valley at around 3PM. I made a mistake in gobbling up a ton of food at Mak Teh's. As a result, I was a tad drowsy through the entire journey. I ended up stopping at an R&R every hour and a half just to take a refresher or so. A normally 3 hour drive took me like 4 hour plus this time around - the result of all the stops and safe driving (i was probably going only at about 90-100 km/h .. hahahaha).
[<img[http://lh4.google.com/kodeexii/R25770oCupI/AAAAAAAADtQ/LvDvgFmwvwU/s144/PC233303.JPG]]As usual, them beloved little ones are taken to the beach. This time around, instead of the usual Cherating outing, we were taken to Chendor Beach. It's probably not as famous as Cherating, however, this makes it somewhat less crowded - I like. The little ones, they had a whale of a time. Even Luqman joined in the fun in the water.
I also got a shot at photographing a fisherman at work (I think). I do believe that particular shot of the fisherman with the sunset background is spectacular (for my standard, at least). The funny thing about this fisherman, [[he throws the net|http://lh4.google.com/kodeexii/R258X0oCuyI/AAAAAAAADuc/6szLtEHYmRc/s144/PC233315.JPG]], reels it back in, releases all the catch by the beach and continues fishing. It's like he is netting them fishes not for himself, but for the public.
Yes, them photos have already been uploaded into my [[PicasaWeb Album|http://picasaweb.google.com/kodeexii/Kemaman200712]] (where else?). Just head on over there and enjoy my so and so wonderful shoots.
BOSE LifeStyle 48 Series III DVD Home Entertainment System (Black)
[[Bose Lifestyle Series III | http://kodeexii.net/products/bose-lifestyle-48-series-iii/]] home entertainment systems now feature a new horizontal center channel speaker that effectively locks dialogue on screen and complements today's flat panel televisions. The innovative Acoustimass module continues to reproduce resonant low notes for dramatic impact.
This serves as a backup of sort to my blogs
/***
| Name|CloseOnCancelPlugin|
| Description|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.commands.cancelTiddler,{
handler_orig_closeUnsaved: config.commands.cancelTiddler.handler,
handler: function(event,src,title) {
this.handler_orig_closeUnsaved(event,src,title);
if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))
story.closeTiddler(title,true);
return false;
}
});
//}}}
Name: Blue
Background: #fff
Foreground: #000
PrimaryPale: #cdf
PrimaryLight: #57c
PrimaryMid: #114
PrimaryDark: #012
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
//{{{
config.options.chkHttpReadOnly = false; // means web visitors can experiment with your site by clicking edit
config.options.chkInsertTabs = true; // tab inserts a tab when editing a tiddler
config.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist
config.views.editor.defaultText = ""; // don't need message when creating a new tiddler
//}}}
function onClickDefaultHome(e) {
story.closeAllTiddlers();
config.options.txtDefaultTiddlers = "";
saveOptionCookie('txtDefaultTiddlers');
var start = store.getTiddlerText("DefaultTiddlers");
if(start)
story.displayTiddlers(null,start.readBracketedList());
}
config.macros["defaultHome"] = {label: "Home", prompt: "Show the default tiddlers", title: "Home"};
config.macros.defaultHome.handler = function(place) {
createTiddlyButton(place,this.label,this.prompt,onClickDefaultHome);
}
If you would like to download an "empty" TiddlyWiki file that contains all of the formatting and Plugins necessary to provide the same look and function of this site, right-click on the following link:
http://tiddlywikitips.com/tiddlywikitips_empty.html
and select "Save link as..." in Firefox or "Save target as..." in Internet Explorer
Note: Do not just click on the link to load it and save it from your browser, because the resulting file will not work properly!
It's a topsy turvy kind of a week in the EPL. Arsenal and Manchester United are battling fiercely for the top spot in the table. The league sees the top two leader switch places twice in the week.
Wednesday's result puts Manchester United on top of the table. They continued their superb performance to [[trounce Sunderland|http://www.premierleague.com/page/MatchReports/0,,12306~38745,00.html]] with four goals. Rooney, Saha (2), and Ronaldo scored for United. Portsmouth, in another match, brilliantly managed to [[prevent Arsenal from scoring|http://www.premierleague.com/page/MatchReports/0,,12306~38744,00.html]] for the first time in the league. The match ended in a 0 - 0 draw. Chelsea suffered another setback in their chase for the title. Their match against Aston Villa saw three red cards handed out to Ricardo Carvalho and Ashley Cole from the Blues and Zat Knight from Villa. Despite the cards, the [[game ended in a 4 - 4 draw|http://www.premierleague.com/page/MatchReports/0,,12306~38740,00.html]]. [[Tottenham dished out an outstanding performance against Fulham|http://www.premierleague.com/page/MatchReports/0,,12306~38746,00.html]]. They routed Fulham 5 - 1 at White Hart Lane. Keane, Huddlestone, and Defoe got on the scoring sheets for Tottenham. Keane and Huddlestone, both scoring a brace each.
The rest of the Wednesday match results and reviews can be found at the EPL's web site.
Saturday sprang about a surprise result to the fans of Manchester United. [[United suffered another loss|http://www.premierleague.com/page/MatchReports/0,,12306~38802,00.html]], their third away from home. West Ham United, continues their charming run against Manchester United. The Hammers pulled off a sterling performance to humble United with a 2 - 1 win at home. They came back from a one goal deficit in the second half with goals from Ferdinand and Upson (his first ever goal for the Hammers). Ronaldo scored United's first goal in the first half. He also, uncharacteristically, missed from the penalty spot.
Arsenal, had to [[come back from one goal down|http://www.premierleague.com/page/MatchReports/0,,12306~38797,00.html]] in the second half to bring down Everton with a sound 1 - 4 win. Tim Cahill put Everton ahead in the first half. Eduardo scored the equalizer and the go ahead goal after the breather. Adebayor and Rosicky also got into the score sheets late in the game. Everton's Arteta and Gunners' Bendtner was given the marching orders in two separate incidents.
[[Tottenham and Reading|http://www.premierleague.com/page/MatchReports/0,,12306~38801,00.html]] got into a scoring frenzy. Their match ended with 10 goals, Spurs taking full points with a spectacular 6 - 4 result. The first half ended 1 - 1. Spurs scoring early when Berbatov tapped in a pass from Keane. Reading equalized through Cisse later in the half. The second half saw both teams squaring off with each other. Spurs, trailing Reading for the most part of the half up till when they were tied at 4 - 4.
Ingimarsson put Reading ahead 1 - 2 from a corner set piece. Berbatov made it 2 -2 when Reading defense failed to clear a goal mouth confusion. Kitson, once again brought Reading one up off another corner set piece. Berbatov, then got his hatrick to level the score once again. Next, it was Kitson's time to get his hatrick when he, again, scored to bring Reading in front. Malbrunque followed suit to level things back up once again with a superb curling shot that ended in the top right hand corner.
Keane was then presented with a spot kick when he was brought down in the area. Reading's Hahnemann saved the spot kick only to see Defoe head the rebound into the open net to bring Spurs one up to lead. Berbatov, then hammered in his fourth to ensure Tottenham's win over Reading.
Catch up on the [[rest of the results and reviews|http://www.premierleague.com/page/Headlines/0,,12306~1202020,00.html]] of Saturday's matches over at the EPL site.
What's happening in my part of the world.
/***
| Name:|ExtentTagButtonPlugin|
| Description:|Adds a New tiddler button in the tag drop down|
| Version:|3.0.1 ($Rev: 2263 $)|
| Date:|$Date: 2007-06-13 04:22:32 +1000 (Wed, 13 Jun 2007) $|
| Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
// can't hijack a click handler. must redefine this entirely.
// would be good to refactor in the core...
// this version copied from 2.1.3 core
// Event handler for clicking on a tiddler tag
function onClickTag(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
var popup = Popup.create(this);
var tag = this.getAttribute("tag");
var title = this.getAttribute("tiddler");
if(popup && tag)
{
var tagged = store.getTaggedTiddlers(tag);
var titles = [];
var li,r;
for(r=0;r<tagged.length;r++)
if(tagged[r].title != title)
titles.push(tagged[r].title);
var lingo = config.views.wikified.tag;
wikify("<<newTiddler label:'New tiddler' tag:'"+tag+"'>>",createTiddlyElement(popup,"li")); // <---- the only modification
if(titles.length > 0)
{
var openAll = createTiddlyButton(createTiddlyElement(popup,"li"),lingo.openAllText.format([tag]),lingo.openAllTooltip,onClickTagOpenAll);
openAll.setAttribute("tag",tag);
createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
for(r=0; r<titles.length; r++)
{
createTiddlyLink(createTiddlyElement(popup,"li"),titles[r],true);
}
}
else
createTiddlyText(createTiddlyElement(popup,"li",null,"disabled"),lingo.popupNone.format([tag]));
createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
var h = createTiddlyLink(createTiddlyElement(popup,"li"),tag,false);
createTiddlyText(h,lingo.openTag.format([tag]));
}
Popup.show(popup,false);
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return(false);
}
//}}}
Here are some Frequently Asked Questions about TiddlyWiki.
Just click on the link to the left to open the answers!
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
See also MonkeyPirateTiddlyWiki.
/***
| Name|HideWhenPlugin|
| Description|Allows conditional inclusion/exclusion in templates|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://mptw.tiddlyspot.com/#HideWhenPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{
window.removeElementWhen = function(test,place) {
if (test) {
removeChildren(place);
place.parentNode.removeChild(place);
}
};
merge(config.macros,{
hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( eval(paramString), place);
}},
showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !eval(paramString), place);
}},
hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAny(params), place);
}},
showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAny(params), place);
}},
hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);
}},
showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);
}}
});
//}}}
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Version|1.6.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Usage
<<<
When installed, this plugin adds new wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be treated as embedded javascript and executed each time the tiddler is rendered.
''Deferred execution from an 'onClick' link''
By including a {{{label="..."}}} parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered. You may also include a {{{title="..."}}} parameter to specify the 'tooltip' text that will appear whenever the mouse is moved over the onClick link text
''External script source files:''
You can also load javascript from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}). This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins. The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.
''Display script source in tiddler output''
By including the keyword parameter "show", in the initial {{{<script>}}} marker, the plugin will include the script source code in the output that it displays in the tiddler.
''Defining javascript functions and libraries:''
Although the external javascript file is loaded while the tiddler content is being rendered, any functions it defines will not be available for use until //after// the rendering has been completed. Thus, you cannot load a library and //immediately// use it's functions within the same tiddler. However, once that tiddler has been loaded, the library functions can be freely used in any tiddler (even the one in which it was initially loaded).
To ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that will be rendered as soon as your TiddlyWiki document is opened. For example, you could put your {{{<script src="..."></script>}}} syntax into a tiddler called LoadScripts, and then add {{{<<tiddler LoadScripts>>}}} in your MainMenu tiddler.
Since the MainMenu is always rendered immediately upon opening your document, the library will always be loaded before any other tiddlers that rely upon the functions it defines. Loading an external javascript library does not produce any direct output in the tiddler, so these definitions should have no impact on the appearance of your MainMenu.
''Creating dynamic tiddler content''
An important difference between this implementation of embedded scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document:
* In a typical web document, you use the document.write() function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.
* However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and completely replaces the entire ~TiddlyWiki document in your browser window.
* To allow these scripts to work unmodified, the plugin automatically converts all occurences of document.write() so that the output is inserted into the tiddler content instead of replacing the entire ~TiddlyWiki document.
If your script does not use document.write() to create dynamically embedded content within a tiddler, your javascript can, as an alternative, explicitly return a text value that the plugin can then pass through the wikify() rendering engine to insert into the tiddler display. For example, using {{{return "thistext"}}} will produce the same output as {{{document.write("thistext")}}}.
//Note: your script code is automatically 'wrapped' inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler. To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.//
''Accessing the ~TiddlyWiki DOM''
The plugin provides one pre-defined variable, 'place', that is passed in to your javascript code so that it can have direct access to the containing DOM element into which the tiddler output is currently being rendered.
Access to this DOM element allows you to create scripts that can:
* vary their actions based upon the specific location in which they are embedded
* access 'tiddler-relative' information (use findContainingTiddler(place))
* perform direct DOM manipulations (when returning wikified text is not enough)
<<<
!!!!!Examples
<<<
an "alert" message box:
><script show>
alert('InlineJavascriptPlugin: this is a demonstration message');
</script>
dynamic output:
><script show>
return (new Date()).toString();
</script>
wikified dynamic output:
><script show>
return "link to current user: [["+config.options.txtUserName+"]]";
</script>
dynamic output using 'place' to get size information for current tiddler:
><script show>
if (!window.story) window.story=window;
var title=story.findContainingTiddler(place).id.substr(7);
return title+" is using "+store.getTiddlerText(title).length+" bytes";
</script>
creating an 'onclick' button/link that runs a script:
><script label="click here" title="clicking this link will show an 'alert' box" show>
if (!window.story) window.story=window;
alert("Hello World!\nlinktext='"+place.firstChild.data+"'\ntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");
</script>
loading a script from a source url:
>http://www.TiddlyTools.com/demo.js contains:
>>{{{function demo() { alert('this output is from demo(), defined in demo.js') } }}}
>>{{{alert('InlineJavascriptPlugin: demo.js has been loaded'); }}}
><script src="demo.js" show>
return "loading demo.js..."
</script>
><script label="click to execute demo() function" show>
demo()
</script>
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''InlineJavascriptPlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
''2007.02.19 [1.6.0]'' added support for title="..." to specify mouseover tooltip when using an onclick (label="...") script
''2006.10.16 [1.5.2]'' add newline before closing '}' in 'function out_' wrapper. Fixes error caused when last line of script is a comment.
''2006.06.01 [1.5.1]'' when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly
''2006.04.19 [1.5.0]'' added 'show' parameter to force display of javascript source code in tiddler output
''2006.01.05 [1.4.0]'' added support 'onclick' scripts. When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked. 'place' value is set to match the clicked button/link element.
''2005.12.13 [1.3.1]'' when catching eval error in IE, e.description contains the error text, instead of e.toString(). Fixed error reporting so IE shows the correct response text. Based on a suggestion by UdoBorkowski
''2005.11.09 [1.3.0]'' for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content. Based on a suggestion by BradleyMeck
''2005.11.08 [1.2.0]'' handle loading of javascript from an external URL via src="..." syntax
''2005.11.08 [1.1.0]'' pass 'place' param into scripts to provide direct DOM access
''2005.11.08 [1.0.0]'' initial release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
//{{{
version.extensions.inlineJavascript= {major: 1, minor: 6, revision: 0, date: new Date(2007,2,19)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
handler: function(w) {
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
if (lookaheadMatch[1]) { // load a script library
// make script tag, set src, add to body to execute, then remove for cleanup
var script = document.createElement("script"); script.src = lookaheadMatch[1];
document.body.appendChild(script); document.body.removeChild(script);
}
if (lookaheadMatch[5]) { // there is script code
if (lookaheadMatch[4]) // show inline script code in tiddler output
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (lookaheadMatch[2]) { // create a link to an 'onclick' script
// add a link, define click handler, save code in link (pass 'place'), set link attributes
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",lookaheadMatch[2]);
link.onclick=function(){try{return(eval(this.code))}catch(e){alert(e.description?e.description:e.toString())}}
link.code="function _out(place){"+lookaheadMatch[5]+"\n};_out(this);"
link.setAttribute("title",lookaheadMatch[3]?lookaheadMatch[3]:"");
link.setAttribute("href","javascript:;");
link.style.cursor="pointer";
}
else { // run inline script code
var code="function _out(place){"+lookaheadMatch[5]+"\n};_out(w.output);"
code=code.replace(/document.write\(/gi,'place.innerHTML+=(');
try { var out = eval(code); } catch(e) { out = e.description?e.description:e.toString(); }
if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
}
}
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
} )
//}}}
/***
| Name|LessBackupsPlugin|
| Description|Intelligently limit the number of backup files you create|
| Version|3.0 ($Rev: 2320 $)|
| Date|$Date: 2007-06-18 22:37:46 +1000 (Mon, 18 Jun 2007) $|
| Source|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
| Author|Simon Baird|
| Email|simon.baird@gmail.com|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second. So total number won't exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!!Notes
Works in IE and Firefox only. Algorithm by Daniel Baird. IE code by by Saq Imtiaz.
!!!Code
***/
//{{{
window.getSpecialBackupPath = function(backupPath) {
var MINS = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS = 24 * HOURS;
// comment out the ones you don't want
var modes = [
["YYYY", 365*DAYS], // one per year for ever
["MMM", 31*DAYS], // one per month
["ddd", 7*DAYS], // one per weekday
//["d0DD", 1*DAYS], // one per day of month
["h0hh", 24*HOURS], // one per hour
["m0mm", 1*HOURS], // one per minute
["s0ss", 1*MINS], // one per second
["latest",0] // always keep last version. (leave this).
];
var now = new Date();
for (var i=0;i<modes.length;i++) {
// the filename we will try
var specialBackupPath = backupPath.replace(/(\.)([0-9]+\.[0-9]+)(\.html)$/,
'$1'+now.formatString(modes[i][0]).toLowerCase()+'$3')
// open the file
try {
if (config.browser.isIE) {
var fsobject = new ActiveXObject("Scripting.FileSystemObject")
var fileExists = fsobject.FileExists(specialBackupPath);
if (fileExists) {
var fileObject = fsobject.GetFile(specialBackupPath);
var modDate = new Date(fileObject.DateLastModified).valueOf();
}
}
else {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(specialBackupPath);
var fileExists = file.exists();
if (fileExists) {
var modDate = file.lastModifiedTime;
}
}
}
catch(e) {
// give up
return backupPath;
}
// expiry is used to tell if it's an 'old' one. Eg, if the month is June and there is a
// June file on disk that's more than an month old then it must be stale so overwrite
// note that "latest" should be always because the expiration period is zero (see above)
var expiry = new Date(modDate + modes[i][1]);
if (!fileExists || now > expiry)
return specialBackupPath;
}
}
// hijack the core function
window.getBackupPath_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
return getSpecialBackupPath(getBackupPath_orig(localPath));
}
//}}}
Name: Blue
Background: #fff
Foreground: #000
PrimaryPale: #cdf
PrimaryLight: #57c
PrimaryMid: #114
PrimaryDark: #012
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
Name: Green
Background: #fff
Foreground: #000
PrimaryPale: #9b9
PrimaryLight: #385
PrimaryMid: #031
PrimaryDark: #020
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
Name: Red
Background: #fff
Foreground: #000
PrimaryPale: #fdd
PrimaryLight: #c55
PrimaryMid: #711
PrimaryDark: #500
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
Name: Smoke
Background: #fff
Foreground: #000
PrimaryPale: #aaa
PrimaryLight: #777
PrimaryMid: #111
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
Name: Teal
Background: #fff
Foreground: #000
PrimaryPale: #B5D1DF
PrimaryLight: #618FA9
PrimaryMid: #1a3844
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #f8f8f8
TertiaryLight: #bbb
TertiaryMid: #999
TertiaryDark: #888
Error: #f88
The MSL has resumed. After the disappointing outcome from the national team in Korat, the league resumes this last week with midweek and weekend games. Six matches were played in midweek.
Perlis and Kedah went out on a shooting spree it seems. Perlis utilizing their home advantage to great lengths by trashing Pahang 5 - 0. Chepita, Yusri and Nizaruddin slotted home in the first half while Rudie Ramli took two minutes before the end of the match to score both his goals.
Kedah humbled the early season leader. PDRM was soaring at the table top prior to this humbling defeat to Kedah. Hasmawi netting in his hatrick 10 minutes from time. PDRM's consolation came late in the game.
Selangor too remained as one of the unbeaten team currently. They stood firm in enemy territory and came back victorious. The former Perak frontman, Frank Seator, scored a brace. His first in the early minutes after kick-off and his second, very much later in the second half.
Following are the results from the midweek matches:
* Perlis vs Pahang (5 - 0)
* Kedah vs PDRM (4 - 1)
* Sarawak vs Selangor (0 - 2)
* Penang vs Terengganu (1 - 1)
* N.S NAZA vs MyTeam (1 - 1)
* Johor FC vs DPMM FC (0 - 0)
After the weekend matches, three teams remained unbeaten - Selangor, Perlis, and Johor FC. Six more matches were played over the weekend. Both Selangor and Perlis to top the table with inspiring wins over their opponents.
Selangor triumphed over Penang with a 2 -1 win at home. Both teams, despite numerous chances at goal, failed to convert any in the first half. Then, in the 52nd minute, Penang struck a blow to silence the home fans. Their first goal was slotted in by S.Thinagaran from a long range shot. That goal simply spurred Selangor on.
A minute later, the Penang lead was nullified. Selangor's equalizer came when Fadzli Shaari connected with Frank Seator's cross. The winning goal came a few minutes later. Substitute Saffe Ali, who came in for Indra Putra, slotted home in the 65th minute to the delight of the home fans. This win puts Selangor at the top of the table with 10 points.
Last week, Kedah humbled the then league leader PDRM. Yesterday, it was Kedah's turn to be humbled. Kedah went down to Terengganu (3 -1) in Terengganu. It's their first defeat of the season. This lost puts them tied for second place with the likes of Perlis, Terengganu, and N.Sembilan with 7 points. Perlis have a game in hand.
DPMM FC registered their first win. They routed Sarawak 5-0. Sarawak has allowed 15 goals so far. The most in the league at present. They are lying last at the bottom of the table with no wins nor draws to date. I just hope they don't end up like them Dolphins in the NFL this season. The rest of the weekend games are as follows:
*PDRM vs Perlis (2 - 3)
*Terengganu vs Kedah (3 - 1)
*Selangor vs Penang (2 - 1)
*DPMM FC vs Sarawak (5 - 1)
*MyTeam vs Johor FC (2 - 2)
*Perak vs NS NAZA (0 - 1)
Here's how the MSL table stands as of today.
[img[http://kodeexii.net/blog/wp-content/uploads/2007/12/msl0708tabledec24.jpg]]
Will Selangor be able to maintain their current form and lead the table until the end of the season? Perlis is hot on their heels. With a game in hand and a better goal difference, Perlis looks more likely to topple Selangor of the top in the coming weeks.
The season is only 4 match days old. Still plenty of football to go. Go Selangor!!!
<<defaultHome>><<tag Products>><<tag Blog>><<tag Events>><<tag Projects>> [[Download]] [[About]] <<tag Help>> <<tiddler ToggleRightSidebar>>
The [[Marantz PMD660 Solid State Portable Recorder|http://kodeexii.net/products/marantz-pmd660/]] is small enough to fit in the palm of your hand, but it has features that make more expensive, full-sized field recorders green with envy. It can run for hours on just four AA batteries. It records on Compact Flash media cards which you can find in any discount store, and will store more than 36 hours of mono on a single card. If audio quality is your key requirement, you get over an hour of pristine, uncompressed, 16-bit .wav files.
[[MonkeyPirateTiddlyWiki|http://mptw.tiddlyspot.com]] is a distribution of [[TiddlyWiki|http://www.tiddlywiki.com/]] created by Simon Baird. See [[the web site|http://mptw.tiddlyspot.com/]] for more information.
!!Upgrading ~MonkeyPirateTiddlyWiki
This "empty" ~MonkeyPirateTiddlyWiki file comes pre-installed with the core ~MonkeyPirateTiddlyWiki plugins. You can upgrade these core plugins to the latest version by doing the following:
* Click ImportTiddlers
* Click "Choose..." and select "~MptwUpgradeURL"
* Click "fetch"
* Click the checkbox in the first column heading to select all tiddlers
* Click "More actions..." and select "Import these tiddlers"
* Click "OK" to confirm you want to overwrite the tiddlers
* Save and reload
/***
| Name|MptwLayoutPlugin|
| Description|A package containing templates and css for the MonkeyPirateTiddlyWiki layout|
| Version|3.0 ($Rev: 1845 $)|
| Source|http://mptw.tiddlyspot.com/#MptwLayoutPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
Presumes you have TagglyTaggingPlugin installed. To enable this you should have a PageTemplate containing {{{[[MptwPageTemplate]]}}} and similar for ViewTemplate and EditTemplate.
***/
//{{{
// used in MptwViewTemplate
config.mptwDateFormat = 'DD/MM/YY';
config.mptwJournalFormat = 'Journal DD/MM/YY';
//config.mptwDateFormat = 'MM/0DD/YY';
//config.mptwJournalFormat = 'Journal MM/0DD/YY';
config.shadowTiddlers.GettingStarted += "\n\nSee also MonkeyPirateTiddlyWiki.";
//}}}
//{{{
merge(config.shadowTiddlers,{
'MptwEditTemplate':[
"<!--{{{-->",
"<!--- http://mptw.tiddlyspot.com/#MptwEditTemplate ($Rev: 1829 $) --->",
"<div class=\"toolbar\" macro=\"toolbar +saveTiddler saveCloseTiddler closeOthers -cancelTiddler cancelCloseTiddler deleteTiddler\"></div>",
"<div class=\"title\" macro=\"view title\"></div>",
"<div class=\"editLabel\">Title</div><div class=\"editor\" macro=\"edit title\"></div>",
"<div class=\"editLabel\">Tags</div><div class=\"editor\" macro=\"edit tags\"></div>",
"<div class=\"editorFooter\"><span macro=\"message views.editor.tagPrompt\"></span><span macro=\"tagChooser\"></span></div>",
"<div macro=\"showWhenExists EditPanelTemplate\">[[EditPanelTemplate]]</div>",
"<div class=\"editor\" macro=\"edit text\"></div>",
"<!--}}}-->"
].join("\n"),
'MptwPageTemplate':[
"<!--{{{-->",
"<!-- http://mptw.tiddlyspot.com/#MptwPageTemplate ($Rev: 1829 $) -->",
"<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>",
" <div class='headerShadow'>",
" <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> ",
" <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>",
" </div>",
" <div class='headerForeground'>",
" <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span> ",
" <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>",
" </div>",
"</div>",
"<!-- horizontal MainMenu -->",
"<div id='topMenu' refresh='content' tiddler='MainMenu'></div>",
"<!-- original MainMenu menu -->",
"<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->",
"<div id='sidebar'>",
" <div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>",
" <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>",
"</div>",
"<div id='displayArea'>",
" <div id='messageArea'></div>",
" <div id='tiddlerDisplay'></div>",
"</div>",
"<!--}}}-->"
].join("\n"),
'MptwStyleSheet':[
"/*{{{*/",
"/* http://mptw.tiddlyspot.com/#MptwStyleSheet ($Rev: 2246 $) */",
"",
"/* a contrasting background so I can see where one tiddler ends and the other begins */",
"body {",
" background: [[ColorPalette::TertiaryLight]];",
"}",
"",
"/* sexy colours and font for the header */",
".headerForeground {",
" color: [[ColorPalette::PrimaryPale]];",
"}",
".headerShadow, .headerShadow a {",
" color: [[ColorPalette::PrimaryMid]];",
"}",
"",
"/* separate the top menu parts */",
".headerForeground, .headerShadow {",
" padding: 1em 1em 0;",
"}",
"",
".headerForeground, .headerShadow {",
" font-family: 'Trebuchet MS' sans-serif;",
" font-weight:bold;",
"}",
".headerForeground .siteSubtitle {",
" color: [[ColorPalette::PrimaryLight]];",
"}",
".headerShadow .siteSubtitle {",
" color: [[ColorPalette::PrimaryMid]];",
"}",
"",
"/* make shadow go and down right instead of up and left */",
".headerShadow {",
" left: 1px;",
" top: 1px;",
"}",
"",
"/* prefer monospace for editing */",
".editor textarea {",
" font-family: 'Consolas' monospace;",
"}",
"",
"/* sexy tiddler titles */",
".title {",
" font-size: 250%;",
" color: [[ColorPalette::PrimaryLight]];",
" font-family: 'Trebuchet MS' sans-serif;",
"}",
"",
"/* more subtle tiddler subtitle */",
".subtitle {",
" padding:0px;",
" margin:0px;",
" padding-left:0.5em;",
" font-size: 90%;",
" color: [[ColorPalette::TertiaryMid]];",
"}",
".subtitle .tiddlyLink {",
" color: [[ColorPalette::TertiaryMid]];",
"}",
"",
"/* a little bit of extra whitespace */",
".viewer {",
" padding-bottom:3px;",
"}",
"",
"/* don't want any background color for headings */",
"h1,h2,h3,h4,h5,h6 {",
" background: [[ColorPalette::Background]];",
" color: [[ColorPalette::Foreground]];",
"}",
"",
"/* give tiddlers 3d style border and explicit background */",
".tiddler {",
" background: [[ColorPalette::Background]];",
" border-right: 2px [[ColorPalette::TertiaryMid]] solid;",
" border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;",
" margin-bottom: 1em;",
" padding-bottom: 1em;",
" padding-top: 0.75em;",
"}",
"",
"/* make options slider look nicer */",
"#sidebarOptions .sliderPanel {",
" border:solid 1px [[ColorPalette::PrimaryLight]];",
"}",
"",
"/* the borders look wrong with the body background */",
"#sidebar .button {",
" border-style: none;",
"}",
"",
"/* this means you can put line breaks in SidebarOptions for readability */",
"#sidebarOptions br {",
" display:none;",
"}",
"/* undo the above in OptionsPanel */",
"#sidebarOptions .sliderPanel br {",
" display:inline;",
"}",
"",
"/* horizontal main menu stuff */",
"#displayArea {",
" margin: 1em 15.7em 0em 1em; /* use the freed up space */",
"}",
"#topMenu br {",
" display: none;",
"}",
"#topMenu {",
" background: [[ColorPalette::PrimaryMid]];",
" color:[[ColorPalette::PrimaryPale]];",
"}",
"#topMenu {",
" padding:2px;",
"}",
"#topMenu .button, #topMenu .tiddlyLink, #topMenu a {",
" margin-left: 0.5em;",
" margin-right: 0.5em;",
" padding-left: 3px;",
" padding-right: 3px;",
" color: [[ColorPalette::PrimaryPale]];",
" font-size: 115%;",
"}",
"#topMenu .button:hover, #topMenu .tiddlyLink:hover {",
" background: [[ColorPalette::PrimaryDark]];",
"}",
"",
"/* make 2.2 act like 2.1 with the invisible buttons */",
".toolbar {",
" visibility:hidden;",
"}",
".selected .toolbar {",
" visibility:visible;",
"}",
"",
"/* experimental. this is a little borked in IE7 with the button ",
" * borders but worth it I think for the extra screen realestate */",
".toolbar { float:right; }",
"",
"/* for Tagger Plugin, thanks sb56637 */",
".popup li a {",
" display:inline;",
"}",
"",
"/* make it print a little cleaner */",
"@media print {",
" #topMenu {",
" display: none ! important;",
" }",
" /* not sure if we need all the importants */",
" .tiddler {",
" border-style: none ! important;",
" margin:0px ! important;",
" padding:0px ! important;",
" padding-bottom:2em ! important;",
" }",
" .tagglyTagging .button, .tagglyTagging .hidebutton {",
" display: none ! important;",
" }",
" .headerShadow {",
" visibility: hidden ! important;",
" }",
" .tagglyTagged .quickopentag, .tagged .quickopentag {",
" border-style: none ! important;",
" }",
" .quickopentag a.button, .miniTag {",
" display: none ! important;",
" }",
"}",
"/*}}}*/"
].join("\n"),
'MptwViewTemplate':[
"<!--{{{-->",
"<!--- http://mptw.tiddlyspot.com/#MptwViewTemplate ($Rev: 2247 $) --->",
"",
"<div class='toolbar'>",
" <span macro=\"showWhenTagged systemConfig\">",
" <span macro=\"toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'\"></span>",
" </span>",
" <span macro=\"showWhenTagged palette\">",
" <span macro=\"setPalette\"></span>",
" </span>",
" <span style=\"padding:1em;\"></span>",
" <span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler > fields syncing permalink references jump'></span> <span macro='newHere label:\"new here\"'></span>",
" <span macro='newJournalHere {{config.mptwJournalFormat?config.mptwJournalFormat:\"MM/0DD/YY\"}}'></span>",
"</div>",
"",
"<div class=\"tagglyTagged\" macro=\"tags\"></div>",
"",
"<div class='titleContainer'>",
" <span class='title' macro='view title'></span>",
" <span macro=\"miniTag\"></span>",
"</div>",
"",
"<div class='subtitle'>",
" <span macro='view modifier link'></span>,",
" <span macro='view modified date {{config.mptwDateFormat?config.mptwDateFormat:\"MM/0DD/YY\"}}'></span>",
" (<span macro='message views.wikified.createdPrompt'></span>",
" <span macro='view created date {{config.mptwDateFormat?config.mptwDateFormat:\"MM/0DD/YY\"}}'></span>)",
"</div>",
"",
"<div macro=\"showWhenExists ViewPanelTemplate\">[[ViewPanelTemplate]]</div>",
"",
"<div macro=\"hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')\">",
" <div class='viewer' macro='view text wikified'></div>",
"</div>",
"<div macro=\"showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')\">",
" <div class='viewer'><pre macro='view text'></pre></div>",
"</div>",
"",
"<div macro=\"showWhenExists ViewDashboardTemplate\">[[ViewDashboardTemplate]]</div>",
"",
"<div class=\"tagglyTagging\" macro=\"tagglyTagging\"></div>",
"",
"<!--}}}-->"
].join("\n")
});
//}}}
For upgrading directly from tiddlyspot. See [[ImportTiddlers]].
URL: /proxy/mptw.tiddlyspot.com/upgrade.html
For upgrading. See [[ImportTiddlers]].
URL: http://mptw.tiddlyspot.com/upgrade.html
/***
| Name:|NewHerePlugin|
| Description:|Creates the new here and new journal macros|
| Version:|3.0 ($Rev: 1845 $)|
| Date:|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
newHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
}
},
newJournalHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newJournal "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
}
}
});
//}}}
/***
| Name:|NewMeansNewPlugin|
| Description:|If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on|
| Version:|1.0 ($Rev: 2263 $)|
| Date:|$Date: 2007-06-13 04:22:32 +1000 (Wed, 13 Jun 2007) $|
| Source:|http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
String.prototype.getNextFreeName = function() {
var numberRegExp = / \(([0-9]+)\)$/;
var match = numberRegExp.exec(this);
if (match) {
var num = parseInt(match[1]) + 1;
return this.replace(numberRegExp," ("+num+")");
}
else {
return this + " (1)";
}
}
config.macros.newTiddler.getName = function(newName) {
while (store.getTiddler(newName))
newName = newName.getNextFreeName();
return newName;
}
config.macros.newTiddler.onClickNewTiddler = function()
{
var title = this.getAttribute("newTitle");
if(this.getAttribute("isJournal") == "true") {
var now = new Date();
title = now.formatString(title.trim());
}
title = config.macros.newTiddler.getName(title); // <--- only changed bit
var params = this.getAttribute("params");
var tags = params ? params.split("|") : [];
var focus = this.getAttribute("newFocus");
var template = this.getAttribute("newTemplate");
var customFields = this.getAttribute("customFields");
story.displayTiddler(null,title,template,false,null,null);
var tiddlerElem = document.getElementById(story.idPrefix + title);
if(customFields)
story.addCustomFields(tiddlerElem,customFields);
var text = this.getAttribute("newText");
if(typeof text == "string")
story.getTiddlerField(title,"text").value = text.format([title]);
for(var t=0;t<tags.length;t++)
story.setTiddlerTag(title,tags[t],+1);
story.focusTiddler(title,focus);
return false;
};
//}}}
This is a list of Plugins that are currently installed and in use at [[TiddlyWikiTips.com]].
Clicking a Plugin on the left will open it for you to view.
If you want to use any of these Plugins on //your// TiddlyWiki, just edit the Plugin, Copy and Paste the text into a new Tiddler in your TiddlyWiki file, and Tag it as "systemConfig". The next time you reload your TiddlyWiki file, the Plugin will be active...simple as that!
These are the products I'm promoting.
These are the Projects undertaken by Yours Truly.
/***
| Name|QuickOpenTagPlugin|
| Description|Changes tag links to make it easier to open tags as tiddlers|
| Version|3.0.1 ($Rev: 2342 $)|
| Date|$Date: 2007-07-05 10:57:49 +1000 (Thu, 05 Jul 2007) $|
| Source|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
config.quickOpenTag = {
dropdownChar: (document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?
createTagButton: function(place,tag,excludeTiddler) {
// little hack so we can to <<tag PrettyTagName|RealTagName>>
var splitTag = tag.split("|");
var pretty = tag;
if (splitTag.length == 2) {
tag = splitTag[1];
pretty = splitTag[0];
}
var sp = createTiddlyElement(place,"span",null,"quickopentag");
createTiddlyText(createTiddlyLink(sp,tag,false),pretty);
var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
config.views.wikified.tag.tooltip.format([tag]),onClickTag);
theTag.setAttribute("tag",tag);
if (excludeTiddler)
theTag.setAttribute("tiddler",excludeTiddler);
return(theTag);
},
miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {
var tagged = store.getTaggedTiddlers(tiddler.title);
if (tagged.length > 0) {
var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);
theTag.setAttribute("tag",tiddler.title);
theTag.className = "miniTag";
}
},
allTagsHandler: function(place,macroName,params) {
var tags = store.getTags(params[0]);
var filter = params[1]; // new feature
var ul = createTiddlyElement(place,"ul");
if(tags.length == 0)
createTiddlyElement(ul,"li",null,"listTitle",this.noTags);
for(var t=0; t<tags.length; t++) {
var title = tags[t][0];
if (!filter || (title.match(new RegExp('^'+filter)))) {
var info = getTiddlyLinkInfo(title);
var theListItem =createTiddlyElement(ul,"li");
var theLink = createTiddlyLink(theListItem,tags[t][0],true);
var theCount = " (" + tags[t][1] + ")";
theLink.appendChild(document.createTextNode(theCount));
var theDropDownBtn = createTiddlyButton(theListItem," " +
config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
theDropDownBtn.setAttribute("tag",tags[t][0]);
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by QuickOpenTagPlugin */",
".tagglyTagged .quickopentag, .tagged .quickopentag ",
" { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }",
".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }",
".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}",
"/* extra specificity to make it work right */",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink ",
" { border:0px solid black; }",
"#displayArea .viewer .quickopentag a.button, ",
"#mainMenu .quickopentag a.button ",
" { margin-left:0px; padding-left:2px; }",
"#displayArea .viewer .quickopentag a.tiddlyLink, ",
"#mainMenu .quickopentag a.tiddlyLink ",
" { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }",
"a.miniTag {font-size:150%;} ",
"#mainMenu .quickopentag a.button ",
" /* looks better in right justified main menus */",
" { margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }",
"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }",
"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }",
"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }",
"/*}}}*/",
""].join("\n"),
init: function() {
// we fully replace these builtins. can't hijack them easily
window.createTagButton = this.createTagButton;
config.macros.allTags.handler = this.allTagsHandler;
config.macros.miniTag = { handler: this.miniTagHandler };
config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;
store.addNotification("QuickOpenTagStyles",refreshStyles);
}
}
config.quickOpenTag.init();
//}}}
/***
| Name:|RenameTagsPlugin|
| Description:|Allows you to easily rename or delete tags across multiple tiddlers|
| Version:|3.0 ($Rev: 1845 $)|
| Date:|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|
| Author:|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
Rename a tag and you will be prompted to rename it in all its tagged tiddlers.
***/
//{{{
config.renameTags = {
prompts: {
rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",
remove: "Remove the tag '%0' from %1 tidder%2?"
},
removeTag: function(tag,tiddlers) {
store.suspendNotifications();
for (var i=0;i<tiddlers.length;i++) {
store.setTiddlerTag(tiddlers[i].title,false,tag);
}
store.resumeNotifications();
store.notifyAll();
},
renameTag: function(oldTag,newTag,tiddlers) {
store.suspendNotifications();
for (var i=0;i<tiddlers.length;i++) {
store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old
store.setTiddlerTag(tiddlers[i].title,true,newTag); // add new
}
store.resumeNotifications();
store.notifyAll();
},
storeMethods: {
saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,
saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields) {
if (title != newTitle) {
var tagged = this.getTaggedTiddlers(title);
if (tagged.length > 0) {
// then we are renaming a tag
if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))
config.renameTags.renameTag(title,newTitle,tagged);
if (!this.tiddlerExists(title) && newBody == "")
// dont create unwanted tiddler
return null;
}
}
return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields);
},
removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,
removeTiddler: function(title) {
var tagged = this.getTaggedTiddlers(title);
if (tagged.length > 0)
if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))
config.renameTags.removeTag(title,tagged);
return this.removeTiddler_orig_renameTags(title);
}
},
init: function() {
merge(TiddlyWiki.prototype,this.storeMethods);
}
}
config.renameTags.init();
//}}}
Samsung HLT6187SAX 61-inch Slim LED Engine 1080p DLP HDTV
Enjoy better pictures with the [[Samsung's HL-T6187 DLP HDTV | http://kodeexii.net/products/samsung-hlt6187sax/]]. The piano black bezel is just 0.6-inch wide so the slim depth lets it fit where others won't. The energy-efficient 61-inch screen features a powerful, long-lasting LED light engine that turns on almost instantly.
/***
| Name|SaveCloseTiddlerPlugin|
| Description|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
| Version|3.0 ($Rev: 2134 $)|
| Date|$Date: 2007-04-30 16:11:12 +1000 (Mon, 30 Apr 2007) $|
| Source|http://mptw.tiddlyspot.com/#SaveCloseTiddlerPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
To use these you must add them to the tool bar in your EditTemplate
***/
//{{{
merge(config.commands,{
saveCloseTiddler: {
text: 'done/close',
tooltip: 'Save changes to this tiddler and close it',
handler: function(e,src,title) {
config.commands.saveTiddler.handler(e,src,title);
config.commands.closeTiddler.handler(e,src,title);
return false;
}
},
cancelCloseTiddler: {
text: 'cancel/close',
tooltip: 'Undo changes to this tiddler and close it',
handler: function(e,src,title) {
config.commands.cancelTiddler.handler(e,src,title);
config.commands.closeTiddler.handler(e,src,title);
return false;
}
}
});
//}}}
/***
| Name|SelectPalettePlugin|
| Description|Lets you easily change colour palette|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://mptw.tiddlyspot.com/#SelectPalettePlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
/***
!!Usage:
{{{<<<selectPalette>>}}}
<<selectPalette>>
!!WARNING
Will overwrite your ColorPalette tiddler.
***/
//{{{
merge(config.macros,{
setPalette: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var paletteName = params[0] ? params[0] : tiddler.title;
createTiddlyButton(place,"apply","Apply this palette",function(e) {
config.macros.selectPalette.updatePalette(tiddler.title);
return false;
});
}
},
selectPalette: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
createTiddlyDropDown(place,this.onPaletteChange,this.getPalettes());
},
getPalettes: function() {
var result = [
{caption:"-palette-", name:""},
{caption:"(Default)", name:"(default)"}
];
var tagged = store.getTaggedTiddlers("palette","title");
for(var t=0; t<tagged.length; t++) {
var caption = tagged[t].title;
var sliceTitle = store.getTiddlerSlice(caption,"Name");
if (sliceTitle)
caption = sliceTitle;
result.push({caption:sliceTitle, name:tagged[t].title});
}
return result;
},
onPaletteChange: function(e) {
config.macros.selectPalette.updatePalette(this.value);
return true;
},
updatePalette: function(title) {
if (title != "") {
store.deleteTiddler("ColorPalette");
if (title != "(default)")
store.saveTiddler("ColorPalette","ColorPalette",store.getTiddlerText(title),
config.options.txtUserName,undefined,"");
this.refreshPalette();
if(config.options.chkAutoSave)
saveChanges(true);
}
},
refreshPalette: function() {
config.macros.refreshDisplay.onClick();
}
}
});
config.shadowTiddlers.OptionsPanel = "<<selectPalette>>\n\n" + config.shadowTiddlers.OptionsPanel;
//}}}
<<search>><<closeAll>><<permaview>><<newTiddler>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>><<slider chkSliderSideBarTabs [[TabContents]] 'contents »' 'contents'>>
<<tabs txtMainTab "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "Tags" "All tags" TabTags "More" "More lists" TabMore>>
<<tabs txtMoreTab "Tags" "All Tags" TabAllTags "Miss" "Missing tiddlers" TabMoreMissing "Orph" "Orphaned tiddlers" TabMoreOrphans "Shad" "Shadowed tiddlers" TabMoreShadowed>>
<<allTags excludeLists [a-z]>>
/***
| Name|TagglyTaggingPlugin|
| Description|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
| Version|3.1 ($Rev: 2341 $)|
| Date|$Date: 2007-07-05 10:02:27 +1000 (Thu, 05 Jul 2007) $|
| Source|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
config.taggly = {
// for translations
lingo: {
labels: {
asc: "\u2191", // down arrow
desc: "\u2193", // up arrow
title: "title",
modified: "modified",
created: "created",
show: "+",
hide: "-",
normal: "normal",
group: "group",
commas: "commas",
sitemap: "sitemap",
numCols: "cols\u00b1", // plus minus sign
label: "Tagged as '%0':",
excerpts: "excerpts",
contents: "contents",
sliders: "sliders",
noexcerpts: "title only"
},
tooltips: {
title: "Click to sort by title",
modified: "Click to sort by modified date",
created: "Click to sort by created date",
show: "Click to show tagging list",
hide: "Click to hide tagging list",
normal: "Click to show a normal ungrouped list",
group: "Click to show list grouped by tag",
sitemap: "Click to show a sitemap style list",
commas: "Click to show a comma separated list",
numCols: "Click to change number of columns",
excerpts: "Click to show excerpts",
contents: "Click to show entire tiddler contents",
sliders: "Click to show tiddler contents in sliders",
noexcerpts: "Click to show entire title only"
}
},
config: {
showTaggingCounts: true,
listOpts: {
// the first one will be the default
sortBy: ["title","modified","created"],
sortOrder: ["asc","desc"],
hideState: ["show","hide"],
listMode: ["normal","group","sitemap","commas"],
numCols: ["1","2","3","4","5","6"],
excerpts: ["noexcerpts","excerpts","contents","sliders"]
},
valuePrefix: "taggly.",
excludeTags: ["excludeLists","excludeTagging"],
excerptSize: 50,
excerptMarker: "/%"+"%/"
},
getTagglyOpt: function(title,opt) {
var val = store.getValue(title,this.config.valuePrefix+opt);
return val ? val : this.config.listOpts[opt][0];
},
setTagglyOpt: function(title,opt,value) {
if (!store.tiddlerExists(title))
// create it silently
store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),null);
// if value is default then remove it to save space
return store.setValue(title,
this.config.valuePrefix+opt,
value == this.config.listOpts[opt][0] ? null : value);
},
getNextValue: function(title,opt) {
var current = this.getTagglyOpt(title,opt);
var pos = this.config.listOpts[opt].indexOf(current);
// a little usability enhancement. actually it doesn't work right for grouped or sitemap
var limit = (opt == "numCols" ? store.getTaggedTiddlers(title).length : this.config.listOpts[opt].length);
var newPos = (pos + 1) % limit;
return this.config.listOpts[opt][newPos];
},
toggleTagglyOpt: function(title,opt) {
var newVal = this.getNextValue(title,opt);
this.setTagglyOpt(title,opt,newVal);
},
createListControl: function(place,title,type) {
var lingo = config.taggly.lingo;
var label;
var tooltip;
var onclick;
if ((type == "title" || type == "modified" || type == "created")) {
// "special" controls. a little tricky. derived from sortOrder and sortBy
label = lingo.labels[type];
tooltip = lingo.tooltips[type];
if (this.getTagglyOpt(title,"sortBy") == type) {
label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
onclick = function() {
config.taggly.toggleTagglyOpt(title,"sortOrder");
return false;
}
}
else {
onclick = function() {
config.taggly.setTagglyOpt(title,"sortBy",type);
config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
return false;
}
}
}
else {
// "regular" controls, nice and simple
label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
onclick = function() {
config.taggly.toggleTagglyOpt(title,type);
return false;
}
}
// hide button because commas don't have columns
if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
},
makeColumns: function(orig,numCols) {
var listSize = orig.length;
var colSize = listSize/numCols;
var remainder = listSize % numCols;
var upperColsize = colSize;
var lowerColsize = colSize;
if (colSize != Math.floor(colSize)) {
// it's not an exact fit so..
upperColsize = Math.floor(colSize) + 1;
lowerColsize = Math.floor(colSize);
}
var output = [];
var c = 0;
for (var j=0;j<numCols;j++) {
var singleCol = [];
var thisSize = j < remainder ? upperColsize : lowerColsize;
for (var i=0;i<thisSize;i++)
singleCol.push(orig[c++]);
output.push(singleCol);
}
return output;
},
drawTable: function(place,columns,theClass) {
var newTable = createTiddlyElement(place,"table",null,theClass);
var newTbody = createTiddlyElement(newTable,"tbody");
var newTr = createTiddlyElement(newTbody,"tr");
for (var j=0;j<columns.length;j++) {
var colOutput = "";
for (var i=0;i<columns[j].length;i++)
colOutput += columns[j][i];
var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
wikify(colOutput,newTd);
}
return newTable;
},
createTagglyList: function(place,title) {
switch(this.getTagglyOpt(title,"listMode")) {
case "group": return this.createTagglyListGrouped(place,title); break;
case "normal": return this.createTagglyListNormal(place,title,false); break;
case "commas": return this.createTagglyListNormal(place,title,true); break;
case "sitemap":return this.createTagglyListSiteMap(place,title); break;
}
},
getTaggingCount: function(title) {
// thanks to Doug Edmunds
if (this.config.showTaggingCounts) {
var tagCount = store.getTaggedTiddlers(title).length;
if (tagCount > 0)
return " ("+tagCount+")";
}
return "";
},
getExcerpt: function(inTiddlerTitle,title,indent) {
if (!indent)
indent = 1;
if (this.getTagglyOpt(inTiddlerTitle,"excerpts") == "excerpts") {
var t = store.getTiddler(title);
if (t) {
var text = t.text.replace(/\n/," ");
var marker = text.indexOf(this.config.excerptMarker);
if (marker != -1) {
return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
}
else if (text.length < this.config.excerptSize) {
return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
}
else {
return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
}
}
}
else if (this.getTagglyOpt(inTiddlerTitle,"excerpts") == "contents") {
var t = store.getTiddler(title);
if (t) {
return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
}
}
else if (this.getTagglyOpt(inTiddlerTitle,"excerpts") == "sliders") {
var t = store.getTiddler(title);
if (t) {
return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
}
}
return "";
},
notHidden: function(t,inTiddler) {
if (typeof t == "string")
t = store.getTiddler(t);
return (!t || !t.tags.containsAny(this.config.excludeTags) ||
(inTiddler && this.config.excludeTags.contains(inTiddler)));
},
// this is for normal and commas mode
createTagglyListNormal: function(place,title,useCommas) {
var list = store.getTaggedTiddlers(title,this.getTagglyOpt(title,"sortBy"));
if (this.getTagglyOpt(title,"sortOrder") == "desc")
list = list.reverse();
var output = [];
var first = true;
for (var i=0;i<list.length;i++) {
if (this.notHidden(list[i],title)) {
var countString = this.getTaggingCount(list[i].title);
var excerpt = this.getExcerpt(title,list[i].title);
if (useCommas)
output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
else
output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");
first = false;
}
}
return this.drawTable(place,
this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
useCommas ? "commas" : "normal");
},
// this is for the "grouped" mode
createTagglyListGrouped: function(place,title) {
var sortBy = this.getTagglyOpt(title,"sortBy");
var sortOrder = this.getTagglyOpt(title,"sortOrder");
var list = store.getTaggedTiddlers(title,sortBy);
if (sortOrder == "desc")
list = list.reverse();
var leftOvers = []
for (var i=0;i<list.length;i++)
leftOvers.push(list[i].title);
var allTagsHolder = {};
for (var i=0;i<list.length;i++) {
for (var j=0;j<list[i].tags.length;j++) {
if (list[i].tags[j] != title) { // not this tiddler
if (this.notHidden(list[i].tags[j],title)) {
if (!allTagsHolder[list[i].tags[j]])
allTagsHolder[list[i].tags[j]] = "";
if (this.notHidden(list[i],title)) {
allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";
leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers
}
}
}
}
}
var allTags = [];
for (var t in allTagsHolder)
allTags.push(t);
var sortHelper = function(a,b) {
if (a == b) return 0;
if (a < b) return -1;
return 1;
};
allTags.sort(function(a,b) {
var tidA = store.getTiddler(a);
var tidB = store.getTiddler(b);
if (sortBy == "title") return sortHelper(a,b);
else if (!tidA && !tidB) return 0;
else if (!tidA) return -1;
else if (!tidB) return +1;
else return sortHelper(tidA[sortBy],tidB[sortBy]);
});
var leftOverOutput = "";
for (var i=0;i<leftOvers.length;i++)
if (this.notHidden(leftOvers[i],title))
leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";
var output = [];
if (sortOrder == "desc")
allTags.reverse();
else if (leftOverOutput != "")
// leftovers first...
output.push(leftOverOutput);
for (var i=0;i<allTags.length;i++)
if (allTagsHolder[allTags[i]] != "")
output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);
if (sortOrder == "desc" && leftOverOutput != "")
// leftovers last...
output.push(leftOverOutput);
return this.drawTable(place,
this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
"grouped");
},
// used to build site map
treeTraverse: function(title,depth,sortBy,sortOrder) {
var list = store.getTaggedTiddlers(title,sortBy);
if (sortOrder == "desc")
list.reverse();
var indent = "";
for (var j=0;j<depth;j++)
indent += "*"
var childOutput = "";
for (var i=0;i<list.length;i++)
if (list[i].title != title)
if (this.notHidden(list[i].title,this.config.inTiddler))
childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder);
if (depth == 0)
return childOutput;
else
return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title,depth) + "\n" + childOutput;
},
// this if for the site map mode
createTagglyListSiteMap: function(place,title) {
this.config.inTiddler = title; // nasty. should pass it in to traverse probably
var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"));
return this.drawTable(place,
this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
"sitemap"
);
},
macros: {
tagglyTagging: {
handler: function (place,macroName,params,wikifier,paramString,tiddler) {
var refreshContainer = createTiddlyElement(place,"div");
// do some refresh magic to make it keep the list fresh - thanks Saq
refreshContainer.setAttribute("refresh","macro");
refreshContainer.setAttribute("macroName",macroName);
refreshContainer.setAttribute("title",tiddler.title);
this.refresh(refreshContainer);
},
refresh: function(place) {
var title = place.getAttribute("title");
removeChildren(place);
if (store.getTaggedTiddlers(title).length > 0) {
var lingo = config.taggly.lingo;
config.taggly.createListControl(place,title,"hideState");
if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
createTiddlyElement(place,"span",null,"tagglyLabel",lingo.labels.label.format([title]));
config.taggly.createListControl(place,title,"title");
config.taggly.createListControl(place,title,"modified");
config.taggly.createListControl(place,title,"created");
config.taggly.createListControl(place,title,"listMode");
config.taggly.createListControl(place,title,"excerpts");
config.taggly.createListControl(place,title,"numCols");
config.taggly.createTagglyList(place,title);
}
}
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
" margin-top:0px; padding-top:0.5em; padding-left:2em;",
" margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
" color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
" border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active {",
" border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
" margin-bottom:0.5em; }",
".tagglyTagging .indent1 { margin-left:3em; }",
".tagglyTagging .indent2 { margin-left:4em; }",
".tagglyTagging .indent3 { margin-left:5em; }",
".tagglyTagging .indent4 { margin-left:6em; }",
".tagglyTagging .indent5 { margin-left:7em; }",
".tagglyTagging .indent6 { margin-left:8em; }",
".tagglyTagging .indent7 { margin-left:9em; }",
".tagglyTagging .indent8 { margin-left:10em; }",
".tagglyTagging .indent9 { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
"/*}}}*/",
""].join("\n"),
init: function() {
merge(config.macros,this.macros);
config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
store.addNotification("TagglyTaggingStyles",refreshStyles);
}
};
config.taggly.init();
//}}}
/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin
// syntax adjusted to not clash with NestedSlidersPlugin
***/
//{{{
config.formatters.unshift( {
name: "inlinesliders",
// match: "\\+\\+\\+\\+|\\<slider",
match: "\\<slider",
// lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
lookaheadRegExp: /(?:<slider) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
handler: function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
var btn = createTiddlyButton(w.output,lookaheadMatch[1] + " "+"\u00BB",lookaheadMatch[1],this.onClickSlider,"button sliderButton");
var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
panel.style.display = "none";
wikify(lookaheadMatch[2],panel);
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
},
onClickSlider : function(e) {
if(!e) var e = window.event;
var n = this.nextSibling;
n.style.display = (n.style.display=="none") ? "block" : "none";
return false;
}
});
//}}}
Here are The TiddlyWiki Tips!
Click on a Tip title at the left to open it.
Tips marked with a ({{{*}}} were either submitted or inspired by [[TiddlyWikiTips.com]] visitors!
/%
|Name|ToggleRightSidebar|
|Source|http://www.TiddlyTools.com/#ToggleRightSidebar|
|Version|0.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires||
|Overrides||
|Description||
%/<script label="show/hide right sidebar">
var show=document.getElementById('sidebar').style.display=='none';
if (!show) {
document.getElementById('sidebar').style.display='none';
var margin='1em';
}
else {
document.getElementById('sidebar').style.display='block';
var margin=config.options.txtDisplayAreaRightMargin?config.options.txtDisplayAreaRightMargin:"";
}
place.innerHTML=(show?"Need More Room?":"Need the Sidebar?"); // SET LINK TEXT
place.title=show?"hide sidebar":"show sidebar"; // SET TOOLTIP
document.getElementById('displayArea').style.marginRight=margin;
config.options.chkShowRightSidebar=show;
saveOptionCookie('chkShowRightSidebar');
var sm=document.getElementById("storyMenu"); if (sm) config.refreshers.content(sm);
return false;
</script><script>
if (config.options.chkShowRightSidebar==undefined)
config.options.chkShowRightSidebar=true;
if (!config.options.txtDisplayAreaRightMargin||!config.options.txtDisplayAreaRightMargin.length)
config.options.txtDisplayAreaRightMargin="15em";
var show=config.options.chkShowRightSidebar;
document.getElementById('sidebar').style.display=show?"block":"none";
document.getElementById('displayArea').style.marginRight=show?config.options.txtDisplayAreaRightMargin:"1em";
place.lastChild.innerHTML=(show?"Hide Sidebar":"Show Sidebar"); // SET LINK TEXT
place.lastChild.title=show?"hide sidebar":"show sidebar"; // SET TOOLTIP
place.lastChild.style.fontWeight="normal";
</script>
/***
| Name|ToggleTagPlugin|
| Description|Makes a checkbox which toggles a tag in a tiddler|
| Version|3.0 ($Rev: 1845 $)|
| Date|$Date: 2007-03-16 15:19:22 +1000 (Fri, 16 Mar 2007) $|
| Source|http://tiddlyspot.com/mptw/#ToggleTagMacro|
| Author|Simon Baird <simon.baird@gmail.com>|
| License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Usage
{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}
* TagName - the tag to be toggled, default value "checked"
* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler
* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'
(If a parameter is '.' then the default will be used)
Examples:
|Code|Description|Example|h
|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|
|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|
|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|
|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|
|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|
Notes:
* If TiddlerName doesn't exist it will be silently created
* Set label to '-' to specify no label
* See also http://mgtd-alpha.tiddlyspot.com/#ToggleTag2
!Known issues
* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing
***/
//{{{
merge(config.macros,{
toggleTag: {
doRefreshAll: true,
createIfRequired: true,
shortLabel: "[[%0]]",
longLabel: "[[%0]] [[%1]]",
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var tag = (params[0] && params[0] != '.') ? params[0] : "checked";
var title = (params[1] && params[1] != '.') ? params[1] : tiddler.title;
var defaultLabel = (title == tiddler.title ? this.shortLabel : this.longLabel);
var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;
label = (label == '-' ? '' : label);
var theTiddler = title == tiddler.title ? tiddler : store.getTiddler(title);
var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {
if (!store.tiddlerExists(title)) {
if (config.macros.toggleTag.createIfRequired) {
var content = store.getTiddlerText(title); // just in case it's a shadow
store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
}
else
return false;
}
store.setTiddlerTag(title,this.checked,tag);
return true;
});
}
}
});
//}}}