BitThemes Class Reference

Inheritance diagram for BitThemes:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 BitThemes ()
 cloneLayout ($pFromLayout, $pToLayout)
 expungeCustomModule ($pName)
 expungeLayout ($pLayout=NULL)
 fixPositions ($pLayout=NULL)
 generateModuleNames (&$p2DHash)
 getAllLayouts ()
 getAllModules ($pDir='modules', $pPrefix='mod_')
 getBrowserStyleCss ()
 getCustomModule ($pName)
 getCustomModuleList ()
 getCustomStyleCss ($pStyle=null)
 getIconCachePath ()
 getLayout ($pParamHash=NULL)
 getModuleData ($pModuleId)
 getModuleId ($mod_rsrc)
 getModuleParameters ($pModuleId)
 getStyle ()
 getStyleCss ($pStyle=NULL, $pUserId=NULL)
 getStyleLayouts ()
 getStylePath ($pStyle=NULL)
 getStyles ($pDir=NULL, $pNullOption=NULL, $bIncludeCustom=FALSE)
 getStylesList ($pDir=NULL, $pNullOption=NULL, $pSubDirs=NULL)
 getStyleUrl ($pStyle=NULL)
 getTplIncludeFiles ($pFilename)
 isAjaxRequest ()
 isCustomModule ($pMixed)
 isJavascriptEnabled ()
 loadAjax ($pAjaxLib, $pLibHash=NULL)
 loadLayout ($pParamHash=NULL)
 loadStyle ()
 moveModule ($pModuleId, $pDirection= 'down')
 moveModuleDown ($pModuleId)
 moveModuleToArea ($pModuleId, $pArea)
 moveModuleUp ($pModuleId)
 parseGroups ($pParseString)
 parseString ($pParseString)
 setStyle ($pStyle)
 storeCustomModule ($pParamHash)
 storeLayout ()
 storeModule (&$pHash)
 storeModuleParameters ($mod_rsrc, $user_id, $params)
 unassignModule ($pModuleMixed)
 verifyArea (&$pArea)
 verifyCustomModule (&$pParamHash)
 verifyModuleParams (&$pHash)

Public Attributes

 $mAjax = NULL
 $mAjaxLibs = array()
 $mLayout = array()
 $mStyle
 $mStyles = array()

Detailed Description

BitThemes

BitBase

Definition at line 7 of file BitThemes.php.


Member Function Documentation

BitThemes::BitThemes (  ) 

Initiate class

Returns:
void

Definition at line 31 of file BitThemes.php.

References BitBase::BitBase().

Here is the call graph for this function:

BitThemes::cloneLayout ( pFromLayout,
pToLayout 
)

Definition at line 399 of file BitThemes.php.

References $gBitSystem, $layout, $module, mDb, mPackages, and storeModule().

Here is the call graph for this function:

BitThemes::expungeCustomModule ( pName  ) 

expungeCustomModule

Parameters:
array $pName public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 856 of file BitThemes.php.

References $result, mDb, and unassignModule().

Here is the call graph for this function:

BitThemes::expungeLayout ( pLayout = NULL  ) 

expungeLayout

Parameters:
array $pLayout public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 425 of file BitThemes.php.

References mDb.

BitThemes::fixPositions ( pLayout = NULL  ) 

fix postional data in database using increments of 10 to make it easy for inserting new modules

public

Returns:
void

Definition at line 363 of file BitThemes.php.

References $i, $layout, $layouts, $module, getAllLayouts(), and mDb.

Here is the call graph for this function:

BitThemes::generateModuleNames ( &$  p2DHash  ) 

generates module names on full hash by reference

Parameters:
array $p2DHash layout hash public
Returns:
void

Definition at line 667 of file BitThemes.php.

BitThemes::getAllLayouts (  ) 

get a brief summary of set layouts

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 388 of file BitThemes.php.

References $layouts, $module, mDb, and parseGroups().

Referenced by fixPositions().

Here is the call graph for this function:

