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


PHP JResponse::GetBody方法代码示例

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


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

示例1: onAfterRender

 public function onAfterRender()
 {
     if ($this->app->isAdmin()) {
         return;
     }
     $app = JFactory::getApplication();
     $option = $app->input->get('option');
     $view = $app->input->get('view');
     $tmpl = $app->input->get('tmpl');
     $body = JResponse::GetBody();
     if ($app->isSite() && $tmpl != 'component') {
         $_cls = explode(',', $this->_params->get('item_class'));
         if (empty($_cls)) {
             return;
         }
         $cls = array();
         for ($i = 0; $i < count($_cls); $i++) {
             $cls[] = trim($_cls[$i]);
         }
         $cls_str = implode(', ', $cls);
         $body = str_replace('</body>', $this->_addScriptQV($cls_str) . '</body>', $body);
         JResponse::setBody($body);
         return true;
     }
     $is_ajax = !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest';
     $is_ajax_qv = (int) JRequest::getVar('isajax_qv', 0);
     if ($is_ajax && $is_ajax_qv) {
         $body = JResponse::GetBody();
         preg_match("~<body.*?>(.*?)<\\/body>~is", $body, $match);
         echo '<div id="sj_quickview">' . $match[1] . '</div>';
         die;
         //die(json_encode('<div id="sj_quickview">'.$match[1].'</div>'));
     }
 }
开发者ID:proyectoseb,项目名称:ShoppyStore,代码行数:34,代码来源:plg_sj_vm_quickview.php

示例2: onAfterRender

    function onAfterRender()
    {
      $runmode = $this->params->get('runmode');
      if ($runmode != 1) return;

      //    $user =& JFactory::getUser();
      $app = JFactory::getApplication();

      if ($app->isSite()) {
        $page = JResponse::GetBody();
        $page = do_shortcode($page);
        JResponse::SetBody($page);
      }
    }
开发者ID:ntemple,项目名称:Shortcodes-for-Joomla,代码行数:14,代码来源:shortcodes.php

示例3: addBtnShortCodes

    public function addBtnShortCodes()
    {
        $page = JResponse::GetBody();
        $button = $this->listShortCodes();
        $stext = '<script  type="text/javascript">
						function jSelectShortcode(text) {
							jQuery("#yt_shorcodes").removeClass("open");
							text = text.replace(/\'/g, \'"\');
							//1.Editor Content
							if(document.getElementById(\'jform_articletext\') != null) {
								jInsertEditorText(text, \'jform_articletext\');
							}
							if(document.getElementById(\'jform_description\') != null) {
								jInsertEditorText(text, \'jform_description\');
							}

							//2.Editor K2
							if(document.getElementById(\'description\') != null) {
								jInsertEditorText(text, \'description\');
							}
							if(document.getElementById(\'text\') != null) {
								jInsertEditorText(text, \'text\');
							}
							//3.Editor VirtueMart
							if(document.getElementById(\'category_description\') != null) {
								jInsertEditorText(text, \'category_description\');
							}
							if(document.getElementById(\'product_desc\') != null) {
								jInsertEditorText(text, \'product_desc\');
							}
							//4.Editor Contact
							if(document.getElementById(\'jform_misc\') != null) {
								jInsertEditorText(text, \'jform_misc\');
							}
							//5.Editor Easyblog
							if(document.getElementById(\'write_content\') != null) {
								jInsertEditorText(text, \'write_content\');
							}
							//6.Editor Joomshoping
							if(document.getElementById(\'description1\') != null) {
								jInsertEditorText(text, \'description1\');
							}
							//6.Editor HTML
							if(document.getElementById(\'jform_content\') != null) {
								jInsertEditorText(text, \'jform_content\');
							}
							SqueezeBox.close();
						}
				   </script>';
        $page = str_replace('<div id="editor-xtd-buttons">', '<div id="editor-xtd-buttons">' . $button, $page);
        $page = str_replace('<div id="editor-xtd-buttons" class="btn-toolbar pull-left">', '<div id="editor-xtd-buttons" class="btn-toolbar pull-left">' . $button, $page);
        $page = str_replace('</body>', $stext . '</body>', $page);
        JResponse::SetBody($page);
    }
开发者ID:rodhoff,项目名称:MNW,代码行数:54,代码来源:ytshortcodes.php

示例4: onAfterRender

 function onAfterRender()
 {
     if ($this->_admin || $this->_view == '') {
         return;
     }
     $body = JResponse::GetBody();
     if ($this->_params->get('display_pagination') == 0) {
         $body = str_replace('div class="pagination">', 'div class="pagination" style="display:none;">', $body);
     }
     $body = str_replace('</body>', $this->addBtnLoadMore() . '</body>', $body);
     $body = str_replace('</body>', $this->addjQuery() . '</body>', $body);
     JResponse::setBody($body);
     return true;
 }
开发者ID:educacionbe,项目名称:stabwall,代码行数:14,代码来源:plg_sj_content_listing_ajax.php


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