Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
forum.inc.php File Reference

Namespaces

namespace  studip_core

Functions

 forum_kill_edit ($description)
 forum_append_edit ($description)
 forum_parse_edit ($description, $anonymous)
 editarea ($forumposting)
 MakeUniqueID ()
 move_topic ($topic_id, $sem_id, $root, &$verschoben)
 move_topic2 ($topic_id, $root, &$verschoben, $thema)
 lonely ($topic_id)
 suche_kinder ($topic_id)
 ForumOpenClose ($forumposting)
 ForumNewPosting ($forumposting)
 forum_lonely ($forumposting)
 ForumGetRoot ($id)
 ForumGetParent ($id)
 ForumFreshPosting ($id)
 ForumFolderOrPosting ($forumposting)
 ForumGetWriteStatus ($forumposting)
 ForumGetRights ($forumposting)
 ForumGetAnonymity ($forumposting)
 ForumIcon ($forumposting)
 quote ($zitat_id)
 ForumGetName ($id)
 forum_get_buttons ($forumposting)
 DebugForum ($debugvar)
 ForumEmpty ()
 ForumNoPostings ()
 forum_print_navi ($forum)
 CreateTopic ($name="[no name]", $author="[no author]", $description="", $parent_id="0", $root_id="0", $tmpSessionSeminar=0, $user_id=FALSE, $writeextern=TRUE, $anonymous=false)
 CreateNewTopic ($name, $description, $parent_id="0", $root_id="0", $anonymous=false)
 UpdateTopic ($name="[no name]", $topic_id, $description, $anonymous)
 ForumParseZusatz ($forumhead)
 ForumStriche ($forumposting)
 forum_print_toolbar ($id="")
 forum_get_index ($forumposting)
 ForumCheckShrink ($id)
 forum_check_edit ($forumposting)
 forum_draw_topicline ()
 print_rating ($rate, $id, $username)
 printposting ($forumposting)
 flatview ($open=0, $mehr=1, $show=0, $update="", $name="", $description="", $zitat="")
 DisplayFolders ($open=0, $update="", $zitat="")
 indentPosting (&$forumposting, $level)
 DisplayKids ($forumposting, $level=0)
 forum_search_field ()
 forum_move_navi ($topic_id)
 forum_count ($parent_id, $seminar_id= '')

Function Documentation

CreateNewTopic (   $name,
  $description,
  $parent_id = "0",
  $root_id = "0",
  $anonymous = false 
)

Creates a new posting that is not yet stored in the DB

Parameters
stringname of the posting
stringdescription the content of the posting
stringparent_id of the posting (optional)
stringroot_id of the posting (optional)
booleananonymous posting?
Returns
string topic_id of the new posting

Here is the call graph for this function:

CreateTopic (   $name = "[no name]",
  $author = "[no author]",
  $description = "",
  $parent_id = "0",
  $root_id = "0",
  $tmpSessionSeminar = 0,
  $user_id = FALSE,
  $writeextern = TRUE,
  $anonymous = false 
)

creates a new posting in the DB

Parameters
stringname of the posting
stringauthor of the posting (plaintext)
stringdescription the content of the posting
stringparent_id of the posting
stringroot_id of the posting
stringtmpSessionSeminar
stringuser_id of the author
booleanwriteextern
booleananonymous posting?
Returns
string topic_id of the new posting

Here is the call graph for this function:

Here is the caller graph for this function:

DebugForum (   $debugvar)

Debug Code for var-output

Parameters
arraydebugvar ($forum or $forumposting)
Returns
string debug the debug-output of the array
DisplayFolders (   $open = 0,
  $update = "",
  $zitat = "" 
)

Builds the themeview of the board (shows all folders)

Parameters
stringopen id of the opened posting
stringupdate the id of the posting to be updated
stringzitat id of the posting to be quoted

Here is the call graph for this function:

DisplayKids (   $forumposting,
  $level = 0 
)

Amazing engine to build the treeview incl. shrinking

Parameters
arrayforumpostng contains several data of the curren posting
stringlevel contains the current level of the treeview

