Functions


Functions Summary
array

cot_generate_pagetags(mixed page_data, string tag_prefix, int textlength, bool admin_rights, bool pagepath_home, string emptytitle)

Returns all page tags for coTemplate

integer

cot_page_add(array rpage, array auth)

Adds a new page to the CMS.

array

cot_page_auth(string cat)

Returns permissions for a page category.

static array

cot_page_config_order(bool adminpart)

Possible values for category sorting order

boolean

cot_page_delete(int id, array rpage)

Removes a page from the CMS.

string

cot_page_enum(mixed categories, integer count, string template, string order, string condition, mixed active_only, boolean use_subcat, boolean exclude_current, string blacklist, string pagination, integer cache_ttl)

Generates page list widget

array

cot_page_import(string source, array rpage, array auth)

Imports page data from request parameters.

string

cot_page_status(int page_state, int page_begin, int page_expire)

Determines page status

int

cot_page_sync(string cat)

Recalculates page category counters

boolean

cot_page_update(integer id, array rpage, array auth)

Updates a page in the CMS.

bool

cot_page_updatecat(string oldcat, string newcat)

Update page category code

boolean

cot_page_validate(array rpage)

Validates page data.

string

cot_readraw(string file)

Reads raw data from file

Function Detail

modules\page\inc\page.functions.php at line 81

cot_generate_pagetags

public array cot_generate_pagetags(mixed page_data, string tag_prefix, int textlength, bool admin_rights, bool pagepath_home, string emptytitle)
Returns all page tags for coTemplate
Parameters:
page_data - Page Info Array or ID
tag_prefix - Prefix for tags
textlength - Text truncate
admin_rights - Page Admin Rights
pagepath_home - Add home link for page path
emptytitle - Page title text if page does not exist
Returns:
Global:
CotDB $db

modules\page\inc\page.functions.php at line 523

cot_page_add

public integer cot_page_add(array rpage, array auth)
Adds a new page to the CMS.
Parameters:
rpage - Page data
auth - Permissions array
Returns:
New page ID or FALSE on error

modules\page\inc\page.functions.php at line 398

cot_page_auth

public array cot_page_auth(string cat)
Returns permissions for a page category.
Parameters:
cat - Category code
Returns:
Permissions array with keys: 'auth_read', 'auth_write', 'isadmin', 'auth_download'

modules\page\inc\page.functions.php at line 294

cot_page_config_order

public static array cot_page_config_order(bool adminpart)
Possible values for category sorting order
Parameters:
adminpart - Call from admin part
Returns:

modules\page\inc\page.functions.php at line 606

cot_page_delete

public boolean cot_page_delete(int id, array rpage)
Removes a page from the CMS.
Parameters:
id - Page ID
rpage - Page data
Returns:
TRUE on success, FALSE on error

modules\page\inc\page.functions.php at line 764

cot_page_enum

public string cot_page_enum(mixed categories, integer count, string template, string order, string condition, mixed active_only, boolean use_subcat, boolean exclude_current, string blacklist, string pagination, integer cache_ttl)
Generates page list widget
Parameters:
categories - Custom parent categories code
count - Number of items to show. 0 - all items
template - Path for template file
order - Sorting order (SQL)
condition - Custom selection filter (SQL)
active_only - Custom parent category code
use_subcat - Include subcategories TRUE/FALSE
exclude_current - Exclude the current page from the rowset for pages.
blacklist - Category black list, semicolon separated
pagination - Pagination symbol
cache_ttl - Cache lifetime in seconds, 0 disables cache
Returns:
Parsed HTML

modules\page\inc\page.functions.php at line 416

cot_page_import

public array cot_page_import(string source, array rpage, array auth)
Imports page data from request parameters.
Parameters:
source - Source request method for parameters
rpage - Existing page data from database
auth - Permissions array
Returns:
Page data

modules\page\inc\page.functions.php at line 342

cot_page_status

public string cot_page_status(int page_state, int page_begin, int page_expire)
Determines page status
Returns:
'draft', 'pending', 'approved', 'published' or 'expired'

modules\page\inc\page.functions.php at line 372

cot_page_sync

public int cot_page_sync(string cat)
Recalculates page category counters
Parameters:
cat - Cat code
Returns:
Global:
CotDB $db

modules\page\inc\page.functions.php at line 665

cot_page_update

public boolean cot_page_update(integer id, array rpage, array auth)
Updates a page in the CMS.
Parameters:
id - Page ID
rpage - Page data
auth - Permissions array
Returns:
TRUE on success, FALSE on error

modules\page\inc\page.functions.php at line 387

cot_page_updatecat

public bool cot_page_updatecat(string oldcat, string newcat)
Update page category code
Parameters:
oldcat - Old Cat code
newcat - New Cat code
Returns:
Global:
CotDB $db

modules\page\inc\page.functions.php at line 496

cot_page_validate

public boolean cot_page_validate(array rpage)
Validates page data.
Parameters:
rpage - Imported page data
Returns:
TRUE if validation is passed or FALSE if errors were found

modules\page\inc\page.functions.php at line 64

cot_readraw

public string cot_readraw(string file)
Reads raw data from file
Parameters:
file - File path
Returns: