add_award_type (line 155)
Make an award type.
AUTO_LINK
add_award_type
(SHORT_TEXT $title, LONG_TEXT $description, integer $points, ID_TEXT $content_type, BINARY $hide_awardee, integer $update_time_hours)
-
SHORT_TEXT
$title: The title
-
LONG_TEXT
$description: The description
-
integer
$points: How many points are given to the awardee
-
ID_TEXT
$content_type: The content type the award type is for
-
BINARY
$hide_awardee: Whether to not show the awardee when displaying this award
-
integer
$update_time_hours: The approximate time in hours between awards (e.g. 168 for a week)
delete_award_type (line 187)
Delete an award type.
void
delete_award_type
(AUTO_LINK $id)
edit_award_type (line 173)
Edit an award type
void
edit_award_type
(AUTO_LINK $id, SHORT_TEXT $title, LONG_TEXT $description, integer $points, ID_TEXT $content_type, BINARY $hide_awardee, integer $update_time_hours)
-
AUTO_LINK
$id: The ID
-
SHORT_TEXT
$title: The title
-
LONG_TEXT
$description: The description
-
integer
$points: How many points are given to the awardee
-
ID_TEXT
$content_type: The content type the award type is for
-
BINARY
$hide_awardee: Whether to not show the awardee when displaying this award
-
integer
$update_time_hours: The approximate time in hours between awards (e.g. 168 for a week)
find_awards_for (line 43)
Get details of awards won for a content item.
array
find_awards_for
(ID_TEXT $content_type, ID_TEXT $id)
-
ID_TEXT
$content_type: The award content type
-
ID_TEXT
$id: The content ID
get_award_content_row (line 67)
Get the content row for an award.
?array
get_award_content_row
(ID_TEXT $content_id, array $info)
-
ID_TEXT
$content_id: The content ID
-
array
$info: The info array for the content type
get_award_fields (line 206)
Get all the award selection fields for a content type and content ID
tempcode
get_award_fields
(ID_TEXT $content_type, [?ID_TEXT $id = NULL])
-
ID_TEXT
$content_type: The content type
-
?ID_TEXT
$id: The content ID (NULL: not added yet - therefore can't be holding the award yet)
give_award (line 99)
Give an award.
void
give_award
(AUTO_LINK $award_id, ID_TEXT $content_id, [?TIME $time = NULL])
-
AUTO_LINK
$award_id: The award ID
-
ID_TEXT
$content_id: The content ID
-
?TIME
$time: Time the award was given (NULL: now)
handle_award_setting (line 248)
Situation: something that may have awards has just been added/edited. Action: add any specified awards.
void
handle_award_setting
(ID_TEXT $content_type, ID_TEXT $id)
-
ID_TEXT
$content_type: The content type
-
ID_TEXT
$id: The content ID