BitThemes::getAllModules ( pDir = 'modules',
pPrefix = 'mod_' 
)

getAllModules

Parameters:
string $pDir
string $pPrefix public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 696 of file BitThemes.php.

References $gBitSystem, $h, getCustomModuleList(), mPackages, and tra().

Here is the call graph for this function:

BitThemes::getBrowserStyleCss (  ) 

get browser specific css file

Parameters:
none 
Returns:
path to browser specific css file public

Definition at line 185 of file BitThemes.php.

References $gSniffer, $ret, getStyle(), getStylePath(), and getStyleUrl().

Referenced by loadStyle().

Here is the call graph for this function:

BitThemes::getCustomModule ( pName  ) 

getCustomModule

Parameters:
array $pName public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 833 of file BitThemes.php.

References mDb.

BitThemes::getCustomModuleList (  ) 

getCustomModuleList

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 845 of file BitThemes.php.

References mDb.

Referenced by getAllModules().

BitThemes::getCustomStyleCss ( pStyle = null  ) 

get the users custom.css file if there is one

Parameters:
pStyle style the custom.css is part of
Returns:
path to custom.css file public

Definition at line 170 of file BitThemes.php.

References $ret, and getStyle().

Referenced by loadStyle().

Here is the call graph for this function:

BitThemes::getIconCachePath (  ) 

get the icon cache path

public

Returns:
absolute path on where the system should store it's icons

Definition at line 1041 of file BitThemes.php.

References $gBitLanguage, $gBitSystem, $gSniffer, and $version.

BitThemes::getLayout ( pParamHash = NULL  ) 

get the current layout from the database

Parameters:
array $pParamHash public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 259 of file BitThemes.php.

References $gBitSystem, $gBitUser, $pParamHash, $query, $result, $ret, $row, FALSE, mDb, parseGroups(), and parseString().

Referenced by loadLayout().

Here is the call graph for this function:

BitThemes::getModuleData ( pModuleId  ) 

getModuleData

Parameters:
array $pModuleId public
Returns:
module details of the requested module id

Definition at line 538 of file BitThemes.php.

References $ret, mDb, parseString(), and BitBase::verifyId().

Referenced by getModuleParameters(), and moveModule().

Here is the call graph for this function:

BitThemes::getModuleId ( mod_rsrc  ) 

Definition at line 1118 of file BitThemes.php.

BitThemes::getModuleParameters ( pModuleId  ) 

get a module-specfic parameters

Parameters:
array $pModuleId public
Returns:
array or parameters

Definition at line 749 of file BitThemes.php.

References $module, $moduleParams, $ret, getModuleData(), and BitBase::verifyId().

Here is the call graph for this function:

BitThemes::getStyle (  ) 

figure out the current style

Parameters:
string $ pScanFile file to be looked for
Returns:
none public

Definition at line 108 of file BitThemes.php.

References $gBitSystem.

Referenced by getBrowserStyleCss(), getCustomStyleCss(), getStyleCss(), getStylePath(), and getStyleUrl().

BitThemes::getStyleCss ( pStyle = NULL,
pUserId = NULL 
)

figure out the current style

Parameters:
string $ pScanFile file to be looked for
Returns:
none public

Definition at line 136 of file BitThemes.php.

References $gBitSystem, $ret, getStyle(), and mUserId.

Referenced by loadStyle().

Here is the call graph for this function:

BitThemes::getStyleLayouts (  ) 

getStyleLayouts

public

Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 940 of file BitThemes.php.

References $h, $layout, $ret, and FALSE.

BitThemes::getStylePath ( pStyle = NULL  ) 

figure out the current style URL

Parameters:
string $ pScanFile file to be looked for
Returns:
none public

Definition at line 214 of file BitThemes.php.

References getStyle().

Referenced by getBrowserStyleCss(), and loadStyle().

Here is the call graph for this function:

BitThemes::getStyles ( pDir = NULL,
pNullOption = NULL,
bIncludeCustom = FALSE 
)

getStyles

Parameters:
array $pDir
array $pNullOption
array $bIncludeCustom public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 895 of file BitThemes.php.

References $customCSSFile, $customCSSPath, $gBitSystem, $gBitUser, $h, $ret, and mUserId.

BitThemes::getStylesList ( pDir = NULL,
pNullOption = NULL,
pSubDirs = NULL 
)

Parameters:
$pSubDirs a subdirectory to scan as well - you can pass in multiple dirs using an array
array $pDir
array $pNullOption
array $pSubDirs public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 974 of file BitThemes.php.

References $f, $gBitSystem, $h, $ret, $subDirs, and FALSE.

BitThemes::getStyleUrl ( pStyle = NULL  ) 

figure out the current style URL

Parameters:
string $ pScanFile file to be looked for
Returns:
none public

Definition at line 200 of file BitThemes.php.

References getStyle().

Referenced by getBrowserStyleCss(), and loadStyle().

Here is the call graph for this function:

BitThemes::getTplIncludeFiles ( pFilename  ) 

scan packages for <pkg>/templates/header_inc.tpl or footer_inc.tpl files

Parameters:
none $ private
Returns:
array of paths to existing header_inc.tpl files

Definition at line 76 of file BitThemes.php.

References $gBitSystem, $info, $mid, $out, $ret, and mPackages.

Referenced by loadStyle().

BitThemes::isAjaxRequest (  ) 

Statically callable function to determine if the current call was made using Ajax

public

Definition at line 1079 of file BitThemes.php.

References $_REQUEST, and $_SERVER.

Referenced by BitSystem::isAjaxRequest().

BitThemes::isCustomModule ( pMixed  ) 

isCustomModule

Parameters:
array $pMixed either name of module or the rsrc of a module public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 871 of file BitThemes.php.

References $result, FALSE, and mDb.

BitThemes::isJavascriptEnabled (  ) 

Statically callable function to see if browser supports javascript determined by cookie set in bitweaver.js public

Definition at line 1070 of file BitThemes.php.

References $_COOKIE.

Referenced by BitSystem::isJavascriptEnabled().

BitThemes::loadAjax ( pAjaxLib,
pLibHash = NULL 
)

Load Ajax libraries

Parameters:
array $pAjaxLib Name of the library we want to use e.g.: prototype or mochikit
array $pLibHash Array of additional libraries we need to load public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 1091 of file BitThemes.php.

References $gBitSmarty, $gSniffer, $ret, and FALSE.

BitThemes::loadLayout ( pParamHash = NULL  ) 

load current layout into mLayout

Parameters:
$pParamHash 
Returns:
none public

Definition at line 234 of file BitThemes.php.

References $gBitSystem, $hideable, $layout, $pParamHash, getLayout(), left, and right.

Here is the call graph for this function:

BitThemes::loadStyle (  ) 

load up all style related information populates mStyle and mStyles

public

Returns:
void

Definition at line 46 of file BitThemes.php.

References $gBitThemes, getBrowserStyleCss(), getCustomStyleCss(), getStyleCss(), getStylePath(), getStyleUrl(), getTplIncludeFiles(), mStyles, and setStyle().

Here is the call graph for this function:

BitThemes::moveModule ( pModuleId,
pDirection = 'down' 
)

generic function to move module up or down

Parameters:
array $pModuleId
string $pOrientation public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 582 of file BitThemes.php.

References $query, $result, getModuleData(), mDb, up, and BitBase::verifyId().

Referenced by moveModuleDown(), and moveModuleUp().

Here is the call graph for this function:

BitThemes::moveModuleDown ( pModuleId  ) 

moduleDown

Parameters:
array $pModuleId public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 567 of file BitThemes.php.

References down, moveModule(), and BitBase::verifyId().

Here is the call graph for this function:

BitThemes::moveModuleToArea ( pModuleId,
pArea 
)

moveModuleToArea

Parameters:
array $pModuleId
array $pArea public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 617 of file BitThemes.php.

References $query, $result, mDb, verifyArea(), and BitBase::verifyId().

Here is the call graph for this function:

BitThemes::moveModuleUp ( pModuleId  ) 

moduleUp

Parameters:
array $pModuleId public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 553 of file BitThemes.php.

References moveModule(), up, and BitBase::verifyId().

Here is the call graph for this function:

BitThemes::parseGroups ( pParseString  ) 

transform groups string to handy array

Parameters:
array $pParseString either space separated list of groups or serialised array public
Returns:
array of groups

Definition at line 441 of file BitThemes.php.

References $gBitUser, $ret, and BitBase::verifyId().

Referenced by getAllLayouts(), and getLayout().

Here is the call graph for this function:

BitThemes::parseString ( pParseString  ) 

parse URL-like parameter string

Parameters:
array $pParseString public
Returns:
array or parameters

Definition at line 767 of file BitThemes.php.

References $ret, and parse_xml_attributes().

Referenced by getLayout(), and getModuleData().

Here is the call graph for this function:

BitThemes::setStyle ( pStyle  ) 

figure out the current style

Parameters:
string $ pScanFile file to be looked for
Returns:
none public

Definition at line 123 of file BitThemes.php.

References $gBitSmarty.

Referenced by loadStyle().

BitThemes::storeCustomModule ( pParamHash  ) 

storeCustomModule

Parameters:
array $pParamHash public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 817 of file BitThemes.php.

References $pParamHash, $result, mDb, and verifyCustomModule().

Here is the call graph for this function:

BitThemes::storeLayout (  ) 

Definition at line 1112 of file BitThemes.php.

References storeModule().

Here is the call graph for this function:

BitThemes::storeModule ( &$  pHash  ) 

storeModule

Parameters:
array $pHash public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 515 of file BitThemes.php.

References $result, mDb, BitBase::verifyId(), and verifyModuleParams().

Referenced by cloneLayout(), and storeLayout().

Here is the call graph for this function:

BitThemes::storeModuleParameters ( mod_rsrc,
user_id,
params 
)

Definition at line 1115 of file BitThemes.php.

BitThemes::unassignModule ( pModuleMixed  ) 

unassignModule

Parameters:
array $pModuleId can be a module id or a resource path. if it is a resource path, all modules with that resource will be removed public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 632 of file BitThemes.php.

References $ret, FALSE, mDb, and BitBase::verifyId().

Referenced by expungeCustomModule().

Here is the call graph for this function:

BitThemes::verifyArea ( &$  pArea  ) 

if the specified area doesn't make any sense, we just dump it in the left column

Parameters:
array $pArea l --> left r --> right c --> center b --> bottom t --> top public
Returns:
valid area

Definition at line 653 of file BitThemes.php.

Referenced by moveModuleToArea(), and verifyModuleParams().

BitThemes::verifyCustomModule ( &$  pParamHash  ) 

verifyCustomModule

Parameters:
array $pParamHash public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 790 of file BitThemes.php.

References $pParamHash, title, and tra().

Referenced by storeCustomModule().

Here is the call graph for this function:

BitThemes::verifyModuleParams ( &$  pHash  ) 

Verfiy module parameters when storing a new module

Parameters:
array $pHash public
Returns:
TRUE on success, FALSE on failure - mErrors will contain reason for failure

Definition at line 478 of file BitThemes.php.

References title, tra(), and verifyArea().

Referenced by storeModule().

Here is the call graph for this function:


Member Data Documentation

BitThemes::$mAjax = NULL

Definition at line 18 of file BitThemes.php.

BitThemes::$mAjaxLibs = array()

Definition at line 21 of file BitThemes.php.

BitThemes::$mLayout = array()

Definition at line 9 of file BitThemes.php.

BitThemes::$mStyle

Definition at line 12 of file BitThemes.php.

BitThemes::$mStyles = array()

Definition at line 15 of file BitThemes.php.


The documentation for this class was generated from the following file:
Generated on Wed Aug 22 19:34:24 2007 for bitweaver by  doxygen 1.5.2