From 3831e5ede058a75904f26607177b95e2ff98a9f9 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Wed, 27 Nov 2019 21:37:48 +0100 Subject: [PATCH 01/12] Update for Joomla 4.0.0.xxx --- .../components/com_xmap/controller.php | 24 ++-- .../com_xmap/controllers/sitemaps.php | 10 +- .../components/com_xmap/helpers/installer.php | 41 +++++++ .../components/com_xmap/helpers/xmap.php | 90 +++++++++++++++ .../com_xmap/install/install.xmap.php | 52 +++++++++ .../com_xmap/models/fields/modal/sitemaps.php | 17 ++- .../com_xmap/models/fields/xmapmenus.php | 16 ++- .../components/com_xmap/models/sitemap.php | 11 +- .../components/com_xmap/models/sitemaps.php | 2 +- .../components/com_xmap/tables/sitemap.php | 4 +- .../com_xmap/views/sitemap/tmpl/edit.php | 19 ++-- .../views/sitemap/tmpl/edit_legacy.php | 14 ++- .../com_xmap/views/sitemap/tmpl/navigator.php | 4 +- .../views/sitemap/tmpl/navigator_class.php | 2 +- .../views/sitemap/tmpl/navigator_links.php | 2 +- .../com_xmap/views/sitemap/view.html.php | 49 ++++---- .../views/sitemaps/tmpl/default_legacy.php | 2 +- .../com_xmap/views/sitemaps/tmpl/modal.php | 4 +- .../com_xmap/views/sitemaps/view.html.php | 2 +- components/com_xmap/controller.php | 6 +- components/com_xmap/controllers/ajax.json.php | 14 +-- components/com_xmap/displayer.php | 7 +- components/com_xmap/helpers/xmap.php | 107 ++++++++++++++++++ components/com_xmap/models/sitemap.php | 42 ++++--- .../com_xmap/views/html/tmpl/default.php | 2 +- components/com_xmap/views/html/view.html.php | 7 +- .../com_xmap/views/xml/tmpl/default.xml | 21 ++++ .../com_xmap/views/xml/tmpl/default_class.php | 6 +- .../com_xmap/views/xml/tmpl/default_xsl.php | 6 +- components/com_xmap/views/xml/view.html.php | 4 +- components/com_xmap/xmap.php | 3 +- 31 files changed, 465 insertions(+), 125 deletions(-) create mode 100644 administrator/components/com_xmap/helpers/installer.php create mode 100644 administrator/components/com_xmap/install/install.xmap.php create mode 100644 components/com_xmap/views/xml/tmpl/default.xml diff --git a/administrator/components/com_xmap/controller.php b/administrator/components/com_xmap/controller.php index b7745434..855e2445 100644 --- a/administrator/components/com_xmap/controller.php +++ b/administrator/components/com_xmap/controller.php @@ -37,9 +37,9 @@ public function display($cachable = false, $urlparams = false) $document = JFactory::getDocument(); // Set the default view name and format from the Request. - $vName = JRequest::getWord('view', 'sitemaps'); + $vName = XmapHelper::getWord('view', 'sitemaps'); $vFormat = $document->getType(); - $lName = JRequest::getWord('layout', 'default'); + $lName = XmapHelper::getWord('layout', 'default'); // Get and render the view. if ($view = $this->getView($vName, $vFormat)) { @@ -51,7 +51,7 @@ public function display($cachable = false, $urlparams = false) $view->setLayout($lName); // Push document object into the view. - $view->assignRef('document', $document); + $view->document = $document; $view->display(); @@ -64,16 +64,16 @@ function navigator() $document = JFactory::getDocument(); $app = JFactory::getApplication('administrator'); - $id = JRequest::getInt('sitemap', 0); - $link = urldecode(JRequest::getVar('link', '')); - $name = JRequest::getCmd('e_name', ''); + $id = XmapHelper::getInt('sitemap', 0); + $link = urldecode(XmapHelper::getVar('link', '')); + $name = XmapHelper::getCmd('e_name', ''); if (!$id) { $id = $this->getDefaultSitemapId(); } if (!$id) { - JError::raiseWarning(500, JText::_('Xmap_Not_Sitemap_Selected')); - return false; + JFactory::getApplication()->enqueueMessage(500, JText::_('Xmap_Not_Sitemap_Selected'), 'warning'); + return false; } $app->setUserState('com_xmap.edit.sitemap.id', $id); @@ -96,15 +96,15 @@ function navigatorLinks() $document = JFactory::getDocument(); $app = JFactory::getApplication('administrator'); - $id = JRequest::getInt('sitemap', 0); - $link = urldecode(JRequest::getVar('link', '')); - $name = JRequest::getCmd('e_name', ''); + $id = XmapHelper::getInt('sitemap', 0); + $link = urldecode(XmapHelper::getVar('link', '')); + $name = XmapHelper::getCmd('e_name', ''); if (!$id) { $id = $this->getDefaultSitemapId(); } if (!$id) { - JError::raiseWarning(500, JText::_('Xmap_Not_Sitemap_Selected')); + JFactory::getApplication()->enqueueMessage(500, JText::_('Xmap_Not_Sitemap_Selected'), 'warning'); return false; } diff --git a/administrator/components/com_xmap/controllers/sitemaps.php b/administrator/components/com_xmap/controllers/sitemaps.php index 74d3a414..920d53d2 100644 --- a/administrator/components/com_xmap/controllers/sitemaps.php +++ b/administrator/components/com_xmap/controllers/sitemaps.php @@ -43,14 +43,16 @@ public function __construct($config = array()) function setDefault() { // Check for request forgeries - JRequest::checkToken() or die('Invalid Token'); + if (version_compare(JVERSION, '4.0', '<')){ + JFactory::getApplication()->input->checkToken() or die('Invalid Token'); + } // Get items to publish from the request. - $cid = JRequest::getVar('cid', 0, '', 'array'); + $cid = XmapHelper::getVar('cid', 0, '', 'array'); $id = @$cid[0]; if (!$id) { - JError::raiseWarning(500, JText::_('Select an item to set as default')); + JFactory::getApplication()->enqueueMessage(500, JText::_('Select an item to set as default'), 'warning'); } else { @@ -59,7 +61,7 @@ function setDefault() // Publish the items. if (!$model->setDefault($id)) { - JError::raiseWarning(500, $model->getError()); + JFactory::getApplication()->enqueueMessage(500, $model->getError(), 'warning'); } } diff --git a/administrator/components/com_xmap/helpers/installer.php b/administrator/components/com_xmap/helpers/installer.php new file mode 100644 index 00000000..3538b12e --- /dev/null +++ b/administrator/components/com_xmap/helpers/installer.php @@ -0,0 +1,41 @@ +load('com_installer', JPATH_ADMINISTRATOR); + +class XmapInstaller extends JInstaller +{ + + public function __construct($basepath, $classprefix=null, $adapterfolder=null) + { + JAdapter::__construct(JPATH_ADMINISTRATOR '/components/com_xmap', 'JInstaller'); + } + + /** + * Returns a reference to the Xmap Installer object, only creating it + * if it doesn't already exist. + * + * @static + * @return object An installer object + */ + public static function getInstance() + { + static $instance; + + if (!isset($instance)) { + $instance = new XmapInstaller(''); + } + return $instance; + } + +} \ No newline at end of file diff --git a/administrator/components/com_xmap/helpers/xmap.php b/administrator/components/com_xmap/helpers/xmap.php index 312a6514..a6bf90ec 100644 --- a/administrator/components/com_xmap/helpers/xmap.php +++ b/administrator/components/com_xmap/helpers/xmap.php @@ -50,4 +50,94 @@ public static function addSubmenu($vName) $vName == 'extensions'); } } + + public static function getpost() { + if (version_compare(JVERSION, '4.0', 'ge')){ + return JFactory::getApplication()->input->getArray(array()); + } + else { + return call_user_func_array('XmapHelper::get', ['post']); + } + } + + public static function get(...$params) { + if (version_compare(JVERSION, '4.0', 'ge')){ + if ($params[0] == 'post '){ + return JFactory::getApplication()->input->getInputForRequestMethod('POST'); + } else { + return call_user_func_array(array(JFactory::getApplication()->input, 'get'), $params); + } + } + else { + return call_user_func_array('XmapHelper::get', $params); + } + } + + public static function getVar(...$params) { + if (version_compare(JVERSION, '4.0', 'ge')){ + return call_user_func_array(array(JFactory::getApplication()->input, 'getVar'), $params); + } + else { + return call_user_func_array('XmapHelper::getVar', $params); + } + } + + + public static function setVar(...$params) { + if (version_compare(JVERSION, '4.0', 'ge')){ + call_user_func_array(array(JFactory::getApplication()->input, 'setVar'), $params); + } + else { + call_user_func_array('XmapHelper::setVar', $params); + } + } + + public static function getCmd(...$params) { + if (version_compare(JVERSION, '4.0', 'ge')){ + return call_user_func_array(array(JFactory::getApplication()->input, 'getCmd'), $params); + } + else { + return call_user_func_array('XmapHelper::getCmd', $params); + } + } + + public static function getInt(...$params) { + if (version_compare(JVERSION, '4.0', 'ge')){ + $recordId = call_user_func_array(array(JFactory::getApplication()->input, 'getInt'), $params); + } + else { + $recordId = (int)call_user_func_array('XmapHelper::getInt', $params); + } + } + + + public static function getBool(...$params) { + if (version_compare(JVERSION, '4.0', 'ge')){ + return call_user_func_array(array(JFactory::getApplication()->input, 'getBool'), $params); + } + else { + return (int)call_user_func_array('XmapHelper::getBool', $params); + } + } + public static function getWord(...$params) { + if (version_compare(JVERSION, '4.0', 'ge')){ + return call_user_func_array(array(JFactory::getApplication()->input, 'getWord'), $params); + } + else { + return (int)call_user_func_array('XmapHelper::getWord', $params); + } + } + + public static function getURI() { + if (version_compare(JVERSION, '4.0', 'ge')){ + return JUri::getInstance(); + } + else { + return JFactory::getURI(); + } + } + + public static function getShortVersion() { + return implode(".", array_slice(explode(".", JVERSION), 0,3)); + } } diff --git a/administrator/components/com_xmap/install/install.xmap.php b/administrator/components/com_xmap/install/install.xmap.php new file mode 100644 index 00000000..38653718 --- /dev/null +++ b/administrator/components/com_xmap/install/install.xmap.php @@ -0,0 +1,52 @@ +', JText::_("XMAP_INSTALLING_XMAP"), ''; + } + + /** + * Function called when the component is updated + * + * @param JInstallerComponent $adapter + */ + function update($adapter) + { + echo '

', JText::_("XMAP_UPGRADING_XMAP"), '

