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

Actions
delete_action
delete action
edit_action
edit action
mailto_action
send an e-mail to the user owning this membership
 
Functions
checkAccess(action, usr, level)
permission check (called by hopobject.onRequest())
constructor(usr, level)
constructor function for membership objects
updateMembership(lvl, modifier)
function updates a membership
 
Macros
Membership.deletelink
macro renders a link for deleting a membership
Membership.editlink
macro renders the username
Membership.email
macro renders e-mail address
Membership.level
macro renders user-level
Membership.unsubscribelink
macro renders a link to unsubscribe-action
Membership.url
macro renders a member's url as text or link
Membership.username
macro renders the username
 
Skins
edit.skin
response.action
mailmessage.skin
param.text
mailstatuschange.skin
mailto.skin
request.text, response.action
mgrlistitem.skin
subscriptionlistitem.skin
 


type.properties
_db = antville
_table = AV_MEMBERSHIP
_parent = site.members
_id = MEMBERSHIP_ID

##
## object references
##
site              = object(Site)
site.local        = MEMBERSHIP_F_SITE
site.foreign      = SITE_ID

user              = object(User)
user.local        = MEMBERSHIP_F_USER
user.foreign      = USER_ID

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

##
## primitive properties
##
username    = MEMBERSHIP_USERNAME
level       = MEMBERSHIP_LEVEL
createtime  = MEMBERSHIP_CREATETIME
modifytime  = MEMBERSHIP_MODIFYTIME

##
## collections
##
stories           = collection(Story)
stories.local     = MEMBERSHIP_F_SITE
stories.foreign   = TEXT_F_SITE
stories.local.1   = MEMBERSHIP_F_USER
stories.foreign.1 = TEXT_F_USER_CREATOR
stories.filter    = TEXT_PROTOTYPE = 'Story'
stories.order     = TEXT_CREATETIME desc

polls             = collection(Poll)
polls.local       = MEMBERSHIP_F_SITE
polls.foreign     = POLL_F_SITE
polls.local.1     = MEMBERSHIP_F_USER
polls.foreign.1   = POLL_F_USER_CREATOR
polls.order       = POLL_CREATETIME desc

images            = collection(Image)
images.local      = MEMBERSHIP_F_SITE
images.foreign    = IMAGE_F_SITE
images.local.1    = MEMBERSHIP_F_USER
images.foreign.1  = IMAGE_F_USER_CREATOR
images.filter     = IMAGE_PROTOTYPE = 'Image' and IMAGE_F_IMAGE_PARENT is null
images.order      = IMAGE_CREATETIME desc

files             = collection(File)
files.local       = MEMBERSHIP_F_SITE
files.foreign     = FILE_F_SITE
files.local.1     = MEMBERSHIP_F_USER
files.foreign.1   = FILE_F_USER_CREATOR
files.order       = FILE_CREATETIME desc