From 45133c83723cc3973e17bd3e084db9bcc59f8bec Mon Sep 17 00:00:00 2001 From: coolcat-creations Date: Mon, 24 Nov 2025 13:23:12 +0100 Subject: [PATCH 1/6] Fix Showon Behaviour when "parent field" is missing. --- build/media_source/system/js/showon.es6.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/media_source/system/js/showon.es6.js b/build/media_source/system/js/showon.es6.js index e7248a6c5f386..025ee8271ddac 100644 --- a/build/media_source/system/js/showon.es6.js +++ b/build/media_source/system/js/showon.es6.js @@ -86,6 +86,12 @@ class Showon { } }); } + if (this.fields[showonData[0].field] && !this.fields[showonData[0].field].origin.length) { + field.classList.add('hidden'); + field.dispatchEvent(new CustomEvent('joomla:showon-hide', { + bubbles: true, + })); + } } }); From eabbc9fba184a6370f5ace8227cb43624c58ceb8 Mon Sep 17 00:00:00 2001 From: coolcat-creations Date: Fri, 5 Dec 2025 12:57:23 +0100 Subject: [PATCH 2/6] Add Feature to show only own articles in a category list --- administrator/language/en-GB/com_content.ini | 2 ++ components/com_content/src/Model/CategoryModel.php | 6 ++++++ components/com_content/tmpl/category/default.xml | 13 +++++++++++++ 3 files changed, 21 insertions(+) diff --git a/administrator/language/en-GB/com_content.ini b/administrator/language/en-GB/com_content.ini index dc5e50a580ad1..2cd355e568aaa 100644 --- a/administrator/language/en-GB/com_content.ini +++ b/administrator/language/en-GB/com_content.ini @@ -24,6 +24,8 @@ COM_CONTENT_CONFIG_EDITOR_LAYOUT="These options control the layout of the articl COM_CONTENT_CONFIG_INTEGRATION_SETTINGS_DESC="These settings determine how the Article Component will integrate with other extensions." COM_CONTENT_CONFIG_LIST_SETTINGS_DESC="These settings apply for List Layouts Options unless they are changed for a specific menu item or category." COM_CONTENT_CONFIGURATION="Articles: Options" +COM_CONTENT_FIELD_LIST_SHOW_OWN_ARTICLES_DESC="Show only articles created by the currently logged-in user when viewing a category list menu item." +COM_CONTENT_FIELD_LIST_SHOW_OWN_ARTICLES_LABEL="Show Own Articles Only" COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_DESC="Select the page the user will be redirected to after Canceling article submission. The default is to redirect to the same article submission page (cleaning form)." COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_LABEL="Cancel Redirect" COM_CONTENT_CREATE_ARTICLE_CATEGORY_LABEL="Specific Category" diff --git a/components/com_content/src/Model/CategoryModel.php b/components/com_content/src/Model/CategoryModel.php index 2b5783a59bb19..3234cbe98358a 100644 --- a/components/com_content/src/Model/CategoryModel.php +++ b/components/com_content/src/Model/CategoryModel.php @@ -219,6 +219,11 @@ protected function populateState($ordering = null, $direction = null) // Set the featured articles state $this->setState('filter.featured', $params->get('show_featured')); + + // Limit to articles created by the current user when requested + if ($params->get('list_show_own')) { + $this->setState('filter.author_id', (int) $user->id); + } } /** @@ -247,6 +252,7 @@ public function getItems() $model->setState('list.direction', $this->getState('list.direction')); $model->setState('list.filter', $this->getState('list.filter')); $model->setState('filter.tag', $this->getState('filter.tag')); + $model->setState('filter.author_id', $this->getState('filter.author_id')); // Filter.subcategories indicates whether to include articles from subcategories in the list or blog $model->setState('filter.subcategories', $this->getState('filter.subcategories')); diff --git a/components/com_content/tmpl/category/default.xml b/components/com_content/tmpl/category/default.xml index 44289ebd558bb..1c9b01edc299e 100644 --- a/components/com_content/tmpl/category/default.xml +++ b/components/com_content/tmpl/category/default.xml @@ -197,6 +197,19 @@ + + + + + Date: Fri, 5 Dec 2025 15:00:34 +0100 Subject: [PATCH 3/6] Restore file to main --- build/media_source/system/js/showon.es6.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build/media_source/system/js/showon.es6.js b/build/media_source/system/js/showon.es6.js index 025ee8271ddac..e7248a6c5f386 100644 --- a/build/media_source/system/js/showon.es6.js +++ b/build/media_source/system/js/showon.es6.js @@ -86,12 +86,6 @@ class Showon { } }); } - if (this.fields[showonData[0].field] && !this.fields[showonData[0].field].origin.length) { - field.classList.add('hidden'); - field.dispatchEvent(new CustomEvent('joomla:showon-hide', { - bubbles: true, - })); - } } }); From 59fafe4105b8d32bc2b6de1fea7438f5260aeb01 Mon Sep 17 00:00:00 2001 From: coolcat-creations Date: Fri, 5 Dec 2025 16:06:17 +0100 Subject: [PATCH 4/6] Replicate mod_articles behaviour --- administrator/language/en-GB/com_content.ini | 7 +++-- .../com_content/src/Model/CategoryModel.php | 12 ++++++-- components/com_content/tmpl/category/blog.xml | 27 +++++++++++++++++- .../com_content/tmpl/category/default.xml | 28 +++++++++++++------ 4 files changed, 59 insertions(+), 15 deletions(-) diff --git a/administrator/language/en-GB/com_content.ini b/administrator/language/en-GB/com_content.ini index 2cd355e568aaa..a14c4431b6a38 100644 --- a/administrator/language/en-GB/com_content.ini +++ b/administrator/language/en-GB/com_content.ini @@ -24,8 +24,11 @@ COM_CONTENT_CONFIG_EDITOR_LAYOUT="These options control the layout of the articl COM_CONTENT_CONFIG_INTEGRATION_SETTINGS_DESC="These settings determine how the Article Component will integrate with other extensions." COM_CONTENT_CONFIG_LIST_SETTINGS_DESC="These settings apply for List Layouts Options unless they are changed for a specific menu item or category." COM_CONTENT_CONFIGURATION="Articles: Options" -COM_CONTENT_FIELD_LIST_SHOW_OWN_ARTICLES_DESC="Show only articles created by the currently logged-in user when viewing a category list menu item." -COM_CONTENT_FIELD_LIST_SHOW_OWN_ARTICLES_LABEL="Show Own Articles Only" +COM_CONTENT_FIELD_AUTHORFILTERING_LABEL="Author Filtering Type" +COM_CONTENT_FIELD_AUTHOR_LABEL="Authors" +COM_CONTENT_OPTION_EXCLUSIVE_VALUE="Exclude" +COM_CONTENT_OPTION_INCLUSIVE_VALUE="Include" +COM_CONTENT_OPTION_ONLYCURRENTUSER_VALUE="Current User" COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_DESC="Select the page the user will be redirected to after Canceling article submission. The default is to redirect to the same article submission page (cleaning form)." COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_LABEL="Cancel Redirect" COM_CONTENT_CREATE_ARTICLE_CATEGORY_LABEL="Specific Category" diff --git a/components/com_content/src/Model/CategoryModel.php b/components/com_content/src/Model/CategoryModel.php index 3234cbe98358a..2aa6511add844 100644 --- a/components/com_content/src/Model/CategoryModel.php +++ b/components/com_content/src/Model/CategoryModel.php @@ -220,9 +220,14 @@ protected function populateState($ordering = null, $direction = null) // Set the featured articles state $this->setState('filter.featured', $params->get('show_featured')); - // Limit to articles created by the current user when requested - if ($params->get('list_show_own')) { - $this->setState('filter.author_id', (int) $user->id); + $authorFilteringType = (int) $params->get('list_author_filtering_type', 1); + + if ($authorFilteringType === 2) { + $this->setState('filter.author_id', [(int) $user->id]); + $this->setState('filter.author_id.include', true); + } else { + $this->setState('filter.author_id', (array) $params->get('list_author', [])); + $this->setState('filter.author_id.include', (bool) $authorFilteringType); } } @@ -253,6 +258,7 @@ public function getItems() $model->setState('list.filter', $this->getState('list.filter')); $model->setState('filter.tag', $this->getState('filter.tag')); $model->setState('filter.author_id', $this->getState('filter.author_id')); + $model->setState('filter.author_id.include', $this->getState('filter.author_id.include', true)); // Filter.subcategories indicates whether to include articles from subcategories in the list or blog $model->setState('filter.subcategories', $this->getState('filter.subcategories')); diff --git a/components/com_content/tmpl/category/blog.xml b/components/com_content/tmpl/category/blog.xml index e369680ca62c8..c0d6031985a0c 100644 --- a/components/com_content/tmpl/category/blog.xml +++ b/components/com_content/tmpl/category/blog.xml @@ -171,7 +171,9 @@ -
+
JONLY + + + + + + + + - - + + + + + Date: Fri, 5 Dec 2025 17:35:23 +0100 Subject: [PATCH 5/6] Reorder language strings --- administrator/language/en-GB/com_content.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/administrator/language/en-GB/com_content.ini b/administrator/language/en-GB/com_content.ini index a14c4431b6a38..5904be7f53e0d 100644 --- a/administrator/language/en-GB/com_content.ini +++ b/administrator/language/en-GB/com_content.ini @@ -24,11 +24,6 @@ COM_CONTENT_CONFIG_EDITOR_LAYOUT="These options control the layout of the articl COM_CONTENT_CONFIG_INTEGRATION_SETTINGS_DESC="These settings determine how the Article Component will integrate with other extensions." COM_CONTENT_CONFIG_LIST_SETTINGS_DESC="These settings apply for List Layouts Options unless they are changed for a specific menu item or category." COM_CONTENT_CONFIGURATION="Articles: Options" -COM_CONTENT_FIELD_AUTHORFILTERING_LABEL="Author Filtering Type" -COM_CONTENT_FIELD_AUTHOR_LABEL="Authors" -COM_CONTENT_OPTION_EXCLUSIVE_VALUE="Exclude" -COM_CONTENT_OPTION_INCLUSIVE_VALUE="Include" -COM_CONTENT_OPTION_ONLYCURRENTUSER_VALUE="Current User" COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_DESC="Select the page the user will be redirected to after Canceling article submission. The default is to redirect to the same article submission page (cleaning form)." COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_LABEL="Cancel Redirect" COM_CONTENT_CREATE_ARTICLE_CATEGORY_LABEL="Specific Category" @@ -62,6 +57,8 @@ COM_CONTENT_FEATURED_N_QUICKICON_SRONLY_1="Featured Article: One featured articl COM_CONTENT_FEATURED_ORDER="Featured Articles Order" COM_CONTENT_FEATURED_TABLE_CAPTION="Featured Articles" COM_CONTENT_FEATURED_TITLE="Articles: Featured" +COM_CONTENT_FIELD_AUTHORFILTERING_LABEL="Author Filtering Type" +COM_CONTENT_FIELD_AUTHOR_LABEL="Authors" COM_CONTENT_FIELD_ARTICLETEXT_LABEL="Article Text" COM_CONTENT_FIELD_BROWSER_PAGE_TITLE_LABEL="Browser Page Title" COM_CONTENT_FIELD_CAPTCHA_LABEL="Allow Captcha on submit" @@ -157,6 +154,9 @@ COM_CONTENT_NEW_ARTICLE="New Article" COM_CONTENT_NO_ARTICLES_LABEL="No Articles Message" COM_CONTENT_NO_ITEM_SELECTED="Please first make a selection from the list." COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL="# Articles in Category" +COM_CONTENT_OPTION_EXCLUSIVE_VALUE="Exclude" +COM_CONTENT_OPTION_INCLUSIVE_VALUE="Include" +COM_CONTENT_OPTION_ONLYCURRENTUSER_VALUE="Current User" COM_CONTENT_OTHER_OPTIONS="Options" COM_CONTENT_PAGE_ADD_ARTICLE="Articles: New" COM_CONTENT_PAGE_EDIT_ARTICLE="Articles: Edit" From 3e4cf0f02d2ff1c6a5166f2a9e606be7bd898e01 Mon Sep 17 00:00:00 2001 From: Elisa Foltyn Date: Tue, 9 Dec 2025 14:42:25 +0100 Subject: [PATCH 6/6] Update administrator/language/en-GB/com_content.ini Co-authored-by: Brian Teeman --- administrator/language/en-GB/com_content.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/language/en-GB/com_content.ini b/administrator/language/en-GB/com_content.ini index 5904be7f53e0d..9c575b446dc2f 100644 --- a/administrator/language/en-GB/com_content.ini +++ b/administrator/language/en-GB/com_content.ini @@ -57,9 +57,9 @@ COM_CONTENT_FEATURED_N_QUICKICON_SRONLY_1="Featured Article: One featured articl COM_CONTENT_FEATURED_ORDER="Featured Articles Order" COM_CONTENT_FEATURED_TABLE_CAPTION="Featured Articles" COM_CONTENT_FEATURED_TITLE="Articles: Featured" +COM_CONTENT_FIELD_ARTICLETEXT_LABEL="Article Text" COM_CONTENT_FIELD_AUTHORFILTERING_LABEL="Author Filtering Type" COM_CONTENT_FIELD_AUTHOR_LABEL="Authors" -COM_CONTENT_FIELD_ARTICLETEXT_LABEL="Article Text" COM_CONTENT_FIELD_BROWSER_PAGE_TITLE_LABEL="Browser Page Title" COM_CONTENT_FIELD_CAPTCHA_LABEL="Allow Captcha on submit" COM_CONTENT_FIELD_CREATED_BY_ALIAS_LABEL="Created by Alias"