|
today
|
|
UserTalk code:
on storyList ()
{
s = "";
local ( adrblog = radio.weblog.init () );
local ( adrposts = @adrblog^.posts, i );
for i = sizeOf ( adrposts^ ) downto 1
{
local ( adr = @adrposts^ [i] );
local ( t = adr^ );
try
{
local ( c = "" );
local ( title = t.title );
local ( d = date.year ( t.when ) + "/" + string.padWithZeros ( date.month ( t.when ),2 ) + "/" + string.padWithZeros ( date.day ( t.when ),2 ) );
local ( itemno = nameOf ( adr^ ) );
regex.subst( "^0+", "", @itemno );
try
{
local ( adrcats = @t.categories, j );
for j = 1 to sizeof ( adrcats^ )
{
c = c + nameOf ( adrcats^ [j] ) + " / ";
};
regex.subst( " / $", "", @c );
if sizeOf ( c ) > 0
{
c = " - " + c;
};
};
s = s + "<p class='toc'>";
s = s + "<a href='http://radio.weblogs.com/0104487/";
s = s + d + ".html#a" + itemno;
s = s + "' class='toc' title='" + d + c + "'>";
s = s + title;
s = s + "</a></p>";
};
};
return ( s );
};
|
|
© copyright 2002 by Marc Barrot.
|