本文整理汇总了PHP中JResponse::SetBody方法的典型用法代码示例。如果您正苦于以下问题:PHP JResponse::SetBody方法的具体用法?PHP JResponse::SetBody怎么用?PHP JResponse::SetBody使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JResponse
的用法示例。
在下文中一共展示了JResponse::SetBody方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
}
示例2: 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);
}