예제 #1
0
 public static function init()
 {
     $moduleManager = SJB_System::getModuleManager();
     $miscellaneous = $moduleManager->modules['miscellaneous']['functions'];
     $newMiscellaneous = array('mailchimp' => array('display_name' => 'Subscribe to newsletter', 'script' => 'mailchimp.php', 'type' => 'user', 'access_type' => array('user')));
     $allFunctions = array_merge($miscellaneous, $newMiscellaneous);
     $moduleManager->modules['miscellaneous']['functions'] = $allFunctions;
     if (SJB_Settings::getSettingByName('mc_subscribe_new_users')) {
         SJB_Event::handle('onAfterUserCreated', array('MailChimpPlugin', 'subscribeUser'));
     }
 }
예제 #2
0
파일: index.php 프로젝트: Maxlander/shixi
if (!function_exists('json_decode')) {
    $GLOBALS[SJB_SocialPlugin::SOCIAL_ACCESS_ERROR]['SOCIAL_ACCESS_ERROR'] = 'facebook';
    SJB_Error::writeToLog('Facebook needs the JSON PHP extension.');
    return null;
}
require_once 'facebook_social_plugin.php';
SJB_SocialPlugin::loadPlugin('facebook', $socPlugin = new FacebookSocialPlugin());
if ($socPlugin->getNetwork() === SJB_SocialPlugin::getNetwork()) {
    /*
     * login/logout
     */
    SJB_Event::handle('Login_Plugin', array('SJB_SocialPlugin', 'login'));
    SJB_Event::handle('Logout', array('SJB_SocialPlugin', 'logout'), 1000);
    /*
     * registration
     */
    SJB_Event::handle('FillRegistrationDataRequest_Plugin', array('FacebookSocialPlugin', 'fillRegistrationDataWithRequest'));
    SJB_Event::handle('FillRegistrationData_Plugin', array('SJB_SocialPlugin', 'fillRegistrationDataWithUser'));
    SJB_Event::handle('PrepareRegistrationFields_SocialPlugin', array('FacebookSocialPlugin', 'prepareRegistrationFields'));
    SJB_Event::handle('MakeRegistrationFieldsNotRequired_SocialPlugin', array('FacebookSocialPlugin', 'makeRegistrationFieldsNotRequired'));
    SJB_Event::handle('AddReferencePluginDetails', array('SJB_SocialPlugin', 'addReferenceDetails'));
    SJB_Event::handle('SocialPlugin_PostRegistrationActions', array('SJB_SocialPlugin', 'postRegistrationActions'));
    SJB_Event::handle('SocialPlugin_AddListingFieldsIntoRegistration', array('FacebookSocialPlugin', 'addListingFieldsIntoRegistration'));
    /*
     * LISTING AUTOFILL SYNCHRONIZATION
     */
    SJB_Event::handle('SocialSynchronization', array('SJB_SocialPlugin', 'autofillListing'));
    SJB_Event::handle('SocialSynchronizationForm', array('SJB_SocialPlugin', 'autofillListingForm'));
    SJB_Event::handle('SocialSynchronizationFields', array('SJB_SocialPlugin', 'autofillListingFields'));
    SJB_Event::handle('SocialSynchronizationFieldsOnPostingPages', array('SJB_SocialPlugin', 'autofillListingFieldsOnPostingPages'));
}
예제 #3
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

require_once 'google_analytics_plugin.php';
SJB_Event::handle('moduleManagerCreated', array('GoogleAnalyticsPlugin', 'init'));
예제 #4
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

