Function __global->ticket_add_post

Definitions

sources/tickets2.php

  • Add a new post to a ticket, or create a new ticket if a ticket with the given ID doesn't exist.It has the same return value as make_post_forum_topic().
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$ticket_id string No No required parameter N/A N/A The ticket ID (doesn't have to exist)
$ticket_type_id ?AUTO_LINK No No required parameter N/A N/A The ticket type (null: reply to ticket)
$title LONG_TEXT No No required parameter N/A N/A The post title
$post LONG_TEXT No No required parameter N/A N/A The post content in Comcode format
$staff_only boolean No No False N/A N/A Whether the reply is staff only (invisible to ticket owner, only on Conversr)
$member_id ?AUTO_LINK No No Null N/A N/A The member ID (null: current member)
$time_post ?TIME No No Null N/A N/A The post time (null: use current time)

Returns

  • The ticket URL
  • Type: URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Add a new post to a ticket, or create a new ticket if a ticket with the given ID doesn't exist.It has the same return value as make_post_forum_topic().
 *
 * @param  string $ticket_id The ticket ID (doesn't have to exist)
 * @param  ?AUTO_LINK $ticket_type_id The ticket type (null: reply to ticket)
 * @param  LONG_TEXT $title The post title
 * @param  LONG_TEXT $post The post content in Comcode format
 * @param  boolean $staff_only Whether the reply is staff only (invisible to ticket owner, only on Conversr)
 * @param  ?AUTO_LINK $member_id The member ID (null: current member)
 * @param  ?TIME $time_post The post time (null: use current time)
 * @return URLPATH The ticket URL
 */

function ticket_add_post(string $ticket_id, ?int $ticket_type_id, string $title, string $post, bool $staff_only = false, ?int $member_id = null, ?int $time_post = null) : string