Function __global->embed_feedback_systems

Definitions

sources/feedback.php

  • Main wrapper function to embed miscellaneous feedback systems into a module output.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$feedback_type ID_TEXT No No required parameter N/A N/A The type (downloads, etc) that this feedback is for
$content_id ID_TEXT No No required parameter N/A N/A Content ID
$allow_rating BINARY No No required parameter N/A N/A Whether rating is allowed
$allow_comments integer No No required parameter 0 1 2 N/A Whether comments/reviews is allowed (reviews allowed=2)
$allow_trackbacks BINARY No No required parameter N/A N/A Whether trackbacks are allowed
$validated BINARY No No required parameter N/A N/A Whether the content is validated
$submitter ?MEMBER No No required parameter N/A N/A Content owner (null: none)
$content_url mixed No No required parameter N/A N/A URL to view the content
$content_title SHORT_TEXT No No required parameter N/A N/A Content title
$forum ?string No No required parameter N/A N/A Forum to post comments in (null: site-wide default)
$time ?TIME No No Null N/A N/A Time of comment topic (null: now)

Returns

  • Tuple: Rating details, Comment details, Trackback details
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Main wrapper function to embed miscellaneous feedback systems into a module output.
 *
 * @param  ID_TEXT $feedback_type The type (downloads, etc) that this feedback is for
 * @param  ID_TEXT $content_id Content ID
 * @param  BINARY $allow_rating Whether rating is allowed
 * @param  integer $allow_comments Whether comments/reviews is allowed (reviews allowed=2)
 * @set 0 1 2
 * @param  BINARY $allow_trackbacks Whether trackbacks are allowed
 * @param  BINARY $validated Whether the content is validated
 * @param  ?MEMBER $submitter Content owner (null: none)
 * @param  mixed $content_url URL to view the content
 * @param  SHORT_TEXT $content_title Content title
 * @param  ?string $forum Forum to post comments in (null: site-wide default)
 * @param  ?TIME $time Time of comment topic (null: now)
 * @return array Tuple: Rating details, Comment details, Trackback details
 */

function embed_feedback_systems(string $feedback_type, string $content_id, int $allow_rating, int $allow_comments, int $allow_trackbacks, int $validated, ?int $submitter, $content_url, string $content_title, ?string $forum, ?int $time = null) : array