Example #1
0
 public function _getTag($tag)
 {
     static $cache = array();
     if (!isset($cache[$tag])) {
         $joomfish = $this->MijosefConfig->joomfish_trans_url ? ', id' : '';
         $clean_tag = Mijosef::get('utility')->cleanText($tag);
         $row = MijoDatabase::loadRow("SELECT id, title, alias, description{$joomfish} FROM #__mijosef_tags WHERE title = '{$clean_tag}'");
         $name = $this->params->get('tagid_inc', '1') != '1' ? $row[0] . ' ' : '';
         if (parent::urlPart($this->params->get('tag_part', 'global')) == 'title') {
             $name .= $row[1];
         } else {
             $name .= $row[2];
         }
         $cache[$tag]['name'] = $name;
         $cache[$tag]['meta_title'] = $row[1];
         if ($this->params->get('meta_desc_mijosef', '2') == '2') {
             $cache[$tag]['meta_desc'] = $row[3];
         }
     }
     $this->meta_title[] = $cache[$tag]['meta_title'];
     if (!empty($cache[$tag]['meta_desc'])) {
         $this->meta_desc = $cache[$tag]['meta_desc'];
     }
     return $cache[$tag]['name'];
 }
Example #2
0
 function getSefURL($id)
 {
     $url = "";
     if (is_numeric($id)) {
         $url = MijoDatabase::loadResult("SELECT url_sef FROM #__mijosef_sitemap WHERE id = {$id}");
     }
     return $url;
 }
Example #3
0
 protected function getInput()
 {
     // Construct the various argument calls that are supported
     $attribs = 'class="inputbox" multiple="multiple" size="15"';
     $filter = Mijosef::get('utility')->getSkippedComponents();
     $rows = MijoDatabase::loadResultArray("SELECT `element` FROM `#__extensions` WHERE `type` = 'component' AND `element` NOT IN ({$filter}) ORDER BY `element`");
     $lang = JFactory::getLanguage();
     $options = array();
     $options[] = array('option' => 'all', 'name' => JText::_('- All Components -'));
     foreach ($rows as $row) {
         $lang->load($row . '.sys', JPATH_ADMINISTRATOR);
         $options[] = array('option' => $row, 'name' => JText::_($row));
     }
     return JHTML::_('select.genericlist', $options, $this->name, $attribs, 'option', 'name', $this->value, $this->name);
 }
Example #4
0
 function editSave()
 {
     // Check token
     JRequest::checkToken() or jexit('Invalid Token');
     // Get post
     $post = JRequest::get('post');
     // Save record
     if (!parent::saveRecord($post, 'MijosefMovedUrls', $post['id'])) {
         return JError::raiseWarning(500, JText::_('COM_MIJOSEF_COMMON_RECORD_SAVED_NOT'));
     } else {
         $sefid = JRequest::getInt('sefid', 0);
         if (!empty($sefid)) {
             MijoDatabase::query("DELETE FROM #__mijosef_urls WHERE id = {$sefid}");
         }
         if ($post['modal'] == '1') {
             // Display message
             JFactory::getApplication()->enqueueMessage(JText::_('COM_MIJOSEF_COMMON_RECORD_SAVED'));
         } else {
             // Return
             parent::route(JText::_('COM_MIJOSEF_COMMON_RECORD_SAVED'));
         }
     }
 }
Example #5
0
 function getParams()
 {
     $params = MijoDatabase::loadObjectList("SELECT extension, params FROM #__mijosef_extensions", "extension");
     return $params;
 }
Example #6
0
 function plugin($document)
 {
     $mainframe =& JFactory::getApplication();
     // Meta
     $url_id = $mainframe->get('mijosef.url.id');
     $url_sef = $mainframe->get('mijosef.url.sef');
     $auto_desc = Mijosef::get('utility')->replaceSpecialChars($mainframe->get('mijosef.meta.autodesc'), true);
     $auto_key = Mijosef::get('utility')->replaceSpecialChars($mainframe->get('mijosef.meta.autokey'), true);
     $meta_title = Mijosef::get('utility')->replaceSpecialChars($mainframe->get('mijosef.meta.title'), true);
     $meta_desc = Mijosef::get('utility')->replaceSpecialChars($mainframe->get('mijosef.meta.desc'), true);
     $meta_key = Mijosef::get('utility')->replaceSpecialChars($mainframe->get('mijosef.meta.key'), true);
     $meta_lang = $mainframe->get('mijosef.meta.lang');
     $meta_robots = $mainframe->get('mijosef.meta.robots');
     $meta_google = $mainframe->get('mijosef.meta.google');
     $link_canonical = $mainframe->get('mijosef.link.canonical');
     $generator = $this->MijosefConfig->meta_generator;
     $abstract = $this->MijosefConfig->meta_abstract;
     $revisit = $this->MijosefConfig->meta_revisit;
     $direction = $this->MijosefConfig->meta_direction;
     $google_key = $this->MijosefConfig->meta_googlekey;
     $live_key = $this->MijosefConfig->meta_livekey;
     $yahoo_key = $this->MijosefConfig->meta_yahookey;
     $alexa_key = $this->MijosefConfig->meta_alexa;
     $name_1 = $this->MijosefConfig->meta_name_1;
     $name_2 = $this->MijosefConfig->meta_name_2;
     $name_3 = $this->MijosefConfig->meta_name_3;
     $con_1 = $this->MijosefConfig->meta_con_1;
     $con_2 = $this->MijosefConfig->meta_con_2;
     $con_3 = $this->MijosefConfig->meta_con_3;
     // Core tags
     if ($this->MijosefConfig->meta_core == 1) {
         // Get original title, desc and keys
         $org_title = $document->getTitle();
         $org_desc = $document->getDescription();
         $org_key = $document->getMetaData('keywords');
         // Meta that need to be updated
         $update_meta = array();
         // Title
         $title = self::_pluginTitle($url_id, $org_title, $meta_title);
         if (!empty($title)) {
             $document->setTitle($title);
             if (empty($meta_title) && $this->MijosefConfig->meta_title == '1') {
                 $update_meta['title'] = $title;
             }
             if ($this->MijosefConfig->meta_title_tag == 1) {
                 $title_t = str_replace('"', '', $title);
                 $document->setMetaData('title', $title_t);
             }
         }
         // Description
         $description = self::_pluginDescKey($url_id, $org_desc, $meta_desc, $auto_desc, 'desc');
         if (!empty($description)) {
             $description = str_replace('"', '', $description);
             $document->setDescription($description);
             if (empty($meta_desc) && ($this->MijosefConfig->meta_desc == '1' || $this->MijosefConfig->meta_desc == '3')) {
                 $update_meta['description'] = ltrim($description);
             }
         }
         // Keywords
         $keywords = self::_pluginDescKey($url_id, $org_key, $meta_key, $auto_key, 'key');
         if (!empty($keywords)) {
             $keywords = str_replace('"', '', $keywords);
             $document->setMetaData('keywords', $keywords);
             if (empty($meta_key) && ($this->MijosefConfig->meta_key == '1' || $this->MijosefConfig->meta_key == '3')) {
                 $update_meta['keywords'] = $keywords;
             }
         }
         // Update meta
         $uri = JFactory::getURI();
         if (!empty($update_meta) && !Mijosef::get('uri')->_isHomePage($uri)) {
             $meta_list = Mijosef::get('cache')->checkMetadata($url_sef);
             if (is_array($meta_list) && !empty($meta_list)) {
                 $metadata = "";
                 foreach ($update_meta as $field => $value) {
                     $val = Mijosef::get('utility')->cleanText($value);
                     $metadata .= "{$field} = '{$val}', ";
                 }
                 $metadata = rtrim($metadata, ', ');
                 MijoDatabase::query("UPDATE #__mijosef_metadata SET {$metadata} WHERE url_sef = '{$url_sef}'");
             }
         }
     }
     // Extra tags
     if (!empty($meta_robots)) {
         $document->setMetaData('robots', $meta_robots);
     }
     if (!empty($meta_lang)) {
         $document->setMetaData('language', $meta_lang);
     }
     if (!empty($meta_google)) {
         $document->setMetaData('googlebot', $meta_google);
     }
     if (!empty($link_canonical) && $document->getType() == 'html') {
         $document->addHeadLink($link_canonical, 'canonical');
     }
     if (!empty($generator)) {
         $document->setGenerator($generator);
     }
     if (!empty($abstract)) {
         $document->setMetaData('abstract', $abstract);
     }
     if (!empty($revisit)) {
         $document->setMetaData('revisit', $revisit);
     }
     if (!empty($direction)) {
         $document->setDirection($direction);
     }
     if (!empty($google_key)) {
         $document->setMetaData('google-site-verification', $google_key);
     }
     if (!empty($live_key)) {
         $document->setMetaData('msvalidate.01', $live_key);
     }
     if (!empty($yahoo_key)) {
         $document->setMetaData('y_key', $yahoo_key);
     }
     if (!empty($alexa_key)) {
         $document->setMetaData('alexaVerifyID', $alexa_key);
     }
     if (!empty($name_1)) {
         $document->setMetaData($name_1, $con_1);
     }
     if (!empty($name_2)) {
         $document->setMetaData($name_2, $con_2);
     }
     if (!empty($name_3)) {
         $document->setMetaData($name_3, $con_3);
     }
 }
