diff --git a/CHANGELOG.md b/CHANGELOG.md index c7b31589..160a9557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,16 @@ -# v5.0.0-beta1 +# v5.0.0-beta2 -- First release of Sermon Distributor towards Joomla 5 +- First release of Sermon Distributor towards Joomla 5 +- Add PHP check to install/update class +- Add Database check and fix to install/update class -# v4.0.0-beta1 +# v4.0.0-beta2 -- First release of Sermon Distributor towards Joomla 4 +- First release of Sermon Distributor towards Joomla 4 +- Add PHP check to install/update class +- Add Database check and fix to install/update class -# v3.0.4 +# v3.0.5 -- Add the getDocument method call to view -- Add recall tab memory to view tabs -- Add root class calls like \JRoute \ No newline at end of file +- Add PHP check to install/update class +- Add Database check and fix to install/update class \ No newline at end of file diff --git a/README.md b/README.md index a9dcc576..6aee8c6f 100644 --- a/README.md +++ b/README.md @@ -24,38 +24,38 @@ The best way to see all your options is to install this component on you Joomla + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Sermon Distributor](https://www.vdm.io/) + *First Build*: 22nd October, 2015 -+ *Last Build*: 7th March, 2024 ++ *Last Build*: 3rd May, 2024 + *Version*: 5.0.x + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html ## Build Time :hourglass: -**245 Hours** or **31 Eight Hour Days** (actual time the author saved - +**263 Hours** or **33 Eight Hour Days** (actual time the author saved - due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > never making one mistake or taking any coffee break.) -+ *Line count*: **87680** -+ *File count*: **574** -+ *Folder count*: **120** ++ *Line count*: **94142** ++ *File count*: **602** ++ *Folder count*: **124** -**161 Hours** or **20 Eight Hour Days** (the actual time the author spent) +**173 Hours** or **22 Eight Hour Days** (the actual time the author spent) > (with the following break down: -> **debugging @61hours** = codingtime / 4; -> **planning @35hours** = codingtime / 7; -> **mapping @24hours** = codingtime / 10; -> **office @41hours** = codingtime / 6;) +> **debugging @66hours** = codingtime / 4; +> **planning @38hours** = codingtime / 7; +> **mapping @26hours** = codingtime / 10; +> **office @44hours** = codingtime / 6;) -**406 Hours** or **51 Eight Hour Days** +**436 Hours** or **55 Eight Hour Days** (a total of the realistic time frame for this project) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) -Project duration: **10.2 weeks** or **2.1 months** +Project duration: **11 weeks** or **2.3 months** > This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) \ No newline at end of file diff --git a/SermondistributorInstallerScript.php b/SermondistributorInstallerScript.php index ffee91d0..9d34faa3 100644 --- a/SermondistributorInstallerScript.php +++ b/SermondistributorInstallerScript.php @@ -33,6 +33,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\Filesystem\Folder; use Joomla\Database\DatabaseInterface; +use TrueChristianChurch\Joomla\SermonDistributor\Table\Schema; // No direct access to this file defined('_JEXEC') or die; @@ -300,11 +301,17 @@ public function preflight(string $type, InstallerAdapter $adapter): bool // do any updates needed if ($type === 'update') { + + // Check that the required configuration are set for PHP + $this->phpConfigurationCheck($this->app); } // do any install needed if ($type === 'install') { + + // Check that the required configuration are set for PHP + $this->phpConfigurationCheck($this->app); } return true; @@ -480,6 +487,10 @@ public function postflight(string $type, InstallerAdapter $adapter): bool ); + + // Check that the database is up-to date + $this->databaseSchemaCheck($this->app); + echo '
'; @@ -743,10 +754,14 @@ public function postflight(string $type, InstallerAdapter $adapter): bool + + // Check that the database is up-to date + $this->databaseSchemaCheck($this->app); + echo '' . $path . '
';
}
diff --git a/admin/src/Model/External_sourceModel.php b/admin/src/Model/External_sourceModel.php
index 560e4121..42395e4c 100644
--- a/admin/src/Model/External_sourceModel.php
+++ b/admin/src/Model/External_sourceModel.php
@@ -42,10 +42,10 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
-use VDM\Joomla\Utilities\FileHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\FOF\Encrypt\AES;
+use TrueChristianChurch\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
+use TrueChristianChurch\Joomla\Utilities\FileHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\FOF\Encrypt\AES;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/External_sourcesModel.php b/admin/src/Model/External_sourcesModel.php
index ce1d1980..0f1c43fe 100644
--- a/admin/src/Model/External_sourcesModel.php
+++ b/admin/src/Model/External_sourcesModel.php
@@ -36,10 +36,10 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper;
-use VDM\Joomla\FOF\Encrypt\AES;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\FOF\Encrypt\AES;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/Help_documentModel.php b/admin/src/Model/Help_documentModel.php
index 99a12fa7..8252b0ff 100644
--- a/admin/src/Model/Help_documentModel.php
+++ b/admin/src/Model/Help_documentModel.php
@@ -42,8 +42,8 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/Help_documentsModel.php b/admin/src/Model/Help_documentsModel.php
index 52281852..44a1005c 100644
--- a/admin/src/Model/Help_documentsModel.php
+++ b/admin/src/Model/Help_documentsModel.php
@@ -36,10 +36,10 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\JsonHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\JsonHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/ImportModel.php b/admin/src/Model/ImportModel.php
index 2db5852b..f1b113ba 100644
--- a/admin/src/Model/ImportModel.php
+++ b/admin/src/Model/ImportModel.php
@@ -35,7 +35,7 @@
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/Local_listingModel.php b/admin/src/Model/Local_listingModel.php
index 83be4850..4af66a9c 100644
--- a/admin/src/Model/Local_listingModel.php
+++ b/admin/src/Model/Local_listingModel.php
@@ -42,9 +42,9 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\FOF\Encrypt\AES;
-use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\FOF\Encrypt\AES;
+use TrueChristianChurch\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/Local_listingsModel.php b/admin/src/Model/Local_listingsModel.php
index 6c957533..716b662e 100644
--- a/admin/src/Model/Local_listingsModel.php
+++ b/admin/src/Model/Local_listingsModel.php
@@ -36,10 +36,10 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper;
-use VDM\Joomla\FOF\Encrypt\AES;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\FOF\Encrypt\AES;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/Manual_updaterModel.php b/admin/src/Model/Manual_updaterModel.php
index d80bce48..dbb98a3a 100644
--- a/admin/src/Model/Manual_updaterModel.php
+++ b/admin/src/Model/Manual_updaterModel.php
@@ -35,9 +35,9 @@
use Joomla\Utilities\ArrayHelper;
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\FOF\Encrypt\AES;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\JsonHelper;
+use TrueChristianChurch\Joomla\FOF\Encrypt\AES;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\JsonHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/PreacherModel.php b/admin/src/Model/PreacherModel.php
index fa80729b..ad75860d 100644
--- a/admin/src/Model/PreacherModel.php
+++ b/admin/src/Model/PreacherModel.php
@@ -42,9 +42,9 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/PreachersModel.php b/admin/src/Model/PreachersModel.php
index 08b30318..0440a4f4 100644
--- a/admin/src/Model/PreachersModel.php
+++ b/admin/src/Model/PreachersModel.php
@@ -36,9 +36,9 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/SeriesModel.php b/admin/src/Model/SeriesModel.php
index 48cf6f0c..c2ee9c2b 100644
--- a/admin/src/Model/SeriesModel.php
+++ b/admin/src/Model/SeriesModel.php
@@ -42,9 +42,9 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/Series_listModel.php b/admin/src/Model/Series_listModel.php
index 8bc695a4..6aa664b1 100644
--- a/admin/src/Model/Series_listModel.php
+++ b/admin/src/Model/Series_listModel.php
@@ -36,9 +36,9 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/SermonModel.php b/admin/src/Model/SermonModel.php
index f52f17bb..17eee01c 100644
--- a/admin/src/Model/SermonModel.php
+++ b/admin/src/Model/SermonModel.php
@@ -42,9 +42,9 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/SermondistributorModel.php b/admin/src/Model/SermondistributorModel.php
index ab59be37..bd9c2676 100644
--- a/admin/src/Model/SermondistributorModel.php
+++ b/admin/src/Model/SermondistributorModel.php
@@ -38,8 +38,8 @@
use Joomla\Utilities\ArrayHelper;
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -51,6 +51,27 @@
*/
class SermondistributorModel extends ListModel
{
+ /**
+ * The styles array.
+ *
+ * @var array
+ * @since 4.3
+ */
+ protected array $styles = [
+ 'administrator/components/com_sermondistributor/assets/css/admin.css',
+ 'administrator/components/com_sermondistributor/assets/css/dashboard.css'
+ ];
+
+ /**
+ * The scripts array.
+ *
+ * @var array
+ * @since 4.3
+ */
+ protected array $scripts = [
+ 'administrator/components/com_sermondistributor/assets/js/admin.js'
+ ];
+
public function getIcons()
{
// load user for access menus
@@ -292,6 +313,50 @@ public function getIcons()
return $icons;
}
+ /**
+ * Method to get the styles that have to be included on the view
+ *
+ * @return array styles files
+ * @since 4.3
+ */
+ public function getStyles(): array
+ {
+ return $this->styles;
+ }
+
+ /**
+ * Method to set the styles that have to be included on the view
+ *
+ * @return void
+ * @since 4.3
+ */
+ public function setStyles(string $path): void
+ {
+ $this->styles[] = $path;
+ }
+
+ /**
+ * Method to get the script that have to be included on the view
+ *
+ * @return array script files
+ * @since 4.3
+ */
+ public function getScripts(): array
+ {
+ return $this->scripts;
+ }
+
+ /**
+ * Method to set the script that have to be included on the view
+ *
+ * @return void
+ * @since 4.3
+ */
+ public function setScript(string $path): void
+ {
+ $this->scripts[] = $path;
+ }
+
public function getWiki()
{
diff --git a/admin/src/Model/SermonsModel.php b/admin/src/Model/SermonsModel.php
index cae7cd31..9bf3c0ce 100644
--- a/admin/src/Model/SermonsModel.php
+++ b/admin/src/Model/SermonsModel.php
@@ -36,9 +36,9 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/StatisticModel.php b/admin/src/Model/StatisticModel.php
index ffd4f69f..d6592d16 100644
--- a/admin/src/Model/StatisticModel.php
+++ b/admin/src/Model/StatisticModel.php
@@ -42,8 +42,8 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/Model/StatisticsModel.php b/admin/src/Model/StatisticsModel.php
index fa88b63f..5d83d62b 100644
--- a/admin/src/Model/StatisticsModel.php
+++ b/admin/src/Model/StatisticsModel.php
@@ -36,9 +36,9 @@
use Joomla\Input\Input;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
-use VDM\Joomla\Utilities\ObjectHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\ObjectHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/View/External_source/HtmlView.php b/admin/src/View/External_source/HtmlView.php
index 979663a3..a35cc217 100644
--- a/admin/src/View/External_source/HtmlView.php
+++ b/admin/src/View/External_source/HtmlView.php
@@ -37,7 +37,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -61,6 +61,7 @@ public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_sermondistributor');
+ $this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@@ -235,6 +236,8 @@ public function escape($var, bool $shorten = true, int $length = 30)
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NEW' : 'COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_EDIT'));
// add styles
diff --git a/admin/src/View/External_sources/HtmlView.php b/admin/src/View/External_sources/HtmlView.php
index a04a3141..cf4a8b53 100644
--- a/admin/src/View/External_sources/HtmlView.php
+++ b/admin/src/View/External_sources/HtmlView.php
@@ -37,8 +37,8 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -177,6 +177,8 @@ protected function addToolbar(): void
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$this->getDocument()->setTitle(Text::_('COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES'));
// add styles
foreach ($this->styles as $style)
diff --git a/admin/src/View/Help_document/HtmlView.php b/admin/src/View/Help_document/HtmlView.php
index 0d872107..79d551d3 100644
--- a/admin/src/View/Help_document/HtmlView.php
+++ b/admin/src/View/Help_document/HtmlView.php
@@ -37,7 +37,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -61,6 +61,7 @@ public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_sermondistributor');
+ $this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@@ -225,6 +226,8 @@ public function escape($var, bool $shorten = true, int $length = 30)
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_NEW' : 'COM_SERMONDISTRIBUTOR_HELP_DOCUMENT_EDIT'));
// add styles
diff --git a/admin/src/View/Help_documents/HtmlView.php b/admin/src/View/Help_documents/HtmlView.php
index 1bd2bf78..f9761b12 100644
--- a/admin/src/View/Help_documents/HtmlView.php
+++ b/admin/src/View/Help_documents/HtmlView.php
@@ -37,8 +37,8 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -177,6 +177,8 @@ protected function addToolbar(): void
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$this->getDocument()->setTitle(Text::_('COM_SERMONDISTRIBUTOR_HELP_DOCUMENTS'));
// add styles
foreach ($this->styles as $style)
diff --git a/admin/src/View/Import/HtmlView.php b/admin/src/View/Import/HtmlView.php
index e36f6067..ea236fc0 100644
--- a/admin/src/View/Import/HtmlView.php
+++ b/admin/src/View/Import/HtmlView.php
@@ -28,7 +28,7 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/View/Local_listing/HtmlView.php b/admin/src/View/Local_listing/HtmlView.php
index 06b9440a..1fb8b1f3 100644
--- a/admin/src/View/Local_listing/HtmlView.php
+++ b/admin/src/View/Local_listing/HtmlView.php
@@ -37,7 +37,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -61,6 +61,7 @@ public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_sermondistributor');
+ $this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@@ -225,6 +226,8 @@ public function escape($var, bool $shorten = true, int $length = 30)
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_NEW' : 'COM_SERMONDISTRIBUTOR_LOCAL_LISTING_EDIT'));
// add styles
diff --git a/admin/src/View/Local_listings/HtmlView.php b/admin/src/View/Local_listings/HtmlView.php
index b32a4bc7..d27ec1c3 100644
--- a/admin/src/View/Local_listings/HtmlView.php
+++ b/admin/src/View/Local_listings/HtmlView.php
@@ -37,8 +37,8 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -177,6 +177,8 @@ protected function addToolbar(): void
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$this->getDocument()->setTitle(Text::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS'));
// add styles
foreach ($this->styles as $style)
diff --git a/admin/src/View/Manual_updater/HtmlView.php b/admin/src/View/Manual_updater/HtmlView.php
index c09d9043..72566a5a 100644
--- a/admin/src/View/Manual_updater/HtmlView.php
+++ b/admin/src/View/Manual_updater/HtmlView.php
@@ -34,7 +34,7 @@
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\HeaderCheck;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
diff --git a/admin/src/View/Preacher/HtmlView.php b/admin/src/View/Preacher/HtmlView.php
index d815958e..f83efe00 100644
--- a/admin/src/View/Preacher/HtmlView.php
+++ b/admin/src/View/Preacher/HtmlView.php
@@ -37,7 +37,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -61,6 +61,7 @@ public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_sermondistributor');
+ $this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@@ -228,6 +229,8 @@ public function escape($var, bool $shorten = true, int $length = 30)
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_SERMONDISTRIBUTOR_PREACHER_NEW' : 'COM_SERMONDISTRIBUTOR_PREACHER_EDIT'));
// add styles
diff --git a/admin/src/View/Preachers/HtmlView.php b/admin/src/View/Preachers/HtmlView.php
index 438d1cc4..5be4e10e 100644
--- a/admin/src/View/Preachers/HtmlView.php
+++ b/admin/src/View/Preachers/HtmlView.php
@@ -37,8 +37,8 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -177,6 +177,8 @@ protected function addToolbar(): void
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$this->getDocument()->setTitle(Text::_('COM_SERMONDISTRIBUTOR_PREACHERS'));
// add styles
foreach ($this->styles as $style)
diff --git a/admin/src/View/Series/HtmlView.php b/admin/src/View/Series/HtmlView.php
index c55ce269..538b83c7 100644
--- a/admin/src/View/Series/HtmlView.php
+++ b/admin/src/View/Series/HtmlView.php
@@ -37,7 +37,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -61,6 +61,7 @@ public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_sermondistributor');
+ $this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@@ -228,6 +229,8 @@ public function escape($var, bool $shorten = true, int $length = 30)
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_SERMONDISTRIBUTOR_SERIES_NEW' : 'COM_SERMONDISTRIBUTOR_SERIES_EDIT'));
// add styles
diff --git a/admin/src/View/Series_list/HtmlView.php b/admin/src/View/Series_list/HtmlView.php
index 5fb722fd..2668f96d 100644
--- a/admin/src/View/Series_list/HtmlView.php
+++ b/admin/src/View/Series_list/HtmlView.php
@@ -37,8 +37,8 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -177,6 +177,8 @@ protected function addToolbar(): void
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$this->getDocument()->setTitle(Text::_('COM_SERMONDISTRIBUTOR_SERIES_LIST'));
// add styles
foreach ($this->styles as $style)
diff --git a/admin/src/View/Sermon/HtmlView.php b/admin/src/View/Sermon/HtmlView.php
index e4a75b7b..4e7405b4 100644
--- a/admin/src/View/Sermon/HtmlView.php
+++ b/admin/src/View/Sermon/HtmlView.php
@@ -37,7 +37,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -61,6 +61,7 @@ public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_sermondistributor');
+ $this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@@ -228,6 +229,8 @@ public function escape($var, bool $shorten = true, int $length = 30)
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_SERMONDISTRIBUTOR_SERMON_NEW' : 'COM_SERMONDISTRIBUTOR_SERMON_EDIT'));
// add styles
diff --git a/admin/src/View/Sermondistributor/HtmlView.php b/admin/src/View/Sermondistributor/HtmlView.php
index 352c7b91..8e8df391 100644
--- a/admin/src/View/Sermondistributor/HtmlView.php
+++ b/admin/src/View/Sermondistributor/HtmlView.php
@@ -30,7 +30,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -50,6 +50,8 @@ function display($tpl = null)
{
// Assign data to the view
$this->icons = $this->get('Icons');
+ $this->styles = $this->get('Styles');
+ $this->scripts = $this->get('Scripts');
$this->contributors = SermondistributorHelper::getContributors();
// get the manifest details of the component
@@ -108,11 +110,17 @@ protected function _prepareDocument(): void
{
// set page title
$this->getDocument()->setTitle(Text::_('COM_SERMONDISTRIBUTOR_DASHBOARD'));
-
// add manifest to page JavaScript
$this->getDocument()->addScriptDeclaration("var manifest = JSON.parse('" . json_encode($this->manifest) . "');", "text/javascript");
-
- // add dashboard style sheets
- Html::_('stylesheet', "administrator/components/com_sermondistributor/assets/css/dashboard.css", ['version' => 'auto']);
+ // add styles
+ foreach ($this->styles as $style)
+ {
+ Html::_('stylesheet', $style, ['version' => 'auto']);
+ }
+ // add scripts
+ foreach ($this->scripts as $script)
+ {
+ Html::_('script', $script, ['version' => 'auto']);
+ }
}
}
diff --git a/admin/src/View/Sermons/HtmlView.php b/admin/src/View/Sermons/HtmlView.php
index cb7ffc55..0d386f37 100644
--- a/admin/src/View/Sermons/HtmlView.php
+++ b/admin/src/View/Sermons/HtmlView.php
@@ -37,8 +37,8 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -177,6 +177,8 @@ protected function addToolbar(): void
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$this->getDocument()->setTitle(Text::_('COM_SERMONDISTRIBUTOR_SERMONS'));
// add styles
foreach ($this->styles as $style)
diff --git a/admin/src/View/Statistic/HtmlView.php b/admin/src/View/Statistic/HtmlView.php
index 19506431..a1ccba0b 100644
--- a/admin/src/View/Statistic/HtmlView.php
+++ b/admin/src/View/Statistic/HtmlView.php
@@ -37,7 +37,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -61,6 +61,7 @@ public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_sermondistributor');
+ $this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
@@ -225,6 +226,8 @@ public function escape($var, bool $shorten = true, int $length = 30)
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_SERMONDISTRIBUTOR_STATISTIC_NEW' : 'COM_SERMONDISTRIBUTOR_STATISTIC_EDIT'));
// add styles
diff --git a/admin/src/View/Statistics/HtmlView.php b/admin/src/View/Statistics/HtmlView.php
index ebb08c02..d6636f2d 100644
--- a/admin/src/View/Statistics/HtmlView.php
+++ b/admin/src/View/Statistics/HtmlView.php
@@ -37,8 +37,8 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Document\Document;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -177,6 +177,8 @@ protected function addToolbar(): void
*/
protected function _prepareDocument(): void
{
+ // Load jQuery
+ Html::_('jquery.framework');
$this->getDocument()->setTitle(Text::_('COM_SERMONDISTRIBUTOR_STATISTICS'));
// add styles
foreach ($this->styles as $style)
diff --git a/admin/tmpl/import/default.php b/admin/tmpl/import/default.php
index f4db377e..10502ac2 100644
--- a/admin/tmpl/import/default.php
+++ b/admin/tmpl/import/default.php
@@ -25,8 +25,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper as Html;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
// No direct access to this file
defined('_JEXEC') or die;
diff --git a/admin/tmpl/manual_updater/default.php b/admin/tmpl/manual_updater/default.php
index d1a8f3a9..47bd1f6e 100644
--- a/admin/tmpl/manual_updater/default.php
+++ b/admin/tmpl/manual_updater/default.php
@@ -28,8 +28,9 @@
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use TrueChristianChurch\Component\Sermondistributor\Administrator\Helper\SermondistributorHelper;
-use VDM\Joomla\Utilities\ArrayHelper;
-use VDM\Joomla\Utilities\StringHelper;
+use TrueChristianChurch\Joomla\Utilities\ArrayHelper;
+use TrueChristianChurch\Joomla\Utilities\StringHelper;
+use Joomla\CMS\Session\Session;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@@ -130,7 +131,7 @@ class="span12"