Il 23/11/2012 22:51, skye riquelme ha scritto:
> How can I get this to work?
Saving tiddler or other text contents to local files is easy,
the difficult task is to find the path of your local folder to save
them, try this:
<script>
getWikiPath= function (folderName) {
var originalPath = document.location.toString();
if (originalPath.substr(0, 5) != 'file:') {
alert(config.messages.notFileUrlError);
if (store.tiddlerExists(config.messages.saveInstructions))
story.displayTiddler(null, config.messages.saveInstructions);
return;
}
var localPath = getLocalPath(originalPath);
var backSlash = localPath.lastIndexOf('\\') == -1 ? '/': '\\';
var dirPathPos = localPath.lastIndexOf(backSlash);
var subPath = localPath.substr(0, dirPathPos) + backSlash
+ (folderName ? folderName + backSlash: '');
return subPath;
}
var folder=getWikiPath("storagefolder");
var target="diario.txt";
var contents=localStorage.getItem("diario");
saveFile(folder+target,contents);
displayMessage("save done");
</script>
> Ooops ..forgot to mention I am using TW 2.70, under FF17.00
>
that's your main (big) problem.
Firefox versions over 14.0 should be considered deprecated for
TiddlyWiki, due to the progressive and definitive removal of essential
functionalities tied with the enableprivilege() function [1], without
giving any kind of support to users that still need them.
As you can read in other threads, Jeremy is striving to fill this hole
with his TiddlyFox (firefox) plugin, but unfortunately, this doesn't
address ALL instances where the TWCore uses the enablePrivilege()
function (cite from Eric Shulman).
If you can't downgrade Firefox to a version lower (or equal) than 14.0,
try to install the tiddlyfox plugin [2], or, if you are on MS Windows,
use Internet Explorer instead.
[1]
https://bugzilla.mozilla.org/show_bug.cgi?id=546848
[2]
https://github.com/TiddlyWiki/TiddlyFox/raw/master/tiddlyfox.xpi
regards
--
tiziano de togni
______________________________________
http://tizziano.altervista.org/