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


PHP e107::getMessage方法代码示例

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


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

示例1: install_post

 function install_post($var)
 {
     e107::includeLan(e_PLUGIN . 'featurebox/languages/' . e_LANGUAGE . '_admin_featurebox.php');
     $mes = e107::getMessage();
     $query = array();
     $query['fb_category_id'] = 0;
     $query['fb_category_title'] = 'General';
     $query['fb_category_template'] = 'default';
     $query['fb_category_random'] = 0;
     $query['fb_category_class'] = e_UC_PUBLIC;
     $query['fb_category_limit'] = 1;
     $inserted = e107::getDb()->db_Insert('featurebox_category', $query);
     $status = $inserted ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
     $mes->add(FBLAN_INSTALL_01, $status);
     if ($inserted) {
         $query = array();
         $query['fb_id'] = 0;
         $query['fb_category'] = $inserted;
         $query['fb_title'] = 'Default Title';
         $query['fb_text'] = 'Default Message';
         $query['fb_mode'] = 0;
         $query['fb_class'] = e_UC_PUBLIC;
         $query['fb_rendertype'] = 0;
         $query['fb_template'] = 'default';
         $query['fb_order'] = 0;
         $query['fb_image'] = '';
         $query['fb_imageurl'] = '';
         $status = e107::getDb('sql2')->db_Insert('featurebox', $query) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
     } else {
         $status = E_MESSAGE_ERROR;
     }
     $mes->add(FBLAN_INSTALL_02, $status);
 }
开发者ID:notzen,项目名称:e107,代码行数:33,代码来源:featurebox_setup.php

示例2: admin_update

function admin_update($update, $type = 'update', $success = false, $failed = false, $output = true)
{
    require_once e_HANDLER . "message_handler.php";
    $emessage = e107::getMessage();
    if ($type == 'update' && $update || $type == 'insert' && $update !== false) {
        $emessage->add($success ? $success : ($type == 'update' ? LAN_UPDATED : LAN_CREATED), E_MESSAGE_SUCCESS);
    } elseif ($type == 'delete' && $update) {
        $emessage->add($success ? $success : LAN_DELETED, E_MESSAGE_SUCCESS);
    } elseif (!mysql_errno()) {
        if ($type == 'update') {
            $emessage->add(LAN_NO_CHANGE . ' ' . LAN_TRY_AGAIN, E_MESSAGE_INFO);
        } elseif ($type == 'delete') {
            $emessage->add(LAN_DELETED_FAILED . ' ' . LAN_TRY_AGAIN, E_MESSAGE_INFO);
        }
    } else {
        switch ($type) {
            case 'insert':
                $msg = LAN_CREATED_FAILED;
                break;
            case 'delete':
                $msg = LAN_DELETED_FAILED;
                break;
            default:
                $msg = LAN_UPDATED_FAILED;
                break;
        }
        $text = ($failed ? $failed : $msg . " - " . LAN_TRY_AGAIN) . "<br />" . LAN_ERROR . " " . mysql_errno() . ": " . mysql_error();
        $emessage->add($text, E_MESSAGE_ERROR);
    }
    $emessage->addInfo("Using deprecated admin_update() which has been replaced by \$mes->autoMessage();");
    if ($output) {
        echo $emessage->render();
    }
    return $update;
}
开发者ID:notzen,项目名称:e107,代码行数:35,代码来源:boot.php

示例3: install_post

 /**
  * For inserting default database content during install after table has been created by the test_sql.php file. 
  */
 function install_post($var)
 {
     $sql = e107::getDb();
     $mes = e107::getMessage();
     /*
     		$e107_test = array(
     			'test_id'				=>'1',
     			'test_icon'			=>'{e_PLUGIN}test/images/test_32.png',
     			'test_type'			=>'type_1',
     			'test_name'			=>'My Name',
     			'test_folder'			=>'Folder Value',
     			'test_version'			=>'1',
     			'test_author'			=>'bill',
     			'test_authorURL'		=>'http://e107.org',
     			'test_date'			=>'1352871240',
     			'test_compatibility'	=>'2',
     			'test_url'				=>'http://e107.org'
     		);
     		
     		if($sql->insert('test',$e107_test))
     		{
     			$mes->add("Custom - Install Message.", E_MESSAGE_SUCCESS);
     		}
     		else
     		{
     			$mes->add("Custom - Failed to add default table data.", E_MESSAGE_ERROR);	
     		}*/
 }
开发者ID:Janvrensburg,项目名称:jobtest,代码行数:31,代码来源:test_setup.php

