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


PHP e107::getInstance方法代码示例

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


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

示例1: forum_post_rep

 function forum_post_rep($data)
 {
     $e107 = e107::getInstance();
     include_lan(e_PLUGIN . 'forum/languages/' . e_LANGUAGE . '/lan_forum_notify.php');
     $message = 'todo';
     $e107->notify->send('forum_post_rep', FORUM_NT_9, $message);
 }
开发者ID:notzen,项目名称:e107,代码行数:7,代码来源:e_notify.php

示例2: listclass

 /**
  * constructor
  *
  * @param string $mode the mode of the caller (default, admin)
  * @return void
  *
  */
 function listclass($mode = '')
 {
     global $TEMPLATE_LIST_NEW, $list_shortcodes;
     $this->plugin_dir = e_PLUGIN . "list_new/";
     $this->e107 = e107::getInstance();
     //language
     include_lan($this->plugin_dir . "languages/" . e_LANGUAGE . ".php");
     //template
     if (is_readable(THEME . "list_template.php")) {
         require_once THEME . "list_template.php";
     } else {
         require_once $this->plugin_dir . "list_template.php";
     }
     $this->template = $TEMPLATE_LIST_NEW;
     //shortcodes
     require_once $this->plugin_dir . "list_shortcodes.php";
     //		$this->shortcodes = $list_shortcodes;
     $this->shortcodes = new list_shortcodes();
     $this->shortcodes->rc = $this;
     if ($mode == 'admin') {
         require_once $this->plugin_dir . "list_admin_class.php";
         $this->admin = new list_admin($this);
     }
     //default sections (present in this list plugin)
     $this->defaultArray = array("news", "comment", "members");
 }
开发者ID:armpit,项目名称:e107,代码行数:33,代码来源:list_class.php

示例3: __construct

 public function __construct()
 {
     $tp = e107::getParser();
     $ns = e107::getRender();
     $mes = e107::getMessage();
     $this->e107 = e107::getInstance();
     // TODO remove?
     foreach ($_POST as $key => $value) {
         $key = $tp->toDB($key);
         if (strpos($key, 'nlmailnow') === 0) {
             $this->releaseIssue($key);
             break;
         }
     }
     if (isset($_POST['delete'])) {
         $this->deleteNewsletter();
     }
     if (isset($_POST['createNewsletter'])) {
         $this->createNewsletter();
     }
     if (isset($_POST['createIssue'])) {
         $this->createIssue();
     }
     if ($mes) {
         $ns->tablerender($caption, $mes->render() . $text);
     }
 }
开发者ID:gitter-badger,项目名称:e107,代码行数:27,代码来源:admin_config.php

示例4: __construct

 public function __construct($override = FALSE)
 {
     global $pref;
     $this->e107 = e107::getInstance();
     if ($override === FALSE || !is_array($override)) {
         // Set up from prefs
         $override['mail_bounce_user'] = $pref['mail_bounce_user'];
         $override['mail_bounce_pass'] = $pref['mail_bounce_pass'];
         $override['mail_bounce_email'] = $pref['mail_bounce_email'];
         $override['mail_bounce_pop3'] = $pref['mail_bounce_pop3'];
         $override['mail_bounce_type'] = varset($pref['mail_bounce_type'], 'pop3');
     }
     if ($override['mail_bounce_type'] == 'imap') {
         $port = varset($override['mail_bounce_port'], '143');
         $strConnect = '{' . $override['mail_bounce_pop3'] . ':' . $port . '}INBOX';
     } else {
         $port = varset($override['mail_bounce_port'], '110');
         // POP3 port
         $servertype = '/' . varset($override['mail_bounce_type'], 'pop3');
         $strConnect = '{' . $override['mail_bounce_pop3'] . ':' . $port . $servertype . '}INBOX';
     }
     $this->server = $strConnect;
     $this->username = $override['mail_bounce_user'];
     $this->password = $override['mail_bounce_pass'];
     $this->email = $override['mail_bounce_email'];
     $this->delBounce = $pref['mail_bounce_delete'] ? true : false;
 }
开发者ID:armpit,项目名称:e107,代码行数:27,代码来源:pop_bounce_handler.php

示例5: __construct

 /**
  * Constructor - init paths
  * @todo FIX e107 (new folder structure), simplify all this, e.g. e107::getInstance()->initMinimal($path_to_e107_config);
  *
  * @return void
  */
 public function __construct()
 {
     // initial path
     $self = realpath(dirname(__FILE__));
     // Config
     include $self . '/e107_config.php';
     $tmp = $self . '/' . $HANDLERS_DIRECTORY;
     //Core functions - now API independent
     @(require $tmp . '/core_functions.php');
     //e107 class
     @(require $tmp . '/e107_class.php');
     $e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'DOWNLOADS_DIRECTORY', 'UPLOADS_DIRECTORY', 'MEDIA_DIRECTORY', 'CACHE_DIRECTORY', 'LOGS_DIRECTORY', 'WEB_DIRECTORY', 'SYSTEM_DIRECTORY', 'CORE_DIRECTORY');
     //	$sql_info = array(); //compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix', 'mySQLcharset');
     //e107::getInstance()->initCore($e107_paths, $self, $sql_info, varset($e107_CONFIG, array()));
     $e107 = e107::getInstance();
     $e107->site_path = substr(md5($mySQLdefaultdb . "." . $mySQLprefix), 0, 10);
     $e107->prepare_request();
     $e107->setDirs($e107_paths, varset($E107_CONFIG, array()));
     $e107->set_constants();
     $e107->set_paths();
     $e107->file_path = $e107->fix_windows_paths($self) . "/";
     $e107->set_base_path();
     $e107->set_request(false);
     $e107->set_urls(false);
     unset($tmp, $self);
     // basic Admin area detection - required for proper path parsing
     define('ADMIN', strpos(e_SELF, $e107->getFolder('admin') !== false || strpos(e_PAGE, 'admin') !== false));
     $e107->set_urls(false);
     $pref = $e107->getPref();
     //TODO optimize/benchmark
     $this->_watermark = array('activate' => vartrue($pref['watermark_activate'], false), 'text' => vartrue($pref['watermark_text']), 'size' => vartrue($pref['watermark_size'], 20), 'pos' => vartrue($pref['watermark_pos'], "BR"), 'color' => vartrue($pref['watermark_color'], 'fff'), 'font' => vartrue($pref['watermark_font']), 'margin' => vartrue($pref['watermark_margin'], 30), 'shadowcolor' => vartrue($pref['watermark_shadowcolor'], '000000'), 'opacity' => vartrue($pref['watermark_opacity'], 20));
     $this->_thumbQuality = vartrue($pref['thumbnail_quality'], 65);
     // parse request
     $this->parseRequest();
 }
开发者ID:JBeezygit,项目名称:e107,代码行数:41,代码来源:thumb.php

示例6: forum_thread_moderate

function forum_thread_moderate($p)
{
    $e107 = e107::getInstance();
    $sql = e107::getDb();
    foreach ($p as $key => $val) {
        if (preg_match("#(.*?)_(\\d+)_x#", $key, $matches)) {
            $act = $matches[1];
            $id = (int) $matches[2];
            switch ($act) {
                case 'lock':
                    $sql->update('forum_thread', 'thread_active=0 WHERE thread_id=' . $id);
                    return LAN_FORUM_CLOSE;
                    break;
                case 'unlock':
                    $sql->update('forum_thread', 'thread_active=1 WHERE thread_id=' . $id);
                    return LAN_FORUM_OPEN;
                    break;
                case 'stick':
                    $sql->update('forum_thread', 'thread_sticky=1 WHERE thread_id=' . $id);
                    return LAN_FORUM_STICK;
                    break;
                case 'unstick':
                    $sql->update('forum_thread', 'thread_sticky=0 WHERE thread_id=' . $id);
                    return LAN_FORUM_UNSTICK;
                    break;
                case 'deleteThread':
                    return forumDeleteThread($id);
                    break;
                case 'deletePost':
                    return forumDeletePost($id);
                    break;
            }
        }
    }
}
开发者ID:armpit,项目名称:e107,代码行数:35,代码来源:forum_mod.php

示例7: e_tagwords_download

 function e_tagwords_download()
 {
     $this->e107 = e107::getInstance();
     $this->settings = array();
     $this->settings['plugin'] = "";
     $this->settings['table'] = "download";
     $this->settings['db_id'] = "download_id";
     $this->settings['caption'] = "download";
 }