'; + } + + + /** + * Function called when the component is uninstalled + * + * @param JInstallerComponent $adapter + */ + function uninstall($adapter) + { + + } + +} diff --git a/administrator/components/com_xmap/models/fields/modal/sitemaps.php b/administrator/components/com_xmap/models/fields/modal/sitemaps.php index 6c65d8cb..5f818080 100644 --- a/administrator/components/com_xmap/models/fields/modal/sitemaps.php +++ b/administrator/components/com_xmap/models/fields/modal/sitemaps.php @@ -37,8 +37,11 @@ protected function getInput() $db = JFactory::getDBO(); $doc = JFactory::getDocument(); + // Load the modal behavior. - JHtml::_('behavior.modal', 'a.modal'); + if (version_compare(JVERSION, '4.0', '<')){ + JHTML::_('behavior.modal', 'a.modal'); + } // Get the title of the linked chart if ($this->value) { @@ -48,9 +51,10 @@ protected function getInput() ' WHERE id = ' . (int) $this->value ); $title = $db->loadResult(); - - if ($error = $db->getErrorMsg()) { - JError::raiseWarning(500, $error); + if (version_compare(JVERSION, '4.0', '<')){ + if ($error = $db->getErrorMsg()) { + JFactory::getApplication()->enqueueMessage(500, $error, 'warning'); + } } } else { $title = ''; @@ -69,8 +73,9 @@ protected function getInput() ); $link = 'index.php?option=com_xmap&view=sitemaps&layout=modal&tmpl=component&function=jSelectSitemap_' . $this->id; - - JHTML::_('behavior.modal', 'a.modal'); + if (version_compare(JVERSION, '4.0', '<')){ + JHTML::_('behavior.modal', 'a.modal'); + } $html = ''; $html .= "\n" . ''; if(version_compare(JVERSION,'3.0.0','ge')) diff --git a/administrator/components/com_xmap/models/fields/xmapmenus.php b/administrator/components/com_xmap/models/fields/xmapmenus.php index 54a8adfa..ce266562 100644 --- a/administrator/components/com_xmap/models/fields/xmapmenus.php +++ b/administrator/components/com_xmap/models/fields/xmapmenus.php @@ -7,8 +7,11 @@ */ defined('_JEXEC') or die; + jimport('joomla.html.html'); +if (version_compare(JVERSION, '4.0', '<')){ require_once JPATH_LIBRARIES . '/joomla/form/fields/list.php'; +} /** * Menus Form Field class for the Xmap Component @@ -65,10 +68,11 @@ protected function _getOptions() } // Check for a database error. + if (version_compare(JVERSION, '4.0', '<')){ if ($db->getErrorNum()) { JError::raiseWarning(500, $db->getErrorMsg()); } - + } $options = array_merge( parent::getOptions(), $options @@ -109,8 +113,7 @@ protected function getInput() } $doc = JFactory::getDocument(); - $doc->addScriptDeclaration(" - window.addEvent('domready',function(){ + $doc->addScriptDeclaration("document.addEventListener('DOMContentLoaded', function(event) { \$\$('div.xmap-menu-options select').addEvent('mouseover',function(event){xmapMenusSortable.detach();}) \$\$('div.xmap-menu-options select').addEvent('mouseout',function(event){xmapMenusSortable.attach();}) var xmapMenusSortable = new Sortables(\$('ul_" . $this->inputId . "'),{ @@ -150,9 +153,16 @@ protected function getInput() $return .= ''; $return .= ''; $return .= ''; } diff --git a/administrator/components/com_xmap/models/sitemap.php b/administrator/components/com_xmap/models/sitemap.php index de8754fb..5f1692f0 100644 --- a/administrator/components/com_xmap/models/sitemap.php +++ b/administrator/components/com_xmap/models/sitemap.php @@ -7,7 +7,7 @@ // No direct access defined('_JEXEC') or die; - +use Joomla\Utilities\ArrayHelper; jimport('joomla.application.component.modeladmin'); /** @@ -43,7 +43,7 @@ protected function _populateState() // Load the User state. if (!($pk = (int) $app->getUserState('com_xmap.edit.sitemap.id'))) { - $pk = (int) JRequest::getInt('id'); + $pk = (int) XmapHelper::getInt('id'); } $this->setState('sitemap.id', $pk); @@ -98,7 +98,11 @@ public function getItem($pk = null) // Convert to the JObject before adding other data. $value = $table->getProperties(1); - $value = JArrayHelper::toObject($value, 'JObject'); + if (version_compare(JVERSION, '4.0', 'ge')){ + $value = ArrayHelper::toObject($value, 'JObject'); + } else { + $value = JArrayHelper::toObject($value, 'JObject'); + } // Convert the params field to an array. $registry = new JRegistry; @@ -156,7 +160,6 @@ protected function loadFormData() public function save($data) { // Initialise variables; - $dispatcher = JDispatcher::getInstance(); $table = $this->getTable(); $pk = (!empty($data['id'])) ? $data['id'] : (int)$this->getState('sitemap.id'); $isNew = true; diff --git a/administrator/components/com_xmap/models/sitemaps.php b/administrator/components/com_xmap/models/sitemaps.php index 3a970612..75413d1d 100644 --- a/administrator/components/com_xmap/models/sitemaps.php +++ b/administrator/components/com_xmap/models/sitemaps.php @@ -61,7 +61,7 @@ public function __construct($config = array()) protected function populateState($ordering = null, $direction = null) { // Adjust the context to support modal layouts. - if ($layout = JRequest::getVar('layout')) { + if ($layout = XmapHelper::getVar('layout')) { $this->context .= '.'.$layout; } diff --git a/administrator/components/com_xmap/tables/sitemap.php b/administrator/components/com_xmap/tables/sitemap.php index 3593df43..52a6d64f 100644 --- a/administrator/components/com_xmap/tables/sitemap.php +++ b/administrator/components/com_xmap/tables/sitemap.php @@ -7,7 +7,7 @@ */ // no direct access defined('_JEXEC') or die; - +use Joomla\CMS\Application\ApplicationHelper; /** * @package Xmap * @subpackage com_xmap @@ -161,7 +161,7 @@ function check() if (empty($this->alias)) { $this->alias = $this->title; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { $datenow = &JFactory::getDate(); diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/edit.php b/administrator/components/com_xmap/views/sitemap/tmpl/edit.php index c3af05d0..1dfd4308 100644 --- a/administrator/components/com_xmap/views/sitemap/tmpl/edit.php +++ b/administrator/components/com_xmap/views/sitemap/tmpl/edit.php @@ -6,26 +6,25 @@ * @author Guillermo Vargas (guille@vargas.co.cr) */ defined('_JEXEC') or die; - -// Include the component HTML helpers. -JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); +use Joomla\CMS\HTML\HTMLHelper; // Load the tooltip behavior. -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.formvalidation'); -if(version_compare(JVERSION,'3.0.0','ge')) { - JHtml::_('formbehavior.chosen', 'select'); -} +JHtml::_('bootstrap.tooltip'); +//if (version_compare(JVERSION ,'4.0.0', 'ge')) { + //JHtml::_('behavior.formvalidation'); + HTMLHelper::_('behavior.formvalidator'); +//} +//if (version_compare(JVERSION, '3.0.0', 'ge')) { + JHtml::_('formbehavior.chosen', 'select'); +//} ?>
diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/edit_legacy.php b/administrator/components/com_xmap/views/sitemap/tmpl/edit_legacy.php index 5661b3fc..89b75808 100644 --- a/administrator/components/com_xmap/views/sitemap/tmpl/edit_legacy.php +++ b/administrator/components/com_xmap/views/sitemap/tmpl/edit_legacy.php @@ -7,14 +7,20 @@ */ defined('_JEXEC') or die; -// Include the component HTML helpers. -JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); + jimport('joomla.html.pane'); +use Joomla\CMS\HTML\HTMLHelper; // Load the tooltip behavior. -JHtml::_('behavior.tooltip'); -JHtml::_('behavior.formvalidation'); +JHtml::_('bootstrap.tooltip'); +if (version_compare(JVERSION ,'4.0.0', 'ge')) { + //JHtml::_('behavior.formvalidation'); + HTMLHelper::_('behavior.formvalidator'); +} +if (version_compare(JVERSION, '3.0.0', 'ge')) { + JHtml::_('formbehavior.chosen', 'select'); +} ?> + +
+ +
+ fieldsets) : ?> + + + + + fieldsets as $name => $fieldSet) : ?> + xpath('//fieldset[@name="' . $name . '"]/fieldset'); + $hasParent = $xml->xpath('//fieldset/fieldset[@name="' . $name . '"]'); + $isGrandchild = $xml->xpath('//fieldset/fieldset/fieldset[@name="' . $name . '"]'); + ?> + + + showon)) : ?> + useScript('showon'); ?> + showon, $this->formControl)) . '\''; ?> + + + label) ? 'XMAP_FIELDSET_' . strtoupper($name) : $fieldSet->label; ?> + + +
+ label); ?> +
+ + + + 1) : ?> +
+
+ + + + + + + + + + + + +
+ label); ?> +
+ + + + + description)) : ?> +
+ + description); ?> +
+ + + + form->renderFieldset($name, $name === 'permissions' ? ['hiddenLabel' => true, 'class' => 'revert-controls'] : []); ?> + + + +
+
+ + + + + + 1) : ?> +
+ + + + + + + +
+
+ + + form->getInput('is_default'); ?> + +
+
diff --git a/administrator/components/com_xmap/views/sitemap/view.html.php b/administrator/components/com_xmap/views/sitemap/view.html.php index 849cda0b..96976aee 100644 --- a/administrator/components/com_xmap/views/sitemap/view.html.php +++ b/administrator/components/com_xmap/views/sitemap/view.html.php @@ -35,7 +35,7 @@ function display($tpl = null) $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); - + $this->fieldsets = $this->form ? $this->form->getFieldsets() : null; $version = new JVersion; // Check for errors. @@ -56,7 +56,11 @@ function display($tpl = null) if (version_compare($version->getShortVersion(), '3.0.0', '<')) { $tpl = 'legacy'; } - // XmapHelper::setVar('hidemainmenu', true); + $versionshort = $version->getShortVersion(); + if (version_compare($version->getShortVersion(), '4.0.0-beta', '>')) { + $tpl = 'new'; + } + // XmapHelper::setVar('hidemainmenu', true); parent::display($tpl); } diff --git a/administrator/components/com_xmap/views/sitemaps/tmpl/modal.php b/administrator/components/com_xmap/views/sitemaps/tmpl/modal.php index 99ebf1be..ed209887 100644 --- a/administrator/components/com_xmap/views/sitemaps/tmpl/modal.php +++ b/administrator/components/com_xmap/views/sitemaps/tmpl/modal.php @@ -92,7 +92,7 @@ $htmlDate = JText::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_html)/3600)); } else { $date = new JDate($item->lastvisit_html); - $htmlDate = $date->toFormat('%Y-%m-%d %H:%M'); + $htmlDate = $date->Format('%Y-%m-%d %H:%M'); } if ( !$item->lastvisit_xml ) { @@ -107,7 +107,7 @@ $xmlDate = JText::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_xml)/3600)); } else { $date = new JDate($item->lastvisit_xml); - $xmlDate = $date->toFormat('%Y-%m-%d %H:%M'); + $xmlDate = $date->Format('%Y-%m-%d %H:%M'); } ?> diff --git a/components/com_xmap/models/sitemap.php b/components/com_xmap/models/sitemap.php index 8abc3a1e..980fa482 100644 --- a/components/com_xmap/models/sitemap.php +++ b/components/com_xmap/models/sitemap.php @@ -262,11 +262,16 @@ function chageItemPropery($uid, $itemid, $view, $property, $value) } $db->setQuery($query); //echo $db->getQuery();exit; - if ($db->query()) { - return true; - } else { - return false; - } + if (version_compare(JVERSION, '4.0', 'ge')){ + if ($db->execute()) { + return true; + } + } else { + if ($db->query()) { + return true; + } + } + return false; } function toggleItem($uid, $itemid) @@ -299,7 +304,11 @@ function toggleItem($uid, $itemid) $db = JFactory::getDBO(); $query = "UPDATE #__xmap_sitemap set excluded_items='" . $db->escape($str) . "' where id=" . $sitemap->id; $db->setQuery($query); - $db->query(); + if (version_compare(JVERSION, '4.0', 'ge')){ + $db->execute(); + } else { + $db->query(); + } return $state; } diff --git a/components/com_xmap/views/html/tmpl/default.php b/components/com_xmap/views/html/tmpl/default.php index f17c4c49..1e394472 100644 --- a/components/com_xmap/views/html/tmpl/default.php +++ b/components/com_xmap/views/html/tmpl/default.php @@ -24,7 +24,7 @@ //$css .= "\n.".$this->item->classname .' li {float:left;}'; $js = " - document.addEventListener("DOMContentLoaded", function(event) { + document.addEventListener('DOMContentLoaded', function(event) { $$('.xmapexcl').each(function(el){ el.onclick = function(){ if (this && this.rel) { diff --git a/components/com_xmap/views/html/tmpl/default.xml b/components/com_xmap/views/html/tmpl/default.xml index b125f3d5..d44b6e74 100644 --- a/components/com_xmap/views/html/tmpl/default.xml +++ b/components/com_xmap/views/html/tmpl/default.xml @@ -10,11 +10,13 @@ addfieldpath="/administrator/components/com_xmap/models/fields"> + description="COM_XMAP_SELECT_A_SITEMAP" + query="SELECT title,id FROM #__xmap_sitemap" + key_field="id" value_field="title" + /> diff --git a/components/com_xmap/views/xml/tmpl/default.php b/components/com_xmap/views/xml/tmpl/default.php index c2d57b70..991a48bb 100644 --- a/components/com_xmap/views/xml/tmpl/default.php +++ b/components/com_xmap/views/xml/tmpl/default.php @@ -18,9 +18,9 @@ echo '',"\n"; if (($this->item->params->get('beautify_xml', 1) == 1) && !$this->displayer->isNews) { - $params = '&filter_showtitle='.JRequest::getBool('filter_showtitle',0); - $params .= '&filter_showexcluded='.JRequest::getBool('filter_showexcluded',0); - $params .= (JRequest::getCmd('lang')?'&lang='.JRequest::getCmd('lang'):''); + $params = '&filter_showtitle='.XmapHelper::getBool('filter_showtitle',0); + $params .= '&filter_showexcluded='.XmapHelper::getBool('filter_showexcluded',0); + $params .= (XmapHelper::getCmd('lang')?'&lang='.XmapHelper::getCmd('lang'):''); echo 'item->id.($this->isImages?'&images=1':'').$params.'"?>'."\n"; } ?> diff --git a/components/com_xmap/views/xml/tmpl/default.xml b/components/com_xmap/views/xml/tmpl/default.xml index a96f3e4a..b603e668 100644 --- a/components/com_xmap/views/xml/tmpl/default.xml +++ b/components/com_xmap/views/xml/tmpl/default.xml @@ -12,10 +12,12 @@ addfieldpath="/administrator/components/com_xmap/models/fields"> + query="SELECT title,id FROM #__xmap_sitemap" + key_field="id" value_field="title" + /> \ No newline at end of file diff --git a/components/com_xmap/views/xml/view.html.php b/components/com_xmap/views/xml/view.html.php index b103b367..3b02c1c9 100644 --- a/components/com_xmap/views/xml/view.html.php +++ b/components/com_xmap/views/xml/view.html.php @@ -71,7 +71,11 @@ function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { + if (version_compare(JVERSION, '4.0', 'ge')){ + JFactory::getApplication()->enqueueMessage(implode("\n", $errors), 'warning'); + } else { JError::raiseWarning(500, implode("\n", $errors)); + } return false; } diff --git a/plugins/xmap/com_content/com_content.php b/plugins/xmap/com_content/com_content.php index c66076f7..d4a44e41 100644 --- a/plugins/xmap/com_content/com_content.php +++ b/plugins/xmap/com_content/com_content.php @@ -7,8 +7,9 @@ */ defined( '_JEXEC' ) or die( 'Restricted access' ); -require_once JPATH_SITE . '/components/com_content/helpers/route.php'; -require_once JPATH_SITE . '/components/com_content/helpers/query.php'; +//require_once JPATH_SITE . '/components/com_content/helpers/route.php'; +//require_once JPATH_SITE . '/components/com_content/helpers/query.php'; +use Joomla\Utilities\ArrayHelper; /** * Handles standard Joomla's Content articles/categories @@ -41,16 +42,16 @@ static function prepareMenuItem($node, &$params) } parse_str(html_entity_decode($link_query['query']), $link_vars); - $view = JArrayHelper::getValue($link_vars, 'view', ''); - $layout = JArrayHelper::getValue($link_vars, 'layout', ''); - $id = JArrayHelper::getValue($link_vars, 'id', 0); + $view = ArrayHelper::getValue($link_vars, 'view', ''); + $layout = ArrayHelper::getValue($link_vars, 'layout', ''); + $id = ArrayHelper::getValue($link_vars, 'id', 0); //----- Set add_images param - $params['add_images'] = JArrayHelper::getValue($params, 'add_images', 0); + $params['add_images'] = ArrayHelper::getValue($params, 'add_images', 0); //----- Set add pagebreaks param - $add_pagebreaks = JArrayHelper::getValue($params, 'add_pagebreaks', 1); - $params['add_pagebreaks'] = JArrayHelper::getValue($params, 'add_pagebreaks', 1); + $add_pagebreaks = ArrayHelper::getValue($params, 'add_pagebreaks', 1); + $params['add_pagebreaks'] = ArrayHelper::getValue($params, 'add_pagebreaks', 1); switch ($view) { case 'category': @@ -84,7 +85,7 @@ static function prepareMenuItem($node, &$params) $text = @$item->introtext . @$item->fulltext; if ($params['add_images']) { - $node->images = XmapHelper::getImages($text,JArrayHelper::getValue($params, 'max_images', 1000)); + $node->images = XmapHelper::getImages($text,ArrayHelper::getValue($params, 'max_images', 1000)); } if ($params['add_pagebreaks']) { @@ -121,14 +122,14 @@ static function getTree($xmap, $parent, &$params) } parse_str(html_entity_decode($link_query['query']), $link_vars); - $view = JArrayHelper::getValue($link_vars, 'view', ''); - $id = intval(JArrayHelper::getValue($link_vars, 'id', '')); + $view = ArrayHelper::getValue($link_vars, 'view', ''); + $id = intval(ArrayHelper::getValue($link_vars, 'id', '')); /* * * * Parameters Initialitation * */ //----- Set expand_categories param - $expand_categories = JArrayHelper::getValue($params, 'expand_categories', 1); + $expand_categories = ArrayHelper::getValue($params, 'expand_categories', 1); $expand_categories = ( $expand_categories == 1 || ( $expand_categories == 2 && $xmap->view == 'xml') || ( $expand_categories == 3 && $xmap->view == 'html') @@ -136,7 +137,7 @@ static function getTree($xmap, $parent, &$params) $params['expand_categories'] = $expand_categories; //----- Set expand_featured param - $expand_featured = JArrayHelper::getValue($params, 'expand_featured', 1); + $expand_featured = ArrayHelper::getValue($params, 'expand_featured', 1); $expand_featured = ( $expand_featured == 1 || ( $expand_featured == 2 && $xmap->view == 'xml') || ( $expand_featured == 3 && $xmap->view == 'html') @@ -144,7 +145,7 @@ static function getTree($xmap, $parent, &$params) $params['expand_featured'] = $expand_featured; //----- Set expand_featured param - $include_archived = JArrayHelper::getValue($params, 'include_archived', 2); + $include_archived = ArrayHelper::getValue($params, 'include_archived', 2); $include_archived = ( $include_archived == 1 || ( $include_archived == 2 && $xmap->view == 'xml') || ( $include_archived == 3 && $xmap->view == 'html') @@ -152,20 +153,20 @@ static function getTree($xmap, $parent, &$params) $params['include_archived'] = $include_archived; //----- Set show_unauth param - $show_unauth = JArrayHelper::getValue($params, 'show_unauth', 1); + $show_unauth = ArrayHelper::getValue($params, 'show_unauth', 1); $show_unauth = ( $show_unauth == 1 || ( $show_unauth == 2 && $xmap->view == 'xml') || ( $show_unauth == 3 && $xmap->view == 'html')); $params['show_unauth'] = $show_unauth; //----- Set add_images param - $add_images = JArrayHelper::getValue($params, 'add_images', 0) && $xmap->isImages; + $add_images = ArrayHelper::getValue($params, 'add_images', 0) && $xmap->isImages; $add_images = ( $add_images && $xmap->view == 'xml'); $params['add_images'] = $add_images; - $params['max_images'] = JArrayHelper::getValue($params, 'max_images', 1000); + $params['max_images'] = ArrayHelper::getValue($params, 'max_images', 1000); //----- Set add pagebreaks param - $add_pagebreaks = JArrayHelper::getValue($params, 'add_pagebreaks', 1); + $add_pagebreaks = ArrayHelper::getValue($params, 'add_pagebreaks', 1); $add_pagebreaks = ( $add_pagebreaks == 1 || ( $add_pagebreaks == 2 && $xmap->view == 'xml') || ( $add_pagebreaks == 3 && $xmap->view == 'html') @@ -179,8 +180,8 @@ static function getTree($xmap, $parent, &$params) } //----- Set cat_priority and cat_changefreq params - $priority = JArrayHelper::getValue($params, 'cat_priority', $parent->priority); - $changefreq = JArrayHelper::getValue($params, 'cat_changefreq', $parent->changefreq); + $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority); + $changefreq = ArrayHelper::getValue($params, 'cat_changefreq', $parent->changefreq); if ($priority == '-1') $priority = $parent->priority; if ($changefreq == '-1') @@ -190,8 +191,8 @@ static function getTree($xmap, $parent, &$params) $params['cat_changefreq'] = $changefreq; //----- Set art_priority and art_changefreq params - $priority = JArrayHelper::getValue($params, 'art_priority', $parent->priority); - $changefreq = JArrayHelper::getValue($params, 'art_changefreq', $parent->changefreq); + $priority = ArrayHelper::getValue($params, 'art_priority', $parent->priority); + $changefreq = ArrayHelper::getValue($params, 'art_changefreq', $parent->changefreq); if ($priority == '-1') $priority = $parent->priority; if ($changefreq == '-1') @@ -200,8 +201,8 @@ static function getTree($xmap, $parent, &$params) $params['art_priority'] = $priority; $params['art_changefreq'] = $changefreq; - $params['max_art'] = intval(JArrayHelper::getValue($params, 'max_art', 0)); - $params['max_art_age'] = intval(JArrayHelper::getValue($params, 'max_art_age', 0)); + $params['max_art'] = intval(ArrayHelper::getValue($params, 'max_art', 0)); + $params['max_art_age'] = intval(ArrayHelper::getValue($params, 'max_art_age', 0)); $params['nullDate'] = $db->Quote($db->getNullDate()); @@ -214,7 +215,7 @@ static function getTree($xmap, $parent, &$params) switch ($view) { case 'category': if (!$id) { - $id = intval(JArrayHelper::getValue($params, 'id', 0)); + $id = intval(ArrayHelper::getValue($params, 'id', 0)); } if ($params['expand_categories'] && $id) { $result = self::expandCategory($xmap, $parent, $id, $params, $parent->id); @@ -502,11 +503,12 @@ static function buildContentOrderBy(&$params,$parentId,$itemid) $articleOrderby = $menuParams->get('orderby_sec', 'rdate'); $articleOrderDate = $menuParams->get('order_date'); //$categoryOrderby = $menuParams->def('orderby_pri', ''); - $secondary = ContentHelperQuery::orderbySecondary($articleOrderby, $articleOrderDate) . ', '; + //$secondary = ContentHelperQuery::orderbySecondary($articleOrderby, $articleOrderDate) . ', '; //$primary = ContentHelperQuery::orderbyPrimary($categoryOrderby); //$orderby .= $primary . ' ' . $secondary . ' a.created '; - $orderby .= $secondary . ' a.created '; + //$orderby .= $secondary . ' a.created '; + $orderby .= ' a.created '; return $orderby; } diff --git a/plugins/xmap/com_weblinks/com_weblinks.php b/plugins/xmap/com_weblinks/com_weblinks.php index 60c4d56a..5fbaa099 100644 --- a/plugins/xmap/com_weblinks/com_weblinks.php +++ b/plugins/xmap/com_weblinks/com_weblinks.php @@ -9,7 +9,7 @@ * @description Xmap plugin for Joomla's web links component */ defined( '_JEXEC' ) or die( 'Restricted access' ); - +use Joomla\Utilities\ArrayHelper; class xmap_com_weblinks { @@ -23,9 +23,9 @@ static function prepareMenuItem($node, &$params) { $link_query = parse_url($node->link); parse_str(html_entity_decode($link_query['query']), $link_vars); - $view = JArrayHelper::getValue($link_vars, 'view', ''); + $view = ArrayHelper::getValue($link_vars, 'view', ''); if ($view == 'weblink') { - $id = intval(JArrayHelper::getValue($link_vars, 'id', 0)); + $id = intval(ArrayHelper::getValue($link_vars, 'id', 0)); if ($id) { $node->uid = 'com_weblinksi' . $id; $node->expandible = false; @@ -34,7 +34,7 @@ static function prepareMenuItem($node, &$params) $node->uid = 'com_weblinkscategories'; $node->expandible = true; } elseif ($view == 'category') { - $catid = intval(JArrayHelper::getValue($link_vars, 'id', 0)); + $catid = intval(ArrayHelper::getValue($link_vars, 'id', 0)); $node->uid = 'com_weblinksc' . $catid; $node->expandible = true; } @@ -49,29 +49,29 @@ static function getTree($xmap, $parent, &$params) $link_query = parse_url($parent->link); parse_str(html_entity_decode($link_query['query']), $link_vars); - $view = JArrayHelper::getValue($link_vars, 'view', 0); + $view = ArrayHelper::getValue($link_vars, 'view', 0); $app = JFactory::getApplication(); $menu = $app->getMenu(); $menuparams = $menu->getParams($parent->id); if ($view == 'category') { - $catid = intval(JArrayHelper::getValue($link_vars, 'id', 0)); + $catid = intval(ArrayHelper::getValue($link_vars, 'id', 0)); } elseif ($view == 'categories') { $catid = 0; } else { // Only expand category menu items return; } - $include_links = JArrayHelper::getValue($params, 'include_links', 1, ''); + $include_links = ArrayHelper::getValue($params, 'include_links', 1, ''); $include_links = ( $include_links == 1 || ( $include_links == 2 && $xmap->view == 'xml') || ( $include_links == 3 && $xmap->view == 'html') || $xmap->view == 'navigator'); $params['include_links'] = $include_links; - $priority = JArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); - $changefreq = JArrayHelper::getValue($params, 'cat_changefreq', $parent->changefreq, ''); + $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); + $changefreq = ArrayHelper::getValue($params, 'cat_changefreq', $parent->changefreq, ''); if ($priority == '-1') $priority = $parent->priority; if ($changefreq == '-1') @@ -80,8 +80,8 @@ static function getTree($xmap, $parent, &$params) $params['cat_priority'] = $priority; $params['cat_changefreq'] = $changefreq; - $priority = JArrayHelper::getValue($params, 'link_priority', $parent->priority, ''); - $changefreq = JArrayHelper::getValue($params, 'link_changefreq', $parent->changefreq, ''); + $priority = ArrayHelper::getValue($params, 'link_priority', $parent->priority, ''); + $changefreq = ArrayHelper::getValue($params, 'link_changefreq', $parent->changefreq, ''); if ($priority == '-1') $priority = $parent->priority; @@ -126,7 +126,7 @@ static function getCategoryTree($xmap, $parent, &$params, $category) if ($params['include_links']) { //view=category&catid=... $linksModel = new WeblinksModelCategory(); $linksModel->getState(); // To force the populate state - $linksModel->setState('list.limit', JArrayHelper::getValue($params, 'max_links', NULL)); + $linksModel->setState('list.limit', ArrayHelper::getValue($params, 'max_links', NULL)); $linksModel->setState('list.start', 0); $linksModel->setState('list.ordering', 'ordering'); $linksModel->setState('list.direction', 'ASC'); From 1bcc8199ce6aa811b0bcec43ca7749521b1411bd Mon Sep 17 00:00:00 2001 From: JLTRY Date: Tue, 6 Apr 2021 20:45:17 +0200 Subject: [PATCH 03/12] Error in frontend for xml view JRequest --- components/com_xmap/views/xml/view.html.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/components/com_xmap/views/xml/view.html.php b/components/com_xmap/views/xml/view.html.php index 3b02c1c9..72099a8e 100644 --- a/components/com_xmap/views/xml/view.html.php +++ b/components/com_xmap/views/xml/view.html.php @@ -131,9 +131,17 @@ function display($tpl = null) if ($doCompression) { $data = ob_get_contents(); - JResponse::setBody($data); + if (version_compare(JVERSION, '4.0', 'ge')){ + $app->setBody($data); + } else { + JResponse::setBody($data); + } @ob_end_clean(); - echo JResponse::toString(true); + if (version_compare(JVERSION, '4.0', 'ge')){ + echo $app->toString(true); + } else { + echo JResponse::toString(true); + } } $this->recreateBuffering(); exit; From bc52fd4171f15fdb18171238c766fb14bd9673f4 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Fri, 9 Apr 2021 09:03:34 +0200 Subject: [PATCH 04/12] Articles are not shown in sitemap --- plugins/xmap/com_content/com_content.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/xmap/com_content/com_content.php b/plugins/xmap/com_content/com_content.php index d4a44e41..743f63e0 100644 --- a/plugins/xmap/com_content/com_content.php +++ b/plugins/xmap/com_content/com_content.php @@ -392,8 +392,10 @@ static function includeCategoryContent($xmap, $parent, $catid, &$params,$Itemid) . ($catid =='featured'? 'LEFT JOIN #__content_frontpage AS fp ON a.id = fp.content_id ' : ' ') . 'WHERE ' . implode(' AND ',$where) . ' AND ' . ' (a.publish_up = ' . $params['nullDate'] + . ' OR a.publish_up IS NULL' . ' OR a.publish_up <= ' . $params['nowDate'] . ') AND ' . ' (a.publish_down = ' . $params['nullDate'] + . ' OR a.publish_down IS NULL' . ' OR a.publish_down >= ' . $params['nowDate'] . ') ' . ( $xmap->view != 'xml' ? "\n ORDER BY $orderby " : '' ) . ( $params['max_art'] ? "\n LIMIT {$params['max_art']}" : ''); From 26ba2061860bd0b666ccc1040aea8c0423ad92e8 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Mon, 12 Apr 2021 21:11:11 +0200 Subject: [PATCH 05/12] Peter Issue: show Priority Frequency for MEnus --- .../com_xmap/models/fields/xmapmenus.php | 28 ++++++++----------- .../com_xmap/models/forms/sitemap.xml | 5 ++-- .../components/com_xmap/models/sitemap.php | 12 ++++---- .../com_xmap/views/sitemap/tmpl/edit_new.php | 1 + .../com_xmap/views/sitemap/view.html.php | 2 +- 5 files changed, 22 insertions(+), 26 deletions(-) diff --git a/administrator/components/com_xmap/models/fields/xmapmenus.php b/administrator/components/com_xmap/models/fields/xmapmenus.php index 9615d108..e604a4db 100644 --- a/administrator/components/com_xmap/models/fields/xmapmenus.php +++ b/administrator/components/com_xmap/models/fields/xmapmenus.php @@ -68,11 +68,11 @@ protected function _getOptions() } // Check for a database error. - if (version_compare(JVERSION, '4.0', '<')){ - if ($db->getErrorNum()) { - JError::raiseWarning(500, $db->getErrorMsg()); + if (version_compare(JVERSION, '4.0', '<')){ + if ($db->getErrorNum()) { + JError::raiseWarning(500, $db->getErrorMsg()); + } } - } $options = array_merge( parent::getOptions(), $options @@ -111,9 +111,10 @@ protected function getInput() $registry->loadString($value); $value = $registry->toArray(); } - - /*$doc = JFactory::getDocument(); - $doc->addScriptDeclaration("jQuery(document).ready(function($) { + $version = new JVersion; + if (version_compare($version->getShortVersion(), '4.0.0-beta', '<')) { + $doc = JFactory::getDocument(); + $doc->addScriptDeclaration("jQuery(document).ready(function($) { \$('.xmap-menu-options select').mouseover(function(event){xmapMenusSortable.detach();}); \$('.xmap-menu-options select').mouseout(function(event){xmapMenusSortable.attach();}); var xmapMenusSortable = new Sortables(\$('ul_" . $this->inputId . "'),{ @@ -127,7 +128,7 @@ protected function getInput() el.setStyle('background','#eee'); } }); - });");*/ + });"); } if ($disabled || $readonly) { $attributes .= 'disabled="disabled"'; @@ -153,16 +154,9 @@ protected function getInput() $return .= ''; $return .= ''; $return .= ''; } diff --git a/administrator/components/com_xmap/models/forms/sitemap.xml b/administrator/components/com_xmap/models/forms/sitemap.xml index 7721af04..faa052fd 100644 --- a/administrator/components/com_xmap/models/forms/sitemap.xml +++ b/administrator/components/com_xmap/models/forms/sitemap.xml @@ -153,7 +153,8 @@ multiple="multiple" array="true" size="5"/> - + + - +
getProperties(1); - if (version_compare(JVERSION, '4.0', 'ge')){ - $value = ArrayHelper::toObject($value, 'JObject'); - } else { - $value = JArrayHelper::toObject($value, 'JObject'); - } + if (version_compare(JVERSION, '4.0', 'ge')){ + $value = ArrayHelper::toObject($value, 'JObject'); + } else { + $value = JArrayHelper::toObject($value, 'JObject'); + } // Convert the params field to an array. $registry = new JRegistry; @@ -209,7 +209,7 @@ public function save($data) if (version_compare(JVERSION, '4.0', 'ge')) { if (!$this->_db->execute()) { $this->setError($table->_db->getErrorMsg()); - } + } } else { if (!$this->_db->query()) { $this->setError($table->_db->getErrorMsg()); diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php b/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php index b4b39d6c..13f09beb 100644 --- a/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php +++ b/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php @@ -12,6 +12,7 @@ use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; +JLoader::import('components.com_xmap.helpers.html.xmap', JPATH_ADMINISTRATOR); $app = Factory::getApplication(); $template = $app->getTemplate(); diff --git a/administrator/components/com_xmap/views/sitemap/view.html.php b/administrator/components/com_xmap/views/sitemap/view.html.php index 96976aee..ebbd90c2 100644 --- a/administrator/components/com_xmap/views/sitemap/view.html.php +++ b/administrator/components/com_xmap/views/sitemap/view.html.php @@ -61,7 +61,7 @@ function display($tpl = null) $tpl = 'new'; } // XmapHelper::setVar('hidemainmenu', true); - parent::display($tpl); + parent::display($tpl); } /** From 57ddbb68a0200281347e77a6f7ab47b75ce1ba0e Mon Sep 17 00:00:00 2001 From: JLTRY Date: Sun, 22 Jan 2023 09:41:41 +0100 Subject: [PATCH 06/12] joomla 4.2.6 --- components/com_xmap/views/xml/tmpl/default_class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/com_xmap/views/xml/tmpl/default_class.php b/components/com_xmap/views/xml/tmpl/default_class.php index 6dadedd9..4528d53a 100644 --- a/components/com_xmap/views/xml/tmpl/default_class.php +++ b/components/com_xmap/views/xml/tmpl/default_class.php @@ -63,7 +63,7 @@ function __construct($config, $sitemap) * * @param stdclass $node */ - function printNode($node) + function printNode(&$node) { $node->isExcluded = false; if ($this->isExcluded($node->id,$node->uid)) { @@ -216,7 +216,7 @@ function changeLevel($level) * @param stdclass $menu The menu node item * @return boolean */ - function startMenu($menu) + function startMenu(&$menu) { return true; } @@ -227,7 +227,7 @@ function startMenu($menu) * @param stdclass $menu The menu node item * @return boolean */ - function endMenu($menu) + function endMenu(&$menu) { return true; } From 4247325e033d78626355b469576233ae43de4544 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Wed, 6 Dec 2023 20:27:11 +0100 Subject: [PATCH 07/12] adaptation to joomla 5.0.0 add MAkefile for package --- Makefile | 65 +++++++++++++++++++ .../components/com_xmap/controller.php | 2 + .../com_xmap/controllers/sitemap.php | 2 +- .../components/com_xmap/helpers/html/xmap.php | 14 +++- .../components/com_xmap/helpers/xmap.php | 4 ++ .../com_xmap/models/fields/xmapmenus.php | 10 ++- .../components/com_xmap/models/sitemap.php | 11 +++- .../components/com_xmap/models/sitemaps.php | 2 +- .../components/com_xmap/tables/sitemap.php | 2 + .../com_xmap/views/sitemap/tmpl/edit_new.php | 4 +- .../com_xmap/views/sitemap/view.html.php | 4 ++ .../com_xmap/views/sitemaps/tmpl/default.php | 9 ++- .../com_xmap/views/sitemaps/view.html.php | 12 ++-- administrator/components/com_xmap/xmap.php | 5 ++ administrator/manifests/packages/pkg_xmap.xml | 20 ------ components/com_xmap/controller.php | 4 +- components/com_xmap/displayer.php | 7 +- components/com_xmap/helpers/xmap.php | 12 +++- components/com_xmap/models/sitemap.php | 4 ++ components/com_xmap/router.php | 1 + .../com_xmap/views/xml/tmpl/default.php | 2 +- .../com_xmap/views/xml/tmpl/default_class.php | 4 ++ components/com_xmap/views/xml/view.html.php | 9 +-- components/com_xmap/xmap.php | 8 +-- .../com_xmap => install}/manifest.xml | 0 packages/pkg_xmap.xml | 14 ++++ plugins/xmap/com_content/com_content.php | 9 +-- 27 files changed, 181 insertions(+), 59 deletions(-) create mode 100644 Makefile delete mode 100644 administrator/manifests/packages/pkg_xmap.xml rename {administrator/components/com_xmap => install}/manifest.xml (100%) create mode 100644 packages/pkg_xmap.xml diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..c5b29743 --- /dev/null +++ b/Makefile @@ -0,0 +1,65 @@ +VERSION = "4.0.0" +VERSION2 = $(shell echo $(VERSION)|sed 's/ /-/g') +ZIPFILE = xmap-$(VERSION2).zip +PACKAGES = packages + +# Only set DATE if you need to force the date. +# (Otherwise it uses the current date.) +# DATE = "February 19, 2011" + +all: links parts $(ZIPFILE) + +INSTALLS = xmap_plugin \ + xmap_component + +EXTRAS = + +NAMES = $(INSTALLS) $(EXTRAS) + +ZIPS = $(NAMES:=.zip) + +ZIPIGNORES = -x "*.git*" -x "*.svn*" + +parts: $(ZIPS) + +links: + rm xmap_component/admin xmap_component/front + ln -srf administrator/components/com_xmap xmap_component/admin + ln -srf components/com_xmap xmap_component/front + +%.zip: + @echo "-------------------------------------------------------" + @echo "Creating zip file for: $*" + @rm -f $@ + @(cd $*; zip -r ../$@ * $(ZIPIGNORES)) + +$(ZIPFILE): $(ZIPS) + @echo "-------------------------------------------------------" + @echo "Creating extension zip file: $(ZIPFILE)" + @mv $(INSTALLS:=.zip) packages/ + @(cd $(PACKAGES); zip -r ../$@ * $(ZIPIGNORES)) + @echo "-------------------------------------------------------" + @echo "Finished creating package $(ZIPFILE)." + + +upload: + @echo "-------------------------------------------------------" + @echo "Copying new package $(ZIPFILE) to jmcameron.net" + @scp $(ZIPFILE) jmcameron:/home/jmcameron/webapps/jmcameron/xmap/downloads/ + @echo + +updateweb: + @echo "Updating updates on jmcameron.net..." + @ssh jmcameron.net "cd webapps/jmcameron/xmap/updates; git pull" + + +clean: + @find . -name '*~' -exec rm {} \; + @rm -f _tests.pdf + +veryclean: clean + @rm -f $(ZIPS) packages/*.zip + @rm -f $(ZIPFILE).zip + @rm -rf test/coverage_db + @rm -rf test/coverage_result + diff --git a/administrator/components/com_xmap/controller.php b/administrator/components/com_xmap/controller.php index 855e2445..723f2d8c 100644 --- a/administrator/components/com_xmap/controller.php +++ b/administrator/components/com_xmap/controller.php @@ -9,6 +9,8 @@ defined('_JEXEC') or die; jimport('joomla.application.component.controller'); +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\MVC\Controller\BaseController as JControllerLegacy; /** * Component Controller diff --git a/administrator/components/com_xmap/controllers/sitemap.php b/administrator/components/com_xmap/controllers/sitemap.php index edf6d406..b5f9fc34 100644 --- a/administrator/components/com_xmap/controllers/sitemap.php +++ b/administrator/components/com_xmap/controllers/sitemap.php @@ -8,7 +8,7 @@ // No direct access defined('_JEXEC') or die; - +use Joomla\CMS\MVC\Controller\FormController as JControllerForm; jimport('joomla.application.component.controllerform'); /** diff --git a/administrator/components/com_xmap/helpers/html/xmap.php b/administrator/components/com_xmap/helpers/html/xmap.php index 92954cf5..e4ee21bb 100644 --- a/administrator/components/com_xmap/helpers/html/xmap.php +++ b/administrator/components/com_xmap/helpers/html/xmap.php @@ -9,13 +9,17 @@ // no direct access defined('_JEXEC') or die; +use Joomla\CMS\Table\Table as JTable; +use Joomla\CMS\HTML\HTMLHelper as JHTML; + JTable::addIncludePath( JPATH_COMPONENT . '/tables' ); +JHTML::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_xmap' . DS . 'helpers' .DS . 'html'); /** * @package Xmap * @subpackage com_xmap */ -abstract class JHtmlXmap +abstract class HTMLHelperXmap { /** @@ -48,5 +52,13 @@ public static function changefrequency($name, $value = 'weekly', $j) $options[] = JHTML::_('select.option','never','never'); return JHtml::_('select.genericlist', $options, $name, null, 'value', 'text', $value, $name.$j); } +} + + +if (!JHTML::isRegistered('xmap.priorities')) { + JHTML::register('xmap.priorities', ['HTMLHelperXmap', 'priorities']); +} +if (!JHTML::isRegistered('xmap.changefrequency')) { + JHTML::register('xmap.changefrequency', ['HTMLHelperXmap', 'priorities']); } diff --git a/administrator/components/com_xmap/helpers/xmap.php b/administrator/components/com_xmap/helpers/xmap.php index a6bf90ec..545f8ac7 100644 --- a/administrator/components/com_xmap/helpers/xmap.php +++ b/administrator/components/com_xmap/helpers/xmap.php @@ -9,6 +9,10 @@ // No direct access defined('_JEXEC') or die; +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\Version as JVersion; +use Joomla\CMS\HTML\Helpers\Sidebar as JHtmlSidebar; +use Joomla\CMS\Language\Text as JText; /** * Xmap component helper. diff --git a/administrator/components/com_xmap/models/fields/xmapmenus.php b/administrator/components/com_xmap/models/fields/xmapmenus.php index e604a4db..588382c8 100644 --- a/administrator/components/com_xmap/models/fields/xmapmenus.php +++ b/administrator/components/com_xmap/models/fields/xmapmenus.php @@ -9,9 +9,17 @@ jimport('joomla.html.html'); +use Joomla\CMS\Version as JVersion; +use Joomla\CMS\Language\Text as JText; +use Joomla\CMS\HTML\HTMLHelper as JHTML; +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\Form\Field\ListField as JFormFieldList; + if (version_compare(JVERSION, '4.0', '<')){ -require_once JPATH_LIBRARIES . '/joomla/form/fields/list.php'; + require_once JPATH_LIBRARIES . '/joomla/form/fields/list.php'; } +JHtml::addIncludePath(JPATH_COMPONENT . '/helpers'); + /** * Menus Form Field class for the Xmap Component diff --git a/administrator/components/com_xmap/models/sitemap.php b/administrator/components/com_xmap/models/sitemap.php index 914ba4fa..115fb104 100644 --- a/administrator/components/com_xmap/models/sitemap.php +++ b/administrator/components/com_xmap/models/sitemap.php @@ -7,9 +7,16 @@ // No direct access defined('_JEXEC') or die; -use Joomla\Utilities\ArrayHelper; + jimport('joomla.application.component.modeladmin'); +use Joomla\CMS\Factory as JFactory; +use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\MVC\Model\AdminModel as JModelAdmin; +use Joomla\CMS\Table\Table as JTable; +use Joomla\CMS\Object\CMSObject; +use Joomla\Registry\Registry as JRegistry; + /** * Sitemap model. * @@ -99,7 +106,7 @@ public function getItem($pk = null) // Convert to the JObject before adding other data. $value = $table->getProperties(1); if (version_compare(JVERSION, '4.0', 'ge')){ - $value = ArrayHelper::toObject($value, 'JObject'); + $value = ArrayHelper::toObject($value, 'Joomla\CMS\Object\CMSObject'); } else { $value = JArrayHelper::toObject($value, 'JObject'); } diff --git a/administrator/components/com_xmap/models/sitemaps.php b/administrator/components/com_xmap/models/sitemaps.php index 75413d1d..38fc0965 100644 --- a/administrator/components/com_xmap/models/sitemaps.php +++ b/administrator/components/com_xmap/models/sitemaps.php @@ -10,7 +10,7 @@ jimport('joomla.application.component.modellist'); jimport('joomla.database.query'); - +use Joomla\CMS\MVC\Model\ListModel as JModelList; /** * Sitemaps Model Class * diff --git a/administrator/components/com_xmap/tables/sitemap.php b/administrator/components/com_xmap/tables/sitemap.php index 33b2f6cd..28a48c29 100644 --- a/administrator/components/com_xmap/tables/sitemap.php +++ b/administrator/components/com_xmap/tables/sitemap.php @@ -9,6 +9,8 @@ defined('_JEXEC') or die; use Joomla\CMS\Application\ApplicationHelper; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Table\Table as JTable; + /** * @package Xmap * @subpackage com_xmap diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php b/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php index 13f09beb..329bed07 100644 --- a/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php +++ b/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php @@ -11,7 +11,7 @@ use Joomla\CMS\Form\FormHelper; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; -use Joomla\CMS\Router\Route; +use Joomla\CMS\Router\Route as JRoute; JLoader::import('components.com_xmap.helpers.html.xmap', JPATH_ADMINISTRATOR); $app = Factory::getApplication(); @@ -130,6 +130,6 @@ function submitbutton(task) form->getInput('is_default'); ?> - +
diff --git a/administrator/components/com_xmap/views/sitemap/view.html.php b/administrator/components/com_xmap/views/sitemap/view.html.php index ebbd90c2..f181b8c7 100644 --- a/administrator/components/com_xmap/views/sitemap/view.html.php +++ b/administrator/components/com_xmap/views/sitemap/view.html.php @@ -11,6 +11,10 @@ jimport('joomla.application.component.view'); use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\Version as JVersion; +use Joomla\CMS\HTML\HTMLHelper as JHTML; +use Joomla\CMS\Language\Text as JText; /** * @package Xmap diff --git a/administrator/components/com_xmap/views/sitemaps/tmpl/default.php b/administrator/components/com_xmap/views/sitemaps/tmpl/default.php index 0c098be3..0da5f1f5 100644 --- a/administrator/components/com_xmap/views/sitemaps/tmpl/default.php +++ b/administrator/components/com_xmap/views/sitemaps/tmpl/default.php @@ -8,7 +8,14 @@ // no direct access defined('_JEXEC') or die; - +use Joomla\CMS\HTML\HTMLHelper as JHtml; +use Joomla\CMS\Language\Text as JText; +use Joomla\CMS\Uri\Uri as JUri; +use Joomla\CMS\Version as JVersion; +use Joomla\CMS\Router\Route as JRoute; +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\Date\Date as JDate; + JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); JHtml::_('bootstrap.tooltip'); if(version_compare(JVERSION,'3.0.0','ge')) { diff --git a/administrator/components/com_xmap/views/sitemaps/view.html.php b/administrator/components/com_xmap/views/sitemaps/view.html.php index fdeb9c17..00c13dd0 100644 --- a/administrator/components/com_xmap/views/sitemaps/view.html.php +++ b/administrator/components/com_xmap/views/sitemaps/view.html.php @@ -10,13 +10,11 @@ defined('_JEXEC') or die; jimport('joomla.application.component.view'); - -# For compatibility with older versions of Joola 2.5 -if (!class_exists('JViewLegacy')){ - class JViewLegacy extends JView { - - } -} +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\MVC\View\HtmlView as JViewLegacy; +use Joomla\CMS\Toolbar\ToolbarHelper as JToolbarHelper; +use Joomla\CMS\Version as JVersion; +use Joomla\CMS\Language\Text as JText; /** * @package Xmap diff --git a/administrator/components/com_xmap/xmap.php b/administrator/components/com_xmap/xmap.php index a65914af..2f68af05 100644 --- a/administrator/components/com_xmap/xmap.php +++ b/administrator/components/com_xmap/xmap.php @@ -9,6 +9,11 @@ // no direct access defined('_JEXEC') or die; +use Joomla\CMS\Table\Table as JTable; +use Joomla\CMS\Form\Form as JForm; +use Joomla\CMS\MVC\Controller\AdminController as JController; +use Joomla\CMS\Factory as JFactory; + JTable::addIncludePath( JPATH_COMPONENT.'/tables' ); jimport('joomla.form.form'); diff --git a/administrator/manifests/packages/pkg_xmap.xml b/administrator/manifests/packages/pkg_xmap.xml deleted file mode 100644 index fe3aee85..00000000 --- a/administrator/manifests/packages/pkg_xmap.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - Xmap Package - xmap - 2.3.3 - http://www.jooxmap.com - Joomla! Vargas - http://www.jooxmap.com - The Site Map generator for Joomla! - - com_xmap.zip - plg_com_content.zip - plg_com_kunena.zip - plg_com_sobipro.zip - plg_com_mtree.zip - plg_com_virtuemart.zip - plg_com_weblinks.zip - plg_com_k2.zip - - diff --git a/components/com_xmap/controller.php b/components/com_xmap/controller.php index a0126485..7ed88fe2 100644 --- a/components/com_xmap/controller.php +++ b/components/com_xmap/controller.php @@ -9,8 +9,8 @@ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); -jimport('joomla.application.component.controller'); - +use Joomla\CMS\MVC\Controller\BaseController as JControllerLegacy; +use Joomla\CMS\Factory as JFactory; /** * Xmap Component Controller * diff --git a/components/com_xmap/displayer.php b/components/com_xmap/displayer.php index c64b3e07..a427c86c 100644 --- a/components/com_xmap/displayer.php +++ b/components/com_xmap/displayer.php @@ -8,6 +8,11 @@ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\Date\Date as JDate; +use Joomla\CMS\User\UserHelper as JUserHelper; +use Joomla\CMS\Uri\Uri as JURI; +use Joomla\Registry\Registry as JRegistry; class XmapDisplayer { @@ -130,7 +135,7 @@ protected function printMenuTree($menu,&$items) { $this->changeLevel(1); - $router = XmapHelper::getRouter("site");//JSite::getRouter(); + //$router = XmapHelper::getRouter("site");//JSite::getRouter(); foreach ( $items as $i => $item ) { // Add each menu entry to the root tree. $excludeExternal = false; diff --git a/components/com_xmap/helpers/xmap.php b/components/com_xmap/helpers/xmap.php index a6d287c8..52fcfbc8 100644 --- a/components/com_xmap/helpers/xmap.php +++ b/components/com_xmap/helpers/xmap.php @@ -8,7 +8,13 @@ */ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); - +use Joomla\CMS\Factory as JFactory; +use Joomla\Registry\Registry as JRegistry; +use Joomla\CMS\Component\ComponentHelper as JComponentHelper; +use Joomla\CMS\Uri\Uri as JURI; +use Joomla\CMS\Router\Router as JRouter; +use Joomla\CMS\Router\SiteRouter as JRouterSite; +use Joomla\CMS\Application\SiteApplication; jimport('joomla.database.query'); /** @@ -323,7 +329,9 @@ public static function getURI() { public static function getRouter() { if (version_compare(JVERSION, '4.0', 'ge')){ - return JRouter::getInstance("site"); + $app = SiteApplication::getInstance('site'); + return $app->getRouter(); + //return JRouter::getInstance("site"); } else { return JSite::getRouter(); diff --git a/components/com_xmap/models/sitemap.php b/components/com_xmap/models/sitemap.php index 980fa482..5f84250a 100644 --- a/components/com_xmap/models/sitemap.php +++ b/components/com_xmap/models/sitemap.php @@ -11,6 +11,10 @@ jimport('joomla.application.component.modelitem'); jimport('joomla.database.query'); +use Joomla\CMS\MVC\Model\ItemModel as JModelItem; +use Joomla\CMS\Factory as JFactory; +use Joomla\Registry\Registry as JRegistry; + require_once(JPATH_COMPONENT . '/helpers/xmap.php'); /** diff --git a/components/com_xmap/router.php b/components/com_xmap/router.php index 8736a02f..8bcf29ad 100644 --- a/components/com_xmap/router.php +++ b/components/com_xmap/router.php @@ -6,6 +6,7 @@ * @author Guillermo Vargas (guille@vargas.co.cr) */ defined( '_JEXEC' ) or die( 'Restricted access' ); +use Joomla\CMS\Factory as JFactory; /** * Content Component Route Helper * diff --git a/components/com_xmap/views/xml/tmpl/default.php b/components/com_xmap/views/xml/tmpl/default.php index 991a48bb..25b2a87d 100644 --- a/components/com_xmap/views/xml/tmpl/default.php +++ b/components/com_xmap/views/xml/tmpl/default.php @@ -8,7 +8,7 @@ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); - +use Joomla\CMS\Uri\Uri as JURI; // Create shortcut to parameters. $params = $this->item->params; diff --git a/components/com_xmap/views/xml/tmpl/default_class.php b/components/com_xmap/views/xml/tmpl/default_class.php index 4528d53a..c0ccd7e0 100644 --- a/components/com_xmap/views/xml/tmpl/default_class.php +++ b/components/com_xmap/views/xml/tmpl/default_class.php @@ -9,6 +9,10 @@ defined( '_JEXEC' ) or die( 'Restricted access' ); require_once(JPATH_COMPONENT . '/displayer.php'); +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\Uri\Uri as JURI; +use Joomla\CMS\Router\Route as JRoute; +use Joomla\CMS\Date\Date as JDate; class XmapXmlDisplayer extends XmapDisplayer { diff --git a/components/com_xmap/views/xml/view.html.php b/components/com_xmap/views/xml/view.html.php index 72099a8e..b4282b3f 100644 --- a/components/com_xmap/views/xml/view.html.php +++ b/components/com_xmap/views/xml/view.html.php @@ -11,12 +11,9 @@ jimport('joomla.application.component.view'); -# For compatibility with older versions of Joola 2.5 -if (!class_exists('JViewLegacy')){ - class JViewLegacy extends JView { - - } -} +use Joomla\CMS\MVC\View\HtmlView as JViewLegacy; +use Joomla\CMS\Factory as JFactory; +use Joomla\CMS\Router\Route as JRoute; /** * XML Sitemap View class for the Xmap component diff --git a/components/com_xmap/xmap.php b/components/com_xmap/xmap.php index 96b384d7..13bebba3 100644 --- a/components/com_xmap/xmap.php +++ b/components/com_xmap/xmap.php @@ -10,13 +10,7 @@ // Include dependencies jimport('joomla.application.component.controller'); - -# For compatibility with older versions of Joola 2.5 -if (!class_exists('JControllerLegacy')){ - class JControllerLegacy extends JController { - - } -} +use Joomla\CMS\MVC\Controller\BaseController as JControllerLegacy; require_once(JPATH_COMPONENT.'/displayer.php'); require_once(JPATH_COMPONENT.'/helpers/xmap.php'); diff --git a/administrator/components/com_xmap/manifest.xml b/install/manifest.xml similarity index 100% rename from administrator/components/com_xmap/manifest.xml rename to install/manifest.xml diff --git a/packages/pkg_xmap.xml b/packages/pkg_xmap.xml new file mode 100644 index 00000000..182012c6 --- /dev/null +++ b/packages/pkg_xmap.xml @@ -0,0 +1,14 @@ + + + Xmap Package + xmap + 4.0.0 + http://www.jltryoen.fr + Joomla! Vargas/ JLTryoen + http://www.jooxmap.com + The Site Map generator for Joomla! + + xmap_component.zip + xmap_plugin.zip + + diff --git a/plugins/xmap/com_content/com_content.php b/plugins/xmap/com_content/com_content.php index 743f63e0..4947fb2c 100644 --- a/plugins/xmap/com_content/com_content.php +++ b/plugins/xmap/com_content/com_content.php @@ -10,7 +10,8 @@ //require_once JPATH_SITE . '/components/com_content/helpers/route.php'; //require_once JPATH_SITE . '/components/com_content/helpers/query.php'; use Joomla\Utilities\ArrayHelper; - +use Joomla\CMS\Factory as JFactory; +use Joomla\Component\Content\Site\Helper\RouteHelper as JRouteHelper; /** * Handles standard Joomla's Content articles/categories * @@ -253,7 +254,7 @@ static function getTree($xmap, $parent, &$params) $row = $db->loadObject(); $parent->slug = $row->alias ? ($id . ':' . $row->alias) : $id; - $parent->link = ContentHelperRoute::getArticleRoute($parent->slug, $row->catid); + $parent->link = JRouteHelper::getArticleRoute($parent->slug, $row->catid); $subnodes = XmapHelper::getPagebreaks($row->introtext.$row->fulltext,$parent->link); self::printNodes($xmap, $parent, $params, $subnodes); @@ -320,7 +321,7 @@ static function expandCategory($xmap, $parent, $catid, &$params, $itemid) $item->modified = $item->created; $node->slug = $item->route ? ($item->id . ':' . $item->route) : $item->id; - $node->link = ContentHelperRoute::getCategoryRoute($node->slug); + $node->link = JRouteHelper::getCategoryRoute($node->slug); if (strpos($node->link,'Itemid=')===false) { $node->itemid = $itemid; $node->link .= '&Itemid='.$itemid; @@ -430,7 +431,7 @@ static function includeCategoryContent($xmap, $parent, $catid, &$params,$Itemid) $node->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; //$node->catslug = $item->category_route ? ($catid . ':' . $item->category_route) : $catid; $node->catslug = $item->catid; - $node->link = ContentHelperRoute::getArticleRoute($node->slug, $node->catslug); + $node->link = JRouteHelper::getArticleRoute($node->slug, $node->catslug); // Add images to the article $text = @$item->introtext . @$item->fulltext; From 82c2b11a4e847227422152764fd06928b9f862b2 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Mon, 23 Dec 2024 09:42:57 +0100 Subject: [PATCH 08/12] new file structure for joomla 4.0 --- .../{com_xmap => com_joxmap}/LICENSE.txt | 0 .../models => com_joxmap}/forms/extension.xml | 0 .../forms}/index.html | 0 .../models => com_joxmap}/forms/sitemap.xml | 0 .../{com_xmap/css => com_joxmap}/index.html | 0 .../xmap.php => com_joxmap/joxmap.php} | 0 .../language/cs-CZ/cs-CZ.com_xmap.ini | 0 .../language/cs-CZ/cs-CZ.com_xmap.sys.ini | 0 .../language/en-GB/en-GB.com_xmap.ini | 0 .../language/en-GB/en-GB.com_xmap.sys.ini | 0 .../language/es-ES/es-ES.com_xmap.ini | 0 .../language/es-ES/es-ES.com_xmap.sys.ini | 0 .../language/fa-IR/fa-IR.com_xmap.ini | 0 .../language/fa-IR/fa-IR.com_xmap.sys.ini | 0 .../language/nl-NL/nl-NL.com_xmap.ini | 0 .../language/nl-NL/nl-NL.com_xmap.sys.ini | 0 .../language/ru-RU/ru-RU.com_xmap.ini | 0 .../language/ru-RU/ru-RU.com_xmap.sys.ini | 0 .../elements => com_joxmap/sql}/index.html | 0 .../sql/install.mysql.sql} | 0 .../sql/uninstall.mysql.sql} | 0 .../src/Controller/JoXMapController.php} | 0 .../src/Controller/SiteMapController.php} | 0 .../src/Controller/SiteMapsController.php} | 0 .../src/Controller}/index.html | 0 .../src/Field/XmapMenusField.php} | 0 .../src/Field}/index.html | 0 .../src/Field/modal}/index.html | 0 .../src/Field}/modal/sitemaps.php | 0 .../src/Helper/HTMLHelperXmap.php} | 0 .../src/Helper/XmapHelper.php} | 0 .../src/Helper}/index.html | 0 .../src/Helper}/installer.php | 0 .../src/Model/SiteMapModel.php} | 0 .../src/Model/SiteMapsModel.php} | 0 .../src/Model}/index.html | 0 .../src/Table/JoxmapTable.php} | 0 .../src/Table}/index.html | 0 .../src/View/SiteMap/HtmlView.php} | 0 .../src/View/SiteMap}/index.html | 0 .../src/View/SiteMaps/HtmlView.php} | 0 .../src/View/SiteMaps}/index.html | 0 .../tmpl/SiteMap/edit.php} | 0 .../tmpl/SiteMap}/index.html | 0 .../tmpl/SiteMap}/navigator.php | 0 .../tmpl/SiteMap}/navigator_class.php | 0 .../tmpl/SiteMap}/navigator_links.php | 0 .../tmpl/SiteMaps}/default.php | 0 .../tmpl/SiteMaps}/default_legacy.php | 0 .../tmpl/SiteMaps}/form.php | 0 .../tmpl/SiteMaps}/index.html | 0 .../tmpl/SiteMaps}/modal.php | 0 .../com_xmap/install/install.postgresql.sql | 34 ----- .../com_xmap/install/install.xmap.php | 52 -------- .../com_xmap/install/uninstall.postgresql.sql | 2 - .../com_xmap/views/sitemap/tmpl/edit.php | 120 ------------------ .../views/sitemap/tmpl/edit_legacy.php | 93 -------------- .../com_joxmap/assets/images}/index.html | 0 .../com_joxmap/assets}/index.html | 0 .../assets/xsl/gss.xsl | 0 .../assets/xsl/gssadmin.xsl | 0 .../com_joxmap/assets/xsl}/index.html | 0 .../com_joxmap}/index.html | 0 .../xmap.php => com_joxmap/joxmap.php} | 0 .../language/cs-CZ.com_xmap.ini | 0 .../language/en-GB.com_xmap.ini | 0 .../language/es-ES.com_xmap.ini | 0 .../language/fa-IR.com_xmap.ini | 0 .../language/nl-NL.com_xmap.ini | 0 .../language/ru-RU.com_xmap.ini | 0 .../{com_xmap => com_joxmap}/metadata.xml | 0 .../services/Router.php} | 0 .../src/Controller/AjaxJson.php} | 0 .../src/Controller/DisplayController.php} | 3 + .../src/Controller/JoXmapDisplayer.php} | 0 .../com_joxmap/src/Controller}/index.html | 0 .../src/Helper/XmapHelper.php} | 0 .../css => com_joxmap/src/Helper}/index.html | 0 .../src/Model/SiteMapModel.php} | 0 .../src/Model}/index.html | 0 .../src/View/Html/HtmlView.php} | 0 .../src/View/Html}/index.html | 0 .../src/View/Html}/metadata.xml | 0 .../src/View/Xml/HtmlView.php} | 0 .../tmpl => com_joxmap/tmpl/Html}/default.php | 0 .../tmpl => com_joxmap/tmpl/Html}/default.xml | 0 .../tmpl/Html/default_class.xml} | 0 .../tmpl/Html/default_items.xml} | 0 .../xsl => com_joxmap/tmpl/Html}/index.html | 0 .../tmpl => com_joxmap/tmpl/Xml}/default.php | 0 .../tmpl => com_joxmap/tmpl/Xml}/default.xml | 0 .../tmpl/Xml}/default_class.php | 0 .../tmpl/Xml}/default_items.php | 0 .../tmpl/Xml}/default_xsl.php | 0 .../tmpl/Xml}/index.html | 0 .../xml => com_joxmap/tmpl/Xml}/metadata.xml | 0 components/com_xmap/views/html/index.html | 1 - .../com_xmap/views/html/tmpl/index.html | 1 - components/com_xmap/views/index.html | 1 - components/com_xmap/views/xml/index.html | 1 - components/com_xmap/views/xml/tmpl/index.html | 1 - install/manifest.xml => joxmap.xml | 0 .../components/com_joxmap/css}/index.html | 0 .../components/com_joxmap}/css/xmap.css | 0 .../components/com_joxmap/css/xmapedit.css | 0 .../com_joxmap/elements}/index.html | 0 .../com_joxmap}/elements/sitemap.php | 0 .../components/com_joxmap}/images/arrow.gif | Bin .../com_joxmap}/images/img_blue.gif | Bin .../com_joxmap}/images/img_green.gif | Bin .../com_joxmap}/images/img_grey.gif | Bin .../com_joxmap}/images/img_orange.gif | Bin .../components/com_joxmap}/images/img_red.gif | Bin .../components/com_joxmap/images}/index.html | 0 .../com_joxmap}/images/sitemap-icon.png | Bin .../com_joxmap}/images/sortdown.gif | Bin .../components/com_joxmap}/images/sortup.gif | Bin .../components/com_joxmap}/images/tick.png | Bin .../com_joxmap}/images/txt_blue.gif | Bin .../com_joxmap}/images/txt_green.gif | Bin .../com_joxmap}/images/txt_grey.gif | Bin .../com_joxmap}/images/txt_orange.gif | Bin .../components/com_joxmap}/images/txt_red.gif | Bin .../com_joxmap}/images/unpublished.png | Bin .../com_joxmap}/images/xmap-favicon.png | Bin 125 files changed, 3 insertions(+), 306 deletions(-) rename administrator/components/{com_xmap => com_joxmap}/LICENSE.txt (100%) rename administrator/components/{com_xmap/models => com_joxmap}/forms/extension.xml (100%) rename administrator/components/{com_xmap/controllers => com_joxmap/forms}/index.html (100%) rename administrator/components/{com_xmap/models => com_joxmap}/forms/sitemap.xml (100%) rename administrator/components/{com_xmap/css => com_joxmap}/index.html (100%) rename administrator/components/{com_xmap/xmap.php => com_joxmap/joxmap.php} (100%) rename administrator/components/{com_xmap => com_joxmap}/language/cs-CZ/cs-CZ.com_xmap.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/cs-CZ/cs-CZ.com_xmap.sys.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/en-GB/en-GB.com_xmap.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/en-GB/en-GB.com_xmap.sys.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/es-ES/es-ES.com_xmap.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/es-ES/es-ES.com_xmap.sys.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/fa-IR/fa-IR.com_xmap.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/fa-IR/fa-IR.com_xmap.sys.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/nl-NL/nl-NL.com_xmap.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/nl-NL/nl-NL.com_xmap.sys.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/ru-RU/ru-RU.com_xmap.ini (100%) rename administrator/components/{com_xmap => com_joxmap}/language/ru-RU/ru-RU.com_xmap.sys.ini (100%) rename administrator/components/{com_xmap/elements => com_joxmap/sql}/index.html (100%) rename administrator/components/{com_xmap/install/install.utf8.sql => com_joxmap/sql/install.mysql.sql} (100%) rename administrator/components/{com_xmap/install/uninstall.utf8.sql => com_joxmap/sql/uninstall.mysql.sql} (100%) rename administrator/components/{com_xmap/controller.php => com_joxmap/src/Controller/JoXMapController.php} (100%) rename administrator/components/{com_xmap/controllers/sitemap.php => com_joxmap/src/Controller/SiteMapController.php} (100%) rename administrator/components/{com_xmap/controllers/sitemaps.php => com_joxmap/src/Controller/SiteMapsController.php} (100%) rename administrator/components/{com_xmap/helpers/html => com_joxmap/src/Controller}/index.html (100%) rename administrator/components/{com_xmap/models/fields/xmapmenus.php => com_joxmap/src/Field/XmapMenusField.php} (100%) rename administrator/components/{com_xmap/helpers => com_joxmap/src/Field}/index.html (100%) rename administrator/components/{com_xmap/images => com_joxmap/src/Field/modal}/index.html (100%) rename administrator/components/{com_xmap/models/fields => com_joxmap/src/Field}/modal/sitemaps.php (100%) rename administrator/components/{com_xmap/helpers/html/xmap.php => com_joxmap/src/Helper/HTMLHelperXmap.php} (100%) rename administrator/components/{com_xmap/helpers/xmap.php => com_joxmap/src/Helper/XmapHelper.php} (100%) rename administrator/components/{com_xmap => com_joxmap/src/Helper}/index.html (100%) rename administrator/components/{com_xmap/helpers => com_joxmap/src/Helper}/installer.php (100%) rename administrator/components/{com_xmap/models/sitemap.php => com_joxmap/src/Model/SiteMapModel.php} (100%) rename administrator/components/{com_xmap/models/sitemaps.php => com_joxmap/src/Model/SiteMapsModel.php} (100%) rename administrator/components/{com_xmap/install => com_joxmap/src/Model}/index.html (100%) rename administrator/components/{com_xmap/tables/sitemap.php => com_joxmap/src/Table/JoxmapTable.php} (100%) rename administrator/components/{com_xmap/models/fields => com_joxmap/src/Table}/index.html (100%) rename administrator/components/{com_xmap/views/sitemap/view.html.php => com_joxmap/src/View/SiteMap/HtmlView.php} (100%) rename administrator/components/{com_xmap/models/fields/modal => com_joxmap/src/View/SiteMap}/index.html (100%) rename administrator/components/{com_xmap/views/sitemaps/view.html.php => com_joxmap/src/View/SiteMaps/HtmlView.php} (100%) rename administrator/components/{com_xmap/models/forms => com_joxmap/src/View/SiteMaps}/index.html (100%) rename administrator/components/{com_xmap/views/sitemap/tmpl/edit_new.php => com_joxmap/tmpl/SiteMap/edit.php} (100%) rename administrator/components/{com_xmap/models => com_joxmap/tmpl/SiteMap}/index.html (100%) rename administrator/components/{com_xmap/views/sitemap/tmpl => com_joxmap/tmpl/SiteMap}/navigator.php (100%) rename administrator/components/{com_xmap/views/sitemap/tmpl => com_joxmap/tmpl/SiteMap}/navigator_class.php (100%) rename administrator/components/{com_xmap/views/sitemap/tmpl => com_joxmap/tmpl/SiteMap}/navigator_links.php (100%) rename administrator/components/{com_xmap/views/sitemaps/tmpl => com_joxmap/tmpl/SiteMaps}/default.php (100%) rename administrator/components/{com_xmap/views/sitemaps/tmpl => com_joxmap/tmpl/SiteMaps}/default_legacy.php (100%) rename administrator/components/{com_xmap/views/sitemaps/tmpl => com_joxmap/tmpl/SiteMaps}/form.php (100%) rename administrator/components/{com_xmap/tables => com_joxmap/tmpl/SiteMaps}/index.html (100%) rename administrator/components/{com_xmap/views/sitemaps/tmpl => com_joxmap/tmpl/SiteMaps}/modal.php (100%) delete mode 100644 administrator/components/com_xmap/install/install.postgresql.sql delete mode 100644 administrator/components/com_xmap/install/install.xmap.php delete mode 100644 administrator/components/com_xmap/install/uninstall.postgresql.sql delete mode 100644 administrator/components/com_xmap/views/sitemap/tmpl/edit.php delete mode 100644 administrator/components/com_xmap/views/sitemap/tmpl/edit_legacy.php rename {administrator/components/com_xmap/views => components/com_joxmap/assets/images}/index.html (100%) rename {administrator/components/com_xmap/views/sitemap => components/com_joxmap/assets}/index.html (100%) rename components/{com_xmap => com_joxmap}/assets/xsl/gss.xsl (100%) rename components/{com_xmap => com_joxmap}/assets/xsl/gssadmin.xsl (100%) rename {administrator/components/com_xmap/views/sitemap/tmpl => components/com_joxmap/assets/xsl}/index.html (100%) rename {administrator/components/com_xmap/views/sitemaps => components/com_joxmap}/index.html (100%) rename components/{com_xmap/xmap.php => com_joxmap/joxmap.php} (100%) rename components/{com_xmap => com_joxmap}/language/cs-CZ.com_xmap.ini (100%) rename components/{com_xmap => com_joxmap}/language/en-GB.com_xmap.ini (100%) rename components/{com_xmap => com_joxmap}/language/es-ES.com_xmap.ini (100%) rename components/{com_xmap => com_joxmap}/language/fa-IR.com_xmap.ini (100%) rename components/{com_xmap => com_joxmap}/language/nl-NL.com_xmap.ini (100%) rename components/{com_xmap => com_joxmap}/language/ru-RU.com_xmap.ini (100%) rename components/{com_xmap => com_joxmap}/metadata.xml (100%) rename components/{com_xmap/router.php => com_joxmap/services/Router.php} (100%) rename components/{com_xmap/controllers/ajax.json.php => com_joxmap/src/Controller/AjaxJson.php} (100%) rename components/{com_xmap/controller.php => com_joxmap/src/Controller/DisplayController.php} (97%) rename components/{com_xmap/displayer.php => com_joxmap/src/Controller/JoXmapDisplayer.php} (100%) rename {administrator/components/com_xmap/views/sitemaps/tmpl => components/com_joxmap/src/Controller}/index.html (100%) mode change 100644 => 100755 rename components/{com_xmap/helpers/xmap.php => com_joxmap/src/Helper/XmapHelper.php} (100%) rename components/{com_xmap/assets/css => com_joxmap/src/Helper}/index.html (100%) rename components/{com_xmap/models/sitemap.php => com_joxmap/src/Model/SiteMapModel.php} (100%) rename components/{com_xmap/assets/images => com_joxmap/src/Model}/index.html (100%) rename components/{com_xmap/views/html/view.html.php => com_joxmap/src/View/Html/HtmlView.php} (100%) rename components/{com_xmap/assets => com_joxmap/src/View/Html}/index.html (100%) rename components/{com_xmap/views/html => com_joxmap/src/View/Html}/metadata.xml (100%) rename components/{com_xmap/views/xml/view.html.php => com_joxmap/src/View/Xml/HtmlView.php} (100%) rename components/{com_xmap/views/html/tmpl => com_joxmap/tmpl/Html}/default.php (100%) rename components/{com_xmap/views/html/tmpl => com_joxmap/tmpl/Html}/default.xml (100%) rename components/{com_xmap/views/html/tmpl/default_class.php => com_joxmap/tmpl/Html/default_class.xml} (100%) rename components/{com_xmap/views/html/tmpl/default_items.php => com_joxmap/tmpl/Html/default_items.xml} (100%) rename components/{com_xmap/assets/xsl => com_joxmap/tmpl/Html}/index.html (100%) rename components/{com_xmap/views/xml/tmpl => com_joxmap/tmpl/Xml}/default.php (100%) rename components/{com_xmap/views/xml/tmpl => com_joxmap/tmpl/Xml}/default.xml (100%) rename components/{com_xmap/views/xml/tmpl => com_joxmap/tmpl/Xml}/default_class.php (100%) rename components/{com_xmap/views/xml/tmpl => com_joxmap/tmpl/Xml}/default_items.php (100%) rename components/{com_xmap/views/xml/tmpl => com_joxmap/tmpl/Xml}/default_xsl.php (100%) rename components/{com_xmap/controllers => com_joxmap/tmpl/Xml}/index.html (100%) mode change 100755 => 100644 rename components/{com_xmap/views/xml => com_joxmap/tmpl/Xml}/metadata.xml (100%) delete mode 100644 components/com_xmap/views/html/index.html delete mode 100644 components/com_xmap/views/html/tmpl/index.html delete mode 100644 components/com_xmap/views/index.html delete mode 100644 components/com_xmap/views/xml/index.html delete mode 100644 components/com_xmap/views/xml/tmpl/index.html rename install/manifest.xml => joxmap.xml (100%) rename {components/com_xmap/helpers => media/components/com_joxmap/css}/index.html (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/css/xmap.css (100%) rename administrator/components/com_xmap/css/xmap.css => media/components/com_joxmap/css/xmapedit.css (100%) rename {components/com_xmap => media/components/com_joxmap/elements}/index.html (100%) rename {administrator/components/com_xmap => media/components/com_joxmap}/elements/sitemap.php (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/arrow.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/img_blue.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/img_green.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/img_grey.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/img_orange.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/img_red.gif (100%) rename {components/com_xmap/models => media/components/com_joxmap/images}/index.html (100%) rename {administrator/components/com_xmap => media/components/com_joxmap}/images/sitemap-icon.png (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/sortdown.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/sortup.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/tick.png (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/txt_blue.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/txt_green.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/txt_grey.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/txt_orange.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/txt_red.gif (100%) rename {components/com_xmap/assets => media/components/com_joxmap}/images/unpublished.png (100%) rename {administrator/components/com_xmap => media/components/com_joxmap}/images/xmap-favicon.png (100%) diff --git a/administrator/components/com_xmap/LICENSE.txt b/administrator/components/com_joxmap/LICENSE.txt similarity index 100% rename from administrator/components/com_xmap/LICENSE.txt rename to administrator/components/com_joxmap/LICENSE.txt diff --git a/administrator/components/com_xmap/models/forms/extension.xml b/administrator/components/com_joxmap/forms/extension.xml similarity index 100% rename from administrator/components/com_xmap/models/forms/extension.xml rename to administrator/components/com_joxmap/forms/extension.xml diff --git a/administrator/components/com_xmap/controllers/index.html b/administrator/components/com_joxmap/forms/index.html similarity index 100% rename from administrator/components/com_xmap/controllers/index.html rename to administrator/components/com_joxmap/forms/index.html diff --git a/administrator/components/com_xmap/models/forms/sitemap.xml b/administrator/components/com_joxmap/forms/sitemap.xml similarity index 100% rename from administrator/components/com_xmap/models/forms/sitemap.xml rename to administrator/components/com_joxmap/forms/sitemap.xml diff --git a/administrator/components/com_xmap/css/index.html b/administrator/components/com_joxmap/index.html similarity index 100% rename from administrator/components/com_xmap/css/index.html rename to administrator/components/com_joxmap/index.html diff --git a/administrator/components/com_xmap/xmap.php b/administrator/components/com_joxmap/joxmap.php similarity index 100% rename from administrator/components/com_xmap/xmap.php rename to administrator/components/com_joxmap/joxmap.php diff --git a/administrator/components/com_xmap/language/cs-CZ/cs-CZ.com_xmap.ini b/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.ini similarity index 100% rename from administrator/components/com_xmap/language/cs-CZ/cs-CZ.com_xmap.ini rename to administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.ini diff --git a/administrator/components/com_xmap/language/cs-CZ/cs-CZ.com_xmap.sys.ini b/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.sys.ini similarity index 100% rename from administrator/components/com_xmap/language/cs-CZ/cs-CZ.com_xmap.sys.ini rename to administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.sys.ini diff --git a/administrator/components/com_xmap/language/en-GB/en-GB.com_xmap.ini b/administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.ini similarity index 100% rename from administrator/components/com_xmap/language/en-GB/en-GB.com_xmap.ini rename to administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.ini diff --git a/administrator/components/com_xmap/language/en-GB/en-GB.com_xmap.sys.ini b/administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.sys.ini similarity index 100% rename from administrator/components/com_xmap/language/en-GB/en-GB.com_xmap.sys.ini rename to administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.sys.ini diff --git a/administrator/components/com_xmap/language/es-ES/es-ES.com_xmap.ini b/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.ini similarity index 100% rename from administrator/components/com_xmap/language/es-ES/es-ES.com_xmap.ini rename to administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.ini diff --git a/administrator/components/com_xmap/language/es-ES/es-ES.com_xmap.sys.ini b/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.sys.ini similarity index 100% rename from administrator/components/com_xmap/language/es-ES/es-ES.com_xmap.sys.ini rename to administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.sys.ini diff --git a/administrator/components/com_xmap/language/fa-IR/fa-IR.com_xmap.ini b/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.ini similarity index 100% rename from administrator/components/com_xmap/language/fa-IR/fa-IR.com_xmap.ini rename to administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.ini diff --git a/administrator/components/com_xmap/language/fa-IR/fa-IR.com_xmap.sys.ini b/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.sys.ini similarity index 100% rename from administrator/components/com_xmap/language/fa-IR/fa-IR.com_xmap.sys.ini rename to administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.sys.ini diff --git a/administrator/components/com_xmap/language/nl-NL/nl-NL.com_xmap.ini b/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.ini similarity index 100% rename from administrator/components/com_xmap/language/nl-NL/nl-NL.com_xmap.ini rename to administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.ini diff --git a/administrator/components/com_xmap/language/nl-NL/nl-NL.com_xmap.sys.ini b/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.sys.ini similarity index 100% rename from administrator/components/com_xmap/language/nl-NL/nl-NL.com_xmap.sys.ini rename to administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.sys.ini diff --git a/administrator/components/com_xmap/language/ru-RU/ru-RU.com_xmap.ini b/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.ini similarity index 100% rename from administrator/components/com_xmap/language/ru-RU/ru-RU.com_xmap.ini rename to administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.ini diff --git a/administrator/components/com_xmap/language/ru-RU/ru-RU.com_xmap.sys.ini b/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.sys.ini similarity index 100% rename from administrator/components/com_xmap/language/ru-RU/ru-RU.com_xmap.sys.ini rename to administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.sys.ini diff --git a/administrator/components/com_xmap/elements/index.html b/administrator/components/com_joxmap/sql/index.html similarity index 100% rename from administrator/components/com_xmap/elements/index.html rename to administrator/components/com_joxmap/sql/index.html diff --git a/administrator/components/com_xmap/install/install.utf8.sql b/administrator/components/com_joxmap/sql/install.mysql.sql similarity index 100% rename from administrator/components/com_xmap/install/install.utf8.sql rename to administrator/components/com_joxmap/sql/install.mysql.sql diff --git a/administrator/components/com_xmap/install/uninstall.utf8.sql b/administrator/components/com_joxmap/sql/uninstall.mysql.sql similarity index 100% rename from administrator/components/com_xmap/install/uninstall.utf8.sql rename to administrator/components/com_joxmap/sql/uninstall.mysql.sql diff --git a/administrator/components/com_xmap/controller.php b/administrator/components/com_joxmap/src/Controller/JoXMapController.php similarity index 100% rename from administrator/components/com_xmap/controller.php rename to administrator/components/com_joxmap/src/Controller/JoXMapController.php diff --git a/administrator/components/com_xmap/controllers/sitemap.php b/administrator/components/com_joxmap/src/Controller/SiteMapController.php similarity index 100% rename from administrator/components/com_xmap/controllers/sitemap.php rename to administrator/components/com_joxmap/src/Controller/SiteMapController.php diff --git a/administrator/components/com_xmap/controllers/sitemaps.php b/administrator/components/com_joxmap/src/Controller/SiteMapsController.php similarity index 100% rename from administrator/components/com_xmap/controllers/sitemaps.php rename to administrator/components/com_joxmap/src/Controller/SiteMapsController.php diff --git a/administrator/components/com_xmap/helpers/html/index.html b/administrator/components/com_joxmap/src/Controller/index.html similarity index 100% rename from administrator/components/com_xmap/helpers/html/index.html rename to administrator/components/com_joxmap/src/Controller/index.html diff --git a/administrator/components/com_xmap/models/fields/xmapmenus.php b/administrator/components/com_joxmap/src/Field/XmapMenusField.php similarity index 100% rename from administrator/components/com_xmap/models/fields/xmapmenus.php rename to administrator/components/com_joxmap/src/Field/XmapMenusField.php diff --git a/administrator/components/com_xmap/helpers/index.html b/administrator/components/com_joxmap/src/Field/index.html similarity index 100% rename from administrator/components/com_xmap/helpers/index.html rename to administrator/components/com_joxmap/src/Field/index.html diff --git a/administrator/components/com_xmap/images/index.html b/administrator/components/com_joxmap/src/Field/modal/index.html similarity index 100% rename from administrator/components/com_xmap/images/index.html rename to administrator/components/com_joxmap/src/Field/modal/index.html diff --git a/administrator/components/com_xmap/models/fields/modal/sitemaps.php b/administrator/components/com_joxmap/src/Field/modal/sitemaps.php similarity index 100% rename from administrator/components/com_xmap/models/fields/modal/sitemaps.php rename to administrator/components/com_joxmap/src/Field/modal/sitemaps.php diff --git a/administrator/components/com_xmap/helpers/html/xmap.php b/administrator/components/com_joxmap/src/Helper/HTMLHelperXmap.php similarity index 100% rename from administrator/components/com_xmap/helpers/html/xmap.php rename to administrator/components/com_joxmap/src/Helper/HTMLHelperXmap.php diff --git a/administrator/components/com_xmap/helpers/xmap.php b/administrator/components/com_joxmap/src/Helper/XmapHelper.php similarity index 100% rename from administrator/components/com_xmap/helpers/xmap.php rename to administrator/components/com_joxmap/src/Helper/XmapHelper.php diff --git a/administrator/components/com_xmap/index.html b/administrator/components/com_joxmap/src/Helper/index.html similarity index 100% rename from administrator/components/com_xmap/index.html rename to administrator/components/com_joxmap/src/Helper/index.html diff --git a/administrator/components/com_xmap/helpers/installer.php b/administrator/components/com_joxmap/src/Helper/installer.php similarity index 100% rename from administrator/components/com_xmap/helpers/installer.php rename to administrator/components/com_joxmap/src/Helper/installer.php diff --git a/administrator/components/com_xmap/models/sitemap.php b/administrator/components/com_joxmap/src/Model/SiteMapModel.php similarity index 100% rename from administrator/components/com_xmap/models/sitemap.php rename to administrator/components/com_joxmap/src/Model/SiteMapModel.php diff --git a/administrator/components/com_xmap/models/sitemaps.php b/administrator/components/com_joxmap/src/Model/SiteMapsModel.php similarity index 100% rename from administrator/components/com_xmap/models/sitemaps.php rename to administrator/components/com_joxmap/src/Model/SiteMapsModel.php diff --git a/administrator/components/com_xmap/install/index.html b/administrator/components/com_joxmap/src/Model/index.html similarity index 100% rename from administrator/components/com_xmap/install/index.html rename to administrator/components/com_joxmap/src/Model/index.html diff --git a/administrator/components/com_xmap/tables/sitemap.php b/administrator/components/com_joxmap/src/Table/JoxmapTable.php similarity index 100% rename from administrator/components/com_xmap/tables/sitemap.php rename to administrator/components/com_joxmap/src/Table/JoxmapTable.php diff --git a/administrator/components/com_xmap/models/fields/index.html b/administrator/components/com_joxmap/src/Table/index.html similarity index 100% rename from administrator/components/com_xmap/models/fields/index.html rename to administrator/components/com_joxmap/src/Table/index.html diff --git a/administrator/components/com_xmap/views/sitemap/view.html.php b/administrator/components/com_joxmap/src/View/SiteMap/HtmlView.php similarity index 100% rename from administrator/components/com_xmap/views/sitemap/view.html.php rename to administrator/components/com_joxmap/src/View/SiteMap/HtmlView.php diff --git a/administrator/components/com_xmap/models/fields/modal/index.html b/administrator/components/com_joxmap/src/View/SiteMap/index.html similarity index 100% rename from administrator/components/com_xmap/models/fields/modal/index.html rename to administrator/components/com_joxmap/src/View/SiteMap/index.html diff --git a/administrator/components/com_xmap/views/sitemaps/view.html.php b/administrator/components/com_joxmap/src/View/SiteMaps/HtmlView.php similarity index 100% rename from administrator/components/com_xmap/views/sitemaps/view.html.php rename to administrator/components/com_joxmap/src/View/SiteMaps/HtmlView.php diff --git a/administrator/components/com_xmap/models/forms/index.html b/administrator/components/com_joxmap/src/View/SiteMaps/index.html similarity index 100% rename from administrator/components/com_xmap/models/forms/index.html rename to administrator/components/com_joxmap/src/View/SiteMaps/index.html diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php b/administrator/components/com_joxmap/tmpl/SiteMap/edit.php similarity index 100% rename from administrator/components/com_xmap/views/sitemap/tmpl/edit_new.php rename to administrator/components/com_joxmap/tmpl/SiteMap/edit.php diff --git a/administrator/components/com_xmap/models/index.html b/administrator/components/com_joxmap/tmpl/SiteMap/index.html similarity index 100% rename from administrator/components/com_xmap/models/index.html rename to administrator/components/com_joxmap/tmpl/SiteMap/index.html diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/navigator.php b/administrator/components/com_joxmap/tmpl/SiteMap/navigator.php similarity index 100% rename from administrator/components/com_xmap/views/sitemap/tmpl/navigator.php rename to administrator/components/com_joxmap/tmpl/SiteMap/navigator.php diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/navigator_class.php b/administrator/components/com_joxmap/tmpl/SiteMap/navigator_class.php similarity index 100% rename from administrator/components/com_xmap/views/sitemap/tmpl/navigator_class.php rename to administrator/components/com_joxmap/tmpl/SiteMap/navigator_class.php diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/navigator_links.php b/administrator/components/com_joxmap/tmpl/SiteMap/navigator_links.php similarity index 100% rename from administrator/components/com_xmap/views/sitemap/tmpl/navigator_links.php rename to administrator/components/com_joxmap/tmpl/SiteMap/navigator_links.php diff --git a/administrator/components/com_xmap/views/sitemaps/tmpl/default.php b/administrator/components/com_joxmap/tmpl/SiteMaps/default.php similarity index 100% rename from administrator/components/com_xmap/views/sitemaps/tmpl/default.php rename to administrator/components/com_joxmap/tmpl/SiteMaps/default.php diff --git a/administrator/components/com_xmap/views/sitemaps/tmpl/default_legacy.php b/administrator/components/com_joxmap/tmpl/SiteMaps/default_legacy.php similarity index 100% rename from administrator/components/com_xmap/views/sitemaps/tmpl/default_legacy.php rename to administrator/components/com_joxmap/tmpl/SiteMaps/default_legacy.php diff --git a/administrator/components/com_xmap/views/sitemaps/tmpl/form.php b/administrator/components/com_joxmap/tmpl/SiteMaps/form.php similarity index 100% rename from administrator/components/com_xmap/views/sitemaps/tmpl/form.php rename to administrator/components/com_joxmap/tmpl/SiteMaps/form.php diff --git a/administrator/components/com_xmap/tables/index.html b/administrator/components/com_joxmap/tmpl/SiteMaps/index.html similarity index 100% rename from administrator/components/com_xmap/tables/index.html rename to administrator/components/com_joxmap/tmpl/SiteMaps/index.html diff --git a/administrator/components/com_xmap/views/sitemaps/tmpl/modal.php b/administrator/components/com_joxmap/tmpl/SiteMaps/modal.php similarity index 100% rename from administrator/components/com_xmap/views/sitemaps/tmpl/modal.php rename to administrator/components/com_joxmap/tmpl/SiteMaps/modal.php diff --git a/administrator/components/com_xmap/install/install.postgresql.sql b/administrator/components/com_xmap/install/install.postgresql.sql deleted file mode 100644 index 298b53fd..00000000 --- a/administrator/components/com_xmap/install/install.postgresql.sql +++ /dev/null @@ -1,34 +0,0 @@ -CREATE TABLE "#__xmap_sitemap" ( - "id" serial NOT NULL, - "title" character varying(255) DEFAULT NULL, - "alias" character varying(255) DEFAULT NULL, - "introtext" text DEFAULT NULL, - "metadesc" text DEFAULT NULL, - "metakey" text DEFAULT NULL, - "attribs" text DEFAULT NULL, - "selections" text DEFAULT NULL, - "excluded_items" text DEFAULT NULL, - "is_default" integer DEFAULT 0, - "state" integer DEFAULT NULL, - "access" integer DEFAULT NULL, - "created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - "count_xml" integer DEFAULT NULL, - "count_html" integer DEFAULT NULL, - "views_xml" integer DEFAULT NULL, - "views_html" integer DEFAULT NULL, - "lastvisit_xml" integer DEFAULT NULL, - "lastvisit_html" integer DEFAULT NULL, - PRIMARY KEY ("id") -); - -CREATE TABLE "#__xmap_items" ( - "uid" character varying(100) NOT NULL, - "itemid" integer NOT NULL, - "view" character varying(10) NOT NULL, - "sitemap_id" integer NOT NULL, - "properties" varchar(300) DEFAULT NULL, - PRIMARY KEY ("uid","itemid","view","sitemap_id") -); - -CREATE INDEX "#__xmap_items_idx_uid" on "#__xmap_items" ("uid", "itemid"); -CREATE INDEX "#__xmap_items_idx_view" on "#__xmap_items" ("view"); diff --git a/administrator/components/com_xmap/install/install.xmap.php b/administrator/components/com_xmap/install/install.xmap.php deleted file mode 100644 index 38653718..00000000 --- a/administrator/components/com_xmap/install/install.xmap.php +++ /dev/null @@ -1,52 +0,0 @@ -', JText::_("XMAP_INSTALLING_XMAP"), ''; - } - - /** - * Function called when the component is updated - * - * @param JInstallerComponent $adapter - */ - function update($adapter) - { - echo '

', JText::_("XMAP_UPGRADING_XMAP"), '

'; - } - - - /** - * Function called when the component is uninstalled - * - * @param JInstallerComponent $adapter - */ - function uninstall($adapter) - { - - } - -} diff --git a/administrator/components/com_xmap/install/uninstall.postgresql.sql b/administrator/components/com_xmap/install/uninstall.postgresql.sql deleted file mode 100644 index 00acfd25..00000000 --- a/administrator/components/com_xmap/install/uninstall.postgresql.sql +++ /dev/null @@ -1,2 +0,0 @@ -drop table "#__xmap_items"; -drop table "#__xmap_sitemap"; \ No newline at end of file diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/edit.php b/administrator/components/com_xmap/views/sitemap/tmpl/edit.php deleted file mode 100644 index 1dfd4308..00000000 --- a/administrator/components/com_xmap/views/sitemap/tmpl/edit.php +++ /dev/null @@ -1,120 +0,0 @@ - - -
-
- -
- - -
-
-
-
-
- form->getLabel('title'); ?> -
- form->getInput('title'); ?> -
-
-
- form->getLabel('alias'); ?> -
- form->getInput('alias'); ?> -
-
-
- form->getLabel('state'); ?> -
- form->getInput('state'); ?> -
-
-
- form->getLabel('access'); ?> -
- form->getInput('access'); ?> -
-
-
-
- form->getLabel('introtext'); ?>
-
-
- form->getInput('introtext'); ?> -
-
-
-
-
- -
-
- form->getInput('selections'); ?> -
-
- form->getFieldsets('attribs'); - foreach ($fieldSets as $name => $fieldSet) : - ?> -
- description) && trim($fieldSet->description)) : - echo '

