diff --git a/README.md b/README.md index ba8d3ae0..b4a9b97a 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,17 @@ The best way to see all your options is to install this component on you Joomla ## Build Time :hourglass: -**134 Hours** or **17 Eight Hour Days** (actual time the author saved - +**135 Hours** or **17 Eight Hour Days** (actual time the author saved - due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builder)) > (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*: **48173** -+ *File count*: **351** ++ *Line count*: **48233** ++ *File count*: **352** + *Folder count*: **79** -**89 Hours** or **11 Eight Hour Days** (the actual time the author spent) +**88 Hours** or **11 Eight Hour Days** (the actual time the author spent) > (with the following break down: > **debugging @34hours** = codingtime / 4; diff --git a/site/language/en-GB/en-GB.com_sermondistributor.ini b/site/language/en-GB/en-GB.com_sermondistributor.ini index 291a8b63..c46648c1 100644 --- a/site/language/en-GB/en-GB.com_sermondistributor.ini +++ b/site/language/en-GB/en-GB.com_sermondistributor.ini @@ -21,6 +21,7 @@ COM_SERMONDISTRIBUTOR_HITS_DESC="Hits (Desc)" COM_SERMONDISTRIBUTOR_NAME="Name" COM_SERMONDISTRIBUTOR_NAME_ASC="Name (Asc)" COM_SERMONDISTRIBUTOR_NAME_DESC="Name (Desc)" +COM_SERMONDISTRIBUTOR_NEW="New" COM_SERMONDISTRIBUTOR_NO_CATEGORIES_WERE_FOUND="No categories were found." COM_SERMONDISTRIBUTOR_NO_CATEGORY_WAS_FOUND="No category was found." COM_SERMONDISTRIBUTOR_NO_PREACHERS_WERE_FOUND="No preachers were found." diff --git a/site/layouts/isnew.php b/site/layouts/isnew.php new file mode 100644 index 00000000..d78b909c --- /dev/null +++ b/site/layouts/isnew.php @@ -0,0 +1,33 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + A sermon distributor that links to Dropbox. + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('JPATH_BASE') or die('Restricted access'); + +$display = ''.JText::_('COM_SERMONDISTRIBUTOR_NEW').''; + +?> +isNew) ? $display:''; ?> diff --git a/site/layouts/sermonslistitem.php b/site/layouts/sermonslistitem.php index ec53d0a9..4ee61077 100644 --- a/site/layouts/sermonslistitem.php +++ b/site/layouts/sermonslistitem.php @@ -30,7 +30,7 @@ defined('JPATH_BASE') or die('Restricted access'); ?> -params->get($displayData->viewKey.'_sermons_download_count')): ?> data-uk-tooltip title=": " href="link; ?>">name; ?> + params->get($displayData->viewKey.'_sermons_download_count')): ?> data-uk-tooltip title=": " href="link; ?>">name; ?> viewKey || 'category' == $displayData->viewKey) && $displayData->params->get($displayData->viewKey.'_sermons_series')): ?> series_name; ?> diff --git a/site/layouts/sermonspanel.php b/site/layouts/sermonspanel.php index 66feccc5..4611fccd 100644 --- a/site/layouts/sermonspanel.php +++ b/site/layouts/sermonspanel.php @@ -62,6 +62,7 @@ switch ($style) : hits; ?> +

name; ?>

params->get($displayData->viewKey.'_sermons_icon')): ?> icon = ($displayData->icon) ? $displayData->icon : $displayData->params->get('sermon_default_icon'); ?> diff --git a/site/layouts/sermonsrow.php b/site/layouts/sermonsrow.php index 2a8f1855..1c5b5407 100644 --- a/site/layouts/sermonsrow.php +++ b/site/layouts/sermonsrow.php @@ -36,6 +36,7 @@ defined('JPATH_BASE') or die('Restricted access'); name; ?> + params->get($displayData->viewKey.'_sermons_desc')): ?> diff --git a/site/models/categories.php b/site/models/categories.php index a0155583..1f238f33 100644 --- a/site/models/categories.php +++ b/site/models/categories.php @@ -121,7 +121,7 @@ class SermondistributorModelCategories extends JModelList { foreach ($items as $nr => &$item) { - if (!$item->idCatidSermonB) + if (!SermondistributorHelper::checkArray($item->idCatidSermonB)) { // remove empty category unset($items[$nr]); diff --git a/site/models/category.php b/site/models/category.php index 070bf8f2..be8bbc9a 100644 --- a/site/models/category.php +++ b/site/models/category.php @@ -165,8 +165,16 @@ class SermondistributorModelCategory extends JModelList // do a quick build of all the sermon links if (isset($items) && $items) { + $pastDate = strtotime('-1 week'); foreach ($items as $nr => &$item) { + $item->isNew = false; + // check if sermon is new + $createdTime = strtotime($item->created); + if ($pastDate < $createdTime) + { + $item->isNew = true; + } $item->statisticTotal = 0; if (isset($item->auto_sermons) && SermondistributorHelper::checkString($item->auto_sermons)) { diff --git a/site/models/preacher.php b/site/models/preacher.php index 2bfc78cd..e9263252 100644 --- a/site/models/preacher.php +++ b/site/models/preacher.php @@ -165,8 +165,16 @@ class SermondistributorModelPreacher extends JModelList // do a quick build of all the sermon links if (isset($items) && $items) { + $pastDate = strtotime('-1 week'); foreach ($items as $nr => &$item) { + $item->isNew = false; + // check if sermon is new + $createdTime = strtotime($item->created); + if ($pastDate < $createdTime) + { + $item->isNew = true; + } $item->statisticTotal = 0; if (isset($item->auto_sermons) && SermondistributorHelper::checkString($item->auto_sermons)) { diff --git a/site/models/preachers.php b/site/models/preachers.php index 16500b2c..39da6807 100644 --- a/site/models/preachers.php +++ b/site/models/preachers.php @@ -124,7 +124,7 @@ class SermondistributorModelPreachers extends JModelList { foreach ($items as $nr => &$item) { - if (!$item->idPreacherSermonB) + if (!SermondistributorHelper::checkArray($item->idPreacherSermonB)) { // remove empty preacher unset($items[$nr]); diff --git a/site/models/series.php b/site/models/series.php index 5f6c041e..f8db32fa 100644 --- a/site/models/series.php +++ b/site/models/series.php @@ -165,8 +165,16 @@ class SermondistributorModelSeries extends JModelList // do a quick build of all the sermon links if (isset($items) && $items) { + $pastDate = strtotime('-1 week'); foreach ($items as $nr => &$item) { + $item->isNew = false; + // check if sermon is new + $createdTime = strtotime($item->created); + if ($pastDate < $createdTime) + { + $item->isNew = true; + } $item->statisticTotal = 0; if (isset($item->auto_sermons) && SermondistributorHelper::checkString($item->auto_sermons)) { diff --git a/site/models/serieslist.php b/site/models/serieslist.php index 9f41cb74..f86298ff 100644 --- a/site/models/serieslist.php +++ b/site/models/serieslist.php @@ -124,7 +124,7 @@ class SermondistributorModelSerieslist extends JModelList { foreach ($items as $nr => &$item) { - if (!$item->idSeriesSermonB) + if (!SermondistributorHelper::checkArray($item->idSeriesSermonB)) { // remove empty series unset($items[$nr]);