本文整理汇总了PHP中JModuleHelper::renderModule方法的典型用法代码示例。如果您正苦于以下问题:PHP JModuleHelper::renderModule方法的具体用法?PHP JModuleHelper::renderModule怎么用?PHP JModuleHelper::renderModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModuleHelper
的用法示例。
在下文中一共展示了JModuleHelper::renderModule方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _load_module
/**
* @param $module_id
* @param $params
*
* @return mixed
*/
protected function _load_module($module_id, $params)
{
$db =& JFactory::getDBO();
$db->setQuery("SELECT * FROM #__modules WHERE id='{$module_id}' ");
$module = $db->loadObject();
return JModuleHelper::renderModule($module, $params);
}
示例2: rend_html_Module
function rend_html_Module($params)
{
$list_module = array();
$modules = array();
if ($params->get('modulename', '')) {
$list_module = explode(",", $params->get('modulename'));
}
for ($i = 0; $i < count($list_module); $i++) {
if ($list_module[$i] != 'mod_jatoppanel') {
$modules[$i] = JModuleHelper::getModule(substr(trim($list_module[$i]), 4));
if ($modules[$i] && $modules[$i]->id) {
$modules[$i]->content = JModuleHelper::renderModule($module);
}
}
}
if ($list) {
$class = $params->get('display', 'ja-toppanel-col');
ob_start();
$path = JModuleHelper::getLayoutPath('mod_jatoppanel', 'default_modules');
if (file_exists($path)) {
require $path;
}
$this->_result = ob_get_clean();
}
}
示例3: parseJdocTags
public static function parseJdocTags($data)
{
$replace = array();
$matches = array();
if (preg_match_all('#<jdoc:include\\ type="([^"]+)" (.*)\\/>#iU', $data, $matches)) {
$matches[0] = array_reverse($matches[0]);
$matches[1] = array_reverse($matches[1]);
$matches[2] = array_reverse($matches[2]);
$count = count($matches[1]);
for ($i = 0; $i < $count; $i++) {
$attribs = JUtility::parseAttributes($matches[2][$i]);
$type = $matches[1][$i];
if ($type != 'modules') {
continue;
}
$name = isset($attribs['name']) ? $attribs['name'] : null;
if (empty($name)) {
continue;
}
unset($attribs['name']);
jimport('joomla.application.module.helper');
$modules = JModuleHelper::getModules($name);
$moduleHtml = null;
if (!empty($modules)) {
foreach ($modules as $module) {
$moduleHtml .= JModuleHelper::renderModule($module, $attribs);
}
}
$data = str_replace($matches[0][$i], $moduleHtml, $data);
}
}
return $data;
}
示例4: renderModule
function renderModule()
{
$code = JRequest::getVar('code', '', null, 'string');
$config = JFactory::getConfig();
$secret = $config->get('config.secret');
if ($code != $secret) {
exit;
}
$protect = JRequest::getInt('protect');
$time = time();
if (empty($protect) || $time > $protect + 5 || $time < $protect) {
exit;
}
$id = JRequest::getInt('id');
if (empty($id)) {
exit;
}
$db = JFactory::getDBO();
$db->setQuery('SELECT * FROM #__modules WHERE `id`=' . $id . ' LIMIT 1');
$module = $db->loadObject();
if (empty($module)) {
exit;
}
$module->user = substr($module->module, 0, 4) == 'mod_' ? 0 : 1;
$module->name = $module->user ? $module->title : substr($module->module, 4);
$module->style = null;
$module->module = preg_replace('/[^A-Z0-9_\\.-]/i', '', $module->module);
$params = array();
$lang =& JFactory::getLanguage();
$lang->load($module->module);
echo JModuleHelper::renderModule($module, $params);
exit;
}
示例5: display
function display()
{
jimport('joomla.application.module.helper');
$module =& JModuleHelper::getModule('mod_login');
$module = JModuleHelper::renderModule($module, array('style' => 'rounded', 'id' => 'section-box'));
echo $module;
}
示例6: display
function display($tpl = null)
{
jimport('joomla.html.pane');
$pane = JPane::getInstance('Tabs');
$this->assignRef('pane', $pane);
$model = $this->getModel();
$numOfK2Items = $model->countK2Items();
$this->assignRef('numOfK2Items', $numOfK2Items);
$numOfVmProducts = $model->countVmProducts();
$this->assignRef('numOfVmProducts', $numOfVmProducts);
$numOfK2martProducts = $model->countK2martProducts();
$this->assignRef('numOfK2martProducts', $numOfK2martProducts);
$module = JModuleHelper::getModule('mod_k2mart');
$params = new JRegistry();
$params->loadString($module->params);
$params->set('modLogo', "0");
$params->set('modCSSStyling', "1");
$module->params = $params->toString();
$charts = JModuleHelper::renderModule($module);
$this->assignRef('charts', $charts);
$document = JFactory::getDocument();
$document->addCustomTag('<!--[if lte IE 7]><link href="' . JURI::base() . 'components/com_k2mart/css/style_ie7.css" rel="stylesheet" type="text/css" /><![endif]-->');
$this->loadHelper('html');
K2martHTMLHelper::title('K2MART_DASHBOARD');
K2martHTMLHelper::toolbar();
K2martHTMLHelper::subMenu();
parent::display($tpl);
}
示例7: jdocIncludeModules
function jdocIncludeModules($position)
{
$modules = JModuleHelper::getModules($position);
foreach ($modules as $module) {
echo JModuleHelper::renderModule($module);
}
}
示例8: load
function load()
{
$timeVar = JRequest::getInt('time');
$time = time();
if ($time < $timeVar or $time > $timeVar + 3) {
exit;
}
$moduleId = (int) JRequest::getInt('id');
if (empty($moduleId)) {
echo 'OK! TEST VALID';
exit;
}
$db =& JFactory::getDBO();
$db->setQuery('SELECT * FROM #__modules WHERE id = ' . $moduleId . ' LIMIT 1');
$module = $db->loadObject();
if (empty($module)) {
exit;
}
$module->user = substr($module->module, 0, 4) == 'mod_' ? 0 : 1;
$module->name = $module->user ? $module->title : substr($module->module, 4);
$module->style = null;
$module->module = preg_replace('/[^A-Z0-9_\\.-]/i', '', $module->module);
$params = array();
echo JModuleHelper::renderModule($module, $params);
exit;
}
示例9: bc_loadBanner
function bc_loadBanner()
{
$pos = mosGetParam($_REQUEST, 'pos', '');
$style = mosGetParam($_REQUEST, 'st', 0);
$no_html = mosGetParam($_REQUEST, 'no_html', 0);
$format = mosGetParam($_REQUEST, 'format', null);
//raw
$tmpl = mosGetParam($_REQUEST, 'tmpl', null);
//component
$dynamic = mosGetParam($_REQUEST, 'dyn', 0);
if (!$pos) {
return;
}
if ($dynamic) {
//set no caching in browser, this is for dynamic reloading of banner
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
}
if ($format == "raw") {
//show RAW output, what are 1.5 parameters for render function torender raw output?
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" . "\n<html xmlns=\"http://www.w3.org/1999/xhtml\">" . "\n<head>" . "\n<title></title>" . "\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />" . "\n<meta name=\"robots\" content=\"noindex, nofollow\" />" . "\n</head>" . "\n<body>\n";
}
// Include the syndicate functions only once
jimport('joomla.application.module.helper');
$modules =& JModuleHelper::getModules($pos);
$total = count($modules);
for ($i = 0; $i < $total; $i++) {
JModuleHelper::renderModule($modules[$i]);
}
if ($format == "raw") {
echo "\n</body>\n</html>";
}
}
示例10: getInput
/**
* Method to get the field input markup.
*
* @return string The field input markup.
* @since 1.6
*/
public function getInput()
{
$app = JFactory::getApplication();
$app->input->set('hidemainmenu', false);
$menu = JModuleHelper::getModule('mod_menu');
$menu = JModuleHelper::renderModule($menu);
$menu = str_replace('<ul id="menu" class="nav ', '<ul id="menu" class="nav nav-pills ', $menu);
//$app->input->set('hidemainmenu', true) ;
$script = <<<SCRIPT
\t\t
\t\t<script type="text/javascript">
\t\t\twindow.addEvent('domready', function(){
\t\t\t\ta = \$\$('.controls > ul > li ul a') ;
\t\t\t\ta.addEvent('click' , function(e){
\t\t\t\t\te.stop();
\t\t\t\t\t\$('jform_link').set('value', e.target.get('href'));
\t\t\t\t\t\$('jform_link').highlight();
\t\t\t\t} );
\t\t\t});
\t\t</script>
\t\t
SCRIPT;
$app->input->set('hidemainmenu', true);
echo $script;
return $menu;
}
示例11: Joom_ShowMenu_HTML
function Joom_ShowMenu_HTML()
{
$database =& JFactory::getDBO();
$document =& JFactory::getDocument();
$config = Joom_GetConfig();
jimport('joomla.html.pane');
$document->addStyleDeclaration('
.joom_cpanel img {
padding:21px 0px !important;
}');
$database->setQuery("SELECT id\n FROM #__components\n WHERE link = 'option=" . _JOOM_OPTION . "' AND parent=''");
$id = $database->loadResult();
$database->setQuery("SELECT *\n FROM #__components\n WHERE parent='" . $id . "' ORDER BY id ASC");
$rows = $database->loadObjectList();
?>
<table border="0" cellpadding="10" style="margin-right:auto; margin-left:auto;" class="adminform">
<tbody>
<tr>
<td width="55%" valign="top">
<div id="cpanel" class="joom_cpanel">
<?php
foreach ($rows as $row) {
Joom_QuickIconButton($row->admin_menu_link, $row->admin_menu_img, $row->name);
}
?>
</div>
</td>
<td width="45%" valign="top">
<?php
$modules =& JModuleHelper::getModules('joom_cpanel');
// TODO: allowAllClose should default true in J!1.6, so remove the array when it does.
$pane =& JPane::getInstance('sliders', array('allowAllClose' => true));
echo $pane->startPane("content-pane");
if ($config->jg_checkupdate) {
Joom_ShowDatedExtensions($pane);
}
foreach ($modules as $module) {
echo $pane->startPanel($module->title, 'cpanel-panel-' . $module->name);
echo JModuleHelper::renderModule($module);
echo $pane->endPanel();
}
echo $pane->endPane();
if ($config->jg_checkupdate) {
if (!count(Joom_CheckUpdate())) {
?>
<div style=" weight:100%; text-align:center; color:#008000; font-weight:bold;">
<?php
echo JText::_('JGA_SYSTEM_UPTODATE');
?>
</div>
<?php
}
}
?>
</td>
</tr>
</tbody>
</table>
<?php
}
示例12: display
function display($dummy1 = false, $dummy2 = false)
{
$moduleId = JRequest::getInt('formid');
if (empty($moduleId)) {
return;
}
if (JRequest::getInt('interval') > 0) {
setcookie('acymailingSubscriptionState', true, time() + JRequest::getInt('interval'), '/');
}
$db = JFactory::getDBO();
$db->setQuery('SELECT * FROM #__modules WHERE id = ' . intval($moduleId) . ' AND `module` LIKE \'%acymailing%\' LIMIT 1');
$module = $db->loadObject();
if (empty($module)) {
echo 'No module found';
exit;
}
$module->user = substr($module->module, 0, 4) == 'mod_' ? 0 : 1;
$module->name = $module->user ? $module->title : substr($module->module, 4);
$module->style = null;
$module->module = preg_replace('/[^A-Z0-9_\\.-]/i', '', $module->module);
$params = array();
if (JRequest::getInt('autofocus', 0)) {
acymailing_loadMootools();
$js = "\n\t\t\t\twindow = addEvent('load', function(){\n\t\t\t\t\tthis.focus();\n\t\t\t\t\tvar moduleInputs = document.getElementsByTagName('input');\n\t\t\t\t\tif(moduleInputs){\n\t\t\t\t\t\tvar i = 0;\n\t\t\t\t\t\twhile(moduleInputs[i].disabled == true){\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(moduleInputs[i]) moduleInputs[i].focus();\n\t\t\t\t\t}\n\t\t\t\t});";
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
}
echo JModuleHelper::renderModule($module, $params);
}
示例13: parseXmenu
function parseXmenu($temp)
{
while (($ini = strpos($temp, "{xm ")) !== false) {
$fin = strpos($temp, "}", $ini);
$parms = substr($temp, $ini + 4, $fin - $ini - 4);
list($position, $width, $height) = explode(',', $parms);
if (!empty($position)) {
settype($width, 'integer');
settype($height, 'integer');
$width = $width == 0 ? '' : 'width:' . $width . 'px;';
$height = $height == 0 ? '' : 'height:' . $height . 'px;';
$modules = JModuleHelper::getModules($position);
$attribs = array('style' => 'xhtml');
$positionhtml = "<div class=\"xmenu_position {$position}\" style=\"{$width} {$height}\">";
foreach ($modules as $module) {
$positionhtml .= JModuleHelper::renderModule($module, $attribs);
}
$positionhtml .= "</div>";
} else {
$positionhtml = '';
}
$temp = substr_replace($temp, $positionhtml, $ini, $fin - $ini + 1);
}
// Do double lines
$temp = str_replace('{xm}', '<span class=\'xmenu\'>', $temp);
$temp = str_replace('{/xm}', '</span>', $temp);
return $temp;
}
示例14: getPropertyList
function getPropertyList()
{
$modProperties = JModuleHelper::getModule('danh_sach_BDS', 'BAN DO');
$attribs['style'] = 'raw';
$dataHTML = JModuleHelper::renderModule($modProperties, $attribs);
echo $dataHTML;
}
示例15: display
function display($tpl = null)
{
if ($tpl != 'message') {
$module = JModuleHelper::getModule('mod_userregister');
$html = JModuleHelper::renderModule($module);
$this->assignRef('moduleregister', $html);
}
parent::display($tpl);
}