BidiXTW is loading ...
BidiXTW - Repository for BidiX's TiddlyWiki Extensions
www.tiddlywiki.com\nwww.osmosoft.com\ntiddlywiki.bidix.info\nwww.google.fr\ntiddlyspot.com\nwww.tiddlytools.com\nnews.com.com\nwww.lemonde.fr\nwww.lesechos.fr\nwww.liberation.fr\nwww.nytimes.com\nrss.news.yahoo.com\ndel.icio.us\nwww.tiddlyforge.net\nyann.perrin.googlepages.com\ntiddlywiki.abego-software.de
|''URL:''|http://tiddlywiki.abego-software.de/|
<html><iframe src="proxy.cgi?action=list" width="100%" height="200" frameborder=0></iframe></html>
\nCopyright (c) 2005-2006, BidiX (http://BidiX.info)\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n*Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. \n*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. \n*Neither the name of BidiX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. \n\nTHIS 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.\n\n
Contact : [[BidiX@bidix.info|mailto:BidiX@BidiX.info]]\nURL : [[TiddlyWiki.BidiX.info|http://tiddlywiki.BidiX.info/]]\nDonation : [[Donation via Paypal|https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=BidiX%40bidix%2einfo&item_name=TiddlyWikiHacking%20Donations&item_number=Donations&no_shipping=2&no_note=1&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8]]
\nBidiXStyle tags components that make the look of BidiXTW. Mainly the customization aimed to provides :\n*a fixe width for tiddlers: a wide text is difficult to read.\n*a border to tiddlers\n*PageFooter\n*TopMenu\n*a ColorPalette\n\nSince BidiXTW depends upon SimonBaird's TagglyTagging, some components are directly imported from MonkeyPirateTW.\n
Repository for BidiX's TiddlyWiki Extensions\n|''URL:''|http://tiddlywiki.bidix.info/|\n----\nThis TiddlyWiki is viewed from <script>\nvar location = document.location.toString();\nvar filename = config.lib.file.basename(location);\nreturn "[["+filename+"|"+location+"]]";\n</script> \nBidiXTW Version 4.0.0 From [[TiddlyWiki.BidiX.info|http://tiddlywiki.bidix.info/]]
<<rssReader asHTML http://tiddlywiki.bidix.info/BidiXTW.xml>>
<<rssReader asText BidixTW.xml>>
<<rssReader asHtml proxy.cgi?url=http://news.com.com/2547-1_3-0-20.xml>>
<<refreshDisplay>>\nBackground: #fff\nForeground: #336\nPrimaryPale: #ccf\nPrimaryLight: #99c\nPrimaryMid: #669\nPrimaryDark: #336\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #841\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88
Welcome
<!---\n| Name:|~TagglyTaggingEditTemplate |\n| Version:|1.1 (12-Jan-2006)|\n| Source:|http://simonbaird.com/mptw/#TagglyTaggingEditTemplate|\n| Purpose:|See TagglyTagging for more info|\n| Requires:|You need the CSS in TagglyTaggingStyles to make it look right|\n--->\n<!--{{{-->\n<div class="toolbar" macro="toolbar +saveTiddler closeOthers -cancelTiddler deleteTiddler"></div>\n<div class="title" macro="view title"></div>\n<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>\n<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>\n<div class="editorFooter"><span macro="message views.editor.tagPrompt"></span><span macro="tagChooser"></span></div>\n<div class="editor" macro="edit text"></div>\n<br/>\n<!--}}}-->
/***\n|''Name:''|GenerateRssHijack|\n|''Description:''|Generate an RSSFeed with plaintext, html and TiddlyWiki content|\n|''Version:''|0.1.1|\n|''Date:''|Aug 6, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#GenerateRssHijack|\n|''Documentation:''|http://tiddlywiki.bidix.info/#GenerateRssHijackDoc|\n|''Author:''|BidiX (BidiX (at) bidix (dot) info)|\n|''License:''|[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D ]]|\n|''~CoreVersion:''|2.0.0|\n|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|\n|''Include:''|none|\n|''Require:''|none|\n***/\n//{{{\nversion.extensions.GenerateRssHijack= {\n major: 0, minor: 1, revision: 1, \n date: new Date(2006,7,6),\n source: 'http://tiddlywiki.bidix.info/#GenerateRssHijack',\n documentation: 'http://tiddlywiki.bidix.info/#GenerateRssHijackDoc',\n author: 'BidiX (BidiX (at) bidix (dot) info',\n license: '[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D]]',\n coreVersion: '2.0.0',\n browser: 'Firefox 1.5; InternetExplorer 6.0; Safari' \n};\n\n// Return the tiddlers as a sorted array\nTiddlyWiki.prototype.getTiddlersTaggedWith = function(field,includeTag)\n{\n var results = [];\n this.forEachTiddler(function(title,tiddler) {\n if(tiddler.tags.find(includeTag) != null)\n results.push(tiddler);\n });\n if(field)\n results.sort(function (a,b) {if(a[field] == b[field]) return(0); else return (a[field] < b[field]) ? -1 : +1; });\n return results;\n}\n\n// generate RSS file with tiddlers tagged with toRSS\nwindow.generateRss_ori = window.generateRss;\nwindow.generateRss = function ()\n{\n var s = [];\n var d = new Date();\n var u = store.getTiddlerText("SiteUrl",null);\n // Assemble the header \n s.push("<" + "?xml version=\s"1.0\s"" + " encoding='UTF-8'" + "?>");\n s.push("<rss version=\s"2.0\s" xmlns:tiddlywiki=\s"http://tiddlywiki.bidix.info/#TiddlyWikiNamespace\s" xmlns:content=\s"http://purl.org/rss/1.0/modules/content/\s">");\n s.push("<channel>");\n s.push("<title>" + wikifyPlain("SiteTitle").htmlEncode() + "</title>");\n if(u)\n s.push("<link>" + u.htmlEncode() + "</link>");\n s.push("<description>" + wikifyPlain("SiteSubtitle").htmlEncode() + "</description>");\n s.push("<language>en-us</language>");\n s.push("<copyright>Copyright " + d.getFullYear() + " " + config.options.txtUserName.htmlEncode() + "</copyright>");\n s.push("<pubDate>" + d.toGMTString() + "</pubDate>");\n s.push("<lastBuildDate>" + d.toGMTString() + "</lastBuildDate>");\n s.push("<docs>http://blogs.law.harvard.edu/tech/rss</docs>");\n s.push("<generator>TiddlyWiki " + version.major + "." + version.minor + "." + version.revision + "</generator>");\n // The body\n var tiddlers = store.getTiddlersTaggedWith("modified","toRSS");\n var n = config.numRssItems > tiddlers.length ? 0 : tiddlers.length-config.numRssItems;\n for (var t=tiddlers.length-1; t>=n; t--)\n s.push(tiddlers[t].saveToRss(u));\n // And footer\n s.push("</channel>");\n s.push("</rss>");\n // Save it all\n return s.join("\sn");\n}\n\nTiddler.prototype.getAsInnerHTML = function() {\n var wrapper = createTiddlyElement(document.body,"span",null,null);\n wikify(this.text,wrapper ,null,this);\n var text = wrapper.innerHTML;\n wrapper.parentNode.removeChild(wrapper);\n //replace tddlylink with externallink\n var u = store.getTiddlerText("SiteUrl",null);\n var pattern = /<a\ss+tiddlylink="([^"]+)"\ss+refresh="link"\ss+title="([^"]+)"\ss+href="([^"]+)"/mg;\n var substitution = "<a tiddlylink=\s"$1\s" refresh=\s"link\s" title=\s"$2\s" href=\s""+u+"#$1\s"";\n text = text.replace(pattern, substitution);\n return text;\n};\n\nTiddler.prototype.saveToRss = function(url)\n{\n var s = [];\n s.push("<item>");\n s.push("<title>" + this.title.htmlEncode() + "</title>");\n //plain text\n s.push("<description>" + this.text.replace(regexpNewLine,"<br />").htmlEncode() + "</description>");\n // html text\n s.push("<content:encoded><![CDATA[ " + this.getAsInnerHTML() +"]]></content:encoded>");\n // tiddler\n s.push("<tiddlywiki:title>" + this.title.htmlEncode() + "</tiddlywiki:title>");\n s.push("<tiddlywiki:wikitext>" + this.text.htmlEncode() + "</tiddlywiki:wikitext>");\n s.push("<tiddlywiki:modifier>" + this.modifier.htmlEncode() + "</tiddlywiki:modifier>");\n s.push("<tiddlywiki:modified>" + this.modified.convertToYYYYMMDDHHMM() + "</tiddlywiki:modified>");\n s.push("<tiddlywiki:created>" + this.created.convertToYYYYMMDDHHMM() + "</tiddlywiki:created>");\n //s.push("<tiddlywiki:links>" + this.text.htmlEncode() + "</tiddlywiki:links>");\n s.push("<tiddlywiki:tags>" + this.getTags().htmlEncode() + "</tiddlywiki:tags>");\n for(var t=0; t<this.tags.length; t++)\n s.push("<category>" + this.tags[t] + "</category>");\n s.push("<link>" + url + "#" + encodeURIComponent(String.encodeTiddlyLink(this.title)) + "</link>");\n s.push("<pubDate>" + this.modified.toGMTString() + "</pubDate>");\n s.push("</item>");\n return(s.join("\sn"));\n}\n//}}}
//last update: GenerateRssHijack v 0.1.1//\n\n\n!Description\n* This plugin hijacks the core generateRSS() function.\n* It uses a specific tag (toRSS) to select tiddlers to export to the RSSFeed\n* It extends the generated {{{item}}} element with : \n**{{{content:encoded}}}: the wikified text of the tiddler. All TiddlyLink {{{href}}} are replaced by absolute external {{{href}}} (siteUrl/#[[tiddlerTitle]] for example http://TiddlyWiki.bidix.info/#GenerateRssHijackDoc).\n**{{{tiddlywiki:XXX}}}: tiddler Attributes in a tiddlywiki name space. See http://tiddlywiki.bidix.info/#TiddlyWikiNamespace for details.\n\n!Usage\n*the generated xml file has been tested with :\n**RSSReaderMacro: a internal RSS Reader based on BramChen's RssNewsMacro\n**[[news.php]]: http://news.bidix.info/ a php rss reader with TiddlyWiki stylesheet\n**Netvibes : http://www.netvibes.com/\n**GoogleRssReader: http://www.google.com/reader/view/feed/http://tiddlywiki.bidix.info/BidiXTW.xml\n**Sage FireFox extension: http://sage.mozdev.org/\n*It could be used to export/import tiddlers on a RSSFeed base.\n\n!Revision history\n* v0.1.1 (06/08/2006)\n** small compatibility issue with TiddliWiki 2.1 (4th parameter in call to wikify)\n* v0.1.0 (20/04/2006)\n** initial release\n\n\n\n\n
*[[How to install a plugin|http://www.tiddlywiki.com/#InstallingPlugins]]\n*[[How to upload|HowToUpload]]\n*[[To download BidiXTW|download.cgi?file=BidiXTW.html]]\n*Url in ImportTiddlers: {{{http://tiddlywiki.bidix.info/}}}\n*[[License|BSD open source license]]\n*[[Contact|BidiX]]
/***\n|Name:|HideWhenMacro|\n|Author:|SimonBaird|\n|Source:|http://tiddlyspot.com/mptw/#HideWhenMacro|\n|Version:|1.0.1|\n|Date:|30-Jul-2006|\n\n!Description\nImplements hideWhen and showWhen macros for use in ViewTemplate\n\n!Example\n{{{<div macro="showWhen tiddler.tags.contains('Task')">[[TaskToolbar]]</div>}}}\n\n***/\n//{{{\n\nmerge(config.macros,{\n\n hideWhen: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n if (eval(paramString)) place.parentNode.removeChild(place);\n }},\n\n showWhen: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {\n if (!eval(paramString)) place.parentNode.removeChild(place);\n }}\n\n});\n\n//}}}
To upload a TiddlyWiki on your web server:\n#Import all tiddlers tagged with Upload from http://TiddlyWiki.bidix.info/#Upload\n#Install UploadPlugin as explain in [[InstallingPlugins|http://www.tiddlywiki.com/#InstallingPlugins]]\n#Install an UploadService on your web server by configuring one of this scripts [[store.php]] or [[store.cgi]]\n#set an {{{<<upload>>}}} button for example in your SideBarOptions\n#Set UploadOptions in conformity with your UploadService\n#click on <<upload>> button\n
/***\n''InlineJavascriptPlugin for ~TiddlyWiki version 1.2.x and 2.0''\n^^author: Eric Shulman - ELS Design Studios\nsource: http://www.TiddlyTools.com/#InlineJavascriptPlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nInsert Javascript executable code directly into your tiddler content. Lets you ''call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.\n!!!!!Usage\n<<<\nWhen installed, this plugin adds new wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be treated as embedded javascript and executed each time the tiddler is rendered.\n\n''Deferred execution from an 'onClick' link''\nBy including a label="..." parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered.\n\n''External script source files:''\nYou can also load javascript from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}). This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins. The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.\n\n''Defining javascript functions and libraries:''\nAlthough the external javascript file is loaded while the tiddler content is being rendered, any functions it defines will not be available for use until //after// the rendering has been completed. Thus, you cannot load a library and //immediately// use it's functions within the same tiddler. However, once that tiddler has been loaded, the library functions can be freely used in any tiddler (even the one in which it was initially loaded).\n\nTo ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that will be rendered as soon as your TiddlyWiki document is opened. For example, you could put your {{{<script src="..."></script>}}} syntax into a tiddler called LoadScripts, and then add {{{<<tiddler LoadScripts>>}}} in your MainMenu tiddler.\n\nSince the MainMenu is always rendered immediately upon opening your document, the library will always be loaded before any other tiddlers that rely upon the functions it defines. Loading an external javascript library does not produce any direct output in the tiddler, so these definitions should have no impact on the appearance of your MainMenu.\n\n''Creating dynamic tiddler content''\nAn important difference between this implementation of embedded scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document:\n* In a typical web document, you use the document.write() function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.\n* However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and completely replaces the entire ~TiddlyWiki document in your browser window.\n* To allow these scripts to work unmodified, the plugin automatically converts all occurences of document.write() so that the output is inserted into the tiddler content instead of replacing the entire ~TiddlyWiki document.\n\nIf your script does not use document.write() to create dynamically embedded content within a tiddler, your javascript can, as an alternative, explicitly return a text value that the plugin can then pass through the wikify() rendering engine to insert into the tiddler display. For example, using {{{return "thistext"}}} will produce the same output as {{{document.write("thistext")}}}.\n\n//Note: your script code is automatically 'wrapped' inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler. To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.//\n\n''Accessing the ~TiddlyWiki DOM''\nThe plugin provides one pre-defined variable, 'place', that is passed in to your javascript code so that it can have direct access to the containing DOM element into which the tiddler output is currently being rendered.\n\nAccess to this DOM element allows you to create scripts that can:\n* vary their actions based upon the specific location in which they are embedded\n* access 'tiddler-relative' information (use findContainingTiddler(place))\n* perform direct DOM manipulations (when returning wikified text is not enough)\n<<<\n!!!!!Examples\n<<<\nan "alert" message box:\n{{{\n<script>alert('InlineJavascriptPlugin: this is a demonstration message');</script>\n}}}\n<script>alert('InlineJavascriptPlugin: this is a demonstration message');</script>\n\ndynamic output:\n{{{\n<script>return (new Date()).toString();</script>\n}}}\n<script>return (new Date()).toString();</script>\n\nwikified dynamic output:\n{{{\n<script>return "link to current user: [["+config.options.txtUserName+"]]";</script>\n}}}\n<script>return "link to current user: [["+config.options.txtUserName+"]]";</script>\n\ndynamic output using 'place' to get size information for current tiddler\n{{{\n<script>\n if (!window.story) window.story=window;\n var title=story.findContainingTiddler(place).id.substr(7);\n return title+" is using "+store.getTiddlerText(title).length+" bytes";\n</script>\n}}}\n<script>\n if (!window.story) window.story=window;\n var title=story.findContainingTiddler(place).id.substr(7);\n return title+" is using "+store.getTiddlerText(title).length+" bytes";\n</script>\n\ncreating an 'onclick' button/link that runs a script\n{{{\n<script label="click here">\n if (!window.story) window.story=window;\n alert("Hello World!\snlinktext='"+place.firstChild.data+"'\sntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");\n</script>\n}}}\n<script label="click here">\n if (!window.story) window.story=window;\n alert("Hello World!\snlinktext='"+place.firstChild.data+"'\sntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");\n</script>\n\nloading a script from a source url\n{{{\n<script src="demo.js">return "loading demo.js..."</script>\n<script label="click to execute demo() function">demo()</script>\n}}}\nwhere http://www.TiddlyTools.com/demo.js contains:\n>function demo() { alert('this output is from demo(), defined in demo.js') }\n>alert('InlineJavascriptPlugin: demo.js has been loaded');\n<script src="demo.js">return "loading demo.js..."</script>\n<script label="click to execute demo() function">demo()</script>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''InlineJavascriptPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.01.05 [1.4.0]''\nadded support 'onclick' scripts. When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked. 'place' value is set to match the clicked button/link element.\n''2005.12.13 [1.3.1]''\nwhen catching eval error in IE, e.description contains the error text, instead of e.toString(). Fixed error reporting so IE shows the correct response text. Based on a suggestion by UdoBorkowski\n''2005.11.09 [1.3.0]''\nfor 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content\nBased on a suggestion by BradleyMeck\n''2005.11.08 [1.2.0]''\nhandle loading of javascript from an external URL via src="..." syntax\n''2005.11.08 [1.1.0]''\npass 'place' param into scripts to provide direct DOM access \n''2005.11.08 [1.0.0]''\ninitial release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.inlineJavascript= {major: 1, minor: 4, revision: 0, date: new Date(2006,1,5)};\n\nconfig.formatters.push( {\n name: "inlineJavascript",\n match: "\s\s<script",\n lookahead: "\s\s<script(?: src=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?(?: label=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?\s\s>((?:.|\s\sn)*?)\s\s</script\s\s>",\n\n handler: function(w) {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {\n if (lookaheadMatch[1]) { // load a script library\n // make script tag, set src, add to body to execute, then remove for cleanup\n var script = document.createElement("script"); script.src = lookaheadMatch[1];\n document.body.appendChild(script); document.body.removeChild(script);\n }\n if (lookaheadMatch[2] && lookaheadMatch[3]) { // create a link to an 'onclick' script\n // add a link, define click handler, save code in link (pass 'place'), set link attributes\n var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",lookaheadMatch[2]);\n link.onclick=function(){try{return(eval(this.code))}catch(e){alert(e.description?e.description:e.toString())}}\n link.code="function _out(place){"+lookaheadMatch[3]+"};_out(this);"\n link.setAttribute("href","javascript:;"); link.setAttribute("title",""); link.style.cursor="pointer";\n }\n else if (lookaheadMatch[3]) { // run inline script code\n var code="function _out(place){"+lookaheadMatch[3]+"};_out(w.output);"\n code=code.replace(/document.write\s(/gi,'place.innerHTML+=(');\n try { var out = eval(code); } catch(e) { out = e.description?e.description:e.toString(); }\n if (out && out.length) wikify(out,w.output);\n }\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n} )\n//}}}\n
<<rssReader asText proxy.cgi?url=http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml>>
/***\n|''Name:''|LegacyStrikeThroughPlugin|\n|''Description:''|Support for legacy (pre 2.1) strike through formatting|\n|''Version:''|1.0.1|\n|''Date:''|Jul 21, 2006|\n|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|\n|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|\n|''License:''|[[BSD open source license]]|\n|''CoreVersion:''|2.1.0|\n|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|\n\n***/\n\n//{{{\n\n// Ensure that the LegacyStrikeThrough Plugin is only installed once.\nif(!version.extensions.LegacyStrikeThroughPlugin)\n {\n version.extensions.LegacyStrikeThroughPlugin = true;\n\nconfig.formatters.push(\n{\n name: "legacyStrikeByChar",\n match: "==",\n termRegExp: /(==)/mg,\n element: "strike",\n handler: config.formatterHelpers.createElementAndWikify\n});\n\n} // end of "install only once"\n//}}}\n
<<rssReader asText proxy.cgi?url=http://www.lesechos.fr/rss/rss_hightec.xml>>\n
|''URL:''|http://lewcid.googlepages.com/lewcid.html|
<<rssReader asText proxy.cgi?url=http://www.liberation.fr/rss.php>>
<!--Adsense code -->\n<div id="adsenseBar" style="display:none;">\n<script type="text/javascript"><!--\ngoogle_ad_client = "pub-9778565778200391";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\ngoogle_ad_format = "468x60_as";\ngoogle_ad_type = "text";\ngoogle_ad_channel ="";\n//--></script>\n<script type="text/javascript"\n src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\n</script>\n</div>\n<!--End of Adsense code -->\n
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>\n\n\n<style type="text/css">#contentWrapper {display:none;} #storeArea {display:none;} </style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto 2048px; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>BidiXTW</b> is loading<blink> ...</blink></div>
|''URL:''|http://tiddlyspot.com/mptw/|
|''URL:''|http://tiddlyspot.com/mptw_beta/|
/***\n''NestedSlidersPlugin for TiddlyWiki version 1.2.x and 2.0''\n^^author: Eric Shulman\nsource: http://www.TiddlyTools.com/#NestedSlidersPlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nQuickly make 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.''\n\nYou can also 'nest' these sliders as deep as you like (see complex nesting example below), 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.\n\nFor more details, please click on a section headline below:\n++++!!!!![Configuration]>\nDebugging messages for 'lazy sliders' deferred rendering:\n<<option chkDebugLazySliderDefer>> show debugging alert when deferring slider rendering\n<<option chkDebugLazySliderRender>> show debugging alert when deferred slider is actually rendered\n===\n++++!!!!![Usage]>\nWhen installed, this plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content. Use {{{+++}}} and {{{===}}} to delimit the slider content. Additional optional syntax elements let you specify\n*default to open\n*cookiename\n*heading level\n*floater\n*rollover\n*custom label/tooltip\n*automatic blockquote\n*deferred rendering\nThe complete syntax, using all options, is:\n//{{{\n++++(cookiename)!!!!!^*[label|tooltip]>...\ncontent goes here\n===\n//}}}\nwhere:\n* {{{+++}}} (or {{{++++}}}) and {{{===}}}^^\nmarks the start and end of the slider definition, respectively. When the extra {{{+}}} is used, the slider will be open when initially displayed.^^\n* {{{(cookiename)}}}^^\nsaves the slider opened/closed state, and restores this state whenever the slider is re-rendered.^^\n* {{{!}}} through {{{!!!!!}}}^^\ndisplays the slider label using a formatted headline (Hn) style instead of a button/link style^^\n* {{{"^"}}} //(without the quotes)//^^\nmakes the slider 'float' on top of other content rather than shifting that content downward^^\n* {{{"*"}}} //(without the quotes)//^^\nautomatically opens/closes slider on "rollover" as well as when clicked^^\n* {{{[label]}}} or {{{[label|tooltip]}}}^^\nuses custom label/tooltip. (defaults are: ">" (more) and "<" (less)^^\n* {{{">"}}} //(without the quotes)//^^\nautomatically adds blockquote formatting to slider content^^\n* {{{"..."}}} //(without the quotes)//^^\ndefers rendering of closed sliders until the first time they are opened. //Note: deferred rendering may produce unexpected results in some cases. Use with care.//^^\n\n//Note: to make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the {{{+++}}} 'start slider' or preceding the {{{===}}} 'end slider' sequence are automatically supressed so that excess whitespace is eliminated from the output.//\n===\n++++!!!!![Examples]>\nsimple in-line slider: \n{{{\n+++\n content\n===\n}}}\n+++\n content\n===\n----\nuse a custom label and tooltip: \n{{{\n+++[label|tooltip]\n content\n===\n}}}\n+++[label|tooltip]\n content\n===\n----\ncontent automatically blockquoted: \n{{{\n+++>\n content\n===\n}}}\n+++>\n content\n===\n----\nall options combined //(default open, cookie, heading, floater, rollover, label/tooltip, blockquoted, deferred)//\n{{{\n++++(testcookie)!!!^*[label|tooltip]>...\n content\n===\n}}}\n++++(testcookie)!!!^*[label|tooltip]>...\n content\n===\n----\ncomplex nesting example:\n{{{\n+++^[get info...|click for information]\n put some general information here, plus a floating slider with more specific info:\n +++^[view details...|click for details]\n put some detail here, which could include a rollover with a +++^*[glossary definition]explaining technical terms===\n ===\n===\n}}}\n+++^[get info...|click for information]\n put some general information here, plus a floating slider with more specific info:\n +++^[view details...|click for details]\n put some detail here, which could include a rollover with a +++^*[glossary definition]explaining technical terms===\n ===\n===\n----\nnested floaters\n>menu: <<tiddler NestedSlidersExample>>\n(see [[NestedSlidersExample]] for definition)\n----\n===\n+++!!!!![Installation]>\nimport (or copy/paste) the following tiddlers into your document:\n''NestedSlidersPlugin'' (tagged with <<tag systemConfig>>)\n===\n+++!!!!![Revision History]>\n\n++++[2006.02.16 - 1.7.7]\ncorrected deferred rendering to account for use-case where show/hide state is tracked in a cookie\n===\n\n++++[2006.02.15 - 1.7.6]\nin adjustSliderPos(), ensure that floating panel is positioned completely within the browser window (i.e., does not go beyond the right edge of the browser window)\n===\n\n++++[2006.02.04 - 1.7.5]\nadd 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals\n===\n\n++++[2006.01.18 - 1.7.4]\nonly define adjustSliderPos() function if it has not already been provided by another plugin. This lets other plugins 'hijack' the function even when they are loaded first.\n===\n\n++++[2006.01.16 - 1.7.3]\nadded adjustSliderPos(place,btn,panel,panelClass) function to permit specialized logic for placement of floating panels. While it provides improved placement for many uses of floating panels, it exhibits a relative offset positioning error when used within *nested* floating panels. Short-term workaround is to only adjust the position for 'top-level' floaters.\n===\n\n++++[2006.01.16 - 1.7.2]\nadded button property to slider panel elements so that slider panel can tell which button it belongs to. Also, re-activated and corrected animation handling so that nested sliders aren't clipped by hijacking Slider.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends\n===\n\n++++[2006.01.14 - 1.7.1]\nadded optional "^" syntax for floating panels. Defines new CSS class, ".floatingPanel", as an alternative for standard in-line ".sliderPanel" styles.\n===\n\n++++[2006.01.14 - 1.7.0]\nadded optional "*" syntax for rollover handling to show/hide slider without requiring a click (Based on a suggestion by tw4efl)\n===\n\n+++[2006.01.03 - 1.6.2]\nWhen using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element. (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)\n===\n\n+++[2005.12.15 - 1.6.1]\nadded optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders\nremoved checkbox option for 'global' application of lazy sliders\n===\n\n+++[2005.11.25 - 1.6.0]\nadded optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)\n===\n\n+++[2005.11.21 - 1.5.1]\nrevised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability. Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.\n===\n\n+++[2005.11.20 - 1.5.0]\n added (cookiename) syntax for optional tracking and restoring of slider open/close state\n===\n\n+++[2005.11.11 - 1.4.0]\n added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style\n===\n\n+++[2005.11.07 - 1.3.0]\n removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other\n formatting extensions) and simplified/improved regular expressions to trim multiple excess newlines\n===\n\n+++[2005.11.05 - 1.2.1]\n changed name to NestedSlidersPlugin\n more documentation\n===\n\n+++[2005.11.04 - 1.2.0]\n added alternative character-mode syntax {{{(((}}} and {{{)))}}}\n tweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax\n===\n\n+++[2005.11.03 - 1.1.1]\n fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used\n code cleanup, added documentation\n===\n\n+++[2005.11.03 - 1.1.0]\n changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}\n changed name to EasySlidersPlugin\n===\n\n+++[2005.11.03 - 1.0.0]\n initial public release\n===\n\n===\n+++!!!!![Credits]>\nThis feature was implemented by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]] with research, programming and suggestions from RodneyGomes, GeoffSlocock, and PaulPetterson\n===\n***/\n// //+++!!!!![Code]\n//{{{\nversion.extensions.nestedSliders = {major: 1, minor: 7, revision: 7, date: new Date(2006,2,16)};\n//}}}\n\n//{{{\n// options for deferred rendering of sliders that are not initially displayed\nif (config.options.chkDebugLazySliderDefer==undefined) config.options.chkDebugLazySliderDefer=false;\nif (config.options.chkDebugLazySliderRender==undefined) config.options.chkDebugLazySliderRender=false;\n\n// default styles for 'floating' class\nsetStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \s\n background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");\n//}}}\n\n//{{{\nconfig.formatters.push( {\n name: "nestedSliders",\n match: "\s\sn?\s\s+{3}",\n terminator: "\s\ss*\s\s={3}\s\sn?",\n lookahead: "\s\sn?\s\s+{3}(\s\s+)?(\s\s([^\s\s)]*\s\s))?(\s\s!*)?(\s\s^)?(\s\s*)?(\s\s[[^\s\s]]*\s\s])?(\s\s>)?(\s\s.\s\s.\s\s.)?\s\ss*",\n handler: function(w)\n {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n // location for rendering button and panel\n var place=w.output;\n\n // default to closed, no cookie\n var show="none"; var title=">"; var tooltip="show"; var cookie="";\n\n // extra "+", default to open\n if (lookaheadMatch[1])\n { show="block"; title="<"; tooltip="hide"; }\n\n // cookie, use saved open/closed state\n if (lookaheadMatch[2]) {\n cookie=lookaheadMatch[2].trim().substr(1,lookaheadMatch[2].length-2);\n cookie="chkSlider"+cookie;\n if (config.options[cookie]==undefined)\n { config.options[cookie] = (show=="block") }\n if (config.options[cookie])\n { show="block"; title="<"; tooltip="hide"; }\n else\n { show="none"; title=">"; tooltip="show"; }\n }\n\n // custom label/tooltip\n if (lookaheadMatch[6]) {\n title = lookaheadMatch[6].trim().substr(1,lookaheadMatch[6].length-2);\n var pos=title.indexOf("|");\n if (pos!=-1)\n { tooltip = title.substr(pos+1,title.length); title = title.substr(0,pos); }\n else\n { tooltip += " "+title; }\n }\n\n // create the button\n if (lookaheadMatch[3]) { // use "Hn" header format instead of button/link\n var lvl=(lookaheadMatch[3].length>6)?6:lookaheadMatch[3].length;\n var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,null,title);\n btn.onclick=onClickNestedSlider;\n btn.setAttribute("href","javascript:;");\n btn.setAttribute("title",tooltip);\n }\n else\n var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider);\n btn.sliderCookie = cookie; // save the cookiename (if any) in the button object\n\n // "non-click" MouseOver open/close slider\n if (lookaheadMatch[5]) btn.onmouseover=onClickNestedSlider;\n\n // create slider panel\n var panelClass=lookaheadMatch[4]?"floatingPanel":"sliderPanel";\n var panel=createTiddlyElement(place,"div",null,panelClass,null);\n panel.style.display = show;\n panel.button = btn; // so the slider panel know which button it belongs to\n btn.sliderPanel=panel;\n\n // render slider (or defer until shown) \n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n if ((show=="block")||!lookaheadMatch[8]) {\n // render now if panel is supposed to be shown or NOT deferred rendering\n w.subWikify(lookaheadMatch[7]?createTiddlyElement(panel,"blockquote"):panel,this.terminator);\n // align slider/floater position with button\n adjustSliderPos(place,btn,panel,panelClass);\n }\n else {\n var src = w.source.substr(w.nextMatch);\n var endpos=findMatchingDelimiter(src,"+++","===");\n panel.setAttribute("raw",src.substr(0,endpos));\n panel.setAttribute("blockquote",lookaheadMatch[7]?"true":"false");\n panel.setAttribute("rendered","false");\n w.nextMatch += endpos+3;\n if (w.source.substr(w.nextMatch,1)=="\sn") w.nextMatch++;\n if (config.options.chkDebugLazySliderDefer) alert("deferred '"+title+"':\sn\sn"+panel.getAttribute("raw"));\n }\n }\n }\n }\n)\n\n// TBD: ignore 'quoted' delimiters (e.g., "{{{+++foo===}}}" isn't really a slider)\nfunction findMatchingDelimiter(src,starttext,endtext) {\n var startpos = 0;\n var endpos = src.indexOf(endtext);\n // check for nested delimiters\n while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {\n // count number of nested 'starts'\n var startcount=0;\n var temp = src.substring(startpos,endpos-1);\n var pos=temp.indexOf(starttext);\n while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }\n // set up to check for additional 'starts' after adjusting endpos\n startpos=endpos+endtext.length;\n // find endpos for corresponding number of matching 'ends'\n while (startcount && endpos!=-1) {\n endpos = src.indexOf(endtext,endpos+endtext.length);\n startcount--;\n }\n }\n return (endpos==-1)?src.length:endpos;\n}\n//}}}\n\n//{{{\nfunction onClickNestedSlider(e)\n{\n if (!e) var e = window.event;\n var theTarget = resolveTarget(e);\n var theLabel = theTarget.firstChild.data;\n var theSlider = theTarget.sliderPanel\n var isOpen = theSlider.style.display!="none";\n // if using default button labels, toggle labels\n if (theLabel==">") theTarget.firstChild.data = "<";\n else if (theLabel=="<") theTarget.firstChild.data = ">";\n // if using default tooltips, toggle tooltips\n if (theTarget.getAttribute("title")=="show")\n theTarget.setAttribute("title","hide");\n else if (theTarget.getAttribute("title")=="hide")\n theTarget.setAttribute("title","show");\n if (theTarget.getAttribute("title")=="show "+theLabel)\n theTarget.setAttribute("title","hide "+theLabel);\n else if (theTarget.getAttribute("title")=="hide "+theLabel)\n theTarget.setAttribute("title","show "+theLabel);\n // deferred rendering (if needed)\n if (theSlider.getAttribute("rendered")=="false") {\n if (config.options.chkDebugLazySliderRender)\n alert("rendering '"+theLabel+"':\sn\sn"+theSlider.getAttribute("raw"));\n var place=theSlider;\n if (theSlider.getAttribute("blockquote")=="true")\n place=createTiddlyElement(place,"blockquote");\n wikify(theSlider.getAttribute("raw"),place);\n theSlider.setAttribute("rendered","true");\n }\n // show/hide the slider\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));\n else\n theSlider.style.display = isOpen ? "none" : "block";\n if (this.sliderCookie && this.sliderCookie.length)\n { config.options[this.sliderCookie]=!isOpen; saveOptionCookie(this.sliderCookie); }\n // align slider/floater position with target button\n adjustSliderPos(theSlider.parentNode,theTarget,theSlider,theSlider.className);\n return false;\n}\n\n// hijack animation handler 'stop' handler so overflow is visible after animation has completed\nSlider.prototype.coreStop = Slider.prototype.stop;\nSlider.prototype.stop = function() { this.coreStop(); this.element.style.overflow = "visible"; }\n\n// adjust panel position based on button position\nif (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel,panelClass) {\n ///////////////////////////////////////////////////////////////////////////////\n /// EXPERIMENTAL HACK - WORKS IN SOME CASES, NOT IN OTHERS\n ///////////////////////////////////////////////////////////////////////////////\n // "if this panel is floating and the parent is not also a floating panel"...\n if (panelClass=="floatingPanel" && place.className!="floatingPanel") {\n var left=0; var top=btn.offsetHeight;\n if (place.style.position!="relative") { left+=findPosX(btn); top+=findPosY(btn); }\n if (left+panel.offsetWidth > getWindowWidth()) left=getWindowWidth()-panel.offsetWidth-10;\n panel.style.left=left+"px"; panel.style.top=top+"px";\n }\n}\n\nfunction getWindowWidth() {\n if(document.width!=undefined)\n return document.width; // moz (FF)\n if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )\n return document.documentElement.clientWidth; // IE6\n if(document.body && ( document.body.clientWidth || document.body.clientHeight ) )\n return document.body.clientWidth; // IE4\n if(window.innerWidth!=undefined)\n return window.innerWidth; // IE - general\n return 0; // unknown\n}\n//}}}\n// //===
/***\n|Name|NewHereCommand|\n|Source|http://simonbaird.com/mptw/#NewHereCommand|\n|Version|1.0|\n\nCode originally by ArphenLin. Small tweak by SimonBaird\nhttp://aiddlywiki.sourceforge.net/NewHere_demo.html#NewHereCommand\nTo use this you must edit your ViewTemplate and add newHere to the toolbar div, eg\n{{{<div class='toolbar' macro='toolbar ... newHere'></div>}}}\n***/\n//{{{\n\nconfig.commands.newHere = {\n text: 'new here',\n tooltip: 'Create a new tiddler tagged as this tiddler',\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var t=document.getElementById('tiddler'+title);\n story.displayTiddler(t,config.macros.newTiddler.title,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(config.macros.newTiddler.title, title, 0);\n story.focusTiddler(config.macros.newTiddler.title,"title");\n return false;\n }\n }\n};\n\nconfig.commands.newJournalHere = {\n //text: 'new journal here', // too long\n text: 'new journal',\n dataFormat: 'YYYY-0MM-0DD 0hh:0mm', // adjust to your preference\n tooltip: 'Create a new journal tiddler tagged as this tiddler',\n handler: function(e,src,title) {\n if (!readOnly) {\n clearMessage();\n var now = new Date();\n var t=document.getElementById('tiddler'+title);\n var newtitle = now.formatString(this.dataFormat)\n story.displayTiddler(t,newtitle,DEFAULT_EDIT_TEMPLATE);\n story.setTiddlerTag(newtitle, title, 0);\n story.focusTiddler(newtitle,"title");\n return false;\n }\n }\n};\n\n\n//}}}
/***\n|''Name:''|NoSaveOnDiskOverHttpHijack|\n|''Description:''|When the TiddlyWiki file is located on the web (view over http) and is not viewed in readOnly mode, the "save changes" button is not created.|\n|''Version:''|1.0.0|\n|''Date:''|Jul 4, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#NoSaveOnDiskOverHttpHijack|\n|''Author:''|BidiX (BidiX (at) bidix (dot) info)|\n|''License:''|[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D ]]|\n|''~CoreVersion:''|2.0.0|\n|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|\n|''Include:''|none|\n|''Require:''|none|\n***/\n//{{{\nversion.extensions.NoSaveOnDiskOverHttpHijack = {major: 1, minor: 0, revision: 0, date: new Date(2006,7,4), source: ""};\n\nconfig.macros.saveChanges.handler_orig_NoSaveOnDiskOverHttpHijack = config.macros.saveChanges.handler;\nconfig.macros.saveChanges.handler = function(place)\n{\n if ((!readOnly) && (document.location.toString().substr(0,4) != "http"))\n createTiddlyButton(place,this.label,this.prompt,this.onClick,null,null,this.accessKey);\n}\n//}}}
These InterfaceOptions for customising TiddlyWiki are saved in your browser\n\nYour username for signing your edits. Write it as a WikiWord (eg JoeBloggs)\n\n<<option txtUserName>>\n<<option chkSaveBackups>> SaveBackups\n<<option chkAutoSave>> AutoSave\n<<option chkRegExpSearch>> RegExpSearch\n<<option chkCaseSensitiveSearch>> CaseSensitiveSearch\n<<option chkAnimate>> EnableAnimations\n\n----\nAdvancedOptions\nUploadOptions\nPluginManager\nImportTiddlers
TiddlyWiki was created by JeremyRuston - BidiXTW was developed by BidiX - <<tiddler SiteTitle>> at <script>\nvar location = document.location.toString();\nvar filename = config.lib.file.basename(location);\nif (!filename) filename = config.lib.file.dirname(location);\nreturn "[["+filename+"|"+location+"]]";\n</script>
<div id='page'>\n<div id='header'>\n<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>\n<div class='headerShadow'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div class='headerForeground'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n</div>\n<div id='topMenu' refresh='content' tiddler='TopMenu'></div>\n<!--<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>-->\n<div id='sidebar'>\n<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></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 id='adsenseArea'></div>\n<div id='pageFooter' refresh='content' tiddler='PageFooter'></div>\n</div>\n</div>\n
//From [[www.TiddlyWiki.com/#PluginDirectory|http://www.TiddlyWiki.com/#PluginDirectory]]\n//\nThe [[Community]] is experimenting with using the [[del.icio.us|http://del.icio.us/]] bookmarking service as a PluginDirectory. The idea is to use the tag "TiddlyWikiPlugin" to identify the URL of a TiddlyWiki plugin. The del.icio.us fields should be set as follows:\n\n|!Field |!Example |\n|url |http://authorsite.com/#ThePlugin |\n|title |ThePluginTitle |\n|notes |Brief description/review of plugin |\n|tags |TiddlyWikiPlugin <AuthorName> |\n\nThe beauty of this approach is that it aggregates together multiple comments about a single plugin. For example, this is the del.icio.us [[page about UdoBorkowski's YourSearch plugin|http://del.icio.us/url/8085cbf3bbeda20f39a04a2969616afd]]. You can also browse the tag directly to see recently added plugins: http://del.icio.us/tag/TiddlyWikiPlugin\n\nBidiX has also created a special del.icio.us account http://del.icio.us/TiddlyWikiPlugin that he's using to compile a master list of plugins tagged with TiddlyWikiHackers.\n----\n[[del.icio.us/TiddlyWikiPlugin]] to see the recently added plugins.
/***\n|''Name:''|PositionAdsense|\n|''Description:''|Install the adsenseBar from MarkupPreBody in adsenseArea of PageTemplate|\n|''Version:''|0.1.0|\n|''Date:''|Aug 13, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#PositionAdsense|\n|''Author:''|[[SimonBaird]]|\n|''Adaptation:''|BidiX (BidiX (at) bidix (dot) info)|\n|''~CoreVersion:''|2.1.0|\n***/\n//{{{\n//an adaption from SimonBaird http://tiddlyspot.com/mptw/#PositionAdsense\nvar restart_orig_ads = restart;\nwindow.restart = function(title) {\n var PA_bar = document.getElementById('adsenseBar');\n var adsenseArea= document.getElementById('adsenseArea');\n adsenseArea.appendChild(PA_bar);\n PA_bar.style.display = 'block';\n restart_orig_ads(title);\n};\n//}}}
script>\nwindow.applyPageTemplate_orig_ads = window.applyPageTemplate;\n\n var PA_bar = document.getElementById('adsenseBar');\n var adsenseArea= document.getElementById('adsenseArea');\n adsenseArea.appendChild(PA_bar);\n PA_bar.style.display = 'block';\n \nwindow.applyPageTemplate = function(title) {\n\n applyPageTemplate_orig_ads(title);\n var adsenseArea= document.getElementById('adsenseArea');\n if (adsenseArea && PA_bar) {\n adsenseArea.appendChild(PA_bar);\n }\n};\n</script>
\nWhen a TiddlyWiki is located on the web (view over http), for security reasons, browsers do not allow TiddlyWiki to access a remote page located on a different site.\n\nFor example, when views over http a TiddlyWiki is unable to:\n*import a plugin using EricShulman's ImportTiddlersPlugin\n*access <<tag RSSFeeds>> with RSSReaderPlugin\n*imbed a remote page in a tiddler\n* ...\n\nA first possibility is to bypass the browser check. However, visitors usually are not comfortable with altering the security options of their browser. \n\nThe ProxyService tries to provide an other way. \n\nProxyService is mainly a Ruby script that implements a very simple proxy. The command: proxy.cgi?url=host.domain.com/some/page.html simply gets and returns the URL.\n\nNevertheless, this service should not be used for other purpose than as TiddlyWiki companion and under the author's control, the access is allowed only to a list of site contained in a separate file ([[.tsallowedsites]] for example)\n\nThanks to UploadToFileMacro, this allowedSiteList could be fully maintained in TiddlyWiki by editing [[.tsallowedsites]] and using <<uploadToFile .tsallowedsites .tsallowedsites>> macro.\n\nLong past, Eric included in his ImportTiddlersPlugin the ability to specify a proxy URL as a parameter SiteProxy could be provide to initialize it.\n\nFinally, as in AllowedSiteList proxy.cgi?action=list return the current allowed host list.\n
/***\n| Name:|QuickOpenTagPlugin|\n| Purpose:|Makes tag links into a Taggly style open tag plus a normal style drop down menu|\n| Creator:|SimonBaird|\n| Source:|http://simonbaird.com/mptw/#QuickOpenTagPlugin|\n| Requires:|TW 2.x|\n| Version|1.1.1 (19-May-06)|\n\n!History\n* Version 1.1.1 (19/05/2006)\n** Added a little more CSS so the tags look good in standard main menus and normal tiddlers\n* Version 1.1 (07/02/2006)\n** Fix Firefox 1.5.0.1 crashes\n** Updated by ~BidiX[at]~BidiX.info\n* Version 1.0 (?/01/2006)\n** First release\n\n***/\n//{{{\n\n//⊻ ⊽ ⋁ ▼ \n\nwindow.createTagButton_orig_mptw = createTagButton;\nwindow.createTagButton = function(place,tag,excludeTiddler) {\n var sp = createTiddlyElement(place,"span",null,"quickopentag");\n createTiddlyLink(sp,tag,true,"button");\n var theTag = createTiddlyButton(sp,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tag]),onClickTag);\n theTag.setAttribute("tag",tag);\n if(excludeTiddler)\n theTag.setAttribute("tiddler",excludeTiddler);\n return(theTag);\n};\n\nconfig.macros.miniTag = {handler:function(place,macroName,params,wikifier,paramString,tiddler) {\n var tagged = store.getTaggedTiddlers(tiddler.title);\n if (tagged.length > 0) {\n var theTag = createTiddlyButton(place,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);\n theTag.setAttribute("tag",tiddler.title);\n theTag.className = "miniTag";\n }\n}};\n\nconfig.macros.miniTag.dropdownchar = (document.all?"▼":"▾"); // the fat one is the only one that works in IE\n\nconfig.macros.allTags.handler = function(place,macroName,params)\n{\n var tags = store.getTags();\n var theDateList = createTiddlyElement(place,"ul",null,null,null);\n if(tags.length === 0)\n createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);\n for (var t=0; t<tags.length; t++)\n {\n var theListItem =createTiddlyElement(theDateList,"li",null,null,null);\n var theLink = createTiddlyLink(theListItem,tags[t][0],true);\n var theCount = " (" + tags[t][1] + ")";\n theLink.appendChild(document.createTextNode(theCount));\n\n var theDropDownBtn = createTiddlyButton(theListItem," "+config.macros.miniTag.dropdownchar,this.tooltip.format([tags[t][0]]),onClickTag);\n theDropDownBtn.setAttribute("tag",tags[t][0]);\n }\n};\n\n\n// probably could redo these styles a bit cleaner..\nsetStylesheet(\n ".tagglyTagged .quickopentag, .tagged .quickopentag \sn"+\n " { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }\sn"+\n ".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }\sn"+\n ".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}\sn"+\n// extra specificity to make it work?\n "#displayArea .viewer .quickopentag a.button, \sn"+\n "#displayArea .viewer .quickopentag a.tiddyLink, \sn"+\n "#mainMenu .quickopentag a.tiddyLink, \sn"+\n "#mainMenu .quickopentag a.tiddyLink \sn"+\n " { border:0px solid black; }\sn"+\n "#displayArea .viewer .quickopentag a.button, \sn"+\n "#mainMenu .quickopentag a.button \sn"+\n "{ margin-left:0px; padding-left:2px; }\sn"+\n "#displayArea .viewer .quickopentag a.tiddlyLink, \sn"+\n "#mainMenu .quickopentag a.tiddlyLink \sn"+\n " { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }\sn"+\n "a.miniTag {font-size:150%;} \sn"+\n "#mainMenu .quickopentag a.button \sn"+\n "{ margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }\sn"+ // looks better in right justified main menus\n "",\n"QuickOpenTagStyles");\n\n//}}}\n\n/***\n<html>&#x22bb; &#x22bd; &#x22c1; &#x25bc; &#x25be;</html>\n***/\n
The main goals of RSSExtensions are :\n*to generate an RSSFeed with plaintext, html and TiddlyWiki content\n*to provide a builtin RSSReader (by extending BramChen's RssNewsMacro for) :\n**HTML support when RSSFeed uses HTML formatting\n**TiddlyWikiNamespace support for direct viewing and possibly import a tiddler from an RSSFeed\n*to generate a kind of frontpage for a TiddlyWiki from an RSSFeed\nRSSExtensions contains :\n*TiddlyWikiNamespace: define the TiddlyWikiNamespace \n*GenerateRssHijack: hijack the core generateRSS\n*RSSReaderPlugin: provides the RSSReaderMacro for TiddlyWiki\n*[[news.php]]: this php script display an RSSFeed\n*[[proxy.php]]: when located on the TiddlyWiki site provides OtherSites access\n
/***\n|''Name:''|RSSReaderPlugin|\n|''Description:''|This plugin provides a RSSReader for TiddlyWiki|\n|''Version:''|0.2.1|\n|''Date:''|Jun 8, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#RSSReaderPlugin|\n|''Documentation:''|http://tiddlywiki.bidix.info/#RSSReaderPluginDoc|\n|''Author:''|BidiX (BidiX (at) bidix (dot) info)|\n|''Credit:''|BramChen for RssNewsMacro|\n|''License:''|[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D ]]|\n|''~CoreVersion:''|2.0.0|\n|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|\n|''Include:''|none|\n|''Require:''|none|\n***/\n//{{{\nversion.extensions.RSSReaderPlugin = {\n major: 0, minor: 2, revision: 1,\n date: new Date("jun 8, 2006"),\n author: "BidiX",\n credit: "BramChen for RssNewsMacro",\n source: "http://TiddlyWiki.bidix.info/#RSSReaderPlugin",\n documentation : "http://TiddlyWiki.bidix.info/#RSSReaderPluginDoc",\n author: 'BidiX (BidiX (at) bidix (dot) info',\n license: '[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D]]',\n coreVersion: '2.0.0',\n browser: 'Firefox 1.5; InternetExplorer 6.0; Safari' \n};\n\nconfig.macros.rssReader = {\n dateFormat: "DDD, DD MMM YYYY",\n itemStyle: "display: block;border: 1px solid black;padding: 5px;margin: 5px;", //useed '@@'+itemStyle+itemText+'@@'\n msg:{\n permissionDenied: "Permission to read preferences was denied.",\n noRSSFeed: "No RSS Feed at this address %0",\n urlNotAccessible: " Access to %0 is not allowed"\n },\n cache: [], // url => request\n desc: "noDesc",\n // feedURL: "",\n place:"",\n handler: function(place,macroName,params,wikifier,paramString,tiddler){\n var desc = params[0];\n var feedURL = params[1];\n wikify("^^<<rssFeedUpdate "+feedURL+" [[" + tiddler.title + "]]>>^^\sn",place);\n if (this.cache[feedURL]) {\n this.processResponse(this.cache[feedURL], feedURL, place, desc);\n }\n else {\n this.asyncGet(feedURL, place, desc);\n }\n },\n\n asyncGet: function (feedURL, place, desc){\n var xmlhttp;\n try {xmlhttp=new XMLHttpRequest();}\n catch (e) {\n try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}\n catch (e) {\n try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}\n catch (e) { displayMessage(e.description?e.description:e.toString());}\n }\n }\n if (!xmlhttp){\n return;\n }\n if (window.netscape){\n try {\n if (document.location.protocol.indexOf("http") == -1) {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n }\n }\n catch (e) { displayMessage(e.description?e.description:e.toString()); }\n }\n xmlhttp.onreadystatechange=function (){\n if (xmlhttp.readyState==4) {\n if (xmlhttp.status==200 || xmlhttp.status===0) {\n config.macros.rssReader.processResponse(xmlhttp, feedURL, place, desc);\n }\n else {\n displayMessage("Problem retrieving XML data:" + xmlhttp.statusText);\n }\n }\n };\n try {\n xmlhttp.open("GET",feedURL,true);\n if (config.browser.isIE) {\n xmlhttp.send();\n }\n else {\n xmlhttp.send(null);\n }\n }\n catch (e) {\n wikify(e.toString()+this.urlNotAccessible.format([feedURL]), place);\n }\n },\n processResponse: function(xmlhttp, feedURL, place, desc){ \n if (window.netscape){\n try {\n if (document.location.protocol.indexOf("http") == -1) {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n }\n }\n catch (e) { displayMessage(e.description?e.description:e.toString()); }\n }\n if (xmlhttp.responseXML){\n this.cache[feedURL] = xmlhttp;\n this.genRssNews(xmlhttp.responseXML, place, feedURL, desc);\n }\n else {\n var dom = (new DOMParser()).parseFromString(xmlhttp.responseText, "text/xml"); \n if (dom) {\n this.cache[feedURL] = xmlhttp;\n this.genRssNews(dom, place, feedURL, desc);\n }\n else {\n wikify("<html>"+xmlhttp.responseText+"</html>", place);\n displayMessage(this.msg.noRSSFeed.format([feedURL]));\n }\n }\n },\n genRssNews: function(xml, place, feedURL, desc){\n // Channel\n var chanelNode = xml.getElementsByTagName('channel').item(0);\n var chanelTitleElement = (chanelNode ? chanelNode.getElementsByTagName('title').item(0) : null);\n var chanelTitle = "";\n if ((chanelTitleElement) && (chanelTitleElement.firstChild)) chanelTitle = chanelTitleElement.firstChild.nodeValue;\n var chanelLinkElement = (chanelNode ? chanelNode.getElementsByTagName('link').item(0) : null);\n var chanelLink = "";\n if (chanelLinkElement) chanelLink = chanelLinkElement.firstChild.nodeValue;\n var titleTxt = "!![["+chanelTitle+"|"+chanelLink+"]]\sn";\n var title = createTiddlyElement(place,"div",null,"ChanelTitle",null);\n wikify(titleTxt,title);\n // ItemList\n var itemList = xml.getElementsByTagName('item');\n var article = createTiddlyElement(place,"ul",null,null,null);\n var lastDate;\n for (var i=0; i<itemList.length; i++){\n var titleElm = itemList[i].getElementsByTagName('title').item(0);\n var titleText = (titleElm ? titleElm.firstChild.nodeValue : '');\n var descText = '';\n var isWikitext = false;\n var descElem = itemList[i].getElementsByTagName('wikitext').item(0);\n if (descElem){\n try{\n isWikitext = true;\n descText = "\sn"+descElem.firstChild.nodeValue;}\n catch(e){}\n }\n else {\n descElem = itemList[i].getElementsByTagName('encoded').item(0);\n if (descElem){\n try{descText = descElem.firstChild.nodeValue;}\n catch(e){}\n descText = "<html>"+descText+"</html>";\n }\n else {\n descElem = itemList[i].getElementsByTagName('description').item(0);\n if (descElem){\n try{descText = descElem.firstChild.nodeValue;}\n catch(e){}\n descText = descText.replace(/<br \s/>/g,'\sn');\n if (desc == "asHtml")\n descText = "<html>"+descText+"</html>";\n }\n }\n }\n var linkElm = itemList[i].getElementsByTagName("link").item(0);\n var linkURL = linkElm.firstChild.nodeValue;\n var pubElm = itemList[i].getElementsByTagName('pubDate').item(0);\n var pubDate;\n if (!pubElm) {\n pubElm = itemList[i].getElementsByTagName('date').item(0); // for del.icio.us\n pubDate = (pubElm ? pubElm.firstChild.nodeValue : 0);\n pubDate = this.formatDateString(this.dateFormat, pubDate);\n }\n else {\n pubDate = (pubElm ? pubElm.firstChild.nodeValue : 0);\n pubDate = this.formatString(this.dateFormat, pubDate);\n }\n titleText = titleText.replace(/\s[|\s]/g,'');\n var rssText = '** '+'[[' + titleText + '|' + linkURL + ']]' + '\sn' ;\n if ((desc != "noDesc") && descText){\n if (version.extensions.nestedSliders){\n rssText = rssText.replace(/\sn/g,' ');\n descText = '+++[...]\sn'\n +(isWikitext ? '\sn<<rssFeedImportTiddler '+ feedURL + ' [['+titleText+']]>>':'')\n +'@@'+this.itemStyle+descText+'\sn@@\sn'\n +'===';\n }\n rssText = rssText + descText + '\sn\sn';\n }\n var story;\n if (lastDate != pubDate){\n story = createTiddlyElement(article,"li",null,"RSSItem",pubDate);\n lastDate = pubDate;\n }\n story = createTiddlyElement(article,"div",null,"RSSItem",null);\n wikify(rssText,story);\n }\n },\n formatString: function(template, theDate){\n var dateString = new Date(theDate);\n template = template.replace(/hh|mm|ss/g,'');\n return dateString.formatString(template);\n },\n formatDateString: function(template, theDate){\n var dateString = new Date(theDate.substr(0,4), theDate.substr(5,2) - 1, theDate.substr(8,2)\n /*, theDate.substr(11,2), theDate.substr(14,2), theDate.substr(17,2)*/\n );\n return dateString.formatString(template);\n }\n \n};\n//}}}\n\n//{{{\nconfig.macros.rssFeedUpdate = {\n label: "Update",\n prompt: "Clear the cache and redisplay this RssFeed",\n handler: function(place,macroName,params) {\n var feedURL = params[0];\n var tiddlerTitle = params[1];\n createTiddlyButton(place, this.label, this.prompt, \n function () {\n if (config.macros.rssReader.cache[feedURL]) {\n config.macros.rssReader.cache[feedURL] = null; \n //story.refreshTiddler(tiddlerTitle,null, true);\n }\n story.refreshTiddler(tiddlerTitle,null, true);\n return false;});\n }\n};\n//}}}\n\n//{{{\nconfig.macros.rssFeedImportTiddler = {\n label: "Import",\n prompt: "Import this tiddler in this TiddlyWiki",\n askReplaceMsg: "Tiddler already exists, replace it ?",\n handler: function(place,macroName,params) {\n var feedUrl = params[0];\n var tiddlerTitle = params[1];\n createTiddlyButton(place, this.label, this.prompt, \n function () {\n if (feedUrl && config.macros.rssReader.cache[feedUrl]) {\n var tiddler = config.macros.rssFeedImportTiddler.parseRssNews(config.macros.rssReader.cache[feedUrl].responseXML, tiddlerTitle);\n if (tiddler && (! store.getTiddler(tiddlerTitle) || confirm(config.macros.rssFeedImportTiddler.askReplaceMsg))) {\n store.addTiddler(tiddler);\n store.notify(tiddler.title, true);\n store.setDirty(true);\n }\n }\n return false;});\n },\n \n // parse a RssFeed for retrieving a Tiddler with title\n parseRssNews: function(xml, title) {\n // ItemList\n if (document.location.protocol.indexOf("http") == -1) {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n }\n\n var itemList = xml.getElementsByTagName('item');\n for (var i=0; i<itemList.length; i++){\n\n var titleElm = itemList[i].getElementsByTagName('title').item(0);\n var titleText = titleElm.firstChild.nodeValue;\n if (titleText == title) {\n // <tiddlywiki:title>\n // titleText\n titleText = titleText.htmlDecode();\n // <tiddlywiki:wikitext>\n var elem = itemList[i].getElementsByTagName('wikitext').item(0);\n var text = elem ? elem.firstChild.nodeValue.htmlDecode() : "";\n // <tiddlywiki:modifier>\n elem = itemList[i].getElementsByTagName('modifier').item(0);\n var modifier = elem ? elem.firstChild.nodeValue : "";\n // <tiddlywiki:modified>\n elem = itemList[i].getElementsByTagName('modified').item(0);\n var modified = elem ? Date.convertFromYYYYMMDDHHMM(elem.firstChild.nodeValue) : "";\n // <tiddlywiki:created>\n elem = itemList[i].getElementsByTagName('created').item(0);\n var created = elem ? Date.convertFromYYYYMMDDHHMM(elem.firstChild.nodeValue) : "";\n // <tiddlywiki:links>\n // Links ?\n // <tiddlywiki:tags>\n elem = itemList[i].getElementsByTagName('tags').item(0);\n var tags = elem ? elem.firstChild.nodeValue.htmlDecode() : "";\n var tiddler = new Tiddler();\n tiddler.assign(titleText,text,modifier,modified,tags,created);\n return tiddler;\n }\n }\n // not found \n alert("Tiddler \s[[" + title +"]] notFound.");\n return null;\n }\n\n};\n\n//}}}\n
//last update: RSSReaderPlugin v 0.2.1//\n\n!Description\nThis plugin provides a RSSReader for TiddlyWiki\n* It accesses asynchronously an RSSFeed\n*Depending on the chanel item format, each item could be written as :\n**simple text wikified\n**html\n*If item contains content:encoded element, the text is printed as html\n*If item contains tiddlywiki:wikitext using [[TiddlyWikiNamespace]], the tiddler could then be imported.\n\n!Usage\n{{{\n<<rssReader noDesc|asHtml|asText rssUrl>>\n noDesc: only title of item is printed\n asHtml: if you know that description contain html (links, img ...), \n the text is enclosed with <html> </html>\n asText: if the description should not be interpreted as html the \n description is wikified\n\n rssUrl: the rssFeed url that could be accessed. \n}}}\n\nFor security reasons, if the TiddlyWiki is accessed from http, a [[proxy|proxy.php]] could be used to access an rssFeed from an other site. See examples for different cases. \n\n!examples\n| !reader | !RSSFeed type | !working from | !importTiddler |\n| BidiXTWRSS |TiddlyWikiNamespace | file: or tiddlywiki.bidix.info | yes |\n| [[Le Monde]] | Description asText | file: or tiddlywiki.bidix.info using proxy | no |\n| YahooNewsSport | Description asHtml | file: or tiddlywiki.bidix.info using proxy | no |\n| TiddlyForgeRSS | content:encoded | file: or tiddlywiki.bidix.info using proxy | no |\n| TiddlyWikiRSS | Description asText | file: or tiddlywiki.bidix.info using proxy | no |\n| [[Libération]] | noDesc | file: or tiddlywiki.bidix.info using proxy | no |\n\n!Revision history\n* v0.2.1 (08/05/2006)\n* v0.2.0 (01/05/2006)\n**Small adapations for del.icio.us feed\n* v0.1.1 (28/04/2006)\n**Bug : Channel without title \n* v0.1.0 (24/04/2006)\n** initial release\n\n\n
/***\n| Name:|RenameTagsPlugin|\n| Purpose:|Allows you to easily rename tags|\n| Creator:|SimonBaird|\n| Source:|http://simonbaird.com/mptw/#RenameTagsPlugin|\n| Version:|1.0.1 (5-Mar-06)|\n\n!Description\nIf you rename a tiddler/tag that is tagging other tiddlers this plugin will ask you if you want to rename the tag in each tiddler where it is used. This is essential if you use tags and ever want to rename them. To use it, open the tag you want to rename as a tiddler (it's the last option in the tag popup menu), edit it, rename it and click done. You will asked if you want to rename the tag. Click OK to rename the tag in the tiddlers that use it. Click Cancel to not rename the tag.\n\n!Example\nTry renaming [[Plugins]] or [[CSS]] on this site.\n\n!History\n* 1.0.1 (5-Mar-06) - Added feature to allow renaming of tags without side-effect of creating a tiddler\n* 1.0.0 (5-Mar-06) - First working version\n\n!Code\n***/\n//{{{\n\nversion.extensions.RenameTagsPlugin = {\n major: 1, minor: 0, revision: 0,\n date: new Date(2006,3,5),\n source: "http://simonbaird.com/mptw/#RenameTagsPlugin"\n};\n\nconfig.macros.RenameTagsPlugin = {};\nconfig.macros.RenameTagsPlugin.prompt = "Rename the tag '%0' to '%1' in %2 tidder%3?";\n\n// these are very useful, perhaps they should be in the core\nif (!store.addTag) {\n store.addTag = function(title,tag) {\n var t=this.getTiddler(title); if (!t || !t.tags) return;\n t.tags.push(tag);\n };\n};\n\nif (!store.removeTag) {\n store.removeTag = function(title,tag) {\n var t=this.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);\n };\n};\n\nstore.saveTiddler_orig_tagrename = store.saveTiddler;\nstore.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags) {\n if (title != newTitle && this.getTaggedTiddlers(title).length > 0) {\n // then we are renaming a tag\n var tagged = this.getTaggedTiddlers(title);\n if (confirm(config.macros.RenameTagsPlugin.prompt.format([title,newTitle,tagged.length,tagged.length>1?"s":""]))) {\n for (var i=0;i<tagged.length;i++) {\n store.removeTag(tagged[i].title,title);\n store.addTag(tagged[i].title,newTitle);\n // if tiddler is visible refresh it to show updated tag\n story.refreshTiddler(tagged[i].title,false,true);\n }\n }\n if (!this.tiddlerExists(title) && newBody == "") {\n // dont create unwanted tiddler\n return null;\n }\n }\n return this.saveTiddler_orig_tagrename(title,newTitle,newBody,modifier,modified,tags);\n}\n\n//}}}\n\n
/***\nIntended for use in ViewTemplate\n!Examples\n|{{{<<runMacroIfTagged [[Groceries]] toggleTag Buy>>}}}|<<runMacroIfTagged [[Groceries]] toggleTag Buy>>|\n|{{{<<runMacroIfTagged Plugins toggleTag systemConfig>>}}}|<<runMacroIfTagged Plugins toggleTag systemConfig>>|\n***/\n//{{{\n\n// This function contributed by Eric Shulman\nfunction toggleTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)==null) t.tags.push(tag)\n else t.tags.splice(t.tags.find(tag),1)\n}\n\n// This function contributed by Eric Shulman\nfunction isTagged(title,tag) {\n var t=store.getTiddler(title); if (!t) return false;\n return (t.tags.find(tag)!=null);\n}\n\nconfig.macros.runMacroIfTagged = {};\nconfig.macros.runMacroIfTagged.handler = function(place,macroName,params,wikifier,paramString,tiddler) {\n if (isTagged(tiddler.title,params[0]))\n config.macros[params[1]].handler(place,params[1],params.slice(2),wikifier,paramString/*fixme*/,tiddler);\n}\n\n//}}}\n/***\n!Todo\n* paramString needs to have the first word removed from the front of it at fixme above\n\n\n***/\n\n
<<search>><<tiddler toggleHeader>><<closeAll>><<permaview>><<newTiddler>><<saveChanges>><<upload store.cgi BidiXTW.html backup>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
proxy.cgi?url=
Repository for BidiX's TiddlyWiki Extensions
BidiXTW
http://tiddlywiki.bidix.info/
/***\n\n''Inspired by [[TiddlyPom|http://www.warwick.ac.uk/~tuspam/tiddlypom.html]]''\n\n|Name|SplashScreenPlugin|\n|Created by|SaqImtiaz|\n|Location|http://lewcid.googlepages.com/lewcid.html#SplashScreenPlugin|\n|Version|0.21 |\n|Requires|~TW2.08+|\n!Description:\nProvides a simple splash screen that is visible while the TW is loading.\n\n!Installation\nCopy the source text of this tiddler to your TW in a new tiddler, tag it with systemConfig and save and reload. The SplashScreen will now be installed and will be visible the next time you reload your TW.\n\n!Customizing\nOnce the SplashScreen has been installed and you have reloaded your TW, the splash screen html will be present in the MarkupPreHead tiddler. You can edit it and customize to your needs.\n\n!History\n* 20-07-06 : version 0.21, modified to hide contentWrapper while SplashScreen is displayed.\n* 26-06-06 : version 0.2, first release\n\n!Code\n***/\n//{{{\nvar old_lewcid_splash_restart=restart;\n\nrestart = function()\n{ if (document.getElementById("SplashScreen"))\n document.getElementById("SplashScreen").style.display = "none";\n if (document.getElementById("contentWrapper"))\n document.getElementById("contentWrapper").style.display = "block";\n \n old_lewcid_splash_restart();\n \n if (splashScreenInstall)\n {if(config.options.chkAutoSave)\n {saveChanges();}\n displayMessage("TW SplashScreen has been installed, please save and refresh your TW.");\n }\n}\n\n\nvar oldText = store.getTiddlerText("MarkupPreHead");\nif (oldText.indexOf("SplashScreen")==-1)\n {var siteTitle = store.getTiddlerText("SiteTitle");\n var splasher='\sn\sn<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';\n if (! store.tiddlerExists("MarkupPreHead"))\n {var myTiddler = store.createTiddler("MarkupPreHead");}\n else\n {var myTiddler = store.getTiddler("MarkupPreHead");}\n myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);\n store.setDirty(true);\n var splashScreenInstall = true;\n}\n//}}}
/*{{{*/\n#page { \n border-left: 2px solid #eee;\n border-right: 2px solid #aaa;\n border-bottom: 2px solid #aaa;\n padding: 0pt;\n margin-left: auto;\n margin-right: auto;\n margin-top: 0px;\n width: 70em;\n position: relative;\n text-align: left;\n background-color: [[ColorPalette::TertiaryLight]];\n color: [[ColorPalette::Foreground]];\n}\n\nbody {\n background: [[ColorPalette::TertiaryMid]];\n}\n\n#topMenu {\n font-size: 1.4em;\n font-family: 'Trebuchet MS' Arial sans-serif;\n text-decoration: none;\n background: [[ColorPalette::PrimaryDark]];\n color: [[ColorPalette::PrimaryPale]]; \n height: 26px;\n padding-top: 5px;\n padding-left: 5px;\n}\n\n#topMenu .button, #topMenu .tiddlyLink, #topMenu a {\n color: [[ColorPalette::PrimaryPale]]; \n border: 0;\n text-decoration: none;\n}\n\n#topMenu .button:hover, #topMenu .tiddlyLink:hover { \n color: [[ColorPalette::Background]]; \n text-decoration: none; \n background: [[ColorPalette::PrimaryDark]];\n}\n\n#topMenu a:hover { \n color: [[ColorPalette::Background]]; \n text-decoration: underline; \n background: [[ColorPalette::PrimaryDark]];\n}\n\n#topMenu strong a {\n color: [[ColorPalette::Background]];\n}\n\n#sidebar { \n background-color: [[ColorPalette::Background]];\n}\n\n\n#displayArea {\n margin: 1em 15em 0em 1em;\n}\n\n.tiddler {\n border-top: solid 1px #ccc;\n border-left: solid 1px #ccc;\n border-right: solid 3px #aaa;\n border-bottom: solid 3px #aaa;\n padding: 1em 1em 1em 1em;\n margin: 0em 1em 2em 1em;\n width: 50em;\n background-color: [[ColorPalette::Background]];\n -moz-border-radius: 1.0em;\n}\n\n\nh1 {border-bottom: solid [[ColorPalette::Foreground]] 1px;}\n\n.title,h1,h2,h3,h4,h5 { \n font-family: 'Trebuchet MS' Arial sans-serif;\n}\n\n\n\nh1,h2,h3,h4,h5 {\n color: [[ColorPalette::Foreground]];\n background:[[ColorPalette::Background]];\n}\n\n#pageFooter {\n border-top: 1px solid [[ColorPalette::PrimaryMid]];\n}\n\n.subtitle {\n padding-left: 2em;\n font-size: .8em;\n}\n\n\n[[TagglyTaggingList]]\n\n@media print {\n .header { display: none;}\n #page { background: #fff; border: 0;}\n #topMenu { display: none;}\n #pageFooter { display: none;}\n}\n/*}}}*/\n
/***\n|Name|TagglyListPlugin|\n|Created by|SimonBaird|\n|Location|http://simonbaird.com/mptw/#TagglyListPlugin|\n|Version|1.1.2 25-Apr-06|\n|Requires|See TagglyTagging|\n\n!History\n* 1.1.2 (25-Apr-2006) embedded TagglyTaggingStyles. No longer need separated tiddler for styles.\n* 1.1.1 (6-Mar-2006) fixed bug with refreshAllVisible closing tiddlers being edited. Thanks Luke Blanshard.\n\n***/\n\n/***\n!Setup and config\n***/\n//{{{\n\nversion.extensions.TagglyListPlugin = {\n major: 1, minor: 1, revision: 2,\n date: new Date(2006,4,25),\n source: "http://simonbaird.com/mptw/#TagglyListPlugin"\n};\n\nconfig.macros.tagglyList = {};\nconfig.macros.tagglyListByTag = {};\nconfig.macros.tagglyListControl = {};\nconfig.macros.tagglyListWithSort = {};\nconfig.macros.hideSomeTags = {};\n\n// change this to your preference\nconfig.macros.tagglyListWithSort.maxCols = 6;\n\nconfig.macros.tagglyList.label = "Tagged as %0:";\n\n// the default sort options. set these to your preference\nconfig.macros.tagglyListWithSort.defaults = {\n sortBy:"title", // title|created|modified\n sortOrder: "asc", // asc|desc\n hideState: "show", // show|hide\n groupState: "nogroup", // nogroup|group\n numCols: 1\n};\n\n// these tags will be ignored by the grouped view\nconfig.macros.tagglyListByTag.excludeTheseTags = [\n "systemConfig",\n "TiddlerTemplates"\n];\n\nconfig.macros.tagglyListControl.tags = {\n title:"sortByTitle", \n modified: "sortByModified", \n created: "sortByCreated",\n asc:"sortAsc", \n desc:"sortDesc",\n hide:"hideTagged", \n show:"showTagged",\n nogroup:"noGroupByTag",\n group:"groupByTag",\n cols1:"list1Cols",\n cols2:"list2Cols",\n cols3:"list3Cols",\n cols4:"list4Cols",\n cols5:"list5Cols",\n cols6:"list6Cols",\n cols7:"list7Cols",\n cols8:"list8Cols",\n cols9:"list9Cols" \n}\n\n// note: should match config.macros.tagglyListControl.tags\nconfig.macros.hideSomeTags.tagsToHide = [\n "sortByTitle",\n "sortByCreated",\n "sortByModified",\n "sortDesc",\n "sortAsc",\n "hideTagged",\n "showTagged",\n "noGroupByTag",\n "groupByTag",\n "list1Cols",\n "list2Cols",\n "list3Cols",\n "list4Cols",\n "list5Cols",\n "list6Cols",\n "list7Cols",\n "list8Cols",\n "list9Cols"\n];\n\n\n//}}}\n/***\n\n!Utils\n***/\n//{{{\n// from Eric\nfunction isTagged(title,tag) {\n var t=store.getTiddler(title); if (!t) return false;\n return (t.tags.find(tag)!=null);\n}\n\n// from Eric\nfunction toggleTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)==null) t.tags.push(tag);\n else t.tags.splice(t.tags.find(tag),1);\n}\n\nfunction addTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n t.tags.push(tag);\n}\n\nfunction removeTag(title,tag) {\n var t=store.getTiddler(title); if (!t || !t.tags) return;\n if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);\n}\n\n// from Udo\nArray.prototype.indexOf = function(item) {\n for (var i = 0; i < this.length; i++) {\n if (this[i] == item) {\n return i;\n }\n }\n return -1;\n};\nArray.prototype.contains = function(item) {\n return (this.indexOf(item) >= 0);\n}\n//}}}\n/***\n\n!tagglyList\ndisplays a list of tagged tiddlers. \nparameters are sortField and sortOrder\n***/\n//{{{\n\n// not used at the moment...\nfunction sortedListOfOtherTags(tiddler,thisTag) {\n var list = tiddler.tags.concat(); // so we are working on a clone..\n for (var i=0;i<config.macros.hideSomeTags.tagsToHide.length;i++) {\n if (list.find(config.macros.hideSomeTags.tagsToHide[i]) != null)\n list.splice(list.find(config.macros.hideSomeTags.tagsToHide[i]),1); // remove hidden ones\n }\n for (var i=0;i<config.macros.tagglyListByTag.excludeTheseTags.length;i++) {\n if (list.find(config.macros.tagglyListByTag.excludeTheseTags[i]) != null)\n list.splice(list.find(config.macros.tagglyListByTag.excludeTheseTags[i]),1); // remove excluded ones\n }\n list.splice(list.find(thisTag),1); // remove thisTag\n return '[[' + list.sort().join("]] [[") + ']]';\n}\n\nfunction sortHelper(a,b) {\n if (a == b) return 0;\n else if (a < b) return -1;\n else return +1;\n}\n\nconfig.macros.tagglyListByTag.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n\n var sortBy = params[0] ? params[0] : "title"; \n var sortOrder = params[1] ? params[1] : "asc";\n\n var result = store.getTaggedTiddlers(tiddler.title,sortBy);\n\n if (sortOrder == "desc")\n result = result.reverse();\n\n var leftOvers = []\n for (var i=0;i<result.length;i++) {\n leftOvers.push(result[i].title);\n }\n\n var allTagsHolder = {};\n for (var i=0;i<result.length;i++) {\n for (var j=0;j<result[i].tags.length;j++) {\n\n if ( \n result[i].tags[j] != tiddler.title // not this tiddler\n && config.macros.hideSomeTags.tagsToHide.find(result[i].tags[j]) == null // not a hidden one\n && config.macros.tagglyListByTag.excludeTheseTags.find(result[i].tags[j]) == null // not excluded\n ) {\n if (!allTagsHolder[result[i].tags[j]])\n allTagsHolder[result[i].tags[j]] = "";\n allTagsHolder[result[i].tags[j]] += "**[["+result[i].title+"]]\sn";\n\n if (leftOvers.find(result[i].title) != null)\n leftOvers.splice(leftOvers.find(result[i].title),1); // remove from leftovers. at the end it will contain the leftovers...\n }\n }\n }\n\n\n var allTags = [];\n for (var t in allTagsHolder)\n allTags.push(t);\n\n allTags.sort(function(a,b) {\n var tidA = store.getTiddler(a);\n var tidB = store.getTiddler(b);\n if (sortBy == "title") return sortHelper(a,b);\n else if (!tidA && !tidB) return 0;\n else if (!tidA) return -1;\n else if (!tidB) return +1;\n else return sortHelper(tidA[sortBy],tidB[sortBy]);\n });\n\n var markup = "";\n\n if (sortOrder == "desc") {\n allTags.reverse();\n }\n else {\n // leftovers first...\n for (var i=0;i<leftOvers.length;i++)\n markup += "*[["+leftOvers[i]+"]]\sn";\n } \n\n for (var i=0;i<allTags.length;i++)\n markup += "*[["+allTags[i]+"]]\sn" + allTagsHolder[allTags[i]];\n\n if (sortOrder == "desc") {\n // leftovers last...\n for (var i=0;i<leftOvers.length;i++)\n markup += "*[["+leftOvers[i]+"]]\sn";\n }\n\n wikify(markup,place);\n}\n\nconfig.macros.tagglyList.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n var sortBy = params[0] ? params[0] : "title"; \n var sortOrder = params[1] ? params[1] : "asc";\n var numCols = params[2] ? params[2] : 1;\n\n var result = store.getTaggedTiddlers(tiddler.title,sortBy);\n if (sortOrder == "desc")\n result = result.reverse();\n\n var listSize = result.length;\n var colSize = listSize/numCols;\n var remainder = listSize % numCols;\n\n var upperColsize;\n var lowerColsize;\n if (colSize != Math.floor(colSize)) {\n // it's not an exact fit so..\n lowerColsize = Math.floor(colSize);\n upperColsize = Math.floor(colSize) + 1;\n }\n else {\n lowerColsize = colSize;\n upperColsize = colSize;\n }\n\n var markup = "";\n var c=0;\n\n var newTaggedTable = createTiddlyElement(place,"table");\n var newTaggedBody = createTiddlyElement(newTaggedTable,"tbody");\n var newTaggedTr = createTiddlyElement(newTaggedBody,"tr");\n\n for (var j=0;j<numCols;j++) {\n var foo = "";\n var thisSize;\n\n if (j<remainder)\n thisSize = upperColsize;\n else\n thisSize = lowerColsize;\n\n for (var i=0;i<thisSize;i++) \n foo += ( "*[[" + result[c++].title + "]]\sn"); // was using splitList.shift() but didn't work in IE;\n\n var newTd = createTiddlyElement(newTaggedTr,"td",null,"tagglyTagging");\n wikify(foo,newTd);\n\n }\n\n};\n\n/* snip for later.....\n //var groupBy = params[3] ? params[3] : "t.title.substr(0,1)";\n //var groupBy = params[3] ? params[3] : "sortedListOfOtherTags(t,tiddler.title)";\n //var groupBy = params[3] ? params[3] : "t.modified";\n var groupBy = null; // for now. groupBy here is working but disabled for now.\n\n var prevGroup = "";\n var thisGroup = "";\n\n if (groupBy) {\n result.sort(function(a,b) {\n var t = a; var aSortVal = eval(groupBy); var aSortVal2 = eval("t".sortBy);\n var t = b; var bSortVal = eval(groupBy); var bSortVal2 = eval("t".sortBy);\n var t = b; var bSortVal2 = eval(groupBy);\n return (aSortVal == bSortVal ?\n (aSortVal2 == bSortVal2 ? 0 : (aSortVal2 < bSortVal2 ? -1 : +1)) // yuck\n : (aSortVal < bSortVal ? -1 : +1));\n });\n }\n\n if (groupBy) {\n thisGroup = eval(groupBy);\n if (thisGroup != prevGroup)\n markup += "*[["+thisGroup+']]\sn';\n markup += "**[["+t.title+']]\sn';\n prevGroup = thisGroup;\n }\n\n\n\n*/\n\n\n//}}}\n\n/***\n\n!tagglyListControl\nUse to make the sort control buttons\n***/\n//{{{\n\nfunction getSortBy(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.sortBy;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["title"])) return "title";\n else if (tiddler.tags.contains(usetags["modified"])) return "modified";\n else if (tiddler.tags.contains(usetags["created"])) return "created";\n else return defaultVal;\n}\n\nfunction getSortOrder(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.sortOrder;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["asc"])) return "asc";\n else if (tiddler.tags.contains(usetags["desc"])) return "desc";\n else return defaultVal;\n}\n\nfunction getHideState(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.hideState;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["hide"])) return "hide";\n else if (tiddler.tags.contains(usetags["show"])) return "show";\n else return defaultVal;\n}\n\nfunction getGroupState(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.groupState;\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n if (tiddler.tags.contains(usetags["group"])) return "group";\n else if (tiddler.tags.contains(usetags["nogroup"])) return "nogroup";\n else return defaultVal;\n}\n\nfunction getNumCols(title) {\n var tiddler = store.getTiddler(title);\n var defaultVal = config.macros.tagglyListWithSort.defaults.numCols; // an int\n if (!tiddler) return defaultVal;\n var usetags = config.macros.tagglyListControl.tags;\n for (var i=1;i<=config.macros.tagglyListWithSort.maxCols;i++)\n if (tiddler.tags.contains(usetags["cols"+i])) return i;\n return defaultVal;\n}\n\n\nfunction getSortLabel(title,which) {\n // TODO. the strings here should be definable in config\n var by = getSortBy(title);\n var order = getSortOrder(title);\n var hide = getHideState(title);\n var group = getGroupState(title);\n if (which == "hide") return (hide == "show" ? "−" : "+"); // 0x25b8;\n else if (which == "group") return (group == "group" ? "normal" : "grouped");\n else if (which == "cols") return "cols±"; // &plusmn;\n else if (by == which) return which + (order == "asc" ? "↓" : "↑"); // &uarr; &darr;\n else return which;\n}\n\nfunction handleSortClick(title,which) {\n var currentSortBy = getSortBy(title);\n var currentSortOrder = getSortOrder(title);\n var currentHideState = getHideState(title);\n var currentGroupState = getGroupState(title);\n var currentNumCols = getNumCols(title);\n\n var tags = config.macros.tagglyListControl.tags;\n\n // if it doesn't exist, lets create it..\n if (!store.getTiddler(title))\n store.saveTiddler(title,title,"",config.options.txtUserName,new Date(),null);\n\n if (which == "hide") {\n // toggle hide state\n var newHideState = (currentHideState == "hide" ? "show" : "hide");\n removeTag(title,tags[currentHideState]);\n if (newHideState != config.macros.tagglyListWithSort.defaults.hideState)\n toggleTag(title,tags[newHideState]);\n }\n else if (which == "group") {\n // toggle hide state\n var newGroupState = (currentGroupState == "group" ? "nogroup" : "group");\n removeTag(title,tags[currentGroupState]);\n if (newGroupState != config.macros.tagglyListWithSort.defaults.groupState)\n toggleTag(title,tags[newGroupState]);\n }\n else if (which == "cols") {\n // toggle num cols\n var newNumCols = currentNumCols + 1; // confusing. currentNumCols is an int\n if (newNumCols > config.macros.tagglyListWithSort.maxCols || newNumCols > store.getTaggedTiddlers(title).length)\n newNumCols = 1;\n removeTag(title,tags["cols"+currentNumCols]);\n if (("cols"+newNumCols) != config.macros.tagglyListWithSort.defaults.groupState)\n toggleTag(title,tags["cols"+newNumCols]);\n }\n else if (currentSortBy == which) {\n // toggle sort order\n var newSortOrder = (currentSortOrder == "asc" ? "desc" : "asc");\n removeTag(title,tags[currentSortOrder]);\n if (newSortOrder != config.macros.tagglyListWithSort.defaults.sortOrder)\n toggleTag(title,tags[newSortOrder]);\n }\n else {\n // change sortBy only\n removeTag(title,tags["title"]);\n removeTag(title,tags["created"]);\n removeTag(title,tags["modified"]);\n\n if (which != config.macros.tagglyListWithSort.defaults.sortBy)\n toggleTag(title,tags[which]);\n }\n\n store.setDirty(true); // save is required now.\n story.refreshTiddler(title,false,true); // force=true\n}\n\nconfig.macros.tagglyListControl.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n var onclick = function(e) {\n if (!e) var e = window.event;\n handleSortClick(tiddler.title,params[0]);\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return false;\n };\n createTiddlyButton(place,getSortLabel(tiddler.title,params[0]),"Click to change sort options",onclick,params[0]=="hide"?"hidebutton":"button");\n}\n//}}}\n/***\n\n!tagglyListWithSort\nput it all together..\n***/\n//{{{\nconfig.macros.tagglyListWithSort.handler = function (place,macroName,params,wikifier,paramString,tiddler) {\n if (tiddler && store.getTaggedTiddlers(tiddler.title).length > 0)\n // todo make this readable\n wikify(\n "<<tagglyListControl hide>>"+\n (getHideState(tiddler.title) != "hide" ? \n '<html><span class="tagglyLabel">'+config.macros.tagglyList.label.format([tiddler.title])+' </span></html>'+\n "<<tagglyListControl title>><<tagglyListControl modified>><<tagglyListControl created>><<tagglyListControl group>>"+(getGroupState(tiddler.title)=="group"?"":"<<tagglyListControl cols>>")+"\sn" + \n "<<tagglyList" + (getGroupState(tiddler.title)=="group"?"ByTag ":" ") + getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+" "+getNumCols(tiddler.title)+">>" // hacky\n // + \sn----\sn" +\n //"<<tagglyList "+getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+">>"\n : ""),\n place,null,tiddler);\n}\n\nconfig.macros.tagglyTagging = { handler: config.macros.tagglyListWithSort.handler };\n\n\n//}}}\n/***\n\n!hideSomeTags\nSo we don't see the sort tags.\n(note, they are still there when you edit. Will that be too annoying?\n***/\n//{{{\n\n// based on tags.handler\nconfig.macros.hideSomeTags.handler = function(place,macroName,params,wikifier,paramString,tiddler) {\n var theList = createTiddlyElement(place,"ul");\n if(params[0] && store.tiddlerExists[params[0]])\n tiddler = store.getTiddler(params[0]);\n var lingo = config.views.wikified.tag;\n var prompt = tiddler.tags.length == 0 ? lingo.labelNoTags : lingo.labelTags;\n createTiddlyElement(theList,"li",null,"listTitle",prompt.format([tiddler.title]));\n for(var t=0; t<tiddler.tags.length; t++)\n if (!this.tagsToHide.contains(tiddler.tags[t])) // this is the only difference from tags.handler...\n createTagButton(createTiddlyElement(theList,"li"),tiddler.tags[t],tiddler.title);\n\n}\n\n//}}}\n/***\n\n!Refresh everything when we save a tiddler. So the tagged lists never get stale. Is this too slow???\n***/\n//{{{\n\nfunction refreshAllVisible() {\n story.forEachTiddler(function(title,element) {\n if (element.getAttribute("dirty") != "true") \n story.refreshTiddler(title,false,true);\n });\n}\n\nstory.saveTiddler_orig_mptw = story.saveTiddler;\nstory.saveTiddler = function(title,minorUpdate) {\n var result = this.saveTiddler_orig_mptw(title,minorUpdate);\n refreshAllVisible();\n return result;\n}\n\nstore.removeTiddler_orig_mptw = store.removeTiddler;\nstore.removeTiddler = function(title) {\n this.removeTiddler_orig_mptw(title);\n refreshAllVisible();\n}\n\nconfig.shadowTiddlers.TagglyTaggingStyles = "/***\snTo use, add {{{[[TagglyTaggingStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also ViewTemplate, EditTemplate and TagglyTagging.\sn***/\sn/*{{{*/\sn.tagglyTagged li.listTitle { display:none;}\sn.tagglyTagged li { display: inline; font-size:90%; }\sn.tagglyTagged ul { margin:0px; padding:0px; }\sn.tagglyTagging { padding-top:0.5em; }\sn.tagglyTagging li.listTitle { display:none;}\sn.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:2em; margin-bottom:0px; padding-bottom:0px; }\sn\sn/* .tagglyTagging .tghide { display:inline; } */\sn\sn.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\sn.tagglyTagging table { margin:0px; padding:0px; }\sn\sn\sn.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\sn.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}\sn.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }\sn.selected .tagglyTagging .button { display:inline; }\sn\sn.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */\sn.selected .tagglyTagging .hidebutton { color:#aaa }\sn\sn.tagglyLabel { color:#aaa; font-size:90%; }\sn\sn.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\sn.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\sn.tagglyTagging ul ul li {margin-left:0.5em; }\sn\sn.editLabel { font-size:90%; padding-top:0.5em; }\sn/*}}}*/\sn";\n\nrefreshStyles("TagglyTaggingStyles");\n\n\n//}}}\n\n// // <html>&#x25b8;&#x25be;&minus;&plusmn;</html>
/***\nTo use, add {{{[[TagglyTaggingStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also ViewTemplate, EditTemplate and TagglyTagging.\n***/\n/*{{{*/\n.tagglyTagged li.listTitle { display:none;}\n.tagglyTagged li { display: inline; font-size:90%; }\n.tagglyTagged ul { margin:0px; padding:0px; }\n.tagglyTagging { padding-top:0.5em; }\n.tagglyTagging li.listTitle { display:none;}\n.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:2em; margin-bottom:0px; padding-bottom:0px; }\n\n/* .tagglyTagging .tghide { display:inline; } */\n\n.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\n.tagglyTagging table { margin:0px; padding:0px; }\n\n\n.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\n.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}\n.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }\n.selected .tagglyTagging .button { display:inline; }\n\n.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */\n.selected .tagglyTagging .hidebutton { color:#aaa }\n\n.tagglyLabel { color:#aaa; font-size:90%; }\n\n.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\n.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\n.tagglyTagging ul ul li {margin-left:0.5em; }\n\n.editLabel { font-size:90%; padding-top:0.5em; }\n/*}}}*/\n
<<rssReader asText proxy.cgi?url=http://www.tiddlyforge.net/feed/>>
|''URL:''|http://www.tiddlytools.com/|
Created by JeremyRuston.\n\nA wiki that stores it data in a single HTML file and requires just JavaScript and a web browser to run.\n\n|''URL:''|http://www.tiddlywiki.com/|\n\nThis version of TiddlyWiki is: ''<<version>>''
|''URL:''|http://www.tiddlywiki.com/beta|
!!Description\nTiddlyWikiNamespace defines tiddler attributes as elements in an RSS item. Therefore a RSS item represents a tiddler.\n\n!!Declaration\n{{{xmlns:content="http://tiddlywiki.bidix.info/#TiddlyWikiNamespace"}}}\n\n!!TiddlyWiki item elements\nsee http://www.tiddlywiki.com/dev for a full description of tiddler attributes\n*<tiddlywiki:title>\n*<tiddlywiki:wikitext> : the tiddler text in source format\n*<tiddlywiki:modifier> \n*<tiddlywiki:modified>\n*<tiddlywiki:created>\n*<tiddlywiki:tags>\n\n!!Other useful item elements\n<description> : for compatibility, the tiddler text in source format.\n<content:encoded> : the tiddler text wikified. For portability, all tiddlylinks should have an absolute http href attribute.\n\n!!Exemple\n{{{\n<?xml version="1.0" encoding='UTF-8'?>\n<rss version="2.0" \n xmlns:tiddlywiki="http://tiddlywiki.bidix.info/rss/"\n xmlns:content="http://purl.org/rss/1.0/modules/content/"\n>\n <channel>\n <title>BidiXTW</title>\n <link>http://TiddlyWiki.bidix.info/</link>\n <description>&quot;an IDE for the thoughts&quot;</description>\n <language>en-us</language>\n <copyright>Copyright 2006 BidiX</copyright>\n <pubDate>Wed, 19 Apr 2006 17:08:20 GMT</pubDate>\n <lastBuildDate>Wed, 19 Apr 2006 17:08:20 GMT</lastBuildDate>\n <docs>http://blogs.law.harvard.edu/tech/rss</docs>\n <generator>TiddlyWiki 2.0.9</generator>\n <item>\n <title>CurrentWorks</title>\n <description>*[[EmptyUploadTW|http://TiddlyHost.bidix.info/emptyupload.html]] : an empty TiddlyWiki with only tiddlers tagged &lt;&lt;tag Upload&gt;&gt; added.&lt;br /&gt;*TiddlyHost: BidiX's TiddlyWiki hosting infrastructure&lt;br /&gt;*GenerateRssTweak beta add [[BidiXTW.xml|http://tiddlywiki.bidix.info/BidiXTW.xml]] to your RssReader or use RssNewsMacro in TiddlyWiki.&lt;br /&gt;*&lt;&lt;tag RSSFeeds&gt;&gt; access when TiddlyWiki is accessed by HTTP.&lt;br /&gt;*Some experiments in [[BidiXLab|http://TiddlyWiki.bidix.info/BidiXLab.html]]&lt;br /&gt;*Extensions to Clint's [[allTagsExceptMacro|config.macros.allTagsExcept]]&lt;br /&gt;</description>\n <content:encoded><![CDATA[ <ul><li><a target="_blank" title="External link to http://TiddlyHost.bidix.info/emptyupload.html" href="http://TiddlyHost.bidix.info/emptyupload.html" class="externalLink">EmptyUploadTW</a> : an empty <a tiddlylink="TiddlyWiki" refresh="link" title="TiddlyWiki - BidiX, samedi 25 février 2006 11:42:00" href="http://TiddlyWiki.bidix.info/#TiddlyWiki" class="tiddlyLink tiddlyLinkExisting">TiddlyWiki</a> with only tiddlers tagged <span class="quickopentag"><a tiddlylink="Upload" refresh="link" title="Upload - BidiX, mercredi 15 février 2006 00:35:00" href="http://TiddlyWiki.bidix.info/#Upload" class="tiddlyLink tiddlyLinkExisting">Upload</a><a tag="Upload" title="Show tiddlers tagged with 'Upload'" href="javascript:;" class="button">?</a></span> added.</li><li><a tiddlylink="TiddlyHost" refresh="link" title="TiddlyHost - BidiX, lundi 27 mars 2006 19:07:00" href="http://TiddlyWiki.bidix.info/#TiddlyHost" class="tiddlyLink tiddlyLinkExisting">TiddlyHost</a>: <a tiddlylink="BidiX" refresh="link" title="BidiX - BidiX, dimanche 29 janvier 2006 12:12:00" href="http://TiddlyWiki.bidix.info/#BidiX" class="tiddlyLink tiddlyLinkExisting">BidiX</a>'s <a tiddlylink="TiddlyWiki" refresh="link" title="TiddlyWiki - BidiX, samedi 25 février 2006 11:42:00" href="http://TiddlyWiki.bidix.info/#TiddlyWiki" class="tiddlyLink tiddlyLinkExisting">TiddlyWiki</a> hosting infrastructure</li><li><a tiddlylink="GenerateRssTweak" refresh="link" title="GenerateRssTweak - BidiX, lundi 10 avril 2006 15:25:00" href="http://TiddlyWiki.bidix.info/#GenerateRssTweak" class="tiddlyLink tiddlyLinkExisting">GenerateRssTweak</a> beta add <a target="_blank" title="External link to http://tiddlywiki.bidix.info/BidiXTW.xml" href="http://tiddlywiki.bidix.info/BidiXTW.xml" class="externalLink">BidiXTW.xml</a> to your <a tiddlylink="RssReader" refresh="link" title="The tiddler 'RssReader' doesn't yet exist" href="http://TiddlyWiki.bidix.info/#RssReader" class="tiddlyLink tiddlyLinkNonExisting">RssReader</a> or use <a tiddlylink="RssNewsMacro" refresh="link" title="RssNewsMacro - BidiX, jeudi 30 mars 2006 12:26:00" href="http://TiddlyWiki.bidix.info/#RssNewsMacro" class="tiddlyLink tiddlyLinkExisting">RssNewsMacro</a> in <a tiddlylink="TiddlyWiki" refresh="link" title="TiddlyWiki - BidiX, samedi 25 février 2006 11:42:00" href="http://TiddlyWiki.bidix.info/#TiddlyWiki" class="tiddlyLink tiddlyLinkExisting">TiddlyWiki</a>.</li><li><span class="quickopentag"><a tiddlylink="RSSFeeds" refresh="link" title="RSSFeeds - BidiX, lundi 27 mars 2006 18:50:00" href="http://TiddlyWiki.bidix.info/#RSSFeeds" class="tiddlyLink tiddlyLinkExisting">RSSFeeds</a><a tag="RSSFeeds" title="Show tiddlers tagged with 'RSSFeeds'" href="javascript:;" class="button">?</a></span> access when <a tiddlylink="TiddlyWiki" refresh="link" title="TiddlyWiki - BidiX, samedi 25 février 2006 11:42:00" href="http://TiddlyWiki.bidix.info/#TiddlyWiki" class="tiddlyLink tiddlyLinkExisting">TiddlyWiki</a> is accessed by HTTP.</li><li>Some experiments in <a target="_blank" title="External link to http://TiddlyWiki.bidix.info/BidiXLab.html" href="http://TiddlyWiki.bidix.info/BidiXLab.html" class="externalLink">BidiXLab</a></li><li>Extensions to Clint's <a tiddlylink="config.macros.allTagsExcept" refresh="link" title="config.macros.allTagsExcept - BidiX, samedi 18 mars 2006 18:00:00" href="http://TiddlyWiki.bidix.info/#config.macros.allTagsExcept" class="tiddlyLink tiddlyLinkExisting">allTagsExceptMacro</a></li></ul>]]></content:encoded>\n <tiddlywiki:title>CurrentWorks</tiddlywiki:title>\n <tiddlywiki:wikitext>*[[EmptyUploadTW|http://TiddlyHost.bidix.info/emptyupload.html]] : an empty TiddlyWiki with only tiddlers tagged &lt;&lt;tag Upload&gt;&gt; added.\n*TiddlyHost: BidiX's TiddlyWiki hosting infrastructure\n*GenerateRssTweak beta add [[BidiXTW.xml|http://tiddlywiki.bidix.info/BidiXTW.xml]] to your RssReader or use RssNewsMacro in TiddlyWiki.\n*&lt;&lt;tag RSSFeeds&gt;&gt; access when TiddlyWiki is accessed by HTTP.\n*Some experiments in [[BidiXLab|http://TiddlyWiki.bidix.info/BidiXLab.html]]\n*Extensions to Clint's [[allTagsExceptMacro|config.macros.allTagsExcept]]\n </tiddlywiki:wikitext>\n <tiddlywiki:modifier>BidiX</tiddlywiki:modifier>\n <tiddlywiki:modified>200604021748</tiddlywiki:modified>\n <tiddlywiki:created>200603301435</tiddlywiki:created>\n <tiddlywiki:tags>News toRSS</tiddlywiki:tags>\n <category>News</category>\n <category>toRSS</category>\n <link>http://TiddlyWiki.bidix.info/#CurrentWorks</link>\n <pubDate>Sun, 02 Apr 2006 17:48:00 GMT</pubDate>\n </item>\n <item>\n ...\n </item>\n ...\n </channel>\n</rss>\n}}}\n\n
<<rssReader asText proxy.cgi?url=http://www.tiddlywiki.com/index.xml>>
<script>\n// from UdoBorkowski\nvar onClick = function() {\n story.closeAllTiddlers();\n story.displayTiddler(null,'Welcome')\n}\ncreateTiddlyButton(place,"Welcome","Restart",onClick, null, null);\n</script> | [[News|http://news.bidix.info/]] | ''[[BidiXTW|http://tiddlywiki.bidix.info/]]'' | [[BidiXLab|http://TiddlyLab.bidix.info/]] | [[BidiXTWS|https://ssl.1and1.fr/tiddlywiki.bidix.info/BidiXTWS.html]] | [[Help]]\n
UploadPlugin with <<tag UploadService>> extend TiddlyWiki with @@upload@@ and @@save to web@@ commands. \n\nSee [[HowToUpload]].\n!!Todo\n*Better UploadLog\n*limit the number of backup files\n\n[[Upload]] is... <<tagging Upload>>
//last update: UploadPlugin v 3.4.0//\n\n!Description\nUploadPlugin with <<tag UploadService>> extend TiddlyWiki with @@upload@@ and @@save to web@@ commands. \nUploadPlugin uses Username and Password from UploadOptions stored in cookies to authenticate itself to [[store.php]] or [[store.cgi]].\nFrench translation available as a separate tiddler UploadPluginMsgFR\n\n!!UploadPlugin\n*If the TiddlyWiki is viewed from @@local disk@@ :\n**{{{<<saveChanges>>}}} \n***display as ''save to disk''\n***work as usual\n**{{{<<upload>>}}}\n***display as ''upload''\n***after saving to disk, upload in the storeUrl directory.\n*If the TiddlyWiki is viewed from @@website@@ and is @@readOnly@@ (in core TiddlyWiki since 2.0.6) :\n**{{{<<saveChanges>>}}} \n***print nothing\n***has been disabled\n**{{{<<upload>>}}}\n***display as '''save to web''\n***save in the uploadDir directory.\n*If GenerateAnRssFeed in AdvancedOptions is set :\n**generate the content of the RSSFeed \n**upload the RssFile in uploadDir directory\n**Caution : use the SiteUrl tiddler to specify the right url of the TiddlyWiki in the generated RssFile\n*DisplayMessage\n*Log upload action in UploadLog\nhint : if UploadLog is the first tiddler in the Timeline Tab, no tiddler has been updated since last upload.\n\n!![[store.php]]\n*UserVariables to set :\n//{{{\n$AUTHENTICATE_USER = true; // true | false\n$USERS = array(\n 'UserName1'=>'Password1', \n 'UserName2'=>'Password2', \n 'UserName3'=>'Password3'); // set usernames and strong passwords\n$DEBUG = false; // true | false\n//}}}\n*method GET\n**display an information page\n*method POST\n**if $~AUTHENTICATE_USER is ''true''\n***presence and value of user and password are checked with $USER and $PASSWORD \n**if toFilename already exists and backDir parameter specified\n***rename toFilename to backupDir/toFilename.AAAAMMDD.HHSS.html\n**copy temporaryUploadedFile to toFilename\n** return status\n\n!![[store.cgi]]\n*UserVariables to set :\n//{{{\nCONFIG = {\n :users => {\n 'UserName1'=>'Password1', \n 'UserName2'=>'Password2', \n 'UserName3'=>'Password3')\n },\n :authenticateUser => true,\n :backupExistingFile => true,\n :withUploadDir => true\n}\n//}}}\n*same processing as store.php above\n\n!Usage : \n{{{\n<<upload>>\n uses UploadOptions saved in cookies :\n txtUploadUserName: username\n pasUploadPassword : password\n txtUploadStoreUrl : store script\n txtUploadDir : relative path for upload directory\n txtUploadFilename : upload filename\n txtUploadBackupDir : relative path for backup directory\n\n<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>\n Optional positional parameters can be passed to overwrite \n UploadOptions. \n}}}\n\nInstall the {{{<<upload ... >>}}} macro in SideBarOptions just below {{{<<saveChanges>>}}} macro.\n\n\n!User manual\nSee HowToUpload\n\n!Installation :\n*Install the UploadPlugin as usual\n*Upload the [[store.php]] file on your php aware webserver in your TiddlyWiki directory\n*Protect your server against malicious upload. Two approaches :\n**set $~AUTHENTICATE_USER to true in the [[store.php]] script\n***configure $USER and $PASSWORD in the [[store.php]] script on your webserver\n***set UploadOptions in conformity with [[store.php]]\n**Use server protection :\n***for Apache web server ([[for detail see Apache documentation|http://httpd.apache.org/docs/1.3/howto/htaccess.html]]) : \n****configure and upload the [[.htaccess]] [[.passwd]]\n***for other web servers see the appropriate documentation\n*Configure an upload button, for example in the SideBarOptions\n!Suppported Browser\n*Firefox and Gecko based browser: tested Ok\n*Internet Explorer : tested Ok\n*Safari : tested ok on OS X\n*Others : Not tested, please report status.\n\n!Revision history\n*V3.4.0\n**Manage Lock parameters for GroupAuthoring\n**Small code refactoring for new PluginFormat in TW 2.1\n*V 3.3.3 (30/06/2006)\n**reinstall saveChanges Hijacking\n*V 3.3.2 (26/06/2006)\n** make "save to disk" disappear when TiddlyWiki is located on the web\n** small reformatting of post headers for store.cgi compatibility\n*V 3.3.1 (30/03/2006)\n**bug in backup folder when uploading rssfile fixed\n*V 3.3.0 (12/03/2006)\n**Code refactoring\n**suppress saveChanges hijacking\n+++[previous revisions]\n*V3.2.2 (25/02/2006)\n**Use PasswordTweak 1.0.1\n**uploaddir is a relative path\n**backupdir is a relative path\n*V3.2.1 (13/02/2006)\n**name and password added to open.request (Thanks to TedPavlic)\n*V3.2.0 (14/02/2006)\n**Use PassworDTweak (http://tiddlyWiki.bidix.info/#PasswordTweak) for password\n*V3.1.0 (12/02/2006)\n**UploadOptions in Cookies\n**Username and password from UploadOptions pass to store.php script for authentification check\n*V3.0.3 (03/02/2006)\n**Firefox 1.5.0.1 crashes due to global var fixed\n*V3.0.2 (25-Jan-2006)\n**HTTPS compatible\n*V3.0.1 (18-Jan-2006)\n**UTF8toUnicode conversion problem in Firefox\n*V3.0.0 (15-Jan-2006)\n**Asynchronous upload\n**Synchronous upload before unload of the page\n**All strings extracted in macro config\n**Compatibility checked with TW 2.0.2 & TW 1.2.39 for both FF 1.5 and IE 6\n*V2.0.2 (8-Jan-2006)\n**conversion of SiteTitle and SiteSubtitle in web page Title\n*V2.0.1 (8-Jan-2006)\n**Compatibilty with TiddlyWiki 2.0.1\n*V2.0.0 (3-Jan-2006)\n**Save to web\n**Compatibilty with TiddlyWiki 1.2.39 and TiddlyWiki 2.0.0 Beta 6\n*v1.1.0 (27-Dec-2005)\n**Upload RSS File\n*v1.0.3 (26-Dec-2005)\n**UploadLog tiddler\n*v1.0.2 (24-Dec-2005)\n**Optional parameter toFilename\n**Optional parameter backupDir\n*v1.0.1 (23-Dec-2005)\n**reformatting code\n* v1.0.0 (17-Dec-2005)\n** first public working version\n===\n\n
This form upload any file with an UploadService describe in [[Upload]]\n----\n<html><center>\n<form enctype="multipart/form-data" action="store.cgi" method="post" target="_blank">\n <input type="hidden" name="MAX_FILE_SIZE" value="3000000" />\nThis file : <input name="userfile" type="file" /><p>\nOptions* : <input type="text" name="UploadPlugin" size=70 value="backupDir=BACKUP_DIR;user=UPLOAD_USER;password=UPLOAD_PASSWORD;" /><p>\n <input type="submit" value="Upload" />\n</form></center>\n</html>\n----\n * Substitute BACKUP_DIR, UPLOAD_USER and UPLOAD_PASSWORD with your values. See UploadPlugin for option details. \nFor security reason, don't save your password in a tiddler.
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |\n| 13/8/2006 19:18:16 | BidiX | [[BidiXTW.html|file:///Users/bruno/Sites/TiddlyLab/BidiXTW.html]] | [[store.cgi|http://tiddlywiki.bidix.info/store.cgi]] | | BidiXTW.html | backup |\n| 13/8/2006 21:15:7 | BidiX | [[/|http://tiddlywiki.bidix.info/]] | [[store.cgi|http://tiddlywiki.bidix.info/store.cgi]] | | BidiXTW.html | backup | Ok |\n| 13/8/2006 21:45:3 | BidiX | [[/|http://tiddlywiki.bidix.info/]] | [[store.cgi|http://tiddlywiki.bidix.info/store.cgi]] | | BidiXTW.html | backup | Ok |\n| 13/8/2006 23:42:7 | BidiX | [[/|http://tiddlywiki.bidix.info/]] | [[store.cgi|http://tiddlywiki.bidix.info/store.cgi]] | | BidiXTW.html | backup |\n| 14/8/2006 0:11:1 | BidiX | [[BidiXTW.html|file:///Users/bruno/Sites/BidiX/BidiXTW.html]] | [[store.cgi|http://tiddlyspot.com/BidiX/store.cgi]] | | index.html | backup |\n| 14/8/2006 0:11:25 | BidiX | [[BidiXTW.html|file:///Users/bruno/Sites/BidiX/BidiXTW.html]] | [[store.cgi|http://tiddlyspot.com/BidiX/store.cgi]] | | index.html | backup |\n| 14/8/2006 0:41:4 | BidiX | [[/|http://tiddlyspot.com/BidiX/]] | [[store.cgi|http://TiddlySpot.com/BidiX/store.cgi]] | | index.html | | Ok |\n| 14/8/2006 19:46:45 | BidiX | [[/|http://tiddlyspot.com/BidiX/]] | [[store.cgi|http://tiddlyspot.com/BidiX/store.cgi]] | | BidiXTW.html | backup |\n| 14/8/2006 19:47:18 | BidiX | [[/|http://tiddlyspot.com/BidiX/]] | [[store.cgi|http://TiddlySpot.com/BidiX/store.cgi]] | | index.html | |\n| 14/8/2006 19:47:42 | BidiX | [[/|http://tiddlyspot.com/BidiX/]] | [[store.cgi|http://TiddlySpot.com/BidiX/store.cgi]] | | index.html | |
!Options used by UploadPlugin\nUsername: <<option txtUploadUserName>>\nPassword: <<option pasUploadPassword>>\n\nUrl of the UploadService script^^(1)^^: <<option txtUploadStoreUrl 50>>\nRelative Directory where to store the file^^(2)^^: <<option txtUploadDir 50>>\nFilename of the uploaded file^^(3)^^: <<option txtUploadFilename 40>>\nDirectory to backup file on webserver^^(4)^^: <<option txtUploadBackupDir>>\n\n^^(1)^^Mandatory either in UploadOptions or in macro parameter\n^^(2)^^If empty stores in the script directory\n^^(3)^^If empty takes the actual filename\n^^(4)^^If empty existing file with same name on webserver will be overwritten\n\n<<upload>> with these options.\n\n!Upload Macro parameters\n{{{\n<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>\n Optional positional parameters can be passed to overwrite \n UploadOptions. \n}}}\n\n
/***\n|''Name:''|UploadPlugin|\n|''Description:''|To save to web a TiddlyWiki|\n|''Version:''|3.4.0|\n|''Date:''|Jul 25, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|\n|''Documentation:''|http://tiddlywiki.bidix.info/#UploadDoc|\n|''Author:''|BidiX (BidiX (at) bidix (dot) info)|\n|''License:''|[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D ]]|\n|''~CoreVersion:''|2.0.0|\n|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|\n|''Include:''|config.lib.file; config.lib.log; config.lib.options; PasswordTweak|\n|''Require:''|none|\n***/\n//{{{\nversion.extensions.UploadPlugin = {\n major: 3, minor: 4, revision: 0, \n date: new Date(2006,6,25),\n source: 'http://tiddlywiki.bidix.info/#UploadPlugin',\n documentation: 'http://tiddlywiki.bidix.info/#UploadDoc',\n author: 'BidiX (BidiX (at) bidix (dot) info',\n license: '[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D]]',\n coreVersion: '2.0.0',\n browser: 'Firefox 1.5; InternetExplorer 6.0; Safari'\n};\n//}}}\n\n////+++!![config.lib.file]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.file) config.lib.file= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.file.dirname = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(0, lastpos);\n } else {\n return filePath.substring(0, filePath.lastIndexOf("\s\s"));\n }\n};\nconfig.lib.file.basename = function (filePath) {\n var lastpos;\n if ((lastpos = filePath.lastIndexOf("#")) != -1) \n filePath = filePath.substring(0, lastpos);\n if ((lastpos = filePath.lastIndexOf("/")) != -1) {\n return filePath.substring(lastpos + 1);\n } else\n return filePath.substring(filePath.lastIndexOf("\s\s")+1);\n};\nwindow.basename = function() {return "@@deprecated@@";};\n//}}}\n////===\n\n////+++!![config.lib.log]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.log) config.lib.log= {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\nconfig.lib.Log = function(tiddlerTitle, logHeader) {\n if (version.major < 2)\n this.tiddler = store.tiddlers[tiddlerTitle];\n else\n this.tiddler = store.getTiddler(tiddlerTitle);\n if (!this.tiddler) {\n this.tiddler = new Tiddler();\n this.tiddler.title = tiddlerTitle;\n this.tiddler.text = "| !date | !user | !location |" + logHeader;\n this.tiddler.created = new Date();\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[tiddlerTitle] = this.tiddler;\n else\n store.addTiddler(this.tiddler);\n }\n return this;\n};\n\nconfig.lib.Log.prototype.newLine = function (line) {\n var now = new Date();\n var newText = "| ";\n newText += now.getDate()+"/"+(now.getMonth()+1)+"/"+now.getFullYear() + " ";\n newText += now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+" | ";\n newText += config.options.txtUserName + " | ";\n var location = document.location.toString();\n var filename = config.lib.file.basename(location);\n if (!filename) filename = '/';\n newText += "[["+filename+"|"+location + "]] |";\n this.tiddler.text = this.tiddler.text + "\sn" + newText;\n this.addToLine(line);\n};\n\nconfig.lib.Log.prototype.addToLine = function (text) {\n this.tiddler.text = this.tiddler.text + text;\n this.tiddler.modifier = config.options.txtUserName;\n this.tiddler.modified = new Date();\n if (version.major < 2)\n store.tiddlers[this.tiddler.tittle] = this.tiddler;\n else {\n store.addTiddler(this.tiddler);\n story.refreshTiddler(this.tiddler.title);\n store.notify(this.tiddler.title, true);\n }\n if (version.major < 2)\n store.notifyAll(); \n};\n//}}}\n////===\n\n////+++!![config.lib.options]\n\n//{{{\nif (!config.lib) config.lib = {};\nif (!config.lib.options) config.lib.options = {\n author: 'BidiX',\n version: {major: 0, minor: 1, revision: 0}, \n date: new Date(2006,3,9)\n};\n\nconfig.lib.options.init = function (name, defaultValue) {\n if (!config.options[name]) {\n config.options[name] = defaultValue;\n saveOptionCookie(name);\n }\n};\n//}}}\n////===\n\n////+++!![PasswordTweak]\n\n//{{{\nversion.extensions.PasswordTweak = {\n major: 1, minor: 0, revision: 2, date: new Date(2006,3,11),\n type: 'tweak',\n source: 'http://tiddlywiki.bidix.info/#PasswordTweak'\n};\n//}}}\n/***\n!!config.macros.option\n***/\n//{{{\nconfig.macros.option.passwordCheckboxLabel = "Save this password on this computer";\nconfig.macros.option.passwordType = "password"; // password | text\n\nconfig.macros.option.onChangeOption = function(e)\n{\n var opt = this.getAttribute("option");\n var elementType,valueField;\n if(opt) {\n switch(opt.substr(0,3)) {\n case "txt":\n elementType = "input";\n valueField = "value";\n break;\n case "pas":\n elementType = "input";\n valueField = "value";\n break;\n case "chk":\n elementType = "input";\n valueField = "checked";\n break;\n }\n config.options[opt] = this[valueField];\n saveOptionCookie(opt);\n var nodes = document.getElementsByTagName(elementType);\n for(var t=0; t<nodes.length; t++) {\n var optNode = nodes[t].getAttribute("option");\n if (opt == optNode) \n nodes[t][valueField] = this[valueField];\n }\n }\n return(true);\n};\n\nconfig.macros.option.handler = function(place,macroName,params)\n{\n var opt = params[0];\n var size = 15;\n if (params[1])\n size = params[1];\n if(config.options[opt] === undefined) {\n return;}\n var c;\n switch(opt.substr(0,3)) {\n case "txt":\n c = document.createElement("input");\n c.onkeyup = this.onChangeOption;\n c.setAttribute ("option",opt);\n c.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\n break;\n case "pas":\n // input password\n c = document.createElement ("input");\n c.setAttribute("type",config.macros.option.passwordType);\n c.onkeyup = this.onChangeOption;\n c.setAttribute("option",opt);\n c.size = size;\n c.value = config.options[opt];\n place.appendChild(c);\n // checkbox link with this password "save this password on this computer"\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option","chk"+opt);\n place.appendChild(c);\n c.checked = config.options["chk"+opt];\n // text savePasswordCheckboxLabel\n place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));\n break;\n case "chk":\n c = document.createElement("input");\n c.setAttribute("type","checkbox");\n c.onclick = this.onChangeOption;\n c.setAttribute("option",opt);\n place.appendChild(c);\n c.checked = config.options[opt];\n break;\n }\n};\n//}}}\n/***\n!! Option cookie stuff\n***/\n//{{{\nwindow.loadOptionsCookie_orig_PasswordTweak = window.loadOptionsCookie;\nwindow.loadOptionsCookie = function()\n{\n var cookies = document.cookie.split(";");\n for(var c=0; c<cookies.length; c++) {\n var p = cookies[c].indexOf("=");\n if(p != -1) {\n var name = cookies[c].substr(0,p).trim();\n var value = cookies[c].substr(p+1).trim();\n switch(name.substr(0,3)) {\n case "txt":\n config.options[name] = unescape(value);\n break;\n case "pas":\n config.options[name] = unescape(value);\n break;\n case "chk":\n config.options[name] = value == "true";\n break;\n }\n }\n }\n};\n\nwindow.saveOptionCookie_orig_PasswordTweak = window.saveOptionCookie;\nwindow.saveOptionCookie = function(name)\n{\n var c = name + "=";\n switch(name.substr(0,3)) {\n case "txt":\n c += escape(config.options[name].toString());\n break;\n case "chk":\n c += config.options[name] ? "true" : "false";\n // is there an option link with this chk ?\n if (config.options[name.substr(3)]) {\n saveOptionCookie(name.substr(3));\n }\n break;\n case "pas":\n if (config.options["chk"+name]) {\n c += escape(config.options[name].toString());\n } else {\n c += "";\n }\n break;\n }\n c += "; expires=Fri, 1 Jan 2038 12:00:00 UTC; path=/";\n document.cookie = c;\n};\n//}}}\n/***\n!! Initializations\n***/\n//{{{\n// define config.options.pasPassword\nif (!config.options.pasPassword) {\n config.options.pasPassword = 'defaultPassword';\n window.saveOptionCookie('pasPassword');\n}\n// since loadCookies is first called befor password definition\n// we need to reload cookies\nwindow.loadOptionsCookie();\n//}}}\n////===\n\n////+++!![config.macros.upload]\n\n//{{{\nconfig.macros.upload = {\n accessKey: "U",\n formName: "UploadPlugin",\n contentType: "text/html;charset=UTF-8",\n defaultStoreScript: "store.php"\n};\n\n// only this two configs need to be translated\nconfig.macros.upload.messages = {\n aboutToUpload: "About to upload TiddlyWiki to %0",\n errorDownloading: "Error downloading",\n errorUploadingContent: "Error uploading content",\n fileLocked: "Files is locked: You are not allowed to Upload",\n fileNotFound: "file to upload not found",\n fileNotUploaded: "File %0 NOT uploaded",\n mainFileUploaded: "Main TiddlyWiki file uploaded to %0",\n urlParamMissing: "url param missing",\n rssFileNotUploaded: "RssFile %0 NOT uploaded",\n rssFileUploaded: "Rss File uploaded to %0"\n};\n\nconfig.macros.upload.label = {\n promptOption: "Save and Upload this TiddlyWiki with UploadOptions",\n promptParamMacro: "Save and Upload this TiddlyWiki in %0",\n saveLabel: "save to web", \n saveToDisk: "save to disk",\n uploadLabel: "upload" \n};\n\nconfig.macros.upload.handler = function(place,macroName,params){\n // parameters initialization\n var storeUrl = params[0];\n var toFilename = params[1];\n var backupDir = params[2];\n var uploadDir = params[3];\n var username = params[4];\n var password; // for security reason no password as macro parameter\n var label;\n if (document.location.toString().substr(0,4) == "http")\n label = this.label.saveLabel;\n else\n label = this.label.uploadLabel;\n var prompt;\n if (storeUrl) {\n prompt = this.label.promptParamMacro.toString().format([this.dirname(storeUrl)]);\n }\n else {\n prompt = this.label.promptOption;\n }\n createTiddlyButton(place, label, prompt, \n function () {\n config.macros.upload.upload(storeUrl, toFilename, uploadDir, backupDir, username, password); \n return false;}, \n null, null, this.accessKey);\n};\nconfig.macros.upload.UploadLog = function() {\n return new config.lib.Log('UploadLog', " !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |" );\n};\nconfig.macros.upload.UploadLog.prototype = config.lib.Log.prototype;\nconfig.macros.upload.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {\n var line = " [[" + config.lib.file.basename(storeUrl) + "|" + storeUrl + "]] | ";\n line += uploadDir + " | " + toFilename + " | " + backupDir + " |";\n this.newLine(line);\n};\nconfig.macros.upload.UploadLog.prototype.endUpload = function() {\n this.addToLine(" Ok |");\n};\nconfig.macros.upload.basename = config.lib.file.basename;\nconfig.macros.upload.dirname = config.lib.file.dirname;\nconfig.macros.upload.upload = function(storeUrl, toFilename, uploadDir, backupDir, username, password)\n{\n // parameters initialization\n storeUrl = (storeUrl ? storeUrl : config.options.txtUploadStoreUrl);\n toFilename = (toFilename ? toFilename : config.options.txtUploadFilename);\n backupDir = (backupDir ? backupDir : config.options.txtUploadBackupDir);\n uploadDir = (uploadDir ? uploadDir : config.options.txtUploadDir);\n username = (username ? username : config.options.txtUploadUserName);\n password = config.options.pasUploadPassword; // for security reason no password as macro parameter\n if (storeUrl === '') {\n storeUrl = config.macros.upload.defaultStoreScript;\n }\n if (config.lib.file.dirname(storeUrl) === '') {\n storeUrl = config.lib.file.dirname(document.location.toString())+'/'+storeUrl;\n }\n if (toFilename === '') {\n toFilename = config.lib.file.basename(document.location.toString());\n }\n\n clearMessage();\n // only for forcing the message to display\n if (version.major < 2)\n store.notifyAll();\n if (!storeUrl) {\n alert(config.macros.upload.messages.urlParamMissing);\n return;\n }\n // Check that file is not locked\n if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {\n if (BidiX.GroupAuthoring.lock.isLocked() && !BidiX.GroupAuthoring.lock.isMyLock()) {\n alert(config.macros.upload.messages.fileLocked);\n return;\n }\n }\n \n var log = new this.UploadLog();\n log.startUpload(storeUrl, toFilename, uploadDir, backupDir);\n if (document.location.toString().substr(0,5) == "file:") {\n saveChanges();\n }\n displayMessage(config.macros.upload.messages.aboutToUpload.format([this.dirname(storeUrl)]), this.dirname(storeUrl));\n this.uploadChanges(storeUrl, toFilename, uploadDir, backupDir, username, password);\n if(config.options.chkGenerateAnRssFeed) {\n //var rssContent = convertUnicodeToUTF8(generateRss());\n var rssContent = generateRss();\n var rssPath = toFilename.substr(0,toFilename.lastIndexOf(".")) + ".xml";\n this.uploadContent(rssContent, storeUrl, rssPath, uploadDir, '', username, password, \n function (responseText) {\n if (responseText.substring(0,1) != '0') {\n displayMessage(config.macros.upload.messages.rssFileNotUploaded.format([rssPath]));\n }\n else {\n if (uploadDir) {\n rssPath = uploadDir + "/" + config.macros.upload.basename(rssPath);\n } else {\n rssPath = config.macros.upload.basename(rssPath);\n }\n displayMessage(config.macros.upload.messages.rssFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+rssPath]), config.macros.upload.dirname(storeUrl)+"/"+rssPath);\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n });\n }\n return;\n};\n\nconfig.macros.upload.uploadChanges = function(storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var original;\n if (document.location.toString().substr(0,4) == "http") {\n original = this.download(storeUrl, toFilename, uploadDir, backupDir, username, password);\n return;\n }\n else {\n // standard way : Local file\n \n original = loadFile(getLocalPath(document.location.toString()));\n if(window.Components) {\n // it's a mozilla browser\n try {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]\n .createInstance(Components.interfaces.nsIScriptableUnicodeConverter);\n converter.charset = "UTF-8";\n original = converter.ConvertToUnicode(original);\n }\n catch(e) {\n }\n }\n }\n //DEBUG alert(original);\n this.uploadChangesFrom(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password);\n};\n\nconfig.macros.upload.uploadChangesFrom = function(original, storeUrl, toFilename, uploadDir, backupDir, \n username, password) {\n var startSaveArea = '<div id="' + 'storeArea">'; // Split up into two so that indexOf() of this source doesn't find it\n var endSaveArea = '</d' + 'iv>';\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([document.location.toString()]));\n return;\n }\n var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + \n allTiddlersAsHtml() + "\sn\st\st" +\n original.substr(posClosingDiv);\n var newSiteTitle;\n if(version.major < 2){\n newSiteTitle = (getElementText("siteTitle") + " - " + getElementText("siteSubtitle")).htmlEncode();\n } else {\n newSiteTitle = (wikifyPlain ("SiteTitle") + " - " + wikifyPlain ("SiteSubtitle")).htmlEncode();\n }\n\n revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");\n revised = revised.replaceChunk("<!--PRE-HEAD-START--"+">","<!--PRE-HEAD-END--"+">","\sn" + store.getTiddlerText("MarkupPreHead","") + "\sn");\n revised = revised.replaceChunk("<!--POST-HEAD-START--"+">","<!--POST-HEAD-END--"+">","\sn" + store.getTiddlerText("MarkupPostHead","") + "\sn");\n revised = revised.replaceChunk("<!--PRE-BODY-START--"+">","<!--PRE-BODY-END--"+">","\sn" + store.getTiddlerText("MarkupPreBody","") + "\sn");\n revised = revised.replaceChunk("<!--POST-BODY-START--"+">","<!--POST-BODY-END--"+">","\sn" + store.getTiddlerText("MarkupPostBody","") + "\sn");\n\n var response = this.uploadContent(revised, storeUrl, toFilename, uploadDir, backupDir, \n username, password, function (responseText) {\n if (responseText.substring(0,1) != '0') {\n alert(responseText);\n displayMessage(config.macros.upload.messages.fileNotUploaded.format([getLocalPath(document.location.toString())]));\n }\n else {\n if (uploadDir !== '') {\n toFilename = uploadDir + "/" + config.macros.upload.basename(toFilename);\n } else {\n toFilename = config.macros.upload.basename(toFilename);\n }\n displayMessage(config.macros.upload.messages.mainFileUploaded.format(\n [config.macros.upload.dirname(storeUrl)+"/"+toFilename]), config.macros.upload.dirname(storeUrl)+"/"+toFilename);\n var log = new config.macros.upload.UploadLog();\n log.endUpload();\n store.setDirty(false);\n // erase local lock\n if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {\n BidiX.GroupAuthoring.lock.eraseLock();\n }\n \n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n }\n );\n};\n\nconfig.macros.upload.uploadContent = function(content, storeUrl, toFilename, uploadDir, backupDir, \n username, password, callbackFn) {\n var boundary = "---------------------------"+"AaB03x"; \n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n if (window.netscape){\n try {\n if (document.location.toString().substr(0,4) != "http") {\n netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');}\n }\n catch (e) { }\n } \n //DEBUG alert("user["+config.options.txtUploadUserName+"] password[" + config.options.pasUploadPassword + "]");\n // compose headers data\n var sheader = "";\n sheader += "--" + boundary + "\sr\snContent-disposition: form-data; name=\s"";\n sheader += config.macros.upload.formName +"\s"\sr\sn\sr\sn";\n sheader += "backupDir="+backupDir\n +";user=" + username \n +";password=" + password\n +";uploaddir=" + uploadDir;\n // add lock attributes to sheader\n if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {\n var l = BidiX.GroupAuthoring.lock.myLock;\n sheader += ";lockuser=" + l.user\n + ";mtime=" + l.mtime\n + ";locktime=" + l.locktime;\n }\n sheader += ";;\sr\sn"; \n sheader += "\sr\sn" + "--" + boundary + "\sr\sn";\n sheader += "Content-disposition: form-data; name=\s"userfile\s"; filename=\s""+toFilename+"\s"\sr\sn";\n sheader += "Content-Type: " + config.macros.upload.contentType + "\sr\sn";\n sheader += "Content-Length: " + content.length + "\sr\sn\sr\sn";\n // compose trailer data\n var strailer = new String();\n strailer = "\sr\sn--" + boundary + "--\sr\sn";\n var data;\n data = sheader + content + strailer;\n //request.open("POST", storeUrl, true, username, password);\n request.open("POST", storeUrl, true);\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if (request.status == 200)\n callbackFn(request.responseText);\n else\n alert(config.macros.upload.messages.errorUploadingContent);\n }\n };\n request.setRequestHeader("Content-Length",data.length);\n request.setRequestHeader("Content-Type","multipart/form-data; boundary="+boundary);\n request.send(data); \n};\n\n\nconfig.macros.upload.download = function(uploadUrl, uploadToFilename, uploadDir, uploadBackupDir, \n username, password) {\n var request;\n try {\n request = new XMLHttpRequest();\n } \n catch (e) { \n request = new ActiveXObject("Msxml2.XMLHTTP"); \n }\n try {\n if (uploadUrl.substr(0,4) == "http") {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n }\n else {\n netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");\n }\n } catch (e) { }\n //request.open("GET", document.location.toString(), true, username, password);\n request.open("GET", document.location.toString(), true);\n request.onreadystatechange = function () {\n if (request.readyState == 4) {\n if(request.status == 200) {\n config.macros.upload.uploadChangesFrom(request.responseText, uploadUrl, \n uploadToFilename, uploadDir, uploadBackupDir, username, password);\n }\n else\n alert(config.macros.upload.messages.errorDownloading.format(\n [document.location.toString()]));\n }\n };\n request.send(null);\n};\n\n//}}}\n////===\n\n////+++!![Initializations]\n\n//{{{\nconfig.lib.options.init('txtUploadStoreUrl','store.php');\nconfig.lib.options.init('txtUploadFilename','');\nconfig.lib.options.init('txtUploadDir','');\nconfig.lib.options.init('txtUploadBackupDir','');\nconfig.lib.options.init('txtUploadUserName',config.options.txtUserName);\nconfig.lib.options.init('pasUploadPassword','');\nconfig.shadowTiddlers.UploadDoc = "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadDoc ]]\sn"; \n\n\n//}}}\n////===\n\n////+++!![Core Hijacking]\n\n//{{{\nconfig.macros.saveChanges.label_orig_UploadPlugin = config.macros.saveChanges.label;\nconfig.macros.saveChanges.label = config.macros.upload.label.saveToDisk;\n\nconfig.macros.saveChanges.handler_orig_UploadPlugin = config.macros.saveChanges.handler;\n\nconfig.macros.saveChanges.handler = function(place)\n{\n if ((!readOnly) && (document.location.toString().substr(0,4) != "http"))\n createTiddlyButton(place,this.label,this.prompt,this.onClick,null,null,this.accessKey);\n};\n\n//}}}\n////===
/***\n|''Name:''|UploadPluginMsgEN|\n|''Description:''|English Translation|\n|''Date:''|Aug 11, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#UploadPluginMsgEN|\n|''Author:''|BidiX (BidiX (at) bidix (dot) info) with modifications by YannPerrin|\n|''License:''|[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D ]]|\n|''Include:''|none|\n|''Require:''|UploadPlugin 3.4.0|\n***/\n/***\n!Usage : \nFor an english translation of UploadPlugin Message when using PolyGlotPlugin, import this tiddler in the TiddlyWiki. Make sure it is tagged with {{{en}}} and {{{linguo}}}. \nComments and suggestions are welcome.\n***/\n//{{{\nconfig.macros.upload.messages = {\n aboutToUpload: "About to upload TiddlyWiki to %0",\n errorDownloading: "Error downloading",\n errorUploadingContent: "Error uploading content",\n fileLocked: "Files is locked: You are not allowed to Upload",\n fileNotFound: "file to upload not found",\n fileNotUploaded: "File %0 NOT uploaded",\n mainFileUploaded: "Main TiddlyWiki file uploaded to %0",\n urlParamMissing: "url param missing",\n rssFileNotUploaded: "RssFile %0 NOT uploaded",\n rssFileUploaded: "Rss File uploaded to %0"\n};\n\nconfig.macros.upload.label = {\n promptOption: "Save and Upload this TiddlyWiki with UploadOptions",\n promptParamMacro: "Save and Upload this TiddlyWiki in %0",\n saveLabel: "save to web", \n saveToDisk: "save to disk",\n uploadLabel: "upload" \n};\n\nconfig.macros.saveChanges.label = config.macros.upload.label.saveToDisk;\n//}}}\n
/***\n|''Name:''|UploadPluginMsgFR|\n|''Description:''|French Translation|\n|''Date:''|Aug 11, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#UploadPluginMsgEN|\n|''Author:''|BidiX (BidiX (at) bidix (dot) info) with modifications by YannPerrin|\n|''License:''|[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D ]]|\n|''Include:''|none|\n|''Require:''|UploadPlugin 3.4.0|\n***/\n/***\n!Usage : \nFor a french translation of UploadPlugin Message when using PolyGlotPlugin, import this tiddler in the TiddlyWiki. Make sure it is tagged with {{{fr}}} and {{{linguo}}}. \nComments and suggestions are welcome.\n***/\n//{{{\nconfig.macros.upload.messages = {\n aboutToUpload: "Préparation du téléchargement le TiddlyWiki vers %0",\n errorDownloading: "Erreur de téléchargement de %0 depuis le serveur",\n errorUploadingContent: "Erreur de téléchargement vers le serveur du contenu",\n fileLocked: "Fichier est réservé: vous n'êtes pas autorisé à le mettre à jour",\n fileNotFound: "Fichier à télécharger vers le serveur non trouvé",\n fileNotUploaded: "Le fichier %0 N'A PAS été téléchargé vers le serveur",\n mainFileUploaded: "Le fichier TiddlyWiki a été téléchargé vers le serveur %0",\n urlParamMissing: "Paramètre URL manquant",\n rssFileNotUploaded: "Le fichier Rss %0 N'A PAS été téléchargé vers le serveur",\n rssFileUploaded: "Le fichier RSS a été téléchargé vers %0"\n};\n\nconfig.macros.upload.label = { \n promptOption: "Sauvegarde et télécharge ce TiddlyWiki avec les UploadOptions",\n promptParamMacro: "Sauvegarde et télécharge ce TiddlyWiki vers %0",\n saveLabel: "sauvegarde sur le web", \n saveToDisk: "sauvegarde sur le disque",\n uploadLabel: "Télécharge vers le web"\n};\n\nconfig.macros.saveChanges.label = config.macros.upload.label.saveToDisk;\n//}}}\n
<script src="UploadPlugin.js">\nif (config.macros.upload) {\n return "loaded"; \n}\nelse {\nreturn "not loaded";\n}\n</script>
/***\n|''Name:''|UploadToFileMacro|\n|''Description:''|Upload a tiddler as a file using UploadPlugin context. Used with the SimonBaird's RunMacroIfTagged in [[ViewTemplate|BidiXStyleViewTemplate]] provides a new command in the tiddler toolbar.\n|\n|''Version:''|1.0.0|\n|''Date:''|Mar 14, 2006|\n|''Source:''|http://tiddlywiki.bidix.info/#UploadToFileMacro|\n|''Documentation:''|http://tiddlywiki.bidix.info/#UploadToFileMacroDoc|\n|''Author:''|BidiX (BidiX (at) bidix (dot) info)|\n|''License:''|[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D ]]|\n|''~CoreVersion:''|2.0.0|\n|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|\n|''Include:''|none|\n|''Require:''|UploadPlugin|\n***/\n//{{{\nversion.extensions.UploadToFileMacro = {\n major: 1, minor: 0, revision: 0, \n date: new Date(2006,3,13),\n source: 'http://tiddlywiki.bidix.info/#UploadToFilePlugin',\n documentation: 'http://tiddlywiki.bidix.info/#UploadToFilePluginDoc',\n author: 'BidiX (BidiX (at) bidix (dot) info',\n license: '[[BSD open source license|http://tiddlylab.bidix.info/BidiXTW.html#%5B%5BBSD%20open%20source%20license%5D%5D]]',\n coreVersion: '2.0.0',\n browser: 'Firefox 1.5; InternetExplorer 6.0; Safari'\n};\n\nconfig.macros.uploadToFile = {\n label: "uploadToFile",\n prompt: "upload tiddler '%0' to file '%1' ",\n warning: "Are you sure you want to upload '%0'?",\n dirname: config.lib.file.dirname,\n basename: config.lib.file.dirname\n};\n\nconfig.macros.uploadToFile.messages = {\n fileUploaded: "tiddler '%0' uploaded to file '%1'",\n fileNotUploaded: "tiddler '%0' NOT uploaded"\n};\n\nconfig.macros.uploadToFile.handler = function(place, macroName, params, wikifier,paramString, tiddler) {\n // parameters initialization\n var toFilename = params[0];\n var tiddlerTitle = params[1];\n if (!tiddlerTitle) { \n tiddlerTitle = tiddler.title;\n } else {\n tiddler = store.getTiddler(tiddlerTitle);\n }\n if (!toFilename) { \n toFilename = tiddlerTitle;\n } \n var prompt = this.prompt.format([tiddlerTitle, toFilename]);\n createTiddlyButton(place, this.label, this.prompt.format([tiddlerTitle, toFilename]), \n function () {\n config.macros.uploadToFile.upload(tiddler, toFilename); \n return false;}, \n null, null, null);\n};\n\nconfig.macros.uploadToFile.upload = function(tiddler, toFilename, storeUrl, toFilename, uploadDir, backupDir, username, password) {\n var uploadIt = true; \n if (this.warning)\n uploadIt = confirm(this.warning.format([tiddler.title])); \n if (uploadIt) {\n if (!tiddler) {\n alert("Tiddler not found.");\n return;\n }\n if (!config.macros.upload.uploadContent) {\n alert ("no UploadPlugin extension");\n return;\n }\n // parameters initialization\n storeUrl = (storeUrl ? storeUrl : config.options.txtUploadStoreUrl);\n toFilename = (toFilename ? toFilename : tiddler.title);\n backupDir = (backupDir ? backupDir : config.options.txtUploadBackupDir);\n uploadDir = (uploadDir ? uploadDir : config.options.txtUploadDir);\n username = (username ? username : config.options.txtUploadUserName);\n password = (password ? password :config.options.pasUploadPassword); \n config.macros.upload.uploadContent(tiddler.text, storeUrl, toFilename, uploadDir, backupDir, username, password, \n function (responseText) {\n if (responseText.substring(0,1) != '0') {\n displayMessage(config.macros.uploadToFile.messages.fileNotUploaded.format([tiddler.title]));\n }\n else {\n if (uploadDir) {\n toFilename = uploadDir + "/" + config.macros.uploadToFile.basename(toFilename);\n } \n displayMessage(config.macros.uploadToFile.messages.fileUploaded.format(\n [tiddler.title, config.macros.uploadToFile.dirname(storeUrl)+"/"+toFilename]), config.macros.upload.dirname(storeUrl)+"/"+toFilename);\n }\n // for debugging store.php uncomment last line\n //DEBUG alert(responseText);\n });\n }\n return false;\n};\n\nconfig.shadowTiddlers.UploadToFileMacroDoc= "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadToFileMacroDoc]]\sn"; \n//}}}
//last update: UploadToFileMacro v 1.4.0//\n\n!Description\nUpload a tiddler as a file using UploadPlugin context. \n\nUsed with the SimonBaird's RunMacroIfTagged in [[ViewTemplate]] provides a new command in the tiddler toolbar.\n\n!Usage\n{{{\n <<uploadToFile>>\n <<uploadTofile [filename [tiddlerTitle]]>>\n \n tiddlerTitle: if omitted the title of the current tiddler \n filename: if omitted the title of the current tiddler\n\n}}}\n\n!Revision history\n* v1.0.0 (14/03/2006)\n** initial release\n
<!---\n| Name:|~TagglyTaggingViewTemplate |\n| Version:|1.2 (16-Jan-2006)|\n| Source:|http://simonbaird.com/mptw/#TagglyTaggingViewTemplate|\n| Purpose:|See TagglyTagging for more info|\n| Requires:|You need the CSS in TagglyTaggingStyles to make it look right|\n!History\n* 16-Jan-06, version 1.2, added tagglyListWithSort\n* 12-Jan-06, version 1.1, first version\n!Notes\nRemove the miniTag if you don't like it or you don't use QuickOpenTagPlugin\n--->\n<!--{{{-->\n<div class="toolbar" macro="toolbar -closeTiddler closeOthers +editTiddler permalink references jump newHere"><span style="padding-right:0.75em;" class='fakeButton' macro="runMacroIfTagged file uploadToFile"></div>\n<div class="tagglyTagged" macro="hideSomeTags"></span></div>\n<div><span class="title" macro="view title"></span><span class="miniTag" macro="miniTag"></span></div>\n<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date [[DD MMM YYYY]]'></span>)</div>\n<div class="viewer" macro="view text wikified"></div>\n<div class="tagglyTagging" macro="tagglyTagging"></div>\n<!--}}}-->\n
\nWelcome to this new version of BidiXTW with only BidiX's Extensions in a TiddlyWiki 2.1 designed for their publication.\n\nMain contributions are about :\n*<<tag Upload>>\n**UploadPlugin\n**UploadToFileMacro\n*<<tag RSSExtensions>>\n*<<tag ProxyService>>\n*PluginDirectory\n\nSee also :\n*<<tag plugin>> for the list of BidiX's plugins\n*<<tag toRSS>> for the latest news of BidiXTW\n\nAll BidiX's extensions are now compatible TiddlyWiki 2.0 and 2.1\n
<<rssReader asHtml proxy.cgi?url=http://rss.news.yahoo.com/rss/sports>>
<<rssReader asHtml proxy.cgi?url=http://del.icio.us/rss/TiddlyWikiPlugin>>\n
<?php\n/***\n! default settings\nEdit these lines according to your need\n***/\n//{{{\n$RSSFEED = "http://tiddlywiki.bidix.info/BidiXTW.xml";\n$CSS = "bidixtw.css";\n//}}}\n/***\n!Code\nNo change needed under\n***/\n//{{{\n/***\n * news.php - Display a TiddlyWiki RSS file linked with a TiddlyWiki CSS\n * Each item in the xml file is put in a [[tiddler]] <div>.\n * [[news.php]] is designed to be used with GenerateRssHijack.\n *\n * version :1.0.0 - 20/04/2006 - BidiX@BidiX.info\n * \n * see : \n * http://tiddlywiki.bidix.info/#TiddlyWikiNamespace for detail about format\n * http://www.php.net/manual/en/features.file-upload.php \n * usage : \n * POST \n * news.php[?[rss=<rssfile>[&css=<cssfile>]]\n * <rssfile>: a RSSFeed generated by GenerateRssHijack\n * <cssfile>: a CssFile for example extracted from \n * EricShulman's newDocument snap file\n *\n * Revision history\n* v 1.0.0 - 20/04/2006 : \n * POST userfile <file>\n *\n * Copyright (c) BidiX@BidiX.info 2006\n ***/\n//}}}\n\n//{{{\nif (isset($_GET['rss'])) {\n $RSSFEED = $_GET['rss'];\n}\n\nif (isset($_GET['css'])) {\n $CSS = $_GET['css'];\n}\n\n\nclass RSSParser {\n\n var $insideitem = false;\n var $tag = "";\n var $title = "";\n var $description = "";\n var $encoded = "";\n var $link = "";\n var $url;\n var $xml_parser;\n var $fp;\n var $items = array();\n\n function __construct($url) {\n $this->xml_parser = xml_parser_create("utf-8");\n //xml_set_object($this->xml_parser,&$this);\n xml_set_object($this->xml_parser,$this);\n xml_set_element_handler($this->xml_parser, "startElement", "endElement");\n xml_set_character_data_handler($this->xml_parser, "characterData");\n //$this->fp = fopen("http://www.lemonde.fr/rss/sequence/0,2-3208,1-0,0.xml","r");\n //$fp = fopen("http://www.liberation.fr/rss.php","r")\n $this->url = $url;\n $this->fp = fopen($url,"r")\n or die("Error reading RSS data.");\n }\n\n function startElement($parser, $tagName, $attrs) {\n if ($this->insideitem) {\n $this->tag = $tagName;\n } elseif ($tagName == "ITEM") {\n $this->insideitem = true;\n } \n \n }\n \n function printItem($title, $description, $encoded, $link) {\n \n if ($encoded != "") {\n $data = $encoded;\n } else {\n $data = $description;\n }\n printf("<a name=\s"[[%s]]\s"/>", trim($title));\n print("<div id=\s"tiddlerDisplay\s"><div style=\s"position: static;\s" class=\s"tiddler\s">");\n //title\n printf("<div><span class=\s"title\s"><a href='%s'>%s</a></span></div>",\n trim($link),htmlspecialchars(trim($title)));\n printf("<div class=\s"viewer\s">%s</div>",$data);\n print("</div>");\n }\n \n function printItemTitle($title) {\n print("<a href=\s"#[[".$title."]]\s">".$title."</a>");\n // print("<br/>\sn");\n }\n\n \n function printItems() {\n foreach ($this->items as $item) {\n $this->printItem($item[0], $item[1], $item[2], $item[3]);\n }\n }\n \n function printItemTitles() {\n foreach ($this->items as $item) {\n $this->printItemTitle($item[0]);\n }\n }\n\n\n function endElement($parser, $tagName) {\n if ($tagName == "ITEM") {\n //printf("<dt><b><a href='%s'>%s</a></b></dt><P>",\n // trim($this->link),utf8_decode(trim($this->title)));\n //printf("<dd>%s</dd>",utf8_decode(trim($this->description)));\n // $this->printItem($this->title, $this->description, $this->encoded, $this->link);\n $this->items[] = array($this->title, $this->description, $this->encoded, $this->link);\n $this->title = "";\n $this->description = "";\n $this->encoded = "";\n $this->link = "";\n $this->insideitem = false;\n }\n }\n\n function characterData($parser, $data) {\n if ($this->insideitem) {\n switch ($this->tag) {\n case "TITLE":\n $this->title .= $data;\n break;\n case "DESCRIPTION":\n $this->description .= $data;\n break;\n case "CONTENT:ENCODED":\n $this->encoded .= $data;\n break;\n case "LINK":\n $this->link .= $data;\n break;\n }\n }\n }\n\n function parse() {\n while ($data = fread($this->fp, 4096))\n xml_parse($this->xml_parser, $data, feof($this->fp))\n //or die(sprintf("XML error: %s at line %d",\n //xml_error_string(xml_get_error_code($this->xml_parser)),\n //xml_get_current_line_number($this->xml_parser)))\n ;\n fclose($this->fp);\n xml_parser_free($this->xml_parser);\n\n }\n}\n\n$rss_parser = new RSSParser($RSSFEED);\n$rss_parser->__construct($RSSFEED);\n$rss_parser->parse();\n?>\n<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >\n<meta name="description" content="BidiX.info - BidiX's WebSite" />\n<meta name="keywords" content="BidiX, bidix, TiddlyWiki, TiddlyHost, UploadPlugin, Hosting, BidiXTW, RSSReader" />\n<meta name="Generator" content="BidiXTW - Copyright (C) 2006 BidiX. All rights reserved." />\n<meta name="robots" content="index, follow" />\n<link href="<?=$CSS?>" rel="stylesheet" type="text/css" media="screen" />\n<title>BidiX.info - News</title>\n</head>\n<body>\n<div id="page">\n <div class="header">\n <div class="headerForeground">\n <span class="siteTitle" refresh="content" tiddler="SiteTitle"><a tiddlylink="News.BidiX.info" refresh="link" title="BidiX, dimanche 12 mars 2006 11:48:00" href="javascript:;" class="tiddlyLink tiddlyLinkExisting">News.BidiX.info</a></span>&nbsp;\n <span class="siteSubtitle" refresh="content" tiddler="SiteSubtitle">RSSReader for <a tiddlylink="TiddlyWiki" refresh="link" title="TiddlyWiki by Jeremy Ruston" href="http://TiddlyWiki.bidix.info/#TiddlyWiki" class="tiddlyLink tiddlyLinkExisting">TiddlyWiki</a></span>\n </div>\n <div id="topMenu" refresh="content" tiddler="TopMenu">\n <a target="_blank" title="External link to http://tiddlywiki.bidix.info/" href="http://tiddlywiki.bidix.info/" class="externalLink">BidiXTW</a><br>\n <a target="_blank" title="External link to http://tiddlyhost.bidix.info/" href="http://tiddlyhost.bidix.info/" class="externalLink">TiddlyHost</a><br>\n <strong><a target="_blank" title="External link to http://news.bidix.info/" href="http://news.bidix.info/" class="externalLink">News</a></strong><br>\n <a target="_blank" title="External link to http://tiddlywiki.bidix.info/BidiXLab.html" href="http://tiddlywiki.bidix.info/BidiXLab.html" class="externalLink">BidiXLab</a><br>\n <a target="_blank" title="External link to https://ssl.1and1.fr/tiddlywiki.bidix.info/BidiXTWS.html" href="https://ssl.1and1.fr/tiddlywiki.bidix.info/BidiXTWS.html" class="externalLink">BidiXTWS</a><br>\n </div>\n </div>\n<div id="sidebar">\n<div style="overflow: hidden; position: relative; z-index: 0;" class="sidebarGradient" macro="gradient vert #333366 #ccccff">\n<div style="overflow: hidden; position: relative; z-index: 0;" id="sidebarOptions" refresh="content" tiddler="SideBarOptions" macro="gradient vert #000 #069">\n<br><br>\n<?php\n$rss_parser->printItemTitles();\n?>\n<br><br>\n</div>\n<div style="position: absolute; left: 0pt; top: 0%; width: 100%; height: 101%; z-index: -1; background-color: rgb(51, 51, 102);"></div><div style="position: absolute; left: 0pt; top: 2%; width: 100%; height: 99%; z-index: -1; background-color: rgb(54, 54, 105);"></div><div style="position: absolute; left: 0pt; top: 4%; width: 100%; height: 97%; z-index: -1; background-color: rgb(57, 57, 108);"></div><div style="position: absolute; left: 0pt; top: 6%; width: 100%; height: 95%; z-index: -1; background-color: rgb(60, 60, 111);"></div><div style="position: absolute; left: 0pt; top: 8%; width: 100%; height: 93%; z-index: -1; background-color: rgb(63, 63, 114);"></div><div style="position: absolute; left: 0pt; top: 10%; width: 100%; height: 91%; z-index: -1; background-color: rgb(66, 66, 117);"></div><div style="position: absolute; left: 0pt; top: 12%; width: 100%; height: 89%; z-index: -1; background-color: rgb(69, 69, 120);"></div><div style="position: absolute; left: 0pt; top: 14%; width: 100%; height: 87%; z-index: -1; background-color: rgb(72, 72, 123);"></div><div style="position: absolute; left: 0pt; top: 16%; width: 100%; height: 85%; z-index: -1; background-color: rgb(75, 75, 126);"></div><div style="position: absolute; left: 0pt; top: 18%; width: 100%; height: 83%; z-index: -1; background-color: rgb(78, 78, 129);"></div><div style="position: absolute; left: 0pt; top: 20%; width: 100%; height: 81%; z-index: -1; background-color: rgb(81, 81, 132);"></div><div style="position: absolute; left: 0pt; top: 22%; width: 100%; height: 79%; z-index: -1; background-color: rgb(84, 84, 135);"></div><div style="position: absolute; left: 0pt; top: 24%; width: 100%; height: 77%; z-index: -1; background-color: rgb(87, 87, 138);"></div><div style="position: absolute; left: 0pt; top: 26%; width: 100%; height: 75%; z-index: -1; background-color: rgb(90, 90, 141);"></div><div style="position: absolute; left: 0pt; top: 28%; width: 100%; height: 73%; z-index: -1; background-color: rgb(93, 93, 144);"></div><div style="position: absolute; left: 0pt; top: 30%; width: 100%; height: 71%; z-index: -1; background-color: rgb(96, 96, 147);"></div><div style="position: absolute; left: 0pt; top: 32%; width: 100%; height: 69%; z-index: -1; background-color: rgb(99, 99, 150);"></div><div style="position: absolute; left: 0pt; top: 34%; width: 100%; height: 67%; z-index: -1; background-color: rgb(103, 103, 154);"></div><div style="position: absolute; left: 0pt; top: 36%; width: 100%; height: 65%; z-index: -1; background-color: rgb(106, 106, 157);"></div><div style="position: absolute; left: 0pt; top: 38%; width: 100%; height: 63%; z-index: -1; background-color: rgb(109, 109, 160);"></div><div style="position: absolute; left: 0pt; top: 40%; width: 100%; height: 61%; z-index: -1; background-color: rgb(112, 112, 163);"></div><div style="position: absolute; left: 0pt; top: 42%; width: 100%; height: 59%; z-index: -1; background-color: rgb(115, 115, 166);"></div><div style="position: absolute; left: 0pt; top: 44%; width: 100%; height: 57%; z-index: -1; background-color: rgb(118, 118, 169);"></div><div style="position: absolute; left: 0pt; top: 46%; width: 100%; height: 55%; z-index: -1; background-color: rgb(121, 121, 172);"></div><div style="position: absolute; left: 0pt; top: 48%; width: 100%; height: 53%; z-index: -1; background-color: rgb(124, 124, 175);"></div><div style="position: absolute; left: 0pt; top: 50%; width: 100%; height: 51%; z-index: -1; background-color: rgb(127, 127, 178);"></div><div style="position: absolute; left: 0pt; top: 52%; width: 100%; height: 49%; z-index: -1; background-color: rgb(130, 130, 181);"></div><div style="position: absolute; left: 0pt; top: 54%; width: 100%; height: 47%; z-index: -1; background-color: rgb(133, 133, 184);"></div><div style="position: absolute; left: 0pt; top: 56%; width: 100%; height: 45%; z-index: -1; background-color: rgb(136, 136, 187);"></div><div style="position: absolute; left: 0pt; top: 58%; width: 100%; height: 43%; z-index: -1; background-color: rgb(139, 139, 190);"></div><div style="position: absolute; left: 0pt; top: 60%; width: 100%; height: 41%; z-index: -1; background-color: rgb(142, 142, 193);"></div><div style="position: absolute; left: 0pt; top: 62%; width: 100%; height: 39%; z-index: -1; background-color: rgb(145, 145, 196);"></div><div style="position: absolute; left: 0pt; top: 64%; width: 100%; height: 37%; z-index: -1; background-color: rgb(148, 148, 199);"></div><div style="position: absolute; left: 0pt; top: 66%; width: 100%; height: 35%; z-index: -1; background-color: rgb(151, 151, 202);"></div><div style="position: absolute; left: 0pt; top: 68%; width: 100%; height: 33%; z-index: -1; background-color: rgb(155, 155, 206);"></div><div style="position: absolute; left: 0pt; top: 70%; width: 100%; height: 31%; z-index: -1; background-color: rgb(158, 158, 209);"></div><div style="position: absolute; left: 0pt; top: 72%; width: 100%; height: 29%; z-index: -1; background-color: rgb(161, 161, 212);"></div><div style="position: absolute; left: 0pt; top: 74%; width: 100%; height: 27%; z-index: -1; background-color: rgb(164, 164, 215);"></div><div style="position: absolute; left: 0pt; top: 76%; width: 100%; height: 25%; z-index: -1; background-color: rgb(167, 167, 218);"></div><div style="position: absolute; left: 0pt; top: 78%; width: 100%; height: 23%; z-index: -1; background-color: rgb(170, 170, 221);"></div><div style="position: absolute; left: 0pt; top: 80%; width: 100%; height: 21%; z-index: -1; background-color: rgb(173, 173, 224);"></div><div style="position: absolute; left: 0pt; top: 82%; width: 100%; height: 19%; z-index: -1; background-color: rgb(176, 176, 227);"></div><div style="position: absolute; left: 0pt; top: 84%; width: 100%; height: 17%; z-index: -1; background-color: rgb(179, 179, 230);"></div><div style="position: absolute; left: 0pt; top: 86%; width: 100%; height: 15%; z-index: -1; background-color: rgb(182, 182, 233);"></div><div style="position: absolute; left: 0pt; top: 88%; width: 100%; height: 13%; z-index: -1; background-color: rgb(185, 185, 236);"></div><div style="position: absolute; left: 0pt; top: 90%; width: 100%; height: 11%; z-index: -1; background-color: rgb(188, 188, 239);"></div><div style="position: absolute; left: 0pt; top: 92%; width: 100%; height: 9%; z-index: -1; background-color: rgb(191, 191, 242);"></div><div style="position: absolute; left: 0pt; top: 94%; width: 100%; height: 7%; z-index: -1; background-color: rgb(194, 194, 245);"></div><div style="position: absolute; left: 0pt; top: 96%; width: 100%; height: 5%; z-index: -1; background-color: rgb(197, 197, 248);"></div><div style="position: absolute; left: 0pt; top: 98%; width: 100%; height: 3%; z-index: -1; background-color: rgb(200, 200, 251);"></div><div style="position: absolute; left: 0pt; top: 100%; width: 100%; height: 1%; z-index: -1; background-color: rgb(204, 204, 255);"></div></div>\n</div>\n <div id="displayArea">\n <div id="tiddlerDisplay">\n<?php\n$rss_parser->printItems();\n?>\n <div id="pageFooter">\n <a href="http://TiddlyWiki.bidix.info/" class="externalLink">BidiXTW</a> was developed by <a href="mailto:BidiX@bidix.info" class="externalLink">BidiX</a> - this page was processed by <a href="http://TiddlyWiki.bidix.info/#news.php" class="externalLink">news.php</a> \n </div>\n </div>\n</div>\n</body>\n</html>\n<?php\n//}}}\n?>\n
#!/usr/bin/ruby\n# proxy.cgi - proxy command\n# version: 1.0.1 - 10/07/2006 - BidiX@BidiX.info\n# Copyright (c) BidiX@BidiX.info 2006\n\n\nCONFIG = {\n :allowedHostsfile => '.tsallowedsites'\n}\n#/%\n# require 'proxy' \n\n# proxy.rb could be a separate file\n#---------------------------------------\n#\n#\n# proxy.rb - access an url if the target host is allowed\n# version: 1.0.1 - 10/07/2006 - BidiX@BidiX.info\n# \n# require: \n# <allowedHostsfile> a file located on the server containing a list af allowed hosts\n# each host on a separate line. \n# example :\n# www.tiddlywiki.com\n# tiddliwiki.bidix.info\n# tiddlyspot.com\n# see http://TiddlyWiki.bidix.info/#UploadToFileMacro for How to upload this file\n# \n# usage: \n# proxy.cgi?url=<destinationUrlAndParameters>\n# return the corresponding url if the host is included in the allowedHosts file\n# proxy.cgi?action=list\n# list all allowedHosts\n# proxy.cgi[?action=help]\n# Display an help page\n# \n# Revision history\n# v 1.0.1 - 10/07/2006 : \n# output with 'content-type' received from remote host \n# v 1.0.0 - 04/07/2006 : \n# First released version\n#\n# Copyright (c) BidiX@BidiX.info 2006\n\n\nrequire 'cgi'\nrequire 'uri'\nrequire 'net/http'\n\nclass Sites < Array\n def initialize(filename='allowedsites.txt')\n @filename = filename\n import\n end\n \n def export()\n file = File.open(@filename, 'w')\n each {|x| file.write(x+"\sn") }\n file.close()\n end\n def import()\n begin\n IO.foreach(@filename) {|x| push(x.chomp.downcase) }\n rescue\n end\n end\n \n def push(h)\n if ! include?(h.downcase)\n super(h.downcase)\n export\n end\n end\nend\n\n\nclass Proxy < CGI\n Proxy::PAGE = \n <<-EOP\n <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> \n <html>\n <head>\n <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >\n <title>BidiX.info - Proxy script</title>\n </head>\n <body>\n <p>\n <p>proxy.rb V 1.0.1\n <p>BidiX@BidiX.info\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p align="center">This page is designed to redirect an http access if the targetted host is allowed.</p>\n <p align="center">for details see : <a href="http://tiddlywiki.bidix.info/#ProxyService">TiddlyWiki.BidiX.info/#ProxyService<a>.</p> \n </body>\n </html>\n EOP\n \n \n def handleAction\n case @params['action'].first \n \n when 'list'\n puts "Content-Type: text/html\sn\sn"\n puts "<h3>Hosts allowed through this proxy :</h3>\sn<ul>"\n @allowedHosts.each {|h| puts "<li>"+h+"</li>"}\n \n when 'help'\n outputPage\n else\n out() {"action #{@params['action'].first} not found"}\n \n end\n end\n\n def initialize(filename='allowedsites.txt')\n super\n @allowedHosts = Sites.new(filename)\n end\n \n def outputPage()\n out() {Proxy::PAGE}\n end\n \n def respond\n if @params['action'].first\n handleAction\n else\n url = @params['url'].first\n if url\n begin\n if (! URI.split(url)[0])\n url = 'http://' + url\n end\n uri = URI.parse(url);\n if (@allowedHosts.include?(uri.host.downcase))\n response = Net::HTTP.get_response(URI.parse(url))\n out(response['content-type']) {response.body}\n else\n out() {"Host #{uri.host} not allowed"}\n end\n rescue Exception => e\n out() {"Error in Proxy : " + e}\n end\n else\n outputPage\n end\n end\n end\n \nend\n\n#---------------------------------------\n\nproxy = Proxy.new(CONFIG[:allowedHostsfile])\nproxy.respond\n\n#%/
<?php\n/***\n! User settings\nEdit these lines according to your need\n***/\n//{{{\n$AUTHENTICATE_USER = true; // true | false\n$USERS = array(\n 'user1'=>'password1', \n 'user2'=>'password2'); // set usernames and strong passwords\n$allowed_servers = array('tiddly.bidix.info', 'tiddlyhost.bidix.info');\n// included file must overwrite $allowed_servers\ninclude("allowed_servers.php");\n//}}}\n/***\n!Code\nNo change needed under\n***/\n//{{{\n/***\n * proxy.php - especially design for permitting access from an online TiddlyWiki to "OtherSite" \n * Based on pHproxy\n * Developed by: Nart Villeneuve\n* Contact: http://ice.citizenlab.org\n * version : 1.0 - 23/03/2006 - BidiX@BidiX.info\n * \n * usage : \n * <proxyUrl>?go2url=<destinationUrlAndParameters>[&user=<user>&password=<password>]\n * examples :\n * reader mode : http://tiddlywiki.bidix.info/proxy.php?go2url=http://www.tiddlywiki.com/#Plugins\n * author mode: http://tiddlywiki.bidix.info/proxy.php?user=bidix&password=123456&go2url=http://www.google.com/\n *\n * access his allowed only :\n * if server is in $allowed_servers\n * or if &user=<user>&password=<password> is specified \n * and user is authenticated\n *\n * Revision history\n * v 1.0 - 23/03/2006 :\n * initial release\n */\n// Authenticate user\n$user_allowed = false;\n$user = $_GET['user'];\n$password = $_GET['password'];\nif ((!$AUTHENTICATE_USER) \n || ((isset($_GET['user'])) && (isset($_GET['password'])) && ($USERS[$_GET['user']] == $_GET['password']))) {\n $user_allowed = true;\n unset($_GET['user']);\n unset($_GET['password']);\n}\n\nfunction error_userNotAllowed() {\n global $user, $password;\n echo "<b>proxy</b><br>";\n echo "<b>You tried to access a restricted server. The user must be authenticated.</b><br>";\n echo "<br>Password for user:[". $user."] password:[".$password."] doesnot match.";\n}\n?>\n<?php\n/* $Id: phproxy.php,v 1.30 2004/10/05 15:09:31 metac0m Exp $ */\n/*************************************************************/\n/* pHproxy */\n/*************************************************************/\n/*\n\npHproxy\nCopyright (C) The Citizen Lab 2004.\nDeveloped by: Nart Villeneuve\nContact: http://ice.citizenlab.org | nart@citizenlab.org\n\nSpecial Thanks to:\nCatspaw\nTim Smith\nBennett Haselton\nDavid Warde-Farley\n\nThe Hacktivist (http://www.thehacktivist.com/)\nCatspaw (http://www.insacecats.com/)\nCitizen Lab (http://www.citizenlab.org/)\nOpenNet Initiative (http://www.opennetinitiative.net)\nPeacefire, Bennett Haselton (http://www.peacefire.org/)\n\npHproxy is inpired by CGIProxy and CECID and many ideas\nand maybe a few lines of code have been hacked from these\nfine folks:\n\nCGIProxy: http://www.jmarshall.com/tools/cgiproxy/\nCECID: http://cecid.sourceforge.net/\n\nLICENSE\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License (GPL)\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nTo read the license please visit\nhttp://www.gnu.org/copyleft/gpl.html\n\nINSTALL\n\nEdit php.ini\n\nallow_url_fopen = On\n\n*/\n\n/*************************************************************/\n/* GLOBALS */\n/*************************************************************/\n\n// BidiX - 26/02/2006\n// for me proxy don't proxyfyhtml\n$mustProxifyHtml = false;\n\n//Settings\n\n//This option should be set to the method through\n//which users should access pHproxy: HTTP or HTTPS. \n\n$server_mode = "http"; //(http or https)\n\n//This option controls what media types are allowed \n\n$media_mode = 2; //text only=0, text & images=1, all = 2\n\n//This option encodes requested URLs\n//XOR is the recomended option \n\n$url_obfuscation = 0; //None=0, base64=1, rot-13=2, xor=3\n\n//This option prevents cookies from being sent to the end user\n//This setting will not prevent JavaScript cookies from being set\n\n$no_cookies = 0; //Allow Cookies=0, Remove Cookies=1\n\n//This option removes common script tags\n//It is not 100% effective at removing all\n//scripts. For maximum protection users should disable\n//scripts, such as JavaScript, in their browser settings.\n\n$script_stripper = 0; //Allow Scripts=0, Remove Scripts=1\n\n//This option alters the content and filesize of images\n//(GIF, JPG, PNG). Requires GD Library.\n\n$pad_images = 0; //No=0, Yes=1 \n\n//This option acts as a whitelist\n/*\n$allowed_servers = array('tiddly.bidix.info', 'tiddlyhost.bidix.info');\n// included file must overwrite $allowed_servers\ninclude("allowed_servers.php");\n*/\n//This option acts as a blocklist\n\n$banned_servers = array();\n\n//This option denies access to internal networks\n\n$banned_networks = array('127.0.0.1', '192.168', '10');\n\n//These options are used to identify URLs\n//Change these to something unique\n\n$getprefix = "go2url";\n$postprefix = "go2post";\n\n//Used for XOR (url obfcusation and XOR MODE)\n//Change to something unique\n\n$passwd = "hello"; \n\n//XOR MODE\n/*\nXORMODE is an experimental hack of pHproxy using XOR to\nobfuscate web pages and then have the user decode the \ncontent on the client side with JavaScript.\n*/\n\n$xormode = 0; //NO=0, YES=1\n\n//Globals\n$servername = $server_mode."://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];\n$serverpath = $servername."?".$getprefix."=";\n$serverpost = $servername."?".$postprefix."=";\n$version = preg_split("/ /", '$Revision: 1.30 $');\n$version = $version[1];\n\n/*************************************************************/\n/* GET & POST */\n/*************************************************************/\n\nif ($_POST) {\n\n //For the index() form & location bar form\n if (isset($_POST[$getprefix])) {\n\n\n $url = $_POST[$getprefix];\n\n //De-Obfuscate (not needed until obfuscation on\n //client side with Javascript implemented\n //$url = de_obfuscate($_POST[$getprefix]);\n\n //Set method, postval & cookieval\n $method = "GET";\n $postval = "NULL";\n $cookieval = array();\n\n //Check the link\n linkcheck($url,$method,$postval,$cookieval);\n\n } else {\n \n //For POST forms\n //De-Obfuscate\n $url = de_obfuscate($_POST[$postprefix]);\n\n //Nasty hack for url's with extra args e.g. &k=v\n if (count($_POST) > 1) {\n\n foreach ($_POST as $k => $v ) {\n if ($k == $postprefix) {\n //We aldready have the url, so do nothing\n } else {\n //Assemble the post with keys & values\n $postval .= urlencode($k)."=".urlencode($v)."&";\n }\n }\n }\n\n //Set method, postval & cookieval\n $method = "POST";\n $postval = substr($postval, 0, -1);\n $cookieval = array();\n\n //Check the link\n linkcheck($url,$method,$postval,$cookieval);\n\n }\n\n} elseif ($_GET) {\n\n //De-Obfuscate\n $url = de_obfuscate($_GET[$getprefix]);\n\n //Nasty hack for url's with extra args e.g. &k=v\n if (count($_GET) > 1) {\n\n //We only want one ?\n if (!preg_match("/\s?/", $url)) {\n $url .= "?";\n }\n\n foreach ($_GET as $k => $v ) {\n if ($k == $getprefix) {\n //We aldready have the url, so do nothing\n } else {\n //Reassemble the url with keys & values\n $url .= "&$k=$v";\n }\n }\n // Gets rid of the GET variables in the URL after a GET form.\n // Added by xcham, Aug 06/04\n\n header("Location: " . $serverpath . obfuscate($url));\n\n }\n\n\n\n //Set holder\n $cookieval = array();\n\n if ($_COOKIE) {\n //Get any Cookies we've set\n //for the right host\n\n //Parse the url\n $urlparsed = parse_url($url);\n //Get the host\n $host = $urlparsed['host'];\n\n\n foreach ($_COOKIE as $k => $v ) {\n $val = explode("|", $v);\n if ($url_obfuscation > 0) {\n $val[1] = de_obfuscate($val[1]);\n }\n if ($val[1] == ".".$host) {\n array_push($cookieval, "$k=$val[0]");\n }\n\n }\n }\n\n //Set method & postval\n $method = "GET";\n $postval = "NULL";\n //Check the link\n linkcheck($url,$method,$postval,$cookieval);\n\n} else {\n\n //If server_mode is https force the user\n //to access via https\n if ($server_mode == "https") {\n if (!isset($_SERVER['HTTPS'])) {\n header("Location: " . $servername);\n exit();\n }\n }\n\n index();\n}\n\n\n/*************************************************************/\n/* Index */\n/*************************************************************/\n\nfunction index() {\n global $getprefix, $version;\n \n echo "\n <html>\n <head><title>pHproxy</title></head>\n <body>\n <h1>pHproxy</h1>\n <p>Start browsing through this php-based proxy by entering a URL below.\n\n <form action=\s"".$_SERVER['PHP_SELF']."\s" method=\s"post\s">\n <input name=\s"$getprefix\s" size=\s"66\s" value=\s"\s">\n <br><input type=\s"submit\s" value=\s" Begin browsing \s">\n </form>\n\n <p>\n <hr>\n <table width=\s"100%\s"><tr>\n <td align=\s"left\s"> \n <a href=\s"".$_SERVER['PHP_SELF']."\s"><i>pHproxy $version</i></a>\n </td>\n <td align=\s"right\s">\n <a href=\s"".$_SERVER['PHP_SELF']."\s"><i>Restart</i></a>\n </td>\n </tr></table>\n <p>\n </body>\n </html>\n ";\n\n}\n\n/*************************************************************/\n/* Location Bar */\n/*************************************************************/\n\nfunction location($fullurl) {\n global $getprefix;\n\n $location = "\n <center>\n <table>\n <tr>\n <td align=\s"left\s">\n <form action=\s"".$_SERVER['PHP_SELF']."\s" method=\s"post\s">\n <input name=\s"$getprefix\s" size=\s"50\s" value=\s"$fullurl\s"> \n &nbsp;&nbsp; <input type=\s"submit\s" value=\s"Browse\s">\n &nbsp;&nbsp;&nbsp;[ <a href=\s"".$_SERVER['PHP_SELF']."\s"><i>Restart</i></a> ]\n </form>\n </td>\n </tr>\n </table>\n </center>\n <hr><br>\n ";\n return $location;\n}\n\n/*************************************************************/\n/* Error Messages */\n/*************************************************************/\n\nfunction error_blank() {\n echo "<b>pHproxy</b><br>";\n echo "<b>You have to enter a url or domain name</b><br>";\n echo "<br><a href=\s"".$_SERVER['PHP_SELF']."\s"><i>Restart</i></a><br>";\n}\n\nfunction error_loop() {\n echo "<b>pHproxy</b><br>";\n echo "<b>You have entered the url of this proxy.</b><br>";\n echo "<br><a href=\s"".$_SERVER['PHP_SELF']."\s"><i>Restart</i></a><br>";\n}\n\nfunction error_banned() {\n echo "<b>pHproxy</b><br>";\n echo "<b>You tried to access a restricted server. The owner of this\n proxy has restricted which servers it can access,\n presumably for security or bandwidth reasons.</b><br>";\n echo "<br><a href=\s"".$_SERVER['PHP_SELF']."\s"><i>Restart</i></a><br>";\n}\n\nfunction error_mime() {\n echo "<b>pHproxy</b><br>";\n echo "<b>You tried to access a non-text mime type. This\n proxy has been configured to operate in text-only mode,\n presumably for security or bandwidth reasons.</b><br>";\n echo "<br><a href=\s"".$_SERVER['PHP_SELF']."\s"><i>Restart</i></a><br>";\n}\n\nfunction error_gd() {\n echo "<b>pHproxy</b><br>";\n echo "<b>This proxy has been configured on a server that does\n not have GD support. Please disable the pad_images option.</b><br>";\n echo "<br><a href=\s"".$_SERVER['PHP_SELF']."\s"><i>Restart</i></a><br>";\n}\n\nfunction error_crypt2plain() {\n global $serverpath;\n echo "<b>pHproxy</b><br>";\n echo "<b>You have requested the encrypted contents of an\n SSL-enabled web server (HTTPS) but have accessed pHproxy though\n plaintext (HTTP). The encrypted contents will be transfered to\n you in plaintext. This is a serious security risk.";\n echo "<br><a href=\s"".$_SERVER['PHP_SELF']."\s"><i>Restart</i></a><br>";\n}\n\n/*************************************************************/\n/* (De) Obfuscate */\n/*************************************************************/\n\nfunction obfuscate($url) {\n global $url_obfuscation, $passwd;\n if ($url_obfuscation == 1) {\n return base64_encode($url);\n } elseif ($url_obfuscation == 2) {\n return str_rot13($url);\n } elseif ($url_obfuscation == 3) {\n return xorcist($url, $passwd);\n } else {\n return rawurlencode($url);\n }\n}\n\nfunction de_obfuscate($url) {\n global $url_obfuscation, $passwd;\n if ($url_obfuscation == 1) {\n return base64_decode($url);\n } elseif ($url_obfuscation == 2) {\n return str_rot13($url);\n } elseif ($url_obfuscation == 3) {\n return de_xorcist($url, $passwd);\n } else {\n return rawurldecode($url);\n }\n}\n\n/*************************************************************/\n/* XOR (Server Side) */\n/*************************************************************/\nfunction xorcist($string, $passwd) {\n\n $xorized = "";\n\n $index = 0;\n $ichars = str_split($string);\n\n foreach ($ichars as $i) {\n $xor1 = ord($i);\n $xor2 = ord($passwd[$index % strlen($passwd)]);\n $xored = ($xor1 ^ $xor2);\n $xorized .= sprintf("%02x", $xored);\n $index++;\n\n }\n\n return $xorized;\n}\n\nfunction str_split($string, $split_length = 1) {\n $strlen = strlen($string);\n \n for ($i = 0; $i < $strlen; $i += $split_length) {\n $array[] = substr($string, $i, $split_length);\n }\n \n return $array;\n}\n\n/*************************************************************/\n/* de-XOR (Server Side) */\n/*************************************************************/\n\nfunction de_xorcist($string, $passwd) {\n // Decode string\n $string = base16_decode($string);\n //de-XOR\n $output = '';\n for ($i = 0; $i < strlen($string); $i++) {\n $output .= chr(ord($string{$i}) \n ^ ord($passwd{$i % strlen($passwd)})); \n }\n\n return $output;\n}\n\nfunction base16_decode($string) {\n $hex_digits = '0123456789abcdef';\n $output='';\n \n for ($i = 0; $i < strlen($string); $i = $i + 2) {\n $char_code = (strpos($hex_digits, $string{$i}) << 4)\n | (strpos($hex_digits, $string{$i+1}));\n $output .= chr($char_code);\n }\n \n return $output;\n}\n\n/*************************************************************/\n/* XOR (Client Side) */\n/*************************************************************/\n// Original JavaScript by Tim Smith.\n\n\n\nfunction gen_symbolname() {\n $obfusc_ch = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";\n // choose a random length between 13 and 32\n $len = rand(13,32); // should be long enough to avoid collision\n $s_name = "";\n for ($i = 0; $i < $len; $i++) {\n $s_name .= substr($obfusc_ch,rand(0,strlen($obfusc_ch) - 1),1);\n }\n // ensure that it starts with a letter and not a number\n // index 51 is where the letters end (26 * 2 - 1)\n $s_name = substr($obfusc_ch,rand(0,51),1) . $s_name;\n return $s_name;\n} \n\nfunction gen_spaces() {\n $MAX = 50;\n $MIN = 20;\n $N = rand($MIN,$MAX);\n $str = "";\n for ($i = 0; $i < $N; $i++)\n {\n $str .= " ";\n }\n return $str;\n}\n\nfunction spaceify($str) {\n $ar = explode("\sn",$str);\n $str2 = "";\n foreach ($ar as $val) {\n $str2 .= gen_spaces() . $val . (rand(0,1) ? "\sn" : "");\n }\n return $str2;\n}\n\nfunction xorjs($xorized, $passwd) {\n $symbols = array(\n "base16_decode" => gen_symbolname(),\n "string" => gen_symbolname(),\n "hex_digits" => gen_symbolname(),\n "output" => gen_symbolname(),\n "i" => gen_symbolname(),\n "char_code" => gen_symbolname(),\n "xor_decode" => gen_symbolname(),\n "output" => gen_symbolname(),\n "passwd" => gen_symbolname(),\n "key" => gen_symbolname(),\n "j" => gen_symbolname(),\n "docwritefn" => gen_symbolname()\n );\n // randomly create javascript function, to throw off pattern matching\n // for doc.write\n $coinflip = rand(0,1);\n $obfusc_fn = "\n function " . $symbols['docwritefn'] . "(str) {\n document.write(str);\n }";\n if ($coinflip == 0) {\n $symbols['docwritefn'] = "document.write";\n }\n $position = rand(0,3);\n return spaceify("\n <script language=\s"Javascript\s">\n " . (($coinflip && $position == 0) ? $obfusc_fn : "") . "\n function " . $symbols['base16_decode'] . "(".$symbols['string'].") {\n var " . $symbols['hex_digits'] . "= '0123456789abcdef';\n var " . $symbols['output'] . " ='';\n \n for (var ".$symbols['i']." = 0; " . $symbols['i'] . " < ".$symbols['string'].".length; " . $symbols['i'] . " += 2) {\n var " . $symbols['char_code'] ." = (" . $symbols["hex_digits"] .".indexOf(". $symbols['string'] . ".charAt(". $symbols['i'] .")) << 4)\n | (".$symbols["hex_digits"].".indexOf(".$symbols['string'].".charAt(". $symbols['i']."+1)));\n ".$symbols['output']." += String.fromCharCode(".$symbols['char_code'].");\n }\n \n return ".$symbols['output'].";\n }\n " . (($coinflip && $position == 1) ? $obfusc_fn : "") . " \n function ". $symbols['xor_decode'] . "(".$symbols['passwd'].", ".$symbols['string'].") {\n var ".$symbols['output'] ." = '';\n for (var ". $symbols['j'] ." = 0; ". $symbols['j'] ." < ".$symbols['string'].".length; ".$symbols['j']."++) {\n ".$symbols['output']." += String.fromCharCode(".$symbols['string'].".charCodeAt(".$symbols['j'].") \n ^ ".$symbols['passwd'].".charCodeAt(".$symbols['j']." % ".$symbols['passwd'].".length));\n }\n \n return ".$symbols['output'].";\n }\n " . (($coinflip && $position == 2) ? $obfusc_fn : "") . "\n \n var ".$symbols['key']." = \s"\s";\n ".$symbols['key']." = prompt(\s"Please enter your key: (The key is: $passwd)\s",\s"\s");\n " . (($coinflip && $position == 3) ? $obfusc_fn : "") . "\n ". $symbols['docwritefn'] . "(".$symbols['xor_decode'] . "(".$symbols['key'].", " . $symbols["base16_decode"] . "(\s"$xorized\s")));\n\n </script>\n ");\n}\n\n/*************************************************************/\n/* Link Check */\n/*************************************************************/\n\nfunction linkcheck($url,$method,$postval,$cookieval) {\n global $servername, $allowed_servers, $banned_servers, $banned_networks;\n // BidiX 05/03/2006\n global $user_allowed;\n\n $ok = 1;\n\n //Blank Check\n if ($url == "") {\n //No url\n error_blank();\n\n } elseif ($url == $servername) {\n //Calling itself, infinite loop\n error_loop();\n\n } else {\n\n //Get rid of any space\n $url = preg_replace("/ /i", "%20", $url);\n\n //Check if url starts with http\n preg_match("/^(.*:\s/\s/)?([^:\s/]+)/i", $url, $match);\n if (!preg_match("/^http(s?):\s/\s//i", $match[1])) { $url = "http://$url";};\n\n //Parse the url\n $urlparsed = parse_url($url);\n $host = $urlparsed['host'];\n $hostaddr = gethostbyname($host);\n\n //Check if banned_network\n if (count($banned_networks) > 0) {\n foreach ($banned_networks as $banned_net) {\n if (preg_match("/^$banned_net/", $hostaddr)) {\n $ok = 0;\n }\n }\n }\n\n //Check if banned_server\n if (count($banned_servers) > 0) {\n foreach ($banned_servers as $banned_serv) {\n $banned_ip = gethostbyname($banned_serv);\n if (preg_match("/^$banned_ip/", $hostaddr)) {\n $ok = 0;\n }\n }\n }\n\n //Check if allowed_servers\n if (count($allowed_servers) > 0) {\n $ok = 0;\n foreach ($allowed_servers as $allowed_serv) {\n // BidiX 28/02/2006\n // since ip could change for a host (cf www.lemonde.fr)\n // compare only hostname\n // $allowed_ip = gethostbyname($allowed_serv);\n // if (preg_match("/^$allowed_ip/", $hostaddr)) {\n if (preg_match("/^$allowed_serv/", $host)) {\n $ok = 1;\n }\n }\n }\n /*\n * BidiX - 05/03/2006\n * replace the $Ok test \n //Get the URL\n if ($ok == 1) {\n proxy($url,$method,$postval,$cookieval);\n } else {\n //Server is banned\n error_banned();\n }\n */\n //Get the URL\n if (($ok == 1) || ($user_allowed)) {\n proxy($url,$method,$postval,$cookieval);\n } else {\n if (!$user_allowed) {\n error_userNotAllowed();\n }\n else {\n //Server is banned\n error_banned();\n }\n }\n\n }\n \n}\n\n/*************************************************************/\n/* URL Join */\n/*************************************************************/\n//URLJoin was made possible thanks to uber-help from Catspaw!\n\nfunction urljoin($prev,$next) {\n //Don't fuck with the order of things, this was unpleasant\n\n //move $next & $prev to lowercase\n //$prev = strtolower($prev);\n //$next = strtolower($next);\n\n //Parse the url\n $urlparsed = parse_url($prev);\n //Get the scheme\n $scheme = $urlparsed['scheme']."://";\n\n\n //Strip anchor\n $prev = array_shift(split("#", $prev));\n $next = array_shift(split("#", $next));\n\n $prev = preg_replace("/\s?.*/","",$prev);\n\n //If there is nothing after the hostname, ensure there is a trailing slash\n if (count(split("/", $prev)) < 4) { \n $prev = "$prev"."/";\n }\n\n //Kick the previous filename off, so we can append other stuff\n //array_pop(split("/", $prev));\n\n $x = split("/", $prev);\n array_pop($x);\n $prev = implode("/", $x);\n\n //If the next url is ablsolute, just use it\n if (preg_match("/:\s/\s//", $next)) {\n return $next;\n }\n\n //Split by /\n $baseURL = split("/", preg_replace("/.*:\s/\s//","",$prev));\n\n //Remove blanks\n $baseURL = array_filter($baseURL, "is_blank");\n\n //If it doesnt start with a / or a . then append to url\n if ((substr("$next",0,1) != "/") && (substr("$next",0,1) != ".")) {\n return $scheme.implode("/", $baseURL)."/$next";\n }\n\n elseif ($next == "/") {\n return $scheme.array_shift($baseURL);\n }\n\n elseif (substr("$next",0,2) == "//") {\n return $scheme.substr("$next",2);\n }\n\n elseif (substr("$next",0,1) == "/") {\n return $scheme.array_shift($baseURL)."/".substr("$next",1);\n }\n\n elseif (substr("$next",0,2) == "./") {\n return $scheme.implode("/", $prev)."/".substr("$next",2);\n }\n\n else {\n\n $adders = split("/", $next);\n foreach ($adders as $m) {\n if (($m == "..") && (count($baseURL) > 1)) {\n array_pop($baseURL);\n } elseif ($m != "..") {\n array_push($baseURL, "$m");\n } \n }\n\n return $scheme.implode("/", $baseURL);\n\n }\n\n}\n\n//Blank Remove Check\nfunction is_blank($var) {\n return ($var != "");\n}\n\n/*************************************************************/\n/* Script Stripper */\n/*************************************************************/\n\n//TODO: This needs to be done right!\n\nfunction script_stripper($stuff) {\n\n //Script Tags\n $tags = array("'<script[^>]*?>.*?</script>'si",\n "'<link[^>]*?>'si",\n "'<meta http-equiv[^>]*?>'si",\n "'<applet[^>]*?>.*?</applet>'si",\n "'<object[^>]*?>.*?</object>'si",\n "'<style[^>]*?>.*?</style>'si");\n\n $stuff = preg_replace($tags, "", $stuff);\n\n /*\n //JS event handlers found inside html tags\n //Takes too long if using more than 5 tags\n $intags = array(/<(\sw*\ss)(.*?)(style=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onClick=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onload=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onMouseOut=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onMouseOver=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onSubmit=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onChange=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onFocus=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onBlur=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onDblClick=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onDragDrop=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onError=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onKeyDown=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onKeyPress=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onKeyUp=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onMouseDown=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onMouseUp=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onMove=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onReset=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onResize=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onSelect=['\s"].*?['\s"])/si",\n "/<(\sw*\ss)(.*?)(onUnload=['\s"].*?['\s"])/si");\n\n $replacement = "<\s$1\s$2";\n $stuff = preg_replace($intags, $replacement, $stuff);\n */\n\n return $stuff;\n}\n\n//Fix postnuke's &amp;\nfunction fixpostnuke($stuff) {\n $stuff = preg_replace("/&amp;/si", "&", $stuff);\n return $stuff;\n}\n\n/*************************************************************/\n/* Pad Images */\n/*************************************************************/\nfunction padimages($img,$mime) {\n\n //Get GD info\n $gdinfo = gd_info();\n $image_mime = array();\n\n foreach ($gdinfo as $k => $v ) {\n if (($k == "JPG Support") && ($v)) {\n array_push($image_mime, "image/jpeg");\n }\n if (($k == "PNG Support") && ($v)) {\n array_push($image_mime, "image/png");\n }\n //Support for GIF was restored in gd 2.0.28\n if (($k == "GIF Create Support") && ($v)) {\n array_push($image_mime, "image/gif");\n }\n }\n\n if (in_array($mime, $image_mime)) {\n $imgpad = str_repeat(decbin(rand(1,100)), rand(1,10));\n $src_img = imagecreatefromstring($img);\n $text_color = imagecolorallocate($src_img, 0, 0, 255);\n imagestring($src_img, 1, 5, 5, $imgpad, $text_color);\n\n if (preg_match("/image\s/gif/i", $mime)) {\n imagegif($src_img);\n }\n\n if (preg_match("/image\s/jpeg/i", $mime)) {\n imagejpeg($src_img);\n }\n\n if (preg_match("/image\s/png/i", $mime)) {\n imagepng($src_img);\n }\n\n imagedestroy($src_img);\n\n } else {\n\n echo $img;\n\n }\n\n}\n\n/*************************************************************/\n/* Proxy Socket */\n/*************************************************************/\nfunction proxysocket($url,$method,$postval,$cookieval) {\n global $server_mode, $serverpath, $url_obfuscation, $version;\n\n $headers = "";\n $html = "";\n\n //Parse the url\n $urlparsed = parse_url($url);\n $scheme = $urlparsed['scheme'];\n $host = $urlparsed['host'];\n\n if(count($urlparsed) > 2) {\n //It parsed a path\n $path = $urlparsed['path'];\n } else {\n $path = "/";\n }\n\n //Strip _underscore that parse_url sometimes \n //puts on the end of the path\n if (substr($path, -1) == '_') {\n $path = substr_replace($path, "", strlen($path)-1, strlen($path));\n }\n\n //Check the path, is there isn't one its /\n if ($path == "") {\n $path = "/";\n }\n\n\n //If phproxy is access through http, but is requesting https\n //then warn the user that the encrypted text is transfered in plaintext\n if (($server_mode == "http") && ($scheme == "https")) {\n error_crypt2plain();\n exit();\n }\n\n\n //Construct the link path\n $link = '';\n if (isset($urlparsed['query'])) {\n $link .= "?$urlparsed[query]";\n }\n if (isset($urlparsed['fragment'])) {\n $link .= "#$urlparsed[fragment]";\n }\n $link = $path.$link;\n\n //Get the IP\n //fsockopen cannot handle domains with _underscores ?\n $ip = gethostbyname($host);\n\n if ($scheme == "https") {\n $fp = fsockopen("ssl://".$ip, 443, $errno, $errstr, 30);\n } else {\n $fp = fsockopen($ip, 80, $errno, $errstr, 30);\n }\n if (!$fp) {\n echo "$errstr ($errno)\sn";\n } else {\n\n if ($method == "POST") {\n $length = strlen($postval);\n $out = "POST $path HTTP/1.0\sr\sn";\n $out .= "Host: $host\sr\sn";\n $out .= "User-Agent: Mozilla/5.0 (compatible; pHproxy/$version)\sr\sn";\n $out .= "Referer: $url\sr\sn";\n $out .= "Content-Type: application/x-www-form-urlencoded\sr\sn";\n $out .= "Content-Length: $length\sr\sn";\n $out .= "\sr\sn";\n $out .= $postval;\n\n } else {\n $out = "GET $link HTTP/1.0\sr\sn";\n $out .= "Host: $host\sr\sn";\n $out .= "User-Agent: Mozilla/5.0 (compatible; pHproxy/$version)\sr\sn";\n $out .= "Referer: $url\sr\sn";\n if (count($cookieval) > 0) {\n foreach ($cookieval as $cookie) {\n $out .= "Cookie: $cookie\sr\sn";\n }\n }\n $out .= "Connection: Close\sr\sn\sr\sn";\n }\n\n fwrite($fp, $out);\n $fheader = 1;\n $headers = "";\n while (!feof($fp)) {\n $line = fgets($fp, 128);\n //Grab the headers\n if ($fheader == 1) {\n\n if ($line == "\sr\sn") { \n $fheader = 0;\n } else {\n //Assemble the headers\n $headers .= $line;\n }\n\n } else {\n //Grab the page content\n $html .= $line;\n }\n }\n\n fclose($fp);\n }\n\n //Return headers & html\n return array($headers, $html);\n}\n\n/*************************************************************/\n/* Process Headers */\n/*************************************************************/\nfunction processheaders($url,$headers) {\n global $serverpath, $url_obfuscation, $media_mode, $no_cookies;\n\n //Place holder for headers to process and return\n $location = "";\n $content_type = "";\n $content_disposition = "";\n $set_cookie = "";\n\n //Parse the url\n $urlparsed = parse_url($url);\n $scheme = $urlparsed['scheme'];\n $host = $urlparsed['host'];\n \n //Split headers into array\n $headers = preg_split("/\sn/", $headers);\n\n //Start processing the headers\n foreach ($headers as $headerline) {\n\n //Location header (302 re-direct)\n if (preg_match("/Location: (.*)/i", $headerline)) {\n\n //Some 302 redirects use just the path, need to construct a full url\n if (!preg_match("/[Ll]ocation: $scheme/i", $headerline)) {\n $fullurl = $scheme."://".$host."/";\n $headerline = preg_replace("/Location: (.*)/ie","'Location: $fullurl'.'\s\s1'",$headerline);\n }\n \n if ($url_obfuscation == 0) {\n\n $location = preg_replace("/Location: (.*)/ie","'Location: $serverpath'.'\s\s1'",$headerline);\n\n } else {\n \n $location = preg_replace("/Location: (.*)/ie","'Location: $serverpath'.obfuscate('\s\s1')",$headerline);\n \n }\n\n }\n \n // Content-Type\n //Text Mimes\n $text_mime = array("text/plain",\n "text/html",\n "text/css");\n \n if (preg_match("/Content-Type: (\sw+\s/\sw+)(.*)/i", $headerline, $matches)) {\n \n $mime = $matches[1];\n\n if (in_array($mime, $text_mime)) {\n\n //Yay text\n $content_type = $headerline;\n \n } else {\n //media_mode is 2 (all), images are handled in proxy()\n if ($media_mode == 2) {\n //Get the name of the file\n $filearray = preg_split("/\s//", $url);\n $output_file = $filearray[count($filearray) -1];\n $content_type = $headerline;\n $content_disposition = "Content-Disposition: attachment; filename=".$output_file;\n } else {\n //Error\n error_mime();\n exit();\n }\n }\n\n }\n\n //Cookies\n if (!$no_cookies) {\n if (preg_match("/Set-Cookie: (.*)/i", $headerline)) {\n //Append the real host to the val, split with |\n if ($url_obfuscation > 0) {\n $set_cookie = preg_replace("/Set-Cookie: (.*?=.*?)(;)(.*)/ie",\n "'Set-Cookie: '.'\s\s1'.'|'.obfuscate('.$host').'\s\s2\s\s3'",$headerline);\n } else {\n $set_cookie = preg_replace("/Set-Cookie: (.*?=.*?)(;)(.*)/ie",\n "'Set-Cookie: '.'\s\s1'.'|.$host'.'\s\s2\s\s3'",$headerline);\n }\n //Get rid of the real domain if there is one\n $set_cookie = preg_replace("/Set-Cookie: (.*?)(domain=.*)/ie",\n "'Set-Cookie: '.'\s\s1'",$set_cookie);\n }\n }\n\n //Process more headers\n\n }\n\n return array($location, $content_type, $content_disposition, $set_cookie);\n\n}\n\n/*************************************************************/\n/* Proxify HTML */\n/*************************************************************/\n\nfunction proxifyhtml($url,$html) {\n global $servername, $serverpath, $serverpost,\n $script_stripper, $getprefix, $postprefix,\n $passwd, $xormode;\n\n //Proxify the HTML\n //Fix postnuke's &amp;\n $url_tags = "href=|url=|src=|background=|code=|codebase=|archive=|data=|usemap=";\n $html = preg_replace("/(<[^>]*)($url_tags)(['\s"]?)(.*?)(['\s" >])/ie",\n "'\s\s1\s\s2\s\s3'.'$serverpath'.obfuscate(urljoin('$url',fixpostnuke('\s\s4'))).'\s\s5'", $html);\n\n\n //Proxify weird css tag\n $html = preg_replace("/(<style type=\s"text\s/css\s">@import url\s(\s")(.*?)(\s"\s); <\s/style>)/ie",\n "'\s\s1'.'$serverpath'.obfuscate(urljoin('$url','\s\s2')).'\s\s3'", $html);\n\n //Proxify if method=post\n //Warning: nasty hack to get post working!\n if (preg_match("/(<[^>]*)method=(['\s"]?)post(['\s"]?)/ie", $html)) {\n\n //We need the joined post url\n if (preg_match("/(<[^>]*)(action=)(['\s"]?)(.*?)(['\s" >])/ie", $html, $matches)) {\n $posturl = "<input type=hidden name=$postprefix value=".obfuscate(urljoin($url,$matches[4]))."></form>";\n $html = preg_replace("/<\s/form>/i", $posturl, $html);\n }\n \n //proxify the action\n $html = preg_replace("/(<[^>]*)(action=)(['\s"]?)(.*?)(['\s" >])/ie",\n "'\s\s1\s\s2\s\s3'.'$servername'.'\s\s5'", $html);\n \n } else {\n \n //Fucking forms that are get not post, like google\n //This is outright nasty too\n //We need the joined post url\n if (preg_match("/(<[^>]*)(action=)(['\s"]?)(.*?)(['\s" >])/ie", $html, $matches)) {\n $geturl = "<input type=hidden name=$getprefix value=".obfuscate(urljoin($url,$matches[4]))."></form>";\n $html = preg_replace("/<\s/form>/i", $geturl, $html);\n }\n\n //Proxify the action\n $html = preg_replace("/(<[^>]*)(action=)(['\s"]?)(.*?)(['\s" >])/ie",\n "'\s\s1\s\s2\s\s3'.'$servername'.'\s\s5'", $html);\n }\n \n // Strip some scripts?\n if ($script_stripper > 0) {\n $html = script_stripper($html);\n }\n\n //Check for magic quotes\n if (!get_magic_quotes_gpc()) {\n //\n } else {\n $html = stripslashes($html);\n }\n //Add Location Bar\n $html = location($url).$html;\n \n //Check for XOR MODE\n if ($xormode == 1) {\n $xorized = xorcist($html, $passwd);\n $html = xorjs($xorized,$passwd);\n }\n\n return $html;\n}\n\n/*************************************************************/\n/* Main Proxy function */\n/*************************************************************/\n\nfunction proxy($url,$method,$postval,$cookieval) {\n global $server_mode, $media_mode, $version, $pad_images;\n \n ini_set("user_agent","Mozilla/5.0 (compatible) pHproxy/$version");\n\n //If its not an image, we want to suppress the error message\n if (list($width, $height, $type, $attr) = @ getimagesize($url)) {\n //Check media_mode\n if ($media_mode > 0) {\n\n //Parse the url\n $urlparsed = parse_url($url);\n $scheme = $urlparsed['scheme'];\n \n //If phproxy is access through http, but is requesting https\n //then warn the user that the encrypted text is transfered in plaintext\n if (($server_mode == "http") && ($scheme == "https")) {\n error_crypt2plain();\n exit();\n }\n $img = "";\n $size = getimagesize($url);\n $mime = $size['mime'];\n $fp=fopen($url, "rb");\n if ($size && $fp) {\n header("Content-type: $mime");\n while (!feof($fp)) {\n $img .= fgets($fp, 128);\n }\n fclose($fp);\n\n }\n\n //Pad Images\n if ($pad_images) {\n //If GD do it\n if(function_exists("gd_info")){\n padimages($img,$mime);\n } else {\n //Error (No GD)\n error_gd();\n exit();\n }\n\n } else {\n //Image pad is off\n //Just send the image\n echo $img;\n\n }\n\n\n } else {\n //Error (Text Only Mode)\n error_mime();\n exit();\n }\n\n } else {\n\n //Connect via proxy socket\n $result = proxysocket($url,$method,$postval,$cookieval);\n\n //Headers & HTML\n $headers = $result[0];\n $html = $result[1];\n\n //Process & print headers\n $processedheaders = processheaders($url, $headers);\n $isfile = 0;\n foreach($processedheaders as $pheader) {\n \n //If the header is Content-Disposition its a file to be\n //downloaded, we don't want to proxify its contents\n if (preg_match("/^Content-Disposition: (.*)/i", $pheader)) {\n $isfile = 1;\n }\n\n if ($pheader != "") {\n header($pheader);\n }\n \n }\n\n if (($isfile != 0) || (!$mustProxifyHtml)) {\n //If its a file, don't proxify contents\n echo $html;\n } else {\n //Process & print the html\n echo proxifyhtml($url, $html);\n }\n \n }\n\n}\n\n?>\n<?php\n//}}}\n?>\n
#!/usr/bin/ruby\n# store.cgi - store command\n# version : 1.0.1 - 26/06/2006 - BidiX@BidiX.info\n# Copyright (c) BidiX@BidiX.info 2006\n\n\nCONFIG = {\n :users => {\n 'UserName1'=>'Password1', \n 'UserName2'=>'Password2', \n 'UserName3'=>'Password3'\n },\n :authenticateUser => true,\n :backupExistingFile => true,\n :withUploadDir => true,\n :permittedFileNames => false # %w[index.html index.xml], # false means any filename\n}\n#/%\n# require 'storer' \n\n# storer.rb could be a separate file\n#---------------------------------------\n#\n# storer.rb - store a file on a webserver\n# version : 1.0.1 - 27/06/2006 - BidiX@BidiX.info\n# \n# see : \n# http://tiddlywiki.bidi.info/#UploadPlugin for détails on uploading files\n# usage : \n# POST \n# UploadPlugin[backupDir=<backupdir>;user=<user>;password=<password>;]\n# userfile <file>\n# GET\n# \n# Revision history\n# V 1.0.1 - 27/06/2006 : \n# improvements by SimonBaird\n# :permittedFileNames\n# rescue clause improvement\n# v 1.0.0 - 26/06/2006 : \n# version compatible with UploadPlugin V 3.3.2\n#\n# Copyright (c) BidiX@BidiX.info 2006\n\n\nrequire 'cgi'\nrequire 'fileutils'\nrequire 'date'\n\nclass Storer < CGI\n \n Storer::PAGE = \n <<-EOP\n <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> \n <html>\n <head>\n <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >\n <title>BidiX.info - TiddlyWiki UploadPlugin - Store script</title>\n </head>\n <body>\n <p>\n <p>store.cgi V 1.0.1\n <p>BidiX@BidiX.info\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p align="center">This page is designed to upload a <a href="http://www.tiddlywiki.com/">TiddlyWiki<a>.</p>\n <p align="center">for details see : <a href="http://tiddlywiki.bidix.info/#HowToUpload">TiddlyWiki.BidiX.info/#HowToUpload<a>.</p> \n </body>\n </html>\n EOP\n \n def backup()\n @userfile.original_filename.sub(/([^\s.]+).(.*)/, ' ')\n backupfile = @options['backupDir']+$1+DateTime.now.strftime('.%Y%m%d.%H%M%S0000.')+$2\n FileUtils.mv(@destfile, backupfile)\n end\n \n def getOptions()\n uploadOptions = params['UploadPlugin'].first\n @options = {}\n if uploadOptions \n uploadOptions.read.split(';').each do |element| \n (key,value) = element.split('=') \n @options[key] = value\n end\n end\n #puts "Content-Type: text/plain\sn\sn"\n #@options.each_key { |key| puts("#{key}=#{@options[key]}") }\n end\n\n def initialize(config)\n super('')\n @config = config\n end\n \n def mkDir(dirType)\n if dir = @options[dirType]\n FileUtils.mkdir_p(dir, :mode => 0755)\n if dir.rindex('/') != dir.length-1 # dir end with / \n @options[dirType] += '/'\n end\n else\n @options[dirType] = './'\n end\n end\n\n def outputPage()\n out() {Storer::PAGE}\n end\n \n def respond()\n if (request_method == 'POST')\n getOptions()\n if @config[:authenticateUser]\n if @options['user'] && @options['password'] && (@config[:users][@options['user']] == @options['password'])\n store()\n else\n out() {"Error : Username or Password do not match \sn"}\n out() {"UserName : #{@options['user']} Password : #{@options['password']}"}\n end\n else\n store()\n end\n else\n outputPage()\n end\n end \n \n\n \n def store()\n begin\n @userfile = params['userfile'].first \n # here we can test or set filename or file suffix\n\n @destfile = @userfile.original_filename\n if @config[:permittedFileNames] && !@config[:permittedFileNames].include?(@destfile)\n raise "filename @destfile not permitted"\n end\n\n if @config[:withUploadDir] \n mkDir('uploaddir') \n @destfile = @options['uploaddir'] + @destfile\n end\n if @config[:backupExistingFile] \n mkDir('backupDir')\n if File.exists?(@destfile)\n backup()\n end\n end\n\n f = File.open(@destfile,'w').write(@userfile.read)\n out() {"0 - File successfully loaded in #{@destfile}\sn"}\n rescue Exception => e\n out() {"Error in store : " + e}\n end\n end\nend\n#---------------------------------------\nstorer = Storer.new(CONFIG)\nstorer.respond\n# %/\n
<?php\n/***\n! User settings\nEdit these lines according to your need\n***/\n//{{{\n$AUTHENTICATE_USER = true; // true | false\n$USERS = array(\n 'UserName1'=>'Password1', \n 'UserName2'=>'Password2', \n 'UserName3'=>'Password3'); // set usernames and strong passwords\n$DEBUG = false; // true | false\n//}}}\n/***\n!Code\nNo change needed under\n***/\n//{{{\n\n/***\n * store.php - upload a file in this directory\n * version :1.4.1 - 15/03/2006 - BidiX@BidiX.info\n * \n * see : \n * http://tiddlywiki.bidi.info/#UploadPlugin for usage\n * http://www.php.net/manual/en/features.file-upload.php \n * for détails on uploading files\n * usage : \n * POST \n * UploadPlugin[backupDir=<backupdir>;user=<user>;password=<password>;uploadir=<uploaddir>]\n * userfile <file>\n * GET\n *\n * Revision history\n *v 1.4.1 - 15/03/2006\n * add chmo 0664 on the uploadedFile\n * v 1.4 - 23/02/2006 :\n * add uploaddir option : a path for the uploaded file relative to the current directory\n * backupdir is a relative path\n * make recusively directories if necessary for backupDir and uploadDir\n * v 1.3 - 17/02/2006 :\n * presence and value of user are checked with $USERS Array (thanks to PauloSoares)\n * v 1.2 - 12/02/2006 : \n * POST \n * UploadPlugin[backupDir=<backupdir>;user=<user>;password=<password>;]\n * userfile <file>\n* if $AUTHENTICATE_USER\n * presence and value of user and password are checked with \n * $USER and $PASSWORD\n * v 1.1 - 23/12/2005 : \n * POST UploadPlugin[backupDir=<backupdir>] userfile <file>\n * v 1.0 - 12/12/2005 : \n * POST userfile <file>\n *\n * Copyright (c) BidiX@BidiX.info 2005-2006\n ***/\n//}}}\n\n//{{{\n\nif ($_SERVER['REQUEST_METHOD'] == 'GET') {\n /*\n * GET Request\n */\n ?>\n <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n <html>\n <head>\n <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >\n <title>BidiX.info - TiddlyWiki UploadPlugin - Store script</title>\n </head>\n <body>\n <p>\n <p>store.php V 1.4\n <p>BidiX@BidiX.info\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p align="center">This page is designed to upload a <a href="http://www.tiddlywiki.com/">TiddlyWiki<a>.</p>\n <p align="center">for details see : <a href="http://TiddlyWiki.bidix.info/#HowToUpload">TiddlyWiki.bidix.info/#HowToUpload<a>.</p> \n </body>\n </html>\n <?php\n}\nelse {\n /*\n * POST Request\n */\n \n // Recursive mkdir\n function mkdirs($dir) {\n if( is_null($dir) || $dir === "" ){\n return false;\n }\n if( is_dir($dir) || $dir === "/" ){\n return true;\n }\n if( mkdirs(dirname($dir)) ){\n return mkdir($dir);\n }\n return false;\n }\n \n // var definitions\n $uploadDir = './';\n $uploadDirError = false;\n $backupError = false;\n $optionStr = $_POST['UploadPlugin'];\n $optionArr=explode(';',$optionStr);\n $options = array();\n $backupFilename = '';\n $filename = $_FILES['userfile']['name'];\n \n // get options\n foreach($optionArr as $o) {\n list($key, $value) = split('=', $o);\n $options[$key] = $value;\n }\n \n // authenticate User\n if ((!$AUTHENTICATE_USER) \n || (($options['user']) && ($options['password']) && ($USERS[$options['user']] == $options['password']))) {\n // make uploadDir\n if ($options['uploaddir']) {\n if (! is_dir($options['uploaddir'])) {\n mkdirs($options['uploaddir']);\n }\n if (! is_dir($options['uploaddir'])) {\n $uploadDirError = "uploadDir mkdir error";\n }\n $uploadDir = $uploadDir . $options['uploaddir'];\n if ($uploadDir{strlen($uploadDir)-1} != '/') {\n $uploadDir = $uploadDir . '/';\n }\n }\n if (!$uploadDirError) {\n // backup existing file\n if (file_exists($uploadDir . $_FILES['userfile']['name']) && ($options['backupDir'])) {\n if (! is_dir($options['backupDir'])) {\n mkdirs($options['backupDir']);\n if (! is_dir($options['backupDir'])) {\n $backupError = "backup mkdir error";\n }\n }\n $backupFilename = $options['backupDir'].'/'.substr($filename, 0, strpos($filename, '.'))\n .date('.Ymd.His').substr($filename,strpos($filename,'.'));\n $filename = $uploadDir . $_FILES['userfile']['name'];\n rename($filename, $backupFilename) or ($backupError = "rename error");\n }\n // move uploaded file to to uploadDir\n if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadDir . $_FILES['userfile']['name'])) {\n chmod($uploadDir . $_FILES['userfile']['name'], 0644);\n if (!$backupError) {\n if($DEBUG) {\n echo "debug mode \sn\sn";\n }\n echo "0 - File successfully loaded in " .$uploadDir . $_FILES['userfile']['name']. "\sn";\n if ($backupFilename)\n echo "backupFile=$backupFilename;\sn";\n } else {\n echo "BackupError : $backupError - File successfully loaded in " .$uploadDir . $_FILES['userfile']['name']. "\sn";\n }\n } \n else {\n echo "Error : " . $_FILES['error']." - File NOT uploaded !\sn";\n }\n }\n else {\n echo "UploadDirError : $uploadDirError - File NOT uploaded !\sn";\n }\n }\n else {\n echo "Error : UserName or Password do not match \sn";\n echo "UserName : [".$options['user']. "] Password : [". $options['password'] . "]\sn";\n }\n if ($DEBUG) {\n echo ("\snHere is some debugging info : \sn");\n echo("\s$filename : $filename \sn");\n echo("\s$backupFilename : $backupFilename \sn");\n print ("\s$_FILES : \sn");\n print_r($_FILES);\n print ("\s$options : \sn");\n print_r($options);\n }\n}\n//}}}\n?>
With <<tag systemConfig>>, tiddlers customized for the BidiXTW's look and feel
<script label="toggle Header">\n var c=document.getElementById('header'); \n c.style.display=c.style.display=="none"?"block":"none";\n</script>