本文整理匯總了PHP中nnFrameworkFunctions::getByUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP nnFrameworkFunctions::getByUrl方法的具體用法?PHP nnFrameworkFunctions::getByUrl怎麽用?PHP nnFrameworkFunctions::getByUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nnFrameworkFunctions
的用法示例。
在下文中一共展示了nnFrameworkFunctions::getByUrl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: render
function render()
{
$url = JFactory::getApplication()->input->getString('url', '');
$func = new nnFrameworkFunctions();
if ($url) {
echo $func->getByUrl($url);
die;
}
$allowed = array('administrator/components/com_dbreplacer/dbreplacer.inc.php', 'administrator/components/com_nonumbermanager/details.inc.php', 'administrator/modules/mod_addtomenu/addtomenu.inc.php', 'media/rereplacer/images/image.inc.php', 'plugins/editors-xtd/articlesanywhere/articlesanywhere.inc.php', 'plugins/editors-xtd/contenttemplater/contenttemplater.inc.php', 'plugins/editors-xtd/dummycontent/dummycontent.inc.php', 'plugins/editors-xtd/modulesanywhere/modulesanywhere.inc.php', 'plugins/editors-xtd/snippets/snippets.inc.php', 'plugins/editors-xtd/sourcerer/sourcerer.inc.php');
$file = JFactory::getApplication()->input->getString('file', '');
$folder = JFactory::getApplication()->input->getString('folder', '');
if ($folder) {
$file = implode('/', explode('.', $folder)) . '/' . $file;
}
if (!$file || in_array($file, $allowed) === false) {
die;
}
jimport('joomla.filesystem.file');
if (JFactory::getApplication()->isSite()) {
JFactory::getApplication()->setTemplate('../administrator/templates/isis');
}
$_REQUEST['tmpl'] = 'component';
JFactory::getApplication()->input->set('option', '1');
header('Content-Type: text/html; charset=utf-8');
JHtml::_('bootstrap.framework');
JFactory::getDocument()->addScript(JURI::root(true) . '/administrator/templates/isis/js/template.js');
JFactory::getDocument()->addStyleSheet(JURI::root(true) . '/administrator/templates/isis/css/template.css');
JHtml::stylesheet('nnframework/popup.min.css', false, true);
$file = JPATH_SITE . '/' . $file;
$html = '';
if (JFile::exists($file)) {
ob_start();
include $file;
$html = ob_get_contents();
ob_end_clean();
}
JFactory::getDocument()->setBuffer($html, 'component');
nnApplication::render();
$html = JResponse::toString(JFactory::getApplication()->getCfg('gzip'));
$html = preg_replace('#\\s*<' . 'link [^>]*href="[^"]*templates/system/[^"]*\\.css[^"]*"[^>]* />#s', '', $html);
$html = preg_replace('#(<' . 'body [^>]*class=")#s', '\\1nnpopup ', $html);
$html = str_replace('<' . 'body>', '<' . 'body class="nnpopup"', $html);
echo $html;
die;
}