vBulletin v6.0.4

vB_Library_Content_Event extends vB_Library_Content_Text
in package

vB_Library_Content_Event

Tags
access

public

Table of Contents

Methods

add()  : mixed
Adds a new node.
assembleContent()  : mixed
Assembles the response for detailed content
autoPopulatePreviewImage()  : mixed
DEPRECATED: This needs to remain until the corresponding API function is removed
checkEventData()  : mixed
Checks if we have valid data for an event.
delete()  : bool
Permanently deletes a node
deleteChildren()  : mixed
Delete the records without updating the parent info. It is used when deleting a whole channel and it's children need to be removed
getAutoparseLinks()  : mixed
Get the actual auto parse links values based on the request and context
getEndOfDayUnixtime()  : mixed
getFullContent()  : array<string|int, mixed>
Returns the node content as an associative array with fullcontent
getIndexableFromNode()  : mixed
getNodeDescription()  : mixed
getQuotes()  : array<string|int, mixed>|string
This returns a string with quoted strings in bbcode format.
getQuotesFromNodes()  : mixed
Helper function to allow getQuotes in the API and Library classes to generate the node list independantly (so that the API can check perms without loading the nodes twice).
mergeContent()  : type
Merging event types is currently unsupported
mergeContentInfo()  : mixed
Merging event types is currently unsupported
parseAndStrip()  : mixed
postBbcodeParseCleanRawtext()  : mixed
Cleans the input in the $data array, specifically *after* any html/wysiwyg -> bbcode parsing.
update()  : bool
updates a record

Methods

add()

Adds a new node.

public add(mixed $data[, array<string|int, mixed> $options = array() ][, mixed $convertWysiwygTextToBbcode = true ]) : mixed
Parameters
$data : mixed
$options : array<string|int, mixed> = array()
$convertWysiwygTextToBbcode : mixed = true
Return values
mixed

array with nodeid (int), success (bool), cacheEvents (array of strings), nodeVals (array of field => value), attachments (array of attachment records).

assembleContent()

Assembles the response for detailed content

public assembleContent(mixed &$content[, mixed $permissions = false ]) : mixed
Parameters
$content : mixed
$permissions : mixed = false
Return values
mixed

formatted data

autoPopulatePreviewImage()

DEPRECATED: This needs to remain until the corresponding API function is removed

public autoPopulatePreviewImage(mixed $nodeId[, array<string|int, mixed> $node = null ]) : mixed

Populates the previewimage field for this node. To be called after the node is saved and the attachments added.

Finds the first image in the post text that can be used as a previewimage (uploaded here), or uses the first image attachment.

Parameters
$nodeId : mixed
$node : array<string|int, mixed> = null

(optional) Node content array returned by getFullContent

Tags
deprecated

Superceded by getPreviewImage

checkEventData()

Checks if we have valid data for an event.

public checkEventData(array<string|int, mixed> $data[, array<string|int, mixed>|false $existing = false ]) : mixed

Public to allow API to access this. Not meant for anything other than convenience checks.

Parameters
$data : array<string|int, mixed>

The standard create/update data array.

$existing : array<string|int, mixed>|false = false

The existing node array, if updating, else false

delete()

Permanently deletes a node

public delete(mixed $nodeid) : bool
Parameters
$nodeid : mixed
Return values
bool

deleteChildren()

Delete the records without updating the parent info. It is used when deleting a whole channel and it's children need to be removed

public deleteChildren(array<string|int, mixed> $childrenIds) : mixed
Parameters
$childrenIds : array<string|int, mixed>
  • list of node ids

Get the actual auto parse links values based on the request and context

public getAutoparseLinks( $parents,  $autoparselinks) : mixed

For the moment we assume that we us autoparse if

  1. It is requested by the caller AND
  2. It is allowed by channel context

There is currently no "force" auto parse. Currently the channel option is not hierarchical, we'll check the containing channel at the lowest level and allow autoparse if that channel allows it regardless of if the parents allow it or not (currently we only have an on/off flag and would need on/off/default to handle hierachy in a reasonable way since we might want to allow it for a child while prohibiting it at the parent level or vice versa.

Parameters
$parents :

-- the parents array the first element should be either the node itself (for updates) or the node's parent (for adds). It will work either way.

$autoparselinks :

-- the requested autoparse value

getEndOfDayUnixtime()

public getEndOfDayUnixtime(mixed $timestamp[, mixed $userid = false ][, mixed $hmsString = "11:59:59 PM" ][, mixed $ignoreDST = true ]) : mixed
Parameters
$timestamp : mixed
$userid : mixed = false
$hmsString : mixed = "11:59:59 PM"
$ignoreDST : mixed = true

getFullContent()

Returns the node content as an associative array with fullcontent

public getFullContent(int|array<string|int, mixed> $nodes) : array<string|int, mixed>
Parameters
$nodes : int|array<string|int, mixed>

-- node id(s) to get content for

Return values
array<string|int, mixed>

getIndexableFromNode()

public getIndexableFromNode(mixed $content[, mixed $include_attachments = true ]) : mixed
Parameters
$content : mixed
$include_attachments : mixed = true

getNodeDescription()

public getNodeDescription(mixed $data, mixed $convertWysiwygTextToBbcode) : mixed
Parameters
$data : mixed
$convertWysiwygTextToBbcode : mixed

getQuotes()

This returns a string with quoted strings in bbcode format.

public getQuotes(mixed $nodeids) : array<string|int, mixed>|string
Parameters
$nodeids : mixed
Return values
array<string|int, mixed>|string

either the quote for the node or an array of $nodeid => $quotes for the array of nodes

getQuotesFromNodes()

Helper function to allow getQuotes in the API and Library classes to generate the node list independantly (so that the API can check perms without loading the nodes twice).

public getQuotesFromNodes(array<string|int, mixed> $nodes) : mixed
Parameters
$nodes : array<string|int, mixed>

-- array of nodes arrays from getContent (API or Library version) does not accept a single node array

mergeContent()

Merging event types is currently unsupported

public mergeContent(mixed $data) : type
Parameters
$data : mixed
Return values
type

mergeContentInfo()

Merging event types is currently unsupported

public mergeContentInfo(mixed &$result, mixed $content) : mixed
Parameters
$result : mixed
$content : mixed

parseAndStrip()

public parseAndStrip(mixed $text[, mixed $wysiwyg = true ]) : mixed
Parameters
$text : mixed
$wysiwyg : mixed = true

postBbcodeParseCleanRawtext()

Cleans the input in the $data array, specifically *after* any html/wysiwyg -> bbcode parsing.

public postBbcodeParseCleanRawtext(array<string|int, mixed> &$data) : mixed
Parameters
$data : array<string|int, mixed>

Array of fieldname => data pairs, passed by reference.

update()

updates a record

public update(int $nodeid, array<string|int, mixed> $data[, mixed $convertWysiwygTextToBbcode = true ]) : bool
Parameters
$nodeid : int

Nodeid to update

$data : array<string|int, mixed>

Array of field => value pairs which define the record.

$convertWysiwygTextToBbcode : mixed = true
Return values
bool

        
On this page

Search results