Hi
I'm trying to implement Mr. Eric Shulmans StieNews on my own TW.
I would like it to show changes made for for a timespan of 1 week - or
what shall I tag a tiddler with, to put it in line for the
"slideshow"?:
My question is: How do I accomplish that?
Here's what it looks like now:
%/{{center{<<tiddler SiteNews##bannerFormat>><script>
if (config.news===undefined) config.news={
list:[],
getNews: function() {
var ex=this.exclude.readBracketedList();
var tids=store.getTiddlers("modified","excludeLists").reverse();
var list=[];
for (var t=0; t<tids.length; t++) {
if (tids[t].tags.containsAny(ex)) continue;
var title=tids[t].title;
var who=tids[t].modifier;
var when=tids[t].modified.formatString(this.datefmt);
var size=tids[t].text.length;
var desc=store.getTiddlerSlice(title,"Description")||"";
var revs=store.getTiddlerText(title+"##Revisions","");
if (!revs.length) continue;
var itemtxt=revs.split("\n")[1]||"";
if (itemtxt.length>this.cliplen) itemtxt=itemtxt.substr
(0,this.cliplen)+"...";
list.push(this.itemfmt.format([list.length
+1,title,who,when,size,desc,itemtxt]));
}
return list;
},
nextNews: function(id) {
var here=document.getElementById(id); if (!here) return;
var out=this.list[here.next++];
if (here.next>=this.list.length) here.next=0;
here.style.display="none"; removeChildren(here);
wikify(out,here);
if(anim && config.options.chkAnimate)
anim.startAnimating(new Slider(here,true,false,"none"));
else
here.style.display="block";
here.timer=setTimeout("config.news.nextNews('"+here.id
+"')",here.tick*1000);
},
startNews: function(here,tick,wait,force) {
if (!here) return;
if (!config.news.list.length||force) // init only once for
performance savings
config.news.list=config.news.getNews(); // get news
from Revisions
if (!here.id) here.id="news_"+new
Date().getTime()+Math.random();
here.style.cursor="pointer";
here.title=this.tip;
here.tick=tick;
here.wait=wait;
here.next=0;
here.timer=0;
here.onclick=function() { // manual advance
if (this.timer) { clearTimeout(this.timer);
this.timer=0; }
config.news.nextNews(this.id);
}
here.onmouseover=function() { // stop auto
if (this.timer) { clearTimeout(this.timer);
this.timer=0; }
var info=this.childNodes[1]; // show more info
if (info.style.display!="block") {
if (anim && config.options.chkAnimate)
anim.startAnimating(new
Slider(info,true,false,"none"));
else info.style.display="block";
}
}
here.onmouseout=function() { // resume auto
if (!this.timer)
this.timer=setTimeout("config.news.nextNews('"+this.id
+"')",this.tick*1000);
}
here.timer=setTimeout("config.news.nextNews('"+here.id
+"')",place.wait*1000);
}
};
YS Måns Mårtensson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---