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


PHP e107::getPlugPref方法代码示例

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


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

示例1: sc_featurebox

 /**
  * Available parameters (GET string format)
  * - cols (integer): number of items per column, default 1
  * - no_fill_empty (boolean): don't fill last column with empty items (if required), default 0
  * - tablestyle (string): mode to be used with <code>tablerender()</code>, default 'featurebox'
  * - notablestyle (null): if isset - disable <code>tablerender()</code>
  * - force (boolean): force category model load , default false
  * - ids (string): comma separated id list - load specific featurebox items, default empty 
  * 
  * @param string $parm parameters
  * @param string $mod category template
  * @example {FEATUREBOX=cols=2|tabs}
  */
 function sc_featurebox($parm = null, $mod = '')
 {
     if ($parm == null && $mod == '') {
         $type = vartrue(e107::getPlugPref('featurebox', 'menu_category'), 'bootstrap_carousel');
         $text = e107::getParser()->parseTemplate("{FEATUREBOX|" . $type . "}");
         return $text;
     }
     // TODO cache
     if (!e107::isInstalled('featurebox')) {
         return '';
     }
     if (!$mod) {
         $ctemplate = 'default';
     } else {
         $ctemplate = $mod;
     }
     parse_str($parm, $parm);
     $category = $this->getCategoryModel($ctemplate, vartrue($parm['force']) ? true : false);
     $defopt = array('force' => 0, 'no_fill_empty' => 0, 'tablestyle' => 'featurebox', 'cols' => 1, 'ids' => '', 'notablestyle' => null);
     // reset to default, update current
     $category->setParams($defopt)->updateParams($parm);
     if (!$category->hasData()) {
         return '';
     }
     $tmpl = $this->getFboxTemplate($ctemplate);
     $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);
         }
     }
     $tp = e107::getParser();
     if (vartrue($tmpl['js_inline'])) {
         $data = $tp->toText($category->getData('fb_category_parms'));
         $jsInline = str_replace("{FEATUREBOX_PARMS}", "{" . trim($data) . "}", $tmpl['js_inline']);
         e107::js('footer-inline', $jsInline, $type, 3);
     }
     // Fix - don't use tablerender if no result (category could contain hidden items)
     $ret = $this->render($category, $ctemplate, $parm);
     if (empty($ret)) {
         e107::getMessage()->addDebug('Featurebox returned nothing.')->addDebug('Category: ' . print_a($category, true))->addDebug('Template: ' . $ctemplate)->addDebug('Param: ' . print_a($parm, true));
         return '';
     }
     $ret = $tp->parseTemplate($tmpl['list_start'], true, $category) . $ret . $tp->parseTemplate($tmpl['list_end'], true, $category);
     if (isset($parm['notablestyle'])) {
         return $ret;
     }
     return e107::getRender()->tablerender(LAN_PLUGIN_FEATUREBOX_NAME, $ret, vartrue($parm['tablestyle'], 'featurebox'), true);
 }
开发者ID:armpit,项目名称:e107,代码行数:64,代码来源:e_shortcode.php

示例2: explode

$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;
    }
}
$pm_proc_id = intval(varset($qs[1], 0));
//$pm_prefs = $sysprefs->getArray('pm_prefs');
$pm_prefs = e107::getPlugPref('pm');
$pm_prefs['perpage'] = intval($pm_prefs['perpage']);
if ($pm_prefs['perpage'] == 0) {
    $pm_prefs['perpage'] = 10;
}
if (!isset($pm_prefs['pm_class']) || !check_class($pm_prefs['pm_class'])) {
    require_once HEADERF;
    $ns->tablerender(LAN_PM, LAN_PM_12);
    require_once FOOTERF;
    exit;
}
//setScVar('pm_handler_shortcodes','pmPrefs', $pm_prefs);
$pmManager = new pmbox_manager($pm_prefs);
//setScVar('pm_handler_shortcodes','pmManager', &$pmManager);
class pm_extended extends private_message
{
开发者ID:gitter-badger,项目名称:e107,代码行数:31,代码来源:pm.php

示例3: sc_gallery_portfolio