require_once 'google_plus_integration_plugin.php';
$includePath = explode(PATH_SEPARATOR, get_include_path());
unset($includePath[0]);
set_include_path(implode(PATH_SEPARATOR, $includePath));
SJB_SocialPlugin::loadPlugin('google_plus', new GooglePlusSocialPlugin());
if (GooglePlusSocialPlugin::getNetwork() === SJB_SocialPlugin::getNetwork()) {
    SJB_Event::handle('Login_Plugin', array('SJB_SocialPlugin', 'login'));
    SJB_Event::handle('Logout', array('GooglePlusSocialPlugin', 'logout'), 1000);
    SJB_Event::handle('FillRegistrationData_Plugin', array('SJB_SocialPlugin', 'fillRegistrationDataWithUser'));
    SJB_Event::handle('PrepareRegistrationFields_SocialPlugin', array('SJB_SocialPlugin', 'prepareRegistrationFields'));
    SJB_Event::handle('MakeRegistrationFieldsNotRequired_SocialPlugin', array('SJB_SocialPlugin', 'makeRegistrationFieldsNotRequired'));
    SJB_Event::handle('AddReferencePluginDetails', array('GooglePlusSocialPlugin', 'addReferenceDetails'));
}
예제 #5
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

require_once 'juju_plugin.php';
SJB_Event::handle('jujuBeforeGenerateListingStructure', array('JujuPlugin', 'getListingsFromJuju'));
SJB_Event::handle('jujuAfterGenerateListingStructure', array('JujuPlugin', 'addJujuListingsToListingStructure'));
SJB_Event::handle('registerListingProviders', array('JujuPlugin', 'registerAsListingsProvider'));
예제 #6
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

require_once 'captcha_plugin.php';
SJB_Event::handle('editCaptcha', array('CaptchaPlugin', 'editCaptcha'));
SJB_Event::handle('getCaptchaProperties', array('CaptchaPlugin', 'getCaptchaProperties'));
SJB_Event::handle('captchaValidation', array('CaptchaPlugin', 'captchaValidation'));
SJB_Event::handle('getPropertyInfo', array('CaptchaPlugin', 'getPropertyInfo'));
SJB_Event::handle('captchaIsEmpty', array('CaptchaPlugin', 'captchaIsEmpty'));
예제 #7
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

require_once 'wordpress_bridge_plugin.php';
SJB_Event::handle('Login', array('WordPressBridgePlugin', 'login'));
SJB_Event::handle('Logout', array('WordPressBridgePlugin', 'logout'));
SJB_Event::handle('DisplayBlogContent', array('WordPressBridgePlugin', 'displayBlogContent'));
예제 #8
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

require_once 'phpbb_bridge_plugin.php';
$userSession = PhpBBBridgePlugin::getUserSessionBySessionId(SJB_Session::getSessionId());
if (!empty($userSession)) {
    if (SJB_UserManager::isUserLoggedIn()) {
        if ($userSession['user_sid'] !== SJB_UserManager::getCurrentUserSID()) {
            if (!$userSession['user_sid']) {
                SJB_Authorization::logout();
            } else {
                SJB_Session::setValue('current_user', PhpBBBridgePlugin::sessionDecode($userSession['data']));
            }
        }
    } else {
        SJB_Session::setValue('current_user', PhpBBBridgePlugin::sessionDecode($userSession['data']));
    }
}
SJB_Event::handle('Login', array('PhpBBBridgePlugin', 'login'));
SJB_Event::handle('Logout', array('PhpBBBridgePlugin', 'logout'));
예제 #9
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

$timeBegin = microtime(true);
error_reporting(-1);
ini_set('display_errors', 'on');
define('PATH_TO_SYSTEM_CLASS', '../system/core/System.php');
$DEBUG = array();
$PATH_BASE = str_replace('/admin', '', dirname(__FILE__));
require_once PATH_TO_SYSTEM_CLASS;
define('SJB_BASE_DIR', realpath(dirname(__FILE__) . "/..") . '/');
SJB_System::loadSystemSettings('../system/admin-config/DefaultSettings.php');
SJB_System::loadSystemSettings('../config.php');
$GLOBALS['system_settings']['USER_SITE_URL'] = $GLOBALS['system_settings']['SITE_URL'];
$GLOBALS['system_settings']['SITE_URL'] = $GLOBALS['system_settings']['ADMIN_SITE_URL'];
// load installed SJB version info
SJB_System::setGlobalTemplateVariable('version', SJB_System::getSystemSettings('version'));
SJB_System::boot();
SJB_System::init();
if (SJB_Profiler::getInstance()->isProfilerEnable()) {
    SJB_Profiler::getInstance()->setStartTime($timeBegin);
}
// bind send notification emails if listing deactivated/deleted
SJB_Event::handle('listingDeactivated', array('SJB_Notifications', 'notifyOnUserListingDeactivated'));
SJB_Event::handle('beforeListingDelete', array('SJB_Notifications', 'notifyOnUserListingDeleted'));
// bind send notification emails if user deactivated/deleted
SJB_Event::handle('onBeforeUserDelete', array('SJB_Notifications', 'notifyOnUserDeleted'));
SJB_Event::handle('onBeforeUserDeactivate', array('SJB_Notifications', 'notifyOnUserDeactivated'));
SJB_Request::getInstance()->execute();
SJB_HelperFunctions::debugInfoPrint();
예제 #10
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