' . $this->escape(JText::_($fieldSet->description)) . '

'; - endif; - - foreach ($this->form->getFieldset($name) as $field) : - ?> -
- label; ?> -
- input; ?> -
-
- -
- -
-
-
- - - form->getInput('is_default'); ?> - -
-
diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/edit_legacy.php b/administrator/components/com_xmap/views/sitemap/tmpl/edit_legacy.php deleted file mode 100644 index 89b75808..00000000 --- a/administrator/components/com_xmap/views/sitemap/tmpl/edit_legacy.php +++ /dev/null @@ -1,93 +0,0 @@ - - - -
- -
-
- form->getLabel('id'); ?> - form->getInput('id'); ?> - - form->getLabel('title'); ?> - form->getInput('title'); ?> - - form->getLabel('alias'); ?> - form->getInput('alias'); ?> - - form->getLabel('state'); ?> - form->getInput('state'); ?> - - form->getLabel('access'); ?> - form->getInput('access'); ?> - -
- form->getLabel('introtext'); ?>
-
- form->getInput('introtext'); ?> -
-
- -
- item->id, array('useCookie' => 1)); ?> - - form->getInput('selections'); ?> - form->getFieldsets('attribs'); - foreach ($fieldSets as $name => $fieldSet) : - echo JHtml::_('sliders.panel', JText::_($fieldSet->label), $name . '-options'); - if (isset($fieldSet->description) && trim($fieldSet->description)) : - echo '