 /**
  * Display a Grid of thumbnails - useful for home pages. 
  * Amount per row differs according to device, so they are not set here, only the amount.  
  * @example {GALLERY_PORTFOLIO: placeholder=1&category=2}
  */
 function sc_gallery_portfolio($parms = '')
 {
     $ns = e107::getRender();
     $parm = eHelper::scParams($parms);
     $cat = $parm['category'] ? $parm['category'] : vartrue(e107::getPlugPref('gallery', 'slideshow_category'), 1);
     //TODO Separate pref?
     $tmpl = e107::getTemplate('gallery', 'gallery');
     $limit = vartrue($parm['limit'], 6);
     $list = e107::getMedia()->getImages('gallery_' . $cat . '|gallery_image_' . $cat, 0, $limit);
     if (count($list) < 1 && vartrue($parm['placeholder'])) {
         $list = array();
         for ($i = 0; $i < $limit; $i++) {
             $list[] = array('media_url' => '');
         }
     }
     //NOTE: Using tablerender() allows the theme developer to set the number of columns etc using col-xx-xx
     foreach ($list as $val) {
         $this->var = $val;
         $text .= $ns->tablerender('', $this->sc_gallery_thumb('class=gallery_thumb img-responsive img-home-portfolio'), 'gallery_portfolio', true);
     }
     return $text;
 }
开发者ID:armpit,项目名称:e107,代码行数:27,代码来源:e_shortcode.php

示例4: sc_gallery_slideshow

 function sc_gallery_slideshow($parm = '')
 {
     $this->sliderCat = $parm ? $parm : vartrue(e107::getPlugPref('gallery', 'slideshow_category'), 1);
     $template = e107::getTemplate('gallery', 'gallery', 'SLIDESHOW_WRAPPER');
     return e107::getParser()->parseTemplate($template);
 }
开发者ID:notzen,项目名称:e107,代码行数:6,代码来源:e_shortcode.php

示例5: actionList

 public function actionList()
 {
     $request = $this->getRequest();
     // use only filtered variables
     $cid = $request->getRequestParam('cat');
     if ($cid && !isset($this->catList[$cid])) {
         // get ID by SEF
         $_cid = null;
         foreach ($this->catList as $id => $row) {
             if ($cid === $row['media_cat_sef']) {
                 $_cid = $id;
                 break;
             }
         }
         $cid = $_cid;
     }
     if (empty($cid) || !isset($this->catList[$cid])) {
         $this->_forward('category');
         return;
     }
     $tp = e107::getParser();
     $template = e107::getTemplate('gallery');
     $template = array_change_key_case($template);
     $sc = e107::getScBatch('gallery', TRUE);
     if (defset('BOOTSTRAP') === true || defset('BOOTSTRAP') === 2) {
         $template['list_start'] = str_replace('row', 'row-fluid', $template['list_start']);
     }
     $sc->total = e107::getMedia()->countImages($cid);
     $sc->amount = e107::getPlugPref('gallery', 'perpage', 12);
     // TODO Add Pref. amount per page.
     $sc->curCat = $cid;
     $sc->from = $request->getRequestParam('frm', 0);
     $list = e107::getMedia()->getImages($cid, $sc->from, $sc->amount);
     $catname = $tp->toHtml($this->catList[$cid]['media_cat_title'], false, 'defs');
     $cat = $this->catList[$cid];
     $inner = "";
     foreach ($list as $row) {
         $sc->setVars($row)->addVars($cat);
         $inner .= $tp->parseTemplate($template['list_item'], TRUE, $sc);
     }
     $text = $tp->parseTemplate($template['list_start'], TRUE, $sc);
     $text .= $inner;
     $text .= $tp->parseTemplate($template['list_end'], TRUE, $sc);
     if (isset($template['list_caption'])) {
         $title = $tp->parseTemplate($template['list_caption'], TRUE, $sc);
         $this->addTitle($title)->addBody($text);
     } else {
         $this->addTitle($catname)->addTitle(LAN_PLUGIN_GALLERY_TITLE)->addBody($text);
     }
 }
开发者ID:armpit,项目名称:e107,代码行数:50,代码来源:index.php

示例6: vartrue

<?php

/*
* Copyright (c) 2014 e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* Gallery Template 
*/
if (!defined('e107_INIT')) {
    exit;
}
// e107::Lan('featurebox', 'front');
$type = vartrue(e107::getPlugPref('featurebox', 'menu_category'), 'bootstrap_carousel');
$text = e107::getParser()->parseTemplate("{FEATUREBOX|" . $type . "}");
if (!$text) {
    echo "<div class='alert alert-block alert-warning'>There are no featurebox items assigned to the " . $type . " template</div>";
    //	e107::getMessage()->addDebug("There are no featurebox items using the ".$type." template");
}
echo $text;
unset($text);
开发者ID:armpit,项目名称:e107,代码行数:19,代码来源:featurebox_menu.php

示例7:

<?php

/*
* Copyright (c) 2012 e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: e_shortcode.php 12438 2011-12-05 15:12:56Z secretr $
*
* Gallery Template 
*/
if (!defined('e107_INIT')) {
    exit;
}
e107::plugLan('gallery', 'front');
$gp = e107::getPlugPref('gallery');
e107::js('gallery', 'jslib/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery');
e107::css('gallery', 'jslib/prettyPhoto/css/prettyPhoto.css', 'jquery');
e107::css('gallery', 'gallery_style.css');
// Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890
e107::css('inline', "\r\n\r\n.thumbnails .span2:nth-child(6n+1) {\r\nmargin-left:0;\r\n}", 'jquery');
$prettyPhoto = <<<JS
\$(document).ready(function(){
    \$("a[data-gal^='prettyPhoto']").prettyPhoto(
\t    {
\t    \thook: 'data-gal',
\t    \ttheme: 'pp_default',
\t    \toverlay_gallery: false,
\t    \tdeeplinking: false
\t    }
    );
  });
JS;
e107::js('footer-inline', $prettyPhoto, 'jquery');
开发者ID:armpit,项目名称:e107,代码行数:31,代码来源:slideshow_menu.php

示例8: sc_emailnotify