require_once 'mailchimp_plugin.php';
// init handle
SJB_Event::handle('moduleManagerCreated', array('MailChimpPlugin', 'init'));
예제 #11
0
파일: index.php 프로젝트: Maxlander/shixi
<?php

require_once 'simply_hired_plugin.php';
SJB_Event::handle('simplyhiredBeforeGenerateListingStructure', array('SimplyHiredPlugin', 'getListingsFromSimplyHired'));
SJB_Event::handle('simplyhiredAfterGenerateListingStructure', array('SimplyHiredPlugin', 'addSimplyHiredListingsToListingStructure'));
// register plugin as listings provider for ajax requests
SJB_Event::handle('registerListingProviders', array('SimplyHiredPlugin', 'registerAsListingsProvider'));
예제 #12
0
파일: index.php 프로젝트: Maxlander/shixi
}
SJB_System::boot();
SJB_System::init();
if (SJB_Profiler::getInstance()->isProfilerEnable()) {
    SJB_Profiler::getInstance()->setStartTime($timeBegin);
}
SJB_Event::dispatch('AfterSystemBoot');
SJB_UpdateManager::updateDatabase();
//bind send notification emails if listing deactivated/deleted
SJB_Event::handle('listingDeactivated', array('SJB_Notifications', 'notifyOnUserListingDeactivated'));
SJB_Event::handle('beforeListingDelete', array('SJB_Notifications', 'notifyOnUserListingDeleted'));
//bind send notification emails if user deactivated/deleted
SJB_Event::handle('onBeforeUserDelete', array('SJB_Notifications', 'notifyOnUserDeleted'));
SJB_Event::handle('onBeforeUserDeactivate', array('SJB_Notifications', 'notifyOnUserDeactivated'));
// bind session clear to task scheduler event
SJB_Event::handle('task_scheduler_run', array('SJB_Session', 'clearTemporaryData'));
SJB_Request::getInstance()->execute();
SJB_Statistics::addStatistics('siteView', '', 0, true);
$isPseudoCronEnabled = intval(SJB_Settings::getSettingByName('isPseudoCronEnabled')) === 1;
if ($isPseudoCronEnabled) {
    $isEmailSchedulerEnabled = intval(SJB_Settings::getSettingByName('email_scheduling')) === 1;
    $isOncePerHourCondition = SJB_Settings::getSettingByName('emailSchedule_lastTimeExecuted') < strtotime('1 hour ago');
    if ($isEmailSchedulerEnabled && $isOncePerHourCondition) {
        SJB_Settings::updateSetting('emailSchedule_lastTimeExecuted', time());
        SJB_System::getModuleManager()->executeFunction('miscellaneous', 'email_scheduling');
    }
    $numberOfPageViewsSinceLastTime = SJB_Settings::getValue('pseudoCron_numberOfPageViewsSinceLastTime');
    $isPageViewCondition = intval(SJB_Settings::getValue('pseudoCron_numberOfPageViewsSinceLastTime')) > SJB_Settings::getSettingByName('numberOfPageViewsToExecCronIfExceeded');
    if ($isPageViewCondition) {
        SJB_Settings::updateSetting('pseudoCron_numberOfPageViewsSinceLastTime', 0);
        list($month, $day, $year) = explode('.', SJB_Settings::getSettingByName('task_scheduler_last_executed_date'));