ItemLight ItemLight(
[object table
$db_row = NULL], [string
$dbtable = 'T_items__item'], [string
$dbprefix = 'post_'], [string
$dbIDname = 'post_ID'], [string
$objtype = 'ItemLight'], [string
$datecreated_field = ''], [string
$datemodified_field = 'datemodified'], [string
$creator_field = ''], [string
$lasteditor_field = '']
)
|
|
Constructor
Parameters:
|
object table |
$db_row: |
Database row |
|
string |
$dbtable: |
|
|
string |
$dbprefix: |
|
|
string |
$dbIDname: |
|
|
string |
$objtype: |
for derived classes |
|
string |
$datecreated_field: |
datetime field name |
|
string |
$datemodified_field: |
datetime field name |
|
string |
$creator_field: |
User ID field name |
|
string |
$lasteditor_field: |
User ID field name |
void categories(
[string
$params = array()]
)
|
|
Template function: list all the category names
Parameters:
void get_archive_url(
[string
$blogurl = ''], [string
$glue = '&']
)
|
|
Generate a link to the post in the archives
Parameters:
|
string |
$blogurl: |
base url to use |
|
string |
$glue: |
glue between url params |
Get the Blog object for the Item.
Redefined in descendants as:
Get list of Chapter objects.
API Tags:
void get_chapter_url(
[string
$blogurl = ''], [string
$glue = '&']
)
|
|
Generate a link to the post in the category
Parameters:
|
string |
$blogurl: |
base url to use |
|
string |
$glue: |
glue between url params |
string get_excerpt(
[string
$format = 'htmlbody']
)
|
|
Template function: get excerpt
Parameters:
|
string |
$format: |
filename to use to display more |
Information Tags:
| Todo: | do we want excerpts in itemLight or not? |
void get_issue_date(
[
$params = array()]
)
|
|
returns issue date (datetime) of Item
Parameters:
void get_permanent_link(
[string
$text = '#'], [string
$title = '#'], [string
$class = '']
)
|
|
Returns a permalink link to the Item
Note: If you only want the permalink URL, use Item::get_permanent_url()
Parameters:
|
string |
$text: |
link text or special value: '#', '#icon#', '#text#', '#title#' '... $title$ ...' |
|
string |
$title: |
link title |
|
string |
$class: |
class name |
void get_permanent_url(
[string
$permalink_type = ''], [string
$blogurl = ''], [string
$glue = '&']
)
|
|
Generate the permalink for the item.
Note: Each item has an unique permalink at any given time. Some admin settings may however change the permalinks for previous items. Note: This actually only returns the URL, to get a real link, use Item::get_permanent_link()
Parameters:
|
string |
$permalink_type: |
single, archive, subchap |
|
string |
$blogurl: |
base url to use |
|
string |
$glue: |
glue between url params |
Information Tags:
| Todo: | archives modes in clean URL mode |
void get_single_url(
[boolean
$allow_redir = true], [string
$blogurl = ''], [string
$glue = '&']
)
|
|
Generate a single post link for the item
Parameters:
|
boolean |
$allow_redir: |
allow redir to permalink, true | false | 'auto' to prevent redit only if single isn't the current permalink type |
|
string |
$blogurl: |
base url to use |
|
string |
$glue: |
glue between url params |
void issue_date(
[
$params = array()]
)
|
|
Template function: display issue date (datetime) of Item
Parameters:
void issue_time(
[
$params = array()]
)
|
|
Template function: display issue time (datetime) of Item
Parameters:
Template function: display locale for item
void language(
[string
$format = 'htmlbody']
)
|
|
Template function: display language name for item
Parameters:
Load the Blog object for the Item, without returning it.
This is needed for Results object callbacks.
Redefined in descendants as:
Template function: display locale for item
void locale_flag(
[
$params = array()]
)
|
|
Template tag
Parameters:
void locale_temp_switch(
)
|
|
Template function: Temporarily switch to this post's locale
void main_category(
[string
$format = 'htmlbody']
)
|
|
Template function: display main category name
Parameters:
void mod_date(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display last mod date (datetime) of Item
Parameters:
|
string |
$format: |
date/time format: leave empty to use locale default date format |
|
boolean |
$useGM: |
true if you want GMT |
void mod_time(
[string
$format = ''], [boolean
$useGM = false]
)
|
|
Template function: display last mod time (datetime) of Item
Parameters:
|
string |
$format: |
date/time format: leave empty to use locale default time format |
|
boolean |
$useGM: |
true if you want GMT |
void permanent_link(
[string
$params = array()], string
1, string
2
)
|
|
Displays a permalink link to the Item
Note: If you only want the permalink URL, use Item::permanent_url()
Parameters:
|
string |
1: |
link title |
|
string |
2: |
class name |
|
string |
$params: |
link text or special value: |
void permanent_url(
[string
$mode = ''], [string
$blogurl = '']
)
|
|
Template function: display permalink for item
Note: This actually only outputs the URL, to display a real link, use Item::permanent_link()
Parameters:
|
string |
$mode: |
'post', 'archive#id' or 'archive#title' |
|
string |
$blogurl: |
url to use |
boolean set(
string
$parname, mixed
$parvalue, [boolean
$make_null = false]
)
|
|
Set param value
By default, all values will be considered strings
Parameters:
|
string |
$parname: |
parameter name |
|
mixed |
$parvalue: |
parameter value |
|
boolean |
$make_null: |
true to set to NULL if empty value |
API Tags:
| Return: | true, if a value has been set; false if it has not changed |
Information Tags:
| Todo: | extra_cat_IDs recording |
Redefinition of:
- DataObject::set()
- Set param value
Redefined in descendants as:
void title(
[
$params = array()]
)
|
|
Template function: display title for item and link to related URL
Parameters:
void type(
[string
$before = ''], [string
$after = ''], [string
$format = 'htmlbody']
)
|
|
Template function: display type of item
Parameters: