Antville Project

rewriting image_macro()

just for the records: i made a huge step forward in rewriting robert's cool image_macro (here's the code in a cvs branch of antville, third function from top).

the features of thumbnail_macro() and imageurl_macro() are now included by handing over param.as = "thumbnail" or param.as = "url". well, to be honest, param.as = "popup" does the job of the thumbnail macro, while param.as = "thumbnail" does almost the same just without popping up a new window using javascript... (good?)

moreover, i started to modify some of the global renderSomething() functions: the problem was that they are hardly re-usable due to many res.writes in the code. so i renamed these functions to renderSomethingAsString() and replaced the direct output by building a string and returning it in the end. then, i added new functions with the old name as wrappers to directly write out the result of the --AsString() functions again. while it sounds complicated here, i think it becomes quite clear when you think of renderSkin and renderSkinAsString...

is that a way to go? would you support this code structure?

link (15 comments
 

The Antville Server Fund has been a great success. Thanks to everybody who contributed!
online for 8348 Days
last updated: 1/4/11, 10:22 AM
status
Youre not logged in ... Login
menu
May 2024
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
262728293031
July
recent
zfuture's house here is zfuture's
house
by zfuture (7/31/03, 2:59 AM)
i understand your concerns however,
i hardly can think of a solution. certainly, if the...
by tobi (7/29/03, 9:47 AM)
Found several more similar sites
listed This is getting to be quite a concern to...
by cobalt123 (7/27/03, 7:56 PM)
Second Post Alert on Referrer
bug livecatz I put this into "help" and now here:...
by cobalt123 (7/26/03, 7:14 PM)
well it's not easy to
find from here, anyway. think we should include a link,...
by tobi (7/24/03, 11:25 AM)
So finally I found
the helma Bugzilla - stupid me.
by mdornseif (7/24/03, 10:28 AM)
clock not that it's particularly
earthshattering but the antclock is running slow by about 15...
by kohlehydrat (7/23/03, 8:25 PM)
but blogosphere.us isn't can't really
be rated as spam can it?
by kohlehydrat (7/23/03, 8:08 PM)
More referrer spam www.webfrost.com
by Irene (7/23/03, 7:55 PM)
How to log skin names
I accessed to console?? Hi, I would like to know...
by winson (7/23/03, 4:12 PM)

Click here to get an XML version of this weblog.

Made with Antville
powered by
Helma Object Publisher