vBulletin v6.0.4

vB_Library_Content_Video extends vB_Library_Content_Text
in package

vB_Library_Content_Video

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
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
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).
getVideoFromUrl()  : array<string|int, mixed>|bool
Get information from video's URL.
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.
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

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

getFullContent()

Returns the node content as an associative array with fullcontent

public getFullContent(int $nodeid) : array<string|int, mixed>
Parameters
$nodeid : int
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

getVideoFromUrl()

Get information from video's URL.

public getVideoFromUrl( $url) : array<string|int, mixed>|bool

This method makes use of bbcode_video table to get provider information

Parameters
$url :
Return values
array<string|int, mixed>|bool

Video data. False if the url is not supported or invalid

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.

update()

updates a record

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

-- The data for the node to be updated

$convertWysiwygTextToBbcode : bool = true

@return boolean

Return values
bool

        
On this page

Search results