; -------------------------------------------------------------------------------------------------
; Forum Demo
; -----------------------------------------------------------------------------
; /forum.load
; --
; Ceates the forum, and loads it from forum.hsh (is available)
; -----------------------------------------------------------------------------
alias forum.load {
if (!$hget(forum)) /hmake forum 100
if ($isfile(forum.hsh)) /hload forum forum.hsh
/set %forum.id = $hget(forum, 0).item
}
; -----------------------------------------------------------------------------
; /forum.save
; --
; Saves the forum to forum.hsh
; -----------------------------------------------------------------------------
alias forum.save {
if ($hget(forum)) /hsave forum forum.hsh
}
; -----------------------------------------------------------------------------
; $Forum.Add(<Params>).Property
; --
; Items:
;
; $forum.add(Thread Title, Description).Thread
; Adds a new topic tot he forums
;
; $forum.add(Parent, Author, Title, Message).Topic
; Adds a new thread under a topic in refrence to the
; Thread's id as a parent
;
; $forum.add(Parent, Author, Message).Reply
; Adds a reply to a topic, using the original topic's
; id as a parent id.
; -----------------------------------------------------------------------------
alias forum.add {
...
}
; -----------------------------------------------------------------------------
; $forum.view(id/N).Property
; --
; Will return a forum thread/reply/topic given its id
;
; Items (If id is a main thread):
;
; $forum.view(id).Title
; View the title of the thread
;
; $forum.view(id).Description
; View the description of a thread
;
; Items (If id is a topic):
;
; $forum.view(id).Parent
; Threads parent id
;
; $forum.view(id).Author
; View the author of an id
;
; $forum.view(id).Title
; Name of the topic
;
; $forum.view(id).Message
; Message of the topic
;
; Items (If is a reply):
;
; $forum.view(id).Parent
; Threads parent id
;
; $forum.view(id).Author
; View the author of an id
;
; $forum.view(id).Message
; Message of the topic
;
; Items (Other):
;
; $forum.view(N).Threads
; View the threads where N is either the Nths thread,
; or 0 for a complete count
; -----------------------------------------------------------------------------
alias forum.view {
...
}