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


PHP Context::addHtmlHeader方法代码示例

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


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

示例1: getHtmlPage

 /**
  * @brief 외부 http로 요청되는 파일일 경우 파일을 받아와서 저장 후 return
  **/
 function getHtmlPage($path, $caching_interval, $cache_file)
 {
     // 캐시 검사
     if ($caching_interval > 0 && file_exists($cache_file) && filemtime($cache_file) + $caching_interval * 60 > time()) {
         $content = FileHandler::readFile($cache_file);
     } else {
         FileHandler::getRemoteFile($path, $cache_file);
         $content = FileHandler::readFile($cache_file);
     }
     // opage controller 생성
     $oOpageController =& getController('opage');
     // 외부 서버의 페이지 일 경우 이미지, css, javascript등의 url을 변경
     $content = $oOpageController->replaceSrc($content, $path);
     // 해당 문서를 utf-8로 변경
     $buff->content = $content;
     $buff = Context::convertEncoding($buff);
     $content = $buff->content;
     // title 추출
     $title = $oOpageController->getTitle($content);
     if ($title) {
         Context::setBrowserTitle($title);
     }
     // header script 추출
     $head_script = $oOpageController->getHeadScript($content);
     if ($head_script) {
         Context::addHtmlHeader($head_script);
     }
     // body 내용 추출
     $body_script = $oOpageController->getBodyScript($content);
     if (!$body_script) {
         $body_script = $content;
     }
     return $content;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:37,代码来源:opage.view.php

示例2: triggerDisplay

 function triggerDisplay()
 {
     //trigger display before();
     if (strpos(Context::get('act'), "ispBoardAdmin") || strpos(Context::get('act'), "ispBoard_extendAdmin")) {
         $core_ver = __XE_VERSION__ ? __XE_VERSION__ : __ZBXE_VERSION__;
         $is_active = Context::get('act') == 'dispBoard_extendAdminBoardModify' ? true : false;
         $url = getNotEncodedUrl('act', 'dispBoard_extendAdminBoardModify', 'selected_var_idx', '', 'type', '');
         $text = "목록수정";
         if ($core_ver >= 1.7) {
             $active = $is_active ? "class='x_active'" : "";
             $html = sprintf("<li %s><a href='%s'>%s</a></li>", $active, $url, $text);
             $script = "jQuery(document).ready(function(\$){\$('.x_nav').append(\"{$html}\");});";
         } else {
             if ($core_ver >= 1.5) {
                 $active = $is_active ? "class='active'" : "";
                 $html = sprintf("<li %s><a href='%s'>%s</a></li>", $active, $url, $text);
                 $script = "jQuery(document).ready(function(\$){\$('.x .cnb ul').append(\"{$html}\");});";
             } else {
                 if ($core_ver >= 1.4) {
                     $active = $is_active ? "class='on'" : "";
                     $html = sprintf("<li %s><a href='%s'>%s</a></li>", $active, $url, $text);
                     $script = "jQuery(document).ready(function(\$){\$('#xeAdmin .header4 .localNavigation').append(\"{$html}\");});";
                 } else {
                     $this->stop('지원하지 않는 버전입니다. board_extend 모듈을 제거해주시기 바랍니다.');
                 }
             }
         }
         Context::addHtmlHeader("<script type='text/javascript'>{$script}</script>");
     }
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:30,代码来源:board_extend.controller.php

示例3: dispNproductIndex

 /**
  * @brief index page
  */
 function dispNproductIndex()
 {
     // add translation for javascript
     Context::addHtmlHeader(sprintf("<script>\n\t\t\t\t\t\t\t\t\t\t\txe.lang.msg_put_item_in_cart = '%s';\n\t\t\t\t\t\t\t\t\t\t</script>", Context::getLang('msg_put_item_in_cart')));
     if (Context::get('item_srl') || Context::get('document_srl')) {
         return $this->dispNproductItemDetail();
     }
     $this->dispNproductItemList();
 }
开发者ID:seoeun,项目名称:xe-module-nproduct,代码行数:12,代码来源:nproduct.view.php

示例4: before_module_init

        function before_module_init(&$ModuleHandler)
        {
            $logged_info = Context::get('logged_info');
            if ($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) {
                return false;
            }
            // if($this->addon_info->target != 'all' && Context::get('is_logged'))
            // {
            // 	return false;
            // }
            if ($_SESSION['XE_VALIDATOR_ERROR'] == -1) {
                $_SESSION['member_captcha_authed'] = false;
            }
            if ($_SESSION['member_captcha_authed']) {
                return false;
            }
            $type = Context::get('captchaType');
            $this->target_acts = array();
            if ($this->addon_info->apply_find_account == 'apply') {
                $this->target_acts[] = 'procMemberFindAccount';
            }
            if ($this->addon_info->apply_resend_auth_mail == 'apply') {
                $this->target_acts[] = 'procMemberResendAuthMail';
            }
            if ($this->addon_info->apply_signup == 'apply') {
                $this->target_acts[] = 'procMemberInsert';
            }
            if (Context::getRequestMethod() != 'XMLRPC' && Context::getRequestMethod() !== 'JSON') {
                if ($type == 'inline') {
                    if (!$this->compareCaptcha()) {
                        Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
                        $_SESSION['XE_VALIDATOR_ERROR'] = -1;
                        $_SESSION['XE_VALIDATOR_MESSAGE'] = Context::getLang('captcha_denied');
                        $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
                        $_SESSION['XE_VALIDATOR_RETURN_URL'] = Context::get('error_return_url');
                        $ModuleHandler->_setInputValueToSession();
                    }
                } else {
                    Context::addHtmlHeader('<script>
						if(!captchaTargetAct) {var captchaTargetAct = [];}
						captchaTargetAct.push("' . implode('","', $this->target_acts) . '");
						</script>');
                    Context::loadFile(array('./addons/captcha_member/captcha.min.js', 'body', '', null), true);
                }
            }
            // compare session when calling actions such as writing a post or a comment on the board/issue tracker module
            if (!$_SESSION['member_captcha_authed'] && in_array(Context::get('act'), $this->target_acts)) {
                Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
                $ModuleHandler->error = "captcha_denied";
            }
            return true;
        }
开发者ID:kimkucheol,项目名称:xe-core,代码行数:52,代码来源:captcha_member.addon.php

示例5: initCommon

	/**
	 * Shop common init
	 **/
	public function initCommon($is_other_module = FALSE){
		if(!$this->checkXECoreVersion('1.4.3')) return $this->stop(sprintf(Context::getLang('msg_requried_version'),'1.4.3'));

		$oShopModel = getModel('shop');
		$oShopController = getController('shop');
		$oModuleModel = getModel('module');

		$site_module_info = Context::get('site_module_info');
		if(!$this->module_srl) {
			$site_module_info = Context::get('site_module_info');
			$site_srl = $site_module_info->site_srl;
			if($site_srl) {
				$this->module_srl = $site_module_info->index_module_srl;
				$this->module_info = $oModuleModel->getModuleInfoByModuleSrl($this->module_srl);
				if (!$is_other_module) {
					Context::set('module_info',$this->module_info);
					Context::set('mid',$this->module_info->mid);
					Context::set('current_module_info',$this->module_info);
				}
			}
		}

		if(!$this->module_info->skin) $this->module_info->skin = $this->skin;

		$preview_skin = Context::get('preview_skin');
		if($oModuleModel->isSiteAdmin(Context::get('logged_info'))&&$preview_skin) {
			if(is_dir($this->module_path.'skins/'.$preview_skin)) {
                $shop_config = new stdClass();
				$shop_config->skin = $this->module_info->skin = $preview_skin;
			}
		}

		if (!$is_other_module){
			Context::set('module_info',$this->module_info);
			Context::set('current_module_info', $this->module_info);
		}

		$this->shop = $oShopModel->getShop($this->module_info->module_srl);
		$this->site_srl = $this->shop->site_srl;
		Context::set('shop',$this->shop);

        Context::addHtmlHeader('<link rel="shortcut icon" href="'.$this->shop->getFaviconSrc().'" />');

		if($this->shop->timezone) $GLOBALS['_time_zone'] = $this->shop->timezone;

        Context::set('module', 'shop');


	}
开发者ID:haegyung,项目名称:xe-module-shop,代码行数:52,代码来源:shop.view.php

示例6: init

 function init()
 {
     if ($this->module_info->module != 'nmileage') {
         $this->module_info->skin = 'default';
     }
     if (!$this->module_info->skin) {
         $this->module_info->skin = 'default';
     }
     $skin = $this->module_info->skin;
     $oModuleModel =& getModel('module');
     // 템플릿 경로 설정
     $this->setTemplatePath(sprintf('%sskins/%s', $this->module_path, $skin));
     $oLicenseModel =& getModel('license');
     if (!$oLicenseModel || $oLicenseModel && !$oLicenseModel->getLicenseConfirm()) {
         Context::addHtmlHeader("<script>jQuery(document).ready(function() { jQuery('<div style=\"background:#fff; padding:6px; position:fixed; right:6px; bottom:6px; z-index:999999; \">Powered by <a href=\"http://www.xeshoppingmall.com\">NURIGO</a></div>').appendTo('body'); });</script>");
     }
 }
开发者ID:seoeun,项目名称:xe-module-nmileage,代码行数:17,代码来源:nmileage.view.php

示例7: init

 function init()
 {
     // 템플릿 경로 설정
     if ($this->module_info->module != 'nstore_digital') {
         $this->module_info->skin = 'default';
     }
     if (!$this->module_info->skin) {
         $this->module_info->skin = 'default';
     }
     if (!$this->module_info->display_caution) {
         $this->module_info->display_caution = 'Y';
     }
     $this->setTemplatePath($this->module_path . "skins/{$this->module_info->skin}");
     Context::set('module_info', $this->module_info);
     $oLicenseModel =& getModel('license');
     if (!$oLicenseModel || $oLicenseModel && !$oLicenseModel->getLicenseConfirm('nstore_digital')) {
         Context::addHtmlHeader("<script>jQuery(document).ready(function() { jQuery('<div style=\"background:#fff; padding:6px; position:fixed; right:6px; bottom:6px; z-index:999999; \">Powered by <a href=\"http://www.xeshoppingmall.com\">NURIGO</a></div>').appendTo('body'); });</script>");
     }
 }
开发者ID:seoeun,项目名称:xe-module-nstore_digital,代码行数:19,代码来源:nstore_digital.view.php

示例8: triggerBeforeDisplay

    public function triggerBeforeDisplay(&$output)
    {
        $logged_info = Context::get('logged_info');
        $oAndroidpushappModel = getModel('androidpushapp');
        $config = $oAndroidpushappModel->getConfig();
        $args = new stdClass();
        $args->module = "resource";
        $output_c_resource = executeQuery('androidpushapp.getAModuleCount', $args);
        $output_b = executeQueryArray('board.getBoardList', $args);
        $setting_board = "";
        if ($output_c_resource->data->count) {
            $output_a = executeQueryArray('androidpushapp.getAResourceList', $args);
            foreach ($output_a->data as $data) {
                if (in_array($data->module_srl, $config->no_use_module_srls) || in_array($data->module_srl, $config->only_admin_push_module_srls)) {
                } else {
                    if (preg_match("/XEPUSH/", $_SERVER['HTTP_USER_AGENT'])) {
                        if ($setting_board == "") {
                            $setting_board = $data->browser_title . "&#" . $data->module_srl;
                        } else {
                            $setting_board = $setting_board . "/-" . $data->browser_title . "&#" . $data->module_srl;
                        }
                    } else {
                        if ($setting_board == "") {
                            $setting_board = $data->browser_title . "k324elv23ul234oenf" . $data->module_srl;
                        } else {
                            $setting_board = $setting_board . "fo034kfk0ev0kr4feldkfjsdkaj" . $data->browser_title . "k324elv23ul234oenf" . $data->module_srl;
                        }
                    }
                }
            }
        }
        foreach ($output_b->data as $data) {
            if (in_array($data->module_srl, $config->no_use_module_srls) || in_array($data->module_srl, $config->only_admin_push_module_srls)) {
            } else {
                if (preg_match("/XEPUSH/", $_SERVER['HTTP_USER_AGENT'])) {
                    if ($setting_board == "") {
                        $setting_board = $data->browser_title . "&#" . $data->module_srl;
                    } else {
                        $setting_board = $setting_board . "/-" . $data->browser_title . "&#" . $data->module_srl;
                    }
                } else {
                    if ($setting_board == "") {
                        $setting_board = $data->browser_title . "k324elv23ul234oenf" . $data->module_srl;
                    } else {
                        $setting_board = $setting_board . "fo034kfk0ev0kr4feldkfjsdkaj" . $data->browser_title . "k324elv23ul234oenf" . $data->module_srl;
                    }
                }
            }
        }
        if (preg_match("/XEPUSH/", $_SERVER['HTTP_USER_AGENT'])) {
            if ($logged_info->member_srl) {
                $htmlCode = '<script>
					function callAndroid(){		
						window.myJs.callAndroid("%d","%s","%s");
					}

					function callAndroid_login(){		
						window.myJs_login.callAndroid_login("true");
					}
					</script>';
                $htmlCode = sprintf($htmlCode, $logged_info->member_srl, $logged_info->nick_name, $setting_board);
            } else {
                $htmlCode = '<script>
					function callAndroid(){		
						window.myJs.callAndroid(null,null,"%s");
					}

					function callAndroid_login(){		
						window.myJs_login.callAndroid_login("false");
					}					
					</script>';
                $htmlCode = sprintf($htmlCode, $setting_board);
            }
            Context::addHtmlHeader($htmlCode);
        } elseif ($config->sort_v == "B" || $config->sort_v == "WB") {
            $package = $config->package;
            $p_name = explode(".", $package);
            $num_app = sizeof($p_name) - 1;
            $appname = $p_name[$num_app];
            if ($logged_info->member_srl) {
                $htmlCode = '<style type="text/css">#xepushapp {display : block;}</style>				
				<script language="JavaScript">

				function checkApplicationInstall() { 

				 var userAgent = navigator.userAgent;
				 var visitedAt = (new Date()).getTime();

				 if (userAgent.match(/Chrome/)) {
						 
						 setTimeout(function() {
							  location.href = "intent://Setting?member_srl=' . $logged_info->member_srl . '&nick_name=' . $logged_info->nick_name . '&boardset=' . $setting_board . '#Intent;scheme=' . $appname . ';package=' . $package . ';end";
						 }, 100);
					} else {
						
						setTimeout(
						   function() {
							  if ((new Date()).getTime() - visitedAt < 200) {
								 location.href = "market://details?id=' . $package . '";
							  }
//.........这里部分代码省略.........
开发者ID:umjinsun12,项目名称:dngshin,代码行数:101,代码来源:androidpushapp.controller.php

示例9: moveStyleToHeader

 /**
  * @brief <body>내의 <style태그를 header로 이동
  **/
 function moveStyleToHeader($matches)
 {
     Context::addHtmlHeader($matches[0]);
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:7,代码来源:DisplayHandler.class.php

示例10: getModel

<?php

if (!defined("__ZBXE__")) {
    exit;
}
/**
 * @file planet_todo.addon.php
 * @author SOL군 (sol@ngleader.com)
 * @brief
 **/
if ($called_position == 'after_module_proc' && Context::getResponseMethod() != "XMLRPC" && Context::getResponseMethod() != "JSON") {
    $planet = Context::get('planet');
    if (!$planet || !$planet->isMyPlanet()) {
        return;
    }
    $oPlanetModel =& getModel('planet');
    $countTodo = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(), 'todo');
    $countDone = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(), 'done');
    Context::addHtmlHeader("<script type=\"text/javascript\">//<![CDATA[\nvar planet_todo_count={todo:" . $countTodo . ",done:" . $countDone . "};\n//]]></script>");
    Context::addJsFile('./addons/planet_todo/planet_todo.js');
}
开发者ID:hottaro,项目名称:xpressengine,代码行数:21,代码来源:planet_todo.addon.php

示例11: procModule


//.........这里部分代码省略.........
                     $this->error = 'msg_is_not_manager';
                     $oMessageObject =& ModuleHandler::getModuleInstance('message', 'view');
                     $oMessageObject->setError(-1);
                     $oMessageObject->setMessage($this->error);
                     $oMessageObject->dispMessage();
                     return $oMessageObject;
                 }
             }
         } else {
             if ($xml_info->default_index_act && method_exists($oModule, $xml_info->default_index_act)) {
                 $this->act = $xml_info->default_index_act;
             } else {
                 $this->error = 'msg_invalid_request';
                 $oModule->setError(-1);
                 $oModule->setMessage($this->error);
                 return $oModule;
             }
         }
     }
     // ruleset check...
     if (!empty($ruleset)) {
         $rulesetModule = $forward->module ? $forward->module : $this->module;
         $rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid);
         if (!empty($rulesetFile)) {
             if ($_SESSION['XE_VALIDATOR_ERROR_LANG']) {
                 $errorLang = $_SESSION['XE_VALIDATOR_ERROR_LANG'];
                 foreach ($errorLang as $key => $val) {
                     Context::setLang($key, $val);
                 }
                 unset($_SESSION['XE_VALIDATOR_ERROR_LANG']);
             }
             $Validator = new Validator($rulesetFile);
             $result = $Validator->validate();
             if (!$result) {
                 $lastError = $Validator->getLastError();
                 $returnUrl = Context::get('error_return_url');
                 $errorMsg = $lastError['msg'] ? $lastError['msg'] : 'validation error';
                 //for xml response
                 $oModule->setError(-1);
                 $oModule->setMessage($errorMsg);
                 //for html redirect
                 $this->error = $errorMsg;
                 $_SESSION['XE_VALIDATOR_ERROR'] = -1;
                 $_SESSION['XE_VALIDATOR_MESSAGE'] = $this->error;
                 $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
                 $_SESSION['XE_VALIDATOR_RETURN_URL'] = $returnUrl;
                 $this->_setInputValueToSession();
                 return $oModule;
             }
         }
     }
     $oModule->setAct($this->act);
     $this->module_info->module_type = $type;
     $oModule->setModuleInfo($this->module_info, $xml_info);
     if ($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent()) {
         global $lang;
         $header = '<style type="text/css">div.xe_mobile{opacity:0.7;margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0}p.xe_mobile{text-align:center;margin:1em 0}a.xe_mobile{color:#ff0;font-weight:bold;font-size:24px}@media only screen and (min-width:500px){a.xe_mobile{font-size:15px}}</style>';
         $footer = '<div class="xe_mobile"><p class="xe_mobile"><a class="xe_mobile" href="' . getUrl('m', '1') . '">' . $lang->msg_pc_to_mobile . '</a></p></div>';
         Context::addHtmlHeader($header);
         Context::addHtmlFooter($footer);
     }
     if ($type == "view" && $kind != 'admin') {
         $module_config = $oModuleModel->getModuleConfig('module');
         if ($module_config->htmlFooter) {
             Context::addHtmlFooter($module_config->htmlFooter);
         }
     }
     // if failed message exists in session, set context
     $this->_setInputErrorToContext();
     $procResult = $oModule->proc();
     $methodList = array('XMLRPC' => 1, 'JSON' => 1);
     if (!$oModule->stop_proc && !isset($methodList[Context::getRequestMethod()])) {
         $error = $oModule->getError();
         $message = $oModule->getMessage();
         $messageType = $oModule->getMessageType();
         $redirectUrl = $oModule->getRedirectUrl();
         if (!$procResult) {
             $this->error = $message;
             if (!$redirectUrl && Context::get('error_return_url')) {
                 $redirectUrl = Context::get('error_return_url');
             }
             $this->_setInputValueToSession();
         } else {
             if (count($_SESSION['INPUT_ERROR'])) {
                 Context::set('INPUT_ERROR', $_SESSION['INPUT_ERROR']);
                 $_SESSION['INPUT_ERROR'] = '';
             }
         }
         $_SESSION['XE_VALIDATOR_ERROR'] = $error;
         if ($message != 'success') {
             $_SESSION['XE_VALIDATOR_MESSAGE'] = $message;
         }
         $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType;
         if (Context::get('xeVirtualRequestMethod') != 'xml') {
             $_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl;
         }
     }
     unset($logged_info);
     return $oModule;
 }
开发者ID:relip,项目名称:xe-core,代码行数:101,代码来源:ModuleHandler.class.php

示例12: addExtraFormValidatorMessage

 /**
  * Add javascript codes into the header by checking values of member join form, required and others
  * @return void
  */
 function addExtraFormValidatorMessage()
 {
     $oMemberModel = getModel('member');
     $extraList = $oMemberModel->getUsedJoinFormList();
     $js_code = array();
     $js_code[] = '<script>//<![CDATA[';
     $js_code[] = '(function($){';
     $js_code[] = 'var validator = xe.getApp("validator")[0];';
     $js_code[] = 'if(!validator) return false;';
     $errorLang = array();
     foreach ($extraList as $val) {
         $title = str_ireplace(array('<script', '</script'), array('<scr"+"ipt', '</scr"+"ipt'), addslashes($val->column_title));
         if ($val->column_type == 'kr_zip' || $val->column_type == 'tel') {
             $js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["%s[]","%s"]);', $val->column_name, $title);
         } else {
             $js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["%s","%s"]);', $val->column_name, $title);
         }
         $errorLang[$val->column_name] = $val->column_title;
     }
     $_SESSION['XE_VALIDATOR_ERROR_LANG'] = $errorLang;
     $js_code[] = '})(jQuery);';
     $js_code[] = '//]]></script>';
     $js_code = implode("\n", $js_code);
     Context::addHtmlHeader($js_code);
 }
开发者ID:noxowl,项目名称:Yojouhankai-Module-Member,代码行数:29,代码来源:member.view.php

示例13: dispTextyle

 function dispTextyle()
 {
     $oTextyleModel =& getModel('textyle');
     $oTextyleController =& getController('textyle');
     $oDocumentModel =& getModel('document');
     $args->category_srl = Context::get('category_srl');
     $args->search_target = Context::get('search_target');
     $args->search_keyword = Context::get('search_keyword');
     $args->module_srl = $this->module_srl;
     $args->site_srl = $this->site_srl;
     $args->page = Context::get('page');
     $args->page = $args->page > 0 ? $args->page : 1;
     Context::set('page', $args->page);
     // set category
     $category_list = $oDocumentModel->getCategoryList($this->module_srl);
     Context::set('category_list', $category_list);
     $document_srl = Context::get('document_srl');
     if ($document_srl) {
         $oDocument = $oDocumentModel->getDocument($document_srl, false, false);
         if ($oDocument->isExists()) {
             if ($oDocument->get('module_srl') != $this->module_info->module_srl) {
                 return $this->stop('msg_invalid_request');
             }
             Context::setBrowserTitle($this->textyle->get('browser_title') . ' »  ' . $oDocument->getTitle());
             // meta keywords category + tag
             $tag_array = $oDocument->get('tag_list');
             if ($tag_array) {
                 $tag = htmlspecialchars(join(', ', $tag_array));
             } else {
                 $tag = '';
             }
             $category_srl = $oDocument->get('category_srl');
             if ($tag && $category_srl > 0) {
                 $tag = $category_list[$category_srl]->title . ', ' . $tag;
             }
             Context::addHtmlHeader(sprintf('<meta name="keywords" content="%s" />', $tag));
             if ($this->grant->manager) {
                 $oDocument->setGrant();
             }
         } else {
             Context::set('document_srl', '', true);
             $oDocument = $oDocumentModel->getDocument(0, false, false);
         }
     }
     if (!$document_srl) {
         if ($args->category_srl || $args->search_target && $args->search_keyword) {
             $args->list_count = 10;
             $output = $oDocumentModel->getDocumentList($args, false, false);
             $document_list = $output->data;
             Context::set('page_navigation', $output->page_navigation);
             Context::set('document_list', $document_list);
             $this->setTemplateFile('list');
         }
     }
     if ((!$oDocument || !$oDocument->isExists()) && !$document_list) {
         $args->list_count = 1;
         $output = $oDocumentModel->getDocumentList($args, false, false);
         if ($output->data && count($output->data)) {
             $oDocument = array_pop($output->data);
         }
     }
     if ($oDocument && $oDocument->isExists()) {
         $args->document_srl = $oDocument->document_srl;
         $output = executeQuery('textyle.getNextDocument', $args);
         if ($output->data->document_srl) {
             Context::set('prev_document', new documentItem($output->data->document_srl, false));
         }
         $output = executeQuery('textyle.getPrevDocument', $args);
         if ($output->data->document_srl) {
             Context::set('next_document', new documentItem($output->data->document_srl, false));
         }
         Context::set('oDocument', $oDocument);
         $this->setTemplateFile('read');
         Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_comment.xml');
     }
 }
开发者ID:google-code-backups,项目名称:xe-textyle,代码行数:76,代码来源:textyle.mobile.php

示例14: getController

    return;
}
if (Context::getRequestMethod() == "POST" && $called_position == 'before_module_proc') {
    $mode = $_REQUEST['mode'];
    if (!$mode || $mode != "fb") {
        return;
    }
    $oController =& getController('tccommentnotify');
    if (!$oController) {
        return;
    }
    $oController->procNotifyReceived();
    return;
}
if ($called_position == "after_module_proc") {
    $oModel =& getModel('tccommentnotify');
    if (!$oModel) {
        return;
    }
    if ($oModel->checkShouldNotify()) {
        $scriptCode = <<<EndOfScript
        <script type="text/javascript">
        // <![CDATA[
            exec_xml("tccommentnotify", "procDoNotify");
        // ]]>
        </script>

EndOfScript;
        Context::addHtmlHeader($scriptCode);
    }
}
开发者ID:hottaro,项目名称:xpressengine,代码行数:31,代码来源:tccommentnotify.addon.php

示例15: _moveMetaToHeader

 /**
  * add meta code extracted from html body to Context, which will be
  * printed inside <header></header> later.
  * @param array $matches
  * @return void
  */
 function _moveMetaToHeader($matches)
 {
     Context::addHtmlHeader($matches[0]);
 }
开发者ID:ddmshu,项目名称:xe-core,代码行数:10,代码来源:HTMLDisplayHandler.php


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