' . $this->escape(JText::_($fieldSet->description)) . '

'; - endif; - ?> -
-
    - form->getFieldset($name) as $field) : ?> -
  • - label; ?> - input; ?> -
  • - -
-
- - - -
- - - form->getInput('is_default'); ?> - -
-
diff --git a/administrator/components/com_xmap/views/index.html b/components/com_joxmap/assets/images/index.html similarity index 100% rename from administrator/components/com_xmap/views/index.html rename to components/com_joxmap/assets/images/index.html diff --git a/administrator/components/com_xmap/views/sitemap/index.html b/components/com_joxmap/assets/index.html similarity index 100% rename from administrator/components/com_xmap/views/sitemap/index.html rename to components/com_joxmap/assets/index.html diff --git a/components/com_xmap/assets/xsl/gss.xsl b/components/com_joxmap/assets/xsl/gss.xsl similarity index 100% rename from components/com_xmap/assets/xsl/gss.xsl rename to components/com_joxmap/assets/xsl/gss.xsl diff --git a/components/com_xmap/assets/xsl/gssadmin.xsl b/components/com_joxmap/assets/xsl/gssadmin.xsl similarity index 100% rename from components/com_xmap/assets/xsl/gssadmin.xsl rename to components/com_joxmap/assets/xsl/gssadmin.xsl diff --git a/administrator/components/com_xmap/views/sitemap/tmpl/index.html b/components/com_joxmap/assets/xsl/index.html similarity index 100% rename from administrator/components/com_xmap/views/sitemap/tmpl/index.html rename to components/com_joxmap/assets/xsl/index.html diff --git a/administrator/components/com_xmap/views/sitemaps/index.html b/components/com_joxmap/index.html similarity index 100% rename from administrator/components/com_xmap/views/sitemaps/index.html rename to components/com_joxmap/index.html diff --git a/components/com_xmap/xmap.php b/components/com_joxmap/joxmap.php similarity index 100% rename from components/com_xmap/xmap.php rename to components/com_joxmap/joxmap.php diff --git a/components/com_xmap/language/cs-CZ.com_xmap.ini b/components/com_joxmap/language/cs-CZ.com_xmap.ini similarity index 100% rename from components/com_xmap/language/cs-CZ.com_xmap.ini rename to components/com_joxmap/language/cs-CZ.com_xmap.ini diff --git a/components/com_xmap/language/en-GB.com_xmap.ini b/components/com_joxmap/language/en-GB.com_xmap.ini similarity index 100% rename from components/com_xmap/language/en-GB.com_xmap.ini rename to components/com_joxmap/language/en-GB.com_xmap.ini diff --git a/components/com_xmap/language/es-ES.com_xmap.ini b/components/com_joxmap/language/es-ES.com_xmap.ini similarity index 100% rename from components/com_xmap/language/es-ES.com_xmap.ini rename to components/com_joxmap/language/es-ES.com_xmap.ini diff --git a/components/com_xmap/language/fa-IR.com_xmap.ini b/components/com_joxmap/language/fa-IR.com_xmap.ini similarity index 100% rename from components/com_xmap/language/fa-IR.com_xmap.ini rename to components/com_joxmap/language/fa-IR.com_xmap.ini diff --git a/components/com_xmap/language/nl-NL.com_xmap.ini b/components/com_joxmap/language/nl-NL.com_xmap.ini similarity index 100% rename from components/com_xmap/language/nl-NL.com_xmap.ini rename to components/com_joxmap/language/nl-NL.com_xmap.ini diff --git a/components/com_xmap/language/ru-RU.com_xmap.ini b/components/com_joxmap/language/ru-RU.com_xmap.ini similarity index 100% rename from components/com_xmap/language/ru-RU.com_xmap.ini rename to components/com_joxmap/language/ru-RU.com_xmap.ini diff --git a/components/com_xmap/metadata.xml b/components/com_joxmap/metadata.xml similarity index 100% rename from components/com_xmap/metadata.xml rename to components/com_joxmap/metadata.xml diff --git a/components/com_xmap/router.php b/components/com_joxmap/services/Router.php similarity index 100% rename from components/com_xmap/router.php rename to components/com_joxmap/services/Router.php diff --git a/components/com_xmap/controllers/ajax.json.php b/components/com_joxmap/src/Controller/AjaxJson.php similarity index 100% rename from components/com_xmap/controllers/ajax.json.php rename to components/com_joxmap/src/Controller/AjaxJson.php diff --git a/components/com_xmap/controller.php b/components/com_joxmap/src/Controller/DisplayController.php similarity index 97% rename from components/com_xmap/controller.php rename to components/com_joxmap/src/Controller/DisplayController.php index 7ed88fe2..f757e0ed 100644 --- a/components/com_xmap/controller.php +++ b/components/com_joxmap/src/Controller/DisplayController.php @@ -6,6 +6,9 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Guillermo Vargas (guille@vargas.co.cr) */ + +namespace JLTRY\Component\JoXmap\Site\Controller; + // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); diff --git a/components/com_xmap/displayer.php b/components/com_joxmap/src/Controller/JoXmapDisplayer.php similarity index 100% rename from components/com_xmap/displayer.php rename to components/com_joxmap/src/Controller/JoXmapDisplayer.php diff --git a/administrator/components/com_xmap/views/sitemaps/tmpl/index.html b/components/com_joxmap/src/Controller/index.html old mode 100644 new mode 100755 similarity index 100% rename from administrator/components/com_xmap/views/sitemaps/tmpl/index.html rename to components/com_joxmap/src/Controller/index.html diff --git a/components/com_xmap/helpers/xmap.php b/components/com_joxmap/src/Helper/XmapHelper.php similarity index 100% rename from components/com_xmap/helpers/xmap.php rename to components/com_joxmap/src/Helper/XmapHelper.php diff --git a/components/com_xmap/assets/css/index.html b/components/com_joxmap/src/Helper/index.html similarity index 100% rename from components/com_xmap/assets/css/index.html rename to components/com_joxmap/src/Helper/index.html diff --git a/components/com_xmap/models/sitemap.php b/components/com_joxmap/src/Model/SiteMapModel.php similarity index 100% rename from components/com_xmap/models/sitemap.php rename to components/com_joxmap/src/Model/SiteMapModel.php diff --git a/components/com_xmap/assets/images/index.html b/components/com_joxmap/src/Model/index.html similarity index 100% rename from components/com_xmap/assets/images/index.html rename to components/com_joxmap/src/Model/index.html diff --git a/components/com_xmap/views/html/view.html.php b/components/com_joxmap/src/View/Html/HtmlView.php similarity index 100% rename from components/com_xmap/views/html/view.html.php rename to components/com_joxmap/src/View/Html/HtmlView.php diff --git a/components/com_xmap/assets/index.html b/components/com_joxmap/src/View/Html/index.html similarity index 100% rename from components/com_xmap/assets/index.html rename to components/com_joxmap/src/View/Html/index.html diff --git a/components/com_xmap/views/html/metadata.xml b/components/com_joxmap/src/View/Html/metadata.xml similarity index 100% rename from components/com_xmap/views/html/metadata.xml rename to components/com_joxmap/src/View/Html/metadata.xml diff --git a/components/com_xmap/views/xml/view.html.php b/components/com_joxmap/src/View/Xml/HtmlView.php similarity index 100% rename from components/com_xmap/views/xml/view.html.php rename to components/com_joxmap/src/View/Xml/HtmlView.php diff --git a/components/com_xmap/views/html/tmpl/default.php b/components/com_joxmap/tmpl/Html/default.php similarity index 100% rename from components/com_xmap/views/html/tmpl/default.php rename to components/com_joxmap/tmpl/Html/default.php diff --git a/components/com_xmap/views/html/tmpl/default.xml b/components/com_joxmap/tmpl/Html/default.xml similarity index 100% rename from components/com_xmap/views/html/tmpl/default.xml rename to components/com_joxmap/tmpl/Html/default.xml diff --git a/components/com_xmap/views/html/tmpl/default_class.php b/components/com_joxmap/tmpl/Html/default_class.xml similarity index 100% rename from components/com_xmap/views/html/tmpl/default_class.php rename to components/com_joxmap/tmpl/Html/default_class.xml diff --git a/components/com_xmap/views/html/tmpl/default_items.php b/components/com_joxmap/tmpl/Html/default_items.xml similarity index 100% rename from components/com_xmap/views/html/tmpl/default_items.php rename to components/com_joxmap/tmpl/Html/default_items.xml diff --git a/components/com_xmap/assets/xsl/index.html b/components/com_joxmap/tmpl/Html/index.html similarity index 100% rename from components/com_xmap/assets/xsl/index.html rename to components/com_joxmap/tmpl/Html/index.html diff --git a/components/com_xmap/views/xml/tmpl/default.php b/components/com_joxmap/tmpl/Xml/default.php similarity index 100% rename from components/com_xmap/views/xml/tmpl/default.php rename to components/com_joxmap/tmpl/Xml/default.php diff --git a/components/com_xmap/views/xml/tmpl/default.xml b/components/com_joxmap/tmpl/Xml/default.xml similarity index 100% rename from components/com_xmap/views/xml/tmpl/default.xml rename to components/com_joxmap/tmpl/Xml/default.xml diff --git a/components/com_xmap/views/xml/tmpl/default_class.php b/components/com_joxmap/tmpl/Xml/default_class.php similarity index 100% rename from components/com_xmap/views/xml/tmpl/default_class.php rename to components/com_joxmap/tmpl/Xml/default_class.php diff --git a/components/com_xmap/views/xml/tmpl/default_items.php b/components/com_joxmap/tmpl/Xml/default_items.php similarity index 100% rename from components/com_xmap/views/xml/tmpl/default_items.php rename to components/com_joxmap/tmpl/Xml/default_items.php diff --git a/components/com_xmap/views/xml/tmpl/default_xsl.php b/components/com_joxmap/tmpl/Xml/default_xsl.php similarity index 100% rename from components/com_xmap/views/xml/tmpl/default_xsl.php rename to components/com_joxmap/tmpl/Xml/default_xsl.php diff --git a/components/com_xmap/controllers/index.html b/components/com_joxmap/tmpl/Xml/index.html old mode 100755 new mode 100644 similarity index 100% rename from components/com_xmap/controllers/index.html rename to components/com_joxmap/tmpl/Xml/index.html diff --git a/components/com_xmap/views/xml/metadata.xml b/components/com_joxmap/tmpl/Xml/metadata.xml similarity index 100% rename from components/com_xmap/views/xml/metadata.xml rename to components/com_joxmap/tmpl/Xml/metadata.xml diff --git a/components/com_xmap/views/html/index.html b/components/com_xmap/views/html/index.html deleted file mode 100644 index 3af63015..00000000 --- a/components/com_xmap/views/html/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/com_xmap/views/html/tmpl/index.html b/components/com_xmap/views/html/tmpl/index.html deleted file mode 100644 index 3af63015..00000000 --- a/components/com_xmap/views/html/tmpl/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/com_xmap/views/index.html b/components/com_xmap/views/index.html deleted file mode 100644 index 3af63015..00000000 --- a/components/com_xmap/views/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/com_xmap/views/xml/index.html b/components/com_xmap/views/xml/index.html deleted file mode 100644 index 3af63015..00000000 --- a/components/com_xmap/views/xml/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/components/com_xmap/views/xml/tmpl/index.html b/components/com_xmap/views/xml/tmpl/index.html deleted file mode 100644 index 3af63015..00000000 --- a/components/com_xmap/views/xml/tmpl/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/install/manifest.xml b/joxmap.xml similarity index 100% rename from install/manifest.xml rename to joxmap.xml diff --git a/components/com_xmap/helpers/index.html b/media/components/com_joxmap/css/index.html similarity index 100% rename from components/com_xmap/helpers/index.html rename to media/components/com_joxmap/css/index.html diff --git a/components/com_xmap/assets/css/xmap.css b/media/components/com_joxmap/css/xmap.css similarity index 100% rename from components/com_xmap/assets/css/xmap.css rename to media/components/com_joxmap/css/xmap.css diff --git a/administrator/components/com_xmap/css/xmap.css b/media/components/com_joxmap/css/xmapedit.css similarity index 100% rename from administrator/components/com_xmap/css/xmap.css rename to media/components/com_joxmap/css/xmapedit.css diff --git a/components/com_xmap/index.html b/media/components/com_joxmap/elements/index.html similarity index 100% rename from components/com_xmap/index.html rename to media/components/com_joxmap/elements/index.html diff --git a/administrator/components/com_xmap/elements/sitemap.php b/media/components/com_joxmap/elements/sitemap.php similarity index 100% rename from administrator/components/com_xmap/elements/sitemap.php rename to media/components/com_joxmap/elements/sitemap.php diff --git a/components/com_xmap/assets/images/arrow.gif b/media/components/com_joxmap/images/arrow.gif similarity index 100% rename from components/com_xmap/assets/images/arrow.gif rename to media/components/com_joxmap/images/arrow.gif diff --git a/components/com_xmap/assets/images/img_blue.gif b/media/components/com_joxmap/images/img_blue.gif similarity index 100% rename from components/com_xmap/assets/images/img_blue.gif rename to media/components/com_joxmap/images/img_blue.gif diff --git a/components/com_xmap/assets/images/img_green.gif b/media/components/com_joxmap/images/img_green.gif similarity index 100% rename from components/com_xmap/assets/images/img_green.gif rename to media/components/com_joxmap/images/img_green.gif diff --git a/components/com_xmap/assets/images/img_grey.gif b/media/components/com_joxmap/images/img_grey.gif similarity index 100% rename from components/com_xmap/assets/images/img_grey.gif rename to media/components/com_joxmap/images/img_grey.gif diff --git a/components/com_xmap/assets/images/img_orange.gif b/media/components/com_joxmap/images/img_orange.gif similarity index 100% rename from components/com_xmap/assets/images/img_orange.gif rename to media/components/com_joxmap/images/img_orange.gif diff --git a/components/com_xmap/assets/images/img_red.gif b/media/components/com_joxmap/images/img_red.gif similarity index 100% rename from components/com_xmap/assets/images/img_red.gif rename to media/components/com_joxmap/images/img_red.gif diff --git a/components/com_xmap/models/index.html b/media/components/com_joxmap/images/index.html similarity index 100% rename from components/com_xmap/models/index.html rename to media/components/com_joxmap/images/index.html diff --git a/administrator/components/com_xmap/images/sitemap-icon.png b/media/components/com_joxmap/images/sitemap-icon.png similarity index 100% rename from administrator/components/com_xmap/images/sitemap-icon.png rename to media/components/com_joxmap/images/sitemap-icon.png diff --git a/components/com_xmap/assets/images/sortdown.gif b/media/components/com_joxmap/images/sortdown.gif similarity index 100% rename from components/com_xmap/assets/images/sortdown.gif rename to media/components/com_joxmap/images/sortdown.gif diff --git a/components/com_xmap/assets/images/sortup.gif b/media/components/com_joxmap/images/sortup.gif similarity index 100% rename from components/com_xmap/assets/images/sortup.gif rename to media/components/com_joxmap/images/sortup.gif diff --git a/components/com_xmap/assets/images/tick.png b/media/components/com_joxmap/images/tick.png similarity index 100% rename from components/com_xmap/assets/images/tick.png rename to media/components/com_joxmap/images/tick.png diff --git a/components/com_xmap/assets/images/txt_blue.gif b/media/components/com_joxmap/images/txt_blue.gif similarity index 100% rename from components/com_xmap/assets/images/txt_blue.gif rename to media/components/com_joxmap/images/txt_blue.gif diff --git a/components/com_xmap/assets/images/txt_green.gif b/media/components/com_joxmap/images/txt_green.gif similarity index 100% rename from components/com_xmap/assets/images/txt_green.gif rename to media/components/com_joxmap/images/txt_green.gif diff --git a/components/com_xmap/assets/images/txt_grey.gif b/media/components/com_joxmap/images/txt_grey.gif similarity index 100% rename from components/com_xmap/assets/images/txt_grey.gif rename to media/components/com_joxmap/images/txt_grey.gif diff --git a/components/com_xmap/assets/images/txt_orange.gif b/media/components/com_joxmap/images/txt_orange.gif similarity index 100% rename from components/com_xmap/assets/images/txt_orange.gif rename to media/components/com_joxmap/images/txt_orange.gif diff --git a/components/com_xmap/assets/images/txt_red.gif b/media/components/com_joxmap/images/txt_red.gif similarity index 100% rename from components/com_xmap/assets/images/txt_red.gif rename to media/components/com_joxmap/images/txt_red.gif diff --git a/components/com_xmap/assets/images/unpublished.png b/media/components/com_joxmap/images/unpublished.png similarity index 100% rename from components/com_xmap/assets/images/unpublished.png rename to media/components/com_joxmap/images/unpublished.png diff --git a/administrator/components/com_xmap/images/xmap-favicon.png b/media/components/com_joxmap/images/xmap-favicon.png similarity index 100% rename from administrator/components/com_xmap/images/xmap-favicon.png rename to media/components/com_joxmap/images/xmap-favicon.png From 2391c0db00e550246f3f0eb204e65a231b00cc3f Mon Sep 17 00:00:00 2001 From: JLTRY Date: Tue, 24 Dec 2024 18:14:34 +0100 Subject: [PATCH 09/12] adaptation for Joomla 4.0 + and new structure --- Makefile | 56 ++---- README.md | 12 ++ .../components/com_joxmap/forms/sitemap.xml | 19 +- .../components/com_joxmap/joxmap.php | 41 ++-- .../language/cs-CZ/cs-CZ.com_xmap.ini | 16 +- .../language/cs-CZ/cs-CZ.com_xmap.sys.ini | 26 +-- ...n-GB.com_xmap.ini => en-GB.com_joxmap.ini} | 16 +- .../language/en-GB/en-GB.com_joxmap.sys.ini | 26 +++ .../language/en-GB/en-GB.com_xmap.sys.ini | 26 --- .../language/es-ES/es-ES.com_xmap.ini | 16 +- .../language/es-ES/es-ES.com_xmap.sys.ini | 26 +-- .../language/fa-IR/fa-IR.com_xmap.ini | 16 +- .../language/fa-IR/fa-IR.com_xmap.sys.ini | 26 +-- .../language/fr-FR/fr-FR.com_joxmap.ini | 118 +++++++++++ .../language/fr-FR/fr-FR.com_joxmap.sys.ini | 30 +++ .../language/nl-NL/nl-NL.com_xmap.ini | 16 +- .../language/nl-NL/nl-NL.com_xmap.sys.ini | 26 +-- .../language/ru-RU/ru-RU.com_xmap.ini | 16 +- .../language/ru-RU/ru-RU.com_xmap.sys.ini | 26 +-- .../com_joxmap/services/provider.php | 38 ++++ .../com_joxmap/sql/install.mysql.sql | 4 +- .../com_joxmap/sql/uninstall.mysql.sql | 4 +- .../src/Controller/DisplayController.php | 50 +++++ .../src/Controller/JoXMapController.php | 82 +++----- .../src/Controller/SiteMapController.php | 26 ++- .../src/Controller/SiteMapsController.php | 43 ++-- .../com_joxmap/src/Field/XmapMenusField.php | 59 +++--- .../com_joxmap/src/Field/modal/sitemaps.php | 44 +++-- .../com_joxmap/src/Helper/HTMLHelperXmap.php | 33 ++-- .../com_joxmap/src/Helper/XmapHelper.php | 90 +++++---- .../com_joxmap/src/Helper/installer.php | 20 +- .../com_joxmap/src/Model/SiteMapModel.php | 135 +++++-------- .../com_joxmap/src/Model/SiteMapsModel.php | 28 +-- .../com_joxmap/src/Table/JoxmapTable.php | 58 +++--- .../com_joxmap/src/View/SiteMap/HtmlView.php | 65 ++++--- .../com_joxmap/src/View/SiteMaps/HtmlView.php | 75 +++---- .../com_joxmap/tmpl/SiteMap/edit.php | 15 +- .../com_joxmap/tmpl/SiteMap/navigator.php | 29 +-- .../tmpl/SiteMap/navigator_class.php | 11 +- .../tmpl/SiteMap/navigator_links.php | 13 +- .../com_joxmap/tmpl/SiteMaps/default.php | 97 +++++----- .../tmpl/SiteMaps/default_legacy.php | 74 +++---- .../com_joxmap/tmpl/SiteMaps/modal.php | 60 +++--- components/com_joxmap/joxmap.php | 26 +-- .../com_joxmap/language/en-GB.com_joxmap.ini | 16 ++ .../com_joxmap/language/en-GB.com_xmap.ini | 16 -- .../com_joxmap/language/fr-FR.com_joxmap.ini | 27 +++ components/com_joxmap/services/Router.php | 18 +- .../com_joxmap/src/Controller/AjaxJson.php | 18 +- .../src/Controller/DisplayController.php | 24 ++- .../src/Controller/JoXmapDisplayer.php | 52 ++--- .../com_joxmap/src/Helper/XmapHelper.php | 87 ++++----- .../com_joxmap/src/Model/SiteMapModel.php | 72 ++++--- .../com_joxmap/src/View/Html/HtmlView.php | 52 ++--- .../com_joxmap/src/View/Html/metadata.xml | 8 - .../com_joxmap/src/View/Xml/HtmlView.php | 38 ++-- .../images => src/View/Xml}/index.html | 0 components/com_joxmap/tmpl/Html/default.php | 17 +- components/com_joxmap/tmpl/Html/default.xml | 18 +- .../com_joxmap/tmpl/Html/default_class.php | 183 ++++++++++++++++++ .../com_joxmap/tmpl/Html/default_items.php | 16 ++ components/com_joxmap/tmpl/Xml/default.php | 19 +- components/com_joxmap/tmpl/Xml/default.xml | 21 +- .../com_joxmap/tmpl/Xml/default_class.php | 34 ++-- .../com_joxmap/tmpl/Xml/default_items.php | 11 +- .../com_joxmap/tmpl/Xml/default_xsl.php | 56 +++--- components/com_joxmap/tmpl/Xml/metadata.xml | 8 - install.joxmap.php | 52 +++++ joxmap-update.xml | 21 ++ joxmap.xml | 124 ++++++------ .../components/com_joxmap}/index.html | 0 packages/pkg_joxmap.xml | 14 ++ packages/pkg_xmap.xml | 14 -- packages/update_pkg.xml | 22 +++ .../com_content/com_content.php | 12 +- .../com_content/com_content.xml | 18 +- .../com_k2 => joxmap/com_content}/index.html | 0 .../language/cs-CZ.plg_xmap_com_content.ini | 0 .../language/en-GB.plg_xmap_com_content.ini | 0 .../language/es-ES.plg_xmap_com_content.ini | 0 .../language/fa-IR.plg_xmap_com_content.ini | 0 .../language/nl-NL.plg_xmap_com_content.ini | 0 .../language/ru-RU.plg_xmap_com_content.ini | 0 plugins/{xmap => joxmap}/com_k2/com_k2.php | 0 plugins/{xmap => joxmap}/com_k2/com_k2.xml | 0 .../com_kunena => joxmap/com_k2}/index.html | 0 .../language/en-GB/en-GB.plg_xmap_com_k2.ini | 0 .../en-GB/en-GB.plg_xmap_com_k2.sys.ini | 0 .../language/fa-IR/fa-IR.plg_xmap_com_k2.ini | 0 .../fa-IR/fa-IR.plg_xmap_com_k2.sys.ini | 0 .../language/fr-FR/fr-FR.plg_xmap_com_k2.ini | 0 .../fr-FR/fr-FR.plg_xmap_com_k2.sys.ini | 0 .../com_kunena/com_kunena.php | 0 .../com_kunena/com_kunena.xml | 0 .../com_kunena}/index.html | 0 .../language/cs-CZ.plg_xmap_com_kunena.ini | 0 .../language/en-GB.plg_xmap_com_kunena.ini | 0 .../language/es-ES.plg_xmap_com_kunena.ini | 0 .../language/fa-IR.plg_xmap_com_kunena.ini | 0 .../language/nl-NL.plg_xmap_com_kunena.ini | 0 .../language/ru-RU.plg_xmap_com_kunena.ini | 0 .../{xmap => joxmap}/com_mtree/com_mtree.php | 0 .../{xmap => joxmap}/com_mtree/com_mtree.xml | 0 .../com_mtree}/index.html | 0 .../language/cs-CZ.plg_xmap_com_mtree.ini | 0 .../language/en-GB.plg_xmap_com_mtree.ini | 0 .../language/es-ES.plg_xmap_com_mtree.ini | 0 .../language/fa-IR.plg_xmap_com_mtree.ini | 0 .../language/nl-NL.plg_xmap_com_mtree.ini | 0 .../language/ru-RU.plg_xmap_com_mtree.ini | 0 .../com_sobipro/com_sobipro.php | 0 .../com_sobipro/com_sobipro.xml | 0 .../com_sobipro}/index.html | 0 .../language/cs-CZ.plg_xmap_com_sobipro.ini | 0 .../language/en-GB.plg_xmap_com_sobipro.ini | 0 .../language/es-ES.plg_xmap_com_sobipro.ini | 0 .../language/fa-IR.plg_xmap_com_sobipro.ini | 0 .../language/nl-NL.plg_xmap_com_sobipro.ini | 0 .../language/ru-RU.plg_xmap_com_sobipro.ini | 0 .../com_virtuemart/com_virtuemart.php | 0 .../com_virtuemart/com_virtuemart.xml | 0 .../com_virtuemart}/index.html | 0 .../cs-CZ.plg_xmap_com_virtuemart.ini | 0 .../en-GB.plg_xmap_com_virtuemart.ini | 0 .../es-ES.plg_xmap_com_virtuemart.ini | 0 .../fa-IR.plg_xmap_com_virtuemart.ini | 0 .../nl-NL.plg_xmap_com_virtuemart.ini | 0 .../ru-RU.plg_xmap_com_virtuemart.ini | 0 .../com_weblinks/com_weblinks.php | 0 .../com_weblinks/com_weblinks.xml | 0 plugins/joxmap/com_weblinks/index.html | 1 + .../language/cs-CZ.plg_xmap_com_weblinks.ini | 0 .../language/en-GB.plg_xmap_com_weblinks.ini | 0 .../language/es-ES.plg_xmap_com_weblinks.ini | 0 .../language/fa-IR.plg_xmap_com_weblinks.ini | 0 .../language/nl-NL.plg_xmap_com_weblinks.ini | 0 .../language/ru-RU.plg_xmap_com_weblinks.ini | 0 137 files changed, 1691 insertions(+), 1131 deletions(-) create mode 100644 README.md rename administrator/components/com_joxmap/language/en-GB/{en-GB.com_xmap.ini => en-GB.com_joxmap.ini} (90%) mode change 100755 => 100644 create mode 100644 administrator/components/com_joxmap/language/en-GB/en-GB.com_joxmap.sys.ini delete mode 100644 administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.sys.ini create mode 100644 administrator/components/com_joxmap/language/fr-FR/fr-FR.com_joxmap.ini create mode 100644 administrator/components/com_joxmap/language/fr-FR/fr-FR.com_joxmap.sys.ini create mode 100644 administrator/components/com_joxmap/services/provider.php create mode 100644 administrator/components/com_joxmap/src/Controller/DisplayController.php create mode 100644 components/com_joxmap/language/en-GB.com_joxmap.ini delete mode 100644 components/com_joxmap/language/en-GB.com_xmap.ini create mode 100644 components/com_joxmap/language/fr-FR.com_joxmap.ini delete mode 100644 components/com_joxmap/src/View/Html/metadata.xml rename components/com_joxmap/{assets/images => src/View/Xml}/index.html (100%) create mode 100644 components/com_joxmap/tmpl/Html/default_class.php create mode 100644 components/com_joxmap/tmpl/Html/default_items.php delete mode 100644 components/com_joxmap/tmpl/Xml/metadata.xml create mode 100644 install.joxmap.php create mode 100644 joxmap-update.xml rename {plugins/xmap/com_content => media/components/com_joxmap}/index.html (100%) create mode 100644 packages/pkg_joxmap.xml delete mode 100644 packages/pkg_xmap.xml create mode 100644 packages/update_pkg.xml rename plugins/{xmap => joxmap}/com_content/com_content.php (97%) rename plugins/{xmap => joxmap}/com_content/com_content.xml (94%) rename plugins/{xmap/com_k2 => joxmap/com_content}/index.html (100%) rename plugins/{xmap => joxmap}/com_content/language/cs-CZ.plg_xmap_com_content.ini (100%) rename plugins/{xmap => joxmap}/com_content/language/en-GB.plg_xmap_com_content.ini (100%) rename plugins/{xmap => joxmap}/com_content/language/es-ES.plg_xmap_com_content.ini (100%) rename plugins/{xmap => joxmap}/com_content/language/fa-IR.plg_xmap_com_content.ini (100%) rename plugins/{xmap => joxmap}/com_content/language/nl-NL.plg_xmap_com_content.ini (100%) rename plugins/{xmap => joxmap}/com_content/language/ru-RU.plg_xmap_com_content.ini (100%) rename plugins/{xmap => joxmap}/com_k2/com_k2.php (100%) rename plugins/{xmap => joxmap}/com_k2/com_k2.xml (100%) rename plugins/{xmap/com_kunena => joxmap/com_k2}/index.html (100%) rename plugins/{xmap => joxmap}/com_k2/language/en-GB/en-GB.plg_xmap_com_k2.ini (100%) rename plugins/{xmap => joxmap}/com_k2/language/en-GB/en-GB.plg_xmap_com_k2.sys.ini (100%) rename plugins/{xmap => joxmap}/com_k2/language/fa-IR/fa-IR.plg_xmap_com_k2.ini (100%) rename plugins/{xmap => joxmap}/com_k2/language/fa-IR/fa-IR.plg_xmap_com_k2.sys.ini (100%) rename plugins/{xmap => joxmap}/com_k2/language/fr-FR/fr-FR.plg_xmap_com_k2.ini (100%) rename plugins/{xmap => joxmap}/com_k2/language/fr-FR/fr-FR.plg_xmap_com_k2.sys.ini (100%) rename plugins/{xmap => joxmap}/com_kunena/com_kunena.php (100%) rename plugins/{xmap => joxmap}/com_kunena/com_kunena.xml (100%) rename plugins/{xmap/com_mtree => joxmap/com_kunena}/index.html (100%) rename plugins/{xmap => joxmap}/com_kunena/language/cs-CZ.plg_xmap_com_kunena.ini (100%) rename plugins/{xmap => joxmap}/com_kunena/language/en-GB.plg_xmap_com_kunena.ini (100%) rename plugins/{xmap => joxmap}/com_kunena/language/es-ES.plg_xmap_com_kunena.ini (100%) rename plugins/{xmap => joxmap}/com_kunena/language/fa-IR.plg_xmap_com_kunena.ini (100%) rename plugins/{xmap => joxmap}/com_kunena/language/nl-NL.plg_xmap_com_kunena.ini (100%) rename plugins/{xmap => joxmap}/com_kunena/language/ru-RU.plg_xmap_com_kunena.ini (100%) rename plugins/{xmap => joxmap}/com_mtree/com_mtree.php (100%) rename plugins/{xmap => joxmap}/com_mtree/com_mtree.xml (100%) rename plugins/{xmap/com_sobipro => joxmap/com_mtree}/index.html (100%) rename plugins/{xmap => joxmap}/com_mtree/language/cs-CZ.plg_xmap_com_mtree.ini (100%) rename plugins/{xmap => joxmap}/com_mtree/language/en-GB.plg_xmap_com_mtree.ini (100%) rename plugins/{xmap => joxmap}/com_mtree/language/es-ES.plg_xmap_com_mtree.ini (100%) rename plugins/{xmap => joxmap}/com_mtree/language/fa-IR.plg_xmap_com_mtree.ini (100%) rename plugins/{xmap => joxmap}/com_mtree/language/nl-NL.plg_xmap_com_mtree.ini (100%) rename plugins/{xmap => joxmap}/com_mtree/language/ru-RU.plg_xmap_com_mtree.ini (100%) rename plugins/{xmap => joxmap}/com_sobipro/com_sobipro.php (100%) rename plugins/{xmap => joxmap}/com_sobipro/com_sobipro.xml (100%) rename plugins/{xmap/com_virtuemart => joxmap/com_sobipro}/index.html (100%) rename plugins/{xmap => joxmap}/com_sobipro/language/cs-CZ.plg_xmap_com_sobipro.ini (100%) rename plugins/{xmap => joxmap}/com_sobipro/language/en-GB.plg_xmap_com_sobipro.ini (100%) rename plugins/{xmap => joxmap}/com_sobipro/language/es-ES.plg_xmap_com_sobipro.ini (100%) rename plugins/{xmap => joxmap}/com_sobipro/language/fa-IR.plg_xmap_com_sobipro.ini (100%) rename plugins/{xmap => joxmap}/com_sobipro/language/nl-NL.plg_xmap_com_sobipro.ini (100%) rename plugins/{xmap => joxmap}/com_sobipro/language/ru-RU.plg_xmap_com_sobipro.ini (100%) rename plugins/{xmap => joxmap}/com_virtuemart/com_virtuemart.php (100%) rename plugins/{xmap => joxmap}/com_virtuemart/com_virtuemart.xml (100%) rename plugins/{xmap/com_weblinks => joxmap/com_virtuemart}/index.html (100%) rename plugins/{xmap => joxmap}/com_virtuemart/language/cs-CZ.plg_xmap_com_virtuemart.ini (100%) rename plugins/{xmap => joxmap}/com_virtuemart/language/en-GB.plg_xmap_com_virtuemart.ini (100%) rename plugins/{xmap => joxmap}/com_virtuemart/language/es-ES.plg_xmap_com_virtuemart.ini (100%) rename plugins/{xmap => joxmap}/com_virtuemart/language/fa-IR.plg_xmap_com_virtuemart.ini (100%) rename plugins/{xmap => joxmap}/com_virtuemart/language/nl-NL.plg_xmap_com_virtuemart.ini (100%) rename plugins/{xmap => joxmap}/com_virtuemart/language/ru-RU.plg_xmap_com_virtuemart.ini (100%) rename plugins/{xmap => joxmap}/com_weblinks/com_weblinks.php (100%) rename plugins/{xmap => joxmap}/com_weblinks/com_weblinks.xml (100%) create mode 100644 plugins/joxmap/com_weblinks/index.html rename plugins/{xmap => joxmap}/com_weblinks/language/cs-CZ.plg_xmap_com_weblinks.ini (100%) rename plugins/{xmap => joxmap}/com_weblinks/language/en-GB.plg_xmap_com_weblinks.ini (100%) rename plugins/{xmap => joxmap}/com_weblinks/language/es-ES.plg_xmap_com_weblinks.ini (100%) rename plugins/{xmap => joxmap}/com_weblinks/language/fa-IR.plg_xmap_com_weblinks.ini (100%) rename plugins/{xmap => joxmap}/com_weblinks/language/nl-NL.plg_xmap_com_weblinks.ini (100%) rename plugins/{xmap => joxmap}/com_weblinks/language/ru-RU.plg_xmap_com_weblinks.ini (100%) diff --git a/Makefile b/Makefile index c5b29743..2ac1061d 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,18 @@ -VERSION = "4.0.0" +VERSION = "1.0.0" VERSION2 = $(shell echo $(VERSION)|sed 's/ /-/g') -ZIPFILE = xmap-$(VERSION2).zip +ZIPFILE = joxmap-$(VERSION2).zip PACKAGES = packages # Only set DATE if you need to force the date. # (Otherwise it uses the current date.) # DATE = "February 19, 2011" -all: links parts $(ZIPFILE) +all: $(ZIPFILE) -INSTALLS = xmap_plugin \ - xmap_component +INSTALLS = joxmap_plugin \ + joxmap_component -EXTRAS = - -NAMES = $(INSTALLS) $(EXTRAS) +NAMES = $(INSTALLS) ZIPS = $(NAMES:=.zip) @@ -22,16 +20,22 @@ ZIPIGNORES = -x "*.git*" -x "*.svn*" parts: $(ZIPS) -links: - rm xmap_component/admin xmap_component/front - ln -srf administrator/components/com_xmap xmap_component/admin - ln -srf components/com_xmap xmap_component/front - -%.zip: +COMPONENT_SRC = administrator components media joxmap.xml +PLUGIN_SRC = plugins/joxmap/com_content + + +joxmap_component.zip: $(COMPONENT_SRC) + @echo "-------------------------------------------------------" + @echo "Creating zip file for: $*" + @rm -f $@ + @(zip -r $@ $^ $(ZIPIGNORES)) + +joxmap_plugin.zip: $(PLUGIN_SRC) @echo "-------------------------------------------------------" @echo "Creating zip file for: $*" @rm -f $@ - @(cd $*; zip -r ../$@ * $(ZIPIGNORES)) + @(zip -rj $@ $^ $(ZIPIGNORES)) + $(ZIPFILE): $(ZIPS) @echo "-------------------------------------------------------" @@ -41,25 +45,3 @@ $(ZIPFILE): $(ZIPS) @echo "-------------------------------------------------------" @echo "Finished creating package $(ZIPFILE)." - -upload: - @echo "-------------------------------------------------------" - @echo "Copying new package $(ZIPFILE) to jmcameron.net" - @scp $(ZIPFILE) jmcameron:/home/jmcameron/webapps/jmcameron/xmap/downloads/ - @echo - -updateweb: - @echo "Updating updates on jmcameron.net..." - @ssh jmcameron.net "cd webapps/jmcameron/xmap/updates; git pull" - - -clean: - @find . -name '*~' -exec rm {} \; - @rm -f _tests.pdf - -veryclean: clean - @rm -f $(ZIPS) packages/*.zip - @rm -f $(ZIPFILE).zip - @rm -rf test/coverage_db - @rm -rf test/coverage_result - diff --git a/README.md b/README.md new file mode 100644 index 00000000..1392b765 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# com_joxmap + +## Credits + +This repo was imported from https://github.com/guilleva/Xmap + +This repo is not more maintained + +It was containing component com_xmap + +The new repo is providing com_joxmap component for Joomla 4.0 + + diff --git a/administrator/components/com_joxmap/forms/sitemap.xml b/administrator/components/com_joxmap/forms/sitemap.xml index faa052fd..84bda268 100644 --- a/administrator/components/com_joxmap/forms/sitemap.xml +++ b/administrator/components/com_joxmap/forms/sitemap.xml @@ -1,7 +1,7 @@
-
- + default="NOW" + showtime="false" + filter="user_utc" + format="%Y-%m-%d" + />--> @@ -114,6 +119,7 @@ class="readonly" labelclass="control-label" size="6" + default="0" readonly="true" filter="unset"/> @@ -127,6 +133,7 @@ labelclass="control-label" size="6" readonly="true" + default="0" filter="unset"/>
@@ -146,6 +154,7 @@ id="selections" name="selections" type="xmapmenus" + addfieldprefix="JLTRY\Component\JoXmap\Administrator\Field" label="" description="XMAP_MENUASSIGMENT_DESC" class="inputbox" @@ -173,7 +182,7 @@ multiple="multiple" size="5"/> -
+
Yes - +
diff --git a/administrator/components/com_joxmap/joxmap.php b/administrator/components/com_joxmap/joxmap.php index 2f68af05..493433b1 100644 --- a/administrator/components/com_joxmap/joxmap.php +++ b/administrator/components/com_joxmap/joxmap.php @@ -1,37 +1,26 @@ bootComponent("com_joxmap") + ->getMVCFactory(); -// Include dependancies -jimport('joomla.application.component.controller'); - -# For compatibility with older versions of Joola 2.5 -if (!class_exists('JControllerLegacy')){ - class JControllerLegacy extends JController { - - } -} - -$controller = JControllerLegacy::getInstance('Xmap'); -$controller->execute(JFactory::getApplication()->input->get('task')); +$controller = $mvc->createController('SiteMaps'); +$controller->execute(Factory::getApplication()->getInput()->get('task')); $controller->redirect(); \ No newline at end of file diff --git a/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.ini b/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.ini index a2ae622a..e1b89747 100644 --- a/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.ini +++ b/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.ini @@ -47,14 +47,14 @@ XMAP_NEWS_LINK_TOOLTIP="Přejít “News” verzi mapy stránek. Použij XMAP_MESSAGE_EXTENSIONS_DISABLED="Byla nalezena následuící rozšíření Xmap, která jsou zakázaná. Je nutné je ručně povolit ve Správci pluginů: %s" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d map stránek bylo zneveřejněno." -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="Mapa stránek byla zneveřejněna." -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d map stránek bylo zveřejněno." -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="Mapa stránek byla zveřejněna." -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED="%d map stránek bylo přemístěno do koše." -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED_1="Mapa stránek byla přemístěna do koše." -COM_XMAP_SITEMAPS_N_ITEMS_DELETED="%d map stránek bylo smazáno." -COM_XMAP_SITEMAPS_N_ITEMS_DELETED_1="Mapa stránek byla smazána." +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d map stránek bylo zneveřejněno." +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="Mapa stránek byla zneveřejněna." +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d map stránek bylo zveřejněno." +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="Mapa stránek byla zveřejněna." +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED="%d map stránek bylo přemístěno do koše." +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED_1="Mapa stránek byla přemístěna do koše." +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED="%d map stránek bylo smazáno." +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED_1="Mapa stránek byla smazána." XMAP_FIELDSET_MENUS="Nabídky" XMAP_FIELDSET_OPTIONS="Možnosti" diff --git a/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.sys.ini b/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.sys.ini index 5df8b7d0..02959b53 100644 --- a/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.sys.ini +++ b/administrator/components/com_joxmap/language/cs-CZ/cs-CZ.com_xmap.sys.ini @@ -4,23 +4,23 @@ ; Guillermo Vargas (guille@vargas.co.cr) ; -COM_XMAP="Xmap" -COM_XMAP_TITLE="Xmap" +COM_JOXMAP="Xmap" +COM_JOXMAP_TITLE="Xmap" ; ; View and layout titles and descriptions ; -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="HTML verze" -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Zobrazí mapu stránek v HTML formátu" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="XML verze" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Zobrazí mapu stránek v XML formátu" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="HTML verze" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Zobrazí mapu stránek v HTML formátu" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="XML verze" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Zobrazí mapu stránek v XML formátu" -COM_XMAP_SELECT_AN_SITEMAP="Zvolte mapu stránek" -COM_XMAP_SELECT_A_SITEMAP="Mapa stránek" -COM_XMAP_CHANGE_SITEMAP_BUTTON="Změnit" -COM_XMAP_CHANGE_SITEMAP="Zvolte mapu stránek ze seznamu" +COM_JOXMAP_SELECT_AN_SITEMAP="Zvolte mapu stránek" +COM_JOXMAP_SELECT_A_SITEMAP="Mapa stránek" +COM_JOXMAP_CHANGE_SITEMAP_BUTTON="Změnit" +COM_JOXMAP_CHANGE_SITEMAP="Zvolte mapu stránek ze seznamu" COM_INSTALLER_TYPE_XMAP_EXT="Rozšíření Xmap" -COM_XMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Možnosti mapy stránek" -COM_XMAP_INCLUDE_CSS_LABEL="Používat CSS styl komponenty Xmap" -COM_XMAP_INCLUDE_CSS_DESC="Pokud je zvoleno Ano, bude použit soubor stylů CSS komponenty XMap" \ No newline at end of file +COM_JOXMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Možnosti mapy stránek" +COM_JOXMAP_INCLUDE_CSS_LABEL="Používat CSS styl komponenty Xmap" +COM_JOXMAP_INCLUDE_CSS_DESC="Pokud je zvoleno Ano, bude použit soubor stylů CSS komponenty XMap" \ No newline at end of file diff --git a/administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.ini b/administrator/components/com_joxmap/language/en-GB/en-GB.com_joxmap.ini old mode 100755 new mode 100644 similarity index 90% rename from administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.ini rename to administrator/components/com_joxmap/language/en-GB/en-GB.com_joxmap.ini index ad332731..4a39e629 --- a/administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.ini +++ b/administrator/components/com_joxmap/language/en-GB/en-GB.com_joxmap.ini @@ -48,14 +48,14 @@ XMAP_IMAGES_LINK="Images Sitemap" XMAP_IMAGES_LINK_TOOLTIP="Go to the “Images” version of the sitemap, use this url to submit your sitemap to Google and other search engines." XMAP_MESSAGE_EXTENSIONS_DISABLED="Xmap have detected that the following extensions can help you to get more content in your site map but they are disabled, you have to manually enable them visiting the extensions manager: %s" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d sitemaps successfully unpublished" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d sitemap successfully unpublished" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d sitemaps successfully published" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d sitemap successfully published" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED="%d sitemaps successfully published" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d sitemap successfully trashed" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED="%d sitemaps successfully deleted" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED_1="%d sitemap successfully deleted" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d sitemaps successfully unpublished" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d sitemap successfully unpublished" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d sitemaps successfully published" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d sitemap successfully published" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED="%d sitemaps successfully published" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d sitemap successfully trashed" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED="%d sitemaps successfully deleted" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED_1="%d sitemap successfully deleted" XMAP_FIELDSET_MENUS="Menus" XMAP_FIELDSET_GENERAL="General" diff --git a/administrator/components/com_joxmap/language/en-GB/en-GB.com_joxmap.sys.ini b/administrator/components/com_joxmap/language/en-GB/en-GB.com_joxmap.sys.ini new file mode 100644 index 00000000..71415e8b --- /dev/null +++ b/administrator/components/com_joxmap/language/en-GB/en-GB.com_joxmap.sys.ini @@ -0,0 +1,26 @@ +; $Id$ +; Copyright (C) 2007 - 2009 Joomla! Vargas. All rights reserved. +; GNU General Public License version 2 or later; see LICENSE.txt +; Guillermo Vargas (guille@vargas.co.cr) +; + +COM_JOXMAP="JoXmap" +COM_JOXMAP_TITLE="JoXmap" + +; +; View and layout titles and descriptions +; +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="HTML Site map" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Display a Site map in HTML format" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="XML Sitemap" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Display an Site map in XML format" + +COM_JOXMAP_SELECT_AN_SITEMAP="Choose a site map" +COM_JOXMAP_SELECT_A_SITEMAP="A site map" +COM_JOXMAP_CHANGE_SITEMAP_BUTTON="Change" +COM_JOXMAP_CHANGE_SITEMAP="Select a site map from the list" + +COM_INSTALLER_TYPE_XMAP_EXT="Xmap Extension" +COM_JOXMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Sitemap Settings" +COM_JOXMAP_INCLUDE_CSS_LABEL="Include Xmap's Style" +COM_JOXMAP_INCLUDE_CSS_DESC="Select yes to include the CSS file with the styles for the sitemap" \ No newline at end of file diff --git a/administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.sys.ini b/administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.sys.ini deleted file mode 100644 index ac530063..00000000 --- a/administrator/components/com_joxmap/language/en-GB/en-GB.com_xmap.sys.ini +++ /dev/null @@ -1,26 +0,0 @@ -; $Id$ -; Copyright (C) 2007 - 2009 Joomla! Vargas. All rights reserved. -; GNU General Public License version 2 or later; see LICENSE.txt -; Guillermo Vargas (guille@vargas.co.cr) -; - -COM_XMAP="Xmap" -COM_XMAP_TITLE="Xmap" - -; -; View and layout titles and descriptions -; -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="HTML Site map" -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Display a Site map in HTML format" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="XML Sitemap" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Display an Site map in XML format" - -COM_XMAP_SELECT_AN_SITEMAP="Choose a site map" -COM_XMAP_SELECT_A_SITEMAP="A site map" -COM_XMAP_CHANGE_SITEMAP_BUTTON="Change" -COM_XMAP_CHANGE_SITEMAP="Select a site map from the list" - -COM_INSTALLER_TYPE_XMAP_EXT="Xmap Extension" -COM_XMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Sitemap Settings" -COM_XMAP_INCLUDE_CSS_LABEL="Include Xmap's Style" -COM_XMAP_INCLUDE_CSS_DESC="Select yes to include the CSS file with the styles for the sitemap" \ No newline at end of file diff --git a/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.ini b/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.ini index a1684eae..e45f5b8b 100644 --- a/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.ini +++ b/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.ini @@ -46,14 +46,14 @@ XMAP_IMAGES_LINK="Images Sitemap" XMAP_IMAGES_LINK_TOOLTIP="Ir a la versión “Images” del mapa del sitio, utilice este URL para agregar su mapa de sitio en Google u otros motores de búsqueda." XMAP_MESSAGE_EXTENSIONS_DISABLED="Xmap ha detectado que las siguientes extensiones podrían ayudarle a agregar mas contenido en su mapa de sitio pero están deshabilitadas. Es necesario que las habilite manualmente visitando el administrador de extensiones: %s" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d mapas de sitio se han despublicado correctamente" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d mapa de sitio se ha despublicado correctamente" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d mapas de sitio se han publicado correctamente" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d mapa de sitio se ha publicado correctamente" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED="%d mapas de sitio enviados a la papelera correctamente" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d mapa de sitio enviado a la papelera correctamente" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED="%d mapas de sitio eliminados correctamente" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED_1="%d mapa de sitio eliminado correctamente" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d mapas de sitio se han despublicado correctamente" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d mapa de sitio se ha despublicado correctamente" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d mapas de sitio se han publicado correctamente" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d mapa de sitio se ha publicado correctamente" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED="%d mapas de sitio enviados a la papelera correctamente" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d mapa de sitio enviado a la papelera correctamente" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED="%d mapas de sitio eliminados correctamente" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED_1="%d mapa de sitio eliminado correctamente" XMAP_FIELDSET_MENUS="Menus" XMAP_FIELDSET_OPTIONS="Opciones" diff --git a/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.sys.ini b/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.sys.ini index 23f3e85a..160cb5cb 100755 --- a/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.sys.ini +++ b/administrator/components/com_joxmap/language/es-ES/es-ES.com_xmap.sys.ini @@ -4,23 +4,23 @@ ; Guillermo Vargas (guille@vargas.co.cr) ; -COM_XMAP="Xmap" -COM_XMAP_TITLE="Xmap" +COM_JOXMAP="Xmap" +COM_JOXMAP_TITLE="Xmap" ; ; View and layout titles and descriptions ; -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="Mapa de Sitio HTML" -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Muestra un mapa de sitio en formato HTML" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="Mapa de Sitio XML" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Mustra un mapa de sitio en formato XML" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="Mapa de Sitio HTML" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Muestra un mapa de sitio en formato HTML" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="Mapa de Sitio XML" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Mustra un mapa de sitio en formato XML" -COM_XMAP_SELECT_AN_SITEMAP="Seleccione un mapa de sitio" -COM_XMAP_SELECT_A_SITEMAP="Un mapa de sitio" -COM_XMAP_CHANGE_SITEMAP_BUTTON="Cambiar" -COM_XMAP_CHANGE_SITEMAP="Seleccionar un mapa de sitio de una lista" +COM_JOXMAP_SELECT_AN_SITEMAP="Seleccione un mapa de sitio" +COM_JOXMAP_SELECT_A_SITEMAP="Un mapa de sitio" +COM_JOXMAP_CHANGE_SITEMAP_BUTTON="Cambiar" +COM_JOXMAP_CHANGE_SITEMAP="Seleccionar un mapa de sitio de una lista" COM_INSTALLER_TYPE_XMAP_EXT="Xmap Extension" -COM_XMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Sitemap Settings" -COM_XMAP_INCLUDE_CSS_LABEL="Include Xmap's Style" -COM_XMAP_INCLUDE_CSS_DESC="Select yes to include the CSS file with the styles for the sitemap" \ No newline at end of file +COM_JOXMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Sitemap Settings" +COM_JOXMAP_INCLUDE_CSS_LABEL="Include Xmap's Style" +COM_JOXMAP_INCLUDE_CSS_DESC="Select yes to include the CSS file with the styles for the sitemap" \ No newline at end of file diff --git a/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.ini b/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.ini index f1f3d7be..f5316c1f 100644 --- a/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.ini +++ b/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.ini @@ -52,14 +52,14 @@ XMAP_NEWS_LINK_TOOLTIP="به نسخه “خبری” نقشه سایت XMAP_IMAGES_LINK="نقشه سایت تصاویر" XMAP_IMAGES_LINK_TOOLTIP="نسخه مخصوص “تصاویر” برای نقشه سایت، این آدرس را جهت ثبت نقشه سایت خود در گوگل و موتورهای جستجوی دیگر استفاده نمایید." XMAP_MESSAGE_EXTENSIONS_DISABLED="کامپوننت نقشه سایت تشخیص داده است که افزونه های زیر می توانند به شما در ایجاد نقشه سایت بهتر از محتوای سایت کمک کنند ولی متاسفانه غیر فعال هستند شما می توانید با رفتن به این آدرس آن ها را فعال کنید مدیریت افزونه ها: %s" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d نقشه سایت با موفقیت از حالت انتشار خارج شدند" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d نقشه سایت با موفقیت از حالت انتشار خارج شد" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d نقشه سایت با موفقیت منتشر شدند" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d نقشه سایت با موفقیت منتشر شد" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED="%d نقشه سایت یا موفقیت منتشر شدند" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d نقشه سایت با موفقیت حذف شد" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED="%d نقشه سایت با موفقیت حذف شدند" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED_1="%d نقشه سایت با موفقیت حذف شد" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d نقشه سایت با موفقیت از حالت انتشار خارج شدند" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d نقشه سایت با موفقیت از حالت انتشار خارج شد" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d نقشه سایت با موفقیت منتشر شدند" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d نقشه سایت با موفقیت منتشر شد" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED="%d نقشه سایت یا موفقیت منتشر شدند" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d نقشه سایت با موفقیت حذف شد" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED="%d نقشه سایت با موفقیت حذف شدند" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED_1="%d نقشه سایت با موفقیت حذف شد" XMAP_FIELDSET_MENUS="منو ها" XMAP_FIELDSET_OPTIONS="تنظیمات" diff --git a/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.sys.ini b/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.sys.ini index 9a9958bd..9512dc96 100644 --- a/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.sys.ini +++ b/administrator/components/com_joxmap/language/fa-IR/fa-IR.com_xmap.sys.ini @@ -10,21 +10,21 @@ ; @note All ini files need to be saved as UTF-8 - No BOM -COM_XMAP="نقشه سایت" -COM_XMAP_TITLE="نقشه سایت" +COM_JOXMAP="نقشه سایت" +COM_JOXMAP_TITLE="نقشه سایت" ; View and layout titles and descriptions -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="نفشه سایت نسخه HTML" -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="نمایش نقشه سایت در فرمت HTML" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="نقشه سایت نسخه XML" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="نمایش نقشه سایت در فرمت XML" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="نفشه سایت نسخه HTML" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="نمایش نقشه سایت در فرمت HTML" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="نقشه سایت نسخه XML" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="نمایش نقشه سایت در فرمت XML" -COM_XMAP_SELECT_AN_SITEMAP="انتخاب نقشه سایت" -COM_XMAP_SELECT_A_SITEMAP="نقشه سایت" -COM_XMAP_CHANGE_SITEMAP_BUTTON="تغییر" -COM_XMAP_CHANGE_SITEMAP="انتخاب نقشه سایت از لیست" +COM_JOXMAP_SELECT_AN_SITEMAP="انتخاب نقشه سایت" +COM_JOXMAP_SELECT_A_SITEMAP="نقشه سایت" +COM_JOXMAP_CHANGE_SITEMAP_BUTTON="تغییر" +COM_JOXMAP_CHANGE_SITEMAP="انتخاب نقشه سایت از لیست" COM_INSTALLER_TYPE_XMAP_EXT="افزونه نقشه سایت" -COM_XMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="تنظیمات نقشه سایت" -COM_XMAP_INCLUDE_CSS_LABEL="اضافه نمودن استایل های نقشه سایت" -COM_XMAP_INCLUDE_CSS_DESC="در صورت انتخاب بله، فایل css کامپوننت نقشه سایت هنگام نمایش آن بارگذاری خواهد شد" \ No newline at end of file +COM_JOXMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="تنظیمات نقشه سایت" +COM_JOXMAP_INCLUDE_CSS_LABEL="اضافه نمودن استایل های نقشه سایت" +COM_JOXMAP_INCLUDE_CSS_DESC="در صورت انتخاب بله، فایل css کامپوننت نقشه سایت هنگام نمایش آن بارگذاری خواهد شد" \ No newline at end of file diff --git a/administrator/components/com_joxmap/language/fr-FR/fr-FR.com_joxmap.ini b/administrator/components/com_joxmap/language/fr-FR/fr-FR.com_joxmap.ini new file mode 100644 index 00000000..9a57500c --- /dev/null +++ b/administrator/components/com_joxmap/language/fr-FR/fr-FR.com_joxmap.ini @@ -0,0 +1,118 @@ +; @package Xmap +; @copyright 2007 - 2012 Joomla! Vargas. All rights reserved. +; @subpackage fr-FR.com_xmap.ini +; @description Traduction francophone - fr-FR +; @version 2.3.0 - 23.10.2012 +; @author Mihàly Marti alias Sarki +; @copyright Joomlatutos.com - www.joomlautos.com +; @license GNU General Public License version 2, or later +; @note Client Administrator +; @note All ini files need to be saved as UTF-8 - No BOM + +; Component Instalation strings +XMAP_INSTALLING_XMAP="Installation du composant Xmap, générateur de plans de site Joomla!" +XMAP_UPGRADING_XMAP="Mise à jour du composant Xmap, générateur de plans de site Joomla!" +XMAP_UNISTALLING_XMAP_EXTENSIONS="Désinstallation de Xmap et ses extensions" +XMAP_INSTALLED_EXTENSION_X="Installation de l'extension %s" +XMAP_NOT_INSTALLED_EXTENSION_X="Il n'est pas possible d'installer l'extension pour %s" +XMAP_INSTALL_ERROR_EXTENSION="Erreur d'installation de l'extension" +XMAP_INSTALL_SUCCESS_EXTENSION="Succès de l'installation de l'extension" + +XMAP_HEADING_XML_STATS="Stat's du plan XML" +XMAP_HEADING_HTML_STATS="Stat's du plan HTML" +XMAP_HEADING_NUM_LINKS="ID Article" +XMAP_HEADING_NUM_HITS="Clics" +XMAP_HEADING_LAST_VISIT="Der. visite" +XMAP_HEADING_SITEMAP="Plan du site" +XMAP_HEADING_DEFAULT="Défaut" +XMAP_HEADING_ID="ID" +XMAP_HEADING_PUBLISHED="Publié" +XMAP_HEADING_ACCESS="Accès" +XMAP_SUBMENU_SITEMAPS="Plans du site" +XMAP_SUBMENU_EXTENSIONS="Extensions" +XMAP_SUBMENU_SETTINGS="Paramètres" +XMAP_TOOLBAR_SET_DEFAULT="Définir par défaut" +XMAP_SITEMAPS_TITLE="Gestion des plans du site" +DATE_MINUTES_AGO="Il y a %d minutes" +DATE_HOURS_MINUTES_AGO="Il y a %d heures et %d minutes" +DATE_DAYS_HOURS_AGO="Il y a %d jours et %d heures" +DATE_NEVER="Jamais" +XMAP_INTROTEXT_LABEL="Texte d'intro" +XMAP_INTROTEXT_DESC="Spécifiez le texte qui sera affiché au-dessus du plan du site" +XMAP_PRIORITY="Priorité" +XMAP_CHANGE_FREQUENCY="Fréquence" +XMAP_PAGE_ADD_SITEMAP="Nouveau plan du site" +XMAP_PAGE_EDIT_SITEMAP="Modifier le plan du site" +XMAP_SITEMAP_DETAILS_FIELDSET="Détails du plan du site" +XMAP_XML_LINK="Plan du site XML" +XMAP_XML_LINK_TOOLTIP="Aller à la version XML du plan du site. Utilisez cette adresse URL pour soumettre votre site aux moteurs de recherche." +XMAP_NEWS_LINK="Nouveau plan" +XMAP_NEWS_LINK_TOOLTIP="Allez à la 'Nouvelle' version du plan du site, utilisez cette adresse URL pour soumettre votre sitemap à Google News." + + +XMAP_MESSAGE_EXTENSIONS_DISABLED="Xmap a détecté que l'extension '%s' peut vous aider à obtenir plus de contenu dans votre plan du site, mais il est désactivé. Vous devez l'activer manuellement dans le gestionnaire d'extensions." +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d plans du site dépubliés avec succès" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d plan du site dépublié avec succès" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d plans du site publiés avec succès" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d plan du site publié avec succès" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED="%d plans du site mises à la corbeille avec succès" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d plan du site mis à la corbeille avec succès" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED="%d plans du site supprimés avec succès" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED_1="%d plan du site supprimé avec succès" + +XMAP_FIELDSET_MENUS="Menus" +XMAP_FIELDSET_OPTIONS="Paramètres" +XMAP_FIELDSET_METADATA="Métadonnées" +XMAP_ATTRIBS_SHOW_INTRO_LABEL="Texte d'introduction" +XMAP_ATTRIBS_SHOW_INTRO_DESC="Spécifiez si le texte d'introduction doit être affiché dans le plan du site HTML." +XMAP_ATTRIBS_SHOW_MENU_TITLE_LABEL="Titre de menu" +XMAP_ATTRIBS_SHOW_MENU_TITLE_DESC="Spécifiez si le titre des menus doit être affiché au dessus du contenu." +XMAP_ATTRIBS_CLASSNAME_LABEL="Nom de classe CSS" +XMAP_ATTRIBS_CLASSNAME_DESC="Nom de la classe CSS à utiliser pour ce plan du site." +XMAP_ATTRIBS_COLUMNS_LABEL="Colonnes" +XMAP_ATTRIBS_COLUMNS_DESC="Spécifiez le nombre de colonnes à afficher dans le plan du site HTML. (Cela n'a d'effet que si le nombre de menus est supérieure à 1)." +XMAP_ATTRIBS_EXTERNAL_LINKS_IMAGE_LABEL="Image des liens externes" +XMAP_ATTRIBS_EXTERNAL_LINKS_IMAGE_DESC="Sélectionnez l'image à utiliser pour les liens externes." +XMAP_ATTRIBS_COMPRESS_XML_LABEL="Compresser le XML" +XMAP_ATTRIBS_COMPRESS_XML_DESC="Spécifiez si le fichier XML du plan du site doit être compressé ou non." +XMAP_ATTRIBS_BEAUTIFY_XML_LABEL="XML embelli" +XMAP_ATTRIBS_BEAUTIFY_XML_DESC="Sélectionnez 'Oui' pour ajouter du style au plan du site XML. Cet affichage n'affecte pas le comportement des moteurs de recherche.
Si le plan du site ne s'affiche pas ou que des erreurs sont visibles, veuillez désactiver cette fonction." +XMAP_FIELDSET_NEWS_OPTIONS="Plan des nouvelles (news)" +XMAP_ATTRIBS_NEWS_PUBLICATION_NAME_LABEL="Nom de publication" +XMAP_ATTRIBS_NEWS_PUBLICATION_NAME_DESC="Nom de publication des nouvelles. Il doit correspondre exactement au nom tel qu'il apparaît sur vos articles dans news.google.com, sans omettre les caractères d'échappement.
Par exemple, si le nom apparaît dans Google news avec des guillemets et contient des parenthèses, vous devez les ajouter dans le nom: “Exemple de nom (description)”" +XMAP_ATTRIBS_NEWS_POSTS_KEYWORDS_LABEL="Mots-clés de messages" +XMAP_ATTRIBS_NEWS_POSTS_KEYWORDS_DESC="Liste des mots clés, séparés par une virgule, pour décrire vos messages. Par défaut, le titre de la catégorie est utilisé." + +XMAP_FILTER_SEARCH_DESC="Filtre de recherche de plan du site" + +; Extension edit page +XMAP_PAGE_EDIT_EXTENSION="Modifier Extension" +XMAP_N_EXTENSIONS_UNPUBLISHED="%s extensions désactivées" +XMAP_N_EXTENSIONS_PUBLISHED="%s extensions activées" +XMAP_EXTENSION_DETAILS="Détails" +XMAP_EXTENSION_AUTHOR="Auteur" +XMAP_EXTENSION_AUTHOR_EMAIL="E-mail de l'auteur" +XMAP_EXTENSION_AUTHOR_WEBSITE="Site de l'auteur" +XMAP_EXTENSION_DESCRIPTION="Descriptif" + +XMAP_DESC_EXTENSIONS="Liste des extensions Xmap installées" +XMAP_HEADING_AUTHOR="Auteur" +XMAP_HEADING_DATE="Date" +XMAP_HEADING_FOLDER="Dossier" +XMAP_HEADING_NUM="Num." +XMAP_HEADING_PLUGIN="Plug-in" +XMAP_HEADING_VERSION="Version" +XMAP_INSTALL="Installer" +XMAP_INSTALL_DIRECTORY="Répertoire d'installation" +XMAP_INSTALL_FROM_DIRECTORY="Installer à partir du répertoire" +XMAP_INSTALL_FROM_URL="Installer à partir de l'URL" +XMAP_INSTALL_NEW_EXTENSION="Installer une nouvelle extension" +XMAP_INSTALL_URL="URL d'installation" +XMAP_PACKAGE_FILE="Fichier d'installation" +XMAP_PLEASE_ENTER_A_URL="Veuillez spécifier l'URL" +XMAP_PLEASE_SELECT_A_DIRECTORY="Veuillez spécifier le répertoire" +XMAP_PLEASE_SELECT_A_FILE_TO_UPLOAD="Veuillez spécifier le fichier à envoyer" +XMAP_UPLOAD_FILE="Envoyer le fichier" +XMAP_UPLOAD_PACKAGE_FILE="Envoyer le fichier d'installation" +XMAP_EXTENSION_MANAGER_TITLE="Gestionnaire d'extensions" +XMAP_EXTENSIONS_TITLE="Extensions" diff --git a/administrator/components/com_joxmap/language/fr-FR/fr-FR.com_joxmap.sys.ini b/administrator/components/com_joxmap/language/fr-FR/fr-FR.com_joxmap.sys.ini new file mode 100644 index 00000000..8617ae89 --- /dev/null +++ b/administrator/components/com_joxmap/language/fr-FR/fr-FR.com_joxmap.sys.ini @@ -0,0 +1,30 @@ +; @package Xmap +; @copyright 2007 - 2012 Joomla! Vargas. All rights reserved. +; @subpackage fr-FR.com_xmap.sys.ini +; @description Traduction francophone - fr-FR +; @version 2.3.0 - 23.10.2012 +; @author Mihàly Marti alias Sarki +; @copyright Joomlatutos.com - www.joomlautos.com +; @license GNU General Public License version 2, or later +; @note Client Administrator +; @note All ini files need to be saved as UTF-8 - No BOM + +COM_JOXMAP="JoXmap - Plans du site" +COM_JOXMAP_XML_DESC="

