Skip to content

Commit

Permalink
Removed category filtering in category block
Browse files Browse the repository at this point in the history
  • Loading branch information
mediafoks committed Nov 10, 2024
1 parent d653431 commit ea160f5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
7 changes: 1 addition & 6 deletions ksmeta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU General Public License version 2 or later</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl></authorUrl>
<version>1.0.3</version>
<version>1.0.4</version>
<description>PLG_SYSTEM_KSMETA_XML_DESCRIPTION</description>
<namespace path="src">Joomla\Plugin\System\KsMeta</namespace>
<files>
Expand Down Expand Up @@ -67,11 +67,6 @@
<fieldset name="categories_set" label="PLG_SYSTEM_KSMETA_FIELDSET_CATEGORIES_LABEL" addfieldprefix="Joomla\Component\Categories\Administrator\Field">
<field name="categories" type="subform" label="PLG_SYSTEM_KSMETA_FIELD_CATEGORIES_LABEL" multiple="true">
<form>
<field name="category_filtering_type" type="list" label="PLG_SYSTEM_KSMETA_FIELD_CAT_FILTERING_TYPE_LABEL" description="PLG_SYSTEM_KSMETA_FIELD_CAT_FILTERING_TYPE_DESC" default="1" filter="integer">
<option value="0">PLG_SYSTEM_KSMETA_OPTION_EXCLUSIVE_VALUE</option>
<option value="1">PLG_SYSTEM_KSMETA_OPTION_INCLUSIVE_VALUE</option>
</field>

<field name="catid" type="category" label="JCATEGORY" extension="com_content" multiple="true" layout="joomla.form.field.list-fancy-select" filter="intarray" class="multipleCategories" />

<field name="show_child_category_articles" type="list" label="PLG_SYSTEM_KSMETA_FIELD_SHOW_CHILD_CATEGORY_ARTICLES_LABEL" description="PLG_SYSTEM_KSMETA_FIELD_SHOW_CHILD_CATEGORY_ARTICLES_DESC" default="0" filter="integer">
Expand Down
2 changes: 1 addition & 1 deletion services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @return void
*
* @since 1.0.3
* @since 1.0.4
*/
public function register(Container $container): void
{
Expand Down
9 changes: 5 additions & 4 deletions src/Extension/KsMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
/**
* Ks Meta plugin
*
* @since 1.0.3
* @since 1.0.4
*/
class KsMeta extends CMSPlugin implements SubscriberInterface
{
/**
* Load the language file on instantiation
*
* @var boolean
* @since 1.0.3
* @since 1.0.4
*/
protected $autoloadLanguage = true;

Expand All @@ -38,7 +38,7 @@ class KsMeta extends CMSPlugin implements SubscriberInterface
*
* @return array
*
* @since 1.0.3
* @since 1.0.4
*/
public static function getSubscribedEvents(): array
{
Expand Down Expand Up @@ -69,7 +69,7 @@ public function renderMeta($params): void
*
* @return void
*
* @since 1.0.3
* @since 1.0.4
*/
public function onBeforeCompileHead(): void
{
Expand Down Expand Up @@ -97,6 +97,7 @@ public function onBeforeCompileHead(): void
foreach ($articles_params as $params) {
$params = new Registry($params);
$catids = $params->get('catid');
$articles->setState('filter.category_id.include', (bool) $params->get('category_filtering_type', 1));

if ($catids) {
if ($params->get('show_child_category_articles', 0) && (int) $params->get('levels', 0) > 0) {
Expand Down
4 changes: 2 additions & 2 deletions update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<element>ksmeta</element>
<type>plugin</type>
<folder>system</folder>
<version>1.0.3</version>
<version>1.0.4</version>
<downloads>
<downloadurl type="full" format="zip">https://github.com/mediafoks/plg_system_ksmeta/archive/refs/tags/v1.0.3.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/mediafoks/plg_system_ksmeta/archive/refs/tags/v1.0.4.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
Expand Down

0 comments on commit ea160f5

Please sign in to comment.