Function __global->give_submit_points

Definitions

sources/submit.php

  • Credit points to a member for submitting something, then returns the HTML page to say so.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$type ID_TEXT No No required parameter N/A N/A One of this type has been submitted. By convention it is the language string codename of what was done, e.g. ADD_DOWNLOAD
$content_type ID_TEXT No No required parameter N/A N/A The content type submitted
$content_id ID_TEXT No No required parameter N/A N/A The content ID that was submitted
$member_id ?MEMBER No No Null N/A N/A The member to give the points to (null: give to current member)

Returns

  • A message about the member being given these submit points (null: no message)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Credit points to a member for submitting something, then returns the HTML page to say so.
 *
 * @param  ID_TEXT $type One of this type has been submitted. By convention it is the language string codename of what was done, e.g. ADD_DOWNLOAD
 * @param  ID_TEXT $content_type The content type submitted
 * @param  ID_TEXT $content_id The content ID that was submitted
 * @param  ?MEMBER $member_id The member to give the points to (null: give to current member)
 * @return ?string A message about the member being given these submit points (null: no message)
 */

function give_submit_points(string $type, string $content_type, string $content_id, ?int $member_id = null) : ?string