XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XoopsCommentRenderer Class Reference

Public Member Functions

 __construct (&$tpl, $use_icons=true, $do_iconcheck=false)
 
instance (&$tpl, $use_icons=true, $do_iconcheck=false)
 
 setComments (&$comments_arr)
 
 renderFlatView ($admin_view=false)
 
 renderThreadView (int $comment_id=0, bool $admin_view, bool $show_nav=true)
 
 _renderThreadReplies (array &$thread, int $key, array &$replies, string $prefix, bool $admin_view, int $depth=0, string $current_prefix='')
 
 renderNestView (int $comment_id=0, bool $admin_view)
 
 _renderNestReplies (array &$thread, int $key, array &$replies, string $prefix, bool $admin_view, int $depth=0)
 
 _getPosterName ($poster_id)
 
 _getPosterArray ($poster_id)
 
 _getTitleIcon ($icon_image)
 

Data Fields

 $_tpl
 
 $_comments = null
 
 $_useIcons = true
 
 $_doIconCheck = false
 
 $_memberHandler
 
 $_statusText
 

Detailed Description

Definition at line 15 of file commentrenderer.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( & $tpl,
$use_icons = true,
$do_iconcheck = false )

#- Constructor

Parameters
object&$tpl
bool$use_icons
bool$do_iconcheck

Definition at line 36 of file commentrenderer.php.

Member Function Documentation

◆ _getPosterArray()

_getPosterArray ( $poster_id)

Get an array with info about the poster

Parameters
int$poster_id
Returns
array

@access private

Definition at line 369 of file commentrenderer.php.

◆ _getPosterName()

_getPosterName ( $poster_id)

Get the name of the poster

Parameters
int$poster_id
Returns
string

@access private

Definition at line 346 of file commentrenderer.php.

◆ _getTitleIcon()

_getTitleIcon ( $icon_image)

Get the IMG tag for the title icon

Parameters
string$icon_image
Returns
string HTML IMG tag

@access private

Definition at line 406 of file commentrenderer.php.

◆ _renderNestReplies()

_renderNestReplies ( array & $thread,
int $key,
array & $replies,
string $prefix,
bool $admin_view,
int $depth = 0 )

Render replies in nested view

Parameters
array$thread
int$key
array$replies
string$prefix
bool$admin_viewdefault =" false
int$depth

@access private

Definition at line 290 of file commentrenderer.php.

◆ _renderThreadReplies()

_renderThreadReplies ( array & $thread,
int $key,
array & $replies,
string $prefix,
bool $admin_view,
int $depth = 0,
string $current_prefix = '' )

Render replies to a thread

Parameters
array&$thread
int$key
array$replies
string$prefix
bool$admin_view
int$depth
string$current_prefix

@access private

Definition at line 190 of file commentrenderer.php.

◆ instance()

& instance ( & $tpl,
$use_icons = true,
$do_iconcheck = false )

Access the only instance of this class

Parameters
object$tplreference to a Smarty object
bool$use_icons
bool$do_iconcheckdefault = false
Returns
\XoopsCommentRenderer

Definition at line 53 of file commentrenderer.php.

◆ renderFlatView()

renderFlatView ( $admin_view = false)

Render the comments in flat view

Parameters
bool$admin_viewdefault=false

Definition at line 80 of file commentrenderer.php.

◆ renderNestView()

renderNestView ( int $comment_id = 0,
bool $admin_view )

Render comments in nested view

Danger: Recursive!

Parameters
int$comment_idAlways "0" when called by client.
bool$admin_viewdefault = false

Definition at line 235 of file commentrenderer.php.

◆ renderThreadView()

renderThreadView ( int $comment_id = 0,
bool $admin_view,
bool $show_nav = true )

Render the comments in thread view

This method calls itself recursively

Parameters
int$comment_idShould be "0" when called by client
bool$admin_viewdefault = false
bool$show_nav

Definition at line 121 of file commentrenderer.php.

◆ setComments()

setComments ( & $comments_arr)

Accessor

Parameters
object&$comments_arrarray of XoopsComment objects

Definition at line 67 of file commentrenderer.php.

Field Documentation

◆ $_comments

$_comments = null

Definition at line 22 of file commentrenderer.php.

◆ $_doIconCheck

$_doIconCheck = false

Definition at line 24 of file commentrenderer.php.

◆ $_memberHandler

$_memberHandler

Definition at line 25 of file commentrenderer.php.

◆ $_statusText

$_statusText

Definition at line 26 of file commentrenderer.php.

◆ $_tpl

$_tpl

#+ @access private

Definition at line 21 of file commentrenderer.php.

◆ $_useIcons

$_useIcons = true

Definition at line 23 of file commentrenderer.php.


The documentation for this class was generated from the following file: