Function __global->__comcode_to_tempcode

Definitions

sources/comcode_compiler.php

  • Convert the specified Comcode (text format) into a Tempcode tree. You shouldn't output the Tempcode tree to the browser, as it looks really horrible. If you are in a rare case where you need to output directly (not through templates), you should call the evaluate method on the Tempcode object, to convert it into a string.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: object

Parameters

Name Type Default Set Range Description
$comcode LONG_TEXT required parameter N/A N/A The Comcode to convert
$source_member MEMBER required parameter N/A N/A The member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully
$as_admin boolean required parameter N/A N/A Whether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
$pass_id ?string required parameter N/A N/A A special identifier that can identify this resource in a sea of our resources of this class; usually this can be ignored, but may be used to provide a binding between JavaScript in evaluated Comcode, and the surrounding environment (null: no explicit binding)
$db ?object required parameter N/A N/A The database connector to use (null: none; only do this for very simple Comcode)
$flags integer 0 N/A N/A A bitmask of COMCODE_* flags
$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)

Return

  • The Tempcode generated
  • Type: Tempcode
  • Set: N/A
  • Range: N/A