Here is the call graph for this function:

Here is the caller graph for this function:

editarea (   $forumposting)

Builds the edit-Area for created postings or postings being re-editet

Parameters
arrayforumposting contains several data of the actual posting
Returns
string description contains the complete html-data of the edit-area

Here is the call graph for this function:

flatview (   $open = 0,
  $mehr = 1,
  $show = 0,
  $update = "",
  $name = "",
  $description = "",
  $zitat = "" 
)

Builds the Flatview of a Board (for last Postings, New Postings, Search, Flatview)

Parameters
stringopen id of the opened posting
stringmehr ?
stringshow ?
stringupdate the id of the posting to be updated
stringname ?
stringdescription ?
stringzitat id of the posting to be quoted

Here is the call graph for this function:

forum_append_edit (   $description)

adds the edit-string to a content

Parameters
stringdescription
Returns
string description

Here is the call graph for this function:

forum_check_edit (   $forumposting)

Replaces edit-comment

Parameters
arrayforumposting contains several data of the actual posting
Returns
array forumposting
forum_count (   $parent_id,
  $seminar_id = '' 
)
forum_draw_topicline ( )

prints the topicline

forum_get_buttons (   $forumposting)

builds the button-line for an opened posting

Parameters
arrayforumposting contains several data of the actual posting
Returns
string edit contains the HTML of the button-line

Here is the call graph for this function:

forum_get_index (   $forumposting)

Builds the Indikator for printhead

Parameters
arrayforumposting contains several data of the actual posting
Returns
string tmp HTML-Output of the Indikator

Here is the caller graph for this function:

forum_kill_edit (   $description)

deletes the edit-string from content

Parameters
stringdescription
Returns
string description

Here is the caller graph for this function:

forum_lonely (   $forumposting)

Ckeck whether a posting has childs or not

Parameters
arrayforumposting contains several data of the actual posting
Returns
array forumposting whith additional lonely flag
forum_move_navi (   $topic_id)

Builds the HTML for the move-navigation

Parameters
stringtopic_id the id of the original posting to be moved

Here is the call graph for this function:

forum_parse_edit (   $description,
  $anonymous 
)

parses content for output with added edit-string

Parameters
stringdescription
booleananonymous
Returns
string description

Here is the call graph for this function:

Here is the caller graph for this function:

forum_print_navi (   $forum)

builds the navigation element in page-view

Parameters
arrayforum contains several data of the actual board-site
Returns
string navi contains the HTML of the navigation

Here is the caller graph for this function:

forum_print_toolbar (   $id = "")

Builds the toolbar for indikators an sort-options

Parameters
stringid
Returns
string print the HTML-Output of the toolbar

Here is the call graph for this function:

forum_search_field ( )

Builds the search-fields

Returns
string searchfield contains the complete HTML of the search-page

Here is the call graph for this function:

Here is the caller graph for this function:

ForumCheckShrink (   $id)

Builds a list of posting not to be shrinked

Parameters
stringid of the first non-shrink posting
Returns
string age is the list of postings not to be shrinked, separated by ;

Here is the caller graph for this function:

ForumEmpty ( )

builds the output of an empty board

Returns
string empty contains the HTML of the empty board

Here is the call graph for this function:

Here is the caller graph for this function:

ForumFolderOrPosting (   $forumposting)

Check whether a posting is a folder (theme) or not

Parameters
arrayforumposting contains several data of the actual posting
Returns
array forumposting with additional type flag
ForumFreshPosting (   $id)

check whether a posting is fresh or not

Parameters
stringid of the posting
Returns
bool fresh indikates freshness

Here is the caller graph for this function:

ForumGetAnonymity (   $forumposting)

Checks whether a given posting was posted anonymously and overwrites the author if necessary.

Parameters
mixed$forumposting
Returns
mixed The forum posting with obscured author and user id.

Here is the call graph for this function:

ForumGetName (   $id)

Gets the title of a posting

Parameters
stringid of the posting
Returns
$name the name of the posting

Here is the caller graph for this function:

ForumGetParent (   $id)

