Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
/***
|''Name:''|404Plugin|
|''Description:''||
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#404Plugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0 pre-release|
|''Date:''||
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
!!Usage:
*
***/
// /%
//!BEGIN-PLUGIN-CODE
config.views.wikified.defaultText= "{{fourohfour{\nThe page '%0' doesn't exist.\n\n Try browsing or searching for what you were looking for.\n}}}";
setStylesheet(".fourohfour {text-align:center; font-family:'Lucida Grande', Verdana, Sans-Serif; font-size:1.2em; font-weight:bold; font-style:normal;}","404Styles");
//!END-PLUGIN-CODE
// %/
/***
|''Name:''|ActiveMenuLinksPlugin|
|''Description:''||
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#ActiveMenuLinksPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0 pre-release|
|''Date:''||
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
!!Usage:
*
***/
// /%
//!BEGIN-PLUGIN-CODE
Story.prototype.refreshTiddler_activelink = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function (title,template,force)
{
var theTiddler = Story.prototype.refreshTiddler_activelink.apply(this,arguments);
if (!theTiddler)
return theTiddler;
this.highlightActiveLinks();
return theTiddler;
}
Story.prototype.highlightActiveLinks = function()
{
var menu = document.getElementById("menu");
var links = menu.getElementsByTagName("a");
for (var i=0; i<links.length; i++){
if (!links[i].getAttribute("tiddlyLink"))
return;
if (document.getElementById(this.idPrefix+(links[i].getAttribute("tiddlylink"))))
addClass(links[i],"activeLink");
else
removeClass(links[i],"activeLink");
}
}
Story.prototype.closeTiddler_activelink = Story.prototype.closeTiddler;
Story.prototype.closeTiddler = function(title,animate,unused)
{
this.closeTiddler_activelink.apply(this,arguments);
this.highlightActiveLinks();
}
//!END-PLUGIN-CODE
// %/
|>|!Layout Tiddlers|
|Name:|Admin|
|~PageTemplate:|AdminPageTemplate|
|~StyleSheet:|AdminStyleSheet|
|~ViewTemplate:|AdminViewTemplate|
|~EditTemplate:|AdminEditTemplate|
|>|!Configuration Options|
|readOnly:|false|
|~SinglePageMode:|false|
|showBackstage:|true|
<!--{{{-->
<div id="stickybod">
<div id="header">
<div id="pokLogin" refresh="content" force="true" tiddler="Login"></div>
<div id="headerTitle" refresh="content" force="true" tiddler="SiteTitle"></div>
<div id="lang" refresh="content" force="true" tiddler="lang"></div>
<!--
<div id="headerImage"></div>
-->
<div id="menu" refresh="content" force="true" tiddler="MainMenu">
</div>
</div>
<div id="myDisplayArea">
<div id='mysidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id="messageArea"></div>
<div id="tiddlerDisplay"></div>
</div>
<div id="push"></div>
</div>
<div id="stickyfooter">
<div id="footer" refresh="content" force="true" tiddler="Footer"></div>
</div>
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #80CF82
PrimaryLight: #20AB23
PrimaryMid: #009e03
PrimaryDark: #17691c
SecondaryPale: #DEFAB9
SecondaryLight: #BBF471
SecondaryMid: #5EC93B
SecondaryDark: #009e03
TertiarySuperPale: #f7f7f7
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #444
Error: #f88
{{{
PokerSource is a large system comprised of a number of components:
jpoker, poker-network, poker-engine, pypoker-eval, poker-eval
Below the copyright and license information for all components.
jpoker Copyright Info
Copyright 2008,2009 Loic Dachary <mailto:loic@dachary.org>
Copyright 2007,2008,2009 Johan Euphrosine <mailto:proppy@aminche.com>
Copyright 2008 Saq Imtiaz <mailto:lewcid@gmail.com>
jpoker home is at http://jpoker.aminche.com/
jpoker runs on this web browser and is Free Software. You may use
jpoker to run a business without asking the authors permissions. You
may give a copy to your friends. However, the authors do not want
jpoker to be used with proprietary software.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
jpoker includes a number of smaller components from others:
Copyright for:
js/jquery.dynDateTime.js
(c) 2008 thetoolman@gmail.com
Licensed under LGPLv3+
Copyright for:
mo2json.py jpoker/jquery.gettext.js jpoker/jquery.printf.js
(c) 2008 Sabin Iacob (m0n5t3r) <iacobs@m0n5t3r.info>
Licensed under GPLv3+
Copyright for:
jpoker/jquery.js jpoker/jquery.ajaxQueue.js
(c) 2007 John Resig (jquery.com)
Licensed under MIT
Copyright for:
jpoker/jquery.tablesorter.js
jpoker/jquery.tablesorter.pager.js
(c) 2007 Christian Bach
(c) 2008 Johan Euphrosine
Dual licensed under the MIT and GPL licenses:
Copyright for:
jpoker/jquery.form.js
Dual licensed under the MIT and GPL licenses
Copyright for:
tiddlywiki as found in jpoker/poker.html
(c) UnaMesa Association 2004-2007
Licensed under Modified BSD
Copyright for:
jpoker/index-fr/FrenchTranslationPlugin.tiddler
(c) 2008 ocalTW@gmail.com
Creative Commons Attribution-ShareAlike 3.0
Copyright for:
jpoker/index/404Plugin.js
jpoker/index/ActiveMenuLinksPlugin.js
jpoker/index/PublisherPluginBeta.js
jpoker/index/SplashScreenPlugin.js
jpoker/index/TiddlerSubtitleTweak.js
jpoker/index/TiddlyLightBoxPlugin.js
(c) 2006, 2007, 2008 Saq Imtiaz <lewcid@gmail.com>
Creative Commons Attribution-ShareAlike 3.0
GPLv3+
Copyright for:
jpoker/index/WebDavPlugin.js
(c) 2007, 2008 Saq Imtiaz <lewcid@gmail.com>
Loic Dachary <loic@dachary.org>
Creative Commons Attribution-ShareAlike 3.0
GPLv3+
Copyright for:
jpoker/index/GenerateRssByTagPlugin.js
(c) 2007 BidiX@bidix.info
Licensed under Modified BSD
Public domain:
http://www.JSON.org/js.html 2008 jpoker/js/json2.js
#########################################################################
poker-network Copyright Info
Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009 Loic Dachary <loic@dachary.org>
Copyright (C) 2008 Johan Euphrosine <proppy@aminche.com>
Copyright (C) 2008 Bradley M. Kuhn <bkuhn@ebb.org>
Copyright (C) 2004, 2005, 2006 Mekensleep <licensing@mekensleep.com>
24 rue vieille du temple, 75004 Paris
poker-network's license gives you freedom; you can copy, convey,
propagate, redistribute and/or modify this program under the terms of
the GNU Affero General Public License (AGPL) as published by the Free
Software Foundation (FSF), either version 3 of the License, or (at your
option) any later version of the AGPL published by the FSF.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program in a file in the toplevel directory called
"AGPLv3". If not, see <http://www.gnu.org/licenses/>.
Note that the AGPLv3 entitles you to the complete and correpsonding
source code of the running instance of poker-network that you are using.
You should find a link to that source in the site where you used
PokerSource's poker-network. If you did not find such a link, please
contact the copyright holders above.
Additional copyright holders on smaller parts of poker-network:
Licensed under AGPLv3-or-later:
Copyright (C) 2006 Jerome Jeannin <griim.work@gmail.com>
# Jerome's copyrights only in ./config directory for build system
Licensed AGPLv3-or-later
Licensed under GPLv3-or-later:
Copyright (C) 1993-2006, Free Software Foundation, Inc.
# FSF copyrights appear only in the ./config directory for the build system
Copyright (C) 2007 Miguel Figueiredo <elmig@debianpt.org>
# Miguel's copyrights appear only in ./debian/po/pt.po
Copyright (C) Helge Kreutzmann <debian@helgefjell.de>, 2007.
# Helge's copyrights appear only in ./debian/po/de.po
#########################################################################
poker-engine Copyright Info
Copyright (C) 2006, 2007, 2008, 2009 Loic Dachary <loic@dachary.org>
Copyright (C) 2008 Bradley M. Kuhn <bkuhn@ebb.org>
Copyright (C) 2004, 2005, 2006 Mekensleep <licensing@mekensleep.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#########################################################################
pypoker-eval Copyright Info
Copyright (C) 2007, 2008, 2009 Loic Dachary <loic@dachary.org>
Copyright (C) 2004, 2005, 2006 Mekensleep <licensing@mekensleep.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#########################################################################
poker-eval Copyright Info
Copyright (C) 1993-2006 Brian Goetz <brian@quiotix.com>
Copyright (C) 1993-1999 Clifford T. Matthews
Copyright (C) 1993-1999 Keith Miyake
Copyright (C) 1999-2006 Michael Maurer <mjmaurer@yahoo.com>
Copyright (C) 2005-2009 Loic Dachary <loic@dachary.org>
Copyright (C) 2004-2006 Mekensleep <licensing@mekensleep.com>
Copyright (C) 2006 Tim Showalter <tjs@psaux.com>
This program gives you software freedom; you can copy, convey,
propagate, redistribute and/or modify this program under the terms of
the GNU General Public License (GPL) as published by the Free Software
Foundation (FSF), either version 3 of the License, or (at your option)
any later version of the GPL published by the FSF.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program in a file in the toplevel directory called "GPLv3".
If not, see <http://www.gnu.org/licenses/>.
}}}
/***
|''Name:''|CryptoFunctionsPlugin|
|''Description:''|Support for cryptographic functions|
***/
//{{{
if(!version.extensions.CryptoFunctionsPlugin) {
version.extensions.CryptoFunctionsPlugin = {installed:true};
//--
//-- Crypto functions and associated conversion routines
//--
// Crypto "namespace"
function Crypto() {}
// Convert a string to an array of big-endian 32-bit words
Crypto.strToBe32s = function(str)
{
var be = Array();
var len = Math.floor(str.length/4);
var i, j;
for(i=0, j=0; i<len; i++, j+=4) {
be[i] = ((str.charCodeAt(j)&0xff) << 24)|((str.charCodeAt(j+1)&0xff) << 16)|((str.charCodeAt(j+2)&0xff) << 8)|(str.charCodeAt(j+3)&0xff);
}
while (j<str.length) {
be[j>>2] |= (str.charCodeAt(j)&0xff)<<(24-(j*8)%32);
j++;
}
return be;
};
// Convert an array of big-endian 32-bit words to a string
Crypto.be32sToStr = function(be)
{
var str = "";
for(var i=0;i<be.length*32;i+=8)
str += String.fromCharCode((be[i>>5]>>>(24-i%32)) & 0xff);
return str;
};
// Convert an array of big-endian 32-bit words to a hex string
Crypto.be32sToHex = function(be)
{
var hex = "0123456789ABCDEF";
var str = "";
for(var i=0;i<be.length*4;i++)
str += hex.charAt((be[i>>2]>>((3-i%4)*8+4))&0xF) + hex.charAt((be[i>>2]>>((3-i%4)*8))&0xF);
return str;
};
// Return, in hex, the SHA-1 hash of a string
Crypto.hexSha1Str = function(str)
{
return Crypto.be32sToHex(Crypto.sha1Str(str));
};
// Return the SHA-1 hash of a string
Crypto.sha1Str = function(str)
{
return Crypto.sha1(Crypto.strToBe32s(str),str.length);
};
// Calculate the SHA-1 hash of an array of blen bytes of big-endian 32-bit words
Crypto.sha1 = function(x,blen)
{
// Add 32-bit integers, wrapping at 32 bits
add32 = function(a,b)
{
var lsw = (a&0xFFFF)+(b&0xFFFF);
var msw = (a>>16)+(b>>16)+(lsw>>16);
return (msw<<16)|(lsw&0xFFFF);
};
// Add five 32-bit integers, wrapping at 32 bits
add32x5 = function(a,b,c,d,e)
{
var lsw = (a&0xFFFF)+(b&0xFFFF)+(c&0xFFFF)+(d&0xFFFF)+(e&0xFFFF);
var msw = (a>>16)+(b>>16)+(c>>16)+(d>>16)+(e>>16)+(lsw>>16);
return (msw<<16)|(lsw&0xFFFF);
};
// Bitwise rotate left a 32-bit integer by 1 bit
rol32 = function(n)
{
return (n>>>31)|(n<<1);
};
var len = blen*8;
// Append padding so length in bits is 448 mod 512
x[len>>5] |= 0x80 << (24-len%32);
// Append length
x[((len+64>>9)<<4)+15] = len;
var w = Array(80);
var k1 = 0x5A827999;
var k2 = 0x6ED9EBA1;
var k3 = 0x8F1BBCDC;
var k4 = 0xCA62C1D6;
var h0 = 0x67452301;
var h1 = 0xEFCDAB89;
var h2 = 0x98BADCFE;
var h3 = 0x10325476;
var h4 = 0xC3D2E1F0;
for(var i=0;i<x.length;i+=16) {
var j,t;
var a = h0;
var b = h1;
var c = h2;
var d = h3;
var e = h4;
for(j = 0;j<16;j++) {
w[j] = x[i+j];
t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=16;j<20;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=20;j<40;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k2);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=40;j<60;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),(b&c)|(d&(b|c)),w[j],k3);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=60;j<80;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k4);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
h0 = add32(h0,a);
h1 = add32(h1,b);
h2 = add32(h2,c);
h3 = add32(h3,d);
h4 = add32(h4,e);
}
return Array(h0,h1,h2,h3,h4);
};
}
//}}}
/***
|''Name:''|DeprecatedFunctionsPlugin|
|''Description:''|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};
//--
//-- Deprecated code
//--
// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)
{
w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);
};
// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
{
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
if(config.browser.isIE)
text = text.replace(/\n/g,"\r");
createTiddlyElement(w.output,"pre",null,null,text);
w.nextMatch = lookaheadRegExp.lastIndex;
}
};
// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)
{
createTiddlyElement(place,"br");
};
// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
{
var i = this.indexOf(item);
return i == -1 ? null : i;
};
// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
{
return store.getLoader().internalizeTiddler(store,this,title,divRef);
};
// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
{
return store.getSaver().externalizeTiddler(store,this);
};
// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
{
return store.allTiddlersAsHtml();
}
// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)
{
refreshPageTemplate(title);
}
// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)
{
story.displayTiddlers(srcElement,titles,template,animate);
}
// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)
{
story.displayTiddler(srcElement,title,template,animate);
}
// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;
// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");
}
//}}}
/***
|''Name:''|DropDownMenuPlugin|
|''Description:''|Create dropdown menus from unordered lists|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#DropDownMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.1|
|''Date:''|11/04/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|
!!Usage:
* create a two-level unordered list using wiki syntax, and place {{{<<dropMenu>>}}} on the line after it.
* to create a vertical menu use {{{<<dropMenu vertical>>}}} instead.
* to assign custom classes to the list, just pass them as parameters to the macro {{{<<dropMenu className1 className2 className3>>}}}
!!Features:
*Supports just a single level of drop-downs, as anything more usually provides a poor experience for the user.
* Very light weight, about 1.5kb of JavaScript and 4kb of CSS.
* Comes with two built in css 'themes', the default horizontal and vertical.
!!Customizing:
* to customize the appearance of the menu's, you can either add a custom class as described above or, you can edit the CSS via the StyleSheetDropDownMenu shadow tiddler.
!!Examples:
* [[DropDownMenuDemo]]
***/
// /%
//!BEGIN-PLUGIN-CODE
config.macros.dropMenu={
dropdownchar: "\u25bc",
handler : function(place,macroName,params,wikifier,paramString,tiddler){
list = findRelated(place.lastChild,"UL","tagName","previousSibling");
if (!list)
return;
addClass(list,"suckerfish");
if (params.length){
addClass(list,paramString);
}
this.fixLinks(list);
},
fixLinks : function(el){
var els = el.getElementsByTagName("li");
for(var i = 0; i < els.length; i++) {
if(els[i].getElementsByTagName("ul").length>0){
var link = findRelated(els[i].firstChild,"A","tagName","nextSibling");
if(!link){
var ih = els[i].firstChild.data;
els[i].removeChild(els[i].firstChild);
var d = createTiddlyElement(null,"a",null,null,ih+this.dropdownchar,{href:"javascript:;"});
els[i].insertBefore(d,els[i].firstChild);
}
else{
link.firstChild.data = link.firstChild.data + this.dropdownchar;
removeClass(link,"tiddlyLinkNonExisting");
}
}
els[i].onmouseover = function() {
addClass(this, "sfhover");
};
els[i].onmouseout = function() {
removeClass(this, "sfhover");
};
}
}
};
config.shadowTiddlers["StyleSheetDropDownMenuPlugin"] =
"/*{{{*/\n"+
"/***** LAYOUT STYLES - DO NOT EDIT! *****/\n"+
"ul.suckerfish, ul.suckerfish ul {\n"+
" margin: 0;\n"+
" padding: 0;\n"+
" list-style: none;\n"+
" line-height:1.4em;\n"+
"}\n\n"+
"ul.suckerfish li {\n"+
" display: inline-block; \n"+
" display: block;\n"+
" float: left; \n"+
"}\n\n"+
"ul.suckerfish li ul {\n"+
" position: absolute;\n"+
" left: -999em;\n"+
"}\n\n"+
"ul.suckerfish li:hover ul, ul.suckerfish li.sfhover ul {\n"+
" left: auto;\n"+
"}\n\n"+
"ul.suckerfish ul li {\n"+
" float: none;\n"+
" border-right: 0;\n"+
" border-left:0;\n"+
"}\n\n"+
"ul.suckerfish a, ul.suckerfish a:hover {\n"+
" display: block;\n"+
"}\n\n"+
"ul.suckerfish li a.tiddlyLink, ul.suckerfish li a, #mainMenu ul.suckerfish li a {font-weight:bold;}\n"+
"/**** END LAYOUT STYLES *****/\n"+
"\n\n"+
"/**** COLORS AND APPEARANCE - DEFAULT *****/\n"+
"ul.suckerfish li a {\n"+
" padding: 0.5em 1.5em;\n"+
" color: #FFF;\n"+
" background: #0066aa;\n"+
" border-bottom: 0;\n"+
" font-weight:bold;\n"+
"}\n\n"+
"ul.suckerfish li:hover a, ul.suckerfish li.sfhover a{\n"+
" background: #00558F;\n"+
"}\n\n"+
"ul.suckerfish li:hover ul a, ul.suckerfish li.sfhover ul a{\n"+
" color: #000;\n"+
" background: #eff3fa;\n"+
" border-top:1px solid #FFF;\n"+
"}\n\n"+
"ul.suckerfish ul li a:hover {\n"+
" background: #e0e8f5;\n"+
"}\n\n"+
"ul.suckerfish li a{\n"+
" width:9em;\n"+
"}\n\n"+
"ul.suckerfish ul li a, ul.suckerfish ul li a:hover{\n"+
" display:inline-block;\n"+
" width:9em;\n"+
"}\n\n"+
"ul.suckerfish li {\n"+
" border-left: 1px solid #00558F;\n"+
"}\n"+
"/***** END COLORS AND APPEARANCE - DEFAULT *****/\n"+
"\n\n"+
"/***** LAYOUT AND APPEARANCE: VERTICAL *****/\n"+
"ul.suckerfish.vertical li{\n"+
" width:10em;\n"+
" border-left: 0px solid #00558f;\n"+
"}\n\n"+
"ul.suckerfish.vertical ul li, ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a {\n"+
" border-left: 0.8em solid #00558f;\n"+
"}\n\n"+
"ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a, ul.suckerfish.vertical li.sfhover a:hover{\n"+
" width:8em;\n"+
"}\n\n"+
"ul.suckerfish.vertical {\n"+
" width:10em; text-align:left;\n"+
" float:left;\n"+
"}\n\n"+
"ul.suckerfish.vertical li a {\n"+
" padding: 0.5em 1em 0.5em 1em;\n"+
" border-top:1px solid #fff;\n"+
"}\n\n"+
"ul.suckerfish.vertical, ul.suckerfish.vertical ul {\n"+
" line-height:1.4em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul, ul.suckerfish.vertical li.sfhover ul { \n"+
" margin: -2.4em 0 0 10.9em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul li a, ul.suckerfish.vertical li.sfhover ul li a {\n"+
" border: 0px solid #FFF;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a{\n"+
" padding-right:1.1em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul li, ul.suckerfish.vertical li.sfhover ul li {\n"+
" border-bottom:1px solid #fff;\n"+
"}\n\n"+
"/***** END LAYOUT AND APPEARANCE: VERTICAL *****/\n"+
"/*}}}*/";
store.addNotification("StyleSheetDropDownMenuPlugin",refreshStyles);
//!END-PLUGIN-CODE
// %/
config.locale = "es"; // W3C language tag
[[PokerSource.eu|http://pokersource.eu/]] © 2008 [[Loic Dachary|mailto:loic@dachary.org]], [[Johan Euphrosine|mailto:proppy@aminche.com]], [[released under GNU GPLv3+|Copyright]]
/***
!!custom version for jpoker
|Name|FullScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#FullScreenPlugin|
|Version|1.1|
|Requires|~TW2.x|
!Description:
Toggle between viewing tiddlers fullscreen and normally. Very handy for when you need more viewing space.
!Demo:
Click the ↕ button in the toolbar for this tiddler. Click it again to turn off fullscreen.
!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Edit the ViewTemplate to add the fullscreen command to the toolbar.
!History:
*25-07-06: ver 1.1
*20-07-06: ver 1.0
!Code
***/
//{{{
var lewcidFullScreen = false;
config.commands.fullscreen =
{
text:" ↕ ",
tooltip:"Fullscreen mode"
};
config.commands.fullscreen.handler = function (event,src,title)
{
if (lewcidFullScreen == false)
{
lewcidFullScreen = true;
setStylesheet('#sidebar, #header, #stickyfooter,#push, #mainMenu{display:none;} #displayArea{margin:0em 0 0 0 !important;}',"lewcidFullScreenStyle");
}
else
{
lewcidFullScreen = false;
setStylesheet(' ',"lewcidFullScreenStyle");
}
}
config.macros.fullscreen={};
config.macros.fullscreen.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
var label = params[0]||" ↕ ";
var tooltip = params[1]||"Fullscreen mode";
createTiddlyButton(place,label,tooltip,config.commands.fullscreen.handler);
}
var lewcid_fullscreen_closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler =function(title,animate,slowly)
{
lewcid_fullscreen_closeTiddler.apply(this,arguments);
if (story.isEmpty() && lewcidFullScreen == true)
config.commands.fullscreen.handler();
}
Slider.prototype.lewcidStop = Slider.prototype.stop;
Slider.prototype.stop = function()
{
this.lewcidStop();
if (story.isEmpty() && lewcidFullScreen == true)
config.commands.fullscreen.handler();
}
//}}}
/***
|''Name:''|GenerateRssByTagPlugin|
|''Description:''|Only tiddlers with a specific tag are inluded in the RSSFeed. If no tiddlers are selected then works as before. (see ticket #270: http://trac.tiddlywiki.org/tiddlywiki/ticket/270). <br>RssTag: <<option txtRssTag>>|
|''Version:''|1.0.2|
|''Date:''|Apr 20, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#GenerateRssByTagPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''[[License]]:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.GenerateRssByTagPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 20, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0 (Beta 5)'
};
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.generateRssByTag = function()
{
var s = [];
var d = new Date();
var u = store.getTiddlerText("SiteUrl");
// Assemble the header
s.push("<" + "?xml version=\"1.0\"" + " encoding='UTF-8' " + "?" + ">");
s.push("<rss version=\"2.0\">");
s.push("<channel>");
s.push("<title" + ">" + wikifyPlain("SiteTitle").htmlEncode() + "</title" + ">");
if(u)
s.push("<link>" + u.htmlEncode() + "</link>");
s.push("<description>" + wikifyPlain("SiteSubtitle").htmlEncode() + "</description>");
s.push("<language>en-us</language>");
s.push("<copyright>Copyright " + d.getFullYear() + " " + config.options.txtUserName.htmlEncode() + "</copyright>");
s.push("<pubDate>" + d.toGMTString() + "</pubDate>");
s.push("<lastBuildDate>" + d.toGMTString() + "</lastBuildDate>");
s.push("<docs>http://blogs.law.harvard.edu/tech/rss</docs>");
s.push("<generator>TiddlyWiki " + version.major + "." + version.minor + "." + version.revision + "</generator>");
// The body
var tiddlers;
if (config.options.txtRssTag && store.getTaggedTiddlers(config.options.txtRssTag).length > 0)
tiddlers = store.getTaggedTiddlers(config.options.txtRssTag,"modified");
else
tiddlers = store.getTiddlers("modified","[[excludeLists]]");
var n = config.numRssItems > tiddlers.length ? 0 : tiddlers.length-config.numRssItems;
for (var t=tiddlers.length-1; t>=n; t--)
s.push(tiddlers[t].saveToRss(u));
// And footer
s.push("</channel>");
s.push("</rss>");
// Save it all
return s.join("\n");
};
//
// Initializations
//
bidix.generateRss = generateRss; // backup core version
generateRss = bidix.generateRssByTag; // install new one
config.options.txtRssTag = "toRSS"; // default RssTag. use <<option txtRssTag>> to overwritte
merge(config.optionsDesc,{txtRssTag: "Only tiddlers with this tag will be included in the RSS Feed."});
//}}}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut fermentum. Sed ultrices molestie lorem. Etiam pharetra. Duis ultricies. Ut risus ante, facilisis sed, luctus eu, imperdiet ac, enim. Quisque tellus nulla, nonummy vel, mattis id, imperdiet in, velit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque mi turpis, semper id, commodo porttitor, pharetra at, urna. Nam velit enim, ultrices ut, condimentum molestie, porttitor vel, lorem. Proin rutrum blandit erat. Pellentesque placerat neque vel nulla. Sed enim justo, molestie vitae, euismod id, accumsan vitae, enim. Aenean et augue at massa ornare elementum. Donec scelerisque, pede vel vehicula varius, turpis lectus elementum nisi, eu ultricies nibh sapien ac sem.
Proin euismod rutrum lectus. Integer vulputate posuere dui. Donec posuere posuere ligula. Suspendisse placerat. Sed elementum purus at neque. Vestibulum elementum mi et dui. Nullam adipiscing tempus lorem. Integer felis. Pellentesque eu lorem quis ipsum pellentesque bibendum. Ut eget nisl. Nulla nibh. Nunc eget orci ac magna porttitor luctus. Morbi eleifend vestibulum nisl. Nunc et risus. Sed laoreet. Quisque nec est.
<<tag systemConfig>>
{{{ hello how are you}}}
<<<
Proin euismod rutrum lectus. Integer vulputate posuere dui. Donec posuere posuere ligula. Suspendisse placerat. Sed elementum purus at neque. Vestibulum elementum mi et dui. Nullam adipiscing tempus lorem. Integer felis. Pellentesque eu lorem quis ipsum pellentesque bibendum. Ut eget nisl. Nulla nibh. Nunc eget orci ac magna porttitor luctus. Morbi eleifend vestibulum nisl. Nunc et risus. Sed laoreet. Quisque nec est.
<<<
!heading 1
!!heading 2
!!!heading3
|!efrefr|!eferfrfvrvrver|!rgergre|
|rerr|rwfrgr|rgregre|
|regergre|umumuy|thtt|
----
[[Google|http://www.google.com]]
*lists
*primary pale
/***
|''Name:''|jpokerPlugin|
|''Description:''||
|''Author:''|Loic Dachary (loic@dachary.org)|
|''Source:''|http://jspoker.pokersource.info/jpoker/#JpokerPlugin.tiddler|
|''Code Repository:''|http://upstream.jspoker.pokersource.info/|
|''Version:''|1.0|
|''Date:''|Apr 5, 2008|
|''License:''|[[GNU GPLv3+|http://gnu.org/licenses/gpl.txt]]|
|''~CoreVersion:''|2.3.0|
***/
//{{{
//config.jpoker = { restURL : 'http://pokersource.eu/POKER_REST' };
//config.jpoker = { restURL : 'http://jspoker.pokersource.info/POKER_REST' };
//config.jpoker = { restURL : 'http://pok01.prodin.orbus.fr:19384/POKER_REST' };
//config.jpoker = { restURL : 'http://127.0.0.1/POKER_REST' };
//config.jpoker = { restURL : 'http://127.0.0.1:19384/REST' };
config.jpoker = { restURL : '/POKER_REST' };
config.options.chkSinglePagePermalink = false;
$.jpoker.server.defaults.spawnTable = function(server, packet) {
var title = " Table " + packet.name;
var lang = $("html").attr("lang");
server.setLocale(lang, packet.game_id);
config.shadowTiddlers[title] = "<<jpokerTable '" + server.url + "' " + packet.game_id + " '" + packet.name + "'>>";
story.displayTiddler(null, title, 1);
};
$.jpoker.server.defaults.tourneyRowClick = function(server, packet) {
var title = " TourneyDetails " + packet.name;
config.shadowTiddlers[title] = "<<jpokerTourneyDetails '" + server.url + "' " + packet.game_id + " '" + packet.name + "'>>";
story.displayTiddler(null, title, 1);
};
$.jpoker.server.defaults.rankClick = function(server, tourney_serial) {
var title = " TourneyDetails ";
config.shadowTiddlers[title] = "<<jpokerTourneyDetails '" + server.url + "' " + game_id + " 'unknown name'>>";
story.displayTiddler(null, title, 1);
};
$.jpoker.server.defaults.placeTourneyRowClick = function(server, id) {
var title = " TourneyPlaceholder " + id;
config.shadowTiddlers[title] = "<<jpokerTourneyPlaceholder '" + server.url + "' " + id + ">>";
story.displayTiddler(null, title, 1);
};
$.jpoker.verbose = 6;
$(document).ready(function() {
$.jpoker.copyright();
});
config.macros.jpokerTable = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('table', params[0], params[1], params[2]);
}
};
config.macros.jpokerLogin = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('login', config.jpoker.restURL);
}
};
config.macros.jpokerServerStatus = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('serverStatus', config.jpoker.restURL);
}
};
config.macros.jpokerTableList = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('tableList', config.jpoker.restURL);
}
};
config.macros.jpokerRegularTourneyList = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('regularTourneyList', config.jpoker.restURL);
}
};
config.macros.jpokerSitngoTourneyList = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('sitngoTourneyList', config.jpoker.restURL);
}
};
config.macros.jpokerTourneyDetails = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('tourneyDetails', params[0], params[1], params[2]);
}
};
config.macros.jpokerFeaturedTable = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('featuredTable', config.jpoker.restURL);
}
};
config.macros.jpokerUserInfo = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('userInfo', config.jpoker.restURL);
}
};
config.macros.jpokerPlaces = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('places', config.jpoker.restURL);
}
};
config.macros.jpokerPlayerLookup = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('playerLookup', config.jpoker.restURL);
}
};
config.macros.jpokerCashier = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('cashier', config.jpoker.restURL);
}
};
config.macros.jpokerTablePicker = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('tablepicker', config.jpoker.restURL);
}
};
config.macros.jpokerTourneyPlaceholder = {
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
$(place).jpoker('tourneyPlaceholder', params[0], params[1]);
}
};
//}}}
//!END-PLUGIN-CODE
// %/
//config.jpoker.restURL = 'http://jspoker.pokersource.info/POKER_REST';
/***
|''Name:''|LegacyStrikeThroughPlugin|
|''Description:''|Support for legacy (pre 2.1) strike through formatting|
|''Version:''|1.0.2|
|''Date:''|Jul 21, 2006|
|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|
|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|
|''License:''|[[BSD open source license]]|
|''CoreVersion:''|2.1.0|
***/
//{{{
// Ensure that the LegacyStrikeThrough Plugin is only installed once.
if(!version.extensions.LegacyStrikeThroughPlugin) {
version.extensions.LegacyStrikeThroughPlugin = {installed:true};
config.formatters.push(
{
name: "legacyStrikeByChar",
match: "==",
termRegExp: /(==)/mg,
element: "strike",
handler: config.formatterHelpers.createElementAndWikify
});
} //# end of "install only once"
//}}}
*[[Tables]]
**[[RegularTourneys]]
**[[SitngoTourneys]]
*[[UserInfo]]
**[[Places]]
**[[PlayerLookup]]
**[[Cashier]]
*[[Feedback|http://jspoker.pokersource.info/ideas.html]]
*[[Copyright]]
<<dropMenu>><html><div style="clear:both;"></div></html>
<!--{{{-->
<script language="JavaScript" type="text/javascript" src="jquery/jquery-1.2.6.js"></script>
<script language="JavaScript" type="text/javascript" src="jquery/ui/ui.core.js"></script>
<script language="JavaScript" type="text/javascript" src="jquery/ui/ui.draggable.js"></script>
<script language="JavaScript" type="text/javascript" src="jquery/ui/ui.resizable.js"></script>
<script language="JavaScript" type="text/javascript" src="jquery/ui/ui.dialog.js"></script>
<script language="JavaScript" type="text/javascript" src="jquery/ui/ui.slider.js"></script>
<script src="js/json2.js" type="text/javascript"></script>
<script src="js/printstacktrace.js" type="text/javascript"></script>
<script src="js/jquery.gettext.js" type="text/javascript"></script>
<script src="js/jquery.strftime.js" type="text/javascript"></script>
<script src="js/jquery.ajaxQueue.js" type="text/javascript"></script>
<script src="js/jquery.tablesorter.js" type="text/javascript"></script>
<script src="js/jquery.tablesorter.pager.js" type="text/javascript"></script>
<script src="js/jquery.form.js" type="text/javascript"></script>
<script src="js/jquery.cookie.js" type="text/javascript"></script>
<script src="js/jquery.jpoker.js" type="text/javascript"></script>
<script src="js/mockup.js" type="text/javascript"></script>
<!--}}}-->
<!--{{{-->
<link rel="alternate" type="application/rss+xml" title="RSS" href="index.xml"/>
<link href="l10n/jpoker-da.json" lang="da" rel="gettext"/>
<link href="l10n/jpoker-de.json" lang="de" rel="gettext"/>
<link href="l10n/jpoker-en.json" lang="en" rel="gettext"/>
<link href="l10n/jpoker-en_CA.json" lang="en_CA" rel="gettext"/>
<link href="l10n/jpoker-en_US.json" lang="en_US" rel="gettext"/>
<link href="l10n/jpoker-es.json" lang="es" rel="gettext"/>
<link href="l10n/jpoker-fi.json" lang="fi" rel="gettext"/>
<link href="l10n/jpoker-fr.json" lang="fr" rel="gettext"/>
<link href="l10n/jpoker-fr_BE.json" lang="fr_BE" rel="gettext"/>
<link href="l10n/jpoker-fr_CA.json" lang="fr_CA" rel="gettext"/>
<link href="l10n/jpoker-fr_FX.json" lang="fr_FX" rel="gettext"/>
<link href="l10n/jpoker-it.json" lang="it" rel="gettext"/>
<link href="l10n/jpoker-ja.json" lang="ja" rel="gettext"/>
<link href="l10n/jpoker-nb.json" lang="nb" rel="gettext"/>
<link href="l10n/jpoker-nl.json" lang="nl" rel="gettext"/>
<link href="l10n/jpoker-pt.json" lang="pt" rel="gettext"/>
<link href="l10n/jpoker-sv.json" lang="sv" rel="gettext"/>
<link href="css/jpoker.css" rel="stylesheet" type="text/css" />
<!--}}}-->
<!--{{{-->
<div id="stickybod">
<div id="header">
<div id="pokLogin" refresh="content" force="true" tiddler="Login"></div>
<div id="pokTablePicker" refresh="content" force="true" tiddler="TablePicker"></div>
<div id="headerTitle" refresh="content" force="true" tiddler="SiteTitle"></div>
<div id="lang" refresh="content" force="true" tiddler="lang"></div>
<!--
<div id="headerImage"></div>
-->
<div id="menu" refresh="content" force="true" tiddler="MainMenu"></div>
</div>
<div id="myDisplayArea">
<div id="messageArea"></div>
<div id="tiddlerDisplay"></div>
</div>
<div id="push"></div>
</div>
<div id="stickyfooter">
<div id="footer" refresh="content" force="true" tiddler="Footer"></div>
</div>
<!--}}}-->
|>|!Layout Tiddlers|
|Name:|Public|
|~PageTemplate:|PublicPageTemplate|
|~StyleSheet:|PublicStyleSheet|
|~ViewTemplate:|PublicViewTemplate|
|~EditTemplate:||
|>|!Configuration Options|
|readOnly:|true|
|~SinglePageMode:|true|
|showBackstage:|false|
<!--{{{-->
<div class='title' macro='view title'><span macro="fullscreen"></span></div>
<div class='viewer' macro='view text wikified'></div>
<!--}}}-->
|!Name|!ReadOnly|!Backstage|!SPM|
|Admin|false|true|false|
|Public|true|false|true|
//{{{
config.macros.publisher = {
startMode : 'PublicMode',
currentMode : 'PublicMode',
spm : false,
defaultColorPalette : config.shadowTiddlers['ColorPalette'],
readOnly : false,
handler: function(place,macroName,params,wikifier,paramString,tiddler){
if(!(store.getTiddlerSlice(this.startMode,'readOnly') == 'true') || (params[0] =='force')) {
var modeTiddlers = store.getTaggedTiddlers('publisherMode');
var modes = [];
for(var i=0;i<modeTiddlers.length;i++) {
var modeName = store.getTiddlerSlice(modeTiddlers[i].title,'Name') || modeTiddlers[i].title;
modes.push({name : modeTiddlers[i].title, caption: modeName + ' mode '});
}
var sel = createTiddlyDropDown(place,this.onchangeselect,modes,this.currentMode);
addClass(sel,'publisher');
}
},
onchangeselect : function(e) {
config.macros.publisher.changeMode(this.value)
return false;
},
changeMode : function(mode,noSwitchTheme) {
this.currentMode = mode;
this.spm = store.getTiddlerSlice(mode,'SinglePageMode') == 'true' ? true : false;
this.readOnly = store.getTiddlerSlice(mode,'readOnly') == 'true' ? true : false;
this.toggleReadOnly();
this.toggleSPM();
this.toggleColorPalette(mode);
if(!noSwitchTheme)
story.switchTheme(mode);
},
toggleColorPalette : function(mode){
if(store.getTiddler('ColorPalette'))
return;
var customPalette = store.getTiddlerSlice(mode,'ColorPalette');
if(customPalette && (store.tiddlerExists(customPalette) || store.isShadowTiddler(customPalette))){
config.shadowTiddlers['ColorPalette'] = store.getTiddlerText(customPalette);
}
else
config.shadowTiddlers['ColorPalette'] = this.defaultColorPalette;
},
toggleReadOnly : function(){
if (this.readOnly){
config.options.chkHttpReadOnly = true;
readOnly = true;
}
else{
config.options.chkHttpReadOnly =false;
readOnly = false;
}
},
toggleSPM : function(){
config.options.chkSinglePageMode = (this.spm)? true : false;
config.options.chkTopOfPageMode = (this.spm)? true : false;
},
start : function(){
config.options.txtTheme = this.startMode;
showBackstage = store && store.getTiddlerSlice(this.startMode,'showBackstage') == 'false' ? false : showBackstage;
}
};
config.macros.publisher.start();
Story.prototype.old_publisher_switchTheme = Story.prototype.switchTheme;
Story.prototype.switchTheme = function(theme){
if(startingUp)
config.macros.publisher.changeMode(theme,true);
this.old_publisher_switchTheme(theme);
};
backstage.old_publisher_init = backstage.init;
backstage.init = function(){
this.old_publisher_init.apply(this,arguments);
wikify("<<publisher>>",document.getElementById("backstageToolbar"));
};
config.paramifiers.mode = {
onconfig: function(mode) {
if (!store.tiddlerExists(mode) && store.tiddlerExists(mode+'Mode'))
mode += 'Mode';
config.macros.publisher.startMode = mode;
if(store.getTiddlerSlice(mode,'showBackstage') == 'true')
showBackstage = true;
story.switchTheme(mode);
}
};
//}}}
The Publisher plugin defines different 'modes' that can be configured to have a different look and feel and editing options. The different modes are defined in the tiddler PublisherGroupsConfig.
The current modes defined are 'Admin' and 'Public'.
To customize the Public mode edit:
*PublicStyleSheet
*PublicPageTemplate
*PublicViewTemplate
*PublicEditTemplate
*PublicDefaultTiddlers
For the Admin mode:
*AdminStyleSheet
*AdminPageTemplate
*AdminViewTemplate
*AdminEditTemplate
*AdminDefaultTiddlers
If any of the above tiddlers do not exist the plugin uses the default TiddlyWiki version instead.
<<jpokerRegularTourneyList>>
/***
|Name|SinglePageModePlugin|
|Source|http://www.TiddlyTools.com/#SinglePageModePlugin|
|Documentation|http://www.TiddlyTools.com/#SinglePageModePluginInfo|
|Version|2.9.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.displayTiddler(), Story.prototype.displayTiddlers()|
|Options|##Configuration|
|Description|Show tiddlers one at a time with automatic permalink, or always open tiddlers at top/bottom of page.|
This plugin allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one tiddler displayed at a time.
!!!!!Documentation
>see [[SinglePageModePluginInfo]]
!!!!!Configuration
<<<
<<option chkSinglePageMode>> Display one tiddler at a time
><<option chkSinglePageKeepFoldedTiddlers>> Don't auto-close folded tiddlers
><<option chkSinglePagePermalink>> Automatically permalink current tiddler
<<option chkTopOfPageMode>> Always open tiddlers at the top of the page
<<option chkBottomOfPageMode>> Always open tiddlers at the bottom of the page
<<option chkSinglePageAutoScroll>> Automatically scroll tiddler into view (if needed)
Notes:
* The "display one tiddler at a time" option can also be //temporarily// set/reset by including a 'paramifier' in the document URL: {{{#SPM:true}}} or {{{#SPM:false}}}.
* If more than one display mode is selected, 'one at a time' display takes precedence over both 'top' and 'bottom' settings, and if 'one at a time' setting is not used, 'top of page' takes precedence over 'bottom of page'.
* When using Apple's Safari browser, automatically setting the permalink causes an error and is disabled.
<<<
!!!!!Revisions
<<<
2008.04.08 [2.9.1] don't automatically add options to AdvancedOptions shadow tiddler
2008.04.02 [2.9.0] in displayTiddler(), when single-page mode is in use and a tiddler is being edited, ask for permission to save-and-close that tiddler, instead of just leaving it open.
| Please see [[SinglePageModePluginInfo]] for previous revision details |
2005.08.15 [1.0.0] Initial Release. Support for BACK/FORWARD buttons adapted from code developed by Clint Checketts.
<<<
!!!!!Code
***/
//{{{
version.extensions.SinglePageMode= {major: 2, minor: 9, revision: 1, date: new Date(2008,4,8)};
//}}}
//{{{
config.paramifiers.SPM = { onstart: function(v) {
config.options.chkSinglePageMode=eval(v);
if (config.options.chkSinglePageMode && config.options.chkSinglePagePermalink && !config.browser.isSafari) {
config.lastURL = window.location.hash;
if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
}
} };
//}}}
//{{{
if (config.options.chkSinglePageMode==undefined)
config.options.chkSinglePageMode=false;
if (config.options.chkSinglePageKeepFoldedTiddlers==undefined)
config.options.chkSinglePageKeepFoldedTiddlers=true;
if (config.options.chkSinglePagePermalink==undefined)
config.options.chkSinglePagePermalink=true;
if (config.options.chkTopOfPageMode==undefined)
config.options.chkTopOfPageMode=false;
if (config.options.chkBottomOfPageMode==undefined)
config.options.chkBottomOfPageMode=false;
if (config.options.chkSinglePageAutoScroll==undefined)
config.options.chkSinglePageAutoScroll=true;
//}}}
//{{{
config.SPMTimer = 0;
config.lastURL = window.location.hash;
function checkLastURL()
{
if (!config.options.chkSinglePageMode)
{ window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }
if (config.lastURL == window.location.hash) return; // no change in hash
var tids=convertUTF8ToUnicode(decodeURIComponent(window.location.hash.substr(1))).readBracketedList();
if (tids.length==1) // permalink (single tiddler in URL)
story.displayTiddler(null,tids[0]);
else { // restore permaview or default view
config.lastURL = window.location.hash;
if (!tids.length) tids=store.getTiddlerText("DefaultTiddlers").readBracketedList();
story.closeAllTiddlers();
story.displayTiddlers(null,tids);
}
}
if (Story.prototype.SPM_coreDisplayTiddler==undefined)
Story.prototype.SPM_coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,slowly)
{
var title=(tiddler instanceof Tiddler)?tiddler.title:tiddler;
var tiddlerElem=document.getElementById(story.idPrefix+title); // ==null unless tiddler is already displayed
var opt=config.options;
if (opt.chkSinglePageMode) {
story.forEachTiddler(function(tid,elem) {
// skip current tiddler and, optionally, tiddlers that are folded.
if ( tid==title
|| (opt.chkSinglePageKeepFoldedTiddlers && elem.getAttribute("folded")=="true"))
return;
// if a tiddler is being edited, ask before closing
if (elem.getAttribute("dirty")=="true") {
// if tiddler to be displayed is already shown, then leave active tiddlers editors as is
// (occurs when switching between view and edit modes)
if (tiddlerElem) return;
// otherwise, ask for permission
var msg="'"+tid+"' is currently being edited.\n\n";
msg+="Press OK to save and close this tiddler\nor press Cancel to leave it opened";
if (!confirm(msg)) return; else story.saveTiddler(tid);
}
story.closeTiddler(tid);
});
}
else if (opt.chkTopOfPageMode)
arguments[0]=null;
else if (opt.chkBottomOfPageMode)
arguments[0]="bottom";
if (opt.chkSinglePageMode && opt.chkSinglePagePermalink && !config.browser.isSafari) {
window.location.hash = encodeURIComponent(convertUnicodeToUTF8(String.encodeTiddlyLink(title)));
config.lastURL = window.location.hash;
document.title = wikifyPlain("SiteTitle") + " - " + title;
if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
}
if (tiddlerElem && tiddlerElem.getAttribute("dirty")=="true") { // editing... move tiddler without re-rendering
var isTopTiddler=(tiddlerElem.previousSibling==null);
if (!isTopTiddler && (opt.chkSinglePageMode || opt.chkTopOfPageMode))
tiddlerElem.parentNode.insertBefore(tiddlerElem,tiddlerElem.parentNode.firstChild);
else if (opt.chkBottomOfPageMode)
tiddlerElem.parentNode.insertBefore(tiddlerElem,null);
else this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
} else
this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
var tiddlerElem=document.getElementById(story.idPrefix+title);
if (tiddlerElem&&opt.chkSinglePageAutoScroll) {
var yPos=ensureVisible(tiddlerElem); // scroll to top of tiddler
var isTopTiddler=(tiddlerElem.previousSibling==null);
if (opt.chkSinglePageMode||opt.chkTopOfPageMode||isTopTiddler)
yPos=0; // scroll to top of page instead of top of tiddler
if (opt.chkAnimate) // defer scroll until 200ms after animation completes
setTimeout("window.scrollTo(0,"+yPos+")",config.animDuration+200);
else
window.scrollTo(0,yPos); // scroll immediately
}
}
if (Story.prototype.SPM_coreDisplayTiddlers==undefined)
Story.prototype.SPM_coreDisplayTiddlers=Story.prototype.displayTiddlers;
Story.prototype.displayTiddlers = function() {
// suspend single-page mode (and/or top/bottom display options) when showing multiple tiddlers
var opt=config.options;
var saveSPM=opt.chkSinglePageMode; opt.chkSinglePageMode=false;
var saveTPM=opt.chkTopOfPageMode; opt.chkTopOfPageMode=false;
var saveBPM=opt.chkBottomOfPageMode; opt.chkBottomOfPageMode=false;
this.SPM_coreDisplayTiddlers.apply(this,arguments);
opt.chkBottomOfPageMode=saveBPM;
opt.chkTopOfPageMode=saveTPM;
opt.chkSinglePageMode=saveSPM;
}
//}}}
[img[images/logo.png]]@@display:none;PokerSource.eu@@
<<jpokerSitngoTourneyList>>
/***
|''Name:''|SparklinePlugin|
|''Description:''|Sparklines macro|
***/
//{{{
if(!version.extensions.SparklinePlugin) {
version.extensions.SparklinePlugin = {installed:true};
//--
//-- Sparklines
//--
config.macros.sparkline = {};
config.macros.sparkline.handler = function(place,macroName,params)
{
var data = [];
var min = 0;
var max = 0;
var v;
for(var t=0; t<params.length; t++) {
v = parseInt(params[t]);
if(v < min)
min = v;
if(v > max)
max = v;
data.push(v);
}
if(data.length < 1)
return;
var box = createTiddlyElement(place,"span",null,"sparkline",String.fromCharCode(160));
box.title = data.join(",");
var w = box.offsetWidth;
var h = box.offsetHeight;
box.style.paddingRight = (data.length * 2 - w) + "px";
box.style.position = "relative";
for(var d=0; d<data.length; d++) {
var tick = document.createElement("img");
tick.border = 0;
tick.className = "sparktick";
tick.style.position = "absolute";
tick.src = "data:image/gif,GIF89a%01%00%01%00%91%FF%00%FF%FF%FF%00%00%00%C0%C0%C0%00%00%00!%F9%04%01%00%00%02%00%2C%00%00%00%00%01%00%01%00%40%02%02T%01%00%3B";
tick.style.left = d*2 + "px";
tick.style.width = "2px";
v = Math.floor(((data[d] - min)/(max-min)) * h);
tick.style.top = (h-v) + "px";
tick.style.height = v + "px";
box.appendChild(tick);
}
};
}
//}}}
<!--{{{-->
<style type="text/css">#contentWrapper {display:none;}</style>
<div id="splashScreen" style="border:none; width:500px;margin: 150px auto; color:#333; font-size: 26px; font-family: Lucida Grande, Tahoma, Arial, Helvetica, sans-serif; text-align:center; line-height:2.5em;">
<img src='images/splash.png'><br/>
<img src='images/loading3.gif'><br/>
</div>
<!--}}}-->
/***
|''Name:''|SplashScreenPlugin|
|''Description:''|Provides a splash screen, while ~TiddlyWiki is loading|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#SplashScreenPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0|
|''Date:''||
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.2|
!! Installation:
# Copy the contents of this tiddler to your TiddlyWiki file.
# Tag it as systemConfig.
# Save and reload.
# Save a second time for the SplashScreen to be initialized.
# Next time you reload, the SplashScreen will be visible.
!! Upgrade
To upgrade from a previous version, less than 2.0:
# Delete the tiddler MarkupPreHead
# Delete the SplashScreenPlugin tiddler.
# Save and reload.
# Follow the installation instructions above.
***/
// /%
//!BEGIN-PLUGIN-CODE
window.lewcidAddToMarkupBlock = function(s,blockName,newChunk)
{
var sep = s.indexOf("<!--%0-END-->".format([blockName]));
return ( s.substring(0,sep) + "\n" + newChunk + "\n" + s.substring(sep) );
};
config.shadowTiddlers["SplashScreen"] = '<!--{{{-->\n<style type="text/css">#contentWrapper {display:none;}</style><div id="splashScreen" style="border: 3px solid #ccc; 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<!--}}}-->';
window.splashscreenAddToMarkupBlock = function(s)
{
return lewcidAddToMarkupBlock(s,"PRE-BODY",store.getRecursiveTiddlerText("SplashScreen"));
};
updateMarkupBlock_old_splashscreen = window.updateMarkupBlock;
window.updateMarkupBlock = function (s,blockName,tiddlerName)
{
s = updateMarkupBlock_old_splashscreen.apply(this,arguments);
if (blockName == "PRE-BODY")
s = splashscreenAddToMarkupBlock(s);
return s;
};
//!END-PLUGIN-CODE
// %/
/*{{{*/
html, * {
margin:0pt;
padding:0pt;
}
body {
background:[[ColorPalette::TertiaryPale]];
color:[[ColorPalette::TertiaryDark]];
font-family:"trebuchet MS",arial,helvetica,sans-serif;
}
html, body, #contentWrapper {
height: 100%;
}
body #contentWrapper {
display:block;
}
#contentWrapper {
width: 840px;
margin:0 auto;
background:[[ColorPalette::Background]];
}
#header {
padding:15px 15px 0px 15px;
}
#pokLogin {
float:right;
/*
padding:10px;
background:[[ColorPalette::TertiaryPale]];
border: 1px solid [[ColorPalette::TertiaryLight]];
*/
}
#headerTitle{
/*font-size: 3.5em;*/
padding-bottom:0.5em;
height:87px;
float:left;
}
#headerTitle img{
float:left;
padding-bottom:0.8em;
margin-right:2em;
}
#headerImage{
background: transparent url("images/banner.jpg") no-repeat;
height:156px;
clear:both;
padding-bottom:0.5em;
}
#menu {
background:[[ColorPalette::PrimaryMid]];
padding: 9px;
clear:both
}
#stickybod{
min-height: 100%;
height: 100%;
height: auto !important;
margin: 0 auto -75px;
background:[[ColorPalette::Background]];
}
* html #stickybod {height:100%;}
#myDisplayArea {
background:[[ColorPalette::Background]];
padding: 0px 15px 15px 15px;
}
#push {
clear:both;
}
#stickyfooter, #push {
height: 60px;
background:[[ColorPalette::Background]];
padding: 0px 15px 15px 15px;
}
#footer{
background:[[ColorPalette::TertiaryPale]];
height:60px;
border-top:5px solid [[ColorPalette::PrimaryMid]];
margin:0pt auto;
line-height:60px;
text-align:center;
font-weight: bold;
color: [[ColorPalette::TertiaryDark]];
}
#stickyfooter, #stickybod {
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-right: 1px solid [[ColorPalette::TertiaryLight]];
}
.viewer{
font-size:14px;
line-height:18px;
}
#menu br {display:none;}
#menu a{
font-size:15px;
color:[[ColorPalette::Background]];
padding: 9px;
border:none;
font-weight:bold;
}
#menu a:hover, #menu a.activeLink{
background:[[ColorPalette::PrimaryDark]];
}
.tiddler {
padding:1em 0em 0em;
}
.shadow .title {
color:#17691C;
}
.subtitle {
color:[[ColorPalette::TertiaryMid]];
}
.tagged, .tagging {
position:relative;
float:none;
margin: 0.5em 0em;
padding:6px 4px;
}
.tagged li, .tagging li, .tagging ul, .tagged ul{
display:inline;
}
.tagged li, .tagging li {
margin-right:0.5em;
}
.tagging .listTitle{
display:none;
}
.tagging .button:hover, .tagged .button:hover{
background: [[ColorPalette::PrimaryMid]];
color:[[ColorPalette::Background]];
}
.tagging, .selected .tagging, .tagged, .selected .tagged {
border:1px solid [[ColorPalette::TertiaryPale]];
background-color:[[ColorPalette::TertiarySuperPale]];
}
.toolbar {
float:right;
}
.toolbar .button:hover, .toolbar .button:active{
background:transparent;
border:1px solid [[ColorPalette::Background]];
}
.highlight, .marked {
background:[[ColorPalette::PrimaryMid]];
color:[[ColorPalette::Background]];
}
.viewer .button {
border:1px solid [[ColorPalette::PrimaryMid]];
}
.viewer .button:hover {
background: [[ColorPalette::PrimaryMid]];
color: [[ColorPalette::Background]];
}
.viewer pre, .viewer code {
font-size:1em;
}
.viewer code {
color:[[ColorPalette:PrimaryDark]];
}
.viewer pre {
background:[[ColorPalette::TertiarySuperPale]];
border:1px solid [[ColorPalette::TertiaryPale]];
padding:0.5em;
margin-left:0em;
}
.viewer hr {
border:0;
border-top:solid 5px [[ColorPalette::PrimaryDark]];
margin:0 5px;
}
.viewer blockquote {
border-left:4px solid [[ColorPalette::PrimaryDark]];
}
h1 {
border-bottom:2px solid [[ColorPalette::PrimaryMid]];
}
h2,h3 {
border-bottom:1px solid [[ColorPalette::PrimaryMid]];
}
/*
.viewer table, table.twtable {
border:2px solid [[ColorPalette::PrimaryDark]];
}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {
background:[[ColorPalette::PrimaryDark]];
border:1px solid [[ColorPalette::PrimaryDark]];
color:[[ColorPalette::Background]];
}
.viewer td, .viewer tr, .twtable td, .twtable tr {
border:1px solid [[ColorPalette::PrimaryDark]];
}
*/
.viewer .tab {
padding:1px;
}
.imageLink:hover, .imageLink {background:transparent;}
#tiddlerDisplay{
display:inline-block;
}
#tiddlerDisplay{
display:block;
overflow:hidden;
}
#mysidebar {
padding-left:1.5em;
position:relative;
float:right;
width:14em;
padding-bottom:0.5em;
}
#sidebarTabs .tabContents{
font-size:0.95em;
width:13.5em;
}
/*
td.login_text{
padding:5px 5px;
text-align:left;
}
td.login_input input {
border:1px solid [[ColorPalette::TertiaryLight]];
width:140px;
}
#statBar{
color:#FFFFFF;
float:right;
font-size:15px;
padding:8px;
}
*/
.editor input, .editor textarea {
width:99%;
}
/*
#contentWrapper .viewer .jpoker_ptable table.jpokerTableList {
margin: 0.5em auto;
}
#contentWrapper .viewer .jpoker_table .jpoker_ptable{
margin: 0em auto;
}
*/
.title .button, .title .button:hover {padding:0; background:transparent; border:none;}
#menu {padding:0;}
ul.suckerfish li ul {z-index:999;}
/*}}}*/
/**** COLORS AND APPEARANCE - DEFAULT *****/
#menu ul.suckerfish li a {
padding: 0.5em 1.5em;
color: #FFF;
background: #009E03;
border-bottom: 0;
font-weight:bold;
}
#menu ul.suckerfish li:hover a, #menu ul.suckerfish li.sfhover a{
background: #17691C;
}
#menu ul.suckerfish li:hover ul a, #menu ul.suckerfish li.sfhover ul a{
color: #000;
background: #eff3fa;
border-top:1px solid #FFF;
}
#menu ul.suckerfish ul li a:hover {
background: #e0e8f5;
}
#menu ul.suckerfish li {
border-left: 1px solid #17691C;
}
/*
Jpoker overrides below here
*/
.viewer .jpoker_tourney_details table, .jpoker_tourney_details table.twtable,
.viewer .jpoker_tourney_details table th, .jpoker_tourney_details table.twtable th,
.viewer .jpoker_tourney_details table thead td, .jpoker_tourney_details table.twtable thead td {
border:none;
}
.viewer .jpoker_tourney_details table, .jpoker_tourney_details table.twtable {
margin:0;
}
Theme by [[Saq 'Lewcid' Imtiaz|http://tw.lewcid.org]]
<html><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
<img alt="Creative Commons License" style="border-width:0;background:transparent;" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" />
</a>
<br />This work is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 License</a>.</html>
/***
|''Name:''|TiddlerSubtitleTweak|
|''Description:''||
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#TiddlerSubtitleTweak|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0 beta|
|''Date:''||
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
!!Usage:
*
***/
// /%
//!BEGIN-PLUGIN-CODE
//{{{
window.old_website_getTiddlyLinkInfo = window.getTiddlyLinkInfo;
window.getTiddlyLinkInfo = function(title,currClasses)
{
var x = window.old_website_getTiddlyLinkInfo.apply(this,arguments);
x.subTitle = title;
return x;
}
//}}}
//!END-PLUGIN-CODE
// %/
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > permalink references jump'></div>
<div class='title' macro='view title'><span macro="fullscreen"></span></div>
<div class='subtitle'>by <span macro='view modifier link'></span>, <span macro='view modified date'></span></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagging' macro='tagging'>Related: </div>
<div class='tagClear'></div>
<!--}}}-->
/***
|''Name:''|WebDavPlugin|
|''Description:''|Allows a TiddlyWiki to be saved to a WebDav server|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Co-author:''|Loic Dachary|
|''Source:''|http://tw.lewcid.org/#WebDavPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|1.0|
|''Date:''|17/11/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.3|
***/
// /%
//!BEGIN-PLUGIN-CODE
DAV = {
run : function(type,u,data,cb,params,headers){
var callback = function(status,params,responseText,url,xhr) {
url = url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1);
if(params.length){
params.shift().apply(this,[status,params,responseText,url,xhr]);
}
};
params = params||[];
params.unshift(cb);
var r = doHttp.apply(this,[type,u,data,null,null,null,callback,params,headers]);
if (typeof r == "string")
alert(r);
return r;
},
get : function(url,cb,params){
return DAV.run("GET",url,null,cb,params,null);
},
put : function(url,cb,params,data) {
return DAV.run("PUT",url,data,cb,params,null);
},
move : function(url,cb,params,destination) {
return DAV.run("MOVE",url,null,cb,params,{"Destination":destination,"Overwrite":"T"});
},
copy : function(url,cb,params,destination) {
return DAV.run("COPY",url,null,cb,params,{"Destination":destination,"Overwrite":"T","Depth":0});
},
propfind : function(url,cb,params,prop,depth){ // !!!
var xml = '<?xml version="1.0" encoding="UTF-8" ?>' +
'<D:propfind xmlns:D="DAV:">' +
'<D:prop>'+
'<D:'+prop+'/>'+
'</D:prop>'+
'</D:propfind>';
return DAV.run("PROPFIND",url,xml,cb,params,{"Content-type":"text/xml","Depth":depth?depth:0});
},
makeDir : function(url,cb,params){
return DAV.run("MKCOL",url,null,cb,params,null);
},
options : function(url,cb,params){
return DAV.run("OPTIONS",url,null,cb,params,null);
},
safeput : function(url,cb,params,data){
firstcb = function(status,p,responseText,u,xhr){
if(status)
DAV.move(u,cb,p,u.replace("-davsavingtemp",""));
else
cb.apply(firstcb,arguments);
};
return DAV.put(url+"-davsavingtemp",firstcb,params,data);
}
};
config.DavSaver = {
defaultFileName : 'index.html',
messages : {
startSaveMessage : 'saving to server...',
endSaveMessage : 'TiddlyWiki successfuly saved to server',
overwriteNewerPrompt : 'The remote file has changed since you last loaded or saved it.\nDo you wish to overwrite it?',
getModDateError : "Could not get last modified date",
raceError: "Save failed because the remote file is newer than the one you are trying to save"
},
errors:{
raceconflict : 'The save failed because your file is out of date',
getlastmodified : 'The save was aborted because the last modified date of the file could not be retrieved',
davenabled : 'The server does not support WebDav',
saverss : 'There was an error saving the rss file, the save was aborted',
saveempty: 'There was an error saving the empty file, the save was aborted',
savemain : 'Save failed! There was an error saving the main TW file',
savebackup: 'Save failed! There was an error creating a backup file',
makebackupdir: 'Save failed! The backup directory could not be created'
},
timestamp: new Date().toGMTString(),
orig_saveChanges: saveChanges,
saver : null
};
DavSaver = function(){
this.Q = [];
this.reset = function(){
config.DavSaver.saver = null;
};
this.runQ = function(){
if(this.Q.length){
this.Q.shift().apply(this,arguments);
}
else
this.reset();
};
this.posDiv = null;
this.original = null;
this.getOriginalPath = function(){
var p = document.location.toString();
p = convertUriToUTF8(p,config.options.txtFileSystemCharSet);
var argPos = p.indexOf("?");
if(argPos != -1)
p = p.substr(0,argPos);
var hashPos = p.indexOf("#");
if(hashPos != -1)
p = p.substr(0,hashPos);
if (p.charAt(p.length-1) == "/")
p = p + config.DavSaver.defaultFileName;
return p;
};
this.originalPath = this.getOriginalPath();
this.backupPath = null;
this.emptyPath = null;
this.rssPath = null;
this.throwError = function(er){
clearMessage();
this.reset();
alert(config.DavSaver.errors[er]); //clear message, reset and delete
};
};
DavSaver.prototype.getOriginal = function(){
var callback = function(status,params,original,url,xhr) {
var that = params[0];
if(status){
var p = that.posDiv = locateStoreArea(original);
if(!p || (p[0] == -1) || (p[1] == -1)) {
alert(config.messages.invalidFileError.format([url]));
return;
}
that.original = original;
that.runQ();
}
else
that.throwError('getOriginal');
};
DAV.get(this.originalPath,callback,[this]);
};
DavSaver.prototype.checkRace = function(){
var callback = function(status,params,responseText,url,xhr){
var that = params[0];
if(status){
var lastmod = responseText.match(/<(\w*?):getlastmodified>(.*?)<\/\1:getlastmodified>/)[2];
if(Date.parse(lastmod) > Date.parse(config.DavSaver.timestamp)){
if (confirm(config.DavSaver.messages.overwriteNewerPrompt))
that.runQ();
else
that.throwError('raceconflict');
}
else
that.runQ();
}
else
that.throwError('getlastmodified');
};
DAV.propfind(this.originalPath,callback,[this],"getlastmodified",0);
};
DavSaver.prototype.isDavEnabled = function(){
var callback = function(status,params,responseText,url,xhr){
that = params[0];
if(status && !! xhr.getResponseHeader("DAV")){
that.runQ();
}
else
that.throwError('davenabled');
};
DAV.options(this.originalPath,callback,[this]);
};
DavSaver.prototype.saveRss = function(){
var callback = function(status,params,responseText,url,xhr){
var that = params[0];
if(status){
displayMessage(config.messages.rssSaved,that.rssPath);
that.runQ();
}
else
that.throwError('saverss');
};
var u = this.originalPath;
var rssPath = this.rssPath = u.substr(0,u.lastIndexOf(".")) + ".xml";
DAV.safeput(rssPath,callback,[this],convertUnicodeToUTF8(generateRss()));
};
DavSaver.prototype.saveEmpty = function(){
var callback = function(status,params,responseText,url,xhr){
var that = params[0];
if(status){
displayMessage(config.messages.emptySaved,that.emptyPath);
that.runQ();
}
else
that.throwError('saveempty');
};
var u = this.originalPath;
var emptyPath,p;
if((p = u.lastIndexOf("/")) != -1)
emptyPath = u.substr(0,p) + "/empty.html";
else
emptyPath = u + ".empty.html";
this.emptyPath = emptyPath;
var empty = this.original.substr(0,this.posDiv[0] + startSaveArea.length) + this.original.substr(this.posDiv[1]);
DAV.safeput(emptyPath,callback,[this],empty);
};
DavSaver.prototype.saveMain = function(){
var callback = function(status,params,responseText,url,xhr){
var that = params[0];
if(status){
config.DavSaver.timestamp = xhr.getResponseHeader('Date');
displayMessage(config.messages.mainSaved,that.originalPath);
store.setDirty(false);
that.runQ();
}
else
that.throwError('savemain');
};
var revised = updateOriginal(this.original,this.posDiv);
DAV.safeput(this.originalPath,callback,[this],revised);
};
DavSaver.prototype.saveBackup = function(){
var callback = function(status,params,responseText,url,xhr){
var that = params[0];
if(status){
clearMessage();
displayMessage(config.messages.backupSaved,that.backupPath);
that.runQ();
}
else
that.throwError('savebackup');
};
var backupPath = this.backupPath = getBackupPath(this.originalPath);
DAV.copy(this.originalPath,callback,[this],this.backupPath);
};
DavSaver.prototype.makeBackupDir = function(){
var callback = function(status,params,responseText,url,xhr){
var that = params[0];
if(status)
that.runQ();
else
that.throwError('makebackupdir');
};
var u = getBackupPath(this.originalPath);
var backupDirPath = u.substr(0,u.lastIndexOf("/"));
DAV.makeDir(backupDirPath,callback,[this]);
};
DavSaver.prototype.save = function(onlyIfDirty,tiddlers){
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
displayMessage(config.DavSaver.messages.startSaveMessage);
var Q = this.Q =[];
Q.push(this.isDavEnabled);
Q.push(this.getOriginal);
Q.push(this.checkRace);
if (config.options.chkSaveBackups){
if (config.options.txtBackupFolder!='')
Q.push(this.makeBackupDir);
Q.push(this.saveBackup);
}
Q.push(this.saveMain);
if (config.options.chkGenerateAnRssFeed)
Q.push(this.saveRss);
if (config.options.chkSaveEmptyTemplate)
Q.push(this.saveEmpty);
//Q.push(this.reset);
this.runQ();
};
window.saveChanges = function(onlyIfDirty,tiddlers)
{
var c = config.DavSaver;
if (document.location.protocol.toString() == "http:"){
var saver = c.saver = new DavSaver();
saver.save(onlyIfDirty,tiddlers);
}
else
return c.orig_saveChanges(onlyIfDirty,tiddlers);
};
//!END-PLUGIN-CODE
// %/
[[da|index-da.html]] | [[de|index-de.html]] | [[en|index.html]] | [[en_CA|index-en_CA.html]] | [[en_US|index-en_US.html]] | es | [[fi|index-fi.html]] | [[fr|index-fr.html]] | [[fr_BE|index-fr_BE.html]] | [[fr_CA|index-fr_CA.html]] | [[fr_FX|index-fr_FX.html]] | [[it|index-it.html]] | [[ja|index-ja.html]] | [[nb|index-nb.html]] | [[nl|index-nl.html]] | [[pt|index-pt.html]] | [[sv|index-sv.html]]<<tiddler SiteStats>>
[[da|index-da.html]] | [[de|index-de.html]] | [[en|index.html]] | [[en_CA|index-en_CA.html]] | [[en_US|index-en_US.html]] | es | [[fi|index-fi.html]] | [[fr|index-fr.html]] | [[fr_BE|index-fr_BE.html]] | [[fr_CA|index-fr_CA.html]] | [[fr_FX|index-fr_FX.html]] | [[it|index-it.html]] | [[ja|index-ja.html]] | [[nb|index-nb.html]] | [[nl|index-nl.html]] | [[pt|index-pt.html]] | [[sv|index-sv.html]]