Unclassified NewsBoard Code Reference

UnbShowPost function

Show a post, for thread.php (Thread view), post.php (Post preview and Latest post review) and search.php (Search results)

function UnbShowPost (&$tpitem, &$post, &$thread, $style = 0, $page = 1, $writeaccess = true, $preview = false, $show_thread = false, $update_mark = false, $highlight = false);

Parameters:

tpitem  –  in/out
(array) Template Parameter Item. Stores all data used for displaying the post
post
IPost object set to the post to be shown
style  –  optional, default: 0
(int) 0|1: alternating css class for background
page  –  optional, default: 1
(int) currently displayed page number
writeaccess  –  optional, default: true
(bool) show quote/reply controls
preview  –  optional, default: false
(bool) preview mode? -> no edit/reply... controls
show_thread  –  optional, default: false
(bool) search mode (display thread link)
update_mark  –  optional, default: false
(bool) display 'updated' marker: this post has beed edited after read by the user
hightlight
array of words to highlight, from search i.e.
thread
highlight  –  optional, default: false

Remarks:

Expects the <table> framework already to be started and to be closed after last post
Expects UnbCountUserPosts() to be called before showing posts

Implementation file: unb_lib/common_post.lib.php, line 61

© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.