开发者ID:armpit,项目名称:e107,代码行数:9,代码来源:e_tagwords.php

示例8: e_tagwords_news

 function e_tagwords_news()
 {
     $this->e107 = e107::getInstance();
     $this->settings = array();
     $this->settings['plugin'] = "";
     $this->settings['table'] = "news";
     $this->settings['db_id'] = "news_id";
     $this->settings['caption'] = "LAN_TAG_CORE_NEWS_1";
 }
开发者ID:armpit,项目名称:e107,代码行数:9,代码来源:e_tagwords_news.php

示例9: e_tagwords_page

 function e_tagwords_page()
 {
     $this->e107 = e107::getInstance();
     $this->settings = array();
     $this->settings['plugin'] = "";
     $this->settings['table'] = "page";
     $this->settings['db_id'] = "page_id";
     $this->settings['caption'] = "LAN_TAG_CORE_CPAGES_1";
 }
开发者ID:armpit,项目名称:e107,代码行数:9,代码来源:e_tagwords_page.php

示例10: __construct

 function __construct($eVars = null)
 {
     parent::__construct($eVars);
     $this->e107 = e107::getInstance();
     $pref = e107::getPref();
     $this->commentsDisabled = vartrue($pref['comments_disabled']);
     if (!empty($pref['comments_engine'])) {
         $this->commentsEngine = $pref['comments_engine'];
     }
 }
开发者ID:gitye,项目名称:e107,代码行数:10,代码来源:news_shortcodes.php

示例11: procBanRetrigger

 function procBanRetrigger()
 {
     //global $pref;
     if (CRON_RETRIGGER_DEBUG) {
         $e107 = e107::getInstance();
         $e107->admin_log->e_log_event(10, debug_backtrace(), 'DEBUG', 'CRON Ban retrigger', 'Retrigger processing started', FALSE, LOG_TO_ROLLING);
     }
     require_once e_HANDLER . 'iphandler_class.php';
     $ipManager = new banlistManager();
     $ipManager->banRetriggerAction();
     if (CRON_RETRIGGER_DEBUG) {
         $e107->admin_log->e_log_event(10, debug_backtrace(), 'DEBUG', 'CRON Ban Retrigger', 'Retrigger processing completed', FALSE, LOG_TO_ROLLING);
     }
 }
开发者ID:notzen,项目名称:e107,代码行数:14,代码来源:cron_class.php

示例12: process

 /**
  * Process Posted Data.
  * @param $ui admin-ui object
  */
 public function process($ui)
 {
     $data = $ui->getPosted();
     e107::getMessage()->addDebug(print_a($data, true));
     if ($data['news_id'] && $this->active) {
         $excerpt = e107::getParser()->text_truncate(strip_tags(e107::getParser()->post_toHTML($data['news_body'])), 100, '...');
         //			$id=mysql_insert_id();
         $permLink = e107::getInstance()->base_path . "comment.php?comment.news." . intval($data['news_id']);
         require_once e_PLUGIN . "trackback/trackbackClass.php";
         $trackback = new trackbackClass();
         if ($data['x_trackback_urls']) {
             $urlArray = explode("\n", $data['x_trackback_urls']);
             foreach ($urlArray as $pingurl) {
                 if (!($terror = $trackback->sendTrackback($permLink, $pingurl, $data['news_title'], $excerpt))) {
                     e107::getMessage()->add("Successfully pinged {$pingurl}.", E_MESSAGE_SUCCESS);
                 } else {
                     e107::getMessage()->add("was unable to ping {$pingurl}<br />[ Error message returned was : '{$terror}'. ]", E_MESSAGE_ERROR);
                 }
             }
         }
         /*
         	if(isset($_POST['pingback_urls']))
         	{
         		if ($urlArray = $trackback->getPingUrls($data['news_body'])) //FIXME - missing method!!!
         		{
         			foreach($urlArray as $pingurl)
         			{
         
         				if ($trackback->sendTrackback($permLink, $pingurl, $data['news_title'], $excerpt))
         				{
         
         					e107::getMessage()->add("Successfully pinged {$pingurl}.", E_MESSAGE_SUCCESS);
         				}
         				else
         				{
         
         					e107::getMessage()->add("Pingback to {$pingurl} failed ...", E_MESSAGE_ERROR);
         				}
         			}
         		}
         		else
         		{
         
         			e107::getMessage()->add("No pingback addresses were discovered", E_MESSAGE_INFO, $smessages);
         		}
         	}
         */
     }
     /* end trackback */
 }
