Functions


Functions Summary
static string

cot_comments_display(string ext_name, string code, string cat, bool force_admin)

Generates comments display for a given item

bool

cot_comments_enabled(string ext_name, string cat, string item)

Checks if comments are enabled for specific extension and category

string

cot_comments_link(string link_area, string link_params, string ext_name, string code, string cat, array row)

Generates comments display for a given item

int

cot_comments_newcount(string timeback)

New comments count for admin page

void

cot_comments_remove(string area, string code)

Removes comments associated with an item

Function Detail

plugins\comments\inc\comments.functions.php at line 82

cot_comments_display

public static string cot_comments_display(string ext_name, string code, string cat, bool force_admin)
Generates comments display for a given item
Parameters:
ext_name - Module or plugin code
code - Item identifier
cat - Item category code (optional)
force_admin - Enforces user to be administrator of comments for this item. E.g. to moderate his wall even if he is not a moderator
Returns:
Rendered HTML output for comments
Global:
CotDB $db

plugins\comments\inc\comments.functions.php at line 332

cot_comments_enabled

public bool cot_comments_enabled(string ext_name, string cat, string item)
Checks if comments are enabled for specific extension and category
Parameters:
ext_name - Extension name
cat - Category name or empty if checking the entire area
item - Item code, not yet supported
Returns:

plugins\comments\inc\comments.functions.php at line 374

cot_comments_link

public string cot_comments_link(string link_area, string link_params, string ext_name, string code, string cat, array row)
Generates comments display for a given item
Parameters:
link_area - Target URL area for cot_url()
link_params - Target URL params for cot_url()
ext_name - Module or plugin code
code - Item identifier
cat - Item category code (optional)
row - Database row entry (optional)
Returns:
Rendered HTML output for comments
See Also:
cot_comments_count()
Global:
CotDB $db

plugins\comments\inc\comments.functions.php at line 397

cot_comments_newcount

public int cot_comments_newcount(string timeback)
New comments count for admin page
Parameters:
timeback - Datetime to count from
Returns:
Global:
CotDB $db

plugins\comments\inc\comments.functions.php at line 413

cot_comments_remove

public void cot_comments_remove(string area, string code)
Removes comments associated with an item
Parameters:
area - Item area code
code - Item identifier
Global:
CotDB $db