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


PHP e107::getAddonConfig方法代码示例

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


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

示例1: init

 function init()
 {
     $pref = e107::getPref();
     $sql = e107::getDb();
     if (vartrue($_POST['cron_execute'])) {
         $executeID = key($_POST['cron_execute']);
         $this->cronExecute($executeID);
     }
     if (!vartrue(e107::getPref('e_cron_pwd')) || varset($_POST['generate_pwd'])) {
         $pwd = $this->setCronPwd();
     }
     $sql->gen("SELECT cron_function,cron_active FROM #cron ");
     while ($row = $sql->fetch(MYSQL_ASSOC)) {
         $this->curCrons[] = $row['cron_function'];
         if ($row['cron_active'] == 1) {
             $this->activeCrons++;
         }
     }
     $this->lastRefresh();
     // Import Core and Plugin e_cron data
     $cronDefaults['_system'] = array(0 => array('name' => LAN_CRON_01_1, 'function' => 'sendEmail', 'category' => 'mail', 'description' => str_replace("[eml]", $pref['siteadminemail'], LAN_CRON_01_2) . "<br />" . LAN_CRON_01_3), 1 => array('name' => LAN_CRON_02_1, 'category' => 'mail', 'function' => 'procEmailQueue', 'description' => LAN_CRON_02_2), 2 => array('name' => LAN_CRON_03_1, 'category' => 'mail', 'function' => 'procEmailBounce', 'description' => LAN_CRON_03_2), 3 => array('name' => LAN_CRON_04_1, 'category' => 'user', 'function' => 'procBanRetrigger', 'description' => LAN_CRON_04_2 . "<br />" . LAN_CRON_04_3, 'available' => e107::getPref('ban_retrigger')), 4 => array('name' => LAN_CRON_05_1, 'category' => 'backup', 'function' => 'dbBackup', 'description' => LAN_CRON_05_2 . ' ' . e_SYSTEM . 'backups/'), 5 => array('name' => LAN_CRON_06_1, 'category' => 'user', 'function' => 'procBanRetrigger', 'description' => LAN_CRON_06_2 . "<br />" . LAN_CRON_06_3), 6 => array('name' => LAN_CRON_20_1, 'category' => 'update', 'function' => 'checkCoreUpdate', 'description' => LAN_CRON_20_2 . "<br />" . LAN_CRON_20_3));
     if (is_dir(e_BASE . ".git")) {
         $cronDefaults['_system'][7] = array('name' => LAN_CRON_20_4, 'category' => 'update', 'function' => 'gitrepo', 'description' => LAN_CRON_20_5 . "<br />" . LAN_CRON_20_6 . "<br /><span class='label label-warning'>" . LAN_CRON_20_7 . "</span> " . LAN_CRON_20_8);
     }
     if (!vartrue($_GET['action']) || $_GET['action'] == 'refresh') {
         $this->cronImport($cronDefaults);
         // import Core Crons (if missing)
         $this->cronImport(e107::getAddonConfig('e_cron'));
         // Import plugin Crons
         $this->cronImportLegacy();
         // Import Legacy Cron Tab Settings
     }
 }
开发者ID:gitter-badger,项目名称:e107,代码行数:33,代码来源:cron.php

示例2: init

 public function init()
 {
     $engine = e107::pref('core', 'comments_engine');
     if ($engine != 'e107') {
         $this->prefs = array('comments_engine' => array('title' => "Engine", 'type' => 'dropdown', 'writeParms' => array()), 'comments_disabled' => array('title' => PRFLAN_161, 'type' => 'boolean', 'writeParms' => 'inverse=1'));
     }
     $this->prefs['comments_engine']['writeParms']['optArray'] = array('e107' => 'e107');
     $addons = e107::getAddonConfig('e_comment');
     foreach ($addons as $plugin => $config) {
         foreach ($config as $val) {
             $id = $plugin . "::" . $val['function'];
             $this->prefs['comments_engine']['writeParms']['optArray'][$id] = $val['name'];
         }
     }
     //	print_a($addons);
 }
开发者ID:gitter-badger,项目名称:e107,代码行数:16,代码来源:comment.php

示例3: renderWebsiteStatus

 function renderWebsiteStatus()
 {
     $tp = e107::getParser();
     /* 
     // Settings button if needed. 
     		<div class="tab-header">
              <span class="pull-right">
              <span class="options">
                <div class="btn-group">
                  <a class="dropdown-toggle" data-toggle="dropdown"><i class="icon-cog"></i></a>
                  <ul class="dropdown-menu black-box-dropdown dropdown-left">
                    <li><a href="#">Action</a></li>
                    <li><a href="#">Another action</a></li>
                    <li><a href="#">Something else here</a></li>
                    <li class="divider"></li>
                    <li><a href="#">Separated link</a></li>
                  </ul>
                </div>
              </span>
            </span>
      </div>
     */
     $tab = array();
     $tab['e-stats'] = array('caption' => $tp->toGlyph('fa-signal') . ' Stats', 'text' => $this->renderChart());
     $tab['e-online'] = array('caption' => $tp->toGlyph('fa-user') . ' Online (' . $this->renderOnlineUsers('count') . ')', 'text' => $this->renderOnlineUsers());
     if ($plugs = e107::getAddonConfig('e_dashboard', null, 'chart')) {
         foreach ($plugs as $plug => $val) {
             foreach ($val as $item) {
                 if (!empty($item)) {
                     $tab[] = $item;
                 }
             }
         }
     }
     return e107::getForm()->tabs($tab);
 }
开发者ID:gitye,项目名称:e107,代码行数:36,代码来源:infopanel.php

