vBulletin v6.0.4

vB_Library_Content_Gallery extends vB_Library_Content_Text
in package

vB_Library_Content_Gallery

Tags
access

public

Table of Contents

Methods

add()  : array<string|int, 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
getAutoparseLinks()  : mixed
Get the actual auto parse links values based on the request and context
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).
incompleteNodeCleanup()  : mixed
This function either deletes the gallery if it has no photos, or fixes it.
mergeContent()  : type
Performs the merge of content and updates the node.
mergeContentInfo()  : mixed
Adds content info to $result so that merged content can be edited.
parseAndStrip()  : mixed
postBbcodeParseCleanRawtext()  : mixed
Cleans the input in the $data array, specifically *after* any html/wysiwyg -> bbcode parsing.
removePrivateDataFromNode()  : mixed
update()  : bool
Updates a text node.
validate()  : bool
validates that the current can create a node with these values

Methods

add()

Adds a new node.

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

-- 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

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

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 the 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

incompleteNodeCleanup()

This function either deletes the gallery if it has no photos, or fixes it.

public incompleteNodeCleanup(array<string|int, mixed> $node) : mixed
Parameters
$node : array<string|int, mixed>

-- node record, which may have missing child table data.

mergeContent()

Performs the merge of content and updates the node.

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

mergeContentInfo()

Adds content info to $result so that merged content can be edited.

public mergeContentInfo(array<string|int, mixed> &$result, array<string|int, mixed> $content) : mixed
Parameters
$result : array<string|int, mixed>
$content : array<string|int, 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.

removePrivateDataFromNode()

public removePrivateDataFromNode(mixed &$node) : mixed
Parameters
$node : mixed
Tags
see
vB_Library_Content::removePrivateDataFromNode

update()

Updates a text node.

public update(mixed $nodeid, mixed $data[, mixed $convertWysiwygTextToBbcode = true ]) : bool
Parameters
$nodeid : mixed
$data : mixed
$convertWysiwygTextToBbcode : mixed = true
Return values
bool

validate()

validates that the current can create a node with these values

public validate(mixed $data[, mixed $action = self::ACTION_ADD ][, mixed $nodeid = false ][, mixed $nodes = false ][, mixed $userid = null ]) : bool
Parameters
$data : mixed
$action : mixed = self::ACTION_ADD
$nodeid : mixed = false
$nodes : mixed = false
$userid : mixed = null
Return values
bool

        
On this page

Search results