Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
Wiki markup is a formatting syntax for wiki contents ("wikitext").
It is a highly simplified version of HTML, used for structuring textual contents.
As such, wiki markup offers a set of simple formatting codes that the wiki software (or "engine") then translates into HTML (a process often called "wikification") when the content is displayed in a browser.
Different wiki engines often have different syntax conventions.
This community wiki is powered by the [http://www.mediawiki.org MediaWiki] engine, which uses slightly different markup from [[TiddlyWiki]].
* [[TiddlyWiki Markup]]
* [[MediaWiki Markup]]
* [[Markdown|Markdown Markup (if you could call it that :)]]
''Note: while there isn't yet nice, userfriendly documentation of it on the wiki for it, there exist formatter plugins for many different types of wiki markup. Muchos Gracias to [[User:MartinBudden|MartinBudden]] for these. They can be found '''[http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/ here]'''.''
[[Category:Wiki Markup]] [[Category:Disambiguation]]
{{Incomplete}}
Adaptations (also called [[vertical|verticals]] or [[editions]]) are variants of [[TiddlyWiki]] created for specific purposes.
{{Note|1=
In earlier versions of TiddlyWiki, the term "adaptations" used to describe [http://tiddlywiki.com/#TiddlyWikiAdaptations modifications of the TiddlyWiki core].<br>
More recent versions support [[plugins]] though, so that adaptations now tend to consist of a collection of plugins on top of the standard TiddlyWiki core code.
}}
Articles complying with {{SITENAME}}'s [[Project:Quality|quality standards]].
== See Also ==
* [[:Category:Errors]]
* [[You need to save this TiddlyWiki to a file before you can save changes]]
* [[Browser Issues]]
See also [[TiddlyWiki FAQ]] and [[:Category:FAQ Section]]
See also [[TiddlyWiki FAQ]] and [[:Category:FAQ]]
cf. [[Macros]]
[[Category:FAQ Section]]
See also [[Project Ideas]].
There are many parties that have an interest in the TiddlyWiki project. [[Osmosoft]] and [[UnaMesa]] are two, but there are many individual developers contributing to the project.
== External Resources ==
* [http://en.wikipedia.org/wiki/Stakeholder_(corporate) Wikipedia on Stakeholders]
[[Category:Project Ideas]]
[[Category:Project Ideas]]
{{Review}}
{{Merge|[[Troubleshooting]]}}
== Problem ==
{{Quote||When I try to save [from FireFox], I get this message:
A script from "file://" is requesting enhanced abilities
that are UNSAFE and could be used to compromise
your machine or data
Allow or Deny
}}
== Explanation ==
For security reasons, web pages are normally not allowed to access the local hard drive.
However, TiddlyWiki requires this in order to save changes - which triggers this dialog to request enhanced privileges, explicitly turning it into a trusted source.
== Solution ==
It is suggested to simply
"Allow" the file:// access and also [x] "remember this decision", so
that no further security warnings appear.
Fortunately, the browser treats "file://" as a separate domain from
all other remote domains, so granting permissions to locally-stored
documents won't create any security holes when accessing remote web
sites.
<pre>
To find the internal FireFox setting:
1) look for "prefs.js", a file that is automatically written by FireFox to store your current browser settings. Under Windows, this is generally located at:
-----
C:\Documents and Settings\Your Name\Application Data\Mozilla\Firefox\Profiles\abcdef12345.default\prefs.js
-----
2) Open that file with a plain text editor (make sure FireFox is NOT running at the time!), and find these two lines (or similar):
-----
user_pref("capability.principal.codebase.p0.granted", "UniversalXPConnect UniversalBrowserRead");
user_pref("capability.principal.codebase.p0.id", "file://");
-----
3) Delete those lines to restore FireFox's default "ask for permission" state for the "file://" domain
</pre>
=== Firefox 3 Exemption ===
The above solution will ''not'' work with [[Firefox 3]]. And what's more, Firefox 3 asks for permission once per session. And working through [[Prism]] does no better. Who will solve this dastardly problem?
One solution involves specifying a specific TiddlyWiki document:
<pre>
user_pref("capability.principal.codebase.p0.granted",
"UniversalXPConnect UniversalBrowserRead");
user_pref("capability.principal.codebase.p0.id", "file://I:/see/some/tiddlywiki.html");
</pre>
However, this does not help those with a changing number of TiddlyWikis.
Another solution that can work in Firefox 3 is the [http://firefoxprivileges.tiddlyspot.com/ FirefoxPrivilegesPlugin]. This [[plugin]] for TiddlyWiki produces a Firefox Privileges wizard, which can help set permissions for a particular TiddlyWiki file.
-- edit: please look at [https://bugzilla.mozilla.org/show_bug.cgi?id=435254 Bug 435254 – 'remember this selection' not saved across FF sessions], the solution there worked for me: "setting security.fileuri.strict_origin_policy to "false" in about:config
prevents the dialog from opening".. FirefoxPrivilegesPlugin is still great though, allowing to see what actual privileges are seen by Firefox..
-- edit: if using Prism these settings are stored in prism\defaults\preferences\preferences.js - since the fileuri setting will likely not be in here already, you will need to add it under the security settings section, the syntax is slightly different from the instructions provided for Firefox above, the line I added looked like:
<pre>
pref("security.fileuri.strict_origin_policy", false);
</pre>
This worked great for me, no more irritating confirmations
I am using this with the latest Prism release 0.9.9 - in addition to appearing faster, the firefox find function is now enabled in this release of Prism and makes life much easier for long tiddlers
== See Also ==
* [[Firefox]]
== External Resources ==
* ''<nowiki>[tw]</nowiki> Script requesting enhanced abilities'': [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/d00c441fd67b39f0/99e8868f62086fe3?#99e8868f62086fe3 Eric], [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/d00c441fd67b39f0/7df57df13a0be858?#7df57df13a0be858 Xavier]
[[Category:Errors]]
{{Incomplete}}
{{Quote|
[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/ed9772d8287f8a1c/9ffb0e4e8c426c0c?#9ffb0e4e8c426c0c Jeremy]|
It's worth pointing out that plain old TiddlyWiki does seem to quite
happily get indexed by Google. For example, googling "tiddlywiki"
returns tiddler content from tiddlywiki.com as the top match. Or,
searching for HowToUpgrade and EmbeddedImages yields TiddlyWiki as the
top match:
<nowiki>http://www.google.com/search?num=100&hl=en&safe=off&client=safari&rls=en&q=howtoupgrade+embeddedimages&btnG=Search</nowiki><br>
Google doesn't understand TW's syntax (including the hyperlink
format), and nor does it know how to link directly to the correct
tiddler within a TiddlyWiki. So, there are some limitations, but at
least it's possible to participate in Google's web with TiddlyWIki.
As several other people have concluded, I think that search engines
are best served by generating a static HTML representation of a
TiddlyWiki. This could either be generated by TiddlyWiki itself (along
the same lines as the RSS feed generation) or by a serverside like
minitiddlyserver or tiddlyspot.
}}
== Google Groups Links ==
* [http://www.superphysique.net/#%5B%5BSEO%20TiddlyWiki%20Plugin%5D%5D SEO TiddlyWiki Plugin] (cf. [http://groups.google.com/group/TiddlyWiki/browse_frm/thread/80378d6700e6f179/ <nowiki>[tw]</nowiki> SEO TiddlyWiki Plugin])
* [http://jackparke.googlepages.com/jtw.html#PublishMacro PublishMacro]
* [http://groups.google.com/group/TiddlyWiki/browse_frm/thread/a38f0db45c1fd1e8/ <nowiki>[tw]</nowiki> TiddlyWiki and SEO]
* [http://groups.google.com/group/TiddlyWiki/browse_frm/thread/f972ed85646f8db3/ <nowiki>[tw]</nowiki> Google indexing - any luck?]
* [http://groups.google.com/group/TiddlyWiki/browse_frm/thread/ed9772d8287f8a1c/ <nowiki>[tw]</nowiki> Is it possible to list all tiddlers as a list of permalinks?]
* [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/d14ec01af14e4f8f <nowiki>[twdev]</nowiki> How to solve the unsatisfying SEO problem with TiddlyWikis used for web publishing]
== See Also ==
* [[TiddlyWiki As a Website]]
* [[Dev:Accessibility]]
/***
|''Name:''|AdaptorCommandsPlugin|
|''Description:''|Commands to access hosted TiddlyWiki data|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#AdaptorCommandsPlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/AdaptorCommandsPlugin.js |
|''Version:''|0.5.15|
|''Date:''|Aug 23, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.2.0|
***/
//{{{
// Ensure that the plugin is only installed once.
if(!version.extensions.AdaptorCommandsPlugin) {
version.extensions.AdaptorCommandsPlugin = {installed:true};
function getServerType(fields)
{
if(!fields)
return null;
var serverType = fields['server.type'];
if(!serverType)
serverType = fields['wikiformat'];
if(!serverType)
serverType = config.defaultCustomFields['server.type'];
if(!serverType && typeof RevisionAdaptor != 'undefined' && fields.uuid)
serverType = RevisionAdaptor.serverType;
return serverType;
}
function invokeAdaptor(fnName,param1,param2,context,userParams,callback,fields)
{
var serverType = getServerType(fields);
if(!serverType)
return null;
var adaptor = new config.adaptors[serverType];
if(!adaptor)
return false;
if(!config.adaptors[serverType].prototype[fnName])
return false;
adaptor.openHost(fields['server.host']);
adaptor.openWorkspace(fields['server.workspace']);
var ret = false;
if(param1)
ret = param2 ? adaptor[fnName](param1,param2,context,userParams,callback) : adaptor[fnName](param1,context,userParams,callback);
else
ret = adaptor[fnName](context,userParams,callback);
//adaptor.close();
//delete adaptor;
return ret;
}
function isAdaptorFunctionSupported(fnName,fields)
{
var serverType = getServerType(fields);
if(!serverType || !config.adaptors[serverType])
return false;
if(!config.adaptors[serverType].isLocal && !fields['server.host'])
return false;
var fn = config.adaptors[serverType].prototype[fnName];
return fn ? true : false;
}
config.commands.getTiddler = {};
merge(config.commands.getTiddler,{
text: "get",
tooltip:"Download this tiddler",
readOnlyText: "get",
readOnlyTooltip: "Download this tiddler",
done: "Tiddler downloaded"
});
config.commands.getTiddler.isEnabled = function(tiddler)
{
return isAdaptorFunctionSupported('getTiddler',tiddler.fields);
};
config.commands.getTiddler.handler = function(event,src,title)
{
var tiddler = store.fetchTiddler(title);
if(tiddler) {
var fields = tiddler.fields;
} else {
fields = String(document.getElementById(story.idPrefix + title).getAttribute("tiddlyFields"));
fields = fields ? fields.decodeHashMap() : null;
}
return invokeAdaptor('getTiddler',title,null,null,null,config.commands.getTiddler.callback,fields);
};
config.commands.getTiddler.callback = function(context,userParams)
{
if(context.status) {
var tiddler = context.tiddler;
store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags,tiddler.fields,true);
story.refreshTiddler(tiddler.title,1,true);
displayMessage(config.commands.getTiddler.done);
} else {
displayMessage(context.statusText);
}
};
config.commands.putTiddler = {};
merge(config.commands.putTiddler,{
text: "put",
tooltip: "Upload this tiddler",
hideReadOnly: true,
done: "Tiddler uploaded"
});
config.commands.putTiddler.isEnabled = function(tiddler)
{
return tiddler && tiddler.isTouched() && isAdaptorFunctionSupported('putTiddler',tiddler.fields);
};
config.commands.putTiddler.handler = function(event,src,title)
{
var tiddler = store.fetchTiddler(title);
if(!tiddler)
return false;
return invokeAdaptor('putTiddler',tiddler,null,null,null,config.commands.putTiddler.callback,tiddler.fields);
};
config.commands.putTiddler.callback = function(context,userParams)
{
if(context.status) {
store.fetchTiddler(context.title).clearChangeCount();
displayMessage(config.commands.putTiddler.done);
} else {
displayMessage(context.statusText);
}
};
config.commands.revisions = {};
merge(config.commands.revisions,{
text: "revisions",
tooltip: "View another revision of this tiddler",
loading: "loading...",
done: "Revision downloaded",
revisionTooltip: "View this revision",
popupNone: "No revisions",
revisionTemplate: "%0 r:%1"
});
config.commands.revisions.isEnabled = function(tiddler)
{
return isAdaptorFunctionSupported('getTiddlerRevisionList',tiddler.fields);
};
config.commands.revisions.handler = function(event,src,title)
{
var tiddler = store.fetchTiddler(title);
var userParams = {};
userParams.tiddler = tiddler;
userParams.src = src;
userParams.dateFormat = 'YYYY mmm 0DD 0hh:0mm';
var revisionLimit = 10;
if(!invokeAdaptor('getTiddlerRevisionList',title,revisionLimit,null,userParams,config.commands.revisions.callback,tiddler.fields))
return false;
event.cancelBubble = true;
if(event.stopPropagation)
event.stopPropagation();
return true;
};
config.commands.revisions.callback = function(context,userParams)
// The revisions are returned as tiddlers in the context.revisions array
{
var revisions = context.revisions;
popup = Popup.create(userParams.src);
Popup.show(popup,false);
if(revisions.length==0) {
createTiddlyText(createTiddlyElement(popup,'li',null,'disabled'),config.commands.revisions.popupNone);
} else {
revisions.sort(function(a,b) {return a.modified < b.modified ? +1 : -1;});
for(var i=0; i<revisions.length; i++) {
var tiddler = revisions[i];
var modified = tiddler.modified.formatString(context.dateFormat||userParams.dateFormat);
var revision = tiddler.fields['server.page.revision'];
var btn = createTiddlyButton(createTiddlyElement(popup,'li'),
config.commands.revisions.revisionTemplate.format([modified,revision,tiddler.modifier]),
tiddler.text||config.commands.revisions.revisionTooltip,
function() {
config.commands.revisions.getTiddlerRevision(this.getAttribute('tiddlerTitle'),this.getAttribute('tiddlerModified'),this.getAttribute('tiddlerRevision'));
return false;
},
'tiddlyLinkExisting tiddlyLink');
btn.setAttribute('tiddlerTitle',userParams.tiddler.title);
btn.setAttribute('tiddlerRevision',revision);
btn.setAttribute('tiddlerModified',tiddler.modified.convertToYYYYMMDDHHMM());
if(userParams.tiddler.fields['server.page.revision'] == revision || (!userParams.tiddler.fields['server.page.revision'] && i==0))
btn.className = 'revisionCurrent';
}
}
};
config.commands.revisions.getTiddlerRevision = function(title,modified,revision)
{
var tiddler = store.fetchTiddler(title);
var context = {modified:modified};
return invokeAdaptor('getTiddlerRevision',title,revision,context,null,config.commands.revisions.getTiddlerRevisionCallback,tiddler.fields);
};
config.commands.revisions.getTiddlerRevisionCallback = function(context,userParams)
{
if(context.status) {
var tiddler = context.tiddler;
//store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags,tiddler.fields);
store.addTiddler(tiddler);
store.notify(tiddler.title,true);
story.refreshTiddler(tiddler.title,1,true);
displayMessage(config.commands.revisions.done);
} else {
displayMessage(context.statusText);
}
};
config.commands.saveTiddlerAndPut = {};
merge(config.commands.saveTiddlerAndPut,{
text: "done",
tooltip: "Save this tiddler and upload",
hideReadOnly: true,
done: "Tiddler uploaded"
});
config.commands.saveTiddlerAndPut.handler = function(event,src,title)
{
config.commands.putTiddlerRevision.handler(event,src,title);// save the old tiddler as a revision
var newTitle = story.saveTiddler(title,event.shiftKey);
if(newTitle)
story.displayTiddler(null,newTitle);
return config.commands.putTiddler.handler(event,src,newTitle);
};
config.commands.saveTiddlerHosted = {};
merge(config.commands.saveTiddlerHosted,{
text: "done",
tooltip: "Save changes to this tiddler",
hideReadOnly: true,
done: "done"
});
config.commands.saveTiddlerHosted.handler = function(event,src,title)
{
var tiddler = store.fetchTiddler(title);
if(!tiddler)
return false;
return invokeAdaptor('saveTiddlerHosted',tiddler,null,null,null,config.commands.saveTiddlerHosted.callback,tiddler.fields);
};
config.commands.saveTiddlerHosted.callback = function(context,userParams)
{
if(context.status) {
displayMessage(config.commands.saveTiddlerHosted.done);
} else {
displayMessage(context.statusText);
}
};
config.commands.deleteTiddlerHosted = {};
merge(config.commands.deleteTiddlerHosted,{
text: "delete",
tooltip: "Delete this tiddler",
warning: "Are you sure you want to delete '%0'?",
hideReadOnly: true,
done: "done"
});
config.commands.deleteTiddlerHosted.handler = function(event,src,title)
{
var tiddler = store.fetchTiddler(title);
if(!tiddler)
return false;
return invokeAdaptor('deleteTiddler',title,null,null,null,config.commands.deleteTiddlerHosted.callback,tiddler.fields);
};
config.commands.deleteTiddlerHosted.callback = function(context,userParams)
{
if(context.status) {
displayMessage(config.commands.saveTiddlerHosted.done);
} else {
displayMessage(context.statusText);
}
};
config.commands.diff = {};
merge(config.commands.diff,{
text: "diff",
tooltip: "View tiddler changes",
done: "done",
diffTooltip: "View this diff",
popupNone: "No changes",
diffTemplate: "%0 r:%1"
});
config.commands.diff.isEnabled = function(tiddler)
{
return isAdaptorFunctionSupported('getTiddlerDiff',tiddler.fields);
};
config.commands.diff.handler = function(event,src,title)
{
var tiddler = store.fetchTiddler(title);
var userParams = {tiddler:tiddler,src:src,dateFormat:'YYYY mmm 0DD 0hh:0mm'};
var revisionLimit = 10;
if(!invokeAdaptor('getTiddlerRevisionList',title,revisionLimit,null,userParams,config.commands.diff.callback,tiddler.fields))
return false;
event.cancelBubble = true;
if(event.stopPropagation)
event.stopPropagation();
return true;
};
config.commands.diff.callback = function(context,userParams)
// The revisions are returned as tiddlers in the context.revisions array
{
var revisions = context.revisions;
popup = Popup.create(userParams.src);
Popup.show(popup,false);
if(revisions.length==0) {
createTiddlyText(createTiddlyElement(popup,'li',null,'disabled'),config.commands.revisions.popupNone);
} else {
revisions.sort(function(a,b) {return a.modified < b.modified ? +1 : -1;});
for(var i=0; i<revisions.length; i++) {
var tiddler = revisions[i];
var modified = tiddler.modified.formatString(context.dateFormat||userParams.dateFormat);
var revision = tiddler.fields['server.page.revision'];
var btn = createTiddlyButton(createTiddlyElement(popup,'li'),
config.commands.diff.diffTemplate.format([modified,revision,tiddler.modifier]),
tiddler.text||config.commands.diff.diffTooltip,
function() {
config.commands.diff.getTiddlerDiff(this.getAttribute('tiddlerTitle'),userParams.src,this.getAttribute('tiddlerRevision'),null);
return false;
},
'tiddlyLinkExisting tiddlyLink');
btn.setAttribute('tiddlerTitle',userParams.tiddler.title);
btn.setAttribute('tiddlerRevision',revision);
btn.setAttribute('tiddlerModified',tiddler.modified.convertToYYYYMMDDHHMM());
if(userParams.tiddler.fields['server.page.revision'] == revision || (!userParams.tiddler.fields['server.page.revision'] && i==0))
btn.className = 'revisionCurrent';
}
}
};
config.commands.diff.getTiddlerDiff = function(title,src,rev1,rev2)
{
var tiddler = store.fetchTiddler(title);
var userParams = {src:src};
var context = {rev1:rev1,rev2:rev2};
// var context = {};
return invokeAdaptor('getTiddlerDiff',title,null,context,userParams,config.commands.diff.getTiddlerDiffCallback,tiddler.fields);
};
config.commands.diff.getTiddlerDiffCallback = function(context,userParams)
{
console.log("config.commands.diff.getTiddlerDiffCallback:"+context.diff);
var diff = context.diff;
popup = Popup.create(userParams.src);
Popup.show(popup,false);
if(diff.length==0) {
createTiddlyText(createTiddlyElement(popup,'li',null,'disabled'),config.commands.diff.popupNone);
} else {
for(var i=0; i<diff.length; i++) {
createTiddlyText(createTiddlyElement(popup,'li'),diff[i]);
}
}
};
}//# end of 'install only once'
//}}}
/***
|''Name:''|AdaptorMacrosPlugin|
|''Description:''|Commands to access hosted TiddlyWiki data|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#AdaptorMacrosPlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/AdaptorMacrosPlugin.js |
|''Version:''|0.3.8|
|''Date:''|Aug 23, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]] |
|''~CoreVersion:''|2.2.0|
***/
//{{{
// Ensure that the plugin is only installed once.
if(!version.extensions.AdaptorMacrosPlugin) {
version.extensions.AdaptorMacrosPlugin = {installed:true};
// Return an array of tiddler titles that are in the given workspace on the host
TiddlyWiki.prototype.getHostedTiddlers = function(host,workspace)
{
var results = [];
if(!this.hostedTiddlers || !this.hostedTiddlers[host])
return results;
var tiddlers = this.hostedTiddlers[host][workspace];
if(tiddlers) {
for(var i=0; i<tiddlers.length; i++) {
results.push(tiddlers[i].title);
}
}
return results;
};
config.macros.viewTiddlerFields = {};
config.macros.viewTiddlerFields.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
if(tiddler instanceof Tiddler) {
var value = '';
var comma = '';
for(i in tiddler.fields) {
if (!i.match(/^temp[\._]/)) {
value += comma + i + '=' + tiddler.fields[i];
comma = ', ';
}
}
if(tiddler.created)
value += comma + 'created=' + tiddler.created.convertToYYYYMMDDHHMM();
if(tiddler.modified)
value += ', modified=' + tiddler.modified.convertToYYYYMMDDHHMM();
if(tiddler.modifier)
value += ', modifier=' + tiddler.modifier;
value += ', touched=' + (tiddler.isTouched() ? 'true' : 'false');
highlightify(value,place,highlightHack,tiddler);
}
};
config.macros.list.updatedOffline = {};
config.macros.list.updatedOffline.handler = function(params)
{
var results = [];
store.forEachTiddler(function(title,tiddler) {
if(tiddler.fields['server.host'] && tiddler.isTouched())
results.push(tiddler);
});
results.sort();
return results;
};
config.macros.list.workspaceTiddlers = {};
config.macros.list.workspaceTiddlers.prompt = "List Tiddlers in the workspace";
config.macros.list.workspaceTiddlers.handler = function(params,wikifier,paramString,tiddler)
{
var customFields = getParam(params,'fields',false);
if(!customFields)
customFields = config.defaultCustomFields;
return store.getHostedTiddlers(customFields['server.host'],customFields['server.workspace']);
};
config.macros.updateWorkspaceTiddlerList = {};
merge(config.macros.updateWorkspaceTiddlerList,{
label: "update tiddler list",
prompt: "Update list of tiddlers in workspace",
done: "List updated"});
config.macros.updateWorkspaceTiddlerList.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
params = paramString.parseParams('anon',null,true,false,false);
var customFields = getParam(params,'fields',false);
if(!customFields)
customFields = String.encodeHashMap(config.defaultCustomFields);
var btn = createTiddlyButton(place,this.label,this.prompt,this.onClick);
btn.setAttribute('customFields',customFields);
btn.setAttribute('title',tiddler.title);
};
config.macros.updateWorkspaceTiddlerList.onClick = function(e)
{
clearMessage();
var customFields = this.getAttribute("customFields");
var fields = customFields.decodeHashMap();
var userParams = {host:fields['server.host'],workspace:fields['server.workspace'],title:this.getAttribute("title")};
return invokeAdaptor('getTiddlerList',null,null,null,userParams,config.macros.updateWorkspaceTiddlerList.callback,fields);
};
config.macros.updateWorkspaceTiddlerList.callback = function(context,userParams)
{
if(context.status) {
if(!store.hostedTiddlers)
store.hostedTiddlers = {};
if(!store.hostedTiddlers[userParams.host])
store.hostedTiddlers[userParams.host] = {};
store.hostedTiddlers[userParams.host][userParams.workspace] = context.tiddlers;
displayMessage(config.macros.updateWorkspaceTiddlerList.done);
story.displayTiddler(null,userParams.title);
story.refreshTiddler(userParams.title,1,true);
} else {
displayMessage(context.statusText);
}
};
config.macros.updateWorkspaceList = {};
merge(config.macros.updateWorkspaceList,{
label: "update workspace list",
prompt: "Update list of workspaces",
done: "List updated"});
config.macros.updateWorkspaceList.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
params = paramString.parseParams('anon',null,true,false,false);
var customFields = getParam(params,'fields',false);
if(!customFields)
customFields = String.encodeHashMap(config.defaultCustomFields);
var btn = createTiddlyButton(place,this.label,this.prompt,this.onClick);
btn.setAttribute('customFields',customFields);
btn.setAttribute('title',tiddler.title);
};
config.macros.updateWorkspaceList.onClick = function(e)
{
clearMessage();
var customFields = this.getAttribute("customFields");
var fields = customFields.decodeHashMap();
var userParams = {host:fields['server.host'],callback:config.macros.updateWorkspaceList.callback};
return invokeAdaptor('getWorkspaceList',context,fields);
};
config.macros.updateWorkspaceList.callback = function(context,userParams)
{
if(context.status) {
displayMessage(config.macros.updateWorkspaceList.done);
for(var i=0; i<context.workspaces.length; i++) {
displayMessage("workspace:"+context.workspaces[i]);
}
} else {
displayMessage(context.statusText);
}
};
} // end of 'install only once'
//}}}
Open MainMenu for editing. Position the cursor where the item is to appear and type in the name of the tiddler. If the tiddler's name is a WikiWord it will work automatically as a link. If not, insert two square brackets either side of the tiddler name: <code><nowiki>[[tiddler name]]</nowiki></code>.
Close MainMenu. You should now see the new item displayed.
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
Aliases can be used to provide synonyms for [[Wiki Links|wiki links]].
* [http://tiddlywiki.abego-software.de/Beta.html#TiddlerAliasPlugin TiddlerAliasPlugin]
* [http://jackparke.googlepages.com/jtw.html#PluralAliasPlugin PluralAliasPlugin]
{{Note|
The [http://www.TiddlyTools.com/#AliasPlugin AliasPlugin] is used to create text-substitution macros.
}}
== See Also ==
* [[Wiki Links#Loose Matching|Loose Matching]]
This macro generates a list of all tags used in the respective TiddlyWiki document.
IT also displays a count of the number of times each tag has been used.
== Usage ==
{{Review|section}}
<pre>
<<allTags [excludeTag]>>
</pre>
The optional <code>excludeTag</code> parameter specifies a tag to be ignored (usually "[[excludeLists]]") — this excludes tags that are themselves tagged with the specified tag.
[[Category:Macros]] [[Category:Core Macros]]
/***
|Name|DeprecatedFunctionsPlugin "packed"|
|Description|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin){version.extensions.DeprecatedFunctionsPlugin={installed:true};config.formatterHelpers.charFormatHelper=function(w){w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);};config.formatterHelpers.monospacedByLineHelper=function(w){var _3=new RegExp(this.lookahead,"mg");_3.lastIndex=w.matchStart;var _4=_3.exec(w.source);if(_4&&_4.index==w.matchStart){var _5=_4[1];if(config.browser.isIE){_5=_5.replace(/\n/g,"\r");}createTiddlyElement(w.output,"pre",null,null,_5);w.nextMatch=_3.lastIndex;}};config.macros.br={};config.macros.br.handler=function(_6){createTiddlyElement(_6,"br");};Array.prototype.find=function(_7){var i=this.indexOf(_7);return i==-1?null:i;};Tiddler.prototype.loadFromDiv=function(_9,_a){return store.getLoader().internalizeTiddler(store,this,_a,_9);};Tiddler.prototype.saveToDiv=function(){return store.getSaver().externalizeTiddler(store,this);};function allTiddlersAsHtml(){return store.allTiddlersAsHtml();}function applyPageTemplate(_b){refreshPageTemplate(_b);}function displayTiddlers(_c,_d,_e,_f,_10,_11,_12){story.displayTiddlers(_c,_d,_e,_11);}function displayTiddler(_13,_14,_15,_16,_17,_18,_19){story.displayTiddler(_13,_14,_15,_18);}var createTiddlerPopup=Popup.create;var scrollToTiddlerPopup=Popup.show;var hideTiddlerPopup=Popup.remove;var regexpBackSlashEn=new RegExp("\\\\n","mg");var regexpBackSlash=new RegExp("\\\\","mg");var regexpBackSlashEss=new RegExp("\\\\s","mg");var regexpNewLine=new RegExp("\n","mg");var regexpCarriageReturn=new RegExp("\r","mg");}
//}}}
/***
|Name|PreserveSpaceInTitlePlugin "packed"|
|Author|FND|
***/
//{{{
Story.prototype.saveTiddler=function(_1,_2){var _3=document.getElementById(this.idPrefix+_1);if(_3!=null){var _4={};this.gatherSaveFields(_3,_4);var _5=_4.title?_4.title:_1;if(store.tiddlerExists(_5)&&_5!=_1){if(!confirm(config.messages.overwriteWarning.format([_5.toString()]))){return null;}}if(_5!=_1){this.closeTiddler(_5,false);}_3.id=this.idPrefix+_5;_3.setAttribute("tiddler",_5);_3.setAttribute("template",DEFAULT_VIEW_TEMPLATE);_3.setAttribute("dirty","false");if(config.options.chkForceMinorUpdate){_2=!_2;}if(!store.tiddlerExists(_5)){_2=false;}var _6=new Date();var _7=store.tiddlerExists(_5)?store.fetchTiddler(_5).fields:(_5!=_1&&store.tiddlerExists(_1)?store.fetchTiddler(_1).fields:{});for(var n in _4){if(!TiddlyWiki.isStandardField(n)){_7[n]=_4[n];}}var _9=store.saveTiddler(_1,_5,_4.text,_2?undefined:config.options.txtUserName,_2?undefined:_6,_4.tags,_7);autoSaveChanges(null,[_9]);return _5;}return null;};
//}}}
/***
|Name|RenameButton "packed" and modified|
|Author|SaqImtiaz|
***/
//{{{
config.macros.rB={};config.macros.rB.handler=function(a,b,c,d,e,f){if(a.lastChild.tagName!="BR"){a.lastChild.firstChild.data=c[0];if(c[1]){a.lastChild.title=c[1]}}};
//}}}
/***
|Name|CoreChange "packed"|
|Source|JonnyLeRoy|
***/
//{{{
function checkDisplay(c){var d=c["displayMessage"];c["displayMessage"]=function(a,b){d.apply(this,arguments);setTimeout(clearMessage,30000)}}checkDisplay(this);
//}}}
/***
|Name|LinksToPlugin "packed"|
|Description|command for a popup of tiddlers linked to by current tiddler|
|Author|Ricardo SIGNES|
|Source|http://rjbs.manxome.org/hacks/js/tiddlywiki.html|
|License|BSD|
|Version|0.2.1|
***/
//{{{
config.commands.linksTo={text:"links to",tooltip:"Jump to a tiddler this one links to",popupNone:"No links",};config.commands.linksTo.handler=function(B,D,C){tiddler=store.getTiddler(C);tiddler.changed();var A=Popup.create(D);if(A){if(tiddler.links.length==0){createTiddlyText(createTiddlyElement(A,"li",null,"disabled"),this.popupNone)}else{for(i=0;i<tiddler.links.length;i++){createTiddlyLink(createTiddlyElement(A,"li"),tiddler.links[i],true)}}}Popup.show(A,false);B.cancelBubble=true;if(B.stopPropagation){B.stopPropagation()}return false};
//}}}
{{Incomplete}}
* tiddler titles: [http://weave.tiddlyspot.com/#AutoWeavePlugin AutoWeavePlugin]; [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/48852352699b43b3/d0fd14b5a796f4b5?#d0fd14b5a796f4b5 to some extent] also [http://www.TiddlyTools.com/#GotoPlugin GotoPlugin]
* tags: [http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin IntelliTaggerPlugin]
To select autosave, go to 'options' on the right-hand top menu. A blue box will open. Look around halfway down and click on 'autosave'.
The backstage area contains various system-related functions:
* [[Saving|Save]]: save to file
* [[Synchronizing|Sync]]: synchronize with external servers and files
* [[Importing|Import]]: import tiddlers from another file or server
* [[Tweaking|Tweak]]: advanced options
* [[Plugins]]: manage plugins
== Customization ==
The backstage is supposed to provide a safe fallback when the TiddlyWiki layout and/or functionality has been inadvertently broken due to user customizations.
Therefore, it purposefully is not easily customizable (when compared to the [[MainMenu]], for example).
Nevertheless, the backstage bar can be customized [[Dev:Backstage#Customization|by creating a simple plugin]].
== Plugins ==
* [http://mptw.tiddlyspot.com/#LessBackupsPlugin LessBackupsPlugin]
* [http://no-sin.com/wiki/WorkTracker.html#AlternateBackupPlugin AlternateBackupPlugin]
* [http://jackparke.googlepages.com/jtw.html#DoBackupMacro DoBackupMacro]
* [http://www.potto.client.jp/#%5B%5BBackup2Text%20Macro%5D%5D Backup2Text Macro]
* [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/experimental/BackupTiddlerPlugin.js BackupTiddlerPlugin]
* [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/RevisionAdaptorPlugin.js RevisionAdaptorPlugin]
* [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/TiddlerRevisionPlugin.js TiddlerRevisionPlugin] / [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/synchrotronPlugin.js SynchrotronPlugin] (experimental)
== See Also ==
* [[Change where backups are saved]]
* [[Configuration Options]]
*[[Changes to the default page layout]]
*[[Color changes]]
*[[Changes to the default TiddlyWiki formatting]]
*[[Special formatting within a tiddler]]
{{Incomplete}}
Many [[plugins]] can be loaded dynamically from [http://en.wikipedia.org/wiki/Bookmarklet bookmarklets], thus obviating the need for them to be installed on the respective [[TiddlyWiki]].
{{Note|cf. [http://groups.google.com/group/TiddlyWiki/t/39b8ff665ca1cfd7 <nowiki>[tw]</nowiki> "fields", "sync" etc. show no effect]}}
== See Also ==
* [http://lewcid.org/tiddlywiki-bookmarklets/ TiddlyWiki Bookmarklets] / [http://lewcid.org/2007/11/03/tiddlybookmarklets-everyday-tools-for-tiddlywiki-use/ TiddlyBookmarklets - everyday tools for TiddlyWiki use]
== Double Brackets in Links Are Not Rendered Properly ==
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/90af118e1dc2fb1c replace] the double brackets with their encoded equivalents, <code>%5B</code> and <code>%5D</code> respectively (see [[Firefox#Permalinks|Firefox]]).
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
{{Review}}
Sometimes the browser cache can prevent a TiddlyWiki from (re-)loading the most recent version of the file.
This client-side caching can be disabled by adding the following code to [[MarkupPostBody]]:
<pre>
<head>
<meta http-equiv="cache-control" content="no-cache" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
</head>
</pre>
{{Note|
For heavily frequented sites, disabling caching can have a significant impact on server performance.
}}
An alternative to disabling caching might be to [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/17ade817a9829f85 force a reload] on every save.
== See Also ==
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/1b879c5d78cbb5be/ <nowiki>[tw]</nowiki> Disabling cache for tiddlyspot]
This behaviour requires a plugin to be installed. Install SinglePageModePlugin from http://tiddlytools.com. See [[How do I install a plugin?]] for more info.
[[Category:FAQ]]
[[Category:Configuration]]
You can with Martin's new plugin support for diffrent markups. See:
http://www.martinswiki.com/#MediaWikiFormatterPlugin for MediaWiki markup
and http://www.martinswiki.com for other markup.
See also [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/a8b1e3cc62ae9268/53149b6d2b5c3427?lnk=gst&q=MediaWiki&rnum=1 google groups discussion]
[[Category:FAQ]]
[[Category:Configuration]]
{{Review}}
{{Merge|[[Server-Side Solutions]]}}
This question gets asked regularly on the mailing list. The answer is complicated. I'm going to attempt to write a definitive answer here.
==Standard TiddlyWiki==
Imagine you have a local shared network drive with a TiddlyWiki file on it. Now suppose in the morning you open the TiddlyWiki file and make some changes then save them. Then in the afternoon someone else opens the file and makes some more changes and saves them. This all works fine. If you have set your user name cookies, it will even show who edited each tiddler.
But now suppose you both open the file at the same time. If you edit some tiddlers then save the other user won't know about those edits. Then when she saves her TiddlyWiki it will overwrite your edits. This is obviously a major limitation and means that multi-user with a standard TiddlyWiki is not very useful. (see [[Can I use TiddlyWiki as a multi-user/collaborative/server based wiki?#TiddlyLock|TiddlyLock]] below for a simple solution to this problem)
==Server-side adaptations of TiddlyWiki==
There are a number of server side adaptations of TiddlyWiki. See [http://tiddlywiki.com/#ServerSide here] for more information. These server-side adaptations require that you setup and configure the appropriate web servers and databases to store tiddlers on the server, like a conventional wiki. Then as the adminstrator you can create users who must authenticate in order to edit tiddlers.
Depending on the version there might be additional features like access control settings and version history. The advantage of this type of setup is that you have a proper multi-user collaborative environment. The disadvantage is that there's quite a bit more work and technical skill required to setup, configure and administer the system, and you lose the ability to work offline, eg on a USB drive.
{{Quote|1=DaveG|2=
If I recall correctly in this situation you can use the export plugin (from Eric Shulman see http://www.TiddlyTools.com/#ExportTiddlersPlugin ) which can make a static html exported file for offline reading
}}
The two most active server-side adaptations seem to be [[ZiddlyWiki]], which runs on Zope, and [[ccTiddly]], which runs on PHP and MySQL.
==Standard TiddlyWiki via http, using UploadPlugin==
[http://tiddlywiki.bidix.info BidiX] has written a plugin that lets you upload your TiddlyWiki to a web server. You need to copy a single PHP file onto your web server, so there is less setup than a full serverside.
This situation is basically the same as a standard TiddlyWiki -- when there are multiple users editing, whoever saves last will overwrites any previous saves. [http://tiddlyspot.com Tiddlyspot] uses the UploadPlugin, so this applies for Tiddlyspot sites as well as sites where you use UploadPlugin on your own web server.
==Standard TiddlyWiki via http, using UploadPlugin and GroupAuthoringPlugin==
BidiX, the creator of UploadPlugin, has also written a tool called GroupAuthoringPlugin that can be used for allowing multi-user editing on a standard TiddlyWiki via http using UploadPlugin. The way it works is that if you want to do some editing you first "lock" the TiddlyWiki file. This creates a lock file on the server which prevents anyone else from uploading until you release the lock. For more information see [http://tiddlywiki.bidix.info here]. GroupAuthoringPlugin requires that you install some scripts on your web server (as does UploadPlugin) to handle the locking.
(Currently GroupAuthoringPlugin is not available on Tiddlyspot but there are plans to make it available some time in the future).
==Other Solutions to Investigate==
=== [http://minitiddlyserver.com MiniTiddlyServer] ===
[http://minitiddlyserver.com MiniTiddlyServer] (Project no longer available on this link) is a lightweight php based server side that is similar to UploadPlugin in that the TiddlyWiki on the server is a stock-standard TiddlyWiki, but includes some more advanced saving techniques, for example it can save only changed tiddlers. There is also some support for preventing overwritten data in a multi-user situation.
=== [http://tiddlyhome.bidix.info TiddlyHome] ===
[http://tiddlyhome.bidix.info TiddlyHome] from BidiX is based on UploadPlugin but allows easy creation of entire new sites and provides a way to provide update access to groups of users.
=== [http://www.minormania.com/tiddlylock/tiddlylock.html TiddlyLock] ===
[http://www.minormania.com/tiddlylock/tiddlylock.html TiddlyLock], by Richard Hobbis, uses a simple lock file mechanism to allow a TiddlyWiki to be stored on a shared network drive and viewed & edited by multiple users without fear of overwriting other users' changes or losing their own!
It works by maintaining a simple lock file (by default, in the same location as the TiddlyWiki file) that identifies who locked the TiddlyWiki, and when. Whilst the TiddlyWiki is being edited, other users are automatically put into Read-Only mode. As soon as the editing user has saved the TiddlyWiki it becomes available to other users for editing again, although they do have to reload the TiddlyWiki in order to see the changes made.
==Note==
Multi-user collaboration is not really TiddlyWiki's strong point. Many of the solutions mentioned above are experimental. If you need a serious multi-user wiki then perhaps you should consider using something other than TiddlyWiki, eg MediaWiki.
== See Also ==
* [[Server-Side Solutions]]
[[Category:FAQ]]
[[Category:Basics]]
Yes.
There are a couple of TiddlyWiki distributions that are designed for GTD (see [[What is GTD?]] for definition). They both come with special plugins specifically for doing GTD.
=== d<sup>3</sup>===
by Tom Otvos
* http://dcubed.ca/
=== MonkeyGTD ===
by Simon Baird
* http://monkeygtd.tiddlyspot.com
=== quickGTD ===
by sb56637
* http://quickgtd.uni.cc/
=== Using a regular TiddlyWiki for GTD ===
The idea of using TiddlyWiki for GTD comes originally from Nathan Bowers. His original GTD TiddlyWiki was basically just a regular TiddlyWiki with a new look and some GTD terminology. It is at http://shared.snapgrid.com/. (Don't use that though since it's based on an old TiddlyWiki core.) An updated version of the original GTD TiddlyWiki was created by Clint Checketts at http://www.checkettsweb.com/tw/gtd_tiddlywiki.htm
[[TiddlyWiki FAQ|<< Back to FAQ list]]
[[Category:FAQ]]
[[Category:GTD]]
Posts created by TiddlyWiki users in response to questions or complications regarding TiddlyWikis.
This is not a [[TiddlyWiki_FAQ|FAQ]] page, as the information here is not necessarily in response to questions that have been "frequently asked". Rather, the information available here has been deemed important/useful for other reasons.
The issues and solutions gathered on this page might later be fragmented into separate articles.
Intended to catagorize activities involving writing TiddlyWikis
{{Incomplete}}
Adaptations (also called [[vertical|verticals]] or [[editions]]) are variants of [[TiddlyWiki]] created for specific purposes.
{{Note|1=
In earlier versions of TiddlyWiki, the term "adaptations" used to describe [http://tiddlywiki.com/#TiddlyWikiAdaptations modifications of the TiddlyWiki core].<br>
More recent versions support [[plugins]] though, so that adaptations now tend to consist of a collection of plugins on top of the standard TiddlyWiki core code.
}}
Articles complying with {{SITENAME}}'s [[Project:Quality|quality standards]].
== See Also ==
* [[:Category:Errors]]
Coordination is the act of coordinating, making different people or things work together for a goal or effect. [1]
Various technologies are used in the coordination efforts.
*Two Google [[Groups]]
*This community wiki
*Blogs
*Unamesa website
*Delicious
*Twitter
*YouTube
*Vimeo
**[http://vimeo.com/tag:tiddlywiki TiddlyWiki Videos]
The TiddlyWiki project is attempting to coordinate its efforts more efficiently. [[Greg Wolf]] from [[UnaMesa]] instigated a debate the [[TW community]] about how best this could be achieved.[2]
=Meta=
The community efforts are coordinated on the [[Meta:Community_Portal]] page
==External Links==
[1] http://en.wikipedia.org/wiki/Coordination
[2] http://groups.google.com/group/TiddlyWiki/browse_frm/thread/7a4c60f0addc3960/cf638512df41f2ac?lnk=gst&q=eric+priceless#cf638512df41f2ac Greg Wolf's post to the TiddlyWiki Group on 20th Feb 2009
[[Core macros]] are [[macros]] built into the TiddlyWiki [[Dev:Core_Code_Overview|core code]].
[[Category:Macros]]
cf. [[Custom Macros]]
[[Category:Macros]]
Articles in category "Developer Tools"
This is the process of figuring out that a page is indeed better implemented as two or more other pages.
It's OK to disambiguate topics; it helps things in the long run, and even in the short run sometimes.
* [[You need to save this TiddlyWiki to a file before you can save changes]]
* [[Browser Issues]]
See also [[TiddlyWiki FAQ]] and [[:Category:FAQ Section]]
See also [[TiddlyWiki FAQ]] and [[:Category:FAQ]]
Posts created by TiddlyWiki users in response to questions or complications regarding TiddlyWikis.
This is not a [[TiddlyWiki_FAQ|FAQ]] page, as the information here is not necessarily in response to questions that have been "frequently asked". Rather, the information available here has been deemed important/useful for other reasons.
The issues and solutions gathered on this page might later be fragmented into separate articles.
Pages in this category are lacking important content and need to be expanded.
cf. [[Macros]]
[[Category:FAQ Section]]
See also [[Project Ideas]].
Shadow tiddlers are "preloaded" with default contents.
See [[Shadow Tiddlers]].
There are many parties that have an interest in the TiddlyWiki project. [[Osmosoft]] and [[UnaMesa]] are two, but there are many individual developers contributing to the project.
== External Resources ==
* [http://en.wikipedia.org/wiki/Stakeholder_(corporate) Wikipedia on Stakeholders]
Templates provide a means for easy standardization and to ensure visual and structural consistency.
== See Also ==
* [http://www.aboutus.org/Help:Template MediaWiki templates]
There are many parties that have an interest in the TiddlyWiki project. [[Osmosoft]] and [[UnaMesa]] are two, but there are many individual developers contributing to the project.
== External Resources ==
* [http://en.wikipedia.org/wiki/Stakeholder_(corporate) Wikipedia on Stakeholders]
'''Download (1.7.6)'''
[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.6.zip http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.6.zip]
'''Download (1.8.5 - requires PHP5)'''
[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.8.5.zip http://tiddlywiki.org/ccTiddly/ccTiddly_v1.8.5.zip]
'''Demo'''
[http://wiki.osmosoft.com/alpha http://wiki.osmosoft.com/alpha]
'''Release Notes'''
[http://www.tiddlywiki.org/wiki/CcTiddly/Releases ccTiddly Alpha Release Notes]
'''Community'''
If you would like to report a bug, request a feature or just ask for some help please post a message on the ccTiddly google group : [http://groups.google.com/group/ccTiddly ccTiddly Google Groups]
'''ccTiddly is a collaborative server side version of TiddlyWiki. (tiddlywiki.com) Its features include :'''
* Multiple workspaces (TiddlyWiki files)
* User Management
* OpenID, LDAP and Delegated Session management support.
* Revision management
* Tag based permissions model
* File Uploading
* Shows workspace viewing statistics
* Offline working (sync)
'''Additional Info'''
*[[CcTiddlyDeveloper | ccTiddly Developers]]
*[[CcTiddlyInstallation | ccTiddly Installation]]
*[[CcTiddlyConfig | ccTiddly Configuration]]
*[[CcTiddlyPermissions | ccTiddly Permissions information.]]
'''Whats going on with ccTiddly?'''
We’ve now got a couple of user groups within BT using ccTiddly. Their feedback is driving a wave of improvements that I’m working on with CoolCold, the man who originally created ccTiddly. If you would like to keep up to date with the developments with ccTiddly you should subscribe to the ccTiddly google groups.
= ccTiddly Getting Started Guide =
TiddlyWiki introduces the concept of a Tiddler which can be used to store data and code. ccTiddly stores tiddlers using three different methods which are discussed below.
===Tiddler Manipulation===
Tiddlers are stored in a number of place, initially they are stored in files. If a user has permissions to edit a tiddler (through the UI) their changes will always be stored in the database. (unless you directly manipulate the files)
====Shadow Tiddlers====
These are stored in the actual TiddlyWiki file. If a shadow Tiddler is not overridden by a file or database tiddler the shadow tiddler will always be used.
You should rarely need to edit Shadow Tiddlers in the TiddlyWiki document.
==== File Tiddlers ====
File tiddlers are added to the store when a ccTiddly workspace is requested.
File tiddlers are stored in one of the following folders :
/Tiddlers/
/Plugins/
==== Database Tiddlers ====
If a user has permissions to edit a tiddler the revisions will be stored in the database. Database tiddlers will override File and Shadow tiddlers.
In the ends all types of tiddler are presented to the user as plain tiddlers. It is only system administrators who realise they are store using different mechanisms.
If you wish to customise ccTiddly please ask for further details on the ccTiddly google groups.
If you would like to write some custom functionality using client side plugins I would recommend creating creating your own folder in the /tiddlers/ directory which will automatically be included in the TiddlyWiki file.
== Look and Feel ==
==== Themes ====
A theme tiddler is simply a tiddler that contains a number of other tiddlers.
So for example a theme tiddler could contain the following tiddlers :
* PageTemplate
* ViewTemplate
* EditTempalte
* StyleSheet
In the current TiddlyWiki release (2.4.1) themes do not support the ColorPalette tiddler.
NOTE : confusingly TiddlyWiki does not notify you when the tiddler you are editing is being overridden by a TiddlyWiki theme. If you are using theme you should take note which tiddlers are being overridden by your theme.
ccTiddly provides a themes directory in the tiddlers folder. To keep things simple it is suggested you store your themes in the same folder unless they corispond to a piece of functionality made available in a theme.
== Creating Your Own plugins ==
As of ccTiddly 1.8 Plugins will be available.
A plugin is simply a a collection of files to make a ccTiddly instace behave slightly differnt to its default behaviour.
Executing the install.sql file from the command line:
$ mysql --user=database_user --host=database_host_name --password
mysql> CREATE DATABASE `cctiddlydb` ;
Query OK, 1 row affected (0.01 sec)
mysql> use cctiddlydb
mysql> source install.sql
mysql> quit
To download the latest release:
$ wget http://tiddlywiki.org/ccTiddly/ccTiddly_v1.8.5.zip
$ unzip ccTiddly_v1.8.5.zip
To download the latest ccTiddly code from subversion:
$ svn export http://svn.tiddlywiki.org/Trunk/association/serversides/cctiddly/Trunk/ 1.8.5svn
= New Requirements =
===Mod-Rewrite===
If you wish to use nice friendly URLs. (wiki.osmosoft.com/simonmcmanus instead of wiki.osmosoft.com/?workspace=simonmcmanus) You will need to have mod-rewrite enabled. If you dont/cant/wont enable it then ensure $tiddlyCfg['use_mod_rewrite'] is set to 0 in the config.php file.
If you want help turning on mod-rewrite read over [http://simonmcmanus.wordpress.com/2007/10/22/enable-and-use-mod-rewrite/ this blog post ]
===DOM/XML===
This is only required for OpenID. If you don't have DOM/XML try installing it with YUM.
= Install Process =
Note: A BETA (use at your own risk!!!) automated install script for LINUX/BSD users is available [http://0x1a.nfshost.com/install_cctiddly.sh here].
*'''1.''' Verify you have the correct version of PHP installed (ccTiddly 1.8.1 requires PHP5)
*'''2.''' [[CcTiddlyDownload|Download ccTiddly and extract all files to a folder on your web server.]]
*'''3.''' Create a database, you can call it what you like, this database name will need to be entered into the includes/config.php file in step 5
*'''4.''' [[Details on running the install.sql file|Run the install.sql file]].
*'''5.''' Ensure that the settings in /includes/config.php are correct :
$tiddlyCfg['db']['host'] = "127.0.0.1"; sql host
$tiddlyCfg['db']['login'] = "DATABASEUSERNAME"; database login name
$tiddlyCfg['db']['pass'] = "DATABASEPASSWORD"; database login password
$tiddlyCfg['db']['name'] = "DATABASENAME"; db name (from step 3 above)
*'''6.''' If there is not already a .htaccess file in your root directory then you will need to create the file manually '''and copy the text from the following URL''' :
http://svn.tiddlywiki.org/Trunk/association/serversides/cctiddly/Trunk/.htaccess
*'''7.''' Visit the root of your server.
*'''8.''' Login as admin/password and click "password" on the right to change it.
* Hey presto, it should all be set up for you. Enjoy.
==Installation Translations==
[http://tiddlywiki.org/wiki/CcTiddly/Installation/German German]
== Tested Configurations ==
[http://www.apachefriends.org/en/xampp.html XAMPP]
== Previous Versions ==
* [[ccTiddly/v1.2 Installation|Installation instructions for ccTiddly v1.2]]
'''Installation ccTiddly 1.7.x (Ubuntu/Debian)'''<br>
Dieser Artikel beschreibt die Installation von ccTiddly 1.7 auf einem Ubuntu- oder Debian-System.
=Was brauche ich vorher schon?=
* Um das .zip File von der Communityseite entpacken zu können muss man den Packer "unzip" nachinstallieren. (unzip)
* Einen Webserver mit PHP5 (apache2, php5)
* Eine MySQL Datenbank auf der selben Maschine oder im Netzwerk (mysql-client, mysql-server)
** DB Name
** DB User
** DB Passwort
** DB Server
Installationsbefehl:
sudo apt-get install unzip apache2 mysql-client php5
=Download/Installation=
sudo mkdir /var/www/cctiddly17
cd /var/www/cctiddly17
sudo wget http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.6.zip
sudo unzip ccTiddly_v1.7.6.zip
sudo rm -R __MACOSX/
sudo rm ccTiddly_v1.7.6.zip
sudo mv 176/* ../cctiddly17/
sudo rm -R 176/
danach sollte ein Filelisting etwa so aussehen:
Befehl:
ls -l
<pre>
drwxr-xr-x 4 root root 4096 2008-11-27 14:32 build
drwxr-xr-x 3 root root 4096 2008-12-04 11:29 handle
drwxr-xr-x 3 root root 4096 2008-12-04 11:30 includes
-rw-r--r-- 1 root root 293109 2008-11-27 14:33 index.php
-rw-r--r-- 1 root root 6404 2008-11-27 14:33 install.sql
drwxr-xr-x 6 root root 4096 2008-11-27 14:32 lang
drwxr-xr-x 7 root root 4096 2008-11-27 14:32 plugins
-rw-r--r-- 1 root root 1429 2008-11-27 14:33 README.txt
drwxr-xr-x 8 root root 4096 2008-11-27 14:33 tests
drwxr-xr-x 8 root root 4096 2008-11-27 14:33 tiddlers
-rw-r--r-- 1 root root 3878 2008-11-27 14:33 upgrade.php
</pre>
=Konfiguration=
==mod-rewrite==
Auf dem Webserver muss das Apache Modul mod-rewrite aktiviert werden wenn man "friendly urls" wie (wiki.socialnerds.org/workspacename) statt (wiki.socialnerds.org/?workspace=workspacename) verwenden will. Falls es aus irgend einem Grund nicht möglich ist mod-rewrite zu aktivieren sollte die Variable tiddlyCfg['use_mod_rewrite'] auf 0 stehen ('''/var/www/cctiddly17/includes/config.php''').
Installationshilfe auf wiki.ubuntuusers.de: http://wiki.ubuntuusers.de/Apache/modrewrite
==Datenbank==
Jetzt sollte man mit Hilfe des install.sql Files die Datenbanstruktur erstellen (Tools wie phpmyadmin oder mysql-administrator können dabei nützlich sein, Tools: http://wiki.ubuntuusers.de/MySQL/Werkzeuge, MySQL: http://wiki.ubuntuusers.de/MySQL)
==.htaccess==
Im Webserver root-Verzeichnis (hier: '''/var/www/cctiddly17''') muss eine .htaccess Datei erstellt und dieser Inhalt hineinkopiert werden. (http://svn.tiddlywiki.org/Trunk/association/serversides/cctiddly/Trunk/.htaccess)
==config.php==
Die Datei '''/var/www/cctiddly17/includes/config.php''' ist die tiefste Ebene der Konfiguration von ccTiddly.
Datei mit einem Texteditor öffnen
sudo vi /var/www/cctiddly17/includes/config.php
===DB-Verbindung===
Es muss die entsprechende Datenbankverbindung eingetragen werden:
<pre>
// Initial Database Setup
$tiddlyCfg['db']['type'] = "mysql"; //sql type
$tiddlyCfg['db']['host'] = "dbserver"; //sql host
$tiddlyCfg['db']['login'] = "dbuser"; //login name
$tiddlyCfg['db']['pass'] = "dbpasswort"; //login password
$tiddlyCfg['db']['name'] = "dbname"; //db name
$tiddlyCfg['db']['port'] = "3306"; // db port
</pre>
===mod_rewrite===
und für "friendly urls" muss foldender Eintrag entsprechend geändert werden:
$tiddlyCfg['use_mod_rewrite'] = 1; // 1=using mod_rewrite, 0=pass parameter via ?workspace=name
==virtual host (Apache)==
Falls man sein ccTiddly an eine Domain wie zum Beispiel wiki.socialnerds.org binden will muss jetzt noch ein virtual host konfiguriert werden (die Konfiguration eines Domain Namens würde den Rahmen dieses Artikels sprengen, darum verweise ich auf die Wissensdatenbank von ubuntuusers.de http://wiki.ubuntuusers.de/DNS-Server_Bind):
cd /etc/apache2/sites-available/
sudo touch cctiddly17.socialnerds.org
Datei mit einem Texteditor (hier: VIM) öffnen:
sudo vi ccdiddly17.socialnerds.org
Sollinhalt:
<pre>
<VirtualHost *>
ServerName cctiddly.socialnerds.org
ServerAdmin admin@socialnerds.org
DocumentRoot /var/www/cctiddly17/
<Directory /var/www/cctiddly17/>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
</pre>
Seite mit Hilfe eines Sym-Links aktivieren:
cd /etc/apache2/sites-enabled/
sudo ln -s /etc/apache2/sites-available/cctiddly17.socialnerds.org cctiddly17.socialnerds.org
==Dateiupload==
Um Fileupload einzurichten ist es nötig ein Upload Verzeichnis zu erstellen (zwingend "uploads") und dem Apache User Schreibrechte darauf zu geben.
cd /var/www/cctiddly17
sudo mkdir uploads
sudo chown -R www-data\: uploads/
Apache neustarten:
sudo /etc/init.d/apache2 restart
'''Fertig!'''
=Links=
Quelle: http://tiddlywiki.org/wiki/CcTiddlyInstallation<br>
ccTiddly Wiki: http://tiddlywiki.org/wiki/CcTiddly<br>
Hersteller: http://osmosoft.com/<br>
Download: http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.6.zip<br>
Demo: http://wiki.socialnerds.org/sandbox<br>
Over the last few months I have been slowing working towards [[http://simonmcmanus.wordpress.com/2007/11/26/cctiddly-2x-an-overview/ ccTiddly 2.0]].
= Release History =
== [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.8.zip 1.8]] ==
* new plugin architecture
* Better notification on failed save.
* Distributed with the following Plugins :
** RSS
** Skinny Tiddlers
** FCKEditor
** OpenID
** lifestream
** TiddlyDocs
** SEO
** Wordpress Migration
There is a known issue : http://trac.tiddlywiki.org/ticket/997
== [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.5.zip 1.7.5]] - [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.6.zip 1.7.6]] ==
This release was used to test the 1.8 plugin functionality. It does not require PHP5 for basic operations but may install slightly easier on PHP5.
== [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.4.zip 1.7.4]] - [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.5.zip 1.7.5]] ==
* Introduces the ccChangeMacro password.
== [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.2.zip 1.7.2]] - [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.4.zip 1.7.4]] ==
*Bug fixes
** Renaming tiddlers maintains their revisions
** Its now possible to add new admins to the default workspace
== 1.7.1 - 1.7.2 ==
* Minor Bug fixes
* CSS fixes
* Further improvments in translation
* First release of <<stats>> plugin
== [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.zip 1.7]] - [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.7.1.zip 1.7.1]] ==
* Translations made easier.
* Better tracking of workspace view. This will be displayed in the stats macro in future versions.
* Some IE6 issues fixed.
== 1.6 - 1.7 ==
* Users can add workspace administrators
* Allows Offline working.
* ccFiles (users can view uploaded files)
* smmTheme (Theme distributed with ccTiddly)
* purpleTheme (Theme distributed with ccTiddly)
== [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.6.zip 1.6]] - [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.6.4.zip 1.6.4]] ==
==[[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.6.3.zip 1.6.3]] - [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.6.4.zip 1.6.4]] ==
* Improved error message when work is not saved.
* Standalone functionality returned
* ccUpload now works in Internet Explorer 6.
* Various browser fixes
* Session Timeout
** Session timeout can be turned off in the config
** session timeout is renewed on each request to the server
*TODO = Fix to ensure .htaccess file is included in the release
*Case issues in help file resolved
*Errors in help file corrected.
*Warning in place if tiddler has not been saved.
*SimpleTheme should now be applied if users are not logged in meaning they do not see the sidebars.
*default permissions improved
**default public security tag
**TODO : default private security tag
**TODO : improve error messages on failed workspace creation
* Ability to turn off workspaces
== [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.5.1.zip 1.5]] - [[http://tiddlywiki.org/ccTiddly/ccTiddly_v1.6.zip 1.6]] ==
* Improved User interface
* New User registeration
* Delegated Session Managment
* ccUpload Macro
* ccCreate Macro
==1.5.1 to 1.5.3==
* Improved HTTPS support
* Improved support for non port 80
* Improved security
==1.2 to 1.5==
* ccTiddly is now using the latest version of Tiddlywiki 2.3.0
* As a result the "backstage area" now works.
* Self-service Workspace Creation <<ccCreateWorkspace>>
* New login macro <<ccLogin>>
* New login status macro <<ccLoginStatus >>
* Proxy service - so that you can import from other URLs. - using BidXs proxy plugin.
* User management now sits in the database.
* Basic LDAP support.
* OpenID support.
* Users should no longer be shown links they are not allowed to click on (edit, delete).
note : each release of ccTiddly uses the ccTiddly release checklist which can be found at :
http://www.tiddlywiki.org/wiki/CcTiddlyDeveloper/ReleaseGuide
= Currently Incomplete =
* Install file
* Edit user profiles (passwords)
* ccHelp file including documentation of all the ccTiddly Macros
* Help Tiddler
* RSS feed is currently disabled
= Not Started =
* Personal tiddlers
If your interested in helping to develop, test or use any of these features please do make contact. We would also love to hear what things you are all developing and any mad ideas/use cases you may have.
= ccTiddly Online Estate : =
* http://groups.google.com/group/ccTiddly
** ccTiddly Google Groups
* http://simonmcmanus.com
** My Blog. (ccTiddly Developer)
* http://coolcold.wordpress.com
** CoolColds Blog. (ccTiddly Developer)
* http://tiddlywiki.org/wiki/CcTiddly.
** Community wiki for ccTiddly users.
* http://www.tiddlywiki.org/wiki/CcTiddlyDeveloper
** Community wiki for ccTiddly developers.
* http://svn.tiddlywiki.org/Trunk/association/serversides/cctiddly/Trunk/
** The SVN repoitory where you can find the very latest builds of ccTiddly.
* http://wiki.osmosoft.com/alpha/
** This URL hosts the very latest version of ccTiddly. Good if you need to test any code on the latest version.
This page provides information about the ccUpload and ccCreate interface. You can upload files to the ccTiddly server by POSTing to :
/handle/upload.php
on a server running ccTiddly 1.5.4 or greater.
=ccUpload=
You can test this upload functionality by typing <<ccUpload>> into any tiddler. The ccUpload macro accepts the following file types :
* gif* jpeg
* pjpeg
* txt
* xml
* html
The form will need have enctype="multipart/form-data"set. Below is a description of the fields that you can POST to :
====saveTo====
Should either be set to user or workspace / defines the area where the file will be saved.
====SessionToken====
The session token will need to have been set by ccTiddly.
====username====
This is only required if the file is going to be uploaded to the users area.
====userFile====
The type on this field should be set to file. type=file
====workspaceName====
Contains the workspace name to which the file should be uploaded.
====ccPath====
The path to which you wish to save the file. eg ... a/v/s/s
For security any attempt to go up a directory (../) will be removed. Any leading and ending slashes will also be stripped.
===ccUpload Example===
<pre>
<html>
<form id="ccUpload" action="handle/upload.php" enctype="multipart/form-data" method="post" target="uploadIframe">
<h1>Upload File</h1>
<div id="uploadStatus" class="uploadStatus"/>
<input id="username" class="username" type="hidden" name="username" value="admin"/>
<div id="shortStatus" class="shortStatus">Upload your file below </div>
<hr/>
<input id="ccfile" class="ccfile" type="file" name="userFile"/>
<input id="workspaceName" class="workspaceName" type="hidden" name="workspaceName" value=""/>
<input id="saveTo" class="saveTo" type="hidden" name="saveTo" value="workspace">workspace</input>
<input class="button" type="submit" value="Upload File"/>
<iframe id="uploadIframe" name="uploadIframe">
</iframe>
</form>
</html>
</pre>
=ccCreate=
ccCreate should *NOT* set enctype="multipart/form-data". The required fields are :
====saveTo====
Should either be set to user or workspace / defines the area where the file will be saved.
====SessionToken====
The session token will need to have been set by ccTiddly.
====username====
This is only required if the file is going to be uploaded to the users area.
====userFile====
The type on this field should be set to file. type=file
====workspaceName====
Contains the workspace name to which the file should be uploaded.
====ccHTMLName====
This is the name of the file that will be created on the server.
====ccPath====
The path to which you wish to save the file. eg ... a/v/s/s
For security any attempt to go up a directory (../) will be removed.
Note : Please be aware that you will need to ensure that you server allows file uploads of a reasonable size. You can configure this in your php.ini file by changing the line which reads :
; Maximum allowed size for uploaded files.
upload_max_filesize = 4M
===ccCreate Example HTML===
<pre>
<html>
<form enctype="multipart/form-data" action="handle/upload.php" method="post">
<h1>Create HTML file </h1>
Filename :
<input id="ccHTMLname" class="ccHMLname" name="ccHTMLname"/><br/>
add your HTML code to the textbox below :<br/>
<textarea id="ccHTML" class="ccHML" name="ccHTML" rows="20" cols="100"/><br/>
<input id="username" class="username" type="hidden" name="username" value="admin"/><br/>
<input id="workspaceName" class="workspaceName" type="hidden" name="workspaceName" value=""/>
Create the file in :<br/>
<input id="user" class="user" type="radio" name="saveTo" value="user"/>
My User Area<br/>
<input id="workspace" class="workspace" type="radio" name="saveTo" value="workspace"/>
Workspace Area<br/>
<input class="button" type="submit" value="Create File "/>
</form>
</html>
</pre>
If you experience any problems with this functionality please create a post on the google groups.
==TODO==
Check the servers max upload file size and display the user appropriate error message.
== Requirements ==
* MySQL
* PHP
== Installation Instructions ==
* unzip folder into directory on the web server where you wish ccTiddly to be hosted - this should be within the apache root directory (e.g. <code>/htdocs/cctiddly</code>)
* open the file <code>/htdocs/cctiddly/config/default.php</code> and update the following lines:
<pre>
$tiddlyCfg['db']['host'] = "localhost"; //sql host
$tiddlyCfg['db']['login'] = "root"; //login name
$tiddlyCfg['db']['pass'] = ""; //login password
$tiddlyCfg['db']['name'] = "cct"; //db name
</pre>
* save your changes and access the folder over HTTP: <code>http://127.0.0.1/cctiddly</code>
* assuming the user name has permissions to create a new database ccTiddly should take care of the rest
If you have any problems you should be able to get some help in the [http://groups.google.com/group/ccTiddly ccTiddly Google Group].
Please feel free to update this page.
This page aims to outline the steps required in order to release ccTiddly
* Stop coding.
* review incomplete tickets on trac
http://trac.tiddlywiki.org/query?status=new&status=assigned&status=reopened&component=ccTiddly&component=&milestone=ccTiddly+1.5&order=priority
* ensure index.php has been cooked from the latest tiddlywiki source.
When you check out the latest ccTiddly from SVN there is also be two extra folders, build and index. The files in the folders are used to generate index.php. In order to build these files you will need to download the entire Tiddlywiki core (not just the ccTiddly directory) And then use the cook (http://trac.tiddlywiki.org/wiki/Cook) proccess to generate the file.
* confirm plugins work with the latest version of Tiddlywiki
* SVN checkout to get the latest code
* Turn debug off in includes/config.php
* Insert blank database information into includes/config.php and ensure all other comments in config.php are up to date.
* Update version number in config.php
* Ensure all the Plugin Meta data is correct and against the latest version
* Test against the following browsers :
**IE
**FF
**Safari
In 1.6 this is done manually but we hope to get automatic tests in place soon.
*List
** Known issues
** future work - the areas that we will be working on in future releases
** Known weaknesses
** improvements
run build/release.sh to create automatically tag the release. - You will need to have SVN installed.
Version are being stored on the TiddlyWiki server. Contact FND for access.
* Update the tiddlywiki.org/ccTiddly/Release page
* Post of the google groups
* update the ccTiddly blog with info about the new release
==Future Work==
====the stuff we will be working on after this release=====
* ensure timeouts on login and register work correctly (ticket 467)
* ensuring all macros make use of the tiddlywiki wizards where appropriate. This will involve refactoring all of the ccTiddly macros
* putting in place tests around the TiddlyWiki macros
* after introducing the wizards we need to ensure that getElementById is no longer used.
* Naming convention - document the naming convention.
==Known Issues==
*Proxy script requires a black list
*Detect a space in the username
*Use wizards for all of the ccTiddly macros
== Permissions can be edited in the config/default.php file : ==
1 ..'''You create users by adding them to the array : '''
$tiddlyCfg['user'] = array("USERNAME1"=>"PASSWORD", "USERNAME2"=>"PASSWORD2");
example :
$tiddlyCfg['user'] = array("username"=>"password", "simon"=>"password");
2 .. '''To create a group add a new line after the users have been defined : '''
$tiddlyCfg['group']['GROUPNAME'] = array("USERNAME1", "USERNAME2");
example :
$tiddlyCfg['group']['admin'] = array("username", "simon");
3 .. '''You can then assign permissions against the group using : '''
$tiddlyCfg['privilege_misc']['group_default_privilege']['GROUPNAME'] = "PRIVILEGE";
example :
$tiddlyCfg['privilege_misc']['group_default_privilege']['admin'] = "AAAA";
4 ..'''You can also set permissions based on groups/tags : '''
$tiddlyCfg['privilege']['GROUPNAME']['TAGNAME'] = "PRIVILEGE";
examples :
$tiddlyCfg['privilege']['admin']['systemConfig'] = "AAAA";
$tiddlyCfg['privilege']['user']['systemConfig'] = "ADDD";
In this case admin users are given full access to tiddlers tagged systemConfig but users can only view them.
== PRIVILEGE SYSTEM ==
The new privilege system consist of four character, each represent a different action
privilege value
* (A) allow
* (D) deny
* (U)undefine/unchange
EXAMPLE : for a privilege string "ADAU", the privilege for a particular tiddler to the user would be
* (R) READ: allowed - the user is allowed to read
* (C) INSERT: deny - the user is NOT allowed to insert a tiddler with a certain tag
* (U) EDIT: allowed - the user is allow to edit the tiddler
* (D) DELETE: undefined undefined privilege. This would be replaced by either allowed or deny depending on the config "undefined_privilege"
*UNDEFINED (normally treated as DENY, see settings below) can be overwrited by ALLOW
*DENY has the highest priority and could not be overwrite by ALLOW/UNDEFINED
*NOTE: if a tiddler has several tag, of which one has deny in one of the privilege, it would be treated as deny on that privilege
*NOTE: rename a tiddler requires EDIT privilege
*NOTE: overwrite one tiddler with new tiddler requires EDIT privilege
*NOTE: overwrite a tiddler(A) with another tiddler(B) require DELETE privilege for tiddler (A) , and EDIT for the overwritting tiddler (B)
By default, selecting '<code>save changes</code>' will also create a backup copy (by default) of the TiddlyWiki in the same folder as the TiddlyWiki file itself. To avoid the folder filling up with copious backup files, you can create a folder for them.
* Go to '<code>options</code>' on the right-hand top menu ([[Sidebar]]),
* Click on '[[AdvancedOptions]]',
* Where it says 'name of folder to use for backups', type in a name for the folder (not the address of the folder),
* Close the AdvancedOptions tiddler.
Go to the folder you keep your TiddlyWiki in. You should now see a new folder with the name you just specified. From now on backups will be stored in this new folder.
To turn off the automatic backup function, got to '<code>options</code>' and untick [[AutoSave]].
=== See Also ===
* [[AdvancedOptions]]
* [[AutoSave]]
* [[Sidebar]]
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
==How color is determined in a TiddlyWiki==
The default colors in a TiddlyWiki file are determined by two shadow tiddlers, ColorPalette and StyleSheetColors.
*''ColorPalette'' is a list of "TiddlyWiki color terms" (e.g., "PrimaryMid") and the html or CSS color values assigned to each term (e.g., "#330066").
*''StyleSheetColors'' is a list of the colored areas of TiddlyWiki (e.g., ".headerForeground") with the color terms assigned to each.
==How to change the colors of a TiddlyWiki file==
The user can change the colors of a TiddlyWiki file by either:
*Changing the color values in the ColorPalette tiddler, or,
*Overriding default color assignments of the StyleSheetColors tiddler using the StyleSheet tiddler.
==Modifying the ColorPalette==
Modifying the color value assigned to a TiddlyWiki color term in the ColorPalette tiddler changes all the sections of the file that have that color term assigned to them. For example, changing the color assigned to PrimaryMid will affect the look of the header background and the SidebarOptions border, among other items. To change a color value, simply open the ColorPalette tiddler in edit mode and change the current color value to another value. For help determining the colors associated with various color values, several tools are available for free on the Internet, including the 4096 Color Wheel [http://www.ficml.org/jemimap/style/color/wheel.html] and the Coloria bonus list [http://www.coloria.net/bonus/colornames.htm].
==Modifying StyleSheetColors using StyleSheet==
The method outlined below does not change the color values used by TiddlyWiki. Rather, it changes the TiddlyWiki color term that governs the particular section of TiddlyWiki being changed. A section such as SideBarTabs, for example, can be assigned the TertiaryMid color value instead of the PrimaryPale color value. This allows the user flexibility in reassigning color combinations to various sections of TiddlyWiki. For example, a user may wish to have different colors assigned to the header background and the SideBarOptions border, where the default color scheme assigns the same color to both.
It is not recommended that you make changes directly to StyleSheetColors. Instead, make changes to the StyleSheet tiddler to override StyleSheetColors. For example, the StyleSheetColors tiddler has the following line of code:
<nowiki>h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}</nowiki>
This line controls the color assigned to the various levels of headlines within a tiddler's text. Copy and paste this line to your StyleSheet tiddler and change "SecondaryDark" to another color term, such as TertiaryPale. Click Done to revert to view mode. TertiaryPale is now the color term that governs the headlines rather than SecondaryDark.
==Related topics==
*[[The default TiddlyWiki color scheme]]
*[[ViewPalette]]
*[[ColorPalettePicker plugin]]
*[[Miscellaneous color recommendations for TiddlyWiki]]
The command <<closeAll>> closes all open [[Tiddler]].
You find it usually on the right hand side menu.
It is used like this:
<<closeAll>>
[[Category:Macros]]
see [http://trac.tiddlywiki.org/wiki/CodingConventions CodingConventions]
You can define colors in using the [[ColorPalette]] or the [[StyleSheet]]
With the ColorPalette you can change the look of your documents without having to dig into [[CSS]].
For example, your StyleSheet might have an entry like this:
body {
background-color: <nowiki>[[ColorPalette::Background]]</nowiki>;
}
This fetches the Background [[slice]]'s value (e.g. "#FFF") from the ColorPalette tiddler and inserts it in place.
Alternatively, you could define the respective color directly, right there in the StyleSheet:
body {
background-color: #FFF;
}
Note:
Some people (primarily programmers?) like the ColorPalette indirection to ensure consistency – although there are quite a few people who don't
like the ColorPalette at all.
==External Links==
[http://twhelp.tiddlyspot.com/#UsingColor A guide to using color on TW Help]
[[Category:Color]]
*[[Changes to the default colors]]
*[[The default TiddlyWiki color scheme]]
*[[ViewPalette]]
*[[ColorPalettePicker plugin]]
*[[Miscellaneous color recommendations for TiddlyWiki]]
As the American spelling of colour is the standard in computer code and culture.
Please visit [[Color]] to find out about using colour in TiddlyWiki.
{{Disambiguation}}
* [[Escaping|Code Comments]]
* [[Reader Comments]]
The community mainly gathers around the following Google Groups:
* [http://groups.google.com/group/TiddlyWiki/ users]
* [http://groups.google.com/group/TiddlyWikiDev/ developers]
In addition, there's also the [irc://irc.freenode.net/tiddlywiki IRC channel], [http://twitter.com/TiddlyWiki Twitter], [http://delicious.com/tag/TiddlyWiki Delicious] and many other resources on the web.
== Documentation ==
Contributions in these areas are welcome:
* [tbd]
== Outreach ==
* TiddlyWiki on the [[OLPC]]
== Development ==
* TiddlyWiki core testing
{{Incomplete}}
Almost everything in [[TiddlyWiki]] is controlled via [[Tiddler|tiddlers]].
* [[Tiddlers]]
* [[HTML Templates]]
* [[Style Sheets]]
* [[Macros]]
* [[Plugins]]
* [[Cookies]] (used for storing certain user options)
TiddlyWiki provides document authors with a relatively ubiquitous yet surprisingly malleable and extensible means of organizing content.
At a very simple level, [[tiddlers]] are named chunks of document content (information), potentially with some tags on them for cross-reference.
Think "named, tagged digital 3-by-5 cards", if you wish; it's almost that straightforward. Unless artificially restricted by dumbed-down view and/or edit templates, [[tiddler]] content is normally malleable within an open TiddlyWiki document.
TiddlyWiki documents are relatively unique in that respect; the TW core allows end-users - document viewers - to actually modify the content they're viewing.
When you're viewing a TW document "server side" - with an http colon-slash-slash not a file-colon-slash-slash - the question then becomes, how can someone save any changed tiddlers they've created - where can they be put? There are a few possibilities; TiddlyTools save-from-web can work in many cases, as can using an online server type TW document such as a TiddlySpot document.
Tiddler importing and exporting is quite a bit more powerful and capable when you think about applying filters such as by-tag to inter-document tiddler transfers.
Coral is a TiddlyWiki adaptation that runs on JEE compliant servers.
Our project resides in http://coral.dev.java.net/
From the technical perspective, coral is a little different from other server-side adaptations of tiddly wiki, because it doesn't save the whole tiddly wiki file on the server. It stores only the tiddlers' data in a single database table and reads them over demand, through an ajax interface (we use the excellent [[DWR|http://getahead.org/dwr]] framework for that.)
One clear advantage of this approach is the speed of the first loading of the wiki, through the web. Once the tiddlers are loaded over demand from the server, just the TiddlyWiki "engine" must be loaded (with the tiddler names, sure). It's more significant in the same measures of the size of the content of your wiki.
The bad thing about this is primarily because of the (in some way) "subversion" of the all-in-the-client model from tiddly wiki, and consequential increase of the complexity of the system. Some plugins may suffer from this approach. This is the case, for example for the embedded "search" feature from tiddly-wiki. We'll have to adapt it to, in order to make it search in the content that was not yet loaded to the client.
It's always a trade of, sure!
One other thing that may deserve to be here is the definition of what we called "namespaces". This constitutes separate, independent content that we can store in the server. It works like separate TiddlyWiki files. To link from one namespace to another, we use a syntax like MyNamespace::MyTiddler. To create a new namespace, one should simply link to a new namespace, in the same way.
We have some ideas about how to improve coral, like the structuring of the namespaces, maybe hierarchically; version control of the content; adaptation of some very useful plug-ins; etc.
{{Incomplete}}
{{Review}}
==Introduction==
This is a summary of the macros provided by TiddlyWiki in the core grouped by category. Additional macros ([[Custom Macros]]) can be added by the user, either by copying them into the TiddlyWiki from a repository or by coding them.
== Information ==
Macros that provide system information.
* [[Today (macro)|Today]]
* [[Version (macro)|Version]]
== Listings ==
Macros that provided lists of information from the Tiddlers.
* [[Timeline (macro)|Timeline]]
* [[Alltags (macro)|Alltags]]
* [[List (macro)|List]]
== Tagging ==
Macros to query and manipulate tags.
* [[Tag (macro)|Tag]]
* [[Tags (macro)|Tags]]
* [[Tagging (macro)|Tagging]]
== Transclusion ==
Macros to include the contents of other Tiddlers ([[Transclusion]]).
* [[Slider (macro)|Slider]]
* [[Tabs (macro)|Tabs]]
* [[Tiddler (macro)|Tiddler]]
== Editing ==
Macros to aid in editing Tiddlers.
* [[NewTiddler (macro)|NewTiddler]]
* [[NewJournal (macro)|NewJournal]]
* [[SaveChanges (macro)|SaveChanges]]
== Navigation ==
Macros to navigate through the TiddlyWiki.
* [[Search (macro)|Search]]
* [[CloseAll (macro)|CloseAll]]
* [[Permaview (macro)|Permaview]]
== Special Effects ==
Macros to provide special visual effects.
* [[Gradient (macro)|Gradient]]
== Internal ==
Macros used by TiddlyWiki to provide core functionality.
* [[Annotations (macro)|Annotations]]
* [[Edit (macro)|Edit]]
* [[Message (macro)|Message]]
* [[Refreshdisplay (macro)|Refreshdisplay]]
* [[View (macro)|View]]
* [[Toolbar (macro)|Toolbar]]
* [[Tagchooser (macro)|Tagchooser]]
[[Category:Macros]] [[Category:Core Macros]]
{{Incomplete}}
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/292aa8943536bf93/11ca9f0e684212aa?#11ca9f0e684212aa Eric]|2=
<pre>
CryptoFunctionsPlugin
- provides supporting functions for generating SHA1-encrypted keys
for any given content. Please note that, as of the soon-to-be-release
TW2.4, these functions have been re-incorporated into the core code so
that they are always available for use by plugins that need them.
DeprecatedFunctionsPlugin
- contains definitions for core variables and/or functions that
have been replaced or made obsolete by more recent core releases and
have been removed from the built-in core functionality.
DeprecatedFunctionsPlugin provides a backward-compatibility layer to
allow older plugins that may still contain references to these
variables and functions to continue to operate without modification.
Of course, over time, plugin authors will hopefully update their code
to avoid these older functions, so that the DeprecatedFunctionsPlugin
will not needed in most documents.
LegacyStrikeThroughPlugin
- early versions of TiddlyWiki used "==content==" to invoke
'strikethrough' character formatting. However, many other wikis use
"--" as the delimiters for strikethrough. In addition, "==" often
occurs within javascript code (it is the "equal to" comparison
operator), which resulted in unwanted strikethrough being displayed
when 'code samples' were rendered as tiddler content. After much
discussion, it was decided to change the syntax to provide greater
consistency with the formatting used by other systems, allowing easier
cut-and-paste between TiddlyWiki and those systems.
LegacyStrikeThroughPlugin provides backward-compatibility for
continued support of "==" that may still occur in older tiddler
content that has not be updated.
SparklinePlugin
- The <<sparkline>> macro can be used to generate and embed a kind
of 'mini line graph' directly into tiddler content. However, this
feature was rarely used. To save core space, the macro definition and
related support functions were removed from the core and turned into a
plugin that could be installed only as needed.
</pre>
}}
There have been multiple reports of [[TiddlyWiki]] not being rendered properly.
The most likely cause for this is the respective network (e.g. in a corporate environment) filtering the incoming traffic due to the use of JavaScript.
Certain applications (e.g. [http://faq.tiddlyspot.com/#%5B%5BI%20always%20get%20a%20blank%20screen%20instead%20of%20my%20TiddlyWiki%20(even%20when%20I%20look%20at%20my%20offline%20copy)%5D%5D Norton security software], but also [[Greasemonkey]] scripts) are known to interfere with TiddlyWiki.
It's sometimes possible to circumvent this by [http://tiddlywiki.com/#%5B%5BAdvanced%20download%20options%5D%5D downloading the ZIP archive].
== See Also ==
* [[TiddlyWiki has been incorrectly saved]]
== External Resources ==
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/9d7fd0fb404878ce <nowiki>[tw]</nowiki> Buttons on right sidebar]
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/44a770d7ec6cf1be <nowiki>[tw]</nowiki> since v.2.4.0 the rightside navigation and backstage links are missing]
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/51b9981a8883fbfb <nowiki>[tw]</nowiki> incorrect view of right hand side menu <<search>><<...]
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/b6ea15f5a8c6c0e0 <nowiki>[tw]</nowiki> Right-side controls not displaying properly for me]
Click on 'new tiddler' (top right-hand menu). A new tiddler will open.
To name the tiddler, type over the words 'new tiddler' in the top text box.
Enter the tiddler's contents into the main text box.
Click on Done (grey menu at top right of tiddler).
To add the tiddler to the menuu, see [[Add Menu Item]].
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
Custom Macros are all [[Macros]] in a TiddlyWiki that are not part of [[Core Macros]]. Custom macros can be coded by the user, or copied from another site or repository.
Much of the power of TiddlyWiki lies in the ease with which users can create macros and Plugins to customize their wikis, and share them with each other.
Information on how to code a Custom Macro can be found in [[Dev:Custom Macros]]
[[Category:Incomplete]][[Category:Macros]][[Category:Custom Macros]]
{{Incomplete}}
TiddlyWiki is inherently flexible; with some basic knowledge of HTML and CSS, the entire layout can be easily adjusted.
All layout and style definitions are stored in [[Shadow Tiddler|shadow tiddlers]] by default, and can thus be modified from within the TiddlyWiki interface:
{| class="wikitable"
|-
! Shadow Tiddler
! Description
|-
! colspan="2" align="center" | HTML Templates
|-
| [[PageTemplate]]
| HTML code for the composition of the overall page design.
|-
| [[ViewTemplate]]
| HTML code for the individual [[Tiddler|tiddlers]]' layout
|-
| [[EditTemplate]]
| HTML code for the tiddler editing mode
|-
! colspan="2" align="center" | Style Sheets
|-
| [[StyleSheet]]
| CSS code for custom user styles
|-
| [[StyleSheetColors]]
| CSS code for default color styles
|-
| [[StyleSheetLayout]]
| CSS code for default layout styles
|-
| [[StyleSheetLocale]]
| CSS code for locale-specific definitions
|-
| [[StyleSheetPrint]]
| CSS code for default printing styles
|-
| [[ColorPalette]]
| color scheme
|}
{{StyleSheetsWarning}}
== See Also ==
* [[Getting started with custom tiddler fields|Custom Tiddler Fields]]: Arbitrary custom fields within tiddlers.
* [[Getting started with custom tiddler fields]]
* [[TiddlyWiki Themes]]
* [[MonkeyGTD]]
* [[Changing default options]]
* [[Changes to the default page layout]]
* [[Color changes]]
[[Category:Incomplete]]
#REDIRECT [[DefaultTiddlers]]
[[FAQViewer]]
[[Known Issues]]
[[Get MediaWiki Content]]
[[Support]]
[[MainMenu]]
'''Interactive delete'''
Open the tiddler for editing. Click on Delete (grey menu at top right of tiddler).
'''Consider installing the TrashPlugin'''
See http://ido-xp.tiddlyspot.com/#TrashPlugin
This allows a delete to be undone
However you will want to Empty The Trash Regularly as you can't reuse a tiddler name until it is really deleted.
'''Deleting a Tiddler which is also a Tag'''
When you have "Reference Needed"
Deleting a Tiddler which is also a Tag will prompt you with "remove tag from N tiddlers"
'''Batch Delete'''
This can be achieved when using the Export Tiddler Plugin
http://www.TiddlyTools.com/#ExportTiddlersPlugin
Or using the DelleteAllTagged bookmarklet
http://lewcid.org/tiddlywiki-bookmarklets/
A bookmarklet is a small piece of JavaScript code, which you can save as a bookmark.
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
{{Incomplete}}
{{Quote|1=[http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/d14ec01af14e4f8f Schilke]|2=
There have been many discussions around this problem but there doesn't
seem to be any satisfying solution - or at least conclusion - so [we should start] to collect the related threads, solutions, requests and suggestions [...]
Here's the thread which had been the trigger for this approach:
[http://groups.google.com/group/TiddlyWiki/browse_frm/thread/9ae489df5c69f19f <nowiki>[tw]</nowiki> Google sitemap again]
A search in all three groups gives a quick overview about the issue:
* [http://groups.google.com/group/TiddlyWiki/search?q=seo&start=0&scoring=d "seo" in <nowiki>[tw]</nowiki>]
* [http://groups.google.com/group/GTD-TiddlyWiki/search?q=seo&start=0&scoring=d "seo" in <nowiki>[twdev]</nowiki>]
* [http://groups.google.com/group/TiddlyWikiDev/search?q=seo&start=0&scoring=d "seo" in <nowiki>[gtdtw]</nowiki>]
(You might also search for "(web) publishing", "sitemap" and related
terms)
}}
== Saving Static HTML ==
* [http://jaybyjayfresh.com/2008/01/24/tiddlytemplating-part-2-a-prototype-that-works/ TiddlyTemplating]
== See Also ==
* [[Accessibility]]
<code>
Adaptor.close()
</code><br/>
Should only be called after the last callback has completed
Closes an adaptor, severing the connection to the workspace and host (see ServerAdaptorConcepts).
* [[Dev:Adaptor.close|Adaptor.close]] shouldn't be called while there are outstanding callbacks
* [[Dev:Adaptor.close|Adaptor.close]] must be called to ensure that all pending write operations are completed
'''Parameters:'''
None.
'''Returns:'''
{| border="1"
|true||on success
|-
|string||an error message if there was an error issuing the request
|}
[[Category:Adaptors]]
<code>
Adaptor.getTiddler(title,context,userParams,callback)
</code><br/>
Retrieves a named tiddler from an adaptor opened to a workspace on a host (see [[Dev:ServerAdaptorConcepts|ServerAdaptorConcepts]]). This function uses the [[Dev:AsynchronousPattern|AsynchronousPattern]].
'''Parameters:'''
{| class="wikitable"
!title
|Title of the tiddler to retrieve
|-
!context
|context object that is passed to the callback function
|-
!userParams
|user settable object object that is passed on unchanged to the callback function
|-
!callback
|Reference to callback function, see [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]]
|}
'''Returns:'''
{| class="wikitable"
!true
|on success
|-
!string
|an error message if there was an error issuing the request
|}
'''Callback signature''' as per [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]] with additional fields:
{| class="wikitable"
!context.tiddler
|The retrieved tiddler object, with all the standard fields and the [[Dev:ServerAdaptorExtendedFields|ServerAdaptorExtendedFields]] filled in
|}
[[Category:Adaptors]]
<code>
Adaptor.getTiddlerList(context,userParams,callback,filter)
</code><br/>
Gets a list of the tiddlers available on an adaptor opened to a workspace on a host (see ServerAdaptorConcepts). This function uses the AsynchronousPattern.
'''Parameters:'''
{| border="1"
|context||context object that is passed to the callback function
|-
|userParams||user settable object object that is passed on unchanged to the callback function
|-
|callback||reference to callback function, see [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]]
|-
|filter||optional string to select tiddlers returned in list, see TiddlerSelection
|}
'''Returns:'''
{| border="1"
|true||on success
|-
|string||an error message if there was an error issuing the request
|}
'''Callback signature''' as per [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]] with additional fields:
{| border="1"
|context.tiddlers||Array of tiddlers, with a minimum set of fields filled in, see below
|}
The tiddlers in the <code>context.tiddlers</code> array have the following minimum set of fields, although particular adaptors may choose to return additional information in further fields.
{| border="1"
|title||Title of the tiddler (as used in [[Dev:Adaptor.getTiddler|Adaptor.getTiddler]])
|}
[[Category:Adaptors]]
<code>
Adaptor.getWorkspaceList(context,userParams,callback)
</code><br/>
Gets a list of the workspaces available on a particular host (see [[Dev:ServerAdaptorConcepts|ServerAdaptorConcepts]]). This function uses the [[Dev:AsynchronousPattern|AsynchronousPattern]].
'''Parameters:'''
{| border="1"
|context||context object that is passed to the callback function
|-
|userParams||user settable object object that is passed on unchanged to the callback function
|-
|callback||Reference to callback function, see [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]]
|}
'''Returns:'''
{| border="1"
|true||on success
|-
|string||an error message if there was an error issuing the request
|}
'''Callback signature''' as per [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]] with additional fields:
{| border="1"
|context.workspaces||An array of information about each available workspace (see below)
|}
The entries in the <code>context.workspaces</code> array have the following minimum set of fields, although particular adaptors may choose to return additional information in further fields.
{| border="1"
|title||Title of the workspace (as used in [[Dev:Adaptor.openWorkspace|Adaptor.openWorkspace]])
|}
[[Category:Adaptors]]
<code>
Adaptor.openHost(host,context,userParams,callback)
</code><br/>
Creates an adaptor for talking to a particular host (see [[Dev:ServerAdaptorConcepts|ServerAdaptorConcepts]]). This function uses the [[Dev:AsynchronousPattern|AsynchronousPattern]].
'''Parameters:'''
{| border="1"
|host||URI of server
|-
|context||context object that is passed to the callback function
|-
|userParams||user settable object object that is passed on unchanged to the callback function
|-
|callback||Reference to callback function, see [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]]
|}
'''Returns:'''
{| border="1"
|true||on success
|-
|string||an error message if there was an error issuing the request
|}
'''Callback signature''' as per [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]].
[[Category:Adaptors]]
<code>
Adaptor.openWorkspace(host,context,userParams,callback)
</code><br/>
Opens a particular workspace in an adaptor that has already been opened on a host (see [[Dev:ServerAdaptorConcepts|ServerAdaptorConcepts]]). This function uses the [[Dev:AsynchronousPattern|AsynchronousPattern]].
'''Parameters:'''
{| border="1"
|workspace||Name of workspace
|-
|context||context object that is passed to the callback function
|-
|userParams|user settable object object that is passed on unchanged to the callback function
|-
|callback||Reference to callback function, see [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]]
|}
'''Returns:'''
{| border="1"
|true||on success
|-
|string||an error message if there was an error issuing the request
|}
'''Callback signature''' as per [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]].
[[Category:Adaptors]]
<code>
Adaptor.putTiddler(tiddler,context,userParams,callback)
</code><br/>
Stores a named tiddler to an adaptor opened to a workspace on a host (see [[Dev:ServerAdaptorConcepts|ServerAdaptorConcepts]]). This function uses the [[Dev:AsynchronousPattern|AsynchronousPattern]].
'''Parameters:'''
{| border="1"
|tiddler||The Tiddler to store
|-
|context||context object that is passed to the callback function
|-
|userParams||user settable object object that is passed on unchanged to the callback function
|-
|callback||Reference to callback function, see [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]]
|}
'''Returns:'''
{| border="1"
|true||on success
|-
|string||an error message if there was an error issuing the request
|}
'''Callback signature''' as per [[Dev:AdaptorCallbackSignature|AdaptorCallbackSignature]].
[[Category:Adaptors]]
<code>
callback(context,userParams)
</code><br/>
{| border="1"
|userParams||userParams object (unchanged) as passed by the original caller
|}
context contains the following fields:
{| border="1"
|context.status||True if original call was successful, false if there was an error
|-
|context.statusText||Error message if context.status is false
|-
|context.adaptor||Reference to the adaptor object
|}
Additionally, context may contain the following fields, depending on the adaptor function originally called:
{| border="1"
|context.workspaces||Array of workspaces, see [[Dev:Adaptor.getWorkspaceList|Adaptor.getWorkspaceList]]
|-
|context.tiddler||Tiddler retrieved, see [[Dev:Adaptor.getTiddler|Adaptor.getTiddler]]
|-
|context.tiddlers||Array of Tiddlers retrieved, not all Tiddler fields filled in, see [[Dev:Adaptor.getTiddlerList|Adaptor.getTiddlerList]]
|-
|context.revisions||Array of revisions of the current Tiddler, not all Tiddler fields filled in, see [[Dev:Adaptor.getTiddlerRevisionList|Adaptor.getTiddlerRevisionList]]
|}
[[Category:Adaptors]]
The <tt>addNotification</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object ties an external function (called a callback here) to a tiddler. Whenever that tiddler is changed by the author, the callback function is invoked. TheTiddlyWiki code only passes the title of the changed tiddler to the callback function; it's up to the callback to dig up what it needs to act appropriately based on the change. This method takes two parameters:
* the title of the tiddler
* a reference to the callback function
It is possible to call this method with a null value for the first parameter. You must specify null, not an empty string. The callback function then is invoked for every tiddler, but only if either:
* notifications are running via the [[TiddlyWiki.notifyAll|notifyAll]] method
* the <tt>notify</tt> method is called with the second parameter set to true
Asynchronous methods are used by the low level http functions, and by higher level mechanisms such as the [[Dev:ServerAdaptorMechanism|ServerAdaptorMechanism]].
The standard TiddlyWiki approach is illustrated with this example of a <code>procrastinate()</code> function that takes a string parameter which is then returned after 1 second by a callback function:
<code>
// Call an asynchronous function
function test()
{
// The context object is for storing information that you're going to need inside the callback function
var myContext = {
param1: "a string",
param2: {an: "object"},
param3: ["an","array"]
};
// Call the function including a reference to the callback function and it's context
procrastinate("hello tomorrow's world",myCallback,myContext);
}
// The callback function that gets invoked after 1 second
function myCallback(status,context,procrastinatedString)
{
displayMessage("Message from the past: " + procrastinatedString);
displayMessage("Message context: " + context.param1);
}
// The procrastinate function invokes a callback after 1 second with a specified string parameter
// procrastinatedString - the string to pass back to the callback function
// callback - the callback function
// context - a context object that is passed to the callback function
// Returns true if the request was issued or a string error message if it failed
function procrastinate(procrastinatedString,callback,context)
{
window.setInterval(callback,1000,true,context,procrastinatedString);
}
</code>
Asynchronous programming is necessary in several situations but is full of pitfalls for the unwary:
* On many browsers, <code>alert()</code> doesn't work reliably in some asynchronous callbacks
* It's very easy to miss errors by ignoring callback returns
[[Category:Adaptors]]
== Customization ==
=== Backstage Tabs ===
The following sample code adds the contents of [[SideBarOptions]] as a new backstage tab (called "myTab"):
<pre>
//{{{
config.tasks.myTab = {
text: "my custom tab",
tooltip: "A custom backstage tab",
content: "<<tiddler SideBarOptions>>"
};
config.backstageTasks.push("myTab");
//}}}
</pre>
=== Command Buttons ===
In order to add a command button directly to the backstage bar, the <code>action</code> property should be used to reference a JavaScript function (no arguments are passed).
For example, the standard backstage button for ''Save'' is defined as follows:
<pre>
save: {
text: "save",
tooltip: "Save your changes to this TiddlyWiki",
action: saveChanges
}
</pre>
If the desired function does not have a convenient entry point, or if certain functions need arguments passed to them, an anonymous function declaration can be used as a "wrapper":
<pre>
//{{{
config.tasks.myTab = {
text: "username",
tooltip: "set your TiddlyWiki user name",
action: function() {
var newName = prompt("Please enter a new username:", config.options.txtUserName);
if(!newName || !newName.length)
return false; // canceled by user
config.options.txtUserName = newName;
saveOptionCookie("txtUserName");
}
};
config.backstageTasks.push("myTab");
//}}}
</pre>
=== Other Elements ===
Adding content other than tabs or buttons to the backstage bar requires [[Dev:Hijacking|hijacking]] the <code>backstage.init()</code> function in order to render those elements directly into the <code>backstageToolbar</code> element.
{{Note|
While hijacking the core function is necessary for this purpose, it could corrupt the backstage if there is an error in the respective code.
Since the backstage serves as a fallback mechnanism in case there are other problems, this should be used with caution.
}}
For example, the following code adds the search box to the backstage toolbar (inside a container with the [[Wiki Markup#Custom Styling|class]] <code>searchBox</code>):
<pre>
//{{{
backstage.init_old = backstage.init;
backstage.init = function() {
var s = "{{searchBox{<<search>>}}}";
this.init_old.apply(this, arguments);
wikify(s, document.getElementById("backstageToolbar"));
};
//}}}
</pre>
== See Also ==
* [[Backstage]]
{{Incomplete}}
== Metadata ==
cf. [[Dev:Plugin Specifications|Plugin Specifications]]
== Code Structure ==
{{Note|The samples provided here are merely suggestions, not strictly-enforced regulations.}}
cf. [[Dev:Plugin Specifications#Template|Plugin Specifications]]
=== Namespacing ===
Plugins' functions should be registered in the <code>config.extensions</code> namespace (built in from v2.5):
<source lang="javascript">
config.extensions.SamplePlugin = {
sampleFunction: function() {
/* ... */
}
};
</source>
Similarly, functions specific to a certain [[Dev:Macros|macro]] or [[Dev:Toolbar Commands|toolbar command]] should be attached to the <code>config.macros</code> or <code>config.commands</code> object, respectively:
<source lang="javascript">
config.macros.SampleMacro = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
/* ... */
}
};
config.commands.sampleCommand = {
handler: function(event, src, title) {
/* ... */
}
};
</source>
Overview of common TiddlyWiki namespaces:
* <code>config.extensions</code>: [[Dev:Plugins|Plugins]]
* <code>config.macros</code>: [[Dev:Macros|Macros]]
* <code>config.commands</code>: [[Dev:Toolbar Commands|Toolbar Commands]]
* <code>config.paramifiers</code>: [[Dev:Paramifiers|Paramifiers]]
* <code>config.formatters</code>: [[Dev:Formatters|Formatters]]
* <code>config.adaptors</code>: [[Dev:Adaptors|Adaptors]]
=== Documentation ===
Well-structured code simplifies readability and maintainability.
Commenting is an important part of structuring code.
There are two basic levels of comments:
* block comments (<code>/* [...] */</code>)
* inline comments (<code>// [...]</code>)
This distinction can be used to create a semantic and visual distinction between headers and annotations:
<source lang="javascript">
/*
** [section]
*/
// [function description]
function foo() {
// [procedure description]
var foo = bar; // [explanatory comment]
}
/* [sub-section] */
function bar() {
var foo = bar;
}
</source>
{{Note|
While CSS only provides syntax for block comments, the same principle can be applied to [[StyleSheets]].
}}
== Extending Core Functionality ==
Instead of ''overwriting'' core functions, [[Dev:Hijacking|hijacking]] should be used whenever possible to add the desired functionality either before or after invoking the hijacked code (via the <code>apply(this,arguments);</code> method).
This allows other plugins relying on these functions to continue to operate.
However, hijacking the function is not always possible, given the nature of the specific core function or the desired changes.
In that case, it is important to clearly note in the respective plugin's documentation that installing the plugin may have adverse affects on other plugins installed in the same document (also see [[Dev:Plugin Library#Optional Fields|fields]]).
== Declaring Global Functions ==
Function statements should be avoided within plugins.
Function statements are of the form:
<source lang="javascript">
function foo() {
// ...
}
</source>
Because plugins' code is processed using <code>eval()</code>, certain browsers (e.g. IE7 and Safari 3) leave the function in <code>eval()</code>'s local scope.
The way around this is to use expressions to declare such functions as variables, ideally adding an explicit <code>window</code> prefix:
<source lang="javascript">
window.foo = function() {
// ...
}
</source>
This is especially relevant when overriding core functions that are declared using function statements, such as <code>displayMessage()</code>, event handlers, etc.
== Dependency Handling ==
While TiddlyWiki recognizes a ''Requires'' slice in plugins, this is only used to determine plugins' loading order and will not result in an error if the respective dependencies are not found in the document.
Strict dependency checking has to be implemented by the respective plugin itself.
However, rather than checking for the respective plugin's name, [http://trac.tiddlywiki.org/ticket/632#comment:6 ticket object detection should be employed] for maximum flexibility:
<source lang="javascript">
if(!window.foo) { //# "window" only required to prevent ReferenceError if "foo" is a global variable
throw "Missing dependency: Foo";
}
</source>
(<code>foo</code> might be a property of TiddlyWiki's ''config'' namespace, e.g. <code>config.extensions.SamplePlugin)</code>
{{Note|
The <code>pluginInfo.log</code> array can be extended to add a message without stopping execution of the plugin:
<pre>
pluginInfo.log.push("lorem ipsum");
</pre>
}}
== Creating Aliases ==
Sometimes variable names can become very long - especially when using [[#Namespacing|namespaces]].
A closure (anonymous wrapper function) can be used to create a local scope in which local variables can be used as [http://docs.jquery.com/Plugins/Authoring#Custom_Alias aliases], essentially providing "shortcuts" for accessing variables from the parent scope:
<source lang="javascript">
(function($) { //# set up local scope and jQuery alias
var plugin; //# alias
plugin = config.extensions.SamplePlugin = {
sampleMessage: "lorem ipsum",
sampleFunction: function() {
/* ... */
}
};
displayMessage(plugin.sampleMessage);
plugin.sampleFunction();
})(jQuery); //# end of local scope, passing in jQuery object
</source>
Here <code>$</code> is used as a local alias for <code>jQuery</code>.
Similarly, <code>plugin</code> works as an alias for <code>config.extensions.SamplePlugin</code>.
== See Also ==
* [[Dev:Plugin Specifications]]
== This page is the developer documentation for ccTiddly, please feel free to extend this documentation. ==
Information on using ccTiddly if you are not a developer can be found here :
* [[ccTiddly|ccTiddly User Guide]]
Issues will soon be tracked using the '''TiddlyWiki Trac System''' which can be found at :
* [http://trac.tiddlywiki.org ccTiddly Trac ]
The most up to date (and possibly broken) code can be found in SVN at :
* [http://svn.tiddlywiki.org/Trunk/association/serversides/cctiddly/ cctiddly SVN]
You can keep an eye on the '''developer blogs''' here :
* [http://coolcold.wordpress.com coolcold.wordpress.com]
* [http://simonmcmanus.com simonmcmanus.com]
** (includes data sourced from: [http://simonmcmanus.wordpress.com/])
For more information interacting with TiddlyWiki from code please see the [[Dev:CcTiddly/API|ccTiddly API documentation]].
==System Tiddler Plugins ==
This area talks about the future plans for ccTiddly 2.x
ccTiddly currently uses a modified version of the basic TiddlyWiki HTML code. This means that whenever there’s an update to the core code, we have to manually update ccTiddly to the new version (which involves some fiddly manual steps).
The goal is to make it so that ccTiddly uses a clean, unadorned copy of empty.html from tiddlywiki.com, and to have it automatically splice in the extra bits and pieces that are needed by ccTiddly.
These extra bits and pieces are a bunch of plugins and some “stock” tiddlers that use macros from those plugins to expose them to the user.
If, like me, you get confused about the difference between a plugin and a macro, remember that a plugin is just a tiddler tagged “systemConfig”, a plugin can can contain many different macros (which use config.macros)
For instance, there is a plugin called “CreateWorkspacePlugin” that provides the <<ccCreateWorkspace>> macro. The macro produces a user interface that allows users to interactively create a new workspace. So, we need to include the plugin in the HTML file, and we also need to, say, add a new tiddler called “CreateWorkspace” that contains a call to <<ccCreateWorkspace>> the create workspace macro.
Here’s the complete list:
'''Macro <<ccCreateWorkspace>> (from CreateWorkspacePlugin)'''
This macro allows the user to create a new ccTiddly workspace by specifying a name, and the permissions for both anonymous and registered users. We’ll make the macro available to users via the backstage area, since this isn’t a particularly common operation.
'''Macro <<ccEditWorkspace>> (from EditWorkspacePlugin)'''
This plug in will allow users to manage permissions on a workspace which already exists (assuming they have the correct permission). Going forward this will probably include the master workspace management which will then be moved to its own plug in.
'''Macro <<ccUserTiddler>> (From UserTiddlerPlugin)'''
This tiddler will be used to change your email address, password and user specific tiddlers.
'''Macro <<ccLogin>> - (From LoginPlugin)'''
This macro displays the login UI. When not logged in it will allow the users to login using OpenID, LDAP or the internal user database. When logged in the user will be informed who they are logged in as and be given the option to log out.
==Create Workspace==
POST the following variables to the page you wish to create. Please note that the workspace name can only contain letter and numbers.
* '''ccAnonPerm'''
- ''a four character string in the form AADD. Each letter represents anonymous users ability to Read Create Update and Delete Tiddlers - for more details please read up on ccTiddly permissions. ''
A = Allow
D = Deny
ADDD would mean that anonymous users can Read but not Create Update or Delete tiddlers.
HTTP status code 201 will be returned if the resource has been successfully created.
==Create Tiddlers==
The following fields need to be posted to handle/save.php.
* workspace
* tiddler
If you do NOT URIEncode the tiddler field before POSTing you should also post
* decode = 1
In order to have the file decoded on the server.
The is an example form which should let you create a tiddler.
<pre>
<h1> New Tiddler </h1>
<form method='post' action='handle/save.php'>
Workspace Name : <input name='workspace' value='simoa1'><br />
<textarea cols=110 name='tiddler'>
%3Cdiv%20tiddler%3D%22menosayma%22%20modifier%3D%22username%22%20created%3D%222008071109544%22%20modified%3D%22200807110954%22%20tags%3D%22%22%20changecount%3D%221%22%3ETysdfsdfsdfsdfsdf%3C%2Fdiv%3E
</textarea><br />
decodeTidler : <input name='decode' value='1'><br />
<input type='submit'>
</form>
</pre>
==Updating Tiddlers==
Conditions :
Change count should be higher than number than the existing change count.
ochangecount should be the existing revision number
Modified Date should be more recent that the previous modified date in the database.
<pre>
<h1> Update Tiddler </h1>
<form method='post' action='handle/save.php'>
Workspace Name : <input name='workspace' value='simoa1'><br />
<textarea cols=110 name='tiddler'>%3Cdiv%20tiddler%3D%22panda1%22%20modifier%3D%22username%22%20created%3D%22200807110954%22%20modified%3D%22200807110954%22%20tags%3D%22%22%20changecount%3D%229%22%3ETbPOLLY9%3C%2Fdiv%3E</textarea><br />
ochangecount: <input name='ochangecount' value='9'><br />
decodeTidler : <input name='decode' value='1'><br />
<input type='submit'>
</form>
</pre>
==Deleting Tiddlers==
==File Uploads==
==Get List of Tiddlers==
==Get List of Workspaces==
==RSS==
'''This has not been implemented yet!'''
'''URL'''
The url of the subscribed RSS would be like ''example.com/workspace_name/?action=rss&username=user_A&code=hashed_string&tag=tag_list''
note:
#the workspace name is described by '''workspace_name''' or '''?workspace=workspace_name''' without mod_rewrite
#action=rss was used such that ccT could be easily break into modules in the future
#username is for defining username such that RSS can be generated for logged in users only
#code is similar to a password. It is the mixed hash of the hashed password from the database and the hashseed. It is different to the session code from the login cookie
#tag list (planned for future version) can do RSS for certain or without certain tags
*load header.php to include all required plugins and functions
*create user
{{Incomplete}}
[http://chef.tiddlywiki.org Chef] provides a simple way to [[Dev:Cook|cook]] TiddlyWiki [[Dev:Recipe|recipes]].
== See Also ==
* [[Dev:Cook|Cook]]
* [[Dev:Ginsu|Ginsu]]
* [[Dev:Recipe|Recipes]]
[[Category:Developer Tools]]
The <tt>clear</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object removes all tiddlers from it and clears its dirty flag. It takes no parameters.
The TiddlyWiki developers are using Subversion for revision control.
The SVN repository is located at http://svn.tiddlywiki.org.
There is also a [http://trac.tiddlywiki.org/browser Web-based viewer] for browsing the repository.
[[Category:Incomplete]]
{{Approved}}
There are various context-dependent options for embedding wikified contents in tiddlers that are being processed by TiddlyWiki.
__TOC__
== Monospaced Blocks ==
In order to display processed code as monospaced blocks in tiddlers, the wiki markup needs to be escaped using the respective language's comments syntax.
While this is not necessary for a plugin to function properly, it makes the wikified tiddler contents generally look more appealing.
{| class="wikitable"
|-
! Context
! Syntax
|-
| HTML code
(e.g. in [[PageTemplate]], [[ViewTemplate]] or [[EditTemplate]])
| <pre>
<!--{{{-->
[HTML code]
<!--}}}-->
</pre>
|-
| CSS code
(e.g. in [[StyleSheet]])
| <pre>
/*{{{*/
[CSS code]
/*}}}*/
</pre>
|-
| JavaScript code
(in [[systemConfig]] tiddlers)
| <pre>
//{{{
[JavaScript code]
//}}}
</pre>
|}
== Wikified Contents ==
Wiki markup can be used within processed tiddlers by using a special variation of the respective language's comments syntax:
{| class="wikitable"
|-
! Context
! Syntax
|-
| HTML code
(e.g. in [[PageTemplate]], [[ViewTemplate]] or [[EditTemplate]])
| <pre>
<!---
wikified contents
--->
</pre>
|-
| CSS code
(e.g. in [[StyleSheet]])
| <pre>
/***
wikified contents
***/
</pre>
|-
| JavaScript code
(in [[systemConfig]] tiddlers)
| <pre>
/***
wikified contents
***/
</pre>
|}
[[Category:Wiki Markup]]
== See Also ==
* [[Escaping]]
TiddlyWiki is a community project.
As such, volunteer contributions are essential to continuously improving the TiddlyWiki core.
Such contributions can take many forms — from [http://trac.tiddlywiki.org/wiki/ReportingBugs reporting bugs] to [http://trac.tiddlywiki.org/wiki/ContributingCode contributing code].
Of course [[TiddlyWiki Resources#Community Support|community support]] is a crucial part of this process as well, ensuring that new and inexperienced users are not left in the dark.
{{Incomplete}}
Cook is the build tool for [[TiddlyWiki]].
It utilizes [[recipes]] to stitch together TiddlyWiki HTML files from their constituent chunks.
== External Resources ==
* [http://trac.tiddlywiki.org/wiki/Cook Cook]
* [http://trac.tiddlywiki.org/wiki/Ginsu Ginsu]
== See Also ==
* [[Dev:Ginsu|Ginsu]]
* [[Dev:Recipe|Recipes]]
* [[Dev:Chef|Chef]]
[[Category:Developer Tools]]
== Startup ==
== Event handler ==
== Classes ==
* [[Dev:TiddlyWiki Class|TiddlyWiki]]: store tiddlers and has functions for loading and saving tiddlers. It is instantiated in main() as the 'store' object.
* [[Dev:Tiddler]]: used to store information about an individual tiddler.
* [[Dev:Story]]: manages an HTML div containing a sequence of tiddlers. It is instantiated as 'story'.
* [[Dev:Wikifier]]: is used to display the contents of a tiddler.
* [[Dev:Formatter]]: is used (by a wikifier) to convert wikitext into HTML.
* [[Dev:Animator]]: manages different types of animations.
* [[Dev:Cascade]]: a specific type of animation used when opening a tiddler.
* [[Dev:Scroller]]: a specific type of animation that scrolls the browser window so that a DOM element is in view.
* [[Dev:Slider]]: a specific type of animation that "slides" open a DOM element. This is used, for example, when you click the options link on the right sidebar.
* [[Dev:String Methods]]: a number of utility methods are provided for the String class
* [[Dev:Array Methods]]: a number of utility methods are provided for the Array class
* [[Dev:Date Methods]]: a number of utility methods are provided for the Date class
== Global Objects ==
* [[Dev:config]]: contains user preferences, [[macros]], and [[Shadow Tiddlers|shadow tiddlers]].
* [[Dev:version]]: contains information about the currently running version of TiddlyWiki and plugins.
== Functions ==
* [[Dev:Overriding core functions]]
* [[Dev:addClass|addClass]]: add a CSS class to a DOM element
* [[Dev:addEvent|addEvent]]: add an event listener to a DOM element
* [[Dev:blurElement|blurElement]]: remove focus from a DOM element
* [[Dev:clearMessage|clearMessage]]: clear the TiddlyWiki's message area
* [[Dev:convertUTF8toUnicode|convertUTF8toUnicode]] and [[Dev:convertUnicodeToUTF8|convertUnicodeToUTF8]]: convert between UTF-8 and Unicode text encodings
* [[Dev:createExternalLink|createExternalLink]]: create an external link
* [[Dev:createTagButton|createTagButton]]: create a button that pops open a list of tiddlers with a certain tag
* [[Dev:createTiddlyButton|createTiddlyButton]]: create a button on the page
* [[Dev:createTiddlyElement|createTiddlyElement]]: create a DOM element
* [[Dev:createTiddlyLink|createTiddlyLink]]: create a link to another tiddler
* [[Dev:createTiddlyText|createTiddlyText]]: stuff text into a DOM element
* [[Dev:displayMessage|displayMessage]]: display a message in the TiddlyWiki's message area
* [[Dev:ensureVisible|ensureVisible]]: find the vertical scroll position required to show a DOM element
* [[Dev:findPosX|findPosX]]: find the horizontal position of a DOM element
* [[Dev:findPosY|findPosY]]: find the vertical position of a DOM element
* [[Dev:findScrollX|findScrollX]]: find the horizontal page scroll position
* [[Dev:findScrollY|findScrollY]]: find the vertical page scroll position
* [[Dev:findWindowHeight|findWindowHeight]]: return the height of the browser window
* [[Dev:findWindowWidth|findWindowWidth]]: return the width of the browser window
* [[Dev:generateRSS|generateRSS]]: render recent changes to the TiddlyWiki as an RSS feed
* [[Dev:getNodeText|getNodeText]]: get text inside a DOM element
* [[Dev:getPlainText|getPlainText]]: get a plain text version of a DOM element
* [[Dev:hasClass|hasClass]]: check whether a DOM element has a particular CSS class
* [[Dev:refreshTiddlyLink|refreshTiddlyLink]]: re-render a link to a tiddler
* [[Dev:removeChildren|removeChildren]]: remove all child nodes from a DOM element
* [[Dev:removeClass|removeClass]]: remove a CSS class from a DOM element
* [[Dev:removeEvent|removeEvent]]: remove an event listener from a DOM element
* [[Dev:resolveTarget|resolveTarget]]: determine the target of a DOM event
* [[Dev:saveOptionCookie|saveOptionCookie]]: save user options to a cookie
* [[Dev:saveChanges|saveChanges]]: save the TiddlyWiki to disk
* [[Dev:setStylesheet|setStylesheet]]: add a stylesheet to the page
* [[Dev:wikify|wikify]]: render source code into a DOM element
* [[Dev:wikifyStatic|wikifyStatic]]: render source code offscreen
* [[Dev:wikifyPlain|wikifyPlain]]: render plain text
== Variables ==
[[Category:Development]][[Category:Incomplete]]
The <tt>createTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object instantiates a [[Tiddler class|Tiddler]] object. It takes one parameter, which is the title of the tiddler requested. If a tiddler hasn't previously been created by the author, an empty Tiddler object is returned.
This method does not link the Tiddler in any way to the TiddlyWiki. You may want to use the global function [[createTiddler global function|createTiddler]] instead.
{{Merge|[[Dev:Developing and Testing a Plugin]]}}
== Introduction ==
This guide describes creating a basic custom macro. Macros in TiddlyWiki look like this in a tiddler's markup (i.e. unformatted contents):
<<myMacro>>
== Macro parameter formatting ==
Macros can take parameters like so:
<<myMacro param1 param2>>
Parameters with spaces can be quoted using either single quotes, double quotes, or double square brackets. For example:
<<myMacro <nowiki>[[first param]]</nowiki> 'second param' "third param">>
(To prevent confusion, it's a good idea to pick one quoting character and stick with it.)
Macros can also have named parameters:
<<myMacro this:Foo that:Bar>>
Named parameters can be passed quoted strings, just like positional parameters:
<<myMacro this:'hello there' that:"what's up">>
If a quote is required inside a parameter, put a backslash in front of it:
<<myMacro this:'what\'s up'>>
Parameters can be the result of executing a JavaScript expression. TiddlyWiki evaluates the expression before passing it along to the macro.
<nowiki><<myMacro {{'tiddler.getTiddlerText("TiddlerName")'}} >></nowiki>
The JavaScript expression can span multiple lines of text, so it can be formatted for readability.
Parameters cannot contain double closing angle brackets. This won't work, for example:
<<myMacro 'over this way ->>'>>
This confuses the parser, which thinks the macro invocation ended early.
Parameters can be placed on multiple lines to help readability:
<<myMacro
thing1
thing2
>>
== Hello world, part 1 ==
Creating a custom macro requires writing a Plugin. A Plugin in TiddlyWiki is merely a tiddler that contains some JavaScript that will be executed when TiddlyWiki starts up. First create a very basic Plugin and make sure it's running.
=== Creating a Plugin ===
* Create a new tiddler by clicking "new tiddler"
* Give it a title, e.g. "MyFirstPlugin"
* Give it the tag "systemConfig" (without the quotes). Tags are case sensitive in TiddlyWiki, so you must have the lowercase 's' and upper case C correct.
* In the body of the tiddler, paste in the following:
// this will run on startup
alert("Hello world");
* Click "done" to finish editing the tiddler. Save the TiddlyWiki and reload.
* When the TiddlyWiki loads an alert should appear with the message "Hello world". If so, then the Plugin is working! If not, check to make sure it is tagged properly.
The Plugin is not very useful so far, but it's a good first step.
=== Fixing JavaScript Errors ===
When TiddlyWiki 2.1 or later, there is a PluginManager that handles problems with Plugins gracefully. It can be used to diagnose problems.
* Edit the MyFirstPlugin tiddler.
* Make a deliberate typo by changing <code>alert</code> to <code>alerrt</code>.
* Click "done", save the TiddlyWiki and reload.
* The PluginManager should display this message next to the tiddler's name: "Error: ReferenceError: alerrt is not defined"
* Fix the typo, save, and reload the TiddlyWiki.
=== Making the Code Look Better ===
To make the code more readable, one can use a special version of the preformatted text formatting syntax, <code>{{{</code> and <code>}}}</code>. It's specifically for use in Plugins.
Edit the Plugin tiddler so it looks like this:
<source lang="javascript">
//{{{
// this will run on startup
alert("Hello world");
//}}}
</source>
Double forward slashes (<code>//</code>) introduce a JavaScript comment. When these edits are finished, it should look more like code. Also, TiddlyWiki won't try to interpret any of the code as formatting instructions.
== Hello world, part 2 ==
The above shows how to call a macro from within a tiddler and how to plug some code into TiddlyWiki itself. The following section puts these two concepts together.
===Linking a Macro to the Code===
When TiddlyWiki encounters a macro in a tiddler, it looks for an identically named 'macro' within the global object <code>config.macros</code> and then calls the <code>handler</code> function of that macro. Edit the Plugin tiddler so it looks like this:
//{{{
config.macros.helloWorld = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{
// this will run when macro is called from a tiddler
alert("Hello world");
}
};
//}}}
Save the TiddlyWiki and reload. This time, the alert shouldn't pop up immediately. That's because the macro needs to be invoked by a tiddler to act. Do that by following these steps:
# Create a new tiddler by clicking "new tiddler".
# Give it a title, e.g. "MyFirstPluginTest".
# In the body of the tiddler, type in the following: <<helloWorld>>
# Click "done" to finish editing the tiddler. As soon as this is done the alert box should pop up again. This is because TiddlyWiki immediately re-displays the tiddler after it is edited.
If there is an error message after reloading the TiddlyWiki, check the punctuation. A stray semicolon can sometimes mess things up.
===Getting Parameters===
The macro does something now when called. Making it more flexible requires parameters as discussed above. The argument <code>params</code> provides the macro with an array of strings that are passed in from the tiddler.
Try it out. Replace:
alert("Hello world");
with
var who = params[0] || "world";
alert("Hello " + who);
Save, reload, and look at MyFirstPluginTest again. So far it's the same old popup message... edit it as well, so that it looks like:
<<helloWorld 'all you TiddlyWiki fans'>>
The message will change. In many cases, it's a good idea to have defaults for macro parameters, as in the example. JavaScript's logical-or operator makes this straightforward; if params[0] is missing, as when the macro is invoked as <code>helloWorld</code>, the variable who gets the value "world".
In order to use named parameters, the parameter string must first be parsed. For example, if the macro was called like so <code><<foo key:"bar baz">></code> then the handler
config.macros.foo.handler = function(place, macroName, params,
wikifier, paramString) {
var prms = paramString.parseParams(null, null, true);
var bar = getParam(prms, "key");
alert(bar);
};
would pop an alert box containing the words "bar baz".
cf. [[Dev:Macro Parameters]]
===The Handler Function===
So what do the rest of those arguments to the handler function do? Here's a quick summary:
{| border="1"
| place
| the DOM object that provides the document location where the macro is being rendered in the tiddler
|-
| macroName
| the name of the macro being called. It's possible to have several different invocations call the same macro; in that case, this would allow the code to determine how the macro is being called.
|-
| params
| An array corresponding to the parameters passed into this macro.
|-
|wikifier
| The Wikifier object displaying the current tiddler. Modifying this can alter how the rest of a tiddler is rendered.
|-
| paramString
| all the params passed to the macro, as a single string (suitable for calling parseParams)
|-
| tiddler
| a TiddlyWiki object representing the tiddler from which the macro was called
|-
|}
<br>
Finally, combine these parameters with a TiddlyWiki global function named [[wikify]] to finish the macro. Instead of popping open an alert box, it'll display its message right in the tiddler itself.
//{{
config.macros.helloWorld = {
handler: function (place, macroName, params, wikifier, paramString, tiddler)
{
// this will run when macro is called from a tiddler
var who = params[0] || 'world';
wikify('Hello //' + who + '// from the "' + macroName + '" macro in tiddler [[' + tiddler.title + ']].', place);
}
};
//}}
==Hello World, Part 3==
===Adding Plugin Documentation===
This is under construction
===The Complete Hello World Plugin===
The complete Plugin for the HelloWorld macro is available for importing or viewing here:
[http://mptw2.tiddlyspot.com/#HelloWorldMacro HelloWorldMacro]
[[Category:Custom Macros]][[Category:Macros]]
{{Incomplete}}
{{Review}}
==The Edit/Test Cycle==
Initially when the developer starts working on a Plugin, the Edit/Test cycle will typically be:
* edit the Plugin Tiddler in the TiddlyWiki
* save the [http://www.TiddlyWiki.com TiddlyWiki]
* re-load the HTML file in the browser
* execute the test case(s) (assuming there were no syntax errors in the code)
As the size and complexity of the Plugin grows, it can be helpful to factor the Plugin code into its own file and to use certain browser Add-ons as an aid. This allows editing the Plugin code in any editor, including programmers editors that have syntax highlighting, auto-complete, code-folding, and other useful development features.
* Keep the Plugin source code in a separate file
* Have the test [http://www.TiddlyWiki.com TiddlyWiki] load the Plugin from the Plugin source file
* Use Firefox add on [https://addons.mozilla.org/en-US/firefox/addon/60 Firefox Web Developer], very useful for finding those uncaught JavaScript exceptions.
* Firefox add on [https://addons.mozilla.org/en-US/firefox/addon/1419 IE Tab] is also extremely useful for developing under Windows as it allows the developer to switch rendering engines between IE and Firefox - testing Firefox/IE compatibility in one browser.
==Procedure for Loading a Plugin From An External File==
===The Simplest Method===
To make a Test [http://www.TiddlyWiki.com TiddlyWiki] that loads the Plugin from a file, a couple of things are needed.
* An empty [http://www.TiddlyWiki.com TiddlyWiki] into which is installed
* A test Tiddler called '''MarkupPostBody''' with the following contents:
<script src="file:///Path/to/your/new/plugin.js" language="javascript" type="text/javascript"></script>
#Save the Test [http://www.TiddlyWiki.com TiddlyWiki].
#Reload the Test [http://www.TiddlyWiki.com TiddlyWiki] - the Plugin will be loaded.
#It should now be possible to edit the Plugin code in any editor and simply refresh the browser to load any changes.
Please note:
* Make sure that no tiddler contains a duplicate copy of the Plugin source code.
* The Plugin will no longer be visible in the ''Plugin Manager''.
* This method will not work for ''all'' Plugins. Some Plugins require access to 'story', which does not exist at the time that this script would execute the plugin code.
===The Comprehensive Method===
To fix the problems noted above, Saq Imtiaz suggested (in [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/7417b8332ad23a10/4ff4fa43141a20e6?lnk=gst&q=Lyall#4ff4fa43141a20e6 a TiddlyWikiDev Google Group post]) the following method:
#Create the same PostMarkupBody tiddler as before, but instead of loading plugin.js, load a JavaScript file called 'loadExternal.js', which contains the following text
old_load_plugins = window.loadPlugins;
window.loadPlugins=function()
{
old_load_plugins.apply(this,arguments);
loadExternalScripts.apply(this,arguments);
};
function loadExternalScripts()
{
if (!store.isTiddler("ExternalScripts"))
return;
var originalPath = document.location.toString();
var localPath = getLocalPath(originalPath);
var backSlash = true;
var dirPathPos = localPath.lastIndexOf("\\");
if(dirPathPos == -1) {
dirPathPos = localPath.lastIndexOf("/");
backSlash = false;
}
var scriptPath = localPath.substr(0,dirPathPos) + (backSlash ? "\\" : "/");
var scripts = store.getTiddlerText("ExternalScripts").readBracketedList();
for (var i=0; i<scripts.length;i++)
{
eval(loadFile(scriptPath+scripts[i]));
}
};
TiddlyWiki.prototype.isTiddler= function (title)
{
return store.tiddlerExists(title) || store.isShadowTiddler(title);
};
#After creating the PostMarkupBody and the above file, create a New Tiddler called 'ExternalScripts' and place within it a list of files (newline delimited) of the javascript source code for the Plugin under development. This script hijacks the Plugin load module and loads the Plugin(s) from files, rather than from tiddlers, ''after'' the story has been created, allowing the Plugin to execute exactly as it would as if it had been loaded from a tiddler.
#Save the test TiddlyWiki and reload. The Plugin still won't appear in the Plugins backstage area but it will have executed.
==Debugging Tips==
During development, the developer can use the alert() javascript function, but a more useful [http://www.TiddlyWiki.com TiddlyWiki] one is [http://www.tiddlywiki.org/wiki/Dev:DisplayMessage displayMessage()] - this is the one that puts those 'saved' messages at the top right of the screen.
It is also possible to have 'permalink' setup to the testing tiddler(s) such that the refresh brings up the test tiddlers straight away, without having to search and click. Simply display all the relevant testing tiddlers, click the permalink button and then refresh as appropriate.
== See Also ==
* [[Dev:Plugin Specifications]]
* [[Dev:Best Practices]]
The <tt>displayTiddler</tt> method of the [[Story]] class works the same way that the createTiddler method does, except that the newly-displayed tiddler is animated opening, and the browser window scrolls to display it. This method takes five parameters:
* the parent DOM element to display the tiddler inside (required but may be <tt>null</tt> if the tiddler already exists, or the special strings "bottom" and "top" to place the newly created tiddler at the bottom or top of the story)
* the title of the tiddler or a tiddler itself
* optionally the template to view the tiddler as. This should be either the constant <tt>DEFAULT_VIEW_TEMPLATE</tt> or <tt>DEFAULT_EDIT_TEMPLATE</tt>.
* optionally a boolean value indicating whether to animate opening the tiddler
* optionally a boolean value indicating whether to animate slowly. To see this in action, hold down the Shift, Option, or Alt key when clicking a tiddler link.
This method does not return any values.
<pre>
//# Display a given tiddler with a given template. If the tiddler is already displayed but with a different
//# template, it is switched to the specified template. If the tiddler does not exist, and if server hosting
//# custom fields were provided, then an attempt is made to retrieve the tiddler from the server
//# srcElement - reference to element from which this one is being opened -or-
//# special positions "top", "bottom"
//# tiddler - tiddler or title of tiddler to display
//# template - the name of the tiddler containing the template -or-
//# one of the constants DEFAULT_VIEW_TEMPLATE and DEFAULT_EDIT_TEMPLATE -or-
//# null or undefined to indicate the current template if there is one, DEFAULT_VIEW_TEMPLATE if not
//# animate - whether to perform animations
//# customFields - an optional list of name:"value" pairs to be assigned as tiddler fields (for edit templates)
//# toggle - if true, causes the tiddler to be closed if it is already opened
//# animationSrc - optional. If provided, this will specify the element which is to act as the start of the animation -or-
//# the source of the animation will be the srcElement.
</pre>
==Examples==
<pre>
story.displayTiddler(null, "Title of an Existing Tiddler");
</pre>
<pre>
story.displayTiddler("bottom", "Title of Tiddler To Create", DEFAULT_EDIT_TEMPLATE);
</pre>
{{Review}}
TiddlyWiki 2.1 allows you to save arbitrary custom fields with your tiddlers. Here is a short introduction to using these fields.
==Basics==
Edit your ViewTemplate tiddler. Paste in the following after the stuff that's already there:
<div>My Thing: <span macro="view mything"></span></div>
Edit your EditTemplate tiddler. Paste in the following after the stuff that's already there:
<div>My Thing: <span macro="edit mything"></span></div>
That's all you need to do -- you've created a custom field. When you view a tiddler you should see the My Thing field, and when you edit a tiddler you can enter stuff in there and it will save with the tiddler.
Tiddler fields are [http://trac.tiddlywiki.org/ticket/356 currently] case-sensitive and '''must be all lower case''' for their values to be stored/retrieved sucessfully.
If you want the field contents wikified when viewing (eg. so links works) add a space and the
word 'wikified' after 'mything' (ViewTemplate only, not EditTemplate):
<div>My Thing: <span macro="view mything wikified"></span></div>
==Changing the appearance of the field value==
You can use styles to make the field appear however you want. Eg:
<div style="font-size:200%;">My Thing: <span macro="view mything"></span></div>
A more manageable way is to use a class and put the styles in your StyleSheet tiddler. For example:
<div class="mything">My Thing: <span macro="view mything"></span></div>
The put something like this your StyleSheet tiddler:
.mything {
color:white;
background: red;
border:3px solid green;
}
If you are storing wiki format text in your field, you can ask for the wikifier to render the field contents by adding "wikified" to the macro call:
<span macro="view myThing wikified"></span>
Conditional display of field values can be achieved using the [[HideWhenPlugin]].
==Changing the size of the edit box==
By default the edit boxes come out a certain size. If you need to change the size you can do it with CSS. For example:
<div><span class="smallerEdit" macro="edit mything"></span></div>
Then put something like this your StyleSheet tiddler:
.smallerEdit input {
width:5em;
}
==Using HideWhen to do conditional fields based on tags==
(This requires that you install HideWhenPlugin from [http://mptw.tiddlyspot.com/#HideWhenPlugin MonkeyPirateTiddlyWiki].)
Let suppose you have a some tiddlers tagged with "friend" and you'd like to use some custom field to maintain some information about them, say their favourite food.
In ViewTemplate:
<div macro="showWhen tiddler.tags.contains('friend')">
Favourite food: <span macro="view favouritefood"></span>
</div>
In EditTemplate:
<div macro="showWhen tiddler.tags.contains('friend')">
Favourite food: <span macro="edit favouritefood"></span>
</div>
Now you can view and edit your friends' favourite food.
==Using forEachTiddler with tiddler fields==
(This requires you install ForEachTiddlerPlugin from [http://tiddlywiki.abego-software.de Abego Software].)
To list all your friends whose favourite food is pizza you can do this:
<<forEachTiddler
where
' store.getValue(tiddler,"favouritefood") == "pizza" '
>>
This will display a bulleted list of tiddlers that match the test: <tt>store.getValue(tiddler,"favouritefood") == "pizza"</tt> (if you don't want a bulleted list, refer to the ForEachTiddler documentation for how to customise the output).
== Using readBracketedList to make a list ==
Suppose you want to be able to store more than one favourite food. The best way to do this is to use the same format that TiddlyWiki uses for tags, ie, <nowiki>"this that [[the other]]"</nowiki> means three items, "this", "that" and "the other". There is a TiddlyWiki method called readBracketedList that we can use for this.
Now if we have at least one food in the custom field we can do this to see who likes pizza:
<<forEachTiddler
where
' store.getValue(tiddler,"favouritefood") &&
store.getValue(tiddler,"favouritefood").readBracketedList().contains("pizza") '
>>
Who likes chicken ''or'' fish?
<<forEachTiddler
where
' store.getValue(tiddler,"favouritefood") &&
store.getValue(tiddler,"favouritefood").readBracketedList().containsAny(["chicken","fish"]) '
>>
Who likes olives ''and'' anchovies?
<<forEachTiddler
where
' store.getValue(tiddler,"favouritefood") &&
store.getValue(tiddler,"favouritefood").readBracketedList().containsAll(["olives","anchovies"]) '
>>
The methods "contains", "containsAny" and "containsAll" are handy Array methods defined by TiddlyWiki. And "readBracketedList" is a String method that is used to convert a tags string into an Array. The reason we have to first test if the value is defined is that otherwise readBracketedList will fail on tiddlers that don't have a favouriteFood field.
Please note that the above 3 contain Array methods are case sensitive, and will only find entire words: in the above example, "olives" will be found, "olive", "OLIVE", or "Olives" will return no results. An asterisk (*) used as a wildcard does not work for these contain methods.
==Filtering based on more than one field==
Provided you had set up another custom field "favouritedrink" per the above instructions, the following should allow you to further filter based on more than one field:
Who likes olives ''and'' coffee?
<<forEachTiddler
where
' store.getValue(tiddler,"favouritefood") &&
store.getValue(tiddler,"favouritefood").readBracketedList().contains("olives") &&
store.getValue(tiddler,"favoritedrink") &&
store.getValue(tiddler,"favouritedrink").readBracketedList().contains("coffee")'
>>
== See Also ==
* [[Extended Fields]]
The <tt>fetchTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns a [[Tiddler class|Tiddler]] that the TiddlyWiki contains. It expects one parameter: the name of the tiddler. If the tiddler does not exist, then an undefined value is returned. (This is different from a null value.) This is a primitive method used by many other methods in the TiddlyWiki class.
The <tt>forEachTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object executes a function on all tiddlers in the TiddlyWiki. It expects exactly one parameter: the function to execute. The function is repeatedly invoked, each time passed these three parameters in order:
* the parent TiddlyWiki
* the title of the tiddler
* the [[Tiddler class|Tiddler]] object itself
Formatters are stored as an array of objects, defined in
<code>config.formatters[]</code>.
The TiddlyWiki core's <code>wikify()</code> process loops through this
array ''in order'', testing the <code>match</code> pattern of each formatter, one
at a time, until a match is found.
At startup, a formatter object is created that contains <code>config.formatters</code>, which is a set of rules about how to turn wiki syntax into HTML.
The <code>Formatter</code> constructor collects these into <code>formatter.formatters</code> and their regular expression match strings into one long RegEx called <code>formatter.formatterRegExp</code>.
The <code>formatter</code> object is returned by <code>getParser()</code> by default.
Some functions always use the global formatter object when creating their wikifiers: <code>wikifyPlainText()</code>, <code>highlightify()</code>.
A particular <code>formatter</code> has a variable called <code>termRegExp</code>, which is the RegEx to match the end of a type of expression.
In the table formatter, there are two terminators: <code>rowTermRegExp</code> and <code>cellTermRegExp</code>.
The <tt>getOrphaned</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns an array of strings, each the name of an orphaned tiddler -- that is, a tiddler with no links to it. This array is sorted by name. This method takes no parameters.
{{Incomplete}}
Ginsu splits the tiddlers in a TiddlyWiki HTML out into separate files ready for checking in to Subversion.
cf. [http://trac.tiddlywiki.org/wiki/Ginsu Trac]
== External Resources ==
* [http://trac.tiddlywiki.org/wiki/Ginsu Ginsu]
== See Also ==
* [[Dev:Cook|Cook]]
* [[Dev:Recipe|Recipes]]
* [[Dev:Chef|Chef]]
[[Category:Developer Tools]]
{{Incomplete}}
If possible, hijacking a function is preferable to overriding it, as it is less invasive and thus more future-proof.
== Example ==
Hijacking global function <code>sampleFunc</code>:
<source lang="javascript">
(function() { // closure to create local scope for backup
// backup original function
var sampleFunc_orig = sampleFunc;
// override original function
window.sampleFunc = function(foo, bar, baz) { // arguments correspond to original function signature
// perform custom operations
/* ... */
// invoke the original function
return sampleFunc_orig.apply(this, arguments);
};
})();
</source>
{{Note|
The [[Dev:Best Practices#Creating Aliases|wrapping function technique]] illustrated here is optional, but recommended to avoid clashes with other hijacks.
}}
== External Resources ==
* [http://mptw2.tiddlyspot.com/#HijackingHowto HijackingHowto]
{{Incomplete}}
Hijacking the ''onclick'' handler of a button:
{{Quote|[http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/db1dc75adc5357d7 Eric]|<pre>
var btn = document.getElementById("mybtn");
btn.old_onclick = btn.onclick;
btn.onclick = function() {
this.old_onclick.apply(this,arguments);
alert("goodbye");
}
</pre>
}}
== See Also ==
* [[Dev:Hijacking]]
[[Category:Design Patterns]]
This page is intended to keep track of yet unresolved issues regarding the roadmap for further development of the TiddlyWiki core.
__TOC__
== Enhancements ==
; standards compliance
: [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/de9cf00aec4cb148/ <nowiki>[twdev]</nowiki> image formatter: invalid attributes]
; DOM utilities
: [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/fc0a859f9e10af8f/ <nowiki>[twdev]</nowiki> DOM utilities: potentially more efficient adding/removing of class names]
== Changes ==
; namespaces
: [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/e9347213b3151ddf/24ec8cc5e1c14278?#24ec8cc5e1c14278 <nowiki>[tw]</nowiki> Confused about Sync and Workspaces]
; PrettyLink syntax
: [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/8e4889dbc861f0ef/ <nowiki>[twdev]</nowiki> PrettyLink syntax: Creole compatibility]
: [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/3a7115fb85461b3f/ <nowiki>[tw]</nowiki> Referendum on core changes]
; centralized date formats
: [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/2fe4e7bd3e01f8a6/ <nowiki>[twdev]</nowiki> centralized date formats]
; tiddler revision history
: cf. [http://simonmcmanus.wordpress.com/2007/08/14/enterprise-tiddlywiki/ Enterprise TiddlyWiki]
; [[Dev:TWUI 2.0|UI Redesign]]
: [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/48b7d64307cc9dfa/ <nowiki>[twdev]</nowiki> TiddlyWiki v2.2b5 feedback: layout/style]
: [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/b55011665c5e04d9/ <nowiki>[twdev]</nowiki> StyleSheetLayout: overflow technique]
[[Image:EditPortlet.png|right|thumb|150px|EditPortlet mock-up]]
; EditPortlet (non-disruptive edit mode)
: edit mode as a (temporary) portlet instead of replacing the wikified tiddler view (see mock-up image)
== Misc. ==
; embedding external files
: [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/d900d5951edd0e73 <nowiki>[twdev]</nowiki> Cross-browser Base-64 Images]
; TiddlyWiki.org skin & logo
: cf. [[User:FND/MediaWiki Skin]]
{{WIP}}
suggestions for plugins taking advantage of jQuery, e.g. by implementing existing jQuery plugins in TiddlyWiki context
* sortable/filterable tables (cf. [http://tw.lewcid.org/#TableSortingPlugin TableSortingPlugin])
* table of contents (cf. [http://devpad.tiddlyspot.com/#TiddlerToCPlugin TiddlerToCPlugin], [http://devpad.tiddlyspot.com/#DcTableOfContentsPlugin DcTableOfContentsPlugin])
* logging console (cf. [[LoggingConsolePlugin]])
* accordion effects (cf. [http://tw.lewcid.org/#AccordionMenuPlugin AccordionMenuPlugin], [http://docs.jquery.com/UI/Accordion UI/Accordion])
{{DISPLAYTITLE:jQuery Plugins}}
JigglyWiki is the project name for an experiment into implementing much of the TiddlyWiki functionality with [http://jquery.com jQuery].
In the short term, there is a project to include the jQuery core into the core of TiddlyWiki and refactor the internals of many of the TiddlyWiki functions to both offset the increased file size and also reduce complexity in the code.
With jQuery included in the core of TiddlyWiki, it would be available to plugin authors.
In tandem with this effort to efficiently integrate jQuery into the core, there are also more radical experiments into how we might further TiddlyWiki with a more radical restructure such that it embraces approaches such as [http://en.wikipedia.org/wiki/Unobtrusive_JavaScript unobtrusive JavaScript], [http://en.wikipedia.org/wiki/Progressive_enhancement progressive enhancement] and various UI paradigms.
Some of this work may surface in a future version of TiddlyWiki.
Some examples of such experiments can be found here:
* [http://jigglywiki.com/examples/jigglywiki.0.0.3.html proof of concept v0.0.3] (simple demonstration of content) - this version shows the content initial approach and should elegantly degrade if rendered with JavaScript disabled
* [http://jigglywiki.com/examples/pagemap.0.1.html Pagemap example] - exploring the concept of vertical tabs to represent to various sections of the rendered page (requires Firefox or Safari)
{{Incomplete}}
== Unnamed Parameters ==
<pre>
<<foo value1 value2 value3>>
</pre>
With the example macro call above, the <code>params</code> variable passed to the macro's handler is an array, created by parsing the space-separated list of strings. For multi-word parameters, use <code>[[a param]]</code>.
Example:
<pre>
config.macros.myMacro.handler = function(place,macroName,params,...) {
if(params[0])
var length = params[0];
if(params[1])
var width = params[1];
...
</pre>
== Named Parameters ==
{{Quote|[http://trac.tiddlywiki.org/ticket/538#comment:4 Jeremy]|2=
The semantics of <code>parseParams()</code> are that either <code>defaultName</code> or <code>defaultValue</code> can be provided. If <code>defaultName</code> is provided, then any single token parameters are taken to be values, with the name being specified in <code>defaultName</code>. If instead <code>defaultValue</code> is defined, then any single token parameters are taken to be names, with the value being specified in <code>defaultValue</code>.
There is a potential error condition if neither <code>defaultName</code> or <code>defaultValue</code> is provided, but this only occurs if the parameter string in question includes any single token values. The current patch incorrectly treats a missing <code>defaultName</code> as an error.
}}
Code for parsing named parameters:
<pre>
config.macros.foo.handler = function(place, macroName, params, wikifier, paramString) {
var prms = paramString.parseParams(null, null, true);
var value = getParam(prms, "key");
};
</pre>
To be used like so:
<pre>
<<foo key:value>>
<<foo key:"value">>
<<foo key:[[value]]>>
</pre>
=== Default Names ===
The first (required) parameter of <code>parseParams()</code> will be used as the default name for unnamed parameters:
<pre>
p = paramString.parseParams("anon", null, true);
</pre>
Usage:
<pre>
<<foo value1 value2 value3>>
</pre>
In this example, ''anon'' is used as the default name when processing parameters.
=== Default Values ===
If you set the second parameter of <code>parseParams</code> but '''not''' the first, that will be taken as the default value for named parameters without values:
<pre>
p = paramString.parseParams(null, "val", true);
</pre>
Usage:
<pre>
<<foo p1:A p2:B p3: p4:D>>
</pre>
In this example, ''val'' is used as the default value when processing parameters.
A macro is a specialized form of TiddlyWiki plugin that is invoked in a particular tiddler. See [[Plugin Development]] for more information on developing them.
== Macro Execution ==
Each macro has a handler (<code>config.macros.*.handler</code>) as well as an optional initialization (<code>config.macros.*.init</code>) method.
The <code>init</code> function is executed on document startup and takes no arguments.
Macro handlers are invoked when the respective macro is being rendered and are passed the following arguments:
* '''place:''' the respective macro call's containing DOM object
* '''macroName:''' the respective macro's name
* '''params:''' parameters retrieved from the macro call, as an array
* '''wikifier:''' the wikifier object being used
* '''paramString:''' parameters retrieved from the macro call, as a string
* '''tiddler:''' the respective macro call's containing tiddler
== See Also ==
* [[Dev:Plugin Development]]
* [[Dev:Plugin Specifications]]
* [[Dev:Custom Macros]]
Mother of All Server Sides (aka [[TiddlyWeb]])
According to [[Jeremy Ruston]] must be spoken aloud with a thrusting of the chin, a lowering of the voice, and an imposing inflection.
{{Review}}
The latest TiddlyWiki development build can be obtained from http://nightly.tiddlywiki.org.
Nightly builds may have bugs or be unstable and therefore should not to be relied on for regular use. They are intended for testing purposes only.
[[Category:FAQ]]
The <tt>notify</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object runs all notification functions registered to a tiddler via [[Dev:AddNotification|addNotification]]. It takes two parameters:
* the title of the tiddler
* a boolean value signalling whether to include blanket notifications — that is, notifier functions that were registered via <tt>addNotification(null, function)</tt>
This is typically called as a matter of course by the TiddlyWiki code, but you may force a notification via this method.
The <tt>notifyAll</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object runs all notification function currently registered to it via [[Dev:AddNotification|addNotification]]. If a notification function was tied to a particular tiddler, it is invoked with that tiddler, as usual, and blanket notifications (registered to the null value) are run as well. This method takes no parameters.
This method is called by the TiddlyWiki code starts up as the page loads, but this is an easy way to force a reload of page title, subtitle, stylesheet, and so on.
{{Merge|[[Dev:Developing and Testing a Plugin]]}}
In TiddlyWiki, almost everything is a [[tiddler]] - including
plugin/macro code.
Plugins are marked as such by tagging them with "[[systemConfig]]".
Development-related questions are discussed on the [http://groups.google.com/group/TiddlyWikiDev TiddlyWiki Dev Group].
{{Note|1=
The [http://plugins.tiddlywiki.org TiddlyWiki Plugin Library] has now reached alpha stage.
Both [{{fullurl:{{FULLPAGENAME}}|oldid=5019}} previous] [{{fullurl:{{FULLPAGENAME}}|oldid=5380}} concepts] are available via the page history.
}}
== Goal ==
* central index of [[TiddlyWiki]] [[plugins]] for improved discoverability of third-party functionality
{{Note|1=
The term "Plugin ''Library''" is potentially misleading because the system harnesses the decentralized landscape of plugin repositories rather than acting as a central (re)distribution system.
A variety of alternative names [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/31595edc4522f769 have been suggested] - e.g. Plugin Index, Plugin Directory or Plugin Hub.
}}
== Aggregation ==
* periodical updates [''not yet implemented'']
* manually maintained [http://svn.tiddlywiki.org/Trunk/association/services/pluginLibrary/aggregator/repos.lst list of plugin authors' repositories]
** hosted TiddlyWiki documents
** Subversion repositories
* ''[[systemConfig]]'' tiddlers / <code>.js</code> files (<code>systemConfig</code>; actual execution can be prevented with <code>systemConfigDisable</code>)
* black- and whitelisting
** Subversion directories: [http://svn.tiddlywiki.org/Trunk/association/services/pluginLibrary/aggregator/test/foo/excludeLibrary.txt excludeLibrary.txt] or [http://svn.tiddlywiki.org/Trunk/association/services/pluginLibrary/aggregator/test/bar/includeLibrary.txt includeLibrary.txt] (supports [http://www.python.org/doc/2.5.2/lib/module-fnmatch.html wildcards])
** TiddlyWiki documents: blacklisting via tag "systemPrivate"
* [[#Community Features|user augmentation]]
* stored are tiddler fields, meta-slices, and documentation sections
== Metadata Evaluation ==
[TBD]
== Advanced Features ==
[''not yet implemented'']
* timeline of plugin releases and updates
* dependency notification
* one-click install for plugins
** client sends request via URL parameter (e.g. <code>import?foo&bar</code>)
** server fetches respective plugins from their original locations
** server returns plugins wrapped in pure-store format
* instant plugin demonstration
* popularity index (hits/usage counter)
== Community Features ==
[''not yet implemented'']
* commenting
* tagging
* rating
* trusted plugins
* suggestions for sites/plugins not yet indexed
* [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/ec7ebb5433ca3364 <nowiki>[twdev]</nowiki> licensing plugins]
This page provides guidelines for structuring [[plugin]] tiddlers.
A standardized, consistent structure simplifies automated aggregation (cf. [[Plugin Library]]), and also provides easy-to-follow guidelines for new TiddlyWiki developers.
Generally, a plugin consists of two basic sections: The metadata (i.e. description) and the actual JavaScript code.
== Metadata ==
The metadata section is divided into two parts:
The machine-readable meta fields and the documentation.
=== Meta-Slices ===
{{:{{NAMESPACE}}:{{PAGENAME}}/Meta-Slices}}
=== Documentation Sections ===
{{:{{NAMESPACE}}:{{PAGENAME}}/Documentation Sections}}
{{Note|
Extensive documentation content can be moved to a separate tiddler (e.g. ''<pluginName>Documentation'').
}}
== Code ==
Ideally the plugin's JavaScript code is presented as a [[Escaping#Code_Comments|preformatted block]]:
<pre>
//{{{
<...>
//}}}
</pre>
Alternatively, the source code can be hidden by wrapping it in the respective [[Escaping#Code_Comments|comment markers]]:
<pre>
///%
<...>
//%/
</pre>
== Template ==
{{:{{NAMESPACE}}:{{PAGENAME}}/Template}}
== See Also ==
* [[Dev:Best Practices]]
* [http://trac.tiddlywiki.org/browser/Trunk/contributors/MartinBudden/plugins/ExamplePlugin.js ExamplePlugin]
* [[Getting started with custom macros]]
* [[Hijacking onClick Methods]]
* [[Developing and Testing a Plugin]]
== See Also ==
* [[Dev:Best Practices]]
* [[Dev:Plugin Specifications]]
[http://crackpod.bplaced.net/?page_id=125 pyTiddlyWiki] is a Python class for manipulating TiddlyWiki files.
== See Also ==
* [[Dev:r4tw]]
[[Category:Tools]]
{{DISPLAYTITLE:Dev:pyTiddlyWiki}}
[http://simonbaird.com/r4tw/ r4tw] is a collection of Ruby classes for manipulating [[TiddlyWiki]] files.
[http://rubyforge.org/projects/tiddlywikicp/ tiddlywiki_cp] is a Ruby gem based on ''r4tw'', providing a library and command-line interface to create tiddlers from files and vice versa.
== See Also ==
* [[Dev:PyTiddlyWiki]]
[[Category:Tools]]
{{DISPLAYTITLE:Dev:r4tw}}
{{Incomplete}}
The TiddlyWiki core code is stored and developed as a collection of individual files, which makes it more manageable.
A recipe file determines which code files, tiddlers and HTML components to put together - somewhat like a jigsaw puzzle.
[[Dev:Cook|Cook]] then reads the recipe file and generates a new TiddlyWiki document from it.
Recipes can reference one another, making it straightforward to create a multiple variants of TiddlyWiki at one time.
== Example ==
TiddlyWiki's [http://svn.tiddlywiki.org/Trunk/core/tiddlywiki.html.recipe default recipe file]:
<pre>
template: html/tiddlywiki.template.html
recipe: tiddlers/split.recipe
recipe: js/split.recipe
copy: java/TiddlySaver.jar
</pre>
== External Resources ==
* [http://trac.tiddlywiki.org/wiki/RecipeFiles Recipe Files]
== See Also ==
* [[Dev:Cook|Cook]]
* [[Dev:Ginsu|Ginsu]]
* [[Dev:Chef|Chef]]
[[Category:Developer Tools]]
The <tt>removeTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object removes a tiddler from the TiddlyWiki. It takes one parameter: the name of the tiddler to delete. It notifies functions set as listeners with [[TiddlyWiki.addNotification|addNotification]], sets the dirty flag, and returns silently if the tiddler does not exist.
The <tt>resumeNotifications</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object resumes issuing notifications after [[Dev:SuspendNotifications|suspendNotifications]] is called. If [[Dev:SuspendNotifications|suspendNotifications]] was called multiple times, this method must be called an equal number of times in order for notifications to occur. This method does not expect any parameters.
A Java based implementation of javascript that can be useful for server-side Javascript use.
http://www.mozilla.org/rhino/
A testing tool for web applications that runs directly in a remote controlled web browser.
http://www.openqa.org/selenium/
{{Review}}
{{Merge|[[Dev:ServerAdaptorMechanism]]}}
{{Note|
As of TiddlyWiki v2.4.1, there is a BaseAdaptor class which provides much of the basic functionality.
The current documentation has not been updated to reflect this yet.
}}
Server adaptors are designed to use a familiar model akin to a device driver, adapting a standardized interface to whatever is required by the underlying server: [http://en.wikipedia.org/wiki/Webdav WebDAV], ZiddlyWiki, [http://en.wikipedia.org/wiki/MediaWiki MediaWiki], [http://www.socialtext.com/ Socialtext] or HTML scraping.
Many server architectures are [http://en.wikipedia.org/wiki/REST REST] based, and TiddlyWiki server adaptors are particularly easy to create for common REST patterns. It is also possible to create TiddlyWiki server adaptors for servers with an [http://en.wikipedia.org/wiki/XML-RPC XML-RPC] interface.
Server adaptors are registered by name in the global object <code>config.adaptors</code>. Each entry is a reference to an object constructor for that type of server adaptor. The adaptor object must implement the following methods:
* [[Dev:Adaptor.openHost|Adaptor.openHost]]
* [[Dev:Adaptor.openWorkspace|Adaptor.openWorkspace]]
* [[Dev:Adaptor.getTiddler|Adaptor.getTiddler]]
* [[Dev:Adaptor.close|Adaptor.close]]
Additionally the adaptor may implement the following methods:
* [[Dev:Adaptor.getWorkspaceList|Adaptor.getWorkspaceList]] (required to support the Import Tiddlers UseCase)
* [[Dev:Adaptor.getTiddlerList|Adaptor.getTiddlerList]] (required to support the Import Tiddlers UseCase)
* [[Dev:Adaptor.putTiddler|Adaptor.putTiddler]] (required to support the Sync UseCase)
* [[Dev:Adaptor.getTiddlerRevision|Adaptor.getTiddlerRevision]]
* [[Dev:Adaptor.getTiddlerRevisionList|Adaptor.getTiddlerRevisionList]]
The adaptor object is used through the life of a connection to a server; see ServerAdaptorConcepts for details. Many of the methods use an AsynchronousPattern of callbacks to deliver their results.
Custom formatters for the WikifierFormatterMechanism are often used alongside server adaptors to allow TiddlyWiki to display content in the native format of a server.
== See Also ==
* [[Server Adaptor Mechanism]]
* [[Dev:Server Adaptor Mechanism/Adaptor Structure|Adaptor Structure]]
[[Category:Server Adaptors]]
With the [[Dev:ServerAdaptorMechanism|ServerAdaptorMechanism]], TiddlyWiki adopts a simple model for interacting with servers:
* ''Server adaptors'' are plugins that provide a standardised interface to a particular server architecture. As standard, TiddlyWiki provides the FileAdaptor for talking to static TiddlyWiki files but others are available for talking to popular wiki servers
* A ''host'' string identifies a particular server, usually by it's URL
* A ''workspace'' string identifies a particular compartment or storage area within a server, for instance the name of a wiki on a shared MediaWiki server
* A ''title'' identifies a tiddler within a particular workspace
Via the [[Dev:ServerAdaptorExtendedFields|ServerAdaptorExtendedFields]], particular tiddlers can have a connection to a particular server.
[[Category:Adaptors]]
The [[Dev:ServerAdaptorMechanism|ServerAdaptorMechanism]] uses extended fields to store additional data with tiddlers that are associated with a server host. The standard fields are listed below, but particular adaptors will often add their own custom fields for their own purposes.
{| border="1"
|-
!Field!!Description!!Status!!Example
|-
|server.type||The type of server adaptor associated with this tiddler||mandatory||eg "file", "socialtext"
|-
|server.host||The host server URL||mandatory||eg "http://www.socialtext.net/"
|-
|server.workspace||The workspace associated with this tiddler||optional||eg "stoss"
|-
|server.page.name||The full (human readable) name of the tiddler's page on the server||optional||eg "Socialtext Open Source Wiki"
|-
|server.page.id||The normalized form of the tiddler's page name on the server||optional||eg "socialtext_open_source_wiki"
|-
|server.page.revision||The revision of the page. Host dependent, but normally a number. Guaranteed to lexigraphically sort into chronological order||optional||eg "20070222050650"
|-
|wikiformat||The wikiformat of the tiddler||optional||eg "socialtext"
|}
See [[Dev:ServerAdaptorConcepts|ServerAdaptorConcepts]] for the meanings of terms like host, workspace and adaptor.
[[Category:Adaptors]]
{{Merge|[[Dev:Server Adaptor Mechanism]]}}
TiddlyWiki's architecture for interacting with servers allows it to be plugged into a wide variety of servers. This is done through the addition of plugins containing custom server adaptors. Server adaptors are designed to allow for use cases like importing tiddlers, loading missing tiddlers on the fly and synchronising changes with a server. Separate macros and core extensions implement such features by accessing the facilities provided by server adaptors.
Server adaptors are designed to use a familiar model akin to a device driver, adapting a standardised interface to whatever is required by the underlying server: [http://en.wikipedia.org/wiki/Webdav WebDAV], ZiddlyWiki, [http://en.wikipedia.org/wiki/MediaWiki MediaWiki], [http://www.socialtext.com/ Socialtext] or HTML scraping.
Many server architectures are [http://en.wikipedia.org/wiki/REST REST] based, and TiddlyWiki server adaptors are particularly easy to create for common REST patterns. It is also possible to create TiddlyWiki server adaptors for severs with an [http://en.wikipedia.org/wiki/XML-RPC XML-RPC] interface.
Server adaptors are registered by name in the global object <code>config.adaptors</code>. Each entry is a reference to an object constructor for that type of server adaptor. The adaptor object must implement the following methods:
* [[Dev:Adaptor.openHost|Adaptor.openHost]]
* [[Dev:Adaptor.openWorkspace|Adaptor.openWorkspace]]
* [[Dev:Adaptor.getTiddler|Adaptor.getTiddler]]
* [[Dev:Adaptor.close|Adaptor.close]]
Additionally the adaptor may implement the following methods:
* [[Dev:Adaptor.getWorkspaceList|Adaptor.getWorkspaceList]] (required to support the Import Tiddlers UseCase)
* [[Dev:Adaptor.getTiddlerList|Adaptor.getTiddlerList]] (required to support the Import Tiddlers UseCase)
* [[Dev:Adaptor.putTiddler|Adaptor.putTiddler]] (required to support the Sync UseCase)
* [[Dev:Adaptor.getTiddlerRevision|Adaptor.getTiddlerRevision]]
* [[Dev:Adaptor.getTiddlerRevisionList|Adaptor.getTiddlerRevisionList]]
The adaptor object is used through the life of a connection to a server; see [[Dev:ServerAdaptorConcepts|ServerAdaptorConcepts]] for details. Many of the methods use an AsynchronousPattern of callbacks to deliver their results.
Custom formatters for the WikifierFormatterMechanism are often used alongside server adaptors to allow TiddlyWiki to display content in the native format of a server.
[[Category:Adaptors]]
{{Incomplete}}
When writing an adaptor for a specific server, the first step is to identify the respective HTTP interface. The adaptor then creates a mapping to translate the server's content elements to tiddlers.
Adaptors are usually derived from the built-in <code>AdaptorBase</code> class, extending it with the required server-specific functionality.
== Mechanism ==
Typically, adaptors work in three steps:
# ''adaptor interface'' is called, performing an HTTP request
# ''adaptor callback'' function is called, interpreting the HTTP response
# ''user callback'' is called, processing the result
'''Parameters'''
''Adaptor Interface''
* <code>context</code> object containing parameters to be passed to the adaptor callback function
* <code>userParams</code> object containing parameters to be passed to the user callback function (unaltered by the adaptor)
* <code>callback</code> user callback function
''Adaptor Callback''
* <code>status</code> HTTP status (<code>true</code> or <code>false</code>)
* <code>context</code>
* <code>responseText</code> HTTP response text
* <code>uri</code> request URI
* <code>xhr</code> XMLHttpRequest object
''User Callback''
* <code>context</code>
* <code>userParams</code>
== Typical Components ==
=== Adaptor Properties ===
* <code>prototype</code> (usually <code>new AdaptorBase()</code>)
* <code>serverType</code> (technical designation; must be lowercase)
* <code>serverLabel</code> (human-readable designation)
* <code>mimeType</code> (optional)
=== Generic Context Properties ===
''Adaptor Interface'' (passed from user)
* <code>host</code>
''Adaptor Callback'' (passed from adaptor interface)
* <code>callback</code>
* <code>userParams</code>
''User Callback'' (passed from adaptor callback)
* <code>status</code>
* <code>statusText</code>
* <code>httpStatus</code>
=== getWorkspaceList ===
Retrieve a list of workspaces available on the server.
Workspaces are objects with a single property, <code>title</code>.
For servers not supporting this, a single default workspace should be added to <code>context.workspaces</code>.
==== Context Properties ====
[''TBD'']
=== getTiddlerList ===
Retrieve a list of tiddlers available in the respective workspace.
==== Context Properties ====
''Adaptor Interface''
* <code>workspace</code>
''Adaptor Callback''
* [''TBD'']
''User Callback''
* <code>tiddlers</code>
=== getTiddler ===
Retrieve an individual tiddler.
==== Context Properties ====
''Adaptor Interface''
* <code>workspace</code>
''Adaptor Callback''
* <code>workspace</code>
* <code>title</code>
''User Callback''
* <code>tiddler</code>
==== Tiddler Properties ====
* <code>fields["server.type"]</code> (usually <code>adaptor.serverType</code>)
* <code>fields["server.host"]</code> (usually <code>AdaptorBase.minHostName(context.host)</code>)
* <code>fields["server.workspace"]</code> (optional; usually <code>context.workspace</code>)
=== putTiddler ===
Add or modify an individual tiddler on the server.
==== Context Properties ====
''Adaptor Interface''
* [''TBD'']
''Adaptor Callback''
* [''TBD'']
''User Callback''
* [''TBD'']
== Template ==
The latest version of this [http://svn.tiddlywiki.org/Trunk/association/adaptors/SampleAdaptor.js SampleAdaptor] is available in the TiddlyWiki Subversion repository.
<source lang="javascript">
/***
|''Name''|SampleAdaptor|
|''Description''|<...>|
|''Icon''|<...>|
|''Author''|<...>|
|''Contributors''|<...>|
|''Version''|<...>|
|''Date''|<...>|
|''Status''|<//unknown//; @@experimental@@; @@beta@@; //obsolete//; stable>|
|''Source''|<...>|
|''CodeRepository''|<...>|
|''Copyright''|<...>|
|''License''|<...>|
|''CoreVersion''|2.4.1|
|''Requires''|<...>|
|''Overrides''|<...>|
|''Feedback''|<...>|
|''Documentation''|<...>|
|''Keywords''|<...>|
!Code
***/
//{{{
if(!version.extensions.SampleAdaptor) { //# ensure that the plugin is only installed once
version.extensions.SampleAdaptor = { installed: true };
config.adaptors.sampletype = function() {};
(function(adaptor) { //# set up alias
adaptor.prototype = new AdaptorBase();
adaptor.serverType = "sampletype"; //# corresponds to config.adaptors entry
adaptor.serverLabel = "Sample Type";
adaptor.mimeType = "application/json";
// retrieve a list of workspaces
adaptor.prototype.getWorkspaceList = function(context, userParams, callback) {
context = this.setContext(context, userParams, callback);
var uriTemplate = "%0/workspaces";
var uri = uriTemplate.format([context.host]);
var req = httpReq("GET", uri, adaptor.getWorkspaceListCallback,
context, { accept: adaptor.mimeType });
return typeof req == "string" ? req : true;
};
adaptor.getWorkspaceListCallback = function(status, context, responseText, uri, xhr) {
context.status = status;
context.statusText = xhr.statusText;
context.httpStatus = xhr.status;
if(status) {
context.workspaces = [];
/* ... */ // parse responseText, determining workspaces
}
if(context.callback) {
context.callback(context, context.userParams);
}
};
// retrieve a list of tiddlers
adaptor.prototype.getTiddlerList = function(context, userParams, callback) {
context = this.setContext(context, userParams, callback);
var uriTemplate = "%0/tiddlers";
var req = httpReq("GET", uri, adaptor.getTiddlerListCallback,
context, null, null, { accept: adaptor.mimeType });
return typeof req == "string" ? req : true;
};
adaptor.getTiddlerListCallback = function(status, context, responseText, uri, xhr) {
context.status = status;
context.statusText = xhr.statusText;
context.httpStatus = xhr.status;
if(status) {
context.tiddlers = [];
/* ... */ // parse responseText, determining tiddlers
}
if(context.callback) {
context.callback(context, context.userParams);
}
};
// retrieve an individual tiddler
adaptor.prototype.getTiddler = function(title, context, userParams, callback) {
context = this.setContext(context, userParams, callback);
context.title = title;
context.tiddler = new Tiddler(title);
context.tiddler.fields = {
"server.type": adaptor.serverType,
"server.host": AdaptorBase.minHostName(context.host),
"server.workspace": context.workspace
};
var uriTemplate = "%0/tiddlers/%1";
var uri = uriTemplate.format([context.host, title]);
var req = httpReq("GET", uri, adaptor.getTiddlerCallback,
context, null, null, { accept: adaptor.mimeType });
return typeof req == "string" ? req : true;
};
adaptor.getTiddlerCallback = function(status, context, responseText, uri, xhr) {
context.status = status;
context.statusText = xhr.statusText;
context.httpStatus = xhr.status;
if(status) {
var tiddler = new Tiddler();
/* ... */ // parse responseText, determining tiddler properties
tiddler.fields = merge(context.tiddler.fields, tiddler.fields, true);
context.tiddler = tiddler;
}
if(context.callback) {
context.callback(context, context.userParams);
}
};
})(config.adaptors.sampletype); //# end of alias
} //# end of "install only once"
//}}}
</source>
The <tt>setDirty</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object sets its dirty flag to the value passed.
The Story class governs what is visible to the user on the page, and is instantiated by the TiddlyWiki code when the page loads as the global object story.
== Properties ==
* <tt>container</tt>: the DOM id of the Element that tiddlers are being displayed in
* <tt>highlightRegExp</tt>: the current search string, if any
* <tt>idPrefix</tt>: the string prepended to the DOM ids of tiddlers being displayed
== Methods ==
* [[Dev:blurTiddler|blurTiddler]]: remove focus from a tiddler
* [[Dev:chooseTemplateForTiddler|chooseTemplateForTiddler]]: find the template name for a tiddler
* [[Dev:closeAllTiddlers|closeAllTiddlers]]: close all tiddlers on the page
* [[Dev:Story.CloseTiddler|closeTiddler]]: close a single tiddler
* [[Dev:Story.createTiddler|createTiddler]]: show a tiddler on the page
* [[Dev:displayTiddler|displayTiddler]]: animate showing a tiddler on the page
* [[Dev:displayTiddlers|displayTiddlers]]: display many tiddlers simultaneously
* [[Dev:findContainingTiddler|findContainingTiddler]]: find the tiddler containing an Element
* [[Dev:focusTiddler|focusTiddler]]: give a tiddler's edit field keyboard focus
* [[Dev:Story.forEachTiddler|forEachTiddler]]: execute a function on every visible tiddler
* [[Dev:gatherSaveFields|gatherSaveFields]]: gather all saveable edit fields from tiddlers on the page
* [[Dev:getTemplateForTiddler|getTemplateForTiddler]]: return template source code for a tiddler
* [[Dev:hasChanges|hasChanges]]: returns whether there are unsaved changes to a tiddler
* [[Dev:permaView|permaView]]: change the address bar to a permalink to all visible tiddlers
* [[Dev:refreshAllTiddlers|refreshAllTiddlers]]: re-display all tiddlers on the page
* [[Dev:refreshTiddler|refreshTiddler]]: re-display a tiddler
* [[Dev:Story.saveTiddler|saveTiddler]]: save user changes to a tiddler
* [[Dev:Story.scrubTiddler|scrubTiddler]]: remove all DOM ids from a tiddler on the page
* [[Dev:Story.search|search]]: start a user-visible search
* [[Dev:Story.setDirty|setDirty]]: set the dirty flag of a single tiddler
* [[Dev:setTiddlerTag|setTiddlerTag]]: specify tags for a tiddler
The <tt>closeTiddler</tt> method of the [[Story]] class closes a single tiddler from the page. It takes three parameters in order:
* the title of the tiddler
* a boolean value indicating whether to animate closing the tiddler
* a boolean value indicating whether to animate slowly. To see this in action, hold down the Shift, Option, or Alt key while clicking the '''close''' button for a tiddler.
This function does not return any value.
The <tt>createTiddler</tt> method of the [[Story]] class opens a tiddler on the page. If a tiddler by the requested name doesn't exist, it appears ready to edit. This method takes four parameters:
* the overall parent DOM element to display the tiddler inside.
* the DOM element inside the first parameter to display directly after. A null value places it at the end of the entire element.
* the title of the tiddler to display.
* the template to use to display the tiddler. It should be either the constant <tt>DEFAULT_VIEW_TEMPLATE</tt> or <tt>DEFAULT_EDIT_TEMPLATE</tt>.
This method returns the newly created DOM element.
The <tt>forEachTiddler</tt> method of the [[Story]] class executes a function on every tiddler on the page. It takes a single parameter, which is a reference to a function. This function is executed repeatedly and is passed the following two parameters:
* a reference to a Tiddler object
* a reference to the DOM element on the page for the tiddler
This method returns no value.
The <tt>saveTiddler</tt> method of the [[Story]] class saves changes made by the user to a tiddler. It takes two parameters:
* the title of the tiddler
* a boolean value indicating whether to consider this a minor update
Minor updates do not affect the modification date of a tiddler. This method returns the title of the tiddler; if it was changed by the user, this change is reflected here.
The <tt>scrubTiddler</tt> method of the [[Story]] class removes all DOM ids from a tiddler on the page. It takes one parameter, a reference to an DOM element on the page, and returns nothing.
The <tt>search</tt> method of the [[Story]] class starts a user-visible search. It's the exact equivalent to the user typing in a search query on the page, although this method does not change what the user typed into the search field. This method takes three parameters:
* the text to search for
* a boolean value indicating whether the search should be case-sensitive
* a boolean value indicating whether the search term should be treated as a regular expression
This method does not return anything. If no tiddlers matched the search, a message is displayed to the user.
The <tt>setDirty</tt> method of the [[Story]] class sets the dirty flag of a single tiddler, which indicates whether it contains unsaved changes. It takes two parameters:
* the title of the tiddler
* the boolean value to set the dirty flag to
This method does not return any value.
=== right(n) ===
Returns n right-most chars from a string.
Example:
"foo".right(1) // returns "0"
=== trim() ===
Trims whitespace from the front and end of a string
Example:
" foo ".trim() // returns "foo"
=== format(subStrings) ===
Very handy for macros and plugins. A little bit like sprintf in C. subStrings should be an array.
Examples:
alert("Today I feel %0 because %1".format(['happy','my cat likes me']));
var t = store.getTiddler("MyTiddler");
var template = "Tiddler '%0' is %1 chars long and was last modified by '%3'";
alert(template.format([t.title,t.text.length,t.modifier]);
=== escapeRegExp() ===
Escapes any special RegExp characters with that character preceded by a backslash
=== readBrackettedList() ===
TBC...
String.prototype.right = function(n)
String.prototype.trim = function()
String.prototype.unDash = function()
String.prototype.format = function(substrings)
String.prototype.escapeRegExp = function()
String.prototype.escapeLineBreaks = function()
String.prototype.unescapeLineBreaks = function()
String.prototype.htmlEncode = function()
String.prototype.htmlDecode = function()
String.prototype.toJSONString = function()
String.prototype.parseParams = function(defaultName,defaultValue,allowEval,noNames,cascadeDefaults)
String.prototype.readMacroParams = function()
String.prototype.readBracketedList = function(unique)
String.prototype.getChunkRange = function(start,end)
String.prototype.replaceChunk = function(start,end,sub)
String.prototype.getChunk = function(start,end)
String.prototype.decodeHashMap = function()
String.prototype.startsWith = function(prefix)
The <tt>suspendNotifications</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object suspends notifications from being issued by the [[Dev:Notify|notify]] and [[Dev:NotifyAll|notifyAll]] methods. The [[Dev:ResumeNotifications|resumeNotifications]] method must be called in order to resume notifications.
This method takes no parameters. It may be called multiple times; [[Dev:ResumeNotifications|resumeNotifications]] must be called an equal number of times in order for notifications to be issued.
See http://trac.tiddlywiki.org/
[[Category:Incomplete]]
The Tiddler class represents a single tiddler. Instances of this class are created as the user opens tiddlers; they are not deleted if an user closes the corresponding tiddler. Changing an instantiated object does not affect the tiddler as saved by the author; to make changes to the tiddler that will be saved the next time the TiddlyWiki is saved, call <tt>store.saveTiddler</tt>.
== Properties ==
Instead of setting these manually, use the [[Dev:set|set]] method.
* title: a string with the tiddler's name
* text: the source code of the tiddler
* modifier: a string with the creator of the tiddler's name
* modified: a Date object corresponding to when the tiddler was last changed
* links: an array of strings, one per link in the tiddler's source code
* tags: an array of strings, one per tag assigned to the tiddler
* created: a Date object corresponding to when the tiddler was created
* linksUpdated: a boolean corresponding to whether the links property is up-to-date
== Methods ==
* [[Dev:autoLinkWikiWords|autoLinkWikiWords]]: returns whether the tiddler should have WikiWords linked.
* [[Dev:changed|changed]]: a hook to be called after the Tiddler object has been modified.
* [[Dev:escapeLineBreaks|escapeLineBreaks]] and [[Dev:unescapeLineBreaks|unescapeLineBreaks]]: converts line breaks from textual and HTML representations.
* [[Dev:generateFingerprint|generateFingerprint]]: return a SHA-1 hash of the tiddler's text.
* [[Dev:getLinks|getLinks]]: returns an array of links contained in the tiddler. Should be used instead of accessing the links property directly.
* [[Dev:getSubtitle|getSubtitle]]: returns a subtitle with author name and modification date.
* [[Dev:Tiddler.getTags|getTags]]: returns a single string of the tiddler's tags.
* [[Dev:isTagged|isTagged]]: returns whether the tiddler has been assigned a specific tag.
* [[Dev:isReadOnly|isReadOnly]]: returns whether the tiddler can be edited.
* [[Dev:Tiddler.LoadFromDiv|loadFromDiv]]: instantiate a Tiddler from HTML.
* [[Dev:saveAsRss|saveAsRss]]: render XML for the tiddler for use in an RSS feed.
* [[Dev:saveToDiv|saveToDiv]]: render HTML for storing the tiddler.
* [[Dev:set|set]]: changes many properties of the tiddler. Should be used instead of changing tiddler properties like text directly. TW 2+
== Modifying Tiddler Contents ==
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/44edde8c58e99892/ Eric]|2=
assigning directly to the "tiddler.text" property of a retrieved
tiddler object *can* be tricky:
Normally, the TW core functions, <code>store.saveTiddler()</code> or
<code>tiddler.set()</code> (for low-level internal operations) are used to
change the value in the tiddler data, and these functions trigger side-
effect processing, such as refreshing the display or even auto-saving
the file in response to changes in tiddler content.
In addition, lots of plugins hijack these functions in order to add
system-level extensions that are triggered whenever a tiddler is
changed. Directly setting the value of <code>tiddler.text</code> completely
bypasses these functions, preventing all add-on ''and'' core side-effects
behaviors from being triggered.
}}
== Storage ==
Within TiddlyWiki's store area, each tiddler is recorded in the following format:
<pre>
<div title="tiddler title" modifier="author/editor" modified="YYYY0MM0DD0hh0mm" created="YYYY0MM0DD0hh0mm" tags="foo bar [[lorem ipsum]]">
<pre>
Body of the tiddler
</pre>
</div>
</pre>
The <tt>loadFromDiv</tt> method of a [[Tiddler]] object loads a newly-instantiated Tiddler with information from a div (presumably saved by the author). It takes two parameters: the first is a reference to the div itself. This must be an Element, not a string id. The second is the tiddler's title. This method returns nothing; it only changes values in the Tiddler itself.
The <tt>getTags</tt> method of a [[Tiddler]] object returns a string representing all tags that the author has assigned to it. Spaces separate tags, and double brackets indicate tags with spaces in them. This method takes no parameters.
This is an abstract project used as an umbrella to represent the overlapping needs of three active Osmosoft projects - TiddlyGeo, TiddlyDocs and TiddlyGuv.
To begin with, this is a working page used to figure out who is making progress on which bits.
== Suggested Features ==
Key:
* blank = not required
* x = required
* y = implemented
{| class="wikitable"
|-
! feature
! generic client
! Geo
! Docs
! Guv
! TiddlyWeb Notes
|-
| access control (permission assignment)
| x
| x
| y
| y
| built in (bags, extractors)
|-
| login
| x
| x
| y
| x
| built in (challengers), client side support minimal
|-
| section editing
|
|
|
| y
| client dependent
|-
| commenting
| y
| y
| y
| y
| client dependent
|-
| tiddler draft/published/etc status
|
| y
| y
| x
| client dependent
|-
| owner assignment for a tiddler (such as for a task)
|
|
| y
| x
| client dependent
|-
| user groups
|
| x
| x
| x
| built in (user roles)
|-
| bag/recipe management
| x
|
|
| x
| API support bag recipe edits, needs client support
|-
| revision control
| x
| x
| x
| x
| built in (for tiddlers, not for bags and recipes)
|-
| file uploading
|
| x
| x
|
| any type of content can be stored in a tiddler if PUT with the correct mime-type
|-
| filtered RSS feeds
|
| x
| x
| x
| part of the atom tiddlyweb plugin (any collection of tiddlers can have a feed, that is filtered)
|-
| static file publishing
|
| y
| x
|
| part of the twstatic tiddlyweb plugin
|-
| SMS/email pub/sub
|
|
| x
|
| a plugin could be created to do this
|-
| WYSIWYG editor
|
| y
| y
| x
| client dependent
|-
| PDF generation
|
|
| y
|
| can probably host Paul's code in some fashion, need more info
|-
| image handling (copy & paste)
|
|
|
| x
| client dependent
|-
| business diagrams
|
|
|
| x
| client dependent
|-
| spreadsheets
|
|
|
| x
| client dependent (see also wikicalc/socialcalc)
|}
== Notes ==
=== Access Control ===
permission assignment similar to *nix file permissions
=== Login ===
login should be TW macro that presenting a login form (Simon haz it)
=== Section Editing ===
section editing is to be implemented as tiddler transclusion
''not enough interest''
=== Commenting ===
Everyone has used Mike's [http://svn.tiddlywiki.org/Trunk/contributors/MichaelMahemoff/plugins/CommentsPlugin/ CommentsPlugin].
=== Tiddler Status ===
=== Tiddler Assignment ===
=== User Groups ===
=== Bag/Recipe Management ===
=== Revision Control ===
revision control includes listing individual revisions, but diff'ing is not absolutely necessary (although very desirable!)
=== File Uploading ===
=== Filtered RSS Feeds ===
Simon will look into filtered RSS feeds tomorrow (Tuesday 10th Feb '09)
=== Static File Publishing ===
Geo has implemented this using a combination of [[TiddlyTemplating]] and a custom plugin for [[TiddlyWeb]].
In addition to simply publishing static files, JRL has been experimenting with how to use TiddlyWeb as a full-on content templating system and has been working with a relatively simple TiddlyWeb plug-in to achieve this. As an example of what is trying to be achieved, now you could visit e.g. "/articles/anArticle" and the "anArticle" tiddler will be rendered through the "articles" template.
=== Pub/Sub ===
SMS/e-mail
''not enough interest''
=== WYSIWYG Editor ===
implemented using [http://visualtw.ouvaton.org/VisualTW.html#FCKeditorPlugin FCKEditor] from Pascal Collin
=== PDF Generation ===
''not enough interest''
=== Image Handling ===
(copy & paste)
''not enough interest''
=== Business Diagrams ===
''not enough interest''
=== Spreadsheets ===
''not enough interest''
== Overview ==
TiddlyWeb is a project to create a reference implementation of the mother of all [[server-side implementations]] ([[möäss]]) for [[TiddlyWiki]], particularly a reference web API for accessing TiddlyWiki content located on the internet.
== Demo ==
A demonstration site with a growing collection of documentation and plans is sometimes up at http://peermore.com:8080/recipes/AutoTiddlyWeb/tiddlers.wiki
That URL is a working alpha of the TiddlyWeb service, configured for autosave (meaning tiddlers are automatically saved back to the server when 'done' is clicked). Please visit there for the most up to date information on TiddlyWeb. Contribute questions, comments and additional documentation there.
== Goals ==
The goals of TiddlyWeb include:
* Readable code reference version
* Set of rigorous tests that establish a point of reference (the ideal tests would be usable against other implementations)
* Documented API
* GET and PUT 1 tiddler
* GET full TiddlyWiki -> acquire *.html document for writing to disk as offline tiddlywiki
* Implementation is plugin-based extension(s) to core code
* Strong attention to javascript/plugin security policy
* Authentication modularized
* Authorization modularized
* Improved performance of save to server
* Easy creation of dynamically constructed TiddlyWikis for use by multiple people
* Rigorous attention to the standards and practices of HTTP.
== Source, Distribution and Discussion ==
The source of TiddlyWeb is kept in the TiddlyWiki subversion repository at http://svn.tiddlywiki.org/Trunk/association/serversides/tiddlyweb/core
Regular python-egg tarballs are built and distributed from http://peermore.com/tiddlyweb/dist
Discussion about TiddlyWeb development can be found in the TiddlyWikiDev google group: http://groups.google.com/group/TiddlyWikiDev
* [[{{TALKPAGENAME}}]]
== Ongoing development ==
[[Dev:TiddlyWeb development]]
{{WIP}}
This page is used to track why people involved in [[TiddlyWeb]] development are interested and what they would like it to be able to do.
We'll also use this to indicate what we're building next and who's doing it.
== Needs ==
=== FND ===
Goal: provide a collaborative platform with TiddlyWiki as the front-end
missing client-side components:
* renaming (adaptor)
* diff'ing
* unit tests (esp. adaptor)
=== Jonathan Lister ===
I would like a hosted TiddlyWeb as easy to use as [[Tiddlyspot]].
I have heard that client-side diff'ing is interesting to the other people here and would like that too.
=== General Needs ===
* Bag and Recipe editing plugins (client and server (?) side).
* Client side login handling (see http://svn.tiddlywiki.org/Trunk/association/serversides/tiddlyweb/client/plugins/TiddlyWebLoginPlugin.js )
* Client side tools for managing recipe and bag defaults and editing current fields.
* (forgetting something)
== Potential New Features ==
* TiddlyWeb hosting
* one-click provisioning of new TiddlyWeb instances
* interface for editing permissions on a TiddlyWeb
* client-side diff'ing
The TiddlyWiki class represents an entire TiddlyWiki. It is normally instantiated once, when the page is first loaded, into the global object <tt>store</tt>. It has one notable property, <tt>dirty</tt>, which is a boolean representing whether the TiddlyWiki contains unsaved changes.
== Methods ==
* [[Dev:addNotification|addNotification]]: hooks a function to changes in a tiddler
* [[Dev:clear|clear]]: empties the TiddlyWiki
* [[Dev:createTiddler|createTiddler]]: instantiates a new tiddler
* [[Dev:removeTiddler|removeTiddler]]: removes an existing tiddler
* [[Dev:fetchTiddler|fetchTiddler]]: retrieves a Tiddler object
* [[Dev:filterTiddlers|filterTiddlers]]: retrieve a filtered list of tiddlers
* [[Dev:forEachTiddler|forEachTiddler]]: executes a function on each tiddler
* [[Dev:getMissingLinks|getMissingLinks]]: retrieves a list of missing links
* [[Dev:getOrphans|getOrphans]]: retrieves a list of orphaned tiddlers
* [[Dev:getRecursiveTiddlerText|getRecursiveTiddlerText]]: retrieves tiddler source code, replacing links with source code
* [[Dev:getReferringTiddlers|getReferringTiddlers]]: finds tiddlers that refer to a particular tiddler
* [[Dev:getShadowed|getShadowed]]: returns an array of all shadow tiddlers available
* [[Dev:TiddlyWiki.GetTags|getTags]]: retrieves a list of all tags used in the TiddlyWiki
* [[Dev:getTiddlerText|getTiddlerText]]: returns the source code of a tiddler
* [[Dev:getTiddlers|getTiddlers]]: returns all tiddlers sorted by a criteria
* [[Dev:isDirty|isDirty]]: returns whether there are unsaved changes to the TiddlyWiki
* [[Dev:isShadowTiddler|isShadowTiddler]]: returns whether a tiddler is shadowed
* [[Dev:loadFromDiv|loadFromDiv]]: initializes a TiddlyWiki from saved HTML
* [[Dev:notify|notify]]: invoke notification handlers for a tiddler
* [[Dev:notifyAll|notifyAll]]: invoke all notification handlers
* [[Dev:resumeNotifications|resumeNotifications]]: resumes update notifications
* [[Dev:reverseLookup|reverseLookup]]: finds all tiddlers matching a criteria
* [[Dev:saveTiddler|saveTiddler]]: saves changes to a tiddler
* [[Dev:search|search]]: search for tiddlers whose source code contains a string
* [[Dev:setDirty|setDirty]]: sets the TiddlyWiki's dirty flag
* [[Dev:suspendNotifications|suspendNotifications]]: halts update notifications
* [[Dev:tiddlerExists|tiddlerExists]]: returns whether a tiddler exists
The <tt>getTags</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns an array with information about the tags used in the TiddlyWiki. Each element is an array in itself, with two items:
* the name of the tag
* the number of tiddlers with this tag
The overall array is sorted by tag name. If the TiddlyWiki is empty, an empty array is returned.
Similar to [[Dev:Macros|creating macros]], [[Tiddler Toolbar|toolbar]] commands are created by attaching an object to <code>config.commands</code>:
<source lang="JavaScript">
config.commands.sampleCommand = {
text: "label",
tooltip: "tooltip",
handler: function(event, src, title) {
// ...
return false;
}
};
</source>
Each command has a ''handler'' method (<code>config.commands.*.handler</code>), as well as <code>text</code> and <code>tooltip</code> properties for the generated command button's label and tooltip, respectively.
{{Note|
In order to use a newly-created toolbar command, this has to be added to the [[ToolbarCommands]] shadow tiddler.
The keyword for a command is the same as the name of the object defining the handler (here ''sampleCommand'').
}}
Command handlers are invoked when the respective button is clicked and are passed the following arguments:
* '''event:''' the respective event
* '''src:''' the button element
* '''title:''' the title of the respective tiddler
== Command Popups ==
Toolbar commands can also create popups:
<source lang="JavaScript">
config.commands.sampleCommand = {
type: "popup",
text: "label",
tooltip: "tooltip",
handlePopup: function(popup, title) {
// ...
}
};
</source>
== Conditional Display ==
Commands have an optional <code>isEnabled</code> method which is passed the respective tiddler object and determines whether the command button will be rendered (returning <code>true</code> or <code>false</code>).
In addition, the following optional properties are available:
* '''hideShadow:''' do not display for shadow tiddlers
* '''hideReadOnly:''' do not display in ''[[readOnly]]'' state
* '''readOnlyText:''' button label for ''[[readOnly]]'' state
* '''readOnlyTooltip:''' tooltip for ''[[readOnly]]'' state
== See Also ==
* [[Dev:Macros]]
== TiddlyWiki Assembly ==
* [[Dev:Cook|Cook]]
* [[Dev:Ginsu|Ginsu]]
* [[Dev:Recipe|Recipes]]
* [[Dev:Chef|Chef]]
* [[r4tw]]
== Debugging and Testing ==
* [http://www.getfirebug.com Firebug] (Firefox extension)
[[Category:Developer Tools]]
See http://trac.tiddlywiki.org/wiki/Translations for a current list of translations, and information on how to do new translations.
See http://trac.tiddlywiki.org/browser/Trunk/association/locales/core to view the source code of existing translations.
[[Category:Incomplete]]
twill is a tool for scripting web browsing in python.
http://twill.idyll.org/
It could be useful for testing in some cases, but it is not as tied to HTTP as some would like. It thinks more in terms of HTML and links, rather than HTTP, URLs and methods.
{{Review}}
The options under the options slider and in AdvancedOptions are stored in browser cookies. So if you sometimes lose your cookies or you are working on your TiddlyWiki on several computers then it can be tiresome to have to enter your options time and time again.
==Use Cases==
''There is probably a better way of expressing this, a table?. Just jotted down for now:''
===TiddlyWiki Preferences===
# options defining viewing preferences - Animate, etc
# options defining editing preferences - UserName, etc
===TiddlyWiki Users===
# single user, editing and viewing
# single user editing, several viewing
# multiple users editing and viewing
===TiddlyWiki Origin===
# local file URI, stable
# local file URI, moved or copied from another TiddlyWiki
# file URI on a network or shared drive
# http URI served by [[TiddlySpot]], [[TiddlyWeb]] or [[ccTiddly]] ''separate use-cases?''
# other URI, such as ftp ''probably downloaded as a file URI''
===Scope===
# options scoped to a specific file
# options scoped to a specific browser/computer
# options carried across multiple files
===Persistence===
# options may be cleared with browser cache clearing
# options persisting beyond browser reset/upgrade
===Precedence===
* cookie based options override options stored in a tiddler
==Issues==
* any changes to the options implementation will have to deal with being backwards compatible, or having a migration for existing [[TiddlyWiki]] users.
* cookies are not supported for file URIs in the [[http://www.google.com/chrome Google Chrome]] browser as discussed in [[http://code.google.com/p/chromium/issues/detail?id=535 Issue:535]] for reasons explained in the paper [[http://www.adambarth.com/papers/2008/jackson-barth-b.pdf Beware of Finer-Grained Origins]]
==Discussion==
This page originated from a thread on the [[TiddlyWikiDev]] forum:
http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/6945f595e6917ce5
== See Also ==
* [[Configuration_Options]]
== Global methods ==
<tt>getParser</tt> selects the correct Formatter for a tiddler.
The <tt>wikify</tt> function:
<pre>
function wikify(source,output,highlightRegExp,tiddler)
{
if(source && source != "") {
var wikifier = new Wikifier(source,getParser(tiddler),highlightRegExp,tiddler);
wikifier.subWikifyUnterm(output);
}
}
</pre>
It creates a Wikifier object and then calls wikifier.subWikifyUnterm.
<tt>wikifyStatic</tt> returns the html directly.
<tt>wikifyPlain</tt> calls wikifyPlainText on a single tiddler.
<tt>wikifyPlainText</tt> calls wikifier.wikifyPlain on the text.
<tt>highlightify</tt> calls wikifier.outputText.
== Static methods ==
The <tt>Wikifier</tt> Object
Constructor takes a formatter. <tt>getParser</tt> figures out which one. <tt>config.parsers</tt> is examined but is empty by default, which means that in the default setup, calls to <tt>getParser</tt> return the global formatter object.
<tt>Wikifier.prototype.wikifyPlain</tt> calls subWikify on itself
<tt>Wikifier.prototype.subWikify</tt> calls either <tt>subWikifyTerm</tt> or <tt>subWikifyUnterm</tt> depending on whether it has a terminator provided or not (see below). Example uses are in the gradient macro's handler, where it is called with a terminator, and <tt>Wikifer.prototype.wikifyPlain</tt> where it is called without.
<tt>Wikifier.prototype.subWikifyUnterm</tt> is the function that gets called by <tt>wikify</tt> and <tt>wikifyStatic</tt>. <tt>wikifyPlain</tt> and <tt>wikifyPlainText</tt> calls <tt>subWikify</tt> with one argument, so that ends up calling <tt>subWikifyUnterm</tt> as well. The function finds the strings that match with the formatter, outputs whatever is before the first as ordinary text, then goes into a loop through the matches until they run out. The mechanism for figuring out which part of the formatter and therefore which handler to call depends on the result of an exec() call being an array where the elements correspond to the paranthesized parts of the regex - if there is a match, that element contains something in it, if not, it is undefined. After the matches are finished, it outputs the rest of the text. The handlers tend to wikify their contents, so the wikification process is recursive. The upshot of this is that care has to be taken to keep the regex's lastIndex property and the output pointer in check.
<tt>Wikifier.prototype.subWikifyTerm</tt> is similar to <tt>subWikifyUnTerm</tt>. It takes a terminator regex to match the end of the string in question and wikifies (again a use of recursion) whatever is in between a formatter match and a terminator match.
<tt>Wikifier.prototype.outputText</tt> outputs text without wikifying it. Copes with highlighting text (via highlightify).
The <tt>addClass</tt> global function adds a CSS class to a DOM element. It take two parameters: the DOM element to modify, and the name of the class to add. It does not return anything.
The <tt>addEvent</tt> global function adds an event listener to a DOM element. It takes three parameters:
* the DOM element to modify.
* the event to listen to.
* the function to attach to be triggered when the event occurs.
This does not return anything.
The <tt>addNotification</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object ties an external function (called a callback here) to a tiddler. Whenever that tiddler is changed by the author, the callback function is invoked. TheTiddlyWiki code only passes the title of the changed tiddler to the callback function; it's up to the callback to dig up what it needs to act appropriately based on the change. This method takes two parameters:
* the title of the tiddler
* a reference to the callback function
It is possible to call this method with a null value for the first parameter. You must specify null, not an empty string. The callback function then is invoked for every tiddler, but only if either:
* notifications are running via the [[TiddlyWiki.notifyAll|notifyAll]] method
* the <tt>notify</tt> method is called with the second parameter set to true
This method of a [[Tiddler]] object returns whether someone rendering this tiddler should create links for WikiWords. Currently, tiddlers marked <tt>systemConfig</tt> or <tt>excludeMissing</tt> are the only exceptions. There are no parameters to this method.
The global function <tt>blurElement</tt> removes keyboard focus from a DOM element. It takes one parameter, the DOM element to lose focus, and does not return any values.
The <tt>blurTiddler</tt> method of the [[Story]] class takes the focus away from a tiddler — that is, any text fields it may currently show lose keyboard focus. It expects one parameter, the title of the tiddler to lose focus, and returns nothing.
The <tt>changed</tt> method of a [[Tiddler]] object recalculates various things about it after its properties are changed. This is mainly for internal use by the TiddlyWiki code, and has no visible effect.
The <tt>chooseTemplateForTiddler</tt> method of the [[Story]] class returns the name of a template for a tiddler view. It takes two parameters:
* the title of the tiddler
* a constant corresponding to the type of template to use
The second parameter may be omitted, in which case <tt>DEFAULT_VIEW_TEMPLATE</tt> is assumed.
The <tt>clear</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object removes all tiddlers from it and clears its dirty flag. It takes no parameters.
The global function <tt>clearMessage</tt> hides the TiddlyWiki's message area from view. This function expects no parameters.
The <tt>closeAllTiddlers</tt> method of the [[Story]] class closes all tiddlers currently visible on the page and scrolls the browser window to the top of the page. It accepts one optional parameter, a title of a tiddler to keep open. If a tiddler with that title is currently visible, it is not closed, and any tiddlers with unsaved changes remain open as well.
The global function <tt>convertUnicodeToUTF8 </tt>converts a string encoded in Unicode to a UTF-8 formatting. It takes one parameter, the string to convert, and returns a converted string.
The <tt>createExternalLink</tt> global function renders a link to an outside Web page. It requires two parameters:
* the DOM element to render into. The link is appended to any existing content.
* the URL to point to.
This function returns a DOM element reference to the link.
The global function <tt>createTagButton</tt> renders a button that displays a list of tiddlers that belong to a certain tag. Clicking a menu item opens the tiddler. This function takes three parameters in order:
* the DOM element to render into. This appends to existing content.
* the name of the tag.
* the title of a tiddler to exclude. You may leave this value off; in that case, all tiddlers matching the tag will be displayed.
This function returns a reference to the newly-created button, which is a DOM element itself.
The <tt>createTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object instantiates a [[Tiddler class|Tiddler]] object. It takes one parameter, which is the title of the tiddler requested. If a tiddler hasn't previously been created by the author, an empty Tiddler object is returned.
This method does not link the Tiddler in any way to the TiddlyWiki. You may want to use the global function [[createTiddler global function|createTiddler]] instead.
The global function <tt>createTiddlyButton</tt> renders a button on the page similar the ones you see in the top-right corner of a tiddler. It takes seven parameters in order:
* the DOM element to add the button to. The button is appended to end of any existing content.
* the text to display as the button
* the text to display as a tooltip on the button
* a callback function that is invoked when the button is clicked (e.g. <code>function() { foo(); }</code>)
* a CSS class to apply to the button. If not specified, this is 'button'.
* a DOM id to give the button
* an access key for the button
You may specify a null value for any of these; if the first parameter is null, the button is created but not displayed. This function returns the created button as a DOM element.
The global function <tt>createTiddlyElement</tt> creates a DOM element. This function takes five parameters:
* the parent DOM element to add the new element to
* the type of element to create. This is a lowercase string matching the name of the HTML tag you'd like to create -- so, for example, to create a div element, you'd pass 'div'.
* the DOM id to give the element.
* the CSS class to give the element.
* text to put inside the element.
Any of these parameters may be null. This function returns the created DOM element.
The global function <tt>createTiddlyLink</tt> renders a link to a tiddler. This function takes five parameters:
* the DOM element to render into. The link is appended to any existing content.
* the title of the tiddler to link to.
* a boolean indicating whether the link should display the title of the tiddler. If false is passed here, the link's text will be the empty string.
* the CSS class to assign to the link. This parameter is optional.
* a boolean indicating whether the link should act as a permalink, or it should be a normal link. This parameter is optional.
The <tt>createTiddlyText</tt> global function adds a text node to an existing DOM element. It takes two parameters:
* the DOM element to add the text to
* the text to add
This function returns the first parameter.
The global function <tt>displayMessage</tt> displays a message in the TiddlyWiki's message area. It accepts two parameters:
* a string to display
* a title of a tiddler to link to
This function does not return any value.
The <tt>displayTiddler</tt> method of the [[Story]] class works the same way that the createTiddler method does, except that the newly-displayed tiddler is animated opening, and the browser window scrolls to display it. This method takes five parameters:
* the parent DOM element to display the tiddler inside (required but may be <tt>null</tt> if the tiddler already exists, or the special strings "bottom" and "top" to place the newly created tiddler at the bottom or top of the story)
* the title of the tiddler or a tiddler itself
* optionally the template to view the tiddler as. This should be either the constant <tt>DEFAULT_VIEW_TEMPLATE</tt> or <tt>DEFAULT_EDIT_TEMPLATE</tt>.
* optionally a boolean value indicating whether to animate opening the tiddler
* optionally a boolean value indicating whether to animate slowly. To see this in action, hold down the Shift, Option, or Alt key when clicking a tiddler link.
This method does not return any values.
<pre>
//# Display a given tiddler with a given template. If the tiddler is already displayed but with a different
//# template, it is switched to the specified template. If the tiddler does not exist, and if server hosting
//# custom fields were provided, then an attempt is made to retrieve the tiddler from the server
//# srcElement - reference to element from which this one is being opened -or-
//# special positions "top", "bottom"
//# tiddler - tiddler or title of tiddler to display
//# template - the name of the tiddler containing the template -or-
//# one of the constants DEFAULT_VIEW_TEMPLATE and DEFAULT_EDIT_TEMPLATE -or-
//# null or undefined to indicate the current template if there is one, DEFAULT_VIEW_TEMPLATE if not
//# animate - whether to perform animations
//# customFields - an optional list of name:"value" pairs to be assigned as tiddler fields (for edit templates)
//# toggle - if true, causes the tiddler to be closed if it is already opened
//# animationSrc - optional. If provided, this will specify the element which is to act as the start of the animation -or-
//# the source of the animation will be the srcElement.
</pre>
==Examples==
<pre>
story.displayTiddler(null, "Title of an Existing Tiddler");
</pre>
<pre>
story.displayTiddler("bottom", "Title of Tiddler To Create", DEFAULT_EDIT_TEMPLATE);
</pre>
The <tt>displayTiddlers</tt> method of the [[Story]] class works the same way that the [[Dev:DisplayTiddler|displayTiddler]] method does, only it takes an array of tiddler titles as its second parameter. Each tiddler in the array is opened on the page.
The global function <tt>ensureVisible</tt> returns the horizontal position, in pixels, required to bring a DOM element into view. It takes one parameter, the DOM element to scroll into view.
The <tt>escapeLineBreaks</tt> method of a [[Tiddler]] object converts newline characters in the tiddler's text property into literal \n strings, and converts typed backslashes into double backslashes (\\). It takes no parameters and returns the parsed text.
The <tt>fetchTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns a [[Tiddler class|Tiddler]] that the TiddlyWiki contains. It expects one parameter: the name of the tiddler. If the tiddler does not exist, then an undefined value is returned. (This is different from a null value.) This is a primitive method used by many other methods in the TiddlyWiki class.
The <tt>filterTiddlers</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object retrieves a filtered list of its tiddlers. It returns an array of Tiddler() objects that match the filter expression. The method takes one parameter:
* <tt>filter</tt> - the filter string (returns an empty array if not provided)
A filter follows a grammar that can be described in [http://en.wikipedia.org/wiki/EBNF EBNF]:
filter := filterStep {'|' filterStep }
filterStep := '[' filterElements ']', {'[' filterElements ']'}
filterElements := filterElement, {filterElement}
filterElement := '['TiddlerName']' | tag'['TagName']' | sort'['SortField']' | limit'['NoOfResults']'
Another way of expressing this, without the (in this case) slightly confusing EBNF syntax, might be:
A filter string is of the form:
filterStep | filterStep ... // only one filterStep is required
where filterStep is of the form:
[filterElements] [filterElements] ... // only one filterElements is required
where filterElements is one or more of the following:
[TiddlerName]
tag[TagName]
sort[SortField]
limit[NoOfResults]
Example:
store.filterTiddlers("[tag[blog post]sort[-modified]limit[10]]")
returns any tiddler tagged "blog post", limited to the 10 most recently edited tiddlers.
== Allowed types of filterElement ==
<tab class="wikitable" sep="comma" head="top">
filter,meaning
[text],refers to a single tiddler with title "text"
<nowiki>[text text]</nowiki>,refers to a single tiddler with title "text text"
tag[tag],refers to any tiddler tagged with "tag"
tag[a tag],refers to any tiddler tagged with "<nowiki>[[a tag]]</nowiki>"
sort[+field] or [sort[field]],sorts any results already collected in ascending order by "field"
sort[-field],sorts and results already collected in descending order by "field"
limit[integer],limits the results array to contain no more than "integer" tiddlers
</tab>
== Multiple filterElements and filterSteps ==
Multiple <tt>filterElements</tt> are combined by concatenating the results from each <tt>filterElements</tt>.
Multiple <tt>filterStep</tt>, on the other hand, are evaluated in succession, with the results of each <tt>filterStep</tt> used as the tiddler set for the next <tt>filterStep</tt>.
Examples:
store.filterTiddlers("[tag[mish]] [tag[mash]]") // two filter elements
returns any tiddler tagged with "mish" or "mash".
store.filterTiddlers("[tag[mish]] | [tag[mash]]") // two filter steps
returns any tiddler tagged with "mish" and of these, any tagged with "mash".
The <tt>findContainingTiddler</tt> method of the [[Story]] class returns the DOM element corresponding to an entire tiddler on the page that encloses the DOM element passed to the method. If the passed element is not inside a tiddler, a null value is returned.
The global function <tt>findPosX</tt> returns the horizontal position of a DOM element on the page. It takes one parameter, the element to examine.
The global function <tt>findPosY</tt> returns the vertical position of a DOM element on the page. It takes one parameter, the element to examine.
The <tt>findScrollX</tt> function returns the current horizontal scroll position of the page. It takes no parameters.
The <tt>findScrollY</tt> function returns the current vertical scroll position of the page. It takes no parameters.
The <tt>findWindowHeight</tt> global function returns the height of the browser window. It takes no parameters.
The <tt>findWindowWidth</tt> global function returns the width of the browser window. It takes no parameters.
The <tt>focusTiddler</tt> method of the [[Story]] class gives a text field belonging to a tiddler focus. It takes two parameters:
* the title of the tiddler
* a string corresponding to the type of field to focus. If a null value is passed here, the first edit field in the tiddler (typically the title) is focused.
This method returns no value.
The <tt>forEachTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object executes a function on all tiddlers in the TiddlyWiki. It expects exactly one parameter: the function to execute. The function is repeatedly invoked, each time passed these three parameters in order:
* the parent TiddlyWiki
* the title of the tiddler
* the [[Tiddler class|Tiddler]] object itself
The <tt>gatherSaveFields</tt> method of the [[Story]] class gathers up all saveable edit fields from tiddlers on the page. It takes two parameters:
* the element to search for edit fields
* an object reference which will be filled with data found.
This is mostly used by the [[hasChanges]] method, but is available for use.
The <tt>generateFingerprint</tt> method of a [[Tiddler]] object returns a SHA-1 hash of the tiddler's text. Currently this isn't used by the TiddlyWiki code, but it is available to macros.
The global function <tt>generateRSS</tt> returns a string of a full RSS feed with the most recently changed tiddlers. This function takes no parameters; the number of items generated is governed by the variable <tt>config.numRssItems</tt>.
The <tt>getLinks</tt> method of a [[Tiddler]] object returns an array of strings, each corresponding to a link present in the tiddler's source code. Using this method is preferable to examining the <tt>links</tt> property directly. There are no parameters to this method.
The <tt>getMissingLinks</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns an array of strings, each entry a link that a tiddler refers to but doesn't have a matching tiddler defined. This array is sorted by name. This method does not take any parameters.
Tiddlers tagged <tt>systemConfig</tt> or <tt>excludeMissing</tt> will not be checked for missing links.
The global function <tt>getNodeText</tt> returns the text inside a DOM element. This takes one parameter, the element to examine.
The <tt>getOrphaned</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns an array of strings, each the name of an orphaned tiddler -- that is, a tiddler with no links to it. This array is sorted by name. This method takes no parameters.
The <tt>getPlainText</tt> returns a plain text version of the text inside a DOM element. It takes one parameter, the element to examine.
The <tt>getRecursiveTiddlerText</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns the source code of a tiddler with links replaced with their contents. That is, if two tiddlers are defined like so:
'''tiddler1'''
Hello, <nowiki>[[tiddler2]]</nowiki>.
'''tiddler2'''
world
executing <tt><nowiki>getRecursiveTiddlerText('tiddler1', '', 1)</nowiki></tt> returns <tt>Hello world</tt>. This method expects three parameters in order:
* the title of the tiddler to retrieve
* default text to return if the tiddler does not exist
* the maximum depth of links to follow
The <tt>getReferringTiddlers</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns all tiddlers that link to the tiddler passed. Unlike [[getOrphans]] or [[getMissingLinks]], this returns actual [[Tiddler]] objects, not titles. However, it expects these parameters in order:
* the title of a tiddler
* ''unused parameter — pass a null value''
* the field to sort results on. If not specified, results are sorted by title.
The <tt>getShadowed</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns an array of all [[Shadow Tiddlers|shadow tiddlers]] in the TiddlyWiki. Unlike the [[Dev:getMissingLinks|getMissingLinks]] and [[Dev:GetOrphans|getOrphans]] methods, it returns [[Tiddler]] objects, not titles. This method takes no parameters.
The <tt>getSubtitle</tt> method of a [[Tiddler]] object returns a string with text suitable for display as a tiddler's subtitle, incorporating the tiddler's author and modification date. It takes no parameters.
The <tt>getTemplateForTiddler</tt> method of the [[Story]] class returns HTML source code ready to be used as a template that is stored inside a tiddler. This method takes three parameters:
* the title of the tiddler that is about to be displayed
* the title of the tiddler containing the template source code. Note that the constants <tt>DEFAULT_VIEW_TEMPLATE</tt> and <tt>DEFAULT_EDIT_TEMPLATE</tt> do not work here.
* a reference to the Tiddler about to be displayed
Only the second parameter is actually used by the TiddlyWiki code, but the other information is passed for the benefit of plugin developers who override this method.
The <tt>getTiddlerText</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns the source code of a tiddler. It takes two parameters:
* the title of the tiddler
* the string to return if the tiddler does not exist (by default, the null value — not an empty string)
If a tiddler is not defined by the author but a [[Shadow Tiddlers|shadow tiddler]] exists, its source code is returned instead. If the tiddler doesn't exist, then the second parameter passed is returned.
The <tt>getTiddlers</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns an array of every tiddler in the TiddlyWiki, sorted by a field. Its only parameter, the name of the field to sort on, is optional. This can be any property of the [[Tiddler]] class. If the TiddlyWiki is empty, an empty array is returned.
The <tt>hasChanges</tt> method of the [[Story]] class returns whether there are unsaved changes for a tiddler currently on the page. It takes one parameter, the title of the tiddler to check.
The global function <tt>hasClass</tt> returns whether a DOM element belongs to a CSS class. It takes two parameters in order:
* the DOM element
* the class to check for
The <tt>isDirty</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns whether there are unsaved changes to it. This method expects no parameters.
See also: [[Dev:SetDirty|setDirty]]
The <tt>isReadOnly</tt> method of a [[Tiddler]] object returns whether the tiddler is eligible for editing. Currently this is a TiddlyWiki-wide setting, so all tiddlers will return the same value. If the user is viewing the TiddlyWiki over anything but a local file connection, then this returns true. This method takes no parameters.
The <tt>isShadowTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns whether a tiddler is shadowed. It takes one parameter, the title of the tiddler, and returns a boolean value.
The <tt>isTagged</tt> method of a [[Tiddler]] object returns whether the author has given the tiddler the passed tag.
#REDIRECT [[Dev:TiddlyWiki.LoadFromDiv]]
The <tt>notify</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object runs all notification functions registered to a tiddler via [[Dev:AddNotification|addNotification]]. It takes two parameters:
* the title of the tiddler
* a boolean value signalling whether to include blanket notifications — that is, notifier functions that were registered via <tt>addNotification(null, function)</tt>
This is typically called as a matter of course by the TiddlyWiki code, but you may force a notification via this method.
The <tt>notifyAll</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object runs all notification function currently registered to it via [[Dev:AddNotification|addNotification]]. If a notification function was tied to a particular tiddler, it is invoked with that tiddler, as usual, and blanket notifications (registered to the null value) are run as well. This method takes no parameters.
This method is called by the TiddlyWiki code starts up as the page loads, but this is an easy way to force a reload of page title, subtitle, stylesheet, and so on.
The <tt>permaView</tt> method of the [[Story]] class changes the browser's address bar so that it is a permalink to all open tiddlers. This method takes no parameters.
[http://simonbaird.com/r4tw/ r4tw] is a collection of Ruby classes for manipulating [[TiddlyWiki]] files.
[http://rubyforge.org/projects/tiddlywikicp/ tiddlywiki_cp] is a Ruby gem based on ''r4tw'', providing a library and command-line interface to create tiddlers from files and vice versa.
== See Also ==
* [[Dev:PyTiddlyWiki]]
[[Category:Tools]]
{{DISPLAYTITLE:Dev:r4tw}}
The <tt>refreshAllTiddlers</tt> method of the [[Story]] class re-renders all tiddlers currently visible on the page. It does not take any parameters nor does it return any value. Tiddlers with unsaved changes are forced to be re-rendered.
The <tt>refreshTiddler</tt> method of the [[Story]] class re-renders a tiddler's source code on the page. It takes three parameters:
* the title of the tiddler to display
* the template to use for display. You should use either the constant <tt>DEFAULT_VIEW_TEMPLATE</tt> or <tt>DEFAULT_EDIT_TEMPLATE</tt> in most cases.
* a boolean representing whether to force re-rendering even if the tiddler and template has not changed, or if there are unsaved changes to the tiddler.
This method returns an DOM element reference to the tiddler on the page.
The global function <tt>refreshTiddlyLink</tt> refreshes the status of a link already on the page. You would want to do this to update an individual link to a tiddler if that tiddler has been either created or deleted. This function takes two parameters:
* a DOM element reference to the link on the page
* the title of the tiddler it references
This function does not return anything.
The <tt>removeChildren</tt> global function removes all child nodes from a DOM element. It takes one parameter, the element to remove children from, and returns no value.
The global function <tt>removeClass</tt> removes a CSS class from a DOM element. It takes two parameters:
* the DOM element
* the class to remove
The global function <tt>removeEvent</tt> removes an event listener from a DOM element. It takes three parameters:
* the element
* the event type to stop listening to
* the function to remove
The <tt>removeTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object removes a tiddler from the TiddlyWiki. It takes one parameter: the name of the tiddler to delete. It notifies functions set as listeners with [[TiddlyWiki.addNotification|addNotification]], sets the dirty flag, and returns silently if the tiddler does not exist.
The global function <tt>resolveTarget</tt> returns the real target of a DOM event. This function takes one parameter, the event in question, and returns the element.
The <tt>resumeNotifications</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object resumes issuing notifications after [[Dev:SuspendNotifications|suspendNotifications]] is called. If [[Dev:SuspendNotifications|suspendNotifications]] was called multiple times, this method must be called an equal number of times in order for notifications to occur. This method does not expect any parameters.
The <tt>reverseLookup</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns an array of [[Tiddler]] objects that match a certain criteria. It expects four parameters in order:
* the field to filter by. This can be any property of a Tiddler.
* the value of the field to filter by.
* a boolean value:
** ''true:'' return tiddlers that match the value passed
** ''false:'' return all tiddlers except those that match the value passed
* what field to sort results by.
If no matches were found, an empty array is returned.
The <tt>saveAsRss</tt> method of a [[Tiddler]] object returns a string with XML suitable for use as part of an RSS feed. This method takes no parameters.
The global function <tt>saveChanges</tt> saves the TiddlyWiki to disk. This function takes a boolean value as its parameter; if it is true, then the TiddlyWiki is only saved if its dirty flag is set.
The global function <tt>saveOptionCookie</tt> saves user settings in config to a cookie. You can add your own settings if you like; see the config passage for details. This function takes no parameters and returns nothing.
The <tt>saveTiddler</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object is typically called in response to the author clicking the '''done''' link after editing a tiddler. This method takes six parameters: the old title of the tiddler, the new title of the tiddler, the tiddler's source code, the name of the author, the modification date, and the tags (as an array of strings). This feeds directly into [[Tiddler]]'s [[set]] method, and does not save changes to the document on disk.
The <tt>saveToDiv</tt> method of a [[Tiddler]] object returns HTML for saving to a file on disk. This doesn't actually do any saving in itself; it just returns HTML.
The <tt>search</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns an array of [[Tiddler]] objects whose source code contains a string. This method takes three parameters:
* a regular expression to search for
* the field to sort results by. This can be any property of a [[Tiddler]] object.
* a tag to exclude from search results.
If no tiddlers match the search, an empty array is returned.
The <tt>set</tt> method of a [[Tiddler]] object modifies the tiddler's properties. This is preferable to changing the tiddler's properties directly, as it does some recalculation in the background. This method takes seven parameters, all of them optional, but they must be specified in this order:
* <tt>title</tt>: the new title of the tiddler
* <tt>text</tt>: the source code of the tiddler
* <tt>modifier</tt>: the name of the author who last modified the tiddler
* <tt>modified</tt>: a Date object corresponding to the last time the tiddler was changed
* <tt>tags</tt>: an array of strings, each with a name of a tag applied to the tiddler
* <tt>created</tt>: a Date object corresponding to when the tiddler was created
* <tt>fields</tt>: an object containing extended fields in the tiddler, primarily used with TiddlyWiki.forEachField.
The <tt>setDirty</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object sets its dirty flag to the value passed.
The global function <tt>setStylesheet</tt> adds a custom stylesheet to the document. This replaces any stylesheet already set with the same DOM id with this function. There are two parameters to this function:
* a string containing CSS source code
* a DOM id to assign to the new stylesheet
This function does not return any value.
The <tt>setTiddlerTag</tt> method of the [[Story]] class modifies a tiddler's tags. It takes three parameters:
* the title of the tiddler to change
* the tag to add or remove
* an integer specifying what to do. -1 indicates to remove the tag, 1 indicates to add the tag, and 0 toggles the state of the tag.
This method does not return anything.
The <tt>suspendNotifications</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object suspends notifications from being issued by the [[Dev:Notify|notify]] and [[Dev:NotifyAll|notifyAll]] methods. The [[Dev:ResumeNotifications|resumeNotifications]] method must be called in order to resume notifications.
This method takes no parameters. It may be called multiple times; [[Dev:ResumeNotifications|resumeNotifications]] must be called an equal number of times in order for notifications to be issued.
The <tt>tiddlerExists</tt> method of a [[TiddlyWiki class|TiddlyWiki]] object returns whether a tiddler exists in the TiddlyWiki. If a shadow tiddler exists for the title, it will return true. This method expects one parameter: the title of the tiddler.
The <tt>unescapeLineBreaks</tt> function of a [[Tiddler]] object is the reverse of the [[Dev:escapeLineBreaks|escapeLineBreaks]] method. It turns the literal string <tt>\n</tt> into a newline character, and the string <tt>\\</tt> into <tt>\</tt>.
The global function <tt>wikify</tt> renders TiddlyWiki source code into an Element. There are four parameters to this function:
* the source code to render
* the DOM element to render into
* a regular expression to highlight
* the [[Tiddler]] that the source belongs to
The <tt>wikifyPlain</tt> global function renders an entire tiddler as plain text. It takes one parameter, the title of the tiddler to render, and returns a string with the output.
The global function <tt>wikifyStatic</tt> works the same way as that the [[Dev:wikify|wikify]] method does, but instead of rendering directly into an DOM element, it returns HTML source code as a string. It takes three parameters:
* the source code to render
* the regular expression to highlight
* the [[Tiddler]] to use as a reference point for rendering
{{Incomplete}}
Simple diagrams can be created with [[Borderless Tables]], making use of features such as col- and rowspan as well as inline styling.
By adding the following CSS ruleset to [[StyleSheet]], header cells will be rendered with borders.
<pre style="margin-left: 1em;">
.viewer table.borderless th {
border: 1px solid #000;
font-weight: normal;
text-align: center;
color: [[ColorPalette::Foreground]];
background-color: transparent;
}
</pre>
== Example ==
<pre>
|borderless|k
|>|!level 1||border:0;background-color:#eee;!''monitoring''<br>&<br>''error correction''|
|>|text-align:center;↓||~|
|>|!level 2||~|
|!condition A|!condition B||~|
|>|text-align:center;↓||~|
|>|!level 3||~|
|>|text-align:center;↓||~|
|>|!''goal''|←|~|
|Sample Diagram|c
</pre>
/***
|''Name:''|DisableWikiLinksPlugin|
|''Description:''|Allows you to disable TiddlyWiki's automatic linking of WikiWords|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#DisableWikiLinksPlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/DisableWikiLinksPlugin.js |
|''Version:''|0.1.3|
|''Date:''|Aug 5, 2006|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]] |
|''~CoreVersion:''|2.1.0|
|''Disable WikiLinks''|<<option chkDisableWikiLinks>>|
***/
//{{{
// Ensure that the DisableWikiLinksPlugin is only installed once.
if(!version.extensions.DisableWikiLinksPlugin) {
version.extensions.DisableWikiLinksPlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('DisableWikiLinksPlugin requires TiddlyWiki 2.1 or newer.');}
if (config.options.chkDisableWikiLinks==undefined)
{config.options.chkDisableWikiLinks = false;}
Tiddler.prototype.autoLinkWikiWords = function()
{
if(config.options.chkDisableWikiLinks==true)
{return false;}
return !this.isTagged('systemConfig') && !this.isTagged('excludeMissing');
};
} // end of 'install only once'
//}}}
Double square brackets (commonly known simply as double brackets) are used in TiddlyWiki and MediaWiki to create links between [[Tiddlers]] and MediaWiki pages respectively. Below is a more specific overview of the different places that the <nowiki>[[...]]</nowiki> syntax can occur, and how they differ:
==Creating and Editing Regular Content==
While editing a Tiddler, typing <nowiki>"[[TiddlerName]]"</nowiki> produces a linkto another tiddler – a "[[TiddlyLink]]"
*TiddlyLinks to non-WikiWord tiddler titles or [[PrettyTiddlyLinks]] also require double brackets (i.e.the <nowiki>"[[text to show|tiddler name]]"</nowiki> syntax)
See[http://tiddlywiki.com/#Editing Editing] on TiddlyWiki.com for an example.
{{Review}}
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/8174283ab6413a92/3a50628712f85e19?#3a50628712f85e19 <nowiki>Eric</nowiki>]|
2=<pre>multiple uses of the [[...]]
syntax. Here's a overview of the different places that [[...]] can
occur, and how they differ:
In regular content:
[[TiddlerName]] is a TiddlyLink. The stuff inside the brackets is
NOT passed through the wikify() parser, and is expected to simply be
the title of a tiddler. The brackets are essential for creating
TiddlyLinks to non-WikiWord tiddler titles or PrettyTiddlyLinks (i.e.,
the "[[text to show|tiddler name]]" syntax)
In a macro:
Although [[...]] can be used to surround a tiddler title (e.g., one
that contains spaces) being used as a macro parameter value, their use
in a macro does not necessarily mean that the value inside the
brackets is a TiddlyLink or even a reference to a tiddler title. The
[[...]] are simply an alternative method of "quoting" a parameter
value, so it can contain spaces as well as mix of double- and/or
single-quotes, like this:
<<someMacro stuff [[It's got both kinds of "quotes" in it]]
morestuff>>
In a stylesheet:
[[TiddlerName]] inserts the content from TiddlerName into the
stylesheet
(note: in this is specific case, the core DOES 'glue' the CSS
content together before passing it on to the browser, so 'text
subtitution' strategies DO work for stylesheets. For example, [[...]]
is used by the shadow stylesheets (e.g., StyleSheetColors) to insert
values from the default ColorPalette definition (another shadow
tiddler), making it easier to change the overall color scheme without
having to edit the CSS directly, simply by editing the RGB values in
the ColorPalette tiddler instead.
In a template:
[[...]] usually means nothing. Templates use HTML <...> syntax
(plus a few non-standard, TW-parsed, extended HTML attributes, such
as: macro="..." However, one place where [[...]] is really useful in
a template is when invoking a macro via:
<span macro="someMacro stuff [[It's got 'single-quotes' in it]]
morestuff"></span>
or
<span macro='someMacro stuff [[It's got "double-quotes" in it]]
morestuff'></span>
Because the template syntax uses one set of quoting symbols (either
single- or double-quotes), the [[...]] syntax becomes essential for
surrounding parameters that contain spaces and/or quotes (but only one
kind at a time)</pre>
}}
=== Getting an empty TiddlyWiki file from tiddlywiki.com ===
* Right click on http://www.tiddlywiki.com/empty.html
* Choose "Save link as..." or "Save target as..."
* Save the file to your desktop or somewhere else
* Go to the file you just saved and double click it
=== Getting a hosted TiddlyWiki on Tiddlyspot ===
* Go to http://tiddlyspot.com
* Enter a site id and password
* Click create
* Your TiddlyWiki is now useable online
* To download:
** Click the download link
** Save the file on your desktop or somewhere
** Double click it to open it
[[Category:FAQ]]
[[Category:Getting Started]]
The command <<edit>> switches from ViewMode to EditMode.
The EditMacro is either a double mouse click inside the tiddler or the entry 'edit' in the tiddler's [[toolbar|Toolbar]].
It is used in ViewTemplate as ToolbarMacro like this:
<<toolbar +editTiddler>>
[[Category:Macros]]
{{Incomplete}}
* [[TiddlyWiki Markup]]
* [[Tables]]
== Restricting Editing ==
cf. [http://groups.google.com/group/TiddlyWiki/t/5f936d40f2ccfda3/ <nowiki>[tw]</nowiki> Editing rights]
{{Review}}
{{Merge|[[Can I use TiddlyWiki as a multi-user/collaborative/server based wiki?]]}}
==Answer==
TiddlyWiki is a little different to other Wikis you may have encountered before. Most wikis run on a server and the code to save your changes is server code. TiddlyWiki is different. It runs entirely in your web browser. All the code to save your changes is written in Javascript and contained in the TiddlyWiki file. To save changes your browser must be able to write to local disk using javascript. This means you can only edit and save changes to a TiddlyWiki file that is on a local disk. If you put your TiddlyWiki file on your web site any changes made to it can't be saved.
(TODO, explain the "HideEditFeaturesOverHttp" or link to explanation)
(This can be a useful way to publish a web site. You can edit and save your site to your local TiddlyWiki file on your local disk. When it's finished simply upload the file for the rest of the world to see).
The above information applies to a standard, off-the-shelf TiddlyWiki. However, there ''are'' some ways you can get an editable/saveable TiddlyWiki via the web.
== Options for making TiddlyWiki editable/saveable via the web ==
There are a number of [[Server-Side_Implementations|server-sides]] that make it possible to save over HTTP.
Alternatively, a hosted service like [[Tiddlyspot]] can be used for convenience.
[[Category:FAQ]]
[[Category:Getting Started]]
{{Incomplete}}
Open the tiddler by clicking on Edit (grey menu at top right of tiddler) or double clicking on any of the text. Edit the tiddler as required. To format text (bold, italics etc), see [[Wiki Markup]].
To save the tiddler, click on Done. The tiddler will display in read mode. Click on Save Changes (top right-hand menu) before leaving the TiddlyWiki.
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
* [[Editing a Tiddler]]
* [[TiddlyWiki Markup|Formatting text in a tiddler]]
* [[Changes to the default TiddlyWiki formatting]]
* [[Special formatting within a tiddler]]
Before adding to this page please consult the discussion concerning editions / adaptations / verticals on [http://www.tiddlywiki.org/wiki/Category_talk:Adaptations Adaptations:Talk]. --[[User:Bentrem|Bentrem]] 05:33, 26 June 2008 (UTC)
[[Category:Adaptations]]
{{Disambiguation}}
* [[Embedding Files]]
* [[Embedding TiddlyWiki]]
* [[Including External Content]]
Since [[TiddlyWiki]] is a [[single-file application]], attaching external files is a problematic issue.
The [http://tiddlytools.com/#AttachFilePlugin AttachFilePlugin] provides this functionality.
However, it does not work on all browsers (due to the lack of support for <code>data:</code> URIs), and embedded files are [http://en.wikipedia.org/wiki/Base64#MIME somewhat larger] than the original.
The plugin's documentation explains the caveats in detail.
{{Incomplete}}
== Thunderbird ==
[http://blog.checkettsweb.com/2005/11/24/embedding-tiddlywiki-in-thunderbird/ Embedding TiddlyWiki in Thunderbird]
== Outlook ==
[http://groups.google.com/group/TiddlyWiki/t/8ba0add1e5efb2f6/ <nowiki>[tw]</nowiki> Integrate a TiddlyWiki into Outlook's Today Pane]
[[Category:Tips & Tricks]]
{{Review}}
There are a number of options for encryption:
# Install Yann Perin's EncryptionPlugin from http://yann.perrin.googlepages.com/twkd1.html#EncryptionPlugin. It might be a bit old. Not sure if it works in 2.2.
# Also take a look at http://visualtw.ouvaton.org/VisualTW.html#EncryptedVaultPlugin which encrypts the whole wiki content with a single password (demo at http://visualtw.ouvaton.org/demo/EncryptedVaultPlugin.html).
# There's also this plugin http://redpig.dataspill.org/releases/EncryptionPlugin.html
# And this: http://remotely-helpful.com/TiddlyWiki/TiddlerEncryptionPlugin.html#TiddlerEncryptionPlugin (16-Jan-2008)
::This plugin encrypts individual tiddlers which have been tagged with Encrypt(prompt) where 'prompt' is a string which is used to prompt the user as to what password to enter. Eg. "Your Bank PIN" or "Your Phone number", etc. Tiddlers are only encrypted on Save of the TiddlyWiki.
::When you open the TiddlyWiki, all encrypted tiddlers remain encrypted until you attempt to display them, or until you use the '<<EncryptionDecryptAll>>' macro (which will decrypt all tiddlers for a given 'prompt'). Additionally, should you so desire, you can change the password on all tiddlers for a given 'prompt' by using the '<<EncryptionChangePassword>>' macro.
::You can use as many different 'prompts' as you like, the more different 'prompts', the more passwords you will be typing. If you lose a password, the contents of the tiddler is lost, there is no way (short of brute force password attacks) of decrypting the tiddler.
::Once a tiddler is encrypted, the Encrypt(prompt) tag is replaced by Decrypt(prompt) plus, optionally, an 'excludeSearch' tag - as there is not much point in searching encrypted tiddlers. The actual encrypted tiddler is encoded in Base64 form, to keep the tiddler contents in a format that is 'copy/pasteable'.
::Note that once you have entered a password for a given 'prompt', in a given session, you do not need to re-enter that password again. Subsequent tiddlers that are encrypted with that 'prompt' will automatically decrypt.
::Closing and re-opening the TiddlyWiki will result in you having to re-enter the password(s).
# And finally this from Martin (6 July 2007):
::I've actually written an encryption plugin, but haven't yet published it on martinsplugins. The code is in subversion, in two parts, at http://trac.tiddlywiki.org/browser/Trunk/contributors/MartinBudden/plugins/EncryptionCommandsPlugin.js and http://trac.tiddlywiki.org/browser/Trunk/contributors/MartinBudden/plugins/CryptoTEAPlugin.js The first plugin handles the "interface" that adding the encryption/decryption commands to the command bar when appropriate, and the second has the actual encryption code itself. TEA (tiny encryption algorithm) is used, but the commands plugin is written so that any other encryption algorithm can easily be used. I've used a slightly different interface to the one you propose. I take the view that in a given tiddlywiki only a few tiddlers will contain sensitive information, so encryption is on a per tiddler basis, and different tiddlers can have different passwords. The password is required to view or edit a tiddler. Once a tiddler has been decrypted it remains visible as decrypted until closed again. You are welcome to use the code posted above. I'll try and make it available on martinsplugins in the next few days.
[[Category:FAQ]][[Category:Tips & Tricks]]
There are a number of plugins offering significant improvements over the built-in search functionality:
* [http://devpad.tiddlyspot.com/#SimpleSearchPlugin SimpleSearchPlugin]
* [http://tw.lewcid.org/svn/plugins/SearchPlusPlugin/SearchPlusPlugin.js SearchPlusPlugin] (requires [http://tw.lewcid.org/svn/plugins/PreferenceSaverLib/PreferenceSaverLib.js PreferenceSaverLib])
* [http://www.tiddlytools.com/#SearchOptionsPlugin SearchOptionsPlugin]
** [http://twhelp.tiddlyspot.com/#TwHelpSearchPlugin TwHelpSearchPlugin] defines an alternative format for the SearchResults tiddler generated by SearchOptionsPlugin)
* [http://tiddlywiki.abego-software.de/#YourSearchPlugin YourSearchPlugin] (also available as a [http://xdexavier.googlepages.com/yoursearch.html bookmarklet])
The [http://www.tiddlytools.com/#MatchTagsPlugin MatchTagsPlugin] might also be noteworthy in this context.
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
#REDIRECT [[Help talk:Support Desk#Error in macro]]
{{Approved}}
__TOC__
== Wiki Markup ==
Sometimes text can inadvertently match TiddlyWiki formatting instructions - particularly program code, or text pasted from elsewhere.
This can be resolved by using one of the following options:
{| class="wikitable"
|-
! Description
! Syntax
|-
| preventing wikification
| <pre>"""unparsed contents"""</pre>
or
<pre><nowiki><nowiki>unparsed contents</nowiki></nowiki></pre>
|-
| preformatted inline content (CODE element)
<small>''(white-space "collapsed", word-wrapped, fixed-width font)''<small>
| <pre>{{{unparsed contents}}}</pre>
|-
| preformatted block content (PRE element)
<small>''(white-space "as-is", no word-wrapping,<br>fixed-width font, yellow box with border)''</small>
| <pre>{{{
unparsed contents
}}}</pre>
|-
| escaping [[CamelCase|WikiWords]]
| <pre>~WikiWord</pre>
|}
== Code Comments ==
Individual tiddler passages can be "commented out" to prevent them from being processed and/or displayed by [[TiddlyWiki]]:
{| class="wikitable"
|-
! Context
! Syntax
|-
| [[tiddler]] contents
| <pre>/% multi-line comment %/</pre>
|-
| HTML code
(e.g. in [[PageTemplate]], [[ViewTemplate]] or [[EditTemplate]])
| <pre><!-- multi-line comment --></pre>
|-
| CSS code
(e.g. in [[StyleSheet]])
| <pre>/* multi-line comment */</pre>
<pre>/*** wikified multi-line comment ***/</pre>
|-
| JavaScript code
(in [[systemConfig]] tiddlers)
| <pre>// single-line comment</pre>
<pre>/* multi-line comment */</pre>
<pre>/*** wikified multi-line comment ***/</pre>
|}
== See Also ==
* [[Dev:Comments]]
[[Category:Basics]]
{{Review}}
== Exporting to HTML ==
The [http://www.TiddlyTools.com/#ExportTiddlersPlugin ExportTiddlersPlugin] allows saving tiddlers as stand-alone TiddlyWiki documents or in [[pure-store format]].
With the help of the [http://www.TiddlyTools.com/#SnapshotPlugin SnapshotPlugin], the currently opened tiddlers can be exported to plain HTML.
The order in which the tiddlers are shown can be adjusted using the [http://www.tiddlytools.com/#RearrangeTiddlersPlugin RearrangeTiddlersPlugin].
== External Resources ==
* [http://xdexavier.blogspot.com/2006/12/exporting-to-plain-html-from-tiddlywiki.html Exporting to plain HTML from a TiddlyWiki]
{{Incomplete}}
Extended fields are custom [[Tiddler Fields|tiddler attributes]], often used by plugins or [[server-sides]].
A tiddler's extended fields can be displayed with the <code>fields</code> [[Tiddler Toolbar|toolbar command]].
Tiddler fields are [http://trac.tiddlywiki.org/ticket/356 currently] case-sensitive and must be all lowercase for their values to be stored/retrieved successfully.
== See Also ==
* [[Tiddler Fields]]
* [[Dev:Extended Fields]]
TiddlyWiki defines a few special attributes for automatic rendering and refresh handling.
These can be used in [[templates|HTML Templates]] or dynamically set on DOM elements (e.g. by a [[plugin]]).
; <code>tiddler</code> (e.g. <code>tiddler="TiddlerName"</code>)
: causes the DIV to be rendered with the content of the named tiddler
; <code>refresh</code> (e.g. <code>refresh="content"</code>)
: adds a notification handler that automatically re-renders the respective <code>DIV</code> container when the associated tiddler is changed
; <code>force</code> (e.g. <code>force="true"</code>)
: adds a notification handler that automatically re-renders the respective <code>DIV</code> container when ''any'' tiddler is changed
{{smallform{<<faqViewer startwith:TiddlerName TiddlyWikiOrg outline +Title "">>}}}
/***
|Name|FAQViewerPlugin|
|Source|http://www.TiddlyTools.com/#FAQViewerPlugin|
|Version|1.4.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|select and display FAQ tiddlers from a droplist, sorted by date|
!!!!!Usage
<<<
{{{<<faqViewer startwith:TiddlerName tagname classname sortby dateformat>>}}}
where:
*''startwith:TiddlerName'' (optional)<br>
*''tagname'' (optional)<br>specifies the set of tiddlers to include in the FAQ list (default='faq')
*''classname'' (optional)<br>specifies a CSS class to be applied surrounding the FAQ tiddler content
*''sortby'' (optional)<br>specifies the name of a tiddler field to sort by. Use '+' or '-' as a prefix on the fieldname to indicate ascending or descending order, respectively (default='-modified'). You can also use the special keyword, ''Description'', to sort alphabetically based on the value of a slice named 'Description', that can be defined in each FAQ tiddler. Note: if a particular FAQ tiddler has no description slice, the title of the tiddler is used as a fallback.
*''dateformat'' (optional)<br>specifies the formatting for dates displayed in the list. Use " " (a single space) to suppress the date display.
examples:
{{{<<faqViewer>>}}}
{{smallform small{<<faqViewer>>}}}
{{{<<faqViewer package outline +title " ">>}}}
{{smallform small{<<faqViewer package outline +title " ">>}}}
<<<
!!!!!Revisions
<<<
2009.06.14 [1.4.3] moved html definition to tiddler section (saves space)
2008.10.21 [1.4.2] removed animation (was interfering with 'overflow:scroll' CSS)
2008.09.30 [1.4.1] corrected filter by tag handling broken in 1.4.0
2008.09.29 [1.4.0] added optional 'startwith:TiddlerName' param
2008.09.24 [1.3.1] added animation when opening/closing faq content panel
2008.09.21 [1.3.0] sort by 'description' slice values. also added 'previous' and 'next' buttons for sequential viewing of FAQ articles
2008.09.20 [1.2.0] optional 'sortby' and 'dateformat' params
2008.01.20 [1.1.0] support for alternative 'target' tag instead of 'faq' (default)
2007.10.15 [1.0.0] converted to true plugin
2007.02.01 [0.0.0] inline script
<<<
!!!!!Code
***/
//{{{
version.extensions.FAQViewerPlugin={major: 1, minor: 4, revision: 3, date: new Date(2009,6,14)};
config.shadowTiddlers.FAQViewer='{{smallform{<<faqViewer>>}}}';
config.macros.faqViewer= {
dateFormat:'YYYY.0MM.0DD 0hh:0mm - ',
startparam: 'startwith:',
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
// create form
if (params[0]&¶ms[0].substr(0,this.startparam.length)==this.startparam)
{ var startwith=params[0].substr(this.startparam.length); params.shift(); }
var console=createTiddlyElement(place,'span');
console.innerHTML=store.getTiddlerText('FAQViewerPlugin##html').replace(/%classname%/,params[1]||'');
this.go(console.getElementsByTagName('form')[0],startwith, params[0],params[2],params[3]);
},
go: function(f,startwith,targetType,sortby,dateformat) {
var targetType=targetType||'faq';
var sortby=sortby||'-modified';
var dateformat=dateformat||this.dateFormat;
var datefield=sortby.indexOf('created')!=-1?'created':'modified';
f.targetType.value=targetType;
f.sortBy.value=sortby;
f.dateFmt.value=dateformat;
var lists=f.getElementsByTagName('select'); if (!lists.length) return;
var FAQList=lists[0]; var taglist=lists[1];
while (FAQList.options[0]) FAQList.options[0]=null; // empty FAQList
if (f.search.value!=f.search.defaultValue) var find=f.search.value;
var tiddlers=store.getTaggedTiddlers(targetType,'modified').reverse();
if (tiddlers && sortby) {
if (sortby.indexOf('escription')==-1) // sort by tiddler field
tiddlers=store.sortTiddlers(tiddlers,sortby);
else
tiddlers.sort(function(a,b){ // sort by description slice (or title, if no slice)
var da=store.getTiddlerSlice(a.title,'Description')||a.title;
var db=store.getTiddlerSlice(b.title,'Description')||b.title;
return da==db?0:(da>db?+1:-1);
});
}
var matchcount=0; var tags=[]; var selectedIndex=0;
FAQList.options[0]=new Option('select an item...','',false,false);
for (var i=0; i<tiddlers.length; i++) {
for (var t=0; t<tiddlers[i].tags.length; t++)
tags.pushUnique(tiddlers[i].tags[t]); // collect other tags
if (find && find.length && tiddlers[i].text.indexOf(find)==-1) continue;
if (taglist.value && taglist.value.length && !tiddlers[i].tags.contains(taglist.value)) continue;
matchcount++;
var d=store.getTiddlerSlice(tiddlers[i].title,'Description')||tiddlers[i].title;
d=tiddlers[i][datefield].formatString(dateformat)+d;
FAQList.options[FAQList.options.length]=new Option(d,tiddlers[i].title,false,false);
if (tiddlers[i].title==startwith) selectedIndex=i+1;
}
FAQList.options[0].text='select an item... ['+tiddlers.length+' item'+(tiddlers.length!=1?'s':'');
if (find && find.length || taglist.value.length)
FAQList.options[0].text+=', '+matchcount+' match'+(matchcount!=1?'es':'');
FAQList.options[0].text+=']';
FAQList.selectedIndex=selectedIndex;
if (selectedIndex) config.macros.faqViewer.show(f,startwith);
if (!taglist.options.length) { // only load tag list the first time, since it doesn't change
while (taglist.options[0]) taglist.options[0]=null; // empty taglist
taglist.options[0]=new Option('filter by tag...','',false,false);
var tagcount=0;
for (var t=0; t<tags.length; t++) {
if (tags[t].toLowerCase()==targetType) continue;
if (tags[t].indexOf('exclude')!=-1) continue;
taglist.options[taglist.options.length]
=new Option(tags[t],tags[t],false,false);
tagcount++;
}
if (!tagcount) taglist.options[taglist.options.length]
=new Option('no category tags found','',false,false);
}
},
show: function(f,v) {
var fmt=this.faqlayout;
if (store.getTaggedTiddlers(v).length) fmt=this.packagelayout;
var target=f.getElementsByTagName('div')[0];
removeChildren(target);
wikify(fmt.format([v]),target);
target.style.display='block';
f.prev.parentNode.style.display='block';
f.next.focus();
f.done.disabled=!v.length;
},
faqlayout:
'{{toolbar floatright fine{//now viewing: //[[%0]] }}}<<tiddler [[%0]]>>',
packagelayout:
'{{toolbar floatright fine{//now viewing: //[[%0]] }}}\n'
+'{{floatright borderleft fine{<<tagging [[%0]]>>}}}<<tiddler [[%0]]>>{{clear block{}}}'
}
//}}}
/***
//{{{
!html
<form onsubmit='return false;' style='display:inline;margin:0;padding:0;white-space:nowrap;'><!--
--><input type='hidden' name='targetType' value='faq'><!--
--><input type='hidden' name='sortBy' value='-modified'><!--
--><input type='hidden' name='dateFmt' value='YYYY.0MM.0DD 0hh:0mm - '><!--
--><select name='list' size=1 style='width:50%'
onchange='if (!this.value.length) this.form.done.onclick();
else config.macros.faqViewer.show(this.form,this.value);'><!--
--></select><!--
--><select name='taglist' size=1 style='width:12%'
title='list only items that have a specific category tag'
onchange='var f=this.form; f.done.onclick();
config.macros.faqViewer.go(f,"",f.targetType.value,f.sortBy.value,f.dateFmt.value)'><!--
--></select><!--
--><input type='text' name='search' value='enter search text...' style='width:20%'
title='list only items that contain the search text (use blank to match all)'
onfocus='this.select()'
onkeyup=' if (event.keyCode==13) this.form.find.onclick();
if (!this.value.length) {this.value=this.defaultValue; this.select(); this.form.find.onclick();}'><!--
--><input type='button' name='find' value='find' style='width:6%'
title='list only items that contain the search text '
onclick='var f=this.form; f.done.onclick();
config.macros.faqViewer.go(f,"",f.targetType.value,f.sortBy.value,f.dateFmt.value)'><!--
--><input type='button' name='reset' value='reset' style='width:6%'
title='reset FAQViewer to default '
onclick='var f=this.form; f.done.onclick();
f.search.value=f.search.defaultValue; f.taglist.selectedIndex=0;
config.macros.faqViewer.go(f,"",f.targetType.value,f.sortBy.value,f.dateFmt.value)'><!--
--><input type='button' name='done' value='done' disabled style='width:6%'
title='hide current item display'
onclick='var target=this.form.getElementsByTagName("div")[0];
target.style.display="none"; removeChildren(target);
this.form.prev.parentNode.style.display="none";
this.form.list.selectedIndex=0; this.disabled=true;'><!--
--><div class="%classname%" style="display:none;white-space:normal;"></div><!--
--><span style='text-align:right;display:none;overflow:auto;'><!--
--><input type='button' name='prev' value='◄ prev' style='float:left;font-size:80%;'
title='view previous item'
onclick='var f=this.form; var i=f.list.selectedIndex-1;
f.list.selectedIndex=i<0?f.list.length-1:i; f.list.onchange();'><!--
--><input type='button' name='next' value='next ►' style='float:right;font-size:80%;'
title='view next item'
onclick='var f=this.form; var i=f.list.selectedIndex+1;
f.list.selectedIndex=i>f.list.length-1?0:i; f.list.onchange();'><!--
--></span><!--
--></form>
!end
//}}}
***/
FET or fET is short for [[ForEachTiddlerPlugin]]
Over 250 messages we posted to the group using this acronym as of 22 Feb 2009
==External Links==
[http://groups.google.com/group/TiddlyWiki/search?group=TiddlyWiki&q=FET&qt_g=Search+this+group search TiddlyWiki group for FET]
* [http://facebook.com/group.php?gid=2362162457 TiddlyWiki]
* [http://facebook.com/group.php?gid=7057025212 TiddlyWiki Hackers]
* [http://facebook.com/group.php?gid=19921865784 Tiddlyspot Users]
* [http://facebook.com/group.php?gid=5790833300 MPTW Users]
* [http://facebook.com/group.php?gid=12751805639 MonkeyGTD Users]
[[Category:Community]]
* [http://facebook.com/group.php?gid=2362162457 TiddlyWiki]
* [http://facebook.com/group.php?gid=7057025212 TiddlyWiki Hackers]
* [http://facebook.com/group.php?gid=19921865784 Tiddlyspot Users]
* [http://facebook.com/group.php?gid=5790833300 MPTW Users]
* [http://facebook.com/group.php?gid=12751805639 MonkeyGTD Users]
[[Category:Community]]
A [http://en.wikipedia.org/wiki/Favicon FavIcon] (short for "favorites icon") is an icon associated with a particular website.
In browsers supporting this feature, the FavIcon may be visible in the browser's location bar, the respective bookmarks, and/or next to the site's title in a tabbed document interface.
To make [[TiddlyWiki]] use a FavIcon, the following code should be added to [[MarkupPreHead]]:
<pre>
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
</pre>
The HREF attribute must contain the (absolute or relative) path to the respective icon file.
In this example, a relative path was chosen, whereas the <code>favicon.ico</code> file resides in the <code>img</code> sub-directory of the TiddlyWiki's folder.
== External Resources ==
* [http://www.html-kit.com/favicon/ FavIcon generator]
* [http://fnd.lewcid.org/svn/TiddlyWiki/plugins/DynamicFavIconPlugin.js DynamicFavIconPlugin]
{{Plugin
|Name=FeedListManagerPlugin
|Author=[[User:PhilHawksworth{{!}}Phil Hawksworth]]
|Description=Manage a list of URIs to be called in a round-robin style
|Version=0.2
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/plugins/FeedListManagerPlugin.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
* '''JSSpec test script:''' http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/tests/jsspec/FeedListManagerPlugin.jsspec.js
== Usage Examples ==
* Create a new feed list manager:
var feeds = new FeedListManager();
* Add a uri to an existing feed list manager:
feeds.add(uri);
* Remove a uri from an existing feed list manager:
feeds.remove(uri);
* Get a uri from an given position in an existing feed list manager:
uri = feeds.get(i);
* Get the next uri in the queue of an existing feed list manager:
uri = feeds.next();
* Discover the number of registered uris in an existing feed list manager:
i = feeds.count();
* Discover if a given uri is registered in an existing feed list manager, and at what position:
i = feeds.registered(uri);
* Repopulate the uri list in an existing feed list manager:
feeds.populate();
* Clear out the list of registered uris:
feeds.purge();
* Output some usage stats about the registered usage stats:
feeds.stats([uri]);
/***
|''Name:''|FieldsEditorPlugin|
|''Description:''|//create//, //edit//, //view// and //delete// commands in toolbar <<toolbar fields>>.|
|''Version:''|1.0.2|
|''Date:''|Dec 21,2007|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.2.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
***/
//{{{
config.commands.fields.handlePopup = function(popup,title) {
var tiddler = store.fetchTiddler(title);
if(!tiddler)
return;
var fields = {};
store.forEachField(tiddler,function(tiddler,fieldName,value) {fields[fieldName] = value;},true);
var items = [];
for(var t in fields) {
var editCommand = "<<untiddledCall editFieldDialog "+escape(title)+" "+escape(t)+">>";
var deleteCommand = "<<untiddledCall deleteField "+escape(title)+" "+escape(t)+">>";
var renameCommand = "<<untiddledCall renameField "+escape(title)+" "+escape(t)+">>";
items.push({field: t,value: fields[t], actions: editCommand+renameCommand+deleteCommand});
}
items.sort(function(a,b) {return a.field < b.field ? -1 : (a.field == b.field ? 0 : +1);});
var createNewCommand = "<<untiddledCall createField "+escape(title)+">>";
items.push({field : "", value : "", actions:createNewCommand });
if(items.length > 0)
ListView.create(popup,items,this.listViewTemplate);
else
createTiddlyElement(popup,"div",null,null,this.emptyText);
}
config.commands.fields.listViewTemplate = {
columns: [
{name: 'Field', field: 'field', title: "Field", type: 'String'},
{name: 'Actions', field: 'actions', title: "Actions", type: 'WikiText'},
{name: 'Value', field: 'value', title: "Value", type: 'WikiText'}
],
rowClasses: [
{className: 'fieldTableRow', field: 'actions'}
],
buttons: [ //can't use button for selected then delete, because click on checkbox will hide the popup
]
}
config.macros.untiddledCall = { // when called from listview, tiddler is unset, so we need to pass tiddler as parameter
handler : function(place,macroName,params,wikifier,paramString) {
var macroName = params.shift();
if (macroName) var macro = config.macros[macroName];
var title = params.shift();
if (title) var tiddler = store.getTiddler(unescape(title));
if (macro) macro.handler(place,macroName,params,wikifier,paramString,tiddler);
}
}
config.macros.deleteField = {
handler : function(place,macroName,params,wikifier,paramString,tiddler) {
if(!readOnly && params[0]) {
fieldName = unescape(params[0]);
var btn = createTiddlyButton(place,"delete", "delete "+fieldName,this.onClickDeleteField);
btn.setAttribute("title",tiddler.title);
btn.setAttribute("fieldName", fieldName);
}
},
onClickDeleteField : function() {
var title=this.getAttribute("title");
var fieldName=this.getAttribute("fieldName");
var tiddler = store.getTiddler(title);
if (tiddler && fieldName && confirm("delete field " + fieldName+" from " + title +" tiddler ?")) {
delete tiddler.fields[fieldName];
store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags,tiddler.fields);
story.refreshTiddler(title,"ViewTemplate",true);
}
return false;
}
}
config.macros.createField = {
handler : function(place,macroName,params,wikifier,paramString,tiddler) {
if(!readOnly) {
var btn = createTiddlyButton(place,"create new", "create a new field",this.onClickCreateField);
btn.setAttribute("title",tiddler.title);
}
},
onClickCreateField : function() {
var title=this.getAttribute("title");
var tiddler = store.getTiddler(title);
if (tiddler) {
var fieldName = prompt("Field name","");
if (store.getValue(tiddler,fieldName)) {
window.alert("This field already exists.");
}
else if (fieldName) {
var v = prompt("Field value","");
tiddler.fields[fieldName]=v;
store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags,tiddler.fields);
story.refreshTiddler(title,"ViewTemplate",true);
}
}
return false;
}
}
config.macros.editFieldDialog = {
handler : function(place,macroName,params,wikifier,paramString,tiddler) {
if(!readOnly && params[0]) {
fieldName = unescape(params[0]);
var btn = createTiddlyButton(place,"edit", "edit this field",this.onClickEditFieldDialog);
btn.setAttribute("title",tiddler.title);
btn.setAttribute("fieldName", fieldName);
}
},
onClickEditFieldDialog : function() {
var title=this.getAttribute("title");
var tiddler = store.getTiddler(title);
var fieldName=this.getAttribute("fieldName");
if (tiddler && fieldName) {
var value = tiddler.fields[fieldName];
value = value ? value : "";
var lines = value.match(/\n/mg);
lines = lines ? true : false;
if (!lines || confirm("This field contains more than one line. Only the first line will be kept if you edit it here. Proceed ?")) {
var v = prompt("Field value",value);
tiddler.fields[fieldName]=v;
store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags,tiddler.fields);
story.refreshTiddler(title,"ViewTemplate",true);
}
}
return false;
}
}
config.macros.renameField = {
handler : function(place,macroName,params,wikifier,paramString,tiddler) {
if(!readOnly && params[0]) {
fieldName = unescape(params[0]);
var btn = createTiddlyButton(place,"rename", "rename "+fieldName,this.onClickRenameField);
btn.setAttribute("title",tiddler.title);
btn.setAttribute("fieldName", fieldName);
}
},
onClickRenameField : function() {
var title=this.getAttribute("title");
var fieldName=this.getAttribute("fieldName");
var tiddler = store.getTiddler(title);
if (tiddler && fieldName) {
var newName = prompt("Rename " + fieldName + " as ?", fieldName);
if (newName) {
tiddler.fields[newName]=tiddler.fields[fieldName];
delete tiddler.fields[fieldName];
store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags,tiddler.fields);
story.refreshTiddler(title,"ViewTemplate",true);
}
}
return false;
}
}
config.shadowTiddlers.StyleSheetFieldsEditor = "/*{{{*/\n";
config.shadowTiddlers.StyleSheetFieldsEditor += ".fieldTableRow td {padding : 1px 3px}\n";
config.shadowTiddlers.StyleSheetFieldsEditor += ".fieldTableRow .button {border:0; padding : 0 0.2em}\n";
config.shadowTiddlers.StyleSheetFieldsEditor +="/*}}}*/";
store.addNotification("StyleSheetFieldsEditor", refreshStyles);
//}}}
{{Incomplete}}
Filtering allows selecting tiddlers by [[field]] values.
== Syntax ==
<pre>
[filter[<+|->value]]
</pre>
== Examples ==
<pre>
<<list filter [tag[systemConfig]][sort[-modified]]>>
<<list filter "[tag[systemConfig]] [sort[-modified]]">>
</pre>
== Filters ==
Filters are mostly based on [[tiddler fields]]:
* <code>title</code>
* <code>tag</code>
* <code>created</code>
* <code>modified</code>
* <code>modifier</code>
* <code>sort</code>
== External Resources ==
* [http://lewcid.org/2007/10/23/how-to-list-tiddlers-by-tags-the-filter-tipped-way/ How to: List tiddlers by tags - the filter tipped way.]
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/db7259852b1e706d/b8b83a918a770cdb?#b8b83a918a770cdb <nowiki>[tw]</nowiki> Nailing Bugs: It's TiddlyWiki 2.3.0]
{{Review}}
There are a few ways to find a tiddler.
*Look on the Main Menu
*Type a keyword or the tiddler's name into the search box
*Select the All tab on the right-hand menu to see an alphabetical list of all tiddlers
*Select the Tags tab on the right-hand menu to browse tags/keywords
*Select the Timeline tab on the right-hand menu to see tiddlers most recently edited/added
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
== Enhanced Privileges ==
Enhanced privileges settings [http://jonscully.googlepages.com/universalxpconnectandfirefox can be reset] by modifying the <code>capability.principal.codebase.p0.denied</code> setting (e.g. via [http://kb.mozillazine.org/About:config about:config]).
== Local File Links ==
When a document is served over HTTP (e.g. when using [[Server-Side Implementations]]), [http://kb.mozillazine.org/Links_to_local_pages_don%27t_work links to local files are blocked] for security purposes.
The [https://addons.mozilla.org/en-US/firefox/addon/281 LocalLink] extension can be used to enable local file links.
== Firefox 3 ==
Firefox 3 generally employs a stricter security model than previous versions, which has several implications for TiddlyWiki.
=== File Access ===
Firefox 3 restricts access to local files to the current working directory (the location of the respective TiddlyWiki document) or sub-directories thereof.
This affects [[importing]] from a local file as well as creating [[backups]].
A workaround is provided by [http://www.TiddlyTools.com/#CoreTweaks CoreTweaks] [http://trac.tiddlywiki.org/ticket/604 #604] and [http://trac.tiddlywiki.org/ticket/683 ticket #683] (cf. [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/1b17008d47263562 discussion]).<br>
Alternatively, this security feature [http://kb.mozillazine.org/Security.fileuri.strict_origin_policy can be disabled] - however, this is not recommended.
=== Cookies ===
FF3 does not save [https://bugzilla.mozilla.org/show_bug.cgi?id=430045 cookie settings for local files], which means options do not persist across browser sessions.
However, this can be worked around by
* using a ''localhost'' URL (e.g. <code>file://localhost/home/user/TiddlyWiki.html</code> instead of <code>file:///home/user/TiddlyWiki.html</code>) - that way a cookie exception can be added for ''localhost''
* using the [http://www.tiddlytools.com/#CookieSaverPlugin CookieSaverPlugin]
* [[Configuration Options|hard-coding settings]]
=== Enhanced Privileges ===
Some users have reported that enhanced privileges settings are not saved across sessions.
This can be worked around by using the [http://firefoxprivileges.tiddlyspot.com FirefoxPrivilegesPlugin] (also available [http://xdexavier.googlepages.com/sharebookmarklet.html?author=-Xv&description=%3Cp%3ELoad%20FirefoxPrivilegesPlugin.js%20from%20http%3A%2F%2Ftrac.tiddlywiki.org.%3C%2Fp%3E&title=FirefoxPrivileges&code=(function()%0A{%0Avar%20script%3Ddocument.createElement(%22script%22)%3B%0Ascript.src%3D%22http%3A%2F%2Ftrac.tiddlywiki.org%2Fbrowser%2FTrunk%2Fcontributors%2FXavierVerges%2Fplugins%2FFirefoxPrivilegesPlugin.js%3Fformat%3Draw%22%3B%0Ascript.onload%3Dfunction(){var%20b%3Dbackstage%3B%20var%20fp%3D%22firefoxPrivileges%22%3B%0Avar%20bt%3DcreateTiddlyButton(b.toolbar%2C%22security%22%2Bglyph(%22downTriangle%22)%2C%22%22%2Cb.onClickTab%2C%22backstageTab%22)%3B%0Abt.setAttribute(%22task%22%2Cfp)%3Bb.switchTab(fp)%3B}%3B%0Adocument.getElementsByTagName(%22head%22)%5B0%5D.appendChild(script)%3B%0A})() as bookmarklet]), by [[How To/Firefox Per-File Permissions|specifying per-file permissions]], or by [http://groups.google.com/group/tiddlywiki/browse_thread/thread/37b04ea475418b42/a9bbd7af2fa48aa9?#a9bbd7af2fa48aa9 globally setting] [http://kb.mozillazine.org/Security.fileuri.strict_origin_policy security.fileuri.strict_origin_policy].
=== Permalinks ===
Firefox 3 [http://trac.tiddlywiki.org/ticket/629 automatically decodes] characters in the location bar (e.g. <code>[</code>, <code>]</code> and actual space characters instead of <code>%5B</code>, <code>%5D</code> and <code>%20</code>, respectively).
This can lead to confusion when exchanging permalinks.
== See Also ==
* [[How To/Firefox Per-File Permissions]]
* [[Greasemonkey]]
* [[GnuPG]]
[[Category:Browsers]]
[[Category:Browser Issues]]
#REDIRECT [[Firefox#Firefox_3]]
==Searching the Groups for help==
On the [[Groups]], EachTiddlerPlugin is often refered to as [[FET]]
#REDIRECT [[ForEachTiddlerPlugin/Questions]]
{{Incomplete}}
This page is a placeholder to fill in the outcomes of this [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/d0e7fe30c679e4fb discussion on the groups].
The following existing pages in the wiki should be helpful too:
* [[Tiddler Fields]]
* [[Getting started with custom tiddler fields]]
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/883f1049c8f26cfd/786f18bedc455d61?#786f18bedc455d61 Eric]|2=
<pre style="font-size:1.5em">
A TW file is plain-text: all your content, plus HTML, CSS, and
Javascript syntax surrounding it.
Fundamentally, each TW document is a complete system... all the
programming and content is incorporated into the same file; thus,
there is no separation of data and application and a matching version
of the 'TW runtime environment' will always be available.
Of course, this is all predicated on having a browser that is capable
of processing HTML, CSS, and Javascript... which is likely to be true
for *many, many* years. Even so, as we well know, future versions of
any given browser *might* not be completely 100% backward-compatible
with existing HTML, CSS or Javascript code, but even then, the odds of
being able to render your content (even if it doesn't look quite
right) are still extremely high.
Lastly, even if there are no such things as web browsers in the
future, the underlying data in every TW file is, as noted above, plain-
text (with a few HTML entities, e.g., " mixed in)... and it's
completely open-source... no binary encodings, no secret formats.
Thus, it will *always* be possible to read a TW file with a simple
text editor or a parse it with a small, custom-written text processing
program that can extract just the content, leaving the HTML, CSS and
Javascript behind.
[...]
I doubt that there is file format that is likely to survive longer
than simple plain-text...
</pre>
}}
{{Review}}
<div style="color:red;font-size:200%;">Warning this is quite old and doesn't apply to the current version of MonkeyGTD which is the 3.0 alpha. It may be useful to get to learn the concepts but don't follow it too closely. (Any volunteers to bring this up to date?). The latest MonkeyGTD docs can be found at [[MonkeyGTD]].</div>
MonkeyGTD is a popular TiddlyWiki edition used for managing work using the GTD (Getting Things Done) workflow methodology.
There are two versions available; the 1.0 version and the 2.1 alpha version. You can get either one of them at http://tiddlyspot.com.
(If you just want to have a look you can visit [http://mgtd-alpha.tiddlyspot.com mgtd-alpha]).
[http://simonbaird.com Simon], the author of MonkeyGTD, says that the alpha version is alpha quality, features are being added and changed, and it is very buggy in Internet Explorer. In practice though, many people are using mGTD alpha with the [http://getfirefox.com Firefox] browser every day, and generally find it quite stable. So my recommendation is for mGTD alpha, in preference to the older mGTD version 1.0.
==Getting your MonkeyGTD alpha==
===Method 1===
You can download a blank copy of mGTD alpha directly to your hard drive:
* Left click [http://monkeygtd.tiddlyspot.com/#Download here].
* Click on "Download" and save the file on your harddisk.
* Open the file you saved.
===Method 2===
You can have a blank copy of mGTD alpha hosted for free at tiddlyspot.com:
* go to http://tiddlyspot.com and choose a sitename and password.
* select the MonkeyGTD 2.1 alpha flavour and click "create".
==Welcome to MonkeyGTD 2.1 alpha!==
Spend a few seconds admiring your new, cutting-edge MonkeyGTD setup.
Okay perhaps it's not so amazing just looking at an empty Dashboard. Let's see what's under the hood.
==Basic GTD: Actions, Projects and Contexts==
The mGTD version of these things is quite true to the GTD canon. Ideally you wouldn't be trying out bleeding-edge stuff like this if you're just trying out GTD for the first time, but if you are not already doing GTD, you ''really need to read the book'' to get started. Borrow it from a friend, or just [http://www.amazon.com/dp/0142000280?tag=whiteboardkoa-20&camp=14573&creative=327641&linkCode=as1&creativeASIN=0142000280&adid=0JJ0K08KD8HJZJ9JTN6Y& order it from Amazon right now].
Anyway, here's a review of stuff that you should mostly already know:
===mGTD structure 'quick and dirty'===
'''status'''
* One of '''next''', '''wait for''' or '''done''' for ''actions''.
* One of '''completed''' or '''some day/maybe''' for ''projects''.
'''actions''' ::= Something tangible, you can do it.
* need one out of a list of allowable ''contexts'' to be done.
* have a ''status''.
'''project''' ::= A series of ''actions'' to realise a '''goal'''.
* do '''not''' have a ''context''.
* have a ''status''.
* have zero or more ''actions''.
* have zero or more ''subprojects'' (each one is a ''project'' on its own).
'''context''' ::= Is an environment that allow/prevent you to do some kind of ''actions''.
'''area''' ::= Is a short for 'area of responsibility'.
'''realm''' ::= Is a way to group/select all related ''projects'' and ''actions'' in one go.
===Actions===
..are specific, physical things that brings you one step closer to an outcome you want. An action is usually associated with a project (unless the project outcome will be achieved with a single action; in that case you can simply create an action with no owning project).
An action has a Context -- discussed below.
An action can be Next, which means that it is not waiting on anything else, so you could do it ''right now''.
An action can be Done, which, unsurprisingly, means that you've done it.
An action can be a "Waiting For" action, which in mGTD means that it is an action outside of your control. Examples: someone else to do a task (IT finishes database), provide you with some information/feedback (Receive contact info), budget approval (Receive down payment), etc.
===Projects===
...seem to me to be the most often misunderstood element in current GTD practice. A project is simply ''a reminder of a desired outcome'' that is going to take more than one action to achieve. The only "official" reason you have projects is to remind you to keep creating next actions.
Projects do not have a context - only actions have a context.
In practice, projects also provide additional meaning (or "small-c" context) for the actions you create. For instance, if you have an project called "Produce report about password policy for the Security Audit Committee", you can write actions called "ask Joe for input", "draft ideas", etc without having to type the full thing: "ask Joe for input on report about password policy..".
MonkeyGTD lets you organise your projects into subprojects (and sub-subprojects, and so on) if you feel the need to do so. You can use subprojects to represent portions of a project that can happen in parallel, or to set milestones within a project, both of which can make your project review somewhat easier. I find it best to use as few sub-projects as I can -- don't fall into the GTD trap of //over-structuring// your projects.
===Contexts===
...are how GTD lets you categorise Actions by where you need to be to do them. Some things you can only do when you're in your garden at home, or at your computer at work; some things you can do any time you have your phone with you. Each of these is a Context.
For some reason almost every software GTD tool gives Contexts names that begin with @. In the GTD book, David Allen happens to mention that you can make folders in most email programs with names that start with an "at" sign @ to make them sort at the top of your folders list.. but that's not enough to convince us that it's a good thing to do. So the default Contexts that MonkeyGTD includes don't start with an @. If you have a strong preference for at-signs, feel free to edit all your Contexts and add them in.
=====A Note About Tags=====
This alpha version of mGTD uses tags ''a lot'', a practice that has been called "tag abuse", and quite <s>rightly</s> [unfairly -S] so.
Simon has announced that this practice will remain in the official release of 2.1: [http://groups.google.com/group/GTD-TiddlyWiki/msg/03aee2869c8a8f03 "I intend to stick with a tag based version"].
A future release version of mGTD (perhaps 3.0) may use custom fields for almost everything that this version currently uses tags for -- then you can have the "Tags" tab back :)
In the meantime, please <s>just put up with the tagging</s> [enjoy the power of tags -S] for now.
===Process Inbox===
The Process Inbox (version 3 calls this "quick add" on the menu) template allows you to initiate a whole '''new''' project quickly.
The syntax is the following:<br/>
Project name|area tag<br/>
.1st action name|context tag|status tag|tag...<br/>
.2nd action name|tag|tag|tag...<br/>
.subproject name|project|area<br/>
..3rd action|tag|tag|...<br/>
Tags can be mentioned in any orders as long as they are separated by a "|" and as as long as they match an existing tag of course.<br/>
*For "Next action" use N as tag
*For "Waiting action" use W as tag
*For "Starred action" use S as tag
Give a try to the following sample<br/>
New project given by the boss|business development<br/>
.gather facts and figures about xx customers|N|Email<br/>
.assess feasibility|Office<br/>
.business case draft|S|Online<br/>
.summarize project plan for this business idea|Office<br/>
.Bench competitors (sub project)|project
==Setup==
Probably the first thing you want to do, if you haven't already, is to change "YourName" under options to your actual name. Once you've done that, click on "Config" in the MainMenu across the top of the page.
In the Config tiddler you get links to some of the things you can customise. I'll describe most of those things below, but right now, you can edit your SiteTitle and SiteSubtitle to whatever strikes your fancy (note that to change your SiteTitle or SiteSubtitle, you open the SiteTitle tiddler and '''edit the content''', where it says "My MonkeyGTD", '''not the title''', which should always say "SiteTitle").
===Area===
Area is short for "Area of Responsibility", something that David Allen refers to quite a bit when he's talking about planning and review. Unsurprisingly, this is an area for which you are responsible. Usually a given project falls within one or more of your areas of responsibility.
Click on the Area link in the Setup tiddler to see the Areas that MonkeyGTD currently starts out with. You can delete or rename these, and add others, as necessary. An Area is just a tiddler with the tags "GTD" and "Area" (use the "new area" button to make a tiddler with these tags already filled out). Notice that your Areas are listed under the headings "Personal" and "Professional"; these two headings are Realms.
===Realm===
Across the top of your MonkeyGTD screen, just below the main links, is the Realm bar.
MonkeyGTD will only display Actions and Projects that belong to a Realm that is "switched on". Click on a Realm in the Realms bar to toggle it on or off.
Although compared to the last version, this version of MonkeyGTD is generally more closely aligned with the "correct" practice of GTD as described by David Allen, Realms is something Simon and Daniel basically just made up.
We realised that although rich executives and business owners can mix all their work and non-work tasks up and do whichever takes their fancy, that's them. If you work for "the Man" like we do, you need to be able to divide up your tasks based on whether or not your employer is paying you to do it. That way you know what tasks you should be doing when you're "on the clock".
So, the two realms that you have "out of the box" are Personal and Professional. You can rename them or add others as necessary. We advise using as few Realms as you can get away with (I use Work, ContractWork, GeekMode and Personal); and you don't need to use realms at all if you don't want to. If you're just starting GTD, you could easily ignore Realms for a while.
==Customising MonkeyGTD alpha==
===Configuration of the "Star" feature===
MonkeyGTD lets you mark or "star" an item for coming back to (or for whatever reason you want). The default character for starring items is a Unicode "Black Star" character (Unicode number 2605). Not every computer can display that character. If you see an "x" or a "?" instead of a star, or if you just don't like the default star, you can do one of the following:
* Update the system fonts of your operating system, installing a font which supports the "Black Star"
* The [http://mgtd-alpha.tiddlyspot.com/#MonkeyGTDPlugin MonkeyGTDPlugin tiddler] includes an alternate star. Edit that tiddler and try one of these:
** un-comment the alternative star (and comment out the default star):
// star: "\u2605",
star: "\u22C6", // "star operator" - alternative for "black star"
// star: "*", // use in case the above doesn't work on your system
** un-comment the plain asterisk
// star: "\u2605", // "black star"
// star: "\u22C6", // "star operator" - alternative for "black star"
star: "*", // use in case none of the above doesn't work on your system
** insert a line using the same pattern, for whatever other character you like. You can browse around the huge range of Unicode characters at [http://unicode.org/charts/symbols.html unicode.org], or read [http://www.blogger.com/comment.g?blogID=37667628&postID=5550364531588548336 these comments in the MonkeyGTD Blog] where some useful options are listed.
Any changes to the MonkeyGTDPlugin tiddler will be changed back when you upgrade. However Simon advises these steps to keep your "personal star character" forever:
# Make a tiddler called zzStarChar (starting with zz because TW processes plugins in alphabetical order)
# in that tiddler put this:
config.mGTD.star = "\u22C6"; // "star operator" my preferred star char
(obviously, use whatever number you like, instead of 22C6)
# add the tag "systemConfig"
# save and reload
Then you can forget it forever.
===Templates===
===Change the menu to your taste===
One of the first things I was missing was some sort of guide line or text how to use mGTD. And to get things done, not having one is a no-no. :)
So the first thing I did was to open de tiddler called MainMenu and added an item 'config' and an item 'help' at the bottom end. There was a tiddler 'config' but not a 'help'. In the 'help' I included a link to mGTD [http://monkeygtd.blogspot.com blog] site (great help there!) and a link to these pages. (Not much of a help acording to the blogs FAQ but we are allowed to improve on it.)
Here is a snipped from my ''help'' tiddler:
<nowiki>~MonkeyGTD [[BLOG|http://monkeygtd.blogspot.com/]].
[[quick start|http://tiddlywikiguides.org/index.php?title=Getting_started_with_MonkeyGTD_2.1_alpha]].
[[mGTD for dummies|mGTD]].
[[GTD overview|GettingThingsDoneOverview]]</nowiki>.
(mGTD for dummies is the same text as the ''quick and dirty'' section from above.)
While using mGTD and finding dificulties with parts of it I add references to my help tiddler. Got even an action called 'WriteDocumentation' but I'm afraid it is an endless action.
==Updating your MonkeyGTD alpha==
Click update in the top menu and follow the instructions.
==Feedback==
If you see something wrong here, or think certain points should be expanded on, feel free to correct it right now! Even if you aren't sure you can write it up "properly", just put in what you can, and everyone else will help clean it up.
If you want to send some other kind of feedback, you can email Daniel at danielbaird at gmail, but with a dot com at the end.
[[Category:Getting Started]]
{{Incomplete}}
You can use BidiX's UploadPlugin to enable editing and saving your TiddlyWiki to your web host.
The plugin and documentation are available from [http://tiddlywiki.bidix.info/ BidiX's site]; this document is a quick-start to getting it going.
===Simple instructions for BidiX's UploadPlugin===
''Extracted from [http://www.giffmex.org/twfortherestofus.html#%5B%5BSimple%20instructions%20for%20BidiX's%20UploadPlugin%5D%5D 'TiddlyWiki for the rest of us' by Dave Gifford]''
#'''Import the plugin and its friends.''' In your TiddlyWiki file, go to the backstage section and import the following tiddlers from http://tiddlywiki.bidix.info/
##PasswordOptionPlugin
##UploadPlugin
##store.php
#'''Save changes''' to your file '''and reload''' / refresh your browser.
#'''Create a store.php file.''' Open the store.php tiddler in your file and copy its contents. In Notepad, or whatever program you use to create webpages, paste the contents you've copied, and save the file as store.php. Be sure your program hasn't added any extensions such as .html, etc. The file should be called 'store' and its extension should be .php.
#'''Set your username and password.''' In the store.php file, add your username(s) and password(s). Do this by going to the line $USERS = array( '~UserName1'=>'Password1', etc) and replacing Username1 with your username, and Password1 with your password. Be sure to leave all the punctuation and code, such as the single quotes, intact. Save your file.
#'''Upload store.php.''' Use your FTP client (the program you use to upload files to your website - I use ~FileZilla) to upload store.php to the directory (folder) where you are going to put your ~TiddlyWiki file. If it's been uploaded correctly, you should be able to open your file from your browser (e.g. http://www.giffmex.org/experiments/store.php) and see BidiX's message.
#'''Go to the Upload options panel.''' Now go to your TiddlyWiki file and in the backstage area at the top you should be able to see an 'upload' button. Click it.
#'''Fill in the Upload options panel.'''
##Set the same username and password that you placed in your store.php file
##Add the url of your store.php file (e.g., http://www.giffmex.org/experiments/store.php)
##Leave the Relative directory blank, and it will use default settings
##For filename, add the filename of the ~TiddlyWiki you are uploading
##If you have created a special directory on your site for backups, enter it in the Relative Directory for backups line. You don't add the entire url, just the name of the directory.
##Decide whether you want the ~UploadLog tiddler in your file to display the new logging data every time you save changes to the web, and check the box accordingly.
##Decide how many lines of data you want to appear in UploadLog, or leave it at a default of 10.
#'''Click 'Upload' in the Upload with options panel.''' There will be a delay as your file is uploaded, but a message area should appear saying that your file is saved and about to upload. When done it should say 'Main TiddlyWiki file uploaded'. You are done!
#'''Upload to your heart's content.''' Now, every time you want to upload the changes from your local file to the file on your website, go to the upload section of the backstage area, be sure your username and password are correct, and hit the upload button. That's it!
There is a [http://trac.tiddlywiki.org/ticket/720 known issue] with earlier versions of the [http://getfiregpg.org/ FireGPG] [[Firefox]] extension, which appears to corrupt tiddlers containing a PGP message.
This has been fixed in version 0.7.3 (2009-02-08) of FireGPG.
[[Category:Browser Issues]]
Google Analytics can be used to track individual tiddler views:
* [http://www.hawksworx.com/journal/2007/07/05/tracking-tiddlywiki-with-google-analytics Tracking TiddlyWiki with Google Analytics]
* [http://blog.spacelag.com/2007/10/tracking-tiddlywiki-with-google.html TiddlyWiki, Google Apps, Google Analytics]
[[Category:FAQ]]
[[Category:Tips & Tricks]]
[http://www.chromium.org Google Chrome] is a browser currently being developed by Google. It's based on WebKit, the same browser engine used by Apple's Safari.
== Issues ==
* saving requires the [http://www.tiddlywiki.com/#TiddlySaver TiddlySaver] Java applet
* importing works only for local documents
* cookies are [http://code.google.com/p/chromium/issues/detail?id=535 not saved] for local files by default — however, local cookies can be enabled using the <code>--enable-file-cookies</code> [http://chromespot.com/showthread.php?t=697 command-line parameter] when starting the program
** e.g. on Windows XP, a shortcut would use the following target: <pre>"C:\Documents and Settings\<username>\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --enable-file-cookies "<URI>"</pre> (<code><username></code> is a placeholder for the Windows account, <code><URI></code> is an optional path to a website or local TiddlyWiki file)
[[Category:Browsers]]
[[Category:Browser Issues]]
The Gradient macro allows simple horizontal and vertical coloured gradients. They are constructed from coloured HTML elements, and don't require any images to work.
The Gradient macro is an extended macro that processes the text after it up until the next '<pre>>></pre>' sequence. It looks like this:
<pre><<gradient vert #ffffff #ffdddd #ff8888>>gradient fill>></pre>
The first parameter can be ''vert'' or ''horiz'' to indicate the direction of the gradient. The following parameters are two or more colours (CSS RGB(r,g,b) format is also acceptable). The macro constructs a smooth linear gradient between each of the colours in turn.
Inline CSS definitions can be added to gradient fills like this:
<pre><<gradient vert #000000 #660000 #aa2222>>color:#ffffff;font-size:12pt;Darkness>></pre>
[[Category:Macros]]
Several [https://addons.mozilla.org/firefox/addon/748 Greasemonkey] scripts - in particular the ''Linkify'' script - can interfere with [[TiddlyWiki]].
[[Category:Browser Issues]]
{{Merge|[[Community]]}}
Two Google Groups are used to coordinate support and development
* The [http://groups.google.com/group/TiddlyWiki TiddlyWiki group] is for general discussion, bug reports and announcements.
* The [http://groups.google.com/group/TiddlyWikiDev TiddlyWikiDev] group is for discussion about TiddlyWiki development.
==External Links==
[http://tiddlywiki.com/%5B%5BHelp%20and%20Support%5D%5D TW.com About help and support on TiddlyWiki.com]
[[Category:coordination]]
* [[PageTemplate]]
* [[ViewTemplate]]
* [[EditTemplate]]
== See Also ==
* [[StyleSheets]]
[[Category:Shadow Tiddlers]]
[[Category:Portals]]
{{Plugin
|Name=HTMLTemplatePreviewMacro
|Author=[[User:JayFresh{{!}}jayfresh]]
|Description=Adds an IFrame in place and renders a template into the IFrame
|Version=0.2
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/plugins/HTMLTemplatePreviewMacro.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
HTMLTemplatePreviewMacro provides you with the following macro:
* HTMLTemplatePreview - depends on [[IFramePlugin]], [[TemplatePlugin]]
=== Usage ===
<<HTMLTemplatePreview templateName>>
where "templateName" is the name of a tiddler containing the template to be rendered in the method described at [[TemplatePlugin]].
=== Description ===
When displaying the results of templating operations in a tiddler, any styles that are set as part of the template output can interfere with the generating TiddlyWiki. A solution is to display the output in an IFrame and this macro enables that.
MediaWiki Unplugged is an application built on TiddlyWiki, an open source project you can extend and hack. For more information on TiddlyWiki, see http://tiddlywiki.com There is a community of developers who can help you - get in touch on the TiddlyWikiDev Google Group at http://groups.google.com/group/TiddlyWikiDev
== Basics ==
{| border="1" cellpadding="5" style="border-collapse: collapse;"
! Option
! Syntax
! Output
|-
| Italics
| <pre>This is ''italic'' type.</pre>
| This is ''italic'' type.
|-
| Bold
| <pre>This is '''bold''' font.</pre>
| This is '''bold''' font.
|-
| Paragraphs
|
<pre>
A blank lines creates a new paragraph.
New paragraphs are preceded by a blank line.
Regular line breaks are ignored.
</pre>
|
A blank lines creates a new paragraph.
New paragraphs are preceded by a blank line.
Regular line breaks are ignored.
|-
| Manual Line Breaks
| <pre>Inserting <br/> creates a line break.</pre>
| Inserting <br/> creates a line break.
|-
| Hyperlinks
|
<pre>
external: [http://www.domain.tld title]
internal: [[page title]], [[page title|custom title]]
</pre>
|
external: [http://www.domain.tld title]
internal: [[page title]], [[page title|custom title]]
|-
| Headings
|
<pre>
= Heading 1 =
== Heading 2 ==
=== Heading 3 ===
==== Heading 4 ====
===== Heading 5 =====
</pre>
|
= Heading 1 =
== Heading 2 ==
=== Heading 3 ===
==== Heading 4 ====
===== Heading 5 =====
{{Note|'''N.B.:''' Level 1 headings should not be used inside wiki pages, as these are reserved for the page title.}}
|-
| Lists
|
<pre>
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3
# ordered list, level 1
## ordered list, level 2
### ordered list, level 3
; Term
: Definition
</pre>
|
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3
# ordered list, level 1
## ordered list, level 2
### ordered list, level 3
; Term
: Definition
|-
| Tables
|
<pre>
{| border="1" cellpadding="2"
! Heading Column 1
! Heading Column 2
|-
| Row 1, Column 1
| Row 1, Column 2
|-
| Row 2, Column 1
| Row 2, Column 2
|}
</pre>
|
{| border="1" cellpadding="2"
! Heading Column 1
! Heading Column 2
|-
| Row 1, Column 1
| Row 1, Column 2
|-
| Row 2, Column 1
| Row 2, Column 2
|}
|-
| Images
| <pre>[[Image:Wiki.png|caption]]</pre>
| [[Image:Tworg.png|caption]]
|-
| Thumbnail Images
| <pre>[[Image:Wiki.png|thumb|caption]]</pre>
| [[Image:Tworg.png|thumb|caption]]
|}
== Advanced Features ==
* '''Categories''' function like keywords for indexing contents and can be added by adding enclosing the desired category name in square brackets and preceding it by the term "Category:": <code><nowiki>[[Category:Example]]</nowiki></code>
* '''Subpages''' are created by adding the parent page's title, separated by a slash (<tt>/</tt>), to the respective pages title: <code>parent/subpage</code>
* '''Template transclusion''' is invoked by enclosing the template's name in curly brackets: <code><nowiki>{{template}}</nowiki></code>
** If a template requires parameters, the respective value is added to the template's name, separated by a pipe charachter (<tt>|</tt>): <code><nowiki>{{template|value1|value2}}</nowiki></code>
** Alternatively, values can be assigned by directly using the respective parameter names:
<pre style="margin-left: 3em;">
{{template
|1=value1
|namedParameter=value2
}}
</pre>
{{Note|This notation can be helpful when the parameter value is to contain special characters (e.g. quotation marks).}}
== Further Information ==
* [http://en.wikipedia.org/wiki/Wikipedia:Cheatsheet Wikipedia cheat sheet]
* [[metawikipedia:Help:Table|table syntax]]
* [[metawikipedia:Help:Variable|variables]]
__NOTOC__ <!-- required because of embedded headings -->
__NOEDITSECTION__ <!-- required because of embedded headings -->
[[Category:Help]] [[Category:MediaWiki]]
You can format your text using ''MediaWiki Markup'' - similar to [[TiddlyWiki Markup]] - but with important differences and limitations. This consists of normal characters like asterisks, single quotes or equation marks which have a special function in the wiki, sometimes depending on their position. For example, to format a word in ''italic'', you include it in two single quotes like <tt><nowiki>''this''</nowiki></tt>
== Text formatting markup ==
{| align="center"
|-
|'''Description'''
|'''You type'''
||'''You get'''
|-
| colspan="3" align="center" | ''applies anywhere''
|-
|Italic text
|<tt><nowiki>''italic''</nowiki></tt>
|''italic''
|-
| Bold text
|<tt><nowiki>'''bold'''</nowiki></tt>
|'''bold'''
|-
| Bold and italic
|<tt><nowiki>'''''bold & italic'''''</nowiki></tt>
|'''''bold & italic'''''
|-
|Escape wiki markup
|<tt><nowiki><nowiki>no ''markup''</nowiki></nowiki></tt>
|<nowiki>no ''markup''</nowiki>
|-
| colspan="3" align="center" | ''only at the beginning of the line''
|-
| Indent text
|<tt><nowiki>:Indent text</nowiki></tt>
| Indent text
|-
|Headings of<br />
different levels <ref>Use of a heading created by single equal signs is discouraged as it appears with the same formatting and size as the page title, which can be confusing.</ref><ref>An article with four or more headings will automatically create a [http://en.wikipedia.org/wiki/Wikipedia:Section#Table_of_contents_.28TOC.29 table of contents].</ref>
|
<tt><nowiki>==level 1==</nowiki></tt><br />
<tt><nowiki>===level 2===</nowiki></tt><br />
<tt><nowiki>====level 3====</nowiki></tt><br />
<tt><nowiki>=====level 4=====</nowiki></tt>
|
==Level 1==
===Level 2===
====Level 3====
=====Level 4=====
|-
|Horizontal rule
|
<tt><nowiki>----</nowiki></tt>
|
----
|-
|Bullet list
|
* one<br>
* two<br>
* three<br>
** three and one-third<br>
** three and two-thirds<br>
|
* one
* two
* three
** three and one-third
** three and two-thirds
|-
|Numbered list
|
# one<br />
# two<nowiki><br></nowiki>spanning several lines<nowiki><br></nowiki>without breaking the numbering<br />
# three<br />
## three point one<br />
## three point two<br />
|
# one
# two<br>spanning several lines<br>without breaking the numbering
# three
## three point one
## three point two
|-
| Mixture of bulleted<br /> and numbered lists
|
# one<br />
# two<br />
#* two point one<br />
#* two point two<br />
|
# one
# two
#* two point one
#* two point two
|-
|Definition list
|
;Definition<br />
:item 1<br />
:item 2<br />
|
;Definition
:item 1
:item 2
|-
|Preformatted text
|
preformatted text is done with<br />
a space at the<br />
beginning of the line<br />
|
preformatted text is done with
a space at the
beginning of the line
|}
Notes: <references/>
== Paragraphs ==
MediaWiki ignores normal line breaks. To start a new paragraph, leave an empty line. You can also start a new line with the HTML tags <tt><nowiki><br> or <br/></nowiki></tt>.
== HTML ==
Some [[HTML]] tags are allowed in MediaWiki, for example <tt><nowiki><code></nowiki></tt>, <tt><nowiki><div></nowiki></tt>, <tt><nowiki><span></nowiki></tt> and <tt><nowiki><font></nowiki></tt>.
== Other formatting ==
Beyond the text formatting markup shown above, here are some other formatting references:
*[[Help:Links|Links]]
*[[Help:Images|Images]]
*[[Help:Tables|Tables]]
[http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_Page_Help/Do-It-Yourself/Formatting_Text#Underlining More Formatting from Wikipedia]
== See Also ==
* [[Help:Contents/CheatSheet|Markup Cheat Sheet]]
== External Links ==
* http://www.mediawiki.org/wiki/Help:Formatting
[[Category:Help|Formatting]]
[[Category:MediaWiki]]
{{Incomplete}}
== Help Contents ==
* [[TiddlyWiki FAQ|TiddlyWiki - Frequently Asked Questions]]
* [[MediaWiki FAQ|MediaWiki - Frequently Asked Questions]]
** [[MediaWiki Markup|MediaWiki Markup (syntax)]]
* [[Help:Sandbox|Sandbox]] (for testing purposes)
== Interactive Help ==
* [[Help_Talk:Support Desk|Support Desk]]
== External Guides ==
* [http://www.aboutus.org/WikiAnatomy Introduction to wikis]
* [[metawikipedia:Help:Contents|User's Guide]]
* [[mw:Help:Configuration settings|Configuration Settings]]
* [[mw:Help:FAQ|MediaWiki FAQ]]
* [http://mail.wikimedia.org/mailman/listinfo/mediawiki-l MediaWiki mailing list]
== SimpleTable Test ==
<tab class="wikitable" sep="comma" head="top">
Cell aa,Cell ab,Cell 1-3
Cell ba,Cell 2-2,Cell bc
Cell 3-1,'''Cell''' 3-2,''Cell'' 3-3
</tab>
<tab class="wikitable" sep="bar" head="left">
Cell 1-1|Cell 1-2|Cell 1-3
Cell 2-1|Cell 2-2|Cell 2-3
Cell 3-1|Cell 3-2|Cell 3-3
</tab>
<tab class="wikitable" sep="bar" head="topleft">
Cell 1-1|Cell 1-2|Cell 1-3
Cell 2-1|Cell 2-2|Cell 2-3
Cell 3-1|Cell 3-2|Cell 3-3
</tab>
== Cite Test ==
* This is a reference<ref name="multiple">It creates a footnote.</ref>.
* This is another reference<ref name="multiple" />, pointing to the same footnote.
* This is a third reference<ref>It creates another footnote.</ref>, pointing to a second footnote.
<references />
== Captcha Test ==
Testing the ConfirmEdit extension (attempt #4).
== Template Test ==
{{Print}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{Note|
1=<div style="font-width: bold;">lorem ispum dolor sit amet</div>
}}
{{Sidenote|left|This is a side note on the left.}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{Sidenote|right|This is a side note on the right.}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet.
== Section Links ==
[[Help:Sandbox#Section_Links|link to this section]]
== Folding Tabs ==
above
{{FoldingTabs
|Overview|
TiddlyWiki is a reusable, non-linear personal notebook. It's written in HTML, CSS and JavaScript and published under the BSD open-source license.
Below is a preview of what's on these tabs to help guide you.
*'''Basics'''
** What is a TiddlyWiki
** What is it used for
** Setting up the TiddlyWiki
** Fundamentals on how to get it working for you.
*'''Users'''
** Using the built-in features of TiddlyWiki
** The different applications for TiddlyWiki
** Getting the most from your TiddlyWiki
** The fully featured TiddlyWiki and plugins
*'''Developers'''
** Translating TiddlyWiki
** Understanding the Core
** Writing Plugins
** Writing Macros
*'''Advanced'''
** Advanced Applications
** Advanced and Special Adaptations
** Interfacing with other Applications
** Core modifications and application Hooks
|Basics|
TiddlyWiki allows anyone to create personal self-contained hypertext documents. Since Tiddlywiki does not need any installation and consists of only a single file, it is fully self-contained and extremely portable.
TiddlyWikis are used to organize data in non-linear ways, with hyperklinks and tags. The idea is that you can
* sort your information in small bite-size chunks called Tiddlers,
* link the Tiddlers by hyperlinks and by the MainMenu,
* and add custom tags as desired to bunch tiddlers together by category.
Since TiddlyWiki is basically an html file and is published under an Open Source License, you can save a copy of it for free from the Internet and then edit in your computer using only your Internet browser. You can then take it with you wherever you go, on a USB memory stick (called a “Wiki on a Stick”) and edit it on any computer that has a relatively recent web browser, preferably Mozilla’s free browser Firefox.
* [[TiddlyWiki|About TiddlyWiki]]
* [[Initial Configuration]]
* [[Browser-specific Issues]]
* [[Navigation|Navigation and Tagging]]
* [[Editing]]
* [[Printing]]
* [[TiddlyWiki FAQ|FAQ]]
|For Users|
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
'''<everything there is to know about using TiddlyWiki snipped>'''
That just about covers the normal uses of TiddlyWiki. Below are some other helpful sites.
'''Useful TiddlyWiki Sites'''
* [http://tiddlywiki.com/#GettingStarted Getting Started] on TiddlyWiki.com
* [http://www.giffmex.org/twfortherestofus.html TiddlyWiki for the Rest of Us] by Dave Gifford
* [http://tiddlyspot.com/twhelp/ TW Help] by Morris Gray
* [http://nothickmanuals.info/doku.php/cheatsheets TiddlyWiki quick reference card] by Dmitri Popov
* [http://groups.google.com/group/TiddlyWiki TiddlyWiki mailing list] at Google Groups
* [http://www.tiddlyspot.com TiddlySpot] (free TiddlyWiki hosting)
* [[TiddlyWiki Resources|More Resources...]]
|For Developers|
'''Information for Developers'''
'''Guides'''
* [[Translating TiddlyWiki]]
* [[Core|Understanding the Core]]
* [[Plugin Development|Writing Plugins]]
* [[Macro Development|Writing Macros]]
'''Resources'''
* [[Subversion]]
* [[Tickets|Tickets (Bug Tracking)]]
* [http://groups.google.com/group/TiddlyWikiDev/ Mailing List]
|Advanced|
'''Advanced Features by Function'''
* [[Customization and Layout]]
* [[Setup for Server-Side TiddlyWikis]]
'''Advanced Features by Format'''
* [[Macros]]
* [[Plugins]]
* [[Scripts]]
* [[StyleSheet Adjustments]]
* [[PageTemplate Adjustments]]
* [[ViewTemplate and EditTemplate Adjustments]]
}}
below
== Collapsing/Expanding Sections ==
{{CollapsingBlock|
Heading|
Contents
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
}}
== Time Since Last Edit ==
This page was last edited
{{#expr:
(
{{#time:
U|{{CURRENTTIMESTAMP}}
}}
-
{{#time:
U|{{REVISIONTIMESTAMP}}
}}
)
/
60
}}
minutes ago.
'''N.B.:''' This calculation is affected by page caching; use <code>action=purge</code> to clear the cache for this page.
== Tiddler Box ==
{{Tiddler|1=foo [[bar]] baz|
2=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.|
3=oof [[rab zab]]
}}
{{Tiddler|1=foo [[bar]] baz|
2=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
}}
{{Plugin
|Author=[[User:SimonBaird|SimonBaird]]
|URL=http://mptw.tiddlyspot.com/
|Description=Allows conditional inclusion/exclusion in templates.
|Category=MPTW Plugins
|Category2=Customization Plugins
}}
== See Also ==
* [[/Questions|HideWhenPlugin Questions]]
{{review}}
FAQ about using the [[HideWhenPlugin]] from [http://mptw.tiddlyspot.com/#HideWhenPlugin MonkeyPirateTiddlyWiki].
==Using HideWhen to do conditional toolbars based on user name==
Replace the normal toolbar comand in the ViewTemplate tiddler with the following:
<div class='toolbar' macro="showWhen config.options.txtUserName == 'BartSimpson' ">
<span macro='toolbar editTiddler closeOthers closeTiddler'></span>
</div>
<div class='toolbar' macro="showWhen config.options.txtUserName != 'BartSimpson' ">
<span macro='toolbar closeOthers closeTiddler'></span>
</div>
==Using HideWhen to do conditional fields based on tags==
Let suppose you have a some tiddlers tagged with "friend" and you'd like to use some custom field to maintain some information about them, say their favourite food.
In ViewTemplate:
<div macro="showWhen tiddler.tags.contains('friend')">
Favourite food: <span macro="view favouritefood"></span>
</div>
In EditTemplate:
<div macro="showWhen tiddler.tags.contains('friend')">
Favourite food: <span macro="edit favouritefood"></span>
</div>
Now you can view and edit your friends' favourite food.
If you wish to have the same field show for your business contacts as well as your friends then you would do it like this:
In EditTemplate:
<div macro="showWhen tiddler.tags.containsAny(['friend','contact'])">
Favourite food: <span macro="edit favouritefood"></span>
</div>
In ViewTemplate:
<div macro="showWhen tiddler.tags.containsAny(['friend','contact'])">
Favourite food: <span macro="view favouritefood"></span>
</div>
Note that custom fields must be lower case. See http://trac.tiddlywiki.org/ticket/356 for details.
==Making editable custom fields appear on a new tiddler==
Create a customized newTiddler button:
<<newTiddler label:'Add Training' tag:'Training' title:'New Training'>>
Place the following in the EditTemplate:
<div macro="showWhen tiddler.tags.contains('Training') || tiddler.title == 'New Training'">
[[TrainingTemplateEdit]]
</div>
Create a TrainingTemplateEdit tiddler to put all of your desired custom fields in.
Placing each collection of custom fields in a separate tiddler helps cut down on the confusion of having multiple different things going on in your ViewTemplate & EditTemplate, as well as making it easier to safe guard against accidentally deleting or over writing one of them and losing everything.
Posts created by UnaMesa associates in response to questions regarding TiddlyWikis.
This is not a FAQ page, as the information here is not necessarily in response to questions that have been "frequently asked".
Rather, the information available here has been deemed important/useful for other reasons.
The issues and solutions gathered on this page might later be refactored into separate articles.
== UnaMesa Associates ==
{| border="1" cellpadding="2"
! Name<br/>(linked to Google profile)
! Homepage/Blog
! Recent comment by [http://groups.google.com/groups/TiddlyWiki TiddlyWiki GoogleGroup] Members
|-
| [http://groups.google.com/groups/profile?hl=en&enc_user=MokBmRMAAADTG2u7QlZWMZAgi3z8J6Y3WMj6vob75xS36mXc24h6ww Eric Shulman]
|http://www.tiddlytools.com
| [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/991885b303b11360/5ca500699fa44bb8?hl=en#5ca500699fa44bb8Thank Thank you! This worked exactly as I needed it to.]
|-
| [http://groups.google.com/groups/profile?hl=en&enc_user=QjQEvhAAAACGACMqtGWeJpKiGBb_G5ZJ&group=TiddlyWiki Saq Imtiaz]
|http://www.lewcid.org
| [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/6e7ce5afcdf9c723/f5c7993153e15e2a?hl=en&lnk=st&q=#f5c7993153e15e2a Thanks for showing me the path to your treasures ;-) As I almost can't bear waiting any longer for the announced updates of your plugins.]
|-
| [http://groups.google.com/groups/profile?hl=en&enc_user=uTVwVhcAAAD2Axatz1X825vBArbNt0XjHqZiDvCVswhrZ6TQxKj0ww Jeremy Ruston]
|http://www.tiddlywiki.com http://jermolene.wordpress.com/
|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/3d72cb1fc045dcb3/8501138694463c56?hl=en&lnk=st&q=Man%2C+that+guy+is+a+genius.#8501138694463c56 So did Jeremy Ruston come up with ....AND all the other cool core stuff in TiddlyWiki himself? Man, that guy is a genius.]
|-
|[http://groups.google.com/groups/profile?hl=en&enc_user=A_4XKhIAAACXcfBOECdHEwvRUv6seMdV8rhlH0Pnl47z4AZhN98BFg Martin Budden]
|http://www.martinswiki.com
|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/8d657e9017871851/747c5811336e8214?hl=en&lnk=st&q=#747c5811336e8214 Thanks Martin. We all appreciate your plugins.]
|}
== Preloading New Tiddlers with Boilerplate Contents ==
[[How To/Preloading New Tiddlers with Boilerplate Contents]] - Eric
== Including Username in the Title or Subtitle ==
[[Including Username in the Title or Subtitle]] - Eric
== Displaying different kinds of tiddlers ==
[[Displaying different kinds of tiddlers]] - Eric
== Make a tiddler open in folded mode ==
[[Make a tiddler open in folded mode]] - Eric
== Automatically open today's journal tiddler on startup ==
[[Automatically open today's journal tiddler on startup]] - Eric
== Display Number of External Links in a Tiddler ==
[[How To/Display number of external links in a tiddler]] - Eric
== Change the Title Bar ==
[[How To/Change the title bar]] - Eric
== Synchronizing TW Files ==
[[How To/Synchronize TW files]] - Eric
== Multi-line Contents in a List ==
[[How To/Multi-line contents in a list]] - Eric
== Build a Menu Tree in TW ==
[[How To/Build a menu tree in TW]] - Eric
== Display a Variable Within a Tiddler ==
[[How To/Display a variable within a tiddler]] - Eric
== How To Add Content From Text Files ==
[[How To/How To Add Content From Text Files]] - Eric
== Custom Template with Custom Toolbar ==
[[How To/Custom Template with Custom Toolbar]] - Eric
== Header Macro/Plugin (for Custom Graphic Header) ==
[[How To/Header Macro/Plugin (for Custom Graphic Header)]] - Eric
== A script from "file://" is requesting enhanced abilities ==
[[A script from "file://" is requesting enhanced abilities]] - Eric
== Correct Syntax for Naming a Slice ==
[[How To/Correct Syntax for Naming a Slice]] - Eric
== Embedding Macros in [[ ]] to use for links to other tiddlers ==
[[How To/Embedding Macros in double brackets to use for links to other tiddlers]] - Eric
== How to Get the Content of a Tiddler and Edit Them in a Macro ==
[[How To/How to Get the Content of a Tiddler and Edit Them in a Macro]] - Eric
== Important Differences Between 'Plugins' and 'Scripts' ==
[[How To/Important Differences Between 'Plugins' and 'Scripts']] - Eric
== Plugins and Importing Tiddlers ==
[[How To/Plugins and Importing Tiddlers]] - Eric
== Basic Info to Provide When Asking for Help ==
[[How To/Basic Info to Provide When Asking for Help]] - Eric
[[Category:How To]]
{{Quote|Eric|
You can do this with a one-line "systemConfig" tiddler (aka, plugin) that dynamically sets the DefaultTiddlers *shadow* tiddler each time the document is loaded:
Start by creating a tiddler (e.g., [[DefaultTiddlersTweak]]) containing the following line of javascript code:
<pre>
config.shadowTiddlers.DefaultTiddlers=new Date().formatString("0DD-MMM-YYYY");
</pre>
Then, make sure to remove any existing [[DefaultTiddlers]] tiddler definition so that the next time you open your document, it will use the shadow [[DefaultTiddlers]] definition (which is set by the one-line plugin code, above, each time you open the document)
}}
[[Category:How To]]
{{Merge|[[Troubleshooting]]}}
{{Quote|1=Eric|2=
Provide the following basic info to get the ball
rolling:
* What version of TiddlyWiki are you using and where did you get it?
* What plugins (if any) have you installed?
* What browser and system are you using?
* Does the problem happen on other systems or browsers?
* Describe exact step-by-step methods (or code examples) to reproduce
the problem.
* Reduce the problem to the smallest number of variables: try things
in an EMPTY TiddlyWiki... does it still break?
* Otherwise, start adding in plugins, one at a time, until something
breaks (assuming the problem is caused by a plugin).
* Whenever possible, put your document online somewhere so others can
debug the actual problem without needing to recreate it themselves.
enjoy,
-e
}}
Is it possible to build a menu tree in TiddlyWiki?(like a directory tree in Windows Explorer)
+Menu1
Click on + and you get:
-Menu1
Submenu1
Submenu2
Etc
You can do that using
http://www.TiddlyTools.com/#NestedSlidersPlugin
Try this:
+++[+ Menu1][- Menu1]>
+++[+ SubMenu1][- SubMenu1]>
item
item
...
===
+++[+ SubMenu2][- SubMenu2]>
item
item
...
===
===
[[Category:How To]]
I want to change the title bar in my TW so it only has the SiteTitle
and not the SiteSubtitle. I tried editing the page in a text editor
but naturally when I opened it in my browser it just reverted back. I
don't see any tiddler that is like TitleBar, so I guess I am into
hacking TW itself? Any tips?
Nearly everything in TW is configured by defining tiddlers... unless
you are doing some major "rocket science" coding or debugging, you
should never need to directly edit the TW file...
In this particular case, when the TW core code saves the document, the
contents of the SiteTitle and SiteSubtitle tiddlers are automatically
written into the <title>...</title> section of the file, so that the
next time the document is loaded, that title will appear in the
browser's title bar.
To change this behavior, I've written a "core tweak" (a very small
plugin) that looks for an optional [[PageTitle]] tiddler and, if
present, uses the content of *that* tiddler in the browser's title
bar, instead of using the SiteTitle / SiteSubtitle combination.
Install this plugin
http://www.TiddlyTools.com/#CoreTweaks
and then create a [[PageTitle]] tiddler, and you should be all set!
Note that this tweak only affects the text on the browser's title bar,
and does NOT affect the normal rendering of the SiteTitle and
SiteSubtitle in the TW document display itself.
[[Category:How To]]
To enable editing of the Tiddlywikis in...
== Internet Explorer ==
[[Image:WinXP SP2 unblock.png|thumb|right|275px|Windows XP Service Pack 2 unblocking]]
* In IE, choose Tools > Internet Options
* Go to the Security tab and select "Local Intranet" Zone
* Click Default Level (to clear the Custom Level settings)
* Set the Security level to Low
* Close all open browsers
* You can now edit the wiki
Also Try:
If TiddlyWiki has been downloaded using Internet Explorer on Windows XP with Service Pack 2 and stored on an NTFS-formatted drive, any attempts to save changes will usually fail with the following error message:
It's not possible to save changes. Possible reasons include:
- your browser doesn't support saving (Firefox, Internet Explorer, Safari and Opera all work if properly configured)
- the pathname to your TiddlyWiki file contains illegal characters
- the TiddlyWiki HTML file has been moved or renamed
The solution is to right-click on the TiddlyWiki HTML file and choose Properties. If the file is blocked, there will be an Unblock button on the resulting property sheet, which will remove the protection and allow the file to be saved.
== Safari / Opera ==
The updated [http://www.tiddlywiki.com/#TiddlySaver TiddlySaver] Java applet permits TiddlyWiki to save changes from Safari & Opera, eliminating the Java Policy step <br>
<br>
URL: http://www.tiddlywiki.com/#TiddlySaver <br>
Filename: TiddlySaver.jar <br>
File Type: Java applet <br>
Location: Saved in the same directory as the TiddlyWiki file <br>
Note: TiddlySaver.jar is signed by UnaMesa Association, their certificate is signed by Thawte Code Signing CA intermediate certificate & is chained to the Thawte Premium Server CA root certificate. The first time this applet runs, allow the browser to trust the certificate chain to be able to use the applet, even if the certificate is indicated as valid <br>
<br>
Note that there is no longer any need for a .java.policy file <br>
<br>
Ensure that if a backup directory is specified in AdvancedOptions, which does not exist, TiddlySaver will not run; due to a software bug <br>
<br>
Appreciation for the original TiddlySaver code: Andrew Gregory <br>
Appreciation for arranging the certificate magic: BidiX
== Opera on Ubuntu ==
If your version of Ubuntu doesn't currently have Java installed, when you try to save changes you will receive a message that reads like the following:
<localhost>
It's not possible to save changes. Possible reasons include:
- your browser doesn't support saving (Firefox, Internet Explorer, Safari and Opera all work if properly configured)
- the pathname to your TiddlyWiki file contains illegal characters
- the TiddlyWiki HTML file has been moved or renamed
To fix this:
#[https://help.ubuntu.com/community/Java Download java].
#Then update Opera to use the new Java libraries. [http://ubuntuforums.org/showthread.php?t=69275 Source Instructions]
##First find the java library using "locate libjava.so".
##In Opera, enable Java, set the "Java Options" folder to the java library folder.
#Finally, reboot Opera.
When you next try to save changes, you will be greeted by a permissions dialog to allow saving. You should now be able to save your changes!
== See Also ==
* [[It's not possible to save changes]]
[[Category:FAQ]]
[[Category:Getting Started]]
[[Category:Browser Issues]]
__TOC__
== Using HTML ==
(from http://tiddlywiki.pastebin.com/f7d172f9a)
<pre>
<html>
<p align="center">
<textarea id="xclToTw" rows="10" cols="60"></textarea><br />
<button onclick="(function(){var ta=document.getElementById('xclToTw'); displayMessage('original: ' + ta.value); ta.value=ta.value.replace(/^|$|\t/gm, '|');})();" > Translate</button>
</p>
</html>
</pre>
== Using Visual Basic ==
(Original code: http://tiddlywiki.pastebin.com/f7848a6a7)
<source lang="vb">
Rem ***** BASIC *****
Sub TiddlyWikiExport()
' Dimension all variables
Dim TableData As String
Dim ColumnCount As Integer
Dim RowCount As Integer
Dim ClipboardData As New DataObject
' Loop for each row in selection
For RowCount = 1 To Selection.Rows.Count
' Write the initial table tag
TableData = TableData & "|"
' Loop for each column in selection
For ColumnCount = 1 To Selection.Columns.Count
' Do header formatting for the first row
If RowCount = 1 Then
TableData = TableData & "!"
Else
' Write the background color tag
If Selection.Cells(RowCount, ColumnCount).Interior.Color <> vbWhite Then
ColorToRGB CStr(Selection.Cells(RowCount, ColumnCount).Interior.Color), r, g, b
TableData = TableData & "bgcolor(#" & r & g & b & "): "
End If
' Write the initial bold tag
If Selection.Cells(RowCount, ColumnCount).Font.Bold = True Then
TableData = TableData & "''"
End If
' Write the initial italics tag
If Selection.Cells(RowCount, ColumnCount).Font.Italic = True Then
TableData = TableData & "//"
End If
' Write the initial strikethrough tag
If Selection.Cells(RowCount, ColumnCount).Font.Strikethrough = True Then
TableData = TableData & "---"
End If
' Set right alignment
If Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlRight Or _
Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlCenter Then
TableData = TableData & " "
End If
' Write the initial font color tag
If Selection.Cells(RowCount, ColumnCount).Font.Color <> vbBlack Then
ColorToRGB CStr(Selection.Cells(RowCount, ColumnCount).Font.Color), r, g, b
TableData = TableData & "@@color(#" & r & g & b & "):"
End If
' Write the initial hyperlink tag
If Selection.Cells(RowCount, ColumnCount).Hyperlinks.Count > 0 Then
TableData = TableData & "[["
End If
End If
' Write current cell's text
content = Replace(Selection.Cells(RowCount, ColumnCount).Text, Chr$(10), "<br>")
TableData = TableData & content
If RowCount <> 1 Then
' Write the initial hyperlink tag
If Selection.Cells(RowCount, ColumnCount).Hyperlinks.Count > 0 Then
TableData = TableData & "|" & Selection.Cells(RowCount, ColumnCount).Hyperlinks(1).Address & "]]"
End If
' Write the ending font color tag
If Selection.Cells(RowCount, ColumnCount).Font.Color <> vbBlack Then
TableData = TableData & "@@"
End If
' Set left alignment
If Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlLeft Or _
Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlCenter Then
TableData = TableData & " "
End If
' Write the ending strikethrough tag
If Selection.Cells(RowCount, ColumnCount).Font.Strikethrough = True Then
TableData = TableData & "---"
End If
' Write the ending italic tag
If Selection.Cells(RowCount, ColumnCount).Font.Italic = True Then
TableData = TableData & "//"
End If
' Write the ending bold tag
If Selection.Cells(RowCount, ColumnCount).Font.Bold = True Then
TableData = TableData & "''"
End If
End If
code
' Write the ending table separator
TableData = TableData & "|"
' Check if cell is in last column
If ColumnCount = Selection.Columns.Count Then
' If so then write a blank line
TableData = TableData & Chr$(10)
End If
' Start next iteration of ColumnCount loop
Next ColumnCount
' Start next iteration of RowCount loop
Next RowCount
' Copy data to the clipboard
ClipboardData.SetText TableData
ClipboardData.PutInClipboard
End Sub
Sub ColorToRGB(ByVal Color As String, ByRef r, ByRef g, ByRef b)
On Error GoTo Solution
Dim SStr As String
SStr = "000000" & Hex(Color)
SStr = Right(SStr, 6)
b = Mid(SStr, 1, 2)
g = Mid(SStr, 3, 2)
r = Mid(SStr, 5, 2)
If Len(r) < 2 Then r = "0" & r
If Len(g) < 2 Then g = "0" & g
If Len(b) < 2 Then b = "0" & b
Solution:
If Err.Number <> 0 Then
r = -1
g = -1
b = -1
End If
End Sub
</source>
== See Also ==
* [[How To/Converting Tables from Word to TiddlyWiki]]
{{Quote|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/60ed5591f38a3b65 cmari]|
The key is to put vertical bars (pipe symbols) before and after every
table cell. I've successfully converted Word tables to TW format
using the following not very sophisticated process in Word:
# With the cursor in the table, use the command "Convert table to text"
# When prompted for "separate text with", click "Other" and then enter the pipe symbol (now the cells in each row of the table should be separated by vertical bars).
# Search for the paragraph separator (<code>^p</code>) and replace it with <code>{{!}}^p{{!}}</code> (Now each line should begin and end with the vertical bar)
# Add a <code>{{!}}</code> to the beginning of the very first line and remove the unnecessary <code>{{!}}</code> after the last line.
Copy and paste the table into TW.
}}
{{Quote|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/60ed5591f38a3b65 Ken]|
Another option for tables is:
<pre>
<html>
<p align="center">
<textarea id="xclToTw" rows="10" cols="60"></textarea>
<button onclick="(function() { var ta = document.getElementById('xclToTw'); displayMessage('original: ' + ta.value); ta.value = ta.value.replace(/^|$|\t/gm, '|'); })();">Convert</button>
</p>
</html>
</pre>
Place it in a tiddler and paste the table in, then push the ''Convert'' button.
IE seems to add in an extra line and {{!}} for each row.
Firefox adds in a extra line and {{!}} at the end of the table.
Does not handle anything beyond simple cells.
}}
{{Quote|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/60ed5591f38a3b65 Eric]|
You can also use
http://www.TiddlyTools.com/#QuickEdit_convert
which is part of the QuickEditPackage, and offers conversion back-and-
forth between tab-separated, comma-separated, and/or TW wiki table
formats, depending upon the content of the selected text.
}}
== See Also ==
* [[How To/Converting Excel Spreadsheets to TiddlyWiki Tables]]
Whenever a tiddler tagged 'bug' is opened, it will open with template
EditBugTemplate. Do we have a plug in for this?
http://www.TiddlyTools.com/#TaggedTemplateTweak
Usage:
* Install the TaggedTemplateTweak plugin from TiddlyTools.com
* Create alternative template(s) called:
"SomethingViewTemplate" and/or "SomethingEditTemplate"
* Tag a tiddler with "something" (or "Something")
That's it. As long the tiddler is tagged, it will default to using
the "Something*" templates, when they are present in the document.
Note: if those templates don't exist or you remove the tag from the
tiddler, it will automatically revert to using the standard templates.
Also, to create a new "something" tiddler, preloaded with default
content, you can use the core's <<newTiddler>> macro and avoid all
that custom code...
<<newTiddler
label:"new something"
title:"NewSomething"
text:{{store.getTiddlerText("BlankSomething","")}}
tag:"something"
template:SomethingEditTemplate>>
where:
label = what to display as the command link
title = the title for the new tiddler
text = the intial content (note "computed parameter"
syntax using "{{..getTiddlerText()..}}" for retrieving
the content from the "BlankSomething" tiddler)
tag - the initial tag(s) for the tiddler (must include the "something" tag)
template - the template to use when creating the *new* tiddler
(note: when editing an *existing* tiddler, TaggedTemplateTweak
will automatically determine the correct template to use, based
on the tags assigned to the tiddler, but for *new* tiddlers, you
need to specify which custom template to use)
The only difference between this non-custom solution and your custom
code is that, using the core functionality, you don't pre-enter the
new tiddler title in a separate input field before clicking the "new
something" command. The new tiddler will always be called
"NewSomething"... but you can immediately replace that default as soon
as the tiddler editor appears, simply by typing a new value into the
title input field.
[[Category:How To]]
Prevent a WikiWord from automatically becoming a link by putting a tilde character (~) in front of it. For example, to prevent BMWs and McDonalds from becoming tiddler links, insert the ~ char like this:
Take the ~BMWs to ~McDonalds
== DisableWikiLinksPlugin ==
The [http://www.tiddlytools.com/#DisableWikiLinksPlugin DisableWikiLinksPlugin] gives several options to customize automatic WikiWord linking, such as disabling it completely or only for tiddlers which don't already exist. After importing the plugin, these options must be enabled manually in the DisableWikiLinksPlugin tiddler; it may also be necessary to close and re-open the TiddlyWiki browser page before using the plugin for the first time.
All options are off by default, so settings applied by one user/in one browser will not be active for others. If you want to ensure that your options are in effect for, say, Web viewers, you can create a tiddler, e.g. DisableWikiLinksDefault, with a [[systemConfig]] tag and content like this:
config.options.chkDisableWikiLinks=false;
config.options.chkAllowLinksFromShadowTiddlers=false;
config.options.chkDisableNonExistingWikiLinks=false;
config.options.txtDisableWikiLinksList="DisableWikiLinksList";
config.options.txtDisableWikiLinksTag="excludeWikiWords";
Set the values to the defaults you prefer (e.g. change "false" to "true").
== See Also ==
* [[WikiWords]]
* [[Escaping#Wiki_Markup]]
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
How can I display a variable within a tiddler?
And, how can I prompt user input for a variable.
(I tried the <<options>> macro, but that seems to be
reserved for stuff defined in config.options.)
config.* is a global object created by the TW core to hold most of the
document's internal runtime environment variables. config.options.*
is a sub-object that contains checkbox/text variables that are
accessible via the <<option chkVariableName>> and <<option
txtVariableName>> macro syntax.
This macro provides a quick interface for setting the value of a
checkbox or text variable, but there are other ways as well... using
http://www.TiddlyTools.com/#InlineJavascriptPlugin
you can define constant values like this:
<script>
config.options.txtMyVariable="something";
config.options.chkMyOtherVariable=true;
</script>
and then request a value from the user with the built-in <<option>>
macro:
<<option txtMyVariable>>
<<option chkMyOtherVariable>>
or, if you want to ask the user for the value when they click a link,
InlineJavascriptPlugin also supports an "onclick" syntax:
<script label="click me">
config.options.txtMyVariable
=prompt("enter a value for myVariable","defaultvalue");
</script>
lastly, displaying the variable is as easy as:
<script>
return config.options.txtMyVariable;
</script>
the "return value" from the script is automatically "wikified" (parsed
as wiki syntax), so you can actually use it to construct complex
output based on current values... for example:
<script>
var out="The text is:\n{{{\n";
if (config.options.chkMyOtherVariable)
out += config.options.txtMyVariable
else
out += config.options.txtSomeOtherVariable
out+="\n}}}\n";
return out;
</script>
[[Category:How To]]
Create a tiddler, e.g. [[CountLinks]] that contains the following
script:
<script>
var count=0;
var here=story.findContainingTiddler(place);
var links=here.getElementsByTagName("*");
for (var i=0; i<links.length; i++) {
if (hasClass(links[i],"externalLink")) count++;
}
return "There are "+count+" links in this tiddler";
</script>
Then, simply embed "<<tiddler CountLinks>>" into any tiddler whose
links you want to count. When that tiddler is displayed, the script
scans the rendered DOM elements and counts those with
class="externalLink", and displays the total.
Note that this script can only count links that occur BEFORE it in the
tiddler content, because any links that follow it haven't been
rendered yet! ... Also, if you want to count *internal* links as
well, the class to scan for is "tiddlyLink", e.g., add this line of
code inside the "for" loop, above:
if (hasClass(links[i],"tiddlyLink")) count++;
Note: using <code><script>...</script></code> syntax in a tiddler requires installation of http://www.TiddlyTools.com/#InlineJavascriptPlugin
[[Category:How To]]
Is it possible to have two kinds of tiddlers?
{{Quote|Eric|
Try this:
http://www.TiddlyTools.com/#TaggedTemplateTweak
To use it, create an alternative template called WhateverViewTemplate that includes the desired customizations you want. Then, any tiddlers you tag with "whatever" (or "Whatever") will use the alternative template. The same mechanism can be used to create alternative edit templates (i.e., "WhateverEditTemplate").
For your purposes, you could define InstructionsViewTemplate, and then tag all your text tiddlers with "instructions" to trigger the alternative tiddler display layout.
}}
Here's an overview of the different places that double brackets can
occur, and how they differ:
'''In regular content:'''
(double quotes)TiddlerName(double quotes)is a TiddlyLink. The stuff inside the brackets is
NOT passed through the wikify() parser, and is expected to simply be
the title of a tiddler. The brackets are essential for creating
TiddlyLinks to non-WikiWord tiddler titles or PrettyTiddlyLinks (i.e.,
the "(double quotes)text to show|tiddler name(double quotes)" syntax)
'''In a macro:'''
Although double quotes can be used to surround a tiddler title (e.g., one
that contains spaces) being used as a macro parameter value, their use
in a macro does not necessarily mean that the value inside the
brackets is a TiddlyLink or even a reference to a tiddler title. The
double quotes are simply an alternative method of "quoting" a parameter
value, so it can contain spaces as well as mix of double- and/or
single-quotes, like this:
<<someMacro stuff (double quotes)It's got both kinds of "quotes" in it(double quotes)morestuff>>
'''In a stylesheet:'''
(double quotes)TiddlerName(double quotes) inserts the content from TiddlerName into the
stylesheet (note: in this is specific case, the core DOES 'glue' the CSS
content together before passing it on to the browser, so 'text
subtitution' strategies DO work for stylesheets. For example, double quotes
is used by the shadow stylesheets (e.g., StyleSheetColors) to insert
values from the default ColorPalette definition (another shadow
tiddler), making it easier to change the overall color scheme without
having to edit the CSS directly, simply by editing the RGB values in
the ColorPalette tiddler instead.
'''In a template:'''
Double quotes usually means nothing. Templates use HTML <...> syntax
(plus a few non-standard, TW-parsed, extended HTML attributes, such
as: macro="..." However, one place where double quotes is really useful in
a template is when invoking a macro via:
< span macro="someMacro stuff (double quotes)It's got 'single-quotes' in it(double quotes)morestuff"></span >
or
< span macro='someMacro stuff (double quotes)It's got "double-quotes" in it(double quotes) morestuff'></span >
Because the template syntax uses one set of quoting symbols (either
single- or double-quotes), the double quotes syntax becomes essential for
surrounding parameters that contain spaces and/or quotes (but only one
kind at a time)
and, there you have it.
whew! ... I had fun explaining that... I hope it helps clear up more
confusion than it causes :-)
-e
[[Category:How To]]
{{Quote|forum response on the Mozilla developer site|
Firefox's per-file permissions must be configured in the user preferences, either by a script with privileges to modify user preferences, or through some other means of editing the preferences file which can be found in the user's profile directory in the user.js file. On a *nix-like system this would be a location like the following:
<pre>
/home/username/.mozilla/firefox/xy_randomname.default/user.js
</pre>
On a Windows XP+-based system this would be in the profile directory in <code>c:\Documents and Settings\</code>
As an example, suppose a Web application developer has installed an HTML page on the user's drive at <code>C:/Programs/Webapp/index.html</code>, and that page contains JavaScript which needs to access XPConnect. It would be insecure to grant the UniversalXPConnect privilege to every file on the user's drive. Instead of doing this, the developer could add these lines to the user's preferences:
<pre>
user_pref("capability.principal.tiddlywiki.id", "file:///C|/Programs/Webapp/mytiddlywiki.html");
user_pref("capability.principal.tiddlywiki.granted", "UniversalXPConnect");
</pre>
On a *nix-type system this might be:
<pre>
user_pref("capability.principal.tiddlywiki.id", "file:///home/username/Webapp/mytiddlywiki.html");
user_pref("capability.principal.tiddlywiki.granted", "UniversalXPConnect");
</pre>
These lines will grant XPConnect access to index.html and no other file. The word tiddlywiki above can be replaced with any unique identifier for your application, as long as both lines have the same identifier. To state the syntax a little more generally:
<pre>
user_pref("capability.principal.<group name>.id", "<Space-separated list of absolute URLs.>");
user_pref("capability.principal.<group name>.<granted|denied>", "<privilege name>");
</pre>
where <code><group name></code> is any alphanumeric identifier and <code><privilege name></code> is <code>UniversalXPConnect</code> or any other privilege string representing the extended functionality your script needs. See the Signed Script Policy documentation for more information about privileges.
}}
Seems that there would certainly exist
a simple resource, for plugging your own
custom graphic into a header.
To use an image embedded in the header content, simply add something
like the following in your [[SiteTitle]] or [[SiteSubtitle]]:
[<img[path/filename.jpg]] Title goes here
Note: the "<" in the img syntax means "float left", so that the title
text will appear next to the image, instead of below it.
Alternatively, to use an image as a background for the entire header
area, you could add the following to your [[StyleSheet]]:
.header { background: url("path/filename.jpg"); }
You should also make sure to remove the "gradient" macro from the
header definition in your [[PageTemplate]], so that it doesn't draw
the gradient colors over the image.
Note: the url(...) syntax above will also accept a fully qualified
remote URL (e.g., "http://.../path/filename.jpg"), which creates a
dependency on a server-supplied background. When you are connected to
the net, the backgrounds will appear, but when working "unplugged",
the background will be absent, and the fallback "background-
color:#rgb" CSS values is used instead.
Add "@@display:none;udigrudi@@" to your SiteTitle tiddler. No need to
hack stylesheets for this "one-off tweak". After save-and-reload, the
text will '''show up''' in the '''titlebar''', but will '''not appear''' in the '''TW header''', except when you ''mouse over'' the logo.
Example with logo:
<nowiki>@@display:none;udigrudi@@[img[udigrudi|http://udigrudi.net/imagens/udigrudi-logo.png][http://udigrudi.net/index.html]]</nowiki>
: ''Suggested by'' [[Eric Shulman]] on the TiddlyWiki mailing list:
[[Category:FAQ]]
[[Category:Display FAQ]]
[[Category:Tips & Tricks]]
I assume you mean you want to write a macro that:
A) reads the source content from a given tiddler
B) manipulates that text using javascript
C) writes the text back to the tiddler
Here's a few pointers in the right direction:
A) var tid=store.getTiddler("Tiddlername")
returns the indicated tiddler object from the TW core's data "store".
If the tiddler doesn't exist, the function returns the a null. The
standard tiddler object properties include: title (string), text
(string), modifier (string), modified (date), created (date), tags
(array), fields (object)
B) Once you have the content in a variable (e.g., "txt"), you can use
any variety of javascript string manipulation methods to slice-and-
dice the content. Some of the commonly used functions include:
charAt(), concat(), indexOf(), lastIndexOf(), match(), replace(),
search(), splice(), split(), substr(), substring(), and several
others...
C)
store.saveTiddler(title,newTitle,newText,modifier,modified,tags,fields)
After you have created/modified the content to produce the desired
output text, all that remains is the write it back to the tiddler
using the saveTiddler() function., shown above. If title and newTitle
are the same, the function creates a new tiddler or modifies the
content of an existing tiddler. If newTitle is different, it renames
the existing tiddler to the new title at the same time as it writes
the content
Thus, putting it together:
<script>
var title="MyTiddler";
var txt=""; // an empty string
var tags=[]; // an empty array
var fields={}; // an empty object
var who=config.options.txtUserName; // current username
var when=new Date(); // current timestamp
var tid=store.getTiddler(title);
if (tid) { txt=tid.text; tags=tid.tags; fields=tid.fields; }
txt=txt.replace(/Something/g,"SomethingElse");
store.saveTiddler(title,title,txt,who,when,tags,fields);
</script>
Note: If you want to try this script without having to create a full
macro-defining plugin, you can install
http://www.TiddlyTools.com/#InlineJavascriptPlugin,
and then simply embed the above script in a tiddler. As soon as the tiddler is
rendered, the script will be evaluated, and (double brackets)MyTiddler(double brackets) will be
created/updated. If you prefer to have the script invoked via an
'onclick' link handler, add a label definition to the script
declaration, like this:
<script label="click me!">
... code goes here...
return false;
</script>
(note: make sure you return false from EVERY onclick handler or
Internet Exploder will be very unhappy and tries to leave the TW page
after each click!!)
HTH,
-e
[[Category:How To]]
Here's a summary of the important differences between [[plugins]] and [[scripts]]:
* Plugins are a TW core-supported feature that works "out of the box".
* Scripts need http://www.TiddlyTools.com/#InlineJavascriptPlugin
* Plugins are tiddlers that contain ONLY pure javascript code. Any wiki syntax it contains must be wrapped inside a javascript comment block.
* Scripts are regular tiddlers that can contain a mix of wiki syntax PLUS javascript code, embedded "inline", in between <script>...</script> markers.
* Plugins are tagged with "systemConfig", which tells TW to run them ONCE, when the document is first loaded into the browser.
* Scripts are performed each time the tiddler in which they are embedded is rendered.
* Plugins typically install macro definitions or other 'handler functions' that are then triggered later on as a result of other activities.
* Scripts are typically used to generate and return wiki syntax that is automatically rendered to insert dynamic content into the tiddler display.
* Scripts can also make small 'on-the-'fly' adjustments to the attributes of rendered elements contained within the same tiddler using 'relative DOM references' (e.g., place.lastChild, place.parentNode, etc.)
* Scripts can also be used to create link handlers that are invoked "onclick" to trigger javascript functions in response to user actions.
HTH,
-e
[[Category:How To]]
{{Quote|Eric|
The current TiddlyWiki username value is stored internally in javascript as config.options.txtUserName.
To display/modify the value using an edit field embedded in tiddler content, you can use the core's built-in <<option>> macro, like this:
<pre><<option txtUserName>></pre>
However, to display the value directly as inline tiddler content (e.g. as part of the SiteTitle or SiteSubtitle), using http://www.TiddlyTools.com/#WikifyPlugin you can write:
<pre><<wikify "%0" {{config.options.txtUserName}}>></pre>
or use the InlineJavascriptPlugin to write:
<pre><script>return config.options.txtUserName</script></pre>
}}
Specifically, I'd like this for the DefaultTiddlers, so that the initial display resembles a Table of Contents.
{{Quote|Eric|
The ability to fold/unfold tiddlers is provided by
http://www.TiddlyTools.com/#CollapseTiddlersPlugin
This plugin includes a macro:
<<foldFirst>>
Just put this macro into any tiddler and it will start out folded each time it is opened.
If you want this behavior for *every* tiddler, add the following to your ViewTemplate:
<nowiki><span macro="foldFirst"></span></nowiki>
or, if you want this behavior only for certain selected tiddlers, you could use
http://www.TiddlyTools.com/#TaggedTemplateTweak
and create an alternative ViewTemplate (e.g., "FoldedViewTemplate") containing the above syntax and then simply tag the desired tiddlers with "folded".
}}
How do you create indented text under each list item?
If I understand you correctly, you want multi-line contents in a list.
That's a known limitation of our current wiki syntax.
However, there are workarounds:
http://www.tiddlywiki.org/wiki/Line_Breaks
Here's a workaround/solution that will let you format multi-line,
nested bullet items, ***without having to use "<br>" in your bullet
item content**
HERE'S THE TRICK:
Surround the multi-line bullet content in a "CSS class wrapper", like
this:
*bullet1
*{{someclass{bullet 2
extra
lines
go here
}}}
*bullet3
Because of the way the wikify parser handles the {{class{...}}}
syntax, the newlines contained *inside* the class wrapper are not seen
as ending the bullet item, and the current bullet indent level is used
on each line. You can even put entire bullet lists INSIDE a single
class-wrapped bullet item, and they will be indented as well
Try pasting this into a tiddler:
Does this work?
*hmmm
*{{multiline{foo
bar
mumble
baz
}}}
**{{multiline{frotz
gronk
snork}}}
*snerfle
**plurmb
***yabba
**dabba
*doo
yes, it works!
Note: to create the wrappers around the multi-line bullet content in
the example above, I've used the custom CSS classname, "multiline" ...
this classname is not usually defined in your TW document, and in
fact, does NOT have to be: you can use *any* arbitrary classname you
want to create the wrappers around the bullet content... even an
undefined classname, e.g., "{{foobar{...}}}", will work.
[[Category:How To]]
When I attempt this plugin install fromhttp://tiddlyspot.com/twhelp. I paste the url into the appropriate
place in importTiddlers and click 'fetch' I get an error message that
says: The page at http://viz.tiddlyspot.com says, Error in send
Permission denied to call method XMLHttpRequest.open
Ah hah!... A BIG clue: "http://viz.tiddlyspot.com"...
This means that you are viewing your document online.
Unfortunately, due to "cross-domain scripting security" (XSS)
restrictions, one online document is not allows to read the contents
of another document if that document is hosted on a *different*
domain. Thus, you can't import tiddler into "viz.tiddlyspot.com" from
a document hosted on "twhelp.tiddlyspot.com" (a.k.a., "tiddlyspot.com/
twhelp").
Fortunately, there IS a workaround: TiddlySpot provides a "proxy"
script that can make remote URLs *appear* to be on the same TiddlySpot
domain as your own document, thus allowing you to import. You need to
use a slightly different URL when importing through the proxy
script... check the TiddlySpot FAQ for more info on that...
An even more fundamental security issue:
an *online* document is not allowed to read from the *local* filesystem.
In nearly all cases, such kinds of activity are a Really Bad Thing.
Even so, it MAY be possible to enable remote-to-local access, by
configuring your browser's internal permissions. The method for doing
this (and the ability itself) varies from browser to browser... see
http://www.TiddlyTools.com/#FAQ_BrowserSecurity
for a little bit of technical info for configuring javascript security
in FireFox.
My next thought was to copy and paste the tiddler source for a
tagcloud plugin including the title and tag but when I click 'close' I
see this: Error in macro << tagCloud >> I saved it to web and closed the
file.
That's normal. As you've already noted, a plugin is a tiddler tagged
with "systemConfig". This indicates that the tiddler contains
javascript code that will be invoked each time you load your document
into the browser (i.e., "document startup"). Of course, you have to
save the file with the newly imported plugin tiddler before you can
reload it...
When I reopen my tiddlywiki file I have errors
It could be a result of using copy/paste
to add a plugin -- a process which is typically used as a last resort
(which is why you were trying it!), and is NOT recommended for
everyday use because it is notoriously prone to 'operator error'
resulting in corrupted tiddler content that doesn't work.
Even so, if you DO use the copy/paste process to install a plugin,
make sure you copy the *source* of the plugin tiddler, not the *rendered content* (as displayed in 'view mode'). You should edit the tiddler to see the source, and then copy the *entire* contents of the tiddler's body text. Of course, after pasting this text into a new tiddler in your document, don't forget to tag that tiddler with "systemConfig", and then save-and-reload for the plugin to take effect.
SUGGESTION:
The easiest way to get importing to work properly is to open your document from your local filesystem (i.e., with "file://" in the URL). You should then be able to import from ANY remote system, or from locally-stored files, and then save-and-reload those changes *locally* to test. When you are satisfied with the result, then you can *upload* the revised document to your online TiddlySpot-hosted account.
HTH,
-e
[[Category:How To]]
{{Quote|Eric (2007-09-24)|
This is supported by the core <<newTiddler>> macro, using a 'computed value' parameter to specify the initial text:
<pre>
<<newTiddler text:{{store.getTiddlerText("DefaultContent","")}}>>
</pre>
where "DefaultContent" is a tiddler containing the initial text to use.
}}
Also see [[Preloading]]
[[Category:How To]]
== Problem ==
When you type a bunch of spaces into your TiddlyWiki, they look ok until you save and reload. Then any run of multiple spaces have been replaced with an single space. This also affects tab characters so it's especially nasty for plugins and code snippets. All your indenting gets trashed.
== Solution ==
This only happens in Microsoft Internet Explorer. When IE stores tiddlers it replaces a set of spaces with a single space. There is no simple solution apart from switching to a different browser, such as Mozilla Firefox.
Also I believe the problem is fixed in 2.2 (currently in beta).
== Guess Again ==
It happens in Firefox 2, TiddlyWiki 2.4.0.
And In FireFox 3. Hopefully there's a better solution than using &nbsp;
<div style="margin: 1em; padding: 1em; background-color: #EEE">
'''temporary note'''
Using [[TiddlyWiki Markup#Preformatted|preformatted blocks]] should solve this issue.
However, even without those, it seems to work fine with TiddlyWiki v2.4.1 and both Firefox 3 and IE7 on Windows Vista.
-- [[User:FND|FND]] 07:00, 28 August 2008 (UTC)
----
I just upgraded to 2.4.1 and spaces are not preserved for me. I run TiddlyWiki in Firefox 3 on Vista
-- 16:33, 18 December 2008 (UTC)
----
Please discuss this on the groups: {{Support}}
</div>
[[Category:FAQ]]
[[Category:Troubleshooting]]
Image hosting sites offer a handful of pre-set sizes (eg thumbnail, small, large). If none suit, here's one method for resizing images within TiddlyWiki.
If using a URL, wrap it in HTML tags and insert '''style="width: 70px; "''' or '''style="height: 146px; "''' (altering the px to desired size) before '''/></html>''' like this:
<pre>
<html><img src="url of image" style="width: 70px; "/></html>
</pre>
If using HTML code from a hosting site, insert '''style="width: 70px; "''' before /></a></html> like this:
<pre>
<html><a href="link" style="width: 70px;" /></a></html>
</pre>
You can also use [http://www.tiddlytools.com#ImageSizePlugin ImageSizePlugin] from [[TiddlyTools]] to resize images without using HTML.
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
{{Review|section}}
Here are instructions to "gradually refine" a TiddlyWiki for public view.
(Note: this is a collection of fragments from the discussion groups. Whatever is correct is mostly attributed to Mr.Shulman.)
Notice that the following only provides VERY weak protection against user who ''intentionally'' wish to go "behind the scenes".
== Read only ==
To make the TW, read only (i.e changing tiddler toolbar "edit" command into "view") and without backstage access, create a new tiddler named, for instance, zzTweak and tag it with systemConfig. Enter the following contents:
<pre>
if(config.options.txtUserName != "adminname") {
readOnly = true;
showBackstage = false;
}
</pre>
...and change adminname into desired name. This is the username that is filled in under the options menu.
The systemConfig tag makes the tiddler load automatically in the background upon loading the TiddlyWiki. The the zz (in zzTweak) ensures that it is loaded "last" so to override any previous commands.
'''Note''': To edit something hereafter, including adding the following instructions here, you will have fill in the appropriate user name, so to turn off readOnly.
The set user name is stored locally, conveniently allowing admin stay in "admin/edit-mode" without fear of public visitors meanwhile accidentally browsing into this view.
== Hide right side bar ==
To be able to hide the right hand side bar for visitors, first import:
* http://www.TiddlyTools.com/#InlineJavascriptPlugin
* http://www.TiddlyTools.com/#ToggleRightSidebar
You will now make this sidebar hidden by default, but before doing this you must ensure that you can access it if you wish. To do this you add a discrete element containing the toggle macro from the ToggleRightSidebar that will be accessible via the public page but unlikely that a visitor will click. For example you can;
Open SiteSubtitle (under More>Shadowed) and change its contents to:
* a reusable non-linear personal web notebook<<tiddler ToggleRightSidebar with: ".">>
I.e this adds a dot to the end of the sentence and clicking this will toggle the sidebar on or off.
Now, to have the side bar toggled off by default for visitors, add the following command to zzTweak, just above the readOnly line
* config.options.chkShowRightSidebar=false;
== Different toolbar for web users ==
- including possibility to turn off double-click-to-edit;
See [[How do I have a different tiddler toolbar for web users?]]
== Showing one tiddler at a time ==
To show only one tiddler at a time (like on normal web pages), but not to you as admin, import SinglePageModePlugin:
* http://www.TiddlyTools.com/#SinglePageModePlugin
...and in zzTweaks, above the readOnly command, insert;
* config.options.chkSinglePageMode= true;
== Minor tweaks ==
'''For smooth "quick admin"''' (i.e access to access to UserName etc), consider adding some commands in the top of the sidebar (the tiddle SideBarOptions). I.e create a tiddler (QuickAdmin) with the following:
<<option txtUserName>>
<<upload http://yoursite.tiddlyspot.com/store.cgi index.html . . yoursite>>
<nowiki>[[zzTweak]]</nowiki>
(Note: the above example assumes you're using a tiddlyspot account)
...and insert <<tiddler QuickAdmin>> into the top of SideBarOptions
1. Is there a plugin or method that lists new tiddlers or tiddlers
that have changed since a certain date (the last time).
http://www.TiddlyTools.com/#RecentChangesPlugin
2. More generally, is there a way of synchronizing TW files, say by
using a certain set of tags to (systemConfig, plugin, etc.) identify
tiddlers to include and/or exclude and then using their modification
dates to decide which one goes where? More complex synchronization
schemes, such as in Microsoft's free SyncToy, would be nice too.
Try these:
* http://www.TiddlyTools.com/#ImportTiddlersPlugin
* http://www.TiddlyTools.com/#LoadTiddlersPlugin
* http://www.TiddlyTools.com/#ExportTiddlersPlugin
* http://www.TiddlyTools.com/#NewDocumentPlugin
These might also be handy for managing tiddlers across multiple
documents:
* http://www.TiddlyTools.com/#TemporaryTiddlersPlugin
* http://www.TiddlyTools.com/#CompareTiddlersPlugin
* http://www.TiddlyTools.com/#RelatedTiddlersPlugin
and, if you are working with tiddlers stored as external text files,
these are helpful as well:
* http://www.TiddlyTools.com/#FileDropPlugin
* http://www.TiddlyTools.com/#FileDropPluginConfig
* http://www.TiddlyTools.com/#SaveTiddlerToFile (*)
(*) note: requires http://www.TiddlyTools.com/#InlineJavascriptPlugin
[[Category:How To]]
The most unambiguous syntax for defining a [[slice]] is to use table notation:
<pre>
| name | value |
| name | value |
...
</pre>
Some limited use of wiki markup (<code>''bold''</code> and <code>//italics//</code>) surrounding the slice name, as well as trailing colons, are permitted to improve readability:
<pre>
| name: | value |
| ''name:'' | value |
| //name:// | value |
</pre>
Slice values can be embedded in other tiddlers by using the [[Tiddler (macro)|tiddler]] macro:
<code><<tiddler "SourceTiddler::sliceName">></code>
[[Category:How To]]
''As posted to the mailling list by John Scully''
As for Q #2, you can add the following to your StyleSheet tiddly:
.viewer td { vertical-align: bottom; }
Or
.viewer td { vertical-align: top; }
If all the cells are the same height (ie.e no wrap-around text), you
can also add the following to help show the effect:
.viewer td { vertical-align: top; height: 3em; }
Otherwise, there doesn't seem to be any other applicable tweaks,
related to vertical justification (e.g. adding a class to specific
table cells).
[[TiddlyWiki FAQ|<< Back to FAQ list]]
[[Category:FAQ]]
[[Category:Configuration]]
#REDIRECT [[Help talk:Support Desk#How can I avoid all text being selected when I edit a tiddler?]]
Edit the ViewTemplate tiddler.
[[Category:FAQ]]
[[Category:Configuration]]
Edit the EditTemplate tiddler.
[[Category:FAQ]]
[[Category:Configuration]]
See [[Changing default options]].
[[Category:FAQ]]
[[Category:Configuration]]
Add stuff to your StyleSheet tiddler. Also take a look at http://tiddlythemes.com/
(to be expanded)..
[[Category:FAQ]]
[[Category:Configuration]]
Edit the tiddler called SideBarOptions. (You can find it under the Shadowed tab under the More tab). Change the date format in the [[NewJournal (macro)|NewJournal macro]]. For example:
<<newJournal 'YYYY-MM-DD'>>
[[Category:FAQ]] [[Category:Configuration]]
See also [[DateFormats]]
Edit your PageTemplate tiddler. Also see http://tiddlythemes.com/
(to be expanded)
[[Category:FAQ]]
[[Category:Configuration]]
* install hideWhen from http://mptw.tiddlyspot.com/#HideWhenPlugin
* in your ViewTemplate do something like this:
...
...
<div macro="showWhen readOnly">
<!-- cut-down toolbar for web users -->
<div macro='toolbar closeTiddler permalink'></div>
</div>
<div macro="hideWhen readOnly">
<!-- regular toolbar for me -->
<div macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler permalink references jump'></div>
</div>
...
[[Category:FAQ]]
[[Category:Configuration]]
To set the default text alignment for all tiddlers, put something like this into your [[StyleSheet tiddler]]:
.viewer {
text-align: justify;
}
that CSS rule will fully justify your tiddler text.
[[Category:FAQ]]
[[Category:Configuration]]
Add the following to any tiddler:
<<version>>
The [[Version (macro)|version macro]] will show you the version number of your TiddlyWiki document.
If you're feeling adventurous, you could also look at the source code of
your document; near the top, there will be a section looking like this:
major: 2, minor: 2, revision: 6, date: new Date("Oct 18, 2007")
In this case, that would be v2.2.6.
[[Category:FAQ]][[Category:Using TiddlyWiki]]
To link to a tiddler named 'Meeting with Alice', you'd type <code><nowiki>[[Meeting with Alice]]</nowiki></code>.
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
''From a post by Daniel on the mailing list''
I'd do it this way.
First, set up a CSS rule to do the justification. Add something like
this to your StyleSheet tiddler (find it on tab More => Shadowed):
.justifyright {
text-align: right;
}
that gives you a css class of justifyright that you can use to make
stuff be right-aligned. Make sure you get the dot at the start of
".justifyright".
Now, edit some tiddler and put the stuff you want to justify inside
triple-curly-brackets, with the CSS class after the first two. You
will need to put the brackets on lines by themselves.
{{justifyright{
This paragraph will be right-aligned.
}}}
If you want full justification, add a CSS rule like this, and then use
"justifyfull" inside the triple curlies:
.justifyfull {
text-align: justify;
}
Note that '''this won't work''' if you use the triple curlies inline:
{{justifyright{ DOESN'T WORK: This is not right justified }}}
This is because triple curlies make spans if you use them inline
<nowiki>{{{like this}}}</nowiki>, but divs if you use them on lines by themselves.
[[TiddlyWiki FAQ|<< Back to FAQ list]]
[[Category:FAQ]]
[[Category:Configuration]]
{{Review}}
{{Incomplete}}
== Request ==
I'm starting to use the ability to view txt files in an iframe a lot
lately, and it just occurred to me that it would be nice to wikify
that text.
Also, if this were to work and there was a WikiWord in the txt file,
would clicking on it open that tiddler, or would
this likely be a"viewing only" thing.
== Explanation ==
The content in an iframe is a *separate document*... the same as if it
was displayed in a different browser tab or window. In order to
wikify the iframe content, you would really need to have an entire TW
loaded into the iframe, so that the parser, stylesheets, etc. would be
available to render the content of that separate document.
However, there ARE several ways to create a tiddler in your current
document using content from a local text file... and, of course, once
the text is stored in a regular tiddler it will then be rendered as
full wiki-formatted content.
== Solutions ==
Here's a few possible approaches:
=== Copy/Paste ===
Open the file in a text editor, copy the content, open your TW document, create a tiddler, paste the content.
=== QuickEditToolbar ===
http://www.TiddlyTools.com/#QuickEditToolbar
create a tiddler, activate the toolbar (if not already visible). The
"tiddler" button gives you a system-specific "select a file" dialog,
and then automatically inserts the file content into the tiddler
editor's text area input field.
=== FileDropPlugin ===
http://www.TiddlyTools.com/#FileDropPlugin
automatically creates a new tiddler when you drag-and-drop a text file
into the browser window of an open TW document.
You can also install
http://www.TiddlyTools.com/#FileDropPluginConfig
which adds extended handling for dropping folders (creates multiple
tiddlers OR a single tiddler with links to the files) as well as the
ability to create binary attachments when
http://www.TiddlyTools.com/#AttachFilePlugin
http://www.TiddlyTools.com/#AttachFilePluginFormatters
has also been installed.
In any case, once the content IS in your document, it can then be
viewed just like any other tiddler: bullet items, TiddlyLinks, etc,
will all be rendered as you might expect...
=== Pseudo-iframe Modification ===
Of course, you can also edit the newly created tiddler... for
example, if you want to use a fixed-height scrolling area (similar to
the iframe display), you can embed the following inline script to the
newly created tiddler:
<script>
place.style.height="15em";
place.style.overflow="auto";
</script>
(note: requires http://www.TiddlyTools.com/#InlineJavascriptPlugin)
== Suggestions ==
=== TemporaryTiddlersPlugin ===
Lastly, if you only intend to *view* the newly created tiddlers
without saving them in your document, you can use
http://www.TiddlyTools.com/#TemporaryTiddlersPlugin
and tag them with "temporary", which will cause those tiddlers to be
automatically skipped over whenever you press the "save changes"
command. Note that this action does NOT actually delete the temporary
tiddlers from the currently opened document... it merely prevents
those tiddlers from being written to the file so that when you reload
the document the temporary tiddlers will simply no longer be present.
[[Category: How To]]
== SimpleFooter ==
* http://fnd.lewcid.org/tmp/SimpleFooter.html
=== Caveats ===
* footer is not forced to the bottom of the [http://en.wikipedia.org/wiki/Viewport viewport] - i.e. if the browser window is taller than the page contents, the footer will not be positioned at the very bottom of the window
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/bf4cf4ee32ba196e Ian]|2=
I know this topic has been discussed in the past, I'm just summarizing
my limited experiences for anyone interested, or with comments on how
they have handled this task. My wife volunteers to maintain a very
simple non profit web site (header an footer, and a handful of content
pages that change frequently), and my initial solution was to give her
my favorite text editor, but after viewing some of her struggles I
thought wiki syntax (or possibly inclusion of one of the several
wysiwyg plugins) would be a more productive path for her.
I'll note, one of the difficulties (an benefits) of Tiddlywiki is the
number of plugins with overlap, it requires some time from the user to
investigate what is the optimal solution for their problem. My
understanding is that there are three plugins suitable for html
publication:
1. http://www.tiddlytools.com/#SnapshotPluginInfo
This is a nice plugin, an it comes with a print command too, but the
html it produced was not ideal for my needs, and it did not appear to
be easily templated.
* also, does not have ability to export based on tag, but this could easily be added - it uses the story function to export all open tiddlers though - which may be preferential for some use cases
* there is more control over what is exported from the tiddlywiki with this plugin (based on DOM id, etc.), but all I need is the tiddler content, and maybe the title of the tiddler as the page name, and this is already handled nicely by the PublishMacro - this plugin requests a filename each time you save too which seems bothersome and prone to errors when maintaining the url space between the different pages (e.g. what did I call the link to this page again?), compared to the default (TiddlerTitle) used by the PublishMacro
2. http://jackparke.googlepages.com/jtw.html#PublishMacro
This is my current choice, since it has easy to modify templates. She
can publish all the pages based on tag, or an individual page.
3. http://www.tiddlywiki.org/wiki/TiddlyTemplating
This seems to be the most flexible, and I certainly like the idea of
publishing to multiple formats as this is a goal I have for another
project I am interested to apply Tiddlywiki. However, it did not pass
the ten minute test, there are several plugins associated with this
package and I did not invest the time to get my hands around
everything happening. I did look at the iwab demo (I believe this is
the only html example), but again the other two plugins seemed simpler
to get me where I needed to be.
okay, I do not believe any are what most people are looking for when
maintaining a simple static site - e.g. both plugins handle
TiddlyLinks in a less than optimal way, but the PublishMacro is still
the better of the two, but if you have a wiki word (camelcase) in your
content it will assume there is a link there an write an href in the
html
to illustrate the differences, here is the simple test case I ran,
using the default plugin setup, keeping in mind the PublishMacro has
templates that seem very easy to modify (although I haven't tried
yet):
{{Tiddler|1=qwert|2=
foo
PublisherTest1
PublisherTest2
PublisherTest3 [this tiddler does not actually exist]
}}
'''PublishMacro Output'''
<pre>
<html>
<head>
<title> - qwert</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<meta name="keywords" content=""/>
</head>
<body>
<h1></h1>
<h2>qwert</h2>
foo<br><br><a class="externalLink"
href="publishertest1.html">PublisherTest1</a><br><a
class="externalLink" href="publishertest2.html">PublisherTest2</
a><br><a class="externalLink"
href="publishertest3.html">PublisherTest3</a>
<hr>Tags:
<hr>IanW, Sunday, June 22, 2008 8:27:30 PM (created Sunday, June
22, 2008 8:17:26 PM)
</body>
</html>
</pre>
'''SnapshotPlugin Output'''
<pre>
<html><head>
</head><body>
<div class='tiddler viewer'>foo<br><br><a tiddlylink="PublisherTest1"
refresh="link" class="tiddlyLink tiddlyLinkExisting"
title="PublisherTest1 - IanW, Monday, June 16, 2008 2:58:00 PM"
href="javascript:;">PublisherTest1</a><br><a
tiddlylink="PublisherTest2" refresh="link" class="tiddlyLink
tiddlyLinkExisting" title="PublisherTest2 - IanW, Sunday, June 22,
2008 7:58:00 PM" href="javascript:;">PublisherTest2</a><br><a
tiddlylink="PublisherTest3" refresh="link" class="tiddlyLink
tiddlyLinkNonExisting" title="The tiddler 'PublisherTest3' doesn't yet
exist" href="javascript:;">PublisherTest3</a></div>
</body>
</html>
</pre>
Hopefully a listing of my brief experience is helpful to someone else.
Of course, I'm also curious to here anyone's comments or solutions
they applied, since it seems like a common use case.
Since this is my first post, I also want to thank everyone for a
useful piece of software. Like many people, I see Tiddlywiki as a nice
client api, that has potential to become much more.
}}
Here's a summary of the important differences between 'plugins' and
'scripts':
* Plugins are a TW core-supported feature that works "out of the box".
* Scripts need http://www.TiddlyTools.com/#InlineJavascriptPlugin
* Plugins are tiddlers that contain ONLY pure javascript code. Any
wiki syntax it contains must be wrapped inside a javascript comment
block.
* Scripts are regular tiddlers that can contain a mix of wiki syntax
PLUS javascript code, embedded "inline", in between <script>...</
script> markers.
* Plugins are tagged with "systemConfig", which tells TW to run them
ONCE, when the document is first loaded into the browser.
* Scripts are performed each time the tiddler in which they are
embedded is rendered.
* Plugins typically install macro definitions or other 'handler
functions' that are then triggered later on as a result of other
activities.
* Scripts are typically used to generate and return wiki syntax that
is automatically rendered to insert dynamic content into the tiddler
display.
* Scripts can also make small 'on-the-'fly' adjustments to the
attributes of rendered elements contained within the same tiddler
using 'relative DOM references' (e.g., place.lastChild,
place.parentNode, etc.)
* Scripts can also be used to create link handlers that are invoked
"onclick" to trigger javascript functions in response to user actions.
HTH,
-e
[[Category:How To]]
==Monochrome Theme Introduction==
The [http://tiddlythemes.com/#Monochrome Monochrome Theme] provides a "simple but bold!" interface for TiddlyWikis. The majority of the theme is in contrasting shades of gray. The theme is well made and considers most visual features encountered within a TiddlyWiki. Unfortunately, the theme does not encompass ''all'' the features within a TiddlyWiki.
==Monochrome Modifications==
===TabMacro Support===
An example is that the Monochrome theme lacks support for tabs within tiddlers, or the [http://www.tiddlywiki.com/#TabMacro TabMacro]. The colors within the tabs are hardly changed and still retain their original blue hue. To fix this problem add
<pre>
/*Tab support*/
.tabContents, .tabSelected { color: #ccc;
background: #3B3B3B; border:1px solid #3B3B3B; }
.tabUnselected {
color: #777; border:1px solid #3B3B3B;
background: #454545;
}
</pre>
within the [[StyleSheet]] of the Monochrome theme.
===Index Button Support===
Currently, [http://www.tiddlywiki.com/ TiddlyWiki] has a mod to the [[PageTemplate]] that changes the [[SideBarTabs]] to be accessible through a slider button labeled "Index". However, implemented in the Monochrome theme, the formatting of the button is completely off. By adding
<pre>
/*More sidebar options*/
#sidebarTabs .tab {
font-size:90%; -moz-border-radius-topleft:.5em; -moz-border-radius-topright:.5em;}
#sidebarTabs .tabContents .tabContents{
font-family: arial,helvectica; background:#454545;border:0px solid #666; border-right:1px solid #454545;}
#sidebarTabs .button{color:#666; border:none; margin:0em 0.2em;
padding:0.2em 0.3em;
display:block;}
#sidebarTabs .button:active, #sidebarTabs .button:hover{border:none; background:#3B3B3B; color:#ccc;}
</pre>
to the [[StyleSheet]], you not only eliminate the formatting problem, but also align the button to the other [[SideBarOptions]] buttons.
===Heading Coloration===
The headers within tiddlers tend to blend into the background. To fix this issue, replace
<pre>
h1,h2,h3,h4,h5 { color: #9c9c9c; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
</pre>
with
<pre>
h1,h2,h3,h4,h5 { color: #7C7C7C; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
</pre>
in the [[StyleSheet]] of the Monochrome theme.
===MainMenu Coloration===
Links to any tiddlers within the [[MainMenu]] tend to blend within the background of the page thereby being barely visible. To fix this issue, replace
<pre>
#topMenu a, #topMenu .tiddlyLink, #topMenu .button {margin:0em; color:#666; padding:15px 15px 10px 15px;padding-top:1.6em;border:none; border-right: 1px solid #666;float:left;}
</pre>
with
<pre>
#topMenu a, #topMenu .tiddlyLink, #topMenu .button {margin:0em; color:#CCC; padding:15px 15px 10px 15px;padding-top:1.6em;border:none; border-right: 1px solid #666;float:left;}
</pre>
in the [[StyleSheet]] of the Monochrome theme.
[[Category:How To]]
== Moving the Sidebar Below the Main Menu ==
Using [http://cleanlayout.tiddlyspot.com clean layout] and a wrapping container for [[Main Menu]] and [[Sidebar]]:
=== PageTemplate ===
{{Tiddler|1=PageTemplate|2=
<nowiki>
<!--{{{-->
<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>
<div id='nav'>
<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>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
</nowiki>
}}
=== StyleSheet ===
{{Tiddler|1=StyleSheet|2=
<nowiki>
/***
!Clean Layout
***/
/*{{{*/
#mainMenu {
position: static;
float: left;
width: auto;
padding: 1.5em 0.5em 0.5em 0.5em;
font-size:1.1em;
line-height: 1.6em;
text-align: right;
}
#sidebar {
position: static;
float: right;
margin-right: 3px;
width: 16em;
font-size: 0.9em;
}
#displayArea {
overflow: hidden;
margin: 1em 1em 0;
}
/* Internet Explorer fixes */
/* hasLayout */
#displayArea {
display: inline-block;
}
#displayArea {
display: block;
}
/*}}}*/
/***
!Custom Styling
***/
/*{{{*/
#nav {
float: left;
}
#mainMenu,
#sidebar {
float: none;
}
/*}}}*/
</nowiki>
}}
cf. [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/800c93584acb895f <nowiki>[tw]</nowiki> Alternative to FootnotesPlugin]
== Example ==
[http://tw.lewcid.org/#FootnotesPlugin FootnotesPlugin]
<source lang="JavaScript">
//{{{
FootnotesPluginTweak = {
replaceFormatters: function() {
for(var i = 0; i < config.formatters.length; i++) {
var obj = config.formatters[i];
if(obj.name == "footnotes") {
obj.match = "```";
obj.lookaheadRegExp = /```((?:.|\n)*?)```/g;
break;
}
}
}
};
FootnotesPluginTweak.replaceFormatters();
//}}}
</source>
The following information is offered by UnaMesa associates in response to questions regarding the creation of TiddlyWikis.
== Tiddler button ==
'''Adding a new tiddler button which uses an identified tiddler as the initial contents of the tiddler'''
This is supported by the core <<newTiddler>> macro, using a 'computed
value' parameter to specify the initial text:
<<newTiddler text:{{store.getTiddlerText("DefaultContent","")}}>> where [[DefaultContent]] is a tiddler containing the initial text to use.
''(Eric 9/24/07)''
{{Quote|Eric|
FireBug's console interferes with the browser's handling of
XMLHttpRequest functions. The problem is generally triggered by
selecting "Show XMLHttpRequests" from the FireBug Console "Options"
menu (open FireBug to access the menu).
In the previous version of FireBug, disabling this menu option avoided
the problem. However, in the latest FireBug installation (v1.0.1), it
seems that isn't enough, and the problem can appear even if the
"Show..." menu it unchecked.
One workaround is to completely disable FireBug until needed (via
FireFox's Tools>Addons menu item). Another workaround that
temporarily fixes the problem is to TOGGLE (i.e., set and then clear)
the "Show XMLHttpRequests" menu item just before doing the upload.
This seems to stop FireBug from interferring in the NEXT
XMLHttpRequest. Curiously, even though the menu item remains
unchecked, any subsequent XMLHttpRequests will again fail until you
toggle the menu again, which is quite annoying!
Forget those workarounds...
I think I've found a workaround that let's you keep FireBug enabled,
and doesn't need a menu toggle each time:
In FireBug, first switch to the "Net" tab. Then, in the Options menu
for Net, select "Disable Network Monitoring". This seems to stop the
problem from recurring each time you upload.... YAY!!!!
}}
[[Category:FAQ]]
[[Category:Troubleshooting]]
This message is displayed by Firefox whenever some javascript is taking a long time to run. It can happen with a TiddlyWiki file if you have a lot of tiddlers or are using some plugins that do some extra work that takes a long time. You can get rid of the messages by making Firefox's maximum script run time a little longer. Here's how it's done:
* Type about:config in the address bar and press enter.
* Scroll down until you see dom.max_script_run_time
* Double click it and type in 20 seconds (the default is 5 seconds)
[[Category:FAQ]]
[[Category:Troubleshooting]]
{{Plugin
|Name=IFramePlugin
|Author=[[User:JayFresh{{!}}jayfresh]]
|Description=Provides cross-browser methods for working with iframes
|Version=1
}}
* '''Status:''' Experimental
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/plugins/IFramePlugin.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
Installing the IFramePlugin allows you to work with iframes in your TiddlyWiki across different browsers. It provides you with the following constructor:
* IFrame
and the following method for an IFrame instance
* modify
== IFrame constructor ==
=== Usage ===
var ifr = new IFrame(parentElem);
where "parentElem" is an optional DOM element to add the iframe as a child to; parentElem defaults to document.body.
This adds an iframe to the page body and sets a doc property to allow DOM operations such as:
ifr.doc.documentElement.innerHTML = "...";
ifr.doc.documentElement.getElementsByTagName("body")[0].appendChild(textNode);
'''NB:''' appending the iframe to document.body leaves the iframe without a provided way to close it
== modify ==
=== Usage ===
ifr.modify(html);
where html is a text string to become the content of the iframe.
=== Description ===
This method replaces the content of the iframe with the suppled string. The function was created to expect a full HTML page, and currently only outputs that which is contained in <HEAD> or <BODY> tags.
==iTW Beta by Bidix==
BidiX has a iPhone optimized version of TiddlyWiki available here: http://itw.bidix.info/
==TW on iPhone using a data url bookmark==
I believe it's possible if you sync the bookmark from safari via iTunes. But you can't save. (Though save to url should be possible. Anyone thought about this?)
==Saving using virtual disk==
It is possible to store TiddlyWiki documents on a [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/35d17fdd24c43391 virtual disk] on the iPhone or iPod Touch.
==Notes from Jeremy==
{{Quote
|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/e7aa4c89cbb8c84f/3f79cea1ca1b52a7?#3f79cea1ca1b52a7 Jeremy]
|
I've had the chance to play with TiddlyWiki on an iPhone. It works as a pretty perfect clone of the desktop Safari experience, with iPhone pinch-zoom goodness to make it navigable on the tiny display. The problems are:
* it takes ages to load; over EDGE it's excruciating, but even over wifi you have to be pretty patient
* even once it's loaded, JavaScript intensive actions can be painfully slow. For example, clicking on a tiddler link can take more than a second to open the target tiddler
* it doesn't seem possible to load the TW file from a file:// URL; therefore there is no obvious avenue to explore for saving changes locally
* the desktop UI although usable doesn't really work well on the tiny screen; built in iPhone apps like Mail show a more iPhone-native way of accomplishing some of the same things
The planned stripping back of the core code should improve the performance situation. It's possible that a solution to the saving problem will come in the form of a native iPhone app that wraps WebKit to provide a custom host for TiddlyWiki.
In the short term, I've started investigating a plugin to attack the last problem, optimising the TiddlyWiki UI for the iPhone. (Inspired by http://www.joehewitt.com/iui/)
Cheers
Jeremy
}}
==Notes from Phil==
{{Quote
|[http://philhaigh.blogspot.com Phil]
|
Jeremy mentions that it isn't possible to load the TW file from a file:// URL. This is because the iPhone (and iPod Touch) do not have a 'publicly accessible' file system and therefore the browser does not support the file:// protocol on these platforms.
Cheers
Phil
}}
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
[[Category:Platforms]]
I Want A Blog is an adaptation of TiddlyWiki designed to show off some applications of TiddlyWiki in managing web sites.
The project homepage and demo is at http://iwab.tiddlyspot.com. This page is about the plugins that allow the following feature:
* Template-based saving aka "TiddlyTemplating"
== Architecture and Components ==
=== Plugins core to TiddlyTemplating ===
*[[TiddlyTemplatingMacro]] ([[User:Jayfresh|Jonathan Lister]])
*[[TemplatePlugin]] ([[User:Jayfresh|Jonathan Lister]])
*[[TemplateFormatterPlugin]] ([[User:MartinBudden|Martin Budden]])
=== Plugins that construct the rest of I Want A Blog ===
==== New ====
To preview templates:
*[[HTMLTemplatePreviewMacro]] ([[User:Jayfresh|Jonathan Lister]])
*[[IFramePlugin]] ([[User:Jayfresh|Jonathan Lister]])
A button to trigger the save process:
*[[SaveButtonMacro]] ([[User:Jayfresh|Jonathan Lister]])
Config:
*[[TiddleShopConfigPlugin]] ([[User:Jayfresh|Jonathan Lister]])
To upload text strings as files to TiddlyHome:
*[[UploadTextMacro]] ([[User:Jayfresh|Jonathan Lister]])
==== Pre-existing ====
To support file uploads to [http://tiddlyhome.bidix.info/iwantablog TiddlyHome]:
*[[UploadPlugin]] ([[User:BidiX|BidiX]])
*[[PasswordOptionPlugin]] ([[User:BidiX|BidiX]])
For layout control:
*ImageSizePlugin [http://www.TiddlyTools.com/#ImageSizePlugin] ([[User:EricShulman|Eric Shulman]])
*SinglePageModePlugin [http://www.TiddlyTools.com/#SinglePageModePlugin] ([[User:EricShulman|Eric Shulman]])
*TaggedTemplateTweak [http://www.TiddlyTools.com/#TaggedTemplateTweak] ([[User:EricShulman|Eric Shulman]])
To create the gallery view of blog templates
*[[ListRelatedPlugin]] ([[User:JeremyRuston|Jeremy Ruston]])
[[Category:Adaptations]]
/***
|''Name:''|ImportMediaWikiWizard|
|''Description:''|Macro that displays a wizard to import content from a MediaWiki or the Alreay imported content|
|''Author:''|Nicolas Rusconi (nicolas.rusconi (at) globant (dot) com)|
|''Version:''|1.0.1|
|''Date:''|Feb 4, 2009|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.2.0|
|''Type''|plugin|
|''Requires''|MediaWikiAdaptorPlugin|
|''Usage''|{{{<<importMediaWiki>>}}}|
***/
/*{{{*/
config.macros.importMediaWiki = {};
//displays a wizard to import content from a media wiki, or displays the already imported tiddlers
config.macros.importMediaWiki.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
var tiddlersFromMediaWiki = store.getTaggedTiddlers(this.mediaWikiTiddlersTag);
if (tiddlersFromMediaWiki && tiddlersFromMediaWiki.length > 0) {
var container = createTiddlyElement(place, "div", this.importedTiddlersMessageId);
container.appendChild(this.getImportedTiddlersView(tiddlersFromMediaWiki));
container.appendChild(this.getImportMoreTiddlersButton());
return;
}
if(readOnly) {
createTiddlyElement(place, "div", null, "marked", this.readOnlyWarning);
return;
}
this.resetWizard(place);
};
config.macros.importMediaWiki.resetWizard = function(place)
{
var macro = config.macros.importMediaWiki;
var w = new Wizard();
w.createWizard(place, macro.wizardTitle);
macro.restart(w);
return w;
};
config.macros.importMediaWiki.getImportMoreTiddlersButton = function()
{
var macro = config.macros.importMediaWiki;
var action = function() {
var container = document.getElementById(macro.importedTiddlersMessageId);
var button = document.getElementById(macro.importeMoreTiddlersButtonId);
if (container) {
container.removeChild(button);
}
var w = macro.resetWizard(container);
var feedTiddlers = store.getTaggedTiddlers(macro.mediaWikiFeedTag);
if (feedTiddlers.length > 0) {
w.getElement(macro.hostInputName).value =
store.getTiddlerSlice(feedTiddlers[0].title, macro.URLSlice);
w.formElem.onsubmit();
}
}
var button = createTiddlyButton(null, macro.importMoreTiddlersButtonLabel,
macro.importMoreTiddlersButtonTooltip,action,null,macro.importeMoreTiddlersButtonId);
button.style.background = '#FFEE88';
return button;
}
config.macros.importMediaWiki.getImportedTiddlersView = function(tiddlers)
{
var macro = config.macros.importMediaWiki;
var view = document.createElement("div");
view.innerHTML = macro.importedTiddlersTitle + "<br/>";
for (var i=0; i<tiddlers.length && i < 10; i++) {
insertSpacer(view);
createTiddlyLink(view, tiddlers[i].title, true);
};
if (tiddlers.length >= 10) {
insertSpacer(view);
var message = macro.moreTiddlers.format([tiddlers.length - 10]);
createTagButton(view,macro.mediaWikiTiddlersTag,null,message);
}
return view;
}
config.macros.importMediaWiki.openHost = function()
{
var wizard = new Wizard(this);
var macro = config.macros.importMediaWiki;
var url = wizard.getElement(macro.hostInputName).value.trim();
var host = macro.getHost(url);
var serverType = "mediawiki";
var adaptor = new config.adaptors[serverType]();
wizard.setValue(macro.adaptorField, adaptor);
wizard.setValue(macro.serverTypeField, serverType);
wizard.setValue(macro.hostField, host);
wizard.setValue(macro.originalUrlField, url);
wizard.setValue(macro.possibleFoldersField, macro.getPossibleFolders(url.substring(host.length)));
wizard.setValue(macro.pageField, macro.getPage(url));
macro.showMessage(wizard, macro.openingHost);
wizard.setButtons([macro.getResetButton()]);
handleAdaptorReturn(adaptor.openHost(host, null, wizard, macro.onOpen));
}
config.macros.importMediaWiki.onOpen = function(context, wizard)
{
var macro = config.macros.importMediaWiki;
var adaptor = wizard.getValue(macro.adaptorField);
var url = wizard.getValue(macro.originalUrlField);
var pos = url.indexOf('/wiki/');
if(pos!=-1) {
title = url.substr(pos+6);
wizard.setValue(macro.hostField,context.host);
wizard.setValue(macro.contextField,context);
macro.doImport(wizard,[title]);
return;
}
if(context.status !== true) {
macro.showErrorMessage(wizard,macro.errorOpeningHost);
return;
}
macro.showMessage(wizard, macro.lookingUpPages);
handleAdaptorReturn(adaptor.getWorkspaceList(context, wizard, macro.onGetWorkspaceList));
}
config.macros.importMediaWiki.tryNextFolder = function (context, wizard)
{
var macro = config.macros.importMediaWiki;
var nextFolder = wizard.getValue(macro.possibleFoldersField).pop();
var adaptor = wizard.getValue(macro.adaptorField);
context.host = wizard.getValue(macro.hostField).concat(nextFolder);
handleAdaptorReturn(adaptor.getWorkspaceList(context, wizard, macro.onGetWorkspaceList));
}
config.macros.importMediaWiki.onGetWorkspaceList = function(context, wizard)
{
var macro = config.macros.importMediaWiki;
if(context.status !== true) {
if (wizard.getValue(macro.possibleFoldersField).length > 0) {
macro.tryNextFolder(context, wizard);
} else {
var message = macro.errorLookingForWiki.format([context.statusCode]);
if (context.statusCode == 503) {
message = macro.errorLookingForWikiHost;
} else if (context.statusCode == 404) {
message = macro.errorLookingForWikiApi + macro.mediawikiAbout;
}
macro.showErrorMessage(wizard,message);
wizard.setButtons([macro.getResetButton(),
{caption: macro.next,
tooltip: macro.nextTooltip,
onClick: macro.openHost}]);
}
return;
}
var workspaces = context.workspaces;
wizard.setValue(macro.hostField,context.host);
wizard.setValue(macro.contextField,context);
wizard.setValue(macro.workspacesField, workspaces);
var url = wizard.getValue(macro.originalUrlField);
if (url) {
var workspaceName = macro.getWorkspace(url.substring(context.host.length));
var workspaceIndex = workspaces.findByField(macro.titleField, workspaceName);
if (workspaceIndex != null) {
macro.selectedWorkspace(wizard, workspaces[workspaceIndex].title);
return;
}
}
macro.showWorkspacesAndPages(context, wizard);
}
// display the workspaces and pages for the current host
config.macros.importMediaWiki.showWorkspacesAndPages = function(context, wizard)
{
var macro = config.macros.importMediaWiki;
wizard.addStep(macro.step2Title, macro.step2Html);
macro.hideWizardBody(wizard)
var workspaceSelector = wizard.getElement(macro.selWorkspaceName);
var defaultWorkspaceTitle = macro.defaultWorkspaceTitle;
var workspaces = wizard.getValue(macro.workspacesField);
// add all the workspaces to the select combo
for(var t=0; t<workspaces.length; t++) {
var title = workspaces[t].title;
if (title == defaultWorkspaceTitle) {
title = macro.defaultWorkspaceLabel;
}
var e = createTiddlyElement(workspaceSelector,"option",null,null,title);
e.value = context.workspaces[t].title;
}
// list workspaces
var selectedWorkspace = wizard.getValue(macro.workspaceField);
defaultWorkspaceTitle = selectedWorkspace? selectedWorkspace : defaultWorkspaceTitle;
// if workspaces inferred from url, then select it
workspaceIndex = workspaces.findByField(macro.titleField, defaultWorkspaceTitle);
if (workspaceIndex != null) {
workspaceSelector.value = workspaces[workspaceIndex].title;
}
macro.selectedWorkspace(wizard, workspaceSelector.value);
workspaceSelector.onchange = function (e) {
macro.selectedWorkspace(new Wizard(this),e.currentTarget.value);
};
}
config.macros.importMediaWiki.filterAlreadyImportedTiddlers = function(tiddlers)
{
var macro = config.macros.importMediaWiki;
var filteredList = [];
for (var i=0; i<tiddlers.length; i++) {
var tiddler = tiddlers[i];
var localTiddler = store.getTiddler(tiddler.title);
if (localTiddler == null || !localTiddler.isTagged(macro.mediaWikiTiddlersTag)) {
filteredList.push(tiddler);
}
};
return filteredList;
};
// show the pages for the current workspace
config.macros.importMediaWiki.showPages = function(context, wizard)
{
var macro = config.macros.importMediaWiki;
macro.showWizardBody(wizard);
var listedTiddlers = macro.getTiddlers(context.tiddlers);
var retrievedTiddlers = listedTiddlers.length;
listedTiddlers = macro.filterAlreadyImportedTiddlers(listedTiddlers);
var filteredTiddlersCount = retrievedTiddlers - listedTiddlers.length;
if (listedTiddlers.length == 0) {
var errorMessage = macro.noTiddlerToImport;
if (filteredTiddlersCount > 0) {
errorMessage += macro.filteredTiddlers.format([filteredTiddlersCount]);
}
macro.showErrorMessage(wizard, errorMessage);
return;
}
var markList = wizard.getElement(macro.markListName);
var listWrapper = macro.getClearWikiPagesList();
markList.parentNode.insertBefore(listWrapper, markList);
var listView = PaginatedListView.create(listWrapper, listedTiddlers, macro.listViewTemplate, null, null, 3);
wizard.setValue(macro.listViewField, listView);
wizard.setButtons([macro.getResetButton(),
{caption: macro.importLabel,
tooltip: macro.importPrompt,
onClick: macro.doImportSelectedPages}]);
};
// select the specified workspace
config.macros.importMediaWiki.selectedWorkspace = function(wizard, workspace)
{
var macro = config.macros.importMediaWiki;
wizard.setValue(macro.workspaceField, workspace);
var listWrapper = macro.getClearWikiPagesList();
listWrapper.innerHTML = macro.loadingTiddlersMessage;
var adaptor = wizard.getValue(macro.adaptorField);
var context = wizard.getValue(macro.contextField);
macro.showMessage(wizard, macro.statusOpenWorkspace);
wizard.setButtons([macro.getResetButton()]);
handleAdaptorReturn(adaptor.openWorkspace(workspace, context, wizard, macro.onOpenWorkspace));
};
config.macros.importMediaWiki.onOpenWorkspace = function(context, wizard, callback)
{
var macro = config.macros.importMediaWiki;
if(context.status !== true) {
macro.showErrorMessage(wizard,"Error in importMediaWiki.onOpenWorkspace: " + context.statusText);
return;
}
var adaptor = wizard.getValue(macro.adaptorField);
var ret = adaptor.getTiddlerList(context,wizard,macro.onGetTiddlerList,wizard.getValue("feedTiddlerFilter"));
macro.showProgressMessage(wizard, macro.statusGetTiddlerList);
wizard.setButtons([macro.getResetButton()]);
handleAdaptorReturn(ret);
}
config.macros.importMediaWiki.onGetTiddlerList = function(context, wizard)
{
var macro = config.macros.importMediaWiki;
macro.removeProgressMessage(wizard);
if(context.status !== true) {
macro.getClearWikiPagesList();
macro.showErrorMessage(wizard,macro.errorGettingTiddlerList);
wizard.setButtons([macro.getResetButton()]);
return;
}
var listedTiddlers = macro.getTiddlers(context.tiddlers);
var workspace = wizard.getValue(macro.workspaceField);
var page = wizard.getValue(macro.pageField);
fullPageName = page;
if (workspace && workspace.length > 0 ) {
fullPageName = workspace + ":" + fullPageName;
}
if (listedTiddlers.findByField(macro.titleField, fullPageName) != null) {
wizard.setValue(macro.keepTiddlersSyncField, true);
macro.doImport(wizard, [fullPageName], false);
} else {
var markList = wizard.getElement(macro.markListName);
if (markList) {
macro.showPages(context, wizard);
} else {
macro.showWorkspacesAndPages(context, wizard);
}
}
}
config.macros.importMediaWiki.doImportSelectedPages = function(e)
{
var macro = config.macros.importMediaWiki;
var wizard = new Wizard(this);
var view = wizard.getValue(macro.listViewField);
var tiddlerNames = view.getSelectedRows();
if (!tiddlerNames || tiddlerNames.length == 0) {
macro.showErrorMessage(wizard, macro.noPageSelected);
return;
}
if (tiddlerNames.length > macro.getMaxTiddlerImport() ) {
macro.showErrorMessage(wizard, macro.maxImportsExceded);
return;
}
wizard.setValue(macro.keepTiddlersSyncField,
wizard.getElement(macro.chkSyncFieldName).checked);
macro.doImport(wizard, tiddlerNames, true);
}
config.macros.importMediaWiki.showMessage = function(wizard, message, containerBarId) {
var macro = config.macros.importMediaWiki;
if (!containerBarId) {
var messageBar = document.getElementById(macro.wizardMessageBarId);
} else {
var messageBar = document.getElementById(containerBarId);
}
if (!messageBar) {
var container = createTiddlyElement(null,'div');
container.align = 'center';
if (!containerBarId) {
messageBar = createTiddlyElement(container,'div',macro.wizardMessageBarId,'tiddler');
} else {
messageBar = createTiddlyElement(container,'div',containerBarId,'tiddler');
}
wizard.bodyElem.firstChild.insertBefore(container,wizard.bodyElem.firstChild.firstChild);
messageBar.style.background ='#FFEE88 none repeat scroll';
messageBar.style.paddingTop = '0px';
messageBar.style.paddingBottom = '0px';
messageBar.align = 'center';
messageBar.style.width = '300px';
messageBar.appendChild(document.createTextNode(message));
} else {
messageBar.replaceChild(document.createTextNode(message),
messageBar.childNodes[0]);
}
return messageBar;
}
config.macros.importMediaWiki.showProgressMessage = function(wizard, message) {
var messageBar = config.macros.importMediaWiki.showMessage(wizard, message);
config.macros.importMediaWiki.progressAnimation.show(messageBar);
}
config.macros.importMediaWiki.removeProgressMessage = function(wizard) {
config.macros.importMediaWiki.progressAnimation.stop();
config.macros.importMediaWiki.removeMessage(wizard);
}
config.macros.importMediaWiki.showRemainingMessage = function(wizard, message) {
var macro = config.macros.importMediaWiki;
if (message) {
var messageFormated = macro.remainingBarTitle.format(message);
var messageBar = macro.showMessage(wizard, messageFormated, macro.countdownBarId);
config.macros.importMediaWiki.remainingImportsAnimation.show(messageBar);
}
}
config.macros.importMediaWiki.removeRemainingMessage = function(wizard) {
var macro = config.macros.importMediaWiki;
macro.remainingImportsAnimation.stop();
macro.removeMessage(wizard, macro.countdownBarId);
}
config.macros.importMediaWiki.removeMessage = function(wizard, containerBarId)
{
if (!containerBarId) {
var messageBar = document.getElementById(config.macros.importMediaWiki.wizardMessageBarId);
} else {
var messageBar = document.getElementById(containerBarId);
}
if (messageBar) {
messageBar.parentNode.removeChild(messageBar);
}
};
config.macros.importMediaWiki.showErrorMessage = function(wizard, message)
{
var messageBar = config.macros.importMediaWiki.showMessage(wizard, message);
messageBar.style.background ='#FF0000 none repeat scroll';
};
config.macros.importMediaWiki.hideWizardBody = function(wizard)
{
wizard.bodyElem.firstChild.lastChild.style.visibility = 'hidden';
wizard.bodyElem.firstChild.lastChild.style.height = '0px';
wizard.bodyElem.firstChild.lastChild.style.width = '0px';
wizard.bodyElem.firstChild.firstChild.style.visibility = 'hidden';
wizard.bodyElem.firstChild.firstChild.style.height = '0px';
wizard.bodyElem.firstChild.firstChild.style.width = '0px';
};
config.macros.importMediaWiki.showWizardBody = function(wizard)
{
wizard.bodyElem.firstChild.lastChild.style.visibility = '';
wizard.bodyElem.firstChild.lastChild.style.height = '';
wizard.bodyElem.firstChild.lastChild.style.width = '';
wizard.bodyElem.firstChild.childNodes[1].style.visibility = '';
wizard.bodyElem.firstChild.childNodes[1].style.height = '';
wizard.bodyElem.firstChild.childNodes[1].style.width = '';
};
config.macros.importMediaWiki.doImport = function(wizard, tiddlerNames, selectedManually)
{
var macro = config.macros.importMediaWiki;
wizard.setValue(macro.importCompletedHandlerField, macro.onDone);
wizard.setValue(macro.importTagsField, [macro.mediaWikiTiddlersTag]);
var html;
var generatedServerName = macro.generateSystemServerName(wizard);
var feedTiddlers = store.getTaggedTiddlers(macro.mediaWikiFeedTag);
if (feedTiddlers.length == 0) {
if (selectedManually == true) {
html = macro.lastStepHtml + macro.serverTiddlerInputHtml;
} else {
wizard.setValue(macro.serverTiddlerNameField, generatedServerName);
html = macro.lastStepHtml;
}
} else {
html = macro.lastStepHtml;
}
wizard.addStep(macro.lastStepTitle.format([tiddlerNames.length]), html);
if(!macro.remainingImports){
macro.remainingImports = tiddlerNames.length;
}
macro.remainingImportsAnimation.chars(macro.remainingImports);
var servetName = wizard.getElement(macro.serverTiddlerNameTxtField);
if (servetName) {
servetName.value = generatedServerName;
}
config.macros.importMediaWiki.doImportWithWizard(wizard, tiddlerNames);
// set the default host(used for new tiddlers)
merge(config.defaultCustomFields, {'server.host': wizard.getValue(macro.hostField) });
};
config.macros.importMediaWiki.doImportWithWizard = function(wizard, rowNames)
{
var macro = config.macros.importMediaWiki;
var place = wizard.getElement(macro.markReportFieldName);
for(t=0; t<rowNames.length && place; t++) {
var link = document.createElement("span");
createTiddlyLink(link, rowNames[t], true);
place.parentNode.insertBefore(link, place);
if (t +1 < rowNames.length) {
createTiddlyText(link, ", ");
}
}
macro.showProgressMessage(wizard, macro.importingTiddlers);
wizard.setButtons([{caption: config.macros.importTiddlers.cancelLabel,
tooltip: config.macros.importTiddlers.cancelPrompt,
onClick: macro.onCancel}
]);
var wizardContext = wizard.getValue(macro.contextField);
wizardContext[macro.keepTiddlersSyncField] = wizard.getValue(macro.keepTiddlersSyncField);
var callback = function() {
config.macros.importMediaWiki.progressAnimation.stop();
config.macros.importMediaWiki.showMessage(wizard, macro.statusDoneImport);
macro.removeRemainingMessage(wizard);
wizard.setButtons([{caption: macro.doneLabel,
tooltip: macro.donePrompt,
onClick: wizard.getValue(macro.importCompletedHandlerField)
}]);
};
macro.doImportTiddlers(wizard.getValue(macro.adaptorField), wizardContext, rowNames, callback);
return false;
};
config.macros.importMediaWiki.doImportTiddlers = function (adaptor, importContext, tiddlersNames, callback)
{
var macro = config.macros.importMediaWiki;
var overwrite = [];
var t;
for(t=0; t<tiddlersNames.length; t++) {
if (store.tiddlerExists(tiddlersNames[t])) {
overwrite.push(tiddlersNames[t]);
}
}
if(overwrite.length > 0) {
if (!confirm(macro.confirmOverwriteText.format([overwrite.join(", ")]))) {
return false;
}
}
importContext[macro.remainingImports] = tiddlersNames.length;
macro.remainingImportsCount++;
var tiddlers = importContext && importContext.tiddlers ? importContext.tiddlers : [];
importContext.callback = callback;
for(t=0; t<tiddlersNames.length; t++) {
var tiddlerContext = {
allowSynchronous:true,
tiddler:tiddlers[tiddlers.findByField(macro.titleField, tiddlersNames[t])],
host: importContext.host
};
adaptor.getTiddler(tiddlersNames[t],tiddlerContext,importContext,macro.onGetTiddler);
}
}
config.macros.importMediaWiki.onGetTiddler = function(tiddlerContext, importContext)
{
var macro = config.macros.importMediaWiki;
if (!tiddlerContext.status) {
macro.showErrorMessage(new Wizard(this), "Error in importMediaWiki.onGetTiddler: " + tiddlerContext.statusText);
return;
}
var tiddler = tiddlerContext.tiddler;
store.suspendNotifications();
tags = tiddler.tags;
merge(tags,importContext.tags);
store.saveTiddler(tiddler.title, tiddler.title, tiddler.text, tiddler.modifier,
tiddler.modified, tags, tiddler.fields, true, tiddler.created);
if(!importContext[macro.keepTiddlersSyncField]) {
store.setValue(tiddler.title,'server',null);
}
store.resumeNotifications();
if(!tiddlerContext.isSynchronous)
store.notify(tiddler.title,true);
var remainingImports = importContext[macro.remainingImports] - 1;
importContext[macro.remainingImports] = remainingImports;
if(remainingImports == 0) {
if(tiddlerContext.isSynchronous) {
store.notifyAll();
refreshDisplay();
}
autoSaveChanges();
importContext.callback();
} else {
macro.lastStepTitle.format(remainingImports);
}
};
config.macros.importMediaWiki.onDone = function (e)
{
var macro = config.macros.importMediaWiki;
var wizard = new Wizard(this);
var serverTiddlerName = wizard.getValue(macro.serverTiddlerNameField);
var chkSave = wizard.getElement(macro.chkSaveName);
if (chkSave && chkSave.checked) {
serverTiddlerName = wizard.getElement(macro.serverTiddlerNameTxtField).value;
}
if (serverTiddlerName) {
macro.saveServerTiddler(wizard, serverTiddlerName, [macro.mediaWikiFeedTag]);
}
config.macros.importMediaWiki.reinvoke(wizard);
}
config.macros.importMediaWiki.reinvoke = function(wizard)
{
var macro = config.macros.importMediaWiki;
var main = wizard.formElem.parentNode;
main.removeChild(wizard.formElem);
var place = document.getElementById(macro.importedTiddlersMessageId);
if (place != null) {
var parent = place.parentNode;
parent.removeChild(place);
macro.handler(parent);
} else {
macro.handler(main);
}
}
config.macros.importMediaWiki.onReset = function()
{
config.macros.importMediaWiki.reinvoke(new Wizard(this));
};
config.macros.importMediaWiki.onCancel = function(e)
{
var wizard = new Wizard(this);
var place = wizard.clear();
config.macros.importMediaWiki.restart(wizard);
return false;
};
config.macros.importMediaWiki.getResetButton = function()
{
var macro = config.macros.importMediaWiki;
return {
caption: macro.reset,
tooltip: macro.resetTooltip,
onClick: macro.onReset
};
}
config.macros.importMediaWiki.restart = function(wizard)
{
var macro = config.macros.importMediaWiki;
wizard.addStep(macro.step1Title, macro.step1Html);
s = wizard.getElement("selFeeds");
var feeds = config.macros.importTiddlers.getFeeds();
for(t in feeds) {
e = createTiddlyElement(s,"option",null,null,t);
e.value = t;
}
wizard.setValue("feeds",feeds);
s.onchange = config.macros.importMediaWiki.onFeedChange;
wizard.setButtons([macro.getResetButton(),
{caption: macro.next,
tooltip: macro.nextTooltip,
onClick: macro.openHost}]);
wizard.formElem.action = "javascript:;";
wizard.formElem.onsubmit = function() {
if (this.txtWikiHost.value.length) {
this.lastChild.childNodes[2].onclick();
this.onsubmit = null;
}
};
}
config.macros.importMediaWiki.getPage = function(url)
{
var page;
var index = url.lastIndexOf("/");
if (index !== -1) {
page = url.substr(index + 1);
var categoryIndex = page.indexOf(":");
if (categoryIndex !== -1 ) {
page = page.substr(categoryIndex + 1);
}
page = page.replace("_"," ");
}
return page;
}
config.macros.importMediaWiki.getWorkspace = function(url)
{
var workspace;
var index = url.lastIndexOf("/");
if (index !== -1) {
var page = url.substr(index + 1);
if (page.length > 0) {
var categoryIndex = page.indexOf(":");
if (categoryIndex !== -1) {
workspace = page.substr(0, categoryIndex);
} else {
workspace = "";
}
}
}
return workspace;
}
config.macros.importMediaWiki.getHost = function(url)
{
var host = url;
var fromIndex = 0;
if (url.search("https?://") != -1) {
fromIndex = url.indexOf("://") + 3;
}
var index = url.indexOf("/", fromIndex + 1);
if (index !== -1) {
host = url.substring(0,index);
}
return host;
}
// returns the posible folders on wich the api.php could be located.
config.macros.importMediaWiki.getPossibleFolders = function(urlWithoutHost) {
var url = urlWithoutHost;
var hosts = [];
//standard folders
hosts.push('/wiki');
hosts.push('/w');
var index = url.lastIndexOf("/");
var last = url.substring(index);
if (last) {
hosts.push(last);
}
while (index != -1) {
url = url.substring(0,index);
if (url !== "") {
hosts.push(url);
}
index = url.lastIndexOf("/");
}
return hosts;
}
config.macros.importMediaWiki.getTiddlers = function(tiddlers) {
// Extract data for the listview
var listedTiddlers = [];
if(tiddlers) {
for(var n=0; n<tiddlers.length; n++) {
var tiddler = tiddlers[n];
listedTiddlers.push({
title: tiddler.title,
modified: tiddler.modified,
modifier: tiddler.modifier,
text: tiddler.text ? wikifyPlainText(tiddler.text,100) : "",
tags: tiddler.tags,
size: tiddler.text ? tiddler.text.length : 0,
tiddler: tiddler
});
}
}
listedTiddlers.sort(function(a,b) {return a.title < b.title ? -1 : (a.title == b.title ? 0 : +1);});
return listedTiddlers;
};
config.macros.importMediaWikiSync = {};
config.macros.importMediaWikiSync.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
var action = function() {
config.macros.importMediaWiki.sync.doSync();
}
var macro = config.macros.importMediaWiki;
createTiddlyButton(place, macro.syncNow, macro.syncNowTooltip,action,null,macro.syncButtonId);
}
config.macros.importMediaWiki.sync = {};
config.macros.importMediaWiki.sync.hijackedUpdateSyncStatus = config.macros.sync.updateSyncStatus;
config.macros.sync.updateSyncStatus = function(syncItem)
{
var macro = config.macros.importMediaWiki.sync;
if (syncItem.colElements) {
macro.hijackedUpdateSyncStatus(syncItem);
}
else {
var getTiddlerCallback = function(context, syncItem){
if (syncItem) {
var tiddler = context.tiddler;
store.saveTiddler(tiddler.title, tiddler.title, tiddler.text, tiddler.modifier,
tiddler.modified, tiddler.tags, tiddler.fields, true, tiddler.created);
syncItem.syncStatus = config.macros.sync.syncStatusList.gotFromServer;
}
macro.showResultIfFinished();
};
var sl = config.macros.sync.syncStatusList;
var si = syncItem;
var r = true;
switch (si.syncStatus) {
case sl.changedServer:
macro.status.updated.push(si.title);
r = si.adaptor.getTiddler(si.title, null, si, getTiddlerCallback);
break;
case sl.notFound:
case sl.changedBoth:
macro.status.conflics.push(si.title);
macro.showResultIfFinished();
break;
default:
macro.status.unchanged.push(si.title);
macro.showResultIfFinished();
break;
}
if (!r) {
displayMessage("Error in doSync: " + r);
}
}
};
config.macros.importMediaWiki.sync.showResultIfFinished = function() {
var status = config.macros.importMediaWiki.sync.status;
var macro = config.macros.importMediaWiki;
var totalStatus = status.count();
if (totalStatus == currSync.syncList.length) {
if (totalStatus > status.unchanged.length) {
displayMessage(macro.syncedTiddlersMessage.format([status.updated.length]));
if (status.conflics.length > 0) {
var text = status.conflics[0];
for (var i = 1; i < status.conflics.length; i++) {
text += ', ' + status.conflics[0];
};
displayMessage(macro.conflictDetected + text);
}
}
status.reset();
}
}
config.macros.importMediaWiki.sync.status = {};
config.macros.importMediaWiki.sync.status.count = function()
{
var macro = config.macros.importMediaWiki.sync.status;
return macro.updated.length + macro.conflics.length + macro.unchanged.length;
};
config.macros.importMediaWiki.sync.status.reset = function()
{
var macro = config.macros.importMediaWiki.sync.status;
macro.updated = [];
macro.conflics = [];
macro.unchanged = [];
};
config.macros.importMediaWiki.sync.status.updated = [];
config.macros.importMediaWiki.sync.status.conflics = [];
config.macros.importMediaWiki.sync.status.unchanged = [];
// run at startup
jQuery().bind('startup', function() {
config.macros.importMediaWiki.sync.check();
});
if (!config.options.txtMediawikiSyncIterval) {
config.options.txtMediawikiSyncIterval = '' + 15;
}
config.macros.importMediaWiki.sync.check = function() {
config.macros.importMediaWiki.sync.doSync();
window.setTimeout(config.macros.importMediaWiki.sync.check, 1000 * 60 * parseInt(config.options.txtMediawikiSyncIterval));
};
config.macros.importMediaWiki.sync.doSync = function()
{
if(currSync)
config.macros.sync.cancelSync();
currSync = {};
var macro = config.macros.importMediaWiki;
var syncMacro = config.macros.sync;
currSync.syncList = macro.sync.filterMediaWikiTiddlers(syncMacro.getSyncableTiddlers());
syncMacro.preProcessSyncableTiddlers(currSync.syncList);
currSync.syncTask = syncMacro.createSyncTasks(currSync.syncList);
return false;
};
config.macros.importMediaWiki.sync.filterMediaWikiTiddlers = function(list)
{
var filteredList = [];
var tiddlersToSync = store.getTaggedTiddlers(
config.macros.importMediaWiki.mediaWikiTiddlersTag);
for (var i=0; i<list.length; i++) {
var indx = tiddlersToSync.findByField('field', list[i].title);
if (indx != -1 ) {
filteredList.push(list[i]);
list[i].adaptor.host = list[i].serverHost;
}
};
return filteredList;
};
config.macros.importMediaWiki.getClearWikiPagesList = function()
{
var id = "pagesList";
var listWrapper = document.getElementById(id);
if (listWrapper == null) {
listWrapper = document.createElement("div");
listWrapper.id = id;
} else {
listWrapper.innerHTML = "";
}
return listWrapper;
}
config.macros.importMediaWiki.generateSystemServerName = function(wizard)
{
var macro = config.macros.importMediaWiki;
var serverType = wizard.getValue(macro.serverTypeField);
var host = wizard.getValue(macro.hostField);
var workspace = wizard.getValue(macro.workspaceField);
var pattern = config.macros.importTiddlers[workspace ? "systemServerNamePattern" : "systemServerNamePatternNoWorkspace"];
return pattern.format([serverType,host,workspace]);
};
config.macros.importMediaWiki.saveServerTiddler = function(wizard, serverTiddlerName, extraTags)
{
var macro = config.macros.importMediaWiki;
var serverType = wizard.getValue(macro.serverTypeField);
var host = wizard.getValue(macro.hostField);
var workspace = wizard.getValue(macro.workspaceField);
this.saveServerTiddlerWithDetails(serverTiddlerName, serverType, host, workspace, null, extraTags);
};
config.macros.importMediaWiki.saveServerTiddlerWithDetails = function(txtSaveTiddler, serverType, host, workspace, description, extraTags)
{
var macro = config.macros.importMediaWiki;
if(store.tiddlerExists(txtSaveTiddler)) {
if(!confirm(config.macros.importTiddlers.confirmOverwriteSaveTiddler.format([txtSaveTiddler])))
return;
store.suspendNotifications();
store.removeTiddler(txtSaveTiddler);
store.resumeNotifications();
}
var text = macro.serverSaveTemplate.format([txtSaveTiddler,serverType,host,workspace]);
var tags = ["systemServer", "excludeLists", "excludeSearch"];
if (extraTags) {
for(var n=0; n<extraTags.length; n++) {
tags.push(extraTags[n]);
}
}
store.saveTiddler(txtSaveTiddler,txtSaveTiddler,text,macro.serverSaveModifier,new Date(),tags);
};
config.macros.importMediaWiki.remainingImportsAnimation = {};
config.macros.importMediaWiki.remainingImportsAnimation.stopFlag = false;
config.macros.importMediaWiki.remainingImportsAnimation.content;
config.macros.importMediaWiki.remainingImportsAnimation.place;
config.macros.importMediaWiki.remainingImportsAnimation.currentChar = 0;
config.macros.importMediaWiki.remainingImportsAnimation.remainingAnimator;
config.macros.importMediaWiki.remainingImportsAnimation.chars = function(tiddlerSize) {
var macro = config.macros.importMediaWiki.remainingImportsAnimation;
macro.remainingAnimator = [];
for (var i = tiddlerSize; i = 0; i--) {
macro.remainingAnimator[i] = i;
}
macro.stopFlag = false;
}
config.macros.importMediaWiki.remainingImportsAnimation.nextChar = function() {
var macro = config.macros.importMediaWiki.remainingImportsAnimation;
if (macro.stopFlag == true) {
return;
}
var nextChar = macro.remainingAnimator[config.macros.importMediaWiki.remainingImports];
macro.place.textContent = nextChar;
if (!macro.stopFlag) {
window.setTimeout(config.macros.importMediaWiki.remainingImportsAnimation.nextChar,300);
}
if (nextChar == 0) {
macro.stopFlag = true;
}
}
config.macros.importMediaWiki.remainingImportsAnimation.show = function(place) {
this.content = place.textContent;
this.place = place;
config.macros.importMediaWiki.remainingImportsAnimation.stopFlag = false;
window.setTimeout(config.macros.importMediaWiki.remainingImportsAnimation.nextChar,0);
}
config.macros.importMediaWiki.remainingImportsAnimation.stop = function() {
var macro = config.macros.importMediaWiki.remainingImportsAnimation;
macro.stopFlag = true;
macro.place = null;
macro.content = null;
}
config.macros.importMediaWiki.progressAnimation = {};
config.macros.importMediaWiki.progressAnimation.chars = ['•···','·•··','··•·','···•','··•·','·•··']
config.macros.importMediaWiki.progressAnimation.content;
config.macros.importMediaWiki.progressAnimation.place;
config.macros.importMediaWiki.progressAnimation.stopFlag = false;
config.macros.importMediaWiki.progressAnimation.currentChar = 0;
config.macros.importMediaWiki.progressAnimation.show = function(place) {
this.content = place.textContent;
this.place = place;
config.macros.importMediaWiki.progressAnimation.stopFlag = false;
window.setTimeout(config.macros.importMediaWiki.progressAnimation.nextChar,0);
}
config.macros.importMediaWiki.progressAnimation.nextChar = function() {
var macro = config.macros.importMediaWiki.progressAnimation;
if (macro.stopFlag == true) {
return;
}
var nextChar = macro.chars[macro.currentChar];
macro.place.textContent = nextChar + ' ' + macro.content;
macro.currentChar++;
if (macro.currentChar >= macro.chars.length) {
macro.currentChar = 0;
} else {
macro.currentChar = macro.currentChar;//just for timing
}
if (!macro.stopFlag) {
window.setTimeout(config.macros.importMediaWiki.progressAnimation.nextChar,300);
}
}
config.macros.importMediaWiki.progressAnimation.stop = function() {
var macro = config.macros.importMediaWiki.progressAnimation;
macro.stopFlag = true;
macro.place = null;
macro.content = null;
}
function handleAdaptorReturn(returnValue) {
if (returnValue !== true) {
displayMessage(returnValue);
}
}
config.macros.importMediaWiki.getMaxTiddlerImport = function() {
return parseInt(config.options.txtMaxTiddlerImport);
};
//Default Properties
if (!config.options.txtMaxTiddlerImport) {
config.options.txtMaxTiddlerImport = '10';
}
merge(config.macros.importMediaWiki, {
remainingImportsCount: 0,
//fields in the wizard
adaptorField: "adaptor",
hostField: "host",
serverTypeField: "serverType",
titleField: "title",
workspaceField: "workspace",
contextField: "context",
keepTiddlersSyncField: "sync",
importCompletedHandlerField: "doneHandler",
serverTiddlerNameField: "txtSaveTiddler",
originalUrlField: "originalUrl",
workspacesField: "workspaces",
possibleFoldersField: "possibleFolders",
pageField: "page",
listViewField: "listView",
importTagsField: "importTags",
markReportFieldName: "markReport",
remainingImportsField: "remainingImports",
//HTML
markListName: "markList",
chkSyncFieldName: "chkSync",
selWorkspaceName: "selWorkspace",
chkSaveName: "chkSave",
hostInputName: "txtWikiHost",
importedTiddlersMessageId : "importedTiddlersMessage",
importeMoreTiddlersButtonId : "importeMoreTiddlersButton" ,
wizardMessageBarId : "wizardMessageBar",
countdownBarId: "countdownBarId",
serverSaveTemplate: "|''Description:''|%0|\n|''Type:''|%1|\n|''URL:''|%2|\n|''Workspace:''|%3|\n\nThis tiddler was automatically created to record the details of this server",
URLSlice : "URL",
serverTiddlerNameTxtField:"serverTiddlerNameTxtField",
syncButtonId: 'syncButtonId',
//User messages
errorLookingForWiki:"Unable to connect to the wiki server. Unknown error (id:%0)",
errorLookingForWikiHost: "Unable to connect to the wiki server, please check you are connected to the network and there is no typo.",
errorLookingForWikiApi: "Error connecting to the wiki server, please make sure the wiki supports mediawiki api.",
mediawikiAbout: "Mediawiki API is the entry point of mediawikiUnplugged. For more information visit http://www.mediawiki.org/wiki/API",
errorGettingTiddler: "Error in importMediaWiki.onGetTiddler: ",
importMoreTiddlersButtonLabel : "Import more tiddlers...",
importMoreTiddlersButtonTooltip : "click here to import more tiddlers",
lookingUpPages: "Looking up pages...",
importingTiddlers: "importing tiddlers...",
readOnlyWarning: "You cannot import into a read-only TiddlyWiki file. Try opening it from a file:// URL",
wizardTitle: "Import content from your wiki",
openingHost: "Opening host...",
errorOpeningHost: "Error opening host",
noTiddlerToImport: "No tiddler to import in this workspace.",
recommendedMaxImports: "Max imports (100 recommended):",
filteredTiddlers: "(%0 tiddlers were filtered because they are already imported)",
next: "next",
nextTootltip: "click to go to the next step",
reset: "reset",
resetTooltip: "Clear the form and start again",
doneLabel: "done",
statusDoneImport: "All tiddlers imported",
defaultWorkspaceTitle: "",
defaultWorkspaceLabel: "Default",
loadingTiddlersMessage: "<i>loading tiddlers...</i>",
statusOpenWorkspace: "Opening the workspace",
statusGetTiddlerList: "Getting the list of available tiddlers",
noPageSelected: "You must select at least one page to import.",
errorGettingTiddlerList: "Error getting list of tiddlers, click Cancel to try again",
importLabel: "import",
importPrompt: "Import these tiddlers",
importedTiddlersTitle: "Imported tiddlers:",
confirmOverwriteText: "Are you sure you want to overwrite these tiddlers:\n\n%0",
syncNow: "sync with wiki",
syncNowTooltip: "click here to sync all the tiddlers",
syncedTiddlersMessage: "Sync finished. %0 tiddlers updated.",
conflictDetected: "conflic detected in the following tiddlers:",
moreTiddlers: 'and %0 more...',
mediaWikiFeedTag: "mediaWikiFeed",
mediaWikiTiddlersTag: "mediaWikiPage",
listViewTemplate: {
columns: [
{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector', className: 'selectorCellTiddler'},
{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler', className: 'cellTiddler'}
],
rowClasses: []}
});
merge(config.macros.importMediaWiki,{
maxImportsExceded: "<span>The number of imports must be less than " + config.maxTiddlerImportCount + "</span> To increase the number of max Imports chage the property MaxTiddlerImportCount",
lastStepTitle: "Importing %0 tiddler(s)",
remainingBarTitle: "%0 tiddler(s) remaining.",
lastStepHtml: "<br/><input type='hidden' name='" + config.macros.importMediaWiki.markReportFieldName + "'></input><br/><br/>",
serverTiddlerInputHtml: "<input type='checkbox' checked='true' name='" + config.macros.importMediaWiki.chkSaveName + "'>Save the details of this wiki server for future operations, alias:</input>"
+ "<input type='text' size=25 name='" + config.macros.importMediaWiki.serverTiddlerNameTxtField + "'>", // DO NOT TRANSLATE
step2Title: "Select pages",
step2Html: "workspace: <select name='" + config.macros.importMediaWiki.selWorkspaceName + "'></select><br>"
+ "<input type='hidden' name='" + config.macros.importMediaWiki.markListName + "'><br>"
+ "<input type='checkbox' checked='true' name='" + config.macros.importMediaWiki.chkSyncFieldName + "'>Keep these tiddlers linked to this server so that you can synchronise subsequent changes</input><br>",
step1Title: "Locate the server ",
step1Html: " Specify the type of the server: Enter the wiki server or page URL here: <input type='text' size=50 name='" + config.macros.importMediaWiki.hostInputName + "' > <br/> or select a pre-defined feed: <select name='selFeeds'><option value=''>Choose...</option></select><br>"
});
config.macros.importMediaWiki.onFeedChange = function(e)
{
var wizard = new Wizard(this);
var fileInput = wizard.getElement("txtWikiHost");
var feeds = wizard.getValue("feeds");
var f = feeds[this.value];
if(f) {
// selTypes.value = "mediawiki";
fileInput.value = f.url;
wizard.setValue("feedName","mediawiki");
wizard.setValue("feedHost",f.url);
wizard.setValue("feedWorkspace",f.workspace);
wizard.setValue("feedWorkspaceList",f.workspaceList);
wizard.setValue("feedTiddlerFilter",f.tiddlerFilter);
}
return false;
};
/*}}}*/
== Importing From TiddlyWiki Documents ==
The import wizard can be accessed via the <code>Import</code> button in the [[Backstage]] area, or directly via the [[ImportTiddlers]] shadow tiddler.
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/31a909cbfa92076b/f834180e56862b5a?#f834180e56862b5a FND]|
2=
; Step 1:
* Choose <code>TiddlyWiki</code> from the selection list at the top (this specifies the server type)
* Enter the URL of the respective TiddlyWiki in the second field
* Click on <code>open</code>
(Loading the external TiddlyWiki will take a bit.)
; Step 2:
* Choose <code>(default)</code> from the selection list at the bottom
* Click on <code>open</code>
(This step will most likely be removed in future versions.)
; Step 3:
This will present you with a list of tiddlers available for import.
* Select the desired tiddlers by checking the box to their left
* Click on <code>import</code> at the bottom
If you check the <code>Save the details of this server</code> box, you'll be able to select a preset in Step 1 later on, instead of having to manually enter the URL and type.
}}
{{Note|
Since TiddlyWiki's storage format has changed in v2.2, older TiddlyWiki documents (v2.1.3 and below) cannot use the import wizard to pull data from such newer TiddlyWiki versions.
However, manual "copy & paste" of the source tiddler contents is still possible.
Also, [http://www.TiddlyTools.com/#ImportTiddlersPlugin ImportTiddlersPlugin] (with [http://www.TiddlyTools.com/#ImportTiddlersPluginPatch ImportTiddlersPluginPatch]) provides functionality for pre-v2.2 TiddlyWikis to import from newer versions.
}}
== Importing Arbitrary Data ==
By default, content can only be imported from other [[TiddlyWiki]] documents.
[[ Server Adaptor Mechanism|Adaptors]] can be used to extend that functionality to arbitrary sources - e.g. other wiki engines like MediaWiki.
After installing an adaptor, a new entry will appear in the import wizard's server type selection.
{{Note|
[[Formatters]] might be required to support the respective data source's markup.
}}
== Limitations ==
Due to security concerns, browsers impose certain [http://en.wikipedia.org/wiki/XSS cross-site scripting] (XSS) restrictions.
This limits access to remote sources on the same host. Locally stored TiddlyWiki documents, however, can import from any site.
The restrictions can be circumvented by using a [http://tiddlywiki.bidix.info/#ProxyService proxy service] on the respective TiddlyWiki document's host domain. [[Tiddlyspot]] [http://announce.tiddlyspot.com/#%5B%5BProxy%20service%20available%20for%20Tiddlyspot%20sites%5D%5D makes use] of this.
== External Resources ==
* [http://www.TiddlyTools.com/#ImportTiddlersPlugin ImportTiddlersPlugin] and [http://www.TiddlyTools.com/#ImportTiddlersPluginPatch ImportTiddlersPluginPatch], for pre-v.2.2 TiddlyWikis
== See Also ==
* [[Plugins#Installation|Installing Plugins]]
{{Incomplete}}
* [http://tiddlywiki.abego-software.de/#IncludePlugin IncludePlugin] (provides limited support for on-demand loading)
* [http://www.tiddlytools.com/#LoadTiddlersPlugin LoadTiddlersPlugin]
* [http://www.tiddlytools.com/#ExternalTiddlersPlugin ExternalTiddlersPlugin]
* [http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/MasterIncludesPlugin/ MasterIncludesPlugin]
** supports including [[plugins]]
** fully functional, but [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/38059541fb96f4b3/ somewhat unpolished]
cf. [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/b602aa688c9fc2fa/ <nowiki>[tw]</nowiki> including external tiddlers]
{{Incomplete}}
After first [[downloading TiddlyWiki]], there are only a few options that need to be configured.
== User Preferences ==
User preferences are stored as [[cookies]] in the browser, and can thus be different for each visitor.
A default value can be assigned by using [[Permanent Options]].
The options listed here can be accessed from the [[sidebar]]'s ''Options'' slider panel.
; Username
: username to be stored when modifying a tiddler (default value is "YourName")
; EnableAnimations
: enable various animation effects; disabling this can greatly improve performance on older computer or large TiddlyWikis
=== Saving Options ===
; AutoSave
: automatically saves changes whenever a tiddler has been created or modified
; SaveBackups
: automatically saves a backup copy whenever changes are saved
The following points should be considered when deciding on saving options:
* When leaving edit mode, there is no way to "undo" a change. Backups can be helpful to avoid losing valuable information when errors are made.
* Backup copies are as large as the original file (250 kB or more). Thus using the AutoSave option in combination with SaveBackups can quickly create a vast amount of data on the hard drive.
=== Search Options ===
; CaseSensitiveSearch
: distinguishes between lowercase and uppercase characters (e.g. "foobar" does not match "FooBar")
; RegExpSearch
: enables the use of [http://en.wikipedia.org/wiki/Regular_expression regular expressions] in search terms
=== Advanced Options ===
The [[AdvancedOptions]] tiddler, accessible from the [[sidebar]]'s ''Options'' slider panel, lists all available user preferences.
== Site Settings ==
There are a number of [[shadow tiddlers]] which determine certain global aspects of the respective TiddlyWiki.
; [[SiteTitle]] and [[SiteSubtitle]]
: title and subtitle of the TiddlyWiki (in the header as well as in the browser's title bar)
; [[DefaultTiddlers]]
: a list of tiddlers to be opened on startup
; [[MainMenu]]
: a list of links for the navigation menu
To save on space, TiddlyWiki users often host images externally on sites like Flickr and ImageShack. A URL or HTML code for the image is then pasted into a tiddler (including MainMenu and SiteTitle to display images in the menu and header respectively).
Open the tiddler, position the cursor where the image is to go and paste in the link using the following formatting:
'''URL'''
<pre>
[img[URL of image]]
</pre>
'''URL with alternate text'''
<pre>
[img[alternate text|URL of image]]
</pre>
'''HTML'''
<pre>
<html>HTML code from hosting site</html>
</pre>
== Image Hosting ==
There are various free image hosting services which can be used to store pictures:
* [http://tinypic.com/index.php TinyPic]
* [http://www.imageshack.us ImageShack]
* [http://www.flickr.com Flickr]
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/7166d006b1a594f7/dcc063b6c03658c0?#dcc063b6c03658c0 Eric]|2=
<pre>
> If you could please tell me how to permanently turn off the annoying
> yellow bar for a TiddlyWiki file, that would be great.
Control Panel > Internet Options > Advanced
scroll listbox to 'Security' section
enable "Allow active content to run in files on My Computer"
close and restart IE
From then on, IE should open and run the TiddlyWiki javascript code
without the 'yellow bar' warnings.
</pre>
}}
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/c90c2dd5d74caf62/a9324d877d9329eb?#a9324d877d9329eb Marc]|2=
<pre>
the setting that worked the magic was: "initialize and script ActiveX
control not marked as safe"
I set it to "prompt" - I guess I could set it to "enable" and skip the
prompt but I like the idea of web pages not saving files locally
unless I know about it, and of course it's expect for TiddlyWiki.
</pre>
}}
== See Also ==
* [[It's not possible to save changes]]
[[Category:Browsers]]
[[Category:Browser Issues]]
{{Incomplete}}
{{Review}}
Welcome aboard.
This document will introduce you to TiddlyWiki and get you up to speed.
* [[TiddlyWiki|About TiddlyWiki]]
* [http://www.osmosoft.com/introduction Screencast: Introduction to TiddlyWiki]
__TOC__
== What is TiddlyWiki? ==
{{BoldStatement|
TiddlyWiki is a single-file, self-contained wiki for managing micro-content, written in JavaScript.
}}
If you completely understand all of that sentence, you should go straight on to the next section. For the rest of us, read on for the longer explanation.
;It's a single file
:A complete TiddlyWiki is stored in a single file on your computer, and thus belongs to the class of [http://en.wikipedia.org/wiki/Single_page_application Single Page Applications]. That makes it super-easy to move your TiddlyWiki around on a USB stick or by emailing it to yourself.
;It's self-contained
:The single file that is a TiddlyWiki contains not only all of your data, but all the machinery to edit and manipulate it. All you need is a modern web browser, like Mozilla Firefox or Microsoft Internet Explorer. You don't need to have any other special programs installed on your computer, and you don't need to be connected to the Internet.
:The same TiddlyWiki file will work on just about any computer: Windows PCs, Apple Macs, Linux and BSD boxes..
;It's a wiki
:A wiki is a collection of web pages, like a normal web site, except that every page can be edited, easily and immediately. Wiki systems are often used to collaboratively manage documention for large projects, and also sometimes used by a single user as a kind of personal notebook.
;It manages micro-content
:Most web sites and wikis manage information as pages. TiddlyWiki is different -- it saves your stuff in smaller chunks (each chunk is called a 'tiddler'). Information in small chunks like this is called 'micro-content', and once you start usingTiddlyWiki, you realise that micro-content is a natural fit to a lot of the stuff you deal with every day.
To really get an idea of what TiddlyWiki can do for you, you're going to have to try it out. Don't worry — it's a single file, remember. So go on to the next section and we will get started.
== Getting TiddlyWiki ==
Here's how to get TiddlyWiki:
'''Step 1: Download the latest version'''
The latest TiddlyWiki can be gotten by going to the [[downloading TiddlyWiki|download page]]. Follow the instructions to save it to your computer where it can be used.
Like it says on the page you're downloading from, if your browser lets you save pages in various formats, make sure you choose the plain HTML option. Remember where you saved it.
'''Step 2: ?'''
With apologies to [http://instiki.org/ Instiki], there '''''is no step 2''''' — your TiddlyWiki is ready! Wanna see it? Go to the HTML file you saved in Step 1 and open it in your web browser. See? Ready to go. Leave it on screen, and you can jump right into the next section.
{{Note|
this thing about "no step 2" needs to be replaced with a walkthrough on getting TW past various security checks, like the unlock thing that you need to do with WinXP SP2, with a particular focus on win/IE. If anyone can post me the steps required for particular os/browser combinations, I'd be much obliged :)
}}
'''Step 3: Profit!'''
cf. [http://en.wikipedia.org/wiki/Gnomes_%28South_Park_episode%29#The_Gnomes Wikipedia]
== Using TiddlyWiki ==
See [http://danielbaird.com/tiddlywikiguides/userguide-sample.html#%5B%5BUsing%20TiddlyWiki%5D%5D TiddlyWiki User's Guide].
== The TiddlyWiki Screen ==
See [http://danielbaird.com/tiddlywikiguides/userguide-sample.html#%5B%5BThe%20TiddlyWiki%20Screen%5D%5D TiddlyWiki User's Guide]
== See Also ==
* [http://danielbaird.com/tiddlywikiguides/userguide-sample.html#%5B%5BTiddlyWiki%20User's%20Guide%5D%5D TiddlyWiki User's Guide]
* [http://www.slideshare.net/guest102a23/an-introduction-to-tiddlywiki-revised/ Introduction to TiddlyWiki] (presentation slides)
See these:
* [http://visualtw.ouvaton.org/VisualTW.html#%5B%5BWysiwyg%20plugin%5D%5D WYSIWYG plugin] (requires [http://www.fckeditor.net FCKeditor])
* [http://visualtw.ouvaton.org/VisualTW.html#EasyEditPlugin EasyEditPlugin] (doesn't require any external files)
* [http://tiddlywiki.ouvaton.org/Demo.html RichTextPlugin] (requires [http://tinymce.moxiecode.com/index.php TinyMCE])
* [http://math.chapman.edu/~jipsen/asciencepad/asciencepad.html ASciencePad]
ASciencePad is an adaptation I believe, i.e. it's not a standard TW core.
This is not WYSIWYG but may be of interest:
* [http://aiddlywiki.sourceforge.net/wikibar_demo_2.html WikiBar] (Doesn't work in IE)
[[TiddlyWiki FAQ|<< Back to FAQ list]]
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
If TiddlyWiki has been downloaded using [[Internet Explorer]] on Windows XP with Service Pack 2 and stored on an [http://en.wikipedia.org/wiki/NTFS NTFS]-formatted drive, any attempts to [[save changes]] will usually fail with the following error message:
{{Quote||It's not possible to save changes. Possible reasons include:
- your browser doesn't support saving (Firefox, Internet Explorer, Safari and Opera all work if properly configured)
- the pathname to your TiddlyWiki file contains illegal characters
- the TiddlyWiki HTML file has been moved or renamed
}}
[[Image:WinXP SP2 unblock.png|thumb|right|275px|Windows XP Service Pack 2 unblocking]]
The solution is to right-click on the TiddlyWiki HTML file and choose ''Properties''.
If the file is blocked, there will be an ''Unblock'' button on the resulting property sheet, which will remove the protection and allow the file to be saved.
== See Also ==
* [http://tiddlywiki.com/#ServicePack2Problems ServicePack2Problems]
[[Category:Errors]]
[[Category:Browser Issues]]
[[Image:JeremyRuston.jpg|thumb|right|275px|Jeremy Ruston]]
{{Quote|[http://wiki.unamesa.org/wiki/User:GregWolff Greg Wolff]|
Jeremy was an early bloomer, publishing his first book at age 16 and then providing some of the first computer-generated animations to the BBC in the early 80s.
Jeremy is the creative force behind TiddlyWiki and is now opening up the world's phone system as the leader of Osmosoft, BT (think rebels meet death star... ).
As a member of the [http://www.unamesa.org UnaMesa] board, Jeremy represents the interests of the individuals and small teams who create big things.
}}
== See Also ==
* [http://jermolene.wordpress.com/ Jeremy's blog]
[[Category:Stakeholders]]
{{Incomplete}}
{{Review}}
== General ==
{|
! PC || Mac || Function
|-
| ALT+F || CTRL+F || [[Search]]
|-
| ALT+J || CTRL+J || [[NewJournal]]
|-
| ALT+N || CTRL+N || [[NewTiddler]]
|-
| ALT+S || CTRL+S || [[SaveChanges]]
|}
{{Note|
As of Firefox 2.0, the default modifier is SHIFT+ALT rather than ALT only.
}}
== Editing ==
{|
! Shortcut || Action
|-
| Ctrl-Enter || Accept changes
|-
| Shift-Ctrl-Enter || Accept minor change (do not update timestamp)
|-
| Esc || Cancel (abandon changes)
|}
== Searching ==
{|
! Shortcut || Action
|-
| Esc || Clear the search term
|}
== See Also ==
* [http://nothickmanuals.info/doku.php/cheatsheets TiddlyWiki Cheat Sheet]
[[Category:FAQ]] [[Category:Using TiddlyWiki]]
This is an early release. There are some situations in which it won't work as you expect. Be aware of the following:
# Selecting "All" when choosing pages to download can cause large amounts of browser-stall
# Long page titles will cause the table of pages to spill beyond its container
For security reasons, a Web page normally cannot directly launch executables.
However, there are two ways to circumvent this restriction:
* [http://remotely-helpful.com/TiddlyWiki/LaunchApplication.html#LaunchApplicationPlugin LaunchApplicationPlugin]: tested in Internet Explorer and Firefox, both on Linux and Windows
* [http://www.blackbit.net/frames/software.html runProtocolHandler] (Windows only): introduces a special protocol to enable the browser to access to local files
== runProtocolHandler ==
After the installation, links within TiddlyWiki can use the <code>run:</code> protocol to launch programs.
The basic syntax of the protocol placed within a TiddlyWiki tiddler is the following:
<pre>
<html><a href="run:FileOrFolderPath">Desired text for link</a></html>
</pre>
Optional parameters are <code>windowMode</code>, <code>action</code>, <code>security code</code> and <code>parameters</code>.
The full syntax is as follows (note that the carets — <code><</code> and <code>></code> — within the quotation marks in the syntax below are not to be included):
<pre>
<html>
<a href="run:[<windowMode>]{<action>}#<security code>#<FileOrFolderPath>?<parameters>">
link caption
</a>
</html>
</pre>
Please consult the [http://www.blackbit.net/freeware/readme.rph2.txt application manual] for more information.
=== Examples ===
* Opening a program or file (in this example, Windows Notepad):
<pre>
<html><a href="run:C:\Windows\NOTEPAD.EXE">Windows Notepad</a></html>
</pre>
* Opening a folder (here: Program Files):
<pre>
<html><a href="run:[Maximized]C:\Program Files\">Program Files</a></html>
</pre>
* Using an image as a launch icon:
<pre>
<html>
<a href="run:C:\Windows\NOTEPAD.EXE">
<img src="icon.png" alt="Windows Notepad" title="launch Notepad">
</a>
</html>
</pre>
[[Category:Hacks]]
{{Incomplete}}
== Usage ==
<pre>
<<list [type]>>
</pre>
=== Parameters ===
* all (default)
* missing
* orphans
* shadowed
* touched
* filter (supports [[Filtering|filters]])
[[Category:Macros]] [[Category:Core Macros]]
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
major: 1, minor: 1, revision: 0,
date: new Date("mar 17, 2007"),
source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};
if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};
bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){
url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
}
return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
{{WIP}}
A simple plugin written with jQuery to provide a message/debug logging console.
The console should be viewable in any tiddler by calling it with something like
<pre> <<LoggingConsole>> </pre>
A separate button to toggle the display should also be available anywhere via a call such as <pre><<LoggingConsole toggler>></pre>
The Logging Console should provide different levels of logging which can be individually toggled in the display.
A sensible handler would piggyback the existing console.log calls so that familiar functionality could be brought to Firebug-less browsers while retaining Firebug functionality where available.
The handler should also provide direct logging to the ConsoleLogger so that it is possible to separate calls to this logger and Firebug if desired.
http://randomibis.com/img/mptw/mptwlogosml.gif
== What is MPTW? ==
[http://mptw.tiddlyspot.com MPTW] (Formerly known as MonkeyPirateTiddlyWiki) is a [[TiddlyWiki]] [[adaptation]], a collection of plugins and interface customizations.
== Resources ==
* [http://www.encounteraday.com/2009/05/20/making-kickass-campaign-sites-with-mptw/ Making kickass campaign sites with MPTW] - a fantastic getting started guide for MPTW.
* [http://monkeypiratetiddlywiki.blogspot.com/ Blog] - the official MPTW blog
* [http://mptw.tiddlyspot.com/ MPTW] - the official MPTW web site
== Why use MPTW? ==
MonkeyPirateTiddlyWiki has all the power and convenience of standard TiddlyWiki but it includes a new way of managing your data known as [[TagglyTagging]]. This makes it easier to keep your information organized and structured. It does this using an enhanced version of the built-in tagging macro and a few other complimentary tools like the ''New Here'' button. To learn more about TagglyTagging see the FAQ and the tutorial [http://mptw.tiddlyspot.com/#TagglyTagging here]. It also has some useful inclusions unrelated to TagglyTagging, such as some custom themes and palettes along with lightweight palette and theme switchers.
== Downloading MPTW ==
To download, right-click the following link and choose ''Save link as...'' or ''Save target as...'' (depending on your browser):
* [http://mptw.tiddlyspot.com/empty.html MPTW]
=== Components ===
* [[RenameTagsPlugin]] Allows you to easily rename or delete tags across multiple tiddlers
* [[InstantTimestampPlugin]] A handy way to insert timestamps in your tiddler content
* [[ToggleTagPlugin]] Makes a checkbox which toggles a tag in a tiddler
* [[NewMeansNewPlugin]] If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on
* [[LessBackupsPlugin]] Intelligently limit the number of backup files you create
* [[HideWhenPlugin]] Allows conditional inclusion/exclusion in templates
* [[SelectThemePlugin]] Lets you easily switch theme and palette
* [[CloseOnCancelPlugin]] Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open
* [[ExtendTagButtonPlugin]] Adds a New tiddler button in the tag drop down
* [[NewHerePlugin]] Creates the new here and new journal macros
* [[QuickOpenTagPlugin]] Changes tag links to make it easier to open tags as tiddlers
* [[SaveCloseTiddlerPlugin]] Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler
* [[PrettyDatesPlugin]] Provides a new date format ('pppp') that displays times such as '2 days ago'
== See Also ==
* [[MonkeyGTD]]
* [[User:SimonBaird]]
[[Category:Adaptations]]
{{Incomplete}}
Macros provide commands to perform a variety of advanced functions in the place where they are called (usually within a [[tiddler]]).
A macro is normally called with the following syntax:
<pre>
<<macroName [parameters]>>
</pre>
In contrast to [[plugins]], a macro's code is only executed when the respective tiddler containing the macro call is rendered.
== Parameters ==
Generally, there are four ways to use macro parameters:
* no quotes: <code><<foo bar baz>></code>
* single quotes: <code><<foo 'bar' 'baz'>></code>
* double quotes: <code><<foo "bar" "baz">></code>
* double brackets: <code><nowiki><<foo [[bar]] [[baz]]>></nowiki></code>
Empty parameters (e.g. to adopt default value if the parameter is optional) are inserted by enclosing an empty string (<code><nowiki>''</nowiki></code>, <code>""</code> or <code>[[]]</code>).
There's also fifth way, using curly brackets (<code><nowiki>{{...}}</nowiki></code>) - those contents are [[#Evaluated Parameters|evaluated]], so they're only used if the parameter value has to be calculated in some way.
=== Named Parameters ===
{{Incomplete|section}}
<pre>
<<macro label:value>>
</pre>
=== Evaluated Parameters ===
Parameters enclosed in <code><nowiki>{{ ... }}</nowiki></code> are processed as [[JavaScript]] code.
== See Also ==
* [[:Category:Macros]]
* [[Core Macros]]
* [[Plugins]]
[[Category:Macros]]
The main menu, by default located on the left-hand side of the screen, usually functions an index or table of contents.
== Horizontal MainMenu ==
The default vertical MainMenu can be transformed to a horizontal menu by adding the following code to [[StyleSheet]]:
<pre>
#displayArea {
margin: 1em 15.5em 0em 1em; /* neutralize default margins */
}
#mainMenu {
position: static; /* neutralize default settings */
width: auto; /* neutralize default settings */
overflow: auto; /* contain floats */
border-bottom: 2px solid [[ColorPalette::PrimaryDark]];
padding: 0;
text-align: left;
color: [[ColorPalette::PrimaryPale]];
background-color: [[ColorPalette::PrimaryMid]];
}
#mainMenu a,
#mainMenu .button,
#mainMenu .tiddlyLink {
display: block;
float: left;
margin: 0;
padding: 0.2em 0.75em;
font-size: 1.15em;
font-weight: bold;
color: [[ColorPalette::PrimaryPale]];
}
#mainMenu a:hover,
#mainMenu .button:hover,
#mainMenu .tiddlyLink:hover {
background-color: [[ColorPalette::PrimaryDark]];
}
#mainMenu br {
display: none;
}
</pre>
{{Note|[http://trac.tiddlywiki.org/ Looking for '''Trac'''?]|float: right; margin: 0 1em 1em 0; border-style: solid; padding: 2px 5px;}}
[[TiddlyWiki]] is a free reusable, non-linear personal notebook.
[[Project:About|TiddlyWiki.org]] is the place to find documentation and resources for TiddlyWiki users and developers.
This wiki is a community effort, so active [[Project:Community Portal|participation and contributions]] are very welcome!
<!-- portal wrapper -->
<div class="portal">
<!-- top bar -->
<div class="header" style="border-width: 2px; padding: 0; text-align: center;">
[[TiddlyWiki]]
[[Project:About|TiddlyWiki.org]]
[[Project:Policy|Policy]]
[[Help:Contents|Help]]
</div>
<!-- right column wrapper -->
<div style="float: right; width: 32%;">
<!-- upper panel -->
<div class="panel">
== Information for Developers ==
=== Guides ===
* [[Dev:Translation|Translation]]
* [[Dev:Core Code Overview|Core Code]]
* [[Dev:Plugins|Writing Plugins]]
* [[Dev:Macros|Writing Macros]]
<h3 style="margin-top: 0.5em;"> Resources </h3>
* [[Dev:Code Repository|Code Repository]]
* [[Dev:Tickets|Tickets (Bug Tracking)]]
* [http://groups.google.com/group/TiddlyWikiDev/ Developers'] mailing list
* [[Dev:Nightly Builds|Nightly Builds]]
* [[Dev:Tools|Developer Tools]]
* [[Dev:Hot Issues|Hot Issues]]
{{Help:Developer Search}}
<!-- end of upper panel -->
</div>
<!-- lower panel -->
<div class="panel">
== Participate ==
<createbox>
break=yes
buttonlabel=Create New Article
</createbox>
<!-- end of lower panel -->
</div>
<!-- end of right column wrapper -->
</div>
<!-- left column wrapper -->
<div style="margin-right: 33.5%;">
<!-- upper panel -->
<div class="panel">
== Information for Users ==
<!-- left column -->
<div style="float: left; width: 48%; margin-right: 2em; padding: 0;">
=== Basics ===
* [[Introduction]]
* [[TiddlyWiki Markup]]
* [[Components]]
* [[Configuration]]
* [[Content Management]]
* [[Troubleshooting]]
* [[TiddlyWiki FAQ|FAQ]]
<!-- end of left column -->
</div>
<!-- right column -->
<div style="float: left; padding: 0;">
=== Advanced Features ===
* [[Customization]]
* [[Macros]]
* [[Plugins]]
* [[Scripts]]
* [[Server-Side Solutions]]
<!-- end of right column -->
</div>
<!-- end of upper panel -->
<div style="clear: left;"></div>
</div>
<!-- lower panel -->
<div class="panel">
== Additional Resources ==
=== Beginner's Guides ===
* [http://tiddlywiki.com/#GettingStarted Getting Started] on TiddlyWiki.com
* [http://www.giffmex.org/twfortherestofus.html TiddlyWiki for the Rest of Us] by Dave Gifford
* [http://tiddlyspot.com/twhelp/ TW Help] by Morris Gray
* [[TiddlyWiki Resources|more...]]
=== Services ===
* [http://groups.google.com/group/TiddlyWiki Community Support] mailing list at Google Groups
* [http://www.tiddlyspot.com TiddlySpot] (free TiddlyWiki hosting)
=== Adaptations ===
* [[MPTW]]
* [[TeamTasks]]
* [[RippleRap]]
* [[:Category:Adaptations|more...]]
<!-- end of lower panel -->
</div>
<!-- end of left column wrapper -->
</div>
<!-- end of portal wrapper -->
</div>
<div style="clear: both;"></div>
<tagcloud style="margin-top: 2em;"></tagcloud>
__NOTOC__
__NOEDITSECTION__
{{whiteGray{<<tabs txtMainTab
"Articles" "All articles" TabAll
"Tags" "All tags" TabTags
"Timeline" "All Tiddlers sorted be modification date" TabTimeline
"More" "More lists" TabMore
"Edit" "Edit options" SideBarOptions
>>}}}
Markdown is a collaboratively standardized markup language. See its [http://daringfireball.net/projects/markdown/ official site] for the full specification. The idea is that it looks almost the same in plain text as it does after its rendered. That is to say one whom isn't familiar with any type of technical markup language such as <nowiki>[X]HTML</nowiki> should be able to read and comprehend the raw markdown source code of a document. There are a number of implementations for it, and the end product is always some form of HTML. It is available as a formatter plugin for TiddlyWiki [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/MarkdownFormatterPlugin.js here].
Make sure to tag any tiddler that uses Markdown with the tag MarkdownFormat for this to take effect.
<div style="width: 80%; margin: 0.5em auto; border: 1px solid #730; padding: 5px; font-size: 0.8em;background-color: #EC5;">
<p style="float: right; font-size: 0.9em;">[[{{fullurl:{{FULLPAGENAME}}|useskin=monobook}} view this page with the default skin (Monobook)]]</p>
<span style="margin-right: 0.5em; font-weight: bold;">TW4MW (beta)</span>
This skin is still heavily work in progress.
You can help improving it by [[User_talk:FND/MediaWiki_Skin|reporting bugs]].
</div>
/* <source lang="css"> */
/*
** CSS placed here will be applied to all skins
*/
/* monospaced blocks */
pre {
overflow: auto;
}
/* separators */
hr {
height: 2px;
width: 90%;
margin: 1em auto;
background-color: #025E9D;
}
/* images */
#pageContents .thumbimage {
background-color: #FFF;
}
/* tables */
table.wikitable {
border-collapse: collapse;
}
table.wikitable th,
table.wikitable td {
border: 1px solid #000;
padding: 5px;
}
table.wikitable th {
background-color: #EEE;
}
/* UniversalWikiEditButton (cf. http://www.aboutus.org/UniversalWikiEditButton) */
#p-cactions #ca-edit a {
padding-left: 20px !important;
background-image: url(http://www.tiddlywiki.org/upload/5/57/UniversalWikiEditButton.png);
background-repeat: no-repeat;
background-position: top left;
}
/* Folding Multi Wiki Tabs by Splarka (http://www.wikia.com/wiki/User:Splarka/tricks) */
.foldtabSet {
position: relative;
margin: 1.5em 0 1em;
}
.foldtabBox {
position: relative;
padding: 0.5em;
background-color:#FFF;
overflow: auto;
border: 1px solid #AAA;
z-index: 1;
}
.foldtabHead a {
position: relative;
left: 0.5em;
border: 1px solid #AAA;
padding: 0.13em 1em;
font-size: 150%;
text-decoration: none;
color: #00A;
background-color: #E0E0FF;
background-color: #F0F0F0;
z-index: 0;
}
.foldtabHead a.selected {
top: -0.10em;
border-width: 2px;
border-bottom: none;
background-color: #FFF;
z-index: 2;
}
.foldtabHead p {
margin: 0;
padding: 0;
}
/* TalkHere area */
#talkhere {
margin-top: 5em;
border-top: 3px solid;
padding-top: 2em;
}
.talkhere-foot {
margin: 2em 0 1em;
}
.talkhere-talklink {
margin: 0;
}
.talkhere-talklink a {
padding: 4px;
color: #4C4C4C;
background-color: #C5C5C5;
border: 2px solid;
border-top-color: #DFDFDF;
border-left-color: #DFDFDF;
border-bottom-color: #4E4E4E;
border-right-color: #4E4E4E;
}
.talkhere-foot p,
.talkhere-foot hr {
display: none;
}
.talkhere-comments .editsection {
display: inline;
}
@media print {
#talkhere {
display: none;
}
}
/* Wiki Category Tag Cloud */
.tagcloud {
width: 90%;
margin: 1em auto;
text-align: center;
background-color: #FDFDFD;
border: 1px solid #EEE;
padding: 1em;
}
.tagcloud a {
margin: 0 1em;
font-weight: bold;
}
/* TransformChanges */
table.changes {
border: none;
}
table.changes tr,
table.changes td {
margin: 0;
padding: 0;
}
table.changes tr.even {
background: #F8F8F8;
}
table.changes tr.odd {
background:#EEE;
}
table.changes td {
padding: 1px 4px;
vertical-align: middle;
}
table.changes td.heading {
font-size: 1.1em;
font-weight: bold;
padding-top: 10px;
}
table.changes td.comment,
table.changes td.talk,
table.changes td.diff {
font-size: 0.9em;
}
table.changes td.user,
table.changes td.talk,
table.changes td.diff,
table.changes td.info {
white-space: nowrap;
}
/* Front Page */
.page-Main_Page #contentSub {
display: none;
}
.page-Main_Page .portal {
clear: both;
width: 95%;
margin: 2em auto;
}
.page-Main_Page .header,
.page-Main_Page .panel {
margin-bottom: 1em;
border: 1px solid #AAA;
background-color: #EFF7FF;
}
.page-Main_Page .header {
border-width: 2px;
text-align: center;
}
.page-Main_Page .header a {
margin: 0 1.5em;
}
.page-Main_Page .panel {
padding: 5px;
}
.page-Main_Page .panel h2 {
margin-top: -5px !important;
margin-right: -5px !important;
margin-left: -5px !important;
border-bottom: 1px solid #AAA;
padding: 2px 0 !important;
font-size: 120%;
font-weight: bold;
text-indent: 0.5em;
font-variant: small-caps;
background-color: #F0F0F0;
}
.page-Main_Page .panel h3 {
margin: 0 0 0.2em !important;
padding: 0 !important;
border: 0 !important;
}
.page-Main_Page .panel ul {
margin-top: 0;
margin-bottom: 0.5em !important;
}
/* </source> */
'''Note:''' An alternative skin, [http://www.tiddlywiki.org/index.php?title=Main_Page&useskin=tw4mw TW4MW] (work in progress), is available from the [[Special:Preferences|user preferences]].
TiddlyWiki Community Wiki
/***
|''Name:''|MediaWikiAdaptorPlugin|
|''Description:''|Adaptor for moving and converting data from MediaWikis|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#MediaWikiAdaptorPlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/MediaWikiAdaptorPlugin.js |
|''Version:''|0.8.14|
|''Date:''|Jul 27, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.4.1|
|''Max number of tiddlers to download''|<<option txtMediaWikiAdaptorLimit>>|
MediaWiki REST documentation is at:
http://meta.wikimedia.org/w/api.php
http://meta.wikimedia.org/w/query.php
''For debug:''
|''Default MediaWiki username''|<<option txtMediaWikiUsername>>|
|''Default MediaWiki password''|<<option txtMediaWikiPassword>>|
***/
//{{{
if(!config.options.txtMediaWikiUsername)
{config.options.txtMediaWikiUsername = '';}
if(!config.options.txtMediaWikiPassword)
{config.options.txtMediaWikiPassword = '';}
//}}}
//{{{
if(!config.adaptors.mediawiki) {
if(config.options.txtMediaWikiAdaptorLimit == undefined)
{config.options.txtMediaWikiAdaptorLimit = '500';}
config.adaptors.mediawiki = function() {};
(function(adaptor) {
adaptor.prototype = new AdaptorBase();
adaptor.serverType = 'mediawiki';
adaptor.serverParsingErrorMessage = "Error parsing result from server";
adaptor.errorInFunctionMessage = "Error in function MediaWikiAdaptor.%0";
adaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password)
{
return httpReq('GET',uri,callback,params,headers,data,contentType,username,password);
};
adaptor.doHttpPOST = function(uri,callback,params,headers,data,contentType,username,password)
{
return httpReq('POST',uri,callback,params,headers,data,contentType,username,password);
};
adaptor.minHostName = function(host)
{
return host ? host.replace(/^http:\/\//,'').replace(/\/$/,'') : '';
};
adaptor.normalizedTitle = function(title)
{
var n = title.charAt(0).toUpperCase() + title.substr(1);
return n.replace(/\s/g,'_');
};
adaptor.dateFromTimestamp = function(timestamp)
// Convert a MediaWiki timestamp in ISO 8601 (YYYY-MM-DDThh:mm:ssZ) format into a JavaScript Date object
{
var dt = timestamp;
return new Date(Date.UTC(dt.substr(0,4),dt.substr(5,2)-1,dt.substr(8,2),dt.substr(11,2),dt.substr(14,2)));
};
adaptor.anyChild = function(obj)
{
for(var key in obj) {
if(typeof obj[key]!='function')
return obj[key];
}
return null;
};
adaptor.prototype.complete = function(context,fn)
{
context.complete = fn;
var ret;
if(context.sessionToken) {
ret = context.complete(context,context.userParams);
} else {
ret = this.login(context);
}
return ret;
};
adaptor.prototype.login = function(context)
{
var host = this.fullHostName(context.host);
var uriTemplate = '%0/api.php?action=login&format=json&lgname=%1&lgpassword=%2';
var uri = uriTemplate.format([host,escape(config.options.txtMediaWikiUsername),escape(config.options.txtMediaWikiPassword)]);
var req = adaptor.doHttpPOST(uri,adaptor.loginCallback,context,{"Content-Length":"1"}," ");
return typeof req == 'string' ? req : true;
};
adaptor.loginCallback = function(status,context,responseText,uri,xhr)
{
if(status) {
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,adaptor.serverParsingErrorMessage);
if(context.complete)
context.complete(context,context.userParams);
return;
}
context.status = true;
context.sessionToken = info.login.lgtoken;
if(context.complete)
context.complete(context,context.userParams);
} else {
context.status = false;
context.statusText = xhr.statusText;
if(context.callback)
context.callback(context,context.userParams);
}
};
adaptor.getWorkspaceId = function(workspace)
{
var workspaces = {
"media": -2, "special":-1,
"":0, "talk":1,"user":2,"user talk":3,"meta":4,"meta talk":5,"image":6,"image talk":7,
"mediawiki":8,"mediawiki talk":9,"template":10,"template talk":11,"help":12,"help talk":13,
"category":14,"category talk":15};
workspace = workspace.toLowerCase();
var id = workspaces[workspace];
if(!id) {
if(workspace=="" || workspace=="main")
id = 0;
else if(workspace.lastIndexOf("talk") != -1)
id = 5;
else
id = 4;
}
return id;
};
adaptor.prototype.openWorkspace = function(workspace,context,userParams,callback)
{
if(!workspace)
workspace = "";
this.workspace = workspace;
this.workspaceId = null;
context = this.setContext(context,userParams,callback);
if(workspace) {
if(context.workspaces) {
for(var i=0;i<context.workspaces.length;i++) {
if(context.workspaces[i].name == workspace) {
this.workspaceId = context.workspaces[i].id;
break;
}
}
} else {
workspace = workspace.toLowerCase();
this.workspaceId = adaptor.getWorkspaceId(workspace);
}
}
if(!this.workspaceId) {
if(workspace=="" || workspace.toLowerCase()=="main")
this.workspaceId = 0;
else if(workspace.lastIndexOf("talk") != -1)
this.workspaceId = 5;
else
this.workspaceId = 4;
}
if(context.callback) {
context.status = true;
window.setTimeout(function() {callback(context,userParams);},0);
}
return true;
};
adaptor.prototype.getWorkspaceList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
if(context.workspace) {
context.status = true;
context.workspaces = [{name:context.workspace,title:context.workspace}];
if(context.callback)
window.setTimeout(function() {callback(context,userParams);},0);
return true;
}
var uriTemplate = '%0/api.php?format=json&action=query&meta=siteinfo&siprop=namespaces';
var uri = uriTemplate.format([context.host]);
var req = adaptor.doHttpGET(uri,adaptor.getWorkspaceListCallback,context);
return typeof req == 'string' ? req : true;
};
adaptor.getWorkspaceListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,adaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
var namespaces = info.query.namespaces;
var list = [];
for(var i in namespaces) {
var item = {};
item.id = namespaces[i]['id'];
item.title = namespaces[i]['*'];
item.name = item.title;
list.push(item);
}
context.workspaces = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
context.statusCode = xhr.status;
}
if(context.callback)
context.callback(context,context.userParams);
};
adaptor.prototype.getTiddlerList = function(context,userParams,callback,filter)
// get a list of the tiddlers in the current workspace
{
context = this.setContext(context,userParams,callback);
if(!context.filter)
context.filter = filter;
context.tiddlers = [];
context.uri = null;
var host = this.fullHostName(context.host);
if(!context.tiddlerLimit)
context.tiddlerLimit = !config.options.txtMediaWikiAdaptorLimit ? config.maxTiddlerImportCount : config.options.txtMediaWikiAdaptorLimit;
context.tiddlerLimit = parseInt(context.tiddlerLimit,10);
var limit = context.tiddlerLimit;
if(limit>500)
limit = 500;
filter = context.filter;
if(host.indexOf('wikipedia.org')!=-1) {
if(!filter) {
filter = '[template[Featured_article]]';
}
}
if(filter) {
var re = /\[(\w+)\[([ \w\.\:]+)\]\]/;
var match = re.exec(filter);
if(match) {
var filterParams = adaptor.normalizedTitle(match[2]);
switch(match[1]) {
case 'tag':
context.responseType = 'query.categorymembers';
var uriTemplate = '%0/api.php?format=json&action=query&list=categorymembers&cmnamespace=%1&cmlimit=%2&cmtitle=Category:%3';
break;
case 'template':
context.responseType = 'query.embeddedin';
uriTemplate = '%0/api.php?format=json&action=query&list=embeddedin&einamespace=%1&eititle=Template:%3';
if(limit)
uriTemplate += '&eilimit=%2';
break;
case 'wikipedia':
context.responseType = 'query.embeddedin';
uriTemplate = '%0/api.php?format=json&action=query&list=embeddedin&einamespace=1&eititle=Wikipedia:%3';
if(limit)
uriTemplate += '&eilimit=%2';
break;
default:
break;
}
} else {
var params = filter.parseParams('anon',null,false);
for(var i=1; i<params.length; i++) {
var tiddler = new Tiddler(params[i].value);
tiddler.fields.workspaceId = this.workspaceId;
context.tiddlers.push(tiddler);
}
context.status = true;
if(context.callback)
window.setTimeout(function() {callback(context,userParams);},0);
return true;
}
} else {
context.responseType = 'query.pages';
uriTemplate = '%0/api.php?format=json&action=query&generator=allpages&gapfilterredir=nonredirects&gapfrom=%4&prop=info';
if(this.workspaceId != 0)
uriTemplate += '&gapnamespace=%1';
if(limit) {
uriTemplate += '&gaplimit=%2';
context.gaplimit = limit;
}
context.count = 0;
context.uri = uriTemplate.format([host,this.workspaceId,limit,filterParams,'%0']);
context.urifrom = 'gapfrom';
}
var from = '0';
var uri = uriTemplate.format([host,this.workspaceId,limit,filterParams,from]);
var req = adaptor.doHttpGET(uri,adaptor.getTiddlerListCallback,context);
return typeof req == 'string' ? req : true;
};
adaptor.getTiddlerListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = adaptor.errorInFunctionMessage.format(['getTiddlerListCallback']);
if(status) {
try {
eval('var info=' + responseText);
var pages;
if(context.responseType == 'query.embeddedin')
pages = info.query.embeddedin;
else if(context.responseType == 'query.categorymembers')
pages = info.query.categorymembers;
else if(context.responseType == 'query.allpages')
pages = info.query.allpages;
else if(context.responseType == 'query.pages')
pages = info.query.pages;
else
pages = info.pages;
var c = null;
if(info['query-continue']) {
if(info['query-continue'].allpages) {
c = adaptor.normalizedTitle(info['query-continue'].allpages[context.urifrom]);
context.count += context.gaplimit;
if(context.count>=context.tiddlerLimit)
c = null;
}
}
var useMain = false;
if(context.workspace=="Talk" && context.filter)
useMain = true;
for(i in pages) {
var title = pages[i].title;
if(useMain&&title)
title = title.replace(/^Talk:/g,"");
if(title && !store.isShadowTiddler(title)) {
tiddler = new Tiddler(title);
tiddler.fields.workspaceId = useMain ? 0 : pages[i].ns;
if(!useMain)
tiddler.fields['temp.size'] = pages[i].length;
context.tiddlers.push(tiddler);
}
}
} catch (ex) {
context.statusText = exceptionText(ex,adaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.uri && c) {
var u = context.uri.format([c]);
var req = adaptor.doHttpGET(u,adaptor.getTiddlerListCallback,context);
} else {
if(context.callback)
context.callback(context,context.userParams);
}
};
adaptor.prototype.generateTiddlerInfo = function(tiddler)
{
var info = {};
var host = this && this.host ? this.host : tiddler.fields['server.host'];
host = this.fullHostName(host);
if(host.match(/w\/$/)) {
host = host.replace(/w\/$/,'');
var uriTemplate = '%0wiki/%2';
} else {
uriTemplate = '%0/index.php?title=%2';
}
info.uri = uriTemplate.format([host,this.workspace,tiddler.title]);
return info;
};
adaptor.prototype.getTiddlerRevision = function(title,revision,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
context.revision = revision;
return this.getTiddler(title,context,userParams,callback);
};
adaptor.prototype.getTiddler = function(title,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
context.title = title;
var host = this.fullHostName(context.host);
var uriTemplate = '%0/api.php?format=json&action=query&prop=revisions&titles=%1&rvprop=content|timestamp|user|ids';
if(context.revision)
uriTemplate += '&rvstartid=%2&rvlimit=1';
var uri = uriTemplate.format([host,adaptor.normalizedTitle(context.title),context.revision]);
context.tiddler = new Tiddler(context.title);
context.tiddler.fields.wikiformat = 'mediawiki';
context.tiddler.fields['server'] = null;
context.tiddler.fields['server.host'] = adaptor.minHostName(host);
var req = adaptor.doHttpGET(uri,adaptor.getTiddlerCallback,context);
return typeof req == 'string' ? req : true;
};
adaptor.prototype.getTiddlerPostProcess = function(context)
{
return context.tiddler;
};
adaptor.getTiddlerCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
var content = null;
try {
eval('var info=' + responseText);
var page = adaptor.anyChild(info.query.pages);
var revision = adaptor.anyChild(page.revisions);
var text = revision['*'];
context.tiddler.fields['server.page.revision'] = String(revision['revid']);
context.tiddler.fields['server.page.timestamp'] = String(revision['timestamp']);
var host = context.tiddler.fields['server.host'];
if(host.indexOf('wikipedia')==-1) {
context.tiddler.modified = adaptor.dateFromTimestamp(revision['timestamp']);
context.tiddler.modifier = revision.user;
} else {
// content is from wikipedia
context.tiddler.created = version.date;
context.tiddler.modified= version.date;
// remove links to other language articles
text = text.replace(/\[\[[a-z\-]{2,12}:(?:.*?)\]\](?:\r?)(?:\n?)/g,'');
}
context.tiddler.text = text;
var catRegExp = /\[\[(Category:[^|\]]*?)\]\]/mg;
var tags = '';
var delim = '';
catRegExp.lastIndex = 0;
var match = catRegExp.exec(text);
while(match) {
tags += delim;
if(match[1].indexOf(' ')==-1)
tags += match[1];
else
tags += '[[' + match[1] + ']]';
delim = ' ';
match = catRegExp.exec(text);
}
context.tiddler.tags = tags.readBracketedList();
context.tiddler = context.adaptor.getTiddlerPostProcess.call(context.adaptor,context);
} catch (ex) {
context.statusText = exceptionText(ex,adaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
adaptor.prototype.getTiddlerRevisionList = function(title,limit,context,userParams,callback)
// get a list of the revisions for a tiddler
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '%0/api.php?format=json&action=query&prop=revisions&titles=%1&rvlimit=%2&rvprop=ids|flags|timestamp|user|comment';
if(!limit)
limit = 5;
var host = this.fullHostName(context.host);
var uri = uriTemplate.format([host,adaptor.normalizedTitle(title),limit]);
var req = adaptor.doHttpGET(uri,adaptor.getTiddlerRevisionListCallback,context);
return typeof req == 'string' ? req : true;
};
adaptor.getTiddlerRevisionListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
var content = null;
try {
eval('var info=' + responseText);
var page = adaptor.anyChild(info.query.pages);
var title = page.title;
var revisions = page.revisions;
var list = [];
for(var i=0;i<revisions.length;i++) {
var tiddler = new Tiddler(title);
tiddler.modified = adaptor.dateFromTimestamp(revisions[i].timestamp);
tiddler.modifier = revisions[i].user;
tiddler.fields.comment = revisions[i].comment;
tiddler.fields['server.page.id'] = adaptor.normalizedTitle(title);
tiddler.fields['server.page.name'] = title;
tiddler.fields['server.page.revision'] = String(revisions[i].revid);
list.push(tiddler);
}
context.revisions = list;
} catch (ex) {
context.statusText = exceptionText(ex,adaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
adaptor.prototype.putTiddler = function(tiddler,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
context.tiddler = tiddler;
context.title = tiddler.title;
return this.complete(context,adaptor.putTiddlerComplete);
};
adaptor.putTiddlerComplete = function(context,userParams)
{
var uriTemplate = '%0/api.php?format=json&action=query&prop=info|revisions&intoken=edit&titles=%1';
var uri = uriTemplate.format([context.host,escape(adaptor.normalizedTitle(context.tiddler.title))]);
var req = adaptor.doHttpGET(uri,adaptor.putTiddlerCallback,context);
return typeof req == 'string' ? req : true;
};
adaptor.putTiddlerCallback = function(status,context,responseText,uri,xhr)
{
if(status) {
try {
eval('var info=' + responseText);
var page = adaptor.anyChild(info.query.pages);
var token = page.edittoken;
token = token.substr(0,token.length-2) + '%2B%5C';
} catch (ex) {
context.statusText = exceptionText(ex,adaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
var uriTemplate = '%0/api.php?format=json&action=edit&title=%1&text=%2&basetimestamp=%3&token=%4';
var tiddler = context.tiddler;
var timestamp = tiddler.fields['server.page.timestamp'];
uri = uriTemplate.format([context.host,escape(adaptor.normalizedTitle(tiddler.title)),escape(tiddler.text),timestamp,token]);
var req = adaptor.doHttpPOST(uri,adaptor.putTiddlerCallback2,context,{"Content-Length":"1"}," ","application/x-www-form-urlencoded");
} else {
context.status = false;
context.statusText = xhr.statusText;
if(context.callback)
context.callback(context,context.userParams);
}
};
adaptor.putTiddlerCallback2 = function(status,context,responseText,uri,xhr)
{
var info;
context.statusText = xhr.statusText;
try {
eval('info=' + responseText + ';');
} catch(ex) {
status = false;
context.status = false;
context.statusText = 'putTiddler exception';
}
if(status) {
context.status = true;
} else {
context.status = false;
}
if(info && info.error) {
context.status = false;
context.statusText = info.error.info;
}
if(context.callback)
context.callback(context,context.userParams);
};
/*adaptor.prototype.deleteTiddler = function(tiddler,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
context.title = tiddler.title;
return this.complete(context,adaptor.deleteTiddlerComplete);
};*/
adaptor.deleteTiddlerComplete = function(context,userParams)
{
var uriTemplate = '%0/api.php?format=json&action=query&prop=intoken=edit&titles=%1';
var uri = uriTemplate.format([context.host,escape(adaptor.normalizedTitle(context.tiddler.title))]);
var req = adaptor.doHttpGET(uri,adaptor.deleteTiddlerCallback,context);
return typeof req == 'string' ? req : true;
};
adaptor.deleteTiddlerCallback = function(context,userParams)
{
if(status) {
try {
eval('var info=' + responseText);
var page = adaptor.anyChild(info.query.pages);
var token = page.edittoken;
token = token.substr(0,token.length-2) + '%2B%5C';
} catch (ex) {
context.statusText = exceptionText(ex,adaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
var uriTemplate = '%0/api.php?action=delete&title=%1&token=%2';
var uri = uriTemplate.format([context.host,context.workspace,escape(adaptor.normalizedTitle(context.title)),token]);
var req = adaptor.doHttpPOST(uri,adaptor.deleteTiddlerCallback,context,{"Content-Length":"1"}," ");
} else {
context.status = false;
context.statusText = xhr.statusText;
if(context.callback)
context.callback(context,context.userParams);
}
};
adaptor.deleteTiddlerCallback2 = function(status,context,responseText,uri,xhr)
{
if(status) {
context.status = true;
} else {
context.status = false;
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
})(config.adaptors.mediawiki);
} // end of 'install only once'
//}}}
/***
|''Name:''|MediaWikiFormatterPlugin|
|''Description:''|Allows Tiddlers to use [[MediaWiki|http://meta.wikimedia.org/wiki/Help:Wikitext]] ([[WikiPedia|http://meta.wikipedia.org/]]) text formatting|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#MediaWikiFormatterPlugin |
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/MediaWikiFormatterPlugin.js |
|''Version:''|0.5.14|
|''Date:''|Jul 27, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.1.0|
|''Display instrumentation''|<<option chkDisplayInstrumentation>>|
|''Allow zooming of thumbnail images''|<<option chkMediaWikiDisplayEnableThumbZoom>>|
|''List references''|<<option chkMediaWikiListReferences>>|
|''Display unsupported magic words''|<<option chkDisplayMediaWikiMagicWords>>|
|''Use host images''|<<option chkUseHostImages>>|
This is the MediaWikiFormatterPlugin, which allows you to insert MediaWiki formated text into a TiddlyWiki.
The aim is not to fully emulate MediaWiki, but to allow you to work with MediaWiki content off-line and then resync the content with your MediaWiki later on, with the expectation that only minor edits will be required.
To use MediaWiki format in a Tiddler, tag the Tiddler with MediaWikiFormat or set the tiddler's {{{wikiformat}}} extended field to {{{mediawiki}}}.
!!!Issues
There are (at least) the following known issues:
# Not all styles from http://meta.wikimedia.org/wiki/MediaWiki:Common.css incorporated
## Styles for tables don't yet match Wikipedia styles.
## Styles for image galleries don't yet match Wikipedia styles.
# Anchors not yet supported.
!!!Not supported
# Template parser functions (also called colon functions) http://meta.wikimedia.org/wiki/ParserFunctions eg {{ #functionname: argument 1 | argument 2 | argument 3... }}
# Magic words and variables http://meta.wikimedia.org/wiki/Help:Magic_words eg {{{__TOC__}}}, {{CURRENTDAY}}, {{PAGENAME}}
# {{{^''}}} (italic at start of line) indents, makes italic and quotes with guilmot quote
!!!No plans to support
# Template substitution on save http://meta.wikimedia.org/wiki/Help:Substitution eg {{ subst: templatename }}
***/
//{{{
// Ensure that the MediaWikiFormatter Plugin is only installed once.
if(!version.extensions.MediaWikiFormatterPlugin) {
version.extensions.MediaWikiFormatterPlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('MediaWikiFormatterPlugin requires TiddlyWiki 2.1 or later.');}
if(config.options.chkDisplayInstrumentation == undefined)
{config.options.chkDisplayInstrumentation = false;}
if(config.options.chkMediaWikiDisplayEnableThumbZoom == undefined)
{config.options.chkMediaWikiDisplayEnableThumbZoom = false;}
if(config.options.chkMediaWikiListReferences == undefined)
{config.options.chkMediaWikiListReferences = false;}
if(config.options.chkDisplayMediaWikiMagicWords == undefined)
{config.options.chkDisplayMediaWikiMagicWords = false;}
if(config.options.chkUseHostImages == undefined)
{config.options.chkUseHostImages = false;}
//<div class='viewer' macro='view text wikified'></div>;
config.macros.include = {};
config.macros.include.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
if((tiddler instanceof Tiddler) && params[0]) {
var host = store.getValue(tiddler,'server.host');
if(host && host.indexOf('wikipedia')!=-1) {
var t = store.fetchTiddler(params[0]);
var text = store.getValue(t,'text');
wikify(text,place,highlightHack,tiddler);
}
}
};
MediaWikiFormatter = {}; // 'namespace' for local functions
mwDebug = function(out,str)
{
createTiddlyText(out,str.replace(/\n/mg,'\\n').replace(/\r/mg,'RR'));
createTiddlyElement2(out,'br');
};
MediaWikiFormatter.Tiddler_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
if((this.fields.wikiformat==config.parsers.mediawikiFormatter.format) || this.isTagged(config.parsers.mediawikiFormatter.formatTag)) {
this.links = [];
var tiddlerLinkRegExp = /\[\[(?::?([A-Za-z]{2,}:)?)(#?)([^\|\]]*?)(?:(\]\])|(\|(.*?)\]\]))/mg;
tiddlerLinkRegExp.lastIndex = 0;
var match = tiddlerLinkRegExp.exec(this.text);
while(match) {
if(!match[1] && !match[2])
this.links.pushUnique(match[3]);
match = tiddlerLinkRegExp.exec(this.text);
}
} else if(!this.isTagged('systemConfig')) {
MediaWikiFormatter.Tiddler_changed.apply(this,arguments);
return;
}
this.linksUpdated = true;
};
TiddlyWiki.prototype.getMediaWikiPagesInNamespace = function(namespace)
{
var results = [];
this.forEachTiddler(function(title,tiddler) {
if(tiddler.title.indexOf(namespace)==0)
results.push(tiddler);
});
results.sort(function(a,b) {return a.title < b.title ? -1 : +1;});
return results;
};
TiddlyWiki.prototype.getMediaWikiPages = function()
{
var results = [];
this.forEachTiddler(function(title,tiddler) {
if(!tiddler.isTagged('excludeLists') && tiddler.title.indexOf(':')==-1)
results.push(tiddler);
});
results.sort(function(a,b) {return a.title < b.title ? -1 : +1;});
return results;
};
TiddlyWiki.prototype.getMediaWikiOtherPages = function()
{
var results = [];
this.forEachTiddler(function(title,tiddler) {
if(!tiddler.isTagged('excludeLists') && tiddler.title.indexOf(':')!=-1)
results.push(tiddler);
});
results.sort(function(a,b) {return a.title < b.title ? -1 : +1;});
return results;
};
config.macros.list.otherpages = {};
config.macros.list.otherpages.handler = function(params)
{
return store.getMediaWikiOtherPages();
};
config.macros.list.templates = {};
config.macros.list.templates.handler = function(params)
{
return store.getMediaWikiPagesInNamespace('Template:');
};
config.macros.list.categories = {};
config.macros.list.categories.handler = function(params)
{
return store.getMediaWikiPagesInNamespace('Category:');
};
function createTiddlyElement2(parent,element)
{
return parent.appendChild(document.createElement(element));
}
config.formatterHelpers.createElementAndWikify = function(w)
{
w.subWikifyTerm(createTiddlyElement2(w.output,this.element),this.termRegExp);
};
MediaWikiFormatter.hijackListAll = function ()
{
MediaWikiFormatter.oldListAll = config.macros.list.all.handler;
config.macros.list.all.handler = function(params) {
return store.getMediaWikiPages();
};
};
MediaWikiFormatter.hijackListAll();
MediaWikiFormatter.fullHostName = function(host)
{
if(!host)
return '';
host = host.trim();
if(!host.match(/:\/\//))
host = 'http://' + host;
if(host.substr(host.length-1) != '/')
host = host + '/';
return host;
};
MediaWikiFormatter.normalizedTitle = function(title)
{
title = title.trim();
var n = title.charAt(0).toUpperCase() + title.substr(1);
return n.replace(/\s/g,'_');
};
MediaWikiFormatter.readToDelim = function(w)
//!!! this is a bit rubish, needs doing properly.
{
var dRegExp = /\|/mg;
var sRegExp = /\[\[/mg;
var tRegExp = /\]\]/mg;
dRegExp.lastIndex = w.startMatch;
var dMatch = dRegExp.exec(w.source);
sRegExp.lastIndex = w.startMatch;
var sMatch = sRegExp.exec(w.source);
tRegExp.lastIndex = w.startMatch;
var tMatch = tRegExp.exec(w.source);
if(!tMatch) {
return false;
}
while(sMatch && sMatch.index<tMatch.index) {
if(dMatch && dMatch.index<sMatch.index) {
w.nextMatch = dRegExp.lastIndex;
w.matchLength = dMatch.index - w.startMatch;
return true;
}
tRegExp.lastIndex = sRegExp.lastIndex;
tMatch = tRegExp.exec(w.source);
w.nextMatch = tRegExp.lastIndex;
dRegExp.lastIndex = w.nextMatch;
dMatch = dRegExp.exec(w.source);
sRegExp.lastIndex = w.nextMatch;
sMatch = sRegExp.exec(w.source);
tRegExp.lastIndex = w.nextMatch;
tMatch = tRegExp.exec(w.source);
}
if(dMatch && dMatch.index<tMatch.index) {
w.nextMatch = dRegExp.lastIndex;
w.matchLength = dMatch.index - w.startMatch;
return true;
}
if(tMatch) {
w.nextMatch = tRegExp.lastIndex;
w.matchLength = tMatch.index - w.startMatch;
return false;
}
w.nextMatch = tRegExp.lastIndex;
w.matchLength = -1;
return false;
};
MediaWikiFormatter.getParams = function(w)
{
var params = [];
var i = 1;
w.startMatch = w.nextMatch;
var read = MediaWikiFormatter.readToDelim(w);
if(w.matchLength!=-1) {
params[i] = w.source.substr(w.startMatch,w.matchLength);
}
while(read) {
i++;
w.startMatch = w.nextMatch;
read = MediaWikiFormatter.readToDelim(w);
if(w.matchLength!=-1) {
params[i] = w.source.substr(w.startMatch,w.matchLength);
}
}
return params;
};
MediaWikiFormatter.setFromParams = function(w,p)
{
var r = {};
var re = /\s*(.*?)=(?:(?:"(.*?)")|(?:'(.*?)')|((?:\w|%|#)*))/mg;
var match = re.exec(p);
while(match)
{
var s = match[1].unDash();
if(match[2]) {
r[s] = match[2];
} else if(match[3]) {
r[s] = match[3];
} else {
r[s] = match[4];
}
match = re.exec(p);
}
return r;
};
MediaWikiFormatter.setAttributesFromParams = function(e,p)
{
var re = /\s*(.*?)=(?:(?:"(.*?)")|(?:'(.*?)')|((?:\w|%|#)*))/mg;
var match = re.exec(p);
while(match) {
var s = match[1].unDash();
if(s == 'bgcolor') {
s = 'backgroundColor';
}
try {
if(match[2]) {
e.setAttribute(s,match[2]);
} else if(match[3]) {
e.setAttribute(s,match[3]);
} else {
e.setAttribute(s,match[4]);
}
}
catch(ex) {}
match = re.exec(p);
}
};
config.mediawiki = {};
config.mediawiki.formatters = [
{
name: 'mediaWikiHeading',
match: '^={1,6}(?!=) *\\n?',
termRegExp: /(={1,6} *\n)/mg,
handler: function(w)
{
var output = w.output;
var e = createTiddlyElement2(output,'h' + w.matchLength);
var a = createTiddlyElement2(e,'a');
var t = w.tiddler ? MediaWikiFormatter.normalizedTitle(w.tiddler.title) + ':' : '';
var len = w.source.substr(w.nextMatch).indexOf('=\n');
while(w.source.substr(w.nextMatch+len-1,1)=='=') {
len--;
}
a.setAttribute('name',t+MediaWikiFormatter.normalizedTitle(w.source.substr(w.nextMatch,len)));
w.subWikifyTerm(e,this.termRegExp);
}
},
{
name: 'mediaWikiTable',
match: '^\\{\\|', // ^{|
handler: function(w)
{
var pair = MediaWikiTemplate.findTableBracePair(w.source,w.matchStart);
if(pair.start==w.matchStart) {
w.nextMatch = w.matchStart;
var table = createTiddlyElement2(w.output,'table');
var tbody = createTiddlyElement2(table,'tbody');// needed for IE
var mwt = new MediaWikiTemplate();
mwt.wikifyTable(tbody,w,pair);
}
}
},
{
name: 'mediaWikiList',
match: '^[\\*#;:]+',
lookaheadRegExp: /(?:(?:(\*)|(#)|(;)|(:))+)(?: ?)/mg,
termRegExp: /(\n)/mg,
handler: function(w)
{
var stack = [w.output];
var currLevel = 0, currType = null;
var listType, itemType;
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
if(lookaheadMatch[1]) {
listType = 'ul';
itemType = 'li';
} else if(lookaheadMatch[2]) {
listType = 'ol';
itemType = 'li';
} else if(lookaheadMatch[3]) {
listType = 'dl';
itemType = 'dt';
} else if(lookaheadMatch[4]) {
listType = 'dl';
itemType = 'dd';
}
var listLevel = lookaheadMatch[0].length;
w.nextMatch += listLevel;
if(listLevel > currLevel) {
for(var i=currLevel; i<listLevel; i++) {
stack.push(createTiddlyElement2(stack[stack.length-1],listType));
}
} else if(listLevel < currLevel) {
for(i=currLevel; i>listLevel; i--) {
stack.pop();
}
} else if(listLevel == currLevel && listType != currType) {
stack.pop();
stack.push(createTiddlyElement2(stack[stack.length-1],listType));
}
currLevel = listLevel;
currType = listType;
var e = createTiddlyElement2(stack[stack.length-1],itemType);
var ci = w.source.indexOf(':',w.nextMatch);
var ni = w.source.indexOf('\n',w.nextMatch);
if(itemType=='dt' && (ni==-1 || (ci!=-1 && ci<ni))) {
w.subWikifyTerm(e,/(:)/mg);
w.nextMatch--;
} else {
w.subWikifyTerm(e,this.termRegExp);
}
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
}
},
{
name: 'mediaWikiRule',
match: '^----+$\\n?',
handler: function(w)
{
createTiddlyElement2(w.output,'hr');
}
},
/*{
name: 'mediaWikiLeadingSpaces',
match: '^ ',
lookaheadRegExp: /^ /mg,
termRegExp: /(\n)/mg,
handler: function(w)
{
var e = createTiddlyElement2(w.output,'pre');
while(true) {
w.subWikifyTerm(e,this.termRegExp);
createTiddlyElement2(e,'br');
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
w.nextMatch += lookaheadMatch[0].length;
} else {
break;
}
}
}
},*/
{
name: 'mediaWikiImage',
match: '\\[\\[(?:[Ii]mage|Bild):',
lookaheadRegExp: /\[\[(?:[Ii]mage|Bild):/mg,
defaultPx: 180,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var params = MediaWikiFormatter.getParams(w);
var src = params[1];
src = src.trim().replace(/ /mg,'_');
src = src.substr(0,1).toUpperCase() + src.substring(1);
var palign = null;
var ptitle = '';
var psrc = false;
var px = null;
var pthumb = false;
var pframed = false;
for(var i=2;i<params.length;i++) {
var p = params[i];
if(p=='right'||p=='left'||p=='center'||p=='none') {
palign = p;
} else if(p=='thumbnail'||p=='thumb') {
pthumb = true;
} else if(p=='framed') {
pframed = true;
} else if(/\d{1,4} ?px/.exec(p)) {
px = p.substr(0,p.length-2).trim();
} else {
ptitle = p;
}
}//#end for
if(pthumb) {
var output = w.output;
if(!palign) {
palign = 'right';
}
if(!px) {
px = 180;
}
psrc = px + 'px-' + src;
var t = createTiddlyElement(output,'div',null,'thumb'+(palign?' t'+palign:''));
var s = createTiddlyElement2(t,'div');
s.style['width'] = Number(px) + 2 + 'px';
var a = createTiddlyElement(s,'a',null,'internal');
if(config.options.chkMediaWikiDisplayEnableThumbZoom) {
a.href = src;
}
a.title = ptitle;
var img = createTiddlyElement2(a,'img');
img.src = 'images/' + psrc;
if(config.options.chkUseHostImages && Crypto.hexMd5Str) {
var md5 = Crypto.hexMd5Str(src);
var md5dir = '/' + (md5.substr(0,1) + '/' + md5.substr(0,2)).toLowerCase();
img.src = MediaWikiFormatter.fullHostName(w.tiddler.fields['server.host']||config.defaultCustomFields['server.host']);
var imgDir = 'images';
//if(img.src=='http://en.wikipedia.org/w/') {
if(img.src.indexOf('wikipedia.org/')!=-1) {
//imgDir = 'wikipedia/en';
imgDir = 'wikipedia/commons';
img.src = 'http://upload.wikimedia.org/';
}
img.src += imgDir;
img.src += '/thumb' + md5dir + '/' + src + '/' + psrc;
}
img.width = px;
img.longdesc = 'Image:' + src;
img.alt = ptitle;
var tc = createTiddlyElement(s,'div',null,'thumbcaption');
var oldSource = w.source; var oldMatch = w.nextMatch;
w.source = ptitle; w.nextMatch = 0;
w.subWikifyUnterm(tc);
w.source = oldSource; w.nextMatch = oldMatch;
if(config.options.chkMediaWikiDisplayEnableThumbZoom) {
var tm = createTiddlyElement(tc,'div',null,'magnify');
tm.style['float'] = 'right';
var ta = createTiddlyElement(tm,'a',null,'internal');
ta.title = 'Enlarge';
timg = createTiddlyElement2(ta,'img'); timg.src = 'magnify-clip.png'; timg.alt = 'Enlarge'; timg.width = '15'; timg.height = '11';
ta.href = src;
}
} else {
a = createTiddlyElement(w.output,'a',null,'image');
a.title = ptitle;
img = createTiddlyElement2(a,'img');
if(palign) {img.align = palign;}
if(px) {img.width = px;}
img.longdesc = 'Image:' + src;
img.alt = ptitle;
if(config.options.chkUseHostImages) {
md5dir = '';
if(Crypto.hexMd5Str) {
md5 = Crypto.hexMd5Str(src);
md5dir = '/'+ (md5.substr(0,1) + '/' + md5.substr(0,2)).toLowerCase();
}
img.src = MediaWikiFormatter.fullHostName(w.tiddler.fields['server.host']||config.defaultCustomFields['server.host']);
imgDir = 'images';
if(img.src.indexOf('wikipedia.org/')!=-1) {
imgDir = 'wikipedia/commons';
img.src = 'http://upload.wikimedia.org/';
}
img.src += imgDir + md5dir + '/' + src;
} else {
img.src = px ? 'images/' + px + 'px-' + src : 'images/' + src;
}
}
}
}//#end image handler
},
{
name: 'mediaWikiExplicitLink',
match: '\\[\\[',
lookaheadRegExp: /\[\[(?:([a-z]{2,3}:)?)(#?)([^\|\]]*?)(?:(\]\](\w*))|(\|(.*?)\]\]))/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
if(!lookaheadMatch[1]) {
var e;
var link = lookaheadMatch[3];
var text = link;
link = link.substr(0,1).toUpperCase() + link.substring(1);
if(link.substr(0,1)=='/') {
link = w.tiddler.title + link;
} else if(link=='../') {
link = w.tiddler.title.substr(0,w.tiddler.title.lastIndexOf('/'));
} else if(link.substr(0,3)=='../') {
var pos = w.tiddler.title.lastIndexOf('/');
link = w.tiddler.title.substr(0,pos) + link.substr(2);
}
if(lookaheadMatch[4]) {
if(lookaheadMatch[2]) {
var a = createTiddlyElement(w.output,'a');
var t = w.tiddler ? MediaWikiFormatter.normalizedTitle(w.tiddler.title) + ':' : '';
t = '#' + t + MediaWikiFormatter.normalizedTitle(link);
a.setAttribute('href',t);
a.title = '#' + MediaWikiFormatter.normalizedTitle(link);
createTiddlyText(a,'#'+link);
} else {
e = createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler);
if(lookaheadMatch[5]) {
text += lookaheadMatch[5];
}
createTiddlyText(e,text);
}
} else if(lookaheadMatch[6]) {
while(link.charAt(0)==':')
link = link.substring(1);
link = MediaWikiFormatter.normalizedTitle(link);
var i = link.indexOf('#');
if(i==-1) {
e = createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler);
} else {
e = createTiddlyLink(w.output,link.substr(0,i),false,null,w.isStatic,w.tiddler);
}
var oldSource = w.source; var oldMatch = w.nextMatch;
w.source = lookaheadMatch[7].trim(); w.nextMatch = 0;
w.subWikifyUnterm(e);
w.source = oldSource; w.nextMatch = oldMatch;
}
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiParagraph',
match: '\\n{2,}',
handler: function(w)
{
w.output = createTiddlyElement2(w.output,'p');
}
},
{
name: 'mediaWikiExplicitLineBreak',
match: '<br ?/?>',
handler: function(w)
{
createTiddlyElement2(w.output,'br');
}
},
{
name: 'mediaWikiExplicitLineBreakWithParams',
match: "<br(?:\\s*(?:(?:.*?)=[\"']?(?:.*?)[\"']?))*?\\s*/?>",
lookaheadRegExp: /<br((?:\s+(?:.*?)=["']?(?:.*?)["']?)*?)?\s*\/?>/mg, //'
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var e =createTiddlyElement2(w.output,'br');
if(lookaheadMatch[1]) {
MediaWikiFormatter.setAttributesFromParams(e,lookaheadMatch[1]);
}
w.nextMatch = this.lookaheadRegExp.lastIndex;// empty tag
}
}
},
{
name: 'mediaWikiTitledUrlLink',
match: '\\[' + config.textPrimitives.urlPattern + '(?:\\s+[^\\]]+)?' + '\\]', //'
handler: function(w)
{
var lookaheadRegExp = new RegExp('\\[(' + config.textPrimitives.urlPattern + ')(?:\\s+([^\[]+))?' + '\\]','mg');
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index==w.matchStart) {
var link = lookaheadMatch[1];
if(lookaheadMatch[2]) {
var e = createExternalLink(w.output,link);
var oldSource = w.source; var oldMatch = w.nextMatch;
w.source = lookaheadMatch[2].trim(); w.nextMatch = 0;
w.subWikifyUnterm(e);
w.source = oldSource; w.nextMatch = oldMatch;
} else {
e = createExternalLink(createTiddlyElement2(w.output,'sup'),link);
if(w.linkCount===undefined)
w.linkCount = 0;
w.linkCount++;
createTiddlyText(e,'['+w.linkCount+']');
}
w.nextMatch = lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiUrlLink',
match: config.textPrimitives.urlPattern,
handler: function(w)
{
w.outputText(createExternalLink(w.output,w.matchText),w.matchStart,w.nextMatch);
}
},
{
name: "mediaWikiCharacterFormat",
match: "'{2,5}|(?:<[usbi]>)",
handler: function(w)
{
switch(w.matchText) {
case "'''''":
var e = createTiddlyElement(w.output,'strong');
w.subWikifyTerm(createTiddlyElement(e,'em'),/('''''|(?=\n))/mg);
break;
case "'''":
w.subWikifyTerm(createTiddlyElement(w.output,'strong'),/('''|(?=\n))/mg);
break;
case "''":
w.subWikifyTerm(createTiddlyElement(w.output,'em'),/((?:''(?!'))|(?=\n))/mg);
break;
case '<u>':
w.subWikifyTerm(createTiddlyElement(w.output,'u'),/(<\/u>|(?=\n))/mg);
break;
case '<s>':
w.subWikifyTerm(createTiddlyElement(w.output,'del'),/(<\/s>|(?=\n))/mg);
break;
case '<b>':
w.subWikifyTerm(createTiddlyElement(w.output,'b'),/(<\/b>|(?=\n))/mg);
break;
case '<i>':
w.subWikifyTerm(createTiddlyElement(w.output,'i'),/(<\/i>|(?=\n))/mg);
break;
}
}
},
/*{
name: 'mediaWikiTemplateParam',
match: '\\{\\{\\{',
lookaheadRegExp: /(\{\{\{(?:.|\n)*?\}\}\})/mg,
element: 'span',
handler: config.formatterHelpers.enclosedTextHelper
},
*/
{
name: 'mediaWikiInsertReference',
match: '<ref[^/]*>',
lookaheadRegExp: /<ref(\s+(?:.*?)=["']?(?:.*?)["']?)?>([^<]*?)<\/ref>/mg,
handler: function(w)
{
if(config.browser.isIE) {
refRegExp = /<ref[^\/]*>((?:.|\n)*?)<\/ref>/mg;
refRegExp.lastIndex = w.matchStart;
var refMatch = refRegExp.exec(w.source);
if(refMatch && refMatch.index == w.matchStart) {
w.nextMatch = refRegExp.lastIndex;
return;
}
}
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var x = {id:'',value:''};
w.nextMatch = this.lookaheadRegExp.lastIndex;
if(!w.referenceCount) {
w.referenceCount = 0;
w.references = {};
}
var s = createTiddlyElement(w.output,'sup',null,'reference');
var a = createTiddlyElement2(s,'a');
var prefix = w.tiddler ? w.tiddler.title + ':' : '';
var name;
if(lookaheadMatch[1]) {
var r = MediaWikiFormatter.setFromParams(w,lookaheadMatch[1]);
name = r.name ? r.name.trim() : '';
name = name.replace(/ /g,'_');
s.id = prefix + '_ref-' + name;// + '_' + nameCount;(w.referenceCount+1);
if(!w.references[name]) {
w.references[name] = x;
w.references[name].id = w.referenceCount;
w.references[name].value = lookaheadMatch[2].trim();
}
} else {
w.references[w.referenceCount] = x;
w.references[w.referenceCount].id = w.referenceCount;
w.references[w.referenceCount].value = lookaheadMatch[2].trim();
name = w.referenceCount;
s.id = prefix + '_ref-' + w.referenceCount;
}
w.referenceCount++;
a.title = lookaheadMatch[2].trim();//mb, extra to wikipedia
a.href = '#' + prefix + '_note-' + name;
a.innerHTML = '['+w.referenceCount+']';
}
}
},
{
name: 'mediaWikiListReferences',
match: '<references ?/>',
lookaheadRegExp: /<references ?\/>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(config.options.chkMediaWikiListReferences && w.referenceCount) {
var ol = createTiddlyElement(w.output,'ol',null,'references');
var oldSource = w.source;
if(w.referenceCount>0) {
for(var i in w.references) {
var li = createTiddlyElement2(ol,'li');
var prefix = w.tiddler ? w.tiddler.title + ':' : '';
var b = createTiddlyElement2(li,'b');
var a = createTiddlyElement2(b,'a');
li.id = prefix + '_note-' + i;
a.href = '#' + prefix + '_ref-' + i;
a.innerHTML = '^';
w.source = w.references[i].value;
w.nextMatch = 0;
w.subWikifyUnterm(li);
}
}
w.source = oldSource;
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
},
{
name: 'mediaWikiRepeatReference',
match: '<ref[^/]*/>',
lookaheadRegExp: /<ref(\s+(?:.*?)=["'](?:.*?)["'])?\s*\/>/mg, //'
handler: function(w)
{
if(config.browser.isIE) {
refRegExp = /<ref.*?\/>/mg;
refRegExp.lastIndex = w.matchStart;
var refMatch = refRegExp.exec(w.source);
if(refMatch && refMatch.index == w.matchStart) {
w.nextMatch = refRegExp.lastIndex;
return;
}
}
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var x = {id:'',value:''};
w.nextMatch = this.lookaheadRegExp.lastIndex;
var s = createTiddlyElement(w.output,"sup",null,"reference");
var a = createTiddlyElement2(s,"a");
var prefix = w.tiddler ? w.tiddler.title : '';
if(lookaheadMatch[1]) {
var r = {};
r = MediaWikiFormatter.setFromParams(w,lookaheadMatch[1]);
var name = r.name ? r.name.trim() : '';
name = name.replace(/ /g,'_');
s.id = prefix + '_ref-' + name +'_' + (w.referenceCount+1);
var count = w.references && w.references[name] ? (w.references[name].id+1) : '?';
}
a.href = '#' + prefix + '_note-' + name;
a.innerHTML = '['+count+']';
a.title = name;
}
}//# end handler
},
{
name: 'mediaWikiHtmlEntitiesEncoding',
match: '&#?[a-zA-Z0-9]{2,8};',
handler: function(w)
{
if(!config.browser.isIE)
createTiddlyElement(w.output,"span").innerHTML = w.matchText;
}
},
{
name: 'mediaWikiComment',
match: '<!\\-\\-',
lookaheadRegExp: /<!\-\-((?:.|\n)*?)\-\->/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiIncludeOnly',
match: '<includeonly>',
lookaheadRegExp: /<includeonly>((?:.|\n)*?)<\/includeonly>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiNoWiki',
match: '<nowiki>',
lookaheadRegExp: /<nowiki>((?:.|\n)*?)<\/nowiki>/mg,
element: 'span',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'mediaWikiPreNoWiki',
match: '<pre>\s*<nowiki>',
lookaheadRegExp: /<pre>\s*<nowiki>((?:.|\n)*?)<\/nowiki>\s*<\/pre>/mg,
element: 'pre',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'mediaWikiPre',
match: '<pre>',
lookaheadRegExp: /<pre>((?:.|\n)*?)<\/pre>/mg,
element: 'pre',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'mediaWikiMagicWords',
match: '__',
lookaheadRegExp: /__([A-Z]*?)__/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
switch(lookaheadMatch[1]) {
case 'NOTOC':
break;
default:
if(config.options.chkDisplayMediaWikiMagicWords) {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
break;
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'mediaWikiGallery',
match: '<gallery>',
lookaheadRegExp: /[Ii]mage:(.*?)\n/mg,
handler: function(w)
{
var table = createTiddlyElement(w.output,'table',null,'gallery');
table.cellspacing = '0';
table.cellpadding = '0';
var rowElem = createTiddlyElement2(table,'tr');
var col = 0;
this.lookaheadRegExp.lastIndex = w.matchStart;
var nM = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
var oldSource = w.source;
while(lookaheadMatch) {
nM += lookaheadMatch[1].length;
w.source = lookaheadMatch[1] +']]';//!! ]] is hack until getParams is working
w.nextMatch = 0;
var params = MediaWikiFormatter.getParams(w);
var src = params[1]||'';
src = src.trim().replace(/ /mg,'_');
src = src.substr(0,1).toUpperCase() + src.substring(1);
var palign = 'right';
var psrc = '120px-'+src;
var px = 120;
var pframed = false;
ptitle = null;
for(var i=2;i<params.length;i++) {
var p = params[i];
if(p=='right'||p=='left'||p=='center'||p=='none') {
palign = p;
} else if(p=='framed') {
pframed = true;
} else if(/\d{1,4}px/.exec(p)) {
px = p.substr(0,p.length-2).trim();
psrc = px + 'px-' + src;
} else {
ptitle = p;
}
}//#end for
var td = createTiddlyElement2(rowElem,'td');
var gb = createTiddlyElement(td,'div',null,'gallerybox');
var t = createTiddlyElement(gb,'div',null,'thumb');
t.style['padding'] = '26px 0';
var a = createTiddlyElement2(t,'a');
if(config.options.chkMediaWikiDisplayEnableThumbZoom) {
a.href = src;
}
a.title = ptitle;
var img = createTiddlyElement2(a,'img');
img.src = psrc;
img.width = px;
img.alt = '';
var gt = createTiddlyElement(gb,'div',null,'gallerytext');
p = createTiddlyElement2(gt,'p');
var oldSource2 = w.source; var oldMatch = w.nextMatch;
w.source = ptitle; w.nextMatch = 0;
w.subWikifyUnterm(p);
w.source = oldSource2; w.nextMatch = oldMatch;
col++;
if(col>3) {
rowElem = createTiddlyElement2(table,'tr');
col = 0;
}
w.source = oldSource;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
w.nextMatch = nM + '<gallery>'.length*2+1+'Image:'.length;//!! hack
}
},
{
name: 'mediaWikiHtmlTag',
match: "<[a-zA-Z0-9]{2,}(?:.*?)>",
//match: "<[a-zA-Z]{2,}(?:\\s*(?:(?:.*?)=[\"']?(?:.*?)[\"']?))*?>",
lookaheadRegExp: /<([a-zA-Z0-9]{2,})((?:\s+(?:.*?)=(["']?)(?:.*?)\3?)*?)?\s*(\/)?>/mg, //'
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var e =createTiddlyElement2(w.output,lookaheadMatch[1]);
if(lookaheadMatch[2]) {
MediaWikiFormatter.setAttributesFromParams(e,lookaheadMatch[2]);
}
if(lookaheadMatch[4]) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
} else {
w.subWikify(e,'</'+lookaheadMatch[1]+'>');
}
}
}
}
];
config.parsers.mediawikiFormatter = new Formatter(config.mediawiki.formatters);
config.parsers.mediawikiFormatter.format = 'mediawiki';
config.parsers.mediawikiFormatter.formatTag = 'MediaWikiFormat';
MediaWikiTemplate = function()
{
this.stack = [];
this.error = false;
this.tiddler = null;
};
MediaWikiTemplate.findRawDelimiter = function(delimiter,text,start)
{
var d = text.indexOf(delimiter,start);
if(d==-1)
return -1;
var b = {start:-1,end:-1};
var bs = text.indexOf('[[',start);
var bi = text.indexOf('{{',start);
if((bi==-1 || bi > d) && (bs==-1 || bs >d))
return d;
var s1 = -1;
if(bs!=-1 && bs <d) {
var be = text.indexOf(']]',bs);
if(be!=-1) {
b.start = bs;
b.end = be;
}
}
if(b.start!=-1 && d>b.start)
s1 = b.end+2;
var db = MediaWikiTemplate.findDBP(text,start);
if(db.end!=-1 && d>db.start) {
if(db.end+2>s1)
s1 = db.end+2;
}
var tb = MediaWikiTemplate.findTBP(text,start);
if(tb.end!=-1 && d>tb.start) {
if(tb.end+3>s1)
s1 = tb.end+3;
}
return s1==-1 ? d : MediaWikiTemplate.findRawDelimiter(delimiter,text,s1);
};
/*
* Matched sets of four consecutive braces are interpreted as a parameter surrounded by single braces:
{{{{foo}}}} is equivalent to { {{{foo}}} }.
* Unmatched sets of four braces are interpreted as nested template calls:
{{{{TEx1}} }} is parsed as a call to a template, the name of which is dependent on the output of TEx1.
In this example, {{{{TEx1}} }} results in Template:Hello world!, as the Hello world! template does not exist.
* Matched sets of five consecutive braces are interpreted as a template call surrounding a parameter:
{{{{{foo}}}}} is equivalent to {{ {{{foo}}} }}.
* Unmatched sets of five braces are interpreted using the standard rules:
{{{{{TEx1}} }}} is interpreted as a named parameter with the name dependent on the result of Template:TEx1,
which in this case is equivalent to {{{Hello world!}}}.
*/
// dbrTest('{{ {{{a}}} b }} {{c}}',0,0,13);
MediaWikiTemplate.findDBP = function(text,start,end)
// findDoubleBracePair
{
var ret = {start:-1,end:-1};
var s = text.indexOf('{{',start);
if(s==-1) {
return ret;
}
if(end && s>end)
return ret;
if(text.substr(s+2,1)!='{') {
var e = text.indexOf('}}',s+2);
if(e==-1)
return ret;
var s2 = text.indexOf('{{',s+2);
if(s2==-1 || s2 > e)
return {start:s,end:e};
var si = s+2;
var db = MediaWikiTemplate.findDBP(text,si,e);
var tb = MediaWikiTemplate.findTBP(text,si,e);
while((db.end!=-1 && e>db.start && e<=db.end) || (tb.end!=-1 && e>tb.start && e<=tb.end)) {
if(db.end!=-1 && e>db.start && e<=db.end) {
si = db.end+2;
if(tb.end!=-1 && e>tb.start && e<=tb.end) {
if(tb.end>db.end)
si = tb.end+3;
}
} else {
si = tb.end+3;
}
e = text.indexOf('}}',si);
db = MediaWikiTemplate.findDBP(text,si,e);
tb = MediaWikiTemplate.findTBP(text,si,e);
if(e==-1) {
return ret;
}
}
return {start:s,end:e};
}
var c = 2;
while(text.substr(s+c,1)=='{') {
c++;
}
if(c==3) {
//tb = MediaWikiTemplate.findTBP(text,s);
//return tb.end==-1 ? ret : MediaWikiTemplate.findDBP(text,tb.end+3);
return MediaWikiTemplate.findDBP(text,s+3);
} else if(c==4) {
db = MediaWikiTemplate.findDBP(text,s+2);
if(db.end==-1)
return ret;
if(text.substr(db.end+2,2)=='}}') {
return MediaWikiTemplate.findDBP(text,db.end+4);
} else {
e = text.indexOf('}}',db.end+2);
return e==-1 ? ret : {start:s,end:e};
}
} else if(c==5) {
db = MediaWikiTemplate.findDBP(text,s+3);
if(db.end==-1)
return ret;
if(text.substr(db.end+2,3)=='}}}') {
// it's matched
return {start:s,end:db.end+3};
} else if(text.substr(db.end+2,1)!='}') {
// it's not matched
// {{{{{x}} }}}
return {start:s+3,end:db.end};
} else {
// }}} }}
e = text.indexOf('}}',db.end+3);
return e==-1 ? ret : {start:s,end:e};
}
} else {
return MediaWikiTemplate.findDBP(text,s+6);
}
};
MediaWikiTemplate.findTBP = function(text,start,end)
// findTripleBracePair
{
var ret = {start:-1,end:-1};
var s = text.indexOf('{{{',start);
if(s==-1)
return ret;
if(end && s>end)
return ret;
if(text.substr(s+3,1)!='{' || text.substr(s+3,3)=='{{{') {
var si = s+3;
var e = text.indexOf('}}}',si);
if(e==-1)
return ret;
var s2 = text.indexOf('{{',si);
if(s2==-1 || s2 > e)
return {start:s,end:e};
var db = MediaWikiTemplate.findDBP(text,si,e);
var tb = MediaWikiTemplate.findTBP(text,si,e);
// console.log('t:'+text.substr(s,100));
while((db.end!=-1 && e>=db.end) || (tb.end!=-1 && e>=tb.end)) {
if(db.end!=-1 && e>=db.end) {
si = db.end+2;
if(tb.end!=-1 && e>=tb.end) {
if(tb.end>=db.end)
si = tb.end+3;
}
} else {
si = tb.end+3;
}
db = MediaWikiTemplate.findDBP(text,si,e);
tb = MediaWikiTemplate.findTBP(text,si,e);
e = text.indexOf('}}}',si);
if(e==-1)
return ret;
}
return {start:s,end:e};
}
var c = 3;
while(text.substr(s+c,1)=='{') {
c++;
}
if(c==4) {
tb = MediaWikiTemplate.findTBP(text,s+1);
if(tb.end==-1)
return ret;
if(text.substr(tb.end+1,1)=='}') {
return {start:s+1,end:tb.end};
} else {
return MediaWikiTemplate.findTBP(text,tb.end+4);
}
} else if(c==5) {
db = MediaWikiTemplate.findDBP(text,s+3);
if(db.end==-1)
return ret;
if(text.substr(db.end+2,3)=='}}}') {
return {start:s+2,end:db.end};
} else if(text.substr(db.end+2,1)!='}') {
e = text.indexOf('}}}',db.end+2);
return e==-1 ? ret : {start:s,end:e};
} else {
return {start:s+2,end:db.end};
}
}
};
MediaWikiTemplate.findTableBracePair = function(text,start)
{
var ret = {start:-1,end:-1};
var s = text.indexOf('{|',start);
if(s==-1)
return ret;
var e = text.indexOf('\n|}',s+2);
if(e==-1)
return ret;
e++;
var s2 = text.indexOf('{|',s+2);
if(s2==-1 || s2 > e)
return {start:s,end:e};
var tp = MediaWikiTemplate.findTableBracePair(text,s+2);
while(tp.end!=-1 && e>tp.start && e<=tp.end) {
e = tp.end+2;
tp = MediaWikiTemplate.findTableBracePair(text,e);
e = text.indexOf('\n|}',e);
if(e==-1)
return ret;
e++;
}
return {start:s,end:e};
};
MediaWikiTemplate.prototype.wikifyTable = function(table,w,pair)
{
function lineEnd(w) {
var r = w.source.indexOf('\n',w.nextMatch);
while(r!=-1) {
var n = w.source.substr(r+1,1);
if(n=='|' || n=='!' || (n=='{' && w.source.substr(r+2,1)=='|'))
break;
r = w.source.indexOf('\n',r+1);
}
return r;
}
function subWikifyText(e,w,text) {
var oldSource = w.source; var oldMatch = w.nextMatch;
w.source = text; w.nextMatch = 0;
w.subWikifyUnterm(e);
w.source = oldSource; w.nextMatch = oldMatch;
}
w.nextMatch += 2;
var i = lineEnd(w);
if(i>w.nextMatch) {
MediaWikiFormatter.setAttributesFromParams(table.parentNode,w.source.substring(w.nextMatch,i));
w.nextMatch = i;
}
w.nextMatch++;
if(w.source.substr(w.nextMatch,2)=='|+') {
var caption = createTiddlyElement2(table,'caption');
w.nextMatch += 2;
i = lineEnd(w);
var d = MediaWikiTemplate.findRawDelimiter('|',w.source,w.nextMatch);
if(d!=-1 && d<i) {
MediaWikiFormatter.setAttributesFromParams(caption,w.source.substring(w.nextMatch,d));
w.nextMatch = d+1;
}
w.subWikifyTerm(caption,/(\n)/mg);
}
var tr = createTiddlyElement2(table,'tr');
if(w.source.substr(w.nextMatch,2)=='|-') {
w.nextMatch += 2;
i = lineEnd(w);
//if(i==-1)
// break;
if(i>w.nextMatch) {
MediaWikiFormatter.setAttributesFromParams(tr,w.source.substring(w.nextMatch,i));
w.nextMatch = i;
}
w.nextMatch++;
}
var x = w.source.substr(w.nextMatch,2);
while(x!='|}') {
if(x=='{|') {
var pair2 = MediaWikiTemplate.findTableBracePair(w.source,w.nextMatch);
if(pair2.start==w.nextMatch) {
var table2 = createTiddlyElement2(cell,'table');
this.wikifyTable(table2,w,pair2);
var y = w.source.substr(w.nextMatch).escapeLineBreaks();
while(w.source.substr(w.nextMatch,1)=='\n') {
w.nextMatch++;
}
}
} else if(x=='|-') {
tr = createTiddlyElement2(table,'tr');
w.nextMatch += 2;
i = lineEnd(w);
if(i==-1)
break;
if(i>w.nextMatch) {
MediaWikiFormatter.setAttributesFromParams(tr,w.source.substring(w.nextMatch,i));
w.nextMatch = i;
}
w.nextMatch++;
} else if(x.substr(0,1)=='!') {
w.nextMatch++;
i = lineEnd(w);
if(i==-1)
break;
var cell = createTiddlyElement2(tr,'th');
var c = w.source.indexOf('!!',w.nextMatch);
while(c!=-1 && c<i) {
d = MediaWikiTemplate.findRawDelimiter('|',w.source,w.nextMatch);
if(d!=-1 && d<c) {
MediaWikiFormatter.setAttributesFromParams(cell,w.source.substring(w.nextMatch,d));
w.nextMatch = d+1;
}
while(w.source.substr(w.nextMatch,1)==' ') {
w.nextMatch++;
}
w.subWikifyTerm(cell,/(\!\!)/mg);
cell = createTiddlyElement2(tr,'th');
c = w.source.indexOf('!!',w.nextMatch);
}
d = MediaWikiTemplate.findRawDelimiter('|',w.source,w.nextMatch);
if(d!=-1 && d<i) {
MediaWikiFormatter.setAttributesFromParams(cell,w.source.substring(w.nextMatch,d));
w.nextMatch = d+1;
}
while(w.source.substr(w.nextMatch,1)==' ') {
w.nextMatch++;
}
subWikifyText(cell,w,w.source.substring(w.nextMatch,i));
w.nextMatch = i+1;
//w.subWikifyTerm(cell,/(\n)/mg);
} else if(x.substr(0,1)=='|') {
w.nextMatch++;
i = lineEnd(w);
if(i==-1)
break;
cell = createTiddlyElement2(tr,'td');
c = w.source.indexOf('||',w.nextMatch);
while(c!=-1 && c<i) {
d = MediaWikiTemplate.findRawDelimiter('|',w.source,w.nextMatch);
if(d!=-1 && d<c) {
MediaWikiFormatter.setAttributesFromParams(cell,w.source.substring(w.nextMatch,d));
w.nextMatch = d+1;
}
while(w.source.substr(w.nextMatch,1)==' ') {
w.nextMatch++;
}
w.subWikifyTerm(cell,/(\|\|)/mg);
cell = createTiddlyElement2(tr,'td');
c = w.source.indexOf('||',w.nextMatch);
}
d = MediaWikiTemplate.findRawDelimiter('|',w.source,w.nextMatch);
if(d!=-1 && d<i) {
MediaWikiFormatter.setAttributesFromParams(cell,w.source.substring(w.nextMatch,d));
w.nextMatch = d+1;
}
while(w.source.substr(w.nextMatch,1)==' ') {
w.nextMatch++;
}
subWikifyText(cell,w,w.source.substring(w.nextMatch,i));
w.nextMatch = i+1;
//w.subWikifyTerm(cell,/(\n)/mg);
} else {
}
x = w.source.substr(w.nextMatch,2);
}
w.nextMatch = pair.end + 3;
return;
};
} //# end of 'install only once'
//}}}
/***
|''Name:''|MediaWikiTemplatePlugin|
|''Description:''|Development plugin for MediaWiki Template expansion|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Version:''|0.1.10|
|''Date:''|Feb 27, 2008|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.4.1|
|''Display empty template links:''|<<option chkMediaWikiDisplayEmptyTemplateLinks>>|
http://meta.wikimedia.org/wiki/Help:Template
http://meta.wikimedia.org/wiki/User:Happy-melon/Templates
http://meta.wikimedia.org/wiki/Help:Parser_function
http://meta.wikimedia.org/wiki/Help:ParserFunctions (extensions)
http://www.mediawiki.org/wiki/Help:Magic_words
http://meta.wikimedia.org/wiki/Help:Variable
==Parsing templates==
When the MediaWiki [[mw:Manual:Parser.php|parser]] encounters a template (defined as a matched pair of braces not inside <nowiki><nowiki></nowiki> tags), the template is expanded using the following algorithm:
#The template call is divided into the template name and parameter expressions, by looking for pipe characters. Pipes contained within matched double braces or square brackets are ignored.
#*This division is performed purely based on pipe characters ''currently'' present in the template call, ignoring those potentially contained within templates. This is what permits the use of [[Template:!]].
#*A potentially interesting feature is that characters including and following a hash <code>#</code> are stripped from the template name after this division. So <code><nowiki>{{TEx4#def|ABC}}</nowiki></code> will be parsed in exactly the same way as <code><nowiki>{{TEx4|ABC}}</nowiki></code>.
#The wikicode for the template name is evaluated, calling the template parser [[w:Recursion (computer science)|recursively]] if necessary.
#The wikicode for each parameter expression is evaluated, again using recursion if the wikicode contains another template.
#Any parameter expression now containing a raw equals sign is split around that equals sign into a parameter ''name'' and parameter ''value''. If a parameter expression contains more than one equals sign, the division is done around the ''first'' (working left to right).
#Any remaining parameter expressions which do not contain equals signs are assigned as values to the implicit parameters, working left to right. So the first parameter expression which does not contain an equals sign is assigned as the value of parameter <code>1</code>, the next parameter expression is assigned as the value of parameter <code>2</code>, etc.
#The wikicode of the template page is analysed and stripped around <code><nowiki><noinclude></nowiki></code>, <code><nowiki><includeonly></nowiki></code> or <code><nowiki><onlyinclude></nowiki></code> tags, if present.
#The template call is replaced by the analysed wikicode, replacing parameters by their values if possible.
#*Any parameters that do not appear in the analysed wikicode are discarded, and any parameters appearing in the wikicode which have not been assigned a value are replaced by their defaults (if defined) or left as they are.
***/
//{{{
// Ensure that the MediaWikiTemplate Plugin is only installed once.
if(!version.extensions.MediaWikiTemplatePlugin) {
version.extensions.MediaWikiTemplatePlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('MediaWikiTemplatePlugin requires TiddlyWiki 2.1 or later.');}
if(config.options.chkMediaWikiDisplayEmptyTemplateLinks == undefined)
{config.options.chkMediaWikiDisplayEmptyTemplateLinks = false;}
fnLog = function(text)
{
// if(window.console) console.log(text); else displayMessage(text.substr(0,100));
};
MediaWikiTemplate.subWikify = Wikifier.prototype.subWikify;
Wikifier.prototype.subWikify = function(output,terminator)
{
if(this.formatter.format=='mediawiki') {
var mwt = new MediaWikiTemplate();
this.source = mwt.transcludeTemplates(this.source,this.tiddler);
}
MediaWikiTemplate.subWikify.apply(this,arguments);
};
MediaWikiTemplate.normalizeTitle = function(title)
{
title = title.replace(/_/mg,' ');
title = title.substr(0,1).toUpperCase() + title.substring(1);
return title;
};
MediaWikiTemplate.getTemplateContent = function(name)
{
var i = name.indexOf(':');
var namespace = 'Template:';
if(i==0) {
name = name.substr(1);
namespace = '';
} else if(i!=-1) {
namespace = '';
}
i = name.indexOf('#');
if(i!=-1) {
name = name.substr(0,i);
}
name = MediaWikiTemplate.normalizeTitle(name);
var tiddler = store.fetchTiddler(namespace+name);
var text = '';
if(tiddler) {
text = tiddler.text;
if(text.indexOf('<')==-1)
return text; // optimization to avoid regular expression matching
text = text.replace(/<noinclude>((?:.|\n)*?)<\/noinclude>/mg,'');// remove text between noinclude tags
text = text.replace(/<includeonly>/mg,'');
text = text.replace(/<\/includeonly>/mg,'');
var onlyIncludeRegExp = /<onlyinclude>((?:.|\n)*?)<\/onlyinclude>/mg;
var t = '';
onlyIncludeRegExp.lastIndex = 0;
var match = onlyIncludeRegExp.exec(text);
while(match) {
t += match[1];
match = onlyIncludeRegExp.exec(text);
}
text = t == '' ? text : t;
} else {
text = namespace + name;
if(config.options.chkMediaWikiDisplayEmptyTemplateLinks) {
text = '[['+text+']]';
}
}
return text;
};
MediaWikiTemplate.prototype.substituteParameters = function(text,params)
{
var t = '';
var pi = 0;
var bp = MediaWikiTemplate.findTBP(text,pi);
var paramIndex = 1;
while(bp.start!=-1) {
var name = text.substring(bp.start+3,bp.end);
var d = MediaWikiTemplate.findRawDelimiter('|',name,0);
if(d!=-1) {
var def = name.substr(d+1);
name = name.substr(0,d);
var np = MediaWikiTemplate.findDBP(name,0);
while(np.start!=-1) {
var nx = this._expandTemplateNTag(this.substituteParameters(name.substring(np.start+2,np.end),params));
name = name.substr(0,np.start) + nx + name.substr(np.end+2);
np = MediaWikiTemplate.findDBP(name,0);
}
}
//params is [undefined,"param1=aaa"]
var val = params[name];
if(val===undefined) {
val = params[paramIndex];
}
if(val===undefined) {
val = def;
}
if(val===undefined) {
val = '{{{'+name+'}}}';
} else {
// remove numbered parameters before substitute nested parameters
var p2 = {};
for(var i in params) {
if(isNaN(parseInt(i,10)))
p2[i] = params[i];
}
val = this.substituteParameters(val,p2);
}
t += text.substring(pi,bp.start) + this._transcludeTemplates(val);
pi = bp.end+3;
bp = MediaWikiTemplate.findTBP(text,pi);
paramIndex++;
}
t += text.substring(pi);
return t;
};
MediaWikiTemplate.prototype.expandTemplateContent = function(templateName,params)
{
if(this.stack.indexOf(templateName)!=-1) {
this.error = true;
//return 'ERROR: template recursion detected';
return 'Template loop detected: '+templateName;
}
this.stack.push(templateName);
var text = MediaWikiTemplate.getTemplateContent(templateName);
text = this.substituteParameters(text,params);
//fnLog('ret expandTemplateContent'+text);
return text;
};
MediaWikiTemplate.prototype._expandVariable = function(text)
{
if(text.length>16)// optimization to avoid switch statement
return false;
var ret = false;
switch(text) {
case 'BASEPAGENAME':
ret = this.tiddler.title;
var i = ret.indexOf(':');
if(i!=-1)
ret = ret.substr(i+1);
break;
case 'NAMESPACE':
ret = this.tiddler.title;
i = ret.indexOf(':');
ret = i==-1 ? '' : ret.substr(0,i);
break;
case 'PAGENAME':
ret = this.tiddler.title;
break;
case 'PAGENAMEE':
ret = MediaWikiTemplate.normalizedTitle(this.tiddler.title);
break;
case 'NUMBEROFARTICLES':
var n = 0;
store.forEachTiddler(function(title,tiddler) {
if((tiddler.fields.wikiformat && tiddler.fields.wikiformat==config.parsers.mediawikiFormatter.format) || tiddler.isTagged(config.parsers.mediawikiFormatter.formatTag)) {
++n;
};
});
return String(n);
break;
case 'REVISIONID':
ret = this.tiddler.fields['server.revision'];
break;
case 'SITENAME':
ret = store.getTiddlerText('SiteTitle');
if(ret.indexOf('~')==0) {
ret = ret.substr(1);
}
break;
default:
break;
}
return ret;
};
MediaWikiTemplate.prototype._expandParserFunction = function(text)
{
var fnRegExp = /\s*(#?[a-z]+):/mg;
fnRegExp.lastIndex = 0;
var match = fnRegExp.exec(text);
if(!match) {
return false;
}
var ret = false;
var len = match[0].length;
var fn = match[1];
switch(fn.toLowerCase()) {
case '#if':
var e = MediaWikiTemplate.findRawDelimiter('|',text,0);
var p = text.substring(len,e).trim();
var lhs = text.substr(e+1);
e = MediaWikiTemplate.findRawDelimiter('|',lhs,0);
if(e==-1) {
ret = p=='' ? '' : lhs;
} else {
var rhs = lhs.substr(e+1);
lhs = lhs.substr(0,e);
ret = p=='' ? rhs : lhs;
}
break;
default:
break;
}
return ret;
};
MediaWikiTemplate.prototype._splitTemplateNTag = function(ntag)
// split naked template tag (ie without {{ and }}) at raw pipes into name and parameter definitions
{
var pd = []; // parameters definitions array, p[0] contains template name
var i = 0;
var s = 0;
var e = MediaWikiTemplate.findRawDelimiter('|',ntag,s);
while(e!=-1) {
pd[i] = ntag.substring(s,e);//.trim();
i++;
s = e+1;
e = MediaWikiTemplate.findRawDelimiter('|',ntag,s);
}
pd[i] = ntag.substring(s);//.trim();
return pd;
};
MediaWikiTemplate.prototype._expandTemplateNTag = function(ntag)
{
var ret = this._expandVariable(ntag);
if(ret!==false) {
return ret;
}
var c = MediaWikiTemplate.findDBP(ntag,0);
if(c.start==-1) {
// only expand parser functions if all parameters have been subsituted
ret = this._expandParserFunction(ntag);
if(ret!==false) {
return ret;
}
}
var pd = this._splitTemplateNTag(ntag);
var templateName = pd[0];
var s = 1;
var params = {};
var n = 1;
for(var i = s;i<pd.length;i++) {
var t = pd[i];
var p = MediaWikiTemplate.findRawDelimiter('=',t,0);
if(p!=-1) {
var pnRegExp = /\s*([A-Za-z0-9\-]*)\s*=(.*)/mg;
pnRegExp.lastIndex = 0;
match = pnRegExp.exec(t);
if(match) {
var name = match[1];
var x = parseInt(name,10);
if(!isNaN(x)) {
n = x;
//t = t.substr(p+1);
t = match[2];
p = -2;// do not increment parameter number
}
} else {
p = -1;
}
}
if(p==-2) {
params[String(n)] = t;
} else if(p==-1) {
params[String(n)] = t;
n++;
} else if(name!='0') {//0 sets null parameter
name = this._transcludeTemplates(name);
var val = t.substr(p+1).trim();// trim named parameter values
if(val) {
params[name] = val;
}
}
}
/*for(i in params) {
console.log('p0['+i+']='+params[i]);
params[i] = this.substituteParameters(params[i],params);
console.log('p1['+i+']='+params[i]);
params[i] = this._transcludeTemplates(params[i]);
console.log('p2['+i+']='+params[i]);
}*/
ret = this.expandTemplateContent(templateName.trim(),params);
return ret;
};
MediaWikiTemplate.prototype._transcludeTemplates = function(text)
{
if(!text)
return text;
var c = MediaWikiTemplate.findDBP(text,0);
var ns = text.indexOf('<nowiki>');
var ne = text.indexOf('</nowiki>',ns);
if(ns!=-1 && c.start!=-1 && (c.start>ns && c.start<ne)) {
c = MediaWikiTemplate.findDBP(text,ne);
}
while(c.start!=-1) {
var t = this._expandTemplateNTag(text.substring(c.start+2,c.end));
if(this.error) {
text = text.substring(0,c.start) + t + text.substring(c.end+2);
return text;
}
t = this._transcludeTemplates(t);
text = text.substring(0,c.start) + t + text.substring(c.end+2);
if(this.error)
return text;
c = MediaWikiTemplate.findDBP(text,c.start+t.length);
this.stack = [];
this.error = false;
}
return text;
};
MediaWikiTemplate.prototype.transcludeTemplates = function(text,tiddler)
{
this.stack = [];
this.error = false;
this.tiddler = tiddler;
if(tiddler.title.indexOf('Template:')==0)
return text;
return this._transcludeTemplates(text);
};
} //# end of 'install only once'
On this page the community efforts are coordinated.
If you want to contribute, you might just jump right in and start an article that you're interested in.
Don't be afraid of making mistakes; just write away and rely on the community to perfect the article.
The [http://groups.google.com/group/TiddlyWikiDocs/ TiddlyWikiDocs group] is used to coordinate documentation efforts, including this wiki.
== Launch Preparations ==
# <s>import all pages from TWguides</s>.
# <s>disallow edits on TW guides.</s>
# introduce a copyright policy (Creative Commons? GFDL?)
# categorization:
## create index of major categories
## flag pages that require review and/or enhancements
# fix CSS issues with IE (or use new skin from Clint and/or FND if it's ready)
# <s>decide on policy for anonymous edits user signups and make sure spam catchers are working</s>
# make a general announcement that the new wiki is up and running
# redirect TWGuides to new site
== Site Structure ==
=== Portals ===
Please add suggestions here.
* Main Page
* Users (subsumed under Main Page portal!?)
* Developers (subsumed under Main Page portal!?)
* Customization
=== Categories ===
Please add suggestions here.
* Customization
* Plugins
* Macros
=== Templates ===
Please add suggestions here.
* [[Template:!]]
* [[Template:Cleanup]]
* [[Template:Dablink]]
* [[Template:Incomplete]]
* [[Template:Note]]
* [[Template:OptionalTableRow]]
* [[Template:Plugin]]
* [[Template:Print]]
* [[Template:Quote]]
* [[Template:Sidenote]]
* [[Template:StatusOK]]
* [[Template:StatusPending]]
== Missing Articles ==
[[Image:TWdoc.png|thumb|right|300px|Documentation Topics]]
This is a list of frequently-requested information which has not yet been satisfyingly documented here.
The page names listed here are only preliminary suggestions; feel free to enhance them for clarity or readability.
Discussions about specific items should be lead on the [[{{TALKPAGENAME}}|discussion page]].
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/2558268245a93d7a/7dcfe21a4e0d5bd3?#7dcfe21a4e0d5bd3 limits] (e.g. filesize, amount of tiddlers etc.)
* [[Upgrading to a newer version]] (with sub-sections for specific releases and common problems)
* [[Optimizing Screen Space]] (e.g. TopMenu, ToggleSidebar etc.)
* [[Default Tiddlers]]
* [[Using the viewtemplate to control what to view and what not to view]]
* [[Reducing Filesize]] (also: code compression / [[TinyTiddly]])
* [[Image Captions]]
* [[Multi-Column Content]]
* [[WYSIWYG Editing]]
* [[Structuring Contents]] (e.g. hierarchical outlining)
* [[Formulae]] / [[Formulas]] / [[Mathematical Symbols]] (same page; the latter one redirect to the first)
* [[Images]] (scaling, embedding, text flow etc.)
* [[Quizzes]]
* [[Translations]]
* [[Embedding Flickr Badges]]
* [[Special Characters and Symbols]] (e.g. umlauts)
* [[Major Adaptations]] (MPTW, TiddlySnip, D3, GTD, presentation mode etc. - also MyTimesheets and MyForms)
* [[Browser Issues]]
* [[Operating Systems]]
* [[Slicing Tiddlers]]
* [[Dropdown Menus]]
* [[Creating a New File From an Existing TiddlyWiki]]
* [[Preserving Whitespaces]]
* [[Linking to Wikipedia]] (using a macro)
* [[Automatic Refreshing of Tiddlers]]
* [[Hiding Shadow Tiddlers From Lists and Searches]]
* [[Use of other languages such as XML, HTML]]
* [[Custom Fields]]
* [[Gradients]]
* [[Excluding and Including Tiddlers]]
* [[Timeline]]
[[Category:Coordination]]
{{Incomplete}}
== Be Bold! ==
Contributions to the wiki are always welcome.
So if you ever come across information that you think is useful to a larger audience, feel free to add it to the wiki.
Don't worry if you're not sure about details like page title or categorization - it's a wiki, so chances are others will take care of that then.
== Editing Guidelines ==
When modifying a page, a concise edit summary should be added (via the respective input field), describing what has been changed and/or why.
Modifications should only be flagged as "minor edits" if the page's content has not been significantly altered (e.g. when correcting misspellings or typos).
== Page Names ==
Page names should generally be concise (e.g. "Customization" or "Customizing" instead of "How to customize TiddlyWiki.").
=== Capitalization in Titles ===
# Always capitalize the first and the last word.
# Capitalize all nouns, pronouns, adjectives, verbs, adverbs, and subordinate conjunctions ("as", "because", "although").
# Lowercase all articles, coordinate conjunctions ("and", "or", "nor"), and prepositions regardless of length, when they are other than the first or last word.<br>Capitalize prepositions of five characters or more ("after", "among", "between").
# Lowercase the "to" in an infinitive.
source: [http://www.writersblock.ca/tips/monthtip/tipmar98.htm Writer's Block]
[[Category:Help]]
== See Also ==
* [[Project:Quality|Quality]]
{{Incomplete}}
http://minitiddlyserver.com
[[Category:Server-Sides]]
{{incomplete}}
{{Quote|[http://www.tiddlywiki.com/#MinorChanges Jeremy Ruston]|
Sometimes it's useful to stop a minor change to a tiddler from causing it to rise to the top of the timeline. This can be done by pressing the Shift key while clicking the 'done' toolbar button, or with the Shift-Control-Enter key. This behaviour can be switched to become the default with one of the AdvancedOptions.
}}
*Dave Gifford recommends that the TiddlyWiki background be kept white. That way a colorized border will not be printed when the user's Internet browser is set to print background colors (for example, the colors used for tables and headlines).
http://simonbaird.com/images/monkeygtd/revLogo2.gif
The official MonkeyGTD documentation project. Contributions are welcome.
== Documentation ==
<div>
<div style="float: left; width: 32%; margin-right: 2em; padding: 0;">
* [[/Getting Started|Getting Started]]
* [[/Some Basic Concepts|Some Basic Concepts]]
* [[/Frequently Asked Questions|Frequently Asked Questions]]
* [[/Upgrading from previous versions|Upgrading from previous versions]]
* [[/Keeping your MonkeyGTD up to date|Keeping your MonkeyGTD up to date]]
* [[/Translations|Translations]]
</div>
<div style="float: left; width: 32%; margin-right: 2em; padding: 0;">
* [[/Contributing to MonkeyGTD|Contributing to MonkeyGTD]]
* [[/Roadmap|Roadmap]]
* [[/Users Guide|Users Guide]]
* [[/Customisation Guide|Customisation Guide]]
* [[/Developers Guide|Developers Guide]]
</div>
<div style="float: left; padding: 0;">
Old content (for review/update):
* [[Getting started with MonkeyGTD 2.1 alpha]]
</div>
<div style="clear: left;"></div>
</div>
== Links ==
* [http://monkeygtd.tiddlyspot.com MonkeyGTD Website]
* [http://monkeygtd.blogspot.com MonkeyGTD Blog]
[[Category:Adaptations]] [[Category:GTD]]
Quick Add allows you to quickly add a large number of actions, including the context and state (next,waiting,future) and meta-data (starred, etc.)
If you would like to contribute to MonkeyGTD you could do so by:
* [http://groups.google.com/group/GTD-TiddlyWiki posting] or [mailto:simon%20dot%20baird%20at%20gmail%20dot%20com emailing] suggestions and ideas
* reporting bugs (take a look at [[MonkeyGTD/Roadmap|the Roadmap]] in case your bug is already listed).
* reviewing MonkeyGTD on your blog/magazine/newsletter
* linking to MonkeyGTD from your web page or blog
* showing [http://monkeygtd.tiddlyspot.com/demo3.html MonkeyGTD] to your friends
* joining the [http://groups.google.com/group/GTD-TiddlyWiki GTD-TiddlyWiki Google Group/Mailing List] and responding to requests for help
* contributing some documentation to the MonkeyGTD Documentation project, ie this section of TiddlyWiki.org
* contributing some cool example projects for the demo
* writing some help text for http://monkeygtd.tiddlyspot.com/empty.html#MonkeyGTDHelp
* translating MonkeyGTD to your language (in the future, not really supported at the moment)
* downloading the source and writing some code/html/css etc. See [[MonkeyGTD/Developers Guide|Developers Guide]] and [[MonkeyGTD/Roadmap|Roadmap]] for info and ideas.
* subscribing to the MonkeyGTD blog [http://monkeygtd.blogspot.com/feeds/posts/default?alt=rss via rss]
* donating money to support MonkeyGTD using the PayPal link at http://monkeygtd.tiddlyspot.com/
* joining the MonkeyGTD [http://www.facebook.com/group.php?gid=12751805639 Users facebook group]
{{Incomplete}}
==Examples==
* [[MonkeyGTD/Customization Guide/Priority|Adding Priority Support]]
* [[MonkeyGTD/Customization Guide/Custom Project Classifications|Custom Project Classifications]]
* [[MonkeyGTD/Customization Guide/Waiting Actions|Waiting Actions]]
==Some Examples from the Google Group==
* http://groups.google.com/group/GTD-TiddlyWiki/browse_thread/thread/d8e799529e813701
* http://monkeygtd.blogspot.com/2008/04/allow-multiple-contexts.html
== Adding Project and Action Classifications ==
=== Pending and Queued Items ===
==== Concept ====
As a MonkeyGTD user, I found that the built-in project and action classifications were not helping me manage my tasks well enough. For Projects, the built-in choices are 'active' or 'someday/maybe'. For Actions, there are 'next', 'waiting for', and 'future'. Next and active are pretty much the same, but for internal reasons, they need to have different names so that they can be different TiddlyWiki tags. Similarly, 'future' and 'someday/maybe' are also analogous.
I found that I couldn't focus on my next actions unless I had as few active as possible, maybe five or ten at most. But pushing all the other near-term tasks into future-someday/maybe was also difficult, because they got lost among all the pie-in-the-sky stuff, like running a marathon or learning Chinese calligraphy.
My solution was to create another classification for tasks which are current and are probably important, but which I probably could not work on today. For Actions, I called it "Pending", and for Projects, I called it "Queued", but the concept is the same. (Remember the tags need to be unique). So now I can focus on the next actions for my active projects, and keep that list pretty small, and then when they are cleared off, I can browse the list of pending actions and promote a few of them to 'next'.
When all of my active projects are completed (I can dream, can't I?) then I can check the queued projects, and make them active, and of course their next actions will show up. With a new dashboard for active and queued/pending items, I can do a daily check in case I need to swap a queued project which is reaching it's deadline. Meanwhile the future-someday items are out of sight until my regular weekly or monthly review.
==== Implementation ====
* Create new tiddler: '''''Pending'''''
;Content
:order:2
:button:p
:buttonLong:pending
;Tags
:ActionStatus
<br>
* Create new tiddler: '''''Queued'''''
;Content
:order:2
:button:q
:buttonLong:queued
;Tags
:ProjectStatus
<br>
* Find the tiddlers for Waiting, Future, and SomedayMaybe, and add one to the "order" value
Note: you can find all the dashboard and other built-in tiddlers in the Sidebar -> More -> TW -> All. They don't show up in searches thanks to the 'excludeSearch' tag.
<br><br>
* Modify tiddler '''''TagDashboards''''', adding the following at the end of the first column of the project under the 'Waiting Actions by Person'
<nowiki> <div macro="mgtdList title:'Pending Actions Waiting for Availability' tags:'Action && Pending && !Done' view:Action </nowiki>
<nowiki> ignoreRealm:yes </nowiki>
<nowiki> group:Context </nowiki>
<nowiki> gView:bold </nowiki>
<nowiki> newButtonTags:'Action Pending' </nowiki>
<nowiki> "></div> </nowiki>
This change is very important. Without it, pending actions won't show up when viewing their owning project.
<br><br>
* I made a new dashboard showing the stuff I care about. I hardly use any of the others now.
create new tiddler: '''''<nowiki>[[Jason's Dashboard]]</nowiki>''''' (Use your own name, I won't be offended! Or call it <nowiki>[[GTD Dashboard]]</nowiki> or something)
;Content
{{cols2{
{{col{
<<tiddler 'Ticklers Requiring Action'>>
<<mgtdList title:'Next Actions' startTag:Action tags:'Next && !Done' view:ActionProj mode:global
group:Context
gView:bold
where:tiddler.hasActiveProject()
newButtonTags:'Action Next'
>>
}}}
{{col{
<<mgtdList title:'Active Projects' startTag:Project tags:'Active && !Complete' view:ProjectArea mode:global
newButtonTags:'Project Active'
>>
<<mgtdList title:'Pending Actions in Active Projects' startTag:Action tags:'Pending && !Done' view:ActionProj mode:global
group:Context
gView:bold
where:tiddler.hasActiveProject()
newButtonTags:'Action Pending'
>>
<<mgtdList title:'Queued Projects' startTag:Project tags:'Queued && !Complete' view:ProjectArea mode:global
newButtonTags:'Project Queued'>>
<<mgtdList title:'Reference Items For Active Projects' tag:Reference startTag:Reference view:plain mode:global
group:Project
gView:bold
newButtonTags:'Reference'
where:tiddler.hasActiveProject()&&(tiddler.hasParent('Project'))
>>
}}}
}}}
;Tags
:View excludeSearch
<br>
* Add your new dashboard to the <nowiki>[[DoWorkMenu]]</nowiki> tiddler
<br>
* Modify the existing dashboard tiddlers as desired
Generally this is pretty easy, cutting and pasting existing <mgtdList...> items, adding new lists for the queued and pending items wherever you think they belong. Note that your changes to mGTD tiddlers will be lost whenever you update mGTD to the latest release. It's probably not worth modifying any views which you don't use frequently.
<br><br>
The original discussion for this idea can be found at:
http://groups.google.com/group/GTD-TiddlyWiki/browse_thread/thread/bd1d4179a211ae06#
==Adding Priority to mGTD Projects==
Although not standard GTD practice, it may be desired to add priority tags to projects and actions.
To add a drop down menu with priority tags to the Project header, do:
* Create a tiddler called Priority
* Tag it with GTDComponent and then click Done.
* Use 'new here' to make some tiddlers tagged with Priority
* Save and reload
* Open tiddler TitleButtons (can be found in the All tab) and, in the !Project section, locate the following line;
<nowiki><span macro="multiToggleTag ProjectStatus longVersion:on"></span>
</nowiki>
Copy this line and paste just above itself and then modify the top one to read;
<nowiki><span macro="multiSelectTag Priority allowNone:on"></span></nowiki>
(Exactly where to place it is just a suggestion. This places it just to the left of the project status, i.e to the left of "active someday/maybe".)
* Now open the MgtdConf plugin. This can be done by clicking Backstage > Plugins > click MgtdConf in the list and then click Backstage again (to close the Backstage view). In the now open MgtdConf, you have to add Priority to the list of tags:
<nowiki>config.mGTD.tagsToIndex = [</nowiki>
<nowiki> (here are the existing tags)</nowiki>
<nowiki> "Priority"</nowiki>
<nowiki>]</nowiki>
* Save/reload.
You should now see a drop down menu in the Project header, that also lets you create priority-statuses (e.g Prio1, Prio2 etc or A, B, C...)
* Make a new tiddler named e.g "Active Projects by Priority" and add the following macro in the text field to show active projects grouped by Priority
<nowiki><<mgtdList title:'Active Projects' startTag:Project tags:'Active && !Complete' view:Project mode:global''</nowiki>
<nowiki> ''group:Priority''</nowiki>
<nowiki> gView:bold</nowiki>
<nowiki> newButtonTags:'Project Active'</nowiki>
<nowiki> >></nowiki>
Tip: In the Priority tiddler, for the tagglyTagging feature (i.e the listing of tiddlers that have carry the various priority tags), click "columns" until there's one column for each priority.
==Adding Priority to mGTD Action==
Although not standard GTD practice, it may be desired to add priority tags to projects and actions.
To add a drop down menu with priority tags to the Action header, do:
* Create a tiddler called Priority
* Tag it with GTDComponent and then click Done.
* Use 'new here' to make some tiddlers tagged with Priority (I created 1High, 2Medium, 3Low to have alphabetic order)
* Save and reload.
* Open tiddler TitleButtons (can be found in the All tab) and, in the !Actions section, locate the following line:
<span macro="hideWhenTaggedAny 'Waiting For' 'Done'" class="label">Associated contact:</span>
add the following line before this line:
<span class="label">Priority</span>:<br><span macro="multiSelectTag Priority allowNone:on"></span> <span macro="linkToParent Priority"></span>
(Exactly where to place it is just a suggestion. This places it just to the left of Associated Contacts)
* Now open the MgtdConf plugin. This can be done by clicking Backstage > Plugins > click MgtdConf in the list and then click Backstage again (to close the Backstage view). In the now open MgtdConf, you have to add Priority to the list of tags:
config.mGTD.tagsToIndex = [ (here are the existing tags) "Priority" ]
* Save/reload.
You should now see a drop down menu in the Action header, that also lets you create priority-statuses
Make a new tiddler named e.g "Next Actions By Priority" and add the following macro in the text field to show Next Actions grouped by Priority:
<<mgtdList title:'Next Actions By Priority' startTag:Action tags:'Next && !Done' view:ActionProj mode:global'' group:Priority gView:bold newButtonTags:'Action Next' >>
===Needed additional descriptions===
* ...making the Actions by default inherit the priority from the Project
<div style="font-size:150%;color:red;border:1px solid #400;background:#fda; padding:1em;">Please note: These instructions are now largely obsolete due to the plugin and tweaks listed below being included in MonkeyGTD. See [https://www.blogger.com/comment.g?blogID=37667628&postID=4985620318516130385 this blog post] for details.</div>
How to get MGTD "cascade actions", i.e to automatically turn "Future actions" into "Next actions" as soon as a preceding "Next action" is completed.
The following text is based on what is described in these threads;
http://groups.google.se/group/GTD-TiddlyWiki/browse_thread/thread/923a998109fbdf0f?hl=sv#
The very plugin is from Carsten Thiele and the "surrounding tweaks and compliments" are from Kralik.
For this to function fully, you need your MGTD to be based on a TW core 2.4.3 or later.
To check your current core version by simply writing <<version>> in a new tiddler. If older than 2.4.3, do;
1) Download a new TW from [http://www.tiddlywiki.com]. For various reasons*, save it in the same folder as where your original MGTD file is.
2) Import all tiddlers from your MGTD into this new TW
3) Rename this new TW into your MGTD-file-name
(*In FF3 you may otherwise encounter problems doing this. See [http://tiddlywiki.org/wiki/Firefox#File_Access] )
Now, install the SequencedActionsPlugin by Carsten Thiele from;
[http://www.carsten-thiele.de/monkeygtd/SequencedActionsPlugin.html#SequencedActionsPlugin]
(genereal reference on it here; [http://www.carsten-thiele.de/monkeygtd/SequencedActionsPlugin.html])
In principle this works fine on the level of tags. Nevertheless there is an additional Tweak developed by Kralik, providing a GUI-based access, with a slight drawback. Kralik wrote: ''One important thing to know: with the drop-down action selector menu, it will only set ONE action as the dependent. If you manually set 2+, it will be fine, unless you change one with the drop-down box. Then it will erase all but that one.
== Adding the graphical tweak ==
This will introduce a drop-down list where you can choose a dependent-action to your active action.
1) Edit '''MgtdConf''' and add "Action", to the '''tagsToIndex''' list.
2) Edit '''TitleButtons''' and add the following code under the '''!Action''' heading, near the top just under the:
<pre>
<div style="float:right;" class="smaller">
</pre>
add the new line:
<pre>
<span class="label">Depends on:</span><span macro="multiSelectTag
Action allowNone:on"></span><span macro="linkToParent Action"></span>
</pre>
With the next step the drop-down list for dependent actions is filtered to be localized to the active project in which the new dependent action is created.
IMPORTANT NOTE: Since this filtering involves an addition to a core function is will be very likely (unless it becomes default later on) removed when you upgrade. Thus this step needs to be repeated after upgrading. (Hint: Do the upgrade anyway beforehand.)
''In '''MgtdTagControls''' under '''MultiSelectTag''', find this:
<pre>
if (tag == "Project") {
// only want to see active projects
filterComplete += "!tiddler.tags.contains('Complete')";
}
</pre>
''...and put the following code right after it:
<pre>
if (tag == "Action") {
// only want to see active actions; actions only show other actions in
same project (or no project)
if (tiddler.hasParent('Project'))
filterComplete += "(!tiddler.tags.contains('Done') &&
tiddler.tags.contains('"+tiddler.getParent('Project')+"'))";
else
filterComplete += "(!tiddler.tags.contains('Done') &&
!tiddler.hasParent('Project'))";
}
</pre>
''to set the newly created action automatically and by default to 'future' please find this (in the same section, further below):
<pre>
// if selectedItem is null this works to remove any
actOnTiddler.setTagFromGroup(tag,selectedItem);
</pre>
''...and add this just below:''
<pre>
// automatically make dependent actions future
if (tag == "Action") {
if (selectedItem == null)
actOnTiddler.setTagFromGroup("ActionStatus", "Next");
else
actOnTiddler.setTagFromGroup("ActionStatus", "Future");
}
</pre>
''NOTE: If the dependency is removed the action will also be set to 'Next'.
During discussions in the thread given above, ''Mat'' mentioned a slight mishap. He wrote:
''I did a little testing and found the following; If an action B is set
as dependant on A, but B is marked as "Waiting for". Then, finishing
A, auto-sets B to *both* Next and Waiting for. I think only "Future"
actions should be auto-set to Next.''
To avoid this and make it to ignore 'Waiting for' actions you have to alter the original '''SequencedActionsPlugin''' (again according to Kralik):
''Replace the following:
<pre>
if (status) {
if (this.allPreviousActionsAreDone(currentTiddler)) {
this.setTiddlerTag(currentTiddler.title, !status, "Future");
this.setTiddlerTag(currentTiddler.title, status, "Next");
}
} else {
this.setTiddlerTag(currentTiddler.title, !status, "Future");
this.setTiddlerTag(currentTiddler.title, status, "Next");
}
</pre>
''with this:
<pre>
if (currentTiddler.getParent("ActionStatus") != "Waiting For") {
if (status) {
if (this.allPreviousActionsAreDone(currentTiddler)) {
this.setTiddlerTag(currentTiddler.title, !status, "Future");
this.setTiddlerTag(currentTiddler.title, status, "Next");
}
} else {
this.setTiddlerTag(currentTiddler.title, !status, "Future");
this.setTiddlerTag(currentTiddler.title, status, "Next");
}
}
</pre>
NOTE: There are some more closing parentheses in the code here. Thus better re-check, that every opening one has its closing pendant at the according indentation. Otherwise you will get an error, during loading of the mGTD-file!
== Alternative/Additional Tweak ==
This was previously (to the drop-down-menu version above) developed (also by Kralik).
This seems to be not 100% compatible or at least not fully integrated with the approach shown above. Anyway this adds a 'dependent action' button in the toolbar (next to new journal and new here).
''To get this 'dependent action' button in the toolbar to create a new Action marked as 'Future', do:
In '''MonkeyGTDTheme''' under '''!ViewTemplateToolbar''' right before the last </div> put the following (one) line:''
<pre>
<span macro="newSavedTiddler title:'new dependent action'
label:'dependent action' tag:{{'Action Future
[['+config.macros.mgtdList.getRealm()+']] [['+tiddler.getParent
('Context')+']] [['+tiddler.getParent('Project')+']] [['+tiddler.title
+']]'}}"></span></span>
</pre>
==Intro==
To start work as a developer. the first thing you need to to is to grab a copy of the code base using subversion.
==Getting the code==
For those who know about subversion, here is the repository url: http://svn.tiddlywiki.org/Trunk/contributors/SimonBaird/mgtd3.
===Linux/Mac/Windows power users===
First, grab a copy of [http://subversion.tigris.org/ Subversion].
Second, at a command prompt, run svn co http:/svn.tiddlywiki.org/Trunk/contributors/SimonBaird/mgtd3
===Windows w/ Tortoise SVN===
First, install [http://tortoisesvn.tigris.org/ Tortoise SVN].
Second, go to your working directory, right click, and select Check Out. Fill in the repository url as listed above.
==Compiling/Building==
First, make sure you have Ruby installed.
Second, download the MonkeyPirateTW from http://mptw.tiddlyspot.com/empty.html to the empties directory.
'''Note: I think you have to convert the empty.html file to unix line end chars. (In vim this is :set ff=unix). This is due to bugs in r4tw that cause it to choke on dos line end chars.'''
Third, run build.rb (double click for a windows user, ruby build.rb for the linux/mac developer).
If that worked, check the uploads directory for your new, fresh from the build script, MonkeyGTD Tiddlywiki!
==Other information==
See http://monkeygtd.blogspot.com/2008/03/becoming-monkeygtd-developer.html for the original instructions.
==General==
===Is it stable?===
Fairly. I think you can trust it with your data. There are plenty of people using it. You should ensure that you enable backups or make regular backups yourself.
===Why do you call it 'alpha'?===
It's a label I use to mean that it has a lot missing functionality, has areas that are incomplete and/or buggy and hasn't been properly tested in IE and Safari.
===Will there ever be beta or release versions?===
Hopefully.
===What version should I use?===
You should use the newest 3.0 alpha.
===What if I'm using an older version?===
I hope to create some upgrade guides. But at the moment you can either wait or give it a try yourself with the brief notes are available at [[MonkeyGTD/Upgrading from previous versions|Upgrading from previous versions]].
===What license is MonkeyGTD published under?===
The BSD license. See [http://monkeygtd.tiddlyspot.com/#License here].
===How can I contribute?===
See [[MonkeyGTD/Contributing to MonkeyGTD]].
==Technical==
===I made a tiddler with square brackets in the title and now I can't delete it===
Click the More tab from the right sidebar. Click the Timeline tab. Look for the offending tiddler in the list under the Timeline tab. Click on it to open it. Then click 'edit' from the tiddler toolbar. Change the title to remove the square brackets. Click done.
===How do I make my theme selection permanent?===
Find a tiddler called MgtdUserConf. Make sure it's tagged as 'systemConfig'. Put the following in it (or whatever theme you prefer), then save and reload.
config.options.txtTheme = 'MonkeyGTDPrint3x5';
===How do I update to the latest version?===
See [[MonkeyGTD/Keeping your MonkeyGTD up to date|Keeping your MonkeyGTD up to date]].
===Can I stop the Confirmation (Allow/Deny) required to Save my file in Firefox 3?===
Yes, you can change the value of a single Firefox Preference, to allow Local HTML Files to be saved without having to answer the question ever again.
Type about:config in the Address Bar (Note the necessary Colon between the words "about" and "config"). Find the Preference called "security.fileuri.strict_origin_policy". Double click on it to toggle it to a value of false. Restart Firefox to try it out.
Be aware that this does alter the built-in security of Firefox.
===How do I change the default realm?===
You can change the default realm if you search for and open the
tiddlers titled "Personal" and "Work", and then change the numbers for
"order" and "priority" so that your desired default realm has the
number 1. (You'll need to save and reload in order for the change to
take effect).
{{Incomplete}}
{{Merge|[[Getting started with MonkeyGTD 2.1 alpha]]}}
* Click http://monkeygtd.tiddlyspot.com/downloadempty to download an empty MonkeyGTD file.
* Save it to your local disk, then double click it to open it in your browser.
* Remember you have to click 'save changes' otherwise your data is not saved to disk.
* Turn on backups with two clicks: In the sidebar menu, click More..., then click TW, then click ''options »'' and then, in the new drop-down menu, click ''Save Backups''.
* While you're there, change your name from ''YourName'' to something a little more meaningful.
* After that, check out [[Getting started with MonkeyGTD 2.1 alpha]] for lots of great information!
It's a good idea to update your MonkeyGTD when new releases come out, especially at the moment since it is changing fairly rapidly. (And if you subscribe to the blog you will know when updates happen). To update, do the following:
* Make sure you have a backup
* If you use Firebug you must disable it for local files otherwise import doesn't work
* Click backstage, import
* At URL or Pathname, paste in http://monkeygtd.tiddlyspot.com/upgrade.html (or select MgtdUpgradeUrl from the predefined feeds) and click 'open'
* Check the checkbox at the top to select all tiddlers.
* Uncheck "Keep these tiddlers linked..."
* Click 'import'
* Click okay to confirm overwriting existing tiddlers
* Save and reload (or save to web and shift-reload if your doing this online at Tiddlyspot)
* Turn on one or more realms. (At the moment upgrading has the side-effect of switching off all your realms)
* Turn Firebug back on (if applicable)
Selecting "Next and Waiting Actions by Context" link you get a search that sorts all of the actions by their state z(next or waiting) and then by their context (office, home, etc.)
The '''Projects Dashboard''' shows all projects in this MonkeyGTD. The left column lists Active Projects alphabetically. The right column is split vertically in two. The top lists all Someday/Maybe Projects alphabetically, and the bottom part of the left column lists all completed subprojects.
This view does not distinguish between projects, sub-projects, sub-sub-projects, etc.
An Action that cannot be executed is usually a good candidate to become a Reference item. This permits to save the information associated to the Action, and avoid having an Action that will never be Done.
This kind of thing should be done in Trac. But nevertheless I will add things here for now.
==Known Issues==
* tba
==Roadmap (out of date)==
As of 23 April 2008:
===Active===
* do some work on mgtd translatability
* fix css in sidebar
* in quick add should cascade realms from projects to actions and also don't double realm things
* put slices in contacts and show them in lists, eg phone/email
* suppress >> links for non projects etc
* too much bold in project dashboards
* you get __NONE__ via new buttons after (No Project) and the like
===Someday Maybe===
(most of these are someday rather than maybe)
* Someday/Maybe Projects+
* Add BSD license text to mptw and mgtd
* Better way to create areas and realms and contexts
* Make areas drop-down realm sensitive
* Make right menu look nicer with accordian type styles
* Optionally auto create a folder on disk for each project and have it accessible via UI
* Project Dashboard grouped by ActionStatus
* Try using tiddler contents for NameDashboards to speed up rendering
* double quotes in project name breaks new action buttons
* find out why IE makes buttons so big
* make better how to upgrade guide
* it's weird when tickler is flashing but list is empty because you're in the wrong realm
* make (Project) etc clickable dropdown to show all projects (by realm I guess)
* sorting isn't working on Done Actions
* would be better if wrapping on long tiddlers didn't go under the buttons in dashboards
== MonkeyGTD, MPTW and TiddlyWiki ==
MonkeyGTD, or mGTD for short, is simply a TiddlyWiki tweaked and modified. Thus, at its core mGTD is a TiddlyWiki.
MonkeyPirateTiddlyWiki, or MPTW, is Simon Baird's own modification of TiddlyWiki. MonkeyGTD is in fact built on top of MPTW, hence mGTD also has all the features of MPTW.
One does probably not have to be familiar with TiddlyWiki (nor MPTW) in order to use mGTD, although it should be mentioned that mGTD is the more complex of the two so familiarity with mGTD probably also means familiarity how to use the standard TiddlyWiki. Familiarity with David Allen's GTD methodology is necessary for using mGTD effectively though.
At present MonkeyGTD is only available in English. But there are plans to enhance support for translatability and release a German version in the near future.
=== Upgrading within 3.0 alpha versions ===
If you currently have a 3.0 alpha version, please follow the directions at
[[MonkeyGTD/Keeping_your_MonkeyGTD_up_to_date|Keeping your MonkeyGTD up to date]]
===Upgrading from 2.1 alpha versions===
This is pretty straight forward. Basically just grab a fresh 3.0 empty file and import the content from your existing 2.1 file using Backstage/Import. Note that the file you import to has to be ''local''.
Try to import just your content and not the MPTW and MonkeyGTD plugins and supporting tiddlers. Save and reload. Note that ticklers will import but they won't preserve their tickle dates. You will need to add their dates manually. After importing Projects they need to be marked as Active. You can see all your projects by opening the tag Project from under More/TW/More/Tags. Then one by one open each Project and click the Active button as required.
====Note for Tiddlyspot users====
The basic method is the same as the above. However it's recommended to create a new MonkeyGTD site then download it to get your fresh empty. This ensures that you have the newer version of UploadPlugin. Once you've completed the import as described above, you can optionally change the site id to your old site id by editing TspotSetupPlugin. After this the next time you upload it will upload to your old site id.
===Upgrading from 1.0 versions===
It's not as simple. If you do manage to import your 1.0 projects and actions into an empty 3.0 you will need to rename the "Task" tiddler to "Action" and say yes when it asks to rename the tag in N tiddlers. I suspect that there will be other snags along the way, so do consider the 'start fresh' option:
===Starting fresh and manually migrating your content===
You could alternatively start with a fresh empty 3.0 version and add your projects and actions manually. Using Quick Add it shouldn't take too long. You could think of it as an extra thorough review...
{{Incomplete}}
==Background==
===Introduction to TiddlyWiki===
TiddlyWiki is a personal wiki. It's a little different to other wikis in a couple of notable ways:
* It runs entirely in your web browser from a local file and hence doesn't need a server.
* Instead of pages it has 'tiddlers', and you can have multiple tiddlers visible on screen at a time.
* It is easy to customise and extend using plugins written in javascript.
These have a lot of implications which won't be discussed here, but you can learn a lot more at [http://www.tiddlywiki.org/ tiddlywiki.org].
MonkeyGTD is a customised and extended TiddlyWiki. If you have used TiddlyWiki before then MonkeyGTD should be familiar in many ways. If not, that's okay too, but you might find the learning curve a little steeper.
==Concepts==
MonkeyGTD is designed to follow as closely as possible to the concepts and methods described in the book 'Getting Things Done' by David Allen
(ISBN-10: 0142000280 ISBN-13: 978-0142000281). So these concepts should be familiar to you if you know GTD. If you haven't read the book then you should do so. Not just so you can use MonkeyGTD, but because it just might change your life.
===Projects===
Projects are multi-step tasks, and it is important to define your desired outcome and at least the next action and its context.
===Actions===
===Contexts===
A context is a characteristic of a task, that describes one or more circumstances that the task is completed under. These circumstances could be by
*location
**home
**work
**garage
**errand
**gym
*time
**weekend
**evening
**business hours
**anytime
or
*resources needed
**work computer
**online
**calls
While a task can have multiple contexts, you will likely find it easiest to assign it solely to its most descriptive context. Some specific examples:
*Load the dishwasher (home, kitchen, evening)
*Research new computer parts (online, home)
As part of the GTD paradigm, when you're ready to get things done, all contexts containing tasks are displayed. Select the context you are most able to function in, and complete the tasks in that context. This lends efficiency to the process as, for example, you make all of your Calls in one block of time - you don't have to keep finding the phone, or remembering to call somebody. All of the Errands you need to run (maybe during Lunchtime) are conveniently listed in that context.
===Areas===
Areas in MonkeyGTD correspond to 'areas of responsibility' in the GTD book. In MonkeyGTD, Projects can belong to an Area. You can look at Areas to assist with higher altitude reviews (ie, one level higher than your weekly project review).
===Realms===
Realms are not a something you will find in the GTD book. The purpose of realms is so that you can effectively keep multiple GTD systems in one MonkeyGTD. The use case for this is base on when you're at work you don't want to see your personal projects and actions and vice versa. Now you could use contexts to separate home and work actions but this doesn't work well for projects and areas. By keeping work related items in a work 'realm' you can do a weekly project review or even a higher altitude review of all your work stuff without having your personal stuff in there as well, and vice versa. Realms can be 'on' which means you will see items from that realm or 'off' which means you won't see items from that realm. You can switch on more than one realm at a time and realms are flexible. You can use a single realm for everything or have many realms if you want to.
One suggested way of viewing Realms is as "roles" in ones life.
==Processing Your Inbox==
===Creating Projects, Actions and Ticklers===
p1
p2
===Using Quick Add===
===Creating Contexts, Areas and Contacts===
==Doing Work==
==Reviews==
==Setting Preferences==
==Housekeeping==
[[MonkeyPirateTiddlyWiki]] is a TiddlyWiki distribution created by [[User:SimonBaird|Simon Baird]] that includes "[[TagglyTagging]]" and a few other handy plugins.
Some instances of wiki markup (e.g. [[TiddlyWiki Markup#Block Elements|lists]] or [[Tables|tables]]) do not allow multi-line contents.
However, there are several workarounds for this.
== CSS Class Wrappers ==
By using a wrapper for [[TiddlyWiki Markup#Custom Styling|custom CSS classes]], multi-line content can be inserted directly into the respective element:
<pre>
# item 1
# {{multiLine{
item 2, first line
item 2, second line
item 2, third line
}}}
# item 3
</pre>
Note that the respective class (here <code>multiLine</code>) does not necessarily have to be defined in the [[StyleSheet]]; this works even without custom styling.
This is the cleanest and most versatile method of circumventing these limitations.
However, this technique cannot be applied within tables.
== Manual Line Breaks ==
A manual line break can be inserted by using <code><nowiki><br></nowiki></code>:
<pre>
|* List item 1<br>* List item 2<br>* list item 3<br><br>* List item with double spacing|
</pre>
Using one of [http://www.tiddlytools.com TiddlyTools]' [http://www.tiddlytools.com/#CoreTweaks core tweaks], two backslashes can be inserted to allow for actual line breaks without jeopardizing the formatting:
<pre>
|foo|bar\\
baz|
</pre>
This core tweak can be installed by creating a new [[tiddler]], [[Tags|tagging]] it with "systemConfig", and adding the following code:
<pre>
//{{{
window.coreWikify = wikify;
window.wikify = function(source,output,highlightRegExp,tiddler) {
if (source) arguments[0]=source.replace(/\\\\\n/mg,"<br>");
coreWikify.apply(this,arguments);
}
//}}}
</pre>
== Separate Tiddlers ==
By using the [[Tiddler macro]], multi-line content from a separate tiddler can be retrieved and inserted into the respective element:
<pre>
# item 1
# <<tiddler [[item 2]]>>
# item 3
</pre>
== Within Table Cells ==
The [http://devpad.tiddlyspot.com/#MediaWikiTableFormatterPlugin MediaWikiTableFormatterPlugin] provides an alternative table syntax which supports multi-line contents within table cells.
== Partial Transclusion ==
By hiding [[Tiddler Sections|sections]] in a tiddler, [[transclusion]] can be used to insert multi-line contents:
{{Tiddler|1=SampleTiddler|2=
<nowiki>
|Foo|<<tiddler [[SampleTiddler##Lorem]]>>|
|Bar|<<tiddler [[SampleTiddler##Ipsum]]>>|
/%
!Lorem
Lorem ipsum dolor sit amet.
!Ipsum
Consectetur adipisicing elit.
!end
%/
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</nowiki>
}}
{{Incomplete}}
* [[Server-Side Implementations]]
* [[Can I use TiddlyWiki as a multi-user/collaborative/server based wiki?]]
/***
|''Name:''|MultiColumnListView|
|''Description:''|Displays a list with columns|
|''Author:''|Nicolas Rusconi (nicolas.rusconi (at) globant (dot) com)|
|''Version:''|1.0.0|
|''Date:''|Mar 18, 2009|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.2.0|
|''Type''|plugin|
|''Requires''||
|''Usage''|ListView.create(place,listObject,listTemplate,callback,className, *columns*)|
***/
/*{{{*/
ListView.create = function(place,listObject,listTemplate,callback,className, columns)
{
var table = createTiddlyElement(place,"table",null,className || "listView twtable");
var thead = createTiddlyElement(table,"thead");
var r = createTiddlyElement(thead,"tr");
if (!columns || listObject.length < 6) {
columns = 1;
}
for (var i=0; i<columns; i++) {
for(var t=0; t<listTemplate.columns.length; t++) {
var columnTemplate = listTemplate.columns[t];
var c = createTiddlyElement(r,"th");
var colType = ListView.columnTypes[columnTemplate.type];
if(colType && colType.createHeader) {
colType.createHeader(c,columnTemplate,t);
if(columnTemplate.className)
addClass(c,columnTemplate.className);
}
}
};
var tbody = createTiddlyElement(table,"tbody");
for(var rc=0; rc<listObject.length; rc = rc + columns) {
r = createTiddlyElement(tbody, "tr");
for (var rc2 = rc; rc2 < rc + columns && rc2 < listObject.length; rc2++) {
var rowObject = listObject[rc2];
for (c = 0; c < listTemplate.rowClasses.length; c++) {
if (rowObject[listTemplate.rowClasses[c].field])
addClass(r, listTemplate.rowClasses[c].className);
}
rowObject.rowElement = r;
rowObject.colElements = {};
for (var cc = 0; cc < listTemplate.columns.length; cc++) {
c = createTiddlyElement(r, "td", null, className);
columnTemplate = listTemplate.columns[cc];
var field = columnTemplate.field;
colType = ListView.columnTypes[columnTemplate.type];
if (colType && colType.createItem) {
colType.createItem(c, rowObject, field, columnTemplate, cc, rc2);
if (columnTemplate.className)
addClass(c, columnTemplate.className);
}
rowObject.colElements[field] = c;
}
}
}
if(callback && listTemplate.actions)
createTiddlyDropDown(place,ListView.getCommandHandler(callback),listTemplate.actions);
if(callback && listTemplate.buttons) {
for(t=0; t<listTemplate.buttons.length; t++) {
var a = listTemplate.buttons[t];
if(a && a.name != "")
createTiddlyButton(place,a.caption,null,ListView.getCommandHandler(callback,a.name,a.allowEmptySelection));
}
}
return table;
};
/*}}}*/
CF:
I'm using TiddlyWiki 2.0.11, and it seems like my wiki options
("options >>" on the right sidebar) aren't being saved between browser
sessions. If I make changes to the options, I see them reflected
immediately, but when I close my web browser and then edit the page
again later, everything's lost. How do I fix this?
Saq:
Do you have cookies enabled? the TW options are saved in cookies.
CF:
Thanks! I had assumed the options were saved in the TiddlyWiki page
itself and set up Firefox to clear cookies when I closed the browser.
See also [[How do I change my default options?]]
[[Category:FAQ]]
[[Category:Troubleshooting]]
#REDIRECT [[Macros#Named Parameters]]
{{Review}}
Open the [[SiteTitle]] tiddler. (The tiddler is in GettingStarted but can also be found using the search box or listed under the All or Timeline tabs on the right-hand menu.)
Type the TiddlyWiki name in the main text box (below the yellow box which says 'this shadow tiddler...')
Click on Done (grey menu at top right of tiddler). The name should now be displayed in the header at the top of the TiddlyWiki.
The TiddlyWiki's sub-title can be changed by opening and editing the [[SiteSubtitle]] tiddler.
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
* [http://tw.lewcid.org/#DropDownMenuPlugin DropDownMenuPlugin]
* [http://tw.lewcid.org/#AccordionMenuPlugin AccordionMenuPlugin]
* [http://www.tiddlytools.com/#BreadcrumbsPlugin BreadcrumbsPlugin]
== External Resources ==
* [http://lewcid.org/2007/11/06/creating-tiddlywiki-navigation-menus-the-easy-way/ Creating TiddlyWiki navigation menus — the easy way.]
* [http://menuflex.tiddlyspot.com/ Menuflex - a showcase TiddlyWiki of different ways for creating menus]
[[Category:Customization]]
[[Category:Navigation]]
* [http://tw.lewcid.org/#DropDownMenuPlugin DropDownMenuPlugin]
* [http://tw.lewcid.org/#AccordionMenuPlugin AccordionMenuPlugin]
* [http://www.tiddlytools.com/#BreadcrumbsPlugin BreadcrumbsPlugin]
== External Resources ==
* [http://lewcid.org/2007/11/06/creating-tiddlywiki-navigation-menus-the-easy-way/ Creating TiddlyWiki navigation menus — the easy way.]
[[Category:Customization]]
[[Category:Navigation]]
== Plugin Properties ==
http://www.TiddlyTools.com/#NestedSlidersPlugin
The '''NestedSlidersPlugin''' "Quickly makes any tiddler content into an expandable 'slider' panel, without needing to create a separate tiddler to contain the slider content. Optional syntax allows ''default to open'', ''custom button label/tooltip'' and ''automatic blockquote formatting.''
You can also 'nest' these sliders as deep as you like ..., so that expandable 'tree-like' hierarchical displays can be created. This is most useful when converting existing in-line text content to create in-line annotations, footnotes, context-sensitive help, or other subordinate information displays."
== Nested Menus ==
'''NestedSlidersPlugin''' is invaluable for use in Menus, especially in the [[MainMenu]].
== Nested Table of Contents ==
If you are presenting a complex document in TiddlyWiki, NestedSliders - in conjunction with the [[Tiddler (macro)|Tiddler macro]] - provide an elegant way of navigating the document from its Table of Contents
== Nested "footnotes" ==
By using NestedSlidersPlugin with "footnotes", it makes it possible to display the note at the same location as the note occurs in the text.
[[Category:Plugins]]
This macro generates a button to create a journal [[tiddler]], using the current time and date as title and the tag "journal" by default.
It is otherwise identical to the [[NewTiddler]] macro.
== Usage ==
<pre>
<<newJournal [date format]>>
</pre>
The optional parameter can be used to specify a custom [[date format]].
In addition, all of the [[NewTiddler (macro)#Parameters|NewTiddler macro's parameters]] are valid.
== See Also ==
* [[NewTiddler (macro)]]
[[Category:Macros]] [[Category:Core Macros]]
This macro generates a button to create a new [[tiddler]].
== Usage ==
<pre>
<<newTiddler [parameters]>>
</pre>
=== Parameters ===
This macro uses [[named parameters]].
All parameters are optional.
{| class="wikitable"
|-
! Parameter || Description
|-
| label || button label
|-
| prompt || button tooltip
|-
| title || title for the new tiddler (defaults to "New Tiddler")
|-
| text || contents for the new tiddler
|-
| tag || tag to be applied to the new tiddler (parameter can be used repeatedly to specify multiple tags)
|-
| accessKey || single letter to use as [[access key]] to trigger the button
|-
| focus || which of the editable fields to default the focus to (e.g. "title", "text", "tags")
|-
| template || name of the [[HTML Templates|HTML template]] used to display the new tiddler (defaults to [[EditTemplate]])
|-
| fields || custom fields to be assigned to the new tiddler (space-separated list of <code>key:value</code> pairs; e.g. <code>fields:"k1:v1 k2:v2"</code>)
|}
{{Note|
Only fields contained as input fields in the specified template can be primed with an initial value.
}}
=== Examples ===
<pre>
<<newTiddler
label:"New Tiddler"
text:"Hello world."
tag:"test"
tag:"an example"
accessKey:"1"
focus:"tags"
>>
</pre>
Using [[Macros#Evaluated Parameters|evaluated parameters]], the content of a regular tiddler can be [[Preloading|inserted as boilerplate text]]:
<pre>
<<newTiddler
text:{{store.getTiddlerText("SampleTiddler")}}
>>
</pre>
(Where ''SampleTiddler'' is the name of the tiddler containing the boilerplate text.)
== See Also ==
* [[NewJournal (macro)]]
[[Category:Macros]] [[Category:Core Macros]]
{{Review}}
{{Quote|
[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/061002a263952578/2834c2b14023a882?#2834c2b14023a882 Udo]|
[In the [http://tiddlywiki.abego-software.de/#IncludePlugin IncludePlugin]] It is a "on user's demand": the user has to do something to start the
TiddlyWiki including (e.g. view a tiddler that contains the <<include...>>
macro).
It is not "real" on-demand, i.e. load the TiddlyWiki when a Tiddler inside
that TiddlyWiki is first accessed. As you already pointed out this is a
little more difficult, mainly because of the way the TiddlyWiki application
is designed. "Search" is one issue, but also more simple things like filling
the sidebar tabs. E.g. in a normal setting the "timeline" tab is open
initially. I.e. the Timeline tab would "demand" loading all included
TiddlyWikis already at startup.
}}
{{Review}}
== Opening a Set of Tiddlers ==
The [http://tw.lewcid.org/svn/plugins/OpenTiddlersMacro/OpenTiddlersMacro.js OpenTiddlersMacro] can create links that open multiple tiddlers.
Optionally, all other tiddlers can be closed first.
Alternatively, the [http://www.tiddlytools.com/#OpenTaggedTiddlers OpenTaggedTiddlers] [[script]] can be used to open a set of tiddlers based on a [[tag]].
== Opening the [[DefaultTiddlers]] ==
{{Quote|
Bradley (2006-07-18)|
<pre>
<html><a
href="javascript:void(0)"
onclick="story.closeAllTiddlers();story.displayTiddlers(null,store.getTiddlerText('DefaultTiddlers').readBracketedList())"
>Home</a></html>
</pre>
I think it could be adapted to open any set of tiddlers, eg
<pre>
<html><a
href="javascript:void(0)"
onclick="story.closeAllTiddlers();story.displayTiddlers(null,['This','That'])"
>This and That</a></html>
</pre>
}}
{{Quote|
Eric|
<pre>
<html><a href="javascript:;" onclick="story.closeAllTiddlers();restart();">home</a></html>
</pre>
This will read permalink/permaview urls and other [[URL Commands]] to determine what tiddlers to display.
}}
[[Category:FAQ]]
[[Category:Tips & Tricks]]
{{Incomplete}}
== Index Button Support ==
Currently, [http://www.tiddlywiki.com/#TiddlyWiki TiddlyWiki] has a mod for a [http://www.tiddlywiki.com/empty.download standard TiddlyWiki] to the [[PageTemplate]] that changes the [[SideBarTabs]] to be accessible through a slider button labeled "Index". This mod is useful because the [[SideBarTabs]] are often long and cause the page to scroll virtually endlessly.
To apply this mod to other TiddlyWikis, replace
<pre>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
</pre>
with
<pre>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='macro' force='true' macro='slider chkSideBarTabs SideBarTabs "index »" "display lists of tiddlers"'></div>
</div>
</pre>
within the [[PageTemplate]].
However, doing so will cause the newly created button to not look like the other buttons on the [[SideBarOptions]]. To fix this, add
<pre>
#sidebarTabs .button {
margin:0em 0.2em;
padding:0.2em 0.3em;
display:block;
}
</pre>
to the [[StyleSheet]].
== Alternate method ==
Note: this author uses this in a ccTiddly (1.8.5) install. Does not know if it works in original TiddlyWiki
The righthand sidebar consists of the tiddles 'SideBarOptions' and 'SideBarTabs'. First, move the content from 'SideBarTabs' into an alternate tiddle (I use 'SideBarContentTabs'), then create the following slider in SideBarOptions
<pre>
<<slider chkSliderContentTabs SideBarContentTabs "content »" "View TiddlyWiki Tabs">>
</pre>
Final note: The SideBarTabs tiddle is still loaded - any content can go in there. (I put a 'site copyright' note here).
== See Also ==
* [[Shadow Tiddlers]]
== External Resources ==
* [http://tiddlytools.com/#ToggleFullScreen ToggleFullScreen Tiddler]
{{Review}}
The command <<options>> shows the basic TW options.
It is used like this:
<<options>>
[[Category:Macros]]
These ~InterfaceOptions for customising ~TiddlyWiki are saved in your browser
<<option txtUserName>>
<<option chkSaveBackups>> ~SaveBackups
<<option chkAutoSave>> ~AutoSave
<<option chkRegExpSearch>> ~RegExpSearch
<<option chkCaseSensitiveSearch>> ~CaseSensitiveSearch
----
AdvancedOptions
PluginManager
ImportTiddlers
Osmosoft is the company founded by [[Jeremy Ruston]], the creator of TiddlyWiki.
Osmosoft became a subsidiary of British Telecom in 2007 and is thus often referred to as BT Osmosoft.
You can find more information at [http://osmosoft.com Osmosoft.com]
[[Category:Stakeholders]]
<!--{{{-->
<div class='header'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='logo' refresh='content' tiddler='Logo'></div>
<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>
<!--}}}-->
/***
|''Name:''|PaginatedListView|
|''Description:''|Displays a Paginated list|
|''Author:''|Nicolas Rusconi (nicolas.rusconi (at) globant (dot) com)|
|''Version:''|1.0.0|
|''Date:''|Mar 18, 2009|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
|''~CoreVersion:''|2.2.0|
|''Type''|plugin|
|''Requires''||
|''Usage''|PaginatedListView.create(place,listObject,listTemplate,callback,className, columnCount)|
***/
/*{{{*/
PaginatedListView = function(place, table, listObject, columnCount)
{
this.columnCount = columnCount;
var container = createTiddlyElement(place,'table',null, PaginatedListView.paginatedStyle);
var containerRow = createTiddlyElement(container,'tr');
var containerCell = createTiddlyElement(containerRow, 'td');
containerCell.colSpan = 3;
table.removeChild(table.tHead);
containerCell.appendChild(table);
container.appendChild(this.getPageControlRow(table.tBodies[0], listObject, columnCount));
container.appendChild(this.getSelectionControlRow(table.tBodies[0], listObject, columnCount));
container.ondblclick = function(e){
e.cancelBubble = true;
};
return this;
}
//merge(PaginatedListView, ListView);
// Create a paginated listview
PaginatedListView.create = function(place, listObject, listTemplate, callback, className, columnCount)
{
var table = ListView.create(null,listObject,listTemplate,callback,className, columnCount);
if (listObject.length > PaginatedListView.prototype.getElementsPerPage() * columnCount) {
return new PaginatedListView(place, table, listObject, columnCount);
} else {
place.appendChild(table);
table.getSelectedRows = function() {
return ListView.getSelectedRows(table);
}
return table;
}
};
PaginatedListView.prototype.getPageControlRow = function(table, listObject, columnCount)
{
this.elements = [];
this.page = 0;
this.table = table;
var elementsPerPage = this.getElementsPerPage();
// get the first displayed rows
for (var i = 0; i < table.rows.length && i < elementsPerPage; i++) {
this.elements.push(table.rows[i]);
};
// get the rest and remove them from the table
for (var i = elementsPerPage; table.rows.length > elementsPerPage; i++) {
this.elements.push(table.rows[elementsPerPage]);
table.removeChild(table.rows[elementsPerPage]);
};
var paggingRow = createTiddlyElement(null, 'tr', null, PaginatedListView.pageControlStyle);
//add Backward Links
paggingRow.appendChild(this.getLinks(PaginatedListView.backwardLinksSpec));
//add Forward Links
paggingRow.appendChild(this.getLinks(PaginatedListView.forwardLinksSpec));
//add page selector
paggingRow.appendChild(this.addPageSelector(listObject, columnCount));
return paggingRow;
};
PaginatedListView.prototype.getSelectionControlRow = function(table, listObject, columnCount)
{
var selectionRow = createTiddlyElement(null, 'tr', null, PaginatedListView.pageControlStyle);
var cell = createTiddlyElement(null, 'td', null, PaginatedListView.selectionLinksSpec.style);
selectionRow.appendChild(cell);
cell.colSpan = 3;
cell.align = 'center';
cell.appendChild(document.createTextNode(PaginatedListView.select));
this.getLinks(PaginatedListView.selectionLinksSpec, cell);
return selectionRow;
};
PaginatedListView.prototype.getLinks = function(linksSpec, cell)
{
var view = this;
var links = linksSpec.links;
var paggingItem;
if (!cell) {
paggingItem = createTiddlyElement(null, 'td', null, linksSpec.style);
} else {
paggingItem = cell;
}
for (var i=0; i<links.length; i++) {
var element = links[i];
var link = createTiddlyElement(paggingItem, 'a', null, null, element.label);
link.func = element.func;
link.view = view;
link.onclick = function() {
this.view[this.func]();
}
link.ondblclick = function(e) {
e.cancelBubble = true;
this.onclick(e);
}
};
return paggingItem;
};
PaginatedListView.prototype.addPageSelector = function(listObject, columnCount)
{
var pageCell = createTiddlyElement(null, 'td', null, PaginatedListView.pageControlStyle + PaginatedListView.pageSelectStyle);
var pageSelect = createTiddlyElement(pageCell, 'select');
var elementsPerPage = this.getElementsPerPage();
var pageCount = this.elements.length / elementsPerPage;
for (var i = 0; i < pageCount; i++) {
var fromItemIndex = i * elementsPerPage * columnCount;
var previousItemIndex = fromItemIndex - 1;
var toItemIndex = fromItemIndex + (elementsPerPage * columnCount) - 1;
var nextItemIndex = toItemIndex + 1;
if (toItemIndex >= listObject.length) {
toItemIndex = listObject.length - 1;
}
var from = this.getPageLetters(listObject, previousItemIndex, fromItemIndex, toItemIndex);
var to = this.getPageLetters(listObject, fromItemIndex, toItemIndex, nextItemIndex);
var option = createTiddlyElement(pageSelect, 'option', null, '', PaginatedListView.pageDescription.format([from,to]));
option.value = i;
};
var self = this;
pageSelect.onchange = function(){
var selected = this.options[this.selectedIndex];
self.showPage(parseInt(selected.value));
}
this.pageSelect = pageSelect;
return pageCell;
};
PaginatedListView.prototype.getPageLetters = function(listObject, previousItemIndex, itemIndex, nextItemIndex)
{
var previousItemText = !listObject[previousItemIndex]? '' : listObject[previousItemIndex].title;
var itemText = listObject[itemIndex].title;
var nextItemText = !listObject[nextItemIndex]? '' : listObject[nextItemIndex].title;
return this.getLetters(previousItemText, itemText, nextItemText);
};
PaginatedListView.prototype.getLetters = function(previousText, text, nextText)
{
var okLast = false;
var okPrev = false;
for (var i=0; i<text.length; i++) {
if (!okLast && text[i] != nextText[i]) {
okLast = true;
}
if (!okPrev && text[i] != previousText[i]) {
okPrev = true;
}
if (okLast && okPrev) {
return text.substring(0, i + 1) + '...';
}
};
return text;
};
PaginatedListView.prototype.showPage = function(pageNumpber)
{
var table = this.table;
var elementsPerPage = this.getElementsPerPage();
var startIndex = (pageNumpber) * elementsPerPage;
//remove all rows
for (; 0 < table.rows.length;) {
table.removeChild(table.rows[0]);
};
var elementsCount = this.elements.length - startIndex;
if (elementsCount > elementsPerPage) {
elementsCount = elementsPerPage;
}
for (var i = 0; i < elementsCount; i++) {
table.appendChild(this.elements[i + startIndex]);
};
this.page = pageNumpber;
};
PaginatedListView.prototype.getCheckboxes = function()
{
var checkboxes = [];
for (var i = 0; i < this.elements.length; i++) {
var cbs = this.elements[i].getElementsByTagName('input');
for (var j = 0; j < cbs.length; j++) {
checkboxes.push(cbs[j]);
};
};
return checkboxes;
};
PaginatedListView.prototype.forEachSelector = function(callback)
{
return this.forEachCheckbox(this.getCheckboxes(), callback);
};
PaginatedListView.prototype.forEachSelectorInCurrentPage = function(callback)
{
return this.forEachCheckbox(this.getCheckboxesInCurrentPage(), callback);
};
PaginatedListView.prototype.getCheckboxesInCurrentPage = function()
{
var elementsPerPage = this.getElementsPerPage();
var startIndex = this.page * this.getElementsPerPage();
var checkboxes = [];
for (var i=startIndex; i< startIndex + elementsPerPage && i < this.elements.length; i++) {
var cbs = this.elements[i].getElementsByTagName('input');
for (var j = 0; j < cbs.length; j++) {
checkboxes.push(cbs[j]);
};
};
return checkboxes;
};
PaginatedListView.prototype.forEachCheckbox = function(checkboxes, callback)
{
var hadOne = false;
for(var t=0; t<checkboxes.length; t++) {
var cb = checkboxes[t];
if(cb.getAttribute('type') == 'checkbox') {
var rn = cb.getAttribute('rowName');
if(rn) {
callback(cb,rn);
hadOne = true;
}
}
}
return hadOne;
};
PaginatedListView.prototype.getSelectedRows = function()
{
var rowNames = [];
this.forEachSelector(function(e,rowName) {
if(e.checked)
rowNames.push(rowName);
});
return rowNames;
};
PaginatedListView.prototype.goToFirstPage = function()
{
this.goToPage(0);
};
PaginatedListView.prototype.goToPreviousPage = function()
{
this.goToPage(this.pageSelect.selectedIndex - 1);
};
PaginatedListView.prototype.goToNextPage = function()
{
this.goToPage(this.pageSelect.selectedIndex + 1);
};
PaginatedListView.prototype.goToLastPage = function()
{
this.goToPage(this.pageSelect.length - 1);
};
PaginatedListView.prototype.goToPage = function(pageIndex)
{
if (pageIndex >= 0 && pageIndex < this.pageSelect.length) {
this.pageSelect.selectedIndex = pageIndex;
this.pageSelect.onchange();
}
};
PaginatedListView.prototype.selectAll = function()
{
this.forEachSelector(function(cb,rowName) {
cb.checked = true;
});
};
PaginatedListView.prototype.selectNone = function()
{
this.forEachSelector(function(cb,rowName) {
cb.checked = false;
});
};
PaginatedListView.prototype.selectAllInPage = function()
{
this.forEachSelectorInCurrentPage(function(cb){
cb.checked = true;
});
};
PaginatedListView.prototype.selectNoneInPage = function()
{
this.forEachSelectorInCurrentPage(function(cb){
cb.checked = false;
});
};
PaginatedListView.prototype.invertSelection = function()
{
this.forEachSelector(function(cb,rowName) {
cb.checked = !cb.checked;
});
};
PaginatedListView.prototype.elements = [];
PaginatedListView.prototype.page = 0;
PaginatedListView.prototype.pageSelect;
PaginatedListView.prototype.getElementsPerPage = function() {
return parseInt(config.options.txtElementsPerPage);
};
if (!config.options.txtElementsPerPage) {
config.options.txtElementsPerPage = '10';
}
PaginatedListView.prototype.columnCount = 1;
PaginatedListView.pageControlStyle = 'pageControl';
PaginatedListView.prototypetable;
PaginatedListView.paginatedStyle = 'paginated';
PaginatedListView.backwardsLinksStyle = ' backwardsLinks';
PaginatedListView.pageSelectStyle= ' pageSelect';
// User messages
PaginatedListView.firstLabel = 'first';
PaginatedListView.previousLabel = 'previous';
PaginatedListView.nextLabel = 'next';
PaginatedListView.lastLabel = 'last';
PaginatedListView.pageDescription = '"%0" to "%1"';
PaginatedListView.select = 'Select: ';
PaginatedListView.selectAll = 'All';
PaginatedListView.selectNone = 'None';
PaginatedListView.selectAllInPage = 'This page';
PaginatedListView.selectNoneInPage = 'None in this page';
PaginatedListView.invertSelection = 'Invert';
PaginatedListView.selectionLinksSpec = {};
PaginatedListView.selectionLinksSpec.links = [
{label:PaginatedListView.selectAll,
func:'selectAll'},
{label: PaginatedListView.selectNone,
func:'selectNone'},
{label:PaginatedListView.selectAllInPage,
func:'selectAllInPage'},
{label:PaginatedListView.selectNoneInPage,
func:'selectNoneInPage'},
{label:PaginatedListView.invertSelection,
func:'invertSelection'}];
PaginatedListView.forwardLinksSpec = {};
PaginatedListView.forwardLinksSpec.links = [
{label:PaginatedListView.nextLabel,
func:'goToNextPage'},
{label: PaginatedListView.lastLabel,
func:'goToLastPage'}];
PaginatedListView.forwardLinksSpec.style = PaginatedListView.pageControlStyle;
PaginatedListView.backwardLinksSpec = {};
PaginatedListView.backwardLinksSpec.links = [
{label:PaginatedListView.firstLabel,
func: 'goToFirstPage'},
{label: PaginatedListView.previousLabel,
func: 'goToPreviousPage'}];
PaginatedListView.backwardLinksSpec.style = PaginatedListView.pageControlStyle + PaginatedListView.backwardsLinksStyle
/*}}}*/
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
{{review}}
== Slow Rendering ==
In TiddlyWikis with a large amount of tiddlers, the listings in [[SideBarTabs]] (e.g. [[Timeline]]) might require a long time to be generated, thus inhibiting the overall performance.
cf. [http://www.giffmex.org/twfortherestofus.html#%5B%5BTips%20for%20speeding%20up%20performance%20on%20large%20TiddlyWikis%5D%5D Tips for speeding up performance on large TiddlyWikis]
{{Quote|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/2558268245a93d7a/cec021c6f5b42271?#cec021c6f5b42271 Dave]|
I recommend disabling animations even on medium-
sized tiddlywikis. Animations slow it down. Also, if your file gets
big you will want to open the shadowed tiddler tab rather than the tab
listing all tidders A-Z or by date. Or hide the tabbed menus
altogether if you don't need them showing. With each new tiddler, the
image of the two tabbed lists I mentioned (all and by date) has to be
refreshed and can take a while. You can remove the tabbed lists from
the page layout by removing their code from PageTemplate.
Nevertheless, I have a couple TiddlyWikis with 1,000s of tiddlers that
each have form fields, and I am not noting any other performance
issues yet.
}}
== Plugin Load Times ==
{{Quote|
[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/38c0b23e4e007c2b/263409bf4f852efd?#263409bf4f852efd Eric]|
The plugin 'load timer' information is available in the shadow
tiddler, [[PluginManager]], which is also accessible from the
backstage>plugins menu, or by embedding the <<plugins>> macro into any
tiddler content.
}}
{{Quote|
[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/38c0b23e4e007c2b/53af6dface09556f?#53af6dface09556f Martin]|
You can also see the total time taken to load the plugins:
1) go to the tweak dropdown in backstage
2) click the "Show unknown options" checkbox
3) click the "chkDisplayInstrumentation" checkbox, it's about the 8th one down
this will let you see what proportion of the total load time is spent
loading the plugins
}}
== Maximum File Size ==
{{Review|section}}
{{Quote|Ken|
This seems to be the constant question: How big can it get?
As far as I am aware there is no limit to how big of a file you can
download and open. I pumped up a TW to around 3 megs just to see what
it could do and didn't have any problems. It took a while to get the
file, but I got it.
If you are running lots of plugins then Firefox will give you the "A
script is making this page run slow. Do you want to continue?" message,
but it will load.
}}
{{Quote|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/2558268245a93d7a/7dcfe21a4e0d5bd3?#7dcfe21a4e0d5bd3 Daniel]|
The problems reported by people with large TiddlyWikis are usually
performance based, and it seems that the solution (once you've
disabled animations..) is to remove macros that loop through every
tiddler, like the tabs in the sidebar. So it's not so much the size
that's the problem in a direct sense, but the fact that many TW macros
assume that looping through every tiddler isn't very slow.
}}
=== Book Comparison ===
[http://www.gutenberg.org/etext/11 Alice in Wonderland], a book of approximately 200 pages, translates to a mere 160 kB in plain-text format.
== See Also ==
* [http://www.giffmex.org/twfortherestofus.html#%5B%5BTips%20for%20speeding%20up%20performance%20on%20large%20TiddlyWikis%5D%5D Tips for speeding up performance on large TiddlyWikis]
* [[I keep getting "A script is making this page run slow" in Firefox]]
[[Category:FAQ]]
[[Category:Troubleshooting]]
Changes the browser address bar to a permalink to the current [[Tiddler]] or the set of open tiddlers.
It is used with the ToolbarMacro like this:
<<toolbar permalink>>
{{Review}}
The options under the options slider and in AdvancedOptions are stored in browser cookies. So if you sometimes lose your cookies or you are working on your TiddlyWiki on several computers then it can be tiresome to have to enter your options time and time again.
This page explains how you can set the default options in your TiddlyWiki once and for all. The way it's done is to create your own little "plugin" that contains some javascript code to set the default options.
====A small example====
For example, say you always wanted AutoSave to be switched on.
* Create a new tiddler.
* Give it some appropriate name, for example "ConfigTweaks", "ConfigOverride" or "SetDefaultOptions". (In order to ensure that this tiddler is processed ''after'' all plugins are loaded, the name of this tiddler should start with a "z".)
* Add the following lines:
//{{{
config.options.chkAutoSave = true;
//}}}
* Give the tiddler a tag of <tt>systemConfig</tt>.
* Click Done to save the tiddler and click 'save changes' to save your TiddlyWiki.
Now, once you save and reload your TiddlyWiki, AutoSave will default to "on". You can still switch off AutoSave with the normal checkbox, and your browser will remember that in a cookie, but you've changed the default, so if you use a different computer, or your browser loses it's cookies, AutoSave will be "on".
====Set multiple options====
You can set multiple options in your SetDefaultOptions tiddler. This example sets my user name to MisterT, switches off backups, switches on auto-saving and switches off the read only over HTTP option:
<pre>
config.options.txtUserName = "MisterT"; // instead of "YourName"
config.options.chkHttpReadOnly = false; // allow edit buttons when viewed over HTTP
readOnly = false; // allow edit buttons when viewed over HTTP -- for TiddlyWiki v2.2+ only
// options for saving..
config.options.chkSaveBackups = false; // don't do backups
config.options.chkAutoSave = true; // AutoSave whenever I edit
</pre>
You can see that many options are set to either true or false. Some options, like txtUserName, should be set to a string in "double quotes".
This example also shows that you can add comments to the tiddler using two backslashes //. Anything that follows two slashes, up to the end of the line, will be ignored.
====Options that can be set====
This list shows all the options available in TiddlyWiki 2.1.x, and shows their defaults. Later versions might use other options. You can see what they all are by doing a "view source" on your TiddlyWiki an scrolling down about a page until you see <code>config.options = {</code>
<pre>
config.options.chkRegExpSearch = false; // default false
config.options.chkCaseSensitiveSearch = false; // default false
config.options.chkAnimate = true; // default true
config.options.txtUserName = "YourName"; // default "YourName"
config.options.chkSaveBackups = true; // default true
config.options.chkAutoSave = false; // default false
config.options.chkGenerateAnRssFeed = false; // default false
config.options.chkSaveEmptyTemplate = false; // default false
config.options.chkOpenInNewWindow = true; // default true
config.options.chkToggleLinks = false; // default false
config.options.chkHttpReadOnly = true; // default true
readOnly = false; // default true when viewed over HTTP, false when used locally -- for TiddlyWiki v2.2+ only
showBackstage = true; // default false when viewed over HTTP, true when used locally -- for TiddlyWiki v2.2+ only
config.options.chkForceMinorUpdate = false; // default false
config.options.chkConfirmDelete = true; // default true
config.options.chkInsertTabs = false; // default false
config.options.txtBackupFolder = ""; // default ""
config.options.txtMainTab = "tabTimeline"; // default "tabTimeline"
config.options.txtMoreTab = "moreTabAll"; // default "moreTabAll"
config.options.txtMaxEditRows = "30"; // default "30"
config.options.chkAnimate = false; // default true
</pre>
Furthermore, the date format can be specified by changing the default variables:
config.views.wikified.dateFormat = "YYYY-0MM-0DD 0hh:0mm"; // "created" and "modified" timestamps in the tiddler display
config.macros.timeline.dateFormat = "YYYY-0MM-0DD (ddd)"; // dates in the timeline
For specifiying the format of the timestamps, see [[Date Formats]].
====Cookies still set, but ignored====
During document startup, TiddlyWiki reads cookie-based option settings first, so that these values are available to plugins while they are being loaded and initialized. Then, when a <i>configuration tiddler</i> (i.e., a plugin as shown above) sets a specific value for a config.options.* variable, <b>the plugin-based configuration setting will OVERRIDE the corresponding cookie-based setting</b>. As a result, even though cookie-based settings are still stored in your browser, some of those values will be ignored each time you reload the document and the fixed-value settings in the configuration tiddler are applied.
== See Also ==
* [http://www.tiddlytools.com/#CookieManagerPlugin CookieManagerPlugin]: review/add/delete option cookies and save current option values to CookieJar tiddler for 'sticky' settings
* [[Dev:UseCasesOptions]]: use-cases for options to explore issues of using Cookies
Phil Whitehouse is a Community Advocate for [[Osmosoft]], the Open Source Innovation arm of BT (British Telecom). He's been at Osmosoft since July 2007, prior to which he held roles at a variety of media outlets and design agencies. He has a keen interest in user experience design, developer communities, development methodologies and project management techniques, as well as all thing open and geeky...
see original at http://www.patrickcurry.com/tiddly/
see '''fixed version''' & screencast at http://www.borism.net/2009/03/18/server-side-tiddlywiki-with-php-easy/
[[Category:Server-Sides]]
==ImportTiddlers Method==
see [[Importing Tiddlers]]
==Copy & Paste Method==
===Locate the plugin you want to install===
* It's a good idea to get it from the plugin author's site so you know you have the latest version
===Copy the source of the plugin tiddler===
* To do this you need to click the tiddler's 'edit' button. Sometimes instead of an 'edit' button there is a 'view' or 'source' button instead, but either way it should show you the source of the plugin tiddler.
* Click in the text box and do an "Edit", "Select All" from your browser menu, or press Ctrl-A (Cmd-A for Mac users) to select the entire contents. Often the tiddlers contents is already selected for you so you may be able to skip this step.
* Do an "Edit", "Copy", or press Ctrl-C (Cmd-C for Mac users) to copy the entire contents of the tiddler.
===Create the plugin tiddler in your TiddlyWiki===
* Back in your own TiddlyWiki, click 'new tiddler' to create a tiddler.
* You can name the tiddler anything you like but to save confusion give it the same as the plugin you are installing.
* Do an "Edit", "Paste", or ~Ctrl-V/~Cmd-V to paste the plugin source code into your new plugin tiddler.
* (Note if you updating a plugin you already have you can just edit it, do a select all, delete to clear the contents before you paste in the new contents).
===Add the "systemConfig" tag===
* Before you save the new plugin tiddler, add the tag "systemConfig" to the tags box. It must start with a lowercase 's'. This is what tells TiddlyWiki to execute the code in the plugin tiddler when starting.
===Save and reload===
* The plugin is not active until you save and reload your TiddlyWiki so click 'save changes', then click reload in your browser.
===Testing===
* Now your plugin should be active and working. Check that it is doing what it should be doing.
== Troubleshooting ==
cf. [[Troubleshooting]]
=== If it's not working but you don't get an error ===
Check the following
* Did you remember the systemConfig tag? It must be spelt correctly and it is case sensitive.
* Did you save and reload?
=== You get javascript error messages (check your Javascript Console in Firefox) ===
* It means that there are errors in the plugin code.
* Check that you copied the entire plugin source code and that you clicked edit (or view or source) before copying.
* It's possible that the plugin is buggy. If you email the plugin author or post to the TiddlyWiki Google Group you may get some help. Mention your browser your OS and the details of the problem you're having.
[[Category:FAQ]]
[[Category:Plugins]]
The PluginManager [[shadow tiddler]] provides an overview of all installed plugins.
It is accessible via the [[backstage]].
* [[ForEachTiddlerPlugin/Questions|ForEachTiddlerPlugin]]
* [[HideWhenPlugin/Questions|HideWhenPlugin]]
[[Category:Plugins]]
__TOC__
== Indexes ==
* [http://tiddlyvault.tiddlyspot.com TiddlyVault] / [http://sidebarpluginvault.tiddlyspot.com SidebarPluginVault] (manually maintained)
* [http://del.icio.us/TiddlyWikiPlugin bookmarks] ([http://del.icio.us/popular/TiddlyWikiPlugin popular], [http://del.icio.us/TiddlyWikiPlugin editorial])
* [[Plugin Library]] (work in progress; not yet operational)
== Authors' Repositories ==
=== Updated in 2008 ===
* [http://trac.tiddlywiki.org/browser/Trunk/contributors TiddlyWiki contributors]
* [http://www.tiddlytools.com TiddlyTools]
* [http://mptw.tiddlyspot.com MPTW]
* [http://devpad.tiddlyspot.com FND's DevPad]
* [http://jackparke.googlepages.com/jtw.html Jack's TiddlyWiki]
* [http://ptw.sourceforge.net/ptwe.html PrinceTiddlyWiki]
* [http://fnd.lewcid.org/svn/TiddlyWiki/plugins/ FND's Subversion repository]
* [http://www.remotely-helpful.com/TiddlyWiki/TiddlerEncryptionPlugin.html TiddlerEncryptionPlugin]
* [http://tiddlywiki.abego-software.de abegoExtensions]
* [http://twhelp.tiddlyspot.com/ TW Help]
* [http://www.tiddly-twab.com/ twab - the tiddly wiki address book]
* [http://tiddlywiki.bidix.info BidiXTW]
* [http://www.martinswiki.com Martin's Wiki]
* [http://garr.dl.sourceforge.net/sourceforge/ptw/ Index of /sourceforge/ptw]
* [http://kuraku.net/tw/ KuRaKu TiddlyWiki Top]
* [http://tw.lewcid.org Lewcid TW]
* [http://tw.lewcid.org/svn/plugins/ Lewcid's Subversion repository]
* [http://ido-xp.tiddlyspot.com/ Ido's TiddlyWiki Extensions]
* [http://www.tiddlywiki.com/coreplugins.html Core Plugins]
* [http://remindermacros.tiddlyspot.com/ TiddlyWiki Reminder Plugin]
* [http://www.math.ist.utl.pt/~psoares/addons.html Paulo Soares TiddlyWiki]
* [http://biblestudy.tiddlyspot.com/ ESVInlineMacro2]
* [http://visualtw.ouvaton.org/VisualTW.html VisualTW]
* [http://moodle.tiddlyspot.com/ Moodle Wiki - Tiddlywiki Integration]
* [http://imgsearch.tiddlyspot.com/ Google Images Search]
* [http://www.anshul.info/blogwiki.html Blog plugin]
* [http://syncoutlooknotes.tiddlyspot.com/ SyncOutlookNotes]
=== Updated in 2007 ===
* [http://visualtw.ouvaton.org/old/ Index of /old]
* [http://remotely-helpful.com/TiddlyWiki/LaunchApplication.html LaunchApplication]
* [http://cleanlayout.tiddlyspot.com/ ToggleElementMacro]
* [http://journal.conal.net/ Conal's Journal]
* [http://www.minormania.com/tiddlylock/tiddlylock.html TiddlyLockPlugin]
* [http://tw.lewcid.org/sandbox/ Lewcid's Sandbox]
* [http://umibozu.org/en/index.html Umibozu - Wikify your web album]
* [http://project.dahukanna.net/tiddlywiki/timeline/sampletimeline220b5.html Simile Timeline 2.2.0]
* [http://luceatlux.net/macros/answer AnswerMacro]
* [http://yann.perrin.googlepages.com/twkd.html Tweaked TiddlyWiki]
* [http://weave.tiddlyspot.com/index.html AutoWeavePlugin]
* [http://tiddlywiki.ouvaton.org/Demo.html RichTextPlugin]
* [http://rgplugins.tiddlyspot.com/ hideIfshowIf plugin]
* [http://project.dahukanna.net/tiddlywiki/twextensions.htm TiddlyWiki Extensions 2.1.3]
* [http://knighjm.googlepages.com/knightnet-default-tw.html Knightnet Default TiddlyWiki]
* [http://www.martinswiki.com/timeline/ Simile Timeline - a TiddlyWiki demomstrator]
* [http://bob.mcelrath.org/tiddlyjsmath.html LATEX TiddlyWiki]
* [http://bradleymeck.tiddlyspot.com PeachTW]
* [http://bob.mcelrath.org/plugins.html BobMcElrath]
* [http://www.fabriceproudhon.com/superphysique/#SEOTiddlyWikiPlugin SEOTiddlyWikiPlugin]
* [http://end.com/~speth/HaloscanMacro.html HaloscanMacro]
* [http://yann.perrin.googlepages.com/twkd1.html TWkd]
* [http://tiddlystyles.com TiddlyStyles]
=== Updated in 2006 ===
* [http://solo.dc3.com/tw/ Red Mountain Vista]
* [http://lewcid.googlepages.com/presentation_empty_full.html#author:true PresentationPlugin]
* [http://www.potto.client.jp/htmlslidymaker/index.html HTML Slidy Maker]
* [http://martinswiki.com/prereleases.html Martin's pre-release TiddlyWiki]
* [http://soloport.tiddlyspot.com/ Wiki by Soloport]
* [http://discerningtags.tiddlyspot.com/ DiscerningTags]
* [http://checkettsweb.com/tw/beta.html#NewTiddlerAutoNumberExtension MetaQuotes]
* [http://mptw2.tiddlyspot.com/ MonkeyPirateTiddlyWiki]
* [http://paularodrigo.homeip.net/stickydate.html StickyDate]
* [http://www.macrolinz.com/macrolinz/tiddlyware/MacroLinz.html MacroLinz TiddlyWare]
* [http://gwsyzygy.googlepages.com/creator.html gkwWiki]
* [http://genisis329.googlepages.com/TWMath.html MathCell TiddlyWiki]
* [http://labwiki.sourceforge.net/ LabWiki]
* [http://www.checkettsweb.com/tw/tiddlywikise.htm TiddlyWiki-SE]
* [http://www.zagware.com/tw/plugins.html Doug Compton]
* [http://www.rumsby.org/yatwa2/ YATWA 2]
* [http://danielbaird.com/tiddlywinks/ Tiddly W;nks!]
* [http://math.chapman.edu/~jipsen/asciencepad/asciencepad.html ASciencePad]
* [http://www.twteamserver.de/es/index3.php wikiMobil]
* [http://mptw1.tiddlyspot.com/ MonkeyPirateTiddlyWiki 1]
* [http://www.rumsby.org/yatwa/ YATWA]
* [http://gensoft.revhost.net/Collapse.html Collapse Plugin]
* [http://www.personal.psu.edu/ach12/tiddlywiki/extensions.htm TiddlyWikiExtensions]
* [http://www.digitaldimsum.co.uk/wp-content/uploads/2007/04/tiddlydesktop-v10beta2.htm TiddlyDesktop v1.0]
=== Updated in 2005 ===
* [http://www-static.cc.gatech.edu/~dellaert/dhtml/tiddly.html Frank Dellaert's TiddlyWiki Page]
* [http://aiddlywiki.sourceforge.net/wikibar_demo_2.html WikiBar for TiddlyWiki 2.0.0]
* [http://franklin.ro/tw/HackingTW.html Hacking TW]
* [http://fire.atspace.org/ Загубени Мисли]
* [http://www.zrenard.com/tiddlywiki/tiddlywiki.html zRenard]
* [http://www.cs.utexas.edu/~joeraii/siglet/ siglet]
== See Also ==
* [[Popular Plugin Sites]]
[[Category:Plugins]]
__TOC__
== Indexes ==
* [http://tiddlyvault.tiddlyspot.com TiddlyVault] / [http://sidebarpluginvault.tiddlyspot.com SidebarPluginVault] (manually maintained)
* [http://del.icio.us/TiddlyWikiPlugin bookmarks] ([http://del.icio.us/popular/TiddlyWikiPlugin popular], [http://del.icio.us/TiddlyWikiPlugin editorial])
* [[Plugin Library]] (work in progress; not yet operational)
== Authors' Repositories ==
=== Updated in 2009 ===
* [http://trac.tiddlywiki.org/browser/Trunk/contributors TiddlyWiki contributors]
* [http://www.tiddlytools.com TiddlyTools]
* [http://github.com/tardate/jtab/tree/master jtab Plugin]
* [http://lastfm.tiddlyspot.com/ Last FM Player]
* [http://storywiki.tiddlyspot.com/#inlineSVG inlineSVG]
* [http://www.strm.us/TidlyWiki/Examples_TWGG/highlightscriptexample.html TableHighlight]
* [http://gimcrackd.com/etc/src/ Gimcrackd: Code and Other Oddments]
* [http://devpad.tiddlyspot.com FNDs DevPad]
* [http://tiddlywiki.abego-software.de abegoExtensions]
* [http://marksbasement.tiddlyspot.com/index.html Mark's Basement]
* [http://garr.dl.sourceforge.net/sourceforge/ptw/ BramChen Extensions repository]
* [http://mptw.tiddlyspot.com MPTW]
* [http://mediawikiunplugged.com/ MediaWiki Unplugged]
* [http://treeview.tiddlyspot.com/ TreeviewPlugin]
* [http://osmosoft.com/tiddlytweets/ Twitter Archiver]
* [http://www.math.ist.utl.pt/~psoares/addons.html Paulo Soares addons]
* [http://kronenpj.tiddlyspot.com ToDoPlugin]
* [http://www.minormania.com/tiddlylock/tiddlylock.html#TiddlyLockPlugin TiddlyLockPlugin]
* [http://tiddlywiki.abego-software.de/Beta.html Abego BetaZone]
* [http://shavinz-trial-tw.tiddlyspot.com/ JQuery.UI.Accordion.Plugin]
* [http://fnd.lewcid.org/tmp/ListNavMacro.html ListNavPlugin]
* [http://r.a.hough.googlepages.com/TW2.5.0.html DrawingPlugin]
* [http://www.linux-lovers.be/RevisionsPlugin/#RevisionsPlugin RevisionsPlugin]
* [http://fnd.lewcid.org/tmp/TiddlyViPlugin.html TiddlyViPlugin]
* [http://ptw.sourceforge.net/ptwe.html PrinceTiddyWiki]
* [http://tinytiddly.lewcid.org/ TinyTiddly]
=== Updated in 2008 ===
* [http://fnd.lewcid.org/svn/TiddlyWiki/plugins/ FND's repository]
* [http://fnd.lewcid.org/tmp/DataVault.html#readOnly:no DataVault]
* [http://www.tiddly-twab.com twab, the tiddly wiki address book]
* [http://schedule.tiddlyspot.com/ Schedule]
* [http://www.ideia.fr/files/tiddlyscrum.html TiddlyScrum]
* [http://tiddlywiki.abego-software.de/archive/ abegoExtensions (Archive)]
* [http://plugins.tiddlywiki.org/ Plugin Library]
* [http://www.remotely-helpful.com/TiddlyWiki/TiddlerEncryptionPlugin.html TiddlerEncryptionPlugin]
* [http://tiddlywiki.bidix.info BidiXTW]
* [http://www.dcubed.ca D3, a kinkless GTD system]
* [http://baggr.tiddlyspot.com/ DataListPlugin]
* [http://processing.tiddlyspot.com Processing]
* [http://jackparke.googlepages.com/jtw.html Jack's TiddlyWiki]
* [http://twhelp.tiddlyspot.com/ TW Help]
* [http://www.tiddly-twab.com/ twab - the tiddly wiki address book]
* [http://no-sin.com/wiki/WorkTracker.html WorkTracker]
* [http://www.martinswiki.com Martin's Wiki]
* [http://garr.dl.sourceforge.net/sourceforge/ptw/ Index of /sourceforge /ptw]
* [http://kuraku.net/tw/ KuRaKu TW Top]
* [http://www.tiddlywiki.com/coreplugins.html DeprecatedFunctionsPlugin]
* [http://fnd.lewcid.org/MTS/ MTS - more by FND]
* [http://firefoxprivileges.tiddlyspot.com/ Manage Firefox Privileges]
* [http://sidebarnotes.tiddlyspot.com/ Sidebar Notes]
* [http://tw.lewcid.org Lewcid TW]
* [http://tw.lewcid.org/svn/plugins/ Lewcid's repository]
* [http://ido-xp.tiddlyspot.com/ Ido's TiddlyWiki Extensions]
* [http://www.tiddlywiki.com/coreplugins.html Core Plugins]
* [http://remindermacros.tiddlyspot.com/ TiddlyWiki Reminder Plugin]
* [http://biblestudy.tiddlyspot.com/ ESVInlineMacro2]
* [http://www.ripplerap.com/BlogTalk2008/blogtalk.html RippleRap]
* [http://visualtw.ouvaton.org/VisualTW.html VisualTW]
* [http://moodle.tiddlyspot.com/ Moodle Wiki - Tiddlywiki Integration]
* [http://imgsearch.tiddlyspot.com/ Google Images Search]
* [http://www.anshul.info/blogwiki.html Blog plugin]
* [http://www.remotely-helpful.com/TiddlyWiki/ImprovedSlicesPlugin.html ImprovedSlicesPlugin]
=== Updated in 2007 ===
* [http://visualtw.ouvaton.org/old/ Index of VisualTW /old]
* [http://remotely-helpful.com/TiddlyWiki/LaunchApplication.html LaunchApplication]
* [http://cleanlayout.tiddlyspot.com/ ToggleElementMacro]
* [http://journal.conal.net/ Conal's Journal]
* [http://www.minormania.com/tiddlylock/tiddlylock.html TiddlyLockPlugin]
* [http://tw.lewcid.org/sandbox/ Lewcid's Sandbox]
* [http://umibozu.org/en/index.html Umibozu - Wikify your web album]
* [http://project.dahukanna.net/tiddlywiki/timeline/sampletimeline220b5.html Simile Timeline 2.2.0]
* [http://luceatlux.net/macros/answer AnswerMacro]
* [http://yann.perrin.googlepages.com/twkd.html Tweaked TiddlyWiki]
* [http://weave.tiddlyspot.com/index.html AutoWeavePlugin]
* [http://tiddlywiki.ouvaton.org/Demo.html RichTextPlugin]
* [http://rgplugins.tiddlyspot.com/ hideIfshowIf plugin]
* [http://project.dahukanna.net/tiddlywiki/twextensions.htm TiddlyWiki Extensions 2.1.3]
* [http://knighjm.googlepages.com/knightnet-default-tw.html Knightnet Default TiddlyWiki]
* [http://www.martinswiki.com/timeline/ Simile Timeline - a TiddlyWiki demomstrator]
* [http://bob.mcelrath.org/tiddlyjsmath.html LATEX TiddlyWiki]
* [http://bradleymeck.tiddlyspot.com PeachTW]
* [http://bob.mcelrath.org/plugins.html BobMcElrath]
* [http://www.fabriceproudhon.com/superphysique/#SEOTiddlyWikiPlugin SEOTiddlyWikiPlugin]
* [http://end.com/~speth/HaloscanMacro.html HaloscanMacro]
* [http://yann.perrin.googlepages.com/twkd1.html TWkd]
* [http://tiddlystyles.com TiddlyStyles]
=== Updated in 2006 ===
* [http://solo.dc3.com/tw/ Red Mountain Vista]
* [http://lewcid.googlepages.com/presentation_empty_full.html#author:true PresentationPlugin]
* [http://www.potto.client.jp/htmlslidymaker/index.html HTML Slidy Maker]
* [http://martinswiki.com/prereleases.html Martin's pre-release TiddlyWiki]
* [http://soloport.tiddlyspot.com/ Wiki by Soloport]
* [http://discerningtags.tiddlyspot.com/ DiscerningTags]
* [http://checkettsweb.com/tw/beta.html#NewTiddlerAutoNumberExtension MetaQuotes]
* [http://mptw2.tiddlyspot.com/ MonkeyPirateTiddlyWiki]
* [http://paularodrigo.homeip.net/stickydate.html StickyDate]
* [http://www.macrolinz.com/macrolinz/tiddlyware/MacroLinz.html MacroLinz TiddlyWare]
* [http://gwsyzygy.googlepages.com/creator.html gkwWiki]
* [http://genisis329.googlepages.com/TWMath.html MathCell TiddlyWiki]
* [http://labwiki.sourceforge.net/ LabWiki]
* [http://www.checkettsweb.com/tw/tiddlywikise.htm TiddlyWiki-SE]
* [http://www.zagware.com/tw/plugins.html Doug Compton]
* [http://www.rumsby.org/yatwa2/ YATWA 2]
* [http://danielbaird.com/tiddlywinks/ Tiddly W;nks!]
* [http://math.chapman.edu/~jipsen/asciencepad/asciencepad.html ASciencePad]
* [http://www.twteamserver.de/es/index3.php wikiMobil]
* [http://mptw1.tiddlyspot.com/ MonkeyPirateTiddlyWiki 1]
* [http://www.rumsby.org/yatwa/ YATWA]
* [http://gensoft.revhost.net/Collapse.html Collapse Plugin]
* [http://www.personal.psu.edu/ach12/tiddlywiki/extensions.htm TiddlyWikiExtensions]
* [http://www.digitaldimsum.co.uk/wp-content/uploads/2007/04/tiddlydesktop-v10beta2.htm TiddlyDesktop v1.0]
=== Updated in 2005 ===
* [http://www-static.cc.gatech.edu/~dellaert/dhtml/tiddly.html Frank Dellaert's TiddlyWiki Page]
* [http://aiddlywiki.sourceforge.net/wikibar_demo_2.html WikiBar for TiddlyWiki 2.0.0]
* [http://franklin.ro/tw/HackingTW.html Hacking TW]
* [http://fire.atspace.org/ Загубени Мисли]
* [http://www.zrenard.com/tiddlywiki/tiddlywiki.html zRenard]
* [http://www.cs.utexas.edu/~joeraii/siglet/ siglet]
== See Also ==
* [[Popular Plugin Sites]]
[[Category:Plugins]]
See [[Prefabs]].
[[Category:FAQ]]
[[Category:Plugins]]
{{Incomplete}}
Plugins are optional modules extending the functionality of TiddlyWiki.
These are usually written by third-party developers and released under an open-source license.
A plugin is usually just a tiddler containing JavaScript code (see [[#Installation|Installation]] below).
== Installation ==
[[Plugin Installation|Ideally]], plugin tiddlers should be [[Importing|imported]] from their original location into the TiddlyWiki document.
In order to be processed on startup, plugins need to be assigned the ''systemConfig'' [[Tags#Special Tags|tag]].
In general, plugins are processed in alpha-numeric order (by tiddler title), using case-sensitive ASCII sort order (i.e. A-Z precedes a-z).
== See Also ==
* [[:Category:Plugins]]
* [[Plugin Installation]]
* [[Plugin Repositories]]
* [[Plugin Questions]]
* [[Macros]]
* [[Dev:Best_Practices]]
[[Category:Basics]]
[[Category:Plugins]]
{{GeneratedContent|http://simonbaird.com/twdoc/pluginsites.cgi|2007-08-30 07:05}}
{| class="wikitable"
! Site !! About
! Select Plugins
|-
|'''[[AbegoSoftware]]'''<br>[http://tiddlywiki.abego-software.de/ tiddlywiki.abego-software.de/] || {{:AbegoSoftware}} || [http://tiddlywiki.abego-software.de/#DataTiddlerPlugin DataTiddlerPlugin] [http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin ForEachTiddlerPlugin] [http://tiddlywiki.abego-software.de/#FormTiddlerPlugin FormTiddlerPlugin] [http://tiddlywiki.abego-software.de/#YourSearchPlugin YourSearchPlugin]
|-
|'''[[BidiXTW]]'''<br>[http://tiddlywiki.bidix.info/ tiddlywiki.bidix.info/] || {{:BidiXTW}} || [http://tiddlywiki.bidix.info/#UploadPlugin UploadPlugin] [http://tiddlywiki.bidix.info/#RSSReaderPlugin RSSReaderPlugin]
|-
|'''[[BobsPlugins]]'''<br>[http://bob.mcelrath.org/plugins.html bob.mcelrath.org/plugins.html] || {{:BobsPlugins}} ||
|-
|'''[[Gimcrack'd]]'''<br>[http://gimcrackd.com/etc/src/ gimcrackd.com/etc/src/] || {{:Gimcrack'd}} ||
|-
|'''[[JacksTiddlyWiki]]'''<br>[http://jackparke.googlepages.com/jtw.html jackparke.googlepages.com/jtw.html] || {{:JacksTiddlyWiki}} || [http://jackparke.googlepages.com/jtw.html#ArchivePlugin ArchivePlugin] [http://jackparke.googlepages.com/jtw.html#SQLQueryPlugin SQLQueryPlugin]
|-
|'''[[LewcidTW]]'''<br>[http://tw.lewcid.org/ tw.lewcid.org/] || {{:LewcidTW}} || [http://tw.lewcid.org/#ShowUpdatesPlugin ShowUpdatesPlugin] [http://tw.lewcid.org/sandbox/#Overview InlineTabsPlugin InlineSlidersPlugin] [http://tw.lewcid.org/#SplashScreenPlugin SplashScreenPlugin]
|-
|'''[[MartinsPlugins]]'''<br>[http://www.martinswiki.com/ www.martinswiki.com/] || {{:MartinsPlugins}} || [http://www.martinswiki.com/#MediaWikiFormatterPlugin MediaWikiFormatterPlugin] [http://www.martinswiki.com/#MediaWikiAdaptorPlugin MediaWikiAdaptorPlugin] [http://www.martinswiki.com/#DisableWikiLinksPlugin DisableWikiLinksPlugin]
|-
|'''[[MonkeyPirateTW]]'''<br>[http://mptw.tiddlyspot.com/ mptw.tiddlyspot.com/] || {{:MonkeyPirateTW}} ||
|-
|'''[[PeachTW]]'''<br>[http://bradleymeck.tiddlyspot.com/ bradleymeck.tiddlyspot.com/] || {{:PeachTW}} ||
|-
|'''[[PrinceTiddlyWikiExtensions]]'''<br>[http://ptw.sourceforge.net/ptwe.html ptw.sourceforge.net/ptwe.html] || {{:PrinceTiddlyWikiExtensions}} || [http://sourceforge.net/project/showfiles.php?group_id=150646 PopupTipsPlugin] [http://sourceforge.net/project/showfiles.php?group_id=150646 SimpleClockPlugin]
|-
|'''[[RedMountainVista]]'''<br>[http://solo.dc3.com/tw/ solo.dc3.com/tw/] || {{:RedMountainVista}} ||
|-
|'''[[RemotelyHelpful]]'''<br>[http://remotely-helpful.com/TiddlyWiki Remotely Helpful Plugins] || A few plugins that Lyall Pearce hopes will be useful to some. || [http://Remotely-Helpful.com/TiddlyWiki/LaunchApplication.html LaunchApplicationPlugin], [http://Remotely-Helpful.com/TiddlyWiki/ImprovedSlicesPlugin.html ImprovedSlicesPlugin] [http://Remotely-Helpful.com/TiddlyWiki/TiddlerEncryptionPlugin.html TiddlerEncryptionPlugin]
|-
|'''[[TiddlyStyles]]'''<br>[http://tiddlystyles.com/ tiddlystyles.com/] || {{:TiddlyStyles}} ||
|-
|'''[[TiddlyTools]]'''<br>[http://www.tiddlytools.com/ www.tiddlytools.com/] || TiddlyTools is a treasure trove of high quality, well maintained TiddlyWiki plugins created by Eric Shulman of ELSDesign || [http://www.tiddlytools.com/#DatePlugin DatePlugin] [http://www.tiddlytools.com/#InlineJavascriptPlugin InlineJavascriptPlugin] [http://www.tiddlytools.com/#PreviewPlugin PreviewPlugin] [http://www.tiddlytools.com/#QuoteOfTheDayPlugin QuoteOfTheDayPlugin]
|-
|'''[[VisualTW]]'''<br>[http://visualtw.ouvaton.org/VisualTW.html visualtw.ouvaton.org/VisualTW.html] || {{:VisualTW}} ||
|}
== See Also ==
* [[Plugin Library]]
[[Category:PluginIdea]]
[[Category:Plugins]]
{{Review}}
This page lists customization recommendations for specific sets of tasks.
== Publication ==
This section lists plugins useful when using TiddlyWiki used for publishing contents and distribution to a wider audience, without confronting the end-user with the peculiarities of the underlying wiki framework.
* [[Can I make it only show one tiddler at a time like a regular wiki?|SinglePageModePlugin]]: Show only one tiddler at a time
* [http://files.unamesa.org/MORE/MORE.html#PublisherPluginBeta PublisherPlugin] (formerly [http://lewcid.googlepages.com/presentation_empty.html#author:true PresentationPlugin]): Disable (hide) all authoring capabilities
* [http://tw.lewcid.org/#SplashScreenPlugin SplashScreenPlugin]: Show an info screen while the TiddlyWiki is loading (might not be necessary when the file is distributed via offline media)
* [http://www.tiddlytools.com/#BreadcrumbsPlugin BreadcrumbsPlugin]: Improve navigation by showing a list of tiddlers viewed during the respective session
* [http://tiddlywiki.abego-software.de/#YourSearchPlugin YourSearchPlugin]: Advanced search features
* [http://www.tiddlytools.com/#AttachFilePlugin AttachFilePlugin]: Store binary files as tiddlers (''not IE-compatible?'')
N.B.: Further layout customizations might be desired (cf. [[TiddlyWiki_FAQ#Customisation|Customization]], [[TiddlyWiki Themes]]).
{{Review}}
Using the [[NewTiddler (macro)|NewTiddler]] [[Macros|macro]], newly-created tiddlers can be "preloaded" with boilerplate contents.
These predefined contents can either be entered directly, or retrieved from another tiddler.
== Examples ==
<pre>
<<newTiddler label:"new record"
text:"foo"
tag:"bar"
>>
</pre>
<pre>
<<newTiddler label:"new record"
text:{{store.getTiddlerText("bar")}}
tag:"bar"
>>
</pre>
Both of these macro calls will create a button with
* the label/caption "new record"
* the tag "bar"
While the former macro creates a tiddler with "foo" as predefined content, the latter will add the contents from the tiddler called "bar" to the newly created tiddler.
see http://ptw.sourceforge.net
[[Category:Server-Sides]]
{{Review}}
__TOC__
== Printing to 3x5 Cards ==
Based on [http://groups.google.com/group/GTD-TiddlyWiki/browse_frm/thread/160be9037622888d/44d0cc8eff25d004?lnk=gst&q=3x5&rnum=1#44d0cc8eff25d004 a post] by Andy to the GTD-TiddlyWiki Google Group.
* First, you need to change the StyleSheetPrint tiddler. Here's the top part of the tiddler, which is all that needs changing:
<pre>
/*{{{*/
@media print {
* {
margin: 0;
padding: 0;
}
#mainMenu, #sidebar, #messageArea,
.toolbar, .headerForeground, .siteSubtitle,
.siteTitle, .tagging, .tagged {
display: none !important;
}
body {
background: #fff;
color: #000;
font-size: 6pt;
font-family: "Lucida Grande", "Bitstream Vera Sans", Helvetica, Verdana, Arial, sans-serif;
width: 7.4cm;
height: 12.5cm;
margin-left: 0.1cm
}
}
/*}}}*/
</pre>
:The important thing is the addition of width and height definitions to the body element. You might need to swap the width and height depending on if you feed your cards longways or sideways. My printer won't print on the leftmost 2mm of the card, so I've added a margin-left, as well. YMMV.
* Now you need to get rid of the headers and footers (assuming Firefox, here). You can do this in File > Page Setup, but if you want to make a change for a specific printer — say, if you're being canny and have installed a separate printer driver so that you can have special settings just for printing cards: type <code>about:config</code> in the address bar, and then "print" in the filter box, and press return. Now scroll down until you find the entries for the header and footer for your printer: <code>footer_center</code> (..left, ..right); <code>header_center</code> (..left, ..right). In my Firefox on Ubuntu Linux it looks like <code>print.printer_CUPS/deskjet_foo.footer_center</code>. The entries should be set to blank.
* Finally, if all else fails, fiddle:
** I found that changing the print margins in Firefox did nothing; maybe you will find different.
** Blame the printer driver (especially under Linux, where we have so many more options — try the manufacturer's one if you can).
** And — bizarrely — try using a different paper size. My genuine HP driver won't print to cards at all under Firefox with page size "A4" or "Letter", but works fine under "A5". (There is no "3x5" page size within Firefox, although there is everywhere else.)
== Multiple Printing Styles ==
If you want to print to 8.5" x 11" (aka Letter standard paper for the US) but maintain the default index card printing capability, there is a useful pluggin/macro to do this. In version 2.1.3 of GTW TW, there is a utility in the options section called "ImportTiddlers". Click on this and type in http://www.TiddlyTools.com in the URL box then click fetch. After awhile, you will get a long list of plugins you can install. The one you want is SelectStyleSheetPlugin near the bottom. Select and go the bottom and select 'import selected tiddlers'. Now reload your wiki and open the PluginManager in the options menu and check that the plugin is loaded and OK.
At this point, the plugin is installed and the 8.5"x11" style sheet needs to be created.
# Create a tiddler called PrintStyleA4 (or whatever you like to call letter type printing).
# Copy the contents of the StyleSheetPrint tiddler into PrintStyleA4.
# Add <nowiki>[[StyleSheet]]</nowiki> to the top of PrintStyleA4
# Now, change the body CSS items to
<code>
<pre>
body {
font-size: 12pt;
width: 6.5in;
height: 9in;
}
</pre>
</code>
Save tiddler with tag 'stylesheets'
Now all that is needed is to add the drop down menu. I added the drop down to my main menu. Put "*<<selectStylesheet size:1>>" where you want it to appear in the Main Menu or where ever.
At this point you should have a menu where if you want to print 8.5"x11", select PrintStyleA4. If you want 3x5, select [default]. Go wild with other style sheets as needed.
{{Incomplete}}
[http://wiki.mozilla.org/Prism Prism] (formerly known as WebRunner) is a cross-platform browser which turns websites (e.g. GMail, Google Calendar, Basecamp etc.) into a standalone application.
This generally makes the application run faster and gives websites the look and feel of desktop applications.
== See Also ==
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/62b51a9d188e8ea <nowiki>[tw]</nowiki> Webrunner]
* [http://groups.google.com/group/GTD-TiddlyWiki/browse_thread/thread/c7a877fbd76a4363 <nowiki>[gtdtw]</nowiki> WebRunner]
* [http://s3.amazonaws.com/xdexavier/multirunner.xul MultiRunner] (tabbed interface for Prism)
* [http://www.techlifeweb.com/2007/08/17/how-to-make-webrunner-portable/ How to Make WebRunner Portable]
[[Category:Tools]]
This page is a place to list ideas for TiddlyWiki plugins or enhancements. If you're a coder with some spare time you could pick something from this list and create it. If you have a great idea then add it to this list.
See also [[:Category:Project Ideas]].
* [[A better calendaring system]]
* [[A better contact manager]]
On this page the community efforts are coordinated.
If you want to contribute, you might just jump right in and start an article that you're interested in.
Don't be afraid of making mistakes; just write away and rely on the community to perfect the article.
The [http://groups.google.com/group/TiddlyWikiDocs/ TiddlyWikiDocs group] is used to coordinate documentation efforts, including this wiki.
== Launch Preparations ==
# <s>import all pages from TWguides</s>.
# <s>disallow edits on TW guides.</s>
# introduce a copyright policy (Creative Commons? GFDL?)
# categorization:
## create index of major categories
## flag pages that require review and/or enhancements
# fix CSS issues with IE (or use new skin from Clint and/or FND if it's ready)
# <s>decide on policy for anonymous edits user signups and make sure spam catchers are working</s>
# make a general announcement that the new wiki is up and running
# redirect TWGuides to new site
== Site Structure ==
=== Portals ===
Please add suggestions here.
* Main Page
* Users (subsumed under Main Page portal!?)
* Developers (subsumed under Main Page portal!?)
* Customization
=== Categories ===
Please add suggestions here.
* Customization
* Plugins
* Macros
=== Templates ===
Please add suggestions here.
* [[Template:!]]
* [[Template:Cleanup]]
* [[Template:Dablink]]
* [[Template:Incomplete]]
* [[Template:Note]]
* [[Template:OptionalTableRow]]
* [[Template:Plugin]]
* [[Template:Print]]
* [[Template:Quote]]
* [[Template:Sidenote]]
* [[Template:StatusOK]]
* [[Template:StatusPending]]
== Missing Articles ==
[[Image:TWdoc.png|thumb|right|300px|Documentation Topics]]
This is a list of frequently-requested information which has not yet been satisfyingly documented here.
The page names listed here are only preliminary suggestions; feel free to enhance them for clarity or readability.
Discussions about specific items should be lead on the [[{{TALKPAGENAME}}|discussion page]].
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/2558268245a93d7a/7dcfe21a4e0d5bd3?#7dcfe21a4e0d5bd3 limits] (e.g. filesize, amount of tiddlers etc.)
* [[Upgrading to a newer version]] (with sub-sections for specific releases and common problems)
* [[Optimizing Screen Space]] (e.g. TopMenu, ToggleSidebar etc.)
* [[Default Tiddlers]]
* [[Using the viewtemplate to control what to view and what not to view]]
* [[Reducing Filesize]] (also: code compression / [[TinyTiddly]])
* [[Image Captions]]
* [[Multi-Column Content]]
* [[WYSIWYG Editing]]
* [[Structuring Contents]] (e.g. hierarchical outlining)
* [[Formulae]] / [[Formulas]] / [[Mathematical Symbols]] (same page; the latter one redirect to the first)
* [[Images]] (scaling, embedding, text flow etc.)
* [[Quizzes]]
* [[Translations]]
* [[Embedding Flickr Badges]]
* [[Special Characters and Symbols]] (e.g. umlauts)
* [[Major Adaptations]] (MPTW, TiddlySnip, D3, GTD, presentation mode etc. - also MyTimesheets and MyForms)
* [[Browser Issues]]
* [[Operating Systems]]
* [[Slicing Tiddlers]]
* [[Dropdown Menus]]
* [[Creating a New File From an Existing TiddlyWiki]]
* [[Preserving Whitespaces]]
* [[Linking to Wikipedia]] (using a macro)
* [[Automatic Refreshing of Tiddlers]]
* [[Hiding Shadow Tiddlers From Lists and Searches]]
* [[Use of other languages such as XML, HTML]]
* [[Custom Fields]]
* [[Gradients]]
* [[Excluding and Including Tiddlers]]
* [[Timeline]]
[[Category:Coordination]]
{{Incomplete}}
== Be Bold! ==
Contributions to the wiki are always welcome.
So if you ever come across information that you think is useful to a larger audience, feel free to add it to the wiki.
Don't worry if you're not sure about details like page title or categorization - it's a wiki, so chances are others will take care of that then.
== Editing Guidelines ==
When modifying a page, a concise edit summary should be added (via the respective input field), describing what has been changed and/or why.
Modifications should only be flagged as "minor edits" if the page's content has not been significantly altered (e.g. when correcting misspellings or typos).
== Page Names ==
Page names should generally be concise (e.g. "Customization" or "Customizing" instead of "How to customize TiddlyWiki.").
=== Capitalization in Titles ===
# Always capitalize the first and the last word.
# Capitalize all nouns, pronouns, adjectives, verbs, adverbs, and subordinate conjunctions ("as", "because", "although").
# Lowercase all articles, coordinate conjunctions ("and", "or", "nor"), and prepositions regardless of length, when they are other than the first or last word.<br>Capitalize prepositions of five characters or more ("after", "among", "between").
# Lowercase the "to" in an infinitive.
source: [http://www.writersblock.ca/tips/monthtip/tipmar98.htm Writer's Block]
[[Category:Help]]
== See Also ==
* [[Project:Quality|Quality]]
{{Incomplete}}
[[Image:SealOfApproval.png|thumb|right|Seal of Approval]]Articles that meet these standards will be awarded the [[Template:Approved|Seal of Approval]].
Articles should conform to the "C3" criteria:
* Comprehensive
* Concise
* Correct
In general, the documentation on [[Project:About|TiddlyWiki.org]] should be in encyclopedic form.
This entails
* impersonal style (e.g. using passive instead of directly addressing the reader)
* proper [[Project:Policy#Capitalization in Titles|capitalization]]
* objectivity
== See Also ==
* [[Project:Policy|Policy]]
* [[:Category:Approved]]
[[Category:Help]]
#REDIRECT [[Help talk:Support Desk#Stack error overflow (Internet Explorer)]]
#REDIRECT [[Special:Recentchanges]]
When a [[TiddlyWiki]] document is not loaded from the local hard disk (i.e. when accessed via HTTP), read-only mode is used to automatically disable all editing capabilities.
== Disabling Read-Only Mode ==
The read-only mode can be initiated or disabled by using the respective [[paramifier]].
Besides using the <code>readOnly</code> [[Startup Parameters|startup parameter]], read-only mode can be disabled for all visitors with a simple plugin:
{{Tiddler|1=ConfigTweaks|2=
<nowiki>
//{{{
config.options.chkHttpReadOnly = false;
readOnly = false;
showBackstage = true;
//}}}
</nowiki>|
3=systemConfig
}}
{{Note|Changes to a remote document usually cannot be saved back to the server - see [[Editing and Saving over HTTP]].}}
Alternatively, a [[server-side implementation]] could be used to enable editing and saving changes for remote documents.
== See Also ==
* [[Startup Parameters]]
* [[Configuration Options]]
{{Incomplete}}
[http://www.haloscan.com HaloScan] provides hosting for blog-like comments (see [http://end.com/~speth/HaloscanMacro.html HaloscanMacro]).
The following plugins require full write access to the respective TiddlyWiki document (when not using a [[Server-Side Implementations|server-side]]):
* [http://www.tiddlytools.com/#CommentPlugin CommentPlugin]
* [http://devpad.tiddlyspot.com/#SimpleCommentsPlugin SimpleCommentsPlugin]
* [http://tiddlywiki.mahemoff.com/CommentsPlugin.html#CommentsPluginInfo%20CommentsPlugin CommentsPlugin] (supports nested comments)
* [http://tw.lewcid.org/#TiddlerNotesPlugin TiddlerNotesPlugin]
== External Resources ==
* [http://groups.google.com/group/TiddlyWiki/t/620c1862487cff14 <nowiki>[tw]</nowiki> Enabling comments on tiddlers]
{{Incomplete}}
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/8967f7beafb6004e/235b035d1215bcbd?#235b035d1215bcbd Eric]|2=
<pre>
Here's an alternative technique for performing an 'emergency save'
that *should* work even if the regular file save functionality is
broken:
http://www.TiddlyTools.com/#FAQ_RescueStoreArea
http://www.TiddlyTools.com/#RescueStoreAreaCommand
Basically, this inline script uses the current runtime tiddler data to
generate a text block containing the HTML that defines a TW
'storeArea'. It then displays this text in another browser window.
It is then up to you to 'rescue' the data by copying it from that
window and pasting it into an empty TW document (using an external
text editor). The FAQ article includes detailed instructions
explaining what to copy and where to paste it.
Sure, it's a manual process... but it's almost 100% guaranteed to
produce usable results (if it's done right).
... and, because this script is an 'instant bookmarklet' [1], you
don't have to have pre-install in a document in order to use it! In
fact, to 'install' it, just go to the URL above and then drag-and-drop
the "Rescue Store Area" link directly onto your browser's toolbar (if
using IE, right-click and 'add to favorites'). That's it... once the
link is added to your browser's toolbar, you won't need to add it
again, and you can use it with *any* TiddlyWiki document at any time
to extract the runtime storeArea data.
</pre>
}}
== See Also ==
* [[Safe Mode]]
'''Regular expressions''' [[Initial Configuration#Search Options|can be used]] when searching with TiddlyWiki's [[Search (macro)|search macro]]. A [http://en.wikipedia.org/wiki/Regular_expression regular expression] is a sort of shorthand for finding text according to a pattern; if you're not sure you'll find the exact text you're looking for, you can use a regular expression to find matches that are similar.
TiddlyWiki uses [http://www.programmershelp.co.uk/docs/javascript/regexp.html#1193188 JavaScript's RegExp syntax] for regular expressions in the search macro. ([http://tiddlywiki.com/#RegExpSearch TiddlyWiki.com])
[[Category:Incomplete]]
{{Incomplete}}
{{Review}}
{| class="wikitable"
! Description
! Code
! Notes
|-
| '''root directory'''
| <code>/</code>
| Unix-like operating systems only
|-
| '''current directory'''
| <code>./</code>
|
|-
| '''parent directory'''
| <code>../</code>
|
|}
Note that on Windows, a backslash (<code>\</code>) might need to be used instead of a forward slash (<code>/</code>).
== Examples ==
* file in same folder: <code><nowiki>[[My Image|./MyImage.png]]</nowiki></code> or <code><nowiki>[[My Image|MyImage.png]]</nowiki></code>
* file in subfolder: <code><nowiki>[[My Document|PDF/MyDocument.pdf]]</nowiki></code>
* file in parent folder: <code><nowiki>[[My File|../MyFile.txt]]</nowiki></code>
Note that this requires the use of [[PrettyLinks]] with labels.
{{Incomplete}}
[[TiddlyWiki]] defects and enhancements are tracked on Trac.
cf. http://trac.tiddlywiki.org/wiki/ReportingBugs
{{Review}}
Currently [[TiddlyWiki]] itself does not have facilities for keeping revisions or tracking changes of individual [[tiddler|tiddlers]].
However, various [http://www.lshift.net/blog/2008/07/01/adding-distributed-version-control-to-tiddlywiki SynchroTron] as well as [[server-side implementations]] offer revision control for TiddlyWiki documents.
For each tiddler, TiddlyWiki saves the name of the last user to modify the tiddler (except when using [[Minor Changes|minor changes]]), as well as the timestamps of when the tiddler was created and last modification.
To retain the original creator, [http://www.TiddlyTools.com/#AutoTaggerPlugin AutoTaggerPlugin] can be used to automatically add a "created by" tag to the respective tiddlers.
There is also a core tweak available [http://www.tiddlytools.com/#CoreTweaks at TiddlyTools] to add a "creator" [[Custom Fields|custom field]] to a tiddler when it is first created.
To some extent, the backup functionality can be used for keeping old revisions. However, this will backup the entire TiddlyWiki file, so tracking revisions for individual tiddlers can be a complex process.
== See Also ==
* [[Server-Side Implementations]]
{{Incomplete}}
RippleRap is an [[adaptation]] of [[TiddlyWiki]] for use as a collaboration tool at conferences.
It is comprised of several TiddlyWiki plugins and has some additional styling.
== Options for Sharing Feeds ==
# Storage of notes:
## central server, such as WebDAV on ripplerap.com
## distributed, on each user's own Google Pages, Tumbler, WebDAV (.mac, etc)
# Discovery of notes:
## central feeds as files in a single server directory on ripplerap.com
## in a registry, list of feeds available as OPML, XOXO etc
## URI of each feed added by hand into a tiddler, (similar to lifestream config)
# Aggregation of notes:
## server based aggregator (PHP or planet run from cron on ripplerap.com)
## generic feed aggregator service (Yahoo! Pipes, Google Reader, etc)
## distributed, each RippleRap grabs all the feeds directly
== Architecture and Components ==
RippleRap is currently undergoing an architectural redesign in order to make use of more generic robust TiddlyWiki plugins.
The proposed TiddlyWiki plugins for RippleRap are:
=== Feed Management ===
Components concerned with synchronising feeds to provide note sharing functionality.
* [[FeedListManagerPlugin]] ([[User:PhilHawksworth|Phil Hawksworth]])
* [[TextToXMLDOMPlugin]] ([[User:PhilHawksworth|Phil Hawksworth]])
* FeedReaderPlugin ([[User:PhilHawksworth|Phil Hawksworth]])
* SharedNotesPlugin ([[User:psd|Paul Downey]])
* ActionSchedulerPlugin ([[User:psd|Paul Downey]])
=== Agenda Management ===
Components concerned with providing a structured agenda.
* [[AgendaTrackPlugin]] ([[User:psd|Paul Downey]])
=== Notes Management ===
Components concerned with providing the UI for creating and managing notes.
* MakeNotesControlPlugin ([[User:PhilHawksworth|Phil Hawksworth]])
* [[TiddlerDisplayGroupsPlugin]] ([[User:PhilHawksworth|Phil Hawksworth]])
=== Theme and UI elements ===
* TaggedTemplateTweak ([[User:EricShulman|Eric Shulman]])
* ToggleElementPlugin ([[User:FND|FND]])
* BasicRippleRapSkin ([[User:PhilHawksworth|Phil Hawksworth]])
* BasicRippleRapColors ([[User:PhilHawksworth|Phil Hawksworth]])
In addition, RippleRap can optionally make use of the following server components in order to support larger events with many users.
=== Account Configuration ===
* The friendly name displayed against your notes
* The destination for putting your shared feed
* The location of your shared feed
* The location of the feed list (OPML/Tiddler)
=== Server Components ===
* RippleRap Bakery - [http://ripplerap.com/edition/ Web form] to create an edition of RippleRap preconfigured with conference title, URI and "type" ([http://svn.tiddlywiki.org/Trunk/verticals/ripplerap/server/edition/ PHP Source])
* RippleRap note taking (WebDav, Confabb, etc)
== System Setup and Configuration ==
RippleRap can be used by a single user, a small group of users or a large number of users. The system setup for these scenarios is described below.
== Usage ==
[TBD]
== External Resources ==
Further information is available at [http://www.ripplerap.com RippleRap.com].
[[Category:Adaptations]]
[[TiddlyWiki]] has a built-in recovery mode which prevents [[plugins]] from being executed and [[cookies]] from being read or written.
This can be useful for tracking down problems.
The safe mode can be initiated by using the respective [[Startup Parameter]]:
<code>#start:safe</code> (e.g. <code>http://domain.tld/TiddlyWiki.html#start:safe</code>)
== See Also ==
* [[Startup Parameters]]
[[Category:Errors]]
{{Plugin
|Name=SaveButtonMacro
|Author=[[User:JayFresh{{!}}jayfresh]]
|Description=IWantABlog-specific save button for publishing blog
|Version=1
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/verticals/TiddleShop/plugins/SaveButtonMacro.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
SaveButtonMacro provides you with the following macro:
* saveButton - depends on [[TemplatePlugin]]
=== Usage ===
<<saveButton>>
=== Description ===
Clicking on the generated "save" button uses a naming convention to find the appropriate template for the tiddler in context, renders that template with the tiddler and saves the output to ./blog.html.
This built-in macro generates a button to save all changes to disk.
== Usage ==
<pre>
<<saveChanges [label] [tooltip]>>
</pre>
The optional parameters define the button's label and tooltip, respectively.
{{Note|
These parameters were introduced in TiddlyWiki v2.4.
}}
[[Category:Macros]] [[Category:Core Macros]]
A TiddlyWiki is a single html file which can be saved to a hard drive, USB stick or server.
'''Save to hard drive'''
Click on Save Changes (right-hand top menu).
Name the file, select the location and click on Save.
The document will be saved with the specified name, location and an .html extension. When next opened it will display in the user's default browser.
'''Save to USB stick'''
Click on Save Changes (right-hand top menu).
Name the file, select USB stick drive as the location and click on Save.
The document will be saved with the specified name, location and an .html extension.
'''Save to Tiddlyspot'''
Click on Save to Web (top right-hand menu). A yellow dialog box appears which says "About to upload on <nowiki>http://tiddlywikiname.tiddlyspot.com/index.html..."</nowiki> It will say "Main TiddlyWiki file uploaded" when it's done.
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
* Scripts are regular tiddlers that can contain a mix of wiki syntax PLUS javascript code, embedded "inline", in between <script>...</script> markers.
* Scripts are performed each time the tiddler in which they are embedded is rendered.
* Scripts are typically used to generate and return wiki syntax that is automatically rendered to insert dynamic content into the tiddler display.
* Scripts can also make small 'on-the-'fly' adjustments to the attributes of rendered elements contained within the same tiddler using 'relative DOM references' (e.g., place.lastChild, place.parentNode, etc.)
* Scripts can also be used to create link handlers that are invoked "onclick" to trigger javascript functions in response to user actions.
* Scripts need http://www.TiddlyTools.com/#InlineJavascriptPlugin
== Example Scripts ==
=== Tagging Linked Tiddlers ===
Two options presented below.
<pre>
<script>
var tid="AParticularTiddler";
var tag="tagToAdd";
var links=store.getTiddler(tid).links;
store.suspendNotifications();
for (var i=0; i<links.length; i++)
if (store.tiddlerExists(links[i]))
store.setTiddlerTag(links[i],true,tag);
store.resumeNotifications();
</script>
</pre>
Replace "AParticularTiddler" with the tiddler title that contains the list of tiddlers that receive a tag name that replaces "tagToAdd".
Source: Eric Shulman http://groups.google.com/group/tiddlywiki/browse_thread/thread/28bcaa11960cbf26
<pre>
<script label="script(B)" title="Tag tiddlers from a list with
doublebracketed listitems">
var tid=prompt("title of the tiddler with the list");
if (!tid) return; /* cancelled by user */
var txt=store.getTiddlerText(tid);
if (!txt) { alert(tid+" not found"); return; }
var titles=txt.readBracketedList();
for (var i=0; i<titles.length; i++) store.setTiddlerTag(titles
[i],true,'TagName');
</script>
</pre>
Source: Måns Mårtensson http://groups.google.com/group/tiddlywiki/browse_thread/thread/a8922becd1f29938#
=== Convert List to Wikilinks ===
<pre>
<script label="L2W" title="convert list to wikilinks">
var here=story.findContainingTiddler(place);
if (!here) return;
var title=here.getAttribute("tiddler");
var tid=store.getTiddler(title);
var t=store.getTiddlerText(tiddler.title) ;
var target = store.getTiddler(tiddler.title) ;
var txt='[['+tid.text.split('\n').join(']]\n[[')+']]';
store.saveTiddler
(tid.title,tid.title,txt,tid.modifier,tid.modified,tid.tags,tid.fields);
</script>
</pre>
Paste a line seperated list into a tiddler then "run" the script on the list to get double bracketed list items.
Source: Måns Mårtensson http://groups.google.com/group/tiddlywiki/browse_thread/thread/a8922becd1f29938#
=== Hour Based Greetings ===
<pre>
<script>
var hour=new Date().getHour();
var out="Good evening";
if (hour<18) out="Good afternoon";
if (hour<12) out="Good morning";
if (hour<6) out="Why aren't you asleep?";
return out;
</script>
</pre>
http://groups.google.com/group/tiddlywiki/browse_thread/thread/f440f280a8098592/58fc107fd0fe86ed?hl=en&lnk=gst&q=aliasplugin#
=== What Time is It? ===
<pre>
<script label="what time is it?">
return "<br>"+new Date().toString();
</script>
</pre>
http://groups.google.com/group/tiddlywiki/browse_thread/thread/f440f280a8098592/58fc107fd0fe86ed?hl=en&lnk=gst&q=aliasplugin#
Scripts need http://www.TiddlyTools.com/#InlineJavascriptPlugin
== Tagging Linked Tiddlers ==
<pre>
<script>
var tid="AParticularTiddler";
var tag="tagToAdd";
var links=store.getTiddler(tid).links;
store.suspendNotifications();
for (var i=0; i<links.length; i++)
if (store.tiddlerExists(links[i]))
store.setTiddlerTag(links[i],true,tag);
store.resumeNotifications();
</script>
</pre>
Source: Eric Shulman http://groups.google.com/group/tiddlywiki/browse_thread/thread/28bcaa11960cbf26
{{Disambiguation}}
* [[Search (macro)]]
* [[Enhanced Search]]
This macro creates an input field to perform full-text searches on a [[TiddlyWiki]] document's tiddler contents.
== Usage ==
<pre>
<<search [value]>>
</pre>
By specifiying the <code>value</code> parameter, the search form can be "preloaded" with the desired term.
== Options ==
{{Incomplete|section}}
* case-sensitive
* regular expressions
== See Also ==
* [[Enhanced Search]]
[[Category:Macros]] [[Category:Core Macros]]
{{Incomplete}}
* [http://firefoxprivileges.tiddlyspot.com FirefoxPrivilegesPlugin]
== External Resources ==
* [http://www.tiddlytools.com/#FAQ_BrowserSecurity Browser Security]
{{Incomplete}}
[http://mptw.tiddlyspot.com/#HideWhenPlugin HideWhenPlugin]: allows conditional inclusion/exclusion in [[HTML templates]]
TiddlyWiki's architecture for interacting with servers allows it to be plugged into a wide variety of servers.
This is done through the addition of plugins containing custom server adaptors.
Server adaptors are designed to allow for UseCases like importing tiddlers, loading missing tiddlers on the fly and synchronizing changes with a server.
Separate macros and core extensions implement such features by accessing the facilities provided by server adaptors.
== Available Adaptors ==
{| class="wikitable"
! Adaptor
! Notes
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/SimonMcManus/adaptors/ccTiddlyAdaptorPlugin.js ccTiddly]
|
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/adaptors/ConfabbNotesAdaptorPlugin.js ConfabbNotes]
|
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/ConfluenceAdaptorPlugin.js Confluence]
|
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/DavAdaptorPlugin.js DAV]
| not ready for release
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/SimonMcManus/adaptors/FacebookFriendsAdaptorPlugin.js FacebookFriends]
| not ready for release
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/SimonMcManus/adaptors/FacebookNewsAdaptorPlugin.js FacebookNews]
| not ready for release
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/JSPWikiAdaptorPlugin.js JSP Wiki]
|
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/MediaWikiAdaptorPlugin.js MediaWiki]
|
|-
| [http://svn.tiddlywiki.org/Trunk/association/adaptors/RawTextAdaptor.js RawText]
| beta
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/adaptors/RSSAdaptor.js RSS]
| stable
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/SocialtextAdaptorPlugin.js SocialText]
| stable
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/synchrotronAdaptorPlugin.js Synchrotron]
|
|-
| [http://svn.tiddlywiki.org/Trunk/association/adaptors/TiddlyWebAdaptor.js TiddlyWeb]
| stable
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/FND/adaptors/TracAdaptor.js Trac]
| experimental
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/TWikiAdaptorPlugin.js TWiki]
|
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/FND/adaptors/TwitterAdaptor.js Twitter]
| beta
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/SaqImtiaz/verticals/POLS250/common/plugins/WikispacesSoapAdaptorPlugin.js WikispacesSOAP]
| stable
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/WordpressAdaptorPlugin.js Wordpress]
|
|-
| [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/WordpressAdaptorPlugin.js ZiddlyWiki]
|
|}
== See Also ==
* [[Dev:Server Adaptor Mechanism]]
[[Category:Server Adaptors]]
[[TiddlyWiki]] was not originally designed for multi-user collaboration; the single-file paradigm makes concurrent editing a challenging issue.
However, there are various solutions enabling TiddlyWiki to be used as a collaborative platform.
== Overview ==
Server-side solutions for [[TiddlyWiki]] provide ubiquitous access to hosted TiddlyWiki documents, and potentially enable multi-user collaboration on a single TiddlyWiki document.
There are a number of solutions, each suited to specific needs:
{| class="wikitable"
|-
! Name
! Description
! Requirements
! Multi-User Support
! Revision History
! Status
|-
| [[TiddlyLock]]
| prevent overwriting changes (simultaneous editing) when using a TiddlyWiki document over a shared network drive
| network share
| yes (prevents simultaneous editing)
| no (regular TiddlyWiki backups only)
| ''unknown''
|-
| [[UploadPlugin]]
| upload TiddlyWiki document
| PHP
| no
| no (regular TiddlyWiki backups only)
| actively maintained
|-
| [[ccTiddly]]
|
| PHP and MySQL
| yes
| yes
| actively maintained
|-
| [[WebDavPlugin]]
| save TiddlyWiki to [http://en.wikipedia.org/wiki/WebDAV WebDAV] directory
| WebDAV-enabled server
| no
| no (regular TiddlyWiki backups only)
| ''unknown''
|-
| [[TiddlyWeb]]
| reference implementation of a server-side API where individual tiddlers can be used in lots of different wikis
| Python
| yes
| yes
| actively developed, currently in beta stage
|-
| [[TiddlyHome]]
|
| PHP
| yes
| yes
| actively maintained
|-
| [[MiniTiddlyServer]]
|
| PHP
| no
| no (regular TiddlyWiki backups only)
| abandoned
|-
| [[ZiddlyWiki]]
|
| Python, Zope
| yes
| yes
| irregularly maintained
|-
| [[PrinceTiddlyWiki]]
|
|
|
|
| abandoned
|-
| [[PhpTiddlyWiki]] ([http://www.borism.net/2009/03/18/server-side-tiddlywiki-with-php-easy/ fixed version])
|
| PHP
|
|
| abandoned
|-
| [[Coral]]
|
| Java
|
|
| ''unknown''
|-
| [http://en.wikipedia.org/wiki/Revision_control version control systems] (e.g. Subversion, Git, Mercurial)
| since version 2.2, TiddlyWiki is very much suitable to be used in conjunction with regular version control systems
|
| yes (to a limited extent)
| yes
|
|}
== Hosting Services ==
* [[Tiddlyspot]] (based on UploadPlugin)
* [http://wiki.osmosoft.com/alpha ccTiddly Alpha] (based on ccTiddly)
* [http://tiddlywiki.limebits.com/ LimeBits] (based on WebDAVSavingPlugin)
== Other ==
* [http://tiddlyhome2.bidix.info TiddlyHome 2.0]
* [http://tiddlyhost.appspot.com TiddlyHost]
* [http://allmydata.org/trac/tiddly_on_tahoe Tiddly on Tahoe]
* [http://github.com/diclophis/projectwiki/tree/master ProjectWiki]
== See Also ==
* [[Can I use TiddlyWiki as a multi-user/collaborative/server based wiki?]]
* [[I put my TiddlyWiki file on my web server and I can't save]]
[[Category:Server-Sides]]
*[[I put my TiddlyWiki file on my web server and I can't save]]
Many of [[TiddlyWiki]]'s default configuration settings are stored in built-in "shadow" tiddlers.
These are tiddlers that are "preloaded" with default contents.
A list of all shadow tiddlers is available through the [[sidebar]]'s ''More'' > ''Shadowed'' tab (using the [[list]] macro).
Regular tiddlers take precedence over shadow tiddlers.
Thus default contents can be modified or overridden by editing the respective shadow tiddler (which automatically creates a regular tiddler of the same name).
A shadow tiddler's default contents can be restored by deleting or renaming the respective regular tiddler.
== Default Shadow Tiddlers ==
{|border="1"
|-
|'''Shadow Tiddler'''
|'''Default value'''
|'''Description'''
|-
|colspan="3"|<span id="User_Setup">'''User Setup'''</span>
|-
|[[SiteTitle]]
|My TiddlyWiki
|Defines the first part of the page title
|-
|[[SiteSubtitle]]
|a reusable non-linear personal web notebook
|Defines a SubTitle for the page This shadow tiddler is used as the second part of the page title
|-
|[[SiteUrl]]
|http://www.tiddlywiki.com/
|Identifies the full target URL for publication
|-
|[[DefaultTiddlers]]
|[[GettingStarted]]
|The tiddlers listed in this shadow tiddler will be automatically displayed when TiddlyWiki starts up
|-
|[[GettingStarted]]
|See [[GettingStarted]]
|Provides basic usage instructions for setting up a TiddlyWiki page
|-
|[[MainMenu]]
|[[GettingStarted]]
|Defines the contents of the main menu, by default in the left-hand column of the screen
|-
|colspan="3"|<span id="Advanced_Setup">'''Advanced Setup'''</span>
|-
|[[MarkupPreHead]]
|<nowiki><link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/></nowiki>
|The contents of this tiddler are inserted at the top of the <head> section of the TiddlyWiki HTML file
|-
|[[MarkupPostHead]]
|
|The contents of this tiddler - empty by default - are inserted at the bottom of the <head> section of the TiddlyWiki HTML file
|-
|[[MarkupPreBody]]
|
|The contents of this tiddler - empty by default - are inserted at the top of the <body> section of the TiddlyWiki HTML file
|-
|[[MarkupPostBody]]
|
|The contents of this tiddler - empty by default - are inserted at the bottom of the <body> section of the TiddlyWiki HTML file
|-
|colspan="3"|<span id="Import_&_Plugins">'''Import & Plugins'''</span>
|-
|[[ImportTiddlers]]
|<nowiki><<importTiddlers>></nowiki>
|This shadow tiddler provides access to [[Importing Tiddlers|importing tiddlers]]
|-
|[[PluginManager]]
|<nowiki><<plugins>></nowiki>
|Provides access to the plugin manager
|-
|colspan="3"|<span id="Templates_&_Style_Sheets">'''Templates & Style Sheets'''</span>
|-
|[[PageTemplate]]
|See [[PageTemplate]]
|The HTML template in this shadow tiddler determines the overall TiddlyWiki layout
|-
|[[ViewTemplate]]
|See [[ViewTemplate]]
|The HTML template in this shadow tiddler determines how tiddlers look
|-
|[[EditTemplate]]
|See [[EditTemplate]]
|The HTML template in this shadow tiddler determines how tiddlers look while they are being edited
|-
|[[ColorPalette]]
|See [[ColorPalette]]
|These values in this shadow tiddler determine the colour scheme of the TiddlyWiki user interface
|-
|[[StyleSheetLayout]]
|See [[StyleSheetLayout]]
|This shadow tiddler contains CSS definitions related to the layout of page elements. '''DO NOT EDIT THIS TIDDLER''', instead make your changes in the [[StyleSheet]] shadow tiddler.
|-
|[[StyleSheetColors]]
|See [[StyleSheetColors]]
|This shadow tiddler contains CSS definitions related to the color of page elements. '''DO NOT EDIT THIS TIDDLER''', instead make your changes in the [[StyleSheet]] shadow tiddler.
|-
|[[StyleSheet]]
|
|This tiddler - empty by default - can contain custom CSS definitions
|-
|[[StyleSheetPrint]]
|See [[StyleSheetPrint]]
|This shadow tiddler contains CSS definitions for printing
|-
|[[StyleSheetLocale]]
|See [[StyleSheetLocale]]
|This shadow tiddler contains CSS definitions related to the translation locale
|-
|colspan="3"|<span id="SideBar_Tabs">'''SideBar Tabs'''</span>
|-
|[[SideBarOptions]]
|See [[SideBarOptions]]
|Used as the contents of the option panel in the right-hand sidebar
|-
|[[OptionsPanel]]
|See [[OptionsPanel]]
|Used as the contents of the options panel slider in the right-hand sidebar
|-
|[[AdvancedOptions]]
|<nowiki><<option>></nowiki>>
|Provides access to several advanced options
|-
|[[SideBarTabs]]
|<nowiki><<tabs txtMainTab "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "Tags" "All tags" TabTags "More" "More lists" TabMore>></nowiki>
|Used to define the tabs panel in the right-hand sidebar
|-
|[[TabTimeline]]
|<<timeline>>
|Displays all tiddlers in reverse chronological order, and by default is displayed as the 'Timeline' tab in the right-hand [[SideBar]]
|-
|[[TabAll]]
|<<list all>>
|Displays alphabetical list of all tiddlers - except for unedited [[Shadow Tiddlers]] and is included in [[SideBarTabs]] in the right-hand sidebar
|-
|[[TabTags]]
|<nowiki><<allTags excludeLists>></nowiki>
|Displays a list of all [[Tags]], and is included in [[SideBarTabs]] in the right-hand sidebar
|-
|[[TabMore]]
|<<tabs txtMoreTab "Missing" "Missing tiddlers" TabMoreMissing "Orphans" "Orphaned tiddlers" TabMoreOrphans "Shadowed" "Shadowed tiddlers" TabMoreShadowed>>
|Contains the contents of the 'More' tab in the right-hand sidebar
|-
|[[TabMoreMissing]]
|<nowiki><<list missing>></nowiki>
|Displays [[Missing Tiddlers]], and is included in [[TabMore]], displayed in the right-hand sidebar
|-
|[[TabMoreOrphans]]
|<nowiki><<list orphans>></nowiki>
|Displays [[Orphan Tiddlers]], and is included in [[TabMore]], displayed in the right-hand sidebar
|-
|[[TabMoreShadowed]]
|<nowiki><<list shadowed>></nowiki>
|Displays [[Shadow Tiddlers]], and is included in [[TabMore]], displayed in the right-hand sidebar
|}
== See Also ==
* [[HTML Templates]]
* [[Style Sheets]]
* [[SiteTitle]] / [[SiteSubtitle]]
* [[Configuration Options]]
[[Category:FAQ]]
[[Category:Configuration]]
== Galleries ==
TiddlyWiki is being used for a variety of use cases, as demonstrated on the following sites:
* [http://giffmex.tiddlyspot.com TiddlyWiki in Action]
* [http://tiddlyspot.com/?page=gallery Tiddlyspot gallery]
* [http://www.giffmex.org/tw/tiddlywikicentral.html TiddlyWiki Central]
== Screencasts ==
* [http://www.osmosoft.com/introduction Introduction to TiddlyWiki]
* [http://faculty.massasoit.mass.edu/jventola/videocasts/tidhelp2/tidhelp2.html Tid-Help 2]
* [http://max.limpag.com/2006/09/07/using-a-tiddlywiki-a-video-guide/ Using TiddlyWiki] ([http://ia300033.us.archive.org/3/items/tiddlywikitutorial/tiddlywiki.swf full-screen version])
<<search>><<closeAll>><<permaview>><<importMediaWikiSync>><<newJournal>><<newTiddler label:'new Media Wiki tiddler' fields:'wikiformat:mediawiki'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
<<tabs txtMainTab "Articles" "All articles" TabAll "Tags" "All tags" TabTags "All" "All Tiddler" TabAll "More" "More lists" TabMore>>
The default sidebar is a combination of [[shadow tiddlers]] ([[SideBarOptions]] and [[SideBarTabs]], as defined in the [[PageTemplate]]), providing access to basic [[TiddlyWiki]] controls.
[[Category:Shadow Tiddlers]]
Got no interwebz? I'm in ur MediaWiki offline slurping ur Google juice
The slider macro allows embedding tiddlers within another tiddler, with the option to toggle the visibility of the [[Transclusion|transcluded]] contents.
== Usage ==
<pre>
<<slider cookie tiddler label tooltip>>
</pre>
* <code>cookie</code>: variable to save the state of the slider (e.g. <code>chkFooSlider</code>)
* <code>tiddler</code>: name of the tiddler to include in the slider
* <code>label</code>: title text of the slider
* <code>tooltip</code>: tooltip text of the slider
=== Example ===
<pre>
<<slider chkTestSlider [[OptionsPanel]] "Options" "Open advanced options">>
</pre>
== See Also ==
* [http://www.tiddlytools.com/#NestedSlidersPlugin NestedSlidersPlugin] (directly embeds slider panels' contents, without the need for transclusion)
[[Category:Macros]]
You can create [[lists]] and [[tables]] from tiddlers using [[macros]] and various [[plugins]]
==Sorting using plugins==
The [[ForEachTiddlerPlugin]] has been designed to display complex sets of data constructed using the [[DataTiddlerPlugin]] and the [[FormTiddlerPlugin]]. Udo Borkowski, their creator, has thoroughly documented them and provided numerous examples of how they might be used alongside the plugins.
The ForEachTiddler is often refered to as 'FET' or 'fET' on the [[Groups]]
==External Links==
[http://tiddlywiki.abego-software.de/ ForEachTiddlerPlugin DataTiddlerPlugin FormTiddlerPlugin at abego-software]
[[Category:Activities]]
Sparklines were [http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1 invented] by Edward Tufte, author of a number of thoughtful and inspiring books on the presentation of visual information.
They are described by Tufte as "small, intense, word-like graphics", and are designed to be used inline with ordinary text.
[[TiddlyWiki]]'s Sparklines macro creates these graphics inline without requiring any image files or server-side processing.
{{Note|
As of TiddlyWiki v2.4.0, this macro has been removed from the default distribution.
It is still available from [http://www.tiddlywiki.com/coreplugins.html TiddlyWiki Core Plugins].
}}
== Usage ==
<pre>
<<sparkline [numbers]>>
</pre>
The macro accepts space-separated numeric values as parameter.
=== Example ===
<pre>
<<sparkline 163 218 231 236 232 266 176 249 289 1041 1835 2285 3098 2101 1755 3283 3353 3335 2898 2224 1404 1354 1825 1839 2142 1942 1784 1145 979 1328 1611>>
</pre>
This shows activity on http://www.tiddlywiki.com during the month of April 2005.
[[Category:Macros]] [[Category:Core Macros]]
HTML entities provide a way to encode special characters.
== Commonly Used Symbols ==
{| class="wikitable"
! Code || Symbol || Description
|-
| <code>&eacute;</code> || é || acute accent
|-
| <code>&rarr;</code> || → || arrow
|-
| <code>&rArr;</code> || ⇒ || double arrow
|-
| <code>&there4;</code> || ∴ || therefore (mathematical)
|}
== See Also ==
* [[Use of other languages such as XML, HTML]]
== External Resources ==
* [http://de.selfhtml.org/html/referenz/zeichen.htm HTML entities reference] (DE)
* [http://www.tiddlywiki.com/#HtmlEntities HTML Entities]
* [http://www.w3schools.com/TAGS/ref_entities.asp HTML Entities Reference]
* [http://www.w3schools.com/TAGS/ref_symbols.asp HTML Symbol Entities Reference]
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
TiddlyWiki will have problems displaying special characters unless it is set to use UTF-8.
If you are serving your TW from a web server you might need to add an {{{.htaccess}}} file with this in it:
{{{
AddCharset utf-8 .html
}}}
If you edit your TW file with a text editor that doesn't handle UTF-8 then it may have saved as plain ascii and broken the special characters such as the » char after "options"
(this answer needs refining)
[[Category:FAQ]]
[[Category:Troubleshooting]]
[[:Category:Adaptations]]
[[:Category:Approved]]
[[:Category:Browser Issues]]
[[:Category:Errors]]
[[:Category:FAQ Section]]
[[:Category:FAQ]]
[[:Category:Macros]]
[[:Category:Plugins]]
[[:Category:Project Ideas]]
[[:Category:Stakeholders]]
[[A better calendaring system]]
[[A better contact manager]]
[[A script from "file://" is requesting enhanced abilities]]
[[Accessibility]]
[[Add Menu Item]]
[[Aliases]]
[[AllTags_(macro)]]
[[Auto-Completion]]
[[Autosave]]
[[Backstage]]
[[Backups]]
[[Basic_visual_changes]]
[[Bookmarklets]]
[[Broken links in Firefox]]
[[Caching]]
[[Can I make it only show one tiddler at a time like a regular wiki?]]
[[Can I use MediaWiki style markup instead of the built in TiddlyWiki markup. Or Twiki or Trac style markup?]]
[[Can I use TiddlyWiki as a multi-user/collaborative/server based wiki?]]
[[Can I use TiddlyWiki for GTD?]]
[[Category: How To]]
[[Category:Activities]]
[[Category:Adaptations]]
[[Category:Approved]]
[[Category:Basics]]
[[Category:Browser Issues]]
[[Category:Configuration]]
[[Category:Coordination]]
[[Category:Core Macros]]
[[Category:Custom Macros]]
[[Category:Developer Tools]]
[[Category:Disambiguation]]
[[Category:Errors]]
[[Category:FAQ Section]]
[[Category:FAQ]]
[[Category:Getting Started]]
[[Category:How To]]
[[Category:Icon Templates]]
[[Category:Incomplete]]
[[Category:Macros]]
[[Category:Plugins]]
[[Category:Project Ideas]]
[[Category:Shadow Tiddlers]]
[[Category:stakeholders]]
[[Category:Stakeholders]]
[[Category:Templates]]
[[Category:Troubleshooting]]
[[Category:Using TiddlyWiki]]
[[Category:Wiki Markup]]
[[CcTiddly/ccUpload]]
[[CcTiddly/Configuration]]
[[CcTiddly/Details on running the install.sql file]]
[[CcTiddly/Download]]
[[CcTiddly/Installation/German]]
[[CcTiddly/Installation]]
[[CcTiddly/Releases]]
[[CcTiddly/v1.2 Installation]]
[[CcTiddly]]
[[CcTiddlyDeveloper/ReleaseGuide]]
[[CcTiddlyPermissions]]
[[Change where backups are saved]]
[[Changes to the default colors]]
[[CloseAll_(macro)]]
[[Code_Conventions]]
[[Color]]
[[Colors]]
[[Colour]]
[[Comments]]
[[Community]]
[[Community_Projects]]
[[Components]]
[[Content Management]]
[[Coral]]
[[Core Macros]]
[[Core_Plugins]]
[[Corruption]]
[[Create Tiddler]]
[[Custom Macros]]
[[Customization of Colors and Layout]]
[[Customization]]
[[Default Tiddlers]]
[[Delete Tiddler]]
[[Dev:Accessibility]]
[[Dev:Adaptor.close]]
[[Dev:Adaptor.getTiddler]]
[[Dev:Adaptor.getTiddlerList]]
[[Dev:Adaptor.getWorkspaceList]]
[[Dev:Adaptor.openHost]]
[[Dev:Adaptor.openWorkspace]]
[[Dev:Adaptor.putTiddler]]
[[Dev:AdaptorCallbackSignature]]
[[Dev:addClass]]
[[Dev:addEvent]]
[[Dev:addNotification]]
[[Dev:AddNotification]]
[[Dev:AsynchronousPattern]]
[[Dev:autoLinkWikiWords]]
[[Dev:Backstage]]
[[Dev:Best Practices]]
[[Dev:blurElement]]
[[Dev:blurTiddler]]
[[Dev:CcTiddly/API]]
[[Dev:CcTiddly/RSS]]
[[Dev:CcTiddly]]
[[Dev:changed]]
[[Dev:Chef]]
[[Dev:chooseTemplateForTiddler]]
[[Dev:clear]]
[[Dev:Clear]]
[[Dev:clearMessage]]
[[Dev:closeAllTiddlers]]
[[Dev:Code Repository]]
[[Dev:Comments]]
[[Dev:Contributions]]
[[Dev:convertUnicodeToUTF8]]
[[Dev:Cook]]
[[Dev:Core Code Overview]]
[[Dev:createExternalLink]]
[[Dev:createTagButton]]
[[Dev:createTiddler]]
[[Dev:CreateTiddler]]
[[Dev:createTiddlyButton]]
[[Dev:createTiddlyElement]]
[[Dev:createTiddlyLink]]
[[Dev:createTiddlyText]]
[[Dev:Custom Macros]]
[[Dev:Developing and Testing a Plugin]]
[[Dev:displayMessage]]
[[Dev:displayTiddler]]
[[Dev:DisplayTiddler]]
[[Dev:displayTiddlers]]
[[Dev:ensureVisible]]
[[Dev:escapeLineBreaks]]
[[Dev:Extended Fields]]
[[Dev:fetchTiddler]]
[[Dev:FetchTiddler]]
[[Dev:filterTiddlers]]
[[Dev:findContainingTiddler]]
[[Dev:findPosX]]
[[Dev:findPosY]]
[[Dev:findScrollX]]
[[Dev:findScrollY]]
[[Dev:findWindowHeight]]
[[Dev:findWindowWidth]]
[[Dev:focusTiddler]]
[[Dev:forEachTiddler]]
[[Dev:ForEachTiddler]]
[[Dev:Formatters]]
[[Dev:gatherSaveFields]]
[[Dev:generateFingerprint]]
[[Dev:generateRSS]]
[[Dev:getLinks]]
[[Dev:getMissingLinks]]
[[Dev:getNodeText]]
[[Dev:getOrphans]]
[[Dev:GetOrphans]]
[[Dev:getPlainText]]
[[Dev:getRecursiveTiddlerText]]
[[Dev:getReferringTiddlers]]
[[Dev:getShadowed]]
[[Dev:getSubtitle]]
[[Dev:getTemplateForTiddler]]
[[Dev:getTiddlers]]
[[Dev:getTiddlerText]]
[[Dev:Ginsu]]
[[Dev:hasChanges]]
[[Dev:hasClass]]
[[Dev:Hijacking onClick Methods]]
[[Dev:Hijacking]]
[[Dev:Hot_Issues]]
[[Dev:isDirty]]
[[Dev:isReadOnly]]
[[Dev:isShadowTiddler]]
[[Dev:isTagged]]
[[Dev:JigglyWiki]]
[[Dev:JQuery Plugins]]
[[Dev:loadFromDiv]]
[[Dev:Macro Parameters]]
[[Dev:Macros]]
[[Dev:Möäss]]
[[Dev:Nightly Builds]]
[[Dev:notify]]
[[Dev:Notify]]
[[Dev:notifyAll]]
[[Dev:NotifyAll]]
[[Dev:permaView]]
[[Dev:Plugin Development]]
[[Dev:Plugin Library]]
[[Dev:Plugin Licenses]]
[[Dev:Plugin Specifications]]
[[Dev:Plugins]]
[[Dev:PyTiddlyWiki]]
[[Dev:r4tw]]
[[Dev:R4tw]]
[[Dev:Recipe]]
[[Dev:refreshAllTiddlers]]
[[Dev:refreshTiddler]]
[[Dev:refreshTiddlyLink]]
[[Dev:removeChildren]]
[[Dev:removeClass]]
[[Dev:removeEvent]]
[[Dev:removeTiddler]]
[[Dev:RemoveTiddler]]
[[Dev:resolveTarget]]
[[Dev:resumeNotifications]]
[[Dev:ResumeNotifications]]
[[Dev:reverseLookup]]
[[Dev:Rhino]]
[[Dev:saveAsRss]]
[[Dev:saveChanges]]
[[Dev:saveOptionCookie]]
[[Dev:saveTiddler]]
[[Dev:saveToDiv]]
[[Dev:search]]
[[Dev:Selenium]]
[[Dev:Server Adaptor Mechanism]]
[[Dev:Server_Adaptor_Mechanism/Adaptor_Structure]]
[[Dev:ServerAdaptorConcepts]]
[[Dev:ServerAdaptorExtendedFields]]
[[Dev:ServerAdaptorMechanism]]
[[Dev:set]]
[[Dev:setDirty]]
[[Dev:SetDirty]]
[[Dev:setStylesheet]]
[[Dev:setTiddlerTag]]
[[Dev:Story.CloseTiddler]]
[[Dev:Story.createTiddler]]
[[Dev:Story.forEachTiddler]]
[[Dev:Story.saveTiddler]]
[[Dev:Story.scrubTiddler]]
[[Dev:Story.search]]
[[Dev:Story.setDirty]]
[[Dev:Story]]
[[Dev:String Methods]]
[[Dev:suspendNotifications]]
[[Dev:SuspendNotifications]]
[[Dev:Tickets]]
[[Dev:Tiddler.getTags]]
[[Dev:Tiddler.LoadFromDiv]]
[[Dev:Tiddler]]
[[Dev:tiddlerExists]]
[[Dev:TiddlyCMS]]
[[Dev:TiddlyWeb Development]]
[[Dev:TiddlyWeb]]
[[Dev:TiddlyWiki.GetTags]]
[[Dev:TiddlyWiki]]
[[Dev:Toolbar_Commands]]
[[Dev:Tools]]
[[Dev:Translation]]
[[Dev:Twill]]
[[Dev:unescapeLineBreaks]]
[[Dev:UseCasesOptions]]
[[Dev:Wikifier]]
[[Dev:wikify]]
[[Dev:wikifyPlain]]
[[Dev:wikifyStatic]]
[[Diagrams]]
[[Double_Brackets]]
[[Downloading TiddlyWiki]]
[[Edit_(macro)]]
[[Editing and saving a tiddler]]
[[Editing and Saving over HTTP]]
[[Editing]]
[[Editing_and_Formatting]]
[[Editions]]
[[Embedding Files]]
[[Embedding TiddlyWiki]]
[[Embedding]]
[[Encryption]]
[[Enhanced Search]]
[[Error_in_macro]]
[[Escaping]]
[[Exporting_Tiddler_Contents]]
[[Extended Fields]]
[[Extended_Attributes]]
[[Facebook Groups]]
[[Facebook_Groups]]
[[FavIcon]]
[[FeedListManagerPlugin]]
[[FET]]
[[Filtering]]
[[Find a tiddler]]
[[Firefox 3]]
[[Firefox]]
[[ForEachTiddlerPlugin]]
[[ForEachTiddlerPlugin_questions]]
[[Forms_and_Data]]
[[Future_Proof]]
[[Getting started with MonkeyGTD 2.1 alpha]]
[[Getting_started_with_UploadPlugin]]
[[GnuPG]]
[[Google Analytics]]
[[Google Chrome]]
[[Gradient (macro)]]
[[Greasemonkey]]
[[Groups]]
[[Hacking MediaWiki Unplugged]]
[[Help:Contents/CheatSheet]]
[[Help:MediaWiki Markup]]
[[Help:Overview]]
[[Help:Sandbox]]
[[HideWhenPlugin/Questions]]
[[HideWhenPlugin]]
[[How can I avoid all text being selected when I edit a tiddler?]]
[[How do I change how a tiddler looks?]]
[[How do I change how tiddler editing looks?]]
[[How do I change my default options?]]
[[How do I change the colours and the fonts?]]
[[How do I change the date format for new journals?]]
[[How do I change the layout of my TiddlyWiki?]]
[[How do I have a different tiddler toolbar for web users?]]
[[How do I justify all the text in every tiddler?]]
[[How do I know what version I'm running?]]
[[How do I link to a tiddler without a wiki word name?]]
[[How do I right-justify some text in a tiddler?]]
[[How To/Automatically open today's journal tiddler on startup]]
[[How To/Basic Info to Provide When Asking for Help]]
[[How To/Build a menu tree in TW]]
[[How To/Change the title bar]]
[[How To/Configure your browser to allow saves to disk]]
[[How To/Converting Excel Spreadsheets to TiddlyWiki Tables]]
[[How To/Converting Tables from Word to TiddlyWiki]]
[[How To/Custom Template with Custom Toolbar]]
[[How To/Deactivating WikiWords]]
[[How To/Display a variable within a tiddler]]
[[How To/Display number of external links in a tiddler]]
[[How To/Displaying different kinds of tiddlers]]
[[How To/Embedding Macros in double brackets to use for links to other tiddlers]]
[[How To/Firefox Per-File Permissions]]
[[How To/Header Macro/Plugin (for Custom Graphic Header)]]
[[How To/How can use my logo as the SiteTitle but still have text in the html page title?]]
[[How To/How to Get the Content of a Tiddler and Edit Them in a Macro]]
[[How To/Important Differences Between 'Plugins' and 'Scripts']]
[[How To/Including Username in the Title or Subtitle]]
[[How To/Make a tiddler open in folded mode]]
[[How To/Multi-line contents in a list]]
[[How To/Plugins and Importing Tiddlers]]
[[How To/Preloading New Tiddlers with Boilerplate Contents]]
[[How To/Preserve Spaces]]
[[How To/Resizing Images]]
[[How To/Setting Up TiddlyWiki As a Website]]
[[How To/Synchronize TW files]]
[[How To/Using Tiddler Slices]]
[[How To/Vertical Alignment of Table Cells]]
[[How To]]
[[How_do_I_import_MediaWiki_content_into_a_TiddlyWiki?]]
[[How_To"Wikify"_Iframe_Content]]
[[How_To/Creating_a_Footer]]
[[How_To/HTML_Publication]]
[[How_To/Important_Differences_Between_'Plugins'_and_'Scripts']]
[[How_To/Monochrome_Theme_Modifications]]
[[How_To/Move_the_Sidebar]]
[[How_To/Replacing_Formatters]]
[[How_to]]
[[HTML Templates]]
[[HTMLTemplatePreviewMacro]]
[[I get 'Permission denied to call method XMLHttpRequest.open' when using UploadPlugin or ImportTiddlers]]
[[I keep getting "A script is making this page run slow" in Firefox]]
[[IFramePlugin]]
[[Importing]]
[[Including External Content]]
[[Initial Configuration]]
[[Inserting Pictures]]
[[Internet Explorer]]
[[Introduction]]
[[IPhone]]
[[Is there a WYSIWYG version of TiddlyWiki?]]
[[It's not possible to save changes]]
[[IWantABlog]]
[[Jeremy Ruston]]
[[Keyboard Shortcuts]]
[[Launching_Programs]]
[[List (macro)]]
[[LoggingConsolePlugin]]
[[Macros]]
[[Main Menu]]
[[Main Page]]
[[Markdown]]
[[MediaWiki:Beta Notice]]
[[MediaWiki:Common.css]]
[[MediaWiki:Sitenotice]]
[[MediaWiki:Tagline]]
[[Meta:Community_Portal]]
[[Meta:Policy]]
[[MiniTiddlyServer]]
[[Minor_Changes]]
[[Miscellaneous color recommendations for TiddlyWiki]]
[[MonkeyGTD/(No_Area)]]
[[MonkeyGTD/About_Quick_Add]]
[[MonkeyGTD/Contributing to MonkeyGTD]]
[[MonkeyGTD/Customization Guide]]
[[MonkeyGTD/Customization_Guide/Custom_Project_Classifications]]
[[MonkeyGTD/Customization_Guide/Priority]]
[[MonkeyGTD/Customization_Guide/Waiting_Actions]]
[[MonkeyGTD/Developers_Guide]]
[[MonkeyGTD/Frequently Asked Questions]]
[[MonkeyGTD/Getting_Started]]
[[MonkeyGTD/Keeping_your_MonkeyGTD_up_to_date]]
[[MonkeyGTD/Next_and_Waiting_Actions_by_Context]]
[[MonkeyGTD/Projects_Dashboard]]
[[MonkeyGTD/Reference]]
[[MonkeyGTD/Roadmap]]
[[MonkeyGTD/Some_Basic_Concepts]]
[[MonkeyGTD/Translations]]
[[MonkeyGTD/Upgrading_from_previous_versions]]
[[MonkeyGTD/Users_Guide]]
[[MonkeyGTD]]
[[MonkeyPirateTW]]
[[MPTW]]
[[Multi-Line Contents]]
[[Multi-User Collaboration]]
[[My settings don't get saved]]
[[Named parameters]]
[[Naming a TiddlyWiki]]
[[Navigation Menus]]
[[Navigation_Menus]]
[[NestedSlidersPlugin]]
[[NewJournal (macro)]]
[[NewTiddler (macro)]]
[[On-demand_Loading]]
[[Opening Multiple Tiddlers]]
[[Optimizing Screen Space]]
[[Option_(macro)]]
[[Osmosoft]]
[[Performance Issues]]
[[Permaview_(macro)]]
[[Persistent Options]]
[[Phil Whitehouse]]
[[PhpTiddlyWiki]]
[[Plugin Installation]]
[[Plugin Manager]]
[[Plugin Questions]]
[[Plugin Repositories.]]
[[Plugin Repositories]]
[[Plugin_recommendations]]
[[Plugins]]
[[Popular Plugin Sites]]
[[Prefabs]]
[[Preloading]]
[[PrinceTiddlyWiki]]
[[Printing]]
[[Prism]]
[[Project Ideas]]
[[Project:Community_Portal]]
[[Project:Policy]]
[[Project:Quality]]
[[Question:_Stack_error_overflow_in_IE]]
[[Rc]]
[[Reader Comments]]
[[Read-Only Mode]]
[[Recovery]]
[[Regular_expressions]]
[[Relative Paths]]
[[Reporting Bugs]]
[[Revision History]]
[[RippleRap]]
[[Safe Mode]]
[[SaveButtonMacro]]
[[SaveChanges_(macro)]]
[[Saving the file]]
[[Scripts]]
[[Scripts_]]
[[Search (macro)]]
[[Search]]
[[Security]]
[[Selectively_Displaying_Page_Elements]]
[[Server Adaptor Mechanism]]
[[Server-Side Implementations]]
[[Setup_for_Server-Side_TiddlyWikis]]
[[Shadow Tiddlers]]
[[Showcase]]
[[Sidebar]]
[[Slider (macro)]]
[[Sorting]]
[[Sparkline (macro)]]
[[Special Characters and Symbols]]
[[Special characters are not displaying correctly]]
[[Special:AllPages]]
[[Startup Parameters]]
[[Store]]
[[Style Sheets]]
[[Synchronization]]
[[Syntax]]
[[Syntax_Highlighting]]
[[SystemConfig]]
[[Table of Contents For Individual Tiddlers]]
[[Tables]]
[[Tabs (macro)]]
[[Tag (macro)]]
[[Tag_Cloud]]
[[Tagging (macro)]]
[[Tags (macro)]]
[[Tags]]
[[TeamTasks]]
[[Template:Approved]]
[[Template:Cleanup]]
[[Template:Sidenote]]
[[Template:StatusOK]]
[[Template:StatusOpen]]
[[Template:StatusPending]]
[[TemplateFormatterPlugin]]
[[TemplatePlugin]]
[[Templates]]
[[TemplatingMacrosPlugin]]
[[TextToXMLDOMPlugin]]
[[The default TiddlyWiki color scheme]]
[[Themes]]
[[Tiddler Fields]]
[[Tiddler Sections]]
[[Tiddler Slices]]
[[Tiddler Toolbar]]
[[Tiddler_(macro)]]
[[TiddlerDisplayGroupsPlugin]]
[[Tiddlers]]
[[Tiddler-Specific Styles]]
[[TiddleShopConfigPlugin]]
[[TiddlyChatter]]
[[TiddlyFolio]]
[[TiddlyHome]]
[[TiddlyLock]]
[[TiddlySnip]]
[[Tiddlyspot]]
[[TiddlyTemplating/Creating Templates]]
[[TiddlyTemplating/Customizing_Tiddlers]]
[[TiddlyTemplating/Developers Guide]]
[[TiddlyTemplating/Publishing]]
[[TiddlyTemplating]]
[[TiddlyTemplatingMacro]]
[[TiddlyTimeJournal]]
[[TiddlyTools]]
[[TiddlyWeb]]
[[TiddlyWiki Address Book]]
[[TiddlyWiki As a Website]]
[[TiddlyWiki FAQ]]
[[TiddlyWiki Glossary]]
[[TiddlyWiki has been incorrectly saved]]
[[TiddlyWiki License]]
[[TiddlyWiki Markup/Tiddler]]
[[TiddlyWiki Markup]]
[[TiddlyWiki]]
[[TiddlyWiki_Resources]]
[[Timeline (macro)]]
[[Timeline]]
[[Timestamps]]
[[TinyTiddly]]
[[Tip_of_the_Week/Tips]]
[[Tip_of_the_Week]]
[[Today_(macro)]]
[[Toolbar (macro)]]
[[Toolbar]]
[[Transclusion]]
[[Troubleshooting]]
[[Twitter]]
[[UnaMesa]]
[[Uninstalling]]
[[Upgrading]]
[[Upgrading_your_TiddlyWiki_to_2.1.x]]
[[UploadTextMacro]]
[[URIError:_Malformed_URI_Sequence]]
[[URL Commands]]
[[Use of other languages such as XML, HTML]]
[[User Interface]]
[[User:Bentrem]]
[[User:BidiX]]
[[User:Casablanca]]
[[User:Cdent]]
[[User:EricShulman]]
[[User:FND/Agenda]]
[[User:FND/MediaWiki Skin]]
[[User:FND/MediaWiki]]
[[User:FND/MediaWiki_Skin]]
[[User:FND]]
[[User:Jayfresh]]
[[User:MartinBudden]]
[[User:PhilHawksworth]]
[[User:psd]]
[[User:SimonBaird]]
[[User:TiddlerFiddler/FAQ]]
[[User_talk:FND/MediaWiki_Skin]]
[[Username]]
[[Using TiddlyWiki]]
[[Version (macro)]]
[[Vertical]]
[[View (macro)]]
[[ViewPalette]]
[[Vim]]
[[Visualization]]
[[WebDavPlugin]]
[[What can I do with TiddlyWiki?]]
[[What do I need to run TiddlyWiki?]]
[[What is a macro?]]
[[What is a plugin?]]
[[What is a tiddler?]]
[[What is GTD?]]
[[What is TiddlyWiki?]]
[[Wiki Links]]
[[Wiki Markup]]
[[Wiki Markup]]
[[Wiki_Engines]]
[[Wiki_Links]]
[[Wiki_Markup]]
[[WikiWords]]
[[WikklyText]]
[[Writing]]
[[YourFormBuilder]]
[[YourTimeSheets]]
[[ZiddlyWiki]]
{{Incomplete}}
Startup parameters (also called "paramifiers") are invoked from the URL when opening a [[TiddlyWiki]] document.
They are marked by a preceding hash character (<code>#</code>).
{| class="wikitable"
! Name
! Key
! Description
|-
| permalink
| list of tiddler names
| cf. [[Permaview]], [[Permalink]]
|-
| [[Safe Mode]]
| <code><nowiki>start:safe</nowiki></code>
| opens the document in [[Safe Mode]]
|-
| [[readOnly]] mode
| <code><nowiki>readOnly:[yes|no]</nowiki></code>
| enable or disable [[readOnly]] mode
|-
| display tiddler
| <code>open:[title]</code>
| opens the tiddler with the specified title
|-
| select [[theme]]
| <code>theme:[name]</code>
| selects the specified theme
|-
| display tagged tiddlers
| <code>tag:[name]</code>
| displays tiddlers tagged with the specified tag
|-
| display filtered tiddlers
| <code>filter:[expression]</code>
| displays tiddlers matching the specified [[filter]] expression
|-
| search
| <code>search:[text]</code>
| performs a search for the specified text
|-
| new tiddler
| <code>newTiddler:[title]</code>
| creates a new tiddler with the specified title, opening it in [[edit mode]]
|-
| new journal entry
| <code>newJournal:[dateFormat]</code>
| creates a new journal entry with the specified [[timestamps|date format]]
|}
== External Resources ==
* [http://www.tiddlywiki.com/#StartupParameters StartupParameters]
The store is the collection of [[tiddlers]] in a [[TiddlyWiki]] document.
== Format ==
Within the TiddlyWiki HTML document, tiddlers reside in a <code>DIV</code> element with ID "storeaArea".
Since version 2.2, individual tiddlers use the following format:
<pre>
<div title="$title" created="$timestamp" modified="$timestamp" modifier="$name" tags="$bracketed_list" custom_field="$value">
<pre>$text</ pre>
</div>
</pre>
=== Pure-Store Format ===
Rather than using the full TiddlyWiki Various plugins for [[Including External Content|importing]] and [[Exporting Tiddler Contents|exporting]] use a reduced HTML format with only the ''storeArea'' (i.e. no CSS or JavaScript).
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/3eb348df96aae16a/08e50cd9b2df9fe8?#08e50cd9b2df9fe8 Eric]|2=
<pre>
You need to do two things:
1) enclose your generated output within
<div id="storeArea">
...
</div>
This allows TiddlyWiki to find the tiddler definitions within the
file.
2) "HTML-encode" the tiddler content:
< becomes <
> becomes >
" becomes "
& becomes &
This prevents tiddler content from interfering with the HTML syntax
used to define the store area itself.
Something like this will work:
-------------------------------------------
<div id="storeArea">
<div title="example" tags="one two three"><pre>
<html>
<a href="pic.jpg"><img height="150"
src="pic.jpg" border="0"></a>
</html>
</ pre></div>
</div>
-------------------------------------------
</pre>
}}
* [[StyleSheetColors]]
* [[StyleSheetLayout]]
* [[StyleSheetLocale]]
* [[StyleSheetPrint]]
* [[StyleSheet]]
{{StyleSheetsWarning}}
== See Also ==
* [[HtmlTemplates|HTML Templates]]
[[Category:Shadow Tiddlers]]
[[Category:Portals]]
/***
Place your custom CSS here.
See http://www.w3schools.com/css/css_colors.asp for a color chart.
***/
[[Styles HorizontalMainMenu]]
[[wikipediaStyle]]
[[wikipediaAbridged/Skins-1.5.monobook/main.css]]
[[wikipedia.MediaWiki.Common.css]]
/*{{{*/
.header {background:#007766;}
#mainMenu {background:#007777;}
table.listView {font-size:0.85em; margin:0em 0em 0em 0em;width: 100%}
table.listView th, table.listView td, table.listView tr {padding:0px 0px 0px 0px;}
table.paginated {width:98%}
.paginated {border: 0 none!important;}
.paginated tr , .paginated td{padding:0px 0px 0px 0px!important;}
.pageControl {border: 0 none !important;}
.pageControl td {padding:10px 0px 10px 0px!important;border: 0 none}
.pageControl a {cursor:pointer;cursor:hand; padding:0px 5px 0px 5px;}
.backwardsLinks {align: right; text-align: right;}
.pageSelect {width: 10%}
/*}}}*/
#mainMenu {position:relative;left:auto;width:auto;text-align:left;line-height:normal;padding 0em 1em 0em 1em;font-size:normal;}
#mainMenu br {display:none;}
#mainMenu {background:#336699;}
#mainMenu {padding:2px;}
#mainMenu .button, #mainMenu .tiddlyLink {padding-left:0.5em;padding-right:0.5em;color:white;font-size:115%;}
#displayArea {margin-top:0;margin-right:15.5em;margin-bottom:0;margin-left:1em;padding-top:.1em;padding-bottom:.1em;}
MediaWiki Unplugged is built on TiddlyWiki, an open source project with a lively community. If something's not working, stick a message on the TiddlyWiki Google Group at http://groups.google.com/group/TiddlyWiki
We're running a feature request and bug tracker at http://trac.tiddlywiki.org/
We'd love you to mention this on the web. We've been using #mediawikiunplugged to talk about this on Twitter (http://search.twitter.com/search?q=mediawikiunplugged) and tag photos on Flickr (http://www.flickr.com/search/?w=all&q=mediawikiunplugged&m=tags)
If you iz hacker, read [[this|Hacking MediaWiki Unplugged]].
{{Incomplete}}
[[TiddlyWiki]]'s synchronization feature can be accessed via the [[backstage]]'s ''Sync'' tab.
Synchronization requires that the respective tiddlers are linked to their origin.
This can be achieved by selecting the respective option in the [[ImportTiddlers]] wizard.
== Errors ==
* "sync operation unsupported: si.adaptor.putTiddler is not a function"
{{Quote|1=[http://groups.google.com/group/tiddlywiki/browse_thread/thread/99b67ad4171952ea/7f20527020580e2e?#7f20527020580e2e FND]|2=
The problem here is that sync recognizes there are local changes.
So when synchronizing, it tries to push those changes to the originating
server (otherwise you'd lose your local changes).
However, in your case, the origin is just a TiddlyWiki document - i.e. a
static HTML file - which by its nature cannot accept such changes from
remote clients.
That's why there's no putTiddler method in the built-in FileAdaptor.
The situation would be quite different with most other adaptors*, since
they usually connect to a server-side script which is capable of
processing inputs.
}}
== See Also ==
* [[How To/Synchronize TW files]]
{{Disambiguation}}
* [[Wiki Markup]]
* [[Syntax Highlighting]]
{{Incomplete}}
== Syntaxify ==
* [http://bob.mcelrath.org/syntaxify.html Syntaxify] (v1.2 not compatible with TiddlyWiki v2.4.1)
== SyntaxHighlighterPlugin ==
[[Image:SyntaxHighlighter.jpg|thumb|right|275px|SyntaxHighlighterPlugin]]
(cf. [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/3cb645cd34b92c56 discussion])
=== Installation ===
# [http://fsk141.com/blog/tiddlywiki-syntax-highlighter http://fsk141.com/blog/tiddlywiki-syntax-highlighter]
* Basic install:
- Grab the tiddler files, and import from the link above^
* Manual Install
Download 'syntaxhighlighterplugin.zip' from:
[http://www.coolcode.cn/?action=show&id=310 http://www.coolcode.cn/?action=show&id=310] (look for the link near the top of the page)
or my mirror:
[http://dl.getdropbox.com/u/52078/syntaxhighlighterplugin.zip http://dl.getdropbox.com/u/52078/syntaxhighlighterplugin.zip]
and extract...
Click the New Tiddler link to the left, and Name the tiddler 'StyleSheetSyntaxHighlighter' Navigate to your unzipped archive and cut and paste the contents of 'SyntaxHighlighter.css' into your new tiddler.
Navigate to the Shadow tiddler 'StyleSheet' and add [[StyleSheetSyntaxHighlighter]]
Add another 'New Tiddler' named 'SyntaxHighlighterPlugin' and paste the contents of 'shPlugin.js' into this tiddler, then tag the tiddler with 'systemConfig'
Finish everything up by copying 'clipboard.swf' to the directory of your TiddlyWiki...
=== Examples ===
* Java
<source lang="java">
<code java>
public void printHello(){
System.out.println("Hello World");
}
</code>
</source>
* Python
<source lang="javascript">
<code python>
print "Hello, World!"
</code>
</source>
== CodeFormatter ==
* [http://genisis329.googlepages.com/TWMath.html#CodeFormatter CodeFormatter]
=== CodeFormatter Modifications ===
Below is a modified version of the CodeFormatter plugin, fixing errors and changing keywords and tag to fit SQL code:
<source lang="javascript">
config.formatters.push(
{
keywords : {
"SELECT":"brown",
"WHERE":"brown",
"FROM":"color:brown;font-weight:bold;",
"NULL":"color:brown;",
"AS":"brown",
"WITH":"brown",
"READ":"brown",
"ONLY":"brown",
"DECODE":"darkblue",
"TO_CHAR":"darkblue",
"SUBSTR":"darkblue",
"AND":"darkblue",
"OR":"darkblue",
"|":"mediumvioletred",
"(":"mediumvioletred",
")":"mediumvioletred"
},
match: "<[Ss][Qq][Ll]>\\n",
lookahead: "<[Ss][Qq][Ll]>\\n((?:.|\\n)*?)\\n</[Ss][Qq][Ll]>",
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)
{
var e = createTiddlyElement(w.output, "pre");
var str = lookaheadMatch[1];
var Reg = /(\/\/.*?$)|(\/\*(.|\n)*?\*\/)|['] { 2 } | ( & #39; . *?[^\\] & #39; ) | ["]{2}|(". *? [^\\]")|\w+|[\s\n]+|./mg;
var parts = str.match(Reg);
for(var i = 0; i < parts.length; i++)
{
if(parts[i].match(/^[\s\n]/)) {
parts[i] = parts[i].replace(/\t/g," ").replace(/\n/g," <br/> ").replace(/\r/g,"");
} else if(parts[i].match(/^(?:\/\/)|(?:\/\*)/))
{
parts[i] = " <span style = \"color:green;\">" + parts[i].htmlEncode().replace(/\ \n/g,"<br/>")+" ";
} else if(parts[i].charAt(0)=="\"" || parts[i].charAt(0) == "'")
{
parts[i] = "<span style=\"color:teal;\">" + parts[i].htmlEncode() + "</span>";
} else if(this.keywords[parts[i]])
{
parts[i] = "<span style= \"" + this.keywords[parts[i]] + "\">" + parts[i].htmlEncode() + "</span>";
}
e.innerHTML = parts.join("");
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
}
}
);
</source>
Warning: For large or multiple code sections, Firefox 3.0 is severely slowed.
[[Category:Plugins]]
Tiddlers tagged with "systemConfig" are evaluated on startup.
Generally, this means that these tiddlers contain [[JavaScript]] code that needs to be executed, usually in the form of [[plugins]].
After adding a new plugin, the [[TiddlyWiki]] document needs to be saved and reloaded for the plugin to become active.
== See Also ==
* [[Plugin Installation]]
[[Category:System]]
[[Category:Plugins]]
{{DISPLAYTITLE:systemConfig}}
<<tabs txtMoreTab "OtherPages" "OtherPages" TabOtherPages "Updated" "Updated off line" TabUpdated "Shadowed" "Shadowed tiddlers" TabMoreShadowed>>
{{Incomplete}}
* [http://www.TiddlyTools.com/#SectionLinksPlugin SectionLinksPlugin]
* [http://devpad.tiddlyspot.com/#DcTableOfContentsPlugin DcTableOfContentsPlugin] ([http://groups.google.com/group/TiddlyWiki/browse_thread/thread/2776fc5d78f25f7b/dd8f3cb2820100d9?#dd8f3cb2820100d9 updated by Saq])
* [http://devpad.tiddlyspot.com/#TiddlerToCPlugin TiddlerToCPlugin]
{{Review}}
== Formatting Codes ==
=== Basic Syntax ===
Table columns are delimited by pipe characters (<code>|</code>), while table rows are separated with a simple line break:
<pre>
|!column heading 1|!column heading 2|!column heading 3|h
|row 1, column 1|row 1, column 2|row 1, column 3|
|row 2, column 1|row 2, column 2|row 2, column 3|
|row 3, column 1|row 3, column 2|row 3, column 3|
|!column footer 1|!column footer 2|!column footer 3|f
|caption|c
</pre>
Note that the trailing <code>|h</code> at the end of the first line defines the table header, which is semantically different from the column heading.
Usually, however, the table header will contain the column headings.
=== Text Alignment ===
As the following example shows, spaces before and after a cell's content control the alignment:
<pre>
|default alignment|
|left-aligned cell content |
| right-aligned cell content|
| centered cell content |
</pre>
=== Column Spans ===
A carets (<code>></code>) in a table cell creates a so-called "colspan", spreading the cell across several columns.
Example:
<pre>
|>|>| cell #3 |
</pre>
Here the first two cells are omitted so that the third cell spreads across all three columns.
=== Row Spans ===
A tilde (<code>~</code>) spreads a table cell across several rows, creating a so-called "rowspan".
Example:
<pre>
|cell #1|cell #2|
|~|cell #4|
|~|cell #6|
</pre>
Here the first cell spreads across three rows.
=== Simple Lists ===
TiddlyWiki tables do not easily permit numbered and bulleted lists with formatting.
Using <code><nowiki><br></nowiki></code> for manual line breaks allows the creation of a modest ("fake") list within a cell.
Example:
<pre>
|* List item 1<br>* List item 2<br>* list item 3<br><br>* List item with double-spacing|
</pre>
Bullet points can be used in a table cells only with the help of [[transclusion]] (as described in [[Multi-Line Contents]]).
== Styling ==
=== Inline Styles ===
Custom CSS code can be applied to table cells by adding the CSS ruleset at the beginning of the respective table cell:
<pre>
|property:value;cell contents|
</pre>
There is also an alternative syntax, which deviates slightly from the CSS standard:
<pre>
|property(value);cell contents|
</pre>
=== Custom CSS Classes ===
A table can be assigned a [[Styles|custom CSS class]] by adding the following code to the beginning or end of the table:
<pre>
|foo|k
</pre>
(where "foo" is the name of the custom CSS class)
=== Alternating Rows ===
TiddlyWiki automatically assigns the classes <code>oddRow</code> and <code>evenRow</code> to table rows.
These can then be styled via the [[StyleSheet]] - for example:
<pre>
.viewer tr.oddRow { background-color: #FFF; }
.viewer tr.evenRow { background-color: #FFE; }
</pre>
==== Examples ====
* the following code makes the second cell's contents appear in bold red:
<pre>
|cell #1|font-weight:bold;color:#f00;cell #2|cell #3|
</pre>
* this code changes the first cell's background color to light blue:
<pre>
|bgcolor(#eef):cell #1|cell #2|
</pre>
=== Centering Tables ===
* StyleSheet
<pre style="margin-left: 1em;">
.viewer div.centeredTable {
text-align: center;
}
.viewer div.centeredTable table {
margin: 0 auto;
text-align: left;
}
</pre>
* tiddler contents
<pre style="margin-left: 1em;">
{{centeredTable{
|test1|test2|test3|
|test4|test5|test6|
}}}
</pre>
=== Borderless Tables ===
* StyleSheet
<pre style="margin-left: 1em;">
.viewer table.borderless,
.viewer table.borderless * {
border: 0;
}
</pre>
* tiddler contents
<pre style="margin-left: 1em;">
|borderless|k
|!foo|bar|
</pre>
=== HTML Code ===
Raw HTML code can also be used by wrapping it in <code><html></html></code> tags. This can be useful for setting custom row or cell attributes.
== See Also ==
* [[ Wiki Markup]]
* [[Multi-Line Contents]]
* [[Diagrams]]
[[Category:Wiki Markup]]
{{Review}}
The tabs macro creates an area where it displays one of several tiddlers alternately, as the user clicks on the tab labels at the top.
It is used like this:
<<tabs ID Label1 Tip1 Tiddler1 Label2 Tip2 Tiddler2 [Label3 ...]>>
* ID: specifies the name of a cookie used to save the information about which tab was displayed last.
* Label1, Label2, ... define the labels that are displayed at the top of the area for each tab
* Tip1, Tip2, ... define tooltips that explain, somewhat more verbosely than the labels, what you can expect to find on each tab.
* Tiddler1, Tiddler2, ... name the tiddlers that are displayed on each tab.
Obviously, there must be exactly three strings for each tab.
The syntax for the '''tabs''' macro looks like this:
<pre>
<<tabs txt[cookieName]
"[label]" "[title]" [[tiddler]]
"[label]" "[title]" [[tiddler]]
...
>>
</pre>
(cf. http://tiddlywiki.com/#TabMacro)
[[Category:Macros]] [[Category:Core Macros]]
This built-in macro generates a button with the named [[tag]] which when clicked provides a drop-down list of [[tiddlers]] tagged with the given tag along with an option to open all of the tagged tiddlers.
== Usage ==
<pre>
<<tag tagName [label] [tooltip]>>
</pre>
{{Note|
Both optional parameters (<code>label</code> and <code>tooltip</code>) were introduced in TiddlyWiki v2.4.
}}
== See Also ==
* [[Tags (macro)]]
* [[Tagging (macro)]]
[[Category:Macros]] [[Category:Core Macros]]
A tag cloud plugin is available for TiddlyWiki from TiddlyTools [1]. The plugin also allows the visualization of [[references]] the Tiddlers that are linked to.
==External Links==
[http://www.tiddlytools.com/#TagCloudPlugin TagCloudPlugin]
[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/eaa82fb5ff7a488c/b940a18baa53da2c#b940a18baa53da2c Discussion of the plugin on the Group]
[[Category:Plugins]]
This built-in macro generates a list of [[tiddlers]] that carry the specified [[tag]].
== Usage ==
<pre>
<<tagging [tag]>>
</pre>
If the <code>tag</code> parameter is not specified, the current tiddler's name will be used instead.
== See Also ==
* [[Tag (macro)]]
* [[Tags (macro)]]
[[Category:Macros]] [[Category:Core Macros]]
{{Incomplete}}
== System Tags ==
{{Review|section}}
TiddlyWiki defines a small number of special tags that are used to indicate that tiddlers should be treated differently in some way:
{| class="wikitable"
! systemConfig
| marks tiddlers containing JavaScript code that should be executed on startup (usually [[plugins]] or [[macros]])
|-
! systemConfigDisable
| prevents tiddler contents from being executed on startup (takes precedence over <code>systemConfig</code> and <code>systemConfigForce</code>)
|-
! systemConfigForce
| force tiddler contents to be executed on startup
|-
! systemServer
| indicates that the respective tiddler contains server details for [[importing]]
|-
! systemTheme
| indicates [[themes]]
|-
! excludeSearch
| excludes a tiddler from search results
|-
! excludeLists
| excludes a tiddler from the lists in the sidebar tabs (e.g. [[Timeline]]), as well as from the generated RSS feed
|-
! excludeMissing
| excludes a tiddler from the processing that generates the [[Missing Tiddlers]] list
|}
[[Category:Using TiddlyWiki]]
== Tagging Tags ==
By creating a tiddler named after a given tag (e.g. ''journal''), tags themselves can be tagged as well (e.g. to hide them from the index in the sidebar tabs).
== See Also ==
* [[Tags (macro)|Tags macro]]
This built-in macro generates a list of [[tags]] applied to the current [[tiddler]].
== Usage ==
<pre>
<<tags [tiddler]>>
</pre>
If the <code>tiddler</code> parameter is not specified, the current tiddler will be used instead.
== See Also ==
* [[Tag (macro)]]
* [[Tagging (macro)]]
[[Category:Macros]] [[Category:Core Macros]]
{{Incomplete}}
[[Image:teamtasks_osx_ff_0_4.png|thumb|right|275px|TeamTasks (v0.4)]]
[[Image:TeamTasks.jpg|thumb|right|275px|TeamTasks (v0.3)]]
[http://getteamtasks.com TeamTasks] is a [[TiddlyWiki]] adaptation which provides a simple [[task management]] system.
It is flexible, extensible and can be heavily customized.
[[Category:Adaptations]]
{{Dablink|[[Image:SealOfApproval80.png|80px|Seal of Approval]]
This article meets {{SITENAME}}'s [[Project:Quality|quality standards]].}}<includeonly>[[Category:Approved]]</includeonly><noinclude>
== Usage ==
<pre>{{Approved}}</pre>
[[Category:Templates]]
</noinclude>
{{Note|
This page needs [[Project:Cleanup|cleanup]]. Please help keep [[Meta:About|{{SITENAME}}]] a useful resource by refactoring this page.
}}<includeonly>[[Category:Cleanup]]</includeonly><noinclude>
== Usage ==
<pre>{{Cleanup}}</pre>
See [[:Category:Cleanup]] for pages requiring [[Project:Cleanup|cleanup]].
[[Category:Templates]]
</noinclude>
<!-- default to right-side floating -->
<div style="float: {{ #ifeq: {{{1}}} | left | left | right }};
width: 10%;
margin: 0.2em 0;
margin-{{ #ifeq: {{{1}}} | left | right | left }}: 1em;
border: 1px dashed #000; padding: 5px;
text-align: {{ #ifeq: {{{1}}} | left | left | right }};
background-color: #FFFFE1;">
{{{2}}}
</div><noinclude>
== Usage ==
<pre>
{{Sidenote|left|[text]}}
{{Sidenote|right|[text]}}
</pre>
[[Category:Templates]]
</noinclude>
<span style="margin: 0 0.5em; border: 1px solid #0A0; padding: 1px 4px; font-weight: bold; background-color: #0F0; color: #050;">OK</span><noinclude>
== Usage ==
<pre>{{StatusOK|[author (optional)]|[text]}}</pre>
== See Also ==
* [[Template:StatusOpen|StatusOpen]]
* [[Template:StatusPending|StatusPending]]
[[Category:Templates]] [[Category:Icon Templates]]
</noinclude>
<span style="margin: 0 0.5em; border: 1px solid #AAA; padding: 1px 4px; font-weight: bold; background-color: #EEE; color: #888;">open</span><noinclude>
== Usage ==
<pre>{{StatusOpen|[author (optional)]|[text]}}</pre>
== See Also ==
* [[Template:StatusOK|StatusOK]]
* [[Template:StatusPending|StatusPending]]
[[Category:Templates]] [[Category:Icon Templates]]
</noinclude>
<span style="margin: 0 0.5em; border: 1px solid #BB6; padding: 1px 4px; font-weight: bold; background-color: #FFC; color: #663;">pending</span><noinclude>
== Usage ==
<pre>{{StatusPending|[author (optional)]|[text]}}</pre>
== See Also ==
* [[Template:StatusOK|StatusOK]]
* [[Template:StatusOpen|StatusOpen]]
[[Category:Templates]] [[Category:Icon Templates]]
</noinclude>
{{Plugin
|Name=TemplateFormatterPlugin
|Author=[[User:MartinBudden{{!}}Martin Budden]]
|Description=Plugin to demonstrate template formatter through HTML templates
|Version=0.0.3
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/experimental/TemplateFormatterPlugin.js
* '''License:''' [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike 3.0 License]
* '''TiddlyWiki CoreVersion:''' 2.3
The TemplateFormatterPlugin has been designed to support [[TemplatePlugin]] and indirectly, the [[TiddlyTemplating]] mechanism. It provides a custom formatter for wikifying HTML templates.
[[Category:Plugins]]
{{Plugin
|Name=TemplatePlugin
|Author=[[User:JayFresh{{!}}jayfresh]]
|Description=Collection of functions to support rendering of tiddlers through HTML templates
|Version=0.0.4
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/plugins/TemplatePlugin.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
Installing the TemplatePlugin allows you to render tiddlers through HTML templates. It provides you with the following macros:
* templateTiddlers
* templateTags
In addition, TemplatePlugin defines the following function:
* expandTemplate (this depends on [[TemplateFormatterPlugin]])
TemplatePlugin supports 'TiddlyTemplating', which is described on the [[TiddlyTemplating]] page. This introduces a template-based mechanism for publishing files from a TiddlyWiki (and replacing the core saving mechanism).
== templateTiddlers macro ==
=== Usage ===
<<templateTiddlers template:RssTemplate filter:"[tag[!excludeLists]]">>
<<templateTiddlers RssTemplate filter:"[tag[!excludeLists]]">>
Parameters can be:
* template - the name of the template
* filter - a tiddler filter
* wikitext - if true, renders the target tiddler's text as wikitext instead of using the special template formatter
* raw - if true, adds the HTML to place without encoding it as text
If a parameter does not have a qualifier, it is assumed to be the template name.
=== Description ===
Calling the templateTiddlers collects a set of tiddlers (as returned using the filter string provided) and wikifies the HTML template using each tiddler as the context tiddler. When the special syntax of <!--<<macro>>--> is found in the template, the macro is run. You can use this to nest calls to templateTiddlers as well as run other macros e.g. the view macro.
== templateTags macro ==
=== Usage ===
<<templateTags template:RssItemCategoryTemplate>>
<<templateTiddlers RssTemplate>>
Parameters can be:
* template - the name of the template
=== Description ===
This is much like the templateTiddlers macro, but applies to a single tiddler's tags rather than a set of tiddlers.
[[Category:Plugins]]
{{Disambiguation}}
* [[HTML Templates]]
* [[Transclusion]]
{{Plugin
|Name=TemplatingMacrosPlugin
|Author=[[User:JayFresh{{!}}jayfresh]]
|Description=Some macros used in TiddlyTemplating templates
|Version=0.0.1
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/plugins/TemplatingMacrosPlugin.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
Installing v0.0.1 of the TemplatingMacrosPlugin provides you with the following macro:
* permalink
In addition, the following extensions to the view macros are defined:
* slice
* section
TemplatingMacrosPlugin supports 'TiddlyTemplating', which is described on the [[TiddlyTemplating]] page. This introduces a template-based mechanism for publishing files from a TiddlyWiki (and replacing the core saving mechanism).
== permalink macro ==
Creates a link to a view of the TiddlyWiki with only the enclosing tiddler opened
=== Usage ===
<<permalink>>
== view macro - slice view ==
Allows access to a slice contained within a tiddler
=== Usage ===
<<view text slice MySlice>>
will extract this slice:
|mySlice | slice content |
== view macro - section view ==
Allows access to a section contained within a tiddler
=== Usage ===
<<view text section mySection>>
will extract this section:
!mySection
blah blah
!end of mySection
{{Plugin
|Name=TextToXMLDOMPlugin
|Author=[[User:PhilHawksworth{{!}}Phil Hawksworth]]
|Description=Convert a chunk of text into XML DOM for traversing using standard XML DOM methods
|Version=0.2
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/plugins/TextToXMLDOMPlugin.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
* '''JSSpec test script:''' http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/tests/jsspec/TextToXMLDOMPlugin.jsspec.js
==Usage examples:==
*Create an XMLDOM object from some text
var xml = getXML(text);
*Use standars XML DOM methods to parse the object. For example, get all of the 'thing' tag elements.
var things = xml.getElementsByTagName("thing");
*Get the uri attribute of the first 'thing' element.
var thingUri = things[0].getAttribute("uri");
The following is a list of the color terms used by TiddlyWiki and the sections of TiddlyWiki that are controlled by each term in the default color scheme.
'''Background:''' controls the color of the background or 'paper', and the text in the title and subtitle.
'''Foreground:''' controls the color of the text.
'''PrimaryPale:''' controls the color of the Interface Options box.
'''PrimaryLight:''' controls the color of the top of the Header gradient.
'''PrimaryMid:''' controls the color of the text in the MainMenu, the color of the text for links, the color of the text in the lists of tiddlers and tags, and the color of the bottom of the Header gradient.
'''PrimaryDark:''' controls the color of the text of the items in the top of the right hand menu and the text of the buttons on the tiddlers.
'''SecondaryPale:''' controls the color of the background of the boxes in those tiddlers that show snippets of the TiddlyWiki code.
'''SecondaryLight:''' controls the color that appears when the tiddler buttons or items in the right hand menu are highlighted.
'''SecondaryMid:''' controls the color of the title cells in tables, that is, cells which begin with an exclamation mark (!). It also controls the color of the box that appears when changes have been saved, and the color of the tiddler buttons when they are selected.
'''SecondaryDark:''' controls the color of the titles of the tiddlers.
'''TertiaryPale:''' controls the color of the right hand menu that shows lists of tags and tiddlers, as well as the color of the tag button on the tiddlers.
'''TertiaryLight:''' controls the color of the borders around the right hand menus.
'''TertiaryMid:''' controls the color of the unselected tabs behind the list of tags and tiddlers in the bottom right hand menu.
'''TertiaryDark:''' controls the color of the subtitle of each tiddler, that is, the author of the tiddler, the most recent date it was modified and date it was created.
|''Name:''|TiddlyTweetsTheme|
|''Description:''|Simple theme for TiddlyTweets|
|''Author:''|Jonathan Lister (jnthnlstr (at) googlemail (dot) com)|
|''~CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/verticals/FNDTiddlyTweets/content/TiddlyTweetsTheme.tiddler |
|''Version:''|0.5|
|''Date:''|Mar 4, 2009|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]] |
|''~CoreVersion:''|2.4.0|
|''~StyleSheet:''|##StyleSheet|
|''~PageTemplate:''|##PageTemplate|
|''~ViewTemplate:''|##ViewTemplate|
!StyleSheet
/*{{{*/
/* wikitable/prettytable class for skinning normal tables */
table.wikitable,
table.prettytable {margin:1em 1em 1em 0;border:1px #aaaaaa solid;border-collapse:collapse;}
table.wikitable th, table.wikitable td,
table.prettytable th, table.prettytable td {border:1px #aaaaaa solid;padding:0.2em;}
table.wikitable th,
table.prettytable th {text-align:center;}
table.wikitable caption,
table.prettytable caption {margin-left:inherit;margin-right:inherit;}
.allpagesredirect {font-style:italic;}
/* Infobox template style */
.infobox {
border:1px solid #aaaaaa;
color:black;
margin-bottom:0.5em;
margin-left:1em;
padding:0.2em;
float:right;
clear:right;
}
.infobox td,
.infobox th {vertical-align:top;}
.infobox caption {font-size:larger;margin-left:inherit;}
.infobox.bordered {border-collapse:collapse;}
.infobox.bordered td,
.infobox.bordered th {border:1px solid #aaaaaa;}
.infobox.bordered .borderless td,
.infobox.bordered .borderless th {border:0;}
.infobox.sisterproject {width:20em;font-size:90%;}
table.listView {font-size:0.85em; margin:0em 0em 0em 0em;width: 100%}
table.listView th, table.listView td, table.listView tr {padding:0px 0px 0px 0px;}
table.paginated {width:98%}
.paginated {border: 0 none!important;}
.paginated tr , .paginated td{padding:0px 0px 0px 0px!important;}
.pageControl {border: 0 none !important;}
.pageControl td {padding:10px 0px 10px 0px!important;border: 0 none}
.pageControl a {cursor:pointer;cursor:hand; padding:0px 5px 0px 5px;}
.backwardsLinks {align: right; text-align: right;}
.pageSelect {width: 10%}
/* Removes useless links from printout */
@media print {#privacy, #about, #disclaimer {display:none;}}
.plainlinksneverexpand a {background:none !important; padding:0 !important}
/* log formatting */
.logtable pre {margin:0;padding:0;border:0;}
#title {
font-variant: small-caps;
font-size: 4em;
margin-left: 1em;
margin-top: 0;
padding-top: 0.3em;
border-bottom: 0;
}
div.header {
margin:0em 17em 0 14em;
}
div.headerShadow {
color: #DF4141;
}
#displayArea,
div.header {
margin-left: 17em;
}
div.logo {
position: absolute;
top: 15px;
right: 35px;
z-index: 2;
}
.headerForeground {
padding-top: 2em;
}
#displayArea{
margin-left: 1em;
#background-color:#EEEEEE ;
# #border:2px solid #888;
border: 0px;
# -moz-border-radius:5px;
# -webkit-border-radius:5px;
padding: 2em;
}
.tiddler {
margin-left: 1em;
margin-bottom: 1em;
background-color:#EEEEEE ;
border:2px solid #888;
-moz-border-radius:5px;
-webkit-border-radius:5px;
padding: 2em;
}
#tiddlerDisplay {
background-color: white;
# border:2px solid #888;
-moz-border-radius:5px;
-webkit-border-radius:5px;
}
div.viewer {
font-size: 1.2em;
line-height: 1.6em;
}
.viewer pre {
background:#C8C8FF none repeat scroll 0 0;
border:1px solid black;
}
#backstageButton {
display:none;
}
.wizard {
background-color:#eeeeee;
border:2px solid #888;
-moz-border-radius:5px;
-webkit-border-radius:5px;
padding: 2em;
}
.mediawikiwizard {
position:absolute;
right: 10px;
top: 100px;
}
.wizard > h1 {
display: none;
}
.wizardBody h2 {
line-height: 2em;
}
.wizardBody h2:after {
content: ":";
}
.wizardFooter {
background-color:#eeeeee;
border:none;
}
.wizardFooter .button,
.button,.toolbar a {
background-color: rgb(2,72,196);
color: #fff;
padding: 5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border:none;
border-bottom: 1px solid #000;
border-right: 1px solid #000;
}
#tiddlerTwitterBackupWizard {
padding: 0em;
}
#tiddlerThemeSwitcher div.viewer .button {
font-size: 1.2em;
line-height: 1.6em;
padding: 5px;
border:none;
border-bottom: 1px solid #000;
border-right: 1px solid #000;
}
#tiddlerThemeSwitcher div.viewer .button:hover,.toolbar a:hover
div.wizardFooter .button:hover {
background-color: #3875D7;
color: #fff;
border:none;
border-bottom: 1px solid #000;
border-right: 1px solid #000;
}
.wizardStep {
border-color:#4D294D;
padding: 1em;
margin-bottom: 1em;
}
.progress {
background-color: #8A2BE2;
display: block;
height: 2em;
margin-bottom: -2em;
width: 0%;
}
/* GrowlStyle Message Area */
#messageArea {
border:none;
background: transparent;
}
#messageArea .messageBox {
border:2px solid #888;
color: #000;
background-color:#eeeeee;
width:20em;
padding:10px;
margin-top:5px;
margin-bottom:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
filter:alpha(opacity=80);
}
#messageArea .messageText {
display:block;
width:15em;
margin:0;
padding:0;
}
#messageArea .messageClear {
display:block;
float:right;
width:1em;
}
#messageArea .messageClear a {
text-decoration:none;
background-color: transparent;
color:[[ColorPalette::Foreground]];
}
.title {color:black;}
.SideBar {background-color:#0248C4; margin-top: 10px;
border:2px solid #888;
-moz-border-radius:5px;
-webkit-border-radius:5px;
margin-right: 3em;
position: absolute;
right: 0px;
top: 130px;
}
.tabset {float:right;}
.wizardMessageBar {
background-image:
}
.SideBar #sidebarOptions a {
color: white;
}
.SideBar #sidebarTabs div {
display: inline-block;
}
.chunkyButton {
display: block;
padding: 0;
margin: 0 4em;
border: solid 2px #000;
}
.chunkyButton a, .chunkyButton a:active {
white-space: nowrap;
font-weight: bold;
font-size:1.8em;
color: #fff;
background-color: #04b;
text-align: center;
padding: 1em 3em;
margin: 0;
border-style: none;
border-top: solid 1px #fff;
display: block;
}
.chunkyButton a:hover {
background-color: #014;
border-style: none;
color: #fff;
border-top: solid 1px #8cf;
}
/*}}}*/
!ViewTemplate
<!--{{{--->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
!PageTemplate
<!--{{{-->
<h1 id="title">MediaWiki Unplugged</h1>
<div class='logo'><img src="images/logo.png"/></div>
<div id='sidebar' class='SideBar'>
<div id='sidebarOptions' macro='tiddler SideBarOptions'></div>
<div id='sidebarTabs' macro='tiddler SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<div id='footer' refresh='content' tiddler='SiteFooter'></div>
<!--}}}-->
{{Review}}
== Themes ==
[http://www.tiddlythemes.com TiddlyThemes] provides a collection of TiddlyWiki themes.
=== Outdated Themes ===
This section contains a collection of older themes which most likely are not fully compatible with the latest version of TiddlyWiki.
These serve as inspiration for potential designers, and might also be updated by dedicated volunteers:
* [http://www.skinyourscreen.com/mrbiotech/tiddlywiki/ mrbiotech]
== Theme-Switching ==
{{Incomplete|section}}
Since [[TiddlyWiki]] 2.3.0, the core has built-in support for switching themes.
Apart from the <code>theme</code> [[startup parameter]], [http://www.tiddlytools.com/#SwitchThemePlugin SwitchThemePlugin] or [http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/plugins/ThemeBackstagePlugin.js ThemeBackstagePlugin] can be used for selecting a theme.
Alternatively, a simple plugin can be created to persistently select a certain theme on startup:
{{tiddler|1=[[ConfigTweaks]]|2=
config.options.txtTheme = "SampleTheme";
|3=systemConfig
}}
(whereas ''SampleTheme'' is the name of the desired theme)
== Creating Themes ==
{{tiddler|1=[[SampleTheme]]|2=
<pre>
|''Name''|SampleTheme|
|''Description''|a sample theme|
!Author Mode
|PageTemplate|PageTemplate|
|ViewTemplate|ViewTemplate|
|EditTemplate|EditTemplate|
|StyleSheet|StyleSheet|
|ColorPalette|ColorPalette|
!Read-Only Mode
|PageTemplateReadOnly|PageTemplate|
|ViewTemplateReadOnly|ViewTemplate|
|EditTemplateReadOnly|EditTemplate|
|StyleSheetReadOnly|##StyleSheet|
|ColorPalette|ColorPalette|
!StyleSheet
/*{{{*/
#sidebarTabs {
display: none;
}
/*}}}*/
</pre>
|3=systemTheme
}}
Theme slices can either reference tiddlers, or [[sections]] within a tiddler. To reference a section within the current tiddler, the tiddler name is omitted.
{{Quote|1=Saq|2=
There are two main components of a theme, the [[PageTemplate]] and the [[StyleSheet]].
The PageTemplate determines the DOM structure of the page. So if you want to add an extra div or remove something, thats where you go. You can completely redefine the structure of the page by editing the PageTemplate.
PageTemplate, StyleSheetLayout and StyleSheetColors are shadow tiddlers. This means that they are backup tiddlers with predefined values, and dont show up in the Timeline. You can create a new tiddler with the same name as a shadow tiddler, and it will effectively replace the shadow. When you delete that new tiddler, the shadow will come back. Check out the shadow tiddlers tab under the More tab in the sidebar.
The StyleSheet is where you can type in your custom css. But please note that this css is applied in addition to and over the StyleSheetLayout and StyleSheetColors tiddlers. So quite often its not as simple as just writing in the css rules you want, but you also have to overwrite the existing rules that you don't want.
The StyleSheet is loaded after the default styles.
Any changes to StyleSheet and PageTemplate are upgrade proof, as explained above.
You can definitely just edit the StyleSheetColors and StyleSheetLayout tiddlers and make your changes there, but most people prefer to write their css into the StyleSheet tiddler because:
1) smaller file size: lets say you edit the StyleSheetColors just to add one line, you are still saving an entire second copy of the whole tiddler.
2) its convenient to have all your changes in one tiddler for future tweaking
3) its easier to share themes when they are spread out across fewer tiddlers
4) Theme switching plugins dont always place nice with themes that contain custom versions of StyleSheetColors and StyleSheetLayout
If none of those are a concern for you, but all means just edit those tiddlers. It might prove a nice way to get started customizing TW without getting overwhelmed.
Since you cant delete a shadow tiddler, the only way to 'nullify' it is to create an empty tiddler with the same name and 'overwrite' it.
In the StyleSheetColors tiddler you will see references like
<nowiki>background: [[ColorPalette::Background]];</nowiki>
What's happening here is that its using the color hex value defined as the Background color on the ColorPalette tiddler. Have a look at the tiddler and you'll see it just defines a bunch of colors. You can change the colors by either changing the color palette, or just directly writing the new color into the stylesheet, ie:
background: #fff;
Also, if you find it too frustrating to have to overwrite the default TW styles and feel comfortable starting from scratch, a quick fix would be to create empty tiddlers with the titles StyleSheetColors and StyleSheetLayout
}}
[[Category:Customization]]
{{Plugin
|Name=TiddleShopConfigPlugin
|Author=[[User:JayFresh{{!}}jayfresh]]
|Description=[[IWantABlog]]-specific config
|Version=1
}}
* '''CodeRepository:'''
http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/verticals/TiddleShop/plugins/TiddleShopConfigPlugin.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
TiddleShopConfigPlugin contains no macros or other methods. The plugin sets up initial values for cookies and adds an entry into the config.relationships object created by [[ListRelatedPlugin]].
{{Incomplete}}
== TiddlyWiki as a Database ==
To appreciate the power and versatility of TiddlyWiki, it is helpful to understand TiddlyWiki as a versatile relational database, with a [[JavaScript]] engine, and a data warehouse within which each tiddler is a data record with a set of fields. Fields may be generated by the TiddlyWiki core engine, by [[Plugins|plugins]] or by other means.
== Default Fields ==
* '''Title''': unique title of the tiddler
* '''Modifier''': author/editor (corresponds to the current [[username]])
* '''Modified''': last-modified date/time (12-digit number with the [[Timestamps|format]] <code>YYYY0MM0DD0hh0mm</code>)
* '''Created''': date/time the tiddler was created (12-digit number with the [[Timestamps|format]] <code>YYYY0MM0DD0hh0mm</code>)
* '''Tags''': a set of space-separated keywords ([[tags]]), enclosed in square brackets (<code><nowiki>[[...]]</nowiki></code> if the tag contains a space
* '''Tiddler Body''': contains textual content
The title field is a tiddler's unique identifier, so there cannot be two tiddlers with identical titles.
== Additional Core Fields ==
There are additional fields that are or can be generated by the Tiddler
* <code>changecount</code>
:: The first time you edit and save an existing tiddler, a [[changecount]] field is created, with an initial value of 1
:: Each subsequent time you edit the tiddler, the value of [[changecount]] is incremented by 1
* [[Server Fields]]
:: When you [[Import Tiddlers|import tiddlers]] with the built-in [[ImportTiddlers]] function and you leave the Checkbox for:
::: "''Keep these tiddlers linked to this server so that you can synchronise subsequent changes''"
:: selected, the following [[Server Fields|server fields]] will be added to the imported tiddlers:
{| class="wikitable" style="margin-left: 3em;"
|-
| <code>server.type</code>
| [[adaptor]] (usually <code>http</code> or <code>file</code>)
|-
| <code>server.host</code>
| originating URL
|-
| <code>server.workspace</code>
| [[workspace]]
|-
| <code>server.page.revision</code>
| last update ([[Timestamps|format]]: <code>YYYY0MM0DD0hh0mm</code>)
|}
* <code>doNotSave</code>
:: used for [http://trac.tiddlywiki.org/ticket/313 temporary tiddlers] which are not persistent (not saved to file)
== Storage of Tiddler Fields ==
Within TiddlyWiki's store area, each tiddler is recorded in the following format:
<pre>
<div title="Tiddler Title" modifier="Author/Editor" modified="YYYY0MM0DD0hh0mm" created="YYYY0MM0DD0hh0mm" tags="foo bar [[lorem ipsum]]">
<pre>Body of the tiddler<\/pre>
</div>
</pre>
== Extended Fields ==
In addition to the TiddlyWiki core fields, it is possible to add [[extended fields]].
{{Incomplete}}
== See Also ==
* [[Tiddler Slices]]
* [[Transclusion#Partial Transclusion|Partial Transclusion]]
{{Incomplete}}
TiddlerSlicing is a special notation to pull out a chunk of specially-marked text from within a tiddler.
Each slice is a line consisting of a name-and-value pair, which can be specified anywhere within a tiddler, in any of these formats:
<pre>
theName: textSlice
|theName:| textSlice |
|theName| textSlice |
</pre>
The name may contain any of the characters <code>a-z</code>, <code>A-Z</code>, <code>_</code> and <code>0-9</code>.
It may also be formatted using [[Wiki Markup]] (bold and/or italic), which is ignored when retrieving the data.
{{Note|TiddlerSlicing does not work everywhere; at this point, it is mainly intended to support the [[ColorPalette|ColorPalette]] and similar usages.}}
== Retrieval ==
There are two basic way to retrieve tiddler slices:
* using the <code><nowiki>[[Tiddler::Slice]]</nowiki></code> notation (only works in tiddlers evaluated by TiddlyWiki, e.g. [[PageTemplate|PageTemplate]])
* using the tiddler macro: <code><nowiki><<tiddler [[tiddlerName::sliceName]]>></nowiki></code>
== Example ==
<pre>
|''theName:''| textSlice |
</pre>
Slices can then be referenced by qualifying the parent tiddler name with the symbols <code>::</code> and the name of the slice:
<pre>
theTiddler::theName
</pre>
== See Also ==
* [[Tiddler Sections]]
* [[Transclusion#Partial Transclusion|Partial Transclusion]]
The tiddler toolbar contains a list of commands related to individual tiddler (e.g. edit, or [[permalink]]).
Toolbar commands are defined in the [[ToolbarCommands]] [[shadow tiddler]].
{{Note|
Before TiddlyWiki v2.4.0, the toolbar commands were defined directly in the [[ViewTemplate]], as well as in the [[EditTemplate]], which is where the [[Toolbar (macro)|Toolbar macro]] resides.
}}
== Toolbar Commands ==
{| class="wikitable"
! Command || Description
|-
| <code>closeTiddler</code> || Close this tiddler
|-
| <code>closeOthers</code> || Close all other tiddlers
|-
| <code>editTiddler</code> || Edit this tiddler
|-
| <code>saveTiddler</code> || Save changes to this tiddler
|-
| <code>cancelTiddler</code> || Undo changes to this tiddler
|-
| <code>deleteTiddler</code> || Delete this tiddler
|-
| <code>permalink</code> || Permalink for this tiddler
|-
| <code>references</code> || Show tiddlers that link to this one
|-
| <code>jump</code> || Jump to another open tiddler
|-
| <code>syncing</code> || Control synchronization of this tiddler with a server or external file
|-
| <code>fields</code> || Show the extended fields of this tiddler
|}
=== Special Symbols ===
{| class="wikitable"
! Symbol || Purpose
|-
| <code>+</code> || marks the default action (invoked when double-clicking a tiddler)
|-
| <code>-</code> || marks the cancel action (invoked when the <code>ESC</code> key is pressed)
|-
| <code>></code> || creates the ''More'' button; any items following this definition will only show up after clicking on the ''More'' button in the toolbar
|}
== See Also ==
* [[Toolbar (macro)]]
{{Approved}}
== Active Tiddlers ==
Tiddlers under the mouse pointer are automatically assigned the class <code>selected</code>.
Thus active tiddlers can be [[StyleSheet|styled]] differently - for example by changing the color of the [[tiddler toolbar]]:
<pre>
.toolbar {
color: #EEE; /* light gray */
}
.selected .toolbar {
color: #888; /* dark gray */
}
</pre>
== Individual Tiddlers ==
There are several methods to apply additional styles to a particular tiddler's contents.
=== Using Tiddler IDs ===
The [[Tiddlers#Tiddler IDs|Tiddler ID]] can be used for styling individual tiddlers' contents.
The following example will make all links inside the "GettingStarted" tiddler appear in red:
<pre>
#tiddlerGettingStarted a {
color: #f00;
}
</pre>
{{Note|
If the tiddler name contains spaces, each space must be escaped (replaced with <code>\000020</code>):
<pre>
#tiddlerNew\000020Tiddler a {
color: #f00;
}
</pre>
To prevent hex digits (0-9, A-F) after the space in the respective tiddler's name from being treated as part of the escape, CSS syntax requires either six hex digits in the escape as shown above, or inserting <code>\20</code> with a single trailing whitespace as shown below:
<pre>
#tiddlerNew\20 Tiddler a {
color: #f00;
}
</pre>
In both cases, the tiddler being styled here has the name "New Tiddler".
}}
=== Using a CSS Class Wrapper ===
By wrapping ''all'' of the respective tiddler's contents in a [[TiddlyWiki Markup#Custom Styling|custom CSS container]], the contents can then be styled by accessing this class from within [[StyleSheet]]:
<pre>
.className {
color: #F00;
}
</pre>
=== Using Raw HTML ===
As an alternative method for organizing tiddler-specific styles, instead of adding the respective CSS code to [[StyleSheet]], these styles could also be defined directly within the respective tiddler:
<pre>
<html>
<style type="text/css">
.className {
font-size: 1.2em;
}
</style>
</html>
</pre>
{{Note|Styles defined inside a tiddler will also apply to the entire TW document.}}
[[Category:Customization]]
/***
|''Name:''|TiddlerAliasPlugin|
|''Version:''|1.0.0 BETA 4 (2009-03-30)|
|''Source:''|http://tiddlywiki.abego-software.de/Beta.html#TiddlerAliasPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|© 2009 [[abego Software|http://www.abego-software.de]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.5.0.7 or better; InternetExplorer 6.0|
!Description
Reference a tiddler through an alias (or even through many aliases). E.g. a tiddler "William Shakespeare" may also be referenced as {{{[[Shaxper]]}}}.
When editing a tiddler you may enter alternative names for the tiddler in the "Alias" field (below the tags field), similar to the way you enter tags. You may even specify multiple alias names, separated by spaces. Alias names containing spaces must be written as {{{[[...]]}}}
Also this plugin implements the "Auto Non-Space Alias" feature: for tiddlers with titles containing whitespaces an alias is automatically created that has every whitespace replaced by a dash ("-"). E.g. a tiddler called [[Tiddler with no alias defined]] can also be referenced by [[Tiddler-with-no-alias-defined]].
!Revision history
* v1.0.0 Beta 4 (2009-03-30)
** Bugfix: ToggleLinks does not work when TiddlerAliasPlugin is installed (Thanks to Jonnan West for reporting the bug)
* v1.0.0 Beta 3 (2006-09-23)
** Support "Auto Non-Space Alias" feature: For tiddler with titles containing whitespaces an alias is automatically created that has every whitespace replaced by a dash ("-")
* v1.0.0 Beta 2 (2006-09-22)
** Bugfix: Tiddler is displayed more than once when opened both through title and alias (Thanks to KenGirard for reporting)
* v1.0.0 Beta 1 (2006-09-21)
** Beta 1 release
!Code
***/
//{{{
//============================================================================
//============================================================================
// TiddlerAliasPlugin
//============================================================================
//============================================================================
// Only install once
if (!version.extensions.TiddlerAliasPlugin) {
version.extensions.TiddlerAliasPlugin = {
major: 1, minor: 0, revision: 0, beta: 4,
date: new Date(2009,2,30),
source: "http://tiddlywiki.abego-software.de/Beta.html#TiddlerAliasPlugin",
licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
copyright: "Copyright (c) abego Software GmbH, 2005-2009 (www.abego-software.de)"
};
(function() {
window.abegoTiddlerAlias = {
lingo: {
aliasPrompt: "Type alias names (i.e. alternative names for this tiddler) separated with spaces, [[use double square brackets]] if necessary"
},
editTemplateExtension: "<div class='editor' macro='edit alias'></div><div class='editorFooter'><span macro='message abegoTiddlerAlias.lingo.aliasPrompt'></span></div>"
};
var oldFetchTiddler;
var oldSaveTiddler;
var oldDisplayTiddler;
var fWithAutoNonSpaceAlias = true;
function withAutoNonSpaceAlias() {
return fWithAutoNonSpaceAlias;
}
function addNonSpaceAlias(map, title) {
var s = title.replace(/\s/g,"-");
if (s != title)
map[s] = title;
}
function calcAliases() {
var result = {};
store.forEachTiddler(function(title,tiddler) {
var s = store.getValue(tiddler,"alias");
if (s) {
var p = s.parseParams("list",null,false,true);
for(var i=1; i<p.length; i++)
result[p[i].value] = title;
}
if (withAutoNonSpaceAlias())
addNonSpaceAlias(result,title);
});
return result;
}
// Returns a map that maps an alias name to the title of the tiddler
abegoTiddlerAlias.getAliases = function() {
if (!store.aliases)
store.aliases = calcAliases();
return store.aliases;
}
// Returns the title of the tiddler for the given alias.
// When no such alias is defined but a tiddler with that name exists the alias is returned.
// Otherwise null is returned.
abegoTiddlerAlias.getAliasTitle = function(alias) {
var t = abegoTiddlerAlias.getAliases()[alias];
return t ? t : (store.fetchTiddler(alias) ? alias : null)
}
function hasEditTemplateExtension(s) {
return s.indexOf(abegoTiddlerAlias.editTemplateExtension) >= 0;
}
function addEditTemplateExtension(s) {
if (s && !hasEditTemplateExtension(s)) {
var i = s.lastIndexOf("</div>");
if (i >= 0)
return s.slice(0,i+6)+"\n"+abegoTiddlerAlias.editTemplateExtension+s.slice(i+6);
}
return null;
}
function hijackFetchTiddler() {
oldFetchTiddler = store.fetchTiddler;
store.fetchTiddler = function(title) {
var result = oldFetchTiddler.apply(this, arguments);
if (!result && title) {
title = abegoTiddlerAlias.getAliases()[title];
if (title)
result = oldFetchTiddler.apply(this, [title])
}
return result;
};
}
function hijackSaveTiddler() {
oldSaveTiddler = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function() {
var result = oldSaveTiddler.apply(this, arguments);
delete store.aliases;
return result;
}
}
function hijackDisplayTiddler() {
oldDisplayTiddler = Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,title,template,animate,slowly,customFields,toggle,animationSrc) {
// Ensure that a tiddler is always opened with its "original" title (not an alias)
var tiddler = store.fetchTiddler(title);
if (tiddler)
title = tiddler.title;
return oldDisplayTiddler.apply(this, [srcElement,title,template,animate,slowly,customFields,toggle,animationSrc]);
}
}
function modifyEditTemplate() {
// The shadow tiddler
var s = addEditTemplateExtension(config.shadowTiddlers["EditTemplate"]);
if (s)
config.shadowTiddlers["EditTemplate"] = s;
// The "real" tiddler (if defined)
var t = store.getTiddler("EditTemplate");
if (t && !hasEditTemplateExtension(t.text))
t.set(null,addEditTemplateExtension(t.text));
}
// Requires store is defined.
function doHijacking() {
hijackFetchTiddler();
hijackSaveTiddler();
hijackDisplayTiddler();
modifyEditTemplate();
}
// for debugging the plugin is not loaded through the systemConfig mechanism but via a script tag.
// At that point in the "store" is not yet defined. In that case hijackFetchTiddler through the restart function.
// Otherwise hijack now.
if (!store) {
var oldRestartFunc = restart;
window.restart = function() {
doHijacking();
oldRestartFunc.apply(this,arguments);
};
} else
doHijacking();
// To support the access through the "message" macro
config.abegoTiddlerAlias = abegoTiddlerAlias;
})();
} // of "install only once"
/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
//}}}
{{Plugin
|Name=TiddlerDisplayGroupsPlugin
|Author=[[User:PhilHawksworth{{!}}Phil Hawksworth]]
|Description=Display groups of tiddlers in the story according to defined template.
|Version=0.1
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/plugins/TiddlerDisplayGroupsPlugin.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.4 (beta1)
* '''JSSpec test script:''' http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/tests/jsspec/TiddlerDisplayGroupsPlugin.jsspec.js
== Usage Examples ==
* Create a template definition object
var test_group = new TiddlerDisplayGroup();
* Declare a template for use with this grouping
var test_pattern = [
{label:'header', tag:'session', count:1, require:null, openAt:null},
{label:'mynote', tag:'notes', count:1, require:'header', openAt:null},
{label:'notes', tag:'discovered_notes', count:0, require:'header', openAt:'bottom'}];
test_group.setPattern(test_pattern);
* Assign a tiddler field to establish groups of tiddlers
test_group.setGroupField('rr_session_id');
{{Review}}
The <<tiddler TiddlerTitle>> macro will insert the contents of the Tiddler identified by TiddlerTitle, into the current Tiddler.
For example.
TiddlerTitle: TiddlerOne
TiddlerContents: This is Tiddler One!
If you have another tiddler...
TiddlerTitle: TiddlerTwo
TiddlerContents: This is Tiddler two and here is the contents of Tiddler One : <<tiddler TiddlerOne>>
The resulting display would be
This is Tiddler two and here is the contents of Tiddler One : This is Tiddler One!
See also [[Getting_started_with_custom_macros]]
== See Also ==
* [[Transclusion]]
[[Category:Macros]] [[Category:Core Macros]]
A tiddler is the name given to a unit of [[micro-content]] in [[TiddlyWiki]].
Tiddlers are primarily created and rendered in the content panes at the center of the TiddlyWiki page.
Tiddlers are pervasive in TiddlyWiki. The MainMenu is defined by a tiddler, plugins are delivered in tiddlers, there are special StyleSheet tiddlers, and so on.
Other systems have analogous concepts with more prosaic names (e.g. "items", "entries", "entities").
According to [[Jeremy Ruston]], even though "tiddler" is undoubtedly a silly name, it at least has the virtue of being confusingly distinctive rather than confusingly generic.
== Structure ==
Each tiddler includes a basic set of [[Tiddler Fields|fields]]:
* '''Title''': unique title of the tiddler
* '''Modifier''': author/editor (corresponds to the current [[username]])
* '''Modified''': last-modified date/time (12-digit number with the [[Timestamps|format]] <code>YYYY0MM0DD0hh0mm</code>)
* '''Created''': date/time the tiddler was created (12-digit number with the [[Timestamps|format]] <code>YYYY0MM0DD0hh0mm</code>)
* '''Tags''': a set of space-separated keywords ([[tags]]), enclosed in square brackets (<code><nowiki>[[...]]</nowiki></code>) if the tag contains a space
* '''Tiddler Body''': contains textual content
The title field is a tiddler's unique identifier, so there cannot be two tiddlers with identical titles.
== Shadow Tiddlers ==
Shadow tiddlers are "preloaded" with default contents.
See [[Shadow Tiddlers]].
== Tiddler IDs ==
Every tiddler element has a unique identifier.
This ID is composed of the string "tiddler" and the tiddler's name (e.g. <code>tiddlerGettingStarted</code>).
Also see [http://trac.tiddlywiki.org/ticket/472 ticket #472].
== See Also ==
* [[Shadow Tiddlers]]
* [[Tiddler Toolbar]]
* [[Tiddler-Specific Styles]]
[[Category:Basics]]
{{Incomplete}}
cf. [http://wordpress.com/tag/tiddlychatter/ JayFresh's blog]
[[Category:Adaptations]]
[http://tiddlyfolio.tiddlyspot.com/download TiddlyFolio] is an "electronic wallet" for storing passwords and other confidential information.
{{Quote|1=[http://wombatdiet.net/2007/10/26/introducing-the-wiki-wallet-tiddlyfolio/ Eats Wombats]|2=
[[Image:login.gif|thumb|right|200px]]
Got too many passwords? Keeping track of them all can be a headache. I have over 200 and the number grows inexorably.
Ever lost your wallet or had it stolen? Can you, without looking, make a detailed list of everything that’s in it so that you can make a loss report, cancel your credit cards and begin getting replacements for everything you need? ''Can you do it in seconds?''
TiddlyFolio is a single HTML file in the form of an electronic wiki wallet for secure storage of key information, ideally suited to living on a USB memory stick on your key ring. You may also synchronize the encrypted contents with a free web site hosted at TiddlySpot.com; instructions in the file.
}}
'''Update:''' TiddlyFolio is a useful complement to Lastpass (http://www.lastpass.com).
Use lastpass for automatically filling in usernames and passwords (they're stored in encrypted form online, having been encyrypted locally), but export your passwords from lastpass to TiddlyFolio for backup and keep those passwords you don't ever want online in TiddlyFolio if you want.
== External Resources ==
* [http://wombatdiet.net/2007/10/26/introducing-the-wiki-wallet-tiddlyfolio/ Introducing the Wiki Wallet: TiddlyFolio]
[[Category:Adaptations]]
{{Incomplete}}
[http://tiddlyhome.bidix.info TiddlyHome] is a package designed as an infrastructure for multi-user and multi-site [[TiddlyWiki]] hosting service (based on the [[UploadPlugin]]).
[[Category:Server-Sides]]
{{Incomplete}}
[http://www.minormania.com/tiddlylock/tiddlylock.html TiddlyLock] allows multiple users on a shared network to view & edit the same TiddlyWiki without fear of overwriting other users' changes or losing their own. It works by maintaining a simple lock file that identifies whether TiddlyWiki is in use. As soon as the editing user has saved the TiddlyWiki it becomes available to other users for editing once they have reloaded the new version.
== See Also ==
* [[Server-Side Solutions]]
[[Category:Server-Sides]]
[http://tiddlysnip.com TiddlySnip] is a Firefox extension to quickly add notes, references or bookmarks to the TiddlyWiki.
== Firefox 3 Support ==
While development is currently [http://groups.google.com/group/TiddlySnip/msg/2c810824c8076ccf on hold], [http://groups.google.com/group/TiddlySnip/browse_thread/thread/8846404dc903c859 TiddlySnip v1.21 beta] provides support for [[Firefox 3]].
Note:
This version is only available as an [http://en.wikipedia.org/wiki/XPInstall XPI] file. As such it can be installed by downloading the file and dragging it XPI file into Firefox's ''Tools'' > ''Add-ons'' dialog.
Alternatively, the file can installed by selecting it via ''File'' > ''Open File''.
== External Resources ==
* [http://tiddlysnip.com/#FAQ FAQ]
* [http://groups.google.com/group/TiddlySnip TiddlySnip discussion group]
TiddlyTemplating is a mechanism for using the content of tiddlers in templates, either to publish from a TiddlyWiki or create custom layouts in a tiddler.
Being able to publish from a TiddlyWiki has application in [[Search Engine Optimization]] (SEO) and [http://en.wikipedia.org/wiki/Accessibility accessibility], which are [[ TiddlyWiki As a Website#Issues|usually a problem]] for TiddlyWikis used as web pages.
== Usage ==
You can download the TiddlyTemplatingPackage tiddler from http://jnthnlstr.googlepages.com/TiddlyTemplating.html#TiddlyTemplatingPackage and use this to download the package from the same file.
The core templating function of TiddlyTemplating can be called through the ''templateTiddlers'' macro. The following pages run through some examples.
* [[/Customizing Tiddlers|Using TiddlyTemplating to customize the appearance of a tiddler]]
* [[/Publishing|Using TiddlyTemplating to publish content]]
* [[/Creating Templates|Creating TiddlyTemplating templates - worked example of publishing an RSS feed]]
* [[/Developers Guide|Developers Guide]]
== See Also ==
* [http://jaybyjayfresh.com/2008/01/23/tiddlytemplating-using-tiddlywiki-to-create-webpages/ TiddlyTemplating - using TiddlyWiki to create webpages]
[[Category:Plugins]]
== Introduction ==
[[TiddlyTemplating]] templates are tiddlers like everything else in a TiddlyWiki. In fact, any tiddler can be used as a template.
To help explain how to write templates, the following example will go through the process of creating a series of templates for use in constructing a custom RSS feed.
== Worked Example: Creating an RSS feed ==
For instance, let's say you want to create a RSS feed that looks like this:
<source lang="text">
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>TiddlyTemplating</title>
<link>http://www.example.com/</link>
<description>my top content</description>
<language>en-us</language>
<copyright>Copyright <span>Mon, 21 April 2008 12:12:21 +01:00</span> Author</copyright>
<pubDate><span>Mon, 21 April 2008 12:12:21 +01:00</span></pubDate>
<lastBuildDate><span>Mon, 21 April 2008 12:12:21 +01:00</span></lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>TiddlyWiki 2.4.0</generator>
<item>
<title>Article 2</title>
<description>Lovely stuff this content</description>
<category>docs</category><category>rss</category>
<link>http://www.example.com/#Article%202</link>
<pubDate>22 January 2008</pubDate>
</item>
<item>
<title>Article 1</title>
<description>Lovely stuff this data, yeah baby!</description>
<category>docs</category><category>rss</category>
<link>http://www.example.com/#Article%201</link>
<pubDate>22 January 2008</pubDate>
</item>
</channel>
</rss>
</source>
=== Part 1: replacing repeating elements with nested templates ===
The approach to turning this into templates is to look for the highest-level '''repeating''' elements, which in this case are the <item> elements. We recognise that each one of these contains information gleaned from a tiddler, so we would make the decision that this is the point to introduce a nested call to templateTiddlers. We will also reference a sub-template to customize the output for each tiddler; so, the next iteration of this template, which we will call "RssTemplate" is this:
<source lang="text">
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>TiddlyTemplating</title>
<link>http://www.example.com/</link>
<description>my top content</description>
<language>en-us</language>
<copyright>Copyright <span>Mon, 21 April 2008 12:12:21 +01:00</span> Author</copyright>
<pubDate><span>Mon, 21 April 2008 12:12:21 +01:00</span></pubDate>
<lastBuildDate><span>Mon, 21 April 2008 12:12:21 +01:00</span></lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>TiddlyWiki 2.4.0</generator>
<!--<<templateTiddlers RssItemTemplate filter:"[tag[rss]]">>-->
</channel>
</rss>
</source>
The filter expression given as a parameter to templateTiddlers is used to filter the TiddlyWiki store for a set of tiddlers matching the expression. In this case, the tiddlers returned all have the tag "rss". For more information on filter expressions, see the [[filterTiddlers]] page.
Note that the standard TiddlyWiki syntax for calling macros, "<<macroName>>", is wrapped in HTML comments here - this is so that the templates are valid HTML and play nicely in text editors. The extended syntax is not compulsory.
=== Part 2: creating the sub-templates for repeated elements ===
The reference to "RssItemTemplate" in the templateTiddlers macro call above is for a template we haven't created yet. The method for creating sub-templates starts with condensing what we have cut from the top-level template so that it only describes the repeating structure we previously identified. Here's what we cut:
<source lang="text">
<item>
<title>Article 2</title>
<description>Lovely stuff this content</description>
<category>docs</category><category>rss</category>
<link>http://www.example.com/#Article%202</link>
<pubDate>22 January 2008</pubDate>
</item>
<item>
<title>Article 1</title>
<description>Lovely stuff this data, yeah baby!</description>
<category>docs</category><category>rss</category>
<link>http://www.example.com/#Article%201</link>
<pubDate>22 January 2008</pubDate>
</item>
</source>
We can reduce this easily by cutting out the second repetition of the <item> element, and save this as RssItemTemplate:
<source lang="text">
<item>
<title>Article 2</title>
<description>Lovely stuff this content</description>
<category>docs</category><category>rss</category>
<link>http://www.example.com/#Article%202</link>
<pubDate>22 January 2008</pubDate>
</item>
</source>
At this point, we can recognise that this structure contains its own repeating elements, in the <category> tag. As we did before, we need to cut these out and add another nested template:
<source lang="text">
<item>
<title>Article 2</title>
<description>Lovely stuff this content</description>
<!--<<templateTags RssItemCategoryTemplate>>-->
<link>http://www.example.com/#Article%202</link>
<pubDate>22 January 2008</pubDate>
</item>
</source>
Note the use of "templateTags" rather than "templateTiddlers" here; this is so that the items that are looped over are the active tiddler's tags rather than the set of tiddlers returned using the filter expression. Finally, we'll need to create the RssItemCategoryTemplate we've just referenced.
Having cut this:
<source lang="text">
<category>docs</category><category>rss</category>
</source>
We create RssItemCategoryTemplate in one line:
<source lang="text">
<category><!--<<view tags>>--></category>
</source>
This is the first occurrence of the view macro to pull content into the output. More on that below. At this point, you can test that the templating is working as expected by running this macro inside a tiddler:
<<templateTiddlers RssTemplate>>
=== Part 3: filling in the details ===
Now that we have our template structure laid out properly, it is time to add the content to the feed. This comes from the tiddlers tagged with "rss" and from the wider TiddlyWiki. The view macro can be used extensively to pull data from tiddlers, and we also take advantage of the today macro and the message macro. The lists below outline which macros are used to get data out of the TiddlyWiki and the completed templates and shown following.
==== RssTemplate ====
In this case, we decide to use the text from the TiddlyWiki SiteTitle tiddler as the feed title. We could insert this using the Tiddler macro, although this adds a "span" wrapper element and wikifies the tiddler content. We can use another call to templateTiddlers with the tiddler in question as the template - it will then output the content of that tiddler.
Feed title: <<templateTiddlers SiteTitle>>
Feed URL: <<templateTiddlers SiteURL>>
Feed description: <<templateTiddlers SiteSubtitle>>
Date of publishing: <<today "ddd, DD MMM YYYY 0hh:0hh:0ss TZD">> (for more info on date format strings, please see the [[formatString]] page)
TiddlyWiki version number: <<message version.major>>.<<message version.minor>>.<<message version.revision>>
<source lang="text">
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title><!--<<templateTiddlers SiteTitle>>--></title>
<link><!--<<templateTiddlers SiteURL>>--></link>
<description><!--<<templateTiddlers SiteSubtitle>>--></description>
<language>en-us</language>
<copyright>Copyright <!--<<today "ddd, DD MMM YYYY 0hh:0hh:0ss TZD">>--> <!--<<message config.options.txtUserName>>--></copyright>
<pubDate><!--<<today "ddd, DD MMM YYYY 0hh:0hh:0ss TZD">>--></pubDate>
<lastBuildDate><!--<<today "ddd, DD MMM YYYY 0hh:0hh:0ss TZD">>--></lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>TiddlyWiki <!--<<message version.major>>-->.<!--<<message version.minor>>-->.<!--<<message version.revision>>--></generator>
<!--<<templateTiddlers RssItemTemplate filter:"[tag[rss]]">>-->
</channel>
</rss>
</source>
==== RssItemTemplate ====
Tiddler title: <<view title>>
Tiddler text: <<view text>>
Permalink to the tiddler: <<permalink>> (macro created for this purpose)
Date item last changed: <<view modified date>>
<source lang="text">
<item>
<title><!--<<view title>>--></title>
<description><!--<<view text>>--></description>
<!--<<templateTags RssItemCategoryTemplate>>-->
<link><!--<<permalink>>--></link>
<pubDate><!--<<view modified date>>--></pubDate>
</item>
</source>
==== RssItemCategoryTemplate ====
We have already seen the finished template, but it is listed here for completeness.
Tiddler tag: <<view tags>>
<source lang="text">
<category><!--<<view tags>>--></category>
</source>
=== Part 4: running the templating ===
Now all the templates are finished, you can run the templating process and create your RSS feed inside a tiddler using a call to templateTiddlers:
<<templateTiddlers RssTemplate>>
Because this will be outputting XML into the tiddler, you won't see the tags unless you view the page source. Read on for a method to output the RSS feed to an external file, where you will be more easily able to see the XML structure.
=== Part 5: (advanced) overriding the current RSS saving mechanism ===
As you've just created a mechanism for creating custom RSS feeds, you might want to replace the existing RSS feed that is created when you save your TiddlyWiki. To do this, override the existing generateRss function in a new plugin (a tiddler tagged with "SystemConfig"), like so:
<source lang="javascript">
var generateRssOld = generateRss;
generateRss = function()
{
return expandTemplate("RssTemplate") || generateRssOld();
};
</source>
TiddlyTemplating is not just about publishing files from a TiddlyWiki, it is also used to customize the appearance of tiddlers. This is not the same thing as editing a tiddler's ViewTemplate.
== Simple Example ==
This line in a tiddler:
<pre>
<<templateTiddlers template:SimpleTemplate filter:myTiddler raw:true>>
</pre>
where SimpleTemplate is:
<pre>
<div class="wrap1">
<div class="wrap2">
<div class="wrap3">
<!--<<view text wikified>>-->
</div>
</div>
</div>
</pre>
and myTiddler is:
<pre>
[img[http://farm1.static.flickr.com/45/155839601_fcf69ea21a_o.gif]]
</pre>
would create this HTML when the first tiddler is opened:
<pre>
<div class=\"wrap1\">
<div class=\"wrap2\">
<div class=\"wrap3\">
<img src=\"http://farm1.static.flickr.com/45/155839601_fcf69ea21a_o.gif\">
</div>
</div>
</div>
</pre>
'''NB:''' without the "raw:true" parameter, the resulting HTML would be encoded into text would just appear in the tiddler.
[[TiddlyTemplating]] shares much in common with existing "template frameworks" found in website development, and has its roots in a similar use case of publishing web pages.
The plugins that support the TiddlyTemplating use cases described on this website are as follows. As at 9th July '08, there is an effort to move the core templating mechanism into the TiddlyWiki core - this information may change once that is settled.
* [[TemplatePlugin]] ([[User:Jayfresh|JonathanLister]])
* [[TemplatingMacrosPlugin]] ([[User:Jayfresh|JonathanLister]])
* [[TemplateFormatterPlugin]] ([[User:MartinBudden|MartinBudden]])
* [[TiddlyTemplatingMacro]] ([[User:Jayfresh|JonathanLister]])
== Publishing files from a TiddlyWiki ==
This page explains how you can use the TiddlyTemplating macro to turn your tiddler content into all sorts of output files. For more detail on the plugin itself, please see the [[TiddlyTemplatingMacro]] page.
'''NB:''' The TiddlyTemplating macro is not part of the set of plugins currently under consideration for inclusion in the core and the publishing mechanism may be exposed in a different way. Information will be posted here as things develop (9th July '08).
== Simple Example - Tiddler to CSV ==
We can serialize and publish our tiddlers to a comma-separated variables (CSV) file by using this invocation of the TiddlyTemplating macro:
<pre>
<<TiddlyTemplating CsvTemplate filter:[tag[data]] fileName:tiddlers.csv>>
</pre>
where CsvTemplate is:
<pre>
<!--<<view title>>-->,<!--<<view text>>-->,<!--<<view tags>>-->
</pre>
'''Note the line-break at the end of the line!'''
This will create a file named tiddlers.csv populated with any tiddlers tagged with "data".
== Real-life examples ==
=== TiddlyCity (working title) KML and GeoRSS publishing ===
TiddlyCity takes your [http://www.twitter.com tweets] and geocodes any location data so they can be displayed on a map. A KML file is generated for use with Google Maps and GeoRSS is generated for use with Yahoo! Maps.
TiddlyCity can be found here: http://jnthnlstr.googlepages.com/TiddlyCity.html
To see the templates, go to the 'sidebar' tab in the backstage area (you'll want to download the TiddlyWiki to see this) and look down the timeline.
=== JoshuaBradley.co.uk ===
[http://JoshuaBradley.co.uk JoshuaBradley.co.uk] was created using [http://jnthnlstr.googlepages.com/joshuatree.html this TiddlyWiki], which is a set of templates and content pulled together to look like a website Content Management System, codenamed "JoshuaTree".
Templates can be found from the timeline on the right-hand side of the page.
=== I Want A Blog concept illustrator ===
"I Want A Blog" was put together to try and give an example of how TiddlyTemplating could be used to do something powerful and interesting. Please the [[IWantABlog]] page for more information.
{{Plugin
|Name=TiddlyTemplatingMacro
|Author=[[User:JayFresh{{!}}jayfresh]]
|Description=Renders a template and saves the output to a local file
|Version=3
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/plugins/TiddlyTemplatingMacro.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
The TiddlyTemplating macro lets you create arbitrary output files and folder structures. The main usage documentation, with examples, is on the [[TiddlyTemplating]] page.
TiddlyTemplatingMacro provides the following macro:
* TiddlyTemplating - depends on [[TemplatePlugin]]
=== Usage ===
<<TiddlyTemplating template|template:tiddlerName [filter:filterString] [wikitext:true] [fileName:fileName]>>
Parameters:
*template - the name of the tiddler to be used as a template
*filter (optional) - a valid filterString to collect a set of tiddlers for use with the template
*wikitext (optional) - if true, wikifies the template as TiddlyWiki wikitext instead of using the TemplateFormatter (useful if you are managing content using tiddlers and want to use wikitext)
*fileName (optional) - the name the file to be saved (can include path); if not set, defaults to "output.txt"
=== Description ===
Running the TiddlyTemplating macro initiates two phases:
#The template provided is rendered as described in the [[TemplatePlugin]] documentation
# The resulting string is saved to the file specified in the path parameter
=== Dev notes ===
This macro creates a button that triggers a template-and-publish process, with worker functions inside the library doing almost all the work. The simpler functionality of [[TemplatePlugin|templateTiddlers]] will be wrapped into this library as there is a great deal of overlap; it has previously been developed in parallel.
[http://ttj.wombatdiet.net TiddlyTimeJournal] is a simple but useful tool for keeping track of your time. It uses TiddlyWiki to implement a time journal in a browser tab.
{{Quote|1=[http://wombatdiet.net/2008/08/19/keeping-a-time-journal-introducing-tiddlytimejournal/ Eats Wombats]|2=
[[Image:TTJ.png|thumb|right|450px]]
''Managing your time well will make you successful.'' Randy Pausch.
''..all effective people work on their time management perpetually. They... '''keep a continuing log and analyze it periodically'''...'' Peter Drucker.
Do you log your time now? Do you '''know''' where it goes (or do you just ''think'' you do)? If you haven't done so, you should keep a time journal, at least for a while; then you will ''know''. TiddlyTimeJournal (TTJ) is a small, intentionally simple but adequate application to help you do this.
}}
== External Resources ==
* [http://wombatdiet.net/2008/08/19/keeping-a-time-journal-introducing-tiddlytimejournal/ Keeping a Time Journal: Introducting TiddlyTimeJournal]
[[Category:Adaptations]]
[http://www.tiddlytools.com TiddlyTools] is a treasure trove of high quality, well maintained TiddlyWiki plugins created by Eric Shulman of ELSDesign.
[[Category:Plugins]]
[http://tiddlyweb.com TiddlyWeb] is a flexible [[server-side implementation]] for [[TiddlyWiki]]:
'''The latest [http://tiddlyweb.peermore.com documentation] is available on the TiddlyWeb website.'''
{{Quote|1=[http://cdent.tumblr.com/post/42582420/the-web-services-and-applications Jeremy]|2=
TiddlyWeb is a practical, readable, reference implementation of a rigorously designed headless wiki server that may use TiddlyWiki as a user interface.
The combination of TiddlyWeb and TiddlyWiki allows a complete separation of server and UI concerns.
}}
TiddlyWeb is a work in progress, currently in beta stage. For information about using or developing with TiddlyWeb see [[Dev:TiddlyWeb]].
== Concepts ==
TiddlyWeb operates on the [[tiddler]]-level; content is saved as individual tiddlers.
A single hierarchy level called "bags" is used to combine related tiddlers.
In addition, "recipes" can be used to create arbitrary collections of tiddlers from different bags.
Depending on the context, a TiddlyWiki [[workspace]] translates to either a bag or a recipe.
This is reflected in path-like workspace names (e.g. "bags/foo" vs. "recipes/bar").
== Plugins ==
* [http://github.com/tiddlyweb TiddlyWeb code and Plugins at github]
== Development ==
* [[Dev:TiddlyWeb]]: status, information and documentation
* [[Dev:TiddlyWeb Development]]: ongoing development information
== External Resources ==
* [http://tiddlyweb.peermore.com/ TiddlyWeb on TiddlyWeb]
* [http://tiddlyweb.peermore.com/wiki/#%5B%5BInstalling%20TiddlyWeb%5D%5D Installing TiddlyWeb]
[http://www.tiddlywiki.com TiddlyWiki] is a reusable, non-linear personal notebook.
It is written in HTML, CSS and JavaScript and [[TiddlyWiki License|published under the BSD open-source license]].
It allows anyone to create personal self-contained hypertext documents.
Since Tiddlywiki does not need any installation and consists of only a single file, it is fully self-contained and extremely portable.
TiddlyWiki was created by [[Jeremy Ruston]] and a busy community of independent developers.
== Download ==
You can save your own blank TiddlyWiki to your local drive by right clicking [http://www.tiddlywiki.com/empty.html this link] and selecting "Save link as..." or "Save target as..." from your browser's context menu.
You can choose where to save the file and what to call it (but make sure that it's saved in HTML format and with an HTML extension).
== Revision History ==
The TiddlyWiki changelog can be found [http://trac.tiddlywiki.org/wiki/History here].
The [http://www.tiddly-twab.com TiddlyWiki Address Book] (TWAB) is a system for storing and managing contacts from within [[TiddlyWiki]].
[[Category:Adaptations]]
{{Incomplete}}
== Issues ==
Since TiddlyWiki is dynamically constructed, search engines do not fully index TiddlyWiki-driven websites (see [[Search Engine Optimization]]).
For the same reason, there are limitations to [http://en.wikipedia.org/wiki/Accessibility accessibility].
In addition, Since TiddlyWiki documents are usually larger than regular web pages, which leads to longer initial load times. (However, subsequent load times are eliminated.)
=== Solutions ===
* creating a [[Themes|readOnly theme]]
* [[TiddlyTemplating]]
* see [[Prefabs#Publication]]
* [[Server-Side Solutions|server-sides]] (e.g. [[TiddlyWeb]], [[ccTiddly]]) can create static content
== See Also ==
* [[Accessibility]]
* [[Reader Comments]]
* [[How To/Setting Up TiddlyWiki As a Website]]
=== Note to everyone ===
This FAQ is under construction and quite incomplete, yet it is a start. If you can contribute questions and answers that would be great.
=== Note to contributors ===
Please put<br>
<nowiki>[[Category:FAQ]]</nowiki><br>
<nowiki>[[Category:SectionName]]</nowiki><br>
where SectionName is something from [[:Category:FAQ Section]] (make a new FAQ Section if you need to) at the end of each FAQ.
==FAQ==
=== Basics ===
* [[What is TiddlyWiki?]]
* [[What can I do with TiddlyWiki?]]
* [[What do I need to run TiddlyWiki?]]
* [[Can I use TiddlyWiki as a multi-user/collaborative/server based wiki?]]
=== Getting Started ===
* [[Getting your own TiddlyWiki file]]
* [[Configuring your browser to allow saves to disk]]
* [[I put my TiddlyWiki file on my web server and I can't save]]
=== Using TiddlyWiki ===
* [[Autosave]]
* [[Add Menu Item]]
* [[Special Characters and Symbols|Adding Special characters and symbols to TiddlyWiki content]]
* [[Create Tiddler]]
* [[Delete Tiddler]]
* [[TiddlyWiki on the iPhone|Does TiddlyWiki work on an iPhone?]]
* [[Change where backups are saved]]
* [[Editing and saving a tiddler]]
* [[Find a tiddler]]
* [[TiddlyWiki markup|Formatting Text]]
* [[How do I deactivate a wiki word?]]
* [[How do I link to a tiddler without a wiki word name?]]
* [[How do I make searching work better?]]
* [[Insert a Picture]]
* [[Is there a WYSIWYG version of TiddlyWiki?]]
* [[Keyboard Shortcuts]]
* [[Naming a TiddlyWiki]]
* [[Options]]
* [[Resize Image]]
* [[Saving the file]]
* [[Tags]]
* [[TiddlyWiki markup]]
* [[URL Commands]]
* [[What is a tiddler?]]
* [[What is a wiki word?]]
* [[Where can I get nightly builds of the TiddlyWiki trunk?]]
* [[How do I know what version I'm running?]]
* [[Broken links in Firefox]]
=== Troubleshooting ===
* [[How big can my file get before it gets too slow/doesn't work?]]
* [[I keep getting "A script is making this page run slow" in Firefox]]
* [[My settings don't get saved]]
* [[Special characters are not displaying correctly]]
* [[Lots of spaces get changed to one space]]
* [[I get 'Permission denied to call method XMLHttpRequest.open' when using UploadPlugin or ImportTiddlers]]
=== Configuration ===
* [[Can I make it only show one tiddler at a time like a regular wiki?]]
* [[Can I use MediaWiki style markup instead of the built in TiddlyWiki markup. Or Twiki or Trac style markup?]]
* [[How do I change the date format for new journals?]]
* [[How do I change how a tiddler looks?]]
* [[How do I change how tiddler editing looks?]]
* [[How do I change my default options?]]
* [[How do I change the colours and the fonts?]]
* [[How do I change the layout of my TiddlyWiki?]]
* [[How do I have a different tiddler toolbar for web users?]]
* [[How do I make my table cells vertically aligned?]]
* [[How do I right-justify some text in a tiddler?]]
* [[How do I justify all the text in every tiddler?]]
* [[Shadow Tiddlers]]
=== Customisation ===
=== Tips and Tricks ===
* [[How can I make a "home" button that opens just the default tiddlers?]]
* [[How can use my logo as the SiteTitle but still have text in the html page title?]]
* [[How do I right-justify some text in a tiddler?]]
* [[How do I justify all the text in every tiddler?]]
* [[How do I make my table cells vertically aligned?]]
* [[How can I encrypt some of my data?]]
* [[How can I avoid all text being selected when I edit a tiddler?]]
=== Macros ===
* [[What is a macro?]]
* [[Core_Macros|What macros are built in to TiddlyWiki?]]
* [[What about commands?]]
=== Plugins ===
* [[How do I install a plugin?]]
* [[What is a plugin?]]
* [[Where do I find plugins?]]
* [[Plugin recommendations|Which plugins should I use for the task at hand?]]
=== For Developers ===
=== Getting Things Done (GTD) ===
* [[What is GTD?]]
* [[Can I use TiddlyWiki for GTD?]]
==Indexes==
In the spirit of TagglyTagging these could perhaps replace the manual list above...
* '''[[:Category:FAQ|FAQ Index]]'''
* '''[[:Category:FAQ Section|FAQ Categories]]'''
;Case-Sensitive Search
:A function of TiddlyWiki whereby the user can search for a word or phrase with precise upper and lowercase specifications.
;Client-Side
:A TiddlyWiki file that is edited offline by the user or client. These cannot be edited over the Internet (using the HTTP protocol) when the file is located on a Web server.
;Default Tiddlers
:This is a tiddler containaining a list of tiddlers to be automatically opened on startup. It can be customized or its contents removed, if desired.
;Macro
:See [[Macros]].
;MainMenu
:The menu normally found on the left-hand side of the screen, acting as an index or table of contents.
;Options Panel
:The menu in the middle of the right-hand menu. Sometimes it is hidden, and can be opened by clicking on "options >>".
;Permalink
:A TiddlyWiki button on each individual tiddlers which changes the browser address/location bar to a permalink to the respective tiddler. Helpful for placing links to a specific tiddler in e-mails and Web pages.
;Permaview
:A TiddlyWiki button in the right-hand menu that sets the browser's address/location bar to a URL embodying all open tiddlers in the order that they are currently shown in. Helpful for placing links to a specific combination of tiddlers in e-mails and Web pages.
;Plugin
:A tiddler with code that adds extra functionality to TiddlyWiki. For more information, see [[Plugins]].
;Server-Side
:A TiddlyWiki file that can be edited while the file is located on a Web server. This gives users the ability to edit it from any online computer.
;Shadow Tiddlers
:ShadowTiddlers are special tiddlers (e.g. [[PageTemplate|PageTemplate]] and [[StyleSheetColors]]) that have default, pre-defined values that take over if the respective (user-created) tiddlers do not exist. For more information, see [[Shadow Tiddler]].
;SideBar
:The options at the top of the right-hand menu.
;Slice
:A tiddler slice is a portion of a tiddler that can be retrieved and reused. An example is the [[ColorPalette]] tiddler, which contains color names and their respective color values. For more information, see [[Tiddler Slices]].
;Slider
:A macro for collapsing/expanding content.
;StyleSheet
:A tiddler with code to control the appearance, layout and printing properties of a TiddlyWiki file. For more information, see [[Customization]].
;systemConfig
:A tag that tells TiddlyWiki that the tiddler contains JavaScript that should be run when the file opens. Usually appended to plugins.
;Tabs
:The menu at the bottom of the right-hand menu. They are called tabs because they have what looks like the tabs on file folders protruding from the top of them.
;Tag
:A label that a user adds to a tiddler to index it according to topic. In other words, the tag is the topic or category by which a tiddler should be indexed for later retrieval. This provides an extra way to find tiddlers, because the user can go to the Tags tab in the right hand tabbed menu and browse his or her personal list of tags.
;Tiddler
:A content pane inside TiddlyWiki. Tiddlers are like 3x5 note cards to which the user can add content, add hyperlinks and categorize using tags. Basically, they are the equivalent of pages, with the difference being that you can display several pages at once.
;WikiWords
:See [[WikiWord]]
TiddlyWiki is released under the BSD license<ref>full license text:
<pre>
TiddlyWiki created by Jeremy Ruston, (jeremy [at] osmosoft [dot] com)
Copyright (c) UnaMesa Association 2004-2008
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of the UnaMesa Association nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
</pre>
</ref>, which allows a large degree of freedom and flexibility in terms of modifying and redistributing the code.<ref>The BSD license is [http://www.gnu.org/copyleft/gpl.html GPL]-[http://www.fsf.org/licensing/licenses compatible].</ref>
{{Quote|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/d864656e45102664/072405cd4b12a43f?#072405cd4b12a43f Jeremy]|
you can use, modify, sell or otherwise redistribute
TiddlyWiki without needing any additional permission. It's good karma
if you spread the with a credit and link back to tiddlywiki.com.
}}
== See Also ==
* [[Jeremy Ruston]]
* [[UnaMesa]]
* [[:Category:Stakeholders]]
* [[Dev:Plugin Licenses]]
== References ==
<references/>
{{Review}}
== Inline Formatting ==
:''Format text as desired''
{|colspan="2" align="center" cellpadding=4 cellspacing=0 border=1 style="margin: 0 0 1em 1em;font-size:120%;text-align:center;"
!Text Format
!Mark-Up
|----
| '''Bold'''
| <nowiki>''Bold''</nowiki>
|-
| ''Italics''
| '''//'''Italics'''//'''
|-
| '''''Bold Italics'''''
| <nowiki>''//Bold Italics//''</nowiki>
|-
|<u>Underline</u>
| '''__'''Underline'''__'''
|-
|<s>Strikethrough</s>
| '''--'''Strikethrough'''--'''
|-
|<u>Super<sup>'''script'''</sup></u>
| Super'''^^'''script'''^^'''
|-
|<u>Sub</u><sub>'''script'''</sub>
| Sub'''~~'''script'''~~'''
|-
| <div style="background-color:yellow;">Highlight</div>
| '''@@'''Highlight'''@@'''
|-
| <nowiki>PlainText No ''Formatting''</nowiki>
| '''{{{'''<nowiki>PlainText No ''Formatting''</nowiki>'''}}}'''
|-
|}
== Block Elements ==
=== Headings ===
<div style="line-height:1.5em;font-size: 220%;font-weight: bold;">!Heading Level 1</div>
<div style="line-height:1.5em;font-size: 200%;font-weight: bold;">!!Heading Level 2</div>
<div style="line-height:1.5em;font-size: 180%;font-weight: bold;">!!!Heading Level 3</div>
<div style="line-height:1.5em;font-size: 160%;font-weight: bold;">!!!!Heading Level 4</div>
<div style="line-height:1.5em;font-size: 140%;font-weight: bold;">!!!!!Heading Level 5</div>
<div style="line-height:1.5em;font-size: 120%;font-weight: bold;">!!!!!!Heading Level 6</div>
<br><br><br>
=== Unordered Lists ===
<br>
====Example====
* Unordered List, Level 1
** Unordered List, Level 2
*** Unordered List, Level 3
<br>
====Mark-Up Used====
<nowiki>* Unordered List, Level 1</nowiki><br>
<nowiki>** Unordered List, Level 2</nowiki><br>
<nowiki>*** Unordered List, Level 3</nowiki><br>
<br><br>
=== Ordered Lists ===
<br>
====Example====
# Ordered List, Level 1A
# Ordered List, Level 1B
## Ordered List, Level 2A
### Ordered List, Level 3A
<br>
====Mark-Up Used====
<nowiki># Ordered List, Level 1A</nowiki><br>
<nowiki># Ordered List, Level 1B</nowiki><br>
<nowiki>## Ordered List, Level 2A</nowiki><br>
<nowiki>### Ordered List, Level 3A</nowiki><br>
<br><br>
=== Definition Lists ===
; definition list, term
: definition list, description
{{Note|
Definition-list descriptions are sometimes used to create indented paragraphs.
}}
=== Blockquotes ===
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3
<<<
blockquote
<<<
=== Preformatted ===
{{{
preformatted (e.g. code)
}}}
=== Tables ===
{{Dablink|There is also an in-depth article on [[Tables]].}}
Columns are delimited by a single pipe character (<tt>|</tt>); a new line creates a new row:
|CssClass|k
|!heading column 1|!heading column 2|h
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
'''Annotation:'''
* The <code>></code> marker creates a "colspan", causing the current cell to merge with the one to the right.
* The <code>~</code> marker creates a "rowspan", causing the current cell to merge with the one above.
=== Images ===
cf. [http://www.tiddlywiki.com/#EmbeddedImages TiddlyWiki.com]
== Links ==
* [[WikiWord|WikiWords]] are automatically transformed to hyperlinks to the respective tiddler
** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde (<tt>~</tt>): <code>~WikiWord</code>
* [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: <code><nowiki>[[tiddler name]]</nowiki></code>
** optionally, a custom title or description can be added, separated by a pipe character (<code>|</code>): <code><nowiki>[[title|target]]</nowiki></code><br/>'''N.B.:''' In this case, the target can also be any website (i.e. URL), folder or file.
=== Examples ===
* a simple website (URL) requires no markup: <code><nowiki>http://domain.tld</nowiki></code>
* website (URL) : <code><nowiki>[[label|http://domain.tld]]</nowiki></code>
* Unix-style folder: <code><nowiki>[[label|file:///folder/file]]</nowiki></code>
* Windows drive-mapped folder <code><nowiki>[[label|file:///c:/folder/file]]</nowiki></code>
* Windows network share: <code><nowiki>[[label|file://///server/folder/file]]</nowiki></code>
== Custom Styling ==
* inline styles: <pre>@@CssProperty:value;CssProperty:value;…@@</pre>
{{Note|'''N.B.:''' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.}}
* class wrapper: <pre>{{customClass{…}}}</pre>
== Inserting HTML ==
* raw HTML can be inserted by enclosing the respective code in HTML tags (<code><html> … </html></code>).
== Special Markers ==
* <code><nowiki><br></nowiki></code> forces a manual line break
* <code><nowiki>----</nowiki></code> and <code><nowiki><hr></nowiki></code> create a horizontal rule (<code><nowiki><hr></nowiki></code> syntax supported from v2.4.2)
* [http://www.tiddlywiki.com/#HtmlEntities HTML entities]
* <code><<macroName>></code> calls the respective [[Macros|macro]]
* To hide text within a tiddler so that it is not displayed, it can be wrapped in <code>/%</code> and <code>%/</code>.<br/>This can be a useful trick for hiding drafts or annotating complex markup.
* To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. <code>"""WikiWord"""</code> (cf. [[Escaping]]).
== See Also ==
* [[Wiki Markup]]
* [[Multi-Line Contents]]
* [[/Tiddler|Tiddler format]] (TiddlyWiki markup version)
* [[Macros]]
* [[Customization]]
[[Category:TiddlyWiki Markup]] [[Category:Wiki Markup]]
[[Category:Using TiddlyWiki]]
This is the markup [[TiddlyWiki Markup|cheat sheet]] in tiddler format, so it can be copied and pasted into any TiddlyWiki.
<pre>
!Inline Formatting
|!Option|!Syntax|!Output|
|bold font|{{{''bold''}}}|''bold''|
|italic type|{{{//italic//}}}|//italic//|
|underlined text|{{{__underlined__}}}|__underlined__|
|strikethrough text|{{{--strikethrough--}}}|--strikethrough--|
|superscript text|{{{^^super^^script}}}|^^super^^script|
|subscript text|{{{~~sub~~script}}}|~~sub~~script|
|highlighted text|{{{@@highlighted@@}}}|@@highlighted@@|
|preformatted text|<html><code>{{{preformatted}}}</code></html>|{{{preformatted}}}|
!Block Elements
!!Headings
{{{
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
}}}
<<<
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
<<<
!!Lists
{{{
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3
# ordered list, level 1
## ordered list, level 2
### unordered list, level 3
; definition list, term
: definition list, description
}}}
<<<
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3
# ordered list, level 1
## ordered list, level 2
### unordered list, level 3
; definition list, term
: definition list, description
<<<
!!Blockquotes
{{{
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3
<<<
blockquote
<<<
}}}
<<<
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3
> blockquote
<<<
!!Preformatted Text
<html><pre>
{{{
preformatted (e.g. code)
}}}
</pre></html>
<<<
{{{
preformatted (e.g. code)
}}}
<<<
!!Tables
{{{
|CssClass|k
|!heading column 1|!heading column 2|
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
}}}
''Annotation:''
* The {{{>}}} marker creates a "colspan", causing the current cell to merge with the one to the right.
* The {{{~}}} marker creates a "rowspan", causing the current cell to merge with the one above.
<<<
|CssClass|k
|!heading column 1|!heading column 2|
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
<<<
!!Images /% TODO %/
cf. [[TiddlyWiki.com|http://www.tiddlywiki.com/#EmbeddedImages]]
!Hyperlinks
* [[WikiWords|WikiWord]] are automatically transformed to hyperlinks to the respective tiddler
** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde ({{{~}}}): {{{~WikiWord}}}
* [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: {{{[[tiddler name]]}}}
** optionally, a custom title or description can be added, separated by a pipe character ({{{|}}}): {{{[[title|target]]}}}<br>'''N.B.:''' In this case, the target can also be any website (i.e. URL).
!Custom Styling
* {{{@@CssProperty:value;CssProperty:value;…@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.
* <html><code>{{customCssClass{…}}}</code></html>
* raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> … </html>}}}
!Special Markers
* {{{<br>}}} forces a manual line break
* {{{----}}} creates a horizontal ruler
* [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]
* {{{<<macroName>>}}} calls the respective [[macro|Macros]]
* To hide text within a tiddler so that it is not displayed, it can be wrapped in {{{/%}}} and {{{%/}}}.<br/>This can be a useful trick for hiding drafts or annotating complex markup.
* To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{"""WikiWord"""}}}.
</pre>
This message usually indicates that [[TiddlyWiki]] has been downloaded incorrectly - e.g. by using the browser's ''Save Page As'' functionality instead of [[Downloading TiddlyWiki|downloading]] the application.
In rare cases, a TiddlyWiki document can become [[Corruption|corrupted]] (normally not caused by TiddlyWiki itself).
The data can usually be recovered by [[importing]] all tiddlers into an empty TiddlyWiki.
{{Quote|[http://groups.google.com/group/TiddlyWiki/browse_thread/thread/89f184a436b53547/9761d3bdcf92f070?#9761d3bdcf92f070 Eric]|
You must never use the browser's ''Save Page As'' command to save a TiddlyWiki document. This is because ''the browser does not save the original document source as read from the stored file'' -- instead, it creates a re-generated version of the document source based on what is currently loaded into the browser's working memory -- and, because TiddlyWiki document content is dynamically-rendered after loading the file, the browser's version of the document source is different from the actual stored file.
To correctly download and store an exact copy of a TiddlyWiki document on your local system, without any intervening re-interpretation by the browser, you should '''right-click on a link to the desired URL''' and then use the ''Save Target as...'' command from the popup menu to initiate the download.
}}
[[Category:Errors]]
== Official ==
* [http://www.tiddlywiki.com/ tiddlywiki.com] is the primary TiddlyWiki web site.
* [http://wiki.tiddlywiki.org wiki.tiddlywiki.org] is this documentation wiki.
* [http://trac.tiddlywiki.org/ trac.tiddlywiki.org] Trac site for submitting/viewing bug reports and seeing the core development progress.
* [http://tiddlywiki.com/#GettingStarted Getting Started] on TiddlyWiki.com
== Books ==
* [http://www.wunan.com.tw/bookdetail.asp?no=8852 TiddlyWiki維基寫作-知識管理最佳工具] ("TiddlyWiki - An excellent tool for knowledge management."; Traditional Chinese)
== Guides and Tutorials ==
* '''[http://twhelp.tiddlyspot.com/ TW Help]''' a TiddlyWiki help file for beginners maintained by Morris Gray
* '''[http://www.giffmex.org/twfortherestofus.html TiddlyWiki for the rest of us]''' by Dave G (Also available [http://www.giffmex.org/twtutorialespanol.html in Spanish])<br>Intro: TiddlyWiki is a very versatile program, but has an initial learning curve to it. Much of the documentation is written by and for people immersed day after day in computer code, so, um, how do I put this delicately, it is not always written in helpful everyday language. Not being a computer genius myself, I found the TiddlyWiki learning curve daunting, but well worth it. For those of you like me, newcomers to TiddlyWiki who don't know "Tiddly Squat", I would like you to discover this great program without having to commit as much time and energy to it as I did. Enjoy!
* [http://tiddlertoddler.tiddlyspot.com/ Tiddler Toddler] A guide for absolute beginners by Julie Starr, an absolute beginner
* [http://www.blogjones.com/TiddlyWikiTutorial.html TiddlyWikiTutorial] a tutorial in the form of a TiddlyWiki
* [http://moultriecreek.us/family/?p=705 TiddlyWiki Basics] by Denise Olson
* [http://tiddlywiki.org/wiki/Dev:Macros Writing Macros] and [http://tiddlywiki.org/wiki/Dev:Core_Code_Overview Core Code Overview] now contain what had been at ''[http://gimcrackd.com/etc/src/codex/ The Macrocodex] a guide to writing TiddlyWiki macros by Gimcrack'd''. (That link now produces 301.)
* '''[http://tidhelp.tiddlyspot.com/ Tid-Help]''' a primer for tiddlywiki by Jim Ventola
* '''[http://danielbaird.com/tiddlywikiguides/userguide-sample.html TiddlyWiki Getting Started Guide]''' by Daniel Baird<br>A Getting Started Guide in development that might still be the first in a series of standalone guides to TiddlyWiki. See the [http://danielbaird.com/tiddlywikiguides/userguide-sample.html latest sample] for a preview.
* '''[http://nothickmanuals.info/doku.php/cheatsheets TiddlyWiki quick reference card]''' by Dmitri Popov ([http://nothickmanuals.info/lib/exe/fetch.php/cheatsheets:tiddlywiki_cheatsheet.pdf CheatSheet PDF])
== Other Useful Sites ==
* '''[http://tiddlyspot.com TiddlySpot]''' (free TiddlyWiki hosting)
* '''[http://tiddlysnip.com TiddlySnip]''' a firefox extension that allows you to use TiddlyWiki as a scrapbook!
* '''[http://tiddlythemes.com TiddlyThemes]''' a gallery of themes for TiddlyWiki
== Community Support ==
* [http://groups.google.com/group/TiddlyWiki Users' mailing list] at Google Groups (Newcomers welcome!)
* [http://groups.google.com/group/TiddlyWikiDev Developers' mailing list] at Google Groups
* [irc://irc.freenode.net/tiddlywiki IRC chat] (<code>#tiddlywiki</code> on [http://freenode.net/irc_servers.shtml Freenode])
* [[Facebook Groups]]
== Benefactors ==
* [[UnaMesa]]
* [[Osmosoft]]
== More ==
Some of these might be past their use-by date.
* '''[http://faculty.massasoit.mass.edu/jventola/videocasts/tidhelp2/tidhelp2.html Tid-Help 2]''' a screencast also by Jim Ventola
* '''[http://www.blogjones.com/TiddlyWikiTutorial.html TiddlyWikiTutorial]''' by Blog Jones<br>Intro: Welcome to TiddlyWikiTutorial, an introduction to one of the most efficient ways of communicating information ever devised.
* <strike>'''[http://russlipton.com/tiddlyworks.html Getting Started Guide]''' by Russ Lipton</strike> '''404'''<br>Contents About Getting Started, What Is TiddlyWiki? What You Can Do With TiddlyWiki, Getting Around TiddlyWiki...
* '''[http://twfaq.tiddlyspot.com/ TiddlyWikiFAQ]''' by Simon Baird. Has some stuff that should be migrated over here.
* [http://knighjm.googlepages.com/knightnet-default-tw.html#Reference Some useful reference stuff] by Jules including lists of built-in macros, formatting rules and useful JavaScript methods for developers.
* [http://tiddlywikitips.com/ TiddlyWikiTips] by Jim Barr
* [http://max.limpag.com/2006/09/07/using-a-tiddlywiki-a-video-guide/ A screencast] by Leon Kilat. Unfortunately he choose an old version of GTD-TiddlyWiki. (Full screen version [http://ia300033.us.archive.org/3/items/tiddlywikitutorial/tiddlywiki.swf here]).
* [http://euicho.com/index.php?p=123 An old but good introduction to/description of TiddlyWiki] from euicho.com
* [http://www.zrenard.com/tiddlywiki/ Some older stuff] at zrenard.com.
* [http://del.icio.us/TiddlyWikiPlugin TiddlyWikiPlugin on delicious] a list of plugins maintained by BidiX
* '''[http://pollio.maurizio.googlepages.com/MiniGuidaTiddlyWiki.html Guida a TiddlyWiki]''' an italian TiddlyWiki tutorial
At [http://tiddlyspot.com Tiddlyspot] you can quickly create an online web site using TiddlyWiki. You can save your changes online (using UploadPlugin) and you can even download your site, work on it offline, then upload it back to the web when you want to.
==Features==
* Select from several different TiddlyWiki distributions known as "flavours".
* Can customise your site and use any plugin you want.
* Choose a private or public site.
* Keeps some backups of your site in case you need to restore a previous version.
==More Information==
* [http://faq.tiddlyspot.com Tiddlyspot FAQ]
* [http://tiddlyspot.blogspot.com Tiddlyspot Blog]
* [http://tiddlyspot.com/?page=about About Tiddlyspot]
{{Incomplete}}
== Description ==
The timeline, by default embedded in the [[sidebar]], keeps track of newly created and modified tiddlers in chronological order.
== History ==
This feature has been available since the very first release.
== See Also ==
* [[Timeline (macro)]]
* [[Optimizing Screen Space]]
== External Resources ==
* [http://www.tiddlywiki.com/#MinorChanges MinorChanges]
{{Review}}
This [[macro]] creates a list of tiddlers sorted by date.
== Usage ==
<pre>
<<timeline [date] [length] [format]>>
</pre>
The three macro parameters are:
# date to sort by ("modified" by default; could also be "created")
# maximum length (amount of tiddlers to show; all by default)
# [[Date Formats|date format]]
== Example ==
The following code shows all tiddlers, sorted by their modified date, and using a custom date format:
<pre>
<<timeline "modified" "0" "ddd, YYYY-0MM-0DD">>
</pre>
== External Resources ==
* [http://tw.lewcid.org/#BetterTimelineMacro BetterTimelineMacro]
[[Category:Macros]]
Several [[macros]] take a date format string as an optional argument.
This string can be a combination of ordinary text and special placeholders that are substituted by parts of the date:
{| class="wikitable"
|-
! Code !! Output
|-
| <code>DDD</code> || day of week in full (e.g. "Monday")
|-
| <code>ddd</code> || day of week in short (e.g. "Mon")
|-
| <code>DD</code> || day of month, without leading zero
|-
| <code>0DD</code> || day of month, with leading zero if necessary
|-
| <code>DDth</code> || day of month with suffix
|-
| <code>WW</code> || ISO-8601 week number of year, without leading zero
|-
| <code>0WW</code> || ISO-8601 week number, with leading zero if necessary
|-
| <code>MMM</code> || month in full (e.g. "July")
|-
| <code>mmm</code> || short month (e.g. "Jul")
|-
| <code>MM</code> || month number, without leading zero
|-
| <code>0MM</code> || month number, with leading zero if necessary
|-
| <code>YYYY</code> || four-digit year number
|-
| <code>YY</code> || two-digit year
|-
| <code>wYYYY</code> || four-digit year number with respect to week number
|-
| <code>wYY</code> || two-digit year with respect to week number
|-
| <code>hh</code> || hours, 24-hour format, without leading zero
|-
| <code>0hh</code> || hours, 24-hour format, with leading zero if necessary
|-
| <code>hh12</code> || hours, 12-hour format, without leading zero
|-
| <code>0hh12</code> || hours, 12-hour format, with leading zero if necessary
|-
| <code>mm</code> || minutes, without leading zero
|-
| <code>0mm</code> || minutes, with leading zero if necessary
|-
| <code>ss</code> || seconds, without leading zero
|-
| <code>0ss</code> || seconds, with leading zero if necessary
|-
| <code>am</code> or <code>pm</code> || lowercase AM/PM indicator
|-
| <code>AM</code> or <code>PM</code> || uppercase AM/PM indicator
|}
[http://tinytiddly.tiddlywiki.org/ TinyTiddly] provides TiddlyWiki versions optimized for file size.
There are two version available: A regular HTML file, and an archive containing both an HTML and a JavaScript file.
While the former works just like any regular TiddlyWiki, the latter externalizes the core so it can be used simultaneously for several TiddlyWiki documents.
{{Note|
When using the externalized core, users downloading the TiddlyWiki document will also have to download the respective JavaScript file.
}}
The functionality is identical to the official release, but the core code has been compressed using the following tools:
# [http://dojotoolkit.org/docs/shrinksafe/ ShrinkSafe]
# [http://www.crockford.com/javascript/jsmin.html JsMin]
# [http://dean.edwards.name/packer/ Packer]
{{Note|
Using packed code has some [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/d126866134eec291 performance implications].
}}
[[Category:Tools]]
<noinclude>{{Note|The individual tips are listed on the [[/Tips|Tips]] subpage.}}</noinclude>
== Tip of the Week ==
{{#tag:random | {{:Tip of the Week/Tips}} }}
Join the TiddlyWiki IRC channel: [irc://irc.freenode.net/tiddlywiki irc.freenode.net #tiddlywiki]
----
You can use [http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/2fe4e7bd3e01f8a6 centralized date formats].
This [[macro]] displays the current date and time.
== Usage ==
<pre>
<<today [dateFormat]>>
</pre>
(cf. [[Date Formats]])
also: try the date format in quotes if the regular format doesn't work for you
[[Category:Macros]] [[Category:Core Macros]]
{{Disambiguation}}
* [[Tiddler Toolbar]]
* [[Toolbar (macro)]]
{{Review}}
The ToolbarMacro is used in the TemplateMechanism to define the toolbar that appear either in EditMode or in ViewMode.
The arguments to the ToolbarMacro is a list of command names, as discussed in the CommandMechanism..
You can precede a command name with a "+" to specify a default command that is automatically chosen when a tiddler is double-clicked, or the ctrl-Enter key combination pressed. Similarly, precede it with "-" to specify a command to be chosen when the Escape key is pressed.
== See Also ==
* [[Tiddler Toolbar]]
[[Category:Macros]] [[Category:Core Macros]]
{{Incomplete}}
Using the [[Tiddler (macro)|Tiddler]] macro, contents of one tiddler can be embedded ("[http://en.wikipedia.org/wiki/Transclusion transcluded]") from another tiddler:
<pre>
<<tiddler [[Foo]]>>
</pre>
== Partial Transclusion ==
With the use of [[slices]] and [[sections]], specific parts can be transcluded from another tiddler:
<pre>
<<tiddler [[tiddler::sliceLabel]]>>
<<tiddler [[tiddler##sectionHeading]]>>
</pre>
=== Examples ===
{{Tiddler|1=Slices|2=
label1: lorem
label2: ipsum
label3: dolor
{{!}}label4{{!}}sit{{!}}
{{!}}label5{{!}}amet{{!}}
{{!}}label6{{!}}consectetur{{!}}
}}
<pre>
<<tiddler [[Slices::label1]]>>
</pre>
{{Tiddler|1=Sections|2=
!Heading1
Lorem ipsum dolor sit amet.
!Heading2
Consectetur adipisicing elit.
!Heading3
Sed do eiusmod tempor incididunt ut labore.
}}
<pre>
<<tiddler [[Slices##Heading1]]>>
</pre>
== Parametric Transclusion ==
Using the [[NewTiddler]] macro's <code>with:</code> parameter, placeholders (<code>$1</code>-<code>$9</code>) in the transcluded contents can be replaced with the desired value:
<pre>
<<tiddler [[Foo]] with:"bar" "baz" ...>>
</pre>
=== Examples ===
{{Tiddler|1=QuoteTemplate|2=
<<<
$1
<<<
{{{$2}}}
}}
{{Tiddler|1=Quotations|2=
<nowiki>
<<tiddler [[QuoteTemplate]] with:"The quote." "The source.">>
</nowiki>
}}
cf. [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/075ada78dc1349ad/edb8d22f5d4419bc?#edb8d22f5d4419bc <nowiki>[tw]</nowiki> templates / transclusion (parametric)]
== Editing Transcluded Contents ==
* [http://tw.lewcid.org/#TiddlerWithEditPlugin TiddlerWithEditPlugin]: adds "double-click to edit source" capabilities to the core Tiddler macro
* [http://www.tiddlytools.com/#EditTiddlerPlugin EditTiddlerPlugin]: embeds an "edit" link in tiddler content to invoke edit on any specified tiddler title
== StyleSheet Transclusion ==
Within [[Style Sheets]], [[PrettyLinks]] are treated like import statements; the contents of the targeted tiddler are included as [[CSS]] code.
{{Incomplete}}
In case of a problem, [[PluginManager|disabling all plugins]] — both in [[TiddlyWiki]] and in the browser — is the first step in identifying the cause. If the problem has disappeared then, re-enabling all plugins ''one at a time'' helps identifying the exact cause of the problem.
When encountering a [[plugin]] error, the [[plugin manager]] will automatically be displayed on startup, highlighting the problematic plugin and presenting an error message.
When encountering a [[macro]] error (e.g. "Error in macro <<[''...'']>>"), clicking on the error message will reveal more details that are helpful in identifying the issue.
== Community Support ==
The [http://groups.google.com/group/TiddlyWiki TiddlyWiki community] is always glad to help out.
Please provide
* a concise description of the problem
* if applicable, the exact error messages
* step-by-step instructions for reproducing the issue
* system information
** TiddlyWiki [[version|version number]]
** relevant plugins (with links)
** operating system
** browser version
** working online (via HTTP) or local (document on hard drive)
* if possible, a [http://webkit.org/quality/reduction.html minimal test case] (a sample document illustrating the issue, using as few components as possible)<br>[[Tiddlyspot]] provides free hosting for TiddlyWiki documents.
{{Note|
It is advised to use a descriptive topic title and provide a ''concise'' description of the problem.
Unrelated problems should be discussed in separate threads.
}}
{{Quote|1=[http://groups.google.com/group/TiddlyWiki/msg/7d674a17d6a39898 FND]|2=
Generally speaking, there are a variety of reasons which could result in lack of feedback, e.g.
* bad timing: we might simply have missed your post (e.g. due to stress, holidays etc.) - bumping the thread after a few days usually helps
* reproducibility: it's important for us to have all the details we need to properly analyze the problem (cf. http://tiddlywiki.org/wiki/Troubleshooting)
* unclear expectations: sometimes it's not immediately obvious what the question is (also see below)
* mixing topics: separate issues should be discussed separate threads - this also helps recognizing which issues are still unsolved
* excessive verbosity: concise posts often have better chances of getting a response (AKA TLDR... ); while the personal background story might be (and indeed, often is) interesting, it's usually secondary to the actual issue
}}
== See Also ==
* [[Safe Mode]]
* [[:Category:Errors]]
* [[:Category:Browser Issues]]
/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{
// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'aid1';
// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too
// disable autosave in d3
if (window.location.protocol != "file:")
config.options.chkGTDLazyAutoSave = false;
// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}
// create some shadow tiddler content
merge(config.shadowTiddlers,{
'WelcomeToTiddlyspot':[
"This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //What now?// @@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
"<<tiddler TspotControls>>",
"See also GettingStarted.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// @@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Help!// @@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n")
});
//}}}
[[TiddlyWiki]] community members using [http://en.wikipedia.org/wiki/Twitter Twitter]:
* [http://twitter.com/cdent Chris]
* [http://twitter.com/FND FND]
* [http://twitter.com/dr1ft3r James]
* [http://twitter.com/Jermolene Jeremy]
* [http://twitter.com/jayfresh Jon]
* [http://twitter.com/buddenisms Martin]
* [http://twitter.com/ocalTW ocalTW]
* [http://twitter.com/Casablanca Phil]
* [http://twitter.com/philhawksworth Phil]
* [http://twitter.com/psd Paul]
* [http://twitter.com/SaqImtiaz Saq]
* [http://twitter.com/simonmcmanus Simon]
* [http://twitter.com/XavierVerges Xavier]
[[Category:Community]]
In rare instances, malformed wiki markup can cause this exception when the respective tiddler is being rendered.
== See Also ==
* [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/5d7f90e2fea5cb9c <nowiki>[tw]</nowiki> error:malformed URI sequence]
[[Category:Errors]]
{{Incomplete}}
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
[http://unamesa.org UnaMesa] acts as the custodian of the [[open source]] license for [[TiddlyWiki]]'s source code.
A non-profit, world-wide association of individuals from industry, academia, and NGOs, UnaMesa, provides free software tools and web services for schools, clinics, and other community organizations.
It acts as an R&D organization to meet its goal; "for every student, educator, patient, and caregiver to have access to the information they need when they need it."<ref>http://about.unamesa.org</ref>
For UnaMesa, the TiddlyWiki project is part of a greater endeavor "to improve the interoperability of digital records, especially educational materials"<ref> http://tiddlywiki.projects.unamesa.org</ref>.
UnaMesa operates at the intersection between open source, fair trade and social networks so that it can develop new models of trust and hold information for public benefit.<ref>http://www.unamesa.org/about/overview.pdf</ref>
== External Resources ==
* [http://vimeo.com/tag:unamesa UnaMesa videos]
== References ==
<references />
[[category:stakeholders]]
{{Incomplete}}
Since TiddlyWiki is a single-file application that runs entirely in the browser, there is no complex uninstalling process.
Simply deleting the file from the hard drive will leave no other traces.
Since version 2.4.0, [[TiddlyWiki]] has an automated upgrade mechanism which can be accessed via the [[backstage]]'s ''Upgrade'' tab. (Naturally, this mechanism only works for upgrading documents from v2.4.0 onwards.)
== Upgrading from Earlier Versions ==
Older TiddlyWiki documents (before v2.4.0) can be upgraded by [[downloading]] the latest release and [[importing]] all [[tiddlers]] from the original document.
(cf. [http://www.tiddlywiki.com/#HowToUpgradeOlderTiddlyWikis HowToUpgradeOlderTiddlyWikis])
== External Resources ==
* [[TiddlyWiki]] core [http://trac.tiddlywiki.org/wiki/History revision history]
{{Review}}
This how-to will describe how you can upgrade your current TiddlyWiki to version 2.1.x.
==Should I upgrade?==
TiddlyWiki 2.1 has a [http://trac.tiddlywiki.org/tiddlywiki/wiki/ReleaseNoteTwoPointOne bunch of great features] (including proper handling for RSS feeds, which is ''great'') but if you are using Tom Otvos' [http://dcubed.ca D<sup>3</sup>], Simon Baird's [http://monkeygtd.tiddlyspot.com MonkeyGTD], or some other heavily customised TiddlyWiki setup, you might want to hold off until your setup has been adapted for 2.1.
These instructions cover normal TiddlyWikis and TiddlyWikis stored at tiddlyspot.com. If you are using a server side such as ccTiddly or ZiddlyWiki, these instructions are not for you -- please check with the maintainer of your serverside for upgrade instructions.
==Step By Step==
===Download your TiddlyWiki to your hard drive===
If you don't have your TW stored locally, copy it to your hard drive. If you are hosting your TiddlyWiki on tiddlyspot.com, use the 'download' link in the right column or in the tiddlyspotControls tiddler.
It's convenient to make a clean folder to put your files into. You can delete it when you're done (after you copy your final TiddlyWiki file to somewhere else, of couse).
===Make some backups===
This is '''very important'''. It's worth making at least three copies of your TiddlyWiki file -- one "working copy" that you will be doing the upgrade on, one as a backup, and one pristine copy for when you break the first backup :) I like to put an additional pristine copy right on my desktop, in case I accidentally delete the whole folder somehow.
If it all goes wrong, you can restore your original TiddlyWiki at any time by just copying your pristine backup over the top of your broken file. If you use tiddlyspot, or use the UploadPlugin to save to your own server, you can restore a backup by opening the backup file in your browser, entering your upload password, and clicking the "upload" button.
===Get the latest version of TiddlyWiki===
The latest copy of TiddlyWiki is always available as the file "empty.html" from tiddlywiki.com. Right-click on [http://www.tiddlywiki.com/empty.html this link] and choose "save link" or "save target". Save the file as "empty.html" in the same folder as your other TiddlyWiki files.
===Do the upgrade===
Now you can follow the [http://tiddlywiki.com/#HowToUpgrade procedure from tiddywiki.com] for actually upgrading your working copy. I will summarise it here:
# open your working copy in your browser.. let's say the file is called "mytw.html"
# minimise your browser without closing it
# delete the "mytw.html" file (don't worry.. remember, you made backups!)
# make a copy of the "empty.html" file and rename it to "mytw.html"
# switch back to your browser window and click "save to disk" or "save"
# close your browser window
Saving takes the contents from your open browser window and inserts them into the new file. TiddlyWiki rocks, hey.
Thanks to the sweet import feature of TiddlyWiki 2.1, there is an alternative to this part of the procedure, which is [[#Alternative_method|documented below]].
Note: Alternatively you may just want to rename your mytw.html to say mytw.html.old before you rename your empty.html to mytw.html but working with many backups is certainly fun too.
===Test, test, test===
You now have an upgraded copy of your TiddlyWiki. Before doing anything else, make another backup copy, maybe call it "post21upgrade.html". Now you need to test your new TiddlyWiki. Open the "mytw.html" file up and see what happens.
If you have plugins installed, check they are still doing what you expect. Now might be a good time to review your plugins are see if they are all up to date -- even if you don't see a problem, it's usually worth installing the latest versions of any plugins you use. Perhaps some plugins could be removed (TW 2.1 has all sorts of good stuff baked right in that you used to need a plugin for, like importing tiddlers).
If you don't have any plugins, you just need to check your content to make sure it still looks how it should. There are some small changes to the formatter that could make things look odd, but if you come across that you should be able to update your content fairly easily.
Remember to check other browsers too.
===If necessary, restore tiddlyspot buttons===
If you've just upgraded a tiddlyspot TiddlyWiki, you will have lost some buttons and things from the right side column. They're easy to restore:
# open your new 2.1 version and a backup copy in two browser windows
# open SideBarOptions and OptionsPanel in both TiddlyWikis (find those tiddlers in tab More > Shadowed)
# REPLACE the contents of SideBarOptions in your new TW with the contents from your old TW
# COPY the top two lines from OptionsPanel in your old TW into the OptionsPanel in your new TW
# save your new TW and close both windows
# re-open your new TW and check your sidebar
===Put your new TiddlyWiki where it should go===
Once you are happy with your upgrade, you can copy your latest TW file wherever you normally keep it. If you use tiddlyspot.com, just click "Upload" or "save to web" and your site will be updated.
Keep a hold of your backups for at least a few weeks, just in case.
And you're done!
==More support==
Remember your backups, you can restore your old TiddlyWiki at any time.
If you're confused or need more information, the [http://groups.google.com/group/TiddlyWiki TiddlyWiki mailing list] is there to help. Most queries get answered in less than a day, and often in a few hours.
If you are having problems with a tiddlyspot TiddlyWiki, you can also email [mailto:support@tiddlyspot.com support@tiddlyspot.com] for help.
==Alternative method==
An alternative to the "[[#Do_the_upgrade|Do the upgrade]]" section above is to use TW2.1's built-in import tiddlers feature.
First, do the backup, new folder, download empty.html file, etc as above. Then:
# open the "empty.html" file
# click on "options" to open the sliding panel
# click on "ImportTiddlers" at the bottom of the options panel
# click "browse", select your old TiddlyWiki file, and click "fetch"
# you should see a list of all the tiddlers from your old file
# select them all by clicking the checkbox in the table heading
# click "more actions", and select "Import these tiddlers"
Then save, test etc as above.
==Corrections==
Please feel free to edit this page with any corrections, or if you prefer, email [mailto:danielbaird@gmail.com danielbaird@gmail.com] with comments.
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 13/10/2009 17:01:01 | YourName | [[aid1.tiddlyspot.com.html|file:///C:/DOKUME~1/Wolfgang/Desktop/TiddlyDesktop/aid1.tiddlyspot.com.html]] | [[store.cgi|http://aid1.tiddlyspot.com/store.cgi]] | . | [[index.html | http://aid1.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 3,
date: new Date("Feb 24, 2008"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
if (!params) params = {};
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
var rssString = generateRss();
// no UnicodeToUTF8 conversion needed when location is "file" !!!
if (document.location.toString().substr(0,4) != "file")
rssString = convertUnicodeToUTF8(rssString);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == 404)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}
{{Plugin
|Name=UploadTextMacro
|Author=[[User:JayFresh{{!}}jayfresh]] (based heavily on [[User:BidiX{{!}}BidiX]]'s UploadToFileMacro)
|Description=Allows you to upload text strings as files to TiddlyHome
|Version=1
}}
* '''CodeRepository:''' http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/plugins/TemplatePlugin.js
* '''License:''' [http://www.opensource.org/licenses/bsd-license.php BSDLicense]
* '''TiddlyWiki CoreVersion:''' 2.3
UploadTextMacro provides you with the following macro:
* uploadText - depends on [[TemplatePlugin]], [[UploadPlugin]]
=== Usage ===
<<uploadText filename template>>
Parameters:
* filename - the name of the file to be saved on the server
* template - the name of the tiddler containing the template to be used
=== Description ===
Uses BidiX's UploadPlugin combined with the TemplatePlugin to send the output of a template up to a server running BidiX's store.php e.g. TiddlyHome.
== Inline HTML ==
Generally, to use HTML within a tiddler, the HTML code must be within HTML tags (<html>html code</html>).<br />
For example, to create an external link using HTML type:
<pre>
<html>
<a href="http://www.domain.com/" title="Witty remark">Domain</a>
</html>
</pre>
within a tiddler. Advantages to this method are, conservatively, two-fold: 1)It is an alternative for those adept at HTML and 2)It allows easy inserting of a tool-tip.
== HTML Entities ==
Entities that are normally used within HTML documents can also be used in tiddlers without any special formatting.<br />
For example, to pseudo-copyright a rant, type:
<pre>
My very long rant©(&copy;)
</pre>
within a tiddler.
== See Also ==
* [[Special Characters and Symbols]]
== External Resources ==
* [http://www.tiddlytools.com/#HTMLFormattingPluginInfo HTML Formatting Plugin]<br />
* [http://www.tiddlywiki.com/#InlineHTML Inline HTML]<br />
* [http://www.tiddlywiki.com/#HtmlEntities HTML Entities]<br />
* [http://www.w3schools.com/TAGS/ref_entities.asp HTML Entities Reference]<br />
{{Incomplete}}
[[TiddlyWiki]]'s user interface is highly [[Customization|customizable]].
This page documents and explains the default appearance.
== Interface Components ==
* [[Main Menu]]
* [[Display Area]]
* [[Sidebar]]
** [[Search]]
** [[Controls]]
** [[Options]]
** [[Contents]]
* [[Backstage]]
** [[Controls]]
** [[Options]]
** [[Username]]
** [[Plugins]]
** [[Importing]]
** [[Upgrading]]
** [[Synchronizing]]
[[Category:UI]]
''>>''[http://www.tiddlywiki.org/index.php?title=User_talk:Bentrem&action=edit§ion=new leave a message]''<<
HiYa -<br />
I came across RippleRap / note saver via Confabb for #pdf2008 ... awesome! --[[User:Bentrem|Bentrem]] 20:33, 23 June 2008 (UTC)
----
I'm using [http://wiki.osmosoft.com/alpha/pardelib osmosoft.com/alpha/pardelib] as my test bed.
And, by way of introduction:<br />
* http://bentrem.sycks.net<br />
* http://groundplane.wordpress.com<br />
* http://twitter.com/bentrem/
----
Glad you like it! Most of the credit goes to Paul Downey and Phil Hawksworth who are out at PDF in New York right now. [[User:Casablanca|Casablanca]] 08:03, 24 June 2008 (UTC)
:Hi there! Yaa, I'm snooping the whole [http://www.ripplerap.com/ RippleRap] thing ... I think purpose-built verticals (ultimately?) is brill. cheers!
----
'''''Colophon''''': I've been working towards a system for "participatory deliberation" since 1975. (I was doing CMC in '72 ... no shit ... SigInt, interdicting the Evuhl Empire ... that was another time, practically another world.)<br />
A few years back I suffered a catastrophic HD failure and toiled mightily to restore at least my core docs. I brought some of them together in what is my cornerstone site:
[http://bentrem.sycks.net/gnodal/|bentrem.sycks.net/gnodal/ "Participatory Deliberation; It's About Discourse!"]
<math>Insert formula here</math>
[http://bidix.info BidiX.info]
Casablanca is the online handle of [[Phil Whitehouse]] - click on that link for more details.
[http://burningchrome.com some stuff on the web]
Chris Dent is a collaboration and web dood. He's worked on PurpleWiki and Socialtext. He thinks of [[TiddlyWiki]] as one of the first good implementations of microcontent. Spending some time working on [[TiddlyWeb]].
== TiddlyTools / ELS Design Studios ==
[[Image:Eric3.gif]]
[http://about.UnaMesa.org/Eric+Shulman About Eric Shulman]
[http://www.tiddlytools.com TiddlyTools]
TiddlyTools presents '''Technologies, Techniques, Tricks, Tips, Tweaks and Tutorials for TiddlyWiki readers, authors and developers''', using a combination of plugins, macros, scripts, templates, and stylesheets from Eric L Shulman/ELS Design Studios, as well as other sources, to customize the default features and functions provided by the TiddlyWiki standard distribution.
'''''Think of TiddlyTools as a kind of virtual hardware store and "demonstration showroom", offering tools, parts and techniques that help you to author your own TiddlyWiki documents.'''''
The standard TiddlyWiki system provides the foundation, framing, walls, roof, windows/doors, etc. as well as basic plumbing, heating, and electrical wiring to offer a solid, general-purpose "info-house". Then, TiddlyTools helps you with all the "finish work": the fixtures, appliances, lighting, carpets, wallpaper, cabinets, furniture, etc. that lets you '''turn your "info-house" into a custom-built "info-home"''', optimized to hold all your TiddlyWiki content.
<div style="width: 50%; margin: 0 auto 1em; border: 2px solid #025E9D; text-align: center; background-color: #F9F9F9;">
[[Main Page]] |
[[Special:Recentchanges|Recent Changes]] |
[[Special:Search|Search]] |
[[User:FND/MediaWiki Skin|TW4MW]] |
[[User:FND/Agenda|Agenda]]
</div>
== About ==
* [http://twitter.com/FND Twitter]
* [http://fnd.lewcid.org/blog/ blog]
== TiddlyWiki Projects ==
* [[/Plugin Ideas|Plugin Ideas]]
== Wiki Contents ==
=== Guides ===
==== End-Users ====
* [[Filtering]]
* [[Multi-User TiddlyWiki]] (cf. [http://groups.google.com/group/TiddlyWiki/browse_thread/thread/a66b40740fb83ba7 <nowiki>[tw]</nowiki>])
** related: [[Server-Side TiddlyWiki]], [[Revision History]]
==== Developers ====
* [[Dev:Macro Parameters|Macro Parameters]]
* [[Dev:Extended Fields|Extended Fields]]
=== Meta ===
* License
* [[Help:Help|Help]]
** Extension Capabilities
* [[Meta:Policy|Policies]] (e.g. use of templates and categories)
=== Organization ===
* [http://www.tiddlywiki.org/index.php?title=Special:Uncategorizedpages&limit=500&offset=0 uncategorized pages]
== MediaWiki Administration ==
→ [[/MediaWiki]]
* abandoning the term "verticals" in favor of something less opaque
* ThemeSwitcher
** overriding shadow tiddlers (nuking TiddlyWiki's default styles)
** <code>Apply</code> buttons instead of radio-button selection
** core component vs. plugin module [obsolete?]
* upgrading
** process (semi-automated?)
** [http://groups.google.com/group/TiddlyWikiDev/t/53c0b136c5b3eddb official plugin repository]
* ImportTiddlers UI (cf. [http://fnd.lewcid.org/tmp/ImportTiddlersUI.html draft])
* WikiWords as optional module
Issues concerning the administration of this wiki.
== Layout/Skin ==
* [[/MediaWiki Skin|MediaWiki skin]]
* [http://groups.google.com/group/tiddlywikidocs/t/49937320266fb3b4 layout issues]
== Settings ==
* <strike>[http://www.mediawiki.org/wiki/Manual:%24wgSitename rename site] (designation yet unclear?)</strike>
* <strike>[http://www.mediawiki.org/wiki/Manual:%24wgMetaNamespace rename meta namespace] to "Meta"</strike>
* <strike>[http://meta.wikimedia.org/wiki/Subpages#Administration enable subpages]</strike>
* <strike>[http://www.mediawiki.org/wiki/Manual:%24wgEnableUploads enable file uploads]</strike>
* <strike>[http://www.mediawiki.org/wiki/Manual:%24wgAllowExternalImages enable external images]</strike>
* <strike>enable e-mail notifications</strike>
* enable anonymous edits (after the initial seed-posting phase has been completed)
* <strike>[http://www.mediawiki.org/wiki/Manual:Short_URL eliminate <tt>index.php</tt> from the URL]</strike>
* <strike>add Dev [http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces namespace]</strike>
== Extensions ==
* Google search:
** [http://www.mediawiki.org/wiki/Extension:GoogleSiteSearch GoogleSiteSearch]
** [http://www.mediawiki.org/wiki/Extension:Google_Custom_Search_Engine Google Custom Search Engine]
* [http://www.mediawiki.org/wiki/Manual:Combating_spam anti-spam]: <strike>ConfirmEdit</strike>, <strike>SpamBlacklist</strike>, [http://www.mediawiki.org/wiki/Extension:ReCAPTCHA ReCAPTCHA]
* [http://www.mediawiki.org/wiki/Extension:Oversight Oversight]: allows revisions to be permanently hidden from all users
* <strike>[http://meta.wikimedia.org/wiki/Newuserlog Newuserlog]: adds a log of new users to [[Special:Log]]</strike>
* <strike>[http://www.mediawiki.org/wiki/Extension:New_User_Email_Notification New User Email Notification]</strike>
* <strike>[http://www.mediawiki.org/wiki/Extension:Special_page_to_work_with_the_interwiki_table Special:Interwiki]: adds a special page to modify the interwiki table</strike>
* <strike>[http://meta.wikimedia.org/wiki/Cite/Cite.php Cite]: allows the creation of references (footnotes)</strike>
* <strike>[http://meta.wikimedia.org/wiki/Parser_functions Parser] [http://www.mediawiki.org/wiki/Extension:Parser_function_extensions Functions]: required for conditional templates</strike>
* [http://www.mediawiki.org/wiki/Extension:SecureHTML SecureHTML]: enable raw HTML within protected pages
* <strike>[http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/PageCSS/ PageCSS]: enables embedded CSS rules for wiki pages</strike>
* <strike>[http://www.mediawiki.org/wiki/Extension:CreateBox CreateBox]: input boxes for easy creation of new articles</strike>
* <strike>[http://www.mediawiki.org/wiki/Extension:TalkHere TalkHere]: adds the discussion page of each article to the bottom of the article page and provides an input box for easy commenting</strike>
* <strike>[http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi SyntaxHighlight GeSHi]: syntax highlighting</strike>
* <strike>[http://www.mediawiki.org/wiki/Extension:SimpleTable SimpleTable]</strike>
* <strike>[http://www.mediawiki.org/wiki/Extension:Renameuser Renameuser]</strike>
* <strike>[http://wiki-tools.com/Extension:Wiki_Category_Tag_Cloud Wiki Category Tag Cloud]</strike>
* <strike>[http://www.mediawiki.org/wiki/Extension:RandomInclude RandomInclude]</strike>
* [http://www.mediawiki.org/wiki/Extension:C_Style_Wiki_Includes C-Style Wiki Includes] (for automatically updating plugins, e.g. from SVN)
== Misc. Tweaks ==
* <strike>move CSS for removing Main Page title from [[MediaWiki:Common.css|Common.css]] to [[Main Page]] (requires PageCSS extension)</strike>
* <strike>[http://www.wikia.com/wiki/User:Splarka/tricks#Tabbed_navigation_.28folding_wiki_tabs.29 tabbed navigation]</strike>
* edit footer messages
** [[MediaWiki:Copyright]]
** [[Mediawiki:disclaimers]]
** [[Mediawiki:disclaimerpage]]
** [[Mediawiki:aboutsite]]
** [[Mediawiki:aboutpage]]
** [[Mediawiki:Privacy]]
** [[Mediawiki:privacypage]]
<css>
strike,
strike a {
color: #AAA !important;
}
strike a.external {
padding: 0 !important;
border-bottom: 1px dashed #AAA !important;
background-image: none !important;
}
</css>
__TOC__
== Resources ==
* [http://fnd.lewcid.org/svn/TW4MW/ SVN repository]
* static version: [http://www.tiddlywiki.org/skins/TW4MW.html sample]
* dynamic version:
** [http://www.tiddlywiki.org/index.php?title=Main_Page&useskin=tw4mw Main Page] ([http://www.tiddlywiki.org/index.php?title=Talk:Main_Page&useskin=tw4mw talk], [http://www.tiddlywiki.org/index.php?title=Main_Page&useskin=tw4mw&action=edit edit])
** [http://www.tiddlywiki.org/index.php?title=Template:OptionalTableRow&useskin=tw4mw Template:OptionalTableRow] ([http://www.tiddlywiki.org/index.php?title=Template_talk:OptionalTableRow&useskin=tw4mw talk], [http://www.tiddlywiki.org/index.php?title=Template:OptionalTableRow&useskin=tw4mw&action=edit edit])
** [http://www.tiddlywiki.org/index.php?title=User:FND&useskin=tw4mw User:FND] ([http://www.tiddlywiki.org/index.php?title=User_talk:FND&useskin=tw4mw talk], [http://www.tiddlywiki.org/index.php?title=User:FND&useskin=tw4mw&action=edit edit])
* [http://www.tiddlywiki.org/skins/tw4mw/SvnUpdate.php SVN update script]
== Issues ==
* font is too large (especially noticeable on [http://www.tiddlywiki.org/index.php?title=Main_Page&useskin=tw4mw Main Page])
* page toolbar: ugly both when tabs are flush and with a small horizontal gap
* footer:
** contents not vertically centered when footer text spans only a single line [not universally solvable?]
** contents not perfectly centered (horizontally) when there is only one icon [not universally solvable?]
* CSS issues on [[Main Page]] (caused by embedded styles - though potentially also by [[MediaWiki:Common.css]])
* [[User_talk:FND/MediaWiki_Skin#Bug_Reports|bugs]]
== To Do ==
=== Page Contents ===
* <code>UL</code> bullet icons
* table of contents (<code>.toc</code>, <code>#toc</code>)
* external links: icons (on the left?)
** URLs: [http://commons.wikimedia.org/wiki/Image:Crystal_Clear_app_browser.png option 1], [http://commons.wikimedia.org/wiki/Image:Crystal_Clear_app_internet.png option 2]
* special pages
** DIFF view
** page history
** user preferences
** [?]
=== Layout Elements ===
* toolbox as dropdown menu (e.g. next to the page toolbar)
* sidebar links with thick left border instead of bullet (cf. [http://paste.css-standards.org/24380/view testcase])
* [http://www.aboutus.org/UniversalWikiEditButton UWEB] for section edit links
* special styles
** [[Image:Exclamation Mark Symbol.png|important]] edit mode
** [[Special:Preferences]]
* category links: use icons from [http://tiddlythemes.com/empties/Hawk.html HawkTheme] or [http://www.osmosoft.com BlazeTheme] (and remove respective header)
=== Visual Theme ===
* [[Image:Exclamation Mark Symbol.png|important]] color theme (cf. [http://www.216colors.com/colors.shtml Thematic Color Combinations], [http://kuler.adobe.com Kuler Color Schemes])
* logo:
** http://trac.tiddlywiki.org/wiki/TiddlyWikiDotOrgLogos
** ninja logo?
** TW-like shadow for site title and tagline
* image below the sidebar — e.g.:<pre>#sidebar { padding-bottom: 320px; background: transparent url(http://bunnywarez.com/catalog/images/ninjaKitty_black.jpg) no-repeat center bottom; }</pre>
* Trac-like layout? (e.g. menu bar = page toolbar)
* TW-like shadow for site title and tagline?
=== Features ===
* user-customizable quicklinks
** performance issues with pulling data from pages<br>⇒ use JavaScript instead; list is created from two-dimensional array (can be overriden by user's <code>Common.js</code>)
=== Post-Alpha ===
* [[Image:Exclamation Mark Symbol.png|important]] remove/fix DEBUG flags
* code sanitizing
** move colors to separate style sheet
** move images to separate sub-folder
** <s>modularize code (individual sections/portlets as functions)</s> not viable due to performance issues
** improve readability (esp. Toolbox section)
** check for compatibility (=> retain Monobook IDs where possible)
* validate XHTML / CSS
* test in all major browsers (Internet Explorer 6+, Firefox, Opera, Safari, Konqueror etc.)
* meta information
** ReadMe
** documentation in <code>TW4MW.php</code>
** credits
*** graphics / icons
* announce on <code>[MW-l]</code>
== Features ==
* three main criteria
# look distinctively different from the default MonoBook skin
# still look familiar enough, navigation-wise
# have some resemblance to the default TiddlyWiki layout (e.g. user bar = backstage area; categories = tags etc.)<br>missing bonus: resemblance to Trac
* KISS (virtually no hacks)<br>⇒ very flexible; easy to modify with CSS only
* fully XHTML-compliant (Transitional only because of MediaWiki parser output)
* MonoBook-compatible (kept most IDs)
== See Also ==
* [http://www.mediawiki.org/wiki/Manual:Skinning MediaWiki Manual: Skinning]
== References ==
<references/>
__TOC__
== Resources ==
* [http://fnd.lewcid.org/svn/TW4MW/ SVN repository]
* static version: [http://www.tiddlywiki.org/skins/TW4MW.html sample]
* dynamic version:
** [http://www.tiddlywiki.org/index.php?title=Main_Page&useskin=tw4mw Main Page] ([http://www.tiddlywiki.org/index.php?title=Talk:Main_Page&useskin=tw4mw talk], [http://www.tiddlywiki.org/index.php?title=Main_Page&useskin=tw4mw&action=edit edit])
** [http://www.tiddlywiki.org/index.php?title=Template:OptionalTableRow&useskin=tw4mw Template:OptionalTableRow] ([http://www.tiddlywiki.org/index.php?title=Template_talk:OptionalTableRow&useskin=tw4mw talk], [http://www.tiddlywiki.org/index.php?title=Template:OptionalTableRow&useskin=tw4mw&action=edit edit])
** [http://www.tiddlywiki.org/index.php?title=User:FND&useskin=tw4mw User:FND] ([http://www.tiddlywiki.org/index.php?title=User_talk:FND&useskin=tw4mw talk], [http://www.tiddlywiki.org/index.php?title=User:FND&useskin=tw4mw&action=edit edit])
* [http://www.tiddlywiki.org/skins/tw4mw/SvnUpdate.php SVN update script]
== Issues ==
* font is too large (especially noticeable on [http://www.tiddlywiki.org/index.php?title=Main_Page&useskin=tw4mw Main Page])
* page toolbar: ugly both when tabs are flush and with a small horizontal gap
* footer:
** contents not vertically centered when footer text spans only a single line [not universally solvable?]
** contents not perfectly centered (horizontally) when there is only one icon [not universally solvable?]
* CSS issues on [[Main Page]] (caused by embedded styles - though potentially also by [[MediaWiki:Common.css]])
* [[User_talk:FND/MediaWiki_Skin#Bug_Reports|bugs]]
== To Do ==
=== Page Contents ===
* <code>UL</code> bullet icons
* table of contents (<code>.toc</code>, <code>#toc</code>)
* external links: icons (on the left?)
** URLs: [http://commons.wikimedia.org/wiki/Image:Crystal_Clear_app_browser.png option 1], [http://commons.wikimedia.org/wiki/Image:Crystal_Clear_app_internet.png option 2]
* special pages
** DIFF view
** page history
** user preferences
** [?]
=== Layout Elements ===
* toolbox as dropdown menu (e.g. next to the page toolbar)
* sidebar links with thick left border instead of bullet (cf. [http://paste.css-standards.org/24380/view testcase])
* [http://www.aboutus.org/UniversalWikiEditButton UWEB] for section edit links
* special styles
** [[Image:Exclamation Mark Symbol.png|important]] edit mode
** [[Special:Preferences]]
* category links: use icons from [http://tiddlythemes.com/empties/Hawk.html HawkTheme] or [http://www.osmosoft.com BlazeTheme] (and remove respective header)
=== Visual Theme ===
* [[Image:Exclamation Mark Symbol.png|important]] color theme (cf. [http://www.216colors.com/colors.shtml Thematic Color Combinations], [http://kuler.adobe.com Kuler Color Schemes])
* logo:
** http://trac.tiddlywiki.org/wiki/TiddlyWikiDotOrgLogos
** ninja logo?
** TW-like shadow for site title and tagline
* image below the sidebar — e.g.:<pre>#sidebar { padding-bottom: 320px; background: transparent url(http://bunnywarez.com/catalog/images/ninjaKitty_black.jpg) no-repeat center bottom; }</pre>
* Trac-like layout? (e.g. menu bar = page toolbar)
* TW-like shadow for site title and tagline?
=== Features ===
* user-customizable quicklinks
** performance issues with pulling data from pages<br>⇒ use JavaScript instead; list is created from two-dimensional array (can be overriden by user's <code>Common.js</code>)
=== Post-Alpha ===
* [[Image:Exclamation Mark Symbol.png|important]] remove/fix DEBUG flags
* code sanitizing
** move colors to separate style sheet
** move images to separate sub-folder
** <s>modularize code (individual sections/portlets as functions)</s> not viable due to performance issues
** improve readability (esp. Toolbox section)
** check for compatibility (=> retain Monobook IDs where possible)
* validate XHTML / CSS
* test in all major browsers (Internet Explorer 6+, Firefox, Opera, Safari, Konqueror etc.)
* meta information
** ReadMe
** documentation in <code>TW4MW.php</code>
** credits
*** graphics / icons
* announce on <code>[MW-l]</code>
== Features ==
* three main criteria
# look distinctively different from the default MonoBook skin
# still look familiar enough, navigation-wise
# have some resemblance to the default TiddlyWiki layout (e.g. user bar = backstage area; categories = tags etc.)<br>missing bonus: resemblance to Trac
* KISS (virtually no hacks)<br>⇒ very flexible; easy to modify with CSS only
* fully XHTML-compliant (Transitional only because of MediaWiki parser output)
* MonoBook-compatible (kept most IDs)
== See Also ==
* [http://www.mediawiki.org/wiki/Manual:Skinning MediaWiki Manual: Skinning]
== References ==
<references/>
Jonathan Lister aka jayfresh works for [http://www.osmosoft.com Osmosoft]
*e: jon [at] osmosoft [dot] com
*w: www.jaybyjayfresh.com
*t: www.twitter.com/jayfresh
[http://martinswiki.com Martin's Wiki]
Phil Hawksworth
http://farm2.static.flickr.com/1210/buddyicons/40574794@N00.jpg
'''email:''' ph [at] osmosoft [dot] com
'''web:''' http://www.hawksworx.com
'''twitter ''' http://twitter.com/philhawksworth
== Contributions ==
'''Plugins'''
All Tiddlywiki plugins are published at http://svn.tiddlywiki.org/Trunk/contributors/PhilHawksworth/Plugins
'''Vertical Editions'''
*[[TeamTasks]] - TeamTasks is my primary TiddlyWiki vertical edition, a simple and extensible task management system.
*[[RippleRap]] - I contribute to the development of RippleRap, a collaborative note-taking tool for use at conferences and other events.
== My Stuff ==
* [[MPTW]]
* [[MonkeyGTD]]
* [[Tiddlyspot]]
== My "brag sheet" :) ==
* Since May 2005.
* Invented "Close Others" button
* Invented template based layout (though not the implementation)
* Created first ever plugin only (ie with an unhacked core) 'adaptation' site http://mptw1.tiddlyspot.com/ http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/4dd27f3aaa98ed13
== Etc ==
* http://simonbaird.com/
* http://twitter.com/simonbaird
This will be a list of questions I have about TiddlyWiki's functionality (my personal "Frequently Asked Questions").
If you have an answer to one, I'd appreciate it if you'd leave a reply on my [[User talk:TiddlerFiddler|talk page]]. I know people probably look at the [http://groups.google.com/group/tiddlywiki|TiddlyWiki Google Groups discussions] more often than this, and maybe I'll eventually find my answers there, and link them here. (You can do the same on my [[User talk:TiddlerFiddler|talk page]] if you find an answer in Google Groups.)
*Does [[TiddlySnip]] work with [[Firefox|Firefox 3.5]]? Has anyone been working on an update?
*How can I make the [[Tag (macro)|tag macro]] show a horizontal, wraparound list of tags, rather than a column dropdown list (so, for example, a tiddler with lots of tags could have a list at the bottom, placed similarly to the tag edit field)?
{{Note|
Changing the list style in the [[StyleSheet]] can make a list horizontal instead of vertical; you can also use this for the [[Tagging (macro)|tagging macro]], or other types of lists:<pre>.tagged li {display: inline; list-style-type: none;} /* horizontal tag list */
.tagging li {display: inline; list-style-type: none;} /* horizontal tagging list */</pre>
Additional styling and/or editing of the [[ViewTemplate]] can change the placement of the list.
}}
*How can I make the [[Tagging (macro)|tagging macro]] show the results in several columns rather than one (kind of like MediaWiki does on category pages, but not necessarily with the alphabet headers)?
http://farm1.static.flickr.com/50/152970965_b626dc13ee_s.jpg
Paul Downey:
http://blog.whatfettle.com
== General Comments ==
Dude that is awesome!!! Seriously I LOVE it. Well done. Can't wait.. :)
-- [[User:SimonBaird|SimonBaird]] 13:00, 5 September 2007 (BST)
----
Thanks Simon.
The colors still need some serious tweaking - but the main problem right now are the content styles; those will take some time, as I/we have to figure out step by step what's still missing...
-- [[User:FND|FND]] 13:03, 5 September 2007 (BST)
== Bug Reports ==
=== Beta Notice ===
* If [[MediaWiki:Beta Notice]] is empty, the notice will show up as "<Beta Notice>" (tested on local XAMPP setup)
=== Special Pages ===
* [[Special:Recentchanges]]: TransformChanges table extends beyond border
== Suggestions ==
* Header: Replace "Note: An alternative skin ... " with contents of TM4MW (beta) box when TM4MW skin is selected, freeing up some desktop space
:: Sorry, but that's not possible; that text is a [http://www.mediawiki.org/wiki/Sitenotice global notice] ([[MediaWiki:Sitenotice]]).
:: However, the current notice text will be changed or removed sooner or later anyway.
:: -- [[User:FND|FND]] 21:59, 6 February 2008 (UTC)
* Header: Replace second, redundant, TiddlyWiki.org with something link "a MediaWiki resource for TiddlyWiki" (with an link to www.tiddlywiki.com, presrably to open in a new tab/window
:: Good point - I've changed this to "TiddlyWiki Community Wiki" for now.
:: Unfortunately, I can't add a link; this text is defined by [[MediaWiki:Tagline]], but it's not being wikified.
:: -- [[User:FND|FND]] 21:59, 6 February 2008 (UTC)
{{Incomplete}}
{{Quote|Eric|
The current TiddlyWiki username value is stored internally in javascript as <code>config.options.txtUserName</code>.
To display/modify the value ''using an edit field'' embedded in tiddler content, you can use the core's built-in <code><<option>></code> macro, like this:
<pre>
<<option txtUserName>>
</pre>
However, to display the value directly as ''inline tiddler content'' (e.g. as part of the SiteTitle or SiteSubtitle), using
http://www.TiddlyTools.com/#WikifyPlugin
you can write:
<pre>
<<wikify "%0" {{config.options.txtUserName}}>>
</pre>
or use the [http://www.TiddlyTools.com/#InlineJavascriptPlugin InlineJavascriptPlugin] to write:
<pre>
<script>return config.options.txtUserName</script>
</pre>
}}
[[Image:TiddlyWiki 2.1.3 screenshot.png|thumb|TiddlyWiki.com, using TiddlyWiki version 2.1.3.]]
'''TiddlyWiki (http://www.TiddlyWiki.com/)''' is a kind of [[wiki science|wiki]] that typically is edited by only one person and is completely self-contained in a single web page. It uses [[HyperText Markup Language|HTML]], [[Cascading Style Sheets|CSS]] and [[JavaScript|JavaScript]] code. TiddlyWiki is open source and supported by many extensions and plugins that modify how it works or what it can do.
Using a TiddlyWiki to build a web page is a good idea because:
* it's fun
* it's simple to create
* it's simple to update
* it's simple to customise
* it's an innovative way of presenting text
This book will serve a reference for people who want to learn to read, write, customise or develop/code a TiddlyWiki. No technical knowledge will be assumed. Screenshots will be used liberally for faster learning, and the reader is encouraged to tinker with their own TiddlyWiki while reading this book.
==Contents==
for everyone:
* [[Introduction]]: what is a TiddlyWiki? history, examples, license info etc
* [[Resources]]: annotated and reviewed links
for readers:
* [[Reading]] - Confused by how a TiddlyWiki works? Overwhelmed by things popping up all over the place? Start here.
for writers:
* [[Uses]] - TiddlyWikis aren't suited for all purposes. This module will compare various tasks to the strengths of several different web authoring methods, including TiddlyWiki.
* [[Installing]] - The basic TiddlyWiki install couldn't be simpler - except with screenshots!
* [[Writing]] - using one - tags vs tiddlers
* [[Extras]] - extra functionality - useful plugins, extensions etc
* [[Customising]] - different look - themes/skins
for developers:
* [[Developing]] - creating plugins etc, where to release/publicise it
==See also==
* [[Wiki Science]]
==Feedback==
Comments or suggestions? Raise them at [[{{TALKPAGENAME}}]].
{{Stub}}
{{Subjects|Web applications}}
{{alphabetical|T}}
{{DDC|600}}
{{LOC|QA76.75}}
This [[macro]] shows the version number of the current [[TiddlyWiki]] document.
== Usage ==
<pre>
<<version>>
</pre>
[[Category:Macros]] [[Category:Core Macros]]
"Vertical" is the technical name for [[:Category:Adaptations|adaptations]].
[[Category:Adaptations]]
{{Review}}
Syntax: <<view fieldname how ...>>
Retrieves a specified field (given by fieldname) from the tiddler to be displayed and outputs its value in one of the following ways (the optional //how// parameter):
* (unspecified): render as is (without formatting)
* link: format as a link (using createTiddlyLink)
* wikified: format using all the normal rendering rules
* date: expects a value of the form YYYYMMDDHHMM and outputs it using either a specified format (...) or config.views.wikified.dateFormat
The standard field names are:
* title - the tiddler title
* tiddler - the tiddler title (as well)
* text - the text of the tiddler
* modifier - the person who last modified it
* modified - date&time of last modification
* created - when it was created
* tags - the tiddler tags
If your tiddlers contain custom fields, they could be specified as well.
The view macro is used extensively in the standard tiddler rendering templates (ViewTemplate and EditTemplate).
[[Category:Macros]]
Simon Baird created a way to view the colors of the [[ColorPalette]] alongside the color term they are assigned to. An application of Simon's code can be seen at [http://devpad.tiddlyspot.com/#TemplateShowColor%20ColorPaletteView]. Below are the steps:
#Create a tiddler called ViewPalette or ViewColorPalette or some equivalent.
#Insert the following code:
<pre><nowiki><<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','Background')}} Background>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','Foreground')}} Foreground>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','PrimaryPale')}} PrimaryPale>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','PrimaryLight')}} PrimaryLight>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','PrimaryMid')}} PrimaryMid>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','PrimaryDark')}} PrimaryDark>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','SecondaryPale')}} SecondaryPale>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','SecondaryLight')}} SecondaryLight>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','SecondaryMid')}} SecondaryMid>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','SecondaryDark')}} SecondaryDark>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','TertiaryPale')}} TertiaryPale>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','TertiaryLight')}} TertiaryLight>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','TertiaryMid')}} TertiaryMid>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','TertiaryDark')}} TertiaryDark>>
<<tiddler [[TemplateShowColor]] with:{{store.getTiddlerSlice('ColorPalette','Error')}} Error>></nowiki></pre>
3. Create another tiddler called TemplateShowColor.<br>
4. Insert the following code:
<pre><nowiki>
@@margin:0 1em;padding:0 4em;background-color:$1; @@ @@padding-right:1em;{{{$1}}}@@ [[$2|$3]]</nowiki></pre>
5. Close tiddlers to return to view mode.
== External Resources ==
* [http://devpad.tiddlyspot.com/#PaletteViewMacro PaletteViewMacro]
[[Category:Tools]]
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagging' macro='tagging'></div>
<div class='tagClear'></div>
<!--}}}-->
== External Resources ==
* [http://groups.google.com/group/TiddlyWiki/t/2b7fc7033a175af7 <nowiki>[tw] [OT]</nowiki> Vim syntax plugin for TiddlyWiki]
== Tiddler and Tag Relations ==
* [http://ideia.tiddlyspot.com TiddlerGraphPlugin]
* [http://tiddlytagmindmap.tiddlyspot.com TiddlyTagMindMap]
* [http://project.dahukanna.net/tiddlywiki/twextensions.htm#HypergraphPackage HypergraphPackage] (requires Java)
* [http://svn.tiddlywiki.org/Trunk/contributors/JeremyRuston/verticals/cecily/ Cecily] ([http://api.lewcid.org/chef/chef.cgi?recipe=http://svn.tiddlywiki.org/Trunk/contributors/JeremyRuston/verticals/cecily/cecily.html.recipe demo] — heavily work in progress; currently only works in [[Safari]] or [[Google Chrome]])
== Maps ==
* [http://www.jonrobson.me.uk/projects/GeoTiddlyWiki/index.html GeoTiddlyWiki]
== Verticals ==
* [http://www.jonrobson.me.uk/projects/VismoWiki/index.html VismoWiki (a work in progress not IE)]
[[Category:Tools]]
{{Incomplete}}
http://svn.tiddlywiki.org/Trunk/contributors/SaqImtiaz/plugins/WebDavPlugin.js
[[Category:Server-Sides]]
With TiddlyWiki you can:
* Keep your useful information handy
* Organise all your notes
* Make and manage a todo list
** Or a [[What is GTD?|GTD]] system
* Easily publish a dynamic [[TiddlyWiki_As_a_Website|web site]]
* Keep a journal
* Do anything you can do in another kind of wiki but without the setup hassle
* Do ([[Pen and Paper|almost]]) anything you can do with a pen and paper only with convenience of searching and tagging your data
* Write a "Choose Your Own Adventure" style book
[[Category:FAQ]]
[[Category:Basics]]
All you need to run TiddlyWiki is your web browser. Though it must be a reasonably recent browser that supports javascript. Firefox is reported to have the best support, but IE (6 or better), Opera, and Safari are also supported.
If you want to publish your TiddlyWiki then you'll need a web host (or a hosting service like the free http://www.tiddlyspot.com).
[[Category:FAQ]]
[[Category:Basics]]
Getting Things Done® (commonly known as GTD®) is "the groundbreaking work-life management system and book by David Allen that transforms personal overwhelm and overload into an integrated system of stress-free productivity." For more information see '''[http://www.davidco.com/what_is_gtd.php What is GTD?]''' or buy David Allen's book, '''[http://www.amazon.com/gp/redirect.html?link_code=ur2&tag=simonbaird-20&camp=1789&creative=9325&location=%2Fgp%2Fproduct%2F0142000280%2Fsr%3D1-1%2Fqid%3D1156381849%2Fref%3Dsr_1_1%3Fie%3DUTF8%26s%3Dbooks Getting Things Done: The Art of Stress Free Productivity]'''. If you already have that one then check out David's other book '''[http://www.amazon.com/gp/redirect.html?link_code=ur2&tag=simonbaird-20&camp=1789&creative=9325&location=%2Fgp%2Fproduct%2F0143034545%2Fsr%3D1-2%2Fqid%3D1156381849%2Fref%3Dsr_1_2%3Fie%3DUTF8%26s%3Dbooks Ready For Anything: 52 Productiviy Principles for Work and Life]'''.
[[TiddlyWiki FAQ|<< Back to FAQ list]]
[[Category:FAQ]]
[[Category:GTD]]
{{Review}}
* [[TiddlyWiki]] is a wiki.
* TiddlyWiki is a wiki that is programmed in javascript and runs entirely self-contained in your browser.
* TiddlyWiki is a revolutionary new way to manage information using microcontent.
=== TiddlyWiki in ten seconds... ===
by TomO (source http://dcubed.com/#TiddlyWiki)
* 10...TiddlyWiki is a web-based [http://en.wikipedia.org/wiki/Wiki wiki] that has a very rich Javascript runtime built into every page. If you are reading a TiddlyWiki document, you have the //entire// TiddlyWiki application, in addition to all the "articles" that make up the wiki itself.
* 9...The "articles" within a TiddlyWiki are called ''tiddlers'', and they are saved with the main HTML page used to view the document. If you open a TW document, you can see all the tiddlers saved at the bottom of the file.
* 8...When you view a TW document over the web, you are usually prohibited from making changes. For interactive, modifiable documents like this one, you typically need to save the document locally to your machine and work with it there.
* 7...Tiddlers can be referenced by their name but, more importantly, they can be arbitrarily ''tagged'' to categorize them. Tags may be freely modified, and there are numerous interface widgets within TW to list or find tiddlers by their tags.
* 6...When you click on an internal hyperlink to a tiddler, it will usually open up directly above or below the tiddler you are currently reading and should scroll immediately into view.
* 5...When you hover your mouse over a tiddler, a small context-sensitive ''tiddler menu'' appears above and to the right of the tiddler. One of the important items in this menu is ''edit'' (or ''view''), which allows you to view and modify the source for a tiddler.
* 4...Tiddler source is a combination of just plain text, plus special formatting commands in ''wiki-text'' that allow you to express style and layout for tiddlers without knowing any HTML. It is important to know that the formatting commands, tiddler menus, and just about everything else can be arbitrarily extended by third-party ''plug-ins'' to create custom solutions like this one.
* 3...2...1 That is it in a nutshell, but if you are still feeling a little lost, try this [http://www.blogjones.com/TiddlyWikiTutorial.html tutorial].
[[TiddlyWiki FAQ|<< Back to FAQ list]]
[[Category:FAQ]]
[[Category:Basics]]
A macro is a predefined function or operation that can be inserted into a tiddler contents. It is invoked whenever the tiddler is rendered normally, and typically inserts content into the rendered text at the point where it is referenced. Referencing a macro is done using the syntax:
<<macroName paramvalue1 paramvalue2>>
or with named parameters
<<macroName param1:value1 param2:'value2 with spaces'>>
There are [[Core_Macros|several macros]] built into the TiddlyWiki core. Many additional macros are available by installing [[What is a plugin?|Plugins]]
[[Category:FAQ]]
[[Category:Macros]]
Plugins are tiddlers that contain javascript code that is executed when your TiddlyWiki is first opened. The code usually does something useful such as provide new macros or change the behaviour of your TiddlyWiki.
[[Category:FAQ]]
[[Category:Plugins]]
TBA
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
{{Incomplete}}
Wiki links are internal links, pointing to [[tiddlers]] within the respective [[TiddlyWiki]] document.
The syntax is described in [[TiddlyWiki Markup#Links|TiddlyWiki Markup]].
== Loose Matching ==
By default, wiki links are case-sensitive.
This behavior can be changed with the [http://www.tiddlytools.com/#LooseLinksPlugin LooseLinksPlugin] or by using [[aliases]].
Wiki markup is a formatting syntax for wiki contents ("wikitext").
It is a highly simplified version of HTML, used for structuring textual contents.
As such, wiki markup offers a set of simple formatting codes that the wiki software (or "engine") then translates into HTML (a process often called "wikification") when the content is displayed in a browser.
Different wiki engines often have different syntax conventions.
This community wiki is powered by the [http://www.mediawiki.org MediaWiki] engine, which uses slightly different markup from [[TiddlyWiki]].
* [[TiddlyWiki Markup]]
* [[MediaWiki Markup]]
* [[Markdown|Markdown Markup (if you could call it that :)]]
''Note: while there isn't yet nice, userfriendly documentation of it on the wiki for it, there exist formatter plugins for many different types of wiki markup. Muchos Gracias to [[User:MartinBudden|MartinBudden]] for these. They can be found '''[http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/ here]'''.''
[[Category:Wiki Markup]] [[Category:Disambiguation]]
A [http://en.wikipedia.org/wiki/CamelCase#Wiki_linking WikiWord] (also known as ''WikiLink'' or ''CamelCase'' word) is any word that starts with a capital letter and contains at least one more capital letter.
WikiWords are often formed by joining two or more capitalized words (e.g. "GettingStarted", "AboutThisSite").
In [[TiddlyWiki]], as well as in many other wiki engines, WikiWords are automatically considered to be links to other [[tiddlers]] or pages.
== Disabling WikiWords ==
The automatic transformation of WikiWords can be prevented by using one of the following options:
* placing a tilde (~) in front of the respective word
* [[Escaping#Wiki Markup|escaping]] the contents (e.g. <code>"""CamelCaseButNotWikiWord"""</code>)
* installing the [http://www.tiddlytools.com/#DisableWikiLinksPlugin DisableWikiLinksPlugin], which also provides a variety of advanced options
[[Category:Formatting]]
[[Category:FAQ]]
[[Category:Using TiddlyWiki]]
[[TiddlyWiki]] is different from most wiki engines.
Its unique approach is that it works entirely client-side, running in the user's browser without the need for a server or program installation. (However, there are also [[Server-Sides|server-side adaptations]] of TiddlyWiki.)
[http://www.wikimatrix.org WikiMatrix] provides an overview and feature comparison of numerous wiki engines.
{{Incomplete}}
Wiki links are internal links, pointing to [[tiddlers]] within the respective [[TiddlyWiki]] document.
The syntax is described in [[TiddlyWiki Markup#Links|TiddlyWiki Markup]].
== Loose Matching ==
By default, wiki links are case-sensitive.
This behavior can be changed with the [http://www.tiddlytools.com/#LooseLinksPlugin LooseLinksPlugin] or by using [[aliases]].
Wiki markup is a formatting syntax for wiki contents ("wikitext").
It is a highly simplified version of HTML, used for structuring textual contents.
As such, wiki markup offers a set of simple formatting codes that the wiki software (or "engine") then translates into HTML (a process often called "wikification") when the content is displayed in a browser.
Different wiki engines often have different syntax conventions.
This community wiki is powered by the [http://www.mediawiki.org MediaWiki] engine, which uses slightly different markup from [[TiddlyWiki]].
* [[TiddlyWiki Markup]]
* [[MediaWiki Markup]]
* [[Markdown|Markdown Markup (if you could call it that :)]]
''Note: while there isn't yet nice, userfriendly documentation of it on the wiki for it, there exist formatter plugins for many different types of wiki markup. Muchos Gracias to [[User:MartinBudden|MartinBudden]] for these. They can be found '''[http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/ here]'''.''
[[Category:Wiki Markup]] [[Category:Disambiguation]]
|''Description:''|Wikipedia articles including Template:Infobox Airport|
|''Type:''|mediawiki|
|''URL:''|http://en.wikipedia.org/w/|
|''Workspace:''|Main|
|''TiddlerFilter:''|[template[Infobox_Airport]]|
|''Description:''|Prime Ministers|
|''Type:''|mediawiki|
|''URL:''|http://en.wikipedia.org/w/|
|''Workspace:''|Main|
|''TiddlerFilter:''|[template[Infobox_Prime_Minister]]|
{{Incomplete}}
http://wikklytext.com/wiki/
==Totally differing mark-up syntax between MediaWiki and TiddlyWiki==
<table border=1>
<tr><th> Formatting </th><th> MediaWiki </th><th> TiddlyWiki </th><th> What it looks like </th></tr>
<tr><td> Heading 1 </td><td><nowiki> =Heading= </nowiki></td><td><nowiki> !Heading </nowiki></td><td> <h1>Heading 1</h1> </td></tr>
<tr><td> Heading 2 </td><td><nowiki> ==Heading== </nowiki></td><td><nowiki> !!Heading </nowiki></td><td><h2>Heading 2</h2></td></tr>
<tr><td> Heading 3 </td><td><nowiki> ===Heading=== </nowiki></td><td><nowiki> !!!Heading </nowiki></td><td><h3>Heading 3</h3></td></tr>
<tr><td> Heading 4 </td><td><nowiki> ====Heading==== </nowiki></td><td><nowiki> !!!!Heading </nowiki></td><td><h4>Heading 4</h4></td></tr>
<tr><td> External links </td><td><nowiki> [http://google.com external site] </nowiki></td><td><nowiki> [[external site|http://google.com]] </nowiki></td><td> [http://google.com external site] </td></tr>
<tr><td> Images </td><td><nowiki> [[Image:SomeImageName.jpg]]</nowiki></td><td><nowiki> [img[http://url.to.SomeImageName.jpg]] </nowiki></td><td>No example</td></tr>
<tr><td> Bold </td><td><nowiki>'''Bold'''</nowiki></td><td><nowiki>''Bold'' </nowiki></td><td>'''Bold'''</td></tr>
<tr><td> Italic </td><td><nowiki>''Italic''</nowiki></td><td><nowiki>//Italic// </nowiki></td><td>''Italic''</td></tr>
<tr><td> Underline </td><td><nowiki><u>Underline</u></nowiki></td><td><nowiki>__Underline__ </nowiki></td><td><u>Underline</u></td></tr>
<tr><td> Strike out </td><td><nowiki><s>Strike out</s></nowiki></td><td><nowiki>--Strike out-- </nowiki></td><td><s>Strike out</s></td></tr>
</table>
==Almost identical mark-up syntax between MediaWiki and TiddlyWiki==
<table border=1>
<tr><th> Formatting </th><th> MediaWiki </th><th> TiddlyWiki </th><th> What it looks like </th></tr>
<tr>
<td>Unordered lists </td>
<td>
<pre>
<nowiki>
*List Item
**Sub Item
**#Mixed list type
</nowiki>
</pre>
</td>
<td>
<pre>
<nowiki>
*List Item
**Sub Item
###Mixed list type
</nowiki>
</pre>
</td>
<td>
*List Item
**Sub Item
**#Mixed list type
</td></tr>
<tr>
<td>Ordered lists </td>
<td>
<pre>
<nowiki>
#First item
#Second item
##Second level
###Third level
</nowiki>
</pre>
</td>
<td>
<pre>
<nowiki>
#First item
#Second item
##Second level
###Third level
</nowiki>
</pre>
</td>
<td>
#First item
#Second item
##Second level
###Third level
</td>
</tr>
</table>
==Identical mark-up syntax between MediaWiki and TiddlyWiki==
<table border=1>
<tr><th> Formatting </th><th> MediaWiki </th><th> TiddlyWiki </th><th> What it looks like </th></tr>
<tr><td> Horizontal ruler </td><td><nowiki> ---- </nowiki></td><td><nowiki> ---- </nowiki></td><td><hr /> </td></tr>
</table>
[[Category:{{FULLBOOKNAME}}|{{FULLCHAPTERNAME}}]]
{{Incomplete}}
[http://yourformbuilder.com YourFormBuilder] is a web application for designing, building, publishing, sharing and using web forms.
It is different from most [[TiddlyWiki]] adaptations in that it uses a heavily modified version of TiddlyWiki's core code.
== See Also ==
* [[YourTimeSheets]]
[[Category:Adaptations]]
/***
|''Name:''|[[YourSearchBookmarklet]]|
|''Version:''|2.1.3 (2008-04-16)|
|''Source:''|http://tiddlywiki.abego-software.de/#YourSearchPlugin|
|''Author:''|[[UdoBorkowski]], [[XavierVergés]]|
|''Licence:''|[[BSD open source license (abego Software)|BSDLicense]]|
|''Copyright:''|© 2005-2008 http://www.abego-software.de|
|''~CoreVersion:''|2.1.0 (2 Aug 07)|
|''Community:''|http://xdexavier.googlepages.com/yoursearch.html|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; ~InternetExplorer 6.0|
***/
//{{{
(function(){var a=document.createElement("script");a.src="http://tiddlywiki.abego-software.de/archive/YourSearchPlugin/YourSearchPlugin.js";a.onload=function(){refreshPageTemplate();displayMessage("YourSearch has been loaded")};document.getElementsByTagName("head")[0].appendChild(a)})();
//}}}
{{Incomplete}}
[http://yourtimesheets.com YourTimeSheets] is a web application for creating flexible time sheets.
It is different from most [[TiddlyWiki]] adaptations in that it uses a heavily modified version of TiddlyWiki's core code.
== See Also ==
* [[YourFormBuilder]]
[[Category:Adaptations]]
[http://www.ziddlywiki.org/ ZiddlyWiki] is a serverside implementation of [[TiddlyWiki]] based on [http://www.zope.org/ Zope]. Originally created by Tim Morgan, it is maintained by Bob McElrath.
[[Category:Server-Sides]]
|''Description:''|http://tiddlywiki.org|
|''Type:''|mediawiki|
|''URL:''|http://tiddlywiki.org|
|''Workspace:''||
This tiddler was automatically created to record the details of this server
|''Description:''|Lostpedia|
|''Type:''|mediawiki|
|''URL:''|http://lostpedia.wikia.com|
|''Workspace:''|Main|
|''Description:''|Marvel Database|
|''Type:''|mediawiki|
|''URL:''|http://marvel.wikia.com|
|''Workspace:''|Main|
|''Description:''|OpenMoko|
|''Type:''|mediawiki|
|''URL:''|http://wiki.openmoko.org|
|''Workspace:''|Main|
|''Description:''|Recipes Wiki|
|''Type:''|mediawiki|
|''URL:''|http://recipes.wikia.com/wiki/Recipes_Wiki|
|''Workspace:''|Main|
/***
|''Name:''|settings|
|''Description:''|set preferences|
|''~CoreVersion:''|2.2.0|
|''MediaWiki Host''|<<option txtServerHost>>|
|''MediaWiki sync interval (in minutes)''|<<option txtMediawikiSyncIterval>>|
|''Elements to display per page''|<<option txtElementsPerPage>>|
***/
/*{{{*/
config.views.editor.defaultText = '';
config.options.chkAnimate = false;
config.options.chkSaveBackups = false;
config.options.chkAutoSave = false;
config.options.txtBackupFolder = "backup";
config.options.txtMaxEditRows = 20;
config.options.chkDisableWikiLinks = true;
config.maxTiddlerImportCount = 500;
config.options.chkSinglePageMode = false;
config.options.chkTopOfPageMode = false;
config.options.txtTheme = "ThemeUnplugged";
config.options.chkBackstage = false;
config.options.chkSliderOptionsPanel = false;
config.options.txtRssTag = "toRSS";
merge(config.defaultCustomFields,{
wikiformat:'mediawiki'
});
/*}}}*/
|''Description:''|Star Wars Wookieepedia|
|''Type:''|mediawiki|
|''URL:''|http://starwars.wikia.com/wiki/Main_Page|
|''Workspace:''|Main|
|''Description:''|Uncyclopedia|
|''Type:''|mediawiki|
|''URL:''|http://uncyclopedia.wikia.com/wiki/Main_Page|
|''Workspace:''|Main|
|''Description:''|WikiHow|
|''Type:''|mediawiki|
|''URL:''|http://wikihow.com|
|''Workspace:''|Main|
/***
From:
http://meta.wikimedia.org/wiki/MediaWiki:Common.css
***/
/*{{{*/
/* wikitable/prettytable class for skinning normal tables */
table.wikitable,
table.prettytable {margin:1em 1em 1em 0;background:#f9f9f9;border:1px #aaaaaa solid;border-collapse:collapse;}
table.wikitable th, table.wikitable td,
table.prettytable th, table.prettytable td {border:1px #aaaaaa solid;padding:0.2em;}
table.wikitable th,
table.prettytable th {background:#f2f2f2;text-align:center;}
table.wikitable caption,
table.prettytable caption {margin-left:inherit;margin-right:inherit;}
.allpagesredirect {font-style:italic;}
/* Infobox template style */
.infobox {
border:1px solid #aaaaaa;
background-color:#f9f9f9;
color:black;
margin-bottom:0.5em;
margin-left:1em;
padding:0.2em;
float:right;
clear:right;
}
.infobox td,
.infobox th {vertical-align:top;}
.infobox caption {font-size:larger;margin-left:inherit;}
.infobox.bordered {border-collapse:collapse;}
.infobox.bordered td,
.infobox.bordered th {border:1px solid #aaaaaa;}
.infobox.bordered .borderless td,
.infobox.bordered .borderless th {border:0;}
.infobox.sisterproject {width:20em;font-size:90%;}
/* Removes useless links from printout */
@media print {#privacy, #about, #disclaimer {display:none;}}
.plainlinksneverexpand a {background:none !important; padding:0 !important}
/* log formatting */
.logtable pre {margin:0;padding:0;border:0;}
/*}}}*/
/***
Abridged version of:
http://en.wikipedia.org/skins-1.5/monobook/main.css
for use in TiddlyWiki.
** MediaWiki 'monobook' style sheet for CSS2-capable browsers.
** Copyright Gabriel Wicke - http://wikidev.net/
** License:GPL (http://www.gnu.org/copyleft/gpl.html)
**
** Loosely based on http://www.positioniseverything.net/ordered-floats.html by Big John
** and the Plone 2.0 styles, see http://plone.org/ (Alexander Limi,Joe Geldart & Tom Croucher,
** Michael Zeltner and Geir Bækholt)
** All you guys rock :)
***/
/*{{{*/
#column-content {
width:100%;
float:right;
margin:0 0 .6em -12.2em;
padding:0;
}
#content {
margin:2.8em 0 0 12.2em;
padding:0 1em 1.5em 1em;
background:white;
color:black;
border:1px solid #aaa;
border-right:none;
line-height:1.5em;
position:relative;
z-index:2;
}
#column-one {
padding-top:160px;
}
/* the left column width is specified in class .portlet */
/* Font size:
** We take advantage of keyword scaling- browsers won't go below 9px
** More at http://www.w3.org/2003/07/30-font-size
** http://style.cleverchimp.com/font_size_intervals/altintervals.html
*/
.visualClear {
clear:both;
}
/* general styles */
table {
font-size:100%;
color:black;
}
a {
text-decoration:none;
color:#002bb8;
background:none;
}
a:visited {
color:#5a3696;
}
a:active {
color:#faa700;
}
a:hover {
text-decoration:underline;
}
a.stub {
color:#772233;
}
a.new, #p-personal a.new {
color:#ba0000;
}
a.new:visited, #p-personal a.new:visited {
color:#a55858;
}
img {
border:none;
vertical-align:middle;
}
p {
margin:.4em 0 .5em 0;
line-height:1.5em;
}
p img {
margin:0;
}
hr {
height:1px;
color:#aaa;
background-color:#aaa;
border:0;
margin:.2em 0 .2em 0;
}
h1, h2, h3, h4, h5, h6 {
color:black;
background:none;
font-weight:normal;
margin:0;
padding-top:.5em;
padding-bottom:.17em;
border-bottom:1px solid #aaa;
}
h1 {font-size:188%;}
h2 {font-size:150%;}
h3, h4, h5, h6 {border-bottom:none;font-weight:bold;}
h3 {font-size:132%;}
h4 {font-size:116%;}
h5 {font-size:100%;}
h6 {font-size:80%;}
ul {
line-height:1.5em;
list-style-type:square;
margin:.3em 0 0 1.5em;
padding:0;
list-style-image:url(bullet.gif);
}
ol {
line-height:1.5em;
margin:.3em 0 0 3.2em;
padding:0;
list-style-image:none;
}
li {
margin-bottom:.1em;
}
dt {
font-weight:bold;
margin-bottom:.1em;
}
dl {
margin-top:.2em;
margin-bottom:.5em;
}
dd {
line-height:1.5em;
margin-left:2em;
margin-bottom:.1em;
}
fieldset {
border:1px solid #2f6fab;
margin:1em 0 1em 0;
padding:0 1em 1em;
line-height:1.5em;
}
legend {
padding:.5em;
font-size:95%;
}
form {
border:none;
margin:0;
}
textarea {
width:100%;
padding:.1em;
}
input.historysubmit {
padding:0 .3em .3em .3em !important;
font-size:94%;
cursor:pointer;
height:1.7em !important;
margin-left:1.6em;
}
select {
vertical-align:top;
}
abbr, acronym, .explain {
border-bottom:1px dotted black;
color:black;
background:none;
cursor:help;
}
q {
font-family:Times, "Times New Roman", serif;
font-style:italic;
}
code {
background-color:#f9f9f9;
}
pre {
padding:1em;
border:1px dashed #2f6fab;
color:black;
background-color:#f9f9f9;
line-height:1.1em;
}
/*
** the main content area
*/
#siteSub {
display:none;
}
#jump-to-nav {
display:none;
}
#contentSub, #contentSub2 {
font-size:84%;
line-height:1.2em;
margin:0 0 1.4em 1em;
color:#7d7d7d;
width:auto;
}
span.subpages {
display:block;
}
/* Some space under the headers in the content area */
#bodyContent h1, #bodyContent h2 {
margin-bottom:.6em;
}
#bodyContent h3, #bodyContent h4, #bodyContent h5 {
margin-bottom:.3em;
}
.firstHeading {
margin-bottom:.1em;
}
/* user notification thing */
.usermessage {
background-color:#ffce7b;
border:1px solid #ffa500;
color:black;
font-weight:bold;
margin:2em 0 1em;
padding:.5em 1em;
vertical-align:middle;
}
#siteNotice {
text-align:center;
font-size:95%;
padding:0 .9em;
}
#siteNotice p {
margin:0;
padding:0;
}
.error {
color:red;
font-size:larger;
}
.errorbox, .successbox {
font-size:larger;
border:2px solid;
padding:.5em 1em;
float:left;
margin-bottom:2em;
color:#000;
}
.errorbox {
border-color:red;
background-color:#fff2f2;
}
.successbox {
border-color:green;
background-color:#dfd;
}
.errorbox h2, .successbox h2 {
font-size:1em;
font-weight:bold;
display:inline;
margin:0 .5em 0 0;
border:none;
}
#catlinks {
border:1px solid #aaa;
background-color:#f9f9f9;
padding:5px;
margin-top:1em;
clear:both;
}
/* emulate center */
.center {
width:100%;
text-align:center;
}
*.center * {
margin-left:auto;
margin-right:auto;
}
/* small for tables and similar */
.small, .small * {
font-size:94%;
}
table.small {
font-size:100%;
}
/*
** content styles
*/
#toc,
.toc,
.mw-warning {
border:1px solid #aaa;
background-color:#f9f9f9;
padding:5px;
font-size:95%;
}
#toc h2,
.toc h2 {
display:inline;
border:none;
padding:0;
font-size:100%;
font-weight:bold;
}
#toc #toctitle,
.toc #toctitle,
#toc .toctitle,
.toc .toctitle {
text-align:center;
}
#toc ul,
.toc ul {
list-style-type:none;
list-style-image:none;
margin-left:0;
padding-left:0;
text-align:left;
}
#toc ul ul,
.toc ul ul {
margin:0 0 0 2em;
}
#toc .toctoggle,
.toc .toctoggle {
font-size:94%;
}
.mw-warning {
margin-left:50px;
margin-right:50px;
text-align:center;
}
/* images */
div.floatright, table.floatright {
clear:right;
float:right;
position:relative;
margin:0 0 .5em .5em;
border:0;
}
div.floatright p {font-style:italic;}
div.floatleft, table.floatleft {
float:left;
position:relative;
margin:0 .5em .5em 0;
border:0;
}
div.floatleft p {font-style:italic;}
/* thumbnails */
div.thumb {
margin-bottom:.5em;
border-style:solid;
border-color:white;
width:auto;
}
div.thumb div {
border:1px solid #ccc;
padding:3px !important;
background-color:#f9f9f9;
font-size:94%;
text-align:center;
overflow:hidden;
}
div.thumb div a img {
border:1px solid #ccc;
}
div.thumb div div.thumbcaption {
border:none;
text-align:left;
line-height:1.4em;
padding:.3em 0 .1em 0;
}
div.magnify {
float:right;
border:none !important;
background:none !important;
}
div.magnify a, div.magnify img {
display:block;
border:none !important;
background:none !important;
}
div.tright {
clear:right;
float:right;
border-width:.5em 0 .8em 1.4em;
}
div.tleft {
float:left;
margin-right:.5em;
border-width:.5em 1.4em .8em 0;
}
.hiddenStructure {
display:none;
speak:none;
}
img.tex {
vertical-align:middle;
}
span.texhtml {
font-family:serif;
}
/*
** User styles
*/
/* table standards */
table.rimage {
float:right;
position:relative;
margin-left:1em;
margin-bottom:1em;
text-align:center;
}
.toccolours {
border:1px solid #aaa;
background-color:#f9f9f9;
padding:5px;
font-size:95%;
}
div.townBox {
position:relative;
float:right;
background:white;
margin-left:1em;
border:1px solid gray;
padding:.3em;
width:200px;
overflow:hidden;
clear:right;
}
div.townBox dl {
padding:0;
margin:0 0 .3em;
font-size:96%;
}
div.townBox dl dt {
background:none;
margin:.4em 0 0;
}
div.townBox dl dd {
margin:.1em 0 0 1.1em;
background-color:#f3f3f3;
}
/*
** edit views etc
*/
.special li {
line-height:1.4em;
margin:0;
padding:0;
}
/*
** Structural Elements
*/
/*
** footer
*/
#footer {
background-color:white;
border-top:1px solid #fabd23;
border-bottom:1px solid #fabd23;
margin:.6em 0 1em 0;
padding:.4em 0 1.2em 0;
text-align:center;
font-size:90%;
}
#footer li {
display:inline;
margin:0 1.3em;
}
/* hide from incapable browsers */
head:first-child+body #footer li {white-space:nowrap;}
#f-poweredbyico, #f-copyrightico {
margin:0 8px;
position:relative;
top:-2px;/* Bump it up just a tad */
}
#f-poweredbyico {
float:right;
height:1%;
}
#f-copyrightico {
float:left;
height:1%;
}
/* js pref toc */
#preftoc {
margin:0;
padding:0;
width:100%;
clear:both;
}
#preftoc li {
margin:1px -2px 1px 2px;
float:left;
padding:2px 0 3px 0;
background-color:#f0f0f0;
color:#000;
border:1px solid #fff;
border-right-color:#716f64;
border-bottom:0;
position:relative;
white-space:nowrap;
list-style-type:none;
list-style-image:none;
z-index:3;
}
#preftoc li.selected {
font-weight:bold;
background-color:#f9f9f9;
border:1px solid #aaa;
border-bottom:none;
cursor:default;
top:1px;
padding-top:2px;
margin-right:-3px;
}
#preftoc > li.selected {
top:2px;
}
#preftoc a,
#preftoc a:active {
display:block;
color:#000;
padding:0 .7em;
position:relative;
text-decoration:none;
}
#preftoc li.selected a {
cursor:default;
text-decoration:none;
}
#prefcontrol {
padding-top:2em;
clear:both;
}
#preferences {
margin:0;
border:1px solid #aaa;
clear:both;
padding:1.5em;
background-color:#F9F9F9;
}
.prefsection {
border:none;
padding:0;
margin:0;
}
.prefsection fieldset {
border:1px solid #aaa;
float:left;
margin-right:2em;
}
.prefsection legend {
font-weight:bold;
}
.prefsection table, .prefsection legend {
background-color:#F9F9F9;
}
.mainLegend {
display:none;
}
div.prefsectiontip {
font-size:95%;
margin-top:0;
background-color:#FFC1C1;
padding:.2em .7em;
clear:both;
}
.btnSavePrefs {
font-weight:bold;
padding-left:.3em;
padding-right:.3em;
}
.preferences-login {
clear:both;
margin-bottom:1.5em;
}
.prefcache {
font-size:90%;
margin-top:2em;
}
/*
** IE/Mac fixes, hope to find a validating way to move this
** to a separate stylesheet. This would work but doesn't validate:
** @import("IEMacFixes.css");
*/
/* tabs:border on the a, not the div */
* > html #p-cactions li {border:none;}
* > html #p-cactions li a {
border:1px solid #aaa;
border-bottom:none;
}
* > html #p-cactions li.selected a {border-color:#fabd23;}
/* footer icons need a fixed width */
* > html #f-poweredbyico,
* > html #f-copyrightico {width:88px;}
* > html #bodyContent,
* > html #bodyContent pre {
overflow-x:auto;
width:100%;
padding-bottom:25px;
}
/* more IE fixes */
/* float/negative margin brokenness */
* html #footer {margin-top:0;}
* html #column-content {
display:inline;
margin-bottom:0;
}
* html div.editsection {font-size:smaller;}
#pagehistory li.selected {position:relative;}
/* Mac IE 5.0 fix;floated content turns invisible */
* > html #column-content {
float:none;
}
* > html #column-one {
position:absolute;
left:0;
top:0;
}
* > html #footer {
margin-left:13.2em;
}
.redirectText {
font-size:150%;
margin:5px;
}
.printfooter {
display:none;
}
.not-patrolled {
background-color:#ffa;
}
div.patrollink {
font-size:75%;
text-align:right;
}
span.newpage, span.minor, span.searchmatch, span.bot {
font-weight:bold;
}
span.unpatrolled {
font-weight:bold;
color:red;
}
span.searchmatch {
color:red;
}
.sharedUploadNotice {
font-style:italic;
}
span.updatedmarker {
color:black;
background-color:#0f0;
}
span.newpageletter {
font-weight:bold;
color:black;
background-color:yellow;
}
span.minoreditletter {
color:black;
background-color:#c5ffe6;
}
table.gallery {
border:1px solid #ccc;
margin:2px;
padding:2px;
background-color:white;
}
table.gallery tr {
vertical-align:top;
}
table.gallery td {
vertical-align:top;
background-color:#f9f9f9;
border:solid 2px white;
}
table.gallery td.galleryheader {
text-align:center;
font-weight:bold;
}
div.gallerybox {
margin:2px;
width: 150px;
}
div.gallerybox div.thumb {
text-align:center;
border:1px solid #ccc;
margin:2px;
}
div.gallerytext {
font-size:94%;
padding:2px 4px;
}
span.comment {
font-style:italic;
}
span.changedby {
font-size:95%;
}
.previewnote {
text-indent:3em;
color:#c00;
border-bottom:1px solid #aaa;
padding-bottom:1em;
margin-bottom:1em;
}
.previewnote p {
margin:0;
padding:0;
}
.editExternally {
border:1px solid gray;
background-color:#ffffff;
padding:3px;
margin-top:0.5em;
float:left;
font-size:small;
text-align:center;
}
.editExternallyHelp {
font-style:italic;
color:gray;
}
li span.deleted, span.history-deleted {
text-decoration:line-through;
color:#888;
font-style:italic;
}
.toggle {
margin-left:2em;
text-indent:-2em;
}
/* Classes for EXIF data display */
table.mw_metadata {
font-size:0.8em;
margin-left:0.5em;
margin-bottom:0.5em;
width:300px;
}
table.mw_metadata caption {
font-weight:bold;
}
table.mw_metadata th {
font-weight:normal;
}
table.mw_metadata td {
padding:0.1em;
}
table.mw_metadata {
border:none;
border-collapse:collapse;
}
table.mw_metadata td, table.mw_metadata th {
text-align:center;
border:1px solid #aaaaaa;
padding-left:0.1em;
padding-right:0.1em;
}
table.mw_metadata th {
background-color:#f9f9f9;
}
table.mw_metadata td {
background-color:#fcfcfc;
}
table.collapsed tr.collapsable {
display:none;
}
/* filetoc */
ul#filetoc {
text-align:center;
border:1px solid #aaaaaa;
background-color:#f9f9f9;
padding:5px;
font-size:95%;
margin-bottom:0.5em;
margin-left:0;
margin-right:0;
}
#filetoc li {
display:inline;
list-style-type:none;
padding-right:2em;
}
/* @bug 1714 */
input#wpSave, input#wpDiff {
margin-right:0.33em;
}
#editform .editOptions {
display:inline;
}
#wpSave {
font-weight:bold;
}
/*}}}*/
/***
Stylesheet, which when used with a Wikipedia skin stylesheet, helps give TiddlyWiki the appearance of Wikipedia.
***/
/*{{{*/
.headerShadow {padding:.5em 0em .5em 1em;}
.headerForeground {padding:.5em 0em .5em 1em;}
.header {background:darkblue;}
.headerShadow {color:white;}
h1,h2,h3,h4,h5,h6 {padding-left:0em;}
/* The bit that contains all tiddlers */
#displayArea {
margin-top:0;margin-right:15.5em;margin-bottom:0;margin-left:0.5em;
padding-top:.1em;padding-bottom:.1em;
-moz-border-radius:1em;
}
.tiddlyLinkExisting {text-decoration:underline;}
#sidebarTabs .tiddlyLinkExisting {text-decoration:none;}
/* Tiddlers */
.title {color:black;border-bottom:2px solid #ddd;}
.subtitle {font-size:0.9em;text-align:right;border-bottom:1px solid #ddd;}
.tiddler {-moz-border-radius:1em;border:1px solid #ccc;margin:0.5em;background:#fff;padding:0.5em;}
.tabContents {white-space:nowrap;}
.viewer pre {padding:0;margin-left:0;}
.viewer hr {border:solid 1px silver;}
.viewer th, thead td {background:#db4;border:1px solid #666;color:black;}
.toolbar {padding-top:0px;padding-bottom:0px;color:#04b;}
.selected .toolbar {visibility:visible;color:#00f;}
.toolbar .button {color:#dee;}
.selected .toolbar .button {color:#014;}
.tagging, .tagged, .selected .tagging, .selected .tagged {
font-size:75%;padding:0.3em;background-color:#eee;
border-top:1px solid #ccc;border-left:1px solid #ccc;
border-bottom:3px solid #ccc;border-right:3px solid #ccc;
max-width:45%;-moz-border-radius:1em;
}
/*}}}*/
|''Description:''|WoWWiki|
|''Type:''|mediawiki|
|''URL:''|http://www.wowwiki.com/|
|''Workspace:''|Main|