Function __global->render_attachment

Definitions

sources/attachments.php

  • Get Tempcode for a Comcode rich-media attachment.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: object

Parameters

Name Type Default Set Range Description
$tag ID_TEXT required parameter N/A N/A The attachment tag
$attributes array required parameter N/A N/A A map of the attributes (name=>val) for the tag
$attachment_row array required parameter N/A N/A A map of the attachment properties (name=>val) for the attachment
$pass_id string required parameter N/A N/A A special identifier to mark where the resultant Tempcode is going to end up (e.g. the ID of a post)
$source_member MEMBER required parameter N/A N/A The member who is responsible for this Comcode
$as_admin boolean required parameter N/A N/A Whether to check as arbitrary admin
$db object required parameter N/A N/A The database connector to use
$highlight_bits array [] N/A N/A A list of words to highlight
$on_behalf_of_member ?MEMBER Null N/A N/A The member we are running on behalf of, with respect to how attachments are handled; we may use this members attachments that are already within this post, and our new attachments will be handed to this member (null: member evaluating)
$semiparse_mode boolean False N/A N/A Whether to parse so as to create something that would fit inside a semihtml tag. It means we generate HTML, with Comcode written into it where the tag could never be reverse-converted (e.g. a block).

Return

  • The Tempcode for the attachment
  • Type: Tempcode
  • Set: N/A
  • Range: N/A