function __construct(&$aModule) { parent::__construct($aModule); $GLOBALS['aModule'] = $aModule; $this->_iProfileId = getLoggedId(); $this->_sProto = bx_proto(); }
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 __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(); }
/** * 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_'); }
/** * 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 __construct(&$aModule) { parent::__construct($aModule); // prepare the location link ; $this->sPathToModule = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); $this->sModuleName = 'bx_' . $aModule['uri']; $this->aModuleInfo = $aModule; $this->iMemberId = getLoggedId(); $this->_aObjects = $this->_oDb->getShoutboxObjects(); }
function __construct(&$aModule) { parent::__construct($aModule); $aConfig = array('client_table' => 'bx_oauth_clients', 'access_token_table' => 'bx_oauth_access_tokens', 'refresh_token_table' => 'bx_oauth_refresh_tokens', 'code_table' => 'bx_oauth_authorization_codes', 'user_table' => 'Profiles', 'jwt_table' => '', 'jti_table' => '', 'scope_table' => 'bx_oauth_scopes', 'public_key_table' => ''); $this->_oStorage = new OAuth2\Storage\Pdo(array('dsn' => $this->_buildDSN(), 'username' => BX_DATABASE_USER, 'password' => BX_DATABASE_PASS, 'options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'")), $aConfig); $this->_oServer = new OAuth2\Server($this->_oStorage, array('require_exact_redirect_uri' => false, 'refresh_token_lifetime' => 7776000)); // Add the "Client Credentials" grant type (it is the simplest of the grant types) $this->_oServer->addGrantType(new OAuth2\GrantType\ClientCredentials($this->_oStorage)); // Add the "Authorization Code" grant type (this is where the oauth magic happens) $this->_oServer->addGrantType(new OAuth2\GrantType\AuthorizationCode($this->_oStorage)); }
/** * 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 __construct($aModule) { parent::__construct($aModule); $this->sHomeUrl = $this->_oConfig->_sHomeUrl; $this->sModuleName = 'bx_' . $aModule['uri']; $this->aModuleInfo = $aModule; $this->iLoggedMemberId = getLoggedId(); $this->aCoreSettings = array('update_time' => $this->_oConfig->iUpdateTime, 'number_visible_messages' => $this->_oConfig->iVisibleMessages, 'limit_returning_messages' => $this->_oConfig->iCountRetMessages, 'number_of_allowed_chat_boxes' => $this->_oConfig->iCountAllowedChatBoxes, 'output_block' => $this->_oConfig->sOutputBlock, 'page_receiver' => BX_DOL_URL_ROOT . 'modules/?r=' . $this->aModuleInfo['uri'] . '/get_operation', 'history_block_prefix' => $this->_oConfig->sOutputBlockPrefix, 'save_chat_history' => $this->_oConfig->bSaveChatHistory, 'language_keys' => array('empty_message' => _t('_simple_messenger_empty_message')), 'blink_counter' => $this->_oConfig->iBlinkCounter, 'message_date_format' => $this->_oConfig->sMessageDateFormat); $this->sMemberMenuPosition = isset($_COOKIE['menu_position']) ? $_COOKIE['menu_position'] : getParam('ext_nav_menu_top_position'); $this->oPrivacy = new BxSimpleMessengerPrivacy($this); }
function __construct(&$aModule) { parent::__construct($aModule); $aConfig = array('client_table' => 'bx_oauth_clients', 'access_token_table' => 'bx_oauth_access_tokens', 'refresh_token_table' => 'bx_oauth_refresh_tokens', 'code_table' => 'bx_oauth_authorization_codes', 'user_table' => 'Profiles', 'jwt_table' => '', 'jti_table' => '', 'scope_table' => 'bx_oauth_scopes', 'public_key_table' => ''); $this->_oStorage = new OAuth2\Storage\Pdo(BxDolDb::getInstance()->getLink(), $aConfig); $this->_oServer = new OAuth2\Server($this->_oStorage, array('require_exact_redirect_uri' => false)); // Add the "Client Credentials" grant type (it is the simplest of the grant types) $this->_oServer->addGrantType(new OAuth2\GrantType\ClientCredentials($this->_oStorage)); // Add the "Authorization Code" grant type (this is where the oauth magic happens) $this->_oServer->addGrantType(new OAuth2\GrantType\AuthorizationCode($this->_oStorage)); }
function __construct($aModule) { parent::__construct($aModule); $this->_oConfig->init($this->_oDb); $this->_oTemplate->init($this); $sClassPrefix = $this->_oConfig->getClassPrefix(); $sClassName = $sClassPrefix . 'Privacy'; $this->_oPrivacy = class_exists($sClassName) ? new $sClassName($this) : null; $sClassName = $sClassPrefix . 'Data'; $this->_oTextData = class_exists($sClassName) ? new $sClassName($this) : null; }
/** * Constructor */ function __construct($aModule) { parent::__construct($aModule); //--- Define Membership Actions ---// $aActions = $this->_oDb->getMembershipActions(); foreach ($aActions as $aAction) { $sName = 'ACTION_ID_' . strtoupper(str_replace(' ', '_', $aAction['name'])); if (!defined($sName)) { define($sName, $aAction['id']); } } }
/** * Constructor */ function __construct(&$aModule) { parent::__construct($aModule); $this->_iProfileId = $this->_oDb->iViewer; $this->_oTemplate->init($this->_oDb); $this->aPageTmpl = array('name_index' => 1, 'header' => $GLOBALS['site']['title'], 'header_text' => ''); $sClassName = $this->_oConfig->getClassPrefix() . 'Privacy'; bx_import('Privacy', $aModule); $this->oPrivacy = new $sClassName(); $this->oAlbumPrivacy = new $sClassName('sys_albums'); $this->oAlbums = new BxDolAlbums($this->_oConfig->getMainPrefix(), $this->_iProfileId); $this->aSectionsAdmin = array('approved' => array('exclude_btns' => array('activate')), 'disapproved' => array('exclude_btns' => array('deactivate', 'featured', 'unfeatured')), 'pending' => array('exclude_btns' => array('activate', 'deactivate', 'featured', 'unfeatured'))); }
function __construct($aModule) { parent::__construct($aModule); $this->aTools = array(array('name' => BX_DEV_TOOLS_SETTINGS, 'title' => '', 'icon' => 'cogs'), array('name' => BX_DEV_TOOLS_FORMS, 'title' => '', 'icon' => 'bx-dev-mi-forms.png'), array('name' => BX_DEV_TOOLS_NAVIGATION, 'title' => '', 'icon' => 'bx-dev-mi-navigation.png'), array('name' => BX_DEV_TOOLS_PAGES, 'title' => '', 'icon' => 'bx-dev-mi-pages.png'), array('name' => BX_DEV_TOOLS_POLYGLOT, 'title' => '', 'icon' => 'bx-dev-mi-polyglot.png')); }
function __construct($aModule) { parent::__construct($aModule); }
/** * Constructor */ function __construct($aModule) { parent::__construct($aModule); $this->_oConfig->init($this->_oDb); }
/** * Constructor */ function __construct($aModule) { parent::__construct($aModule); $this->_oConfig->init($this->_oDb); $this->_iUserId = $this->getUserId(); $this->_sGeneralPrefix = $this->_oConfig->getGeneralPrefix(); $this->_sLangsPrefix = $this->_oConfig->getLangsPrefix(); $this->_sEmailTemplatesPrefix = $this->_oConfig->getEmailTemplatesPrefix(); $this->_sSessionKeyPending = $this->_sGeneralPrefix . 'pending_id'; $this->_sRequestKeyPending = $this->_sGeneralPrefix . 'pending_id'; $sClassPrefix = $this->_oConfig->getClassPrefix(); bx_import('Cart', $aModule); $sClassName = $sClassPrefix . 'Cart'; $this->_oCart = new $sClassName($this->_oDb, $this->_oConfig, $this->_oTemplate); bx_import('Details', $aModule); $sClassName = $sClassPrefix . 'Details'; $this->_oDetails = new $sClassName($this->_oDb, $this->_oConfig); bx_import('Orders', $aModule); $sClassName = $sClassPrefix . 'Orders'; $this->_oOrders = new $sClassName($this->_iUserId, $this->_oDb, $this->_oConfig, $this->_oTemplate); $this->_aOrderTypes = array(BX_PMT_ORDERS_TYPE_PENDING, BX_PMT_ORDERS_TYPE_PROCESSED, BX_PMT_ORDERS_TYPE_SUBSCRIPTION, BX_PMT_ORDERS_TYPE_HISTORY); }
function __construct(&$aModule) { parent::__construct($aModule); $this->_iProfileId = getLoggedId(); $GLOBALS['oBxAvaModule'] =& $this; }
function __construct(&$aModule) { parent::__construct($aModule); $this->_iProfileId = bx_get_logged_profile_id(); }
function __construct(&$aModule) { parent::__construct($aModule); $this->_iProfileId = isLogged() ? getLoggedId() : 0; }
/** * 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 __construct(&$aModule) { parent::__construct($aModule); // prepare the location link ; $this->sPathToModule = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); $this->aModuleInfo = $aModule; $this->oSearch = new BxSpySearch($this); // define current page's mode; $this->sSpyMode = isset($_GET['mode']) ? $_GET['mode'] : 'global'; $this->iMemberId = getLoggedId(); $this->iPage = isset($_GET['page']) ? (int) $_GET['page'] : 1; $this->iPerPage = isset($_GET['per_page']) ? (int) $_GET['per_page'] : $this->_oConfig->iPerPage; }
function __construct($aModule) { parent::__construct($aModule); $this->iIconSize = (int) getParam('bx_blogs_iconsize'); $this->iThumbSize = (int) getParam('bx_blogs_thumbsize'); $this->iBigThumbSize = (int) getParam('bx_blogs_bigthumbsize'); $this->iImgSize = (int) getParam('bx_blogs_imagesize'); $this->sHomeUrl = $this->_oConfig->getHomeUrl(); $this->sHomePath = $this->_oConfig->getHomePath(); $this->_iVisitorID = isLogged() ? getLoggedId() : 0; //temple $this->bAdminMode = $this->isAdmin() == true; $this->iPostViewType = 1; $this->iViewingPostID = -1; $this->iLastPostedPostID = -1; $this->aViewingPostInfo = array(); $this->sSpacerPath = getTemplateIcon('spacer.gif'); $this->_sPageHeader = ''; $this->oPrivacy = new BxBlogsPrivacy($this); }
function __construct($aModule) { global $site; parent::__construct($aModule); $this->sHomeUrl = $this->_oConfig->getHomeUrl(); $this->sHomePath = $this->_oConfig->getHomePath(); $this->sUploadDir = 'media/images/classifieds/'; $this->bUseFriendlyLinks = getParam('permalinks_module_ads') == 'on' ? true : false; $this->_oConfig->bUseFriendlyLinks = $this->bUseFriendlyLinks; $this->sPicNotAvail = $this->_oTemplate->getImageUrl('no-image-thumb.png'); $this->sPicNotAvailPath = $this->_oTemplate->getImagePath('no-image-thumb.png'); $this->sSpacerPath = getTemplateIcon('spacer.gif'); $this->_iVisitorID = isLogged() ? getLoggedId() : 0; $this->bAdminMode = $this->isAdmin() == true ? true : false; $this->_oConfig->bAdminMode = $this->isAdmin() == true ? true : false; $this->sCurrBrowsedFile = $this->sHomeUrl . 'classifieds.php'; $this->_oConfig->sCurrBrowsedFile = $this->sCurrBrowsedFile; bx_import('Privacy', $this->_aModule); $this->oPrivacy = new BxAdsPrivacy($this); $this->aPageTmpl['name_index'] = 71; }
/** * 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 ; * @param : $aPollSettings (array) - contain some needed poll's settings; * [ admin_mode ] - (boolean) check admin mode ; * [ member_id ] - (integer) logged member's id ; * [ page_columns ] - (integer) number of poll's columns for per page ; * [ per_page ] - (integer) number of poll's elements for per page ; * [ page ] - (integer) current page ; * [ action ] - (string) contain some specific actions for pools ; */ function __construct($aModule, $aPollSettings = array()) { global $logged; parent::__construct($aModule); $this->sHomeUrl = $this->_oConfig->_sHomeUrl; $this->aPollSettings = $aPollSettings; $this->aPollSettings['question_min_length'] = 10; $this->aPollSettings['question_max_length'] = 300; $this->aPollSettings['answer_min_length'] = 1; $this->aPollSettings['answer_max_length'] = 300; // init some pagination parameters; if (!$this->aPollSettings['per_page']) { $this->aPollSettings['per_page'] = 10; } if ($this->aPollSettings['per_page'] > 100) { $this->aPollSettings['per_page'] = 100; } if ($this->aPollSettings['page'] < 1) { $this->aPollSettings['page'] = 1; } // fill array with templates name; $this->aUsedTemplates = array('poll_init' => 'poll_init.html', 'poll_block' => 'poll_block.html', 'poll_view_block' => 'poll_view_block.html', 'poll_block_ajax' => 'poll_block_ajax.html', 'poll_questions_list' => 'poll_questions_list.xml', 'poll_results_list' => 'poll_results_list.xml', 'server_answer' => 'server_answer.xml', 'poll_creation_form' => 'poll_creation_form.html', 'poll_edit_form' => 'poll_edit_form.html', 'poll_actions' => 'poll_actions.html', 'poll_premoderation' => 'poll_premoderation.html', 'poll_owner' => 'entry_view_block_info.html'); $this->aModuleInfo = $aModule; // prepare the location link ; $this->sPathToModule = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); if ($this->aPollSettings['action']) { $this->sPathToModule .= '&action=' . rawurlencode($this->aPollSettings['action']); } $this->oPrivacy = new BxPollPrivacy($this); $this->oSearch = new BxPollSearch($this); }