The tiddler '20 December 2005' doesn't yet exist. Double-click to create it
WhatIsNew
<div class='toolbar'><span macro='saveTiddler'></span><span macro='cancelTiddler'></span><span macro='deleteTiddler'></span><span macro='tagChooser'></span><!--<span macro='wikibar button'></span>--></div>\n<!--<div class='title' macro='view title'></div>-->\n<div class='editor' macro='edit title'>Title:</div>\n<div class='editor' macro='edit tags'>Tags:</div>\n<!--<div class='editor' macro='wikibar'></div>-->\n<div class='editor' macro='edit text'></div>\n<!--<div class='editorFooter'></div>-->\n
Welcome to AiddlyWiki!\nThis is the place I put my works on TiddlyWiki. Any thoughts or comments are welcomed.\n\nArphen Lin
#open TW in browser\n#enable options -> ~SaveBackups\n#save changes, and DON'T close TW\n#right click on [[finalRelease|http://www.tiddlywiki.com/empty.html]] (or [[finalBeta|http://www.tiddlywiki.com/beta/empty.html]]) of TW, save as a new file, replace to current TW\n#save changes again
HelloThere\n[[upgrade|HowToUpgradeTW]]
<div id='header'>\n<div id='titleLine' macro='gradient vert #000000 #222222 #444444 #888888 #ffffff'>\n<span id='siteTitle' refresh='content' tiddler='SiteTitle'></span>\n<span id='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>\n<div id='sidebar'>\n<div macro='gradient vert #ffffff #cc9900'><div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div></div>\n<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n<div id='displayArea'>\n<div id='messageArea'></div>\n<div id='tiddlerDisplay'></div>\n</div>
<<search>><<closeAll>><<newTiddler>><<newJournal "DD MMM YYYY">><<permaview>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
by Arphen Lin. Powered by [[TiddlyWiki|http://www.tiddlywiki.com/]] <<version>>.
AiddlyWiki
http://aiddlywiki.sourceforge.net/
<div class='toolbar'><span macro='closeTiddler'></span><span macro='closeAll'></span><span macro='editTiddler'></span><span macro='permalink'></span><span macro='references'></span></div><div class='title' macro='view title'></div>\n<!--<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span></div>-->\n<div class='viewer' macro='view text wikified'></div>\n<div class='footer'>\n<span macro='tags'></span>\n</div>
*[[Wikibar 2.0.0 beta3 released|wikibar_demo_2.html]]
/***\n|''Name''|mySave|\n|''Version''|1.0.0 |\n|''Source''|[[AiddlyWiki|http://aiddlywiki.sourceforge.net]]|\n|''Author''|[[Arphen Lin|mailto:arphenlin@gmail.com]]|\n|''Type''|Plugin|\n|''Require''|TiddlyWiki 1.2.35+ |\n!Description\nSave files in my way.\n!Revision history\n*v1.0.0 2005/10/22 \n**Initial release\n!Code\n***/\n//{{{\n\n\n//------------------------------------------------------------------------------------------------\n// override saveChanges()\n//------------------------------------------------------------------------------------------------\nfunction saveChanges()\n{\n clearMessage();\n // Get the URL of the document\n var originalPath = document.location.toString();\n // Check we were loaded from a file URL\n if(originalPath.substr(0,5) != "file:")\n {\n alert(config.messages.notFileUrlError);\n displayTiddler(null,"SaveChanges",0,null,null,false,false);\n return;\n }\n // Remove any location part of the URL\n var hashPos = originalPath.indexOf("#");\n if(hashPos != -1)\n originalPath = originalPath.substr(0,hashPos);\n // Convert to a native file format assuming\n // "file:///x:/path/path/path..." - pc local file --> "x:\spath\spath\spath..."\n // "file://///server/share/path/path/path..." - FireFox pc network file --> "\s\sserver\sshare\spath\spath\spath..."\n // "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."\n // "file://server/share/path/path/path..." - pc network file --> "\s\sserver\sshare\spath\spath\spath..."\n var localPath;\n if(originalPath.charAt(9) == ":") // pc local file\n localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\s\s");\n else if(originalPath.indexOf("file://///") == 0) // FireFox pc network file\n localPath = "\s\s\s\s" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\s\s");\n else if(originalPath.indexOf("file:///") == 0) // mac/unix local file\n localPath = unescape(originalPath.substr(7));\n else if(originalPath.indexOf("file:/") == 0) // mac/unix local file\n localPath = unescape(originalPath.substr(5));\n else // pc network file\n localPath = "\s\s\s\s" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\s\s");\n // Load the original file\n var original = loadFile(localPath);\n if(original == null)\n {\n alert(config.messages.cantSaveError);\n displayTiddler(null,"SaveChanges",0,null,null,false,false);\n return;\n }\n // Locate the storeArea div's\n var posOpeningDiv = original.indexOf(startSaveArea);\n var posClosingDiv = original.lastIndexOf(endSaveArea);\n if((posOpeningDiv == -1) || (posClosingDiv == -1))\n {\n alert(config.messages.invalidFileError.format([localPath]));\n return;\n }\n // Save the backup\n if(config.options.chkSaveBackups)\n {\n // arphen: 只儲存一個備份檔 \n //var backupPath = localPath.substr(0,localPath.lastIndexOf(".")) + "." + (new Date()).convertToYYYYMMDDHHMMSSMMM() + ".html";\n var backupPath = localPath.substr(0,localPath.lastIndexOf(".")) + ".backup.html";\n var backup = saveFile(backupPath,original);\n if(backup)\n displayMessage(config.messages.backupSaved,"file://" + backupPath);\n else\n alert(config.messages.backupFailed);\n }\n // Save Rss\n if(config.options.chkGenerateAnRssFeed)\n {\n var rssPath = localPath.substr(0,localPath.lastIndexOf(".")) + ".xml";\n var rssSave = saveFile(rssPath,convertUnicodeToUTF8(generateRss()));\n if(rssSave)\n displayMessage(config.messages.rssSaved,"file://" + rssPath);\n else\n alert(config.messages.rssFailed);\n }\n // Save empty template\n if(config.options.chkSaveEmptyTemplate)\n {\n// var emptyPath,p;\n// if((p = localPath.lastIndexOf("/")) != -1)\n// emptyPath = localPath.substr(0,p) + "/empty.html";\n// else if((p = localPath.lastIndexOf("\s\s")) != -1)\n// emptyPath = localPath.substr(0,p) + "\s\sempty.html";\n// else\n// emptyPath = localPath + ".empty.html";\n\n // arphen: 改成這樣 \n emptyPath = localPath.substr(0,localPath.lastIndexOf(".")) + ".empty.html"; \n \n var empty = original.substr(0,posOpeningDiv + startSaveArea.length) + convertUnicodeToUTF8(generateEmpty()) + original.substr(posClosingDiv);\n var emptySave = saveFile(emptyPath,empty);\n if(emptySave)\n displayMessage(config.messages.emptySaved,"file://" + emptyPath);\n else\n alert(config.messages.emptyFailed);\n }\n // Save new file\n var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + \n convertUnicodeToUTF8(allTiddlersAsHtml()) + "\sn\st\st" +\n original.substr(posClosingDiv);\n var newSiteTitle = convertUnicodeToUTF8((getElementText("siteTitle") + " - " + getElementText("siteSubtitle")).htmlEncode());\n revised = revised.replace(new RegExp("<title>[^<]*</title>", "im"),"<title>"+ newSiteTitle +"</title>");\n var save = saveFile(localPath,revised);\n if(save)\n {\n displayMessage(config.messages.mainSaved,"file://" + localPath);\n store.setDirty(false);\n }\n else\n alert(config.messages.mainFailed);\n}\n\n//}}}