示例4: initAdminAddons

 private function initAdminAddons()
 {
     $tmp = e107::getAddonConfig('e_admin', null, 'config', $this);
     if (empty($tmp)) {
         return;
     }
     foreach ($tmp as $plug => $config) {
         foreach ($config['fields'] as $k => $v) {
             $v['data'] = false;
             // disable data-saving to db table. .
             $this->fields['x_' . $plug . '_' . $k] = $v;
             // ie. x_plugin_key
         }
     }
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:15,代码来源:admin_ui.php

示例5: simplePage

 public function simplePage()
 {
     // $this->addTitle("Simple Redirects");
     $eUrl = e107::getAddonConfig('e_url');
     $frm = e107::getForm();
     $tp = e107::getParser();
     $cfg = e107::getConfig();
     if (!empty($_POST['saveSimpleSef'])) {
         if (is_string($this->getConfig()->get('e_url_alias'))) {
             $cfg->setPostedData('e_url_alias', array(e_LAN => $_POST['e_url_alias']), false);
         } else {
             $cfg->setPref('e_url_alias/' . e_LAN, $_POST['e_url_alias']);
         }
         $cfg->save(true, true, true);
     }
     $pref = e107::getPref('e_url_alias');
     if (empty($eUrl)) {
         return;
     }
     $text = "<div class='e-container'>";
     $text .= $frm->open('simpleSef');
     $multilan = "<small class='e-tip admin-multilanguage-field' style='cursor:help; padding-left:10px' title='Multi-language field'>" . $tp->toGlyph('fa-language') . "</small>";
     $home = "<small>" . SITEURL . '</small>';
     foreach ($eUrl as $plug => $val) {
         $text .= "<h4>" . $plug . "</h4>";
         $text .= "<table class='table table-striped table-bordered'>";
         $text .= "<tr><th>Key</th><th>Regular Expression</th>\n\n\n\t\t\t<th>" . LAN_URL . "</th>\n\t\t\t</tr>";
         foreach ($val as $k => $v) {
             $alias = vartrue($pref[e_LAN][$plug][$k], $v['alias']);
             //	$sefurl         = (!empty($alias)) ? str_replace('{alias}', $alias, $v['sef']) : $v['sef'];
             $pid = $plug . "|" . $k;
             $v['regex'] = str_replace("^", $home, $v['regex']);
             $aliasForm = $frm->renderInline('e_url_alias[' . $plug . '][' . $k . ']', $pid, 'e_url_alias[' . $plug . '][' . $k . ']', $alias, $alias, 'text', null, array('title' => LAN_EDIT . " (" . e_LANGUAGE . " Only)", 'url' => e_REQUEST_SELF));
             $aliasRender = str_replace('{alias}', $aliasForm, $v['regex']);
             $text .= "<tr>\n\t\t\t\t\t<td style='width:5%'>" . $k . "</td>\n\t\t\t\t\t<td style='width:20%'>" . $aliasRender . "</td>\n\n\t\t\t\t\t<td style='width:30%'>" . $v['redirect'] . "</td>\n\t\t\t\t\t</tr>";
         }
         $text .= "</table>";
     }
     //	$text .= "<div class='buttons-bar center'>".$frm->button('saveSimpleSef',LAN_SAVE." (".e_LANGUAGE.")",'submit')."</div>";
     $text .= $frm->close();
     $text .= "</div>";
     return $text;
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:43,代码来源:eurl.php

示例6: admin_status

 function admin_status($parm = '')
 {
     $mes = e107::getMessage();
     $sql = e107::getDb();
     $ns = e107::getRender();
     $pref = e107::getPref();
     $members = $sql->count('user', '(*)', 'WHERE user_ban=0');
     $unverified = $sql->count('user', '(*)', 'WHERE user_ban=2');
     $banned = $sql->count('user', '(*)', 'WHERE user_ban=1');
     $comments = $sql->count('comments');
     /*
     					$unver = ($unverified ? " <a href='".e_ADMIN."users.php?searchquery=&amp;filter_options=user_ban__2&amp;filter=unverified'> ".ADLAN_111.": {$unverified}</a>" : ADLAN_111);
     					$lban = ($banned) ? "<a href='".e_ADMIN_ABS."users.php??searchquery=&filter_options=user_ban__1&filter=banned'>".ADLAN_112. ": ".$banned."</a>" : ADLAN_112.":";
     					$lcomment = ($comments) ? "<a href='".e_ADMIN_ABS."comment.php'>".ADLAN_114.": ".$comments."</a>" : ADLAN_114;
     					
     					$text = "
     					<div class='left'>
     						<div style='padding-bottom: 2px;'>". E_16_USER." <a href='".e_ADMIN_ABS."users.php?filter=0'>".ADLAN_110.": ".$members."</a></div>
     						<div style='padding-bottom: 2px;'>".E_16_USER." {$unver}</div>
     						<div style='padding-bottom: 2px;'>".E_16_BANLIST." ".$lban."</div>
     						<div style='padding-bottom: 2px;'>".E_16_COMMENT." ".$lcomment."</div>\n\n";
     */
     // for BC only.
     $oldconfigs['e-user'][0] = array('icon' => E_16_USER, 'title' => ADLAN_110, 'url' => e_ADMIN_ABS . "users.php?searchquery=&amp;filter_options=user_ban__0", 'total' => $members, 'invert' => 1);
     $oldconfigs['e-user'][1] = array('icon' => E_16_USER, 'title' => ADLAN_111, 'url' => e_ADMIN . "users.php?searchquery=&amp;filter_options=user_ban__2", 'total' => $unverified);
     $oldconfigs['e-user'][2] = array('icon' => E_16_BANLIST, 'title' => ADLAN_112, 'url' => e_ADMIN . "users.php?searchquery=&filter_options=user_ban__1", 'total' => $banned);
     if (empty($pref['comments_disabled']) && varset($pref['comments_engine'], 'e107') == 'e107') {
         $oldconfigs['e-comments'][0] = array('icon' => E_16_COMMENT, 'title' => LAN_COMMENTS, 'url' => e_ADMIN_ABS . "comment.php", 'total' => $comments);
     }
     if ($flo = $sql->count('generic', '(*)', "WHERE gen_type='failed_login'")) {
         //$text .= "\n\t\t\t\t\t<div style='padding-bottom: 2px;'>".E_16_FAILEDLOGIN." <a href='".e_ADMIN_ABS."fla.php'>".ADLAN_146.": $flo</a></div>";
         $oldconfigs['e-failed'][0] = array('icon' => E_16_FAILEDLOGIN, 'title' => ADLAN_146, 'url' => e_ADMIN_ABS . "banlist.php?mode=failed&action=list", 'total' => $flo);
     }
     if ($emls = $sql->count('mail_recipients', '(*)', "WHERE mail_status = 13")) {
         //$text .= "\n\t\t\t\t\t<div style='padding-bottom: 2px;'>".E_16_FAILEDLOGIN." <a href='".e_ADMIN_ABS."fla.php'>".ADLAN_146.": $flo</a></div>";
         $oldconfigs['e-mailout'][0] = array('icon' => E_16_MAIL, 'title' => "Pending Mailshots", 'url' => e_ADMIN_ABS . "mailout.php?mode=pending&action=list", 'total' => $emls);
     }
     if (vartrue($pref['e_status_list'])) {
         foreach ($pref['e_status_list'] as $val) {
             $text = "";
             if (is_readable(e_PLUGIN . $val . '/e_status.php')) {
                 include_once e_PLUGIN . $val . '/e_status.php';
                 if (!class_exists($val . "_status")) {
                     $mes->addDebug("<strong>" . $val . "</strong> using deprecated e_status method. See the chatbox plugin folder for a working example of the new one. ");
                 }
                 $oldconfigs[$val] = admin_shortcodes::legacyToConfig($text);
             }
         }
     }
     // New in v2.x
     //	$configs = e107::getAddonConfig('e_status');
     $configs = e107::getAddonConfig('e_dashboard', null, 'status');
     if (!is_array($configs)) {
         $configs = array();
     }
     $allconfigs = array_merge($oldconfigs, $configs);
     $allconfigs = multiarray_sort($allconfigs, 'title');
     //XXX FIXME - not sorting correctly.
     $text = "<ul id='e-status' class='unstyled list-unstyled'>";
     foreach ($allconfigs as $k => $v) {
         foreach ($v as $val) {
             $type = empty($val['invert']) ? 'latest' : 'invert';
             $class = admin_shortcodes::getBadge($val['total'], $type);
             $link = "<a href='" . $val['url'] . "'>" . str_replace(":", " ", $val['title']) . " <span class='" . $class . "'>" . $val['total'] . "</span></a>";
             $text .= "<li>" . $val['icon'] . " " . $link . "</li>\n";
         }
     }
     $text .= "</ul>";
     if ($parm == 'list') {
         //	$text = str_replace("<div style='padding-bottom: 2px;'>","<li>",$text);;
     }
     //	$text .= "\n\t\t\t\t\t</div>";
     return $parm != 'norender' ? $ns->tablerender(LAN_STATUS, $text, '', TRUE) : $text;
 }
开发者ID:8moustapha8,项目名称:e107,代码行数:74,代码来源:admin_shortcodes.php

示例7: ukfield

 function ukfield($a, $b)
 {
     $newOrder = array('checkboxes', 'news_id', 'news_category', 'news_title', 'news_summary', 'news_render_type', 'news_author', 'news_body', 'news_extended', 'news_thumbnail', 'news_sef', 'news_meta_keywords', 'news_meta_description', 'news_ping', 'news_allow_comments', 'news_start', 'news_end', 'news_datestamp', 'news_class', 'news_sticky', 'news_comment_total', 'options');
     $addons = e107::getAddonConfig('e_admin', null, 'config', $this);
     foreach ($addons as $plug => $config) {
         foreach ($config['fields'] as $field => $tmp) {
             $newOrder[] = "x_" . $plug . "_" . $field;
             //	echo $field;
         }
     }
     $order = array_flip($newOrder);
     if ($order[$a] == $order[$b]) {
         return 0;
     }
     return $order[$a] < $order[$b] ? -1 : 1;
 }
开发者ID:armpit,项目名称:e107,代码行数:16,代码来源:newspost.php

示例8: array

$mes = e107::getMessage();
$frontPref = e107::pref('core');
// Get prefs
// Get list of possible options for front page
$front_page['news'] = array('page' => 'news.php', 'title' => ADLAN_0);
// TODO Move to e107_plugins/news
$front_page['wmessage'] = array('page' => 'index.php', 'title' => ADLAN_28);
if ($sql->db_Select('page', 'page_id, page_title', "menu_name=''")) {
    $front_page['custom']['title'] = FRTLAN_30;
    while ($row = $sql->db_Fetch()) {
        $front_page['custom']['page'][] = array('page' => 'page.php?' . $row['page_id'], 'title' => $row['page_title']);
    }
}
// Now let any plugins add to the options - must append to the $front_page array as above
//v2.x spec. ----------
$new = e107::getAddonConfig('e_frontpage');
foreach ($new as $k => $v) {
    $front_page[$k] = $v;
}
// v1.x spec.---------------
if (!empty($frontPref['e_frontpage_list'])) {
    foreach ($frontPref['e_frontpage_list'] as $val) {
        if (is_readable(e_PLUGIN . $val . '/e_frontpage.php')) {
            require_once e_PLUGIN . $val . '/e_frontpage.php';
        }
    }
}
// Make sure links relative to SITEURL
foreach ($front_page as &$front_value) {
    if (is_array($front_value['page'])) {
        // Its a URL with multiple options
开发者ID:armpit,项目名称:e107,代码行数:31,代码来源:frontpage.php

示例9: sc_user_addons

 function sc_user_addons($parm = '')
 {
     $template = e107::getCoreTemplate('user', 'addon');
     $tp = e107::getParser();
     $data = e107::getAddonConfig('e_user', null, 'profile', $this->var);
     if (empty($data)) {
         return;
     }
     $text = '';
     foreach ($data as $plugin => $val) {
         foreach ($val as $v) {
             $value = vartrue($v['url']) ? "<a href=\"" . $v['url'] . "\">" . $v['text'] . "</a>" : $v['text'];
             $array = array('USER_ADDON_LABEL' => $v['label'], 'USER_ADDON_TEXT' => $value);
             $text .= $tp->parseTemplate($template, true, $array);
         }
     }
     return $text;
 }
开发者ID:Serios,项目名称:e107,代码行数:18,代码来源:user_shortcodes.php

示例10: init

 function init()
 {
     $tmp = e107::getAddonConfig('e_sitelink', 'sitelinks');
     foreach ($tmp as $cat => $array) {
         $func = array();
         foreach ($array as $val) {
             $newkey = $cat . '::' . $val['function'];
             $func[$newkey] = $val['name'];
         }
         $this->linkFunctions[$cat] = $func;
     }
 }
开发者ID:notzen,项目名称:e107,代码行数:12,代码来源:links.php

示例11: url

 /**
  * Static (easy) sef-url creation method (works with e_url.php @see /index.php)
  * @param string $plugin
  * @param $key
  * @param array $row
  * @param array $options
  *  (optional) An associative array of additional options, with the following elements:
  *   - 'mode': abs | full
  *   - 'query': An array of query key/value-pairs (without any URL-encoding) to append to the URL.
  *   - 'fragment': A fragment identifier (named anchor) to append to the URL. Do not include the leading '#' character.
  * @return string
  */
 public static function url($plugin = '', $key, $row = array(), $options = array())
 {
     /* TODO backward compat - core keys. */
     /*
     if($plugin == 'user')
     {
     	switch($key)
     	{
     		case "profile":
     			$uparams = array('id' => $row['user_id'], 'name' => $row['user_name']);
     			return self::getUrl()->create('user/profile/view', $uparams);
     		break;
     
     		case "settings":
     			//  code
     			break;
     
     
     
     	}
     }
     */
     $tmp = e107::getAddonConfig('e_url');
     $tp = e107::getParser();
     $pref = self::getPref('e_url_alias');
     if (is_string($options)) {
         $options = array('mode' => $options);
     }
     // Merge in defaults.
     $options += array('mode' => 'abs', 'fragment' => '', 'query' => array());
     if (isset($options['fragment']) && $options['fragment'] !== '') {
         $options['fragment'] = '#' . $options['fragment'];
     }
     if (varset($tmp[$plugin][$key]['sef'])) {
         if (!empty($tmp[$plugin][$key]['alias'])) {
             $alias = !empty($pref[e_LAN][$plugin][$key]) ? $pref[e_LAN][$plugin][$key] : $tmp[$plugin][$key]['alias'];
             $tmp[$plugin][$key]['sef'] = str_replace('{alias}', $alias, $tmp[$plugin][$key]['sef']);
         }
         preg_match_all('#{([a-z_]*)}#', $tmp[$plugin][$key]['sef'], $matches);
         $active = true;
         foreach ($matches[1] as $k => $v) {
             if (!isset($row[$v])) {
                 e107::getMessage()->addDebug("Missing value for " . $v . " in " . $plugin . "/e_url.php - '" . $key . "'");
                 $active = false;
                 break;
             }
         }
         if (deftrue('e_MOD_REWRITE') && $active == true) {
             $rawUrl = $tp->simpleParse($tmp[$plugin][$key]['sef'], $row);
             if ($options['mode'] == 'full') {
                 $sefUrl = SITEURL . $rawUrl;
             } else {
                 $sefUrl = e_HTTP . $rawUrl;
             }
             // Append the query.
             if (is_array($options['query']) && !empty($options['query'])) {
                 $sefUrl .= (strpos($sefUrl, '?') !== FALSE ? '&' : '?') . self::httpBuildQuery($options['query']);
             }
             return $sefUrl . $options['fragment'];
         } else {
             $srch = array();
             $repl = array();
             foreach ($matches[0] as $k => $val) {
                 $srch[] = '$' . ($k + 1);
                 $repl[] = $val;
             }
             $template = isset($tmp[$plugin][$key]['legacy']) ? $tmp[$plugin][$key]['legacy'] : $tmp[$plugin][$key]['redirect'];
             $urlTemplate = str_replace($srch, $repl, $template);
             $urlTemplate = $tp->replaceConstants($urlTemplate, $options['mode']);
             $legacyUrl = $tp->simpleParse($urlTemplate, $row);
             $legacyUrl = preg_replace('/&?\\$[\\d]/i', "", $legacyUrl);
             // remove any left-over $x (including prefix of '&')
             // Append the query.
             if (is_array($options['query']) && !empty($options['query'])) {
                 $legacyUrl .= (strpos($legacyUrl, '?') !== FALSE ? '&' : '?') . self::httpBuildQuery($options['query']);
             }
             return $legacyUrl . $options['fragment'];
         }
     }
     if (!empty($plugin)) {
         e107::getMessage()->addDebug("e_url.php in <b>" . e_PLUGIN . $plugin . "</b> is missing the key: <b>" . $key . "</b>. Or, you may need to <a href='" . e_ADMIN . "db.php?mode=plugin_scan'>scan your plugin directories</a> to register e_url.php");
     }
     return false;
     /*
     elseif(varset($tmp[$plugin][$key]['redirect']))
     {
     	return self::getParser()->replaceConstants($tmp[$plugin][$key]['redirect'],'full');
     }
//.........这里部分代码省略.........
开发者ID:KonzolozZ,项目名称:e107,代码行数:101,代码来源:e107_class.php

示例12: url

 /**
  * Static (easy) sef-url creation method (works with e_url.php @see /index.php)
  * @param string $plugin
  * @param $key
  * @param array $row
  * @param string $mode abs | full
  * @return string
  */
 public static function url($plugin = '', $key, $row = array(), $mode = 'abs')
 {
     $tmp = e107::getAddonConfig('e_url');
     $tp = e107::getParser();
     $pref = self::getPref('e_url_alias');
     if (varset($tmp[$plugin][$key]['sef'])) {
         if (!empty($tmp[$plugin][$key]['alias'])) {
             $alias = !empty($pref[e_LAN][$plugin][$key]) ? $pref[e_LAN][$plugin][$key] : $tmp[$plugin][$key]['alias'];
             $tmp[$plugin][$key]['sef'] = str_replace('{alias}', $alias, $tmp[$plugin][$key]['sef']);
         }
         preg_match_all('#{([a-z_]*)}#', $tmp[$plugin][$key]['sef'], $matches);
         $active = true;
         foreach ($matches[1] as $k => $v) {
             if (!isset($row[$v])) {
                 e107::getMessage()->addDebug("Missing value for " . $v . " in " . $plugin . "/e_url.php - '" . $key . "'");
                 $active = false;
                 break;
             }
         }
         if (deftrue('e_MOD_REWRITE') && $active == true) {
             $rawUrl = $tp->simpleParse($tmp[$plugin][$key]['sef'], $row);
             if ($mode == 'full') {
                 return SITEURL . $rawUrl;
             } else {
                 return e_HTTP . $rawUrl;
             }
         } else {
             $srch = array();
             $repl = array();
             foreach ($matches[0] as $k => $val) {
                 $srch[] = '$' . ($k + 1);
                 $repl[] = $val;
             }
             $template = isset($tmp[$plugin][$key]['legacy']) ? $tmp[$plugin][$key]['legacy'] : $tmp[$plugin][$key]['redirect'];
             $urlTemplate = str_replace($srch, $repl, $template);
             $urlTemplate = $tp->replaceConstants($urlTemplate, $mode);
             $legacyUrl = $tp->simpleParse($urlTemplate, $row);
             $legacyUrl = preg_replace('/&?\\$[\\d]/i', "", $legacyUrl);
             // remove any left-over $x (including prefix of '&')
             return $legacyUrl;
         }
     }
     if (!empty($plugin)) {
         e107::getMessage()->addDebug("e_url.php in <b>" . e_PLUGIN . $plugin . "</b> is missing the key: <b>" . $key . "</b>. Or, you may need to <a href='" . e_ADMIN . "db.php?mode=plugin_scan'>scan your plugin directories</a> to register e_url.php");
     }
     return false;
     /*
     elseif(varset($tmp[$plugin][$key]['redirect']))
     {
     	return self::getParser()->replaceConstants($tmp[$plugin][$key]['redirect'],'full');		
     }
     
     return;
     */
 }
开发者ID:gitye,项目名称:e107,代码行数:63,代码来源:e107_class.php

示例13: init

 function init()
 {
     $tp = e107::getParser();
     $tmp = e107::getAddonConfig('e_sitelink', 'sitelink');
     foreach ($tmp as $cat => $array) {
         $func = array();
         foreach ($array as $val) {
             $newkey = $cat . '::' . $val['function'];
             if (vartrue($val['parm'])) {
                 $newkey .= "(" . $val['parm'] . ")";
             }
             $func[$newkey] = $tp->toHtml($val['name'], '', 'TITLE');
         }
         $this->linkFunctions[$cat] = $func;
     }
 }
开发者ID:gitye,项目名称:e107,代码行数:16,代码来源:links.php

示例14: config

		function config() 
		{
			$config = array();
		
			$config[] = array(
				'regex'			=> '^ref-(.*)/?$',
				'redirect'		=> '{e_PLUGIN}myplugin/myplugin.php?ref=$1',
			);
			
			return $config;
		}
		
	}
*/
$sql->db_Mark_Time("Start Simple URL-ReWrite Routine");
$tmp = e107::getAddonConfig('e_url');
$req = e_HTTP === '/' ? ltrim(e_REQUEST_URI, '/') : str_replace(e_HTTP, '', e_REQUEST_URI);
if (count($tmp)) {
    foreach ($tmp as $plug => $cfg) {
        foreach ($cfg as $k => $v) {
            if (empty($v['regex'])) {
                //	e107::getMessage()->addDebug("Skipping empty regex: <b>".$k."</b>");
                continue;
            }
            if (!empty($v['alias'])) {
                $alias = !empty($pref['e_url_alias'][e_LAN][$plug][$k]) ? $pref['e_url_alias'][e_LAN][$plug][$k] : $v['alias'];
                //	e107::getMessage()->addDebug("e_url alias found: <b>".$alias."</b>");
                $v['regex'] = str_replace('{alias}', $alias, $v['regex']);
            }
            $regex = '#' . $v['regex'] . '#';
            if (empty($v['redirect'])) {
开发者ID:armpit,项目名称:e107,代码行数:31,代码来源:index.php

示例15: r_userclass

        exit;
    }
    $caption = SEALAN_43 . ": " . $query[2];
    $text = "\n\t<form method='post' action='" . e_SELF . "?main." . $query[1] . "." . $query[2] . "'>\n\t\t<fieldset id='core-search-edit'>\n\t\t\t<legend class='e-hideme'>{$caption}</legend>\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_44 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . r_userclass("class", $search_prefs[$handler_type][$query[2]]['class'], "off", "public,guest,nobody,member,admin,classes") . "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_45 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class='tbox input-text' type='text' name='results' value='" . $tp->toForm($search_prefs[$handler_type][$query[2]]['results']) . "' size='4' maxlength='4' />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_46 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input class='tbox input-text' type='text' name='chars' value='" . $tp->toForm($search_prefs[$handler_type][$query[2]]['chars']) . "' size='4' maxlength='4' />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . SEALAN_26 . ":</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type='radio' class='radio' id='pre-title-1' name='pre_title' value='1'" . ($search_prefs[$handler_type][$query[2]]['pre_title'] == 1 ? " checked='checked'" : "") . " /><label for='pre-title-1'>" . ADLAN_133 . "</label><br />\n\t\t\t\t\t\t\t<input type='radio' class='radio' id='pre-title-0' name='pre_title' value='0'" . ($search_prefs[$handler_type][$query[2]]['pre_title'] == 0 ? " checked='checked'" : "") . " /><label for='pre-title-0'>" . LAN_DISABLED . "</label><br />\n\t\t\t\t\t\t\t<input type='radio' class='radio' id='pre-title-2' name='pre_title' value='2'" . ($search_prefs[$handler_type][$query[2]]['pre_title'] == 2 ? " checked='checked'" : "") . " /><label for='pre-title-2'>" . SEALAN_23 . ":</label>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<input class='tbox input-text' type='text' name='pre_title_alt' value='" . $tp->toForm($search_prefs[$handler_type][$query[2]]['pre_title_alt']) . "' size='20' />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<div class='buttons-bar center'>\n\t\t\t\t" . $frm->admin_button('update_handler', 'no-value', 'update', LAN_UPDATE) . "\n\t\t\t</div>\n\t\t</fieldset>\n\t</form>\n\t";
    $ns->tablerender($caption, $mes->render() . $text);
} else {
    // Default front page
    $text = "\n\t\t<form method='post' action='" . e_SELF . "'>\n\t\t\t<fieldset id='core-search-configuration-main'>\n\t\t\t\t<legend class='e-hideme'>" . SEALAN_1 . "</legend>\n\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t<col style='width:55%' />\n\t\t\t\t\t\t<col style='width:25%' />\n\t\t\t\t\t\t<col style='width:10%' />\n\t\t\t\t\t\t<col style='width:10%' />\n\t\t\t\t\t</colgroup>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>" . SEALAN_21 . "</th>\n\t\t\t\t\t\t\t<th class='center'>" . SEALAN_25 . "</th>\n\t\t\t\t\t\t\t<th class='center'>" . LAN_ORDER . "</th>\n\t\t\t\t\t\t\t<th class='center last'>" . LAN_EDIT . "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t";
    foreach ($search_handlers as $key => $value) {
        $text .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>" . $value . "</td>\n\t\t\t\t\t\t\t<td class='center'>" . r_userclass("core_handlers[" . $key . "][class]", $search_prefs['core_handlers'][$key]['class'], "off", "public,guest,nobody,member,admin,classes") . "</td>\n\t\t\t\t\t\t\t<td class='center'>\n\t\t\t\t\t\t\t\t<select name='core_handlers[" . $key . "][order]' class='tbox order'>\n\t\t";
        for ($a = 1; $a <= $handlers_total; $a++) {
            $text .= $search_prefs['core_handlers'][$key]['order'] == $a ? "<option value='" . $a . "' selected='selected'>" . $a . "</option>" : "<option value='" . $a . "'>" . $a . "</option>";
        }
        $text .= "\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='center'>\n\t\t\t\t\t\t\t\t<a class='btn btn-large' href='" . e_SELF . "?edit.c." . $key . "'>" . ADMIN_EDIT_ICON . "</a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t";
    }
    $searchConfigs = e107::getAddonConfig('e_search');
    foreach ($search_prefs['plug_handlers'] as $plug_dir => $active) {
        if (varset($searchConfigs[$plug_dir])) {
            $search_handlers[] = $searchConfigs[$plug_dir];
            $search_info[0]['qtype'] = $searchConfigs[$plug_dir]['name'];
        } elseif (e107::isInstalled($plug_dir) && is_readable(e_PLUGIN . $plug_dir . "/e_search.php")) {
            e107::getMessage()->addDebug("Including: " . $plug_dir . "/e_search.php");
            require e_PLUGIN . $plug_dir . "/e_search.php";
        } else {
            continue;
        }
        /*
        if($obj = e107::getAddon($plug_dir,'e_search'))
        {
        	$search_handlers[] = $obj->config();	
        	$ret = $obj->config();	
开发者ID:gitye,项目名称:e107,代码行数:31,代码来源:search.php


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