From 73e24ffdabf47a5da5aad2b4195ba4e3f9adf813 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 16 Dec 2021 15:15:06 +0200 Subject: [PATCH] update - v1.0.0 --- componentbuilderlanguagetabs.php | 16 ++-- componentbuilderlanguagetabs.xml | 8 +- fields/excludedlanguages.php | 78 +++++++++---------- ...g_content_componentbuilderlanguagetabs.ini | 2 +- ...ntent_componentbuilderlanguagetabs.sys.ini | 2 +- script.php | 20 ++--- 6 files changed, 63 insertions(+), 63 deletions(-) diff --git a/componentbuilderlanguagetabs.php b/componentbuilderlanguagetabs.php index 68ce1ad..4e35066 100644 --- a/componentbuilderlanguagetabs.php +++ b/componentbuilderlanguagetabs.php @@ -1,12 +1,12 @@ - * @github Joomla Component Builder - * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE.txt +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access to this file diff --git a/componentbuilderlanguagetabs.xml b/componentbuilderlanguagetabs.xml index 86cd938..06a83dc 100644 --- a/componentbuilderlanguagetabs.xml +++ b/componentbuilderlanguagetabs.xml @@ -1,10 +1,10 @@ - + PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS - 20th February, 2021 + 16th December, 2021 Llewellyn van der Merwe - llewellyn@joomlacomponentbuilder.com - http://www.joomlacomponentbuilder.com + joomla@vdm.io + https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt 1.0.0 diff --git a/fields/excludedlanguages.php b/fields/excludedlanguages.php index 89e3f04..ce55c20 100644 --- a/fields/excludedlanguages.php +++ b/fields/excludedlanguages.php @@ -1,31 +1,31 @@ - * @github Joomla Component Builder - * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE.txt - */ - -// No direct access to this file -defined('_JEXEC') or die('Restricted access'); - -// import the list field type -jimport('joomla.form.helper'); -JFormHelper::loadFieldClass('list'); - -/** - * Excludedlanguages Form Field class for the Componentbuilder component - */ -class JFormFieldExcludedlanguages extends JFormFieldList -{ - /** - * The excludedlanguages field type. - * - * @var string - */ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Excludedlanguages Form Field class for the Componentbuilder component + */ +class JFormFieldExcludedlanguages extends JFormFieldList +{ + /** + * The excludedlanguages field type. + * + * @var string + */ public $type = 'excludedlanguages'; /** @@ -130,15 +130,15 @@ class JFormFieldExcludedlanguages extends JFormFieldList } } return $html; - } - - /** - * Method to get a list of options for a list input. - * - * @return array An array of JHtml options. - */ - protected function getOptions() - { + } + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.langtag','a.name'),array('langtag','languages_name'))); @@ -171,6 +171,6 @@ class JFormFieldExcludedlanguages extends JFormFieldList { $options[] = JHtml::_('select.option', '', 'Add languages to select'); } - return $options; - } -} + return $options; + } +} diff --git a/language/en-GB/en-GB.plg_content_componentbuilderlanguagetabs.ini b/language/en-GB/en-GB.plg_content_componentbuilderlanguagetabs.ini index 76f3762..c57d59b 100644 --- a/language/en-GB/en-GB.plg_content_componentbuilderlanguagetabs.ini +++ b/language/en-GB/en-GB.plg_content_componentbuilderlanguagetabs.ini @@ -1,6 +1,6 @@ PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS="Content - Componentbuilder Language Tabs" PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_DESCRIPTION="This plugin is used to link your components to the language packaging and extending options, so you can set all the required details for the integration." -PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_XML_DESCRIPTION="

Content - Componentbuilder Language Tabs (v.1.0.0)

This plugin is used to link your components to the language packaging and extending options, so you can set all the required details for the integration.

Created by Llewellyn van der Merwe
Development started 19th March, 2020

" +PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_XML_DESCRIPTION="

Content - Componentbuilder Language Tabs (v.1.0.0)

This plugin is used to link your components to the language packaging and extending options, so you can set all the required details for the integration.

Created by Llewellyn van der Merwe
Development started 19th March, 2020

" PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_LANGUAGE_OPTIONS="Language Options" PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_NOTE_LANGUAGE_NOTE_LABEL="Would you like to move languages to their own packages?" PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_NOTE_LANGUAGE_NOTE_DESCRIPTION="

Adding all your translations to your component can increase its size dramatically, so now you are able to move each extra language translation to its own installing package, leaving just your main language in the component.

Please note that this is only relevant if you actually have added extra translations to your component in the Language Translations area of JCB.

" diff --git a/language/en-GB/en-GB.plg_content_componentbuilderlanguagetabs.sys.ini b/language/en-GB/en-GB.plg_content_componentbuilderlanguagetabs.sys.ini index 76f3762..c57d59b 100644 --- a/language/en-GB/en-GB.plg_content_componentbuilderlanguagetabs.sys.ini +++ b/language/en-GB/en-GB.plg_content_componentbuilderlanguagetabs.sys.ini @@ -1,6 +1,6 @@ PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS="Content - Componentbuilder Language Tabs" PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_DESCRIPTION="This plugin is used to link your components to the language packaging and extending options, so you can set all the required details for the integration." -PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_XML_DESCRIPTION="

Content - Componentbuilder Language Tabs (v.1.0.0)

This plugin is used to link your components to the language packaging and extending options, so you can set all the required details for the integration.

Created by Llewellyn van der Merwe
Development started 19th March, 2020

" +PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_XML_DESCRIPTION="

Content - Componentbuilder Language Tabs (v.1.0.0)

This plugin is used to link your components to the language packaging and extending options, so you can set all the required details for the integration.

Created by Llewellyn van der Merwe
Development started 19th March, 2020

" PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_LANGUAGE_OPTIONS="Language Options" PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_NOTE_LANGUAGE_NOTE_LABEL="Would you like to move languages to their own packages?" PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_NOTE_LANGUAGE_NOTE_DESCRIPTION="

Adding all your translations to your component can increase its size dramatically, so now you are able to move each extra language translation to its own installing package, leaving just your main language in the component.

Please note that this is only relevant if you actually have added extra translations to your component in the Language Translations area of JCB.

" diff --git a/script.php b/script.php index 8c1024b..4aa9b3e 100644 --- a/script.php +++ b/script.php @@ -1,12 +1,12 @@ - * @github Joomla Component Builder - * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE.txt +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @git Joomla Component Builder + * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access to this file @@ -47,7 +47,7 @@ class plgContentComponentbuilderLanguageTabsInstallerScript $pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'; if (!JFile::exists($pathToCore)) { - $app->enqueueMessage('Joomla Component Builder must first be installed from Joomla Component Builder.', 'error'); + $app->enqueueMessage('JCB must first be installed from Joomla Component Builder.', 'error'); return false; } // load the helper class @@ -61,7 +61,7 @@ class plgContentComponentbuilderLanguageTabsInstallerScript // get the version $jcbVersion = explode('.', $manifest->version); // check that we have JCB 2.10.13 or higher installed - if (count($jcbVersion) == 3 && $jcbVersion[0] >= 2 && $jcbVersion[1] >= 10 && (($jcbVersion[1] == 10 && $jcbVersion[2] >= 13) || ($jcbVersion[1] > 10))) + if (count($jcbVersion) == 3 && (($jcbVersion[0] == 2 && $jcbVersion[1] >= 10 && (($jcbVersion[1] == 10 && $jcbVersion[2] >= 13) || ($jcbVersion[1] > 10))) || $jcbVersion[0] >= 3)) { $blockInstall = false; }