Example #7
0
 function getCountMeta()
 {
     $count = array();
     $count['all'] = MijoDatabase::loadResult("SELECT COUNT(id) FROM #__mijosef_metadata WHERE title != '' AND description != '' AND keywords != ''");
     $count['title'] = MijoDatabase::loadResult("SELECT COUNT(id) FROM #__mijosef_metadata WHERE title != ''");
     $count['desc'] = MijoDatabase::loadResult("SELECT COUNT(id) FROM #__mijosef_metadata WHERE description != ''");
     $count['key'] = MijoDatabase::loadResult("SELECT COUNT(id) FROM #__mijosef_metadata WHERE keywords != ''");
     $count['total'] = array_sum($count);
     return $count;
 }
Example #8
0
 function getMenuTitle($Itemid, $start_level = 0, $length_level = 0)
 {
     if (empty($Itemid)) {
         return array();
     }
     static $menus = array();
     $id = $Itemid;
     if (!isset($menus[$id])) {
         $joomfish = $this->MijosefConfig->joomfish_trans_url ? ', id' : '';
         // Title or Alias
         $part = 'title';
         if ($this->MijosefConfig->menu_url_part == 'alias') {
             $part = 'alias';
         }
         $menus[$id] = array();
         while ($Itemid > 0) {
             $row = MijoDatabase::loadObject("SELECT {$part} AS name, parent_id{$joomfish} FROM #__menu WHERE id = '{$Itemid}' AND published > 0 AND id > 1");
             if (is_null($row)) {
                 break;
             }
             array_unshift($menus[$id], $row->name);
             $Itemid = $row->parent_id;
             if ($this->MijosefConfig->parent_menus == '0') {
                 break;
                 //  Only last one
             }
         }
     }
     if ($this->MijosefConfig->parent_menus == '1' && ($start_level != 0 || $length_level != 0) && !empty($menus[$id])) {
         if ($length_level != 0) {
             return array_slice($menus[$id], $start_level, $length_level);
         } else {
             return array_slice($menus[$id], $start_level);
         }
     }
     return $menus[$id];
 }
Example #9
0
 function getSefUrl()
 {
     static $sef;
     $id = JRequest::getVar('id');
     if (!isset($sef) && is_numeric($id)) {
         $sef = MijoDatabase::loadResult("SELECT url_sef FROM #__mijosef_urls WHERE id = {$id}");
     }
     return $sef;
 }
Example #10
0
 function getCategoryList($query)
 {
     if (self::_is16()) {
         $rows = MijoDatabase::loadObjectList("SELECT id, title AS name, parent_id AS parent FROM #__categories WHERE parent_id > 0 AND published = 1 AND extension = 'com_content' ORDER BY parent_id, lft");
     } else {
         $rows = MijoDatabase::loadObjectList("SELECT c.id, CONCAT_WS(' / ', s.title, c.title) AS name FROM #__categories AS c, #__sections AS s WHERE s.scope = 'content' AND c.section = s.id ORDER BY s.title, c.title");
     }
     return $rows;
 }
Example #11
0
 public static function getDBO()
 {
     if (!isset(self::$_dbo)) {
         self::$_dbo = JFactory::getDBO();
     }
 }
Example #12
0
 function getCategoryList($query)
 {
     if (self::_is16()) {
         $field = 'extension';
     } else {
         $field = 'section';
     }
     $rows = MijoDatabase::loadObjectList("SELECT id, title AS name FROM #__categories WHERE {$field} = 'com_banners' ORDER BY title");
     return $rows;
 }
Example #13
0
 function _buildViewWhere($prefix = "")
 {
     $where = array();
     // Search URL
     if ($this->search_url != '') {
         $src = parent::secureQuery($this->search_url, true);
         $where[] = "LOWER({$prefix}url_sef) LIKE {$src}";
     }
     // Search Title
     if ($this->search_title != '') {
         $src = parent::secureQuery($this->search_title, true);
         $where[] = "{$prefix}title LIKE {$src}";
     }
     // Title Filter
     if ($this->filter_title != -1) {
         if ($this->filter_title == 1) {
             $where[] = "{$prefix}title = ''";
         } elseif ($this->filter_title == 2) {
             $where[] = "{$prefix}title != ''";
         }
     }
     // Search Description
     if ($this->search_desc != '') {
         $src = parent::secureQuery($this->search_desc, true);
         $where[] = "{$prefix}description LIKE {$src}";
     }
     // Description Filter
     if ($this->filter_desc != -1) {
         if ($this->filter_desc == 1) {
             $where[] = "{$prefix}description = ''";
         } elseif ($this->filter_desc == 2) {
             $where[] = "{$prefix}description != ''";
         }
     }
     // Search Keywords
     if ($this->search_key != '') {
         $src = parent::secureQuery($this->search_key, true);
         $where[] = "{$prefix}keywords LIKE {$src}";
     }
     // Keywords Filter
     if ($this->filter_key != -1) {
         if ($this->filter_key == 1) {
             $where[] = "{$prefix}keywords = ''";
         } elseif ($this->filter_key == 2) {
             $where[] = "{$prefix}keywords != ''";
         }
     }
     // Published Filter
     if ($this->filter_published != -1) {
         $src = parent::secureQuery($this->filter_published);
         $where[] = "{$prefix}published = {$src}";
     }
     // Search id
     if ($this->search_id != '') {
         $src = parent::secureQuery($this->search_id);
         $where[] = "{$prefix}id = {$src}";
     }
     // Execute
     $where = count($where) ? " WHERE " . implode(" AND ", $where) : "";
     // Component Filter
     if ($this->filter_component != '-1') {
         $src = $this->_db->getEscaped($this->filter_component);
         $where = str_replace(' WHERE ', ' AND ', $where);
         $where = str_replace('AND LOWER(url_sef) LIKE', "AND LOWER(m.url_sef) LIKE", $where);
         // Get ids
         $ids = MijoDatabase::loadResultArray("SELECT m.id FROM #__mijosef_metadata AS m, #__mijosef_urls AS u WHERE m.url_sef = u.url_sef AND u.url_real LIKE '%option={$src}%' {$where}");
         $where = ' WHERE id = 0';
         if (count($ids) > 0) {
             $where = " WHERE {$prefix}id IN (" . implode(", ", $ids) . ")";
         }
     }
     // Duplicated title
     if ($this->type == 'dtitle') {
         // Get ids
         $this->_db->setQuery("SELECT id FROM #__mijosef_metadata AS t1 INNER JOIN (SELECT title FROM #__mijosef_metadata GROUP BY title HAVING COUNT(title) > 1) AS t2 ON t1.title = t2.title {$where}");
         $ids = $this->_db->loadResultArray();
         $where = " WHERE id = '-1'";
         if (count($ids) > 0) {
             $where = " WHERE {$prefix}id IN (" . implode(", ", $ids) . ")";
         }
     }
     // Duplicated description
     if ($this->type == 'ddesc') {
         // Get ids
         $this->_db->setQuery("SELECT id FROM #__mijosef_metadata AS t1 INNER JOIN (SELECT description FROM #__mijosef_metadata GROUP BY description HAVING COUNT(description) > 1) AS t2 ON t1.description = t2.description {$where}");
         $ids = $this->_db->loadResultArray();
         $where = " WHERE id = '-1'";
         if (count($ids) > 0) {
             ${$where} = " WHERE {$prefix}id IN (" . implode(", ", $ids) . ")";
         }
     }
     return $where;
 }
