HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

ocPortal Developer's Guide: Points

» Return to Contents



sources/points.php

Global_functions_points.php

Function summary

void init__points ()
integer get_price (ID_TEXT item)
integer total_points (MEMBER member)
integer points_used (MEMBER member)
integer available_points (MEMBER member)
array point_info (MEMBER member)
integer get_gift_points_used (MEMBER member)
integer get_gift_points_to_give (MEMBER member)

void init__points()

Standard code module initialisation function.

Parameters…

(No return value)


Return to the function index for this class Expand: View the source code to this function

integer get_price(ID_TEXT item)

Get the price of the specified item for sale in the point-store (only for tableless items).

Parameters…

Name item
Description The name of the item
Type ID_TEXT

Returns…

Description The price of the item
Type integer

Return to the function index for this class Expand: View the source code to this function

integer total_points(MEMBER member)

Get the total points in the specified member's account; some of these will probably have been spent already

Parameters…

Name member
Description The member
Type MEMBER

Returns…

Description The number of points the member has
Type integer

Return to the function index for this class Expand: View the source code to this function

integer points_used(MEMBER member)

Get the total points the specified member has used (spent).

Parameters…

Name member
Description The member
Type MEMBER

Returns…

Description The number of points the member has spent
Type integer

Return to the function index for this class Expand: View the source code to this function

integer available_points(MEMBER member)

Get the total points the specified member has

Parameters…

Name member
Description The member
Type MEMBER

Returns…

Description The number of points the member has
Type integer

Return to the function index for this class Expand: View the source code to this function

array point_info(MEMBER member)

Get all sorts of information about a specified member's point account.

Parameters…

Name member
Description The member the point info is of
Type MEMBER

Returns…

Description The map containing the members point info (fields as enumerated in description)
Type array

Return to the function index for this class Expand: View the source code to this function

integer get_gift_points_used(MEMBER member)

Get the number of gift points used by the given member.

Parameters…

Name member
Description The member we want it for
Type MEMBER

Returns…

Description The number of gift points used by the member
Type integer

Return to the function index for this class Expand: View the source code to this function

integer get_gift_points_to_give(MEMBER member)

Get the number of gifts points to give that the given member has.

Parameters…

Name member
Description The member we want it for
Type MEMBER

Returns…

Description The number of gifts points to give that the given member has
Type integer

Return to the function index for this class Expand: View the source code to this function