当前位置: 首页>>代码示例>>PHP>>正文


PHP e107::getScParser方法代码示例

本文整理汇总了PHP中e107::getScParser方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::getScParser方法的具体用法?PHP e107::getScParser怎么用?PHP e107::getScParser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在e107的用法示例。


在下文中一共展示了e107::getScParser方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initShortcodeClass

/**
 * FIXME: to be removed
 */
function initShortcodeClass($class, $force = false, $eVars = null)
{
    return e107::getScParser()->initShortcodeClass($class, $eVars, $force);
}
开发者ID:JBeezygit,项目名称:e107,代码行数:7,代码来源:shortcode_handler.php

示例2: __get

 public function __get($name)
 {
     switch ($name) {
         case 'e_sc':
             $ret = e107::getScParser();
             break;
         default:
             trigger_error('$e107->$' . $name . ' not defined', E_USER_WARNING);
             return NULL;
             break;
     }
     $this->{$name} = $ret;
     return $ret;
 }
开发者ID:notzen,项目名称:e107,代码行数:14,代码来源:e_parse_class.php

示例3: pm_user_lookup

 *	@package	e107_plugins
 *	@subpackage	pm
 */
$retrieve_prefs[] = 'pm_prefs';
require_once '../../class2.php';
if (!e107::isInstalled('pm')) {
    e107::redirect();
    exit;
}
if (vartrue($_POST['keyword'])) {
    pm_user_lookup();
}
require_once e_PLUGIN . 'pm/pm_class.php';
require_once e_PLUGIN . 'pm/pm_func.php';
include_lan(e_PLUGIN . 'pm/languages/' . e_LANGUAGE . '.php');
e107::getScParser();
require_once e_PLUGIN . 'pm/pm_shortcodes.php';
define('ATTACHMENT_ICON', "<img src='" . e_PLUGIN . "pm/images/attach.png' alt='' />");
$qs = explode('.', e_QUERY);
$action = varset($qs[0], 'inbox');
if (!$action) {
    $action = 'inbox';
}
if ($action == 'textarea' || $action == 'input') {
    if ($qs[1] == 'pm_to') {
        require_once e_HANDLER . 'user_select_class.php';
        $us = new user_select();
        $us->popup();
        exit;
    }
}
开发者ID:gitter-badger,项目名称:e107,代码行数:31,代码来源:pm.php

示例4: processSubs

 /**
  * Called to process the calendar menu subscriptions list - the cron task must be set to call us once/day (typically at about 0100)
  * 
  * Emails are added to the queue.
  * Various events are logged in a text file
  *
  * @return none
  */
 public function processSubs()
 {
     global $pref;
     require_once e_PLUGIN . 'calendar_menu/ecal_class.php';
     $this->ecalClass = new ecal_class();
     e107::getScParser();
     require_once e_PLUGIN . 'calendar_menu/calendar_shortcodes.php';
     if (is_readable(THEME . 'ec_mailout_template.php')) {
         // Has to be require
         require THEME . 'ec_mailout_template.php';
     } else {
         require e_PLUGIN . 'calendar_menu/ec_mailout_template.php';
     }
     $this->startTime = mktime(0, 0, 0, date('n'), date('d'), date('Y'));
     // Date for start processing
     setScVar('event_calendar_shortcodes', 'ecalClass', &$this->ecalClass);
     // Give shortcode a pointer to calendar class
     $this->logRequirement = varset($pref['eventpost_emaillog'], 0);
     if ($this->debugLevel >= 2) {
         $this->logRequirement = 2;
     }
     // Force full logging if debug
     // Start of the 'real' code
     $this->logLine("\r\n\r\n" . LAN_EC_MAIL_06 . date('D j M Y G:i:s'));
     // Start with the 'in advance' emails
     $cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and \n\t\tevent_cat_last < " . intval($this->startTime) . " and \n\t\tevent_cat_ahead > 0 and \n\t\tevent_start >= (" . intval($this->startTime) . "+(86400*(event_cat_ahead))) and\n\t\tevent_start <  (" . intval($this->startTime) . "+(86400*(event_cat_ahead+1))) and\n\t\tfind_in_set(event_cat_notify,'1,3,5,7')";
     $this->sendMailshot($cal_args, 'Advance', 1, $calendar_shortcodes);
     $insertString = 'event_cat_today < ' . intval($this->startTime) . ' and';
     if ($this->debugLevel > 0) {
         $insertString = '';
     }
     // Allows us to so a mailshot every call of cron tick
     // then for today
     $cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and \n\t\t{$insertString} event_start >= (" . intval($this->startTime) . ") and\n\t\tevent_start <  (86400+" . intval($this->startTime) . ") and\n\t\tfind_in_set(event_cat_notify,'2,3,6,7')";
     $this->sendMailshot($cal_args, 'today', 2, $calendar_shortcodes);
     // Finally do 'day before' emails (its an alternative to 'today' emails)
     $cal_args = "select * from #event left join #event_cat on event_category=event_cat_id where (event_cat_subs>0 OR event_cat_force_class>0) and \n\t\t{$insertString} event_start >= (" . intval($this->startTime) . " + 86400 ) and\n\t\tevent_start <  (" . intval($this->startTime) . " + 172800) and\n\t\tfind_in_set(event_cat_notify,'4,5,6,7')";
     $this->sendMailshot($cal_args, 'tomorrow', 2, $calendar_shortcodes);
     $this->logLine(' .. Run completed', TRUE, TRUE);
     return TRUE;
 }
开发者ID:notzen,项目名称:e107,代码行数:49,代码来源:e_cron.php