Example #14
0
 function getExtensions()
 {
     static $extensions;
     if (!isset($extensions)) {
         $extensions = MijoDatabase::loadObjectList("SELECT * FROM #__mijosef_extensions WHERE name != '' ORDER BY name");
     }
     return $extensions;
 }
Example #15
0
 function getLists()
 {
     JLoader::register('JHtmlSelect', JPATH_MIJOSEF_ADMIN . '/library/joomla/select.php');
     $lists = array();
     // Affected Area
     $areas = array();
     $areas[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_CONFIG_AREA_1'));
     $areas[] = JHTML::_('select.option', '2', JText::_('COM_MIJOSEF_CONFIG_AREA_2'));
     $areas[] = JHTML::_('select.option', '3', JText::_('COM_MIJOSEF_CONFIG_AREA_3'));
     /*
     //
     // Main
     //
     */
     $lists['mode'] = JHTML::_('select.booleanlist', 'mode', null, $this->MijosefConfig->mode);
     $lists['generate_sef'] = JHTML::_('select.booleanlist', 'generate_sef', null, $this->MijosefConfig->generate_sef);
     $lists['version_checker'] = JHTML::_('select.booleanlist', 'version_checker', null, $this->MijosefConfig->version_checker);
     $lists['jquery_mode'] = JHTML::_('select.booleanlist', 'jquery_mode', null, $this->MijosefConfig->jquery_mode);
     $lists['seo_nofollow'] = JHTML::_('select.booleanlist', 'seo_nofollow', null, $this->MijosefConfig->seo_nofollow);
     $lists['cache_instant'] = JHTML::_('select.booleanlist', 'cache_instant', null, $this->MijosefConfig->cache_instant);
     $lists['cache_versions'] = JHTML::_('select.booleanlist', 'cache_versions', null, $this->MijosefConfig->cache_versions);
     $lists['cache_extensions'] = JHTML::_('select.booleanlist', 'cache_extensions', null, $this->MijosefConfig->cache_extensions);
     $lists['cache_urls'] = JHTML::_('select.booleanlist', 'cache_urls', null, $this->MijosefConfig->cache_urls);
     $lists['cache_urls_moved'] = JHTML::_('select.booleanlist', 'cache_urls_moved', null, $this->MijosefConfig->cache_urls_moved);
     $lists['cache_metadata'] = JHTML::_('select.booleanlist', 'cache_metadata', null, $this->MijosefConfig->cache_metadata);
     $lists['cache_sitemap'] = JHTML::_('select.booleanlist', 'cache_sitemap', null, $this->MijosefConfig->cache_sitemap);
     $lists['cache_tags'] = JHTML::_('select.booleanlist', 'cache_tags', null, $this->MijosefConfig->cache_tags);
     $lists['cache_ilinks'] = JHTML::_('select.booleanlist', 'cache_ilinks', null, $this->MijosefConfig->cache_ilinks);
     // 404 Page
     $page404 = array();
     $page404[] = JHTML::_('select.option', 'home', JText::_('COM_MIJOSEF_CONFIG_MAIN_404_HOME'));
     $page404[] = JHTML::_('select.option', 'custom', JText::_('COM_MIJOSEF_CONFIG_MAIN_404_CUSTOM'));
     $page404[] = JHTML::_('select.option', 'joomla', JText::_('COM_MIJOSEF_CONFIG_MAIN_404_JOOMLA'));
     $lists['page404'] = JHTML::_('select.genericlist', $page404, 'page404', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->page404);
     // Custom 404 Page
     $row = MijoDatabase::loadObject("SELECT `id`, `introtext` FROM `#__content` WHERE `title` = '404'");
     $lists['custom404'] = isset($row->introtext) ? $row->introtext : JText::_('<h1>404: Not Found</h1><h4>Sorry, but the content you requested could not be found</h4>');
     /*
     //
     // URL
     //
     */
     $lists['url_lowercase'] = JHTML::_('select.booleanlist', 'url_lowercase', null, $this->MijosefConfig->url_lowercase);
     $lists['global_smart_itemid'] = JHTML::_('select.booleanlist', 'global_smart_itemid', null, $this->MijosefConfig->global_smart_itemid);
     $lists['ignore_multi_itemid'] = JHTML::_('select.booleanlist', 'ignore_multi_itemid', null, $this->MijosefConfig->ignore_multi_itemid);
     $lists['numeral_duplicated'] = JHTML::_('select.booleanlist', 'numeral_duplicated', null, $this->MijosefConfig->numeral_duplicated);
     $lists['record_duplicated'] = JHTML::_('select.booleanlist', 'record_duplicated', null, $this->MijosefConfig->record_duplicated);
     $lists['parent_menus'] = JHTML::_('select.booleanlist', 'parent_menus', null, $this->MijosefConfig->parent_menus);
     $lists['append_itemid'] = JHTML::_('select.booleanlist', 'append_itemid', null, $this->MijosefConfig->append_itemid);
     $lists['remove_trailing_slash'] = JHTML::_('select.booleanlist', 'remove_trailing_slash', null, $this->MijosefConfig->remove_trailing_slash);
     $lists['tolerant_to_trailing_slash'] = JHTML::_('select.booleanlist', 'tolerant_to_trailing_slash', null, $this->MijosefConfig->tolerant_to_trailing_slash);
     $lists['source_tracker'] = JHTML::_('select.booleanlist', 'source_tracker', null, $this->MijosefConfig->source_tracker);
     $lists['insert_active_itemid'] = JHTML::_('select.booleanlist', 'insert_active_itemid', null, $this->MijosefConfig->insert_active_itemid);
     $lists['remove_sid'] = JHTML::_('select.booleanlist', 'remove_sid', null, $this->MijosefConfig->remove_sid);
     $lists['set_query_string'] = JHTML::_('select.booleanlist', 'set_query_string', null, $this->MijosefConfig->set_query_string);
     $lists['append_non_sef'] = JHTML::_('select.booleanlist', 'append_non_sef', null, $this->MijosefConfig->append_non_sef);
     $lists['prevent_dup_error'] = JHTML::_('select.booleanlist', 'prevent_dup_error', null, $this->MijosefConfig->prevent_dup_error);
     $lists['show_db_errors'] = JHTML::_('select.booleanlist', 'show_db_errors', null, $this->MijosefConfig->show_db_errors);
     $lists['check_url_by_id'] = JHTML::_('select.booleanlist', 'check_url_by_id', null, $this->MijosefConfig->check_url_by_id);
     $lists['db_404_errors'] = JHTML::_('select.booleanlist', 'db_404_errors', null, $this->MijosefConfig->db_404_errors);
     $lists['log_404_errors'] = JHTML::_('select.booleanlist', 'log_404_errors', null, $this->MijosefConfig->log_404_errors);
     $lists['sent_headers_error'] = JHTML::_('select.booleanlist', 'sent_headers_error', null, $this->MijosefConfig->sent_headers_error);
     $lists['utf8_url'] = JHTML::_('select.booleanlist', 'utf8_url', null, $this->MijosefConfig->utf8_url);
     $lists['redirect_to_sef'] = JHTML::_('select.booleanlist', 'redirect_to_sef', null, $this->MijosefConfig->redirect_to_sef);
     $lists['redirect_to_sef_gen'] = JHTML::_('select.booleanlist', 'redirect_to_sef_gen', null, $this->MijosefConfig->redirect_to_sef_gen);
     $lists['jsef_to_mijosef'] = JHTML::_('select.booleanlist', 'jsef_to_mijosef', null, $this->MijosefConfig->jsef_to_mijosef);
     $lists['force_ssl'] = JHTML::_('select.booleanlist', 'force_ssl', null, $this->MijosefConfig->force_ssl);
     $lists['url_append_limit'] = JHTML::_('select.booleanlist', 'url_append_limit', null, $this->MijosefConfig->url_append_limit);
     $lists['purge_ext_urls'] = JHTML::_('select.booleanlist', 'purge_ext_urls', null, $this->MijosefConfig->purge_ext_urls);
     $lists['delete_other_sef'] = JHTML::_('select.booleanlist', 'delete_other_sef', null, $this->MijosefConfig->delete_other_sef);
     // Title-Alias
     $url_part = array();
     $url_part[] = JHTML::_('select.option', 'title', JText::_('COM_MIJOSEF_COMMON_TITLE_FIELD'));
     $url_part[] = JHTML::_('select.option', 'alias', JText::_('COM_MIJOSEF_COMMON_ALIAS_FIELD'));
     // Extensions' title-alias field
     $lists['title_alias'] = JHTML::_('select.genericlist', $url_part, 'title_alias', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->title_alias);
     // Menu URL part
     $lists['menu_url_part'] = JHTML::_('select.genericlist', $url_part, 'menu_url_part', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->menu_url_part);
     // Base href value
     $base_href = array();
     $base_href[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_CONFIG_URL_BASEHREF_ORG'));
     $base_href[] = JHTML::_('select.option', '2', JText::_('COM_MIJOSEF_CONFIG_URL_BASEHREF_URL'));
     $base_href[] = JHTML::_('select.option', '3', JText::_('COM_MIJOSEF_CONFIG_URL_BASEHREF_HOME'));
     $base_href[] = JHTML::_('select.option', '4', JText::_('COM_MIJOSEF_CONFIG_URL_BASEHREF_DISABLE'));
     $lists['base_href'] = JHTML::_('select.genericlist', $base_href, 'base_href', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->base_href);
     // JoomFish
     $lists['multilang'] = JHTML::_('select.booleanlist', 'multilang', null, $this->MijosefConfig->multilang);
     $lists['joomfish_main_lang_del'] = JHTML::_('select.booleanlist', 'joomfish_main_lang_del', null, $this->MijosefConfig->joomfish_main_lang_del);
     $lists['joomfish_lang_code'] = JHTML::_('select.booleanlist', 'joomfish_lang_code', null, $this->MijosefConfig->joomfish_lang_code);
     $lists['joomfish_trans_url'] = JHTML::_('select.booleanlist', 'joomfish_trans_url', null, $this->MijosefConfig->joomfish_trans_url);
     $lists['joomfish_cookie'] = JHTML::_('select.booleanlist', 'joomfish_cookie', null, $this->MijosefConfig->joomfish_cookie);
     $lists['joomfish_browser'] = JHTML::_('select.booleanlist', 'joomfish_browser', null, $this->MijosefConfig->joomfish_browser);
     $lang_list = array();
     $lang_list[] = JHTML::_('select.option', '0', JText::_('COM_MIJOSEF_CONFIG_URL_JF_MAINLANG_NONE'));
     $lang_list = array_merge($lang_list, Mijosef::get('utility')->getLanguages());
     $lists['joomfish_main_lang'] = JHTML::_('select.genericlist', $lang_list, 'joomfish_main_lang', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->joomfish_main_lang);
     // www redirect
     $www = array();
     $www[] = JHTML::_('select.option', '0', JText::_('COM_MIJOSEF_CONFIG_URL_WWW_NOACTION'));
     $www[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_CONFIG_URL_WWW_WITH'));
     $www[] = JHTML::_('select.option', '2', JText::_('COM_MIJOSEF_CONFIG_URL_WWW_WHITHOUT'));
     $lists['redirect_to_www'] = JHTML::_('select.genericlist', $www, 'redirect_to_www', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->redirect_to_www);
     // Force SSL
     $force_ssl = JHTML::_('menu.linkoptions', true, true);
     $lists['force_ssl'] = JHTML::_('select.genericlist', $force_ssl, 'force_ssl[]', 'class="inputbox" size="10" multiple="multiple"', 'value', 'text', $this->MijosefConfig->force_ssl);
     /*
     //
     // Meta Tags
     //
     */
     $lists['meta_core'] = JHTML::_('select.booleanlist', 'meta_core', null, $this->MijosefConfig->meta_core);
     $lists['meta_title'] = JHTML::_('select.booleanlist', 'meta_title', null, $this->MijosefConfig->meta_title);
     $lists['meta_title_tag'] = JHTML::_('select.booleanlist', 'meta_title_tag', null, $this->MijosefConfig->meta_title_tag);
     $lists['meta_generator_rem'] = JHTML::_('select.booleanlist', 'meta_generator_rem', null, $this->MijosefConfig->meta_generator_rem);
     // Meta Tags list
     $meta = array();
     $meta[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_CONFIG_META_TDK_ALWAYS'));
     $meta[] = JHTML::_('select.option', '2', JText::_('COM_MIJOSEF_CONFIG_META_TDK_NEVER'));
     $meta[] = JHTML::_('select.option', '3', JText::_('COM_MIJOSEF_CONFIG_META_TDK_EMPTY'));
     // Meta Description
     $lists['meta_desc'] = JHTML::_('select.genericlist', $meta, 'meta_desc', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->meta_desc);
     // Meta Keywords
     $lists['meta_key'] = JHTML::_('select.genericlist', $meta, 'meta_key', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->meta_key);
     // Use sitename
     $sitename = array();
     $sitename[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_CONFIG_META_T_USE_SITENAME_1'));
     $sitename[] = JHTML::_('select.option', '2', JText::_('COM_MIJOSEF_CONFIG_META_T_USE_SITENAME_2'));
     $sitename[] = JHTML::_('select.option', '3', JText::_('COM_MIJOSEF_CONFIG_META_T_USE_SITENAME_3'));
     $lists['meta_t_usesitename'] = JHTML::_('select.genericlist', $sitename, 'meta_t_usesitename', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->meta_t_usesitename);
     /*
     //
     // Sitemap
     //
     */
     $lists['sm_ping'] = JHTML::_('select.booleanlist', 'sm_ping', null, $this->MijosefConfig->sm_ping);
     $lists['sm_xml_date'] = JHTML::_('select.booleanlist', 'sm_xml_date', null, $this->MijosefConfig->sm_xml_date);
     $lists['sm_xml_freq'] = JHTML::_('select.booleanlist', 'sm_xml_freq', null, $this->MijosefConfig->sm_xml_freq);
     $lists['sm_xml_prior'] = JHTML::_('select.booleanlist', 'sm_xml_prior', null, $this->MijosefConfig->sm_xml_prior);
     $lists['sm_dot_tree'] = JHTML::_('select.booleanlist', 'sm_dot_tree', null, $this->MijosefConfig->sm_dot_tree);
     $lists['sm_freq'] = JHTML::_('select.genericlist', Mijosef::get('sitemap')->getFrequencyList(), 'sm_freq', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->sm_freq);
     $lists['sm_priority'] = JHTML::_('select.genericlist', Mijosef::get('sitemap')->getPriorityList(), 'sm_priority', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->sm_priority);
     $lists['sm_auto_mode'] = JHTML::_('select.booleanlist', 'sm_auto_mode', null, $this->MijosefConfig->sm_auto_mode);
     $lists['sm_auto_components'] = JHTML::_('select.genericlist', Mijosef::get('utility')->getComponents(), 'sm_auto_components[]', 'class="inputbox" size="10" multiple="multiple"', 'value', 'text', $this->MijosefConfig->sm_auto_components);
     $lists['sm_auto_enable_cats'] = JHTML::_('select.booleanlist', 'sm_auto_enable_cats', null, $this->MijosefConfig->sm_auto_enable_cats);
     $lists['sm_auto_cron_mode'] = JHTML::_('select.booleanlist', 'sm_auto_cron_mode', null, $this->MijosefConfig->sm_auto_cron_mode);
     $lists['sm_auto_xml'] = JHTML::_('select.booleanlist', 'sm_auto_xml', null, $this->MijosefConfig->sm_auto_xml);
     $lists['sm_auto_ping_c'] = JHTML::_('select.booleanlist', 'sm_auto_ping_c', null, $this->MijosefConfig->sm_auto_ping_c);
     $lists['sm_auto_ping_s'] = JHTML::_('select.booleanlist', 'sm_auto_ping_s', null, $this->MijosefConfig->sm_auto_ping_s);
     // Ping Type
     $ping_type = array();
     $ping_type[] = JHTML::_('select.option', 'link', JText::_('COM_MIJOSEF_CONFIG_SITEMAP_XML_URL'));
     $ping_type[] = JHTML::_('select.option', 'file', JText::_('COM_MIJOSEF_CONFIG_SITEMAP_FILE'));
     $lists['sm_ping_type'] = JHTML::_('select.genericlist', $ping_type, 'sm_ping_type', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->sm_ping_type);
     // Cron Frequency
     $cron_freq = array();
     $cron_freq[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_COMMON_SEF') . ' ' . JText::_('COM_MIJOSEF_COMMON_URL'));
     $cron_freq[] = JHTML::_('select.option', '4', '4 ' . JText::_('COM_MIJOSEF_CONFIG_SITEMAP_AUTO_CRON_FREQ_HOURS'));
     $cron_freq[] = JHTML::_('select.option', '8', '8 ' . JText::_('COM_MIJOSEF_CONFIG_SITEMAP_AUTO_CRON_FREQ_HOURS'));
     $cron_freq[] = JHTML::_('select.option', '12', '12 ' . JText::_('COM_MIJOSEF_CONFIG_SITEMAP_AUTO_CRON_FREQ_HOURS'));
     $cron_freq[] = JHTML::_('select.option', '24', '1 ' . JText::_('COM_MIJOSEF_CONFIG_SITEMAP_AUTO_CRON_FREQ_DAYS'));
     $cron_freq[] = JHTML::_('select.option', '48', '2 ' . JText::_('COM_MIJOSEF_CONFIG_SITEMAP_AUTO_CRON_FREQ_DAYS'));
     $cron_freq[] = JHTML::_('select.option', '168', '1 ' . JText::_('COM_MIJOSEF_CONFIG_SITEMAP_AUTO_CRON_FREQ_WEEKS'));
     $cron_freq[] = JHTML::_('select.option', '720', '1 ' . JText::_('COM_MIJOSEF_CONFIG_SITEMAP_AUTO_CRON_FREQ_MONTHS'));
     $lists['sm_auto_cron_freq'] = JHTML::_('select.genericlist', $cron_freq, 'sm_auto_cron_freq', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->sm_auto_cron_freq);
     /*
     //
     // Tags
     //
     */
     $lists['tags_mode'] = JHTML::_('select.booleanlist', 'tags_mode', null, $this->MijosefConfig->tags_mode);
     $lists['tags_area'] = JHTML::_('select.genericlist', $areas, 'tags_area', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->tags_area);
     $lists['tags_components'] = JHTML::_('select.genericlist', Mijosef::get('utility')->getComponents(), 'tags_components[]', 'class="inputbox" size="10" multiple="multiple"', 'value', 'text', $this->MijosefConfig->tags_components);
     $lists['tags_enable_cats'] = JHTML::_('select.booleanlist', 'tags_enable_cats', null, $this->MijosefConfig->tags_enable_cats);
     $lists['tags_in_cats'] = JHTML::_('select.booleanlist', 'tags_in_cats', null, $this->MijosefConfig->tags_in_cats);
     $lists['tags_show_tag_desc'] = JHTML::_('select.booleanlist', 'tags_show_tag_desc', null, $this->MijosefConfig->tags_show_tag_desc);
     $lists['tags_show_prefix'] = JHTML::_('select.booleanlist', 'tags_show_prefix', null, $this->MijosefConfig->tags_show_prefix);
     $lists['tags_show_item_desc'] = JHTML::_('select.booleanlist', 'tags_show_item_desc', null, $this->MijosefConfig->tags_show_item_desc);
     $lists['tags_exp_item_desc'] = JHTML::_('select.booleanlist', 'tags_exp_item_desc', null, $this->MijosefConfig->tags_exp_item_desc);
     $lists['tags_published'] = JHTML::_('select.booleanlist', 'tags_published', null, $this->MijosefConfig->tags_published);
     $lists['tags_auto_mode'] = JHTML::_('select.booleanlist', 'tags_auto_mode', null, $this->MijosefConfig->tags_auto_mode);
     $lists['tags_auto_components'] = JHTML::_('select.genericlist', Mijosef::get('utility')->getComponents(), 'tags_auto_components[]', 'class="inputbox" size="10" multiple="multiple"', 'value', 'text', $this->MijosefConfig->tags_auto_components);
     // Order
     $order = array();
     $order[] = JHTML::_('select.option', 'ordering', JText::_('COM_MIJOSEF_CONFIG_TAGS_ORDER_1'));
     $order[] = JHTML::_('select.option', 'ordering DESC', JText::_('COM_MIJOSEF_CONFIG_TAGS_ORDER_2'));
     $order[] = JHTML::_('select.option', 'title', JText::_('COM_MIJOSEF_CONFIG_TAGS_ORDER_3'));
     $order[] = JHTML::_('select.option', 'title DESC', JText::_('COM_MIJOSEF_CONFIG_TAGS_ORDER_4'));
     $order[] = JHTML::_('select.option', 'hits', JText::_('COM_MIJOSEF_CONFIG_TAGS_ORDER_5'));
     $order[] = JHTML::_('select.option', 'hits DESC', JText::_('COM_MIJOSEF_CONFIG_TAGS_ORDER_6'));
     $lists['tags_order'] = JHTML::_('select.genericlist', $order, 'tags_order', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->tags_order);
     // Position
     $pos = array();
     $pos[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_CONFIG_POSITION_1'));
     $pos[] = JHTML::_('select.option', '2', JText::_('COM_MIJOSEF_CONFIG_POSITION_2'));
     $lists['tags_position'] = JHTML::_('select.genericlist', $pos, 'tags_position', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->tags_position);
     /*
     //
     // Internal Links
     //
     */
     $lists['ilinks_mode'] = JHTML::_('select.booleanlist', 'ilinks_mode', null, $this->MijosefConfig->ilinks_mode);
     $lists['ilinks_area'] = JHTML::_('select.genericlist', $areas, 'ilinks_area', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->ilinks_area);
     $lists['ilinks_components'] = JHTML::_('select.genericlist', Mijosef::get('utility')->getComponents(), 'ilinks_components[]', 'class="inputbox" size="10" multiple="multiple"', 'value', 'text', $this->MijosefConfig->ilinks_components);
     $lists['ilinks_enable_cats'] = JHTML::_('select.booleanlist', 'ilinks_enable_cats', null, $this->MijosefConfig->ilinks_enable_cats);
     $lists['ilinks_in_cats'] = JHTML::_('select.booleanlist', 'ilinks_in_cats', null, $this->MijosefConfig->ilinks_in_cats);
     $lists['ilinks_case'] = JHTML::_('select.booleanlist', 'ilinks_case', null, $this->MijosefConfig->ilinks_case);
     $lists['ilinks_published'] = JHTML::_('select.booleanlist', 'ilinks_published', null, $this->MijosefConfig->ilinks_published);
     $lists['ilinks_nofollow'] = JHTML::_('select.booleanlist', 'ilinks_nofollow', null, $this->MijosefConfig->ilinks_nofollow);
     $lists['ilinks_blank'] = JHTML::_('select.booleanlist', 'ilinks_blank', null, $this->MijosefConfig->ilinks_blank);
     /*
     //
     // Social Bookmarks
     //
     */
     $lists['bookmarks_mode'] = JHTML::_('select.booleanlist', 'bookmarks_mode', null, $this->MijosefConfig->bookmarks_mode);
     $lists['bookmarks_area'] = JHTML::_('select.genericlist', $areas, 'bookmarks_area', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->bookmarks_area);
     $lists['bookmarks_components'] = JHTML::_('select.genericlist', Mijosef::get('utility')->getComponents(), 'bookmarks_components[]', 'class="inputbox" size="10" multiple="multiple"', 'value', 'text', $this->MijosefConfig->bookmarks_components);
     $lists['bookmarks_enable_cats'] = JHTML::_('select.booleanlist', 'bookmarks_enable_cats', null, $this->MijosefConfig->bookmarks_enable_cats);
     $lists['bookmarks_in_cats'] = JHTML::_('select.booleanlist', 'bookmarks_in_cats', null, $this->MijosefConfig->bookmarks_in_cats);
     $lists['bookmarks_published'] = JHTML::_('select.booleanlist', 'bookmarks_published', null, $this->MijosefConfig->bookmarks_published);
     // Icons
     $icons = array();
     $icons[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_CONFIG_POSITION_1'));
     $icons[] = JHTML::_('select.option', '2', JText::_('COM_MIJOSEF_CONFIG_POSITION_2'));
     $icons[] = JHTML::_('select.option', '3', JText::_('COM_MIJOSEF_CONFIG_POSITION_3'));
     $lists['bookmarks_icons_pos'] = JHTML::_('select.genericlist', $icons, 'bookmarks_icons_pos', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->bookmarks_icons_pos);
     // Type Filter
     $type_list[] = JHTML::_('select.option', 'icon', JText::_('COM_MIJOSEF_BOOKMARKS_TYPE_1'));
     $type_list[] = JHTML::_('select.option', 'iconset', JText::_('COM_MIJOSEF_BOOKMARKS_TYPE_2'));
     $type_list[] = JHTML::_('select.option', 'badge', JText::_('COM_MIJOSEF_BOOKMARKS_TYPE_3'));
     $lists['bookmarks_type'] = JHTML::_('select.genericlist', $type_list, 'bookmarks_type', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->bookmarks_type);
     /*
     //
     // User Interface
     //
     */
     $lists['ui_sef_language'] = JHTML::_('select.booleanlist', 'ui_sef_language', null, $this->MijosefConfig->ui_sef_language);
     $lists['ui_sef_published'] = JHTML::_('select.booleanlist', 'ui_sef_published', null, $this->MijosefConfig->ui_sef_published);
     $lists['ui_sef_used'] = JHTML::_('select.booleanlist', 'ui_sef_used', null, $this->MijosefConfig->ui_sef_used);
     $lists['ui_sef_locked'] = JHTML::_('select.booleanlist', 'ui_sef_locked', null, $this->MijosefConfig->ui_sef_locked);
     $lists['ui_sef_blocked'] = JHTML::_('select.booleanlist', 'ui_sef_blocked', null, $this->MijosefConfig->ui_sef_blocked);
     $lists['ui_sef_cached'] = JHTML::_('select.booleanlist', 'ui_sef_cached', null, $this->MijosefConfig->ui_sef_cached);
     $lists['ui_sef_date'] = JHTML::_('select.booleanlist', 'ui_sef_date', null, $this->MijosefConfig->ui_sef_date);
     $lists['ui_sef_hits'] = JHTML::_('select.booleanlist', 'ui_sef_hits', null, $this->MijosefConfig->ui_sef_hits);
     $lists['ui_sef_id'] = JHTML::_('select.booleanlist', 'ui_sef_id', null, $this->MijosefConfig->ui_sef_id);
     $lists['ui_moved_published'] = JHTML::_('select.booleanlist', 'ui_moved_published', null, $this->MijosefConfig->ui_moved_published);
     $lists['ui_moved_hits'] = JHTML::_('select.booleanlist', 'ui_moved_hits', null, $this->MijosefConfig->ui_moved_hits);
     $lists['ui_moved_clicked'] = JHTML::_('select.booleanlist', 'ui_moved_clicked', null, $this->MijosefConfig->ui_moved_clicked);
     $lists['ui_moved_cached'] = JHTML::_('select.booleanlist', 'ui_moved_cached', null, $this->MijosefConfig->ui_moved_cached);
     $lists['ui_moved_id'] = JHTML::_('select.booleanlist', 'ui_moved_id', null, $this->MijosefConfig->ui_moved_id);
     $lists['ui_metadata_keys'] = JHTML::_('select.booleanlist', 'ui_metadata_keys', null, $this->MijosefConfig->ui_metadata_keys);
     $lists['ui_metadata_published'] = JHTML::_('select.booleanlist', 'ui_metadata_published', null, $this->MijosefConfig->ui_metadata_published);
     $lists['ui_metadata_cached'] = JHTML::_('select.booleanlist', 'ui_metadata_cached', null, $this->MijosefConfig->ui_metadata_cached);
     $lists['ui_metadata_id'] = JHTML::_('select.booleanlist', 'ui_metadata_id', null, $this->MijosefConfig->ui_metadata_id);
     $lists['ui_sitemap_title'] = JHTML::_('select.booleanlist', 'ui_sitemap_title', null, $this->MijosefConfig->ui_sitemap_title);
     $lists['ui_sitemap_published'] = JHTML::_('select.booleanlist', 'ui_sitemap_published', null, $this->MijosefConfig->ui_sitemap_published);
     $lists['ui_sitemap_id'] = JHTML::_('select.booleanlist', 'ui_sitemap_id', null, $this->MijosefConfig->ui_sitemap_id);
     $lists['ui_sitemap_parent'] = JHTML::_('select.booleanlist', 'ui_sitemap_parent', null, $this->MijosefConfig->ui_sitemap_parent);
     $lists['ui_sitemap_order'] = JHTML::_('select.booleanlist', 'ui_sitemap_order', null, $this->MijosefConfig->ui_sitemap_order);
     $lists['ui_sitemap_date'] = JHTML::_('select.booleanlist', 'ui_sitemap_date', null, $this->MijosefConfig->ui_sitemap_date);
     $lists['ui_sitemap_frequency'] = JHTML::_('select.booleanlist', 'ui_sitemap_frequency', null, $this->MijosefConfig->ui_sitemap_frequency);
     $lists['ui_sitemap_priority'] = JHTML::_('select.booleanlist', 'ui_sitemap_priority', null, $this->MijosefConfig->ui_sitemap_priority);
     $lists['ui_sitemap_cached'] = JHTML::_('select.booleanlist', 'ui_sitemap_cached', null, $this->MijosefConfig->ui_sitemap_cached);
     $lists['ui_tags_published'] = JHTML::_('select.booleanlist', 'ui_tags_published', null, $this->MijosefConfig->ui_tags_published);
     $lists['ui_tags_ordering'] = JHTML::_('select.booleanlist', 'ui_tags_ordering', null, $this->MijosefConfig->ui_tags_ordering);
     $lists['ui_tags_cached'] = JHTML::_('select.booleanlist', 'ui_tags_cached', null, $this->MijosefConfig->ui_tags_cached);
     $lists['ui_tags_hits'] = JHTML::_('select.booleanlist', 'ui_tags_hits', null, $this->MijosefConfig->ui_tags_hits);
     $lists['ui_tags_id'] = JHTML::_('select.booleanlist', 'ui_tags_id', null, $this->MijosefConfig->ui_tags_id);
     $lists['ui_ilinks_published'] = JHTML::_('select.booleanlist', 'ui_ilinks_published', null, $this->MijosefConfig->ui_ilinks_published);
     $lists['ui_ilinks_nofollow'] = JHTML::_('select.booleanlist', 'ui_ilinks_nofollow', null, $this->MijosefConfig->ui_ilinks_nofollow);
     $lists['ui_ilinks_blank'] = JHTML::_('select.booleanlist', 'ui_ilinks_blank', null, $this->MijosefConfig->ui_ilinks_blank);
     $lists['ui_ilinks_limit'] = JHTML::_('select.booleanlist', 'ui_ilinks_limit', null, $this->MijosefConfig->ui_ilinks_limit);
     $lists['ui_ilinks_cached'] = JHTML::_('select.booleanlist', 'ui_ilinks_cached', null, $this->MijosefConfig->ui_ilinks_cached);
     $lists['ui_ilinks_id'] = JHTML::_('select.booleanlist', 'ui_ilinks_id', null, $this->MijosefConfig->ui_ilinks_id);
     $lists['ui_bookmarks_published'] = JHTML::_('select.booleanlist', 'ui_bookmarks_published', null, $this->MijosefConfig->ui_bookmarks_published);
     $lists['ui_bookmarks_id'] = JHTML::_('select.booleanlist', 'ui_bookmarks_id', null, $this->MijosefConfig->ui_bookmarks_id);
     // Control Panel Layout
     $ui_cpanel = array();
     $ui_cpanel[] = JHTML::_('select.option', '1', JText::_('COM_MIJOSEF_CONFIG_UI_CP_1'));
     $ui_cpanel[] = JHTML::_('select.option', '2', JText::_('COM_MIJOSEF_CONFIG_UI_CP_2'));
     $lists['ui_cpanel'] = JHTML::_('select.genericlist', $ui_cpanel, 'ui_cpanel', 'class="inputbox" size="1"', 'value', 'text', $this->MijosefConfig->ui_cpanel);
     return $lists;
 }
Example #16
0
 function onContentAfterSave($context, &$article, $isNew)
 {
     if ($isNew) {
         return true;
     }
     // Check we are manipulating a valid form.
     if (!in_array($context, array('com_content.article'))) {
         return true;
     }
     if (!self::_systemCheckup()) {
         return true;
     }
     $id = JRequest::getInt('mijosef_id');
     $url_sef = JRequest::getString('mijosef_url_sef');
     $title = Mijosef::get('utility')->replaceSpecialChars(JRequest::getString('mijosef_title'));
     $description = Mijosef::get('utility')->replaceSpecialChars(JRequest::getString('mijosef_desc'));
     $keywords = Mijosef::get('utility')->replaceSpecialChars(JRequest::getString('mijosef_key'));
     $lang = JRequest::getString('mijosef_lang');
     $robots = JRequest::getString('mijosef_robots');
     $googlebot = JRequest::getString('mijosef_googlebot');
     if ($id == 0) {
         MijoDatabase::query("INSERT IGNORE INTO #__mijosef_metadata (url_sef, title, description, keywords, lang, robots, googlebot) VALUES('{$url_sef}', '{$title}', '{$description}', '{$keywords}', '{$lang}', '{$robots}', '{$googlebot}')");
     } else {
         MijoDatabase::query("UPDATE #__mijosef_metadata SET title = '{$title}', description = '{$description}', keywords = '{$keywords}', lang = '{$lang}', robots = '{$robots}', googlebot = '{$googlebot}' WHERE id = {$id}");
     }
 }
Example #17
0
 function _newVars($old_uri, $sef_url, $query, $lang = null)
 {
     $mainframe = JFactory::getApplication();
     $vars = array();
     // A quick fix for not loading translated menus
     if (!empty($lang) && strpos($sef_url, $lang . '/', 0) !== 0) {
         $sef_url = $lang . '/' . $sef_url;
     }
     $row = Mijosef::get('cache')->checkURL($sef_url, true);
     if (is_object($row) && Mijosef::get('utility')->getParam($row->params, 'published') == '1') {
         // Use the already created URL
         $url_real = $row->url_real;
         // Update hits
         MijoDatabase::query("UPDATE #__mijosef_urls SET hits = (hits+1) WHERE id = '{$row->id}'");
         // Set query string
         $url_real = str_replace('&amp;', '&', $url_real);
         $QUERY_STRING = str_replace('index.php?', '', $url_real);
         parse_str($QUERY_STRING, $vars);
         // Set mainframe vars
         $mainframe->set('mijosef.url.id', $row->id);
         $mainframe->set('mijosef.url.sef', $row->url_sef);
         $mainframe->set('mijosef.url.real', $row->url_real);
         $mainframe->set('mijosef.url.params', $row->params);
         $meta = Mijosef::get('cache')->checkMetadata($row->url_sef);
         if (is_object($meta)) {
             if (!empty($meta->title)) {
                 $mainframe->set('mijosef.meta.title', $meta->title);
             }
             if (!empty($meta->description)) {
                 $mainframe->set('mijosef.meta.desc', $meta->description);
             }
             if (!empty($meta->keywords)) {
                 $mainframe->set('mijosef.meta.key', $meta->keywords);
             }
             if (!empty($meta->lang)) {
                 $mainframe->set('mijosef.meta.lang', $meta->lang);
             }
             if (!empty($meta->robots)) {
                 $mainframe->set('mijosef.meta.robots', $meta->robots);
             }
             if (!empty($meta->google)) {
                 $mainframe->set('mijosef.meta.google', $meta->google);
             }
             if (!empty($meta->canonical)) {
                 $mainframe->set('mijosef.link.canonical', $meta->canonical);
             }
         }
     } else {
         // Moved URL
         $m_url = $sef_url;
         if (empty($query)) {
             $row = Mijosef::get('cache')->checkMovedURL($sef_url);
         } else {
             $m_url .= '?' . $query;
             $found_with_query = true;
             $row = Mijosef::get('cache')->checkMovedURL($m_url);
             if (!is_object($row)) {
                 $found_with_query = false;
                 $row = Mijosef::get('cache')->checkMovedURL($sef_url);
             }
         }
         if (is_object($row)) {
             // URL found, update the last hit and hit counter
             MijoDatabase::query("UPDATE #__mijosef_urls_moved SET last_hit = NOW(), hits = (hits+1) WHERE id = " . $row->id);
             $root = JURI::root();
             $f = $l = '';
             if (!headers_sent($f, $l)) {
                 // Let's build absolute URL from our link
                 if (strstr($row->url_new, $root) === false) {
                     if (preg_match("/^(https?|ftps?|itpc|telnet|gopher):\\/\\//i", $row->url_new)) {
                         $url = $row->url_new;
                     } else {
                         $url = $root;
                         if (substr($url, -1) != '/') {
                             $url .= '/';
                         }
                         if (substr($row->url_new, 0, 1) == '/') {
                             $row->url_new = substr($row->url_new, 1);
                         }
                         $url .= $row->url_new;
                     }
                 } else {
                     $url = $row->url_new;
                 }
                 if (!empty($query) && !$found_with_query) {
                     $url .= '?' . $query;
                 }
                 // Use the link to redirect
                 header('HTTP/1.1 301 Moved Permanently');
                 header('Location: ' . $url);
                 header('Connection: close');
                 exit;
             } else {
                 self::_showHeadersSentError($f, $l, __FILE__, __LINE__);
             }
         } elseif ($this->MijosefConfig->jsef_to_mijosef == 1) {
             // Joomla! SEF to MijoSEF
             $juri = clone $old_uri;
             $old_sef_url = $old_uri->toString(array('path', 'query', 'fragment'));
             $router = $mainframe->get('mijosef.global.jrouter');
             $router->setMode(JROUTER_MODE_SEF);
             $jvars = $router->parse($old_uri);
             $router->setMode(JROUTER_MODE_DONT_PARSE);
             // Check 404
             if (isset($jvars['option']) && $jvars['option'] == 'com_content' && isset($jvars['view']) && isset($jvars['id']) && $jvars['id'] == 0) {
                 $jvars = array();
             }
             if (!empty($jvars) && (!empty($jvars['option']) || !empty($jvars['Itemid']))) {
                 // If Itemid is empty, destroy it
                 if (array_key_exists('Itemid', $jvars) && is_null($jvars['Itemid'])) {
                     unset($jvars['Itemid']);
                 }
                 // Empty query to set the new vars
                 $juri->setQuery('');
                 // Set new vars
                 if (!empty($jvars)) {
                     $juri->setQuery($jvars);
                 }
                 $juri->setPath('index.php');
                 // Convert URI to string
                 $real_url = $juri->toString(array('path', 'query', 'fragment'));
                 if (!empty($real_url) && substr($real_url, 0, 10) == 'index.php?') {
                     // Generate the new SEF URL using MijoSEF
                     $new_sef_url = JRoute::_($real_url);
                     //if ($new_sef_url != $old_sef_url) {}
                     // Remove path from the URL that will be stored in db
                     $path = str_replace($juri->getScheme(), '', JURI::root());
                     $path = str_replace($juri->getHost(), '', $path);
                     $path = str_replace('://', '', $path);
                     //$db_sef_url = str_replace($path, '', $new_sef_url);
                     if ($path != '/') {
                         $db_sef_url = str_replace($path, '', $new_sef_url);
                     } else {
                         $db_sef_url = substr($new_sef_url, 1);
                         // to remove the leading '/'
                     }
                     // Store it to Moved URLs
                     MijoDatabase::query("INSERT IGNORE INTO #__mijosef_urls_moved (url_old, url_new) VALUES (" . MijoDatabase::quote($sef_url) . ", " . MijoDatabase::quote($db_sef_url) . ")");
                     $f = $l = '';
                     if (count($_POST) == 0 && !headers_sent($f, $l)) {
                         // Use the link to redirect
                         header('HTTP/1.1 301 Moved Permanently');
                         header('Location: ' . $new_sef_url);
                         header('Connection: close');
                         exit;
                     } else {
                         if ($this->MijosefConfig->sent_headers_error == 1) {
                             self::_showHeadersSentError($f, $l, __FILE__, __LINE__);
                         }
                     }
                 }
             }
         }
     }
     return $vars;
 }
Example #18
0
 function getSitemap($url)
 {
     $empty = new stdClass();
     $empty->id = "";
     $empty->published = "0";
     $empty->sdate = date('Y-m-d');
     $empty->frequency = $this->MijosefConfig->sm_freq;
     $empty->priority = $this->MijosefConfig->sm_priority;
     $empty->sparent = "";
     $empty->sorder = "";
     $task = JRequest::getWord('task');
     if ($task == 'add') {
         return $empty;
     }
     $sitemap = MijoDatabase::loadObject("SELECT * FROM #__mijosef_sitemap WHERE url_sef = '{$url}'");
     if (!is_object($sitemap)) {
         return $empty;
     }
     return $sitemap;
 }
Example #19
0
 function _saveSitemap($post)
 {
     if ($post['id'] == "") {
         $values = "('{$post['url_sef']}', '{$post['published']}', '{$post['sdate']}', '{$post['frequency']}', '{$post['priority']}')";
         MijoDatabase::query("INSERT IGNORE INTO #__mijosef_sitemap (url_sef, published, sdate, frequency, priority) VALUES {$values}");
     } else {
         $fields = "url_sef = '{$post['url_sef']}', published = '{$post['published']}', sdate = '{$post['sdate']}', frequency = '{$post['frequency']}', priority = '{$post['priority']}'";
         MijoDatabase::query("UPDATE #__mijosef_sitemap SET {$fields} WHERE id = {$post['id']}");
     }
 }
Example #20
0
 function _setExtension($option)
 {
     static $components = array();
     if (!isset($components[$option])) {
         $filter = Mijosef::get('utility')->getSkippedComponents();
         $component = MijoDatabase::loadResult("SELECT `element` FROM `#__extensions` WHERE `type` = 'component' AND `element` NOT IN ({$filter}) AND `element` = '{$option}'");
         if (!is_null($component)) {
             $routed = false;
             $name = "";
             if (!$routed) {
                 if (file_exists(JPATH_MIJOSEF_ADMIN . '/extensions/' . $component . '.php')) {
                     $name = Mijosef::get('utility')->getXmlText(JPATH_MIJOSEF_ADMIN . '/extensions/' . $component . '.xml', 'name');
                     $router = 3;
                     $routed = true;
                 }
             }
             if (!$routed) {
                 if (file_exists(JPATH_SITE . '/components/' . $component . '/router.php')) {
                     $router = 2;
                     $routed = true;
                 }
             }
             if (!$routed) {
                 $router = 1;
             }
             $prms = array();
             $prms['router'] = "{$router}";
             $prms['prefix'] = "";
             $prms['skip_menu'] = "0";
             $reg = new JRegistry($prms);
             $params = $reg->toString();
             MijoDatabase::query("INSERT IGNORE INTO #__mijosef_extensions (name, extension, params) VALUES ('{$name}', '{$component}', '{$params}')");
             $components[$option] = $params;
         } else {
             $components[$option] = false;
         }
     }
     return $components[$option];
 }
Example #21
0
    JError::raiseWarning('100', JText::sprintf('COM_MIJOSEF_CPANEL_STATUS_NOTE_MOD', '<a href="index.php?option=com_config">', '</a>'));
}
if ($status['sef'] && !$status['htaccess']) {
    JError::raiseWarning('100', JText::sprintf('COM_MIJOSEF_CPANEL_STATUS_HTA_NO'));
}
if (!$status['htaccess'] || !$status['mod_rewrite'] || !$status['sef']) {
    JError::raiseNotice('100', JText::sprintf('COM_MIJOSEF_CPANEL_STATUS_NOTE_REQUIREMENTS', '<a href="http://www.mijosoft.com/support/docs/mijosef/installation-upgrading/requirements" target="_blank">', '</a>'));
}
if (Mijosef::get('utility')->JoomFishInstalled()) {
    $jf_id = MijoDatabase::loadResult("SELECT extension_id FROM #__extensions WHERE element = 'jfrouter' AND folder = 'system' AND enabled = '1'");
    if (!is_null($jf_id)) {
        JError::raiseNotice('100', JText::sprintf('COM_MIJOSEF_CPANEL_STATUS_NOTE_JFROUTER', '<a href="index.php?option=com_plugins&view=plugin&client=site&task=edit&cid[]=' . $jf_id . '">', '</a>'));
    }
}
if ($this->MijosefConfig->multilang == 1) {
    $lf_id = MijoDatabase::loadResult("SELECT extension_id FROM #__extensions WHERE element = 'languagefilter' AND folder = 'system' AND enabled = '1'");
    if (!is_null($lf_id)) {
        JError::raiseNotice('100', JText::sprintf('COM_MIJOSEF_CPANEL_STATUS_NOTE_LANGUAGEFILTER', '<a href="index.php?option=com_plugins&task=plugin.edit&extension_id=' . $lf_id . '">', '</a>'));
    }
}
if (empty($this->MijosefConfig->pid) && (MIJOSEF_PACK == 'plus' || MIJOSEF_PACK == 'pro')) {
    JError::raiseWarning('100', JText::sprintf('COM_MIJOSEF_CPANEL_STATUS_NOTE_PERSONAL_ID', '<a href="index.php?option=com_mijosef&controller=config&task=edit">', '</a>'));
}
?>
	
			</th>
		</tr>
		<tr>
			<td valign="top" width="58%">
				<table>
					<tr>
Example #22
0
 function _getMijosefLine($vars)
 {
     $f = "url_sef, url_real, mdate, used, source, params";
     $url_real = $vars['url_real'];
     $notfound = 0;
     if ($url_real == "") {
         $url_real = $vars['url_sef'];
         $notfound = 1;
     }
     $found = MijoDatabase::loadObject("SELECT url_sef FROM #__mijosef_urls WHERE url_real = '{$url_real}'");
     if (is_object($found)) {
         return "";
     }
     $custom = 0;
     if ($vars['mdate'] != '0000-00-00') {
         $custom = 1;
     }
     switch ($vars['used']) {
         case 10:
             $used = 2;
             break;
         case 0:
             $used = 1;
             break;
         case 5:
             $used = 0;
             break;
         default:
             $used = 0;
             break;
     }
     $trashed = 0;
     if (isset($vars['trashed'])) {
         $trashed = $vars['trashed'];
     }
     $prms = array();
     $prms['custom'] = (int) $custom;
     $prms['published'] = (int) $vars['published'];
     $prms['locked'] = (int) $vars['locked'];
     $prms['blocked'] = (int) $vars['blocked'];
     $prms['trashed'] = (int) $trashed;
     $prms['notfound'] = (int) $notfound;
     $prms['tags'] = 0;
     $prms['ilinks'] = 0;
     $prms['bookmarks'] = 0;
     $prms['visited'] = 0;
     $prms['notes'] = $vars['notes'];
     $reg = new JRegistry($prms);
     $params = $reg->toString();
     $v = "'{$vars['url_sef']}', '{$url_real}', '{$vars['mdate']} 00:00:00', '{$used}', '{$vars['source']}', '{$params}'";
     $line = "INSERT INTO {$this->_dbprefix}mijosef_urls ({$f}) VALUES ({$v});";
     return $line;
 }