开发者ID:armpit,项目名称:e107,代码行数:54,代码来源:e_admin.php

示例13: theme_adminmenu

function theme_adminmenu()
{
    global $mode;
    $mode = e_QUERY;
    $e107 =& e107::getInstance();
    $var['main']['text'] = TPVLAN_33;
    $var['main']['link'] = e_SELF;
    $var['admin']['text'] = TPVLAN_34;
    $var['admin']['link'] = e_SELF . "?admin";
    $var['choose']['text'] = TPVLAN_51;
    $var['choose']['link'] = e_SELF . "?choose";
    $var['upload']['text'] = TPVLAN_38;
    $var['upload']['link'] = e_SELF . "?upload";
    $selected = e_QUERY ? e_QUERY : "main";
    e_admin_menu(TPVLAN_26, $selected, $var);
}
开发者ID:notzen,项目名称:e107,代码行数:16,代码来源:theme.php

示例14: create

 /**
  * Describe all pm routes. 
  * Routes vs legacy queries:
  * list/ 			-> {no query} 
  * list/category	-> download.php?action=list&id={category-id}
  * view/item 		-> download.php?action=view&id={download-id}
  * request/item 	-> request.php?{download-id}
  */
 public function create($route, $params = array(), $options = array())
 {
     if (is_string($route)) {
         $route = explode('/', $route, 2);
     }
     if (!varset($route[0]) || 'index' == $route[0]) {
         $route[0] = 'list';
     }
     $base = e107::getInstance()->getFolder('plugins') . 'download/';
     //	var_dump($options, $route, $params);
     //	print_a($route);
     if ($route[0] == 'list') {
         if (!isset($params['id']) && isset($params['download_category_id'])) {
             $params['id'] = $params['download_category_id'];
         }
         switch ($route[1]) {
             case 'index':
                 $this->legacyQueryString = '';
                 return $base . 'download.php';
                 break;
             case 'category':
                 $url = 'action=list&id=' . $params['id'];
                 if (isset($params['from'])) {
                     $url .= "&from=" . $params['from'] . "&view=" . $params['view'] . "&order=" . $params['order'] . "&sort=" . $params['sort'];
                 }
                 $this->legacyQueryString = $url;
                 return $base . 'download.php?' . $url;
                 break;
         }
     } elseif ($route[0] == 'view') {
         if (!isset($params['id']) && isset($params['download_id'])) {
             $params['id'] = $params['download_id'];
         }
         switch ($route[1]) {
             case 'item':
                 $this->legacyQueryString = 'action=view&id=' . $params['id'];
                 return $base . 'download.php?action=view&id=' . $params['id'];
                 break;
         }
     } elseif ($route[0] == 'request') {
         $this->legacyQueryString = $params['id'];
         return $base . 'request.php?' . $params['id'];
     }
     return false;
 }
开发者ID:armpit,项目名称:e107,代码行数:53,代码来源:url.php

示例15: sc_banner

 function sc_banner($parm = '')
 {
     $e107 = e107::getInstance();
     $sql = e107::getDb();
     $tp = e107::getParser();
     $ret = '';
     $text = '';
     mt_srand((double) microtime() * 1000000);
     $seed = mt_rand(1, 2000000000);
     $time = time();
     $query = " (banner_startdate=0 OR banner_startdate <= {$time}) AND (banner_enddate=0 OR banner_enddate > {$time}) AND (banner_impurchased=0 OR banner_impressions<=banner_impurchased)" . ($parm ? " AND banner_campaign='" . $tp->toDB($parm) . "'" : '') . "\n\t\tAND banner_active IN (" . USERCLASS_LIST . ")\n\t\tORDER BY RAND({$seed}) LIMIT 1";
     if ($sql->select('banner', 'banner_id, banner_image, banner_clickurl, banner_description', $query)) {
         $row = $sql->fetch();
         return $this->renderBanner($row);
     } else {
         return '&nbsp;';
     }
 }
开发者ID:gitter-badger,项目名称:e107,代码行数:18,代码来源:e_shortcode.php


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