示例5: sc_featurebox_navigation

 /**
  * Render featurebox navigation
  * Available parameters (GET string format)
  * - loop (boolean): loop using 'nav_loop' template, default 0
  * - base (string): template key prefix, default is 'nav'. Example: 'mynav' base key will search templates 'mynav_start', 'mynav_loop', 'mynav_end'.
  * - nolimit (boolean): ignore 'limit' field , use 'total' items number for navigation looping
  * - uselimit (boolean): ignore 'limit' field , use 'total' items number for navigation looping
  * 
  * @param string $parm parameters
  * @param string $mod category template
  */
 function sc_featurebox_navigation($parm, $mod = '')
 {
     // TODO cache
     //TODO default $parm values. eg. assume 'tabs' when included in the 'tabs' template.
     if (!e107::isInstalled('featurebox')) {
         return '';
     }
     if (!$mod) {
         $ctemplate = 'default';
     } else {
         $ctemplate = $mod;
     }
     parse_str($parm, $parm);
     $category = $this->getCategoryModel($ctemplate);
     if (!$category->hasData()) {
         return '';
     }
     $tree = $category->getItemTree();
     if ($tree->isEmpty()) {
         return '';
     }
     $tmpl = $this->getFboxTemplate($ctemplate);
     if ($category->get('fb_category_random')) {
         unset($parm['loop']);
     }
     $base = vartrue($parm['base'], 'nav') . '_';
     $tree_ids = array_keys($tree->getTree());
     //all available item ids
     $ret = $category->toHTML(varset($tmpl[$base . 'start']), true);
     $cols = $category->getParam('cols', 1);
     if (isset($parm['loop']) && $tree->getTotal() > 0 && vartrue($tmpl[$base . 'item'])) {
         // loop for all
         if (isset($parm['nolimit'])) {
             $total = $tree->getTotal();
         } elseif (isset($parm['uselimit'])) {
             $total = $category->sc_featurebox_category_limit() ? intval($category->sc_featurebox_category_limit()) : $tree->getTotal();
             if ($total > $tree->getTotal()) {
                 $total = $tree->getTotal();
             }
         } else {
             $total = ceil($tree->getTotal() / ($category->sc_featurebox_category_limit() ? intval($category->sc_featurebox_category_limit()) : $tree->getTotal()));
         }
         if ($cols > 1) {
             $total = ceil($total / $cols);
         }
         $model = clone $category;
         $item = new plugin_featurebox_item();
         $tmp = array();
         for ($index = 1; $index <= $total; $index++) {
             $nodeid = varset($tree_ids[($index - 1) * $cols], 0);
             if ($nodeid && $tree->hasNode($nodeid)) {
                 $model->setParam('counter', $index)->setParam('total', $total)->setParam('active', $index == varset($parm['from'], 1));
                 $node = $tree->getNode($nodeid);
                 e107::getScParser()->resetScClass('plugin_featurebox_category', $model);
                 $node->setCategory($model)->setParam('counter', $index)->setParam('total', $total)->setParam('limit', $category->get('fb_category_limit'));
                 $tmp[] = $node->toHTML($tmpl[$base . 'item'], true);
                 continue;
             }
             e107::getScParser()->resetScClass('plugin_featurebox_item', $item);
             $tmp[] = $model->setParam('counter', $index)->setParam('active', $index == varset($parm['from'], 1))->toHTML($tmpl[$base . 'item'], true);
         }
         $ret .= implode(varset($tmpl[$base . 'separator']), $tmp);
         unset($model, $tmp);
     }
     $ret .= $category->toHTML(varset($tmpl[$base . 'end']), true);
     // Moved to 'sc_featurebox' - as it wouldn't load js if navigation was not used.
     /*
     $type = vartrue($tmpl['js_type'],''); // Legacy support (prototype.js)
     
     if(vartrue($tmpl['js']))
     {		
     	$tmp = explode(',', $tmpl['js']);
     	
     	foreach($tmp as $file)
     	{
     		e107::js('footer',$file,$type);	
     	}
     }
     		
     if(vartrue($tmpl['js_inline']))
     {
     	e107::js('inline',$tmpl['js_inline'],$type,3);
     	// e107::getJs()->footerInline($tmpl['js_inline'], 3);
     }
     
     if(vartrue($tmpl['css']))
     {		
     	$tmp = explode(',', $tmpl['css']);
     	foreach($tmp as $file)
//.........这里部分代码省略.........
开发者ID:armpit,项目名称:e107,代码行数:101,代码来源:e_shortcode.php

示例6: ob_implicit_flush

* $Source: /cvs_backup/e107_0.8/e107_files/e_ajax.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
$_E107['minimal'] = TRUE;
require_once "../class2.php";
//ob_start();
ob_implicit_flush(0);
// Ajax Short-code-Replacer Routine.
$shortcodes = "";
// FIXME - new .php shortcodes & security (require_once)
if ($_POST['ajax_sc'] && $_POST['ajax_scfile']) {
    //include_once(e_HANDLER.'shortcode_handler.php');
    $file = e107::getParser()->replaceConstants($_POST['ajax_scfile']);
    $shortcodes = e107::getScParser()->parse_scbatch($file);
}
if (vartrue($_POST['ajax_sc']) && e_AJAX_REQUEST) {
    // temporary fix
    global $register_sc;
    if (isset($register_sc) && is_array($register_sc)) {
        // parse errror fix from the previous commit
        e107::getScParser()->loadThemeShortcodes();
    }
    list($fld, $parm) = explode("=", $_POST['ajax_sc'], 2);
    $prm = $parm ? "=" . rawurldecode($parm) : "";
    //var_dump($_GET);
    echo e107::getParser()->parseTemplate("{" . strtoupper($fld) . $prm . "}", true, $shortcodes);
    exit;
}
开发者ID:armpit,项目名称:e107,代码行数:31,代码来源:e_ajax.php


注:本文中的e107::getScParser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。