Trying to fix the Ajax issue gh-26 we removed the multiple calls and restructure the ajax call.

This commit is contained in:
Llewellyn van der Merwe 2016-12-05 09:40:19 +02:00
parent b2516dfe23
commit 58de3631ab
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
321 changed files with 1339 additions and 583 deletions

View File

@ -23,32 +23,32 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 27th November, 2016
+ *Last Build*: 4th December, 2016
+ *Version*: 1.4.0
+ *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:
**178 Hours** or **22 Eight Hour Days** (actual time the author saved -
**180 Hours** or **23 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*: **63763**
+ *Line count*: **64519**
+ *File count*: **436**
+ *Folder count*: **90**
**117 Hours** or **15 Eight Hour Days** (the actual time the author spent)
**119 Hours** or **14 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @44hours** = codingtime / 4;
> **planning @25hours** = codingtime / 7;
> **debugging @45hours** = codingtime / 4;
> **planning @26hours** = codingtime / 7;
> **mapping @18hours** = codingtime / 10;
> **office @30hours** = codingtime / 6;)
**295 Hours** or **37 Eight Hour Days**
**299 Hours** or **37 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**,

View File

@ -23,32 +23,32 @@ The best way to see all your options is to install this component on you Joomla
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@vdm.io)
+ *Name*: [Sermon Distributor](https://www.vdm.io/)
+ *First Build*: 22nd October, 2015
+ *Last Build*: 27th November, 2016
+ *Last Build*: 4th December, 2016
+ *Version*: 1.4.0
+ *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:
**178 Hours** or **22 Eight Hour Days** (actual time the author saved -
**180 Hours** or **23 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*: **63763**
+ *Line count*: **64519**
+ *File count*: **436**
+ *Folder count*: **90**
**117 Hours** or **15 Eight Hour Days** (the actual time the author spent)
**119 Hours** or **14 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @44hours** = codingtime / 4;
> **planning @25hours** = codingtime / 7;
> **debugging @45hours** = codingtime / 4;
> **planning @26hours** = codingtime / 7;
> **mapping @18hours** = codingtime / 10;
> **office @30hours** = codingtime / 6;)
**295 Hours** or **37 Eight Hour Days**
**299 Hours** or **37 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**,

View File

@ -17,6 +17,8 @@
<action name="core.edit.created" title="COM_SERMONDISTRIBUTOR_EDIT_CREATED_DATE" description="COM_SERMONDISTRIBUTOR_EDIT_CREATED_DATE_DESC" />
<action name="site.categories.access" title="COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE" description="COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE_DESC" />
<action name="site.category.access" title="COM_SERMONDISTRIBUTOR_CATEGORY_ACCESS_SITE" description="COM_SERMONDISTRIBUTOR_CATEGORY_ACCESS_SITE_DESC" />
<action name="external_source.clear_local_listing" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CLEAR_LOCAL_LISTING_BUTTON_ACCESS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CLEAR_LOCAL_LISTING_BUTTON_ACCESS_DESC" />
<action name="external_source.reset_update_status" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RESET_UPDATE_STATUS_BUTTON_ACCESS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RESET_UPDATE_STATUS_BUTTON_ACCESS_DESC" />
<action name="external_source.access" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_ACCESS_DESC" />
<action name="external_source.batch" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_BATCH_USE_DESC" />
<action name="external_source.create" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_CREATE_DESC" />
@ -202,10 +204,10 @@
<action name="external_source.edit.update_method" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_METHOD" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_METHOD_DESC" />
<action name="external_source.edit.filetypes" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FILETYPES" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FILETYPES_DESC" />
<action name="external_source.edit.build" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_BUILD" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_BUILD_DESC" />
<action name="external_source.edit.permissiontype" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE_DESC" />
<action name="external_source.edit.update_timer" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER_DESC" />
<action name="external_source.edit.dropboxoptions" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS_DESC" />
<action name="external_source.edit.folder" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FOLDER" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_FOLDER_DESC" />
<action name="external_source.edit.dropboxoptions" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_DROPBOXOPTIONS_DESC" />
<action name="external_source.edit.update_timer" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_UPDATE_TIMER_DESC" />
<action name="external_source.edit.permissiontype" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_PERMISSIONTYPE_DESC" />
<action name="external_source.edit.sharedurl" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_SHAREDURL" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_SHAREDURL_DESC" />
<action name="external_source.edit.oauthtoken" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OAUTHTOKEN" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_OAUTHTOKEN_DESC" />
<action name="external_source.version" title="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION" description="COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_EDIT_VERSION_DESC" />

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage admin.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage dashboard.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_source.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_sources.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listing.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listings.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage manual_updater.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.css

View File

@ -46,6 +46,22 @@
default="10"
/>
<field type="spacer" name="spacerHistory" hr="true" />
<!-- Max_execution_time Field. Type: Integer. (joomla) -->
<field
type="integer"
name="max_execution_time"
label="COM_SERMONDISTRIBUTOR_CONFIG_MAX_EXECUTION_TIME_LABEL"
default="500"
description="COM_SERMONDISTRIBUTOR_CONFIG_MAX_EXECUTION_TIME_DESCRIPTION"
class="text_area"
required="true"
first="500"
last="50000"
step="10"
/>
<!-- Spacer_hr_d Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_d" hr="true" class="spacer_hr_d" />
<field name="autorTitle"
type="spacer"
label="COM_SERMONDISTRIBUTOR_CONFIG_AUTHOR"

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage controller.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.json.php
@ -46,7 +46,8 @@ class SermondistributorControllerAjax extends JControllerLegacy
$this->registerTask('updateLocalListingExternal', 'ajax');
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
$this->registerTask('getBuildTable', 'ajax');
$this->registerTask('getBuildTable', 'ajax');
$this->registerTask('getSourceStatus', 'ajax');
}
public function ajax()
@ -65,12 +66,12 @@ class SermondistributorControllerAjax extends JControllerLegacy
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$listingValue = $jinput->get('listing', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'INT');
if($idValue && $targetValue && $typeValue)
if($listingValue && $targetValue && $typeValue)
{
$result = $this->getModel('ajax')->autoUpdateLocalListingExternal($idValue, $targetValue, $typeValue);
$result = $this->getModel('ajax')->autoUpdateLocalListingExternal($listingValue, $targetValue, $typeValue);
}
else
{
@ -256,6 +257,44 @@ class SermondistributorControllerAjax extends JControllerLegacy
echo "(".json_encode($e).");";
}
}
break;
case 'getSourceStatus':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getSourceStatus($idValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_source.php
@ -47,6 +47,148 @@ class SermondistributorControllerExternal_source extends JControllerForm
{
$this->view_list = 'External_sources'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
public function clearLocalListing()
{
// Check for request forgeries.
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// get the data
$originalData = $this->input->post->get('jform', array(), 'array');
if (isset($originalData['id']) && $originalData['id'] > 0)
{
// get the needed
$app = JFactory::getApplication();
$lang = JFactory::getLanguage();
$model = $this->getModel();
$user = JFactory::getUser();
$context = "$this->option.edit.$this->context";
if (!$user->authorise('external_source.clear_local_listing', 'com_sermondistributor'))
{
// force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_CLEAR_LOCAL_LISTING'), 'error');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
);
return false;
}
// clear the listing
$cleared = $model->clearLocalListing($originalData['id']);
if (!$cleared)
{
// force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_NOT_CLEARED'), 'error');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
);
return false;
}
// force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_CLEARED_SUCCESSFULLY'), 'success');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
);
return true;
}
$this->setError(JText::_('COM_SERMONDISTRIBUTOR_CLEARING_LOCAL_LISTING_CAN_NOT_BE_DONE'));
$this->setMessage($this->getError(), 'error');
// Redirect back to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);
return false;
}
public function resetUpdateStatus()
{
// Check for request forgeries.
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// get the data
$originalData = $this->input->post->get('jform', array(), 'array');
if (isset($originalData['id']) && $originalData['id'] > 0)
{
// get the needed
$app = JFactory::getApplication();
$lang = JFactory::getLanguage();
$model = $this->getModel();
$user = JFactory::getUser();
$context = "$this->option.edit.$this->context";
if (!$user->authorise('external_source.reset_update_status', 'com_sermondistributor'))
{
// force production is not permitted
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_UPDATE_STATUS'), 'error');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
);
return false;
}
// reset update status
$reset = $model->resetUpdateStatus($originalData['id']);
if (isset($reset['error']))
{
// reset update status did not happen
$app->enqueueMessage($reset['error'], 'error');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
);
return false;
}
// reset update status success
$app->enqueueMessage(JText::_('COM_SERMONDISTRIBUTOR_RESETTING_THE_UPDATE_STATUS_WAS_SUCCESSFUL'), 'success');
// Save the data in the session.
$app->setUserState($context . '.data', $originalData);
// Redirect back to the edit screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
. $this->getRedirectToItemAppend($originalData['id'], 'id'), false
)
);
return true;
}
$this->setError(JText::_('COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS_CAN_NOT_BE_DONE'));
$this->setMessage($this->getError(), 'error');
// Redirect back to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_list
. $this->getRedirectToListAppend(), false
)
);
return false;
}
/**

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_sources.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_document.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage help_documents.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage local_listings.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage manual_updater.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preacher.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage preachers.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage series_list.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermon.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistic.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage statistics.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batch_.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermondistributor.php
@ -45,18 +45,24 @@ abstract class SermondistributorHelper
**/
public static function loadExternalUpdateAjax($document)
{
$updates = self::getExternalListingUpdateKeys(); // id, target, type
if (self::checkArray($updates))
$update = self::getNextUpdateValues(); // id, target, type
if ($update)
{
$document->addScriptDeclaration("
jQuery(window).load(function() {
checkExternalListing(".implode('); checkExternalListing(', $updates).");
checkExternalListing(".$update.");
});
function checkExternalListing(id, target, type) {
checkExternalListing_server(id, target, type).done(function(result) {
// good it is done
});
}
function checkExternalListing_server(id, target, type) {
var getUrl = '".JURI::root()."administrator/index.php?option=com_sermondistributor&task=ajax.autoUpdateLocalListingExternal&format=json';
if(target > 0 && type > 0 && id > 0){
var request = 'token=".JSession::getFormToken()."&target='+target+'&id='+id+'&type='+type;
var request = 'token=".JSession::getFormToken()."&target='+target+'&listing='+id+'&type='+type;
}
return jQuery.ajax({
type: 'GET',
@ -99,6 +105,11 @@ abstract class SermondistributorHelper
**/
protected static $updateerror = false;
/**
* The update last File path
**/
protected static $updatelast = false;
/**
* The update errors
**/
@ -329,6 +340,49 @@ abstract class SermondistributorHelper
return true;
}
protected static function getNextUpdateValues()
{
// get actual update values
$updates = self::getExternalListingUpdateKeys();
// get last update
$updatePath = self::getFilePath('update', 'last', 'vDm', '.txt', JPATH_COMPONENT_ADMINISTRATOR);
if (($lastUpdate = @file_get_contents($updatePath)) !== FALSE && self::checkArray($updates))
{
// now check what is next
$lastKey = array_search($lastUpdate, $updates);
if (!is_null($lastKey))
{
$nextKey = $lastKey + 1;
if (isset($updates[$nextKey]))
{
self::saveFile($updates[$nextKey],$updatePath);
return $updates[$nextKey];
}
}
}
// rest and start with the first key
if (self::checkArray($updates))
{
// save the first set
$start = reset($updates);
self::saveFile($start,$updatePath);
return $start;
}
return false;
}
protected static function saveFile($data,$path_filename)
{
if (self::checkString($data))
{
$fp = fopen($path_filename, 'w');
fwrite($fp, $data);
fclose($fp);
return true;
}
return false;
}
public static function getExternalListingUpdateKeys($id = null, $updateMethod = 2, $returnType = 1)
{
// first check if this file already has statistics
@ -336,7 +390,10 @@ abstract class SermondistributorHelper
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id','sharedurl','folder','permissiontype','dropboxoptions','build')));
$query->from($db->quoteName('#__sermondistributor_external_source'));
$query->where($db->quoteName('update_method') . ' = '. (int) $updateMethod);
if ($updateMethod && is_numeric($updateMethod))
{
$query->where($db->quoteName('update_method') . ' = '. (int) $updateMethod);
}
if ($id && is_numeric($id))
{
$query->where($db->quoteName('id') . ' = '. (int) $id);
@ -574,19 +631,29 @@ abstract class SermondistributorHelper
return false;
}
public static function getFilePath($type, $name = 'listing', $key = '', $fileType = '.json', $PATH = JPATH_COMPONENT_SITE)
public static function getFilePath($type, $name = 'listing', $key = 'vDm', $fileType = '.json', $PATH = JPATH_COMPONENT_SITE)
{
if (!self::checkString(self::${$type.$name}))
if (!isset(self::${$type.$name}[$key]) || !self::checkString(self::${$type.$name}[$key]))
{
// Get local key
$localkey = self::getLocalKey();
// check the key
$keyMD5 = '';
if ('vDm' != $key)
{
$keyMD5 = $key;
}
// set the name
$fileName = md5($type.$name.$localkey.$key);
$fileName = md5($type.$name.$localkey.$keyMD5);
// set file path
self::${$type.$name} = $PATH.'/helpers/'.$fileName.$fileType;
self::${$type.$name}[$key] = $PATH.'/helpers/'.$fileName.$fileType;
}
// return the path
return self::${$type.$name};
if (isset(self::${$type.$name}[$key]) && self::checkString(self::${$type.$name}[$key]))
{
// return the path
return self::${$type.$name}[$key];
}
return '';
}
/**
@ -628,6 +695,85 @@ abstract class SermondistributorHelper
self::setUpdateError($id, array(JText::_('COM_SERMONDISTRIBUTOR_THE_EXTERNAL_SOURCE_COULD_NOT_BE_FOUND')));
return false;
}
public static function getSourceStatus($id)
{
// fist get errors if any is found
$errors = array();
if ($targets = self::getExternalListingUpdateKeys($id, null, 1))
{
foreach ($targets as $target)
{
$key = preg_replace('/[ ,]+/', '', trim($target));
if ($error = self::getUpdateError(0, $key))
{
$errors[] = $error;
}
}
}
// check when was the last update
$updateInfo = self::updateInfo($id);
if (!$updateInfo)
{
$errors[] = JText::_('COM_SERMONDISTRIBUTOR_THIS_SOURCE_HAS_NO_LOCAL_LISTING_SET');
}
// build the return string
if (isset($updateInfo['last']) || self::checkArray($errors))
{
$body = array();
// great we have source status
if (isset($updateInfo['last']))
{
$body[] = '<h3>'. JText::_('COM_SERMONDISTRIBUTOR_LISTING_INFO') . '</h3>';
$body[] = '<p><b>'. JText::_('COM_SERMONDISTRIBUTOR_LAST_UPDATE') . ':</b> <em>'.$updateInfo['last'];
$body[] = '</em><br /><b>'. JText::_('COM_SERMONDISTRIBUTOR_NUMBER_OF_FILES_LISTED') . ':</b> <em>'.$updateInfo['qty'];
$body[] = '</em></p>';
}
// now set any errors found
if (self::checkArray($errors))
{
$body[] = '<h3>'. JText::_('COM_SERMONDISTRIBUTOR_NOTICE') . '</h3>';
$body[] = implode('', $errors);
}
return '<a class="btn btn-small btn-success" href="#source-status'.$id.'" data-toggle="modal">'.JText::_('COM_SERMONDISTRIBUTOR_VIEW_UPDATE_STATUS').'</a>'
. JHtml::_('bootstrap.renderModal', 'source-status'.$id, array('title' => JText::_('COM_SERMONDISTRIBUTOR_SOURCE_STATUS_REPORT')), implode('', $body));
}
// no status found
return false;
}
public static function updateInfo($id)
{
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.created','a.modified')));
$query->from($db->quoteName('#__sermondistributor_local_listing', 'a'));
$query->where($db->quoteName('a.external_source') . ' = ' . (int) $id);
// Reset the query using our newly populated query object.
$db->setQuery($query);
$db->execute();
if ($qty = $db->getNumRows())
{
$data = $db->loadRowList();
$last = 0;
foreach ($data as $dates)
{
foreach ($dates as $date)
{
$time = strtotime($date);
if ($time > $last)
{
$last = $time;
}
}
}
$info['qty'] = (int) $qty;
$info['last'] = self::fancyDate($last);
return $info;
}
return false;
}
public static function getUpdateError($id, $fileKey = null)
{
@ -646,9 +792,9 @@ abstract class SermondistributorHelper
}
return false;
}
if (isset(self::$updateErrors[$id]) && self::checkArray(self::$updateErrors[$id]))
elseif (isset(self::$updateErrors[$id]) && self::checkArray(self::$updateErrors[$id]))
{
return '<ul><li>'.implode('</li><li>', self::$updateErrors[$id]).'</li><ul>';
return '<ul><li>'.implode('</li><li>', self::$updateErrors[$id]).'</li></ul>';
}
return JText::_('COM_SERMONDISTRIBUTOR_UNKNOWN_ERROR_HAS_OCCURRED');
}
@ -667,6 +813,52 @@ abstract class SermondistributorHelper
}
}
}
/**
* Change to nice fancy date
*/
public static function fancyDate($date)
{
if (!self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('jS \o\f F Y',$date);
}
/**
* Change to nice fancy time and date
*/
public static function fancyDateTime($time)
{
if (!self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
return date('(G:i) jS \o\f F Y',$time);
}
/**
* Change to nice hour:minutes time
*/
public static function fancyTime($time)
{
if (!self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
return date('G:i',$time);
}
/**
* Check if string is a valid time stamp
*/
public static function isValidTimeStamp($timestamp)
{
return ((int) $timestamp === $timestamp)
&& ($timestamp <= PHP_INT_MAX)
&& ($timestamp >= ~PHP_INT_MAX);
}
/**
* Load the Component xml manifest.
**/

View File

@ -14,6 +14,8 @@ COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE="Categories (Site) Access"
COM_SERMONDISTRIBUTOR_CATEGORIES_ACCESS_SITE_DESC=" Allows the users in this group to access site categories."
COM_SERMONDISTRIBUTOR_CATEGORY_ACCESS_SITE="Category (Site) Access"
COM_SERMONDISTRIBUTOR_CATEGORY_ACCESS_SITE_DESC=" Allows the users in this group to access site category."
COM_SERMONDISTRIBUTOR_CLEARING_LOCAL_LISTING_CAN_NOT_BE_DONE="Clearing local listing can not be done."
COM_SERMONDISTRIBUTOR_CLEAR_LOCAL_LISTING="Clear Local Listing"
COM_SERMONDISTRIBUTOR_CONFIG_ADD_TO_BUTTON_DESCRIPTION="Allow add to external source button to show, this will expose the external source links."
COM_SERMONDISTRIBUTOR_CONFIG_ADD_TO_BUTTON_LABEL="External Source Button"
COM_SERMONDISTRIBUTOR_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
@ -152,6 +154,8 @@ COM_SERMONDISTRIBUTOR_CONFIG_LIST_SERIES_TABLE_COLOR_LABEL="Table Color"
COM_SERMONDISTRIBUTOR_CONFIG_LOCALFOLDER_DESCRIPTION="Enter the full path to the local folder where your files are found."
COM_SERMONDISTRIBUTOR_CONFIG_LOCALFOLDER_HINT="/home/username/localfolder/"
COM_SERMONDISTRIBUTOR_CONFIG_LOCALFOLDER_LABEL="Local Folder Path (File Source)"
COM_SERMONDISTRIBUTOR_CONFIG_MAX_EXECUTION_TIME_DESCRIPTION="Set in minutes the max execution time of the PHP script during updating to local listing."
COM_SERMONDISTRIBUTOR_CONFIG_MAX_EXECUTION_TIME_LABEL="Max Execution Time"
COM_SERMONDISTRIBUTOR_CONFIG_NO="No"
COM_SERMONDISTRIBUTOR_CONFIG_NONE="None"
COM_SERMONDISTRIBUTOR_CONFIG_ONLY_EXTRA="Only Extra"
@ -420,12 +424,15 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_N_ITEMS_UNPUBLISHED_1="%s External Source
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_SUBMENU="External Sources Submenu"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCES_SUBMENU_DESC="Allows the users in this group to update the submenu of the external source"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_APP_FOLDER="App folder"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_APP_LIMITATION_NOTE_DESCRIPTION="Please Note: <i>There is a limitation of 2000 files app/folder</i>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_APP_LIMITATION_NOTE_DESCRIPTION="Please Note: <i>There is a limitation of 500 files per app/folder</i>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_AUTOMATIC="Automatic"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_AVI=".avi"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD="Build"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_DESCRIPTION="Set the method used to add files."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_LABEL="Build Option"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_BUILD_OPTION="Build Option"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CLEAR_LOCAL_LISTING_BUTTON_ACCESS="External Source Clear Local Listing Button Access"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CLEAR_LOCAL_LISTING_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear local listing button."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CREATED_BY_DESC="The user that created this External Source."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CREATED_BY_LABEL="Created By"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_CREATED_DATE_DESC="The date this External Source was created."
@ -452,7 +459,7 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FILETYPES_DESCRIPTION="Select the file typ
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FILETYPES_LABEL="File Types"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER="Folder"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_DESCRIPTION="Enter the folders to target. The folders must be in the account where you generated the access token."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_LABEL="Target Folders<br /><small>Please note: <i>limitation of 2000 files per/folder</i></small>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_LABEL="Target Folders<br /><small>Please note: <i>limitation of 500 files per/folder</i></small>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_PATH="Folder Path"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FOLDER_SELECT="Add/Remove"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_FULL_DROPBOX="Full Dropbox"
@ -475,8 +482,8 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPFOUR=".mp4"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPG=".mpg"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_MPTHREE=".mp3"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NEW="A New External Source"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_AUTO_DROPBOX_DESCRIPTION="<ul>
<li>Create main/first auto folder in Dropbox. This will be where you create the folders with the preacher's name. Using the preacher's alias from the system as the folder name will insure no mismatch, if the preacher already exist on the system.</li>
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_AUTO_EXTERNALSOURCE_DESCRIPTION="<b>To integrate auto External Source with your system you need to do the following:</b> <ul>
<li>Create main/first auto folder in External Source. This will be where you create the folders with the preacher's name. Using the preacher's alias from the system as the folder name will insure no mismatch, if the preacher already exist on the system.</li>
<li>You can add files directly to the preacher folder if it is not linked to a series.</li>
<li>If you would like the sermon linked to a series, you simply create a folder inside the preacher's folder with the series' name, and place the sermon file inside that series' folder. Using the series' alias from the system as the folder name will insure no mismatch, if the series already exist on the system.</li>
<li>Adding other preachers to the same series will only require creating a folder inside that preacher's folder with the same series' name and placing his sermons inside that new folder. Using the series' alias from the system as the folder name will insure no mismatch, if the series already exist on the system.</li>
@ -535,15 +542,16 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_AUTO_DROPBOX_DESCRIPTION="<ul>
</li>
<li>Adding folders and sermons will automatically load them to your sermon distributor on your website, or update the already existing sermons with the new files.</li>
</ul></li>
</ul><b>The links that are required below should be the direct Dropbox shared links to the auto folder. They should not be the same folder, and not be inside one another. Always totally separate folders! Leave blank to deactivate.</b>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_AUTO_DROPBOX_LABEL="Want to use Dropbox Auto links with your system, then you need to do the following:"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_MANUAL_DROPBOX_DESCRIPTION="<ul>
<li>Create main/first manual folder in Dropbox. This will be where all files are placed. No sub folders, just one huge folder with all the files!</li>
<li>You will place the file on Dropbox in that main folder first.</li>
</ul>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_AUTO_EXTERNALSOURCE_LABEL="External Source Integration"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_MANUAL_EXTERNALSOURCE_DESCRIPTION="<b>To integrate manual External Source option with your system you need to do the following:</b>
<ul>
<li>Create main/first manual folder in External Source. This will be where all files are placed. No sub folders, just one huge folder with all the files!</li>
<li>You will place the file on External Source in that main folder first.</li>
<li>Then the next step will be to come to Sermon Distributor and create the preacher and series if they do not already exist.</li>
<li>Please allow enough time (as set above +) for the local listing of files to update.</li>
<li>Then you should create the sermon the file belongs to and select 'Dropbox' as the source of your file.</li>
<li>Next select 'Manual' as the build option. This will load a drop-down with the file names in the Manual Folder on Dropbox. Should the new file not be seen give it a little more time to update the local listing of files.</li>
<li>Please allow enough time (as set in Sermon Distributor Options) for the local listing of files to update.</li>
<li>Then you should create the sermon the file belongs to and select 'External Source' as the source of your file.</li>
<li>Next select 'Manual' as the build option. This will load a drop-down with the file names in the Manual Folder on External Source. Should the new file not be seen give it a little more time to update the local listing of files.</li>
<li>If the List is very long, you can in the select box type the name of the file and it will shorten the list. Then select your file and continue with the setup of the sermon as usual.</li>
<li>To ensure that all downloads work well, we need to hold to the following file naming convention:
<ul>
@ -551,8 +559,8 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_MANUAL_DROPBOX_DESCRIPTION="<ul>
<li>No strange characters in the file name only A-z 0-9 underscore and hyphen.</li>
</ul>
</li>
</ul><b>The links that are required below should be the direct Dropbox shared links to the main manual folder. They should not be the same folder, and not be inside one another. Always totally separate folders! Leave blank to deactivate.</b>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_MANUAL_DROPBOX_LABEL="Want to use Dropbox Manual links with your system, then you need to do the following:"
</ul>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOTE_MANUAL_EXTERNALSOURCE_LABEL="External Source Integration"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_NOT_REQUIRED="Not Required"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN="Oauthtoken"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_OAUTHTOKEN_DESCRIPTION="By using an access token, the system will be able to make automatic API calls to your app without going through the authorization flow.<hr />This field is being kept encrypted in the database.<hr /> Yet <b>Joomla back-end must be access with SSL in-place when saving this page.</b> This will help avoid a man in the middle attach on your access token."
@ -574,11 +582,13 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPT=".ppt"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PPTX=".pptx"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_PUBLISHING="Publishing"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RELATION="External Source Relation"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RESET_UPDATE_STATUS_BUTTON_ACCESS="External Source Reset Update Status Button Access"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_RESET_UPDATE_STATUS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the reset update status button."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the External Source to customise the alias."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SELECT_AN_OPTION="Select an option"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL="Sharedurl"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_DESCRIPTION="Enter the shared-urls of the main folders to target. The shared-urls must be from the account where you generated the access token."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_LABEL="Target Shared-urls<br /><small>Please note: <i>limitation of 2000 files per/shared-url</i></small>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_LABEL="Target Shared-urls<br /><small>Please note: <i>limitation of 500 files per/shared-url</i></small>"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHAREDURL_SELECT="Add/Remove"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_SHARED_URL="Shared URL"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_STATUS="Status"
@ -599,9 +609,6 @@ COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_UPDATE_TIMER_LABEL="Update Timer"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_VERSION_DESC="A count of the number of times this External Source has been revised."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_VERSION_LABEL="Revision"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WAV=".wav"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WIKI="Wiki"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WIKI_CHECK_NOTE_DESCRIPTION="It will give instructions on how to setup the external source in <b>relation to the Build Option</b> you have chosen."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WIKI_CHECK_NOTE_LABEL="Please check the Wiki tab above."
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_WMV=".wmv"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_XLS=".xls"
COM_SERMONDISTRIBUTOR_EXTERNAL_SOURCE_XLSX=".xlsx"
@ -758,7 +765,9 @@ COM_SERMONDISTRIBUTOR_IMPORT_UPLOAD_BOTTON="Upload File"
COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_ACCESS="- Keep Original Access -"
COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -"
COM_SERMONDISTRIBUTOR_KEEP_ORIGINAL_STATE="- Keep Original State -"
COM_SERMONDISTRIBUTOR_LAST_UPDATE="Last Update"
COM_SERMONDISTRIBUTOR_LICENSE="License"
COM_SERMONDISTRIBUTOR_LISTING_INFO="Listing Info"
COM_SERMONDISTRIBUTOR_LOCAL_LISTING="Local Listing"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS="Local Listings"
COM_SERMONDISTRIBUTOR_LOCAL_LISTINGS_ACCESS="Local Listings Access"
@ -865,6 +874,8 @@ COM_SERMONDISTRIBUTOR_LOCAL_LISTING_URL_HINT="shared URL"
COM_SERMONDISTRIBUTOR_LOCAL_LISTING_URL_LABEL="Shared-URL"
COM_SERMONDISTRIBUTOR_LOCAL_LISTING_VERSION_DESC="A count of the number of times this Local Listing has been revised."
COM_SERMONDISTRIBUTOR_LOCAL_LISTING_VERSION_LABEL="Revision"
COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_CLEARED_SUCCESSFULLY="Local listing was cleared successfully."
COM_SERMONDISTRIBUTOR_LOCAL_LISTING_WAS_NOT_CLEARED="Local listing was not cleared."
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER="Manual Updater"
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_ACCESS="Manual Updater Access"
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_ACCESS_DESC="Allows the users in this group to access Manual Updater"
@ -877,10 +888,13 @@ COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU="Manual Updater Submenu"
COM_SERMONDISTRIBUTOR_MANUAL_UPDATER_SUBMENU_DESC="Allows the users in this group to update the submenu of the Manual Updater"
COM_SERMONDISTRIBUTOR_NEW="New"
COM_SERMONDISTRIBUTOR_NEW_ISSUE="New Issue"
COM_SERMONDISTRIBUTOR_NOTICE="Notice!"
COM_SERMONDISTRIBUTOR_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied."
COM_SERMONDISTRIBUTOR_NO_ACCESS_GRANTED="No Access Granted!"
COM_SERMONDISTRIBUTOR_NO_FILES_LINKED_YET="No Files Linked Yet"
COM_SERMONDISTRIBUTOR_NO_ID_FOUND_CAN_NOT_RESET_THE_UPDATE_STATUS="No id found, can not reset the update status!"
COM_SERMONDISTRIBUTOR_NO_MANUAL_UPDATES_AVAILABLE="No Manual Updates Available"
COM_SERMONDISTRIBUTOR_NUMBER_OF_FILES_LISTED="Number of Files Listed"
COM_SERMONDISTRIBUTOR_OPENED_BY="opened by"
COM_SERMONDISTRIBUTOR_PLEASE_CHECK_AGAIN_LATTER="Please check again latter."
COM_SERMONDISTRIBUTOR_PREACHER="Preacher"
@ -979,6 +993,9 @@ COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE="Website"
COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_DESCRIPTION="Enter website address"
COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_HINT="http://www.example.com"
COM_SERMONDISTRIBUTOR_PREACHER_WEBSITE_LABEL="Website"
COM_SERMONDISTRIBUTOR_RESETTING_THE_UPDATE_STATUS_WAS_SUCCESSFUL="Resetting the update status was successful!"
COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS="Reset Update Status"
COM_SERMONDISTRIBUTOR_RESET_UPDATE_STATUS_CAN_NOT_BE_DONE="Reset update status can not be done."
COM_SERMONDISTRIBUTOR_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github"
COM_SERMONDISTRIBUTOR_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github"
COM_SERMONDISTRIBUTOR_SAVE_SUCCESS="Great! Item successfully saved."
@ -1296,6 +1313,7 @@ COM_SERMONDISTRIBUTOR_SERMON_URL_LABEL="File URL"
COM_SERMONDISTRIBUTOR_SERMON_VERSION_DESC="A count of the number of times this Sermon has been revised."
COM_SERMONDISTRIBUTOR_SERMON_VERSION_LABEL="Revision"
COM_SERMONDISTRIBUTOR_SHAREDURL="Shared-url"
COM_SERMONDISTRIBUTOR_SOURCE_STATUS_REPORT="Source Status Report."
COM_SERMONDISTRIBUTOR_STATISTIC="Statistic"
COM_SERMONDISTRIBUTOR_STATISTICS="Statistics"
COM_SERMONDISTRIBUTOR_STATISTICS_ACCESS="Statistics Access"
@ -1391,8 +1409,10 @@ COM_SERMONDISTRIBUTOR_SUBMENU_PREACHERS="Preachers"
COM_SERMONDISTRIBUTOR_SUBMENU_SERIES_LIST="Series List"
COM_SERMONDISTRIBUTOR_SUBMENU_SERMONS="Sermons"
COM_SERMONDISTRIBUTOR_SUBMENU_STATISTICS="Statistics"
COM_SERMONDISTRIBUTOR_S_COULD_NOT_BE_REMOVE="%s could not be remove"
COM_SERMONDISTRIBUTOR_TARGETED_FOLDER="Targeted Folder"
COM_SERMONDISTRIBUTOR_THERE_HAS_NO_TARGETS_BEEN_SET_PLEASE_MAKE_SURE_TO_ADD_TARGETS_TO_THIS_EXTERNAL_SOURCE="There has no targets been set, please make sure to add targets to this external source"
COM_SERMONDISTRIBUTOR_THERE_IS_NO_TARGETS_SET_FOR_THIS_SOURCE_CAN_NOT_RESET_THE_UPDATE_STATUS="There is no targets set for this source, can not reset the update status!"
COM_SERMONDISTRIBUTOR_THERE_WAS_AN_ERROR_DURING_THE_LAST_UPDATE_ATTEMPT="There was an error during the last update attempt."
COM_SERMONDISTRIBUTOR_THE_EXTERNAL_SOURCE_COULD_NOT_BE_FOUND="The external source could not be found."
COM_SERMONDISTRIBUTOR_THE_FILES_LINKED_FROM_EXTERNAL_SOURCE="The Files Linked from External Source"
@ -1400,6 +1420,7 @@ COM_SERMONDISTRIBUTOR_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading"
COM_SERMONDISTRIBUTOR_THE_README_IS_LOADING="The readme is loading"
COM_SERMONDISTRIBUTOR_THE_UPDATE_IS_RUNNING="The update is running."
COM_SERMONDISTRIBUTOR_THE_WIKI_IS_LOADING="The wiki is loading"
COM_SERMONDISTRIBUTOR_THIS_SOURCE_HAS_NO_LOCAL_LISTING_SET="This source has no local listing set."
COM_SERMONDISTRIBUTOR_UNKNOWN_ERROR_HAS_OCCURRED="Unknown error has occurred."
COM_SERMONDISTRIBUTOR_UPDATE_LOCAL_LINKS_OF_TARGET_S_EXTERNAL_SOURCE="Update Local Links of (target %s) External Source"
COM_SERMONDISTRIBUTOR_USE_BATCH="Use Batch"
@ -1407,4 +1428,7 @@ COM_SERMONDISTRIBUTOR_USE_BATCH_DESC=" Allows users in this group to use batch c
COM_SERMONDISTRIBUTOR_VERSION="Version"
COM_SERMONDISTRIBUTOR_VIEW_ERROR="View Error!"
COM_SERMONDISTRIBUTOR_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github"
COM_SERMONDISTRIBUTOR_VIEW_UPDATE_STATUS="View Update Status"
COM_SERMONDISTRIBUTOR_WEBSITE="Website"
COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_CLEAR_LOCAL_LISTING="You do not have permission to clear local listing."
COM_SERMONDISTRIBUTOR_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_UPDATE_STATUS="You do not have permission to reset update status."

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage batchselection.php

View File

@ -11,10 +11,10 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage wiki_fullwidth.php
@subpackage build_option_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -30,8 +30,9 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'note_manual_dropbox',
'note_auto_dropbox'
'build',
'note_manual_externalsource',
'note_auto_externalsource'
);
?>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php
@ -30,8 +30,6 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'build',
'wiki_check_note',
'update_method',
'update_timer',
'filetypes'

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publlshing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publlshing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage sermons_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_under.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage files_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage stastics_fullwidth.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_above.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_left.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage details_right.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage metadata.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage publishing.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage ajax.php
@ -780,4 +780,9 @@ class SermondistributorModelAjax extends JModelList
$rows[$nr] .= '<td style="padding: 10px; text-align: center; border: 1px solid rgb(221, 221, 221);">'.$value.'</td>';
}
}
public function getSourceStatus($id)
{
return SermondistributorHelper::getSourceStatus($id);
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_source.php
@ -64,6 +64,80 @@ class SermondistributorModelExternal_source extends JModelAdmin
public function getTable($type = 'external_source', $prefix = 'SermondistributorTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
}
public function clearLocalListing($id)
{
// clear local listing
if ($id > 0)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$conditions = array(
$db->quoteName('external_source') . ' = ' . (int) $id
);
$query->delete($db->quoteName('#__sermondistributor_local_listing'));
$query->where($conditions);
$db->setQuery($query);
return $db->execute();
}
return false;
}
public function resetUpdateStatus($id)
{
// reset the update status
if ($id > 0)
{
if ($targets = SermondistributorHelper::getExternalListingUpdateKeys($id, null))
{
// import the Joomla librarys
jimport('joomla.filesystem.file');
$errors = array();
foreach ($targets as $target)
{
// build info file key
$targetArray = explode(', ', $target);
$targetArray[2] = ($targetArray[2] == 2) ? 'auto' : 'manual';
$infoFileKey = SermondistributorHelper::safeString(implode('', $targetArray));
$infoFileName = md5($infoFileKey.'info').'.json';
// info on update path
$infoFilePath = JPATH_COMPONENT_SITE.'/helpers/'.$infoFileName;
// now remove file if found
if (JFile::exists($infoFilePath))
{
if (!JFile::delete($infoFilePath))
{
$errors[] = JText::sprintf('COM_SERMONDISTRIBUTOR_S_COULD_NOT_BE_REMOVE', $infoFileName);
}
}
// remove any notice on update errors
$key = preg_replace('/[ ,]+/', '', trim($target));
$noticeFilePath = SermondistributorHelper::getFilePath('update', 'error', $key, '.txt', JPATH_COMPONENT_ADMINISTRATOR);
// now remove file if found
if (JFile::exists($noticeFilePath))
{
if (!JFile::delete($noticeFilePath))
{
$noticeFileName = basename($noticeFilePath);
$errors[] = JText::sprintf('COM_SERMONDISTRIBUTOR_S_COULD_NOT_BE_REMOVE', $noticeFileName);
}
}
}
// check if there was an error
if (SermondistributorHelper::checkArray($errors))
{
return array('error' => '<ul><li>'.implode('</li><li>', $errors).'</li></ul>');
}
return true;
}
return array('error' => JText::_('COM_SERMONDISTRIBUTOR_THERE_IS_NO_TARGETS_SET_FOR_THIS_SOURCE_CAN_NOT_RESET_THE_UPDATE_STATUS'));
}
return array('error' => JText::_('COM_SERMONDISTRIBUTOR_NO_ID_FOUND_CAN_NOT_RESET_THE_UPDATE_STATUS'));
}
/**
@ -278,39 +352,23 @@ class SermondistributorModelExternal_source extends JModelAdmin
$form->setFieldAttribute('build', 'required', 'false');
}
}
// Modify the form based on Edit Permissiontype access controls.
if ($id != 0 && (!$user->authorise('external_source.edit.permissiontype', 'com_sermondistributor.external_source.' . (int) $id))
|| ($id == 0 && !$user->authorise('external_source.edit.permissiontype', 'com_sermondistributor')))
// Modify the form based on Edit Folder access controls.
if ($id != 0 && (!$user->authorise('external_source.edit.folder', 'com_sermondistributor.external_source.' . (int) $id))
|| ($id == 0 && !$user->authorise('external_source.edit.folder', 'com_sermondistributor')))
{
// Disable fields for display.
$form->setFieldAttribute('permissiontype', 'disabled', 'true');
$form->setFieldAttribute('folder', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('permissiontype', 'readonly', 'true');
$form->setFieldAttribute('folder', 'readonly', 'true');
// Disable radio button for display.
$class = $form->getFieldAttribute('permissiontype', 'class', '');
$form->setFieldAttribute('permissiontype', 'class', $class.' disabled no-click');
if (!$form->getValue('permissiontype'))
$class = $form->getFieldAttribute('folder', 'class', '');
$form->setFieldAttribute('folder', 'class', $class.' disabled no-click');
if (!$form->getValue('folder'))
{
// Disable fields while saving.
$form->setFieldAttribute('permissiontype', 'filter', 'unset');
$form->setFieldAttribute('folder', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('permissiontype', 'required', 'false');
}
}
// Modify the form based on Edit Update Timer access controls.
if ($id != 0 && (!$user->authorise('external_source.edit.update_timer', 'com_sermondistributor.external_source.' . (int) $id))
|| ($id == 0 && !$user->authorise('external_source.edit.update_timer', 'com_sermondistributor')))
{
// Disable fields for display.
$form->setFieldAttribute('update_timer', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('update_timer', 'readonly', 'true');
if (!$form->getValue('update_timer'))
{
// Disable fields while saving.
$form->setFieldAttribute('update_timer', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('update_timer', 'required', 'false');
$form->setFieldAttribute('folder', 'required', 'false');
}
}
// Modify the form based on Edit Dropboxoptions access controls.
@ -332,23 +390,39 @@ class SermondistributorModelExternal_source extends JModelAdmin
$form->setFieldAttribute('dropboxoptions', 'required', 'false');
}
}
// Modify the form based on Edit Folder access controls.
if ($id != 0 && (!$user->authorise('external_source.edit.folder', 'com_sermondistributor.external_source.' . (int) $id))
|| ($id == 0 && !$user->authorise('external_source.edit.folder', 'com_sermondistributor')))
// Modify the form based on Edit Update Timer access controls.
if ($id != 0 && (!$user->authorise('external_source.edit.update_timer', 'com_sermondistributor.external_source.' . (int) $id))
|| ($id == 0 && !$user->authorise('external_source.edit.update_timer', 'com_sermondistributor')))
{
// Disable fields for display.
$form->setFieldAttribute('folder', 'disabled', 'true');
$form->setFieldAttribute('update_timer', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('folder', 'readonly', 'true');
// Disable radio button for display.
$class = $form->getFieldAttribute('folder', 'class', '');
$form->setFieldAttribute('folder', 'class', $class.' disabled no-click');
if (!$form->getValue('folder'))
$form->setFieldAttribute('update_timer', 'readonly', 'true');
if (!$form->getValue('update_timer'))
{
// Disable fields while saving.
$form->setFieldAttribute('folder', 'filter', 'unset');
$form->setFieldAttribute('update_timer', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('folder', 'required', 'false');
$form->setFieldAttribute('update_timer', 'required', 'false');
}
}
// Modify the form based on Edit Permissiontype access controls.
if ($id != 0 && (!$user->authorise('external_source.edit.permissiontype', 'com_sermondistributor.external_source.' . (int) $id))
|| ($id == 0 && !$user->authorise('external_source.edit.permissiontype', 'com_sermondistributor')))
{
// Disable fields for display.
$form->setFieldAttribute('permissiontype', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('permissiontype', 'readonly', 'true');
// Disable radio button for display.
$class = $form->getFieldAttribute('permissiontype', 'class', '');
$form->setFieldAttribute('permissiontype', 'class', $class.' disabled no-click');
if (!$form->getValue('permissiontype'))
{
// Disable fields while saving.
$form->setFieldAttribute('permissiontype', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('permissiontype', 'required', 'false');
}
}
// Modify the form based on Edit Sharedurl access controls.

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage external_sources.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage adminviewfolderlist.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage articles.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.4.0
@build 27th November, 2016
@build 4th December, 2016
@created 22nd October, 2015
@package Sermon Distributor
@subpackage externalsource.php

Some files were not shown because too many files have changed in this diff Show More