Xmap - Générateur de plan de site pour Joomla!

Xmap vous permet de créer des plans du site à consulter (HTML), et pour les moteurs de recherche (XML) afin d'améliorer le référencement.

Auteurs : JL TRYOEN and Guillermo Vargas and Jesus Vargas - http://joomla.vargas.co.cr

Traduction FR : Mihàly Marti alias Sarki pour www.joomlatutos.com

" +COM_JOXMAP_TITLE="JoXmap" +DEFAULT="Défaut" +XMAP_FILTER_SEARCH_DESC="Filtre de recherche de plan du site" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="Plan du site HTML" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Afficher un plan du site au format HTML" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="Plan du site XML" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Affichez un plan du site au format XML" +COM_JOXMAP_SELECT_AN_SITEMAP="Choisissez un plan du site" +COM_JOXMAP_SELECT_A_SITEMAP="Plan du site" +COM_JOXMAP_CHANGE_SITEMAP_BUTTON="Changement" +COM_JOXMAP_CHANGE_SITEMAP="Sélectionnez un plan du site dans la liste" +XMAP_INSTALLING_XMAP="Installation du composant Xmap, générateur de plans de site pour Joomla!" +XMAP_UPGRADING_XMAP="Mise à jour du composant Xmap, générateur de plans de site pour Joomla!" +XMAP_UNISTALLING_XMAP_EXTENSIONS="Désinstallation de Xmap et ses extensions" +XMAP_INSTALLED_EXTENSION_X="Installation de l'extension %s" +XMAP_NOT_INSTALLED_EXTENSION_X="Impossible d'installer l'extension pour %s" +COM_INSTALLER_TYPE_XMAP_EXT="Extension Xmap" \ No newline at end of file diff --git a/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.ini b/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.ini index c79f278a..464d98d6 100644 --- a/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.ini +++ b/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.ini @@ -47,14 +47,14 @@ XMAP_NEWS_LINK_TOOLTIP="Ga naar de “Nieuws” versie van de sitemap, g XMAP_MESSAGE_EXTENSIONS_DISABLED="Xmap heeft gemerkt dat de volgende extensies kunnen helpen om meer inhoud op uw site te krijgen, maar ze zijn gedeactiveerd. U moet ze handmatig activeren door te gaan naar extensiebeheer: %s" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d sitemaps succesvol gedepubliceerd" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d sitemap succesvol gedepubliceerd" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d sitemaps succesvol gepubliceerd" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d sitemap succesvol gepubliceerd" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED="%d sitemaps succesvol gepubliceerd" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d sitemap succesvol naar trash verplaatst" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED="%d sitemaps succesvol verwijderd" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED_1="%d sitemap succesvol verwijderd" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d sitemaps succesvol gedepubliceerd" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d sitemap succesvol gedepubliceerd" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d sitemaps succesvol gepubliceerd" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d sitemap succesvol gepubliceerd" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED="%d sitemaps succesvol gepubliceerd" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d sitemap succesvol naar trash verplaatst" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED="%d sitemaps succesvol verwijderd" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED_1="%d sitemap succesvol verwijderd" XMAP_FIELDSET_MENUS="Menu's" XMAP_FIELDSET_OPTIONS="Opties" diff --git a/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.sys.ini b/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.sys.ini index 4acd1285..2aa54ff1 100644 --- a/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.sys.ini +++ b/administrator/components/com_joxmap/language/nl-NL/nl-NL.com_xmap.sys.ini @@ -4,23 +4,23 @@ ; Guillermo Vargas (guille@vargas.co.cr) ; -COM_XMAP="Xmap" -COM_XMAP_TITLE="Xmap" +COM_JOXMAP="Xmap" +COM_JOXMAP_TITLE="Xmap" ; ; View and layout titles and descriptions ; -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="HTML Site map" -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Toon een sitemap in HTML formaat" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="XML sitemap" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Toon een sitemap in XML formaat" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="HTML Site map" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Toon een sitemap in HTML formaat" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="XML sitemap" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Toon een sitemap in XML formaat" -COM_XMAP_SELECT_AN_SITEMAP="Kies een sitemap" -COM_XMAP_SELECT_A_SITEMAP="Een sitemap" -COM_XMAP_CHANGE_SITEMAP_BUTTON="Wijzig" -COM_XMAP_CHANGE_SITEMAP="Selecteer een sitemap uit de lijst" +COM_JOXMAP_SELECT_AN_SITEMAP="Kies een sitemap" +COM_JOXMAP_SELECT_A_SITEMAP="Een sitemap" +COM_JOXMAP_CHANGE_SITEMAP_BUTTON="Wijzig" +COM_JOXMAP_CHANGE_SITEMAP="Selecteer een sitemap uit de lijst" COM_INSTALLER_TYPE_XMAP_EXT="Xmap extensie" -COM_XMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Sitemap instellingen" -COM_XMAP_INCLUDE_CSS_LABEL="Xmap's stijl gebruiken" -COM_XMAP_INCLUDE_CSS_DESC="Selecteer Ja om het CSS bestand met de stijlen voor de Sitemap te gebruiken" \ No newline at end of file +COM_JOXMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Sitemap instellingen" +COM_JOXMAP_INCLUDE_CSS_LABEL="Xmap's stijl gebruiken" +COM_JOXMAP_INCLUDE_CSS_DESC="Selecteer Ja om het CSS bestand met de stijlen voor de Sitemap te gebruiken" \ No newline at end of file diff --git a/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.ini b/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.ini index 826151ba..a6fb1134 100644 --- a/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.ini +++ b/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.ini @@ -47,14 +47,14 @@ XMAP_NEWS_LINK_TOOLTIP="Зайдите в раздел “Новости&rdq XMAP_MESSAGE_EXTENSIONS_DISABLED="Xmap обнаружил, что следующие расширения могут помочь получить больше содержания в карте сайта, но они отключены, вам нужно вручную включить их посетив Менеджер расширений: %s" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d карты сайта успешно сняты с публикации" -COM_XMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d карта сайта успешно снята с публикации" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d карты сайта успешно опубликованы" -COM_XMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d карта сайта успешно опубликована" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED="%d карты сайта успешно перенесены в корзину" -COM_XMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d карта сайта успешно перенесена в корзину" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED="%d карты сайта успешно удалены" -COM_XMAP_SITEMAPS_N_ITEMS_DELETED_1="%d карта сайта успешно удалена" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d карты сайта успешно сняты с публикации" +COM_JOXMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d карта сайта успешно снята с публикации" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d карты сайта успешно опубликованы" +COM_JOXMAP_SITEMAPS_N_ITEMS_PUBLISHED_1="%d карта сайта успешно опубликована" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED="%d карты сайта успешно перенесены в корзину" +COM_JOXMAP_SITEMAPS_N_ITEMS_TRASHED_1="%d карта сайта успешно перенесена в корзину" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED="%d карты сайта успешно удалены" +COM_JOXMAP_SITEMAPS_N_ITEMS_DELETED_1="%d карта сайта успешно удалена" XMAP_FIELDSET_MENUS="Меню" XMAP_FIELDSET_OPTIONS="Параметры" diff --git a/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.sys.ini b/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.sys.ini index e4a77e91..d2531941 100644 --- a/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.sys.ini +++ b/administrator/components/com_joxmap/language/ru-RU/ru-RU.com_xmap.sys.ini @@ -4,23 +4,23 @@ ; Guillermo Vargas (guille@vargas.co.cr) ; -COM_XMAP="Xmap" -COM_XMAP_TITLE="Xmap" +COM_JOXMAP="Xmap" +COM_JOXMAP_TITLE="Xmap" ; ; View and layout titles and descriptions ; -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="Карта сайта в HTML" -COM_XMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Отображать карту сайта в HTML формате" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="Карта сайта в XML" -COM_XMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Отображать карту сайта в XML формате" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_TITLE="Карта сайта в HTML" +COM_JOXMAP_SITEMAP_HTML_VIEW_DEFAULT_DESC="Отображать карту сайта в HTML формате" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_TITLE="Карта сайта в XML" +COM_JOXMAP_SITEMAP_XML_VIEW_DEFAULT_DESC="Отображать карту сайта в XML формате" -COM_XMAP_SELECT_AN_SITEMAP="Выберите карту сайта" -COM_XMAP_SELECT_A_SITEMAP="Карта сайта" -COM_XMAP_CHANGE_SITEMAP_BUTTON="Изменить" -COM_XMAP_CHANGE_SITEMAP="Выберите карту сайта из списка" +COM_JOXMAP_SELECT_AN_SITEMAP="Выберите карту сайта" +COM_JOXMAP_SELECT_A_SITEMAP="Карта сайта" +COM_JOXMAP_CHANGE_SITEMAP_BUTTON="Изменить" +COM_JOXMAP_CHANGE_SITEMAP="Выберите карту сайта из списка" COM_INSTALLER_TYPE_XMAP_EXT="Xmap расширение" -COM_XMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Настройки Sitemap" -COM_XMAP_INCLUDE_CSS_LABEL="Включить Xmap's стиль" -COM_XMAP_INCLUDE_CSS_DESC="Выберите Да, для включения CSS-файла со стилями для sitemap" \ No newline at end of file +COM_JOXMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL="Настройки Sitemap" +COM_JOXMAP_INCLUDE_CSS_LABEL="Включить Xmap's стиль" +COM_JOXMAP_INCLUDE_CSS_DESC="Выберите Да, для включения CSS-файла со стилями для sitemap" \ No newline at end of file diff --git a/administrator/components/com_joxmap/services/provider.php b/administrator/components/com_joxmap/services/provider.php new file mode 100644 index 00000000..aeec427f --- /dev/null +++ b/administrator/components/com_joxmap/services/provider.php @@ -0,0 +1,38 @@ +registerServiceProvider(new MVCFactory('\\JLTRY\\Component\\JoXmap')); + $container->registerServiceProvider(new ComponentDispatcherFactory('\\JLTRY\\Component\\JoXmap')); + $container->set( + ComponentInterface::class, + function (Container $container) { + $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class)); + $component->setMVCFactory($container->get(MVCFactoryInterface::class)); + + return $component; + } + ); + } +}; \ No newline at end of file diff --git a/administrator/components/com_joxmap/sql/install.mysql.sql b/administrator/components/com_joxmap/sql/install.mysql.sql index f67b7046..f3e359d2 100644 --- a/administrator/components/com_joxmap/sql/install.mysql.sql +++ b/administrator/components/com_joxmap/sql/install.mysql.sql @@ -1,4 +1,4 @@ -CREATE TABLE IF NOT EXISTS `#__xmap_sitemap` ( +CREATE TABLE IF NOT EXISTS `#__joxmap_sitemap` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) DEFAULT NULL, `alias` varchar(255) DEFAULT NULL, @@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS `#__xmap_sitemap` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `#__xmap_items` ( +CREATE TABLE IF NOT EXISTS `#__joxmap_items` ( `uid` varchar(100) NOT NULL, `itemid` int(11) NOT NULL, `view` varchar(10) NOT NULL, diff --git a/administrator/components/com_joxmap/sql/uninstall.mysql.sql b/administrator/components/com_joxmap/sql/uninstall.mysql.sql index 69c784e4..566f95db 100644 --- a/administrator/components/com_joxmap/sql/uninstall.mysql.sql +++ b/administrator/components/com_joxmap/sql/uninstall.mysql.sql @@ -1,2 +1,2 @@ -drop table `#__xmap_items`; -drop table `#__xmap_sitemap`; \ No newline at end of file +drop table `#__joxmap_items`; +drop table `#__joxmap_sitemap`; \ No newline at end of file diff --git a/administrator/components/com_joxmap/src/Controller/DisplayController.php b/administrator/components/com_joxmap/src/Controller/DisplayController.php new file mode 100644 index 00000000..257decbd --- /dev/null +++ b/administrator/components/com_joxmap/src/Controller/DisplayController.php @@ -0,0 +1,50 @@ +app->getInput(); + // Set the default view (if not specified) + $input->set('view', $input->getCmd('view', 'SiteMaps')); + + // Call parent to display + parent::display($cachable); + } +} \ No newline at end of file diff --git a/administrator/components/com_joxmap/src/Controller/JoXMapController.php b/administrator/components/com_joxmap/src/Controller/JoXMapController.php index 723f2d8c..a0757dee 100644 --- a/administrator/components/com_joxmap/src/Controller/JoXMapController.php +++ b/administrator/components/com_joxmap/src/Controller/JoXMapController.php @@ -1,24 +1,31 @@ registerTask('navigator-links', 'navigatorLinks'); } - /** - * Display the view - */ - public function display($cachable = false, $urlparams = false) - { - require_once JPATH_COMPONENT . '/helpers/xmap.php'; - - // Get the document object. - $document = JFactory::getDocument(); - - // Set the default view name and format from the Request. - $vName = XmapHelper::getWord('view', 'sitemaps'); - $vFormat = $document->getType(); - $lName = XmapHelper::getWord('layout', 'default'); - - // Get and render the view. - if ($view = $this->getView($vName, $vFormat)) { - // Get the model for the view. - $model = $this->getModel($vName); - - // Push the model into the view (as default). - $view->setModel($model, true); - $view->setLayout($lName); - - // Push document object into the view. - $view->document = $document; - - $view->display(); - - } - } function navigator() { - $db = JFactory::getDBO(); - $document = JFactory::getDocument(); - $app = JFactory::getApplication('administrator'); + $db = Factory::getDBO(); + $document = Factory::getDocument(); + $app = Factory::getApplication('administrator'); $id = XmapHelper::getInt('sitemap', 0); $link = urldecode(XmapHelper::getVar('link', '')); @@ -74,11 +50,11 @@ function navigator() } if (!$id) { - JFactory::getApplication()->enqueueMessage(500, JText::_('Xmap_Not_Sitemap_Selected'), 'warning'); + Factory::getApplication()->enqueueMessage(500, Text::_('JOXMAP_NOT_SITEMAP_SELECTED'), 'warning'); return false; } - $app->setUserState('com_xmap.edit.sitemap.id', $id); + $app->setUserState('com_joxmap.edit.sitemap.id', $id); $view = $this->getView('sitemap', $document->getType()); $model = $this->getModel('Sitemap'); @@ -94,9 +70,9 @@ function navigator() function navigatorLinks() { - $db = JFactory::getDBO(); - $document = JFactory::getDocument(); - $app = JFactory::getApplication('administrator'); + $db = Factory::getDBO(); + $document = Factory::getDocument(); + $app = Factory::getApplication('administrator'); $id = XmapHelper::getInt('sitemap', 0); $link = urldecode(XmapHelper::getVar('link', '')); @@ -106,11 +82,11 @@ function navigatorLinks() } if (!$id) { - JFactory::getApplication()->enqueueMessage(500, JText::_('Xmap_Not_Sitemap_Selected'), 'warning'); + Factory::getApplication()->enqueueMessage(500, Text::_('Xmap_Not_Sitemap_Selected'), 'warning'); return false; } - $app->setUserState('com_xmap.edit.sitemap.id', $id); + $app->setUserState('com_joxmap.edit.sitemap.id', $id); $view = $this->getView('sitemap', $document->getType()); $model = $this->getModel('Sitemap'); @@ -125,10 +101,10 @@ function navigatorLinks() private function getDefaultSitemapId() { - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); $query->select('id'); - $query->from($db->quoteName('#__xmap_sitemap')); + $query->from($db->quoteName('#__joxmap_sitemap')); $query->where('is_default=1'); $db->setQuery($query); return $db->loadResult(); diff --git a/administrator/components/com_joxmap/src/Controller/SiteMapController.php b/administrator/components/com_joxmap/src/Controller/SiteMapController.php index b5f9fc34..73587188 100644 --- a/administrator/components/com_joxmap/src/Controller/SiteMapController.php +++ b/administrator/components/com_joxmap/src/Controller/SiteMapController.php @@ -1,22 +1,28 @@ authorise('core.edit', 'com_xmap.sitemap.'.$recordId); + return Factory::getUser()->authorise('core.edit', 'com_joxmap.sitemap.'.$recordId); } } \ No newline at end of file diff --git a/administrator/components/com_joxmap/src/Controller/SiteMapsController.php b/administrator/components/com_joxmap/src/Controller/SiteMapsController.php index 920d53d2..c9748624 100644 --- a/administrator/components/com_joxmap/src/Controller/SiteMapsController.php +++ b/administrator/components/com_joxmap/src/Controller/SiteMapsController.php @@ -1,25 +1,36 @@ input->checkToken() or die('Invalid Token'); + if (version_compare(Version, '4.0', '<')){ + Factory::getApplication()->input->checkToken() or die('Invalid Token'); } // Get items to publish from the request. - $cid = XmapHelper::getVar('cid', 0, '', 'array'); + $cid = JoXmapHelper::getVar('cid', 0, '', 'array'); $id = @$cid[0]; if (!$id) { - JFactory::getApplication()->enqueueMessage(500, JText::_('Select an item to set as default'), 'warning'); + Factory::getApplication()->enqueueMessage(500, Text::_('Select an item to set as default'), 'warning'); } else { @@ -61,11 +72,11 @@ function setDefault() // Publish the items. if (!$model->setDefault($id)) { - JFactory::getApplication()->enqueueMessage(500, $model->getError(), 'warning'); + Factory::getApplication()->enqueueMessage(500, $model->getError(), 'warning'); } } - $this->setRedirect('index.php?option=com_xmap&view=sitemaps'); + $this->setRedirect('index.php?option=com_joxmap&view=sitemaps'); } /** @@ -77,7 +88,7 @@ function setDefault() * @return JModel * @since 2.0 */ - public function getModel($name = 'Sitemap', $prefix = 'XmapModel', $config = array('ignore_request' => true)) + public function getModel($name = 'Sitemap', $prefix = 'JoXmapModel', $config = array('ignore_request' => true)) { $model = parent::getModel($name, $prefix, $config); diff --git a/administrator/components/com_joxmap/src/Field/XmapMenusField.php b/administrator/components/com_joxmap/src/Field/XmapMenusField.php index 588382c8..14dae179 100644 --- a/administrator/components/com_joxmap/src/Field/XmapMenusField.php +++ b/administrator/components/com_joxmap/src/Field/XmapMenusField.php @@ -1,34 +1,33 @@ getQuery(true); //$currentMenus = array_keys(get_object_vars($this->value)); @@ -76,7 +75,7 @@ protected function _getOptions() } // Check for a database error. - if (version_compare(JVERSION, '4.0', '<')){ + if (version_compare(Version::MAJOR_VERSION, '4.0', '<')){ if ($db->getErrorNum()) { JError::raiseWarning(500, $db->getErrorMsg()); } @@ -98,8 +97,8 @@ protected function getInput() $disabled = $this->element['disabled'] == 'true' ? true : false; $readonly = $this->element['readonly'] == 'true' ? true : false; $attributes = ' '; - $type = 'radio'; + if ($v = $this->element['size']) { $attributes .= 'size="' . $v . '" '; } @@ -115,13 +114,13 @@ protected function getInput() $value = $this->value; if (!is_array($value)) { // Convert the selections field to an array. - $registry = new JRegistry; + $registry = new Registry; $registry->loadString($value); $value = $registry->toArray(); } - $version = new JVersion; + $version = new Version; if (version_compare($version->getShortVersion(), '4.0.0-beta', '<')) { - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); $doc->addScriptDeclaration("jQuery(document).ready(function($) { \$('.xmap-menu-options select').mouseover(function(event){xmapMenusSortable.detach();}); \$('.xmap-menu-options select').mouseout(function(event){xmapMenusSortable.attach();}); @@ -161,10 +160,10 @@ protected function getInput() $return .= ''; $return .= ''; $return .= ''; $return .= ''; } diff --git a/administrator/components/com_joxmap/src/Field/modal/sitemaps.php b/administrator/components/com_joxmap/src/Field/modal/sitemaps.php index ed7cd3bf..2ffc5ef1 100644 --- a/administrator/components/com_joxmap/src/Field/modal/sitemaps.php +++ b/administrator/components/com_joxmap/src/Field/modal/sitemaps.php @@ -1,13 +1,17 @@ ')) + if (version_compare(Version, '4.0', '>')) { HTMLHelper::_('bootstrap.renderModal', 'moderateModal'); } else { - JHTML::_('behavior.modal', 'a.modal'); + JHTMLHelper::_('behavior.modal', 'a.modal'); } // Get the title of the linked chart if ($this->value) { $db->setQuery( 'SELECT title' . - ' FROM #__xmap_sitemap' . + ' FROM #__joxmap_sitemap' . ' WHERE id = ' . (int) $this->value ); $title = $db->loadResult(); - if (version_compare(JVERSION, '4.0', '<')){ + if (version_compare(Version, '4.0', '<')){ if ($error = $db->getErrorMsg()) { - JFactory::getApplication()->enqueueMessage(500, $error, 'warning'); + Factory::getApplication()->enqueueMessage(500, $error, 'warning'); } } } else { @@ -65,7 +69,7 @@ protected function getInput() } if (empty($title)) { - $title = JText::_('COM_XMAP_SELECT_AN_SITEMAP'); + $title = Text::_('COM_JOXMAP_SELECT_AN_SITEMAP'); } $doc->addScriptDeclaration( @@ -76,16 +80,16 @@ protected function getInput() }" ); - $link = 'index.php?option=com_xmap&view=sitemaps&layout=modal&tmpl=component&function=jSelectSitemap_' . $this->id; - if (version_compare(JVERSION, '4.0', '<')){ - JHTML::_('behavior.modal', 'a.modal'); + $link = 'index.php?option=com_joxmap&view=sitemaps&layout=modal&tmpl=component&function=jSelectSitemap_' . $this->id; + if (version_compare(Version, '4.0', '<')){ + JHTMLHelper::_('behavior.modal', 'a.modal'); } $html = ''; $html .= "\n" . ''; - if(version_compare(JVERSION,'3.0.0','ge')) - $html .= ' ' . JText::_('COM_XMAP_CHANGE_SITEMAP_BUTTON') . '' . "\n"; + if(version_compare(Version,'3.0.0','ge')) + $html .= ' ' . Text::_('COM_JOXMAP_CHANGE_SITEMAP_BUTTON') . '' . "\n"; else - $html .= '' . "\n"; + $html .= '' . "\n"; $html .= ''; $html .= "\n" . ''; return $html; diff --git a/administrator/components/com_joxmap/src/Helper/HTMLHelperXmap.php b/administrator/components/com_joxmap/src/Helper/HTMLHelperXmap.php index e4ee21bb..3eeee1fa 100644 --- a/administrator/components/com_joxmap/src/Helper/HTMLHelperXmap.php +++ b/administrator/components/com_joxmap/src/Helper/HTMLHelperXmap.php @@ -6,14 +6,14 @@ * @author Guillermo Vargas (guille@vargas.co.cr) */ +namespace JLTRY\Component\JoXmap\Administrator\Helper; // no direct access defined('_JEXEC') or die; -use Joomla\CMS\Table\Table as JTable; -use Joomla\CMS\HTML\HTMLHelper as JHTML; +use Joomla\CMS\Table\Table; +use Joomla\CMS\HTML\HTMLHelper; + -JTable::addIncludePath( JPATH_COMPONENT . '/tables' ); -JHTML::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_xmap' . DS . 'helpers' .DS . 'html'); /** * @package Xmap @@ -31,9 +31,9 @@ public static function priorities($name, $value = '0.5', $j) { // Array of options for ($i=0.1; $i<=1;$i+=0.1) { - $options[] = JHTML::_('select.option',$i,$i);; + $options[] = HTMLHelper::_('select.option',$i,$i);; } - return JHtml::_('select.genericlist', $options, $name, null, 'value', 'text', $value, $name.$j); + return HTMLHelper::_('select.genericlist', $options, $name, null, 'value', 'text', $value, $name.$j); } /** @@ -44,21 +44,14 @@ public static function priorities($name, $value = '0.5', $j) public static function changefrequency($name, $value = 'weekly', $j) { // Array of options - $options[] = JHTML::_('select.option','hourly','hourly'); - $options[] = JHTML::_('select.option','daily','daily'); - $options[] = JHTML::_('select.option','weekly','weekly'); - $options[] = JHTML::_('select.option','monthly','monthly'); - $options[] = JHTML::_('select.option','yearly','yearly'); - $options[] = JHTML::_('select.option','never','never'); - return JHtml::_('select.genericlist', $options, $name, null, 'value', 'text', $value, $name.$j); + $options[] = HTMLHelper::_('select.option','hourly','hourly'); + $options[] = HTMLHelper::_('select.option','daily','daily'); + $options[] = HTMLHelper::_('select.option','weekly','weekly'); + $options[] = HTMLHelper::_('select.option','monthly','monthly'); + $options[] = HTMLHelper::_('select.option','yearly','yearly'); + $options[] = HTMLHelper::_('select.option','never','never'); + return HTMLHelper::_('select.genericlist', $options, $name, null, 'value', 'text', $value, $name.$j); } -} - -if (!JHTML::isRegistered('xmap.priorities')) { - JHTML::register('xmap.priorities', ['HTMLHelperXmap', 'priorities']); } -if (!JHTML::isRegistered('xmap.changefrequency')) { - JHTML::register('xmap.changefrequency', ['HTMLHelperXmap', 'priorities']); -} diff --git a/administrator/components/com_joxmap/src/Helper/XmapHelper.php b/administrator/components/com_joxmap/src/Helper/XmapHelper.php index 545f8ac7..c6e012f3 100644 --- a/administrator/components/com_joxmap/src/Helper/XmapHelper.php +++ b/administrator/components/com_joxmap/src/Helper/XmapHelper.php @@ -1,24 +1,28 @@ getShortVersion(), '3.0.0', '<')) { + if (Version_compare($version->getShortVersion(), '3.0.0', '<')) { JSubMenuHelper::addEntry( - JText::_('Xmap_Submenu_Sitemaps'), - 'index.php?option=com_xmap', + Text::_('Xmap_Submenu_Sitemaps'), + 'index.php?option=com_joxmap', $vName == 'sitemaps' ); JSubMenuHelper::addEntry( - JText::_('Xmap_Submenu_Extensions'), - 'index.php?option=com_plugins&view=plugins&filter_folder=xmap', + Text::_('Xmap_Submenu_Extensions'), + 'index.php?option=com_plugins&view=plugins&filter[folder]=joxmap', $vName == 'extensions'); } else { - JHtmlSidebar::addEntry( - JText::_('Xmap_Submenu_Sitemaps'), - 'index.php?option=com_xmap', + SideBar::addEntry( + Text::_('Xmap_Submenu_Sitemaps'), + 'index.php?option=com_joxmap', $vName == 'sitemaps' ); - JHtmlSidebar::addEntry( - JText::_('Xmap_Submenu_Extensions'), - 'index.php?option=com_plugins&view=plugins&filter_folder=xmap', + SideBar::addEntry( + Text::_('Xmap_Submenu_Extensions'), + 'index.php?option=com_plugins&view=plugins&filter[folder]=joxmap', $vName == 'extensions'); } } public static function getpost() { - if (version_compare(JVERSION, '4.0', 'ge')){ - return JFactory::getApplication()->input->getArray(array()); + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ + return Factory::getApplication()->input->getArray(array()); } else { return call_user_func_array('XmapHelper::get', ['post']); @@ -65,11 +69,11 @@ public static function getpost() { } public static function get(...$params) { - if (version_compare(JVERSION, '4.0', 'ge')){ + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ if ($params[0] == 'post '){ - return JFactory::getApplication()->input->getInputForRequestMethod('POST'); + return Factory::getApplication()->input->getInputForRequestMethod('POST'); } else { - return call_user_func_array(array(JFactory::getApplication()->input, 'get'), $params); + return call_user_func_array(array(Factory::getApplication()->input, 'get'), $params); } } else { @@ -78,8 +82,8 @@ public static function get(...$params) { } public static function getVar(...$params) { - if (version_compare(JVERSION, '4.0', 'ge')){ - return call_user_func_array(array(JFactory::getApplication()->input, 'getVar'), $params); + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ + return call_user_func_array(array(Factory::getApplication()->input, 'getVar'), $params); } else { return call_user_func_array('XmapHelper::getVar', $params); @@ -88,8 +92,8 @@ public static function getVar(...$params) { public static function setVar(...$params) { - if (version_compare(JVERSION, '4.0', 'ge')){ - call_user_func_array(array(JFactory::getApplication()->input, 'setVar'), $params); + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ + call_user_func_array(array(Factory::getApplication()->input, 'setVar'), $params); } else { call_user_func_array('XmapHelper::setVar', $params); @@ -97,8 +101,8 @@ public static function setVar(...$params) { } public static function getCmd(...$params) { - if (version_compare(JVERSION, '4.0', 'ge')){ - return call_user_func_array(array(JFactory::getApplication()->input, 'getCmd'), $params); + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ + return call_user_func_array(array(Factory::getApplication()->input, 'getCmd'), $params); } else { return call_user_func_array('XmapHelper::getCmd', $params); @@ -106,8 +110,8 @@ public static function getCmd(...$params) { } public static function getInt(...$params) { - if (version_compare(JVERSION, '4.0', 'ge')){ - $recordId = call_user_func_array(array(JFactory::getApplication()->input, 'getInt'), $params); + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ + $recordId = call_user_func_array(array(Factory::getApplication()->input, 'getInt'), $params); } else { $recordId = (int)call_user_func_array('XmapHelper::getInt', $params); @@ -116,16 +120,16 @@ public static function getInt(...$params) { public static function getBool(...$params) { - if (version_compare(JVERSION, '4.0', 'ge')){ - return call_user_func_array(array(JFactory::getApplication()->input, 'getBool'), $params); + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ + return call_user_func_array(array(Factory::getApplication()->input, 'getBool'), $params); } else { return (int)call_user_func_array('XmapHelper::getBool', $params); } } public static function getWord(...$params) { - if (version_compare(JVERSION, '4.0', 'ge')){ - return call_user_func_array(array(JFactory::getApplication()->input, 'getWord'), $params); + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ + return call_user_func_array(array(Factory::getApplication()->input, 'getWord'), $params); } else { return (int)call_user_func_array('XmapHelper::getWord', $params); @@ -133,15 +137,15 @@ public static function getWord(...$params) { } public static function getURI() { - if (version_compare(JVERSION, '4.0', 'ge')){ + if (Version_compare(Version::MAJOR_VERSION, '4.0', 'ge')){ return JUri::getInstance(); } else { - return JFactory::getURI(); + return Factory::getURI(); } } public static function getShortVersion() { - return implode(".", array_slice(explode(".", JVERSION), 0,3)); + return implode(".", array_slice(explode(".", Version), 0,3)); } } diff --git a/administrator/components/com_joxmap/src/Helper/installer.php b/administrator/components/com_joxmap/src/Helper/installer.php index 3538b12e..46eeebf0 100644 --- a/administrator/components/com_joxmap/src/Helper/installer.php +++ b/administrator/components/com_joxmap/src/Helper/installer.php @@ -1,24 +1,28 @@ load('com_installer', JPATH_ADMINISTRATOR); -class XmapInstaller extends JInstaller +class JoXmapInstaller extends JInstaller { public function __construct($basepath, $classprefix=null, $adapterfolder=null) { - JAdapter::__construct(JPATH_ADMINISTRATOR '/components/com_xmap', 'JInstaller'); + JAdapter::__construct(JPATH_ADMINISTRATOR '/components/com_joxmap', 'JInstaller'); } /** @@ -33,7 +37,7 @@ public static function getInstance() static $instance; if (!isset($instance)) { - $instance = new XmapInstaller(''); + $instance = new JoXmapInstaller(''); } return $instance; } diff --git a/administrator/components/com_joxmap/src/Model/SiteMapModel.php b/administrator/components/com_joxmap/src/Model/SiteMapModel.php index 115fb104..6d6bd6e1 100644 --- a/administrator/components/com_joxmap/src/Model/SiteMapModel.php +++ b/administrator/components/com_joxmap/src/Model/SiteMapModel.php @@ -1,21 +1,27 @@ _item = 'sitemap'; - $this->_option = 'com_xmap'; + $this->_option = 'com_joxmap'; } /** @@ -46,31 +52,37 @@ public function __construct($config = array()) */ protected function _populateState() { - $app = JFactory::getApplication('administrator'); + $app = Factory::getApplication('administrator'); // Load the User state. - if (!($pk = (int) $app->getUserState('com_xmap.edit.sitemap.id'))) { - $pk = (int) XmapHelper::getInt('id'); + if (!($pk = (int) $app->getUserState('com_joxmap.edit.sitemap.id'))) { + $pk = Factory::getApplication()->input->getInt('id'); } $this->setState('sitemap.id', $pk); // Load the parameters. - $params = JComponentHelper::getParams('com_xmap'); + $params = ComponentHelper::getParams('com_joxmap'); $this->setState('params', $params); } - /** - * Returns a Table object, always creating it. - * - * @param type The table type to instantiate - * @param string A prefix for the table class name. Optional. - * @param array Configuration array for model. Optional. - * @return XmapTableSitemap A database object - */ - public function getTable($type = 'Sitemap', $prefix = 'XmapTable', $config = array()) - { - return JTable::getInstance($type, $prefix, $config); - } +/** + * Returns a reference to the a Table object, always creating it. + * + * @param type The table type to instantiate + * @param string A prefix for the table class name. Optional. + * @param array Configuration array for model. Optional. + * @return Table A database object + * @since 1.6 + */ + public function getTable($type = 'Joxmap', $prefix = 'Administrator', $config = array()) + { + /** @var \Joomla\CMS\MVC\Factory\MVCFactory $mvc */ + $mvc = Factory::getApplication() + ->bootComponent("com_joxmap") + ->getMVCFactory(); + return $mvc->createTable($type, $prefix, $config); + } + /** * Method to get a single record. @@ -81,42 +93,7 @@ public function getTable($type = 'Sitemap', $prefix = 'XmapTable', $config = arr */ public function getItem($pk = null) { - // Initialise variables. - $pk = (!empty($pk)) ? $pk : (int)$this->getState('sitemap.id'); - $false = false; - - // Get a row instance. - $table = $this->getTable(); - - // Attempt to load the row. - $return = $table->load($pk); - - // Check for a table object error. - if ($return === false && $table->getError()) { - $this->setError($table->getError()); - return $false; - } - - // Prime required properties. - if (empty($table->id)) - { - // Prepare data for a new record. - } - - // Convert to the JObject before adding other data. - $value = $table->getProperties(1); - if (version_compare(JVERSION, '4.0', 'ge')){ - $value = ArrayHelper::toObject($value, 'Joomla\CMS\Object\CMSObject'); - } else { - $value = JArrayHelper::toObject($value, 'JObject'); - } - - // Convert the params field to an array. - $registry = new JRegistry; - $registry->loadString($table->attribs); - $value->attribs = $registry->toArray(); - - return $value; + return parent::getItem($pk); } /** @@ -130,7 +107,8 @@ public function getItem($pk = null) public function getForm($data = array(), $loadData = true) { // Get the form. - $form = $this->loadForm('com_xmap.sitemap', 'sitemap', array('control' => 'jform', 'load_data' => $loadData)); + $form = $this->loadForm('com_joxmap.sitemap', 'sitemap', array('control' => 'jform', 'load_data' => $loadData)); + if (empty($form)) { return false; } @@ -147,7 +125,7 @@ public function getForm($data = array(), $loadData = true) protected function loadFormData() { // Check the session for previously entered form data. - $data = JFactory::getApplication()->getUserState('com_xmap.edit.sitemap.data', array()); + $data = Factory::getApplication()->getUserState('com_joxmap.edit.sitemap.data', array()); if (empty($data)) { $data = $this->getItem(); @@ -179,7 +157,7 @@ public function save($data) // Bind the data. if (!$table->bind($data)) { - $this->setError(JText::sprintf('JERROR_TABLE_BIND_FAILED', $table->getError())); + $this->setError(Text::sprintf('JERROR_TABLE_BIND_FAILED', $table->getError())); return false; } @@ -208,25 +186,18 @@ public function save($data) if ($table->is_default) { $query = $this->_db->getQuery(true) - ->update($this->_db->quoteName('#__xmap_sitemap')) + ->update($this->_db->quoteName('#__joxmap_sitemap')) ->set($this->_db->quoteName('is_default').' = 0') ->where($this->_db->quoteName('id').' <> '.$table->id); $this->_db->setQuery($query); - if (version_compare(JVERSION, '4.0', 'ge')) { - if (!$this->_db->execute()) { + if (!$this->_db->execute()) { $this->setError($table->_db->getErrorMsg()); - } - } else { - if (!$this->_db->query()) { - $this->setError($table->_db->getErrorMsg()); - return false; - } } } // Clean the cache. - $cache = JFactory::getCache('com_xmap'); + $cache = Factory::getCache('com_joxmap'); $cache->clean(); $this->setState('sitemap.id', $table->id); @@ -252,13 +223,13 @@ function setDefault($id) { $table = $this->getTable(); if ($table->load($id)) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true) - ->update($db->quoteName('#__xmap_sitemap')) + ->update($db->quoteName('#__joxmap_sitemap')) ->set($db->quoteName('is_default').' = 0') ->where($db->quoteName('id').' <> '.$table->id); $this->_db->setQuery($query); - if (version_compare(JVERSION, '4.0', 'ge')) { + if (version_compare(Version, '4.0', 'ge')) { if (!$this->_db->execute()) { $this->setError($table->_db->getErrorMsg()); } @@ -272,7 +243,7 @@ function setDefault($id) $table->store(); // Clean the cache. - $cache = JFactory::getCache('com_xmap'); + $cache = Factory::getCache('com_joxmap'); $cache->clean(); return true; } @@ -289,10 +260,10 @@ public function checkout($pk = null) private function getDefaultSitemapId() { - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $query = $db->getQuery(true); $query->select('id'); - $query->from($db->quoteName('#__xmap_sitemap')); + $query->from($db->quoteName('#__joxmap_sitemap')); $query->where('is_default=1'); $db->setQuery($query); return $db->loadResult(); diff --git a/administrator/components/com_joxmap/src/Model/SiteMapsModel.php b/administrator/components/com_joxmap/src/Model/SiteMapsModel.php index 38fc0965..8663b567 100644 --- a/administrator/components/com_joxmap/src/Model/SiteMapsModel.php +++ b/administrator/components/com_joxmap/src/Model/SiteMapsModel.php @@ -1,16 +1,22 @@ from('#__xmap_sitemap AS a'); + $query->from('#__joxmap_sitemap AS a'); // Join over the asset groups. $query->select('ag.title AS access_level'); @@ -159,7 +165,7 @@ public function getExtensionsMessage() $query = $db->getQuery(true); $query->select('e.*'); $query->from($db->quoteName('#__extensions'). 'AS e'); - $query->join('INNER', '#__extensions AS p ON e.element=p.element and p.enabled=0 and p.type=\'plugin\' and p.folder=\'xmap\''); + $query->join('INNER', '#__extensions AS p ON e.element=p.element and p.enabled=0 and p.type=\'plugin\' and p.folder=\'joxmap\''); $query->where('e.type=\'component\' and e.enabled=1'); $db->setQuery($query); @@ -171,7 +177,7 @@ public function getExtensionsMessage() $sep = ', '; } - return JText::sprintf('XMAP_MESSAGE_EXTENSIONS_DISABLED',$extensionsNameList); + return Text::sprintf('XMAP_MESSAGE_EXTENSIONS_DISABLED',$extensionsNameList); } else { return ""; } diff --git a/administrator/components/com_joxmap/src/Table/JoxmapTable.php b/administrator/components/com_joxmap/src/Table/JoxmapTable.php index 28a48c29..124b15a5 100644 --- a/administrator/components/com_joxmap/src/Table/JoxmapTable.php +++ b/administrator/components/com_joxmap/src/Table/JoxmapTable.php @@ -1,22 +1,29 @@ loadArray($array['attribs']); $array['attribs'] = $registry->toString(); } @@ -131,13 +138,13 @@ function bind($array, $ignore = '') ); } - $registry = new JRegistry(); + $registry = new Registry(); $registry->loadArray($selections); $array['selections'] = $registry->toString(); } if (isset($array['metadata']) && is_array($array['metadata'])) { - $registry = new JRegistry(); + $registry = new Registry(); $registry->loadArray($array['metadata']); $array['metadata'] = $registry->toString(); } @@ -157,7 +164,7 @@ function check() { if (empty($this->title)) { - $this->setError(JText::_('Sitemap must have a title')); + $this->setError(Text::_('Sitemap must have a title')); return false; } @@ -167,7 +174,7 @@ function check() $this->alias = ApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $datenow = &JFactory::getDate(); + $datenow = &Factory::getDate(); $this->alias = $datenow->format("Y-m-d-H-i-s"); } @@ -183,7 +190,7 @@ function check() */ public function store($updateNulls = false) { - $date = JFactory::getDate(); + $date = Factory::getDate(); if (!$this->id) { $this->created = $date->toSql(); } @@ -207,11 +214,7 @@ public function publish($pks = null, $state = 1, $userId = 0) $k = $this->_tbl_key; // Sanitize input. - if (version_compare(JVERSION, '4.0', 'ge')){ - ArrayHelper::toInteger($pks); - } else { - JArrayHelper::toInteger($pks); - } + ArrayHelper::toInteger($pks); $userId = (int) $userId; $state = (int) $state; @@ -222,7 +225,7 @@ public function publish($pks = null, $state = 1, $userId = 0) } // Nothing to set publishing state on, return false. else { - $this->setError(JText::_('No_Rows_Selected')); + $this->setError(Text::_('No_Rows_Selected')); return false; } } @@ -233,26 +236,15 @@ public function publish($pks = null, $state = 1, $userId = 0) // Update the publishing state for rows with the given primary keys. $query = $this->_db->getQuery(true) - ->update($this->_db->quoteName('#__xmap_sitemap')) + ->update($this->_db->quoteName('#__joxmap_sitemap')) ->set($this->_db->quoteName('state').' = '. (int) $state) ->where($where); $this->_db->setQuery($query); - if (version_compare(JVERSION, '4.0', 'ge')) { - if (!$this->_db->execute()) { - return false; - } - } else { - $this->_db->query(); - // Check for a database error. - if ($this->_db->getErrorNum()) { - $this->setError($this->_db->getErrorMsg()); - return false; - } + if (!$this->_db->execute()) { + return false; } - - // If the JTable instance value is in the list of primary keys that were set, set the instance. if (in_array($this->$k, $pks)) { $this->state = $state; diff --git a/administrator/components/com_joxmap/src/View/SiteMap/HtmlView.php b/administrator/components/com_joxmap/src/View/SiteMap/HtmlView.php index f181b8c7..e242a34e 100644 --- a/administrator/components/com_joxmap/src/View/SiteMap/HtmlView.php +++ b/administrator/components/com_joxmap/src/View/SiteMap/HtmlView.php @@ -1,26 +1,33 @@ state = $this->get('State'); + $app = Factory::getApplication(); $this->item = $this->get('Item'); + if ($this->item) { + $this->state = $this->get('State'); + } $this->form = $this->get('Form'); $this->fieldsets = $this->form ? $this->form->getFieldsets() : null; - $version = new JVersion; // Check for errors. if (count($errors = $this->get('Errors'))) { @@ -48,22 +56,15 @@ function display($tpl = null) return false; } - JHTML::stylesheet('administrator/components/com_xmap/css/xmap.css'); + HTMLHelper::stylesheet('media/com_joxmap/css/xmapedit.css'); // Convert dates from UTC $offset = $app->getCfg('offset'); if (intval($this->item->created)) { - $this->item->created = JHtml::date($this->item->created, '%Y-%m-%d %H-%M-%S', $offset); + $this->item->created = HTMLHelper::date($this->item->created, '%Y-%m-%d %H-%M-%S', $offset); } $this->addToolbar(); - if (version_compare($version->getShortVersion(), '3.0.0', '<')) { - $tpl = 'legacy'; - } - $versionshort = $version->getShortVersion(); - if (version_compare($version->getShortVersion(), '4.0.0-beta', '>')) { - $tpl = 'new'; - } // XmapHelper::setVar('hidemainmenu', true); parent::display($tpl); } @@ -75,10 +76,11 @@ function display($tpl = null) */ function navigator($tpl = null) { - require_once(JPATH_COMPONENT_SITE . '/helpers/xmap.php'); - $app = JFactory::getApplication(); - $this->state = $this->get('State'); + $app = Factory::getApplication(); $this->item = $this->get('Item'); + if ($this->item) { + $this->state = $this->get('State'); + } $menuItems = XmapHelper::getMenuItems($item->selections); $extensions = XmapHelper::getExtensions(); @@ -88,8 +90,8 @@ function navigator($tpl = null) return false; } - JHTML::script('mootree.js', 'media/system/js/'); - JHTML::stylesheet('mootree.css', 'media/system/css/'); + HTMLHelper::script('mootree.js', 'media/system/js/'); + HTMLHelper::stylesheet('mootree.css', 'media/system/css/'); $this->loadTemplate('class'); $displayer = new XmapNavigatorDisplayer($state->params, $this->item); @@ -99,7 +101,6 @@ function navigator($tpl = null) function navigatorLinks($tpl = null) { - require_once(JPATH_COMPONENT_SITE . '/helpers/xmap.php'); $link = urldecode(XmapHelper::getVar('link', '')); $name = XmapHelper::getCmd('e_name', ''); $Itemid = XmapHelper::getInt('Itemid'); @@ -175,10 +176,10 @@ function navigatorLinks($tpl = null) */ function addToolbar() { - $user = JFactory::getUser(); + $user = Factory::getUser(); $isNew = ($this->item->id == 0); - $title = JText::_('XMAP_PAGE_' . ($isNew ? 'ADD_SITEMAP' : 'EDIT_SITEMAP')); + $title = Text::_('XMAP_PAGE_' . ($isNew ? 'ADD_SITEMAP' : 'EDIT_SITEMAP')); ToolbarHelper::title($title,'article-add.png'); ToolBarHelper::apply('sitemap.apply', 'JTOOLBAR_APPLY'); ToolbarHelper::saveGroup( diff --git a/administrator/components/com_joxmap/src/View/SiteMaps/HtmlView.php b/administrator/components/com_joxmap/src/View/SiteMaps/HtmlView.php index 00c13dd0..128a66e6 100644 --- a/administrator/components/com_joxmap/src/View/SiteMaps/HtmlView.php +++ b/administrator/components/com_joxmap/src/View/SiteMaps/HtmlView.php @@ -6,22 +6,25 @@ * @author Guillermo Vargas (guille@vargas.co.cr) */ +namespace JLTRY\Component\JoXmap\Administrator\View\SiteMaps; // no direct access defined('_JEXEC') or die; -jimport('joomla.application.component.view'); -use Joomla\CMS\Factory as JFactory; -use Joomla\CMS\MVC\View\HtmlView as JViewLegacy; -use Joomla\CMS\Toolbar\ToolbarHelper as JToolbarHelper; -use Joomla\CMS\Version as JVersion; -use Joomla\CMS\Language\Text as JText; +use JLTRY\Component\JoXmap\Administrator\Helper\XmapHelper; +use Joomla\CMS\Factory; +use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; +use Joomla\CMS\HTML\Helpers\Sidebar; +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Toolbar\ToolbarHelper; +use Joomla\CMS\Version; +use Joomla\CMS\Language\Text; /** * @package Xmap * @subpackage com_xmap * @since 2.0 */ -class XmapViewSitemaps extends JViewLegacy +class HtmlView extends BaseHtmlView { protected $state; protected $items; @@ -40,16 +43,16 @@ public function display($tpl = null) $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); - $version = new JVersion; + $version = new Version; $message = $this->get('ExtensionsMessage'); if ( $message ) { - JFactory::getApplication()->enqueueMessage($message); + Factory::getApplication()->enqueueMessage($message); } // Check for errors. - if (count($errors = $this->get('Errors'))) { - JFactory::getApplication()->enqueueMessage(500, implode("\n", $errors), 'error'); + if ($errors && count($errors = $this->get('Errors'))) { + Factory::getApplication()->enqueueMessage(500, implode("\n", $errors), 'error'); return false; } @@ -72,45 +75,47 @@ public function display($tpl = null) protected function addToolbar() { $state = $this->get('State'); - $doc = JFactory::getDocument(); - $version = new JVersion; + $doc = Factory::getDocument(); + $version = new Version; - JToolBarHelper::addNew('sitemap.add'); - JToolBarHelper::custom('sitemap.edit', 'edit.png', 'edit_f2.png', 'JTOOLBAR_EDIT', true); + ToolBarHelper::addNew('sitemap.add'); + ToolBarHelper::custom('sitemap.edit', 'edit.png', 'edit_f2.png', 'JTOOLBAR_EDIT', true); - $doc->addStyleDeclaration('.icon-48-sitemap {background-image: url(components/com_xmap/images/sitemap-icon.png);}'); - JToolBarHelper::title(JText::_('XMAP_SITEMAPS_TITLE'), 'sitemap.png'); - JToolBarHelper::custom('sitemaps.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_Publish', true); - JToolBarHelper::custom('sitemaps.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); + $doc->addStyleDeclaration('.icon-48-sitemap {background-image: url(media/com_joxmap/images/sitemap-icon.png);}'); + ToolBarHelper::title(Text::_('XMAP_SITEMAPS_TITLE'), 'sitemap.png'); + ToolBarHelper::custom('sitemaps.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_Publish', true); + ToolBarHelper::custom('sitemaps.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); if (version_compare($version->getShortVersion(), '3.0.0', '>=')) { - JToolBarHelper::custom('sitemaps.setdefault', 'featured.png', 'featured_f2.png', 'XMAP_TOOLBAR_SET_DEFAULT', true); + ToolBarHelper::custom('sitemaps.setdefault', 'featured.png', 'featured_f2.png', 'XMAP_TOOLBAR_SET_DEFAULT', true); } else { - JToolBarHelper::custom('sitemaps.setdefault', 'default.png', 'default_f2.png', 'XMAP_TOOLBAR_SET_DEFAULT', true); + ToolBarHelper::custom('sitemaps.setdefault', 'default.png', 'default_f2.png', 'XMAP_TOOLBAR_SET_DEFAULT', true); } - if ($state->get('filter.published') == -2) { - JToolBarHelper::deleteList('', 'sitemaps.delete','JTOOLBAR_DELETE'); - } - else { - JToolBarHelper::trash('sitemaps.trash','JTOOLBAR_TRASH'); + if ($state) { + if ($state->get('filter.published') == -2) { + ToolBarHelper::deleteList('', 'sitemaps.delete','JTOOLBAR_DELETE'); + } + else { + ToolBarHelper::trash('sitemaps.trash','JTOOLBAR_TRASH'); + } } - JToolBarHelper::divider(); + ToolBarHelper::divider(); - if (class_exists('JHtmlSidebar')){ - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_PUBLISHED'), + if (class_exists('JHtmlSidebar') && $this->state){ + Sidebar::addFilter( + Text::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', - JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) + HTMLHelper::_('select.options', HTMLHelper::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) ); - JHtmlSidebar::addFilter( - JText::_('JOPTION_SELECT_ACCESS'), + SideBar::addFilter( + Text::_('JOPTION_SELECT_ACCESS'), 'filter_access', - JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) + HTMLHelper::_('select.options', HTMLHelper::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) ); - $this->sidebar = JHtmlSidebar::render(); + $this->sidebar = SideBar::render(); } } } diff --git a/administrator/components/com_joxmap/tmpl/SiteMap/edit.php b/administrator/components/com_joxmap/tmpl/SiteMap/edit.php index 329bed07..9bb9f9ed 100644 --- a/administrator/components/com_joxmap/tmpl/SiteMap/edit.php +++ b/administrator/components/com_joxmap/tmpl/SiteMap/edit.php @@ -1,9 +1,12 @@ getTemplate(); @@ -44,7 +47,7 @@ function submitbutton(task) } } - +
diff --git a/administrator/components/com_joxmap/tmpl/SiteMap/navigator.php b/administrator/components/com_joxmap/tmpl/SiteMap/navigator.php index df3f4aee..3bf4dc3f 100644 --- a/administrator/components/com_joxmap/tmpl/SiteMap/navigator.php +++ b/administrator/components/com_joxmap/tmpl/SiteMap/navigator.php @@ -1,16 +1,19 @@ addScriptDeclaration(' var tree; var autotext = \'\'; @@ -55,7 +58,7 @@ text: \'Home\', open: true }); - tree.root.load(\'index.php?option=com_xmap&task=navigator-links&sitemap='.$this->item->id.'&e_name='.$name.'&tmpl=component\'); + tree.root.load(\'index.php?option=com_joxmap&task=navigator-links&sitemap='.$this->item->id.'&e_name='.$name.'&tmpl=component\'); }); '); ?> @@ -64,27 +67,27 @@ - + - + - + - + - +
- - + +
diff --git a/administrator/components/com_joxmap/tmpl/SiteMap/navigator_class.php b/administrator/components/com_joxmap/tmpl/SiteMap/navigator_class.php index 9fd2d9fa..030a3d13 100644 --- a/administrator/components/com_joxmap/tmpl/SiteMap/navigator_class.php +++ b/administrator/components/com_joxmap/tmpl/SiteMap/navigator_class.php @@ -1,9 +1,12 @@ list as $node) { - $load = 'index.php?option=com_xmap&task=navigator-links&sitemap='.$this->item->id.'&e_name='.$name.(isset($node->id)?'&Itemid='.$node->id:'').(isset($node->link)?'&link='.urlencode($node->link):'').'&tmpl=component'; + $load = 'index.php?option=com_joxmap&task=navigator-links&sitemap='.$this->item->id.'&e_name='.$name.(isset($node->id)?'&Itemid='.$node->id:'').(isset($node->link)?'&link='.urlencode($node->link):'').'&tmpl=component'; ?> expandible?" openicon=\"_open\" icon=\"_closed\" load=\"$load\"":' icon="_doc"'); ?> uid="uid; ?>" link="link); ?>" selectable="selectable?'true':'false'); ?>" /> diff --git a/administrator/components/com_joxmap/tmpl/SiteMaps/default.php b/administrator/components/com_joxmap/tmpl/SiteMaps/default.php index 0da5f1f5..fa5eac95 100644 --- a/administrator/components/com_joxmap/tmpl/SiteMaps/default.php +++ b/administrator/components/com_joxmap/tmpl/SiteMaps/default.php @@ -1,35 +1,36 @@ items); +HTMLHelper::_('bootstrap.tooltip'); +HTMLHelper::_('formbehavior.chosen', 'select'); + + +$n = ($this->items) ? count($this->items): 0; $baseUrl = JUri::root(); -$version = new JVersion; +$version = new Version; ?> - + sidebar)): ?>
sidebar; ?> @@ -40,12 +41,12 @@
- - + +
@@ -53,27 +54,27 @@ - + - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> -
- () +
+ () -
- +
+ - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> @@ -87,32 +88,32 @@ items as $i => $item) : - $now = JFactory::getDate()->toUnix(); + $now = Factory::getDate()->toUnix(); if ( !$item->lastvisit_html ) { - $htmlDate = JText::_('Date_Never'); + $htmlDate = Text::_('Date_Never'); }elseif ( $item->lastvisit_html > ($now-3600)) { // Less than one hour - $htmlDate = JText::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_html)/60)); + $htmlDate = Text::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_html)/60)); } elseif ( $item->lastvisit_html > ($now-86400)) { // Less than one day $hours = intval (($now-$item->lastvisit_html)/3600 ); - $htmlDate = JText::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_html)/60); + $htmlDate = Text::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_html)/60); } elseif ( $item->lastvisit_html > ($now-259200)) { // Less than three days $days = intval(($now-$item->lastvisit_html)/86400); - $htmlDate = JText::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_html)/3600)); + $htmlDate = Text::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_html)/3600)); } else { $date = new JDate($item->lastvisit_html); $htmlDate = $date->format('Y-m-d H:i'); } if ( !$item->lastvisit_xml ) { - $xmlDate = JText::_('Date_Never'); + $xmlDate = Text::_('Date_Never'); } elseif ( $item->lastvisit_xml > ($now-3600)) { // Less than one hour - $xmlDate = JText::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_xml)/60)); + $xmlDate = Text::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_xml)/60)); } elseif ( $item->lastvisit_xml > ($now-86400)) { // Less than one day $hours = intval (($now-$item->lastvisit_xml)/3600 ); - $xmlDate = JText::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_xml)/60); + $xmlDate = Text::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_xml)/60); } elseif ( $item->lastvisit_xml > ($now-259200)) { // Less than three days $days = intval(($now-$item->lastvisit_xml)/86400); - $xmlDate = JText::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_xml)/3600)); + $xmlDate = Text::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_xml)/3600)); } else { $date = new JDate($item->lastvisit_xml); $xmlDate = $date->format('Y-m-d H:i'); @@ -121,28 +122,28 @@ ?> - id); ?> + id); ?> - + escape($item->title); ?> is_default == 1) : ?> getShortVersion(), '3.0.0', '>=')): ?> - <?php echo JText::_('Default'); ?> + <?php echo Text::_('Default'); ?> state): ?> - [] - [] - [] + [] + [] + []
(escape($item->alias); ?>) - state, $i, 'sitemaps.'); ?> + state, $i, 'sitemaps.'); ?> escape($item->access_level); ?> @@ -165,6 +166,6 @@ - +
diff --git a/administrator/components/com_joxmap/tmpl/SiteMaps/default_legacy.php b/administrator/components/com_joxmap/tmpl/SiteMaps/default_legacy.php index 3a15a888..0a1e079f 100644 --- a/administrator/components/com_joxmap/tmpl/SiteMaps/default_legacy.php +++ b/administrator/components/com_joxmap/tmpl/SiteMaps/default_legacy.php @@ -9,39 +9,39 @@ // no direct access defined('_JEXEC') or die; -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -JHtml::_('bootstrap.tooltip'); +JHTMLHelper::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHTMLHelper::_('bootstrap.tooltip'); $n = count($this->items); $baseUrl = JUri::root(); -$version = new JVersion; +$version = new Version; ?> -
+
- + + +
@@ -54,24 +54,24 @@ - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> -
- () +
+ () -
- +
+ - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> @@ -85,32 +85,32 @@ items as $i => $item) : - $now = JFactory::getDate()->toUnix(); + $now = Factory::getDate()->toUnix(); if ( !$item->lastvisit_html ) { - $htmlDate = JText::_('Date_Never'); + $htmlDate = Text::_('Date_Never'); }elseif ( $item->lastvisit_html > ($now-3600)) { // Less than one hour - $htmlDate = JText::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_html)/60)); + $htmlDate = Text::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_html)/60)); } elseif ( $item->lastvisit_html > ($now-86400)) { // Less than one day $hours = intval (($now-$item->lastvisit_html)/3600 ); - $htmlDate = JText::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_html)/60); + $htmlDate = Text::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_html)/60); } elseif ( $item->lastvisit_html > ($now-259200)) { // Less than three days $days = intval(($now-$item->lastvisit_html)/86400); - $htmlDate = JText::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_html)/3600)); + $htmlDate = Text::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_html)/3600)); } else { $date = new JDate($item->lastvisit_html); $htmlDate = $date->format('Y-m-d H:i'); } if ( !$item->lastvisit_xml ) { - $xmlDate = JText::_('Date_Never'); + $xmlDate = Text::_('Date_Never'); } elseif ( $item->lastvisit_xml > ($now-3600)) { // Less than one hour - $xmlDate = JText::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_xml)/60)); + $xmlDate = Text::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_xml)/60)); } elseif ( $item->lastvisit_xml > ($now-86400)) { // Less than one day $hours = intval (($now-$item->lastvisit_xml)/3600 ); - $xmlDate = JText::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_xml)/60); + $xmlDate = Text::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_xml)/60); } elseif ( $item->lastvisit_xml > ($now-259200)) { // Less than three days $days = intval(($now-$item->lastvisit_xml)/86400); - $xmlDate = JText::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_xml)/3600)); + $xmlDate = Text::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_xml)/3600)); } else { $date = new JDate($item->lastvisit_xml); $xmlDate = $date->format('Y-m-d H:i'); @@ -119,28 +119,28 @@ ?> - id); ?> + id); ?> - + escape($item->title); ?> is_default == 1) : ?> getShortVersion(), '3.0.0', '>=')): ?> - <?php echo JText::_('Default'); ?> + <?php echo Text::_('Default'); ?> state): ?> - [] - [] - [] + [] + [] + []
(escape($item->alias); ?>) - state, $i, 'sitemaps.'); ?> + state, $i, 'sitemaps.'); ?> escape($item->access_level); ?> @@ -163,5 +163,5 @@ - + diff --git a/administrator/components/com_joxmap/tmpl/SiteMaps/modal.php b/administrator/components/com_joxmap/tmpl/SiteMaps/modal.php index ed209887..9b37ef30 100644 --- a/administrator/components/com_joxmap/tmpl/SiteMaps/modal.php +++ b/administrator/components/com_joxmap/tmpl/SiteMaps/modal.php @@ -9,35 +9,35 @@ // no direct access defined('_JEXEC') or die; -JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); -JHtml::_('bootstrap.tooltip'); +JHTMLHelper::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHTMLHelper::_('bootstrap.tooltip'); $function = XmapHelper::getVar('function', 'jSelectSitemap'); $n = count($this->items); ?> -
+
- + + +
@@ -47,24 +47,24 @@ - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> -
- () +
+ () -
- +
+ - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.ordering')); ?> @@ -79,32 +79,32 @@ items as $i => $item) : - $now = JFactory::getDate()->toUnix(); + $now = Factory::getDate()->toUnix(); if ( !$item->lastvisit_html ) { - $htmlDate = JText::_('Date_Never'); + $htmlDate = Text::_('Date_Never'); }elseif ( $item->lastvisit_html > ($now-3600)) { // Less than one hour - $htmlDate = JText::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_html)/60)); + $htmlDate = Text::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_html)/60)); } elseif ( $item->lastvisit_html > ($now-86400)) { // Less than one day $hours = intval (($now-$item->lastvisit_html)/3600 ); - $htmlDate = JText::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_html)/60); + $htmlDate = Text::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_html)/60); } elseif ( $item->lastvisit_html > ($now-259200)) { // Less than three days $days = intval(($now-$item->lastvisit_html)/86400); - $htmlDate = JText::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_html)/3600)); + $htmlDate = Text::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_html)/3600)); } else { $date = new JDate($item->lastvisit_html); $htmlDate = $date->Format('%Y-%m-%d %H:%M'); } if ( !$item->lastvisit_xml ) { - $xmlDate = JText::_('Date_Never'); + $xmlDate = Text::_('Date_Never'); } elseif ( $item->lastvisit_xml > ($now-3600)) { // Less than one hour - $xmlDate = JText::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_xml)/60)); + $xmlDate = Text::sprintf('Date_Minutes_Ago',intval(($now-$item->lastvisit_xml)/60)); } elseif ( $item->lastvisit_xml > ($now-86400)) { // Less than one day $hours = intval (($now-$item->lastvisit_xml)/3600 ); - $xmlDate = JText::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_xml)/60); + $xmlDate = Text::sprintf('Date_Hours_Minutes_Ago',$hours,($now-($hours*3600)-$item->lastvisit_xml)/60); } elseif ( $item->lastvisit_xml > ($now-259200)) { // Less than three days $days = intval(($now-$item->lastvisit_xml)/86400); - $xmlDate = JText::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_xml)/3600)); + $xmlDate = Text::sprintf('Date_Days_Hours_Ago',$days,intval(($now-($days*86400)-$item->lastvisit_xml)/3600)); } else { $date = new JDate($item->lastvisit_xml); $xmlDate = $date->Format('%Y-%m-%d %H:%M'); @@ -117,7 +117,7 @@ escape($item->title); ?> - state, $i, 'sitemaps.'); ?> + state, $i, 'sitemaps.'); ?> escape($item->access_level); ?> @@ -140,5 +140,5 @@ - + diff --git a/components/com_joxmap/joxmap.php b/components/com_joxmap/joxmap.php index 13bebba3..dd1d6cd7 100644 --- a/components/com_joxmap/joxmap.php +++ b/components/com_joxmap/joxmap.php @@ -1,20 +1,22 @@ bootComponent("com_joxmap") + ->getMVCFactory(); -$controller = JControllerLegacy::getInstance('Xmap'); -$controller->execute(XmapHelper::getVar('task')); +$controller = $mvc->createController('SiteMap'); +$controller->execute(Factory::getApplication()->getInput()->get('task')); $controller->redirect(); diff --git a/components/com_joxmap/language/en-GB.com_joxmap.ini b/components/com_joxmap/language/en-GB.com_joxmap.ini new file mode 100644 index 00000000..725827bd --- /dev/null +++ b/components/com_joxmap/language/en-GB.com_joxmap.ini @@ -0,0 +1,16 @@ +COM_JOXMAP_ERROR_SITEMAP_NOT_FOUND="The requested sitemap does not exits" +COM_JOXMAP_SHOW_AS_EXTERN_ALT="Link opens new window" + +; Warning, the following strings are used on a XLS file. Be careful to enter only XML compatible characters. Eg. use "&" instead of "&" +COM_JOXMAP_LOGIN_AS_ADMIN_EDIT_SITEMAP="If you want to make changes to this sitemap, login with a "Super User" account in the frontend and then come back to this page." +COM_JOXMAP_XML_SITEMAP_HELP="This is your XML sitemap. You can submit the url displayed bellow to the search engines. You can also change the priority or change frequency for each item on the sitemap. If you need any help please read our documentation or post your questions in our forum" +COM_JOXMAP_XML_SITEMAP_URL="Sitemap URL" +COM_JOXMAP_TITLE="Title" +COM_JOXMAP_URL="URL" +COM_JOXMAP_LASTMOD="Last modification date" +COM_JOXMAP_CHANGEFREQ="Change freq." +COM_JOXMAP_PRIORITY="Priority" +COM_JOXMAP_DISPLAY_TITLE="Show titles" +COM_JOXMAP_DISPLAY_EXCLUDED_ITEMS="Show excluded items" +COM_JOXMAP_NUMBER_OF_URLS="Number of URLs in this Sitemap" +COM_JOXMAP_XML_FILE="XML Sitemap File" \ No newline at end of file diff --git a/components/com_joxmap/language/en-GB.com_xmap.ini b/components/com_joxmap/language/en-GB.com_xmap.ini deleted file mode 100644 index d19e2454..00000000 --- a/components/com_joxmap/language/en-GB.com_xmap.ini +++ /dev/null @@ -1,16 +0,0 @@ -COM_XMAP_ERROR_SITEMAP_NOT_FOUND="The requested sitemap does not exits" -COM_XMAP_SHOW_AS_EXTERN_ALT="Link opens new window" - -; Warning, the following strings are used on a XLS file. Be careful to enter only XML compatible characters. Eg. use "&" instead of "&" -COM_XMAP_LOGIN_AS_ADMIN_EDIT_SITEMAP="If you want to make changes to this sitemap, login with a "Super User" account in the frontend and then come back to this page." -COM_XMAP_XML_SITEMAP_HELP="This is your XML sitemap. You can submit the url displayed bellow to the search engines. You can also change the priority or change frequency for each item on the sitemap. If you need any help please read our documentation or post your questions in our forum" -COM_XMAP_XML_SITEMAP_URL="Sitemap URL" -COM_XMAP_TITLE="Title" -COM_XMAP_URL="URL" -COM_XMAP_LASTMOD="Last modification date" -COM_XMAP_CHANGEFREQ="Change freq." -COM_XMAP_PRIORITY="Priority" -COM_XMAP_DISPLAY_TITLE="Show titles" -COM_XMAP_DISPLAY_EXCLUDED_ITEMS="Show excluded items" -COM_XMAP_NUMBER_OF_URLS="Number of URLs in this Sitemap" -COM_XMAP_XML_FILE="XML Sitemap File" \ No newline at end of file diff --git a/components/com_joxmap/language/fr-FR.com_joxmap.ini b/components/com_joxmap/language/fr-FR.com_joxmap.ini new file mode 100644 index 00000000..ac097665 --- /dev/null +++ b/components/com_joxmap/language/fr-FR.com_joxmap.ini @@ -0,0 +1,27 @@ +; @package Xmap +; @copyright 2007 - 2012 Joomla! Vargas. All rights reserved. +; @subpackage fr-FR.com_xmap.ini +; @description Traduction francophone - fr-FR +; @version 2.3.0 - 23.10.2012 +; @author Mihàly Marti alias Sarki +; @copyright Joomlatutos.com - www.joomlautos.com +; @license GNU General Public License version 2, or later +; @note Client frontend +; @note All ini files need to be saved as UTF-8 - No BOM + +COM_JOXMAP_ERROR_SITEMAP_NOT_FOUND="Le plan du site demandé n'existe pas" +COM_JOXMAP_SHOW_AS_EXTERN_ALT="Lien dans une nouvelle fenêtre" + +; Warning, the following strings are used on a XLS file. Be careful to enter only XML compatible characters. Eg. use "&" instead of "&" +COM_JOXMAP_LOGIN_AS_ADMIN_EDIT_SITEMAP="Si vous souhaitez apporter des modifications à ce plan du site, connectez-vous au site avec un compte "Super Utilisateur" et revenez sur cette page." +COM_JOXMAP_XML_SITEMAP_HELP="Ceci est le plan du site XML. Vous pouvez soumettre l'URL affichée ci-dessous aux moteurs de recherche.
Vous pouvez modifier la priorité ou la fréquence de modification pour chaque élément du plan du site.
Si vous avez besoin d'aide, veuillez consulter notre documentation ou poster vos questions dans notre forum." +COM_JOXMAP_XML_SITEMAP_URL="URL du plan de site" +COM_JOXMAP_TITLE="Titre" +COM_JOXMAP_URL="URL" +COM_JOXMAP_LASTMOD="Date de dernière modification" +COM_JOXMAP_CHANGEFREQ="Fréquence de changement" +COM_JOXMAP_PRIORITY="Priorité" +COM_JOXMAP_DISPLAY_TITLE="Afficher les titres" +COM_JOXMAP_DISPLAY_EXCLUDED_ITEMS="Afficher les éléments exclus" +COM_JOXMAP_NUMBER_OF_URLS="Nombre d' URLs dans ce plan du site" +COM_JOXMAP_XML_FILE="Plan du Site XML" \ No newline at end of file diff --git a/components/com_joxmap/services/Router.php b/components/com_joxmap/services/Router.php index 8bcf29ad..8635b9d5 100644 --- a/components/com_joxmap/services/Router.php +++ b/components/com_joxmap/services/Router.php @@ -1,12 +1,16 @@ getMenu(); if (empty($query['Itemid'])) { @@ -168,7 +172,7 @@ function XmapParseRoute($segments) $vars = array(); //G et the active menu item. - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $menu = $app->getMenu(); $item = $menu->getActive(); diff --git a/components/com_joxmap/src/Controller/AjaxJson.php b/components/com_joxmap/src/Controller/AjaxJson.php index cb1436ec..8a20b1b5 100755 --- a/components/com_joxmap/src/Controller/AjaxJson.php +++ b/components/com_joxmap/src/Controller/AjaxJson.php @@ -1,11 +1,15 @@ get('id'))); - $result = new JRegistry('_default'); + $user = Factory::getUser(); + $groups = array_keys(UserHelper::getUserGroups($user->get('id'))); + $result = new Registry('_default'); $sitemapId = XmapHelper::getInt('id'); if (!$user->authorise('core.edit', 'com_xmap.sitemap.'.$sitemapId)) { diff --git a/components/com_joxmap/src/Controller/DisplayController.php b/components/com_joxmap/src/Controller/DisplayController.php index f757e0ed..a4ca99fc 100644 --- a/components/com_joxmap/src/Controller/DisplayController.php +++ b/components/com_joxmap/src/Controller/DisplayController.php @@ -1,10 +1,12 @@ get('id') || !in_array($viewName, array('html', 'xml')) || $viewLayout == 'xsl') { $cachable = false; } if ($viewName) { - $document = JFactory::getDocument(); + $document = Factory::getDocument(); $viewType = $document->getType(); $view = $this->getView($viewName, $viewType, '', array('base_path' => $this->basePath, 'layout' => $viewLayout)); $sitemapmodel = $this->getModel('Sitemap'); diff --git a/components/com_joxmap/src/Controller/JoXmapDisplayer.php b/components/com_joxmap/src/Controller/JoXmapDisplayer.php index a427c86c..b8783b04 100644 --- a/components/com_joxmap/src/Controller/JoXmapDisplayer.php +++ b/components/com_joxmap/src/Controller/JoXmapDisplayer.php @@ -1,20 +1,28 @@ get('id'))); - $date = new JDate(); + $user = Factory::getUser(); + $groups = array_keys(UserHelper::getUserGroups($user->get('id'))); + $date = new Date(); $this->userLevels = (array)$user->getAuthorisedViewLevels(); // Deprecated: should use userLevels from now on @@ -71,7 +77,7 @@ public function printSitemap() { foreach ($this->jview->items as $menutype => &$items) { - $node = new stdclass(); + $node = new \stdclass(); $node->uid = "menu-".$menutype; $node->menutype = $menutype; @@ -100,13 +106,13 @@ public function setJView($view) public function getMenuTitle($menutype,$module='mod_menu') { - $app = JFactory::getApplication(); - $db = JFactory::getDbo(); + $app = Factory::getApplication(); + $db = Factory::getDbo(); $title = $extra = ''; // Filter by language if ($app->getLanguageFilter()) { - $extra = ' AND language in ('.$db->quote(JFactory::getLanguage()->getTag()).','.$db->quote('*').')'; + $extra = ' AND language in ('.$db->quote(Factory::getLanguage()->getTag()).','.$db->quote('*').')'; } $db->setQuery( @@ -140,7 +146,7 @@ protected function printMenuTree($menu,&$items) foreach ( $items as $i => $item ) { // Add each menu entry to the root tree. $excludeExternal = false; - $node = new stdclass; + $node = new \stdclass; $node->id = $item->id; $node->uid = $item->uid; @@ -163,7 +169,7 @@ protected function printMenuTree($menu,&$items) if ($node->home == 1) { // Correct the URL for the home page. - $node->link = JURI::base(); + $node->link = Uri::base(); } switch ($item->type) { @@ -226,7 +232,7 @@ public function &getExcludedItems() { static $_excluded_items; if (!isset($_excluded_items)) { $_excluded_items = array(); - $registry = new JRegistry('_default'); + $registry = new Registry('_default'); $registry->loadString($this->sitemap->excluded_items); $_excluded_items = $registry->toArray(); } diff --git a/components/com_joxmap/src/Helper/XmapHelper.php b/components/com_joxmap/src/Helper/XmapHelper.php index 52fcfbc8..1d6a7e8e 100644 --- a/components/com_joxmap/src/Helper/XmapHelper.php +++ b/components/com_joxmap/src/Helper/XmapHelper.php @@ -1,21 +1,27 @@ $menuOptions) { @@ -58,7 +64,7 @@ public static function &getMenuItems($selections) // Filter by language if ($app->getLanguageFilter()) { - $query->where('n.language in ('.$db->quote(JFactory::getLanguage()->getTag()).','.$db->quote('*').')'); + $query->where('n.language in ('.$db->quote(Factory::getLanguage()->getTag()).','.$db->quote('*').')'); } // Get the list of menu items. @@ -79,12 +85,12 @@ public static function &getMenuItems($selections) foreach ($tmpList as $id => $item) { $item->items = array(); - $params = new JRegistry($item->params); + $params = new Registry($item->params); $item->uid = 'itemid'.$item->id; if (preg_match('#^/?index.php.*option=(com_[^&]+)#', $item->link, $matches)) { $item->option = $matches[1]; - $componentParams = clone(JComponentHelper::getParams($item->option)); + $componentParams = clone(ComponentHelper::getParams($item->option)); $componentParams->merge($params); //$params->merge($componentParams); $params = $componentParams; @@ -124,14 +130,14 @@ public static function &getExtensions() if ($list != null) { return $list; } - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $list = array(); // Get the menu items as a tree. $query = $db->getQuery(true); $query->select('*'); $query->from('#__extensions AS n'); - $query->where('n.folder = \'xmap\''); + $query->where('n.folder = \'joxmap\''); $query->where('n.enabled = 1'); // Get the list of menu items. @@ -141,7 +147,7 @@ public static function &getExtensions() foreach ($extensions as $element => $extension) { if (file_exists(JPATH_PLUGINS . '/' . $extension->folder . '/' . $element. '/'. $element . '.php')) { require_once(JPATH_PLUGINS . '/' . $extension->folder . '/' . $element. '/'. $element . '.php'); - $params = new JRegistry($extension->params); + $params = new Registry($extension->params); $extension->params = $params->toArray(); $list[$element] = $extension; } @@ -173,7 +179,7 @@ public static function prepareMenuItem($item) static function getImages($text,$max) { if (!isset($urlBase)) { - $urlBase = JURI::base(); + $urlBase = Uri::base(); $urlBaseLen = strlen($urlBase); } @@ -243,7 +249,7 @@ static function getPagebreaks($text,$baseLink) public static function getpost() { if (version_compare(JVERSION, '4.0', 'ge')){ - return JFactory::getApplication()->input->getArray(array()); + return Factory::getApplication()->input->getArray(array()); } else { return call_user_func_array('JRequest::get', ['post']); @@ -253,9 +259,9 @@ public static function getpost() { public static function get(...$params) { if (version_compare(JVERSION, '4.0', 'ge')){ if ($params[0] == 'post '){ - return JFactory::getApplication()->input->getInputForRequestMethod('POST'); + return Factory::getApplication()->input->getInputForRequestMethod('POST'); } else { - return call_user_func_array(array(JFactory::getApplication()->input, 'get'), $params); + return call_user_func_array(array(Factory::getApplication()->input, 'get'), $params); } } else { @@ -265,7 +271,7 @@ public static function get(...$params) { public static function getVar(...$params) { if (version_compare(JVERSION, '4.0', 'ge')){ - return call_user_func_array(array(JFactory::getApplication()->input, 'getVar'), $params); + return call_user_func_array(array(Factory::getApplication()->input, 'getVar'), $params); } else { return call_user_func_array('JRequest::getVar', $params); @@ -275,7 +281,7 @@ public static function getVar(...$params) { public static function setVar(...$params) { if (version_compare(JVERSION, '4.0', 'ge')){ - call_user_func_array(array(JFactory::getApplication()->input, 'setVar'), $params); + call_user_func_array(array(Factory::getApplication()->input, 'setVar'), $params); } else { call_user_func_array('JRequest::setVar', $params); @@ -284,7 +290,7 @@ public static function setVar(...$params) { public static function getCmd(...$params) { if (version_compare(JVERSION, '4.0', 'ge')){ - return call_user_func_array(array(JFactory::getApplication()->input, 'getCmd'), $params); + return call_user_func_array(array(Factory::getApplication()->input, 'getCmd'), $params); } else { return call_user_func_array('JRequest::getCmd', $params); @@ -293,7 +299,7 @@ public static function getCmd(...$params) { public static function getInt(...$params) { if (version_compare(JVERSION, '4.0', 'ge')){ - $recordId = call_user_func_array(array(JFactory::getApplication()->input, 'getInt'), $params); + $recordId = call_user_func_array(array(Factory::getApplication()->input, 'getInt'), $params); } else { $recordId = (int)call_user_func_array('JRequest::getInt', $params); @@ -303,7 +309,7 @@ public static function getInt(...$params) { public static function getBool(...$params) { if (version_compare(JVERSION, '4.0', 'ge')){ - return call_user_func_array(array(JFactory::getApplication()->input, 'getBool'), $params); + return call_user_func_array(array(Factory::getApplication()->input, 'getBool'), $params); } else { return (int)call_user_func_array('JRequest::getBool', $params); @@ -311,7 +317,7 @@ public static function getBool(...$params) { } public static function getWord(...$params) { if (version_compare(JVERSION, '4.0', 'ge')){ - return call_user_func_array(array(JFactory::getApplication()->input, 'getWord'), $params); + return call_user_func_array(array(Factory::getApplication()->input, 'getWord'), $params); } else { return (int)call_user_func_array('JRequest::getWord', $params); @@ -319,28 +325,17 @@ public static function getWord(...$params) { } public static function getURI() { - if (version_compare(JVERSION, '4.0', 'ge')){ - return JUri::getInstance(); - } - else { - return JFactory::getURI(); - } + return Uri::getInstance(); } public static function getRouter() { - if (version_compare(JVERSION, '4.0', 'ge')){ - $app = SiteApplication::getInstance('site'); - return $app->getRouter(); - //return JRouter::getInstance("site"); - } - else { - return JSite::getRouter(); - } + $app = SiteApplication::getInstance('site'); + return $app->getRouter(); } public static function isAppSef() { if (version_compare(JVERSION, '4.0', 'ge')){ - return JFactory::getApplication()->get('sef', 1); + return Factory::getApplication()->get('sef', 1); } else { return $router->getMode() == JROUTER_MODE_SEF; } diff --git a/components/com_joxmap/src/Model/SiteMapModel.php b/components/com_joxmap/src/Model/SiteMapModel.php index 5f84250a..f201fc6c 100644 --- a/components/com_joxmap/src/Model/SiteMapModel.php +++ b/components/com_joxmap/src/Model/SiteMapModel.php @@ -1,21 +1,29 @@ input->getInt('id'); + $pk = Factory::getApplication()->input->getInt('id'); $this->setState('sitemap.id', $pk); $offset = XmapHelper::getInt('limitstart'); @@ -77,7 +85,7 @@ public function &getItem($pk = null) // If not sitemap specified, select the default one if (!$pk) { $query = $db->getQuery(true); - $query->select('id')->from('#__xmap_sitemap')->where('is_default=1'); + $query->select('id')->from('#__joxmap_sitemap')->where('is_default=1'); $db->setQuery($query); $pk = $db->loadResult(); } @@ -91,7 +99,7 @@ public function &getItem($pk = null) $query = $db->getQuery(true); $query->select($this->getState('item.select', 'a.*')); - $query->from('#__xmap_sitemap AS a'); + $query->from('#__joxmap_sitemap AS a'); $query->where('a.id = ' . (int) $pk); @@ -103,7 +111,7 @@ public function &getItem($pk = null) // Filter by access level. if ($access = $this->getState('filter.access')) { - $user = JFactory::getUser(); + $user = Factory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } @@ -117,22 +125,22 @@ public function &getItem($pk = null) // } if (empty($data)) { - throw new Exception(JText::_('COM_XMAP_ERROR_SITEMAP_NOT_FOUND')); + throw new \Exception(Text::_('COM_JOXMAP_ERROR_SITEMAP_NOT_FOUND')); } // Check for published state if filter set. if (is_numeric($published) && $data->state != $published) { - throw new Exception(JText::_('COM_XMAP_ERROR_SITEMAP_NOT_FOUND')); + throw new Exception(JText::_('COM_JOXMAP_ERROR_SITEMAP_NOT_FOUND')); } // Convert parameter fields to objects. - $registry = new JRegistry('_default'); + $registry = new Registry('_default'); $registry->loadString($data->attribs); $data->params = clone $this->getState('params'); $data->params->merge($registry); // Convert the selections field to an array. - $registry = new JRegistry('_default'); + $registry = new Registry('_default'); $registry->loadString($data->selections); $data->selections = $registry->toArray(); @@ -142,7 +150,7 @@ public function &getItem($pk = null) $data->params->set('access-view', true); } else { // If no access filter is set, the layout takes some responsibility for display of limited information. - $user = &JFactory::getUser(); + $user = &Factory::getUser(); $groups = $user->authorisedLevels(); $data->params->set('access-view', in_array($data->access, $groups)); @@ -190,8 +198,8 @@ public function hit($count) } $this->_db->setQuery( - 'UPDATE #__xmap_sitemap' . - ' SET views_' . $view . ' = views_' . $view . ' + 1, count_' . $view . ' = ' . $count . ', lastvisit_' . $view . ' = ' . JFactory::getDate()->toUnix() . + 'UPDATE #__joxmap_sitemap' . + ' SET views_' . $view . ' = views_' . $view . ' + 1, count_' . $view . ' = ' . $count . ', lastvisit_' . $view . ' = ' . Factory::getDate()->toUnix() . ' WHERE id = ' . (int) $pk ); @@ -218,13 +226,13 @@ public function getSitemapItems($view=null) if (!isset($view)) { $view =XmapHelper::getCmd('view'); } - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $pk = (int) $this->getState('sitemap.id'); if (self::$items !== NULL && isset(self::$items[$view])) { return; } - $query = "select * from #__xmap_items where view='$view' and sitemap_id=" . $pk; + $query = "select * from #__joxmap_items where view='$view' and sitemap_id=" . $pk; $db->setQuery($query); $rows = $db->loadObjectList(); self::$items[$view] = array(); @@ -245,7 +253,7 @@ public function getSitemapItems($view=null) function chageItemPropery($uid, $itemid, $view, $property, $value) { $items = $this->getSitemapItems($view); - $db = JFactory::getDBO(); + $db = Factory::getDBO(); $pk = (int) $this->getState('sitemap.id'); $isNew = false; @@ -260,9 +268,9 @@ function chageItemPropery($uid, $itemid, $view, $property, $value) $sep = ';'; } if (!$isNew) { - $query = 'UPDATE #__xmap_items SET properties=\'' . $db->escape($properties) . "' where uid='" . $db->escape($uid) . "' and itemid=$itemid and view='$view' and sitemap_id=" . $pk; + $query = 'UPDATE #__joxmap_items SET properties=\'' . $db->escape($properties) . "' where uid='" . $db->escape($uid) . "' and itemid=$itemid and view='$view' and sitemap_id=" . $pk; } else { - $query = 'INSERT #__xmap_items (uid,itemid,view,sitemap_id,properties) values ( \'' . $db->escape($uid) . "',$itemid,'$view',$pk,'" . $db->escape($properties) . "')"; + $query = 'INSERT #__joxmap_items (uid,itemid,view,sitemap_id,properties) values ( \'' . $db->escape($uid) . "',$itemid,'$view',$pk,'" . $db->escape($properties) . "')"; } $db->setQuery($query); //echo $db->getQuery();exit; @@ -280,7 +288,7 @@ function chageItemPropery($uid, $itemid, $view, $property, $value) function toggleItem($uid, $itemid) { - $app = JFactory::getApplication('site'); + $app = Factory::getApplication('site'); $sitemap = $this->getItem(); $displayer = new XmapDisplayer($app->getParams(), $sitemap); @@ -301,12 +309,12 @@ function toggleItem($uid, $itemid) $state = 1; } - $registry = new JRegistry('_default'); + $registry = new Registry('_default'); $registry->loadArray($excludedItems); $str = $registry->toString(); - $db = JFactory::getDBO(); - $query = "UPDATE #__xmap_sitemap set excluded_items='" . $db->escape($str) . "' where id=" . $sitemap->id; + $db = Factory::getDBO(); + $query = "UPDATE #__joxmap_sitemap set excluded_items='" . $db->escape($str) . "' where id=" . $sitemap->id; $db->setQuery($query); if (version_compare(JVERSION, '4.0', 'ge')){ $db->execute(); diff --git a/components/com_joxmap/src/View/Html/HtmlView.php b/components/com_joxmap/src/View/Html/HtmlView.php index e2c02044..fc10c147 100644 --- a/components/com_joxmap/src/View/Html/HtmlView.php +++ b/components/com_joxmap/src/View/Html/HtmlView.php @@ -1,30 +1,34 @@ app = JFactory::getApplication(); - $this->user = JFactory::getUser(); - $doc = JFactory::getDocument(); + $this->app = Factory::getApplication(); + $this->user = Factory::getUser(); + $doc = Factory::getDocument(); // Get view related request variables. $this->print = XmapHelper::getBool('print'); @@ -45,7 +49,7 @@ function display($tpl = null) $this->item = $this->get('Item'); $this->items = $this->get('Items'); - $this->canEdit = JFactory::getUser()->authorise('core.admin', 'com_xmap'); + $this->canEdit = Factory::getUser()->authorise('core.admin', 'com_xmap'); // Check for errors. if (count($errors = $this->get('Errors'))) { @@ -63,7 +67,7 @@ function display($tpl = null) $params = &$this->state->params; $offset = $this->state->get('page.offset'); if ($params->get('include_css', 0)){ - $doc->addStyleSheet(JURI::root().'components/com_xmap/assets/css/xmap.css'); + $doc->addStyleSheet(Uri::root().'components/com_xmap/assets/css/xmap.css'); } // If a guest user, they may be able to log in to view the full article @@ -90,7 +94,7 @@ function display($tpl = null) // Load the class used to display the sitemap $this->loadTemplate('class'); - $this->displayer = new XmapHtmlDisplayer($params, $this->item); + $this->displayer = new JoXmapHtmlDisplayer($params, $this->item); $this->displayer->setJView($this); $this->displayer->canEdit = $this->canEdit; @@ -107,7 +111,7 @@ function display($tpl = null) */ protected function _prepareDocument() { - $app = JFactory::getApplication(); + $app = Factory::getApplication(); $pathway = $app->getPathway(); $menus = $app->getMenu(); $title = null; @@ -126,7 +130,7 @@ protected function _prepareDocument() $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } // set meta description and keywords from menu item's params - $params = new JRegistry(); + $params = new Registry(); $params->loadString($menu->getParams()); $this->document->setDescription($params->get('menu-meta_description')); $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); diff --git a/components/com_joxmap/src/View/Html/metadata.xml b/components/com_joxmap/src/View/Html/metadata.xml deleted file mode 100644 index d763c07b..00000000 --- a/components/com_joxmap/src/View/Html/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/components/com_joxmap/src/View/Xml/HtmlView.php b/components/com_joxmap/src/View/Xml/HtmlView.php index b4282b3f..6ab9ef47 100644 --- a/components/com_joxmap/src/View/Xml/HtmlView.php +++ b/components/com_joxmap/src/View/Xml/HtmlView.php @@ -1,18 +1,24 @@ user = JFactory::getUser(); + $app = Factory::getApplication(); + $this->user = Factory::getUser(); $isNewsSitemap = XmapHelper::getInt('news',0); $this->isImages = XmapHelper::getInt('images',0); @@ -52,7 +58,7 @@ function display($tpl = null) $this->item = $this->get('Item'); $this->state = $this->get('State'); - $this->canEdit = JFactory::getUser()->authorise('core.admin', 'com_xmap'); + $this->canEdit = Factory::getUser()->authorise('core.admin', 'com_xmap'); // For now, news sitemaps are not editable $this->canEdit = $this->canEdit && !$isNewsSitemap; @@ -69,7 +75,7 @@ function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { if (version_compare(JVERSION, '4.0', 'ge')){ - JFactory::getApplication()->enqueueMessage(implode("\n", $errors), 'warning'); + Factory::getApplication()->enqueueMessage(implode("\n", $errors), 'warning'); } else { JError::raiseWarning(500, implode("\n", $errors)); } @@ -88,14 +94,14 @@ function display($tpl = null) if (!$this->item->params->get('access-view')) { if ($this->user->get('guest')) { // Redirect to login - $uri = JFactory::getURI(); + $uri = Factory::getURI(); $app->redirect( 'index.php?option=com_users&view=login&return=' . base64_encode($uri), JText::_('Xmap_Error_Login_to_view_sitemap') ); return; } else { - JError::raiseWarning(403, JText::_('Xmap_Error_Not_auth')); + JError::raiseWarning(403, Text::_('Xmap_Error_Not_auth')); return; } } @@ -107,7 +113,7 @@ function display($tpl = null) // Load the class used to display the sitemap $this->loadTemplate('class'); - $this->displayer = new XmapXmlDisplayer($params, $this->item); + $this->displayer = new JoXmapXmlDisplayer($params, $this->item); $this->displayer->setJView($this); diff --git a/components/com_joxmap/assets/images/index.html b/components/com_joxmap/src/View/Xml/index.html similarity index 100% rename from components/com_joxmap/assets/images/index.html rename to components/com_joxmap/src/View/Xml/index.html diff --git a/components/com_joxmap/tmpl/Html/default.php b/components/com_joxmap/tmpl/Html/default.php index 1e394472..ac4e68ce 100644 --- a/components/com_joxmap/tmpl/Html/default.php +++ b/components/com_joxmap/tmpl/Html/default.php @@ -1,9 +1,12 @@ item->params; if ($this->displayer->canEdit) { - $live_site = JURI::root(); + $live_site = Uri::root(); JHTML::_('behavior.framework', true); $ajaxurl = "{$live_site}index.php?option=com_xmap&format=json&task=ajax.editElement&action=toggleElement&".JSession::getFormToken().'=1'; @@ -55,7 +58,7 @@ } }"; - $doc = JFactory::getDocument(); + $doc = Factory::getDocument(); $doc->addStyleDeclaration ($css); $doc->addScriptDeclaration ($js); } @@ -96,7 +99,7 @@ loadTemplate('items'); ?> get('include_link', 1) ) : ?> -
Powered by Xmap
+
Powered by JoXmap
  diff --git a/components/com_joxmap/tmpl/Html/default.xml b/components/com_joxmap/tmpl/Html/default.xml index d44b6e74..8f141f52 100644 --- a/components/com_joxmap/tmpl/Html/default.xml +++ b/components/com_joxmap/tmpl/Html/default.xml @@ -1,20 +1,20 @@ - + - +
