| API - Joomla Replacements |
|
|
|
| Tutorials - Community Builder |
| Tuesday, 23 June 2009 16:15 |
|
We all know Joomla provies things such as $my, $mainframe, mosRedirect, and many others. This is great, but it isn't cross-platformed! That means your Joomla 1.0 plugins, componenets, etc... will all fail on Joomla 1.5. CB can remedy this by allowing a cross-platformed API. Essentially CBs replacements do exactly what Joomlas does, but works on all platforms! The following list is EXACT replacements; omiting parts of the replacement will cause them to fail. Each replacement is specified by Old and New as follows. defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); if ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); } global $mainframe global $_CB_framework global $database global $_CB_database $database-> $_CB_database-> $mosConfig_XXX $_CB_framework->getCfg( 'xxx' ) $mainframe->getCfg( 'live_site' ) $_CB_framework->getCfg( 'live_site' ) $mosConfig_live_site $_CB_framework->getCfg( 'live_site' ) $mosConfig_absolute_path $_CB_framework->getCfg( 'live_site' ) $my->id $_CB_framework->myId() $my->username $_CB_framework->myUsername() $my->gid $_CB_framework->myCmsGid() sefRelToAbs( cbSef( mosRedirect( cbRedirect( mosgetparam( cbGetParam( mosArrayToInts cbArrayToInts mosUser moscomprofilerUser mosTabs cbTabs mosFormatDate( $date ) cbFormatDate( $date, $serverTimeOffset = 1, $showtime = true ) editorArea( 'editor' . $oName, $oValue, $oName, 600, 350, $oCols, $oRows ) $_CB_framework->displayCmsEditor( $oName, $oValue, 600, 350, $oCols, $oRows ) mosHTML::makeOption( '_UE_YES', _CMN_YES ) moscomprofilerHTML::makeOption( '_UE_YES', _UE_YES ) mosHTML::selectList( &$arr, $tag_name, $tag_attribs, $key, $text, $selected, $required = 0 ) moscomprofilerHTML::selectList( &$arr, $tag_name, $tag_attribs, $key, $text, $selected, $required = 0, $htmlspecialcharText = true ) $_VERSION checkJVersion() The above is just a small sample of the many API functions available, but this is a quick overview of the basic replacement functions. |
| Last Updated on Tuesday, 23 June 2009 15:01 |



