Prototype Global
ACTIONS | FUNCTIONS | MACROS | SKINS | TEMPLATES | TYPE.PROPERTIES

Functions
DenyException(name)
constructor function for DenyException objects
Exception(name, value)
constructor function for Exception objects
Mail.prototype.queue()
extend the Mail prototype with a method that simply adds a mail object to an application-wide array (mail queue).
MailException(name)
constructor function for MailException objects
Message(name, value, obj)
constructor function for Message objects
Skinset(key, skins, context)
constructor function for Skinset objects used to build the constan SKINS
autoLogin()
function checks if user has permanent cookies storing username and password
buildAlias(alias, collection)
function gets a String passed as argument and constructs an object-alias which is unique in a collection
buildAliasFromFile(uploadFile, collection)
function gets a MimePart passed as argument and constructs an object-alias based on the name of the uploaded file
buildMacroHelp()
build a more scripting-compatible object structure of the HELP.macros
checkIfLoggedIn(referrer)
function checks if user is logged in or not if false, it redirects to the login-page but before it stores the url to jump back (if passed as argument)
countUsers()
function counting active users and anonymous sessions (thought to be called by the scheduler)
doWikiStuff(src)
Do Wiki style substitution, transforming stuff contained between asterisks into links.
evalEmail(address)
check if email-adress is syntactically correct
evalImgType(ct)
function returns file-extension according to mimetype of raw-image returns false if mimetype is unknown
evalURL(url)
function checks if url is correct if not it assumes that http is the protocol
extractContent(param, origContent)
extract content properties from the object containing the submitted form values (req.data)
fixRssText(str)
This function parses a string for tags and turns them into tags.
flushMailQueue()
send all mails contained in the application-wide mail queue
formatTimestamp(ts, dformat)
function formats a date to a string. It checks if a site object is in the request path and if so uses its locale and timezone.
getLanguages()
construct an array containing languages keys used for retrieving a localized message
getMessage(property, value)
function retrieves a message from the message file of the appropriate language
getPoolObj(objName, pool)
function checks if the name of the requested object has a slash in it if true, it tries to fetch the appropriate parent-object (either site or root) and to fetch the object with the requested name i ...
getRole(lvl)
function returns the level of the membership in cleartext according to passed level
initConstants()
logAccess()
This is a simple logger that creates a DB entry for each request that contains an HTTP referrer. due to performance-reasons this is not written directly into database but instead written to app.dat ...
onStart()
function loads messages on startup
pingUpdatedSites()
to register updates of a site at weblogs.com (and probably other services, soon), this function can be called via the scheduler.
render(name, param)
render a standard image
renderColor(c)
renders a color as hex or named string
renderColorAsString(c)
function tries to check if the color contains just hex-characters if so, it returns the color-definition prefixed with a '#' otherwise it assumes the color is a named one
renderDateformatChooser(version, locale, selectedValue)
function renders a dropdown-box for choosing dateformats
renderImage(img, param)
renders image element
renderList(collection, funcOrSkin, itemsPerPage, pageIdx)
generic list render function. if the argument "itemsPerPage" is given it renders a pagelist, otherwise the *whole* collection will be rendered
renderLocaleChooser(loc)
function renders a dropdown-box containing all available locales
renderPageNavItem(text, cssClass, url, page)
render a single item for page-navigation bar
renderPageNavigation(collection, url, itemsPerPage, pageIdx)
render pagewise-navigationbar
renderTimeZoneChooser(tz)
function renders a dropdown-box for choosing timezones
rescueText(param)
rescue story/comment by copying all necessary properties to session.data.rescuedText. this will be copied back to req.data by restoreRescuedText() after successful login
restoreRescuedText()
restore rescued Text in session.data by copying all properties back to req.data
scheduler()
scheduler performing auto-disposal of inactive sites and auto-blocking of private sites
sendMail(from, to, subject, body)
general mail-sending function
writeAccessLog()
function swaps app.data.accessLog, loops over the objects contained in Vector and inserts records for every log-entry in AV_ACCESSLOG
writeReadLog()
function swaps app.data.readLog, loops over the logObjects contained in the Hashtable and updates the read-counter of all stories
 
Macros
Global.colorpicker
a not yet sophisticated macro to display a colorpicker. works in site prefs and story editors
Global.fakemail
fakemail macro <%fakemail number=%> generates and renders faked email-adresses param.number (contributed by hr@conspirat)
Global.file
macro fetches a file-object and renders a link to "getfile"-action
Global.gallery
macro renders images as a thumbnail gallery images can be either specified directly via the images-attribute or via their topic
Global.image
macro renders an image out of image-pool either as plain image, thumbnail, popup or url param.name can contain a slash indicating that the image belongs to a different site or to root
Global.imagelist
wrapper-macro for imagelist
Global.imageoftheday
macro renders the most recently created image of a topic or site
Global.input
function renders a form-input
Global.link
Global link macro. In contrast to the hopobject link macro, this reproduces the link target without further interpretation.
Global.linkedpath
Macro creates a string representing the objects in the current request path, linked to their main action.
Global.logo
macro renders the antville-logos
Global.now
macro renders the current timestamp
Global.poll
Renders a poll (optionally as link or results)
Global.randomimage
macro renders a random image images can be either specified directly via the images-attribute, via their topic or via their site
Global.randomize
picks a random site, image or story by setting param.what to the corresponding prototype by default, embed.skin will be rendered but this can be overriden using param.skin
Global.sitelist
macro basically renders a list of sites calling root.renderSitelist() to do the real job
Global.story
Renders the story with the specified id; uses preview.skin as default but the skin to be rendered can be chosen with parameter skin="skinname"
Global.storylist
function renders a list of stories either contained in a topic or from the story collection. param.sortby determines the sort criteria (title, createtime, modifytime); param.order determines the s ...
Global.topiclist
wrapper-macro for topiclist
Global.username
macro checks if the current session is authenticated if true it returns the username
 
Skins
colorpicker.skin
request.text
colorpickerExt.skin
colorpickerScripts.skin
request.name
colorpickerWidget.skin
param.color, param.editor, param.name, param.skin, param.text
nextpagelink.skin
param.text, param.url
pagenavigation.skin
param.display, param.pagenavigation, param.total
pagenavigationitem.skin
param.class, param.text
prevpagelink.skin
param.text, param.url
rssImage.skin
param.image, param.imgTitle, param.imgUrl, param.url