+ addfieldpath="/administrator/components/com_joxmap/src/Field">
@@ -24,13 +24,13 @@
+ label="COM_JOXMAP_ATTRIBS_SITEMAP_SETTINGS_LABEL"> + label="COM_JOXMAP_INCLUDE_CSS_LABEL" + description="COM_JOXMAP_INCLUDE_CSS_DESC"> diff --git a/components/com_joxmap/tmpl/Html/default_class.php b/components/com_joxmap/tmpl/Html/default_class.php new file mode 100644 index 00000000..f9a1940a --- /dev/null +++ b/components/com_joxmap/tmpl/Html/default_class.php @@ -0,0 +1,183 @@ +view = 'html'; + parent::__construct($config, $sitemap); + $this->_parent_children=array(); + $this->_last_child=array(); + $this->live_site = substr_replace(Uri::root(), "", -1, 1); + + $user = Factory::getUser(); + } + + function setJView($view) + { + parent::setJView($view); + + $columns = $this->sitemap->params->get('columns',0); + if( $columns > 1 ) { // calculate column widths + $total = count($view->items); + $columns = $total < $columns? $total : $columns; + $this->_width = (100 / $columns) - 1; + $this->sitemap->params->set('columns',$columns); + } + } + + /** + * Prints one node of the sitemap + * + * + * @param object $node + * @return boolean + */ + function printNode( &$node ) + { + + $out = ''; + + if ($this->isExcluded($node->id,$node->uid) && !$this->canEdit) { + return FALSE; + } + + // To avoid duplicate children in the same parent + if ( !empty($this->_parent_children[$this->level][$node->uid]) ) { + return FALSE; + } + + //var_dump($this->_parent_children[$this->level]); + $this->_parent_children[$this->level][$node->uid] = true; + + $out .= $this->_closeItem; + $out .= $this->_openList; + $this->_openList = ""; + + $out .= '
  • '; + + if( !isset($node->browserNav) ) + $node->browserNav = 0; + + if ($node->browserNav != 3) { + $link = Route::_($node->link, true, @$node->secure); + } + + $node->name = htmlspecialchars($node->name); + switch( $node->browserNav ) { + case 1: // open url in new window + $ext_image = ''; + if ( $this->sitemap->params->get('exlinks') ) { + $ext_image = ' ' . JText::_('COM_JOXMAP_SHOW_AS_EXTERN_ALT') . ''; + } + $out .= ''. $node->name . $ext_image .''; + break; + + case 2: // open url in javascript popup window + $ext_image = ''; + if( $this->sitemap->params->get('exlinks') ) { + $ext_image = ' ' . JText::_('COM_JOXMAP_SHOW_AS_EXTERN_ALT') . ''; + } + $out .= '". $node->name . $ext_image.""; + break; + + case 3: // no link + $out .= ''. $node->name .''; + break; + + default: // open url in parent window + $out .= ''. $node->name .''; + break; + } + + $this->_closeItem = "
  • \n"; + $this->_childs[$this->level]++; + echo $out; + + if ($this->canEdit) { + if ( $this->isExcluded($node->id,$node->uid) ) { + $img = 'v'; + $class= 'xmapexclon'; + } else { + $img = 'x'; + $class= 'xmapexcloff'; + } + echo ' '.$img.''; + } + $this->count++; + + $this->_last_child[$this->level] = $node->uid; + + return TRUE; + } + + /** + * Moves sitemap level up or down + */ + function changeLevel( $level ) { + if ( $level > 0 ) { + # We do not print start ul here to avoid empty list, it's printed at the first child + $this->level += $level; + $this->_childs[$this->level]=0; + $this->_openList = "\n
      level."\">\n"; + $this->_closeItem = ''; + + // If we are moving up, then lets clean the children of this level + // because for sure this is a new set of links + if ( empty ($this->_last_child[$this->level-1]) || empty ($this->_parent_children[$this->level]['parent']) || $this->_parent_children[$this->level]['parent'] != $this->_last_child[$this->level-1] ) { + $this->_parent_children[$this->level]=array(); + $this->_parent_children[$this->level]['parent'] = @$this->_last_child[$this->level-1]; + } + } else { + if ($this->_childs[$this->level]){ + echo $this->_closeItem."
    \n"; + } + $this->_closeItem =''; + $this->_openList = ''; + $this->level += $level; + } + } + + function startMenu(&$menu) { + if( $this->sitemap->params->get('columns') > 1 ) // use columns + echo '
    '; + if( $this->sitemap->params->get('show_menutitle') ) // show menu titles + echo ''; + } + + function endMenu(&$menu) { + $sitemap=&$this->sitemap; + $this->_closeItem=''; + if( $sitemap->params->get('columns')> 1 ) { + echo "
    \n"; + } + } +} diff --git a/components/com_joxmap/tmpl/Html/default_items.php b/components/com_joxmap/tmpl/Html/default_items.php new file mode 100644 index 00000000..e7298070 --- /dev/null +++ b/components/com_joxmap/tmpl/Html/default_items.php @@ -0,0 +1,16 @@ +state->get('params'); + +// Use the class defined in default_class.php to print the sitemap +$this->displayer->printSitemap(); \ No newline at end of file diff --git a/components/com_joxmap/tmpl/Xml/default.php b/components/com_joxmap/tmpl/Xml/default.php index 25b2a87d..ce9fecc7 100644 --- a/components/com_joxmap/tmpl/Xml/default.php +++ b/components/com_joxmap/tmpl/Xml/default.php @@ -1,18 +1,23 @@ item->params; -$live_site = substr_replace(JURI::root(), "", -1, 1); +$live_site = substr_replace(Uri::root(), "", -1, 1); header('Content-type: text/xml; charset=utf-8'); @@ -21,7 +26,7 @@ $params = '&filter_showtitle='.XmapHelper::getBool('filter_showtitle',0); $params .= '&filter_showexcluded='.XmapHelper::getBool('filter_showexcluded',0); $params .= (XmapHelper::getCmd('lang')?'&lang='.XmapHelper::getCmd('lang'):''); - echo 'item->id.($this->isImages?'&images=1':'').$params.'"?>'."\n"; + echo 'item->id.($this->isImages?'&images=1':'').$params.'"?>'."\n"; } ?> displayer->isImages? ' xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"':''); ?>displayer->isNews? ' xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"':''); ?>> diff --git a/components/com_joxmap/tmpl/Xml/default.xml b/components/com_joxmap/tmpl/Xml/default.xml index b603e668..9e0ef30c 100644 --- a/components/com_joxmap/tmpl/Xml/default.xml +++ b/components/com_joxmap/tmpl/Xml/default.xml @@ -1,23 +1,8 @@ - + - + - - -
    - -
    -
    -
    \ No newline at end of file + diff --git a/components/com_joxmap/tmpl/Xml/default_class.php b/components/com_joxmap/tmpl/Xml/default_class.php index c0ccd7e0..91e8cd6e 100644 --- a/components/com_joxmap/tmpl/Xml/default_class.php +++ b/components/com_joxmap/tmpl/Xml/default_class.php @@ -1,20 +1,26 @@ uids = array(); - $this->defaultLanguage = strtolower(JFactory::getLanguage()->getTag()); + $this->defaultLanguage = strtolower(Factory::getLanguage()->getTag()); if (preg_match('/^([a-z]+)-.*/',$this->defaultLanguage,$matches) && !in_array($this->defaultLanguage, array(' zh-cn',' zh-tw')) ) { $this->defaultLanguage = $matches[1]; } @@ -58,7 +64,7 @@ function __construct($config, $sitemap) $this->showTitle = XmapHelper::getBool('filter_showtitle', 0); $this->showExcluded = XmapHelper::getBool('filter_showexcluded', 0); - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $this->nullDate = $db->getNullDate(); } @@ -87,7 +93,7 @@ function printNode(&$node) } // Get the item's URL - $link = JRoute::_($node->link, true, @$node->secure == 0 ? (XmapHelper::getURI()->isSSL() ? 1 : -1) : $node->secure); + $link = Route::_($node->link, true, @$node->secure == 0 ? (XmapHelper::getURI()->isSSL() ? 1 : -1) : $node->secure); if (!isset($node->browserNav)) $node->browserNav = 0; @@ -124,7 +130,7 @@ function printNode(&$node) $modified = time(); } if ($modified && !is_numeric($modified)){ - $date = new JDate($modified); + $date = new Date($modified); $modified = $date->toUnix(); } if ($modified) { diff --git a/components/com_joxmap/tmpl/Xml/default_items.php b/components/com_joxmap/tmpl/Xml/default_items.php index 5827fc76..7ceb684a 100644 --- a/components/com_joxmap/tmpl/Xml/default_items.php +++ b/components/com_joxmap/tmpl/Xml/default_items.php @@ -1,9 +1,12 @@ -<?php echo JText::_('COM_XMAP_XML_FILE'); ?> - - +<?php echo Text::_('COM_JOXMAP_XML_FILE'); ?> + +