Gets the id of the parent-posting

Parameters
stringid of the child-posting
Returns
string parent_id the id of the root-posting

Here is the caller graph for this function:

ForumGetRights (   $forumposting)

Check whether user has rights on posting or not

Parameters
arrayforumposting contains several data of the actual posting
Returns
array forumposting with additional perms flag
ForumGetRoot (   $id)

Gets the id of the root-posting (theme)

Parameters
stringid of the child-posting
Returns
string root_id the id of the root-posting

Here is the caller graph for this function:

ForumGetWriteStatus (   $forumposting)

Check of the write-state of a posting

Parameters
arrayforumposting contains several data of the actual posting
Returns
array forumposting with additional writestatus flag
ForumIcon (   $forumposting)

builds the icon for the printhead of a posting

Parameters
arrayforumposting contains several data of the actual posting
Returns
array forumposting with additional icon flag

Here is the call graph for this function:

ForumNewPosting (   $forumposting)

Ckeck whether a posting is new or old

Parameters
arrayforumposting contains several data of the actual posting
Returns
array forumposting whith additional newold flag

Here is the call graph for this function:

Here is the caller graph for this function:

ForumNoPostings ( )

builds the output of an empty site (empty search for example)

Returns
string empty contains the HTML of the empty site

Here is the call graph for this function:

Here is the caller graph for this function:

ForumOpenClose (   $forumposting)

Ckeck whether a posting is opened or not

Parameters
arrayforumposting contains several data of the actual posting
Returns
array forumposting whith additional openclose flag
ForumParseZusatz (   $forumhead)

builds right side of the printhead

Parameters
arrayforumhead contains several GUI-Elements of the posting
Returns
string zusatz the HTML-Output of the right printhead region
ForumStriche (   $forumposting)

engine to create the amazing HTML-Lines of child-postings

Parameters
arrayforumposting contains several data of the actual posting
Returns
string striche the HTML-Output for the lines
indentPosting ( $forumposting,
  $level 
)

Hier eine bezaubernde Routine um die Striche exakt wiederzugeben - keine Bange ich verstehe sie auch nicht mehr

Here is the caller graph for this function:

lonely (   $topic_id)

Checks whether there can be ditet or not (seeks childs an rights)

Parameters
stringtopic_id posting to be checked
Returns
bool lonely

Here is the caller graph for this function:

MakeUniqueID ( )

Builds a unique topic_id in table px_topics

Returns
string tmp_id is a unique id

Here is the caller graph for this function:

move_topic (   $topic_id,
  $sem_id,
  $root,
$verschoben 
)

Moves postings into a different lecture

Parameters
stringtopic_id posting to be moved (inc. childs)
stringsem_id id of the target
stringroot
stringverschoben count of moved postings
Returns
string verschoben count of moved postings
move_topic2 (   $topic_id,
  $root,
$verschoben,
  $thema 
)

Moves postings into a different folder

Parameters
stringtopic_id posting to be moved (inc. childs)
stringroot
stringverschoben count of moved postings
stringthema id of the target
Returns
string verschoben count of moved postings
print_rating (   $rate,
  $id,
  $username 
)

prints the rating-bar

Here is the call graph for this function:

printposting (   $forumposting)

Checks the state of a posting an prints it with printhead and printcontent

Parameters
arrayforumposting contains several data of the current posting
Returns
array forumposting with added flags

Here is the caller graph for this function:

quote (   $zitat_id)

quote engine for a quoted posting

Parameters
stringzitat_id id of the posting to be quoted
Returns
string zitat is the quoted string

Here is the call graph for this function:

Here is the caller graph for this function:

suche_kinder (   $topic_id)

builds a string of opened postings, separated by ;

Parameters
stringthe original posting
Returns
string open the string of opened postings

Here is the caller graph for this function:

UpdateTopic (   $name = "[no name]",
  $topic_id,
  $description,
  $anonymous 
)

Updates an existing posting

Parameters
stringname of the posting
stringtopic_id of the posting
stringdescription of the posting
booleananonymous

Here is the call graph for this function: