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

Actions
colorpicker_action
wrapper to access colorpicker also from site
delete_action
delete action
edit_action
edit action
getfile_action
this action tries to get a file with the given name if it finds it, it increases the request-counter of this file sets the appropriate mimetype and redirects the browser to the file
main_action
main action
main_css_action
wrapper to make style.skin public
main_js_action
wrapper to make javascript.skin public
menuext_action
context menu extension
menuext_reg_action
context menu extension (accessible as /menuext.reg)
mostread_action
most read stories of a site
referrers_action
referrers of a site
robots_txt_action
robots.txt action
rss_action
rss feed
rss_xml_action
wrapper for rss feed
search_action
search action
subscribe_action
subscribe action
unsubscribe_action
unsubscribe action
 
Functions
checkAccess(action, usr, level)
permission check (called by hopobject.onRequest())
checkDelete(usr)
check if user is allowed to delete the site (only SysAdmins or the creator of a site are allowed to delete it!)
checkEdit(usr, level)
check if user is allowed to edit the preferences of this site
checkSubscribe(usr, level)
function checks if user is allowed to sign up
checkUnsubscribe(usr, level)
check if user is allowed to unsubscribe
checkView(usr, level)
check if a user is allowed to view a site
constructor(title, alias, creator)
constructor function for site objects
deleteAll()
function deletes all assets of a site (recursive!)
evalPreferences(param, modifier)
function saves new properties of site
getDateSymbols()
function returns the (already cached) DateFormatSymbols according to the locale defined for a site
getDiskQuota()
function returns the disk quota in Kilobyte for this site
getDiskUsage()
function returns the used disk space for this site in Kilobyte
getLayout()
return the currently enabled layout object
getLocale()
function checks if language and country were specified for this site. if so, it returns the specified Locale-object otherwise it calls getLocale() for root
getStaticDir(subdir)
return the directory containing static contents
getStaticPath(subdir)
return the path to the static directory of this site
getStaticUrl(subdir)
return the url of the static directory of this site
getTimeZone()
function returns the (already cached) TimeZone-Object according to site-preferences
getTitle()
function returns the title of a site
isNotificationEnabled()
basic check if email notification is enabled for a site
ping()
send notification to weblogs.com that this site was updated
processHref(href)
href URL postprocessor. If a virtual host mapping is defined for this site's alias, use it. Otherwise, use normal site URL.
renderLinkToNextMonth(lastDayIndex, currentMonth, monthNames)
check if there are any stories in the previous month
renderLinkToPrevMonth(firstDayIndex, currentMonth, monthNames)
check if there are any stories in the previous month
renderStorylist(day)
function renders the list of stories for site-(front-)pages and assigns the rendered list to res.data.storylist scrollnavigation-links to previous and next page(s) are also assigned to res.data (re ...
sendNotification(type, obj)
send e-mail notification if necessary
staticPath(subdir)
render the path to the static directory of this site
staticUrl(subdir)
render the url of the static directory of this site
 
Macros
Site.age
macro renders age
Site.alias
macro rendering alias
Site.calendar
macro renders a calendar version 2
Site.diskusage
macro returns the used disk space for this site
Site.email
macro rendering email
Site.enableping
macro rendering enableping-flag
Site.hasdiscussions
macro rendering discussion-flag
Site.history
macro renders a list of recently added/updated stories/comments of this site
Site.lastupdate
macro rendering lastupdate
Site.layoutchooser
proxy-macro for layout chooser
Site.listMostRead
renders a list of most read pages, ie. a link to a story together with the read counter et al.
Site.listReferrers
renders a list of referrers, ie. a link to a url together with the read counter et al.
Site.localechooser
macro renders a list of available locales as dropdown
Site.loginstatus
macro rendering loginStatus of user valid params: - loginSkin - logoutSkin
Site.longdateformat
macro rendering default longdateformat
Site.moduleNavigation
call the site navigation render method of a module
Site.modulePreferences
macro checks if there are any modules present and if they need to be included in the system setup page
Site.monthlist
function renders the months of the archive
Site.navigation
macro rendering two different navigation-skins depending on user-status & rights
Site.notification
macro rendering notification settings if enabled
Site.notify
macro rendering recipients for email notification param.event: storycreate/commentcreate/textupdate/upload please add some error message for undefined param.event
Site.online
macro rendering online-status
Site.preferences
render generic preference editor or value
Site.searchbox
renders the searchbox
Site.shortdateformat
macro rendering default shortdateformat
Site.showarchive
macro rendering archive-flag
Site.showdays
macro rendering nr. of days to show on site-fontpage
Site.spamfilter
output spamfilter data appropriate for client-side javascript code
Site.switch
catch some special needs before passing the macro call up to the HopObject prototype FIXME: this is probably to hackish...
Site.sysmgr_blocked
macro renders the block-state of this site
Site.sysmgr_count
macro counts
Site.sysmgr_deletelink
function renders a delete-link
Site.sysmgr_editlink
function renders an edit-link
Site.sysmgr_statusflags
function renders the statusflags for this site
Site.sysmgr_trusted
macro renders the trust-state of this site
Site.tagline
macro rendering tagline
Site.timezonechooser
macro renders a list of available time zones as dropdown
Site.title
macro rendering title
Site.usermaycontrib
macro rendering usercontrib-flag
Site.xmlbutton
renders the xml button for use when referring to an rss feed
 
Skins
adminnavigation.skin
calendar.skin
param.back, param.calendar, param.forward, param.month, param.year
calendarday.skin
param.day
calendardayheader.skin
param.day
calendarselday.skin
param.day
calendarweek.skin
param.week
contribnavigation.skin
edit.skin
response.action
javascript.skin
main.skin
response.nextpage, response.prevpage, response.storylist
menuext.skin
menuext.reg.skin
mostread.skin
notification.skin
notificationMail.skin
param.url, param.user
page.skin
response.body, response.message, response.title
preview.skin
referrerItem.skin
param.count, param.referrer, param.text
referrers.skin
request.filter, request.includeSpam, response.action
robots.skin
rss.skin
param.creator, param.email, param.items, param.lastupdate, param.resources, param.subtitle, param.title
rssItem.skin
param.creator, param.date, param.email, param.isodate, param.publisher, param.title, param.year
rssResource.skin
searchbox.skin
searchform.skin
request.q, response.action
style.skin
sysmgr_delete.skin
request.page, response.action
sysmgr_edit.skin
request.item, request.page, response.action
sysmgr_listitem.skin
usernavigation.skin
welcome.skin
welcomeowner.skin
welcomesysadmin.skin
 


type.properties
_db = antville
_table = AV_SITE
_id = SITE_ID
_parent = root

##
## primitive properties
##
title          = SITE_TITLE
alias          = SITE_ALIAS
email          = SITE_EMAIL
online         = SITE_ISONLINE
lastupdate     = SITE_LASTUPDATE
lastoffline    = SITE_LASTOFFLINE
lastblockwarn  = SITE_LASTBLOCKWARN
lastdelwarn    = SITE_LASTDELWARN
lastping       = SITE_LASTPING
enableping     = SITE_ENABLEPING
diskusage      = SITE_DISKUSAGE
blocked        = SITE_ISBLOCKED
trusted        = SITE_ISTRUSTED
createtime     = SITE_CREATETIME
modifytime     = SITE_MODIFYTIME

##
## xml encoded properties
##
preferences       = mountpoint(PropertyMgr)
preferences_xml   = SITE_PREFERENCES

##
## object references
##
creator           = object(User)
creator.local     = SITE_F_USER_CREATOR
creator.foreign   = USER_ID

modifier          = object(User)
modifier.local    = SITE_F_USER_MODIFIER
modifier.foreign  = USER_ID

layout            = object(Layout)
layout.local      = SITE_F_LAYOUT
layout.foreign    = LAYOUT_ID

##
## mountpoints
##
topics   = mountpoint(TopicMgr)
members  = mountpoint(MemberMgr)
images   = mountpoint(ImageMgr)
layouts  = mountpoint(LayoutMgr)
files    = mountpoint(FileMgr)
stories  = mountpoint(StoryMgr)
polls    = mountpoint(PollMgr)

##
## collections
##
_children                  = collection(Story)
_children.local            = SITE_ID
_children.foreign          = TEXT_F_SITE
_children.filter           = TEXT_PROTOTYPE = 'Story' and TEXT_ISONLINE = 2
_children.order            = TEXT_CREATETIME desc
_children.group            = TEXT_DAY
_children.group.prototype  = day
_children.group.order      = TEXT_DAY desc

allstories                 = collection(Story)
allstories.local           = SITE_ID
allstories.foreign         = TEXT_F_SITE
allstories.filter          = TEXT_PROTOTYPE = 'Story' AND TEXT_ISONLINE > 0
allstories.order           = TEXT_MODIFYTIME DESC

allcontent                 = collection(Story)
allcontent.local           = SITE_ID
allcontent.foreign         = TEXT_F_SITE
allcontent.filter          = TEXT_ISONLINE > 0
allcontent.order           = TEXT_MODIFYTIME DESC

lastmod                    = collection(Story)
lastmod.local              = SITE_ID
lastmod.foreign            = TEXT_F_SITE
lastmod.filter             = TEXT_ISONLINE > 0
lastmod.order              = TEXT_MODIFYTIME DESC
lastmod.maxsize            = 100

mostread                   = collection(Story)
mostread.local             = SITE_ID
mostread.foreign           = TEXT_F_SITE
mostread.filter            = TEXT_PROTOTYPE = 'Story' AND TEXT_ISONLINE > 0
mostread.order             = TEXT_READS desc
mostread.maxSize           = 25