 function sc_emailnotify()
 {
     global $threadInfo, $action, $eaction;
     $pref = e107::getPlugPref('forum');
     if ($eaction == true) {
         return;
     }
     if ($pref['notify'] && $action == 'nt' && USER) {
         if (isset($_POST['fpreview'])) {
             $chk = $_POST['notify'] ? "checked = 'checked'" : '';
         } else {
             if (isset($threadInfo)) {
                 // no reference of 'head' $threadInfo['head']['thread_active']
                 $chk = $threadInfo['thread_active'] == 99 ? "checked='checked'" : '';
             } else {
                 $chk = $pref['notify_on'] ? "checked='checked'" : '';
             }
         }
         return "<br /><input type='checkbox' name='notify' value='1' {$chk} />&nbsp;<span class='defaulttext'>" . LAN_380 . "</span>";
     }
     return '';
 }
开发者ID:notzen,项目名称:e107,代码行数:22,代码来源:post_shortcodes.php

示例9: __construct

 public function __construct()
 {
     $pm_prefs = e107::getPlugPref('pm');
     $this->pmManager = new pmbox_manager($pm_prefs);
     $this->pmPrefs = $pm_prefs;
     // print_a($pm_prefs);
     require_once e_PLUGIN . "pm/pm_class.php";
     $pmClass = new private_message($pm_prefs);
     $blocks = $pmClass->block_get_user();
     foreach ($blocks as $usr) {
         if ($usr['pm_block_to'] == USERID) {
             $this->pmBlocks[] = $usr['pm_block_from'];
         }
     }
 }
开发者ID:JBeezygit,项目名称:e107,代码行数:15,代码来源:pm_shortcodes.php

示例10: __construct

 public function __construct($prefs)
 {
     $this->pmDB = e107::getDb();
     // $this->pmPrefs = $prefs;
     $this->pmPrefs = e107::getPlugPref('pm');
 }
开发者ID:armpit,项目名称:e107,代码行数:6,代码来源:pm_func.php

示例11: actionList

 public function actionList()
 {
     $request = $this->getRequest();
     // use only filtered variables
     $cid = $request->getRequestParam('cat');
     if ($cid && !isset($this->catList[$cid])) {
         // get ID by SEF
         $_cid = null;
         foreach ($this->catList as $id => $row) {
             if ($cid === $row['media_cat_title']) {
                 $_cid = $id;
                 break;
             }
         }
         $cid = $_cid;
     }
     if (empty($cid) || !isset($this->catList[$cid])) {
         $this->_forward('category');
         return;
     }
     $tp = e107::getParser();
     $template = e107::getTemplate('gallery');
     $sc = e107::getScBatch('gallery', TRUE);
     $sc->total = e107::getMedia()->countImages($cid);
     $sc->amount = e107::getPlugPref('gallery', 'perpage', 12);
     // TODO Add Pref. amount per page.
     $sc->curCat = $cid;
     $sc->from = $request->getRequestParam('frm', 0);
     $list = e107::getMedia()->getImages($cid, $sc->from, $sc->amount);
     $catname = $tp->toHtml($this->catList[$cid]['media_cat_title'], false, 'defs');
     $cat = $this->catList[$cid];
     $inner = "";
     foreach ($list as $row) {
         $sc->setVars($row)->addVars($cat);
         $inner .= $tp->parseTemplate($template['LIST_ITEM'], TRUE);
     }
     $text = $tp->parseTemplate($template['LIST_START'], TRUE);
     $text .= $inner;
     $text .= $tp->parseTemplate($template['LIST_END'], TRUE);
     $this->addTitle($catname)->addTitle(GALLERY_LAN_TITLE)->addBody($text);
 }
开发者ID:notzen,项目名称:e107,代码行数:41,代码来源:index.php


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