From bce1a989bfc058c89c15a3124c67e05505206a0a Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Tue, 12 Oct 2021 23:21:44 +0200 Subject: [PATCH 01/49] fix naming for JED naming conventions --- plugins/schuweb_sitemap/com_zoo/com_zoo.xml | 2 +- .../language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/schuweb_sitemap/com_zoo/com_zoo.xml b/plugins/schuweb_sitemap/com_zoo/com_zoo.xml index 12b6add..6c038f5 100644 --- a/plugins/schuweb_sitemap/com_zoo/com_zoo.xml +++ b/plugins/schuweb_sitemap/com_zoo/com_zoo.xml @@ -1,7 +1,7 @@ - SchuWeb Sitemap - Zoo + SchuWeb Sitemap - Zoo Integration for SchuWeb Sitemap Sven Schultschik sw.build.date Sven Schultschik diff --git a/plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini b/plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini index 96b2d00..fe303cb 100644 --- a/plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini +++ b/plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini @@ -1,4 +1,4 @@ -SCHUWEB_SITEMAP_ZOO_PLUGIN_DESCRIPTION="SchuWeb Sitemap plugin for Zoo" +SCHUWEB_SITEMAP_ZOO_PLUGIN_DESCRIPTION="Zoo integration plugin for SchuWeb Sitemap" SCHUWEB_SITEMAP_SETTING_SHOW_CATEGORIES="Show Categories" SCHUWEB_SITEMAP_SETTING_SHOW_CATEGORIES_DESC="Should we include links to categories into the sitemap?" SCHUWEB_SITEMAP_SETTING_SHOW_ITEMS="Show Items" From 467839819ce851ea89f0e9df6671c1f84934cac1 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 5 Nov 2021 20:29:07 +0100 Subject: [PATCH 02/49] Change name for JED conventions --- plugins/schuweb_sitemap/com_zoo/com_zoo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/schuweb_sitemap/com_zoo/com_zoo.xml b/plugins/schuweb_sitemap/com_zoo/com_zoo.xml index 6c038f5..6cec525 100644 --- a/plugins/schuweb_sitemap/com_zoo/com_zoo.xml +++ b/plugins/schuweb_sitemap/com_zoo/com_zoo.xml @@ -1,7 +1,7 @@ - SchuWeb Sitemap - Zoo Integration for SchuWeb Sitemap + SchuWeb Sitemap - SchuWeb Sitemap Integration for Zoo Sven Schultschik sw.build.date Sven Schultschik From 23c5333eff481623c3375c89887c8333d45b207c Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Sun, 13 Feb 2022 01:51:07 +0100 Subject: [PATCH 03/49] rename plugin com_zoo to schuweb_sitemap_zoo --- .../com_schuweb_sitemap/models/sitemaps.php | 2 +- build/builder_plugins.xml | 4 ++-- .../{com_zoo => schuweb_sitemap_zoo}/index.html | 0 .../en-GB/en-GB.plg_schuweb_sitemap_zoo.ini} | 2 +- .../en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini} | 0 .../schuweb_sitemap_zoo.php} | 12 ++++++------ .../schuweb_sitemap_zoo.xml} | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) rename plugins/schuweb_sitemap/{com_zoo => schuweb_sitemap_zoo}/index.html (100%) rename plugins/schuweb_sitemap/{com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini => schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini} (91%) rename plugins/schuweb_sitemap/{com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.sys.ini => schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini} (100%) rename plugins/schuweb_sitemap/{com_zoo/com_zoo.php => schuweb_sitemap_zoo/schuweb_sitemap_zoo.php} (93%) rename plugins/schuweb_sitemap/{com_zoo/com_zoo.xml => schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml} (95%) diff --git a/administrator/components/com_schuweb_sitemap/models/sitemaps.php b/administrator/components/com_schuweb_sitemap/models/sitemaps.php index 42452a5..f5575e0 100644 --- a/administrator/components/com_schuweb_sitemap/models/sitemaps.php +++ b/administrator/components/com_schuweb_sitemap/models/sitemaps.php @@ -159,7 +159,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=\'schuweb_sitemap\''); + $query->join('INNER', '#__extensions AS p ON (SUBSTRING(e.element,5)=SUBSTRING(p.element,17) or e.element=p.element) and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\''); $query->where('e.type=\'component\' and e.enabled=1'); $db->setQuery($query); diff --git a/build/builder_plugins.xml b/build/builder_plugins.xml index 09a7f31..9b596b4 100644 --- a/build/builder_plugins.xml +++ b/build/builder_plugins.xml @@ -19,7 +19,7 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/plugins/schuweb_sitemap/com_zoo/index.html b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/index.html similarity index 100% rename from plugins/schuweb_sitemap/com_zoo/index.html rename to plugins/schuweb_sitemap/schuweb_sitemap_zoo/index.html diff --git a/plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini similarity index 91% rename from plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini rename to plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini index fe303cb..7dc7c7f 100644 --- a/plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini +++ b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini @@ -1,4 +1,4 @@ -SCHUWEB_SITEMAP_ZOO_PLUGIN_DESCRIPTION="Zoo integration plugin for SchuWeb Sitemap" +SCHUWEB_SITEMAP_ZOO_PLUGIN_DESCRIPTION="SchuWeb Sitemap integration plugin for the extension ZOO" SCHUWEB_SITEMAP_SETTING_SHOW_CATEGORIES="Show Categories" SCHUWEB_SITEMAP_SETTING_SHOW_CATEGORIES_DESC="Should we include links to categories into the sitemap?" SCHUWEB_SITEMAP_SETTING_SHOW_ITEMS="Show Items" diff --git a/plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.sys.ini b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini similarity index 100% rename from plugins/schuweb_sitemap/com_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_com_zoo.sys.ini rename to plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini diff --git a/plugins/schuweb_sitemap/com_zoo/com_zoo.php b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php similarity index 93% rename from plugins/schuweb_sitemap/com_zoo/com_zoo.php rename to plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php index 63be1a5..0e28aa3 100644 --- a/plugins/schuweb_sitemap/com_zoo/com_zoo.php +++ b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php @@ -10,7 +10,7 @@ use \Joomla\Utilities\ArrayHelper; -class schuweb_sitemap_com_zoo +class schuweb_sitemap_zoo { protected static $_menu_items; @@ -22,7 +22,7 @@ static function prepareMenuItem(&$node) $component = ArrayHelper::getValue($link_vars, 'option', ''); $view = ArrayHelper::getValue($link_vars, 'view', ''); - if ($component == 'com_zoo' && $view == 'frontpage') + if ($component == 'schuweb_sitemap_zoo' && $view == 'frontpage') { $id = intval(ArrayHelper::getValue($link_vars, 'id', 0)); if ($id != 0) @@ -121,7 +121,7 @@ static function getCategoryTree(&$schuweb_sitemap, &$parent, &$params) $node->id = $parent->id; $node->uid = $parent->uid . 'c' . $cat->id; $node->name = $cat->name; - $node->link = 'index.php?option=com_zoo&task=category&category_id=' . $cat->id . '&Itemid=' . $Itemid; + $node->link = 'index.php?option=schuweb_sitemap_zoo&task=category&category_id=' . $cat->id . '&Itemid=' . $Itemid; $node->priority = $params['cat_priority']; $node->changefreq = $params['cat_changefreq']; @@ -172,7 +172,7 @@ static function getCategoryTree(&$schuweb_sitemap, &$parent, &$params) $node->id = $parent->id; $node->uid = $parent->uid . 'i' . $item->id; $node->name = $item->name; - $node->link = 'index.php?option=com_zoo&task=item&item_id=' . $item->id . '&Itemid=' . $Itemid; + $node->link = 'index.php?option=schuweb_sitemap_zoo&task=item&item_id=' . $item->id . '&Itemid=' . $Itemid; $node->priority = $params['item_priority']; $node->changefreq = $params['item_changefreq']; @@ -197,14 +197,14 @@ static protected function _find($type, $id) { // load config - require_once(JPATH_ADMINISTRATOR . '/components/com_zoo/config.php'); + require_once(JPATH_ADMINISTRATOR . '/components/schuweb_sitemap_zoo/config.php'); // get ZOO app $app = App::getInstance('zoo'); if (self::$_menu_items == null) { - $menu_items = $app->object->create('\Joomla\CMS\Application\SiteApplication')->getMenu()->getItems('component_id', JComponentHelper::getComponent('com_zoo')->id); + $menu_items = $app->object->create('\Joomla\CMS\Application\SiteApplication')->getMenu()->getItems('component_id', JComponentHelper::getComponent('schuweb_sitemap_zoo')->id); $menu_items = $menu_items ? $menu_items : array(); diff --git a/plugins/schuweb_sitemap/com_zoo/com_zoo.xml b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml similarity index 95% rename from plugins/schuweb_sitemap/com_zoo/com_zoo.xml rename to plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml index 6cec525..e9fb486 100644 --- a/plugins/schuweb_sitemap/com_zoo/com_zoo.xml +++ b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml @@ -11,7 +11,7 @@ sw.build.version SCHUWEB_SITEMAP_ZOO_PLUGIN_DESCRIPTION - com_zoo.php + schuweb_sitemap_zoo.php index.html @@ -20,8 +20,8 @@ - en-GB/en-GB.plg_schuweb_sitemap_com_zoo.ini - en-GB/en-GB.plg_schuweb_sitemap_com_zoo.sys.ini + en-GB/en-GB.plg_schuweb_sitemap_zoo.ini + en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini From 1a42a8f2c96d04a2849955bf2781d5b2dc2def1a Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Sun, 13 Feb 2022 20:09:53 +0100 Subject: [PATCH 04/49] Closes #90 exclude zoo from J4 main package --- build/builderJ4.xml | 5 ----- pkg_schuweb_sitemap_J4.xml | 1 - 2 files changed, 6 deletions(-) diff --git a/build/builderJ4.xml b/build/builderJ4.xml index 38b0edb..f3b11f5 100644 --- a/build/builderJ4.xml +++ b/build/builderJ4.xml @@ -48,11 +48,6 @@ - - - - - diff --git a/pkg_schuweb_sitemap_J4.xml b/pkg_schuweb_sitemap_J4.xml index 626157e..bdfe47b 100644 --- a/pkg_schuweb_sitemap_J4.xml +++ b/pkg_schuweb_sitemap_J4.xml @@ -16,7 +16,6 @@ plg_content_sw.build.version_sw.build.dstamp.zip plg_weblinks_sw.build.version_sw.build.dstamp.zip plg_newsfeeds_sw.build.version_sw.build.dstamp.zip - plg_zoo_sw.build.version_sw.build.dstamp.zip https://raw.githubusercontent.com/svanschu/SchuWeb-Sitemap/master/update/schuweb_sitemap.xml From f05969abdaf82602b17838efa850b5c81846e545 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Sun, 13 Feb 2022 20:18:05 +0100 Subject: [PATCH 05/49] #93 rename and create own package for weblinks --- build/builder_plugins.xml | 6 ++++++ .../index.html | 0 .../cs-CZ.plg_schuweb_sitemap_weblinks.ini} | 0 .../en-GB.plg_schuweb_sitemap_weblinks.ini} | 0 .../es-ES.plg_schuweb_sitemap_weblinks.ini} | 0 .../fa-IR.plg_schuweb_sitemap_weblinks.ini} | 0 .../nl-NL.plg_schuweb_sitemap_weblinks.ini} | 0 .../ru-RU.plg_schuweb_sitemap_weblinks.ini} | 0 .../schuweb_sitemap_weblinks.php} | 8 ++++---- .../schuweb_sitemap_weblinks.xml} | 14 +++++++------- 10 files changed, 17 insertions(+), 11 deletions(-) rename plugins/schuweb_sitemap/{com_weblinks => schuweb_sitemap_weblinks}/index.html (100%) rename plugins/schuweb_sitemap/{com_weblinks/language/cs-CZ.plg_schuweb_sitemap_com_weblinks.ini => schuweb_sitemap_weblinks/language/cs-CZ.plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{com_weblinks/language/en-GB.plg_schuweb_sitemap_com_weblinks.ini => schuweb_sitemap_weblinks/language/en-GB.plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{com_weblinks/language/es-ES.plg_schuweb_sitemap_com_weblinks.ini => schuweb_sitemap_weblinks/language/es-ES.plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{com_weblinks/language/fa-IR.plg_schuweb_sitemap_com_weblinks.ini => schuweb_sitemap_weblinks/language/fa-IR.plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{com_weblinks/language/nl-NL.plg_schuweb_sitemap_com_weblinks.ini => schuweb_sitemap_weblinks/language/nl-NL.plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{com_weblinks/language/ru-RU.plg_schuweb_sitemap_com_weblinks.ini => schuweb_sitemap_weblinks/language/ru-RU.plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{com_weblinks/com_weblinks.php => schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php} (94%) rename plugins/schuweb_sitemap/{com_weblinks/com_weblinks.xml => schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml} (90%) diff --git a/build/builder_plugins.xml b/build/builder_plugins.xml index 09a7f31..6eaeab4 100644 --- a/build/builder_plugins.xml +++ b/build/builder_plugins.xml @@ -23,6 +23,11 @@ + + + + + @@ -36,6 +41,7 @@ + diff --git a/plugins/schuweb_sitemap/com_weblinks/index.html b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/index.html similarity index 100% rename from plugins/schuweb_sitemap/com_weblinks/index.html rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/index.html diff --git a/plugins/schuweb_sitemap/com_weblinks/language/cs-CZ.plg_schuweb_sitemap_com_weblinks.ini b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/cs-CZ.plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/com_weblinks/language/cs-CZ.plg_schuweb_sitemap_com_weblinks.ini rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/cs-CZ.plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_schuweb_sitemap_com_weblinks.ini b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/en-GB.plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/com_weblinks/language/en-GB.plg_schuweb_sitemap_com_weblinks.ini rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/en-GB.plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/com_weblinks/language/es-ES.plg_schuweb_sitemap_com_weblinks.ini b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/es-ES.plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/com_weblinks/language/es-ES.plg_schuweb_sitemap_com_weblinks.ini rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/es-ES.plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/com_weblinks/language/fa-IR.plg_schuweb_sitemap_com_weblinks.ini b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/fa-IR.plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/com_weblinks/language/fa-IR.plg_schuweb_sitemap_com_weblinks.ini rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/fa-IR.plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/com_weblinks/language/nl-NL.plg_schuweb_sitemap_com_weblinks.ini b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/nl-NL.plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/com_weblinks/language/nl-NL.plg_schuweb_sitemap_com_weblinks.ini rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/nl-NL.plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/com_weblinks/language/ru-RU.plg_schuweb_sitemap_com_weblinks.ini b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/ru-RU.plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/com_weblinks/language/ru-RU.plg_schuweb_sitemap_com_weblinks.ini rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/ru-RU.plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/com_weblinks/com_weblinks.php b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php similarity index 94% rename from plugins/schuweb_sitemap/com_weblinks/com_weblinks.php rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php index c4aa075..52aaada 100644 --- a/plugins/schuweb_sitemap/com_weblinks/com_weblinks.php +++ b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php @@ -57,7 +57,7 @@ static function getTree($sitemap, $parent, &$params) self::initialize($params); $app = JFactory::getApplication(); - $weblinks_params = $app->getParams('com_weblinks'); + $weblinks_params = $app->getParams('schuweb_sitemap_weblinks'); $link_query = parse_url($parent->link); parse_str(html_entity_decode($link_query['query']), $link_vars); @@ -197,7 +197,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) if ($item_params->get('count_clicks', $params['count_clicks']) == 1) { - $node->link = 'index.php?option=com_weblinks&task=weblink.go&id=' . $link->id . '&Itemid=' . ($Itemid ? $Itemid : $parent->id); + $node->link = 'index.php?option=schuweb_sitemap_weblinks&task=weblink.go&id=' . $link->id . '&Itemid=' . ($Itemid ? $Itemid : $parent->id); } else { @@ -230,8 +230,8 @@ static public function initialize(&$params) self::$_initialized = true; if (version_compare(JVERSION, '4', 'lt')) { - require_once JPATH_SITE . '/components/com_weblinks/models/category.php'; - require_once JPATH_SITE . '/components/com_weblinks/helpers/route.php'; + require_once JPATH_SITE . '/components/schuweb_sitemap_weblinks/models/category.php'; + require_once JPATH_SITE . '/components/schuweb_sitemap_weblinks/helpers/route.php'; } } } \ No newline at end of file diff --git a/plugins/schuweb_sitemap/com_weblinks/com_weblinks.xml b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml similarity index 90% rename from plugins/schuweb_sitemap/com_weblinks/com_weblinks.xml rename to plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml index 8ea88f2..c767b72 100644 --- a/plugins/schuweb_sitemap/com_weblinks/com_weblinks.xml +++ b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml @@ -10,7 +10,7 @@ sw.build.version SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION - com_weblinks.php + schuweb_sitemap_weblinks.php index.html @@ -19,12 +19,12 @@ - en-GB.plg_schuweb_sitemap_com_weblinks.ini - es-ES.plg_schuweb_sitemap_com_weblinks.ini - fa-IR.plg_schuweb_sitemap_com_weblinks.ini - cs-CZ.plg_schuweb_sitemap_com_weblinks.ini - nl-NL.plg_schuweb_sitemap_com_weblinks.ini - ru-RU.plg_schuweb_sitemap_com_weblinks.ini + en-GB.plg_schuweb_sitemap_weblinks.ini + es-ES.plg_schuweb_sitemap_weblinks.ini + fa-IR.plg_schuweb_sitemap_weblinks.ini + cs-CZ.plg_schuweb_sitemap_weblinks.ini + nl-NL.plg_schuweb_sitemap_weblinks.ini + ru-RU.plg_schuweb_sitemap_weblinks.ini From bad7c8b6c8b94ad02188c18ec73d52a06f62c1e2 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Sun, 13 Feb 2022 20:23:13 +0100 Subject: [PATCH 06/49] #93 Exclude weblinks from main package for J4 --- build/builderJ4.xml | 7 ------- pkg_schuweb_sitemap_J4.xml | 1 - 2 files changed, 8 deletions(-) diff --git a/build/builderJ4.xml b/build/builderJ4.xml index f3b11f5..51d7161 100644 --- a/build/builderJ4.xml +++ b/build/builderJ4.xml @@ -43,11 +43,6 @@ - - - - - @@ -83,8 +78,6 @@ - - diff --git a/pkg_schuweb_sitemap_J4.xml b/pkg_schuweb_sitemap_J4.xml index bdfe47b..6b81ed3 100644 --- a/pkg_schuweb_sitemap_J4.xml +++ b/pkg_schuweb_sitemap_J4.xml @@ -14,7 +14,6 @@ com_schuweb_sitemap_sw.build.version_sw.build.dstamp.zip plg_content_sw.build.version_sw.build.dstamp.zip - plg_weblinks_sw.build.version_sw.build.dstamp.zip plg_newsfeeds_sw.build.version_sw.build.dstamp.zip From 6fa3f288062f2102810111a400f0991d579d3d81 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Wed, 16 Feb 2022 02:21:03 +0100 Subject: [PATCH 07/49] closes #78 com_kunena for J4 (#100) * rename kunena plugin * use J4 language format * rename kunena plugin * update to Kunena 6 --- build/builder_plugins.xml | 6 +++++ components/com_schuweb_sitemap/displayer.php | 5 ++++ .../helpers/schuweb_sitemap.php | 11 ++++++-- .../{com_kunena => kunena}/index.html | 0 .../com_kunena.php => kunena/kunena.php} | 25 ++++++++++--------- .../com_kunena.xml => kunena/kunena.xml} | 19 ++++++-------- .../cs-CZ/plg_schuweb_sitemap_kunena.ini} | 0 .../en-GB/plg_schuweb_sitemap_kunena.ini} | 0 .../es-ES/plg_schuweb_sitemap_kunena.ini} | 0 .../fa-IR/plg_schuweb_sitemap_kunena.ini} | 0 .../nl-NL/plg_schuweb_sitemap_kunena.ini} | 0 .../ru-RU/plg_schuweb_sitemap_kunena.ini} | 0 12 files changed, 41 insertions(+), 25 deletions(-) rename plugins/schuweb_sitemap/{com_kunena => kunena}/index.html (100%) rename plugins/schuweb_sitemap/{com_kunena/com_kunena.php => kunena/kunena.php} (91%) rename plugins/schuweb_sitemap/{com_kunena/com_kunena.xml => kunena/kunena.xml} (87%) rename plugins/schuweb_sitemap/{com_kunena/language/cs-CZ.plg_schuweb_sitemap_com_kunena.ini => kunena/language/cs-CZ/plg_schuweb_sitemap_kunena.ini} (100%) rename plugins/schuweb_sitemap/{com_kunena/language/en-GB.plg_schuweb_sitemap_com_kunena.ini => kunena/language/en-GB/plg_schuweb_sitemap_kunena.ini} (100%) rename plugins/schuweb_sitemap/{com_kunena/language/es-ES.plg_schuweb_sitemap_com_kunena.ini => kunena/language/es-ES/plg_schuweb_sitemap_kunena.ini} (100%) rename plugins/schuweb_sitemap/{com_kunena/language/fa-IR.plg_schuweb_sitemap_com_kunena.ini => kunena/language/fa-IR/plg_schuweb_sitemap_kunena.ini} (100%) rename plugins/schuweb_sitemap/{com_kunena/language/nl-NL.plg_schuweb_sitemap_com_kunena.ini => kunena/language/nl-NL/plg_schuweb_sitemap_kunena.ini} (100%) rename plugins/schuweb_sitemap/{com_kunena/language/ru-RU.plg_schuweb_sitemap_com_kunena.ini => kunena/language/ru-RU/plg_schuweb_sitemap_kunena.ini} (100%) diff --git a/build/builder_plugins.xml b/build/builder_plugins.xml index 6eaeab4..634237c 100644 --- a/build/builder_plugins.xml +++ b/build/builder_plugins.xml @@ -28,6 +28,11 @@ + + + + + @@ -42,6 +47,7 @@ + diff --git a/components/com_schuweb_sitemap/displayer.php b/components/com_schuweb_sitemap/displayer.php index c930eda..0581410 100644 --- a/components/com_schuweb_sitemap/displayer.php +++ b/components/com_schuweb_sitemap/displayer.php @@ -222,7 +222,12 @@ protected function printMenuTree($menu,&$items) $node->uid = $node->option; $className = 'SchuWeb_Sitemap_'.$node->option; call_user_func_array(array($className, 'getTree'),array(&$this,&$node,&$this->jview->extensions[$node->option]->params)); + } elseif ( !empty($this->jview->extensions[substr($node->option,4)]) ) { + $node->uid = substr($node->option,4); + $className = 'SchuWeb_Sitemap_'.substr($node->option,4); + call_user_func_array(array($className, 'getTree'),array(&$this,&$node,&$this->jview->extensions[substr($node->option,4)]->params)); } + } } } diff --git a/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php b/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php index 9a67cc9..df96eb5 100644 --- a/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php +++ b/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php @@ -7,9 +7,9 @@ * @author Guillermo Vargas (guille@vargas.co.cr) */ // No direct access -defined( '_JEXEC' ) or die( 'Restricted access' ); +use Joomla\CMS\Factory; -jimport('joomla.database.query'); +defined( '_JEXEC' ) or die( 'Restricted access' ); /** * SchuWeb_Sitemap Component Sitemap Model @@ -161,6 +161,13 @@ public static function prepareMenuItem($item) if (method_exists($obj, 'prepareMenuItem')) { $obj->prepareMenuItem($item,$extensions[$item->option]->params); } + } elseif (!empty($extensions[substr($item->option,4)])){ + $className = 'schuweb_sitemap_' . substr($item->option,4); + $obj = new $className; + if (method_exists($obj, 'prepareMenuItem')) { + die(); + $obj->prepareMenuItem($item,$extensions[substr($item->option,4)]->params); + } } } diff --git a/plugins/schuweb_sitemap/com_kunena/index.html b/plugins/schuweb_sitemap/kunena/index.html similarity index 100% rename from plugins/schuweb_sitemap/com_kunena/index.html rename to plugins/schuweb_sitemap/kunena/index.html diff --git a/plugins/schuweb_sitemap/com_kunena/com_kunena.php b/plugins/schuweb_sitemap/kunena/kunena.php similarity index 91% rename from plugins/schuweb_sitemap/com_kunena/com_kunena.php rename to plugins/schuweb_sitemap/kunena/kunena.php index 02ee7ce..c857e29 100644 --- a/plugins/schuweb_sitemap/com_kunena/com_kunena.php +++ b/plugins/schuweb_sitemap/kunena/kunena.php @@ -2,7 +2,7 @@ /** * @package SchuWeb Sitemap * - * @Copyright (C) 2010-2021 Sven Schultschik. All rights reserved + * @copyright (C) 2010-2022 Sven Schultschik. All rights reserved * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.schultschik.de **/ @@ -10,9 +10,13 @@ defined('_JEXEC') or die; use Joomla\Utilities\ArrayHelper; +use Kunena\Forum\Libraries\Factory\KunenaFactory; +use Kunena\Forum\Libraries\Forum\Category\KunenaCategoryHelper; +use Kunena\Forum\Libraries\Forum\Topic\KunenaTopicHelper; +use Kunena\Forum\Libraries\Route\KunenaRoute; /** Handles Kunena forum structure */ -class schuweb_sitemap_com_kunena +class schuweb_sitemap_kunena { /* * This function is called before a menu item is printed. We use it to set the @@ -28,7 +32,7 @@ static function getTree($sitemap, $parent, &$params) return false; // Make sure that we can load the kunena api - if (!schuweb_sitemap_com_kunena::loadKunenaApi()) { + if (!schuweb_sitemap_kunena::loadKunenaApi()) { return false; } @@ -37,7 +41,7 @@ static function getTree($sitemap, $parent, &$params) self::$profile = KunenaFactory::getUser(); } - $user = JFactory::getUser(); + $user = \Joomla\CMS\Factory::getApplication()->getIdentity(); $catid = 0; $link_query = parse_url($parent->link); @@ -112,7 +116,7 @@ static function getTree($sitemap, $parent, &$params) $params['table_prefix'] = '#__kunena'; - schuweb_sitemap_com_kunena::getCategoryTree($sitemap, $parent, $params, $catid); + schuweb_sitemap_kunena::getCategoryTree($sitemap, $parent, $params, $catid); } /* @@ -121,9 +125,7 @@ static function getTree($sitemap, $parent, &$params) static function getCategoryTree($sitemap, $parent, &$params, $parentCat) { // Load categories - - // kimport('kunena.forum.category.helper'); - $categories = KunenaForumCategoryHelper::getChildren($parentCat); + $categories = KunenaCategoryHelper::getChildren($parentCat); /* get list of categories */ $sitemap->changeLevel(1); @@ -148,13 +150,12 @@ static function getCategoryTree($sitemap, $parent, &$params, $parentCat) $node->modified = intval($cat->last_post_time); if ($sitemap->printNode($node) !== FALSE) { - schuweb_sitemap_com_kunena::getCategoryTree($sitemap, $parent, $params, $cat->id); + schuweb_sitemap_kunena::getCategoryTree($sitemap, $parent, $params, $cat->id); } } if ($params['include_topics']) { - // Kunena 2.0+ - // kimport('kunena.forum.topic.helper'); + // TODO: orderby parameter is missing: $tparams = array(); if ($params['days'] != '') @@ -162,7 +163,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $parentCat) if ($params['limit'] < 1) $tparams['nolimit'] = true; - $topics = KunenaForumTopicHelper::getLatestTopics($parentCat, 0, $params['limit'], $tparams); + $topics = KunenaTopicHelper::getLatestTopics($parentCat, 0, $params['limit'], $tparams); if (count($topics) == 2 && is_numeric($topics[0])) { $topics = $topics[1]; } diff --git a/plugins/schuweb_sitemap/com_kunena/com_kunena.xml b/plugins/schuweb_sitemap/kunena/kunena.xml similarity index 87% rename from plugins/schuweb_sitemap/com_kunena/com_kunena.xml rename to plugins/schuweb_sitemap/kunena/kunena.xml index 8fd141b..1e1bb2e 100644 --- a/plugins/schuweb_sitemap/com_kunena/com_kunena.xml +++ b/plugins/schuweb_sitemap/kunena/kunena.xml @@ -2,7 +2,7 @@ SchuWeb Sitemap - Kunena Plugin - Sven Schultschik | Guillermo Vargas + Sven Schultschik sw.build.date GNU GPL http://www.gnu.org/copyleft/gpl.html GNU/GPL @@ -11,19 +11,16 @@ sw.build.version SchuWeb Sitemap Plugin for Kunena component - com_kunena.php + kunena.php index.html - - en-GB.plg_schuweb_sitemap_com_kunena.ini - es-ES.plg_schuweb_sitemap_com_kunena.ini - fa-IR.plg_schuweb_sitemap_com_kunena.ini - cs-CZ.plg_schuweb_sitemap_com_kunena.ini - nl-NL.plg_schuweb_sitemap_com_kunena.ini - ru-RU.plg_schuweb_sitemap_com_kunena.ini + en-GB/plg_schuweb_sitemap_kunena.ini + es-ES/plg_schuweb_sitemap_kunena.ini + fa-IR/plg_schuweb_sitemap_kunena.ini + cs-CZ/plg_schuweb_sitemap_kunena.ini + nl-NL/plg_schuweb_sitemap_kunena.ini + ru-RU/plg_schuweb_sitemap_kunena.ini diff --git a/plugins/schuweb_sitemap/com_kunena/language/cs-CZ.plg_schuweb_sitemap_com_kunena.ini b/plugins/schuweb_sitemap/kunena/language/cs-CZ/plg_schuweb_sitemap_kunena.ini similarity index 100% rename from plugins/schuweb_sitemap/com_kunena/language/cs-CZ.plg_schuweb_sitemap_com_kunena.ini rename to plugins/schuweb_sitemap/kunena/language/cs-CZ/plg_schuweb_sitemap_kunena.ini diff --git a/plugins/schuweb_sitemap/com_kunena/language/en-GB.plg_schuweb_sitemap_com_kunena.ini b/plugins/schuweb_sitemap/kunena/language/en-GB/plg_schuweb_sitemap_kunena.ini similarity index 100% rename from plugins/schuweb_sitemap/com_kunena/language/en-GB.plg_schuweb_sitemap_com_kunena.ini rename to plugins/schuweb_sitemap/kunena/language/en-GB/plg_schuweb_sitemap_kunena.ini diff --git a/plugins/schuweb_sitemap/com_kunena/language/es-ES.plg_schuweb_sitemap_com_kunena.ini b/plugins/schuweb_sitemap/kunena/language/es-ES/plg_schuweb_sitemap_kunena.ini similarity index 100% rename from plugins/schuweb_sitemap/com_kunena/language/es-ES.plg_schuweb_sitemap_com_kunena.ini rename to plugins/schuweb_sitemap/kunena/language/es-ES/plg_schuweb_sitemap_kunena.ini diff --git a/plugins/schuweb_sitemap/com_kunena/language/fa-IR.plg_schuweb_sitemap_com_kunena.ini b/plugins/schuweb_sitemap/kunena/language/fa-IR/plg_schuweb_sitemap_kunena.ini similarity index 100% rename from plugins/schuweb_sitemap/com_kunena/language/fa-IR.plg_schuweb_sitemap_com_kunena.ini rename to plugins/schuweb_sitemap/kunena/language/fa-IR/plg_schuweb_sitemap_kunena.ini diff --git a/plugins/schuweb_sitemap/com_kunena/language/nl-NL.plg_schuweb_sitemap_com_kunena.ini b/plugins/schuweb_sitemap/kunena/language/nl-NL/plg_schuweb_sitemap_kunena.ini similarity index 100% rename from plugins/schuweb_sitemap/com_kunena/language/nl-NL.plg_schuweb_sitemap_com_kunena.ini rename to plugins/schuweb_sitemap/kunena/language/nl-NL/plg_schuweb_sitemap_kunena.ini diff --git a/plugins/schuweb_sitemap/com_kunena/language/ru-RU.plg_schuweb_sitemap_com_kunena.ini b/plugins/schuweb_sitemap/kunena/language/ru-RU/plg_schuweb_sitemap_kunena.ini similarity index 100% rename from plugins/schuweb_sitemap/com_kunena/language/ru-RU.plg_schuweb_sitemap_com_kunena.ini rename to plugins/schuweb_sitemap/kunena/language/ru-RU/plg_schuweb_sitemap_kunena.ini From 88823c63907018b6489afca1c38407ebd77d6900 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Wed, 16 Feb 2022 02:28:22 +0100 Subject: [PATCH 08/49] J4 class naming JFactory to Factory --- install.script.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install.script.php b/install.script.php index cea86cb..0f65620 100644 --- a/install.script.php +++ b/install.script.php @@ -8,6 +8,7 @@ * @license GNU General Public License version 3 or later */ +use Joomla\CMS\Factory; use Joomla\CMS\Installer\Installer; use Joomla\CMS\Language\Text; @@ -61,7 +62,7 @@ public function postflight($type, $parent) $extensions = SchuWeb_SitemapHelper::getExtensionsList(); - $db = JFactory::getDbo(); + $db = Factory::getDbo(); // Activate the fitting plugins foreach ($extensions as $extension) @@ -86,7 +87,7 @@ public function postflight($type, $parent) if (!$db->execute()) { - JFactory::getApplication()->enqueueMessage(JText::_('SCHUWEB_SITEMAP_ACTIVATE_PLUGIN_FAILED'), 'error'); + Factory::getApplication()->enqueueMessage(JText::_('SCHUWEB_SITEMAP_ACTIVATE_PLUGIN_FAILED'), 'error'); } } @@ -164,7 +165,7 @@ private function upgradeJ3J4() $unsupported = array('com_sobipro', 'com_virtuemart', 'com_kunena'); foreach ($unsupported as $componentName) { - $db = JFactory::getDbo(); + $db = Factory::getDbo(); $query = $db->getQuery(true); $query->select('*') From 5e170917c08dd21796630d1f25a10ceec7e49401 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 18 Feb 2022 00:46:47 +0100 Subject: [PATCH 09/49] delete Joomla 3 code --- .../models/fields/sitemap.php | 16 +- .../views/sitemap/tmpl/edit.php | 72 ++++++- .../views/sitemap/tmpl/edit_j3.php | 69 ------ .../views/sitemap/tmpl/edit_j4.php | 75 ------- .../views/sitemap/tmpl/edit_menus.php | 37 ++-- .../views/sitemap/tmpl/edit_menus_j4.php | 54 ----- .../views/sitemap/view.html.php | 54 ++--- .../views/sitemaps/tmpl/default.php | 187 ++++++++++++++++- .../views/sitemaps/tmpl/default_j3.php | 162 -------------- .../views/sitemaps/tmpl/default_j4.php | 198 ------------------ .../views/sitemaps/view.html.php | 13 +- .../views/html/tmpl/default.php | 50 ----- .../com_content/com_content.php | 28 +-- .../com_newsfeeds/com_newsfeeds.php | 32 +-- .../schuweb_sitemap_weblinks.php | 33 +-- 15 files changed, 301 insertions(+), 779 deletions(-) delete mode 100644 administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_j3.php delete mode 100644 administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_j4.php delete mode 100644 administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_menus_j4.php delete mode 100644 administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j3.php delete mode 100644 administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j4.php diff --git a/administrator/components/com_schuweb_sitemap/models/fields/sitemap.php b/administrator/components/com_schuweb_sitemap/models/fields/sitemap.php index 11d5f16..24e4517 100644 --- a/administrator/components/com_schuweb_sitemap/models/fields/sitemap.php +++ b/administrator/components/com_schuweb_sitemap/models/fields/sitemap.php @@ -67,18 +67,10 @@ protected function getInput() $link = JRoute::_('index.php?option=com_schuweb_sitemap&view=sitemaps&layout=modal&tmpl=component&function=jSelectSitemap_' . $this->id); - if (version_compare(JVERSION, '4', 'lt')) - { - $class = 'class="input-medium"'; - $classSpan = 'input-append'; - $bsModal = 'data-target="#sitemapTypeModal" data-toggle="modal"'; - } - else - { - $class = 'class="form-control valid form-control-success"'; - $classSpan = 'input-group'; - $bsModal = 'data-bs-target="#sitemapTypeModal" data-bs-toggle="modal"'; - } + + $class = 'class="form-control valid form-control-success"'; + $classSpan = 'input-group'; + $bsModal = 'data-bs-target="#sitemapTypeModal" data-bs-toggle="modal"'; $html = array(); $html[] = ''; diff --git a/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit.php b/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit.php index 34ea329..2e23e68 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit.php @@ -7,9 +7,69 @@ */ defined('_JEXEC') or die; -if (version_compare(JVERSION, '4', 'lt')) -{ - echo $this->loadTemplate('j3'); -} else { - echo $this->loadTemplate('j4'); -} \ No newline at end of file +use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Layout\LayoutHelper; +use Joomla\CMS\Router\Route; + +/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ +$wa = $this->document->getWebAssetManager(); +$wa->useScript('keepalive') + ->useScript('form.validate'); + +?> +
+ + + +
+ 'details', 'recall' => true, 'breakpoint' => 768]); ?> + + +
+
+
+ form->getInput('introtext'); ?> +
+
+
+ +
+
+ + + + loadTemplate('menus'); ?> + + + form->getFieldsets('attribs'); + foreach ($fieldSets as $name => $fieldSet) : + ?> + label)); ?> +
+
+
+ description) && trim($fieldSet->description)) : + echo '' . $this->escape(JText::_($fieldSet->description)) . ''; + endif; ?> +
+ form->getFieldset($name) as $field) : ?> + renderField(); ?> + +
+
+
+
+ + + +
+ + + form->getInput('is_default'); ?> + +
diff --git a/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_j3.php b/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_j3.php deleted file mode 100644 index 53f9301..0000000 --- a/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_j3.php +++ /dev/null @@ -1,69 +0,0 @@ - -
- - -
- - 'general')); ?> - - - -
-
-
- form->getInput('introtext'); ?> -
-
-
- -
-
- - - - loadTemplate('menus'); ?> - - - form->getFieldsets('attribs'); - foreach ($fieldSets as $name => $fieldSet) : - ?> - label)); ?> - 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_schuweb_sitemap/views/sitemap/tmpl/edit_j4.php b/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_j4.php deleted file mode 100644 index 26db64c..0000000 --- a/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_j4.php +++ /dev/null @@ -1,75 +0,0 @@ -document->getWebAssetManager(); -$wa->useScript('keepalive') - ->useScript('form.validate'); - -?> -
- - - -
- 'details', 'recall' => true, 'breakpoint' => 768]); ?> - - -
-
-
- form->getInput('introtext'); ?> -
-
-
- -
-
- - - - loadTemplate('menus_j4'); ?> - - - form->getFieldsets('attribs'); - foreach ($fieldSets as $name => $fieldSet) : - ?> - label)); ?> -
-
-
- description) && trim($fieldSet->description)) : - echo '' . $this->escape(JText::_($fieldSet->description)) . ''; - endif; ?> -
- form->getFieldset($name) as $field) : ?> - renderField(); ?> - -
-
-
-
- - - -
- - - form->getInput('is_default'); ?> - -
diff --git a/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_menus.php b/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_menus.php index 307a3e7..d00aa52 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_menus.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemap/tmpl/edit_menus.php @@ -1,27 +1,30 @@ - +
- - - - @@ -30,19 +33,19 @@ $i = 0; foreach ($this->item->selections as $key => $menu): ?> - - - - - - - - - - - - - - - item->selections as $key => $menu): ?> - - - - - - - - - \ No newline at end of file diff --git a/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php b/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php index 4dcc307..f4d42bf 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php @@ -87,43 +87,25 @@ private function handleMenus() */ function addToolbar() { - $isNew = ($this->item->id == 0); + $isNew = ($this->item->id == 0); - if (version_compare(JVERSION, '4', 'lt')) - { - JToolBarHelper::title(JText::_('SCHUWEB_SITEMAP_PAGE_' . ($isNew ? 'ADD_SITEMAP' : 'EDIT_SITEMAP')), 'article-add.png'); - JToolBarHelper::apply('sitemap.apply', 'JTOOLBAR_APPLY'); - JToolBarHelper::save('sitemap.save', 'JTOOLBAR_SAVE'); - JToolBarHelper::save2new('sitemap.save2new'); - if (!$isNew) - { - JToolBarHelper::save2copy('sitemap.save2copy'); - } - JToolBarHelper::cancel('sitemap.cancel', 'JTOOLBAR_CLOSE'); - } - else - { - ToolBarHelper::title(Text::_('SCHUWEB_SITEMAP_PAGE_' . ($isNew ? 'ADD_SITEMAP' : 'EDIT_SITEMAP')), 'sitemap fa-sitemap'); - ToolbarHelper::apply('sitemap.apply', 'JTOOLBAR_APPLY'); - $toolbarButtons[] = ['save', 'sitemap.save']; - $toolbarButtons[] = ['save2new', 'sitemap.save2new']; - if (!$isNew) - { - $toolbarButtons[] = ['save2copy', 'sitemap.save2copy']; - } - ToolbarHelper::saveGroup( - $toolbarButtons, - 'btn-success' - ); - if ($isNew) - { - ToolbarHelper::cancel('sitemap.cancel'); - } - else - { - ToolbarHelper::cancel('sitemap.cancel', 'JTOOLBAR_CLOSE'); - } - } + ToolBarHelper::title(Text::_('SCHUWEB_SITEMAP_PAGE_' . ($isNew ? 'ADD_SITEMAP' : 'EDIT_SITEMAP')), 'sitemap fa-sitemap'); + ToolbarHelper::apply('sitemap.apply', 'JTOOLBAR_APPLY'); + + $toolbarButtons[] = ['save', 'sitemap.save']; + $toolbarButtons[] = ['save2new', 'sitemap.save2new']; + if (!$isNew) { + $toolbarButtons[] = ['save2copy', 'sitemap.save2copy']; + } + ToolbarHelper::saveGroup( + $toolbarButtons, + 'btn-success' + ); + if ($isNew) { + ToolbarHelper::cancel('sitemap.cancel'); + } else { + ToolbarHelper::cancel('sitemap.cancel', 'JTOOLBAR_CLOSE'); + } } } diff --git a/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php b/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php index c4b239f..9ceebfc 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php @@ -9,11 +9,190 @@ // no direct access defined('_JEXEC') or die; -if (version_compare(JVERSION, '4', 'lt')) +use Joomla\CMS\Layout\LayoutHelper; +use Joomla\CMS\Language\Text; +use Joomla\CMS\HTML\HTMLHelper; + +JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); +JHtml::_('bootstrap.tooltip'); + + +$n = count($this->items); + +$baseUrl = JUri::root(); + +$user = JFactory::getApplication()->getIdentity(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$saveOrder = $listOrder == 'a.ordering'; + +if ($saveOrder && !empty($this->items)) { - echo $this->loadTemplate('j3'); -} else { - echo $this->loadTemplate('j4'); + //TODO!!!!!!!!!!!!!!!!!!!! + $saveOrderingUrl = 'index.php?option=com_schuweb_sitemap&task=sitemaps.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; } ?> +
+
+
+
+ $this)); ?> + items)) : ?> +
+ + +
+ + + + + + + + + + + + + + + data-url="" data-direction="" data-nested="true"> + items as $i => $item) : + $ordering = ($listOrder == 'a.ordering'); + $canCreate = $user->authorise('core.create', 'com_schuweb_sitemap.sitemap.' . $item->id); + $canEdit = $user->authorise('core.edit', 'com_schuweb_sitemap.sitemap.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_schuweb_sitemap.sitemap.' . $item->id); + + $now = JFactory::getDate()->toUnix(); + if (!$item->lastvisit_html) + { + $htmlDate = JText::_('Date_Never'); + } + elseif ($item->lastvisit_html > ($now - 3600)) + { // Less than one hour + $htmlDate = JText::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); + } + 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)); + } + else + { + $date = new JDate($item->lastvisit_html); + $htmlDate = $date->format('Y-m-d H:i'); + } + + if (!$item->lastvisit_xml) + { + $xmlDate = JText::_('Date_Never'); + } + elseif ($item->lastvisit_xml > ($now - 3600)) + { // Less than one hour + $xmlDate = JText::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); + } + 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)); + } + else + { + $date = new JDate($item->lastvisit_xml); + $xmlDate = $date->format('Y-m-d H:i'); + } + + ?> + + + + + + + + + + + + +
+ , + , + +
+ + + + + + + + +
+ ( + ) +
+
+ +
+ +
+ id, false, 'cid', 'cb', $item->title); ?> + + state, $i, 'sitemaps.', $canChange, 'cb'); ?> + + + + escape($item->title); ?> + + escape($item->title); ?> + + is_default == 1) : ?> + + + state): ?> + [] + [] + [] + +
+
+ escape($item->alias)); ?> +
+
+ escape($item->access_level); ?> + + count_html . ' / ' . $item->views_html . ' / ' . $htmlDate; ?> + + count_xml . ' / ' . $item->views_xml . ' / ' . $xmlDate; ?> + + id; ?> +
+ pagination->getListFooter(); ?> + + + + +
+
+
+
diff --git a/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j3.php b/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j3.php deleted file mode 100644 index 1661af6..0000000 --- a/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j3.php +++ /dev/null @@ -1,162 +0,0 @@ -items); - -$baseUrl = JUri::root(); - -$version = new JVersion; - -?> -
- sidebar)): ?> -
- sidebar; ?> -
-
- -
- -
- - -
- - -
-
- - - - - - - - - - - - - - - - - - - - items as $i => $item) : - - $now = JFactory::getDate()->toUnix(); - if ( !$item->lastvisit_html ) { - $htmlDate = JText::_('Date_Never'); - }elseif ( $item->lastvisit_html > ($now-3600)) { // Less than one hour - $htmlDate = JText::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); - } 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)); - } else { - $date = new JDate($item->lastvisit_html); - $htmlDate = $date->format('Y-m-d H:i'); - } - - if ( !$item->lastvisit_xml ) { - $xmlDate = JText::_('Date_Never'); - } elseif ( $item->lastvisit_xml > ($now-3600)) { // Less than one hour - $xmlDate = JText::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); - } 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)); - } else { - $date = new JDate($item->lastvisit_xml); - $xmlDate = $date->format('Y-m-d H:i'); - } - - ?> - - - - - - - - - - - -
- - - 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')); ?> -
- pagination->getListFooter(); ?> -
- id); ?> - - - escape($item->title); ?> - is_default == 1) : ?> - getShortVersion(), '3.0.0', '>=')): ?> - - - <?php echo JText::_('Default'); ?> - - - state): ?> - [] - [] - [] - -
- (escape($item->alias); ?>) -
- state, $i, 'sitemaps.'); ?> - - escape($item->access_level); ?> - - count_html .' / '.$item->views_html. ' / ' . $htmlDate; ?> - - count_xml .' / '.$item->views_xml. ' / ' . $xmlDate; ?> - - id; ?> -
-
- - - - - - diff --git a/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j4.php b/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j4.php deleted file mode 100644 index 9ceebfc..0000000 --- a/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j4.php +++ /dev/null @@ -1,198 +0,0 @@ -items); - -$baseUrl = JUri::root(); - -$user = JFactory::getApplication()->getIdentity(); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); -$saveOrder = $listOrder == 'a.ordering'; - -if ($saveOrder && !empty($this->items)) -{ - //TODO!!!!!!!!!!!!!!!!!!!! - $saveOrderingUrl = 'index.php?option=com_schuweb_sitemap&task=sitemaps.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; -} -?> -
-
-
-
- $this)); ?> - items)) : ?> -
- - -
- - - - - - - - - - - - - - - data-url="" data-direction="" data-nested="true"> - items as $i => $item) : - $ordering = ($listOrder == 'a.ordering'); - $canCreate = $user->authorise('core.create', 'com_schuweb_sitemap.sitemap.' . $item->id); - $canEdit = $user->authorise('core.edit', 'com_schuweb_sitemap.sitemap.' . $item->id); - $canChange = $user->authorise('core.edit.state', 'com_schuweb_sitemap.sitemap.' . $item->id); - - $now = JFactory::getDate()->toUnix(); - if (!$item->lastvisit_html) - { - $htmlDate = JText::_('Date_Never'); - } - elseif ($item->lastvisit_html > ($now - 3600)) - { // Less than one hour - $htmlDate = JText::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); - } - 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)); - } - else - { - $date = new JDate($item->lastvisit_html); - $htmlDate = $date->format('Y-m-d H:i'); - } - - if (!$item->lastvisit_xml) - { - $xmlDate = JText::_('Date_Never'); - } - elseif ($item->lastvisit_xml > ($now - 3600)) - { // Less than one hour - $xmlDate = JText::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); - } - 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)); - } - else - { - $date = new JDate($item->lastvisit_xml); - $xmlDate = $date->format('Y-m-d H:i'); - } - - ?> - - - - - - - - - - - - -
- , - , - -
- - - - - - - - -
- ( - ) -
-
- -
- -
- id, false, 'cid', 'cb', $item->title); ?> - - state, $i, 'sitemaps.', $canChange, 'cb'); ?> - - - - escape($item->title); ?> - - escape($item->title); ?> - - is_default == 1) : ?> - - - state): ?> - [] - [] - [] - -
-
- escape($item->alias)); ?> -
-
- escape($item->access_level); ?> - - count_html . ' / ' . $item->views_html . ' / ' . $htmlDate; ?> - - count_xml . ' / ' . $item->views_xml . ' / ' . $xmlDate; ?> - - id; ?> -
- pagination->getListFooter(); ?> - - - - - -
-
-
-
diff --git a/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php b/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php index 98c7f5a..3b74daf 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php @@ -27,18 +27,7 @@ class SchuWeb_SitemapViewSitemaps extends JViewLegacy */ public function display($tpl = null) { - if (version_compare(JVERSION, '4', 'lt')) - { - if ($this->getLayout() !== 'modal') - { - JHtmlSidebar::addEntry(JText::_('SCHUWEB_SITEMAP_Submenu_Sitemaps'), 'index.php?option=com_schuweb_sitemap', true); - JHtmlSidebar::addEntry(JText::_('SCHUWEB_SITEMAP_Submenu_Extensions'), 'index.php?option=com_plugins&view=plugins&filter_folder=schuweb_sitemap'); - } - } - else - { - $this->filterForm = $this->get('FilterForm'); - } + $this->filterForm = $this->get('FilterForm'); $this->state = $this->get('State'); $this->items = $this->get('Items'); diff --git a/components/com_schuweb_sitemap/views/html/tmpl/default.php b/components/com_schuweb_sitemap/views/html/tmpl/default.php index 849851b..0176314 100644 --- a/components/com_schuweb_sitemap/views/html/tmpl/default.php +++ b/components/com_schuweb_sitemap/views/html/tmpl/default.php @@ -13,57 +13,7 @@ // Create shortcut to parameters. $params = $this->item->params; -if (version_compare(JVERSION, '4', 'lt')) -{ - if ($this->displayer->canEdit) - { - $live_site = JURI::root(); - JHTML::_('behavior.framework', true); - - $ajaxurl = "{$live_site}index.php?option=com_schuweb_sitemap&format=json&task=ajax.editElement&action=toggleElement&" . JSession::getFormToken() . '=1'; - - $css = '.xmapexcl img{ border:0px; }' . "\n"; - $css .= '.xmapexcloff { text-decoration:line-through; }'; - //$css .= "\n.".$this->item->classname .' li {float:left;}'; - - $js = " - window.addEvent('domready',function (){ - $$('.xmapexcl').each(function(el){ - el.onclick = function(){ - if (this && this.rel) { - options = JSON.decode(this.rel); - this.onComplete = checkExcludeResult - var myAjax = new Request.JSON({ - url:'{$ajaxurl}', - onSuccess: checkExcludeResult.bind(this) - }).get({id:{$this->item->id},uid:options.uid,itemid:options.itemid}); - } - return false; - }; - - }); - }); - checkExcludeResult = function (response) { - //this.set('class','xmapexcl xmapexcloff'); - var imgs = this.getElementsByTagName('img'); - if (response.result == 'OK') { - var state = response.state; - if (state==0) { - imgs[0].src='{$live_site}/components/com_schuweb_sitemap/assets/images/unpublished.png'; - } else { - imgs[0].src='{$live_site}/components/com_schuweb_sitemap/assets/images/tick.png'; - } - } else { - alert('The element couldn\\'t be published or upublished!'); - } - }"; - - $doc = JFactory::getDocument(); - $doc->addStyleDeclaration($css); - $doc->addScriptDeclaration($js); - } -} ?>
get('show_page_heading', 1) && $params->get('page_heading') != '') : ?> diff --git a/plugins/schuweb_sitemap/com_content/com_content.php b/plugins/schuweb_sitemap/com_content/com_content.php index df53846..d3d6517 100644 --- a/plugins/schuweb_sitemap/com_content/com_content.php +++ b/plugins/schuweb_sitemap/com_content/com_content.php @@ -8,12 +8,6 @@ */ defined('_JEXEC') or die; -if (version_compare(JVERSION, '4', 'lt')) -{ - require_once JPATH_SITE . '/components/com_content/helpers/route.php'; - require_once JPATH_SITE . '/components/com_content/helpers/query.php'; -} - use \Joomla\Component\Content\Site\Helper\RouteHelper; use \Joomla\Component\Content\Site\Helper\QueryHelper; use \Joomla\Utilities\ArrayHelper; @@ -457,16 +451,8 @@ static function includeCategoryContent($sitemap, $parent, $catid, &$params, $Ite $query->where($db->qn('a.access') . 'IN (' . $params['groups'] . ')'); } - if (version_compare(JVERSION, '4', 'lt')) - { - $query->andWhere(array($db->quoteName('a.publish_up') . '=' . $params['nullDate'], $db->quoteName('a.publish_up') . '<=' . $params['nowDate'])) - ->andWhere(array($db->quoteName('a.publish_down') . '=' . $params['nullDate'], $db->quoteName('a.publish_down') . '>=' . $params['nowDate'])); - } - else - { - $query->andWhere(array($db->quoteName('a.publish_up') . 'IS NULL', $db->quoteName('a.publish_up') . '<=' . $params['nowDate'])) + $query->andWhere(array($db->quoteName('a.publish_up') . 'IS NULL', $db->quoteName('a.publish_up') . '<=' . $params['nowDate'])) ->andWhere(array($db->quoteName('a.publish_down') . 'IS NULL', $db->quoteName('a.publish_down') . '>=' . $params['nowDate'])); - } if ($sitemap->view != 'xml') $query->order(self::buildContentOrderBy($parent->params, $parent->id, $Itemid)); @@ -604,16 +590,8 @@ static function buildContentOrderBy(&$params, $parentId, $itemid) $articleOrderby = $menuParams->get('orderby_sec', 'rdate'); $articleOrderDate = $menuParams->get('order_date'); //$categoryOrderby = $menuParams->def('orderby_pri', ''); - if (version_compare(JVERSION, '4', 'lt')) - { - $secondary = ContentHelperQuery::orderbySecondary($articleOrderby, $articleOrderDate) . ', '; - //$primary = ContentHelperQuery::orderbyPrimary($categoryOrderby); - } - else - { - $secondary = QueryHelper::orderbySecondary($articleOrderby, $articleOrderDate) . ', '; - //$primary = QueryHelper::orderbyPrimary($categoryOrderby); - } + $secondary = QueryHelper::orderbySecondary($articleOrderby, $articleOrderDate) . ', '; + //$primary = QueryHelper::orderbyPrimary($categoryOrderby); //$orderby .= $primary . ' ' . $secondary . ' a.created '; $orderby .= $secondary . ' a.created '; diff --git a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php index 487ebc4..e074703 100644 --- a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php +++ b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php @@ -128,14 +128,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) $node->id = $parent->id; $node->uid = $parent->uid . 'c' . $cat->id; $node->name = $cat->title; - if (version_compare(JVERSION, '4', 'lt')) - { - $node->link = NewsfeedsHelperRoute::getCategoryRoute($cat); - } - else - { - $node->link = RouteHelper::getCategoryRoute($cat); - } + $node->link = RouteHelper::getCategoryRoute($cat); $node->priority = $params['cat_priority']; $node->changefreq = $params['cat_changefreq']; @@ -156,14 +149,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) if ($params['include_newsfeeds']) { //view=category&catid=... - if (version_compare(JVERSION, '4', 'lt')) - { - $newsfeedsModel = new NewsfeedsModelCategory(); - } - else - { - $newsfeedsModel = new CategoryModel(); - } + $newsfeedsModel = new CategoryModel(); $newsfeedsModel->getState(); // To force the populate state $newsfeedsModel->setState('list.limit', ArrayHelper::getValue($params, 'max_newsfeeds', null)); $newsfeedsModel->setState('list.start', 0); @@ -183,14 +169,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) $node->name = $newsfeed->name; // Find the Itemid - if (version_compare(JVERSION, '4', 'lt')) - { - $Itemid = intval(preg_replace('/.*Itemid=([0-9]+).*/', '$1', NewsfeedsHelperRoute::getNewsfeedRoute($newsfeed->id, $category->id))); - } - else - { - $Itemid = intval(preg_replace('/.*Itemid=([0-9]+).*/', '$1', RouteHelper::getNewsfeedRoute($newsfeed->id, $category->id))); - } + $Itemid = intval(preg_replace('/.*Itemid=([0-9]+).*/', '$1', RouteHelper::getNewsfeedRoute($newsfeed->id, $category->id))); if ($item_params->get('count_clicks', $params['count_clicks']) == 1) @@ -226,10 +205,5 @@ static public function initialize(&$params) } self::$_initialized = true; - if (version_compare(JVERSION, '4', 'lt')) - { - require_once JPATH_SITE . '/components/com_newsfeeds/models/category.php'; - require_once JPATH_SITE . '/components/com_newsfeeds/helpers/route.php'; - } } } \ No newline at end of file diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php index 52aaada..a676ff7 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php +++ b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php @@ -130,15 +130,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) $node->id = $parent->id; $node->uid = $parent->uid . 'c' . $cat->id; $node->name = $cat->title; - if (version_compare(JVERSION, '4', 'lt')) - { - $node->link = WeblinksHelperRoute::getCategoryRoute($cat); - } - else - { - - $node->link = RouteHelper::getCategoryRoute($cat); - } + $node->link = RouteHelper::getCategoryRoute($cat); $node->priority = $params['cat_priority']; $node->changefreq = $params['cat_changefreq']; @@ -159,14 +151,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) if ($params['include_links']) { //view=category&catid=... - if (version_compare(JVERSION, '4', 'lt')) - { - $linksModel = new WeblinksModelCategory(); - } - else - { - $linksModel = new CategoryModel(); - } + $linksModel = new CategoryModel(); $linksModel->getState(); // To force the populate state $linksModel->setState('list.limit', ArrayHelper::getValue($params, 'max_links', null)); $linksModel->setState('list.start', 0); @@ -186,14 +171,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) $node->name = $link->title; // Find the Itemid - if (version_compare(JVERSION, '4', 'lt')) - { - $Itemid = intval(preg_replace('/.*Itemid=([0-9]+).*/', '$1', WeblinksHelperRoute::getWeblinkRoute($link->id, $category->id))); - } - else - { - $Itemid = intval(preg_replace('/.*Itemid=([0-9]+).*/', '$1', RouteHelper::getWeblinkRoute($link->id, $category->id))); - } + $Itemid = intval(preg_replace('/.*Itemid=([0-9]+).*/', '$1', RouteHelper::getWeblinkRoute($link->id, $category->id))); if ($item_params->get('count_clicks', $params['count_clicks']) == 1) { @@ -228,10 +206,5 @@ static public function initialize(&$params) } self::$_initialized = true; - if (version_compare(JVERSION, '4', 'lt')) - { - require_once JPATH_SITE . '/components/schuweb_sitemap_weblinks/models/category.php'; - require_once JPATH_SITE . '/components/schuweb_sitemap_weblinks/helpers/route.php'; - } } } \ No newline at end of file From b37f2fee18c9388de2e47ee7093f7a9e9a1deffc Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 18 Feb 2022 01:29:43 +0100 Subject: [PATCH 10/49] fix deprecated joomla api --- .../com_schuweb_sitemap/controller.php | 5 +++-- .../controllers/sitemap.php | 2 +- components/com_schuweb_sitemap/controller.php | 7 ++++--- .../controllers/ajax.json.php | 2 +- components/com_schuweb_sitemap/displayer.php | 4 ++-- .../com_schuweb_sitemap/models/sitemap.php | 11 +++++----- .../views/html/tmpl/default_class.php | 2 +- .../views/html/view.html.php | 4 ++-- .../views/xml/tmpl/default_class.php | 2 +- .../views/xml/tmpl/default_xsl.php | 2 +- .../views/xml/view.html.php | 4 ++-- .../com_content/com_content.php | 9 +++++---- .../com_sobipro/com_sobipro.php | 20 +++++++++---------- 13 files changed, 39 insertions(+), 35 deletions(-) diff --git a/administrator/components/com_schuweb_sitemap/controller.php b/administrator/components/com_schuweb_sitemap/controller.php index 7fa1516..19a84a6 100644 --- a/administrator/components/com_schuweb_sitemap/controller.php +++ b/administrator/components/com_schuweb_sitemap/controller.php @@ -31,10 +31,11 @@ public function display($cachable = false, $urlparams = false) { require_once JPATH_COMPONENT . '/helpers/schuweb_sitemap.php'; + $app = JFactory::getApplication(); // Get the document object. - $document = JFactory::getDocument(); + $document = $app->getDocument(); - $jinput = JFactory::$application->input; + $jinput = $app->input; // Set the default view name and format from the Request. $vName = $jinput->getWord('view', 'sitemaps'); diff --git a/administrator/components/com_schuweb_sitemap/controllers/sitemap.php b/administrator/components/com_schuweb_sitemap/controllers/sitemap.php index 5671aef..42dc0bb 100644 --- a/administrator/components/com_schuweb_sitemap/controllers/sitemap.php +++ b/administrator/components/com_schuweb_sitemap/controllers/sitemap.php @@ -32,6 +32,6 @@ protected function _allowEdit($data = array(), $key = 'id') $recordId = (int) isset($data[$key]) ? $data[$key] : 0; // Assets are being tracked, so no need to look into the category. - return JFactory::getUser()->authorise('core.edit', 'com_schuweb_sitemap.sitemap.'.$recordId); + return JFactory::getApplication()->getIdentity()->authorise('core.edit', 'com_schuweb_sitemap.sitemap.'.$recordId); } } \ No newline at end of file diff --git a/components/com_schuweb_sitemap/controller.php b/components/com_schuweb_sitemap/controller.php index f1df5f1..d2e1128 100644 --- a/components/com_schuweb_sitemap/controller.php +++ b/components/com_schuweb_sitemap/controller.php @@ -34,20 +34,21 @@ public function display($cachable = false, $urlparams = false) { $cachable = true; - $input = JFactory::getApplication()->input; + $app = JFactory::getApplication(); + $input = $app->input; $id = $input->get('id', null, 'INT'); $viewName = $input->get('view'); $viewLayout = $input->get('layout', 'default'); - $user = JFactory::getUser(); + $user = $app->getIdentity(); if ($user->get('id') || !in_array($viewName, array('html', 'xml')) || $viewLayout == 'xsl') { $cachable = false; } if ($viewName) { - $document = JFactory::getDocument(); + $document = $app->getDocument(); $viewType = $document->getType(); $view = $this->getView($viewName, $viewType, '', array('base_path' => $this->basePath, 'layout' => $viewLayout)); diff --git a/components/com_schuweb_sitemap/controllers/ajax.json.php b/components/com_schuweb_sitemap/controllers/ajax.json.php index b9cdfb0..7fc2699 100755 --- a/components/com_schuweb_sitemap/controllers/ajax.json.php +++ b/components/com_schuweb_sitemap/controllers/ajax.json.php @@ -27,7 +27,7 @@ public function editElement() jimport('joomla.utilities.date'); jimport('joomla.user.helper'); - $user = JFactory::getUser(); + $user = JFactory::getApplication()->getIdentity(); $groups = array_keys(JUserHelper::getUserGroups($user->get('id'))); $result = new JRegistry('_default'); $jinput = JFactory::$application->input; diff --git a/components/com_schuweb_sitemap/displayer.php b/components/com_schuweb_sitemap/displayer.php index 0581410..85969ad 100644 --- a/components/com_schuweb_sitemap/displayer.php +++ b/components/com_schuweb_sitemap/displayer.php @@ -44,7 +44,7 @@ function __construct($config,$sitemap) { jimport('joomla.utilities.date'); jimport('joomla.user.helper'); - $user = JFactory::getUser(); + $user = JFactory::getApplication()->getIdentity(); $groups = array_keys(JUserHelper::getUserGroups($user->get('id'))); $date = new JDate(); @@ -113,7 +113,7 @@ public function getMenuTitle($menutype, $module = 'mod_menu') // Filter by language if ($app->getLanguageFilter()) { - $query->where($db->quoteName('language') . ' IN (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')'); + $query->where($db->quoteName('language') . ' IN (' . $db->quote($app->getLanguage()->getTag()) . ',' . $db->quote('*') . ')'); } $query->setLimit('1'); diff --git a/components/com_schuweb_sitemap/models/sitemap.php b/components/com_schuweb_sitemap/models/sitemap.php index 3cedfba..62a27d4 100644 --- a/components/com_schuweb_sitemap/models/sitemap.php +++ b/components/com_schuweb_sitemap/models/sitemap.php @@ -79,8 +79,9 @@ protected function populateState() public function &getItem($pk = null) { // Initialize variables. - $db = $this->getDbo(); - $pk = (!empty($pk)) ? $pk : (int)$this->getState('sitemap.id'); + $db = $this->getDbo(); + $app = JFactory::getApplication(); + $pk = (!empty($pk)) ? $pk : (int)$this->getState('sitemap.id'); if ($this->_item === null) { $this->_item = array(); @@ -103,7 +104,7 @@ public function &getItem($pk = null) // Filter by access level. if ($access = $this->getState('filter.access')) { - $user = JFactory::getUser(); + $user = JFactory::getApplication()->getIdentity(); $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } @@ -153,7 +154,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 = $app->getIdentity(); $groups = $user->authorisedLevels(); $data->params->set('access-view', in_array($data->access, $groups)); @@ -162,7 +163,7 @@ public function &getItem($pk = null) $this->_item[$pk] = $data; } catch (Exception $e) { - JFactory::getApplication()->enqueueMessage(JText::_($e->getMessage()), 'error'); + $app->enqueueMessage(JText::_($e->getMessage()), 'error'); $this->_item[$pk] = false; } diff --git a/components/com_schuweb_sitemap/views/html/tmpl/default_class.php b/components/com_schuweb_sitemap/views/html/tmpl/default_class.php index 0b46601..dcad95b 100644 --- a/components/com_schuweb_sitemap/views/html/tmpl/default_class.php +++ b/components/com_schuweb_sitemap/views/html/tmpl/default_class.php @@ -28,7 +28,7 @@ function __construct ($config, $sitemap) { $this->_last_child=array(); $this->live_site = substr_replace(JURI::root(), "", -1, 1); - $user = JFactory::getUser(); + $user = JFactory::getApplication()->getIdentity(); } function setJView($view) diff --git a/components/com_schuweb_sitemap/views/html/view.html.php b/components/com_schuweb_sitemap/views/html/view.html.php index b0e5aaf..250499c 100644 --- a/components/com_schuweb_sitemap/views/html/view.html.php +++ b/components/com_schuweb_sitemap/views/html/view.html.php @@ -28,14 +28,14 @@ function display($tpl = null) // Initialise variables. $this->app = JFactory::getApplication(); $jinput = $this->app->input; - $this->user = JFactory::getUser(); + $this->user = $this->app->getIdentity(); // Get model data. $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->items = $this->get('Items'); - $this->canEdit = JFactory::getUser()->authorise('core.admin', 'com_schuweb_sitemap'); + $this->canEdit = $this->user->authorise('core.admin', 'com_schuweb_sitemap'); // Check for errors. if (count($errors = $this->get('Errors'))) { diff --git a/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php b/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php index ffc22e1..29877e7 100644 --- a/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php +++ b/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php @@ -46,7 +46,7 @@ function __construct($config, $sitemap) parent::__construct($config, $sitemap); $this->uids = array(); - $this->defaultLanguage = strtolower(JFactory::getLanguage()->getTag()); + $this->defaultLanguage = strtolower(JFactory::getApplication()->getLanguage()->getTag()); if (preg_match('/^([a-z]+)-.*/', $this->defaultLanguage, $matches) && !in_array($this->defaultLanguage, array(' zh-cn', ' zh-tw'))) { $this->defaultLanguage = $matches[1]; } diff --git a/components/com_schuweb_sitemap/views/xml/tmpl/default_xsl.php b/components/com_schuweb_sitemap/views/xml/tmpl/default_xsl.php index 33906db..8ede533 100644 --- a/components/com_schuweb_sitemap/views/xml/tmpl/default_xsl.php +++ b/components/com_schuweb_sitemap/views/xml/tmpl/default_xsl.php @@ -157,7 +157,7 @@ padding:2px; float: left; } -direction == 'rtl') { ?> +getDocument(); if ($doc->direction == 'rtl') { ?> body { font-family: Tahoma; } diff --git a/components/com_schuweb_sitemap/views/xml/view.html.php b/components/com_schuweb_sitemap/views/xml/view.html.php index 2012146..fa1028e 100644 --- a/components/com_schuweb_sitemap/views/xml/view.html.php +++ b/components/com_schuweb_sitemap/views/xml/view.html.php @@ -30,7 +30,7 @@ function display($tpl = null) { // Initialise variables. $app = JFactory::getApplication(); - $this->user = JFactory::getUser(); + $this->user = $app->getIdentity(); $jinput = $app->input; $isNewsSitemap = $jinput->getInt('news',0); $this->isImages = $jinput->getInt('images',0); @@ -49,7 +49,7 @@ function display($tpl = null) $this->item = $this->get('Item'); $this->state = $this->get('State'); - $this->canEdit = JFactory::getUser()->authorise('core.admin', 'com_schuweb_sitemap'); + $this->canEdit = $this->user->authorise('core.admin', 'com_schuweb_sitemap'); // For now, news sitemaps are not editable $this->canEdit = $this->canEdit && !$isNewsSitemap; diff --git a/plugins/schuweb_sitemap/com_content/com_content.php b/plugins/schuweb_sitemap/com_content/com_content.php index d3d6517..df61002 100644 --- a/plugins/schuweb_sitemap/com_content/com_content.php +++ b/plugins/schuweb_sitemap/com_content/com_content.php @@ -122,7 +122,7 @@ static function getTree($xmap, $parent, &$params) { $db = JFactory::getDBO(); $app = JFactory::getApplication(); - $user = JFactory::getUser(); + $user = $app->getIdentity(); $result = null; $link_query = parse_url($parent->link); @@ -182,7 +182,7 @@ static function getTree($xmap, $parent, &$params) if ($params['add_pagebreaks'] && !defined('_SCHUWEBSITEMAP_COM_CONTENT_LOADED')) { define('_SCHUWEBSITEMAP_COM_CONTENT_LOADED', 1); // Load it just once - $lang = JFactory::getLanguage(); + $lang = $app->getLanguage(); $lang->load('plg_content_pagebreak'); } @@ -291,13 +291,14 @@ static function getTree($xmap, $parent, &$params) static function expandCategory($sitemap, $parent, $catid, &$params, $itemid) { $db = JFactory::getDBO(); + $app = JFactory::getApplication(); $query = $db->getQuery(true); $where = array('a.parent_id = ' . $catid . ' AND a.published = 1 AND a.extension=\'com_content\''); if ($params['language_filter']) { - $where[] = 'a.language in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')'; + $where[] = 'a.language in (' . $db->quote($app->getLanguage()->getTag()) . ',' . $db->quote('*') . ')'; } if (!$params['show_unauth']) @@ -443,7 +444,7 @@ static function includeCategoryContent($sitemap, $parent, $catid, &$params, $Ite if ($params['language_filter']) { - $query->where($db->qn('a.language') . ' in (' . $db->quote(JFactory::getLanguage()->getTag()) . ',' . $db->quote('*') . ')'); + $query->where($db->qn('a.language') . ' in (' . $db->quote(JFactory::getApplication()->getLanguage()->getTag()) . ',' . $db->quote('*') . ')'); } if (!$params['show_unauth']) diff --git a/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php b/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php index d237bfd..6b4f1d3 100644 --- a/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php +++ b/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php @@ -129,11 +129,11 @@ static function getTree($xmap, $parent, &$params) } /** SobiPro support */ - static function getCategoryTree($xmap, $parent, $sid, &$params) + static function getCategoryTree($sitemap, $parent, $sid, &$params) { $database = JFactory::getDBO(); - $lang = JFactory::getLanguage(); + $lang = JFactory::getApplication()->getLanguage(); $query = "SELECT a.id,a.nid, a.name, b.pid as pid, c.sValue as name " @@ -154,7 +154,7 @@ static function getCategoryTree($xmap, $parent, $sid, &$params) $rows = $database->loadObjectList(); $modified = time(); - $xmap->changeLevel(1); + $sitemap->changeLevel(1); foreach ($rows as $row) { $node = new stdclass; $node->id = $parent->id; @@ -166,15 +166,15 @@ static function getCategoryTree($xmap, $parent, $sid, &$params) $node->priority = $params['cat_priority']; $node->changefreq = $params['cat_changefreq']; - $attribs = json_decode($xmap->sitemap->attribs); + $attribs = json_decode($sitemap->sitemap->attribs); $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; $node->xmlInsertPriority = $attribs->xmlInsertPriority; $node->expandible = true; $node->secure = $parent->secure; $node->lastmod = $parent->lastmod; - if ($xmap->printNode($node) !== FALSE) { - self::getCategoryTree($xmap, $parent, $row->id, $params); + if ($sitemap->printNode($node) !== FALSE) { + self::getCategoryTree($sitemap, $parent, $row->id, $params); } } @@ -207,7 +207,7 @@ static function getCategoryTree($xmap, $parent, $sid, &$params) $node->priority = $params['entry_priority']; $node->changefreq = $params['entry_changefreq']; - $attribs = json_decode($xmap->sitemap->attribs); + $attribs = json_decode($sitemap->sitemap->attribs); $node->xmlInsertChangeFreq = $attribs->xmlInsertChangeFreq; $node->xmlInsertPriority = $attribs->xmlInsertPriority; @@ -215,11 +215,11 @@ static function getCategoryTree($xmap, $parent, $sid, &$params) $node->secure = $parent->secure; $node->link = SPJoomlaMainFrame::url(array('sid' => $row->id, 'pid' => $row->catid, 'title' => $row->name), false, false); $node->lastmod = $parent->lastmod; - $xmap->printNode($node); + $sitemap->printNode($node); } } - $xmap->changeLevel(-1); + $sitemap->changeLevel(-1); } static protected function getSectionConfig($sectionId) @@ -244,7 +244,7 @@ static protected function loadSobi() define('SOBI_CMS', 'joomla' . $ver); define('SOBIPRO', true); define('SOBI_TASK', 'task'); - define('SOBI_DEFLANG', JFactory::getLanguage()->getDefault()); + define('SOBI_DEFLANG', JFactory::getApplication()->getDefault()); define('SOBI_ACL', 'front'); define('SOBI_ROOT', JPATH_ROOT); define('SOBI_MEDIA', implode('/', array(JPATH_ROOT, 'media', 'sobipro'))); From e3456a42dddb3e281af926f02c315c080c491f93 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 18 Feb 2022 01:30:07 +0100 Subject: [PATCH 11/49] delete joomla 3 code --- .../views/html/tmpl/default_class.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/components/com_schuweb_sitemap/views/html/tmpl/default_class.php b/components/com_schuweb_sitemap/views/html/tmpl/default_class.php index dcad95b..bcb6316 100644 --- a/components/com_schuweb_sitemap/views/html/tmpl/default_class.php +++ b/components/com_schuweb_sitemap/views/html/tmpl/default_class.php @@ -111,23 +111,7 @@ function printNode( &$node ) $this->_closeItem = "\n"; $this->_childs[$this->level]++; echo $out; - if (version_compare(JVERSION, '4', 'lt')) - { - 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; From 7b62e21f7836fe2f0b1054ff86239475148f5d62 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 18 Feb 2022 22:01:35 +0100 Subject: [PATCH 12/49] fix smelli code --- .../helpers/html/schuweb_sitemap.php | 1 + .../com_schuweb_sitemap/tables/sitemap.php | 2 +- .../views/sitemap/view.html.php | 2 +- .../views/sitemaps/tmpl/default.php | 5 +-- .../com_schuweb_sitemap/assets/xsl/gss.xsl | 2 +- .../assets/xsl/gssadmin.xsl | 2 +- .../controllers/ajax.json.php | 1 + components/com_schuweb_sitemap/displayer.php | 32 +++++++++++++------ .../helpers/schuweb_sitemap.php | 5 +-- components/com_schuweb_sitemap/router.php | 4 +-- .../views/html/tmpl/default_class.php | 3 +- .../views/xml/tmpl/default_class.php | 10 ++---- .../views/xml/view.html.php | 6 ++-- .../com_content/com_content.php | 6 ++-- 14 files changed, 48 insertions(+), 33 deletions(-) diff --git a/administrator/components/com_schuweb_sitemap/helpers/html/schuweb_sitemap.php b/administrator/components/com_schuweb_sitemap/helpers/html/schuweb_sitemap.php index 2f959dd..a188557 100644 --- a/administrator/components/com_schuweb_sitemap/helpers/html/schuweb_sitemap.php +++ b/administrator/components/com_schuweb_sitemap/helpers/html/schuweb_sitemap.php @@ -29,6 +29,7 @@ abstract class JHtmlSchuWeb_Sitemap */ public static function priorities($name, $value = '0.5', $j) { + $options = array(); // Array of options for ($i=0.1; $i<=1;$i+=0.1) { $options[] = JHTML::_('select.option',$i,$i);; diff --git a/administrator/components/com_schuweb_sitemap/tables/sitemap.php b/administrator/components/com_schuweb_sitemap/tables/sitemap.php index f29f479..9a06218 100644 --- a/administrator/components/com_schuweb_sitemap/tables/sitemap.php +++ b/administrator/components/com_schuweb_sitemap/tables/sitemap.php @@ -69,7 +69,7 @@ class SchuWeb_SitemapTableSitemap extends JTable /** * @var int */ - var $access = 0; + var int $access = 0; /** * @var int */ diff --git a/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php b/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php index f4d42bf..3413077 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php @@ -22,7 +22,7 @@ class SchuWeb_SitemapViewSitemap extends JViewLegacy protected $item; protected $list; - protected $form; + protected mixed $form; protected $state; /** diff --git a/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php b/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php index 9ceebfc..6580d95 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php @@ -25,8 +25,9 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = $listOrder == 'a.ordering'; +$saveOrderCheck = $saveOrder && !empty($this->items); -if ($saveOrder && !empty($this->items)) +if ($saveOrderCheck) { //TODO!!!!!!!!!!!!!!!!!!!! $saveOrderingUrl = 'index.php?option=com_schuweb_sitemap&task=sitemaps.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; @@ -79,7 +80,7 @@ class="visually-hidden"> - data-url="" data-direction="" data-nested="true"> + data-url="" data-direction="" data-nested="true"> items as $i => $item) : $ordering = ($listOrder == 'a.ordering'); $canCreate = $user->authorise('core.create', 'com_schuweb_sitemap.sitemap.' . $item->id); diff --git a/components/com_schuweb_sitemap/assets/xsl/gss.xsl b/components/com_schuweb_sitemap/assets/xsl/gss.xsl index 3a1264a..55b6c9b 100644 --- a/components/com_schuweb_sitemap/assets/xsl/gss.xsl +++ b/components/com_schuweb_sitemap/assets/xsl/gss.xsl @@ -1,5 +1,5 @@ - + diff --git a/components/com_schuweb_sitemap/assets/xsl/gssadmin.xsl b/components/com_schuweb_sitemap/assets/xsl/gssadmin.xsl index f5abda7..4ae46d6 100644 --- a/components/com_schuweb_sitemap/assets/xsl/gssadmin.xsl +++ b/components/com_schuweb_sitemap/assets/xsl/gssadmin.xsl @@ -1,5 +1,5 @@ - + diff --git a/components/com_schuweb_sitemap/controllers/ajax.json.php b/components/com_schuweb_sitemap/controllers/ajax.json.php index 7fc2699..17f2cd0 100755 --- a/components/com_schuweb_sitemap/controllers/ajax.json.php +++ b/components/com_schuweb_sitemap/controllers/ajax.json.php @@ -38,6 +38,7 @@ public function editElement() $result->setValue('message', 'You are not authorized to perform this action!'); } else { $model = $this->getModel('sitemap'); + $state = false; if ($model->getItem()) { $action = $jinput->getCmd('action', ''); $uid = $jinput->getCmd('uid', ''); diff --git a/components/com_schuweb_sitemap/displayer.php b/components/com_schuweb_sitemap/displayer.php index 85969ad..7b04884 100644 --- a/components/com_schuweb_sitemap/displayer.php +++ b/components/com_schuweb_sitemap/displayer.php @@ -40,24 +40,36 @@ class SchuWeb_SitemapDisplayer { public $canEdit; + /** + * @var bool Indicates if this is a google news sitemap or not + * + * @since + */ + public bool $isNews = false; + + /** + * + * @var bool Indicates if this is a google image sitemap or not + * + * @since + */ + var bool $isImages = false; + function __construct($config,$sitemap) { jimport('joomla.utilities.date'); jimport('joomla.user.helper'); $user = JFactory::getApplication()->getIdentity(); - $groups = array_keys(JUserHelper::getUserGroups($user->get('id'))); $date = new JDate(); $this->userLevels = (array)$user->getAuthorisedViewLevels(); - // Deprecated: should use userLevels from now on - // $this->gid = $user->gid; - $this->now = $date->toUnix(); - $this->config = $config; - $this->sitemap = $sitemap; - $this->isNews = false; - $this->isImages = false; - $this->count = 0; - $this->canEdit = false; + $this->now = $date->toUnix(); + $this->config = $config; + $this->sitemap = $sitemap; + $this->isNews = false; + $this->isImages = false; + $this->count = 0; + $this->canEdit = false; } public function printNode( &$node ) { diff --git a/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php b/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php index df96eb5..b541837 100644 --- a/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php +++ b/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php @@ -21,7 +21,7 @@ class SchuWeb_SitemapHelper { - public static function &getMenuItems($selections) + public static function getMenuItems($selections) { $db = JFactory::getDbo(); $app = JFactory::getApplication(); @@ -176,9 +176,10 @@ static function getImages($text,$max) { if (!isset($urlBase)) { $urlBase = JURI::base(); - $urlBaseLen = strlen($urlBase); } + $urlBaseLen = strlen($urlBase); + $images = null; $matches = $matches1 = $matches2 = array(); // Look tags diff --git a/components/com_schuweb_sitemap/router.php b/components/com_schuweb_sitemap/router.php index f3158da..35018d8 100644 --- a/components/com_schuweb_sitemap/router.php +++ b/components/com_schuweb_sitemap/router.php @@ -46,8 +46,8 @@ protected static function _findItemId($needles) { self::$lookup = array(); - $component = &JComponentHelper::getComponent('com_schuweb_sitemap'); - $menus = &JMenu::getInstance('site', array()); + $component = JComponentHelper::getComponent('com_schuweb_sitemap'); + $menus = JMenu::getInstance('site', array()); $items = $menus->getItems('component_id', $component->id); foreach ($items as &$item) diff --git a/components/com_schuweb_sitemap/views/html/tmpl/default_class.php b/components/com_schuweb_sitemap/views/html/tmpl/default_class.php index bcb6316..60ce4b2 100644 --- a/components/com_schuweb_sitemap/views/html/tmpl/default_class.php +++ b/components/com_schuweb_sitemap/views/html/tmpl/default_class.php @@ -27,8 +27,6 @@ function __construct ($config, $sitemap) { $this->_parent_children=array(); $this->_last_child=array(); $this->live_site = substr_replace(JURI::root(), "", -1, 1); - - $user = JFactory::getApplication()->getIdentity(); } function setJView($view) @@ -55,6 +53,7 @@ function printNode( &$node ) { $out = ''; + $link = ''; if ($this->isExcluded($node->id,$node->uid) && !$this->canEdit) { return FALSE; diff --git a/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php b/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php index 29877e7..ecf85b1 100644 --- a/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php +++ b/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php @@ -31,15 +31,11 @@ class SchuWeb_SitemapXmlDisplayer extends SchuWeb_SitemapDisplayer /** * - * @var int Indicates if this is a google news sitemap or not - */ - var $isNews = 0; - - /** + * @var bool Indicates if this is a google image sitemap or not * - * @var int Indicates if this is a google news sitemap or not + * @since */ - var $isImages = 0; + var bool $isImages = false; function __construct($config, $sitemap) { diff --git a/components/com_schuweb_sitemap/views/xml/view.html.php b/components/com_schuweb_sitemap/views/xml/view.html.php index fa1028e..e3607d9 100644 --- a/components/com_schuweb_sitemap/views/xml/view.html.php +++ b/components/com_schuweb_sitemap/views/xml/view.html.php @@ -26,14 +26,16 @@ class SchuWeb_SitemapViewXml extends JViewLegacy protected $_obLevel; + protected bool $isImages; + function display($tpl = null) { // Initialise variables. $app = JFactory::getApplication(); $this->user = $app->getIdentity(); $jinput = $app->input; - $isNewsSitemap = $jinput->getInt('news',0); - $this->isImages = $jinput->getInt('images',0); + $isNewsSitemap = $jinput->getInt('news',0) != 0; + $this->isImages = $jinput->getInt('images',0) != 0; $model = $this->getModel('Sitemap'); $this->setModel($model); diff --git a/plugins/schuweb_sitemap/com_content/com_content.php b/plugins/schuweb_sitemap/com_content/com_content.php index df61002..b90aa56 100644 --- a/plugins/schuweb_sitemap/com_content/com_content.php +++ b/plugins/schuweb_sitemap/com_content/com_content.php @@ -86,11 +86,13 @@ static function prepareMenuItem($node, &$params) $db->setQuery($query); - if (($row = $db->loadObject()) != null) + $row = $db->loadObject(); + + if ( $row != null) { $node->modified = $row->modified; - $text = @$item->introtext . @$item->fulltext; + $text = $row->introtext . $row->fulltext; if ($params['add_images']) { $node->images = SchuWeb_SitemapHelper::getImages($text, ArrayHelper::getValue($params, 'max_images', 1000)); From f466fda8f73c39ed4b4c54c06aebdcf8a9d02e69 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 18 Feb 2022 22:24:33 +0100 Subject: [PATCH 13/49] adjust copyright info and author --- README.md | 6 +----- administrator/components/com_schuweb_sitemap/controller.php | 4 ++-- .../components/com_schuweb_sitemap/controllers/sitemap.php | 4 ++-- .../components/com_schuweb_sitemap/controllers/sitemaps.php | 4 ++-- .../com_schuweb_sitemap/helpers/html/schuweb_sitemap.php | 4 ++-- .../com_schuweb_sitemap/helpers/schuweb_sitemap.php | 4 ++-- .../language/cs-CZ/cs-CZ.com_schuweb_sitemap.ini | 4 ++-- .../language/cs-CZ/cs-CZ.com_schuweb_sitemap.sys.ini | 4 ++-- .../language/en-GB/en-GB.com_schuweb_sitemap.ini | 4 ++-- .../language/en-GB/en-GB.com_schuweb_sitemap.sys.ini | 2 +- .../language/es-ES/es-ES.com_schuweb_sitemap.ini | 4 ++-- .../language/es-ES/es-ES.com_schuweb_sitemap.sys.ini | 4 ++-- .../language/nl-NL/nl-NL.com_schuweb_sitemap.ini | 4 ++-- .../language/nl-NL/nl-NL.com_schuweb_sitemap.sys.ini | 4 ++-- .../language/ru-RU/ru-RU.com_schuweb_sitemap.ini | 4 ++-- .../language/ru-RU/ru-RU.com_schuweb_sitemap.sys.ini | 4 ++-- .../com_schuweb_sitemap/models/fields/sitemap.php | 2 +- .../components/com_schuweb_sitemap/models/sitemap.php | 2 +- .../components/com_schuweb_sitemap/models/sitemaps.php | 4 ++-- .../components/com_schuweb_sitemap/schuweb_sitemap.php | 4 ++-- .../components/com_schuweb_sitemap/schuweb_sitemap.xml | 2 +- .../components/com_schuweb_sitemap/tables/sitemap.php | 2 +- .../com_schuweb_sitemap/views/sitemap/tmpl/edit.php | 2 +- .../com_schuweb_sitemap/views/sitemap/tmpl/edit_menus.php | 2 +- .../com_schuweb_sitemap/views/sitemap/view.html.php | 2 +- .../com_schuweb_sitemap/views/sitemaps/tmpl/default.php | 4 ++-- .../com_schuweb_sitemap/views/sitemaps/tmpl/modal.php | 4 ++-- .../com_schuweb_sitemap/views/sitemaps/view.html.php | 4 ++-- components/com_schuweb_sitemap/controller.php | 4 ++-- components/com_schuweb_sitemap/controllers/ajax.json.php | 4 ++-- components/com_schuweb_sitemap/displayer.php | 4 ++-- components/com_schuweb_sitemap/helpers/schuweb_sitemap.php | 5 +++-- components/com_schuweb_sitemap/models/sitemap.php | 4 ++-- components/com_schuweb_sitemap/router.php | 4 ++-- components/com_schuweb_sitemap/schuweb_sitemap.php | 4 ++-- components/com_schuweb_sitemap/views/html/tmpl/default.php | 4 ++-- .../com_schuweb_sitemap/views/html/tmpl/default_class.php | 4 ++-- .../com_schuweb_sitemap/views/html/tmpl/default_items.php | 4 ++-- components/com_schuweb_sitemap/views/html/view.html.php | 4 ++-- components/com_schuweb_sitemap/views/xml/tmpl/default.php | 4 ++-- .../com_schuweb_sitemap/views/xml/tmpl/default_class.php | 4 ++-- .../com_schuweb_sitemap/views/xml/tmpl/default_items.php | 4 ++-- .../com_schuweb_sitemap/views/xml/tmpl/default_xsl.php | 4 ++-- components/com_schuweb_sitemap/views/xml/view.html.php | 4 ++-- install.script.php | 2 +- plugins/schuweb_sitemap/com_content/com_content.xml | 2 +- plugins/schuweb_sitemap/com_sobipro/com_sobipro.php | 4 ++-- plugins/schuweb_sitemap/com_sobipro/com_sobipro.xml | 2 +- 48 files changed, 85 insertions(+), 88 deletions(-) diff --git a/README.md b/README.md index 6edaf40..f7938af 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ # SchuWeb Sitemap -This project continuous the great, simple and lightweight sitemap extension for Joomla! Xmap. +SchuWeb Sitemap is the great, simple and lightweight sitemap extension for Joomla!. [Project website](https://extensions.schultschik.com/products/schuweb-sitemap) -Many thanks to Vargas, the original creator of Xmap, who discontinued the development of the extension. - ## Demo A small demo you can see at: [demo.schultschik.com](http://demo.schultschik.com/schuweb-sitemap) @@ -19,8 +17,6 @@ Big thank you to all who helped with this extension. Especially to those listed - [sshcli](https://github.com/sshcli) - [Jelle Kok](https://github.com/810) -Thank you to [Guillermo Vargas](https://github.com/guilleva) too, who originally developed the XMap component, which development is discontinued. - ## Donation Want to support the project? diff --git a/administrator/components/com_schuweb_sitemap/controller.php b/administrator/components/com_schuweb_sitemap/controller.php index 19a84a6..3461063 100644 --- a/administrator/components/com_schuweb_sitemap/controller.php +++ b/administrator/components/com_schuweb_sitemap/controller.php @@ -1,9 +1,9 @@ com_schuweb_sitemap sw.build.date - Sven Schultschik | Guillermo Vargas + Sven Schultschik This component is released under the GNU/GPL License sven@schultschik.de www.schultschik.de diff --git a/administrator/components/com_schuweb_sitemap/tables/sitemap.php b/administrator/components/com_schuweb_sitemap/tables/sitemap.php index 9a06218..070cd3f 100644 --- a/administrator/components/com_schuweb_sitemap/tables/sitemap.php +++ b/administrator/components/com_schuweb_sitemap/tables/sitemap.php @@ -1,7 +1,7 @@ SchuWeb Sitemap - Content Plugin - Sven Schultschik | Guillermo Vargas + Sven Schultschik sw.build.date GNU GPL http://www.gnu.org/copyleft/gpl.html GNU/GPL diff --git a/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php b/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php index 6b4f1d3..0c3b085 100644 --- a/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php +++ b/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php @@ -1,7 +1,7 @@ SchuWeb Sitemap - SobiPro Plugin - Sven Schultschik | Guillermo Vargas + Sven Schultschik sw.build.date GNU GPL http://www.gnu.org/copyleft/gpl.html GNU/GPL From 8ec6af2bd4c06dfc2aafe72915cc476662752b43 Mon Sep 17 00:00:00 2001 From: Sven Schultschik Date: Fri, 18 Feb 2022 22:25:20 +0100 Subject: [PATCH 14/49] delete unused code --- .../components/com_schuweb_sitemap/tables/sitemap.php | 1 - .../com_schuweb_sitemap/views/sitemaps/view.html.php | 1 - components/com_schuweb_sitemap/controller.php | 1 - components/com_schuweb_sitemap/controllers/ajax.json.php | 1 - components/com_schuweb_sitemap/displayer.php | 3 +-- components/com_schuweb_sitemap/helpers/schuweb_sitemap.php | 6 ++---- components/com_schuweb_sitemap/router.php | 3 --- components/com_schuweb_sitemap/views/html/view.html.php | 2 -- components/com_schuweb_sitemap/views/xml/view.html.php | 1 - plugins/schuweb_sitemap/com_content/com_content.php | 1 - plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php | 4 ---- plugins/schuweb_sitemap/kunena/kunena.php | 4 ++-- .../schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php | 6 ------ .../schuweb_sitemap_zoo/schuweb_sitemap_zoo.php | 1 - 14 files changed, 5 insertions(+), 30 deletions(-) diff --git a/administrator/components/com_schuweb_sitemap/tables/sitemap.php b/administrator/components/com_schuweb_sitemap/tables/sitemap.php index 070cd3f..224b0fb 100644 --- a/administrator/components/com_schuweb_sitemap/tables/sitemap.php +++ b/administrator/components/com_schuweb_sitemap/tables/sitemap.php @@ -215,7 +215,6 @@ public function publish($pks = null, $state = 1, $userId = 0) // Sanitize input. ArrayHelper::toInteger($pks); - $userId = (int)$userId; $state = (int)$state; // If there are no primary keys set check to see if the instance key is set. diff --git a/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php b/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php index 3b281cf..a380a50 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php @@ -60,7 +60,6 @@ public function display($tpl = null) protected function addToolbar() { $state = $this->get('State'); - $doc = JFactory::getDocument(); JToolBarHelper::addNew('sitemap.add'); JToolBarHelper::custom('sitemap.edit', 'edit.png', 'edit_f2.png', 'JTOOLBAR_EDIT', true); diff --git a/components/com_schuweb_sitemap/controller.php b/components/com_schuweb_sitemap/controller.php index d67808c..bc5bfa7 100644 --- a/components/com_schuweb_sitemap/controller.php +++ b/components/com_schuweb_sitemap/controller.php @@ -37,7 +37,6 @@ public function display($cachable = false, $urlparams = false) $app = JFactory::getApplication(); $input = $app->input; - $id = $input->get('id', null, 'INT'); $viewName = $input->get('view'); $viewLayout = $input->get('layout', 'default'); diff --git a/components/com_schuweb_sitemap/controllers/ajax.json.php b/components/com_schuweb_sitemap/controllers/ajax.json.php index 47a0088..de6e583 100755 --- a/components/com_schuweb_sitemap/controllers/ajax.json.php +++ b/components/com_schuweb_sitemap/controllers/ajax.json.php @@ -28,7 +28,6 @@ public function editElement() jimport('joomla.utilities.date'); jimport('joomla.user.helper'); $user = JFactory::getApplication()->getIdentity(); - $groups = array_keys(JUserHelper::getUserGroups($user->get('id'))); $result = new JRegistry('_default'); $jinput = JFactory::$application->input; $sitemapId = $jinput->getInt('id'); diff --git a/components/com_schuweb_sitemap/displayer.php b/components/com_schuweb_sitemap/displayer.php index 9527efc..6884697 100644 --- a/components/com_schuweb_sitemap/displayer.php +++ b/components/com_schuweb_sitemap/displayer.php @@ -165,9 +165,8 @@ protected function endMenu(&$node) protected function printMenuTree($menu,&$items) { $this->changeLevel(1); - $router = SiteApplication::getRouter(); - foreach ( $items as $i => $item ) { // Add each menu entry to the root tree. + foreach ($items as $item ) { // Add each menu entry to the root tree. $excludeExternal = false; $node = new stdclass; diff --git a/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php b/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php index 9ee7c0e..ed9c35b 100644 --- a/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php +++ b/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php @@ -8,8 +8,6 @@ */ // No direct access -use Joomla\CMS\Factory; - defined( '_JEXEC' ) or die( 'Restricted access' ); /** @@ -67,7 +65,7 @@ public static function getMenuItems($selections) } // Set some values to make nested HTML rendering easier. - foreach ($tmpList as $id => $item) { + foreach ($tmpList as $item) { $item->items = array(); $params = new JRegistry($item->params); @@ -182,7 +180,7 @@ static function getImages($text,$max) $urlBaseLen = strlen($urlBase); $images = null; - $matches = $matches1 = $matches2 = array(); + $matches1 = $matches2 = array(); // Look tags preg_match_all('/]*?(?:(?:[^>]*src="(?P[^"]+)")|(?:[^>]*alt="(?P[^"]+)")|(?:[^>]*title="(?P[^"]+)"))+[^>]*>/i', $text, $matches1, PREG_SET_ORDER); // Loog for <a> tags with href to images diff --git a/components/com_schuweb_sitemap/router.php b/components/com_schuweb_sitemap/router.php index 2dfd83a..6505721 100644 --- a/components/com_schuweb_sitemap/router.php +++ b/components/com_schuweb_sitemap/router.php @@ -65,8 +65,6 @@ protected static function _findItemId($needles) } } - $match = null; - foreach ($needles as $view => $id) { if (isset(self::$lookup[$view])) @@ -102,7 +100,6 @@ function SchuWeb_SitemapBuildRoute(&$query) else { $menuItem = $menu->getItem($query['Itemid']); } - $mView = (empty($menuItem->query['view'])) ? null : $menuItem->query['view']; $mId = (empty($menuItem->query['id'])) ? null : $menuItem->query['id']; if ( !empty($query['Itemid']) ) { diff --git a/components/com_schuweb_sitemap/views/html/view.html.php b/components/com_schuweb_sitemap/views/html/view.html.php index df1205a..088853d 100644 --- a/components/com_schuweb_sitemap/views/html/view.html.php +++ b/components/com_schuweb_sitemap/views/html/view.html.php @@ -27,7 +27,6 @@ function display($tpl = null) { // Initialise variables. $this->app = JFactory::getApplication(); - $jinput = $this->app->input; $this->user = $this->app->getIdentity(); // Get model data. @@ -51,7 +50,6 @@ function display($tpl = null) // Create a shortcut to the paramemters. $params = &$this->state->params; - $offset = $this->state->get('page.offset'); // If a guest user, they may be able to log in to view the full article // TODO: Does this satisfy the show not auth setting? diff --git a/components/com_schuweb_sitemap/views/xml/view.html.php b/components/com_schuweb_sitemap/views/xml/view.html.php index e3373fb..55705d7 100644 --- a/components/com_schuweb_sitemap/views/xml/view.html.php +++ b/components/com_schuweb_sitemap/views/xml/view.html.php @@ -111,7 +111,6 @@ function display($tpl = null) // Create a shortcut to the paramemters. $params = &$this->state->params; - $offset = $this->state->get('page.offset'); if (!$this->item->params->get('access-view')) { if ($this->user->get('guest')) { diff --git a/plugins/schuweb_sitemap/com_content/com_content.php b/plugins/schuweb_sitemap/com_content/com_content.php index b90aa56..909cff6 100644 --- a/plugins/schuweb_sitemap/com_content/com_content.php +++ b/plugins/schuweb_sitemap/com_content/com_content.php @@ -8,7 +8,6 @@ */ defined('_JEXEC') or die; -use \Joomla\Component\Content\Site\Helper\RouteHelper; use \Joomla\Component\Content\Site\Helper\QueryHelper; use \Joomla\Utilities\ArrayHelper; diff --git a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php index e074703..7ebed54 100644 --- a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php +++ b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php @@ -63,10 +63,6 @@ static function getTree($sitemap, $parent, &$params) parse_str(html_entity_decode($newsfeed_query['query']), $newsfeed_vars); $view = ArrayHelper::getValue($newsfeed_vars, 'view', 0); - $app = JFactory::getApplication(); - $menu = $app->getMenu(); - $menuparams = $menu->getParams($parent->id); - if ($view == 'category') { $catid = intval(ArrayHelper::getValue($newsfeed_vars, 'id', 0)); diff --git a/plugins/schuweb_sitemap/kunena/kunena.php b/plugins/schuweb_sitemap/kunena/kunena.php index c857e29..bf6e980 100644 --- a/plugins/schuweb_sitemap/kunena/kunena.php +++ b/plugins/schuweb_sitemap/kunena/kunena.php @@ -9,6 +9,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Factory; use Joomla\Utilities\ArrayHelper; use Kunena\Forum\Libraries\Factory\KunenaFactory; use Kunena\Forum\Libraries\Forum\Category\KunenaCategoryHelper; @@ -41,8 +42,7 @@ static function getTree($sitemap, $parent, &$params) self::$profile = KunenaFactory::getUser(); } - $user = \Joomla\CMS\Factory::getApplication()->getIdentity(); - $catid = 0; + $user = Factory::getApplication()->getIdentity(); $link_query = parse_url($parent->link); if (!isset($link_query['query'])) { diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php index a676ff7..6235c89 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php +++ b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php @@ -63,10 +63,6 @@ static function getTree($sitemap, $parent, &$params) parse_str(html_entity_decode($link_query['query']), $link_vars); $view = ArrayHelper::getValue($link_vars, 'view', 0); - $app = JFactory::getApplication(); - $menu = $app->getMenu(); - $menuparams = $menu->getParams($parent->id); - if ($view == 'category') { $catid = intval(ArrayHelper::getValue($link_vars, 'id', 0)); @@ -120,8 +116,6 @@ static function getTree($sitemap, $parent, &$params) static function getCategoryTree($sitemap, $parent, &$params, $category) { - $db = JFactory::getDBO(); - $children = $category->getChildren(); $sitemap->changeLevel(1); foreach ($children as $cat) diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php index 0e28aa3..b5c9064 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php +++ b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php @@ -38,7 +38,6 @@ static function getTree(&$schuweb_sitemap, &$parent, &$params) $link_query = parse_url($parent->link); parse_str(html_entity_decode($link_query['query']), $link_vars); - $view = ArrayHelper::getValue($link_vars, 'view', 0); $include_categories = ArrayHelper::getValue($params, 'include_categories', 1, ''); $include_categories = ($include_categories == 1 From 62a484be32ab63e4419995e4820493fafcb3a050 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 19 Feb 2022 00:32:22 +0100 Subject: [PATCH 15/49] code cleanup fix warnings --- .../com_schuweb_sitemap/controllers/sitemaps.php | 4 +--- .../helpers/schuweb_sitemap.php | 4 +--- .../models/fields/sitemap.php | 2 +- .../com_schuweb_sitemap/models/sitemap.php | 3 +-- .../views/sitemap/view.html.php | 5 ++--- .../views/sitemaps/view.html.php | 4 ++-- components/com_schuweb_sitemap/displayer.php | 2 +- .../views/html/tmpl/default_class.php | 13 ++++++++++++- .../views/xml/tmpl/default.php | 2 +- .../views/xml/tmpl/default_class.php | 16 ++++++++++++++-- .../com_schuweb_sitemap/views/xml/view.html.php | 4 +++- .../schuweb_sitemap/com_content/com_content.php | 2 +- .../com_newsfeeds/com_newsfeeds.php | 16 ++++++++-------- .../schuweb_sitemap/com_sobipro/com_sobipro.php | 6 +++--- .../schuweb_sitemap_weblinks.php | 16 ++++++++-------- .../schuweb_sitemap_zoo/schuweb_sitemap_zoo.php | 14 +++++++------- 16 files changed, 66 insertions(+), 47 deletions(-) diff --git a/administrator/components/com_schuweb_sitemap/controllers/sitemaps.php b/administrator/components/com_schuweb_sitemap/controllers/sitemaps.php index 8b08fde..83375de 100644 --- a/administrator/components/com_schuweb_sitemap/controllers/sitemaps.php +++ b/administrator/components/com_schuweb_sitemap/controllers/sitemaps.php @@ -78,8 +78,6 @@ function setDefault() */ public function getModel($name = 'Sitemap', $prefix = 'SchuWeb_SitemapModel', $config = array('ignore_request' => true)) { - $model = parent::getModel($name, $prefix, $config); - - return $model; + return parent::getModel($name, $prefix, $config); } } \ No newline at end of file diff --git a/administrator/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php b/administrator/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php index d31b7df..0892304 100644 --- a/administrator/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php +++ b/administrator/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php @@ -37,9 +37,7 @@ public static function getExtensionsList() ->where('e.type=\'component\' and e.enabled=1'); $db->setQuery($query); - $extensions = $db->loadObjectList(); - - return $extensions; + return $db->loadObjectList(); } } diff --git a/administrator/components/com_schuweb_sitemap/models/fields/sitemap.php b/administrator/components/com_schuweb_sitemap/models/fields/sitemap.php index 5c55b93..59ede63 100644 --- a/administrator/components/com_schuweb_sitemap/models/fields/sitemap.php +++ b/administrator/components/com_schuweb_sitemap/models/fields/sitemap.php @@ -74,7 +74,7 @@ protected function getInput() $html = array(); $html[] = '<span class="' . $classSpan . '">'; - $html[] = '<input type="text" required="required" readonly="readonly" size="40" id="' . $this->id . '_name" ' . $class . ' value="' . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '" />'; + $html[] = '<input type="text" required="required" readonly="readonly" size="40" id="' . $this->id . '_name" ' . $class . ' value="' . htmlspecialchars($title, ENT_QUOTES) . '" />'; $html[] = '<button type="button" class="btn btn-primary" ' . $bsModal . ' title="' . JText::_('COM_SCHUWEB_SITEMAP_CHANGE_SITEMAP') . '">' . '<span class="icon-list icon-white" aria-hidden="true"></span> ' . JText::_('JSELECT') . '</button>'; diff --git a/administrator/components/com_schuweb_sitemap/models/sitemap.php b/administrator/components/com_schuweb_sitemap/models/sitemap.php index dfbe2e5..150012d 100644 --- a/administrator/components/com_schuweb_sitemap/models/sitemap.php +++ b/administrator/components/com_schuweb_sitemap/models/sitemap.php @@ -255,8 +255,7 @@ protected function _prepareTable(&$table) function _orderConditions($table = null) { - $condition = array(); - return $condition; + return array(); } function setDefault($id) diff --git a/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php b/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php index 288658b..f3030a0 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemap/view.html.php @@ -91,7 +91,7 @@ function addToolbar() ToolBarHelper::title(Text::_('SCHUWEB_SITEMAP_PAGE_' . ($isNew ? 'ADD_SITEMAP' : 'EDIT_SITEMAP')), 'sitemap fa-sitemap'); - ToolbarHelper::apply('sitemap.apply', 'JTOOLBAR_APPLY'); + ToolbarHelper::apply('sitemap.apply'); $toolbarButtons[] = ['save', 'sitemap.save']; $toolbarButtons[] = ['save2new', 'sitemap.save2new']; @@ -99,8 +99,7 @@ function addToolbar() $toolbarButtons[] = ['save2copy', 'sitemap.save2copy']; } ToolbarHelper::saveGroup( - $toolbarButtons, - 'btn-success' + $toolbarButtons ); if ($isNew) { ToolbarHelper::cancel('sitemap.cancel'); diff --git a/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php b/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php index a380a50..aeab615 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php @@ -72,9 +72,9 @@ protected function addToolbar() JToolBarHelper::custom('sitemaps.setdefault', 'featured.png', 'featured_f2.png', 'SCHUWEB_SITEMAP_TOOLBAR_SET_DEFAULT', true); if ($state->get('filter.published') == -2) { - JToolBarHelper::deleteList('', 'sitemaps.delete', 'JTOOLBAR_DELETE'); + JToolBarHelper::deleteList('', 'sitemaps.delete'); } else { - JToolBarHelper::trash('sitemaps.trash', 'JTOOLBAR_TRASH'); + JToolBarHelper::trash('sitemaps.trash'); } diff --git a/components/com_schuweb_sitemap/displayer.php b/components/com_schuweb_sitemap/displayer.php index 6884697..09a0e55 100644 --- a/components/com_schuweb_sitemap/displayer.php +++ b/components/com_schuweb_sitemap/displayer.php @@ -94,7 +94,7 @@ public function printSitemap() * @todo allow the user to provide the module used to display that menu, or some other * workaround */ - $node->name = $this->getMenuTitle($menutype,'mod_menu'); // Get the name of this menu + $node->name = $this->getMenuTitle($menutype); // Get the name of this menu $this->startMenu($node); $this->printMenuTree($node, $items); diff --git a/components/com_schuweb_sitemap/views/html/tmpl/default_class.php b/components/com_schuweb_sitemap/views/html/tmpl/default_class.php index c280f1d..99e5aec 100644 --- a/components/com_schuweb_sitemap/views/html/tmpl/default_class.php +++ b/components/com_schuweb_sitemap/views/html/tmpl/default_class.php @@ -21,6 +21,17 @@ class SchuWeb_SitemapHtmlDisplayer extends SchuWeb_SitemapDisplayer { var $_width; var $live_site = 0; + /** + * @var array + * @since 4.0 + */ + private array $_parent_children; + /** + * @var array + * @since 4.0 + */ + private array $_last_child; + function __construct ($config, $sitemap) { $this->view = 'html'; parent::__construct($config, $sitemap); @@ -36,7 +47,7 @@ function setJView($view) $columns = $this->sitemap->params->get('columns',0); if( $columns > 1 ) { // calculate column widths $total = count($view->items); - $columns = $total < $columns? $total : $columns; + $columns = min($total, $columns); $this->_width = (100 / $columns) - 1; $this->sitemap->params->set('columns',$columns); } diff --git a/components/com_schuweb_sitemap/views/xml/tmpl/default.php b/components/com_schuweb_sitemap/views/xml/tmpl/default.php index 5e04856..ed8d1fa 100644 --- a/components/com_schuweb_sitemap/views/xml/tmpl/default.php +++ b/components/com_schuweb_sitemap/views/xml/tmpl/default.php @@ -27,7 +27,7 @@ $cacheControl .= 'max-age=' . $this->changeFreq; } else { if (($maxAge = intval($params->get('cacheControlMaxAge', 0))) > 0) { - $cacheControl .= 'max-age=' . strval($maxAge); + $cacheControl .= 'max-age=' . $maxAge; } } header('Cache-Control: ' . $cacheControl); diff --git a/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php b/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php index 59c93f3..4f2aabc 100644 --- a/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php +++ b/components/com_schuweb_sitemap/views/xml/tmpl/default_class.php @@ -17,12 +17,13 @@ class SchuWeb_SitemapXmlDisplayer extends SchuWeb_SitemapDisplayer * * @var array Stores the list of links that have been already included in * the sitemap to avoid duplicated items + * @since */ var $_links; /** - * * @var string + * @since */ var $view = 'xml'; @@ -37,10 +38,21 @@ class SchuWeb_SitemapXmlDisplayer extends SchuWeb_SitemapDisplayer */ var bool $isImages = false; + /** + * @var mixed|string + * + * @since 4.0 + */ + private mixed $defaultLanguage; + /** + * @var string + * @since 4.0 + */ + private string $nullDate; + function __construct($config, $sitemap) { parent::__construct($config, $sitemap); - $this->uids = array(); $this->defaultLanguage = strtolower(JFactory::getApplication()->getLanguage()->getTag()); if (preg_match('/^([a-z]+)-.*/', $this->defaultLanguage, $matches) && !in_array($this->defaultLanguage, array(' zh-cn', ' zh-tw'))) { diff --git a/components/com_schuweb_sitemap/views/xml/view.html.php b/components/com_schuweb_sitemap/views/xml/view.html.php index 55705d7..6be7356 100644 --- a/components/com_schuweb_sitemap/views/xml/view.html.php +++ b/components/com_schuweb_sitemap/views/xml/view.html.php @@ -6,7 +6,9 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Sven Schultschik (extensions@schultschik.de) */ -// No direct access + +use Joomla\CMS\User\User; + defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.view'); diff --git a/plugins/schuweb_sitemap/com_content/com_content.php b/plugins/schuweb_sitemap/com_content/com_content.php index 909cff6..2f388b3 100644 --- a/plugins/schuweb_sitemap/com_content/com_content.php +++ b/plugins/schuweb_sitemap/com_content/com_content.php @@ -241,7 +241,7 @@ static function getTree($xmap, $parent, &$params) case 'categories': if ($params['expand_categories']) { - $result = self::expandCategory($xmap, $parent, ($id ? $id : 1), $params, $parent->id); + $result = self::expandCategory($xmap, $parent, ($id ?: 1), $params, $parent->id); } break; case 'archive': diff --git a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php index 7ebed54..df18634 100644 --- a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php +++ b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php @@ -76,14 +76,14 @@ static function getTree($sitemap, $parent, &$params) return; } - $include_newsfeeds = ArrayHelper::getValue($params, 'include_newsfeeds', 1, ''); + $include_newsfeeds = ArrayHelper::getValue($params, 'include_newsfeeds', 1); $include_newsfeeds = ($include_newsfeeds == 1 || ($include_newsfeeds == 2 && $sitemap->view == 'xml') || ($include_newsfeeds == 3 && $sitemap->view == 'html')); $params['include_newsfeeds'] = $include_newsfeeds; - $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); - $changefreq = ArrayHelper::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') @@ -92,8 +92,8 @@ static function getTree($sitemap, $parent, &$params) $params['cat_priority'] = $priority; $params['cat_changefreq'] = $changefreq; - $priority = ArrayHelper::getValue($params, 'newsfeed_priority', $parent->priority, ''); - $changefreq = ArrayHelper::getValue($params, 'newsfeed_changefreq', $parent->changefreq, ''); + $priority = ArrayHelper::getValue($params, 'newsfeed_priority', $parent->priority); + $changefreq = ArrayHelper::getValue($params, 'newsfeed_changefreq', $parent->changefreq); if ($priority == '-1') $priority = $parent->priority; @@ -107,7 +107,7 @@ static function getTree($sitemap, $parent, &$params) $options['countItems'] = false; $options['catid'] = rand(); $categories = JCategories::getInstance('Newsfeeds', $options); - $category = $categories->get($catid ? $catid : 'root', true); + $category = $categories->get($catid ?: 'root', true); $params['count_clicks'] = $newsfeeds_params->get('count_clicks'); @@ -147,7 +147,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) { //view=category&catid=... $newsfeedsModel = new CategoryModel(); $newsfeedsModel->getState(); // To force the populate state - $newsfeedsModel->setState('list.limit', ArrayHelper::getValue($params, 'max_newsfeeds', null)); + $newsfeedsModel->setState('list.limit', ArrayHelper::getValue($params, 'max_newsfeeds')); $newsfeedsModel->setState('list.start', 0); $newsfeedsModel->setState('list.ordering', 'ordering'); $newsfeedsModel->setState('list.direction', 'ASC'); @@ -170,7 +170,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) if ($item_params->get('count_clicks', $params['count_clicks']) == 1) { - $node->link = 'index.php?option=com_newsfeeds&task=newsfeed.go&id=' . $newsfeed->id . '&Itemid=' . ($Itemid ? $Itemid : $parent->id); + $node->link = 'index.php?option=com_newsfeeds&task=newsfeed.go&id=' . $newsfeed->id . '&Itemid=' . ($Itemid ?: $parent->id); } else { diff --git a/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php b/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php index 0c3b085..5d09ffa 100644 --- a/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php +++ b/plugins/schuweb_sitemap/com_sobipro/com_sobipro.php @@ -52,7 +52,7 @@ static function getTree($xmap, $parent, &$params) $link_query = parse_url($parent->link); parse_str(html_entity_decode($link_query['query']), $link_vars); $sid = ArrayHelper::getValue($link_vars, 'sid', 1); - $task = ArrayHelper::getValue($link_vars, 'task', null); + $task = ArrayHelper::getValue($link_vars, 'task'); if (in_array($task, array('search', 'entry.add'))) { return; @@ -203,7 +203,7 @@ static function getCategoryTree($sitemap, $parent, $sid, &$params) $node->uid = 'com_sobiproe' . $row->id; // Unique ID $node->browserNav = $parent->browserNav; $node->name = html_entity_decode($row->name); - $node->modified = $row->modified ? $row->modified : $row->publish_up; + $node->modified = $row->modified ?: $row->publish_up; $node->priority = $params['entry_priority']; $node->changefreq = $params['entry_changefreq']; @@ -236,7 +236,7 @@ static protected function loadSobi() } define('SOBI_TESTS', false); $ver = new JVersion(); - $ver = str_replace('.', null, $ver->RELEASE); + $ver = str_replace('.', null, $ver->getHelpVersion()); // added by Pierre Burri-Wittke globeall.de if ($ver > '15') { $ver = '16'; diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php index 6235c89..d073e76 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php +++ b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php @@ -76,14 +76,14 @@ static function getTree($sitemap, $parent, &$params) return; } - $include_links = ArrayHelper::getValue($params, 'include_links', 1, ''); + $include_links = ArrayHelper::getValue($params, 'include_links', 1); $include_links = ($include_links == 1 || ($include_links == 2 && $sitemap->view == 'xml') || ($include_links == 3 && $sitemap->view == 'html')); $params['include_links'] = $include_links; - $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); - $changefreq = ArrayHelper::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') @@ -92,8 +92,8 @@ static function getTree($sitemap, $parent, &$params) $params['cat_priority'] = $priority; $params['cat_changefreq'] = $changefreq; - $priority = ArrayHelper::getValue($params, 'link_priority', $parent->priority, ''); - $changefreq = ArrayHelper::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; @@ -107,7 +107,7 @@ static function getTree($sitemap, $parent, &$params) $options['countItems'] = false; $options['catid'] = rand(); $categories = JCategories::getInstance('Weblinks', $options); - $category = $categories->get($catid ? $catid : 'root', true); + $category = $categories->get($catid ?: 'root', true); $params['count_clicks'] = $weblinks_params->get('count_clicks'); @@ -147,7 +147,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) { //view=category&catid=... $linksModel = new CategoryModel(); $linksModel->getState(); // To force the populate state - $linksModel->setState('list.limit', ArrayHelper::getValue($params, 'max_links', null)); + $linksModel->setState('list.limit', ArrayHelper::getValue($params, 'max_links')); $linksModel->setState('list.start', 0); $linksModel->setState('list.ordering', 'ordering'); $linksModel->setState('list.direction', 'ASC'); @@ -169,7 +169,7 @@ static function getCategoryTree($sitemap, $parent, &$params, $category) if ($item_params->get('count_clicks', $params['count_clicks']) == 1) { - $node->link = 'index.php?option=schuweb_sitemap_weblinks&task=weblink.go&id=' . $link->id . '&Itemid=' . ($Itemid ? $Itemid : $parent->id); + $node->link = 'index.php?option=schuweb_sitemap_weblinks&task=weblink.go&id=' . $link->id . '&Itemid=' . ($Itemid ?: $parent->id); } else { diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php index b5c9064..e598dc6 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php +++ b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php @@ -39,20 +39,20 @@ static function getTree(&$schuweb_sitemap, &$parent, &$params) $link_query = parse_url($parent->link); parse_str(html_entity_decode($link_query['query']), $link_vars); - $include_categories = ArrayHelper::getValue($params, 'include_categories', 1, ''); + $include_categories = ArrayHelper::getValue($params, 'include_categories', 1); $include_categories = ($include_categories == 1 || ($include_categories == 2 && $schuweb_sitemap->view == 'xml') || ($include_categories == 3 && $schuweb_sitemap->view == 'html')); $params['include_categories'] = $include_categories; - $include_items = ArrayHelper::getValue($params, 'include_items', 1, ''); + $include_items = ArrayHelper::getValue($params, 'include_items', 1); $include_items = ($include_items == 1 || ($include_items == 2 && $schuweb_sitemap->view == 'xml') || ($include_items == 3 && $schuweb_sitemap->view == 'html')); $params['include_items'] = $include_items; - $priority = ArrayHelper::getValue($params, 'cat_priority', $parent->priority, ''); - $changefreq = ArrayHelper::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') @@ -61,8 +61,8 @@ static function getTree(&$schuweb_sitemap, &$parent, &$params) $params['cat_priority'] = $priority; $params['cat_changefreq'] = $changefreq; - $priority = ArrayHelper::getValue($params, 'item_priority', $parent->priority, ''); - $changefreq = ArrayHelper::getValue($params, 'item_changefreq', $parent->changefreq, ''); + $priority = ArrayHelper::getValue($params, 'item_priority', $parent->priority); + $changefreq = ArrayHelper::getValue($params, 'item_changefreq', $parent->changefreq); if ($priority == '-1') $priority = $parent->priority; @@ -205,7 +205,7 @@ static protected function _find($type, $id) { $menu_items = $app->object->create('\Joomla\CMS\Application\SiteApplication')->getMenu()->getItems('component_id', JComponentHelper::getComponent('schuweb_sitemap_zoo')->id); - $menu_items = $menu_items ? $menu_items : array(); + $menu_items = $menu_items ?: array(); self::$_menu_items = array_fill_keys(array('category', 'frontpage', 'item'), array()); foreach ($menu_items as $menu_item) From 4520ae44237b25e12c61f8c90809312c9dd7abd5 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 19 Feb 2022 01:51:31 +0100 Subject: [PATCH 16/49] remove J3 builder and package --- build/builder.xml | 41 +++------------- build/builderJ4.xml | 98 -------------------------------------- pkg_schuweb_sitemap.xml | 5 -- pkg_schuweb_sitemap_J4.xml | 22 --------- 4 files changed, 7 insertions(+), 159 deletions(-) delete mode 100644 build/builderJ4.xml delete mode 100644 pkg_schuweb_sitemap_J4.xml diff --git a/build/builder.xml b/build/builder.xml index e5e0d58..aaac4ef 100644 --- a/build/builder.xml +++ b/build/builder.xml @@ -15,15 +15,11 @@ <format property="DATE" pattern="%d. %B %Y" locale="en_GB"/> </tstamp> <!-- Set the directory where the packages should be saved. Relative to the build dir --> - <property name="builddir" value="./../../packages/${extension_name}" override="true"/> + <property name="builddir" value="./../../packages/${extension_name}/J4" override="true"/> <!-- Declare Project src files --> <property name="src" value="./.." override="true"/> <property name="plugins" value="${src}/plugins"/> - <!-- plugins --> - <fileset dir="${plugins}/schuweb_sitemap" id="schuweb_sitemap_plugins"> - <include name="**"/> - </fileset> <fileset dir="${src}/administrator/components/com_schuweb_sitemap" id="schuweb_sitemap_admin"> <include name="**"/> </fileset> @@ -42,37 +38,11 @@ <include name="**"/> </fileset> </zip> - <zip destfile="${builddir}/tmp/packages/plg_kunena_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_kunena"> - <include name="**"/> - </fileset> - </zip> - <zip destfile="${builddir}/tmp/packages/plg_sobipro_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_sobipro"> - <include name="**"/> - </fileset> - </zip> - <zip destfile="${builddir}/tmp/packages/plg_virtuemart_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_virtuemart"> - <include name="**"/> - </fileset> - </zip> <zip destfile="${builddir}/tmp/packages/plg_newsfeeds_${build.version}_${build.date.DSTAMP}.zip"> <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_newsfeeds"> <include name="**"/> </fileset> </zip> - <zip destfile="${builddir}/tmp/packages/plg_weblinks_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_weblinks"> - <include name="**"/> - </fileset> - </zip> - <zip destfile="${builddir}/tmp/packages/plg_zoo_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_zoo"> - <include name="**"/> - </fileset> - </zip> - <zip destfile="${builddir}/pkg_schuweb_sitemap_${build.version}_${build.date.DSTAMP}.zip"> <fileset dir="${builddir}/tmp"> <include name="packages/*.zip"/> @@ -101,14 +71,17 @@ <fileset refid="schuweb_sitemap_front"/> </copy> <copy file="${src}/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml" todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap" /> - <copy file="${src}/pkg_schuweb_sitemap.xml" todir="${builddir}/tmp" /> + <copy file="${src}/pkg_schuweb_sitemap.xml" tofile="${builddir}/tmp/pkg_schuweb_sitemap.xml" /> <copy file="${src}/install.script.php" todir="${builddir}/tmp" /> <copy file="${src}/extension.script.php" todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap" /> <copy todir="${builddir}/tmp/schuweb_sitemap/plugins"> - <fileset refid="schuweb_sitemap_plugins"/> + <fileset dir="${plugins}/schuweb_sitemap"> + <include name="com_content/**"/> + <include name="com_newsfeeds/**"/> + </fileset> </copy> <echo msg="Copy was successfull"/> - <!-- insert version, build number and date into the xml files --> + <!-- insert version, build number and date into files --> <reflexive> <fileset dir="${builddir}/tmp/"> <include name="**"/> diff --git a/build/builderJ4.xml b/build/builderJ4.xml deleted file mode 100644 index 51d7161..0000000 --- a/build/builderJ4.xml +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Override variables: - - Version number -Dbuild.version=0.0.0 - All paths starts at the build folder - - Build dir -Dbuilddir=./../../packages/swsetgroup - - Sourcefiles -Dsrc=./.. ---> -<project name="schuweb_sitemap" default="build"> - <property name="extension_name" value="SchuWeb_Sitemap"/> - <!-- Version number of build --> - <property name="build.version" value="0.0.0" override="true"/> - <!-- get the date for build --> - <tstamp prefix="build.date"> - <format property="DATE" pattern="%d. %B %Y" locale="en_GB"/> - </tstamp> - <!-- Set the directory where the packages should be saved. Relative to the build dir --> - <property name="builddir" value="./../../packages/${extension_name}/J4" override="true"/> - <!-- Declare Project src files --> - <property name="src" value="./.." override="true"/> - <property name="plugins" value="${src}/plugins"/> - - <fileset dir="${src}/administrator/components/com_schuweb_sitemap" id="schuweb_sitemap_admin"> - <include name="**"/> - </fileset> - <fileset dir="${src}/components/com_schuweb_sitemap" id="schuweb_sitemap_front"> - <include name="**"/> - </fileset> - - <target name="build" depends="prepare, copy"> - <zip destfile="${builddir}/tmp/packages/com_schuweb_sitemap_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap"> - <include name="**"/> - </fileset> - </zip> - <zip destfile="${builddir}/tmp/packages/plg_content_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_content"> - <include name="**"/> - </fileset> - </zip> - <zip destfile="${builddir}/tmp/packages/plg_newsfeeds_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_newsfeeds"> - <include name="**"/> - </fileset> - </zip> - <zip destfile="${builddir}/pkg_schuweb_sitemap_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp"> - <include name="packages/*.zip"/> - <include name="*.xml"/> - <include name="install.script.php" /> - </fileset> - </zip> - <delete dir="${builddir}/tmp"/> - <echo msg="Zip ALL OK!"/> - </target> - - <target name="prepare"> - <mkdir dir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/admin"/> - <mkdir dir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/front"/> - <mkdir dir="${builddir}/tmp/schuweb_sitemap/plugins/"/> - <mkdir dir="${builddir}/tmp/packages/"/> - <echo msg="Create temp folder OK!"/> - </target> - - <target name="copy"> - <!-- copy the plugins --> - <copy todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/admin"> - <fileset refid="schuweb_sitemap_admin"/> - </copy> - <copy todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/front"> - <fileset refid="schuweb_sitemap_front"/> - </copy> - <copy file="${src}/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml" todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap" /> - <copy file="${src}/pkg_schuweb_sitemap_J4.xml" tofile="${builddir}/tmp/pkg_schuweb_sitemap.xml" /> - <copy file="${src}/install.script.php" todir="${builddir}/tmp" /> - <copy file="${src}/extension.script.php" todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap" /> - <copy todir="${builddir}/tmp/schuweb_sitemap/plugins"> - <fileset dir="${plugins}/schuweb_sitemap"> - <include name="com_content/**"/> - <include name="com_newsfeeds/**"/> - </fileset> - </copy> - <echo msg="Copy was successfull"/> - <!-- insert version, build number and date into files --> - <reflexive> - <fileset dir="${builddir}/tmp/"> - <include name="**"/> - </fileset> - <filterchain> - <replaceregexp> - <regexp pattern="sw\.build\.version" replace="${build.version}"/> - <regexp pattern="sw\.build\.date" replace="${build.date.DATE}"/> - <regexp pattern="sw\.build\.dstamp" replace="${build.date.DSTAMP}"/> - </replaceregexp> - </filterchain> - </reflexive> - </target> -</project> \ No newline at end of file diff --git a/pkg_schuweb_sitemap.xml b/pkg_schuweb_sitemap.xml index 1558c81..4674198 100644 --- a/pkg_schuweb_sitemap.xml +++ b/pkg_schuweb_sitemap.xml @@ -14,12 +14,7 @@ <files folder="packages"> <file type="component" id="com_schuweb_sitemap">com_schuweb_sitemap_sw.build.version_sw.build.dstamp.zip</file> <file type="plugin" id="com_content" group="schuweb_sitemap">plg_content_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_kunena" group="schuweb_sitemap">plg_kunena_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_sobipro" group="schuweb_sitemap">plg_sobipro_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_virtuemart" group="schuweb_sitemap">plg_virtuemart_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_weblinks" group="schuweb_sitemap">plg_weblinks_sw.build.version_sw.build.dstamp.zip</file> <file type="plugin" id="com_newsfeeds" group="schuweb_sitemap">plg_newsfeeds_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_zoo" group="schuweb_sitemap">plg_zoo_sw.build.version_sw.build.dstamp.zip</file> </files> <updateservers> <server type="extension" priority="1" name="SchuWeb Sitemap Update Site">https://raw.githubusercontent.com/svanschu/SchuWeb-Sitemap/master/update/schuweb_sitemap.xml</server> diff --git a/pkg_schuweb_sitemap_J4.xml b/pkg_schuweb_sitemap_J4.xml deleted file mode 100644 index 6b81ed3..0000000 --- a/pkg_schuweb_sitemap_J4.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<extension type="package" version="4.0" method="upgrade"> - <name>SchuWeb Sitemap Package</name> - <packagename>schuweb_sitemap</packagename> - <creationDate>sw.build.date</creationDate> - <author>Sven Schultschik</author> - <version>sw.build.version</version> - <url>http://extensions.schultschik.de</url> - <packager>SchuWeb Sitemap</packager> - <packagerurl>http://extensions.schultschik.de</packagerurl> - <license>GNU/GPL</license> - <description>The Site Map generator for Joomla!</description> - <scriptfile>install.script.php</scriptfile> - <files folder="packages"> - <file type="component" id="com_schuweb_sitemap">com_schuweb_sitemap_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_content" group="schuweb_sitemap">plg_content_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_newsfeeds" group="schuweb_sitemap">plg_newsfeeds_sw.build.version_sw.build.dstamp.zip</file> - </files> - <updateservers> - <server type="extension" priority="1" name="SchuWeb Sitemap Update Site">https://raw.githubusercontent.com/svanschu/SchuWeb-Sitemap/master/update/schuweb_sitemap.xml</server> - </updateservers> -</extension> From eafd3142466b791a67f22bdeaf6e75672a5d61e8 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 19 Feb 2022 01:52:07 +0100 Subject: [PATCH 17/49] version tag in manifest files got removed for J4 --- .../components/com_schuweb_sitemap/schuweb_sitemap.xml | 2 +- pkg_schuweb_sitemap.xml | 2 +- plugins/schuweb_sitemap/com_content/com_content.xml | 2 +- plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml | 2 +- plugins/schuweb_sitemap/com_sobipro/com_sobipro.xml | 2 +- plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.xml | 2 +- plugins/schuweb_sitemap/kunena/kunena.xml | 2 +- .../schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml | 2 +- .../schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml b/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml index 9447b96..cd25b0e 100644 --- a/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml +++ b/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<extension method="upgrade" version="3.6" type="component"> +<extension method="upgrade" type="component"> <name>com_schuweb_sitemap</name> <creationDate>sw.build.date</creationDate> <author>Sven Schultschik</author> diff --git a/pkg_schuweb_sitemap.xml b/pkg_schuweb_sitemap.xml index 4674198..3e7a763 100644 --- a/pkg_schuweb_sitemap.xml +++ b/pkg_schuweb_sitemap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<extension type="package" version="3.0" method="upgrade"> +<extension type="package" method="upgrade"> <name>SchuWeb Sitemap Package</name> <packagename>schuweb_sitemap</packagename> <creationDate>sw.build.date</creationDate> diff --git a/plugins/schuweb_sitemap/com_content/com_content.xml b/plugins/schuweb_sitemap/com_content/com_content.xml index 2ef1e79..b633b78 100644 --- a/plugins/schuweb_sitemap/com_content/com_content.xml +++ b/plugins/schuweb_sitemap/com_content/com_content.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- sw.build.version --> -<extension type="plugin" group="schuweb_sitemap" version="3" method="upgrade"> +<extension type="plugin" group="schuweb_sitemap" method="upgrade"> <name>SchuWeb Sitemap - Content Plugin</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> diff --git a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml index 011d426..21db75c 100644 --- a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml +++ b/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<extension type="plugin" group="schuweb_sitemap" version="1.6" method="upgrade"> +<extension type="plugin" group="schuweb_sitemap" method="upgrade"> <name>SchuWeb Sitemap - Newsfeeds Plugin</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> diff --git a/plugins/schuweb_sitemap/com_sobipro/com_sobipro.xml b/plugins/schuweb_sitemap/com_sobipro/com_sobipro.xml index 90a999d..baaeb73 100755 --- a/plugins/schuweb_sitemap/com_sobipro/com_sobipro.xml +++ b/plugins/schuweb_sitemap/com_sobipro/com_sobipro.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<extension type="plugin" group="schuweb_sitemap" version="3.0" method="upgrade"> +<extension type="plugin" group="schuweb_sitemap" method="upgrade"> <name>SchuWeb Sitemap - SobiPro Plugin</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> diff --git a/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.xml b/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.xml index cdcfda9..44f1ed3 100644 --- a/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.xml +++ b/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<extension type="plugin" group="schuweb_sitemap" version="1.6" method="upgrade"> +<extension type="plugin" group="schuweb_sitemap" method="upgrade"> <name>SchuWeb Sitemap - Virtuemart Plugin</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> diff --git a/plugins/schuweb_sitemap/kunena/kunena.xml b/plugins/schuweb_sitemap/kunena/kunena.xml index 1e1bb2e..a655560 100644 --- a/plugins/schuweb_sitemap/kunena/kunena.xml +++ b/plugins/schuweb_sitemap/kunena/kunena.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- sw.build.version --> -<extension type="plugin" group="schuweb_sitemap" version="3.0" method="upgrade"> +<extension type="plugin" group="schuweb_sitemap" method="upgrade"> <name>SchuWeb Sitemap - Kunena Plugin</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml index c767b72..d75c427 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml +++ b/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<extension type="plugin" group="schuweb_sitemap" version="1.6" method="upgrade"> +<extension type="plugin" group="schuweb_sitemap" method="upgrade"> <name>SchuWeb Sitemap - Weblinks Plugin</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml index e9fb486..8950cae 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml +++ b/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- sw.build.version --> -<extension type="plugin" group="schuweb_sitemap" version="3" method="upgrade"> +<extension type="plugin" group="schuweb_sitemap" method="upgrade"> <name>SchuWeb Sitemap - SchuWeb Sitemap Integration for Zoo</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> From 9b9481a089bd0fa59264f533bc1c5f42b69cb761 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 19 Feb 2022 02:59:30 +0100 Subject: [PATCH 18/49] rename weblinks for single use --- .../com_schuweb_sitemap/models/sitemaps.php | 2 +- .../index.html | 0 .../cs-CZ/plg_schuweb_sitemap_weblinks.ini} | 0 .../en-GB/plg_schuweb_sitemap_weblinks.ini} | 0 .../es-ES/plg_schuweb_sitemap_weblinks.ini} | 0 .../fa-IR/plg_schuweb_sitemap_weblinks.ini} | 0 .../nl-NL/plg_schuweb_sitemap_weblinks.ini} | 0 .../ru-RU/plg_schuweb_sitemap_weblinks.ini} | 0 .../weblinks.php} | 0 .../weblinks.xml} | 14 +++++++------- 10 files changed, 8 insertions(+), 8 deletions(-) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks => weblinks}/index.html (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks/language/cs-CZ.plg_schuweb_sitemap_weblinks.ini => weblinks/language/cs-CZ/plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks/language/en-GB.plg_schuweb_sitemap_weblinks.ini => weblinks/language/en-GB/plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks/language/es-ES.plg_schuweb_sitemap_weblinks.ini => weblinks/language/es-ES/plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks/language/fa-IR.plg_schuweb_sitemap_weblinks.ini => weblinks/language/fa-IR/plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks/language/nl-NL.plg_schuweb_sitemap_weblinks.ini => weblinks/language/nl-NL/plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks/language/ru-RU.plg_schuweb_sitemap_weblinks.ini => weblinks/language/ru-RU/plg_schuweb_sitemap_weblinks.ini} (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php => weblinks/weblinks.php} (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml => weblinks/weblinks.xml} (92%) diff --git a/administrator/components/com_schuweb_sitemap/models/sitemaps.php b/administrator/components/com_schuweb_sitemap/models/sitemaps.php index 68a9538..82e1151 100644 --- a/administrator/components/com_schuweb_sitemap/models/sitemaps.php +++ b/administrator/components/com_schuweb_sitemap/models/sitemaps.php @@ -159,7 +159,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 (SUBSTRING(e.element,5)=SUBSTRING(p.element,17) or e.element=p.element) and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\''); + $query->join('INNER', '#__extensions AS p ON (SUBSTRING(e.element,5)=p.element or e.element=p.element) and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\''); $query->where('e.type=\'component\' and e.enabled=1'); $db->setQuery($query); diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/index.html b/plugins/schuweb_sitemap/weblinks/index.html similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/index.html rename to plugins/schuweb_sitemap/weblinks/index.html diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/cs-CZ.plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/cs-CZ/plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/cs-CZ.plg_schuweb_sitemap_weblinks.ini rename to plugins/schuweb_sitemap/weblinks/language/cs-CZ/plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/en-GB.plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/en-GB/plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/en-GB.plg_schuweb_sitemap_weblinks.ini rename to plugins/schuweb_sitemap/weblinks/language/en-GB/plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/es-ES.plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/es-ES/plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/es-ES.plg_schuweb_sitemap_weblinks.ini rename to plugins/schuweb_sitemap/weblinks/language/es-ES/plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/fa-IR.plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/fa-IR/plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/fa-IR.plg_schuweb_sitemap_weblinks.ini rename to plugins/schuweb_sitemap/weblinks/language/fa-IR/plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/nl-NL.plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/nl-NL/plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/nl-NL.plg_schuweb_sitemap_weblinks.ini rename to plugins/schuweb_sitemap/weblinks/language/nl-NL/plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/ru-RU.plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/ru-RU/plg_schuweb_sitemap_weblinks.ini similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/language/ru-RU.plg_schuweb_sitemap_weblinks.ini rename to plugins/schuweb_sitemap/weblinks/language/ru-RU/plg_schuweb_sitemap_weblinks.ini diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php b/plugins/schuweb_sitemap/weblinks/weblinks.php similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.php rename to plugins/schuweb_sitemap/weblinks/weblinks.php diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml b/plugins/schuweb_sitemap/weblinks/weblinks.xml similarity index 92% rename from plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml rename to plugins/schuweb_sitemap/weblinks/weblinks.xml index d75c427..4e7a14d 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_weblinks/schuweb_sitemap_weblinks.xml +++ b/plugins/schuweb_sitemap/weblinks/weblinks.xml @@ -10,7 +10,7 @@ <version>sw.build.version</version> <description>SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION</description> <files> - <filename plugin="schuweb_sitemap_weblinks">schuweb_sitemap_weblinks.php</filename> + <filename plugin="weblinks">weblinks.php</filename> <filename>index.html</filename> </files> <updateservers> @@ -19,12 +19,12 @@ </server> </updateservers> <languages folder="language"> - <language tag="en-GB">en-GB.plg_schuweb_sitemap_weblinks.ini</language> - <language tag="es-ES">es-ES.plg_schuweb_sitemap_weblinks.ini</language> - <language tag="fa-IR">fa-IR.plg_schuweb_sitemap_weblinks.ini</language> - <language tag="cs-CZ">cs-CZ.plg_schuweb_sitemap_weblinks.ini</language> - <language tag="nl-NL">nl-NL.plg_schuweb_sitemap_weblinks.ini</language> - <language tag="ru-RU">ru-RU.plg_schuweb_sitemap_weblinks.ini</language> + <language tag="en-GB">en-GB/plg_schuweb_sitemap_weblinks.ini</language> + <language tag="es-ES">es-ES/plg_schuweb_sitemap_weblinks.ini</language> + <language tag="fa-IR">fa-IR/plg_schuweb_sitemap_weblinks.ini</language> + <language tag="cs-CZ">cs-CZ/plg_schuweb_sitemap_weblinks.ini</language> + <language tag="nl-NL">nl-NL/plg_schuweb_sitemap_weblinks.ini</language> + <language tag="ru-RU">ru-RU/plg_schuweb_sitemap_weblinks.ini</language> </languages> <config> <fields name="params"> From 80de6565f071c2ff59ee1d377a81d5227561f5c4 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 19 Feb 2022 03:02:06 +0100 Subject: [PATCH 19/49] rename zoo plugin again --- plugins/schuweb_sitemap/{schuweb_sitemap_zoo => zoo}/index.html | 0 .../language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini | 0 .../language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini | 0 .../schuweb_sitemap_zoo.php => zoo/zoo.php} | 0 .../schuweb_sitemap_zoo.xml => zoo/zoo.xml} | 2 +- 5 files changed, 1 insertion(+), 1 deletion(-) rename plugins/schuweb_sitemap/{schuweb_sitemap_zoo => zoo}/index.html (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_zoo => zoo}/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_zoo => zoo}/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_zoo/schuweb_sitemap_zoo.php => zoo/zoo.php} (100%) rename plugins/schuweb_sitemap/{schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml => zoo/zoo.xml} (98%) diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/index.html b/plugins/schuweb_sitemap/zoo/index.html similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_zoo/index.html rename to plugins/schuweb_sitemap/zoo/index.html diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini b/plugins/schuweb_sitemap/zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini rename to plugins/schuweb_sitemap/zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.ini diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini b/plugins/schuweb_sitemap/zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini rename to plugins/schuweb_sitemap/zoo/language/en-GB/en-GB.plg_schuweb_sitemap_zoo.sys.ini diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php b/plugins/schuweb_sitemap/zoo/zoo.php similarity index 100% rename from plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.php rename to plugins/schuweb_sitemap/zoo/zoo.php diff --git a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml b/plugins/schuweb_sitemap/zoo/zoo.xml similarity index 98% rename from plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml rename to plugins/schuweb_sitemap/zoo/zoo.xml index 8950cae..6de5ff9 100644 --- a/plugins/schuweb_sitemap/schuweb_sitemap_zoo/schuweb_sitemap_zoo.xml +++ b/plugins/schuweb_sitemap/zoo/zoo.xml @@ -11,7 +11,7 @@ <version>sw.build.version</version> <description>SCHUWEB_SITEMAP_ZOO_PLUGIN_DESCRIPTION</description> <files> - <filename plugin="schuweb_sitemap_zoo">schuweb_sitemap_zoo.php</filename> + <filename plugin="zoo">zoo.php</filename> <filename>index.html</filename> </files> <updateservers> From 17741b3d80724fc7c6f59eb81fa7b8834090c35e Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 19 Feb 2022 03:06:55 +0100 Subject: [PATCH 20/49] adjust Plugin names and description to fullfill JED rules --- plugins/schuweb_sitemap/kunena/kunena.xml | 4 ++-- .../weblinks/language/cs-CZ/plg_schuweb_sitemap_weblinks.ini | 2 +- .../weblinks/language/en-GB/plg_schuweb_sitemap_weblinks.ini | 2 +- .../weblinks/language/es-ES/plg_schuweb_sitemap_weblinks.ini | 2 +- .../weblinks/language/fa-IR/plg_schuweb_sitemap_weblinks.ini | 2 +- .../weblinks/language/nl-NL/plg_schuweb_sitemap_weblinks.ini | 2 +- .../weblinks/language/ru-RU/plg_schuweb_sitemap_weblinks.ini | 2 +- plugins/schuweb_sitemap/weblinks/weblinks.xml | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/schuweb_sitemap/kunena/kunena.xml b/plugins/schuweb_sitemap/kunena/kunena.xml index a655560..aa1d5ad 100644 --- a/plugins/schuweb_sitemap/kunena/kunena.xml +++ b/plugins/schuweb_sitemap/kunena/kunena.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- sw.build.version --> <extension type="plugin" group="schuweb_sitemap" method="upgrade"> - <name>SchuWeb Sitemap - Kunena Plugin</name> + <name>SchuWeb Sitemap - SchuWeb Sitemap Integration for Kunena</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> <copyright>GNU GPL</copyright> @@ -9,7 +9,7 @@ <authorEmail>extensions@schultschik.de</authorEmail> <authorUrl>extensions.schultschik.de</authorUrl> <version>sw.build.version</version> - <description>SchuWeb Sitemap Plugin for Kunena component</description> + <description>SchuWeb Sitemap integration plugin for the extension Kunena</description> <files> <filename plugin="kunena">kunena.php</filename> <filename>index.html</filename> diff --git a/plugins/schuweb_sitemap/weblinks/language/cs-CZ/plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/cs-CZ/plg_schuweb_sitemap_weblinks.ini index 1f9cd1d..dbcfcce 100644 --- a/plugins/schuweb_sitemap/weblinks/language/cs-CZ/plg_schuweb_sitemap_weblinks.ini +++ b/plugins/schuweb_sitemap/weblinks/language/cs-CZ/plg_schuweb_sitemap_weblinks.ini @@ -1,4 +1,4 @@ -SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION="Přidá podporu pro komponentu Odkazy" + SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_LABEL="Zobrazit odkazy?" SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_DESC="Mají být jednotlivé odkazy zahrnuty do mapy stránek?" SCHUWEB_SITEMAP_WL_SETTING_MAX_LINKS_LABEL="Max. počet" diff --git a/plugins/schuweb_sitemap/weblinks/language/en-GB/plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/en-GB/plg_schuweb_sitemap_weblinks.ini index 11e421b..deb0e11 100755 --- a/plugins/schuweb_sitemap/weblinks/language/en-GB/plg_schuweb_sitemap_weblinks.ini +++ b/plugins/schuweb_sitemap/weblinks/language/en-GB/plg_schuweb_sitemap_weblinks.ini @@ -1,4 +1,4 @@ -SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION="Adds support for Weblinks component" + SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_LABEL="Show Links?" SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_DESC="Should we include links into the site map?" SCHUWEB_SITEMAP_WL_SETTING_MAX_LINKS_LABEL="Max links" diff --git a/plugins/schuweb_sitemap/weblinks/language/es-ES/plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/es-ES/plg_schuweb_sitemap_weblinks.ini index 11e421b..deb0e11 100644 --- a/plugins/schuweb_sitemap/weblinks/language/es-ES/plg_schuweb_sitemap_weblinks.ini +++ b/plugins/schuweb_sitemap/weblinks/language/es-ES/plg_schuweb_sitemap_weblinks.ini @@ -1,4 +1,4 @@ -SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION="Adds support for Weblinks component" + SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_LABEL="Show Links?" SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_DESC="Should we include links into the site map?" SCHUWEB_SITEMAP_WL_SETTING_MAX_LINKS_LABEL="Max links" diff --git a/plugins/schuweb_sitemap/weblinks/language/fa-IR/plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/fa-IR/plg_schuweb_sitemap_weblinks.ini index fe78262..36c4df5 100644 --- a/plugins/schuweb_sitemap/weblinks/language/fa-IR/plg_schuweb_sitemap_weblinks.ini +++ b/plugins/schuweb_sitemap/weblinks/language/fa-IR/plg_schuweb_sitemap_weblinks.ini @@ -9,7 +9,7 @@ ; @note Client Administrator ; @note All ini files need to be saved as UTF-8 - No BOM -SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION="پشتیبانی برای کامپوننت پیوند ها را به نقشه سایت می افزاید" + SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_LABEL="نمایش پیوند ها؟" SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_DESC="آیا پیوند ها در نقشه سایت نمایش داده شوند؟" SCHUWEB_SITEMAP_WL_SETTING_MAX_LINKS_LABEL="حداکثر پیوند ها" diff --git a/plugins/schuweb_sitemap/weblinks/language/nl-NL/plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/nl-NL/plg_schuweb_sitemap_weblinks.ini index 6afabaa..0638146 100644 --- a/plugins/schuweb_sitemap/weblinks/language/nl-NL/plg_schuweb_sitemap_weblinks.ini +++ b/plugins/schuweb_sitemap/weblinks/language/nl-NL/plg_schuweb_sitemap_weblinks.ini @@ -1,4 +1,4 @@ -SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION="Voegt ondersteuning voor de weblinks component toe" + SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_LABEL="Toon links?" SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_DESC="Moeten links opgenomen worden in de sitemap?" SCHUWEB_SITEMAP_WL_SETTING_MAX_LINKS_LABEL="Max aantal links" diff --git a/plugins/schuweb_sitemap/weblinks/language/ru-RU/plg_schuweb_sitemap_weblinks.ini b/plugins/schuweb_sitemap/weblinks/language/ru-RU/plg_schuweb_sitemap_weblinks.ini index e7776dd..535c90e 100644 --- a/plugins/schuweb_sitemap/weblinks/language/ru-RU/plg_schuweb_sitemap_weblinks.ini +++ b/plugins/schuweb_sitemap/weblinks/language/ru-RU/plg_schuweb_sitemap_weblinks.ini @@ -1,4 +1,4 @@ -SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION="Дополнительная поддержка для компонента Weblinks" + SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_LABEL="Показать ссылки?" SCHUWEB_SITEMAP_WL_SETTING_SHOW_LINKS_DESC="Должна ли карта сайта содержать в себе ссылки?" SCHUWEB_SITEMAP_WL_SETTING_MAX_LINKS_LABEL="Максимум ссылок" diff --git a/plugins/schuweb_sitemap/weblinks/weblinks.xml b/plugins/schuweb_sitemap/weblinks/weblinks.xml index 4e7a14d..918f3ae 100644 --- a/plugins/schuweb_sitemap/weblinks/weblinks.xml +++ b/plugins/schuweb_sitemap/weblinks/weblinks.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <extension type="plugin" group="schuweb_sitemap" method="upgrade"> - <name>SchuWeb Sitemap - Weblinks Plugin</name> + <name>SchuWeb Sitemap - SchuWeb Sitemap Integration for Weblinks</name> <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> <copyright>GNU GPL</copyright> @@ -8,7 +8,7 @@ <authorEmail>sven@schultschik.de</authorEmail> <authorUrl>www.schultschik.de</authorUrl> <version>sw.build.version</version> - <description>SCHUWEB_SITEMAP_WL_PLUGIN_DESCRIPTION</description> + <description>SchuWeb Sitemap integration plugin for the extension Weblinks</description> <files> <filename plugin="weblinks">weblinks.php</filename> <filename>index.html</filename> From 0a73a502a1cf7631e285acf4f20152bac3bd1bd7 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sun, 20 Feb 2022 17:55:43 +0100 Subject: [PATCH 21/49] Check for Joomla and PHP version on install --- extension.script.php | 27 ++++++++++++---- install.script.php | 19 +++++++++--- plugins/schuweb_sitemap/kunena/kunena.xml | 1 + plugins/schuweb_sitemap/kunena/script.php | 31 +++++++++++++++++++ plugins/schuweb_sitemap/weblinks/script.php | 31 +++++++++++++++++++ plugins/schuweb_sitemap/weblinks/weblinks.xml | 1 + plugins/schuweb_sitemap/zoo/script.php | 31 +++++++++++++++++++ plugins/schuweb_sitemap/zoo/zoo.xml | 1 + 8 files changed, 131 insertions(+), 11 deletions(-) create mode 100644 plugins/schuweb_sitemap/kunena/script.php create mode 100644 plugins/schuweb_sitemap/weblinks/script.php create mode 100644 plugins/schuweb_sitemap/zoo/script.php diff --git a/extension.script.php b/extension.script.php index 9f570ca..eabb572 100644 --- a/extension.script.php +++ b/extension.script.php @@ -13,6 +13,24 @@ class com_schuweb_sitemapInstallerScript extends \Joomla\CMS\Installer\InstallerScript { + /** + * Extension script constructor. + * + * @since 4.0.0 + */ + public function __construct() + { + // Define the minumum versions to be supported. + $this->minimumJoomla = '4.0'; + $this->minimumPhp = '7.4'; + + $oldRelease = $this->getParam('version'); + if (version_compare($oldRelease, "3.2.0", "lt")) { + $this->deleteFolders = array("/components/com_schuweb_sitemap/assets/css"); + } + } + + /** * Runs just before any installation action is performed on the component. * Verifications and pre-requisites should run in this function. @@ -28,13 +46,10 @@ class com_schuweb_sitemapInstallerScript extends \Joomla\CMS\Installer\Installer */ public function preflight($type, $parent) { + parent::preflight(); + if (strcmp($type, "update") !== 0) return; - $oldRelease = $this->getParam('version'); - if (version_compare($oldRelease, "3.2.0", "lt")) { - //delete old obsolete files - $this->deleteFolders = array("/components/com_schuweb_sitemap/assets/css"); - $this->removeFiles(); - } + $this->removeFiles(); } } \ No newline at end of file diff --git a/install.script.php b/install.script.php index 98c787e..8f9cc8e 100644 --- a/install.script.php +++ b/install.script.php @@ -15,19 +15,28 @@ defined('_JEXEC') or die('Restricted access'); /** - * - * @package Joomla.Administrator - * @subpackage com_helloworld * * @copyright Copyright (C) 2019 - 2022 Sven Schultschik. All rights reserved * reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * - * @since __DEPLOY_VERSION__ + * @since */ -class pkg_schuweb_sitemapInstallerScript +class pkg_schuweb_sitemapInstallerScript extends InstallerScript { + /** + * Extension script constructor. + * + * @since 4.0.0 + */ + public function __construct() + { + // Define the minumum versions to be supported. + $this->minimumJoomla = '4.0'; + $this->minimumPhp = '7.4'; + } + /** * Runs right after any installation action is performed on the component. * diff --git a/plugins/schuweb_sitemap/kunena/kunena.xml b/plugins/schuweb_sitemap/kunena/kunena.xml index aa1d5ad..6424f81 100644 --- a/plugins/schuweb_sitemap/kunena/kunena.xml +++ b/plugins/schuweb_sitemap/kunena/kunena.xml @@ -22,6 +22,7 @@ <language tag="nl-NL">nl-NL/plg_schuweb_sitemap_kunena.ini</language> <language tag="ru-RU">ru-RU/plg_schuweb_sitemap_kunena.ini</language> </languages> + <scriptfile>script.php</scriptfile> <config> <fields name="params"> <fieldset name="basic"> diff --git a/plugins/schuweb_sitemap/kunena/script.php b/plugins/schuweb_sitemap/kunena/script.php new file mode 100644 index 0000000..6b70aae --- /dev/null +++ b/plugins/schuweb_sitemap/kunena/script.php @@ -0,0 +1,31 @@ +<?php +/** + * @package Joomla.Language + * + * @copyright (C) 2022 J!German <https://www.jgerman.de> + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Installer\InstallerScript; + +/** + * Installation class to perform additional changes during install/uninstall/update + * + * @since 4.0.0v1 + */ +class Plg_kunenaInstallerScript extends InstallerScript +{ + /** + * Extension script constructor. + * + * @since 4.0.0v1 + */ + public function __construct() + { + // Define the minumum versions to be supported. + $this->minimumJoomla = '4.0'; + $this->minimumPhp = '7.4'; + } +} \ No newline at end of file diff --git a/plugins/schuweb_sitemap/weblinks/script.php b/plugins/schuweb_sitemap/weblinks/script.php new file mode 100644 index 0000000..acf8dd7 --- /dev/null +++ b/plugins/schuweb_sitemap/weblinks/script.php @@ -0,0 +1,31 @@ +<?php +/** + * @package Joomla.Language + * + * @copyright (C) 2022 J!German <https://www.jgerman.de> + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Installer\InstallerScript; + +/** + * Installation class to perform additional changes during install/uninstall/update + * + * @since 4.0.0v1 + */ +class Plg_weblinksInstallerScript extends InstallerScript +{ + /** + * Extension script constructor. + * + * @since 4.0.0v1 + */ + public function __construct() + { + // Define the minumum versions to be supported. + $this->minimumJoomla = '4.0'; + $this->minimumPhp = '7.4'; + } +} \ No newline at end of file diff --git a/plugins/schuweb_sitemap/weblinks/weblinks.xml b/plugins/schuweb_sitemap/weblinks/weblinks.xml index 918f3ae..ae706dd 100644 --- a/plugins/schuweb_sitemap/weblinks/weblinks.xml +++ b/plugins/schuweb_sitemap/weblinks/weblinks.xml @@ -18,6 +18,7 @@ https://raw.githubusercontent.com/svanschu/SchuWeb-Sitemap/master/update/schuweb_sitemap_plugin_weblinks.xml </server> </updateservers> + <scriptfile>script.php</scriptfile> <languages folder="language"> <language tag="en-GB">en-GB/plg_schuweb_sitemap_weblinks.ini</language> <language tag="es-ES">es-ES/plg_schuweb_sitemap_weblinks.ini</language> diff --git a/plugins/schuweb_sitemap/zoo/script.php b/plugins/schuweb_sitemap/zoo/script.php new file mode 100644 index 0000000..30e5fe8 --- /dev/null +++ b/plugins/schuweb_sitemap/zoo/script.php @@ -0,0 +1,31 @@ +<?php +/** + * @package Joomla.Language + * + * @copyright (C) 2022 J!German <https://www.jgerman.de> + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Installer\InstallerScript; + +/** + * Installation class to perform additional changes during install/uninstall/update + * + * @since 4.0.0v1 + */ +class Plg_zooInstallerScript extends InstallerScript +{ + /** + * Extension script constructor. + * + * @since 4.0.0v1 + */ + public function __construct() + { + // Define the minumum versions to be supported. + $this->minimumJoomla = '4.0'; + $this->minimumPhp = '7.4'; + } +} \ No newline at end of file diff --git a/plugins/schuweb_sitemap/zoo/zoo.xml b/plugins/schuweb_sitemap/zoo/zoo.xml index 6de5ff9..b00f957 100644 --- a/plugins/schuweb_sitemap/zoo/zoo.xml +++ b/plugins/schuweb_sitemap/zoo/zoo.xml @@ -14,6 +14,7 @@ <filename plugin="zoo">zoo.php</filename> <filename>index.html</filename> </files> + <scriptfile>script.php</scriptfile> <updateservers> <server type="extension" priority="1" name="SchuWeb Sitemap - Zoo Integration"> https://raw.githubusercontent.com/svanschu/SchuWeb-Sitemap/master/update/schuweb_sitemap_plugin_zoo.xml From 8b369e18486b42798cf8539092dc7f6edb3abe08 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Wed, 23 Feb 2022 21:45:39 +0100 Subject: [PATCH 22/49] detect not installed sitemap plugins for installed extensions --- .../en-GB/en-GB.com_schuweb_sitemap.ini | 1 + .../com_schuweb_sitemap/models/sitemaps.php | 78 ++++++++++++++++--- .../views/sitemaps/view.html.php | 7 +- 3 files changed, 76 insertions(+), 10 deletions(-) diff --git a/administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.ini b/administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.ini index 6dec481..fbe5f2a 100755 --- a/administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.ini +++ b/administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.ini @@ -52,6 +52,7 @@ SCHUWEB_SITEMAP_IMAGES_LINK="Images Sitemap" SCHUWEB_SITEMAP_IMAGES_LINK_TOOLTIP="Go to the “Images” version of the sitemap, use this url to submit your sitemap to Google and other search engines." SCHUWEB_SITEMAP_MESSAGE_EXTENSIONS_DISABLED="SchuWeb Sitemap 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 <a href='index.php?option=com_plugins&view=plugins&filter_folder=schuweb_sitemap'>extensions manager</a>: %s" +SCHUWEB_SITEMAP_MESSAGE_EXTENSIONS_NOT_INSTALLED="SchuWeb Sitemap have detected that the following plugins can help you to get more content in your site map but they are not installed, you have to manually install them. You can find and download them from <a href='https://extensions.schultschik.com/schuweb-sitemap' target="_blank">SchuWeb Extensions Website</a>: %s" COM_SCHUWEB_SITEMAP_SITEMAPS_N_ITEMS_UNPUBLISHED="%d sitemaps successfully unpublished" COM_SCHUWEB_SITEMAP_SITEMAPS_N_ITEMS_UNPUBLISHED_1="%d sitemap successfully unpublished" COM_SCHUWEB_SITEMAP_SITEMAPS_N_ITEMS_PUBLISHED="%d sitemaps successfully published" diff --git a/administrator/components/com_schuweb_sitemap/models/sitemaps.php b/administrator/components/com_schuweb_sitemap/models/sitemaps.php index 82e1151..344d28b 100644 --- a/administrator/components/com_schuweb_sitemap/models/sitemaps.php +++ b/administrator/components/com_schuweb_sitemap/models/sitemaps.php @@ -6,6 +6,8 @@ * @author Sven Schultschik (extensions@schultschik.de) */ // no direct access +use Joomla\Database\ParameterType; + defined('_JEXEC') or die; jimport('joomla.application.component.modellist'); @@ -153,28 +155,86 @@ protected function getListQuery($resolveFKs = true) return $query; } - public function getExtensionsMessage() + /** + * Detect which plugins are installed, but disabled for full sitemap + * + * @return string + * + * @since + */ + public function getExtensionsMessage(): string { - $db = $this->getDbo(); - $query = $db->getQuery(true); - $query->select('e.*'); - $query->from($db->quoteName('#__extensions'). 'AS e'); - $query->join('INNER', '#__extensions AS p ON (SUBSTRING(e.element,5)=p.element or e.element=p.element) and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\''); - $query->where('e.type=\'component\' and e.enabled=1'); + $db = $this->getDbo(); + $query = $db->getQuery(true) + ->select('e.*') + ->from($db->quoteName('#__extensions') . 'AS e') + ->join('INNER', '#__extensions AS p ON (SUBSTRING(e.element,5)=p.element or e.element=p.element) and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\'') + ->where($db->quoteName('e.type') . '=' . $db->quote('component')) + ->where($db->quoteName('e.enabled') . '=1') + ->where($db->quoteName('p.state') . '=0'); $db->setQuery($query); $extensions = $db->loadObjectList(); - if ( count($extensions) ) { + if (count($extensions)) { $sep = $extensionsNameList = ''; foreach ($extensions as $extension) { $extensionsNameList .= "$sep$extension->element"; $sep = ', '; } - return JText::sprintf('SCHUWEB_SITEMAP_MESSAGE_EXTENSIONS_DISABLED',$extensionsNameList); + return JText::sprintf('SCHUWEB_SITEMAP_MESSAGE_EXTENSIONS_DISABLED', $extensionsNameList); } else { return ""; } } + /** + * Detect which plugins are missing for full sitemap + * + * @return string + * + * @since 4.0 + */ + public function getNotInstalledMessage(): string + { + $db = $this->getDbo(); + + $supportedExtensions = array('com_zoo', 'com_weblinks', 'com_kunena'); + + $query = $db->getQuery(true); + $query->select($db->quoteName('e.extension_id') . ',' . $db->quoteName('e.element')) + ->from($db->quoteName('#__extensions') . 'AS e') + ->whereIn($db->quoteName('e.element'), $supportedExtensions, ParameterType::STRING); + + $db->setQuery($query); + $extensions = $db->loadObjectList(); + + $query = $db->getQuery(true); + $query->select($db->quoteName('element')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')) + ->where($db->quoteName('state') . '=0'); + $db->setQuery($query); + $plugins = $db->loadAssocList(); + + $pluginList = array(); + foreach ($plugins as $plugin) { + $pluginList[] = $plugin['element']; + } + + if (count($extensions)) { + $sep = $extensionsNameList = ''; + foreach ($extensions as $extension) { + if (!in_array(substr($extension->element, 4), $pluginList)) { + $extensionsNameList .= "$sep$extension->element"; + $sep = ', '; + } + } + + return JText::sprintf('SCHUWEB_SITEMAP_MESSAGE_EXTENSIONS_NOT_INSTALLED', $extensionsNameList); + } else { + return ""; + } + } } diff --git a/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php b/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php index aeab615..30ec4e5 100644 --- a/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php +++ b/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php @@ -38,7 +38,12 @@ public function display($tpl = null) JFactory::getApplication()->enqueueMessage($message); } - // Check for errors. + $message = $this->get('NotInstalledMessage'); + if ($message) { + JFactory::getApplication()->enqueueMessage($message); + } + + // Check for errors. if (count($errors = $this->get('Errors'))) { JFactory::$application->enqueueMessage(implode("\n", $errors), 'error'); return false; From 60947f65406c812c3d7ec34ab66abae93f1442d0 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Wed, 23 Feb 2022 21:46:27 +0100 Subject: [PATCH 23/49] change code formating --- .../com_schuweb_sitemap/models/sitemaps.php | 57 ++++++++++--------- pkg_schuweb_sitemap.xml | 4 +- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/administrator/components/com_schuweb_sitemap/models/sitemaps.php b/administrator/components/com_schuweb_sitemap/models/sitemaps.php index 344d28b..0c8ef6b 100644 --- a/administrator/components/com_schuweb_sitemap/models/sitemaps.php +++ b/administrator/components/com_schuweb_sitemap/models/sitemaps.php @@ -1,10 +1,11 @@ <?php /** * @version sw.build.version - * @copyright Copyright (C) 2019 - 2022 Sven Schultschik. All rights reserved + * @copyright Copyright (C) 2019 - 2022 Sven Schultschik. All rights reserved * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Sven Schultschik (extensions@schultschik.de) */ + // no direct access use Joomla\Database\ParameterType; @@ -16,7 +17,7 @@ /** * Sitemaps Model Class * - * @package Xmap + * @package SchuWeb_Sitemap * @subpackage com_schuweb_sitemap * @since 2.0 */ @@ -25,9 +26,10 @@ class SchuWeb_SitemapModelSitemaps extends JModelList /** * Constructor. * - * @param array An optional associative array of configuration settings. - * @see JController - * @since 1.6 + * @param array An optional associative array of configuration settings. + * @throws Exception + * @since 1.6 + * @see JController */ public function __construct($config = array()) { @@ -64,16 +66,16 @@ protected function populateState($ordering = null, $direction = null) { // Adjust the context to support modal layouts. if ($layout = JFactory::$application->input->getVar('layout')) { - $this->context .= '.'.$layout; + $this->context .= '.' . $layout; } - $access = $this->getUserStateFromRequest($this->context.'.filter.access', 'filter_access', 0, 'int'); + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); $this->setState('filter.access', $access); - $published = $this->getUserStateFromRequest($this->context.'.filter.published', 'filter_published', ''); + $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); - $search = $this->getUserStateFromRequest($this->context.'.filter.search', 'filter_search'); + $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); // List state information. @@ -87,36 +89,40 @@ protected function populateState($ordering = null, $direction = null) * different modules that might need different sets of data or different * ordering requirements. * - * @param string $id A prefix for the store id. + * @param string $id A prefix for the store id. * * @return string A store id. + * + * @since */ protected function getStoreId($id = '') { // Compile the store id. - $id .= ':'.$this->getState('filter.search'); - $id .= ':'.$this->getState('filter.access'); - $id .= ':'.$this->getState('filter.published'); + $id .= ':' . $this->getState('filter.search'); + $id .= ':' . $this->getState('filter.access'); + $id .= ':' . $this->getState('filter.published'); return parent::getStoreId($id); } /** - * @param boolean True to join selected foreign information + * @param boolean True to join selected foreign information * * @return string + * + * @since */ protected function getListQuery($resolveFKs = true) { - $db = $this->getDbo(); + $db = $this->getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select the required fields from the table. $query->select( - $this->getState( - 'list.select', - 'a.*') + $this->getState( + 'list.select', + 'a.*') ); $query->from('#__schuweb_sitemap AS a'); @@ -126,13 +132,13 @@ protected function getListQuery($resolveFKs = true) // Filter by access level. if ($access = $this->getState('filter.access')) { - $query->where('a.access = ' . (int) $access); + $query->where('a.access = ' . (int)$access); } // Filter by published state $published = $this->getState('filter.published'); if (is_numeric($published)) { - $query->where('a.state = ' . (int) $published); + $query->where('a.state = ' . (int)$published); } else if ($published === '') { $query->where('(a.state = 0 OR a.state = 1)'); } @@ -141,17 +147,16 @@ protected function getListQuery($resolveFKs = true) $search = $this->getState('filter.search'); if (!empty($search)) { if (stripos($search, 'id:') === 0) { - $query->where('a.id = '.(int) substr($search, 3)); - } - else { - $search = $db->Quote('%'.$db->escape($search, true).'%'); - $query->where('(a.title LIKE '.$search.' OR a.alias LIKE '.$search.')'); + $query->where('a.id = ' . (int)substr($search, 3)); + } else { + $search = $db->Quote('%' . $db->escape($search, true) . '%'); + $query->where('(a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search . ')'); } } // Add the list ordering clause. $query->order($db->escape($this->state->get('list.ordering', 'a.title')) . ' ' . $db->escape($this->state->get('list.direction', 'ASC'))); - //echo nl2br(str_replace('#__','jos_',$query)); + return $query; } diff --git a/pkg_schuweb_sitemap.xml b/pkg_schuweb_sitemap.xml index 3e7a763..e74887c 100644 --- a/pkg_schuweb_sitemap.xml +++ b/pkg_schuweb_sitemap.xml @@ -5,9 +5,9 @@ <creationDate>sw.build.date</creationDate> <author>Sven Schultschik</author> <version>sw.build.version</version> - <url>http://extensions.schultschik.de</url> + <url>https://extensions.schultschik.com/</url> <packager>SchuWeb Sitemap</packager> - <packagerurl>http://extensions.schultschik.de</packagerurl> + <packagerurl>https://extensions.schultschik.com/</packagerurl> <license>GNU/GPL</license> <description>The Site Map generator for Joomla!</description> <scriptfile>install.script.php</scriptfile> From 9288971a969b5934a90f2668ee979c81a6c92f79 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Wed, 23 Feb 2022 21:49:37 +0100 Subject: [PATCH 24/49] fix message displayed even if all plugins are installed --- .../components/com_schuweb_sitemap/models/sitemaps.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/administrator/components/com_schuweb_sitemap/models/sitemaps.php b/administrator/components/com_schuweb_sitemap/models/sitemaps.php index 0c8ef6b..eb318f9 100644 --- a/administrator/components/com_schuweb_sitemap/models/sitemaps.php +++ b/administrator/components/com_schuweb_sitemap/models/sitemaps.php @@ -236,7 +236,9 @@ public function getNotInstalledMessage(): string $sep = ', '; } } + } + if (!empty($extensionsNameList)) { return JText::sprintf('SCHUWEB_SITEMAP_MESSAGE_EXTENSIONS_NOT_INSTALLED', $extensionsNameList); } else { return ""; From 65dc9124257023435f53e8bd56316882de27b1c3 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 25 Feb 2022 01:33:35 +0100 Subject: [PATCH 25/49] #101 rename com_content to content --- build/builder.xml | 4 ++-- pkg_schuweb_sitemap.xml | 2 +- .../com_content.php => content/content.php} | 0 .../com_content.xml => content/content.xml} | 19 ++++++++----------- .../{com_content => content}/index.html | 0 .../plg_schuweb_sitemap_com_content.ini} | 0 .../plg_schuweb_sitemap_com_content.ini} | 0 .../plg_schuweb_sitemap_com_content.ini} | 0 .../plg_schuweb_sitemap_com_content.ini} | 0 .../plg_schuweb_sitemap_com_content.ini} | 0 .../plg_schuweb_sitemap_com_content.ini} | 0 11 files changed, 11 insertions(+), 14 deletions(-) rename plugins/schuweb_sitemap/{com_content/com_content.php => content/content.php} (100%) rename plugins/schuweb_sitemap/{com_content/com_content.xml => content/content.xml} (92%) rename plugins/schuweb_sitemap/{com_content => content}/index.html (100%) rename plugins/schuweb_sitemap/{com_content/language/cs-CZ.plg_schuweb_sitemap_com_content.ini => content/language/cs-CZ/plg_schuweb_sitemap_com_content.ini} (100%) rename plugins/schuweb_sitemap/{com_content/language/en-GB.plg_schuweb_sitemap_com_content.ini => content/language/en-GB/plg_schuweb_sitemap_com_content.ini} (100%) rename plugins/schuweb_sitemap/{com_content/language/es-ES.plg_schuweb_sitemap_com_content.ini => content/language/es-ES/plg_schuweb_sitemap_com_content.ini} (100%) rename plugins/schuweb_sitemap/{com_content/language/fa-IR.plg_schuweb_sitemap_com_content.ini => content/language/fa-IR/plg_schuweb_sitemap_com_content.ini} (100%) rename plugins/schuweb_sitemap/{com_content/language/nl-NL.plg_schuweb_sitemap_com_content.ini => content/language/nl-NL/plg_schuweb_sitemap_com_content.ini} (100%) rename plugins/schuweb_sitemap/{com_content/language/ru-RU.plg_schuweb_sitemap_com_content.ini => content/language/ru-RU/plg_schuweb_sitemap_com_content.ini} (100%) diff --git a/build/builder.xml b/build/builder.xml index aaac4ef..22a83d1 100644 --- a/build/builder.xml +++ b/build/builder.xml @@ -34,7 +34,7 @@ </fileset> </zip> <zip destfile="${builddir}/tmp/packages/plg_content_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_content"> + <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/content"> <include name="**"/> </fileset> </zip> @@ -76,7 +76,7 @@ <copy file="${src}/extension.script.php" todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap" /> <copy todir="${builddir}/tmp/schuweb_sitemap/plugins"> <fileset dir="${plugins}/schuweb_sitemap"> - <include name="com_content/**"/> + <include name="content/**"/> <include name="com_newsfeeds/**"/> </fileset> </copy> diff --git a/pkg_schuweb_sitemap.xml b/pkg_schuweb_sitemap.xml index e74887c..87ae6c9 100644 --- a/pkg_schuweb_sitemap.xml +++ b/pkg_schuweb_sitemap.xml @@ -13,7 +13,7 @@ <scriptfile>install.script.php</scriptfile> <files folder="packages"> <file type="component" id="com_schuweb_sitemap">com_schuweb_sitemap_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_content" group="schuweb_sitemap">plg_content_sw.build.version_sw.build.dstamp.zip</file> + <file type="plugin" id="content" group="schuweb_sitemap">plg_content_sw.build.version_sw.build.dstamp.zip</file> <file type="plugin" id="com_newsfeeds" group="schuweb_sitemap">plg_newsfeeds_sw.build.version_sw.build.dstamp.zip</file> </files> <updateservers> diff --git a/plugins/schuweb_sitemap/com_content/com_content.php b/plugins/schuweb_sitemap/content/content.php similarity index 100% rename from plugins/schuweb_sitemap/com_content/com_content.php rename to plugins/schuweb_sitemap/content/content.php diff --git a/plugins/schuweb_sitemap/com_content/com_content.xml b/plugins/schuweb_sitemap/content/content.xml similarity index 92% rename from plugins/schuweb_sitemap/com_content/com_content.xml rename to plugins/schuweb_sitemap/content/content.xml index b633b78..1617f43 100644 --- a/plugins/schuweb_sitemap/com_content/com_content.xml +++ b/plugins/schuweb_sitemap/content/content.xml @@ -5,25 +5,22 @@ <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> <copyright>GNU GPL</copyright> - <license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license> + <license>https://www.gnu.org/copyleft/gpl.html GNU/GPL</license> <authorEmail>extensions@schultschik.de</authorEmail> <authorUrl>extensions.schultschik.de</authorUrl> <version>sw.build.version</version> <description>SCHUWEB_SITEMAP_CONTENT_PLUGIN_DESCRIPTION</description> <files> - <filename plugin="com_content">com_content.php</filename> + <filename plugin="content">content.php</filename> <filename>index.html</filename> </files> <languages folder="language"> - <!-- - these files will be installed in the administrator/language folder. - --> - <language tag="en-GB">en-GB.plg_schuweb_sitemap_com_content.ini</language> - <language tag="es-ES">es-ES.plg_schuweb_sitemap_com_content.ini</language> - <language tag="fa-IR">fa-IR.plg_schuweb_sitemap_com_content.ini</language> - <language tag="cs-CZ">cs-CZ.plg_schuweb_sitemap_com_content.ini</language> - <language tag="nl-NL">nl-NL.plg_schuweb_sitemap_com_content.ini</language> - <language tag="ru-RU">ru-RU.plg_schuweb_sitemap_com_content.ini</language> + <language tag="en-GB">en-GB/plg_schuweb_sitemap_content.ini</language> + <language tag="es-ES">es-ES/plg_schuweb_sitemap_content.ini</language> + <language tag="fa-IR">fa-IR/plg_schuweb_sitemap_content.ini</language> + <language tag="cs-CZ">cs-CZ/plg_schuweb_sitemap_content.ini</language> + <language tag="nl-NL">nl-NL/plg_schuweb_sitemap_content.ini</language> + <language tag="ru-RU">ru-RU/plg_schuweb_sitemap_content.ini</language> </languages> <config> <fields name="params"> diff --git a/plugins/schuweb_sitemap/com_content/index.html b/plugins/schuweb_sitemap/content/index.html similarity index 100% rename from plugins/schuweb_sitemap/com_content/index.html rename to plugins/schuweb_sitemap/content/index.html diff --git a/plugins/schuweb_sitemap/com_content/language/cs-CZ.plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/cs-CZ/plg_schuweb_sitemap_com_content.ini similarity index 100% rename from plugins/schuweb_sitemap/com_content/language/cs-CZ.plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/cs-CZ/plg_schuweb_sitemap_com_content.ini diff --git a/plugins/schuweb_sitemap/com_content/language/en-GB.plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/en-GB/plg_schuweb_sitemap_com_content.ini similarity index 100% rename from plugins/schuweb_sitemap/com_content/language/en-GB.plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/en-GB/plg_schuweb_sitemap_com_content.ini diff --git a/plugins/schuweb_sitemap/com_content/language/es-ES.plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/es-ES/plg_schuweb_sitemap_com_content.ini similarity index 100% rename from plugins/schuweb_sitemap/com_content/language/es-ES.plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/es-ES/plg_schuweb_sitemap_com_content.ini diff --git a/plugins/schuweb_sitemap/com_content/language/fa-IR.plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/fa-IR/plg_schuweb_sitemap_com_content.ini similarity index 100% rename from plugins/schuweb_sitemap/com_content/language/fa-IR.plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/fa-IR/plg_schuweb_sitemap_com_content.ini diff --git a/plugins/schuweb_sitemap/com_content/language/nl-NL.plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/nl-NL/plg_schuweb_sitemap_com_content.ini similarity index 100% rename from plugins/schuweb_sitemap/com_content/language/nl-NL.plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/nl-NL/plg_schuweb_sitemap_com_content.ini diff --git a/plugins/schuweb_sitemap/com_content/language/ru-RU.plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/ru-RU/plg_schuweb_sitemap_com_content.ini similarity index 100% rename from plugins/schuweb_sitemap/com_content/language/ru-RU.plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/ru-RU/plg_schuweb_sitemap_com_content.ini From d66ea1df632471973847800b04c9ca645c7857ef Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 25 Feb 2022 01:34:27 +0100 Subject: [PATCH 26/49] #101 fix builder for plugins --- build/builder_plugins.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/builder_plugins.xml b/build/builder_plugins.xml index 9e5ec0f..f391a07 100644 --- a/build/builder_plugins.xml +++ b/build/builder_plugins.xml @@ -19,17 +19,17 @@ <target name="build" depends="prepare, copy"> <zip destfile="${builddir}/plg_zoo_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/schuweb_sitemap_zoo"> + <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/zoo"> <include name="**"/> </fileset> </zip> <zip destfile="${builddir}/plg_weblinks_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/schuweb_sitemap_weblinks"> + <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/weblinks"> <include name="**"/> </fileset> </zip> <zip destfile="${builddir}/plg_kunena_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/schuweb_sitemap_kunena"> + <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/kunena"> <include name="**"/> </fileset> </zip> @@ -45,9 +45,9 @@ <target name="copy"> <copy todir="${builddir}/tmp/schuweb_sitemap/plugins"> <fileset dir="${plugins}/schuweb_sitemap"> - <include name="schuweb_sitemap_zoo/**"/> - <include name="schuweb_sitemap_weblinks/**"/> - <include name="schuweb_sitemap_kunena/**"/> + <include name="zoo/**"/> + <include name="weblinks/**"/> + <include name="kunena/**"/> </fileset> </copy> <echo msg="Copy was successfull"/> From 3bee53e118b506468b7e3c1a71141a23ade80346 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 25 Feb 2022 01:40:09 +0100 Subject: [PATCH 27/49] #101 rename com_newsfeeds to newsfeeds --- build/builder.xml | 4 ++-- pkg_schuweb_sitemap.xml | 2 +- .../{com_newsfeeds => newsfeeds}/index.html | 0 .../en-GB/plg_schuweb_sitemap_com_newsfeeds.ini} | 0 .../nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini} | 0 .../ru-RU/plg_schuweb_sitemap_com_newsfeeds.ini} | 0 .../com_newsfeeds.php => newsfeeds/newsfeeds.php} | 0 .../com_newsfeeds.xml => newsfeeds/newsfeeds.xml} | 10 +++++----- 8 files changed, 8 insertions(+), 8 deletions(-) rename plugins/schuweb_sitemap/{com_newsfeeds => newsfeeds}/index.html (100%) rename plugins/schuweb_sitemap/{com_newsfeeds/language/en-GB.plg_schuweb_sitemap_com_newsfeeds.ini => newsfeeds/language/en-GB/plg_schuweb_sitemap_com_newsfeeds.ini} (100%) rename plugins/schuweb_sitemap/{com_newsfeeds/language/nl-NL.plg_schuweb_sitemap_com_newsfeeds.ini => newsfeeds/language/nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini} (100%) rename plugins/schuweb_sitemap/{com_newsfeeds/language/ru-RU.plg_schuweb_sitemap_com_newsfeeds.ini => newsfeeds/language/ru-RU/plg_schuweb_sitemap_com_newsfeeds.ini} (100%) rename plugins/schuweb_sitemap/{com_newsfeeds/com_newsfeeds.php => newsfeeds/newsfeeds.php} (100%) rename plugins/schuweb_sitemap/{com_newsfeeds/com_newsfeeds.xml => newsfeeds/newsfeeds.xml} (93%) diff --git a/build/builder.xml b/build/builder.xml index 22a83d1..5440639 100644 --- a/build/builder.xml +++ b/build/builder.xml @@ -39,7 +39,7 @@ </fileset> </zip> <zip destfile="${builddir}/tmp/packages/plg_newsfeeds_${build.version}_${build.date.DSTAMP}.zip"> - <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/com_newsfeeds"> + <fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/newsfeeds"> <include name="**"/> </fileset> </zip> @@ -77,7 +77,7 @@ <copy todir="${builddir}/tmp/schuweb_sitemap/plugins"> <fileset dir="${plugins}/schuweb_sitemap"> <include name="content/**"/> - <include name="com_newsfeeds/**"/> + <include name="newsfeeds/**"/> </fileset> </copy> <echo msg="Copy was successfull"/> diff --git a/pkg_schuweb_sitemap.xml b/pkg_schuweb_sitemap.xml index 87ae6c9..658223a 100644 --- a/pkg_schuweb_sitemap.xml +++ b/pkg_schuweb_sitemap.xml @@ -14,7 +14,7 @@ <files folder="packages"> <file type="component" id="com_schuweb_sitemap">com_schuweb_sitemap_sw.build.version_sw.build.dstamp.zip</file> <file type="plugin" id="content" group="schuweb_sitemap">plg_content_sw.build.version_sw.build.dstamp.zip</file> - <file type="plugin" id="com_newsfeeds" group="schuweb_sitemap">plg_newsfeeds_sw.build.version_sw.build.dstamp.zip</file> + <file type="plugin" id="newsfeeds" group="schuweb_sitemap">plg_newsfeeds_sw.build.version_sw.build.dstamp.zip</file> </files> <updateservers> <server type="extension" priority="1" name="SchuWeb Sitemap Update Site">https://raw.githubusercontent.com/svanschu/SchuWeb-Sitemap/master/update/schuweb_sitemap.xml</server> diff --git a/plugins/schuweb_sitemap/com_newsfeeds/index.html b/plugins/schuweb_sitemap/newsfeeds/index.html similarity index 100% rename from plugins/schuweb_sitemap/com_newsfeeds/index.html rename to plugins/schuweb_sitemap/newsfeeds/index.html diff --git a/plugins/schuweb_sitemap/com_newsfeeds/language/en-GB.plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/newsfeeds/language/en-GB/plg_schuweb_sitemap_com_newsfeeds.ini similarity index 100% rename from plugins/schuweb_sitemap/com_newsfeeds/language/en-GB.plg_schuweb_sitemap_com_newsfeeds.ini rename to plugins/schuweb_sitemap/newsfeeds/language/en-GB/plg_schuweb_sitemap_com_newsfeeds.ini diff --git a/plugins/schuweb_sitemap/com_newsfeeds/language/nl-NL.plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/newsfeeds/language/nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini similarity index 100% rename from plugins/schuweb_sitemap/com_newsfeeds/language/nl-NL.plg_schuweb_sitemap_com_newsfeeds.ini rename to plugins/schuweb_sitemap/newsfeeds/language/nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini diff --git a/plugins/schuweb_sitemap/com_newsfeeds/language/ru-RU.plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/newsfeeds/language/ru-RU/plg_schuweb_sitemap_com_newsfeeds.ini similarity index 100% rename from plugins/schuweb_sitemap/com_newsfeeds/language/ru-RU.plg_schuweb_sitemap_com_newsfeeds.ini rename to plugins/schuweb_sitemap/newsfeeds/language/ru-RU/plg_schuweb_sitemap_com_newsfeeds.ini diff --git a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.php similarity index 100% rename from plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.php rename to plugins/schuweb_sitemap/newsfeeds/newsfeeds.php diff --git a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml similarity index 93% rename from plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml rename to plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml index 21db75c..c745568 100644 --- a/plugins/schuweb_sitemap/com_newsfeeds/com_newsfeeds.xml +++ b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml @@ -4,19 +4,19 @@ <author>Sven Schultschik</author> <creationDate>sw.build.date</creationDate> <copyright>GNU GPL</copyright> - <license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license> + <license>https://www.gnu.org/copyleft/gpl.html GNU/GPL</license> <authorEmail>sven@schultschik.de</authorEmail> <authorUrl>www.schultschik.de</authorUrl> <version>sw.build.version</version> <description>SCHUWEB_SITEMAP_NF_PLUGIN_DESCRIPTION</description> <files> - <filename plugin="com_newsfeeds">com_newsfeeds.php</filename> + <filename plugin="newsfeeds">newsfeeds.php</filename> <filename>index.html</filename> </files> <languages folder="language"> - <language tag="en-GB">en-GB.plg_schuweb_sitemap_com_newsfeeds.ini</language> - <language tag="nl-NL">nl-NL.plg_schuweb_sitemap_com_newsfeeds.ini</language> - <language tag="ru-RU">ru-RU.plg_schuweb_sitemap_com_newsfeeds.ini</language> + <language tag="en-GB">en-GB/plg_schuweb_sitemap_com_newsfeeds.ini</language> + <language tag="nl-NL">nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini</language> + <language tag="ru-RU">ru-RU/plg_schuweb_sitemap_com_newsfeeds.ini</language> </languages> <config> <fields name="params"> From 07ce1a3852036e6f6cd81e76e5b6301eac0828ab Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 25 Feb 2022 22:36:41 +0100 Subject: [PATCH 28/49] rename language files to J4 naming convention --- ...eb_sitemap.ini => com_schuweb_sitemap.ini} | 0 ...ap.sys.ini => com_schuweb_sitemap.sys.ini} | 0 ...eb_sitemap.ini => com_schuweb_sitemap.ini} | 0 ...ap.sys.ini => com_schuweb_sitemap.sys.ini} | 0 ...eb_sitemap.ini => com_schuweb_sitemap.ini} | 0 ...ap.sys.ini => com_schuweb_sitemap.sys.ini} | 0 ...eb_sitemap.ini => com_schuweb_sitemap.ini} | 0 ...ap.sys.ini => com_schuweb_sitemap.sys.ini} | 0 ...eb_sitemap.ini => com_schuweb_sitemap.ini} | 0 ...ap.sys.ini => com_schuweb_sitemap.sys.ini} | 0 ...eb_sitemap.ini => com_schuweb_sitemap.ini} | 0 ...ap.sys.ini => com_schuweb_sitemap.sys.ini} | 0 .../com_schuweb_sitemap/schuweb_sitemap.xml | 36 +++++++++---------- .../com_schuweb_sitemap.ini} | 0 .../com_schuweb_sitemap.ini} | 0 .../com_schuweb_sitemap.ini} | 0 .../com_schuweb_sitemap.ini} | 0 .../com_schuweb_sitemap.ini} | 0 .../com_schuweb_sitemap.ini} | 0 19 files changed, 18 insertions(+), 18 deletions(-) rename administrator/components/com_schuweb_sitemap/language/cs-CZ/{cs-CZ.com_schuweb_sitemap.ini => com_schuweb_sitemap.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/cs-CZ/{cs-CZ.com_schuweb_sitemap.sys.ini => com_schuweb_sitemap.sys.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/en-GB/{en-GB.com_schuweb_sitemap.ini => com_schuweb_sitemap.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/en-GB/{en-GB.com_schuweb_sitemap.sys.ini => com_schuweb_sitemap.sys.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/es-ES/{es-ES.com_schuweb_sitemap.ini => com_schuweb_sitemap.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/es-ES/{es-ES.com_schuweb_sitemap.sys.ini => com_schuweb_sitemap.sys.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/fa-IR/{fa-IR.com_schuweb_sitemap.ini => com_schuweb_sitemap.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/fa-IR/{fa-IR.com_schuweb_sitemap.sys.ini => com_schuweb_sitemap.sys.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/nl-NL/{nl-NL.com_schuweb_sitemap.ini => com_schuweb_sitemap.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/nl-NL/{nl-NL.com_schuweb_sitemap.sys.ini => com_schuweb_sitemap.sys.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/ru-RU/{ru-RU.com_schuweb_sitemap.ini => com_schuweb_sitemap.ini} (100%) rename administrator/components/com_schuweb_sitemap/language/ru-RU/{ru-RU.com_schuweb_sitemap.sys.ini => com_schuweb_sitemap.sys.ini} (100%) rename components/com_schuweb_sitemap/language/{cs-CZ.com_schuweb_sitemap.ini => cs-CZ/com_schuweb_sitemap.ini} (100%) rename components/com_schuweb_sitemap/language/{en-GB.com_schuweb_sitemap.ini => en-GB/com_schuweb_sitemap.ini} (100%) rename components/com_schuweb_sitemap/language/{es-ES.com_schuweb_sitemap.ini => es-ES/com_schuweb_sitemap.ini} (100%) rename components/com_schuweb_sitemap/language/{fa-IR.com_schuweb_sitemap.ini => fa-IR/com_schuweb_sitemap.ini} (100%) rename components/com_schuweb_sitemap/language/{nl-NL.com_schuweb_sitemap.ini => nl-NL/com_schuweb_sitemap.ini} (100%) rename components/com_schuweb_sitemap/language/{ru-RU.com_schuweb_sitemap.ini => ru-RU/com_schuweb_sitemap.ini} (100%) diff --git a/administrator/components/com_schuweb_sitemap/language/cs-CZ/cs-CZ.com_schuweb_sitemap.ini b/administrator/components/com_schuweb_sitemap/language/cs-CZ/com_schuweb_sitemap.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/cs-CZ/cs-CZ.com_schuweb_sitemap.ini rename to administrator/components/com_schuweb_sitemap/language/cs-CZ/com_schuweb_sitemap.ini diff --git a/administrator/components/com_schuweb_sitemap/language/cs-CZ/cs-CZ.com_schuweb_sitemap.sys.ini b/administrator/components/com_schuweb_sitemap/language/cs-CZ/com_schuweb_sitemap.sys.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/cs-CZ/cs-CZ.com_schuweb_sitemap.sys.ini rename to administrator/components/com_schuweb_sitemap/language/cs-CZ/com_schuweb_sitemap.sys.ini diff --git a/administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.ini b/administrator/components/com_schuweb_sitemap/language/en-GB/com_schuweb_sitemap.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.ini rename to administrator/components/com_schuweb_sitemap/language/en-GB/com_schuweb_sitemap.ini diff --git a/administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.sys.ini b/administrator/components/com_schuweb_sitemap/language/en-GB/com_schuweb_sitemap.sys.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/en-GB/en-GB.com_schuweb_sitemap.sys.ini rename to administrator/components/com_schuweb_sitemap/language/en-GB/com_schuweb_sitemap.sys.ini diff --git a/administrator/components/com_schuweb_sitemap/language/es-ES/es-ES.com_schuweb_sitemap.ini b/administrator/components/com_schuweb_sitemap/language/es-ES/com_schuweb_sitemap.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/es-ES/es-ES.com_schuweb_sitemap.ini rename to administrator/components/com_schuweb_sitemap/language/es-ES/com_schuweb_sitemap.ini diff --git a/administrator/components/com_schuweb_sitemap/language/es-ES/es-ES.com_schuweb_sitemap.sys.ini b/administrator/components/com_schuweb_sitemap/language/es-ES/com_schuweb_sitemap.sys.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/es-ES/es-ES.com_schuweb_sitemap.sys.ini rename to administrator/components/com_schuweb_sitemap/language/es-ES/com_schuweb_sitemap.sys.ini diff --git a/administrator/components/com_schuweb_sitemap/language/fa-IR/fa-IR.com_schuweb_sitemap.ini b/administrator/components/com_schuweb_sitemap/language/fa-IR/com_schuweb_sitemap.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/fa-IR/fa-IR.com_schuweb_sitemap.ini rename to administrator/components/com_schuweb_sitemap/language/fa-IR/com_schuweb_sitemap.ini diff --git a/administrator/components/com_schuweb_sitemap/language/fa-IR/fa-IR.com_schuweb_sitemap.sys.ini b/administrator/components/com_schuweb_sitemap/language/fa-IR/com_schuweb_sitemap.sys.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/fa-IR/fa-IR.com_schuweb_sitemap.sys.ini rename to administrator/components/com_schuweb_sitemap/language/fa-IR/com_schuweb_sitemap.sys.ini diff --git a/administrator/components/com_schuweb_sitemap/language/nl-NL/nl-NL.com_schuweb_sitemap.ini b/administrator/components/com_schuweb_sitemap/language/nl-NL/com_schuweb_sitemap.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/nl-NL/nl-NL.com_schuweb_sitemap.ini rename to administrator/components/com_schuweb_sitemap/language/nl-NL/com_schuweb_sitemap.ini diff --git a/administrator/components/com_schuweb_sitemap/language/nl-NL/nl-NL.com_schuweb_sitemap.sys.ini b/administrator/components/com_schuweb_sitemap/language/nl-NL/com_schuweb_sitemap.sys.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/nl-NL/nl-NL.com_schuweb_sitemap.sys.ini rename to administrator/components/com_schuweb_sitemap/language/nl-NL/com_schuweb_sitemap.sys.ini diff --git a/administrator/components/com_schuweb_sitemap/language/ru-RU/ru-RU.com_schuweb_sitemap.ini b/administrator/components/com_schuweb_sitemap/language/ru-RU/com_schuweb_sitemap.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/ru-RU/ru-RU.com_schuweb_sitemap.ini rename to administrator/components/com_schuweb_sitemap/language/ru-RU/com_schuweb_sitemap.ini diff --git a/administrator/components/com_schuweb_sitemap/language/ru-RU/ru-RU.com_schuweb_sitemap.sys.ini b/administrator/components/com_schuweb_sitemap/language/ru-RU/com_schuweb_sitemap.sys.ini similarity index 100% rename from administrator/components/com_schuweb_sitemap/language/ru-RU/ru-RU.com_schuweb_sitemap.sys.ini rename to administrator/components/com_schuweb_sitemap/language/ru-RU/com_schuweb_sitemap.sys.ini diff --git a/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml b/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml index cd25b0e..43e8e41 100644 --- a/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml +++ b/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml @@ -36,12 +36,12 @@ <folder>views</folder> </files> <languages folder="front/language"> - <language tag="en-GB">en-GB.com_schuweb_sitemap.ini</language> - <language tag="es-ES">es-ES.com_schuweb_sitemap.ini</language> - <language tag="fa-IR">fa-IR.com_schuweb_sitemap.ini</language> - <language tag="cs-CZ">cs-CZ.com_schuweb_sitemap.ini</language> - <language tag="nl-NL">nl-NL.com_schuweb_sitemap.ini</language> - <language tag="ru-RU">ru-RU.com_schuweb_sitemap.ini</language> + <language tag="en-GB">en-GB/com_schuweb_sitemap.ini</language> + <language tag="es-ES">es-ES/com_schuweb_sitemap.ini</language> + <language tag="fa-IR">fa-IR/com_schuweb_sitemap.ini</language> + <language tag="cs-CZ">cs-CZ/com_schuweb_sitemap.ini</language> + <language tag="nl-NL">nl-NL/com_schuweb_sitemap.ini</language> + <language tag="ru-RU">ru-RU/com_schuweb_sitemap.ini</language> </languages> <images folder="admin"> <folder>images</folder> @@ -63,18 +63,18 @@ <folder>views</folder> </files> <languages folder="admin/language"> - <language tag="en-GB">en-GB/en-GB.com_schuweb_sitemap.ini</language> - <language tag="en-GB">en-GB/en-GB.com_schuweb_sitemap.sys.ini</language> - <language tag="es-ES">es-ES/es-ES.com_schuweb_sitemap.ini</language> - <language tag="es-ES">es-ES/es-ES.com_schuweb_sitemap.sys.ini</language> - <language tag="fa-IR">fa-IR/fa-IR.com_schuweb_sitemap.ini</language> - <language tag="fa-IR">fa-IR/fa-IR.com_schuweb_sitemap.sys.ini</language> - <language tag="cs-CZ">cs-CZ/cs-CZ.com_schuweb_sitemap.ini</language> - <language tag="cs-CZ">cs-CZ/cs-CZ.com_schuweb_sitemap.sys.ini</language> - <language tag="nl-NL">nl-NL/nl-NL.com_schuweb_sitemap.ini</language> - <language tag="nl-NL">nl-NL/nl-NL.com_schuweb_sitemap.sys.ini</language> - <language tag="ru-RU">ru-RU/ru-RU.com_schuweb_sitemap.ini</language> - <language tag="ru-RU">ru-RU/ru-RU.com_schuweb_sitemap.sys.ini</language> + <language tag="en-GB">en-GB/com_schuweb_sitemap.ini</language> + <language tag="en-GB">en-GB/com_schuweb_sitemap.sys.ini</language> + <language tag="es-ES">es-ES/com_schuweb_sitemap.ini</language> + <language tag="es-ES">es-ES/com_schuweb_sitemap.sys.ini</language> + <language tag="fa-IR">fa-IR/com_schuweb_sitemap.ini</language> + <language tag="fa-IR">fa-IR/com_schuweb_sitemap.sys.ini</language> + <language tag="cs-CZ">cs-CZ/com_schuweb_sitemap.ini</language> + <language tag="cs-CZ">cs-CZ/com_schuweb_sitemap.sys.ini</language> + <language tag="nl-NL">nl-NL/com_schuweb_sitemap.ini</language> + <language tag="nl-NL">nl-NL/com_schuweb_sitemap.sys.ini</language> + <language tag="ru-RU">ru-RU/com_schuweb_sitemap.ini</language> + <language tag="ru-RU">ru-RU/com_schuweb_sitemap.sys.ini</language> </languages> <images folder="admin"> <folder>images</folder> diff --git a/components/com_schuweb_sitemap/language/cs-CZ.com_schuweb_sitemap.ini b/components/com_schuweb_sitemap/language/cs-CZ/com_schuweb_sitemap.ini similarity index 100% rename from components/com_schuweb_sitemap/language/cs-CZ.com_schuweb_sitemap.ini rename to components/com_schuweb_sitemap/language/cs-CZ/com_schuweb_sitemap.ini diff --git a/components/com_schuweb_sitemap/language/en-GB.com_schuweb_sitemap.ini b/components/com_schuweb_sitemap/language/en-GB/com_schuweb_sitemap.ini similarity index 100% rename from components/com_schuweb_sitemap/language/en-GB.com_schuweb_sitemap.ini rename to components/com_schuweb_sitemap/language/en-GB/com_schuweb_sitemap.ini diff --git a/components/com_schuweb_sitemap/language/es-ES.com_schuweb_sitemap.ini b/components/com_schuweb_sitemap/language/es-ES/com_schuweb_sitemap.ini similarity index 100% rename from components/com_schuweb_sitemap/language/es-ES.com_schuweb_sitemap.ini rename to components/com_schuweb_sitemap/language/es-ES/com_schuweb_sitemap.ini diff --git a/components/com_schuweb_sitemap/language/fa-IR.com_schuweb_sitemap.ini b/components/com_schuweb_sitemap/language/fa-IR/com_schuweb_sitemap.ini similarity index 100% rename from components/com_schuweb_sitemap/language/fa-IR.com_schuweb_sitemap.ini rename to components/com_schuweb_sitemap/language/fa-IR/com_schuweb_sitemap.ini diff --git a/components/com_schuweb_sitemap/language/nl-NL.com_schuweb_sitemap.ini b/components/com_schuweb_sitemap/language/nl-NL/com_schuweb_sitemap.ini similarity index 100% rename from components/com_schuweb_sitemap/language/nl-NL.com_schuweb_sitemap.ini rename to components/com_schuweb_sitemap/language/nl-NL/com_schuweb_sitemap.ini diff --git a/components/com_schuweb_sitemap/language/ru-RU.com_schuweb_sitemap.ini b/components/com_schuweb_sitemap/language/ru-RU/com_schuweb_sitemap.ini similarity index 100% rename from components/com_schuweb_sitemap/language/ru-RU.com_schuweb_sitemap.ini rename to components/com_schuweb_sitemap/language/ru-RU/com_schuweb_sitemap.ini From 0631b8d269d4f86c9fdb3b1cdada05666222cf95 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 25 Feb 2022 23:02:01 +0100 Subject: [PATCH 29/49] #101 remove old sql if statements --- .../com_schuweb_sitemap/helpers/schuweb_sitemap.php | 4 ++-- .../components/com_schuweb_sitemap/models/sitemaps.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php b/administrator/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php index 0892304..d706d9f 100644 --- a/administrator/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php +++ b/administrator/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php @@ -24,7 +24,7 @@ class SchuWeb_SitemapHelper * * @return mixed * - * @since __DEPLOY_VERSION__ + * @since */ public static function getExtensionsList() { @@ -33,7 +33,7 @@ public static function getExtensionsList() $query->select('e.*') ->from($db->quoteName('#__extensions') . 'AS e') - ->join('INNER', '#__extensions AS p ON e.element=p.element and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\'') + ->join('INNER', '#__extensions AS p ON SUBSTRING(e.element,5)=p.element and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\'') ->where('e.type=\'component\' and e.enabled=1'); $db->setQuery($query); diff --git a/administrator/components/com_schuweb_sitemap/models/sitemaps.php b/administrator/components/com_schuweb_sitemap/models/sitemaps.php index eb318f9..09a77a9 100644 --- a/administrator/components/com_schuweb_sitemap/models/sitemaps.php +++ b/administrator/components/com_schuweb_sitemap/models/sitemaps.php @@ -173,7 +173,7 @@ public function getExtensionsMessage(): string $query = $db->getQuery(true) ->select('e.*') ->from($db->quoteName('#__extensions') . 'AS e') - ->join('INNER', '#__extensions AS p ON (SUBSTRING(e.element,5)=p.element or e.element=p.element) and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\'') + ->join('INNER', '#__extensions AS p ON SUBSTRING(e.element,5)=p.element and p.enabled=0 and p.type=\'plugin\' and p.folder=\'schuweb_sitemap\'') ->where($db->quoteName('e.type') . '=' . $db->quote('component')) ->where($db->quoteName('e.enabled') . '=1') ->where($db->quoteName('p.state') . '=0'); From f30a770cd1875383ff6fd0070122f6b5e75aeb11 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Thu, 17 Mar 2022 00:04:15 +0100 Subject: [PATCH 30/49] #101 add install script and migration path for content plugin --- plugins/schuweb_sitemap/content/content.xml | 1 + plugins/schuweb_sitemap/content/script.php | 107 ++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 plugins/schuweb_sitemap/content/script.php diff --git a/plugins/schuweb_sitemap/content/content.xml b/plugins/schuweb_sitemap/content/content.xml index 1617f43..b2afe2e 100644 --- a/plugins/schuweb_sitemap/content/content.xml +++ b/plugins/schuweb_sitemap/content/content.xml @@ -14,6 +14,7 @@ <filename plugin="content">content.php</filename> <filename>index.html</filename> </files> + <scriptfile>script.php</scriptfile> <languages folder="language"> <language tag="en-GB">en-GB/plg_schuweb_sitemap_content.ini</language> <language tag="es-ES">es-ES/plg_schuweb_sitemap_content.ini</language> diff --git a/plugins/schuweb_sitemap/content/script.php b/plugins/schuweb_sitemap/content/script.php new file mode 100644 index 0000000..cd1ea21 --- /dev/null +++ b/plugins/schuweb_sitemap/content/script.php @@ -0,0 +1,107 @@ +<?php +/** + * @package Joomla.Language + * + * @copyright (C) 2022 J!German <https://www.jgerman.de> + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Factory; +use Joomla\CMS\Installer\InstallerScript; + +/** + * Installation class to perform additional changes during install/uninstall/update + * + * @since 4.0.0v1 + */ +class Plgschuweb_sitemapcontentInstallerScript extends InstallerScript +{ + /** + * Extension script constructor. + * + * @since 4.0.0 + */ + public function __construct() + { + // Define the minumum versions to be supported. + $this->minimumJoomla = '4.0'; + $this->minimumPhp = '7.4'; + } + + /** + * Runs right after any installation action is performed on the component. + * + * @param string $type - Type of PostFlight action. Possible values + * are: + * - * install + * - * update + * - * discover_install + * @param stdClass $parent - Parent object calling object. + * + * @return void + * + * @throws Exception + * @since 4.0 + */ + public function postflight($type, $parent) + { + $app = Factory::getApplication(); + $db = Factory::getDbo(); + + $query = $db->getQuery(true); + $query->select( + $db->quoteName('enabled') . ',' + . $db->quoteName('access') . ',' + . $db->quoteName('protected') . ',' + . $db->quoteName('params')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('element') . '=' . $db->quote('com_content')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + + $db->setQuery($query); + + $plugin = $db->loadAssoc(); + + if ($plugin) { + if ($plugin['enabled'] === 1) { + $columns = array( + $db->quoteName('enabled') . '= 1', + $db->quoteName('access') . '=' . $plugin['access'], + $db->quoteName('protected') . '=' . $plugin['protected'], + $db->quoteName('params') . '=' . $db->quote($plugin['params']) + ); + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($columns) + ->where($db->quoteName('element') . '=' . $db->quote('content')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try { + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not copy settings from old SchuWeb Sitemap plugin content. You need to do it manually.",$app::MSG_ERROR); + } + + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($db->quoteName('enabled') . '=0') + ->where($db->quoteName('element') . '=' . $db->quote('com_content')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try{ + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not disable old SchuWeb Sitemap Plugin com_content. Please check and disable manually."); + } + } + + $app->enqueueMessage("Plugin com_content for SchuWeb Sitemap detected. Please check if all settings are transferred correctly and uninstall the old com_content plugin."); + } + + } +} \ No newline at end of file From b4b8118d937a740d85df2c132224c96cd64d2205 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Thu, 17 Mar 2022 00:16:21 +0100 Subject: [PATCH 31/49] fix wrong language file name for content plugin #101 --- ...eb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} | 0 ...eb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} | 0 ...eb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} | 0 ...eb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} | 0 ...eb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} | 0 ...eb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename plugins/schuweb_sitemap/content/language/cs-CZ/{plg_schuweb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} (100%) rename plugins/schuweb_sitemap/content/language/en-GB/{plg_schuweb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} (100%) rename plugins/schuweb_sitemap/content/language/es-ES/{plg_schuweb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} (100%) rename plugins/schuweb_sitemap/content/language/fa-IR/{plg_schuweb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} (100%) rename plugins/schuweb_sitemap/content/language/nl-NL/{plg_schuweb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} (100%) rename plugins/schuweb_sitemap/content/language/ru-RU/{plg_schuweb_sitemap_com_content.ini => plg_schuweb_sitemap_content.ini} (100%) diff --git a/plugins/schuweb_sitemap/content/language/cs-CZ/plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/cs-CZ/plg_schuweb_sitemap_content.ini similarity index 100% rename from plugins/schuweb_sitemap/content/language/cs-CZ/plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/cs-CZ/plg_schuweb_sitemap_content.ini diff --git a/plugins/schuweb_sitemap/content/language/en-GB/plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/en-GB/plg_schuweb_sitemap_content.ini similarity index 100% rename from plugins/schuweb_sitemap/content/language/en-GB/plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/en-GB/plg_schuweb_sitemap_content.ini diff --git a/plugins/schuweb_sitemap/content/language/es-ES/plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/es-ES/plg_schuweb_sitemap_content.ini similarity index 100% rename from plugins/schuweb_sitemap/content/language/es-ES/plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/es-ES/plg_schuweb_sitemap_content.ini diff --git a/plugins/schuweb_sitemap/content/language/fa-IR/plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/fa-IR/plg_schuweb_sitemap_content.ini similarity index 100% rename from plugins/schuweb_sitemap/content/language/fa-IR/plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/fa-IR/plg_schuweb_sitemap_content.ini diff --git a/plugins/schuweb_sitemap/content/language/nl-NL/plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/nl-NL/plg_schuweb_sitemap_content.ini similarity index 100% rename from plugins/schuweb_sitemap/content/language/nl-NL/plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/nl-NL/plg_schuweb_sitemap_content.ini diff --git a/plugins/schuweb_sitemap/content/language/ru-RU/plg_schuweb_sitemap_com_content.ini b/plugins/schuweb_sitemap/content/language/ru-RU/plg_schuweb_sitemap_content.ini similarity index 100% rename from plugins/schuweb_sitemap/content/language/ru-RU/plg_schuweb_sitemap_com_content.ini rename to plugins/schuweb_sitemap/content/language/ru-RU/plg_schuweb_sitemap_content.ini From 3d8cbe9a281c8c34a4c6631981b01d4c82702531 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 18 Mar 2022 02:45:52 +0100 Subject: [PATCH 32/49] #101 add install script migration path to kunena plugin --- plugins/schuweb_sitemap/kunena/script.php | 77 ++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/plugins/schuweb_sitemap/kunena/script.php b/plugins/schuweb_sitemap/kunena/script.php index 6b70aae..831a8a4 100644 --- a/plugins/schuweb_sitemap/kunena/script.php +++ b/plugins/schuweb_sitemap/kunena/script.php @@ -15,7 +15,7 @@ * * @since 4.0.0v1 */ -class Plg_kunenaInstallerScript extends InstallerScript +class Plgschuweb_sitemapkunenaInstallerScript extends InstallerScript { /** * Extension script constructor. @@ -28,4 +28,79 @@ public function __construct() $this->minimumJoomla = '4.0'; $this->minimumPhp = '7.4'; } + + /** + * Runs right after any installation action is performed on the component. + * + * @param string $type - Type of PostFlight action. Possible values + * are: + * - * install + * - * update + * - * discover_install + * @param stdClass $parent - Parent object calling object. + * + * @return void + * + * @throws Exception + * @since 4.0 + */ + public function postflight($type, $parent) + { + $app = Factory::getApplication(); + $db = Factory::getDbo(); + + $query = $db->getQuery(true); + $query->select( + $db->quoteName('enabled') . ',' + . $db->quoteName('access') . ',' + . $db->quoteName('protected') . ',' + . $db->quoteName('params')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('element') . '=' . $db->quote('com_kunena')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + + $db->setQuery($query); + + $plugin = $db->loadAssoc(); + + if ($plugin) { + if ($plugin['enabled'] === 1) { + $columns = array( + $db->quoteName('enabled') . '= 1', + $db->quoteName('access') . '=' . $plugin['access'], + $db->quoteName('protected') . '=' . $plugin['protected'], + $db->quoteName('params') . '=' . $db->quote($plugin['params']) + ); + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($columns) + ->where($db->quoteName('element') . '=' . $db->quote('kunena')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try { + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not copy settings from old SchuWeb Sitemap plugin kunena. You need to do it manually.", $app::MSG_ERROR); + } + + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($db->quoteName('enabled') . '=0') + ->where($db->quoteName('element') . '=' . $db->quote('com_kunena')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try { + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not disable old SchuWeb Sitemap Plugin com_kunena. Please check and disable manually."); + } + } + + $app->enqueueMessage("Plugin com_kunena for SchuWeb Sitemap detected. Please check if all settings are transferred correctly and uninstall the old com_kunena plugin."); + } + + } } \ No newline at end of file From c1db10a75fcf023f50568f5a11ab4f230e29c354 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 18 Mar 2022 02:56:33 +0100 Subject: [PATCH 33/49] #101 add install script and migration path to newsfeeds plugin --- .../schuweb_sitemap/newsfeeds/newsfeeds.xml | 1 + plugins/schuweb_sitemap/newsfeeds/script.php | 106 ++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 plugins/schuweb_sitemap/newsfeeds/script.php diff --git a/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml index c745568..5b3ee69 100644 --- a/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml +++ b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml @@ -13,6 +13,7 @@ <filename plugin="newsfeeds">newsfeeds.php</filename> <filename>index.html</filename> </files> + <scriptfile>script.php</scriptfile> <languages folder="language"> <language tag="en-GB">en-GB/plg_schuweb_sitemap_com_newsfeeds.ini</language> <language tag="nl-NL">nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini</language> diff --git a/plugins/schuweb_sitemap/newsfeeds/script.php b/plugins/schuweb_sitemap/newsfeeds/script.php new file mode 100644 index 0000000..af66847 --- /dev/null +++ b/plugins/schuweb_sitemap/newsfeeds/script.php @@ -0,0 +1,106 @@ +<?php +/** + * @package Joomla.Language + * + * @copyright (C) 2022 J!German <https://www.jgerman.de> + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Installer\InstallerScript; + +/** + * Installation class to perform additional changes during install/uninstall/update + * + * @since 4.0.0v1 + */ +class Plgschuweb_sitemapnewsfeedsInstallerScript extends InstallerScript +{ + /** + * Extension script constructor. + * + * @since 4.0.0v1 + */ + public function __construct() + { + // Define the minumum versions to be supported. + $this->minimumJoomla = '4.0'; + $this->minimumPhp = '7.4'; + } + + /** + * Runs right after any installation action is performed on the component. + * + * @param string $type - Type of PostFlight action. Possible values + * are: + * - * install + * - * update + * - * discover_install + * @param stdClass $parent - Parent object calling object. + * + * @return void + * + * @throws Exception + * @since 4.0 + */ + public function postflight($type, $parent) + { + $app = Factory::getApplication(); + $db = Factory::getDbo(); + + $query = $db->getQuery(true); + $query->select( + $db->quoteName('enabled') . ',' + . $db->quoteName('access') . ',' + . $db->quoteName('protected') . ',' + . $db->quoteName('params')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('element') . '=' . $db->quote('com_newsfeeds')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + + $db->setQuery($query); + + $plugin = $db->loadAssoc(); + + if ($plugin) { + if ($plugin['enabled'] === 1) { + $columns = array( + $db->quoteName('enabled') . '= 1', + $db->quoteName('access') . '=' . $plugin['access'], + $db->quoteName('protected') . '=' . $plugin['protected'], + $db->quoteName('params') . '=' . $db->quote($plugin['params']) + ); + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($columns) + ->where($db->quoteName('element') . '=' . $db->quote('newsfeeds')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try { + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not copy settings from old SchuWeb Sitemap plugin newsfeeds. You need to do it manually.", $app::MSG_ERROR); + } + + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($db->quoteName('enabled') . '=0') + ->where($db->quoteName('element') . '=' . $db->quote('com_newsfeeds')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try { + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not disable old SchuWeb Sitemap Plugin com_newsfeeds. Please check and disable manually."); + } + } + + $app->enqueueMessage("Plugin com_newsfeeds for SchuWeb Sitemap detected. Please check if all settings are transferred correctly and uninstall the old com_newsfeeds plugin."); + } + + } +} \ No newline at end of file From fca54a0ee0a365a79658b177793920a0c97e262a Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 18 Mar 2022 02:59:02 +0100 Subject: [PATCH 34/49] #101 add install script migration path to weblinks plugin --- plugins/schuweb_sitemap/weblinks/script.php | 76 ++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/plugins/schuweb_sitemap/weblinks/script.php b/plugins/schuweb_sitemap/weblinks/script.php index acf8dd7..8ecb46e 100644 --- a/plugins/schuweb_sitemap/weblinks/script.php +++ b/plugins/schuweb_sitemap/weblinks/script.php @@ -15,7 +15,7 @@ * * @since 4.0.0v1 */ -class Plg_weblinksInstallerScript extends InstallerScript +class Plgschuweb_sitemapweblinksInstallerScript extends InstallerScript { /** * Extension script constructor. @@ -28,4 +28,78 @@ public function __construct() $this->minimumJoomla = '4.0'; $this->minimumPhp = '7.4'; } + + /** + * Runs right after any installation action is performed on the component. + * + * @param string $type - Type of PostFlight action. Possible values + * are: + * - * install + * - * update + * - * discover_install + * @param stdClass $parent - Parent object calling object. + * + * @return void + * + * @throws Exception + * @since 4.0 + */ + public function postflight($type, $parent) + { + $app = Factory::getApplication(); + $db = Factory::getDbo(); + + $query = $db->getQuery(true); + $query->select( + $db->quoteName('enabled') . ',' + . $db->quoteName('access') . ',' + . $db->quoteName('protected') . ',' + . $db->quoteName('params')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('element') . '=' . $db->quote('com_weblinks')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + + $db->setQuery($query); + + $plugin = $db->loadAssoc(); + + if ($plugin) { + if ($plugin['enabled'] === 1) { + $columns = array( + $db->quoteName('enabled') . '= 1', + $db->quoteName('access') . '=' . $plugin['access'], + $db->quoteName('protected') . '=' . $plugin['protected'], + $db->quoteName('params') . '=' . $db->quote($plugin['params']) + ); + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($columns) + ->where($db->quoteName('element') . '=' . $db->quote('weblinks')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try { + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not copy settings from old SchuWeb Sitemap plugin weblinks. You need to do it manually.", $app::MSG_ERROR); + } + + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($db->quoteName('enabled') . '=0') + ->where($db->quoteName('element') . '=' . $db->quote('com_weblinks')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try { + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not disable old SchuWeb Sitemap Plugin com_weblinks. Please check and disable manually."); + } + } + + $app->enqueueMessage("Plugin com_weblinks for SchuWeb Sitemap detected. Please check if all settings are transferred correctly and uninstall the old com_weblinks plugin."); + } + } } \ No newline at end of file From 613cdc27dcc22f18646dbbe49907d0fc4f5bbcd8 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 18 Mar 2022 03:01:10 +0100 Subject: [PATCH 35/49] #101 add install script migration path to zoo plugin --- plugins/schuweb_sitemap/zoo/script.php | 76 +++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/plugins/schuweb_sitemap/zoo/script.php b/plugins/schuweb_sitemap/zoo/script.php index 30e5fe8..2a8d5c1 100644 --- a/plugins/schuweb_sitemap/zoo/script.php +++ b/plugins/schuweb_sitemap/zoo/script.php @@ -15,7 +15,7 @@ * * @since 4.0.0v1 */ -class Plg_zooInstallerScript extends InstallerScript +class Plgschuweb_sitemapzooInstallerScript extends InstallerScript { /** * Extension script constructor. @@ -28,4 +28,78 @@ public function __construct() $this->minimumJoomla = '4.0'; $this->minimumPhp = '7.4'; } + + /** + * Runs right after any installation action is performed on the component. + * + * @param string $type - Type of PostFlight action. Possible values + * are: + * - * install + * - * update + * - * discover_install + * @param stdClass $parent - Parent object calling object. + * + * @return void + * + * @throws Exception + * @since 4.0 + */ + public function postflight($type, $parent) + { + $app = Factory::getApplication(); + $db = Factory::getDbo(); + + $query = $db->getQuery(true); + $query->select( + $db->quoteName('enabled') . ',' + . $db->quoteName('access') . ',' + . $db->quoteName('protected') . ',' + . $db->quoteName('params')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('element') . '=' . $db->quote('com_zoo')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + + $db->setQuery($query); + + $plugin = $db->loadAssoc(); + + if ($plugin) { + if ($plugin['enabled'] === 1) { + $columns = array( + $db->quoteName('enabled') . '= 1', + $db->quoteName('access') . '=' . $plugin['access'], + $db->quoteName('protected') . '=' . $plugin['protected'], + $db->quoteName('params') . '=' . $db->quote($plugin['params']) + ); + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($columns) + ->where($db->quoteName('element') . '=' . $db->quote('zoo')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try { + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not copy settings from old SchuWeb Sitemap plugin zoo. You need to do it manually.",$app::MSG_ERROR); + } + + $query = $db->getQuery(true); + $query->update($db->quoteName('#__extensions')) + ->set($db->quoteName('enabled') . '=0') + ->where($db->quoteName('element') . '=' . $db->quote('com_zoo')) + ->where($db->quoteName('type') . '=' . $db->quote('plugin')) + ->where($db->quoteName('folder') . '=' . $db->quote('schuweb_sitemap')); + $db->setQuery($query); + try{ + $db->execute(); + } catch (\RuntimeException $ex) { + $app->enqueueMessage("Could not disable old SchuWeb Sitemap Plugin com_zoo. Please check and disable manually."); + } + } + + $app->enqueueMessage("Plugin com_zoo for SchuWeb Sitemap detected. Please check if all settings are transferred correctly and uninstall the old com_zoo plugin."); + } + } } \ No newline at end of file From 11995b14a7b1afed031ebfbb6e4879fbe8f17f07 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 18 Mar 2022 03:06:12 +0100 Subject: [PATCH 36/49] fix header comment --- .../schuweb_sitemap/com_virtuemart/com_virtuemart.php | 2 +- plugins/schuweb_sitemap/content/content.php | 2 +- plugins/schuweb_sitemap/content/script.php | 11 +++++++---- plugins/schuweb_sitemap/kunena/kunena.php | 2 +- plugins/schuweb_sitemap/kunena/script.php | 11 +++++++---- plugins/schuweb_sitemap/newsfeeds/newsfeeds.php | 2 +- plugins/schuweb_sitemap/newsfeeds/script.php | 11 +++++++---- plugins/schuweb_sitemap/weblinks/script.php | 11 +++++++---- plugins/schuweb_sitemap/weblinks/weblinks.php | 2 +- plugins/schuweb_sitemap/zoo/script.php | 11 +++++++---- plugins/schuweb_sitemap/zoo/zoo.php | 2 +- 11 files changed, 41 insertions(+), 26 deletions(-) diff --git a/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.php b/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.php index a0c0b9c..2e8d29c 100644 --- a/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.php +++ b/plugins/schuweb_sitemap/com_virtuemart/com_virtuemart.php @@ -2,7 +2,7 @@ /** * @package SchuWeb Sitemap * - * @Copyright (C) 2010-2021 Sven Schultschik. All rights reserved + * @Copyright (C) 2010 - 2022 Sven Schultschik. All rights reserved * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.schultschik.de **/ diff --git a/plugins/schuweb_sitemap/content/content.php b/plugins/schuweb_sitemap/content/content.php index 2f388b3..2f81e85 100644 --- a/plugins/schuweb_sitemap/content/content.php +++ b/plugins/schuweb_sitemap/content/content.php @@ -1,7 +1,7 @@ <?php /** * @version sw.build.version - * @copyright (C) 2010-2021 Sven Schultschik. All rights reserved + * @copyright (C) 2010 - 2022 Sven Schultschik. All rights reserved * @author Sven Schultschik * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.schultschik.de diff --git a/plugins/schuweb_sitemap/content/script.php b/plugins/schuweb_sitemap/content/script.php index cd1ea21..6db1038 100644 --- a/plugins/schuweb_sitemap/content/script.php +++ b/plugins/schuweb_sitemap/content/script.php @@ -1,10 +1,13 @@ <?php /** - * @package Joomla.Language + * @package SchuWeb Sitemap * - * @copyright (C) 2022 J!German <https://www.jgerman.de> - * @license GNU General Public License version 2 or later; see LICENSE.txt - */ + * @version sw.build.version + * @author Sven Schultschik + * @copyright (C) 2022 Sven Schultschik. All rights reserved + * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL + * @link http://www.schultschik.de + **/ defined('_JEXEC') or die; diff --git a/plugins/schuweb_sitemap/kunena/kunena.php b/plugins/schuweb_sitemap/kunena/kunena.php index bf6e980..6a2352e 100644 --- a/plugins/schuweb_sitemap/kunena/kunena.php +++ b/plugins/schuweb_sitemap/kunena/kunena.php @@ -2,7 +2,7 @@ /** * @package SchuWeb Sitemap * - * @copyright (C) 2010-2022 Sven Schultschik. All rights reserved + * @copyright (C) 2010 - 2022 Sven Schultschik. All rights reserved * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.schultschik.de **/ diff --git a/plugins/schuweb_sitemap/kunena/script.php b/plugins/schuweb_sitemap/kunena/script.php index 831a8a4..083fa54 100644 --- a/plugins/schuweb_sitemap/kunena/script.php +++ b/plugins/schuweb_sitemap/kunena/script.php @@ -1,10 +1,13 @@ <?php /** - * @package Joomla.Language + * @package SchuWeb Sitemap * - * @copyright (C) 2022 J!German <https://www.jgerman.de> - * @license GNU General Public License version 2 or later; see LICENSE.txt - */ + * @version sw.build.version + * @author Sven Schultschik + * @copyright (C) 2022 Sven Schultschik. All rights reserved + * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL + * @link http://www.schultschik.de + **/ defined('_JEXEC') or die; diff --git a/plugins/schuweb_sitemap/newsfeeds/newsfeeds.php b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.php index df18634..6282c11 100644 --- a/plugins/schuweb_sitemap/newsfeeds/newsfeeds.php +++ b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.php @@ -4,7 +4,7 @@ * * @version sw.build.version * @author Sven Schultschik - * @copyright (C) 2010-2021 Sven Schultschik. All rights reserved + * @copyright (C) 2010 - 2022 Sven Schultschik. All rights reserved * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.schultschik.de **/ diff --git a/plugins/schuweb_sitemap/newsfeeds/script.php b/plugins/schuweb_sitemap/newsfeeds/script.php index af66847..9bf18f8 100644 --- a/plugins/schuweb_sitemap/newsfeeds/script.php +++ b/plugins/schuweb_sitemap/newsfeeds/script.php @@ -1,10 +1,13 @@ <?php /** - * @package Joomla.Language + * @package SchuWeb Sitemap * - * @copyright (C) 2022 J!German <https://www.jgerman.de> - * @license GNU General Public License version 2 or later; see LICENSE.txt - */ + * @version sw.build.version + * @author Sven Schultschik + * @copyright (C) 2022 Sven Schultschik. All rights reserved + * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL + * @link http://www.schultschik.de + **/ defined('_JEXEC') or die; diff --git a/plugins/schuweb_sitemap/weblinks/script.php b/plugins/schuweb_sitemap/weblinks/script.php index 8ecb46e..e391ad1 100644 --- a/plugins/schuweb_sitemap/weblinks/script.php +++ b/plugins/schuweb_sitemap/weblinks/script.php @@ -1,10 +1,13 @@ <?php /** - * @package Joomla.Language + * @package SchuWeb Sitemap * - * @copyright (C) 2022 J!German <https://www.jgerman.de> - * @license GNU General Public License version 2 or later; see LICENSE.txt - */ + * @version sw.build.version + * @author Sven Schultschik + * @copyright (C) 2022 Sven Schultschik. All rights reserved + * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL + * @link http://www.schultschik.de + **/ defined('_JEXEC') or die; diff --git a/plugins/schuweb_sitemap/weblinks/weblinks.php b/plugins/schuweb_sitemap/weblinks/weblinks.php index d073e76..45b15ca 100644 --- a/plugins/schuweb_sitemap/weblinks/weblinks.php +++ b/plugins/schuweb_sitemap/weblinks/weblinks.php @@ -4,7 +4,7 @@ * * @version sw.build.version * @author Sven Schultschik - * @copyright (C) 2010-2021 Sven Schultschik. All rights reserved + * @copyright (C) 2010 - 2022 Sven Schultschik. All rights reserved * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL * @link http://www.schultschik.de **/ diff --git a/plugins/schuweb_sitemap/zoo/script.php b/plugins/schuweb_sitemap/zoo/script.php index 2a8d5c1..3f14dfc 100644 --- a/plugins/schuweb_sitemap/zoo/script.php +++ b/plugins/schuweb_sitemap/zoo/script.php @@ -1,10 +1,13 @@ <?php /** - * @package Joomla.Language + * @package SchuWeb Sitemap * - * @copyright (C) 2022 J!German <https://www.jgerman.de> - * @license GNU General Public License version 2 or later; see LICENSE.txt - */ + * @version sw.build.version + * @author Sven Schultschik + * @copyright (C) 2022 Sven Schultschik. All rights reserved + * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL + * @link http://www.schultschik.de + **/ defined('_JEXEC') or die; diff --git a/plugins/schuweb_sitemap/zoo/zoo.php b/plugins/schuweb_sitemap/zoo/zoo.php index e598dc6..80c715c 100644 --- a/plugins/schuweb_sitemap/zoo/zoo.php +++ b/plugins/schuweb_sitemap/zoo/zoo.php @@ -1,7 +1,7 @@ <?php /** * @version sw.build.version - * @copyright (C) 2010-2021 Sven Schultschik. All rights reserved + * @copyright (C) 2010 - 2022 Sven Schultschik. All rights reserved * @author Sven Schultschik * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * @link http://www.schultschik.de From d17c488e490d3969515f6c848931e9c23dfa38f8 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Fri, 18 Mar 2022 03:15:30 +0100 Subject: [PATCH 37/49] prepare update XML for kunena plugin --- plugins/schuweb_sitemap/kunena/kunena.xml | 5 +++++ update/schuweb_sitemap_plugin_kunena.xml | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 update/schuweb_sitemap_plugin_kunena.xml diff --git a/plugins/schuweb_sitemap/kunena/kunena.xml b/plugins/schuweb_sitemap/kunena/kunena.xml index 6424f81..1b12250 100644 --- a/plugins/schuweb_sitemap/kunena/kunena.xml +++ b/plugins/schuweb_sitemap/kunena/kunena.xml @@ -14,6 +14,11 @@ <filename plugin="kunena">kunena.php</filename> <filename>index.html</filename> </files> + <updateservers> + <server type="extension" priority="1" name="SchuWeb Sitemap - SchuWeb Sitemap Integration for Kunena"> + https://raw.githubusercontent.com/svanschu/SchuWeb-Sitemap/master/update/schuweb_sitemap_plugin_kunena.xml + </server> + </updateservers> <languages folder="language"> <language tag="en-GB">en-GB/plg_schuweb_sitemap_kunena.ini</language> <language tag="es-ES">es-ES/plg_schuweb_sitemap_kunena.ini</language> diff --git a/update/schuweb_sitemap_plugin_kunena.xml b/update/schuweb_sitemap_plugin_kunena.xml new file mode 100644 index 0000000..70cd323 --- /dev/null +++ b/update/schuweb_sitemap_plugin_kunena.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<updates> + <update> + <name>SchuWeb Sitemap - Kunena Plugin</name> + <description>Plugin to support extension Kunena in SchuWeb Sitemap - Sitemap Generator for Joomla!</description> + <element>schuweb_sitemap_kunena</element> + <type>plugin</type> + <version>4.0.0</version> + <infourl title="SchuWeb Sitemap - Kunena Plugin 4.0.0">https://extensions.schultschik.com/products/schuweb-sitemap/schuweb-sitemap-3-5-0</infourl> + <downloads> + <downloadurl type="full" format="zip">https://github.com/svanschu/SchuWeb-Sitemap/releases/download/3.5.0/plg_zoo_3.4.0_20211001.zip</downloadurl> + </downloads> + <tags> + <tag>stable</tag> + </tags> + <maintainer>Sven Schultschik</maintainer> + <maintainerurl>http://www.schultschik.de</maintainerurl> + <targetplatform name="joomla" version="4"/> + <php_minimum>7.4</php_minimum> + </update> +</updates> From 035fcfe1d4f5cfcd920e348edfd9bb24ea90d99e Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Tue, 22 Mar 2022 20:37:20 +0100 Subject: [PATCH 38/49] remove forgotten debug symbol --- components/com_schuweb_sitemap/helpers/schuweb_sitemap.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php b/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php index ed9c35b..fe11670 100644 --- a/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php +++ b/components/com_schuweb_sitemap/helpers/schuweb_sitemap.php @@ -164,7 +164,6 @@ public static function prepareMenuItem($item) $className = 'schuweb_sitemap_' . substr($item->option,4); $obj = new $className; if (method_exists($obj, 'prepareMenuItem')) { - die(); $obj->prepareMenuItem($item,$extensions[substr($item->option,4)]->params); } } From e8e4ee01c6420ff0ed47bbe48fbbb92c600f8faf Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Tue, 22 Mar 2022 20:37:38 +0100 Subject: [PATCH 39/49] fix content plugin class name --- plugins/schuweb_sitemap/content/content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/schuweb_sitemap/content/content.php b/plugins/schuweb_sitemap/content/content.php index 2f81e85..c2ea4e9 100644 --- a/plugins/schuweb_sitemap/content/content.php +++ b/plugins/schuweb_sitemap/content/content.php @@ -21,7 +21,7 @@ * for other component, I suggest you to take a look to another plugis as * they are usually most simple. ;) */ -class schuweb_sitemap_com_content +class schuweb_sitemap_content { /** * This function is called before a menu item is printed. We use it to set the From 33188b590b0cb801a5150e3a8a125d14e309569c Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Tue, 22 Mar 2022 23:22:51 +0100 Subject: [PATCH 40/49] ignore symlink --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 807e9bf..baa92f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ \.idea/ /.docker/**/db/ /.docker/**/public/ + +plugins/schuweb_sitemap/dpcalendar From 470b314ebf4b716db581d49cd350bf6536b91229 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Tue, 29 Mar 2022 20:41:09 +0200 Subject: [PATCH 41/49] don't disable com_kunena --- install.script.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.script.php b/install.script.php index 8f9cc8e..b03b38c 100644 --- a/install.script.php +++ b/install.script.php @@ -171,7 +171,7 @@ private function upgradeJ3J4() if (version_compare(JVERSION, '4', 'ge')) { - $unsupported = array('com_sobipro', 'com_virtuemart', 'com_kunena'); + $unsupported = array('com_sobipro', 'com_virtuemart'); foreach ($unsupported as $componentName) { $db = Factory::getDbo(); From 7fe53512c83547a67452918b1991758fe6c2d069 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Tue, 29 Mar 2022 20:50:32 +0200 Subject: [PATCH 42/49] remove J4 subfolder. any new version will be J4 --- build/builder.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/builder.xml b/build/builder.xml index 5440639..5e3d7ba 100644 --- a/build/builder.xml +++ b/build/builder.xml @@ -15,7 +15,7 @@ <format property="DATE" pattern="%d. %B %Y" locale="en_GB"/> </tstamp> <!-- Set the directory where the packages should be saved. Relative to the build dir --> - <property name="builddir" value="./../../packages/${extension_name}/J4" override="true"/> + <property name="builddir" value="./../../packages/${extension_name}" override="true"/> <!-- Declare Project src files --> <property name="src" value="./.." override="true"/> <property name="plugins" value="${src}/plugins"/> From 4093b71850a40d6e97910c5c1b6de252b7e4a106 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Wed, 30 Mar 2022 23:34:06 +0200 Subject: [PATCH 43/49] fix wrong language file names of newsfeed plugin --- ..._com_newsfeeds.ini => plg_schuweb_sitemap_newsfeeds.ini} | 0 ..._com_newsfeeds.ini => plg_schuweb_sitemap_newsfeeds.ini} | 0 ..._com_newsfeeds.ini => plg_schuweb_sitemap_newsfeeds.ini} | 0 plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename plugins/schuweb_sitemap/newsfeeds/language/en-GB/{plg_schuweb_sitemap_com_newsfeeds.ini => plg_schuweb_sitemap_newsfeeds.ini} (100%) rename plugins/schuweb_sitemap/newsfeeds/language/nl-NL/{plg_schuweb_sitemap_com_newsfeeds.ini => plg_schuweb_sitemap_newsfeeds.ini} (100%) rename plugins/schuweb_sitemap/newsfeeds/language/ru-RU/{plg_schuweb_sitemap_com_newsfeeds.ini => plg_schuweb_sitemap_newsfeeds.ini} (100%) diff --git a/plugins/schuweb_sitemap/newsfeeds/language/en-GB/plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/newsfeeds/language/en-GB/plg_schuweb_sitemap_newsfeeds.ini similarity index 100% rename from plugins/schuweb_sitemap/newsfeeds/language/en-GB/plg_schuweb_sitemap_com_newsfeeds.ini rename to plugins/schuweb_sitemap/newsfeeds/language/en-GB/plg_schuweb_sitemap_newsfeeds.ini diff --git a/plugins/schuweb_sitemap/newsfeeds/language/nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/newsfeeds/language/nl-NL/plg_schuweb_sitemap_newsfeeds.ini similarity index 100% rename from plugins/schuweb_sitemap/newsfeeds/language/nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini rename to plugins/schuweb_sitemap/newsfeeds/language/nl-NL/plg_schuweb_sitemap_newsfeeds.ini diff --git a/plugins/schuweb_sitemap/newsfeeds/language/ru-RU/plg_schuweb_sitemap_com_newsfeeds.ini b/plugins/schuweb_sitemap/newsfeeds/language/ru-RU/plg_schuweb_sitemap_newsfeeds.ini similarity index 100% rename from plugins/schuweb_sitemap/newsfeeds/language/ru-RU/plg_schuweb_sitemap_com_newsfeeds.ini rename to plugins/schuweb_sitemap/newsfeeds/language/ru-RU/plg_schuweb_sitemap_newsfeeds.ini diff --git a/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml index 5b3ee69..bdd6379 100644 --- a/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml +++ b/plugins/schuweb_sitemap/newsfeeds/newsfeeds.xml @@ -15,9 +15,9 @@ </files> <scriptfile>script.php</scriptfile> <languages folder="language"> - <language tag="en-GB">en-GB/plg_schuweb_sitemap_com_newsfeeds.ini</language> - <language tag="nl-NL">nl-NL/plg_schuweb_sitemap_com_newsfeeds.ini</language> - <language tag="ru-RU">ru-RU/plg_schuweb_sitemap_com_newsfeeds.ini</language> + <language tag="en-GB">en-GB/plg_schuweb_sitemap_newsfeeds.ini</language> + <language tag="nl-NL">nl-NL/plg_schuweb_sitemap_newsfeeds.ini</language> + <language tag="ru-RU">ru-RU/plg_schuweb_sitemap_newsfeeds.ini</language> </languages> <config> <fields name="params"> From a205b6f720fa6c41dcf7dc09541ead37981d62f8 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Wed, 30 Mar 2022 23:34:38 +0200 Subject: [PATCH 44/49] fix missing using in newsfeeds install script --- plugins/schuweb_sitemap/newsfeeds/script.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/schuweb_sitemap/newsfeeds/script.php b/plugins/schuweb_sitemap/newsfeeds/script.php index 9bf18f8..27ac355 100644 --- a/plugins/schuweb_sitemap/newsfeeds/script.php +++ b/plugins/schuweb_sitemap/newsfeeds/script.php @@ -11,6 +11,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Factory; use Joomla\CMS\Installer\InstallerScript; /** From 49afa0172d1176402dc11204a9c91dd0dc5fa89d Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Wed, 30 Mar 2022 23:35:04 +0200 Subject: [PATCH 45/49] fix missing using in package installer script --- install.script.php | 1 + 1 file changed, 1 insertion(+) diff --git a/install.script.php b/install.script.php index b03b38c..d16c00d 100644 --- a/install.script.php +++ b/install.script.php @@ -10,6 +10,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Installer\Installer; +use Joomla\CMS\Installer\InstallerScript; use Joomla\CMS\Language\Text; defined('_JEXEC') or die('Restricted access'); From 2b45ed984568f90bb41f756366e90f987b72b57b Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Wed, 30 Mar 2022 23:35:48 +0200 Subject: [PATCH 46/49] fix to few arguments on preflight call --- extension.script.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.script.php b/extension.script.php index eabb572..12fe826 100644 --- a/extension.script.php +++ b/extension.script.php @@ -46,7 +46,7 @@ public function __construct() */ public function preflight($type, $parent) { - parent::preflight(); + parent::preflight($type, $parent); if (strcmp($type, "update") !== 0) return; From 50b0c13304fafa4680b02f670e92e34e67882f4c Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 2 Apr 2022 00:05:12 +0200 Subject: [PATCH 47/49] fix database error access can't be set to null --- .../com_schuweb_sitemap/schuweb_sitemap.xml | 15 ++++++++++----- .../{install => sql}/index.html | 0 .../{install => sql}/install.postgresql.sql | 2 +- .../{install => sql}/install.utf8.sql | 2 +- .../{install => sql}/uninstall.postgresql.sql | 0 .../{install => sql}/uninstall.utf8.sql | 0 .../sql/updates/mysql/4.0.0.sql | 1 + .../sql/updates/postgresql/4.0.0.sql | 3 +++ .../com_schuweb_sitemap/tables/sitemap.php | 3 ++- 9 files changed, 18 insertions(+), 8 deletions(-) rename administrator/components/com_schuweb_sitemap/{install => sql}/index.html (100%) rename administrator/components/com_schuweb_sitemap/{install => sql}/install.postgresql.sql (96%) rename administrator/components/com_schuweb_sitemap/{install => sql}/install.utf8.sql (96%) rename administrator/components/com_schuweb_sitemap/{install => sql}/uninstall.postgresql.sql (100%) rename administrator/components/com_schuweb_sitemap/{install => sql}/uninstall.utf8.sql (100%) create mode 100644 administrator/components/com_schuweb_sitemap/sql/updates/mysql/4.0.0.sql create mode 100644 administrator/components/com_schuweb_sitemap/sql/updates/postgresql/4.0.0.sql diff --git a/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml b/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml index 43e8e41..b269850 100644 --- a/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml +++ b/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml @@ -11,14 +11,19 @@ <description>SchuWeb Sitemap - Sitemap Generator for Joomla!</description> <install folder="admin"> <sql> - <file driver="mysql" charset="utf8">install/install.utf8.sql</file> - <file driver="postgresql" charset="utf8">install/install.postgresql.sql</file> + <file driver="mysql" charset="utf8">sql/install.utf8.sql</file> + <file driver="postgresql" charset="utf8">sql/install.postgresql.sql</file> </sql> </install> + <update> + <schemas> + <schemapath type="mysql">sql/updates/mysql</schemapath> + </schemas> + </update> <uninstall> <sql> - <file driver="mysql" charset="utf8">install/uninstall.utf8.sql</file> - <file driver="postgresql" charset="utf8">install/uninstall.postgresql.sql</file> + <file driver="mysql" charset="utf8">sql/uninstall.utf8.sql</file> + <file driver="postgresql" charset="utf8">sql/uninstall.postgresql.sql</file> </sql> </uninstall> <scriptfile>extension.script.php</scriptfile> @@ -57,7 +62,7 @@ <folder>forms</folder> <folder>helpers</folder> <folder>images</folder> - <folder>install</folder> + <folder>sql</folder> <folder>models</folder> <folder>tables</folder> <folder>views</folder> diff --git a/administrator/components/com_schuweb_sitemap/install/index.html b/administrator/components/com_schuweb_sitemap/sql/index.html similarity index 100% rename from administrator/components/com_schuweb_sitemap/install/index.html rename to administrator/components/com_schuweb_sitemap/sql/index.html diff --git a/administrator/components/com_schuweb_sitemap/install/install.postgresql.sql b/administrator/components/com_schuweb_sitemap/sql/install.postgresql.sql similarity index 96% rename from administrator/components/com_schuweb_sitemap/install/install.postgresql.sql rename to administrator/components/com_schuweb_sitemap/sql/install.postgresql.sql index f0b98d9..8d61ddf 100644 --- a/administrator/components/com_schuweb_sitemap/install/install.postgresql.sql +++ b/administrator/components/com_schuweb_sitemap/sql/install.postgresql.sql @@ -10,7 +10,7 @@ CREATE TABLE "#__schuweb_sitemap" ( "excluded_items" text DEFAULT NULL, "is_default" integer DEFAULT 0, "state" integer DEFAULT NULL, - "access" integer DEFAULT NULL, + "access" integer DEFAULT 0 NOT 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, diff --git a/administrator/components/com_schuweb_sitemap/install/install.utf8.sql b/administrator/components/com_schuweb_sitemap/sql/install.utf8.sql similarity index 96% rename from administrator/components/com_schuweb_sitemap/install/install.utf8.sql rename to administrator/components/com_schuweb_sitemap/sql/install.utf8.sql index 6327d0a..64e992d 100644 --- a/administrator/components/com_schuweb_sitemap/install/install.utf8.sql +++ b/administrator/components/com_schuweb_sitemap/sql/install.utf8.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `#__schuweb_sitemap` ( `excluded_items` text DEFAULT NULL, `is_default` int(1) DEFAULT 0, `state` int(2) DEFAULT NULL, - `access` int DEFAULT NULL, + `access` int unsigned DEFAULT 0 NOT NULL, `created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `count_xml` int(11) DEFAULT NULL, `count_html` int(11) DEFAULT NULL, diff --git a/administrator/components/com_schuweb_sitemap/install/uninstall.postgresql.sql b/administrator/components/com_schuweb_sitemap/sql/uninstall.postgresql.sql similarity index 100% rename from administrator/components/com_schuweb_sitemap/install/uninstall.postgresql.sql rename to administrator/components/com_schuweb_sitemap/sql/uninstall.postgresql.sql diff --git a/administrator/components/com_schuweb_sitemap/install/uninstall.utf8.sql b/administrator/components/com_schuweb_sitemap/sql/uninstall.utf8.sql similarity index 100% rename from administrator/components/com_schuweb_sitemap/install/uninstall.utf8.sql rename to administrator/components/com_schuweb_sitemap/sql/uninstall.utf8.sql diff --git a/administrator/components/com_schuweb_sitemap/sql/updates/mysql/4.0.0.sql b/administrator/components/com_schuweb_sitemap/sql/updates/mysql/4.0.0.sql new file mode 100644 index 0000000..c3e995d --- /dev/null +++ b/administrator/components/com_schuweb_sitemap/sql/updates/mysql/4.0.0.sql @@ -0,0 +1 @@ +ALTER TABLE `#__schuweb_sitemap` MODIFY `access` int unsigned DEFAULT 0 NOT NULL; \ No newline at end of file diff --git a/administrator/components/com_schuweb_sitemap/sql/updates/postgresql/4.0.0.sql b/administrator/components/com_schuweb_sitemap/sql/updates/postgresql/4.0.0.sql new file mode 100644 index 0000000..32c8218 --- /dev/null +++ b/administrator/components/com_schuweb_sitemap/sql/updates/postgresql/4.0.0.sql @@ -0,0 +1,3 @@ +ALTER TABLE "#__schuweb_sitemap" + ALTER COLUMN "access" SET DEFAULT 0, + ALTER COLUMN "access" SET NOT NULL; \ No newline at end of file diff --git a/administrator/components/com_schuweb_sitemap/tables/sitemap.php b/administrator/components/com_schuweb_sitemap/tables/sitemap.php index 224b0fb..4b417f6 100644 --- a/administrator/components/com_schuweb_sitemap/tables/sitemap.php +++ b/administrator/components/com_schuweb_sitemap/tables/sitemap.php @@ -8,6 +8,7 @@ // no direct access defined('_JEXEC') or die; +use Joomla\CMS\Table\Table; use Joomla\Utilities\ArrayHelper; /** @@ -15,7 +16,7 @@ * @subpackage com_schuweb_sitemap * @since 2.0 */ -class SchuWeb_SitemapTableSitemap extends JTable +class SchuWeb_SitemapTableSitemap extends Table { /** From 59eb6c237e1b065663ba7b51eea0b83dbc853056 Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 2 Apr 2022 00:10:20 +0200 Subject: [PATCH 48/49] fix missing Factory using in install script --- plugins/schuweb_sitemap/kunena/script.php | 1 + plugins/schuweb_sitemap/weblinks/script.php | 1 + plugins/schuweb_sitemap/zoo/script.php | 1 + 3 files changed, 3 insertions(+) diff --git a/plugins/schuweb_sitemap/kunena/script.php b/plugins/schuweb_sitemap/kunena/script.php index 083fa54..9846d2e 100644 --- a/plugins/schuweb_sitemap/kunena/script.php +++ b/plugins/schuweb_sitemap/kunena/script.php @@ -11,6 +11,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Factory; use Joomla\CMS\Installer\InstallerScript; /** diff --git a/plugins/schuweb_sitemap/weblinks/script.php b/plugins/schuweb_sitemap/weblinks/script.php index e391ad1..28153e6 100644 --- a/plugins/schuweb_sitemap/weblinks/script.php +++ b/plugins/schuweb_sitemap/weblinks/script.php @@ -11,6 +11,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Factory; use Joomla\CMS\Installer\InstallerScript; /** diff --git a/plugins/schuweb_sitemap/zoo/script.php b/plugins/schuweb_sitemap/zoo/script.php index 3f14dfc..4ca2232 100644 --- a/plugins/schuweb_sitemap/zoo/script.php +++ b/plugins/schuweb_sitemap/zoo/script.php @@ -11,6 +11,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Factory; use Joomla\CMS\Installer\InstallerScript; /** From 7442ef95fef8472d916243531dcbf5ee0ccd8b1f Mon Sep 17 00:00:00 2001 From: Sven Schultschik <sven@schultschik.de> Date: Sat, 21 Jan 2023 00:22:15 +0100 Subject: [PATCH 49/49] create update server XML for 4.0.0 --- update/schuweb_sitemap.xml | 18 ++++++++++++++++++ update/schuweb_sitemap_plugin_kunena.xml | 4 ++-- update/schuweb_sitemap_plugin_weblinks.xml | 10 +++++----- update/schuweb_sitemap_plugin_zoo.xml | 18 ++++++++++++++++++ 4 files changed, 43 insertions(+), 7 deletions(-) diff --git a/update/schuweb_sitemap.xml b/update/schuweb_sitemap.xml index b83ba2f..05d17d4 100644 --- a/update/schuweb_sitemap.xml +++ b/update/schuweb_sitemap.xml @@ -1,5 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <updates> + <update> + <name>SchuWeb Sitemap</name> + <description>SchuWeb Sitemap - Sitemap Generator for Joomla!</description> + <element>com_schuweb_sitemap</element> + <type>component</type> + <version>4.0.0</version> + <infourl title="SchuWeb Sitemap 4.0.0">https://extensions.schultschik.com/products/schuweb-sitemap/schuweb-sitemap-4-0-0</infourl> + <downloads> + <downloadurl type="full" format="zip">https://github.com/svanschu/SchuWeb-Sitemap/releases/download/4.0.0/pkg_schuweb_sitemap_4.0.0_20230103.zip</downloadurl> + </downloads> + <tags> + <tag>stable</tag> + </tags> + <maintainer>Sven Schultschik</maintainer> + <maintainerurl>http://www.schultschik.de</maintainerurl> + <targetplatform name="joomla" version="4"/> + <php_minimum>7.2.5</php_minimum> + </update> <update> <name>SchuWeb Sitemap</name> <description>SchuWeb Sitemap - Sitemap Generator for Joomla!</description> diff --git a/update/schuweb_sitemap_plugin_kunena.xml b/update/schuweb_sitemap_plugin_kunena.xml index 70cd323..cbad751 100644 --- a/update/schuweb_sitemap_plugin_kunena.xml +++ b/update/schuweb_sitemap_plugin_kunena.xml @@ -6,9 +6,9 @@ <element>schuweb_sitemap_kunena</element> <type>plugin</type> <version>4.0.0</version> - <infourl title="SchuWeb Sitemap - Kunena Plugin 4.0.0">https://extensions.schultschik.com/products/schuweb-sitemap/schuweb-sitemap-3-5-0</infourl> + <infourl title="SchuWeb Sitemap - Kunena Plugin 4.0.0">https://extensions.schultschik.com/products/schuweb-sitemap/schuweb-sitemap-4-0-0</infourl> <downloads> - <downloadurl type="full" format="zip">https://github.com/svanschu/SchuWeb-Sitemap/releases/download/3.5.0/plg_zoo_3.4.0_20211001.zip</downloadurl> + <downloadurl type="full" format="zip">https://github.com/svanschu/SchuWeb-Sitemap/releases/download/4.0.0/plg_kunena_4.0.0_20230103.zip</downloadurl> </downloads> <tags> <tag>stable</tag> diff --git a/update/schuweb_sitemap_plugin_weblinks.xml b/update/schuweb_sitemap_plugin_weblinks.xml index 2996693..916b51b 100644 --- a/update/schuweb_sitemap_plugin_weblinks.xml +++ b/update/schuweb_sitemap_plugin_weblinks.xml @@ -3,12 +3,12 @@ <update> <name>SchuWeb Sitemap - Weblinks Plugin</name> <description>Plugin to support extension Weblinks in SchuWeb Sitemap - Sitemap Generator for Joomla!</description> - <element>com_weblinks</element> + <element>schuweb_sitemap_weblinks</element> <type>plugin</type> - <version>3.4.0</version> - <infourl title="SchuWeb Sitemap - Weblinks Plugin 3.4.0">https://extensions.schultschik.com/products/schuweb-sitemap/schuweb-sitemap-3-4-0</infourl> + <version>4.0.0</version> + <infourl title="SchuWeb Sitemap - Weblinks Plugin 4.0.0">https://extensions.schultschik.com/products/schuweb-sitemap/schuweb-sitemap-4-0-0</infourl> <downloads> - <downloadurl type="full" format="zip">https://github.com/svanschu/SchuWeb-Sitemap/releases/download/3.4.0/?????</downloadurl> + <downloadurl type="full" format="zip">https://github.com/svanschu/SchuWeb-Sitemap/releases/download/4.0.0/plg_weblinks_4.0.0_20230103.zip</downloadurl> </downloads> <tags> <tag>stable</tag> @@ -16,6 +16,6 @@ <maintainer>Sven Schultschik</maintainer> <maintainerurl>http://www.schultschik.de</maintainerurl> <targetplatform name="joomla" version="4"/> - <php_minimum>7</php_minimum> + <php_minimum>7.4</php_minimum> </update> </updates> diff --git a/update/schuweb_sitemap_plugin_zoo.xml b/update/schuweb_sitemap_plugin_zoo.xml index 4ef9c02..8aadbb0 100644 --- a/update/schuweb_sitemap_plugin_zoo.xml +++ b/update/schuweb_sitemap_plugin_zoo.xml @@ -1,5 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <updates> + <update> + <name>SchuWeb Sitemap - Zoo Plugin</name> + <description>Plugin to support extension Zoo in SchuWeb Sitemap - Sitemap Generator for Joomla!</description> + <element>com_zoo</element> + <type>plugin</type> + <version>4.0.0</version> + <infourl title="SchuWeb Sitemap - Zoo Plugin 4.0.0">https://extensions.schultschik.com/products/schuweb-sitemap/schuweb-sitemap-4-0-0</infourl> + <downloads> + <downloadurl type="full" format="zip">https://github.com/svanschu/SchuWeb-Sitemap/releases/download/4.0.0/plg_zoo_4.0.0_20230103.zip</downloadurl> + </downloads> + <tags> + <tag>stable</tag> + </tags> + <maintainer>Sven Schultschik</maintainer> + <maintainerurl>http://www.schultschik.de</maintainerurl> + <targetplatform name="joomla" version="4"/> + <php_minimum>7</php_minimum> + </update> <update> <name>SchuWeb Sitemap - Zoo Plugin</name> <description>Plugin to support extension Zoo in SchuWeb Sitemap - Sitemap Generator for Joomla!</description>