public function __construct($aOptions, $oTemplate = false) { parent::__construct($aOptions, $oTemplate); $this->_oModule = BxDolModule::getInstance($this->MODULE); $this->_sManageType = 'administration'; $this->_sParamsDivider = '#-#'; }
public function __construct($aOptions, $oTemplate = false) { parent::__construct($aOptions, $oTemplate); $this->_oModule = BxDolModule::getInstance('bx_sites'); $this->_oPermalinks = BxDolPermalinks::getInstance(); $this->_iProfileId = bx_get_logged_profile_id(); }
function BxWmapModule(&$aModule) { parent::BxDolModule($aModule); $this->_iProfileId = getLoggedId(); $this->_aParts = $this->_oDb->getParts(); $this->_oDb->_aParts =& $this->_aParts; }
function __construct(&$aModule) { parent::__construct($aModule); $GLOBALS['aModule'] = $aModule; $this->_iProfileId = getLoggedId(); $this->_sProto = bx_proto(); }
function __construct($aOptions, $oTemplate = false) { parent::__construct($aOptions, $oTemplate); $this->_aOptions['actions_single']['export']['attr']['title'] = _t('_bx_dev_nav_btn_menus_gl_export'); $this->oModule = BxDolModule::getInstance('bx_developer'); $this->sUrlViewItems = BX_DOL_URL_STUDIO . 'module.php?name=' . $this->oModule->_oConfig->getName() . '&page=navigation&nav_page=items&nav_module=%s&nav_set=%s'; }
function __construct($sModule = "", $sPage = "") { parent::__construct($sModule, $sPage); bx_import('BxDolModule'); $this->oModule = BxDolModule::getInstance('bx_smtp'); $this->aMenuItems = array(array('name' => 'general', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'), array('name' => 'tester', 'icon' => 'envelope', 'title' => '_bx_smtp_tester')); }
function unit($aData, $sTemplateName, &$oVotingView) { if (null == $this->_oMain) { $this->_oMain = BxDolModule::getInstance('BxStoreModule'); } if (!$this->_oMain->isAllowedView($aData)) { $aVars = array('extra_css_class' => 'bx_store_unit'); return $this->parseHtmlByName('browse_unit_private', $aVars); } $sImage = ''; if ($aData['thumb']) { $a = array('ID' => $aData['author_id'], 'Avatar' => $aData['thumb']); $aImage = BxDolService::call('photos', 'get_image', array($a, 'browse'), 'Search'); $sImage = $aImage['no_image'] ? '' : $aImage['file']; } $sPrice = ''; if ('Free' == $aData['price_range']) { $sPrice = _t('_bx_store_free_product'); } else { $sPrice = str_replace('.00', '', sprintf($aData['price_range'], getParam('pmt_default_currency_sign'), getParam('pmt_default_currency_sign'))); } $aVars = array('id' => $aData['id'], 'thumb_url' => $sImage ? $sImage : $this->getIconUrl('no-photo.png'), 'product_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aData['uri'], 'product_title' => $aData['title'], 'created' => defineTimeInterval($aData['created']), 'author' => $aData['author_id'] ? $aData['NickName'] : _t('_bx_store_admin'), 'author_url' => $aData['author_id'] ? getProfileLink($aData['author_id']) : 'javascript:void(0);', 'price_range' => $sPrice); $aVars['rate'] = $oVotingView ? $oVotingView->getJustVotingElement(0, $aData['id'], $aData['rate']) : ' '; return $this->parseHtmlByName($sTemplateName, $aVars); }
function getBlockCode_DefaultValues() { $aActions = $this->_oDb->getActions($this->_iOwnerId); $aValues = $this->_getSelectItems(array('type' => 'extendable', 'owner_id' => $this->_iOwnerId)); $aForm = array('form_attrs' => array('id' => 'ps-default-values-form', 'name' => 'ps-default-values-form', 'action' => BX_DOL_URL_ROOT . 'member_privacy.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array(), 'inputs' => array()); $sModuleUri = ''; $bCollapsed = false; foreach ($aActions as $aAction) { if ($sModuleUri != $aAction['module_uri']) { if (!empty($sModuleUri)) { $aForm['inputs'][$sModuleUri . '_end'] = array('type' => 'block_end'); } $aForm['inputs'][$aAction['module_uri'] . '_begin'] = array('type' => 'block_header', 'caption' => BxDolModule::getTitle($aAction['module_uri']), 'collapsable' => true, 'collapsed' => $bCollapsed); $sModuleUri = $aAction['module_uri']; $bCollapsed = true; } $sName = 'ps-default-values_' . $aAction['action_id']; $aForm['inputs'][$sName] = array('type' => 'select', 'name' => $sName, 'caption' => _t($aAction['action_title']), 'value' => !empty($aAction['default_value']) ? $aAction['default_value'] : $aAction['action_default_value'], 'values' => $aValues, 'checker' => array('func' => 'length', 'params' => array(1, 4), 'error' => _t('_ps_ferr_incorrect_select'))); } $aForm['inputs'][$sModuleUri . '_end'] = array('type' => 'block_end'); $aForm['inputs']['owner_id'] = array('type' => 'hidden', 'name' => 'owner_id', 'value' => $this->_iOwnerId); $aForm['inputs']['ps-default-values-save'] = array('type' => 'submit', 'name' => 'ps-default-values-save', 'value' => _t("_ps_btncpt_save")); $oForm = new BxTemplFormView($aForm); $sContent = $oForm->getCode(); $sContent = $this->parseHtmlByName('ps_default_values.html', array('form' => !empty($sContent) ? $sContent : MsgBox(_t('_Empty')))); return DesignBoxContent(_t("_ps_bcpt_default_values"), $sContent, 1); }
function __construct($sModule = "", $sPage = "") { parent::__construct($sModule, $sPage); bx_import('BxDolModule'); $this->oModule = BxDolModule::getInstance($this->sModule); $this->sUrl = BX_DOL_URL_STUDIO . 'module.php?name=%s&page=%s'; }
protected function _performAction($sAction, $sDisplay, $iId = 0) { bx_import('BxDolForm'); $oForm = BxDolForm::getObjectInstance('bx_antispam_ip_table_form', $sDisplay); // get form instance for specified form object and display if (!$oForm) { $this->_echoResultJson(array('msg' => _t('_sys_txt_error_occured')), true); exit; } $oForm->addMarkers(array('grid_object' => $this->_sObject, 'grid_action' => $sAction)); $aIpTableDirective = array(); if ($iId) { bx_import('BxDolModule'); $oModule = BxDolModule::getInstance('bx_antispam'); $oAntispamIp = bx_instance('BxAntispamIP', array(), $oModule->_aModule); $aIpTableDirective = $oAntispamIp->getIpTableDirective($iId); $aIpTableDirective['From'] = long2ip($aIpTableDirective['From']); $aIpTableDirective['To'] = long2ip($aIpTableDirective['To']); } $oForm->initChecker($aIpTableDirective); if ($oForm->isSubmittedAndValid()) { // if form is submitted and all fields are valid $aCustomValues = array('From' => sprintf("%u", ip2long($oForm->getCleanValue('From'))), 'To' => sprintf("%u", ip2long($oForm->getCleanValue('To')))); if ($iId) { if ($oForm->update($iId, $aCustomValues)) { // update record $iRecentId = $iId; } } else { $iRecentId = $oForm->insert($aCustomValues, true); // insert new record } if ($iRecentId) { $aRes = array('grid' => $this->getCode(false), 'blink' => $iRecentId); } else { $aRes = array('msg' => _t('_sys_txt_error_occured')); } // if record adding failed, display error message $this->_echoResultJson($aRes, true); } else { // if form is not submitted or some fields are invalid, display popup with form bx_import('BxTemplFunctions'); $s = BxTemplFunctions::getInstance()->popupBox($oForm->getId() . '_form', _t('_bx_antispam_form_ip_table_add'), $oForm->getCode() . ' <script> $(document).ready(function () { $("#' . $oForm->getId() . '").ajaxForm({ dataType: "json", beforeSubmit: function (formData, jqForm, options) { bx_loading($("#' . $oForm->getId() . '"), true); }, success: function (data) { $(".bx-popup-applied:visible").dolPopupHide(); glGrids.' . $this->_sObject . '.processJson(data, "' . $sAction . '"); } }); }); </script>'); $this->_echoResultJson(array('popup' => array('html' => $s, 'options' => array('closeOnOuterClick' => false))), true); } }
function __construct($oModule = null) { $oModule = !empty($oModule) ? $oModule : BxDolModule::getInstance('BxFdbModule'); parent::__construct($oModule); $this->aCurrent['searchFields'] = array('caption', 'content', 'tags'); unset($this->aCurrent['restriction']['category']); }
/** * Get profile cover */ function cover($aData, $sTemplateName = 'cover.html') { $CNF =& $this->_oConfig->CNF; bx_import('BxDolPermalinks'); $oModule = BxDolModule::getInstance($this->MODULE); $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]); $sUrlPicture = $this->urlPicture($aData); $sUrlAvatar = $this->urlAvatar($aData); $sUrlPictureChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]); $sUrlCover = $this->urlCover($aData); $sUrlCoverChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_COVER'] . '&id=' . $aData[$CNF['FIELD_ID']]); $sCoverPopup = ''; $sCoverPopupId = $this->MODULE . '-popup-cover'; if ($aData[$CNF['FIELD_COVER']]) { bx_import('BxTemplFunctions'); $sCoverPopup = BxTemplFunctions::getInstance()->transBox($sCoverPopupId, $this->parseHtmlByName('image_popup.html', array('image_url' => $sUrlCover, 'bx_if:owner' => array('condition' => CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedChangeCover($aData), 'content' => array('change_image_url' => $sUrlCoverChange)))), true, true); } $sPicturePopup = ''; $sPicturePopupId = $this->MODULE . '-popup-picture'; if ($aData[$CNF['FIELD_PICTURE']]) { bx_import('BxTemplFunctions'); $sPicturePopup = BxTemplFunctions::getInstance()->transBox($sPicturePopupId, $this->parseHtmlByName('image_popup.html', array('image_url' => $sUrlPicture, 'bx_if:owner' => array('condition' => CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedEdit($aData), 'content' => array('change_image_url' => $sUrlPictureChange)))), true, true); } // generate html $aVars = array('id' => $aData[$CNF['FIELD_ID']], 'content_url' => $sUrl, 'title' => $aData[$CNF['FIELD_NAME']], 'picture_avatar_url' => $sUrlAvatar, 'picture_popup' => $sPicturePopup, 'picture_popup_id' => $sPicturePopupId, 'picture_url' => $sUrlPicture, 'picture_href' => !$aData[$CNF['FIELD_PICTURE']] && CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedEdit($aData) ? $sUrlPictureChange : 'javascript:void(0);', 'cover_popup' => $sCoverPopup, 'cover_popup_id' => $sCoverPopupId, 'cover_url' => $sUrlCover, 'cover_href' => !$aData[$CNF['FIELD_COVER']] && CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedChangeCover($aData) ? $sUrlCoverChange : 'javascript:void(0);'); return $this->parseHtmlByName($sTemplateName, $aVars); }
function __construct($aOptions, $oTemplate = false) { parent::__construct($aOptions, $oTemplate); $this->oModule = BxDolModule::getInstance('bx_developer'); $this->sUrlViewDisplays = BX_DOL_URL_STUDIO . 'module.php?name=' . $this->oModule->_oConfig->getName() . '&page=forms&form_page=displays&form_module=%s&form_object=%s'; $this->_aOptions['actions_single']['export']['attr']['title'] = _t('_bx_dev_frm_btn_forms_gl_export'); }
function __construct($sModuleClass = '') { /* main settings for shared modules ownFields - fields which will be got from main table ($this->aCurrent['table']) searchFields - fields which using for full text key search join - array of join tables join array ( 'type' - type of join 'table' - join table 'mainField' - field from main table for 'on' condition 'onField' - field from joining table for 'on' condition 'joinFields' - array of fields from joining table ) */ $this->aCurrent = array('ownFields' => array('ID', 'Title', 'Uri', 'Date', 'Time', 'Rate', 'RateCount'), 'searchFields' => array('Title', 'Tags', 'Description', 'Categories'), 'join' => array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'Owner', 'onField' => 'ID', 'joinFields' => array('NickName')), 'albumsObjects' => array('type' => 'left', 'table' => 'sys_albums_objects', 'mainField' => 'ID', 'onField' => 'id_object', 'joinFields' => ''), 'albums' => array('type' => 'left', 'table' => 'sys_albums', 'mainField' => 'id_album', 'onField' => 'ID', 'joinFields' => array('AllowAlbumView'), 'mainTable' => 'sys_albums_objects')), 'restriction' => array('activeStatus' => array('value' => 'approved', 'field' => 'Status', 'operator' => '=', 'paramName' => 'status'), 'owner' => array('value' => '', 'field' => 'Owner', 'operator' => '=', 'paramName' => 'userID'), 'ownerStatus' => array('value' => array('Rejected', 'Suspended'), 'operator' => 'not in', 'paramName' => 'ownerStatus', 'table' => 'Profiles', 'field' => 'Status'), 'tag' => array('value' => '', 'field' => 'Tags', 'operator' => 'against', 'paramName' => 'tag'), 'category' => array('value' => '', 'field' => 'Categories', 'operator' => 'against', 'paramName' => 'categoryUri'), 'id' => array('value' => '', 'field' => 'ID', 'operator' => 'in'), 'allow_view' => array('value' => '', 'field' => 'AllowAlbumView', 'operator' => 'in', 'table' => 'sys_albums'), 'not_allow_view' => array('value' => '', 'field' => 'AllowAlbumView', 'operator' => 'not in', 'table' => 'sys_albums'), 'album_status' => array('value' => 'active', 'field' => 'Status', 'operator' => '=', 'table' => 'sys_albums'), 'albumType' => array('value' => '', 'field' => 'Type', 'operator' => '=', 'paramName' => 'albumType', 'table' => 'sys_albums')), 'paginate' => array('perPage' => 10, 'page' => 1, 'totalNum' => 10, 'totalPages' => 1), 'sorting' => 'last', 'view' => 'full', 'rss' => array('title' => '', 'link' => '', 'image' => '', 'profile' => 0, 'fields' => array('Link' => '', 'Title' => 'title', 'DateTimeUTS' => 'date', 'Desc' => 'desc', 'Photo' => ''))); // favorite config, basic for all media modules $this->aAddPartsConfig['favorite'] = array('type' => 'inner', 'table' => '', 'mainField' => 'ID', 'onField' => 'ID', 'userField' => 'Profile', 'joinFields' => ''); $this->aPseud = $this->_getPseud(); parent::__construct(); $this->sModuleClass = $sModuleClass; $this->oModule = BxDolModule::getInstance($this->sModuleClass); $this->oTemplate = $GLOBALS['oSysTemplate']; $sClassName = $this->oModule->_oConfig->getClassPrefix() . 'Privacy'; bx_import('Privacy', $this->oModule->_aModule); $this->oPrivacy = new $sClassName('sys_albums', 'ID', 'Owner'); $this->sTemplUnit = 'browse_unit'; $this->bDynamic = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'; }
public function __construct($aObject, $oTemplate = false) { parent::__construct($aObject, $oTemplate); $this->_sModule = 'bx_notifications'; $this->_oModule = BxDolModule::getInstance($this->_sModule); $this->_oModule->setSubmenu('notifications-all'); }
protected function _addJsCss() { parent::_addJsCss(); $oModule = BxDolModule::getInstance($this->MODULE); $oModule->_oTemplate->addJs('main.js'); $oModule->_oTemplate->addCss(array('main-media-tablet.css', 'main-media-desktop.css')); }
public function __construct($aObject, $sStorageObject, $sUniqId) { parent::__construct($aObject, $sStorageObject, $sUniqId); $oModule = BxDolModule::getInstance('bx_timeline'); $oModule->getAttachmentsMenuObject()->addMarkers(array('js_object_uploader_video' => $this->getNameJsInstanceUploader())); $this->_oTemplate = $oModule->_oTemplate; }
function BxGSearchModule(&$aModule) { parent::BxDolModule($aModule); $GLOBALS['aModule'] = $aModule; $this->_iProfileId = $GLOBALS['logged']['member'] || $GLOBALS['logged']['admin'] ? $_COOKIE['memberID'] : 0; $GLOBALS['oBxGSearchModule'] =& $this; }
function BxGSearchModule(&$aModule) { parent::BxDolModule($aModule); $GLOBALS['aModule'] = $aModule; $this->_iProfileId = getLoggedId(); $GLOBALS['oBxGSearchModule'] =& $this; }
protected function setUp() { bx_import('BxDolModule'); $oModule = BxDolModule::getInstance('bx_antispam'); $this->_oDNSBlacklists = bx_instance('BxAntispamDNSBlacklists', array(), $oModule->_aModule); $this->_oDNSURIBlacklists = bx_instance('BxAntispamDNSURIBlacklists', array(), $oModule->_aModule); }
function __construct($sModule = "", $sPage = "") { parent::__construct($sModule, $sPage); bx_import('BxDolModule'); $this->oModule = BxDolModule::getInstance('bx_antispam'); bx_import('BxDolPermalinks'); $this->aMenuItems = array(array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'), array('name' => 'ip_table', 'icon' => 'align-justify', 'title' => '_bx_antispam_ip_table', 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=antispam-ip-table')), array('name' => 'dnsbl_list', 'icon' => 'align-justify', 'title' => '_bx_antispam_dnsbl_list', 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=antispam-dnsbl-list')), array('name' => 'block_log', 'icon' => 'clock-o', 'title' => '_bx_antispam_block_log', 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=antispam-block-log'))); }
/** * Class constructor ; * * @param : $aModule (array) - contain some information about this module; * [ id ] - (integer) module's id ; * [ title ] - (string) module's title ; * [ vendor ] - (string) module's vendor ; * [ path ] - (string) path to this module ; * [ uri ] - (string) this module's URI ; * [ class_prefix ] - (string) this module's php classes file prefix ; * [ db_prefix ] - (string) this module's Db tables prefix ; * [ date ] - (string) this module's date installation ; */ function BxShoutBoxModule(&$aModule) { parent::BxDolModule($aModule); // prepare the location link ; $this->sPathToModule = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); $this->aModuleInfo = $aModule; $this->iMemberId = getLoggedId(); }
/** * Constructor */ function __construct($aModule) { parent::__construct($aModule); $this->iUserId = isLogged() && isAdmin() ? getLoggedId() : 0; $this->_oConfig->init($this->_oDb); $this->_oTemplate->init($this, $this->_oDb); $this->_aCssMatch = $this->_oDb->getUnits(); }
function __construct(&$aModule) { parent::__construct($aModule); $this->_iProfileId = getLoggedId(); $this->_aParts = $this->_oDb->getParts(); $this->_oDb->_aParts =& $this->_aParts; $this->_sProto = bx_proto(); }
/** * Constructor */ function BxProfileCustomizeModule($aModule) { parent::BxDolModule($aModule); $this->iUserId = getLoggedId(); $this->_oConfig->init($this->_oDb); $this->_oTemplate->init($this, $this->_oDb); $this->_aCssMatch = $this->_oDb->getUnits(); }
/** * Constructor */ function BxProfileCustomizeModule($aModule) { parent::BxDolModule($aModule); $this->iUserId = $GLOBALS['logged']['member'] || $GLOBALS['logged']['admin'] ? $_COOKIE['memberID'] : 0; $this->_oConfig->init($this->_oDb); $this->_oTemplate->init($this, $this->_oDb); $this->_aCssMatch = $this->_oDb->getUnits(); }
function __construct($aParams) { parent::__construct(isset($aParams['page']) ? $aParams['page'] : ''); $this->aParams = $aParams; $this->sSubpageUrl = $this->aParams['url'] . '&pgt_page='; bx_import('BxDolModule'); $this->oModule = BxDolModule::getInstance('bx_developer'); }
public function __construct($aObject, $oTemplate = false) { parent::__construct($aObject, $oTemplate); $this->_oModule = BxDolModule::getInstance($this->MODULE); // select module submenu $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu'); $oMenuSubmenu->setObjectSubmenu($this->_oModule->_oConfig->CNF['OBJECT_MENU_SUBMENU']); }
/** * Constructor */ function __construct($aModule) { parent::__construct($aModule); $this->_oConfig->init($this->_oDb); $this->_oTemplate->init($this); $this->_iOwnerId = 0; //--- Define Membership Actions ---// defineMembershipActions(array('timeline repost', 'timeline post comment', 'timeline delete comment'), 'ACTION_ID_'); }
function isPostReplyAllowed() { if (!parent::isPostReplyAllowed()) { return false; } $oMain = BxDolModule::getInstance('BxAdsModule'); $aAdPost = $oMain->_oDb->getAdInfo($this->getId()); return $oMain->isAllowedComments($aAdPost); }