示例4: gitrepo

 /**
  * Update the current Repo. of this e107 installation.  (eg. e107 on github)
  */
 function gitrepo()
 {
     $mes = e107::getMessage();
     $fl = e107::getFile();
     if (is_dir(e_BASE . ".git")) {
         $gitPath = defset('e_GIT', 'git');
         // addo to e107_config.php to
         // Change Dir.
         $cmd = 'cd ' . e_ROOT;
         $mes->addDebug($cmd);
         $text = `{$cmd} 2>&1`;
         // Remove any local changes.
         $cmd = $gitPath . ' reset --hard';
         $mes->addDebug($cmd);
         $text .= `{$cmd} 2>&1`;
         // Run Pull request
         $cmd = $gitPath . ' pull';
         $mes->addDebug($cmd);
         $text .= `{$cmd} 2>&1`;
         $return = print_a($text, true);
         $mes->addSuccess($return);
         if (unlink(e_BASE . "install.php")) {
             $mes->addDebug("Removed install.php");
         }
     } else {
         $mes->addError("No git repo found");
         //TODO LAN
     }
     $fl->chmod(e_BASE . "cron.php", 0755);
     $fl->chmod(e_HANDLER . "bounce_handler.php", 0755);
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:34,代码来源:cron_class.php

示例5: showImages

 function showImages($cat)
 {
     $mes = e107::getMessage();
     $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($cat);
     $sc->amount = 12;
     // TODO Add Pref. amount per page.
     $sc->curCat = $cat;
     $sc->from = $_GET['frm'] ? intval($_GET['frm']) : 0;
     $list = e107::getMedia()->getImages($cat, $sc->from, $sc->amount);
     $catname = $tp->toHtml($this->catList[$cat]['media_cat_title'], false, 'defs');
     $inner = "";
     foreach ($list as $row) {
         $sc->setVars($row);
         $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);
     e107::getRender()->tablerender(LAN_PLUGIN_GALLERY_TITLE, $mes->render() . $text);
 }
开发者ID:armpit,项目名称:e107,代码行数:27,代码来源:gallery.php

示例6: invalidURL

 function invalidURL()
 {
     $mes = e107::getMessage();
     $mes->addWarning("Invalid URL");
     echo "<div class='container'>" . $mes->render() . "</div>";
     return;
 }
开发者ID:armpit,项目名称:e107,代码行数:7,代码来源:unsubscribe.php

示例7: upgrade_post

 function upgrade_post($var)
 {
     $sql = e107::getDb();
     if ($sql->isEmpty('forum_thread') === true && $sql->isTable('forum_t') && $sql->isEmpty('forum_t') === false) {
         $mes = e107::getMessage();
         $mes->addSuccess("Migration is required. Please click 'Continue'.<br /><a class='btn btn-primary' href='" . e_PLUGIN . "forum/forum_update.php'>Continue</a>");
     }
 }
开发者ID:armpit,项目名称:e107,代码行数:8,代码来源:forum_setup.php

示例8: install_post

 function install_post($var)
 {
     $sql = e107::getDb();
     $mes = e107::getMessage();
     $query = "INSERT INTO #pcontent VALUES \n\t\t(1, 'content', '', '', '', '1', '', '', '', '0', '0', '0', '0', '', '" . time() . "', '0', '0', '', '1', '0', '', '') ,\n\t\t(2, 'article', '', '', '', '1', '', '', '', '0', '0', '0', '0', '', '" . time() . "', '0', '0', '', '2', '0', '', ''),\n\t\t(3, 'review', '', '', '', '1', '', '', '', '0', '0', '0', '0', '', '" . time() . "', '0', '0', '', '3', '0', '', '')";
     $status = $sql->gen($query) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
     $mes->add("Adding Default table categories to table: content ", $status);
 }
开发者ID:Jimmi08,项目名称:content,代码行数:8,代码来源:content_setup.php

示例9: install_post

 function install_post($var)
 {
     $sql = e107::getDb();
     $mes = e107::getMessage();
     $insert = array(array('rss_id' => 0, 'rss_name' => 'News', 'rss_url' => 'news', 'rss_topicid' => '', 'rss_path' => 'news', 'rss_text' => 'The rss feed of the news', 'rss_datestamp' => time(), 'rss_class' => '0', 'rss_limit' => '9'));
     $status = $sql->insert('rss', $insert) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
     $mes->add("Adding Default table data to table: rss", $status);
     //TODO Generic LAN "LAN_DEFAULT_TABLE_DATA"
 }
开发者ID:armpit,项目名称:e107,代码行数:9,代码来源:rss_setup.php

示例10: config

 public function config()
 {
     $engine = e107::pref('core', 'comments_engine', 'e107');
     if ($engine == 'social::facebook' && empty($this->facebookActive)) {
         e107::getMessage()->addInfo("Facebook comments requires that you have a facebook App ID. See the 'social login' area in admin-preferences to add one.");
     }
     $config = array();
     $config[] = array('name' => "Facebook", 'function' => 'facebook');
     return $config;
 }
开发者ID:JBeezygit,项目名称:e107,代码行数:10,代码来源:e_comment.php

示例11: beforeCreate

 public function beforeCreate($new_data)
 {
     if (empty($new_data['pm_to'])) {
         e107::getMessage()->addError('Please enter a recipient in the "To" field.');
         return false;
     }
     $new_data['pm_size'] = strlen($new_data['pm_text']);
     $new_data['pm_from'] = USERID;
     return $new_data;
 }
开发者ID:gitter-badger,项目名称:e107,代码行数:10,代码来源:admin_config.php

示例12: init

 function init()
 {
     $mes = e107::getMessage();
     if (vartrue($_POST['bloggerUrl'])) {
         $this->feedUrl = rtrim($_POST['bloggerUrl'], "/") . "/feeds/posts/default?max-results=999&alt=rss";
     }
     if (vartrue($_POST['bloggerCleanup'])) {
         $this->cleanupHtml = true;
     }
     $mes->addDebug("Blogger Feed:" . $this->feedUrl);
 }
开发者ID:notzen,项目名称:e107,代码行数:11,代码来源:blogger_import_class.php

示例13: process

 /**
  * Process Posted Data.
  * @param $ui admin-ui object
  */
 public function process($ui, $id = 0)
 {
     $data = $ui->getPosted();
     $action = $ui->getAction();
     // current mode: create, edit, list
     //e107::getHybridAuth('twitter');
     e107::getMessage()->addDebug("e107_plugins/social/e_admin.php :: process method called.");
     e107::getMessage()->addDebug("ID: " . $id);
     e107::getMessage()->addDebug("Action: " . $action);
     e107::getMessage()->addDebug(print_a($data, true));
 }
开发者ID:armpit,项目名称:e107,代码行数:15,代码来源:e_admin.php

示例14: install_post

 function install_post($var)
 {
     $sql = e107::getDb();
     $mes = e107::getMessage();
     $query = "INSERT INTO #faqs (`faq_id`, `faq_parent`, `faq_question`, `faq_answer`, `faq_comment`, `faq_datestamp`, `faq_author`, `faq_order`) VALUES \n\t\t\t(1, 1, 'What is FAQs?', 'FAQs is a plugin that you can use on your e107 0.8+ website to manage Frequently Asked Questions', 0, 1230918231, 1, 0),\n\t\t\t(2, 1, 'How can I use e107?', 'You can use e107 if you have a running server with PHP and MySQL installed. Read more about installation requirements.\r\n\r\ne107 is a Content Management System (CMS). You can use it to make consistent web pages. The advantage is you don''t have to write HTML or create CSS files. The programs of e107 take care of all the presentation through the theme. All your entered data is saved into a MySQL database.\r\n\r\ne107 has active plugin and theme resources which grow every day. The software is completely and totally free and always will be, you don''t even need to register anywhere to download it. There are hundreds of content management systems to choose from, if you''re not sure e107 suits your needs, head over to OpenSourceCMS and try a few out.\r\n\r\nWith e107 you are totally in control with a powerful but easy to understand Admin Area and you can add functionalities to your website by adding plugins. e107 has an easy step-by-step installation procedure to install it on your server. ', 0, 0, 1, 1),\n\t\t\t(3, 1, 'What is a plugin?', 'A plugin is an additional program that integrates with the e107 core system.\r\n\r\nActually plugins are enhancements to the existing system. Some other CMS systems call it extensions, components or modules.\r\n\r\nAlready some core plugins are included in the full install package of e107.\r\n\r\nYou can activate them using Admin > Plugin Manager, and click on Install for the ones you want. They will appear in your Admin Area for configuration.\r\n\r\nThere are all kinds of plugins: small and large, core plugins and third party plugins. There are plugins for all kinds of purposes. ', 0, 123123123, 1, 2);\n\t\t";
     $status = $sql->db_Select_gen($query) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
     $mes->add("Adding Default table data to table: faqs", $status);
     $query2 = "INSERT INTO #faqs_info (`faq_info_id`, `faq_info_title`, `faq_info_about`, `faq_info_parent`, `faq_info_class`, `faq_info_order`, `faq_info_icon`, `faq_info_metad`, `faq_info_metak`) VALUES \n\t\t\t(1, 'General', 'General Faqs', 0, 0, 0, '', '', ''),\n\t\t\t(2, 'Misc', 'Other FAQs', 0, 0, 1, '', '', '');\n\t\t";
     $status = $sql->db_Select_gen($query2) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
     $mes->add("Adding Default table data to table: faqs_info", $status);
 }
开发者ID:armpit,项目名称:e107,代码行数:11,代码来源:faqs_setup.php

示例15: init

 function init()
 {
     $mes = e107::getMessage();
     if (vartrue($_POST['siteUrl'])) {
         $domain = preg_replace("/https?:\\/\\//i", '', $_POST['siteUrl']);
         list($site, $dom, $tld) = explode(".", $domain);
         $this->feedUrl = "http://" . $site . ".livejournal.com/data/rss";
     }
     if (vartrue($_POST['siteCleanup'])) {
         $this->cleanupHtml = true;
     }
     $mes->addDebug("LiveJournal Feed:" . $this->feedUrl);
 }
开发者ID:notzen,项目名称:e107,代码行数:13,代码来源:livejournal_import_class.php


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