} ?> <div id="menuOff"> <?php insertMenuItem($pageID, $propOff, 'home_off.png'); echo img('resources/images/page/lamane.png'); insertMenuItem($pageID, $propOff, 'works_off.png'); echo img('resources/images/page/lamane.png'); insertMenuItem($pageID, $propOff, 'about_off.png'); echo img('resources/images/page/lamane.png'); insertMenuItem($pageID, $propOff, 'contact_off.png'); echo img('resources/images/page/lamane.png'); insertMenuItem($pageID, $propOff, 'blog_off.png'); ?> </div> <div id="menuOn"> <?php insertMenuItem($pageID, $propOn, 'home_on.png', 'page/home'); echo img('resources/images/page/lamane.png'); insertMenuItem($pageID, $propOn, 'works_on.png', 'page/works'); echo img('resources/images/page/lamane.png'); insertMenuItem($pageID, $propOn, 'about_on.png', 'page/about'); echo img('resources/images/page/lamane.png'); insertMenuItem($pageID, $propOn, 'contact_on.png', 'page/contact'); echo img('resources/images/page/lamane.png'); insertMenuItem($pageID, $propOn, 'blog_on.png', 'page/blog'); ?> </div> </div> </div>
require_once dirname(__FILE__) . DS . 'helper.php'; if (!is_object($xml_template->params->required) || modAddToMenu::checkRequiredFields($xml_template->params->required, $vars)) { $template = $xml_template->params; } } } if (!$template) { return; } $lang =& JFactory::getLanguage(); $lang->load('mod_addtomenu', JPATH_ADMINISTRATOR); $lang->load('com_menus', JPATH_ADMINISTRATOR); $lang->load($comp_file, JPATH_ADMINISTRATOR); $insert = JRequest::getVar('insert'); if ($insert) { insertMenuItem($template); } else { $lang =& JFactory::getLanguage(); $lang->load($option, JPATH_ADMINISTRATOR); if (isset($template->urlparams->option) && $template->urlparams->option != $option) { $lang->load($template->urlparams->option, JPATH_ADMINISTRATOR); $lang->load($template->urlparams->option . '.menu', JPATH_ADMINISTRATOR); } renderHTML($template); } function insertMenuItem(&$template) { $db =& JFactory::getDBO(); $item =& JTable::getInstance('menu'); $item->name = JRequest::getVar('name', ''); $item->alias = JRequest::getVar('alias', '');
} $lang = JFactory::getLanguage(); if ($lang->getTag() != 'en-GB') { // Loads English language file as fallback (for undefined stuff in other language file) $lang->load('mod_addtomenu', JPATH_ADMINISTRATOR, 'en-GB'); $lang->load('com_menus', JPATH_ADMINISTRATOR, 'en-GB'); $lang->load($option, JPATH_ADMINISTRATOR, 'en-GB'); $lang->load($option . '.sys', JPATH_ADMINISTRATOR, 'en-GB'); } $lang->load('mod_addtomenu', JPATH_ADMINISTRATOR, null, 1); $lang->load('com_menus', JPATH_ADMINISTRATOR, null, 1); $lang->load($option, JPATH_ADMINISTRATOR, null, 1); $lang->load($option . '.sys', JPATH_ADMINISTRATOR, null, 1); $insert = JRequest::getVar('insert'); if ($insert) { insertMenuItem($template, $vars, $parameters); } else { renderHTML($template); } function insertMenuItem(&$template, &$vars, &$parameters) { $db = JFactory::getDBO(); $item = JTable::getInstance('menu'); $item->title = JRequest::getVar('name', ''); $item->alias = JRequest::getVar('alias', ''); if (!strlen($item->alias)) { $item->alias = $item->name; } $item->alias = filterAlias($item->alias); $item->published = JRequest::getVar('published', 0); $menuitem = JRequest::getVar('menuitem', 'mainmenu::0');