vBulletin v6.0.4

vB_Xml_Import_Theme extends vB_Xml_Import
in package

Table of Contents

Constants

DEFAULT_GRANDPARENT_GUID  = 'vbulletin-theme-parent-readonly-5660da3dd0cc42.92747689'
DEFAULT_PARENT_GUID  = 'vbulletin-theme-parent-53516be9caa311.54941284'
DEFAULT_THEME_GUID  = 'vbulletin-theme-default-ead8b80bfd72e5257178b41f45c64178'
OPTION_ADDSPECIFICWIDGETS  = 32
OPTION_ADDWIDGETS  = 8
OPTION_IGNOREMISSINGPARENTS  = 4
OPTION_IGNOREMISSINGROUTES  = 2
OPTION_OVERWRITE  = 1
OPTION_OVERWRITECOLUMN  = 16
TYPE_CHANNEL  = 'channels'
TYPE_PAGE  = 'pages'
TYPE_PAGETEMPLATE  = 'pageTemplates'
TYPE_ROUTE  = 'routes'
TYPE_SCREENLAYOUT  = 'screenLayouts'
TYPE_THEME  = 'themes'
TYPE_WIDGET  = 'widgets'

Methods

__construct()  : mixed
__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
getDefaultGrandParentTheme()  : mixed
getDefaultParentTheme()  : mixed
getImportedId()  : int
Returns the id for an imported element
importAdminCP()  : mixed
importFromFile()  : mixed
Imports objects from the specified filepath
importFromParsedXML()  : mixed
Imports objects from parsed XML starting at the base of the relevant objects.
importTheme()  : array<string|int, mixed>
Import theme from a file.
importThemes()  : array<string|int, mixed>
Automatically import the themes included in the theme folder
parseFile()  : mixed
setOptions()  : mixed
setOverwriteColumn()  : mixed
Sets the column to overwrite, if OPTION_OVERWRITECOLUMN is set
setSilentMode()  : void
uploadThemeImageData()  : int|bool
Uploads a theme image (icon or preview image) from the image data

Constants

DEFAULT_GRANDPARENT_GUID

public mixed DEFAULT_GRANDPARENT_GUID = 'vbulletin-theme-parent-readonly-5660da3dd0cc42.92747689'

DEFAULT_PARENT_GUID

public mixed DEFAULT_PARENT_GUID = 'vbulletin-theme-parent-53516be9caa311.54941284'

DEFAULT_THEME_GUID

public mixed DEFAULT_THEME_GUID = 'vbulletin-theme-default-ead8b80bfd72e5257178b41f45c64178'

OPTION_ADDSPECIFICWIDGETS

public mixed OPTION_ADDSPECIFICWIDGETS = 32

OPTION_ADDWIDGETS

public mixed OPTION_ADDWIDGETS = 8

OPTION_IGNOREMISSINGPARENTS

public mixed OPTION_IGNOREMISSINGPARENTS = 4

OPTION_IGNOREMISSINGROUTES

public mixed OPTION_IGNOREMISSINGROUTES = 2

OPTION_OVERWRITE

public mixed OPTION_OVERWRITE = 1

OPTION_OVERWRITECOLUMN

public mixed OPTION_OVERWRITECOLUMN = 16

TYPE_CHANNEL

public mixed TYPE_CHANNEL = 'channels'

TYPE_PAGE

public mixed TYPE_PAGE = 'pages'

TYPE_PAGETEMPLATE

public mixed TYPE_PAGETEMPLATE = 'pageTemplates'

TYPE_ROUTE

public mixed TYPE_ROUTE = 'routes'

TYPE_SCREENLAYOUT

public mixed TYPE_SCREENLAYOUT = 'screenLayouts'

TYPE_THEME

public mixed TYPE_THEME = 'themes'

TYPE_WIDGET

public mixed TYPE_WIDGET = 'widgets'

Methods

__construct()

public __construct([mixed $productid = 'vbulletin' ][, mixed $options = 9 ]) : mixed
Parameters
$productid : mixed = 'vbulletin'
$options : mixed = 9

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $serialized) : void
Parameters
$serialized : array<string|int, mixed>

getDefaultGrandParentTheme()

public getDefaultGrandParentTheme() : mixed

getDefaultParentTheme()

public getDefaultParentTheme() : mixed

getImportedId()

Returns the id for an imported element

public static getImportedId(string $type[, string $guid = NULL ]) : int
Parameters
$type : string
$guid : string = NULL
Return values
int

importAdminCP()

public importAdminCP(mixed $parsedXML[, mixed $startat = 0 ][, mixed $perpage = 1 ][, mixed $overwrite = false ][, mixed $styleid = -1 ][, mixed $anyversion = false ][, mixed $extra = [] ]) : mixed
Parameters
$parsedXML : mixed
$startat : mixed = 0
$perpage : mixed = 1
$overwrite : mixed = false
$styleid : mixed = -1
$anyversion : mixed = false
$extra : mixed = []

importFromFile()

Imports objects from the specified filepath

public importFromFile(string $filepath[, string $guid = false ]) : mixed
Parameters
$filepath : string
$guid : string = false

Only import the record associated with this guid

importFromParsedXML()

Imports objects from parsed XML starting at the base of the relevant objects.

public importFromParsedXML(array<string|int, mixed> $parsedXML) : mixed
Parameters
$parsedXML : array<string|int, mixed>

importTheme()

Import theme from a file.

public importTheme(string $filepath, int|null $startat, int|null $perpage, bool $overwrite, bool $anyversion[, array<string|int, mixed> $extra = [] ]) : array<string|int, mixed>

Will import a theme. May take multiple calls to break the process up to avoid timeouts.

Parameters
$filepath : string

-- the location of the XML file. @param int $startat -- should initially be called as 0, subsequent calls should be previous startat + previous perpage

$startat : int|null
$perpage : int|null

-- The number of template groups to process per call. Null means process the entire import for a style in one pass. One additional pass it required to import any non template data associated with the theme.

$overwrite : bool

-- should we overwrite themes that already exist.

$anyversion : bool

-- skip checking if the theme version matches the current version

$extra : array<string|int, mixed> = []
Return values
array<string|int, mixed>
  • information on the current status of the import. Will indicate if the import is done or not.

importThemes()

Automatically import the themes included in the theme folder

public importThemes([int|null $perpage = 1 ][, bool $overwrite = false ]) : array<string|int, mixed>

Each call will progress the import but will import at most one theme (depending on the $perpage param and how many template groups are present). This is intended to break up the import to handle webserver timeout issues.

Parameters
$perpage : int|null = 1

-- The number of template groups to process per call. Null means process the entire import for a style in one pass. One additional pass it required to import any non template data associated with the theme.

$overwrite : bool = false

-- should we overwrite themes that already exist.

Return values
array<string|int, mixed>
  • information on the current status of the import.

parseFile()

public static parseFile(mixed $filepath) : mixed
Parameters
$filepath : mixed

setOptions()

public setOptions(mixed $options) : mixed
Parameters
$options : mixed

setOverwriteColumn()

Sets the column to overwrite, if OPTION_OVERWRITECOLUMN is set

public setOverwriteColumn(mixed $column) : mixed
Parameters
$column : mixed

setSilentMode()

public setSilentMode(bool $silentmode) : void
Parameters
$silentmode : bool

uploadThemeImageData()

Uploads a theme image (icon or preview image) from the image data

public uploadThemeImageData(mixed $imageData) : int|bool
Parameters
$imageData : mixed
Return values
int|bool

Filedataid for the image or false if the image could not be uploaded.


        
On this page

Search results