Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
*[[apo33|http://apo33.org]] : Association pour l'art sonore et la musique experimentale
*[[art zoyd|http://www.artzoyd.com]]
<<tabs tabsArtistes
A "A" [[A]]
B "B" [[B]]
C "C" [[C]]
D "D" [[D]]
E "E" [[E]]
F "F" [[F]]
G "G" [[G]]
H "H" [[H]]
I "I" [[I]]
J "K" [J]]
K "K" [[K]]
L "L" [[L]]
M "M" [[M]]
N "N" [[N]]
O "O" [[O]]
P "P" [[P]]
Q "Q" [[Q]]
R "R" [[R]]
S "S" [[S]]
T "T" [[T]]
U "U" [[U]]
V "V" [[V]]
W "W" [[W]]
X "X" [[X]]
Y "Y" [[Y]]
Z "Z" [[Z]]
>>
Le groupement par Archétypes correspond à une typologie des inclinations créatrices développée dans ma thèse de doctorat. Pour plus d'informations vou pouvez lire [[le résumé de la thèse|http://www.sylvainmarquis.com/doku.php/ecrits#these_de_doctorat]] ou [[me contacter|Sylvain Marquis]].
<<tabs tabsArchetypes
Conceptuel-Programmatique "Concept" Conceptuel-Programmatique
Bricoleur-Luthier "Brico" Bricoleur-Luthier
Compositeur-Architecte "Compo" Compositeur-Architecte
Kinesthésique-Musicien "Kinest" Kinesthésique-Musicien
Contemplatif-Audiophile "Audioph" Contemplatif-Audiophile
Narratif-Ethique "Narrat" Narratif-Ethique
>>
*[[william basinski|http://www.freewaves.org/festival_2002/artists/basinski_wj.htm]]
*[[pierre bastien|http://www.pierrebastien.com/]]
[img[Pierre Bastien|../03_MEDIAS/Photos/BASTIEN/somewhereinthedark.jpg]]
*[[biosphere|http://www.biosphere.no/]]
*[[pierre bastien|http://www.pierrebastien.com/]]
*[[nicolas collins|http://www.nicolascollins.com]]
*[[tod dockstader (unofficial)|http://dockstader.info/]]
*[[alain de filippis|http://granuvox.free.fr./]]
*[[ellen fullman|http://www.deepmedia.org/ellenfullman/]]
*[[frédéric le junter|http://perso.orange.fr/le-junter/]]
[img[frédéric le junter|../03_MEDIAS/Photos/LE_JUNTER/lejuntermachine.jpg]]
*[[lemur|http://www.lemurbots.org/]]
*[[janet cardiff|http://www.the-artists.org/ArtistView.cfm?id=8A01F1ED-BBCF-11D4-A93500D0B7069B40]]
[img[Janet Cardiff|../03_MEDIAS/Photos/CARDIFF/cardiff.jpg]]
*[[chercheurs de sons (Gérard Nicollet)|http://chercheursdesons.hautetfort.com/]]
*[[nicolas collins|http://www.nicolascollins.com]]
*[[collectif hameçon|http://hamecon.free.fr/presentation.htm]]
*[[adisq|http://www.adisq.com/doc/gala/nomin-artis.html/]]
*[[autres directions|http://www.autresdirections.net/]]
*[[arras|http://www.arras.net/]]
*[[canadian electroacoustic community|http://cec.concordia.ca/]]
*[[canal b|http://www.rennet.org/canalb/index.php3]]
*[[cdmc|http://www.cdmc.asso.fr/]]
*[[centre de musique canadienne|http://www.centremusique.ca/apps/index.cfm?fuseaction=composer.FA_dsp_browse&by=L]]
*[[chercheurs de sons (Gérard Nicollet)|http://chercheursdesons.hautetfort.com/]]
[img[installation de Jéranium photographiée par Gérard Nicollet|../03_MEDIAS/Photos/JERANIUM/jeraniumnicollet.jpg]]
*[[cqam|http://cqam.org/]]
*[[crumb|http://www.newmedia.sunderland.ac.uk/crumb/phase3/index.html]]
*[[electronic music fondation|http://www.emf.org/]]
*[[fictive|http://www.fictive.org/]]
*[[gram|http://www.comm.uqam.ca/~GRAM/]]
*[[ina grm|http://www.ina.fr/grm/index.fr.html]]
*[[iresco|http://www.iresco.fr/index00.html]]
*[[ircam|http://www.ircam.fr/]]
*[[irma|http://www.irma.asso.fr/]]
*[[just intonation|http://www.justintonation.net/]]
*[[kultureflash|http://www.kultureflash.net/]]
*[[kunstradio online|http://www.kunstradio.at/index1.html]]
*[[l. a. freewaves|http://www.freewaves.org/]]
*[[le terrier|http://www.le-terrier.net/]]
*[[le triton|http://www.letriton.com/]]
*[[les instants chavirés|http://www.instantschavires.com/]]
*[[locus sonus|http://nujus.net/~locusonus/site/index.html]]
*[[london musicians collective|http://www.l-m-c.org.uk/]]
*[[musique action|http://www.musiqueaction.com/]]
*[[neosphere|http://neospheres.free.fr/]]
*[[new american radio|http://www.somewhere.org/NAR/]]
*[[new radio|http://new-radio.org/]]
*[[phonothèque québécoise|http://www.phonotheque.org/]]
*[[phonurgia|http://www.phonurgia.org/]]
*[[pourinfos.org|http://pourinfos.org/]]
*[[project 101|http://www.project-101.com/]]
*[[radio404|http://www.erreur404.org/html2/radio.php3]]
*[[rhizome|http://rhizome.org/]]
*[[siel|http://www.siel-expo.com/]]
*[[somewhere|http://somewhere.org/]]
*[[sonhors|http://sonhors.free.fr/index.htm]]
*[[steim|http://www.steim.org/steim/]]
*[[The EMF Institute|http://emfinstitute.emf.org/]]
*[[the wire|http://www.thewire.co.uk/]]
*[[turbulence|http://turbulence.org/]]
*[[transradio|http://www.transradio.org/fdle/index.php]]
*[[traversesmag|http://traversesmag.org/webring/]]
*[[ubuweb|http://www.ubu.com/]]
*[[villa arson|http://neuromancer.villa-arson.org/]]
*[[xchange|http://xchange.re-lab.net/]]
*[[alva noto|http://www.alvanoto.com/]]
*[[art zoyd|http://www.artzoyd.com]]
*[[biosphere|http://www.biosphere.no/]]
*[[paul dolden|http://www.electrocd.com/en/bio/dolden_pa/]]
*[[philip glass|http://www.philipglass.com/]]
*[[collectif hameçon|http://hamecon.free.fr/presentation.htm]]
*[[jon hassell|http://www.jonhassell.com//]]
*[[trevor horn|http://www.trevorhorn.com/]]
*[[ryoji ikeda|http://www.brainwashed.com/ryoji/]]
*[[labradford|http://www.brainwashed.com/labradford/]]
*[[vincent laubeuf|http://sonsmodedemploi.free.fr/vlaubeuf.htm]]
*[[guillaume loizillon|http://www.guillaume-loizillon.eu/]]
*[[rené lussier|http://www.renelussier.com/]]
*[[vidna obmana|http://www.vidnaobmana.be/]]
*[[mike oldfield|http://www.mikeoldfield.com/]]
*[[jim o'rourke|http://markmartucci.com/jimorourke.html]]
*[[holga pogatschar|http://www.helga-pogatschar.de/]]
*[[steve reich|http://www.stevereich.com/]]
*[[david shea|http://www.dshea.net/]]
*[[morton feldman page|http://www.cnvill.demon.co.uk/mfhome.htm]]
*[[bill fontana|http://www.resoundings.org/]]
*[[susan hiller|http://www.susanhiller.org/]]
*[[jérôme joy|http://joy.nujus.net/]]
*[[hans peter kuhn|http://www.hpkuhn-art.de/]]
[img[frozen heat|../03_MEDIAS/Photos/KUHN/frozenheat1.jpg]]
*[[alvin lucier|http://alucier.web.wesleyan.edu/index.html]]
*[[christof migone|http://www.christofmigone.com/index_cm.html]]
*[[akira rabelais|http://www.akirarabelais.com/]]
*[[michel redolfi|http://www.redolfi-music.com/index_n.htm#]]
*[[william basinski|http://www.freewaves.org/festival_2002/artists/basinski_wj.htm]]
*[[biosphere|http://www.biosphere.no/]]
*[[morton feldman page|http://www.cnvill.demon.co.uk/mfhome.htm]]
*[[bill fontana|http://www.resoundings.org/]]
*[[bernhard günter|http://www.bernhardguenter.com/]]
*[[labradford|http://www.brainwashed.com/labradford/]]
*[[fransisco lopez|http://www.franciscolopez.net/]]
[img[Blind...|../03_MEDIAS/Photos/LOPEZ/blind5.jpg]]
*[[alvin lucier|http://alucier.web.wesleyan.edu/index.html]]
*[[max neuhaus|http://www.max-neuhaus.info/home.htm]]
*[[alva noto|http://www.alvanoto.com/]]
*[[vidna obmana|http://www.vidnaobmana.be/]]
*[[Jean-Luc Parant|http://jeanlucparant.free.fr/]]
*[[akira rabelais|http://www.akirarabelais.com/]]
*[[michel redolfi|http://www.redolfi-music.com/index_n.htm#]]
*[[robert rich|http://www.robertrich.com/]]
*[[scanner|http://www.scannerdot.com/sca_001.html]]
*[[klaus shulze|http://www.klaus-schulze.com/]]
*[[rafael toral|http://www.rafaeltoral.net/]]
*[[chris watson|http://www.chriswatson.net/]]
[img[Chris Watson|../03_MEDIAS/Photos/WATSON/iceland0603.jpg]]
/***
|''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);
};
}
//}}}
*[[tod dockstader (unofficial)|http://dockstader.info/]]
[img[Tod Dockstader|../03_MEDIAS/Photos/DOCKSTADER/picture17.jpg]]
*[[paul dolden|http://www.electrocd.com/en/bio/dolden_pa/]]
[[Présentation Internet]]
/***
|''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");
}
//}}}
Principaux catalogues de distribution phonographique :
*[[forced exposure|http://www.forcedexposure.com/index.html]]
*[[metamkine|http://www.metamkine.com/]]
*[[orkhestra|http://www.orkhestra.fr/]]
Editions et labels :
*[[a bruit secret|http://www.abruitsecret.com/]]
*[[a-musik|http://www.a-musik.com/]]
*[[actuellecd|http://www.actuellecd.com/]]
*[[al dante|http://www.aldante.org/]]
*[[amanita records|http://www.amanitarecords.com]]
*[[ambiances magnétiques|http://www.ambiancesmagnetiques.com/]]
*[[amorfon|http://www.amorfon.com/]]
*[[annette works|http://annetteworks.com/]]
*[[another record|http://www.another-record.com/]]
*[[aquarius records|http://www.aquariusrecords.org/]]
*[[artsonique|http://www.artsonique.com/]]
*[[ash international|http://www.ashinternational.com/]]
*[[atlantis records|http://www.atlantisrecords.com/]]
*[[beta-lactam ring records|http://www.blrrecords.com/]]
*[[bimbo tower|http://bimbo.tower.free.fr/]]
*[[boltfish recordings|http://www.boltfish.co.uk/the_label.htm]]
*[[boosey & hawkes|http://www.boosey.com/]]
*[[brainwashed recoding companies|http://www.brainwashed.com/index.php?option=com_content&task=view&id=943&Itemid=57]]
*[[cold meat industry|http://www.coldmeat.se/home.html]]
*[[comatonse recordings|http://www.comatonse.com/]]
*[[cuneiform records|http://cuneiformrecords.com/index.shtml]]
*[[deméter|http://www.univ-lille3.fr/revues/demeter/]]
*[[discography of new age, electronic, and ambient music|http://www.scaruffi.com/newage/labels.html]]
*[[discogs|http://www.discogs.com/]]
*[[disques du soleil et de l'acier|http://www.dsa-shop.com/]]
*[[earth ear|http://earthear.com/index.html]]
*[[eContact!|http://cec.concordia.ca/econtact/index.htm]]
*[[éditions jobert|http://www.jobert.fr/cgi-bin/home.pl]]
*[[ellipsis|http://www.editionellipsis.com/]]
*[[epidemic|http://epidemic.cicv.fr/]]
*[[equilibrium|http://www.equilibriummusic.com/]]
*[[erratum|http://erratum.org]]
*[[fat cat records|http://fat-cat.co.uk/fatcat/home.php]]
*[[groovylab|http://groovylab.com/sundays/index001.html]]
*[[improvised music from japan|http://www.japanimprov.com/]]
*[[inpolysons|http://inpolysons.free.fr/]]
*[[ipecac recordings|http://www.ipecac.com/main.php]]
*[[irdial|http://www.irdial.com/]]
*[[j-music|http://www.j-music.com/]]
*[[Kranky|http://www.kranky.net/]]
*[[leonardo|http://mitpress2.mit.edu/e-journals/Leonardo/index.html]]
*[[line|http://www.12k.com/line/]]
*[[lovely music|http://www.lovely.com/index.html]]
*[[lucky kitchen|http://www.luckykitchen.com/]]
*[[manifold records|http://www.manifoldrecords.com/]]
*[[mego|http://www.mego.at/]]
*[[musica falsa|http://www.musicafalsa.com/]]
*[[musicworks|http://www.musicworks.ca/]]
*[[negativland|http://www.negativland.com/]]
*[[new age record companies|http://www.mfna.org/companies.html]]
*[[n-rec|http://www.n-rec.com/]]
*[[optical sound and aspic records|http://www.opticalsound-and-aspicrecords.com/]]
*[[pfmentum|http://www.pfmentum.com/]]
*[[potlatch|http://www.potlatch.fr/]]
*[[praemedia|http://shop.praemedia.com/]]
*[[prism escape|http://www.prism-escape.com/]]
*[[progressive form|http://www.dropcontrol.com/~p_form/]]
*[[quecksilber music|http://www.quecksilber-music.com/]]
*[[r & s|http://www.rsrecords.com/]]
*[[ralph america|http://www.ralphamerica.com/]]
*[[raster noton|http://www.raster-noton.de/start.html]]
*[[rilm|http://www.rilm.org/index.html]]
*[[rough trade|http://www.roughtrade.com/site/index.lasso]] | [[rough trade records|http://www.roughtraderecords.com/]]
*[[serpent's tail publishing|http://www.serpentstail.com/]]
*[[simple sampling|http://www.simplesampling.com/]]
*[[sonig|http://www.sonig.com/]]
*[[sonore|http://www.sonore.com/]]
*[[sordide sentimental|http://perso.wanadoo.fr/sordide.sentimental/]]
*[[sub rosa|http://www.subrosa.net/index_fr.htm]]
*[[the leaf label|http://www.theleaflabel.com/]]
*[[the projekt|http://www.projekt.com/lobby.asp]]
*[[touch|http://www.touchmusic.org.uk/]]
*[[trace|http://www.tracelab.com/]]
*[[trente oiseaux|http://www.trenteoiseaux.com/]]
*[[turtles' dream|http://www.abruitsecret.com/turtles_dream/turtle_(fr).htm]]
*[[tzadik|http://tzadik.com/]]
*[[vibrö|http://www.vibrofiles.com/]]
*[[warp records|http://www.warprecords.com/]]
*[[wave records|http://www.wave-records.com/wave/index.htm]]
*[[david fenech|http://www.livejournal.com/users/david_f/]] : Audioblog
*[[morton feldman page|http://www.cnvill.demon.co.uk/mfhome.htm]]
[img[Morton Feldman (1936-1987)|../03_MEDIAS/Photos/FELDMAN/mortonfeldman.jpg]]
*[[bill fontana|http://www.resoundings.org/]]
*[[alain de filippis|http://granuvox.free.fr./]]
*[[ellen fullman|http://www.deepmedia.org/ellenfullman/]]
*[[fred frith|http://www.fredfrith.com/]]
[img[fred frith|../03_MEDIAS/Photos/FRITH/frithguitar1.jpg]] [img[fred frith|../03_MEDIAS/Photos/FRITH/frithguitar2.jpg]]
*[[michael gendreau|http://www.zeromoon.com/mg/]]
*[[philip glass|http://www.philipglass.com/]]
*[[bernhard günter|http://www.bernhardguenter.com/]]
*[[collectif hameçon|http://hamecon.free.fr/presentation.htm]]
*[[jon hassell|http://www.jonhassell.com//]]
*[[susan hiller|http://www.susanhiller.org/]]
*[[aki honda|http://www.japanimprov.com/aonda/]]
*[[trevor horn|http://www.trevorhorn.com/]]
*[[ryoji ikeda|http://www.brainwashed.com/ryoji/]]
*[[jérôme joy|http://joy.nujus.net/]]
*[[kalerne|http://www.kalerne.net]] : platform for sharing informations and experiences concerning soundscapes
*[[hans peter kuhn|http://www.hpkuhn-art.de/]]
[img[undifined landscape|../03_MEDIAS/Photos/KUHN/undefined1released.jpg]]
*[[art zoyd|http://www.artzoyd.com]]
*[[fred frith|http://www.fredfrith.com/]]
[img[fred frith|../03_MEDIAS/Photos/FRITH/fredfrith.jpg]]
*[[michael gendreau|http://www.zeromoon.com/mg/]]
*[[laibach|http://www.laibach.nsk.si/]]
*[[laptop orchestra|http://laptoporchestra.net/]]
*[[rené lussier|http://www.renelussier.com/]]
*[[kaffe matthews|http://annetteworks.com/]]
[img[kaffe matthews|../03_MEDIAS/Photos/MATTHEWS/kaffematthews.jpg]]
*[[midaircondo|http://www.midaircondo.com/flash.html]]
*[[ikue mori|http://www.ikuemori.com/]]
*[[ottoanna|http://www.ottoanna.com/]]
*[[poire_z|http://www.for4ears.com/poire_z/welcome.html]]
*[[la stpo|http://www.stpo.blrrecords.com/]]
*[[david sylvian|http://www.davidsylvian.com/]]
*[[tangerine dream|http://www.tangerinedream.org/]]
*[[martin tétreault|http://www.actuellecd.com/fr/bio/tetreault_ma/]]
[img[Martin Tétreault|../03_MEDIAS/Photos/TETREAULT/ensemble.jpg]]
*[[david toop|http://www.davidtoop.com/]]
*[[jean-françois vrod|http://www.jf-vrod.com/]]
[img[jean-françois vrod|../03_MEDIAS/Photos/VROD/jfvrod.jpg]]
*[[otomo yoshihide|http://www.japanimprov.com/yotomo/index.html]]
[img[Yoshihide et le new jazz ensemble|../03_MEDIAS/Photos/YOSHIHIDE/otomojazz.jpg]] [img[Otomo Yoshihide|../03_MEDIAS/Photos/YOSHIHIDE/otomoyoshihide.jpg]] [img[Otomo Yoshihide|../03_MEDIAS/Photos/YOSHIHIDE/Yoshihide300p.jpg]]
*[[labradford|http://www.brainwashed.com/labradford/]]
*[[laibach|http://www.laibach.nsk.si/]]
*[[vincent laubeuf|http://sonsmodedemploi.free.fr/vlaubeuf.htm]]
*[[laptop orchestra|http://laptoporchestra.net/]]
*[[lemur|http://www.lemurbots.org/]]
*[[frédéric le junter|http://perso.orange.fr/le-junter/]]
[img[frédéric le junter|../03_MEDIAS/Photos/LE_JUNTER/flejunter.jpg]]
*[[guillaume loizillon|http://www.guillaume-loizillon.eu/]]
*[[francisco lopez|http://www.franciscolopez.net/]]
*[[alvin lucier|http://alucier.web.wesleyan.edu/index.html]]
*[[rené lussier|http://www.renelussier.com/]]
/***
|''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"
//}}}
*[[sachiko M|http://www.japanimprov.com/sachikom/]]
[img[Schiko M.|../03_MEDIAS/Photos/SACHIKO_M/sachiko_M.jpg]]
*[[kaffe matthews|http://annetteworks.com/]]
[img[kaffe matthews|../03_MEDIAS/Photos/MATTHEWS/kaffematthews.jpg]]
*[[midaircondo|http://www.midaircondo.com/flash.html]]
*[[christof migone|http://www.christofmigone.com/index_cm.html]]
*[[ikue mori|http://www.ikuemori.com/]]
[[Artistes groupés par Archétypes]]
|
[[Artistes de A à Z]]
|
[[Communautés]]
|
[[Edition]]
|
@@bgcolor:white;''[[www.sylvainmarquis.com|http://www.sylvainmarquis.com]]''@@
*[[max neuhaus|http://www.max-neuhaus.info/home.htm]]
*[[chercheurs de sons (Gérard Nicollet)|http://chercheursdesons.hautetfort.com/]]
*[[alva noto|http://www.alvanoto.com/]]
*[[aki honda|http://www.japanimprov.com/aonda/]]
*[[christof migone|http://www.christofmigone.com/index_cm.html]]
*[[radiomentale|http://www.radiomentale.com//]]
*[[scanner|http://www.scannerdot.com/sca_001.html]]
*[[john watermann microsound memorial|http://microsound.org/watermann/]]
*[[gregory whitehead|http://gregorywhitehead.com/vze4bsve/]]
[img[gregory whitehead|../03_MEDIAS/Photos/WHITEHEAD/vicekopfer.jpg]]
*[[v/vm|http://brainwashed.com/vvm/]]
[img[V/Vm|../03_MEDIAS/Photos/V-VM/VVM787443.jpg]]
*[[vidna obmana|http://www.vidnaobmana.be/]]
*[[mike oldfield|http://www.mikeoldfield.com/]] | [[mike oldfiel official information service|http://www.mikeoldfield.org/]]
*[[jim o'rourke|http://markmartucci.com/jimorourke.html]]
*[[ottoanna|http://www.ottoanna.com/]]
*[[Jean-Luc Parant|http://jeanlucparant.free.fr/]]
*[[holga pogatschar|http://www.helga-pogatschar.de/]]
*[[poire_z|http://www.for4ears.com/poire_z/welcome.html]]
<div class='header' macro='gradient vert #FFF #FFF '>
<div class='gradient'>
<div class='titleLine' >
<span class='searchBar' macro='search'></span>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
</div>
</div>
<div id='bodywrapper'>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<div id='displayFooter'></div>
</div>
PasswordOptionPlugin extends the core Options with a non encrypted password type.
Notice:
*How a style can be specified for a specific option in StyleSheet
----
Test Password: <<option pasPassword myPasOptionInput >>
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
''Cette sitothèque réunit des liens internet et des images concernant les pratiques sonores expérimentales actuelles.'' Elle ouvre sur de nombreuses sources d'information, tant textuelle que sonore ou vidéo.
Pour fonctionner correctement, il faut soit l'ouvrir à partir du CD, soit copier l'ensemble du dossier SITOTHEQUE sur votre disque dur afin que cette page puisse accéder à ses ressources images, vidéos et sons. L'accès à Internet est indispensable pour profiter des nombreux liens. Tous les liens internet s'ouvrent dans une nouvelle fenêtre (ou un nouvel onglet).
S'il est impossible de naviguer, merci d'installer la dernière version du navigateur Firefox sur votre ordinateur à partir de [[ce lien|http://http://www.mozilla-europe.org/fr/products/firefox/]] ou encore à partir du dossier "04_LOGICIELS".
Cette version sur CD a été réalisée en octobre 2007. Une version en ligne mise à jour est disponible sur le site http://www.sylvainmarquis.com.
[[Sylvain Marquis]]
''Cette sitothèque réunit des liens internet et des images concernant les pratiques sonores expérimentales actuelles.'' Elle ouvre sur de nombreuses sources d'information, tant textuelle que sonore ou vidéo. Tous les liens internet s'ouvrent dans une nouvelle fenêtre (ou un nouvel onglet).
S'il est impossible de naviguer, merci d'installer la dernière version du navigateur Firefox sur votre ordinateur à partir de [[ce lien|http://http://www.mozilla-europe.org/fr/products/firefox/]].
La première version de cette sitothèque a été réalisée en Octobre 2007 en annexe de ma thèse de doctorat : //L'attitude spéculative dans les arts sonores actuels//. Cette version en ligne est mise à jour le plus souvent possible.
Bonne visite
[[Sylvain Marquis]]
*[[akira rabelais|http://www.akirarabelais.com/]]
*[[radiomentale|http://www.radiomentale.com//]] :
**[[disc over|http://www.disc-over.org/index_home.htm]]
**[[laptop love|http://www.laptoplove.org/index_home.htm]]
*[[michel redolfi|http://www.redolfi-music.com/index_n.htm#]]
*[[steve reich|http://www.stevereich.com/]]
*[[robert rich|http://www.robertrich.com/]]
[img[Robert Rich au SoundScape Studio|../03_MEDIAS/Photos/RICH/robertrich.jpg]]
*[[scanner|http://www.scannerdot.com/sca_001.html]]
*[[david shea|http://www.dshea.net/]]
*[[klaus shulze|http://www.klaus-schulze.com/]]
*[[la stpo|http://www.stpo.blrrecords.com/]]
*[[david sylvian|http://www.davidsylvian.com/]]
<<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<upload>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
par [[Sylvain Marquis]]
(dernière maj : 31/10/2007)
/***
|''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);
}
};
}
//}}}
/***
!General
***/
/*{{{*/
body {
background: #EDEDED;
}
#contentWrapper{
background: #fff;
border:1px solid #DDD;
margin: 0 1em;
padding:0;
height:1%;
}
/*}}}*/
/***
!Links
***/
/*{{{*/
a,
a.tiddlyLink,
a.button,
a.externalLink,
#sidebarOptions .sliderPanel a{
color: #1D65BC;
text-decoration: none;
background: transparent;
border: 0;
}
a:hover,
a.tiddlyLink:hover,
a.button:hover,
a.externalLink:hover,
#sidebarOptions .sliderPanel a:hover
{
border: 0;
color: #1D65BC;
text-decoration: underline;
background:transparent;
}
/*}}}*/
/***
!Header
***/
/*{{{*/
.gradient {margin-top:1em; background:#3371A3;}
.titleLine{padding: 30px 40px 15px 30px;}
.titleLine a:hover{color:#fff; border-bottom:1px dotted #eee; text-decoration:none;}
.titleLine a{color:#fff; border-bottom:1px dotted #ccc;}
.siteTitle {
font-size: 2.2em;
font-weight: bold;
color:#fff;
}
.siteSubtitle {
font-size: 1.0em;
display: block;
margin: .3em auto 1em;
color:#fff;
}
/*}}}*/
/***
!TopMenu
***/
/*{{{*/
#topMenu br {display:none; }
#topMenu { background: #3371A3; font-size:1em; }
#topMenu { padding:5px 32px; }
#topMenu .button, #topMenu .tiddlyLink {
margin-left:0.1em; margin-right:0.1em;
padding:0.5em;
color:white; font-weight:bold;
}
#topMenu a.button:hover, #topMenu a.tiddlyLink:hover { background:#fff; color:#333; text-decoration:none;}
/*}}}*/
/***
!Display
***/
/***
!!!Display General
***/
/*{{{*/
#displayArea { margin: 0em 15.7em 0em 0em; }
#displayFooter {
clear: both;
}
/*}}}*/
/***
!!!Tiddler
***/
/*{{{*/
.tiddler {margin-bottom:1em; padding-bottom:1em;}
.tiddler {padding-left:1.5em;}
.title {color:#333; font-size:1.8em; border-bottom:1px solid #333; padding-bottom:0.3px;}
.subtitle { font-size:90%; color:#bbb; padding-left:0.25em; margin-top:0.1em; }
.shadow .title {
color: #aaa;
}
h1,h2,h3,h4,h5 { color: #333; background: transparent; padding-bottom:2px; border-bottom: 1px dotted #666; }
* html .viewer pre {
margin-left: 0em;
}
.viewer hr {
border: 0;
border-top: solid 1px #333;
margin: 0 8em;
color: #333;
}
.viewer a.button {color:#000; border:1px solid #1D65BC; font-weight:bold;}
.viewer a.button:hover{color:#fff; background:#3371a3; text-decoration:none;}
.tagClear {clear:none;}
/*}}}*/
/***
!!!Editor
***/
/*{{{*/
* html .editor textarea, * html .editor input {
width: 98%;
}
/*}}}*/
/***
!Sidebar
***/
/*{{{*/
#sidebar{
position:relative;
float:right;
margin-bottom:1em;
display:inline;
width: 16em;
}
/*}}}*/
.toolbar .button {color:#bbb; border:none;}
.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active {background:transparent; color:#111; border:none; text-decoration:underline;}
.tiddler {border-bottom:3px solid #EEF1F3; padding-bottom:2em; padding-top:0em;}
.title {border-bottom:none; margin-right:8em;}
h1,h2,h3,h4,h5 { color: #333; background: transparent; padding-bottom:2px; border-bottom: none; }
#sidebar {background: #EBEEF1 ; right:0;}
#displayFooter {
clear: both;
}
#tiddlerDisplay{padding-top:1em;}
#sidebar .tabSelected, #sidebar .tabSected:hover {
color: #000;
background: #dbdee3;
border-top: solid 1px #B2B6BE;
border-left: solid 1px #B2B6BE;
border-right: solid 1px #B2B6BE;
border-bottom:solid 1px #dbdee3 !important;
padding-bottom:1px;
text-decoration:none;
}
#sidebarOptions, #sidebarTabs {border-left: 1px solid #B2B6BE;}
#sidebarTabs {border-bottom: 1px solid #B2B6BE;}
#sidebar .tabUnselected, #sidebar .tabUnselected:hover {
color: #F0F3F5;
background: #B2B6BE ;
border: solid 1px #B2B6BE ;
padding-bottom:1px;
}
#sidebarTabs .tabContents {border:none; background:#DBDEE3; }
#sidebarTabs .tabContents {border-top:1px solid #B2B6BE;}
#sidebarTabs .tabContents .tabContents {border-left:1px solid #b2b6be;}
.viewer pre, .viewer code {
border: 1px solid #B2B6BE;
background: #EBEEF1;}
#sidebarOptions .sliderPanel {
background: #EBEEF1; border:none;
}
#sidebarOptions input {
border: 1px solid #1d65bc;
}
#sidebarOptions input:hover, #sidebarOptions input:active, #sidebarOptions input:focus {
border: 1px inset #3371a3;
}
.tagging, .tagged {
border: 1px solid #dbdee3;
background-color: #ebeef1;
}
.selected .tagging, .selected .tagged {
background-color: #dbdee3;
border: 1px solid #B2B6BE;
}
.tagging .listTitle, .tagged .listTitle {
color: #bbb;
}
.selected .tagging .listTitle, .selected .tagged .listTitle {
color: #014;
}
.tagging .button:hover, .tagged .button:hover {
border: none; background:transparent; text-decoration:underline; color:#014;
}
.tagged .highlight, .tagged .marked, .tagged a.button:active {text-decoration:underline; background:transparent; color:#014;}
.tagging .button, .tagged .button {
color:#bbb;
}
.selected .tagging .button, .selected .tagged .button {
color:#014;
}
.viewer blockquote {
border-left:7px solid #ebeef1;
}
.viewer table {
border: 1px solid #3371a3;
}
.viewer th, thead td {
background: #3371a3;
border: 1px solid #3371a3;
color: #fff;
}
.viewer td, .viewer tr {
border: 1px solid #3371a3;
}
.editor input, .editor textarea {
border: 1px solid #1d65bc; background:#ebeef1;
}
.editor {padding-top:0.3em;}
.editor textarea:focus, .editor input:focus {
border: 1px inset #3371a3; background:#fff;
}
.popup {
background: #3371a3;
border: 1px solid #333;
}
.popup hr {
color: #333;
background: #333;
border-bottom: 1px;
}
.popup li.disabled {
color: #333;
}
.popup li a, .popup li a:visited {
color: #eee;
border: none;
}
.popup li a:hover {
background: #3371a3;
color: #fff;
border: none;
text-decoration:underline;
}
.viewer .button:active, .viewer .marked, .viewer .highlight {
color: #fff !important;
background: #3371a3;
border: 0;
}
.button:active {background:#1d65bc; border:0;}
#sidebar .button:active, #sidebar .marked, #sidebar .highlight {color:#014; background:transparent;text-decoration:none}
#messageArea {
border: 2px dashed #3371a3;
background: #dbdee3;
color: #fff;
font-size:90%;
}
#messageArea .button {
color: #1d65bc;
background: #ebeef1;
text-decoration:none;
font-weight:bold;
border:none;
}
#messageArea a.button {color:#1d65bc;}
#messageArea .button:hover {text-decoration:underline;}
.viewer .tabSelected, .viewer .tabSelected:hover{
color: #014;
background: #eee;
border-left: 1px solid #B2B6BE;
border-top: 1px solid #B2B6BE;
border-right: 1px solid #B2B6BE;
}
.viewer .tabUnselected, .viewer .tabUnselected:hover {
color: #fff;
background: #B2B6BE;
}
. viewer .tabContents {
color: #014;
background: #ebeef1;
border: 1px solid #B2B6BE;
}
.searchBar {float:right; font-size:0.9em;}
.searchBar .button {display:block; border:none; color:#ccc;}
.searchBar .button:hover{border:none; color:#eee;}
.searchBar input{
border: 1px inset #1d65bc; background:#dbdee3;
}
.searchBar input:focus {
border: 1px inset #3371a3; background:#fff;
}
.blog h2, .blog h3, .blog h4{
margin:0;
padding:0;
border-bottom:none;
}
.blog {margin-left:1.5em;}
.blog .excerpt {
margin:0;
margin-top:0.3em;
padding: 0;
margin-left:1em;
padding-left:1em;
font-size:90%;
border-left:1px solid #ddd;
}
#tiddlerWhatsNew h1, #tiddlerWhatsNew h2 {border-bottom:none;}
div[tags~="RecentUpdates"], div[tags~="lewcidExtension"] {margin-bottom: 2em;}
#topMenu .fontResizer {float:right;}
#topMenu .fontResizer .button{border:1px solid #3371A3;}
#topMenu .fontResizer .button:hover {border:1px solid #fff; color:#3371A3;}
#sidebarTabs .txtMainTab .tiddlyLinkExisting {
font-weight: normal;
font-style: normal;
}
#sidebarTabs .txtMoreTab .tiddlyLinkExisting {
font-weight: bold;
font-style: normal;
}
Vous pouvez me contacter à contact[arobase]sylvainmarquis.com
Mon site est accessible à http://www.sylvainmarquis.com
*[[hans tammen|http://www.tammen.org/]]
*[[tangerine dream|http://www.tangerinedream.org/]]
*[[terre thaemlitz|http://www.comatonse.com/thaemlitz/index.html]]
[img[Terre Thaemlitz|../03_MEDIAS/Photos/THAEMLITZ/thaemlitz01.jpg]]
*[[martin tétreault|http://www.actuellecd.com/fr/bio/tetreault_ma/]]
[img[Martin Tétreault|../03_MEDIAS/Photos/TETREAULT/TETREAULT_MARTIN.jpg]]
*[[david toop|http://www.davidtoop.com/]]
*[[rafael toral|http://www.rafaeltoral.net/]]
[img[Rafael Toral|../03_MEDIAS/Photos/TORAL/toral1.jpg]] [img[Rafael Toral|../03_MEDIAS/Photos/TORAL/toral2.jpg]]
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 13/04/2008 01:13:32 | Sylvain | [[sitotheque.html|file:///Users/sylvain/Desktop/2008%2004%20Sitotheque%20en%20cours/sitotheque.html]] | [[|file:///Users/sylvain/Desktop/2008%2004%20Sitotheque%20en%20cours/]] | http://www.sylvainmarquis.com/sitotheque/store.php | [[sitotheque.html | file:///Users/sylvain/Desktop/2008%2004%20Sitotheque%20en%20cours/http://www.sylvainmarquis.com/sitotheque/store.php/sitotheque.html]] | | failed |
| 13/04/2008 01:15:29 | Sylvain | [[sitotheque.html|file:///Users/sylvain/Desktop/2008%2004%20Sitotheque%20en%20cours/sitotheque.html]] | [[|file:///Users/sylvain/Desktop/2008%2004%20Sitotheque%20en%20cours/]] | http://www.sylvainmarquis.com/sitotheque/store.php | [[sitotheque.html | file:///Users/sylvain/Desktop/2008%2004%20Sitotheque%20en%20cours/http://www.sylvainmarquis.com/sitotheque/store.php/http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | | failed |
| 13/04/2008 01:16:19 | Sylvain | [[sitotheque.html|file:///Users/sylvain/Desktop/2008%2004%20Sitotheque%20en%20cours/sitotheque.html]] | [[store.php|http://www.sylvainmarquis.com/sitotheque/store.php]] | . | [[sitotheque.html | http://www.sylvainmarquis.com/sitotheque/http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | |
| 13/04/2008 01:18:10 | Sylvain | [[sitotheque.html|http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | [[store.php|http://www.sylvainmarquis.com/sitotheque/store.php]] | . | [[sitotheque.html | http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | |
| 13/04/2008 01:18:52 | Sylvain | [[sitotheque.html|http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | [[store.php|http://www.sylvainmarquis.com/sitotheque/store.php]] | . | [[sitotheque.html | http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | |
| 13/04/2008 01:22:57 | Sylvain | [[sitotheque.html|http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | [[store.php|http://www.sylvainmarquis.com/sitotheque/store.php]] | . | [[sitotheque.html | http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | | ok |
| 13/04/2008 01:24:07 | Sylvain | [[sitotheque.html|http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | [[store.php|http://www.sylvainmarquis.com/sitotheque/store.php]] | . | [[sitotheque.html | http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | |
| 21/04/2008 12:32:28 | Sylvain | [[sitotheque.html|http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | [[store.php|http://www.sylvainmarquis.com/sitotheque/store.php]] | . | [[sitotheque.html | http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | |
| 07/05/2008 10:36:59 | Sylvain | [[sitotheque.html|http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | [[store.php|http://www.sylvainmarquis.com/sitotheque/store.php]] | . | [[sitotheque.html | http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | |
| 07/05/2008 10:41:10 | Sylvain | [[sitotheque.html|http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | [[store.php|http://www.sylvainmarquis.com/sitotheque/store.php]] | . | [[sitotheque.html | http://www.sylvainmarquis.com/sitotheque/sitotheque.html]] | |
UploadPlugin uses the following sequence for finding parameters :
#''macro'' parameters
#''Options'' saved in cookies
#''Plugin'' default values
!Options used by UploadPlugin
| Option | Value | Default |
|Upload Username: |<<option txtUploadUserName>>| |
|Upload Password: |<<option pasUploadPassword>>| |
|Url of the UploadService script: |<<option txtUploadStoreUrl urlInput>>| store.php |
|Relative Directory where to store the file: |<<option txtUploadDir urlInput>>| . (the script directory) |
|Filename of the uploaded file: |<<option txtUploadFilename urlInput>>| index.html |
|Directory to backup file on webserver^^(1)^^: |<<option txtUploadBackupDir urlInput>>| //null// (none/no backup) |
|Log in UploadLog |<<option chkUploadLog>> Trace Upload| true |
|Maximum of lines in UploadLog |<<option txtUploadLogMaxLine>>| 10 |
^^(1)^^No backup if Backup Directory is empty, the previous file will be overwritten. Use a '.' to backup in the script directory.
<<upload>> with these options.
!Upload Macro parameters
{{{
<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>
Optional positional parameters can be passed to overwrite UploadOptions.
}}}
!UploadToFile Macro Macro parameters
{{{
<<uploadTofile [filename [tiddlerTitle]]>>
tiddlerTitle, filename: if omitted the title of the current tiddler
}}}
<<uploadToFile allowedsites.txt allowedsites.txt>>
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 3,
date: new Date("Feb 24, 2008"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
if (!params) params = {};
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
var rssString = generateRss();
// no UnicodeToUTF8 conversion needed when location is "file" !!!
if (document.location.toString().substr(0,4) != "file")
rssString = convertUnicodeToUTF8(rssString);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == httpStatus.NotFound)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}
//last update: UploadPlugin v 4.1.3//
!Description
UploadPlugin with <<tag UploadService>> extend TiddlyWiki with @@upload@@ and @@save to web@@ commands.
UploadPlugin uses Username and Password from UploadOptions stored in cookies to authenticate itself to [[store.php]] or [[store.cgi]].
UploadPlugin requires PasswordOptionPlugin.
French translation available as a separate tiddler UploadPluginMsgFR
!!UploadPlugin
*If the TiddlyWiki is viewed @@from local disk@@ :
**{{{<<upload ...>>}}}
***display as '''upload'''
***after saving to disk, upload to a website.
*If the TiddlyWiki is viewed @@from a website@@ :
**{{{<<upload ...>>}}}
***display as '''save to web'''
***save to the same website.
*If GenerateAnRssFeed in AdvancedOptions is set :
**generate the content of the RSSFeed
**upload the RssFile
**Caution : use the SiteUrl tiddler to specify the right url of the TiddlyWiki in the generated RssFile
*DisplayMessage
*If a backupDir is specified
**and if a file already exists in the uploadDir withe the same fielname, move it in the backup dir and rename it with a timestamp
*if UploadLog is activated every upload action is logged in UploadLog
**only the last maxLines are stored
**if maxLine = -1 no truncation will occured
hint : if UploadLog is the first tiddler in the TimelineTab, no tiddler has been changed since last upload.
!![[store.php]]
*UserVariables to set :
//{{{
$AUTHENTICATE_USER = true; // true | false
$USERS = array(
'UserName1'=>'Password1',
'UserName2'=>'Password2',
'UserName3'=>'Password3'); // set usernames and strong passwords
$DEBUG = false; // true | false
//}}}
*method GET
**display an information page
*method POST
**if $~AUTHENTICATE_USER is ''true''
***presence and value of user and password are checked with $USER and $PASSWORD
**if toFilename already exists and backDir parameter specified
***rename toFilename to backupDir/toFilename.AAAAMMDD.HHSS.html
**copy temporaryUploadedFile toFilename
**return status
!![[store.cgi]]
*UserVariables to set :
//{{{
CONFIG = {
:users => {
'UserName1'=>'Password1',
'UserName2'=>'Password2',
'UserName3'=>'Password3')
},
:authenticateUser => true,
:backupExistingFile => true,
:withUploadDir => true
}
//}}}
*same processing as store.php above
!Usage :
{{{
<<upload>>
uses UploadOptions saved in cookies :
txtUploadUserName: username
pasUploadPassword : password
txtUploadStoreUrl : store script
txtUploadDir : relative path for upload directory
txtUploadFilename : upload filename
txtUploadBackupDir : relative path for backup directory
<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>
Optional positional parameters can be passed to overwrite
UploadOptions.
}}}
Suggestion: Install the {{{<<upload ... >>}}} macro in SideBarOptions just below {{{<<saveChanges>>}}} macro.
!User manual
See HowToUpload
!Installation :
*Install the UploadPlugin as usual
*[[Upload]] the [[store.php]] file on your php aware webserver in your TiddlyWiki directory
*Protect your server against malicious upload. Two approaches :
**set $~AUTHENTICATE_USER to true in the [[store.php]] script
***configure $USER and $PASSWORD in the [[store.php]] script on your webserver
***set UploadOptions in conformity with [[store.php]]
**Use server protection :
***for Apache web server ([[for detail see Apache documentation|http://httpd.apache.org/docs/1.3/howto/htaccess.html]]) :
****configure and upload the [[.htaccess]] [[.passwd]]
***for other web servers see the appropriate documentation
*Configure an upload button, for example in the SideBarOptions
!Suppported Browser
*Firefox and Gecko based browser: tested Ok
*Internet Explorer : tested Ok
*Safari : tested ok on OS X
*Others : Not tested, please report status.
!Revision history
<<tiddler UploadPluginRevisionHistory>>
/***
|''Name:''|UploadPluginLingoFR|
|''Description:''|French Translation|
|''Version:''|4.1.0|
|''Date:''|May 8, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPluginLingoFR|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|UploadPlugin UploadToHomeMacro|
***/
//{{{
config.macros.upload.label = {
promptOption: "Sauvegarde et télécharge ce TiddlyWiki avec les UploadOptions",
promptParamMacro: "Sauvegarde et télécharge ce TiddlyWiki vers %0",
saveLabel: "sauvegarde sur le web",
saveToDisk: "sauvegarde sur le disque",
uploadLabel: "Télécharge vers le web"
};
config.macros.upload.messages = {
noStoreUrl: "Pas de 'store URL' dans les paramètres ou dans les options",
usernameOrPasswordMissing: "nom d'utilisateur ou mot de passe absent"
};
merge(config.macros.uploadOptions, {
wizardTitle: "Télécharge avec les options",
step1Title: "Ces options sont sauvegardées dans des cookies de votre navigateur",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Annuler",
cancelButtonPrompt: "Arrête l'action en cours et ferme le panneau",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Nom', field: 'name', title: "Nom", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
});
bidix.upload.messages = {
//from saving
invalidFileError: "Le fichier '%0' d'origine ne semble pas être un TiddlyWiki valide",
backupSaved: "backup enegistré sur le web",
backupFailed: "Echec de l'enregistrement du backup sur le web",
rssSaved: "Flux RSS a été téléchargé",
rssFailed: "Echec du téléchargement du flux RSS",
emptySaved: "Fichier de base 'empty.html' téléchargé",
emptyFailed: "Echec du téléchargement du fichier de base 'empty.html'",
mainSaved: "Fichier principal TiddlyWiki téléchargé",
mainFailed: "Echec du téléchargement du fichier principal TiddlyWiki. Vos modifications n'ont pas été téléchargées",
//specific upload
loadOriginalHttpPostError: "Le fichier d'origine n'a pas pu être accédé",
aboutToSaveOnHttpPost: "Préparation du téléchargement du TiddlyWiki vers %0 ...",
storePhpNotFound: "Le script de téléchargement '%0' n'a pas pu être trouvé."
};
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url du script du Service de Téléchargement (defaut : store.php)",
txtUploadFilename: "Nom du fichier à télécharger vers le web (defaut : in index.html)",
txtUploadDir: "Repertoire relatif où télécharger le fichier (defaut : . (répertoire du Service de Téléchargement))",
txtUploadBackupDir: "Repertoire relatif où sauvegarder le fichier précédent. Si vide il n'y aura pas de sauvegarde. (defaut : '' (néant))",
txtUploadUserName: "Nom d'utilisateur pour le Téléchargement",
pasUploadPassword: "Mot de passe pour le Téléchargement",
chkUploadLog: "Enregistre une trace dans UploadLog (defaut: true)",
txtUploadLogMaxLine: "Nomnre maximum de lignes dans UploadLog (defaut: 10)"
});
merge(config.tasks,{
uploadOptions: {text: "télécharge", tooltip: "Edite les options et télécharge vers le seveur", content: '<<uploadOptions>>'}
});
//}}}
//{{{
/*
* UploadToHomeMacro Lingo
*/
if (config.macros.uploadToHome) {
merge(config.macros.uploadToHome,{messages: {
homeParamsTiddler: "HomeParameters",
prompt: "Sauvegarde et télécharge ce TiddlyWiki en utilisant les paramètres du tiddler '%0'",
tiddlerNotFound: "Tiddler %0 non trouvé"
}});
merge(config.tasks,{
uploadToHome: {text: "téléchargeVersMaison", tooltip: "Télécharge en utilisant le tiddler '" + config.macros.uploadToHome.messages.homeParamsTiddler + "'", action: config.macros.uploadToHome.action}
});
}
//}}}
*[[jean-françois vrod|http://www.jf-vrod.com/]]
[img[jean-françois vrod|../03_MEDIAS/Photos/VROD/Jfvrodset.jpg]]
*[[v/vm|http://brainwashed.com/vvm/]]
*[[john watermann microsound memorial|http://microsound.org/watermann/]]
*[[chris watson|http://www.chriswatson.net/]]
*[[gregory whitehead|http://gregorywhitehead.com/vze4bsve/]]
[img[Professeur Whitehead ?|../03_MEDIAS/Photos/WHITEHEAD/sculley2.jpg]] [img[The bone trade...|../03_MEDIAS/Photos/WHITEHEAD/sculley1.jpg]]
*[[otomo yoshihide|http://www.japanimprov.com/yotomo/index.html]] | [[大友良英のJAMJAM日記-はてな版-|http://d.hatena.ne.jp/otomojamjam/]]
[img[otomo yoshihide|../03_MEDIAS/Photos/YOSHIHIDE/yotomo.jpg]]
<?php
/***
! User settings
Edit these lines according to your need
***/
//{{{
$AUTHENTICATE_USER = true; // true | false
$USERS = array(
'UserName1'=>'Password1',
'UserName2'=>'Password2',
'UserName3'=>'Password3'); // set usernames and strong passwords
$DEBUG = false; // true | false
$CLEAN_BACKUP = true; // during backuping a file, remove overmuch backups
$FOLD_JS = true; // if javascript files have been expanded during download the fold them
error_reporting(E_ERROR | E_WARNING | E_PARSE);
//}}}
/***
!Code
No change needed under
***/
//{{{
/***
* store.php - upload a file in this directory
* version :1.6.1 - 2007/08/01 - BidiX@BidiX.info
*
* see :
* http://tiddlywiki.bidi.info/#UploadPlugin for usage
* http://www.php.net/manual/en/features.file-upload.php
* for details on uploading files
* usage :
* POST
* UploadPlugin[backupDir=<backupdir>;user=<user>;password=<password>;uploadir=<uploaddir>;[debug=1];;]
* userfile <file>
* GET
*
* each external javascript file included by download.php is change by a reference (src=...)
*
* Revision history
* V1.6.1 - 2007/08/01
* Enhancement: Add javascript folding
* V1.6.0 - 2007/05/17
* Enhancement: Add backup management
* V1.5.2 - 2007/02/13
* Enhancement: Add optional debug option in client parameters
* V1.5.1 - 2007/02/01
* Enhancement: Check value of file_uploads in php.ini. Thanks to Didier Corbière
* V1.5.0 - 2007/01/15
* Correct: a bug in moving uploadFile in uploadDir thanks to DaniGutiérrez for reporting
* Refactoring
* V 1.4.3 - 2006/10/17
* Test if $filename.lock exists for GroupAuthoring compatibility
* return mtime, destfile and backupfile after the message line
* V 1.4.2 - 2006/10/12
* add error_reporting(E_PARSE);
* v 1.4.1 - 2006/03/15
* add chmo 0664 on the uploadedFile
* v 1.4 - 2006/02/23
* add uploaddir option : a path for the uploaded file relative to the current directory
* backupdir is a relative path
* make recusively directories if necessary for backupDir and uploadDir
* v 1.3 - 2006/02/17
* presence and value of user are checked with $USERS Array (thanks to PauloSoares)
* v 1.2 - 2006/02/12
* POST
* UploadPlugin[backupDir=<backupdir>;user=<user>;password=<password>;]
* userfile <file>
* if $AUTHENTICATE_USER
* presence and value of user and password are checked with
* $USER and $PASSWORD
* v 1.1 - 2005/12/23
* POST UploadPlugin[backupDir=<backupdir>] userfile <file>
* v 1.0 - 2005/12/12
* POST userfile <file>
*
* Copyright (c) BidiX@BidiX.info 2005-2007
***/
//}}}
//{{{
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
/*
* GET Request
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>BidiX.info - TiddlyWiki UploadPlugin - Store script</title>
</head>
<body>
<p>
<p>store.php V 1.6.1
<p>BidiX@BidiX.info
<p> </p>
<p> </p>
<p> </p>
<p align="center">This page is designed to upload a <a href="http://www.tiddlywiki.com/">TiddlyWiki<a>.</p>
<p align="center">for details see : <a href="http://TiddlyWiki.bidix.info/#HowToUpload">TiddlyWiki.bidix.info/#HowToUpload<a>.</p>
</body>
</html>
<?php
exit;
}
/*
* POST Request
*/
// Recursive mkdir
function mkdirs($dir) {
if( is_null($dir) || $dir === "" ){
return false;
}
if( is_dir($dir) || $dir === "/" ){
return true;
}
if( mkdirs(dirname($dir)) ){
return mkdir($dir);
}
return false;
}
function toExit() {
global $DEBUG, $filename, $backupFilename, $options;
if ($DEBUG) {
echo ("\nHere is some debugging info : \n");
echo("\$filename : $filename \n");
echo("\$backupFilename : $backupFilename \n");
print ("\$_FILES : \n");
print_r($_FILES);
print ("\$options : \n");
print_r($options);
}
exit;
}
function ParseTWFileDate($s) {
// parse date element
preg_match ( '/^(\d\d\d\d)(\d\d)(\d\d)\.(\d\d)(\d\d)(\d\d)/', $s , $m );
// make a date object
$d = mktime($m[4], $m[5], $m[6], $m[2], $m[3], $m[1]);
// get the week number
$w = date("W",$d);
return array(
'year' => $m[1],
'mon' => $m[2],
'mday' => $m[3],
'hours' => $m[4],
'minutes' => $m[5],
'seconds' => $m[6],
'week' => $w);
}
function cleanFiles($dirname, $prefix) {
$now = getdate();
$now['week'] = date("W");
$hours = Array();
$mday = Array();
$year = Array();
$toDelete = Array();
// need files recent first
$files = Array();
($dir = opendir($dirname)) || die ("can't open dir '$dirname'");
while (false !== ($file = readdir($dir))) {
if (preg_match("/^$prefix/", $file))
array_push($files, $file);
}
$files = array_reverse($files);
// decides for each file
foreach ($files as $file) {
$fileTime = ParseTWFileDate(substr($file,strpos($file, '.')+1,strrpos($file,'.') - strpos($file, '.') -1));
if (($now['year'] == $fileTime['year']) &&
($now['mon'] == $fileTime['mon']) &&
($now['mday'] == $fileTime['mday']) &&
($now['hours'] == $fileTime['hours']))
continue;
elseif (($now['year'] == $fileTime['year']) &&
($now['mon'] == $fileTime['mon']) &&
($now['mday'] == $fileTime['mday'])) {
if (isset($hours[$fileTime['hours']]))
array_push($toDelete, $file);
else
$hours[$fileTime['hours']] = true;
}
elseif (($now['year'] == $fileTime['year']) &&
($now['mon'] == $fileTime['mon'])) {
if (isset($mday[$fileTime['mday']]))
array_push($toDelete, $file);
else
$mday[$fileTime['mday']] = true;
}
else {
if (isset($year[$fileTime['year']][$fileTime['mon']]))
array_push($toDelete, $file);
else
$year[$fileTime['year']][$fileTime['mon']] = true;
}
}
return $toDelete;
}
function replaceJSContentIn($content) {
if (preg_match ("/(.*?)<!--DOWNLOAD-INSERT-FILE:\"(.*?)\"--><script\s+type=\"text\/javascript\">(.*)/ms", $content,$matches)) {
$front = $matches[1];
$js = $matches[2];
$tail = $matches[3];
if (preg_match ("/<\/script>(.*)/ms", $tail,$matches2)) {
$tail = $matches2[1];
}
$jsContent = "<script type=\"text/javascript\" src=\"$js\"></script>";
$tail = replaceJSContentIn($tail);
return($front.$jsContent.$tail);
}
else
return $content;
}
// Check if file_uploads is active in php config
if (ini_get('file_uploads') != '1') {
echo "Error : File upload is not active in php.ini\n";
toExit();
}
// var definitions
$uploadDir = './';
$uploadDirError = false;
$backupError = false;
$optionStr = $_POST['UploadPlugin'];
$optionArr=explode(';',$optionStr);
$options = array();
$backupFilename = '';
$filename = $_FILES['userfile']['name'];
$destfile = $filename;
// get options
foreach($optionArr as $o) {
list($key, $value) = split('=', $o);
$options[$key] = $value;
}
// debug activated by client
if ($options['debug'] == 1) {
$DEBUG = true;
}
// authenticate User
if (($AUTHENTICATE_USER)
&& ((!$options['user']) || (!$options['password']) || ($USERS[$options['user']] != $options['password']))) {
echo "Error : UserName or Password do not match \n";
echo "UserName : [".$options['user']. "] Password : [". $options['password'] . "]\n";
toExit();
}
// make uploadDir
if ($options['uploaddir']) {
$uploadDir = $options['uploaddir'];
// path control for uploadDir
if (!(strpos($uploadDir, "../") === false)) {
echo "Error: directory to upload specifies a parent folder";
toExit();
}
if (! is_dir($uploadDir)) {
mkdirs($uploadDir);
}
if (! is_dir($uploadDir)) {
echo "UploadDirError : $uploadDirError - File NOT uploaded !\n";
toExit();
}
if ($uploadDir{strlen($uploadDir)-1} != '/') {
$uploadDir = $uploadDir . '/';
}
}
$destfile = $uploadDir . $filename;
// backup existing file
if (file_exists($destfile) && ($options['backupDir'])) {
if (! is_dir($options['backupDir'])) {
mkdirs($options['backupDir']);
if (! is_dir($options['backupDir'])) {
$backupError = "backup mkdir error";
}
}
$backupFilename = $options['backupDir'].'/'.substr($filename, 0, strrpos($filename, '.'))
.date('.Ymd.His').substr($filename,strrpos($filename,'.'));
rename($destfile, $backupFilename) or ($backupError = "rename error");
// remove overmuch backup
if ($CLEAN_BACKUP) {
$toDelete = cleanFiles($options['backupDir'], substr($filename, 0, strrpos($filename, '.')));
foreach ($toDelete as $file) {
$f = $options['backupDir'].'/'.$file;
if($DEBUG) {
echo "delete : ".$options['backupDir'].'/'.$file."\n";
}
unlink($options['backupDir'].'/'.$file);
}
}
}
// move uploaded file to uploadDir
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $destfile)) {
if ($FOLD_JS) {
// rewrite the file to replace JS content
$fileContent = file_get_contents ($destfile);
$fileContent = replaceJSContentIn($fileContent);
if (!$handle = fopen($destfile, 'w')) {
echo "Cannot open file ($destfile)";
exit;
}
if (fwrite($handle, $fileContent) === FALSE) {
echo "Cannot write to file ($destfile)";
exit;
}
fclose($handle);
}
chmod($destfile, 0644);
if($DEBUG) {
echo "Debug mode \n\n";
}
if (!$backupError) {
echo "0 - File successfully loaded in " .$destfile. "\n";
} else {
echo "BackupError : $backupError - File successfully loaded in " .$destfile. "\n";
}
echo("destfile:$destfile \n");
if (($backupFilename) && (!$backupError)) {
echo "backupfile:$backupFilename\n";
}
$mtime = filemtime($destfile);
echo("mtime:$mtime");
}
else {
echo "Error : " . $_FILES['error']." - File NOT uploaded !\n";
}
toExit();
//}}}
?>
<?php
/***
! User settings
Edit these lines according to your need
***/
//{{{
$AUTHENTICATE_USER = true; // true | false
$USERS = array(
'UserName1'=>'Password1',
'UserName2'=>'Password2',
'UserName3'=>'Password3'); // set usernames and strong passwords
$DEBUG = false; // true | false
$CLEAN_BACKUP = true; // during backuping a file, remove overmuch backups
error_reporting(E_ERROR | E_WARNING | E_PARSE);
//}}}
/***
!Code
No change needed under
***/
//{{{
/***
* [[storeTiddler.php]] - upload a tiddler to a TiddlyWiki file in this directory
* version: 1.2.0 - 2008/03/23 - BidiX@BidiX.info
*
* tiddler is POST as <FORM> with :
* FORM =
* title=<the title of the tiddler>
* tiddler=<result of externalizeTiddler() : the div in StoreArea format>
* [oldTitle=<the previous title of the tiddler>]
* [fileName=<tiddlyWiki filename>] (default: index.html)
* [backupDir=<backupdir>] (default: .)
* [user=<user>] (no default)
* [password=<password>] (no default)
* [uploadir=<uploaddir>] (default: .)
* [debug=1]] (default: false)
* see :
* http://tiddlywiki.bidi.info/#UploadTiddlerPlugin for usage
* http://tiddlywiki.bidi.info/#UploadPlugin for parameter descriptions
* usage :
* POST FORM
* Update <tiddler> in <fileName> TiddlyWiki
* GET
* Display a form for
*
* Revision history
* V1.2.0 - 2008-03-23
* Exclusive lock to serialize rewrite of file
* V1.1.0 - 2008/03/05
* Delete tiddler with oldTitle
* V1.0.0 - 2008/02/24
* First public Version
* V0.3.0 - 2008/02/23
* minor adjustments
* V0.2.0 - 2008/02/23
* Correction bug on large regex
* V0.1.0 - 2008/02/09
* Initial: First working version
* V0.0.1 - 2008/02/02
* Initial: Proof Of Concept
*
* Copyright (c) BidiX@BidiX.info 2005-2008
***/
//}}}
//{{{
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
/*
* GET Request
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>BidiX.info - TiddlyWiki UploadTiddlerPlugin - Store script</title>
</head>
<body>
<p>
<p>storeTiddler.php V 1.2.0
<p>BidiX@BidiX.info
<p> </p>
<p> </p>
<p> </p>
<p align="center">This page is designed to upload a <a href="http://www.tiddlywiki.com/#Tiddler">Tiddler<a>.</p>
<p align="center">for details see : <a href="http://TiddlyWiki.bidix.info/#HowToUpload">TiddlyWiki.bidix.info/#HowToUpload<a>.</p>
<hr>
<form action="storeTiddler.php" method=POST>
<center>
<table>
<tr>
<td align=RIGHT>Title:</td>
<td><input type=TEXT name="title" size=80></td>
</tr>
<tr>
<td align=RIGHT>Tiddler (in StoreArea format):</td>
<td><TEXTAREA NAME="tiddler" COLS=80 ROWS=10>
<div title="New Tiddler" modifier="BidiX" created="200802161401" tags="test" changecount="1">
<pre>Type the text for 'New Tiddler'</pre>
</div>
</TEXTAREA></td>
</tr>
<tr>
<td align=RIGHT>Old Title:</td>
<td><input type=TEXT name="oldTitle" size=80 value=''></td>
</tr>
<tr>
<td align=RIGHT>fileName:</td>
<td><input type=TEXT name="fileName" size=80></td>
</tr>
<tr>
<td align=RIGHT>backupDir:</td>
<td><input type=TEXT name="backupDir" size=80></td>
</tr>
<tr>
<td align=RIGHT>user:</td>
<td><input type=TEXT name="user" size=80></td>
</tr>
<tr>
<td align=RIGHT>password:</td>
<td><input type=TEXT name="password" size=80></td>
</tr>
<tr>
<td align=RIGHT>uploadir:</td>
<td><input type=TEXT name="uploadir" size=80></td>
</tr>
<tr>
<td align=RIGHT>debug:</td>
<td><input type=TEXT name="debug" size=80 value=1></td>
</tr>
</table>
<input type=SUBMIT align="CENTER" value="[[Upload]] tiddler">
</center>
</form>
</body>
</html>
<?php
exit;
}
/*
* POST Request
*/
/*
* Functions included from [[store.php]]
*/
// Recursive mkdir
function mkdirs($dir) {
if( is_null($dir) || $dir === "" ){
return false;
}
if( is_dir($dir) || $dir === "/" ){
return true;
}
if( mkdirs(dirname($dir)) ){
return mkdir($dir);
}
return false;
}
function toExit() {
global $DEBUG, $filename, $backupFilename, $options;
if ($DEBUG) {
echo ("\nHere is some debugging info : \n");
echo("\$filename : $filename \n");
echo("\$backupFilename : $backupFilename \n");
print ("\$_FILES : \n");
print_r($_FILES);
print ("\$options : \n");
print_r($options);
}
exit;
}
function ParseTWFileDate($s) {
// parse date element
preg_match ( '/^(\d\d\d\d)(\d\d)(\d\d)\.(\d\d)(\d\d)(\d\d)/', $s , $m );
// make a date object
$d = mktime($m[4], $m[5], $m[6], $m[2], $m[3], $m[1]);
// get the week number
$w = date("W",$d);
return array(
'year' => $m[1],
'mon' => $m[2],
'mday' => $m[3],
'hours' => $m[4],
'minutes' => $m[5],
'seconds' => $m[6],
'week' => $w);
}
function cleanFiles($dirname, $prefix) {
$now = getdate();
$now['week'] = date("W");
$hours = Array();
$mday = Array();
$year = Array();
$toDelete = Array();
// need files recent first
$files = Array();
($dir = opendir($dirname)) || die ("can't open dir '$dirname'");
while (false !== ($file = readdir($dir))) {
if (preg_match("/^$prefix/", $file))
array_push($files, $file);
}
$files = array_reverse($files);
// decides for each file
foreach ($files as $file) {
$fileTime = ParseTWFileDate(substr($file,strpos($file, '.')+1,strrpos($file,'.') - strpos($file, '.') -1));
if (($now['year'] == $fileTime['year']) &&
($now['mon'] == $fileTime['mon']) &&
($now['mday'] == $fileTime['mday']) &&
($now['hours'] == $fileTime['hours']))
continue;
elseif (($now['year'] == $fileTime['year']) &&
($now['mon'] == $fileTime['mon']) &&
($now['mday'] == $fileTime['mday'])) {
if (isset($hours[$fileTime['hours']]))
array_push($toDelete, $file);
else
$hours[$fileTime['hours']] = true;
}
elseif (($now['year'] == $fileTime['year']) &&
($now['mon'] == $fileTime['mon'])) {
if (isset($mday[$fileTime['mday']]))
array_push($toDelete, $file);
else
$mday[$fileTime['mday']] = true;
}
else {
if (isset($year[$fileTime['year']][$fileTime['mon']]))
array_push($toDelete, $file);
else
$year[$fileTime['year']][$fileTime['mon']] = true;
}
}
return $toDelete;
}
/*
* End Functions included from store.php
*/
/*
* parse and print a TiddlyWiki file
*/
Function readTiddlyWiki($tw) {
if (preg_match ("/(.*?<div id=\"storeArea\">.*?)(<div.*)/ms", $tw,$matches)) {
$head = $matches[1];
$h = $matches[2];
$tiddlers = array();
while (preg_match ("/(.*?)(<div title=\"(.*?)\".*?<\/div>)(.*)/ms", $h,$matches)) {
$h=$matches[4];
$tiddlers[$matches[3]] = $matches[2];
}
$tail = ltrim($h);
}
else {
echo("The file '$file' isn't a valid TiddlyWiki");
toExit();
}
return array($head, $tiddlers ,$tail);
}
Function writeTiddlyWiki($head,$tiddlers,$tail) {
$content = $head;
sort($tiddlers);
foreach ($tiddlers as $t => $c) {
$content .= $c . "\n";
}
$content .= $tail;
return $content;
}
// var definitions
$uploadDir = './';
$uploadDirError = false;
$backupError = false;
$backupFilename = '';
$filename = "index.html";
$destfile = $filename;
$options = $_POST; // for store.php name compatibility
// debug activated by client
if ($options['debug'] == 1) {
$DEBUG = true;
}
// authenticate User
if (($AUTHENTICATE_USER)
&& ((!$options['user']) || (!$options['password']) || ($USERS[$options['user']] != $options['password']))) {
echo "Error : UserName or Password do not match \n";
echo "UserName : [".$options['user']. "] Password : [". $options['password'] . "]\n";
toExit();
}
if ($options['filename'])
$filename = $options['filename'];
// make uploadDir
if ($options['uploaddir']) {
$uploadDir = $options['uploaddir'];
// path control for uploadDir
if (!(strpos($uploadDir, "../") === false)) {
echo "Error: directory to upload specifies a parent folder";
toExit();
}
if (! is_dir($uploadDir)) {
mkdirs($uploadDir);
}
if (! is_dir($uploadDir)) {
echo "UploadDirError : $uploadDirError - File NOT uploaded !\n";
toExit();
}
if ($uploadDir{strlen($uploadDir)-1} != '/') {
$uploadDir = $uploadDir . '/';
}
}
$destfile = $uploadDir . $filename;
// backup existing file
if (file_exists($destfile) && ($options['backupDir'])) {
if (! is_dir($options['backupDir'])) {
mkdirs($options['backupDir']);
if (! is_dir($options['backupDir'])) {
$backupError = "backup mkdir error";
}
}
$backupFilename = $options['backupDir'].'/'.substr($filename, 0, strrpos($filename, '.'))
.date('.Ymd.His').substr($filename,strrpos($filename,'.'));
copy($destfile, $backupFilename) or ($backupError = "rename error");
// remove overmuch backup
if ($CLEAN_BACKUP) {
$toDelete = cleanFiles($options['backupDir'], substr($filename, 0, strrpos($filename, '.')));
foreach ($toDelete as $file) {
$f = $options['backupDir'].'/'.$file;
if($DEBUG) {
echo "delete : ".$options['backupDir'].'/'.$file."\n";
}
unlink($options['backupDir'].'/'.$file);
}
}
}
if (file_exists($destfile)) {
$f = fopen($destfile,'r+');
if (flock($f, LOCK_EX)) {
while (!feof($f)) {
$contents .= fread($f, 8192);
}
list($head,$tiddlers,$tail) = readTiddlyWiki($contents);
$title = $_POST['title'];
$oldTitle = $_POST['oldTitle'];
if ($oldTitle && ($title != $oldTitle)) {
unset($tiddlers[$oldTitle]);
}
$tiddlers[$title] = stripslashes($_POST['tiddler']);
$contents = writeTiddlyWiki($head,$tiddlers,$tail);
if (!rewind($f)) {
echo("rewind error");
toExit();
}
if (!ftruncate($f, 0)) {
echo("ftruncate error");
toExit();
};
if (!fwrite($f, $contents)) {
echo("fwrite error");
toExit();
}
fclose($f); // fclose also unlock the file
if($DEBUG) {
echo "Debug mode \n\n";
}
if (!$backupError) {
echo "0 - Tiddler successfully updated in " .$destfile. "\n";
} else {
echo "BackupError : $backupError - Tiddler successfully